diff --git a/.cspell.json b/.cspell.json index 821d7bafd22..c324d7e6c1c 100644 --- a/.cspell.json +++ b/.cspell.json @@ -16,6 +16,8 @@ ], "ignorePaths": [ "**/*.js", + "**/*.mjs", + "**/*.css", "**/*.pyc", "**/*.log", "**/*.jsonl", @@ -23,16 +25,23 @@ "**/*.txt", ".gitignore", "scripts/docs/_build/**", - "src/promptflow/promptflow/azure/_restclient/flow/**", - "src/promptflow/promptflow/azure/_restclient/swagger.json", - "src/promptflow/promptflow/azure/_models/**", + "src/promptflow-azure/promptflow/azure/_restclient/flow/**", + "src/promptflow-azure/promptflow/azure/_restclient/swagger.json", + "src/promptflow-azure/promptflow/azure/_models/**", + "src/promptflow-azure/tests/**", + "src/promptflow-core/promptflow/core/_connection_provider/_models/**", "src/promptflow/tests/**", + "src/promptflow-recording/**", "src/promptflow-tools/tests/**", + "src/promptflow-devkit/promptflow/_sdk/_service/static/index.html", "**/flow.dag.yaml", + "**/pyproject.toml", "**/setup.py", "scripts/installer/curl_install_pypi/**", "scripts/installer/windows/**", - "src/promptflow/promptflow/_sdk/_service/pfsvc.py" + ".github/workflows/**", + ".github/actions/**", + ".github/pipelines/**" ], "words": [ "aoai", @@ -84,7 +93,6 @@ "nunit", "astext", "Likert", - "pfsvc", "geval", "Summ", "Bhavik", @@ -180,7 +188,8 @@ "addrs", "pywin", "STARTF", - "mltable" + "mltable", + "setenv" ], "flagWords": [ "Prompt Flow" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 712b2d8ad3e..f84cfdc5e4c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,18 +1,24 @@ * @microsoft/prompt-flow-approvers -/src/promptflow/promptflow/_core/ @microsoft/promptflow-execution -/src/promptflow/promptflow/_internal/ @microsoft/promptflow-execution -/src/promptflow/promptflow/batch/ @microsoft/promptflow-execution -/src/promptflow/promptflow/executor/ @microsoft/promptflow-execution -/src/promptflow/promptflow/integrations/ @microsoft/promptflow-execution -/src/promptflow/promptflow/storage/ @microsoft/promptflow-execution +/src/promptflow-tracing/promptflow/tracing/_start_trace.py @microsoft/promptflow-sdk + +/src/promptflow-tracing/promptflow/tracing/ @microsoft/promptflow-execution +/src/promptflow-core/promptflow/_core/ @microsoft/promptflow-execution +/src/promptflow-devkit/promptflow/_internal/ @microsoft/promptflow-execution +/src/promptflow-devkit/promptflow/batch/ @microsoft/promptflow-execution +/src/promptflow-devkit/promptflow/_proxy/ @microsoft/promptflow-execution +/src/promptflow-core/promptflow/executor/ @microsoft/promptflow-execution +/src/promptflow-core/promptflow/integrations/ @microsoft/promptflow-execution +/src/promptflow-core/promptflow/storage/ @microsoft/promptflow-execution /src/promptflow/tests/executor/ @microsoft/promptflow-execution -/src/promptflow/promptflow/_cli/ @microsoft/promptflow-sdk -/src/promptflow/promptflow/_sdk/ @microsoft/promptflow-sdk -/src/promptflow/promptflow/azure/ @microsoft/promptflow-sdk -/src/promptflow/promptflow/entities/ @microsoft/promptflow-sdk -/src/promptflow/promptflow/operations/ @microsoft/promptflow-sdk +/src/promptflow-core/promptflow/core/ @microsoft/promptflow-sdk +/src/promptflow-devkit/promptflow/_cli/ @microsoft/promptflow-sdk +/src/promptflow-devkit/promptflow/_sdk/ @microsoft/promptflow-sdk +/src/promptflow-devkit/promptflow/_proxy/ @microsoft/promptflow-sdk +/src/promptflow-devkit/promptflow/entities/ @microsoft/promptflow-sdk +/src/promptflow-devkit/promptflow/operations/ @microsoft/promptflow-sdk +/src/promptflow-azure/promptflow/azure/ @microsoft/promptflow-sdk /src/promptflow/tests/sdk_cli_test/ @microsoft/promptflow-sdk /src/promptflow/tests/sdk_cli_azure_test/ @microsoft/promptflow-sdk /src/promptflow/tests/sdk_cli_global_config_test/ @microsoft/promptflow-sdk diff --git a/.github/actions/step_create_python_environment/action.yml b/.github/actions/step_create_python_environment/action.yml index d5ec17972af..aa345143b25 100644 --- a/.github/actions/step_create_python_environment/action.yml +++ b/.github/actions/step_create_python_environment/action.yml @@ -12,9 +12,10 @@ runs: using: composite steps: - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.pythonVersion }} + - uses: snok/install-poetry@v1 - run: | python -m pip install --upgrade pip pip install -r ${{ inputs.pipFilePath }} diff --git a/.github/actions/step_sdk_setup/action.yml b/.github/actions/step_sdk_setup/action.yml index a82ab436051..e12e803b84c 100644 --- a/.github/actions/step_sdk_setup/action.yml +++ b/.github/actions/step_sdk_setup/action.yml @@ -16,20 +16,6 @@ runs: shell: pwsh run: | pip uninstall -y promptflow promptflow-sdk promptflow-tools - - name: 'Build and install: promptflow with extra' - if: inputs.setupType == 'promptflow_with_extra' - shell: pwsh - run: | - Set-PSDebug -Trace 1 - pip install -r ./dev_requirements.txt - echo "########### pip list (Before) ###########" - pip list - python ./setup.py bdist_wheel - $package = Get-ChildItem ./dist | ? { $_.Name.Contains('.whl')} - pip install $($package.FullName + "[azure,executable,azureml-serving,executor-service]") - echo "########### pip freeze (After) ###########" - pip freeze - working-directory: ${{ inputs.scriptPath }} - name: 'Build and install: promptflow-sdk' if: inputs.setupType == 'promptflow_dev' shell: pwsh @@ -52,3 +38,17 @@ runs: echo "########### pip freeze (After) ###########" pip freeze working-directory: src/promptflow-tools + - name: 'Build and install: promptflow with extra' + if: inputs.setupType == 'promptflow_with_extra' + shell: pwsh + run: | + Set-PSDebug -Trace 1 + pip install -r ./dev_requirements.txt + echo "########### pip list (Before) ###########" + pip list + python ./setup.py bdist_wheel + $package = Get-ChildItem ./dist | ? { $_.Name.Contains('.whl')} + pip install --force-reinstall $($package.FullName + "[azure,executable,azureml-serving,executor-service]") + echo "########### pip freeze (After) ###########" + pip freeze + working-directory: ${{ inputs.scriptPath }} diff --git a/.github/labeler.yml b/.github/labeler.yml index d77bf2e3841..f158507625d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -3,21 +3,23 @@ examples: documentation: - docs/** cli: -- src/promptflow/promptflow/_cli/** +- src/promptflow-devkit/promptflow/_cli/** sdk: -- src/promptflow/promptflow/_sdk/** -- src/promptflow/promptflow/azure/** +- src/promptflow-devkit/promptflow/_sdk/** +- src/promptflow-azure/promptflow/azure/** promptflow: -- src/promptflow/** +- src/promptflow-core/** +promptflow-tracing: +- src/promptflow-tracing/** promptflow-tools: - src/promptflow-tools/** executor: -- src/promptflow/promptflow/batch/** -- src/promptflow/promptflow/executor/** -- src/promptflow/promptflow/_core/** -- src/promptflow/promptflow/_internal/** -- src/promptflow/promptflow/integrations/** -- src/promptflow/promptflow/storage/** +- src/promptflow-devkit/promptflow/batch/** +- src/promptflow-core/promptflow/executor/** +- src/promptflow-core/promptflow/_core/** +- src/promptflow-devkit/promptflow/_internal/** +- src/promptflow-core/promptflow/integrations/** +- src/promptflow-core/promptflow/storage/** - src/promptflow/tests/executor/** fundamental: - scripts/** diff --git a/.github/workflows/build_doc_ci.yml b/.github/workflows/build_doc_ci.yml index 41432fbcacf..48cb7045dcb 100644 --- a/.github/workflows/build_doc_ci.yml +++ b/.github/workflows/build_doc_ci.yml @@ -5,13 +5,15 @@ on: pull_request: branches: - main - - preview/docs paths: - 'README.md' - 'docs/**' - 'scripts/docs/**' - '.github/workflows/build_doc_ci.yml' - - 'src/promptflow/promptflow/**' + - 'src/promptflow-tracing/promptflow/**' + - 'src/promptflow-core/promptflow/**' + - 'src/promptflow-devkit/promptflow/**' + - 'src/promptflow-azure/promptflow/**' env: packageSetupType: promptflow_with_extra @@ -30,11 +32,16 @@ jobs: - name: Python Setup uses: "./.github/actions/step_create_python_environment" - - name: Dev setup - uses: "./.github/actions/step_sdk_setup" - with: - setupType: ${{ env.packageSetupType }} - scriptPath: ${{ env.testWorkingDirectory }} + - name: Install packages + shell: pwsh + # Note: Use -e to avoid duplicate object warning when build apidoc. + run: | + pip uninstall -y promptflow-tracing promptflow-core promptflow-devkit promptflow-azure + pip install -e ${{ github.workspace }}/src/promptflow-tracing + pip install -e ${{ github.workspace }}/src/promptflow-core + pip install -e ${{ github.workspace }}/src/promptflow-devkit + pip install -e ${{ github.workspace }}/src/promptflow-azure + pip freeze - name: Build doc with reference doc shell: powershell @@ -53,7 +60,23 @@ jobs: with: submodules: true + - name: Python Setup + uses: "./.github/actions/step_create_python_environment" + + - name: Install packages + shell: pwsh + # Note: Use -e to avoid duplicate object warning when build apidoc. + run: | + pip uninstall -y promptflow-tracing promptflow-core promptflow-devkit promptflow-azure + pip install -e ${{ github.workspace }}/src/promptflow-tracing + pip install -e ${{ github.workspace }}/src/promptflow-core + pip install -e ${{ github.workspace }}/src/promptflow-devkit + pip install -e ${{ github.workspace }}/src/promptflow-azure + pip freeze + - name: Build LinkCheck shell: powershell working-directory: scripts/docs/ - run: ./doc_generation.ps1 -BuildLinkCheck -WarningAsError:$true + run: |- + pip install langchain + ./doc_generation.ps1 -WithReferenceDoc:$true -WarningAsError:$true -BuildLinkCheck diff --git a/.github/workflows/build_msi_installer.yml b/.github/workflows/build_msi_installer.yml index 5513f34ca82..27543bdc67a 100644 --- a/.github/workflows/build_msi_installer.yml +++ b/.github/workflows/build_msi_installer.yml @@ -1,4 +1,4 @@ -name: Build and Package MSI +name: Build and Package MSI & Portable Installer on: workflow_dispatch: @@ -74,7 +74,7 @@ jobs: if ($version -ne $run_version) { throw "Version input does not match the version in promptflow package. Version input: $version, version in promptflow package: $run_version" } - } + } elseif ($env:MSI_PRIVATE_VERSION) { $version=$env:MSI_PRIVATE_VERSION } @@ -108,6 +108,24 @@ jobs: setupType: promptflow_with_extra scriptPath: ${{ env.testWorkingDirectory }} + - name: Setup and Install dev promptflow + shell: pwsh + run: | + Set-PSDebug -Trace 1 + pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core[executor-service,azureml-serving] + pip install ${{ github.workspace }}/src/promptflow-devkit[pyarrow,executable] + pip install ${{ github.workspace }}/src/promptflow-azure + echo "Should fix this after pf-core could install this dependency" + pip install azureml-ai-monitoring + pip freeze + + - name: Generate promptflow spec file to config pyinstaller + working-directory: ${{ github.workspace }}/scripts/installer/windows/scripts + run: | + python generate_dependency.py + Get-Content promptflow.spec - name: Build Pyinstaller project working-directory: ${{ github.workspace }}/scripts/installer/windows/scripts @@ -132,6 +150,11 @@ jobs: pyinstaller promptflow.spec shell: pwsh + - name: Generate portable promptflow + run: | + Compress-Archive -Path ${{ github.workspace }}/scripts/installer/windows/scripts/dist/promptflow -DestinationPath promptflow-${{ steps.get-version.outputs.version }}.zip + shell: pwsh + - name: Build WIX project working-directory: ${{ github.workspace }}/scripts/installer/windows run: | @@ -167,7 +190,7 @@ jobs: "promptflow" = $version } | ConvertTo-Json -Depth 100 $jsonContent | Out-File -FilePath latest_version.json -Encoding UTF8 - + Write-Output "Created latest_version.json with version: $version" az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "latest_version.json" --name "latest_version.json" --overwrite } else { @@ -185,6 +208,13 @@ jobs: az storage blob upload --account-name promptflowartifact --container-name msi-installer --file "scripts/installer/windows/out/$($msi_file.Name)" --name "$($msi_file.Name)" --overwrite } } + # Upload zip file + if ($env:INPUT_UPLOADASLATEST -ieq 'True') { + az storage blob upload --account-name promptflowartifact --container-name portable-installer --file "promptflow-${{ steps.get-version.outputs.version }}.zip" --name "promptflow.zip" --overwrite + az storage blob copy start --account-name promptflowartifact --destination-container portable-installer --destination-blob "promptflow-${{ steps.get-version.outputs.version }}.zip" --source-container portable-installer --source-blob "promptflow.zip" + } else { + az storage blob upload --account-name promptflowartifact --container-name portable-installer --file "promptflow-${{ steps.get-version.outputs.version }}.zip" --name "promptflow-${{ steps.get-version.outputs.version }}.zip" --overwrite + } env: INPUT_UPLOADASLATEST: ${{ github.event.inputs.uploadAsLatest }} shell: pwsh \ No newline at end of file diff --git a/.github/workflows/flowdag_schema_check.yml b/.github/workflows/flowdag_schema_check.yml index 0e238adebfa..52bb8332278 100644 --- a/.github/workflows/flowdag_schema_check.yml +++ b/.github/workflows/flowdag_schema_check.yml @@ -30,6 +30,6 @@ jobs: PYTHONPATH: ${{ github.workspace }}/src/promptflow run: | cd ${{ github.workspace }}/src - pip install -e promptflow[azure] - pip install -e promptflow-tools + pip install ./promptflow[azure] + pip install ./promptflow-tools python ${{ github.workspace }}/scripts/readme/schema_checker.py diff --git a/.github/workflows/promptflow-core-test.yml b/.github/workflows/promptflow-core-test.yml new file mode 100644 index 00000000000..69552f93c04 --- /dev/null +++ b/.github/workflows/promptflow-core-test.yml @@ -0,0 +1,85 @@ +name: promptflow-core-test [Pure] + +on: + schedule: + - cron: "40 18 * * *" # 2:40 Beijing Time (GMT+8) every day + pull_request: + paths: + - src/promptflow-core/** + - .github/workflows/promptflow-core-test.yml + workflow_dispatch: + +env: + IS_IN_CI_PIPELINE: "true" + TRACING_DIRECTORY: ${{ github.workspace }}/src/promptflow-tracing + WORKING_DIRECTORY: ${{ github.workspace }}/src/promptflow-core + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ['3.8', '3.9', '3.10', '3.11'] + fail-fast: false + # snok/install-poetry need this to support Windows + defaults: + run: + shell: bash + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - uses: snok/install-poetry@v1 + - name: install promptflow-tracing + run: poetry install + working-directory: ${{ env.TRACING_DIRECTORY }} + - name: install promptflow-core + run: poetry install + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: install test dependency group + run: poetry install --only test + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: install recording + run: poetry install + working-directory: ${{ env.RECORD_DIRECTORY }} + - name: run core tests + run: poetry run pytest --cov=promptflow --cov-config=pyproject.toml --cov-report=term --cov-report=html --cov-report=xml + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: upload coverage report + uses: actions/upload-artifact@v4 + with: + name: report-${{ matrix.os }}-py${{ matrix.python-version }} + path: | + ${{ env.WORKING_DIRECTORY }}/*.xml + ${{ env.WORKING_DIRECTORY }}/htmlcov/ + + report: + needs: test + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + contents: read + issues: read + steps: + - uses: actions/download-artifact@v4 + with: + path: artifacts + - uses: EnricoMi/publish-unit-test-result-action@v2 + with: + check_name: promptflow-core test result + comment_title: promptflow-core test result + files: "artifacts/**/test-results.xml" # align with `--junit-xml` in pyproject.toml +# TODO: Enable coverage check after core test fully setup +# - uses: irongut/CodeCoverageSummary@v1.3.0 +# with: +# filename: "artifacts/report-ubuntu-latest-py3.9/coverage.xml" +# badge: true +# fail_below_min: true +# format: markdown +# hide_complexity: true +# output: both +# thresholds: 40 60 diff --git a/.github/workflows/promptflow-executor-e2e-test.yml b/.github/workflows/promptflow-executor-e2e-test.yml index 12d4472d0bd..de5a676ab23 100644 --- a/.github/workflows/promptflow-executor-e2e-test.yml +++ b/.github/workflows/promptflow-executor-e2e-test.yml @@ -4,6 +4,7 @@ on: - cron: "40 20 * * *" # Every day starting at 4:40 BJT pull_request_target: paths: + - src/promptflow-core/* - src/promptflow/* - src/promptflow/promptflow/* - src/promptflow/promptflow/_core/** @@ -17,6 +18,7 @@ on: - src/promptflow/promptflow/storage/** - src/promptflow/tests/* - src/promptflow/tests/executor/** + - src/promptflow-tracing/promptflow/** - scripts/building/** - .github/workflows/promptflow-executor-e2e-test.yml workflow_dispatch: @@ -25,6 +27,7 @@ env: testWorkingDirectory: ${{ github.workspace }}/src/promptflow PYTHONPATH: ${{ github.workspace }}/src/promptflow IS_IN_CI_PIPELINE: "true" + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording jobs: authorize: environment: @@ -78,6 +81,8 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: + - name: Set test mode + run: echo "PROMPT_FLOW_TEST_MODE=$(if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then echo replay; else echo live; fi)" >> $GITHUB_ENV - name: checkout uses: actions/checkout@v4 with: @@ -100,9 +105,18 @@ jobs: run: | Set-PSDebug -Trace 1 pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt - gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[executor-service]"}} + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core[executor-service] + pip install ${{ github.workspace }}/src/promptflow-devkit + pip install ${{ github.workspace }}/src/promptflow-azure + gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} pip freeze + - name: install recording + run: | + pip install vcrpy + pip install . + working-directory: ${{ env.RECORD_DIRECTORY }} - name: Azure Login uses: azure/login@v1 with: diff --git a/.github/workflows/promptflow-executor-unit-test.yml b/.github/workflows/promptflow-executor-unit-test.yml index 1e0b00ac4fd..d545931576f 100644 --- a/.github/workflows/promptflow-executor-unit-test.yml +++ b/.github/workflows/promptflow-executor-unit-test.yml @@ -4,6 +4,7 @@ on: - cron: "40 19 * * *" # Every day starting at 3:40 BJT pull_request_target: paths: + - src/promptflow-core/* - src/promptflow/* - src/promptflow/promptflow/* - src/promptflow/promptflow/_core/** @@ -25,6 +26,7 @@ env: testWorkingDirectory: ${{ github.workspace }}/src/promptflow PYTHONPATH: ${{ github.workspace }}/src/promptflow IS_IN_CI_PIPELINE: "true" + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording jobs: authorize: environment: @@ -78,6 +80,8 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: + - name: Set test mode + run: echo "PROMPT_FLOW_TEST_MODE=$(if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then echo replay; else echo live; fi)" >> $GITHUB_ENV - name: checkout uses: actions/checkout@v4 with: @@ -105,9 +109,18 @@ jobs: run: | Set-PSDebug -Trace 1 pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt - gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[executor-service]"}} + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core[executor-service] + pip install ${{ github.workspace }}/src/promptflow-devkit + pip install ${{ github.workspace }}/src/promptflow-azure + gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} pip freeze + - name: install recording + run: | + pip install vcrpy + pip install . + working-directory: ${{ env.RECORD_DIRECTORY }} - name: Azure Login uses: azure/login@v1 with: diff --git a/.github/workflows/promptflow-global-config-test.yml b/.github/workflows/promptflow-global-config-test.yml index 748cb019b48..fe00424371c 100644 --- a/.github/workflows/promptflow-global-config-test.yml +++ b/.github/workflows/promptflow-global-config-test.yml @@ -4,6 +4,7 @@ on: - cron: "40 18 * * *" # Every day starting at 2:40 BJT pull_request_target: paths: + - src/promptflow-core/* - src/promptflow/** - scripts/building/** - .github/workflows/promptflow-global-config-test.yml @@ -60,6 +61,19 @@ jobs: with: setupType: ${{ env.packageSetupType }} scriptPath: ${{ env.testWorkingDirectory }} + - name: Install dependency + shell: pwsh + run: | + pip uninstall -y promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-tracing + echo "Installed promptflow-tracing" + pip uninstall -y promptflow-core + pip install ${{ github.workspace }}/src/promptflow-core + pip uninstall -y promptflow-devkit + pip install ${{ github.workspace }}/src/promptflow-devkit + pip uninstall -y promptflow-azure + pip install ${{ github.workspace }}/src/promptflow-azure + pip freeze - name: Azure Login uses: azure/login@v1 with: diff --git a/.github/workflows/promptflow-import-linter.yml b/.github/workflows/promptflow-import-linter.yml new file mode 100644 index 00000000000..4e2877b436d --- /dev/null +++ b/.github/workflows/promptflow-import-linter.yml @@ -0,0 +1,56 @@ +name: promptflow-import-linter + +on: + pull_request: + paths: + - src/promptflow-tracing/** + - src/promptflow-core/** + - src/promptflow-devkit/** + - src/promptflow-azure/** + - .github/workflows/promptflow-import-linter.yml + workflow_dispatch: + +env: + WORKING_DIRECTORY: ${{ github.workspace }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + - uses: snok/install-poetry@v1 + - name: Install all packages + run: | + cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing + touch promptflow/__init__.py + poetry install --with dev + cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-core + touch promptflow/__init__.py + poetry install --with dev + cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit + touch promptflow/__init__.py + poetry install --with dev + cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure + touch promptflow/__init__.py + poetry install --with dev + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: import lint + run: | + echo "=== Running import lint in promptflow-tracing ===" + cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-tracing + poetry run lint-imports + echo "=== Running import lint in promptflow-core ===" + cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-core + poetry run lint-imports + echo "=== Running import lint in promptflow-devkit ===" + cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-devkit + poetry run lint-imports + echo "=== Running import lint in promptflow-azure ===" + cd ${{ env.WORKING_DIRECTORY }}/src/promptflow-azure + poetry run lint-imports + working-directory: ${{ env.WORKING_DIRECTORY }} + diff --git a/.github/workflows/promptflow-release-testing-matrix.yml b/.github/workflows/promptflow-release-testing-matrix.yml index cc76ecfa63e..172dad4828d 100644 --- a/.github/workflows/promptflow-release-testing-matrix.yml +++ b/.github/workflows/promptflow-release-testing-matrix.yml @@ -14,8 +14,10 @@ on: type: string env: testWorkingDirectory: src/promptflow - PYTHONPATH: ${{ github.workspace }}/src/promptflow IS_IN_CI_PIPELINE: "true" + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording + TRACING_PATH: ${{ github.workspace }}/src/promptflow-tracing + PROMPT_FLOW_WORKSPACE_NAME: "promptflow-eastus" jobs: id: runs-on: ubuntu-latest @@ -44,6 +46,7 @@ jobs: path: | ${{ github.workspace }}/src/promptflow/dist/*.whl ${{ github.workspace }}/src/promptflow-tools/dist/*.whl + promptflow_sdk_cli_tests: if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'pull_request' }} needs: build @@ -71,6 +74,11 @@ jobs: with: name: wheel path: artifacts + - name: install recording + run: + pip install vcrpy + pip install -e . + working-directory: ${{ env.RECORD_DIRECTORY }} - name: Azure Login uses: azure/login@v1 if: env.PROMPT_FLOW_TEST_MODE == 'live' @@ -92,8 +100,13 @@ jobs: working-directory: artifacts run: | pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt + pip uninstall -y promptflow-core promptflow-devkit promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit[pyarrow] + pip install ${{ github.workspace }}/src/promptflow-azure gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} - gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} + gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} pip freeze - name: Run SDK CLI Test shell: pwsh @@ -155,6 +168,11 @@ jobs: with: name: wheel path: artifacts + - name: install recording + run: | + pip install vcrpy + pip install -e . + working-directory: ${{ env.RECORD_DIRECTORY }} - name: Azure Login uses: azure/login@v1 if: env.PROMPT_FLOW_TEST_MODE == 'live' @@ -170,6 +188,11 @@ jobs: working-directory: artifacts run: | pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt + pip uninstall -y promptflow-core promptflow-devkit promptflow-azure promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit[pyarrow] + pip install ${{ github.workspace }}/src/promptflow-azure gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[azure]"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} pip freeze @@ -214,6 +237,11 @@ jobs: with: name: wheel path: artifacts + - name: install recording + run: | + pip install vcrpy + pip install -e . + working-directory: ${{ env.RECORD_DIRECTORY }} - name: Azure Login uses: azure/login@v1 with: @@ -227,8 +255,13 @@ jobs: working-directory: artifacts run: | pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt + pip uninstall -y promptflow-core promptflow-devkit promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit[pyarrow] + pip install ${{ github.workspace }}/src/promptflow-azure gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[azure,executor-service]"}} - gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} + gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} pip freeze - name: Run Executor Test shell: pwsh @@ -248,6 +281,53 @@ jobs: with: name: promptflow_executor_tests Test Results (Python ${{ matrix.pythonVersion }}) (OS ${{ matrix.os }}) path: ${{ github.workspace }}/*.xml + promptflow_core_tests: + if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'pull_request' }} + needs: build + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + pythonVersion: ['3.8', '3.9', '3.10', '3.11'] + # snok/install-poetry need this to support Windows + defaults: + run: + shell: bash + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - uses: snok/install-poetry@v1 + - name: install promptflow-tracing + run: poetry install + working-directory: ${{ github.workspace }}/src/promptflow-tracing + - name: install promptflow-core + run: poetry install + working-directory: ${{ github.workspace }}/src/promptflow-core + - name: install test dependency group + run: poetry install --only test + working-directory: ${{ github.workspace }}/src/promptflow-core + - name: install recording + run: poetry install + working-directory: ${{ github.workspace }}/src/promptflow-recording + - name: run core tests + run: poetry run pytest --cov=promptflow --cov-config=pyproject.toml --cov-report=term --cov-report=html --cov-report=xml + working-directory: ${{ github.workspace }}/src/promptflow-core + - name: upload coverage report + uses: actions/upload-artifact@v4 + with: + name: report-${{ matrix.os }}-py${{ matrix.python-version }} + path: | + ${{ env.WORKING_DIRECTORY }}/*.xml + ${{ env.WORKING_DIRECTORY }}/htmlcov/ + - name: Upload pytest test results (Python ${{ matrix.pythonVersion }}) (OS ${{ matrix.os }}) + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: promptflow_core_tests Test Results (Python ${{ matrix.pythonVersion }}) (OS ${{ matrix.os }}) + path: ${{ github.workspace }}/*.xml publish-test-results: name: "Publish Tests Results" needs: [ promptflow_sdk_cli_tests, promptflow_sdk_cli_azure_tests, promptflow_executor_tests ] diff --git a/.github/workflows/promptflow-sdk-cli-test.yml b/.github/workflows/promptflow-sdk-cli-test.yml index c52fa7db73f..d3077da1201 100644 --- a/.github/workflows/promptflow-sdk-cli-test.yml +++ b/.github/workflows/promptflow-sdk-cli-test.yml @@ -4,7 +4,10 @@ on: - cron: "40 18 * * *" # Every day starting at 2:40 BJT pull_request: paths: + - src/promptflow-core/** + - src/promptflow-devkit/** - src/promptflow/** + - src/promptflow-tracing/** - scripts/building/** - .github/workflows/promptflow-sdk-cli-test.yml workflow_dispatch: @@ -13,6 +16,7 @@ env: testWorkingDirectory: ${{ github.workspace }}/src/promptflow PYTHONPATH: ${{ github.workspace }}/src/promptflow IS_IN_CI_PIPELINE: "true" + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording jobs: build: strategy: @@ -76,9 +80,17 @@ jobs: run: | Set-PSDebug -Trace 1 pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt - gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit[pyarrow] + pip install ${{ github.workspace }}/src/promptflow gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} pip freeze + - name: install recording + run: | + pip install vcrpy + pip install . + working-directory: ${{ env.RECORD_DIRECTORY }} - name: Azure login (non pull_request workflow) if: github.event_name != 'pull_request' uses: azure/login@v1 @@ -112,9 +124,7 @@ jobs: working-directory: artifacts run: | Set-PSDebug -Trace 1 - pip uninstall -y promptflow promptflow-sdk promptflow-tools - gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[executable]"}} - gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} + pip install ${{ github.workspace }}/src/promptflow-devkit[pyarrow,executable] pip freeze - name: Run SDK CLI Executable Test shell: pwsh @@ -126,15 +136,6 @@ jobs: -l eastus ` -m "unittest or e2etest" ` -o "${{ env.testWorkingDirectory }}/test-results-sdk-cli-executable.xml" - - name: Install pfs - shell: pwsh - working-directory: artifacts - run: | - Set-PSDebug -Trace 1 - pip uninstall -y promptflow promptflow-sdk promptflow-tools - gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[azure]"}} - gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} - pip freeze - name: Run PFS Test shell: pwsh working-directory: ${{ env.testWorkingDirectory }} @@ -178,4 +179,4 @@ jobs: osVersion: ubuntu-latest pythonVersion: 3.9 coverageThreshold: 40 - context: test/sdk_cli + context: test/sdk_cli \ No newline at end of file diff --git a/.github/workflows/promptflow-tracing-e2e-test.yml b/.github/workflows/promptflow-tracing-e2e-test.yml new file mode 100644 index 00000000000..71a8316a376 --- /dev/null +++ b/.github/workflows/promptflow-tracing-e2e-test.yml @@ -0,0 +1,104 @@ +name: promptflow-tracing-e2e-test + +on: + schedule: + - cron: "40 18 * * *" # 2:40 Beijing Time (GMT+8) every day + pull_request: + paths: + - src/promptflow-tracing/** + - .github/workflows/promptflow-tracing-e2e-test.yml + workflow_dispatch: + +env: + IS_IN_CI_PIPELINE: "true" + WORKING_DIRECTORY: ${{ github.workspace }}/src/promptflow-tracing + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: snok/install-poetry@v1 + - name: build + run: poetry build + working-directory: ${{ env.WORKING_DIRECTORY }} + - uses: actions/upload-artifact@v4 + with: + name: promptflow-tracing + path: ${{ env.WORKING_DIRECTORY }}/dist/promptflow_tracing-*.whl + + test: + needs: build + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ['3.8', '3.9', '3.10', '3.11'] + fail-fast: false + # snok/install-poetry need this to support Windows + defaults: + run: + shell: bash + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: set test mode + run: echo "PROMPT_FLOW_TEST_MODE=$(if [[ "${{ github.event_name }}" == "pull_request" ]]; then echo replay; else echo live; fi)" >> $GITHUB_ENV + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - uses: snok/install-poetry@v1 + - uses: actions/download-artifact@v4 + with: + name: promptflow-tracing + path: ${{ env.WORKING_DIRECTORY }} + - name: install promptflow-tracing from wheel + # wildcard expansion (*) does not work in Windows, so leverage python to find and install + run: poetry run pip install $(python -c "import glob; print(glob.glob('promptflow_tracing-*.whl')[0])") + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: install test dependency group + run: poetry install --only test + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: install recording + run: poetry install + working-directory: ${{ env.RECORD_DIRECTORY }} + - name: generate end-to-end test config from secret + run: echo '${{ secrets.PF_TRACING_E2E_TEST_CONFIG }}' >> connections.json + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: run e2e tests + run: poetry run pytest -m e2etest --cov=promptflow --cov-config=pyproject.toml --cov-report=term --cov-report=html --cov-report=xml + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: upload coverage report + uses: actions/upload-artifact@v4 + with: + name: report-${{ matrix.os }}-py${{ matrix.python-version }} + path: | + ${{ env.WORKING_DIRECTORY }}/*.xml + ${{ env.WORKING_DIRECTORY }}/htmlcov/ + + report: + needs: test + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + contents: read + issues: read + steps: + - uses: actions/download-artifact@v4 + with: + path: artifacts + - uses: EnricoMi/publish-unit-test-result-action@v2 + with: + check_name: promptflow-tracing test result + comment_title: promptflow-tracing test result + files: "artifacts/**/test-results.xml" # align with `--junit-xml` in pyproject.toml + - uses: irongut/CodeCoverageSummary@v1.3.0 + with: + filename: "artifacts/report-ubuntu-latest-py3.9/coverage.xml" + badge: true + fail_below_min: true + format: markdown + hide_complexity: true + output: both + thresholds: 40 80 diff --git a/.github/workflows/promptflow-tracing-unit-test.yml b/.github/workflows/promptflow-tracing-unit-test.yml index bf04a46b1ba..e8f7f8cffa9 100644 --- a/.github/workflows/promptflow-tracing-unit-test.yml +++ b/.github/workflows/promptflow-tracing-unit-test.yml @@ -2,136 +2,98 @@ name: promptflow-tracing-unit-test on: schedule: - - cron: "40 18 * * *" # Every day starting at 2:40 BJT - + - cron: "40 18 * * *" # 2:40 Beijing Time (GMT+8) every day pull_request: paths: - - src/promptflow/** - - scripts/building/** + - src/promptflow-tracing/** - .github/workflows/promptflow-tracing-unit-test.yml - workflow_dispatch: - env: - packageSetupType: promptflow_with_extra - testWorkingDirectory: ${{ github.workspace }}/src/promptflow - PYTHONPATH: ${{ github.workspace }}/src/promptflow IS_IN_CI_PIPELINE: "true" - + WORKING_DIRECTORY: ${{ github.workspace }}/src/promptflow-tracing + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording jobs: build: - strategy: - fail-fast: false runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v4 - - name: Display and Set Environment Variables - run: | - env | sort >> $GITHUB_OUTPUT - id: display_env - shell: bash -el {0} - - name: Python Setup - ubuntu-latest - Python Version 3.9 - uses: "./.github/actions/step_create_python_environment" + - uses: actions/checkout@v4 + - uses: snok/install-poetry@v1 + - name: build + run: poetry build + working-directory: ${{ env.WORKING_DIRECTORY }} + - uses: actions/upload-artifact@v4 with: - pythonVersion: 3.9 - - name: Build wheel - uses: "./.github/actions/step_sdk_setup" - with: - setupType: promptflow_with_extra - scriptPath: ${{ env.testWorkingDirectory }} - - name: Upload Wheel - if: always() - uses: actions/upload-artifact@v3 - with: - name: wheel - path: | - ${{ github.workspace }}/src/promptflow/dist/*.whl - ${{ github.workspace }}/src/promptflow-tools/dist/*.whl + name: promptflow-tracing + path: ${{ env.WORKING_DIRECTORY }}/dist/promptflow_tracing-*.whl - tracing_tests: + test: needs: build strategy: - fail-fast: false matrix: - os: [ubuntu-latest] - pythonVersion: ['3.8', '3.9', '3.10', '3.11'] + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ['3.8', '3.9', '3.10', '3.11'] + fail-fast: false + # snok/install-poetry need this to support Windows + defaults: + run: + shell: bash runs-on: ${{ matrix.os }} steps: - - name: checkout - uses: actions/checkout@v4 - - - name: Display and Set Environment Variables - run: | - env | sort >> $GITHUB_OUTPUT - id: display_env - shell: bash -el {0} - - - name: Python Setup - ${{ matrix.os }} - Python Version ${{ matrix.pythonVersion }} - uses: "./.github/actions/step_create_python_environment" - with: - pythonVersion: ${{ matrix.pythonVersion }} - - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - name: wheel - path: artifacts - - - name: Install wheel - shell: pwsh - working-directory: artifacts - run: | - Set-PSDebug -Trace 1 - pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt - gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)"}} - gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} - pip freeze - - - name: run promptflow-tracing test - shell: pwsh - working-directory: ${{ env.testWorkingDirectory }} - run: | - python "../../scripts/building/run_coverage_tests.py" ` - -p promptflow ` - -t ${{ github.workspace }}/src/promptflow/tests/tracing_test/unittests ` - -l eastus ` - -m "unittest" ` - --coverage-config ${{ github.workspace }}/src/promptflow/tests/tracing_test/.coveragerc ` - -o "${{ env.testWorkingDirectory }}/test-results-tracing.xml" - - - name: Upload Test Results - if: always() - uses: actions/upload-artifact@v3 - with: - name: Test Results (Python ${{ matrix.pythonVersion }}) (OS ${{ matrix.os }}) - path: | - ${{ env.testWorkingDirectory }}/*.xml - ${{ env.testWorkingDirectory }}/htmlcov/ - - - publish-test-results-tracing-test: - needs: tracing_tests - if: always() - + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - uses: snok/install-poetry@v1 + - uses: actions/download-artifact@v4 + with: + name: promptflow-tracing + path: ${{ env.WORKING_DIRECTORY }} + - name: install promptflow-tracing from wheel + # wildcard expansion (*) does not work in Windows, so leverage python to find and install + run: poetry run pip install $(python -c "import glob; print(glob.glob('promptflow_tracing-*.whl')[0])") + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: install test dependency group + run: poetry install --only test + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: install recording + run: poetry install + working-directory: ${{ env.RECORD_DIRECTORY }} + - name: run unit tests + run: poetry run pytest -m unittest --cov=promptflow --cov-config=pyproject.toml --cov-report=term --cov-report=html --cov-report=xml + working-directory: ${{ env.WORKING_DIRECTORY }} + - name: upload coverage report + uses: actions/upload-artifact@v4 + with: + name: report-${{ matrix.os }}-py${{ matrix.python-version }} + path: | + ${{ env.WORKING_DIRECTORY }}/*.xml + ${{ env.WORKING_DIRECTORY }}/htmlcov/ + + report: + needs: test runs-on: ubuntu-latest permissions: checks: write pull-requests: write contents: read issues: read - steps: - - name: checkout - uses: actions/checkout@v4 - - name: Publish Test Results - uses: "./.github/actions/step_publish_test_results" - with: - testActionFileName: promptflow-tracing-unit-test.yml - testResultTitle: promptflow-tracing unit test result - osVersion: ubuntu-latest - pythonVersion: 3.9 - coverageThreshold: 40 - context: test/tracing + - uses: actions/download-artifact@v4 + with: + path: artifacts + - uses: EnricoMi/publish-unit-test-result-action@v2 + with: + check_name: promptflow-tracing test result + comment_title: promptflow-tracing test result + files: "artifacts/**/test-results.xml" # align with `--junit-xml` in pyproject.toml + - uses: irongut/CodeCoverageSummary@v1.3.0 + with: + filename: "artifacts/report-ubuntu-latest-py3.9/coverage.xml" + badge: true + fail_below_min: true + format: markdown + hide_complexity: true + output: both + thresholds: 40 60 diff --git a/.github/workflows/publish_doc.yml b/.github/workflows/publish_doc.yml index 0138b45850a..43bc9cdd0c5 100644 --- a/.github/workflows/publish_doc.yml +++ b/.github/workflows/publish_doc.yml @@ -2,7 +2,7 @@ name: Publish Promptflow Doc on: workflow_dispatch: - push: + push: branches: - main - preview/docs @@ -11,7 +11,10 @@ on: - 'docs/**' - 'scripts/docs/**' - '.github/workflows/publish_doc.yml' - - 'src/promptflow/promptflow/**' + - 'src/promptflow-tracing/promptflow/**' + - 'src/promptflow-core/promptflow/**' + - 'src/promptflow-devkit/promptflow/**' + - 'src/promptflow-azure/promptflow/**' # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -39,11 +42,16 @@ jobs: - name: Python Setup uses: "./.github/actions/step_create_python_environment" - - name: Dev setup - uses: "./.github/actions/step_sdk_setup" - with: - setupType: ${{ env.packageSetupType }} - scriptPath: ${{ env.testWorkingDirectory }} + - name: Install packages + shell: pwsh + # Note: Use -e to avoid duplicate object warning when build apidoc. + run: | + pip uninstall -y promptflow-tracing promptflow-core promptflow-devkit promptflow-azure + pip install -e ${{ github.workspace }}/src/promptflow-tracing + pip install -e ${{ github.workspace }}/src/promptflow-core + pip install -e ${{ github.workspace }}/src/promptflow-devkit + pip install -e ${{ github.workspace }}/src/promptflow-azure + pip freeze - name: Build Doc shell: powershell diff --git a/.github/workflows/samples_flowinpipeline_pipeline.yml b/.github/workflows/samples_runflowwithpipeline_pipeline.yml similarity index 78% rename from .github/workflows/samples_flowinpipeline_pipeline.yml rename to .github/workflows/samples_runflowwithpipeline_pipeline.yml index 3fab85821ce..5259e14d0f8 100644 --- a/.github/workflows/samples_flowinpipeline_pipeline.yml +++ b/.github/workflows/samples_runflowwithpipeline_pipeline.yml @@ -3,20 +3,20 @@ # Any manual changes to this file may cause incorrect behavior. # Any manual changes will be overwritten if the code is regenerated. -name: samples_flowinpipeline_pipeline +name: samples_runflowwithpipeline_pipeline on: schedule: - - cron: "28 19 * * *" # Every day starting at 3:28 BJT + - cron: "33 20 * * *" # Every day starting at 4:33 BJT pull_request: branches: [ main ] - paths: [ examples/tutorials/flow-in-pipeline/**, examples/flows/standard/web-classification/**, .github/workflows/samples_flowinpipeline_pipeline.yml, examples/requirements.txt, examples/connections/azure_openai.yml ] + paths: [ examples/tutorials/run-flow-with-pipeline/**, examples/flows/standard/web-classification/**, .github/workflows/samples_runflowwithpipeline_pipeline.yml, examples/requirements.txt, examples/connections/azure_openai.yml ] workflow_dispatch: env: IS_IN_CI_PIPELINE: "true" jobs: - samples_flowinpipeline_pipeline: + samples_runflowwithpipeline_pipeline: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -43,7 +43,7 @@ jobs: - name: Create Aoai Connection run: pf connection create -f ${{ github.workspace }}/examples/connections/azure_openai.yml --set api_key="${{ secrets.AOAI_API_KEY_TEST }}" api_base="${{ secrets.AOAI_API_ENDPOINT_TEST }}" - name: Test Notebook - working-directory: examples/tutorials/flow-in-pipeline + working-directory: examples/tutorials/run-flow-with-pipeline run: | papermill -k python pipeline.ipynb pipeline.output.ipynb - name: Upload artifact @@ -51,4 +51,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: artifact - path: examples/tutorials/flow-in-pipeline + path: examples/tutorials/run-flow-with-pipeline diff --git a/.github/workflows/sdk-cli-azure-test-production.yml b/.github/workflows/sdk-cli-azure-test-production.yml index aaf59bad765..1234860caf0 100644 --- a/.github/workflows/sdk-cli-azure-test-production.yml +++ b/.github/workflows/sdk-cli-azure-test-production.yml @@ -87,6 +87,10 @@ jobs: run: | Set-PSDebug -Trace 1 pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit + pip install ${{ github.workspace }}/src/promptflow-azure gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[azure]"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} pip freeze diff --git a/.github/workflows/sdk-cli-azure-test-pull-request.yml b/.github/workflows/sdk-cli-azure-test-pull-request.yml index b6f3eb81675..c509eceb3d5 100644 --- a/.github/workflows/sdk-cli-azure-test-pull-request.yml +++ b/.github/workflows/sdk-cli-azure-test-pull-request.yml @@ -6,8 +6,11 @@ name: sdk-cli-azure-test-pull-request on: pull_request: paths: + - src/promptflow-core/** + - src/promptflow-devkit/** - src/promptflow/** - scripts/building/** + - src/promptflow-tracing/** - .github/workflows/sdk-cli-azure-test-pull-request.yml @@ -17,6 +20,7 @@ env: PYTHONPATH: ${{ github.workspace }}/src/promptflow IS_IN_CI_PIPELINE: "true" PROMPT_FLOW_TEST_MODE: "replay" + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording jobs: @@ -58,7 +62,7 @@ jobs: # replay tests can cover more combinations os: [ubuntu-latest] pythonVersion: ['3.8', '3.9', '3.10', '3.11'] - + runs-on: ${{ matrix.os }} steps: - name: checkout @@ -84,10 +88,20 @@ jobs: run: | Set-PSDebug -Trace 1 pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit + pip install ${{ github.workspace }}/src/promptflow-azure gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[azure]"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} pip freeze + - name: install recording + run: | + pip install vcrpy + pip install -e . + working-directory: ${{ env.RECORD_DIRECTORY }} + - name: Run SDK CLI Azure Test (replay mode) shell: pwsh working-directory: ${{ env.testWorkingDirectory }} diff --git a/.github/workflows/sdk-cli-azure-test.yml b/.github/workflows/sdk-cli-azure-test.yml index a960920e058..f1f950a7a3a 100644 --- a/.github/workflows/sdk-cli-azure-test.yml +++ b/.github/workflows/sdk-cli-azure-test.yml @@ -86,6 +86,10 @@ jobs: run: | Set-PSDebug -Trace 1 pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit + pip install ${{ github.workspace }}/src/promptflow-azure gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[azure]"}} gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} pip freeze diff --git a/.github/workflows/sdk-cli-perf-monitor-test.yml b/.github/workflows/sdk-cli-perf-monitor-test.yml index bd787d76471..f3aa9f2f821 100644 --- a/.github/workflows/sdk-cli-perf-monitor-test.yml +++ b/.github/workflows/sdk-cli-perf-monitor-test.yml @@ -7,6 +7,8 @@ on: pull_request: paths: - src/promptflow/** + - src/promptflow-core/** + - src/promptflow-devkit/** - scripts/building/** - .github/workflows/sdk-cli-perf-monitor-test.yml @@ -22,6 +24,7 @@ env: PYTHONPATH: ${{ github.workspace }}/src/promptflow IS_IN_CI_PIPELINE: "true" PROMPT_FLOW_TEST_MODE: "replay" + RECORD_DIRECTORY: ${{ github.workspace }}/src/promptflow-recording jobs: @@ -57,8 +60,40 @@ jobs: - name: Build wheel uses: "./.github/actions/step_sdk_setup" with: - setupType: ${{ env.packageSetupType }} + setupType: promptflow_with_extra scriptPath: ${{ env.testWorkingDirectory }} + - name: Upload Wheel + if: always() + uses: actions/upload-artifact@v3 + with: + name: wheel + path: | + ${{ github.workspace }}/src/promptflow/dist/*.whl + ${{ github.workspace }}/src/promptflow-tools/dist/*.whl + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + name: wheel + path: artifacts + - name: Install wheel + shell: pwsh + working-directory: artifacts + run: | + Set-PSDebug -Trace 1 + pip install -r ${{ github.workspace }}/src/promptflow/dev_requirements.txt + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit + pip install ${{ github.workspace }}/src/promptflow-azure + gci ./promptflow -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install "$($_.FullName)[all]"}} + gci ./promptflow-tools -Recurse | % {if ($_.Name.Contains('.whl')) {python -m pip install $_.FullName}} + pip freeze + + - name: install recording + run: + pip install vcrpy + pip install -e . + working-directory: ${{ env.RECORD_DIRECTORY }} - name: Generate (mock) connections.json shell: pwsh diff --git a/.github/workflows/tools_tests.yml b/.github/workflows/tools_tests.yml index 6b0ef5cff91..1c34f0684d1 100644 --- a/.github/workflows/tools_tests.yml +++ b/.github/workflows/tools_tests.yml @@ -39,7 +39,11 @@ jobs: pip install azure-identity azure-keyvault-secrets # "DEPENDENCY_SOURCE_MODE" is "main" or "package", means the dependency source of code if [ "$DEPENDENCY_SOURCE_MODE" = "main" ]; then - python ./scripts/building/dev_setup.py --promptflow-extra-deps azure + pip install ${{ github.workspace }}/src/promptflow-tracing + pip install ${{ github.workspace }}/src/promptflow-core + pip install ${{ github.workspace }}/src/promptflow-devkit + pip install ${{ github.workspace }}/src/promptflow-azure + pip install ${{ github.workspace }}/src/promptflow pip install google-search-results==2.4.1 pip install openai>=1.0.0 pip install azure-mgmt-cognitiveservices==13.5.0 diff --git a/.gitignore b/.gitignore index 85b40811f1a..74df3834b44 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ cov.xml .hypothesis/ .pytest_cache/ cover/ +test-results.xml # Translations *.mo @@ -185,3 +186,8 @@ config.json # chat-with-pdf's prebuilt index !.pdfs/ !.index/ + +# Poetry +poetry.lock +# promptflow subpackages __init__ +src/promptflow-*/promptflow/__init__.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7637042d9d5..419c1cc7684 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -exclude: '(^docs/)|flows|scripts|src/promptflow/promptflow/azure/_restclient/|src/promptflow/promptflow/azure/_models/|src/promptflow/tests/test_configs|src/promptflow-tools' +exclude: '(^docs/)|flows|scripts|src/promptflow-azure/promptflow/azure/_restclient/|src/promptflow-core/promptflow/core/_connection_provider/_models/|src/promptflow-azure/promptflow/azure/_models/|src/promptflow/tests/test_configs|src/promptflow-tools' repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/docs/cloud/azureai/manage-flows.md b/docs/cloud/azureai/manage-flows.md index 1e719e2dc3c..ba57d4b7132 100644 --- a/docs/cloud/azureai/manage-flows.md +++ b/docs/cloud/azureai/manage-flows.md @@ -9,7 +9,7 @@ The flow examples in this guide come from [examples/flows/standard](https://gith In general: - For `CLI`, you can run `pfazure flow --help` in the terminal to see help messages. -- For `SDK`, you can refer to [Promptflow Python Library Reference](../../reference/python-library-reference/promptflow.md) and check `promptflow.azure.PFClient.flows` for more flow operations. +- For `SDK`, you can refer to [Promptflow Python Library Reference](../../reference/python-library-reference/promptflow-azure/promptflow.rst) and check `promptflow.azure.PFClient.flows` for more flow operations. :::{admonition} Prerequisites - Refer to the prerequisites in [Quick start](./quick-start/index.md#prerequisites). diff --git a/docs/cloud/azureai/quick-start/create-run-with-automatic-runtime.md b/docs/cloud/azureai/quick-start/create-run-with-automatic-runtime.md index 8f7de3cdbbc..a7a33dc352d 100644 --- a/docs/cloud/azureai/quick-start/create-run-with-automatic-runtime.md +++ b/docs/cloud/azureai/quick-start/create-run-with-automatic-runtime.md @@ -87,7 +87,7 @@ pfazure run create --file run.yml :sync: SDK ```python -from promptflow import load_run +from promptflow.client import load_run run = load_run(source="run.yml") pf = PFClient( diff --git a/docs/cloud/azureai/runtime-change-log.md b/docs/cloud/azureai/runtime-change-log.md index 58fa4940fe3..bb47dd8e510 100644 --- a/docs/cloud/azureai/runtime-change-log.md +++ b/docs/cloud/azureai/runtime-change-log.md @@ -14,6 +14,39 @@ You can check the runtime image version from the flow execution log: ## Change log Default runtime image is continuously updated, and here we record the new features and fixed bugs of each image version. + +### 20240319.v1 + +#### New features + +- Add param "seed" to LLM tool chat api. + +### 20240313.v1 + +#### Bugs fixed + +- Fix an issue where calling a flow with a flow function would result in failure. +- Improve error handling by categorizing errors as user errors when a run is archived prior to being processed by the runtime. + +### 20240306.v5 + +#### New features +- Support "seed" parameter for built-in LLM tools and GPT-4V tools. + +#### Bugs fixed +- Handle ClientAuthenticationError properly. +- Fix appending blob exceeded size limit error by truncating debug info. + + +### 20240228.v3 + +#### New features +- Support async flow test for long running jobs. + +#### Bugs fixed +- Fix bug when collecting package tools. + + ### 20240222.v3 #### New features @@ -40,7 +73,7 @@ NA #### Bugs fixed - Fix the bug that exception raised during preparing data is not set in run history. -- Fix the bug that unexpected exception is raised when executor process crushes. +- Fix the bug that unexpected exception is raised when executor process crushes. ### 20240116.v1 diff --git a/docs/cloud/azureai/use-flow-in-azure-ml-pipeline.md b/docs/cloud/azureai/use-flow-in-azure-ml-pipeline.md index c4f9073e2c7..fccfde40e51 100644 --- a/docs/cloud/azureai/use-flow-in-azure-ml-pipeline.md +++ b/docs/cloud/azureai/use-flow-in-azure-ml-pipeline.md @@ -1,6 +1,7 @@ # Use flow in Azure ML pipeline job +In practical scenarios, flows fulfill various functions. For example, consider an offline flow specifically designed to assess the relevance score for communication sessions between humans and agents. This flow is triggered nightly and processes a substantial amount of session data. In such a context, Parallel component and AzureML pipeline emerge as the optimal choices for handling large-scale, highly resilient, and efficient offline batch requirements. -After you have developed and tested the flow in [init and test a flow](../../how-to-guides/init-and-test-a-flow.md), this guide will help you learn how to use a flow as a parallel component in a pipeline job on AzureML, so that you can integrate the created flow with existing pipelines and process a large amount of data. +Once you’ve developed and thoroughly tested your flow using the guidelines in the [init and test a flow](../../how-to-guides/init-and-test-a-flow.md) section, this guide will walk you through utilizing your flow as a parallel component within an AzureML pipeline job. :::{admonition} Pre-requirements To enable this feature, customer need to: diff --git a/docs/dev/dev_setup.md b/docs/dev/dev_setup.md index 29ef44491b1..84fb18c1847 100644 --- a/docs/dev/dev_setup.md +++ b/docs/dev/dev_setup.md @@ -5,11 +5,7 @@ - First create a new [conda](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) environment. Please specify python version as 3.9. `conda create -n python=3.9`. - Activate the env you created. -- Set environment variable `PYTHONPATH` in your new conda environment. - `conda env config vars set PYTHONPATH=\promptflow`. - Once you have set the environment variable, you have to reactivate your environment. - `conda activate `. -- In root folder, run `python scripts/building/dev_setup.py --promptflow-extra-deps azure` to install the package and dependencies. +- In root folder, run `python scripts/dev-setup/main.py` to install the packages and dependencies; if you are using Visual Studio Code, it is recommended to add `--vscode` (which is `python scripts/dev-setup/main.py --vscode`) to enable VS Code to recognize the packages. ## How to run tests @@ -80,11 +76,7 @@ Open `.vscode/settings.json`, write `"--ignore=src/promptflow/tests/sdk_cli_azur ![img2](../media/dev_setup/set_up_pycharm_2.png) -### Record and replay tests - -Please refer to [Replay End-to-End Tests](./replay-e2e-test.md) to learn how to record and replay tests. - -## How to write docstring. +## How to write docstring A clear and consistent API documentation is crucial for the usability and maintainability of our codebase. Please refer to [API Documentation Guidelines](./documentation_guidelines.md) to learn how to write docstring when developing the project. @@ -102,16 +94,9 @@ A clear and consistent API documentation is crucial for the usability and mainta ### Test structure -Currently all tests are under `src/promptflow/tests/` folder: +In the future, tests will under corresponding source folder, and test_configs are shared among different test folders: -- tests/ - - promptflow/ - - sdk_cli_test/ - - e2etests/ - - unittests/ - - sdk_cli_azure_test/ - - e2etests/ - - unittests/ +- src/promptflow/ - test_configs/ - connections/ - datas/ @@ -119,18 +104,34 @@ Currently all tests are under `src/promptflow/tests/` folder: - runs/ - wrong_flows/ - wrong_tools/ +- src/promptflow-core/ + - tests/ + - core/ # Basic test with promptflow-core installed. + - e2etests/ + - unittests/ + - azureml-serving/ # Test with promptflow-core[azureml-serving] installed. + - e2etests/ + - unittests/ + - executor-service/ # Test with promptflow-core[executor-service] installed. + - e2etests/ + - unittests/ +- src/promptflow-devkit/ + - tests/ + - executable/ # Test with promptflow-devkit[executable] installed. +- src/promptflow-azure/ + - tests/ # promptflow-azure doesn't have extra-requires, so all tests are under the test folder. + - e2etests/ + - unittests/ -When you want to add tests for a new feature, you can add new test file let's say a e2e test file `test_construction.py` -under `tests/promptflow/**/e2etests/`. +Principal #1: Put the tests in the same folder as the code they are testing, to ensure code can work within minor environment requirements. -Once the project gets more complicated or anytime you find it necessary to add new test folder and test configs for -a specific feature, feel free to split the `promptflow` to more folders, for example: +For example, you write code requires basic `promptflow-core` package, then put the tests in `promptflow-core/tests/core`, DO NOT put it in the promptflow-devkit or promptflow-azure. -- tests/ - - (Test folder name)/ - - e2etests/ - - test_xxx.py - - unittests/ - - test_xxx.py - - test_configs/ - - (Data or config folder name)/ +Principal #2: Setup separate workflow for tests with extra-requires. + +For example, you want to test `promptflow-core[azureml-serving]`, then add a new test folder `promptflow-core/tests/azureml-serving` to test the azure related code, +and add new test steps and environment setup step into `promptflow-core-test.yml` for that folder. DO NOT update the environment of `promptflow-core` basic test directly. + +### Record and replay tests + +Please refer to [Replay End-to-End Tests](./replay-e2e-test.md) to learn how to record and replay tests. diff --git a/docs/dev/documentation_guidelines.md b/docs/dev/documentation_guidelines.md index aa9d256e7c4..f5f4f124d74 100644 --- a/docs/dev/documentation_guidelines.md +++ b/docs/dev/documentation_guidelines.md @@ -2,7 +2,7 @@ ## Overview -This guide describes how to author Python docstrings for promptflow public interfaces. See our doc site at [Promptflow API reference documentation](https://microsoft.github.io/promptflow/reference/python-library-reference/promptflow.html). +This guide describes how to author Python docstrings for promptflow public interfaces. See our doc site at [Promptflow API reference documentation](https://microsoft.github.io/promptflow/reference/python-library-reference/promptflow-tracing/promptflow.html). ## Principles @@ -23,7 +23,7 @@ First please read through [Sphinx style](https://sphinx-rtd-tutorial.readthedocs Let's start with a class example: ```python from typing import Dict, Optional, Union -from promptflow import PFClient +from promptflow.client import PFClient class MyClass: """One-line summary of the class. diff --git a/docs/how-to-guides/develop-a-flow/develop-evaluation-flow.md b/docs/how-to-guides/develop-a-flow/develop-evaluation-flow.md index 8d87c6b6b09..62393393a7a 100644 --- a/docs/how-to-guides/develop-a-flow/develop-evaluation-flow.md +++ b/docs/how-to-guides/develop-a-flow/develop-evaluation-flow.md @@ -61,7 +61,7 @@ Before introducing the aggregation node, let's see what a regular node looks lik It takes both `groundtruth` and `prediction` from the flow inputs, compare them in the source code to see if they match: ```python -from promptflow import tool +from promptflow.core import tool @tool def grade(groundtruth: str, prediction: str): @@ -86,7 +86,7 @@ When it comes to an `aggregation node`, there are two key distinctions that set ```python from typing import List -from promptflow import log_metric, tool +from promptflow.core import log_metric, tool @tool def calculate_accuracy(grades: List[str]): @@ -157,7 +157,7 @@ Promptflow supports logging and tracking experiments using `log_metric` function ```python from typing import List -from promptflow import log_metric, tool +from promptflow.core import log_metric, tool @tool def example_log_metrics(grades: List[str]): diff --git a/docs/how-to-guides/develop-a-flow/develop-standard-flow.md b/docs/how-to-guides/develop-a-flow/develop-standard-flow.md index f99f9a46fd6..141ec676047 100644 --- a/docs/how-to-guides/develop-a-flow/develop-standard-flow.md +++ b/docs/how-to-guides/develop-a-flow/develop-standard-flow.md @@ -74,7 +74,7 @@ By selecting the tool card on the very top, you'll add a new tool node to flow. You can edit the tool by simply opening the source file and making edits. For example, we provide a simple Python tool code below. ```python -from promptflow import tool +from promptflow.core import tool # The inputs section will change based on the arguments of the tool function, after you save the code # Adding type to arguments and return value will help the system show the types properly @@ -144,7 +144,7 @@ For example: ```python import json -from promptflow import tool +from promptflow.core import tool @tool def convert_to_dict(input_str: str, input_str2: str) -> dict: diff --git a/docs/how-to-guides/develop-a-tool/create-cascading-tool-inputs.md b/docs/how-to-guides/develop-a-tool/create-cascading-tool-inputs.md index c639b8d800f..a4758499b51 100644 --- a/docs/how-to-guides/develop-a-tool/create-cascading-tool-inputs.md +++ b/docs/how-to-guides/develop-a-tool/create-cascading-tool-inputs.md @@ -17,7 +17,7 @@ We'll build out an example tool to show how cascading inputs work. The `student_ ```python from enum import Enum -from promptflow import tool +from promptflow.core import tool class UserType(str, Enum): diff --git a/docs/how-to-guides/develop-a-tool/create-dynamic-list-tool-input.md b/docs/how-to-guides/develop-a-tool/create-dynamic-list-tool-input.md index 475236ff813..7cb8850aa05 100644 --- a/docs/how-to-guides/develop-a-tool/create-dynamic-list-tool-input.md +++ b/docs/how-to-guides/develop-a-tool/create-dynamic-list-tool-input.md @@ -125,7 +125,10 @@ pip install my-tools-package>=0.0.8 ### I'm a tool author, and want to dynamically list Azure resources in my tool input. What should I pay attention to? 1. Clarify azure workspace triple "subscription_id", "resource_group_name", "workspace_name" in the list function signature. System helps append workspace triple to function input parameters if they are in function signature. See [list_endpoint_names](https://github.com/microsoft/promptflow/blob/main/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_dynamic_list_input.py) as an example. ```python -def list_endpoint_names(subscription_id, resource_group_name, workspace_name, prefix: str = "") -> List[Dict[str, str]]: +def list_endpoint_names(subscription_id: str = None, + resource_group_name: str = None, + workspace_name: str = None, + prefix: str = "") -> List[Dict[str, str]]: """This is an example to show how to get Azure ML resource in tool input list function. :param subscription_id: Azure subscription id. @@ -133,6 +136,10 @@ def list_endpoint_names(subscription_id, resource_group_name, workspace_name, pr :param workspace_name: Azure ML workspace name. :param prefix: prefix to add to each item. """ + # return an empty list if workspace triad is not available. + if not subscription_id or not resource_group_name or not workspace_name: + return [] + from azure.ai.ml import MLClient from azure.identity import DefaultAzureCredential @@ -185,4 +192,13 @@ If you are unable to see any options in a dynamic list tool input, you may see a If this occurs, follow these troubleshooting steps: - Note the exact error message shown. This provides details on why the dynamic list failed to populate. +- Check the tool documentation for any prerequisites or special instructions. For example, if the dynamic list function requires Azure credentials, ensure you have installed azure dependencies, logged in and set the default workspace. + ```sh + pip install azure-ai-ml + ``` + ```sh + az login + az account set --subscription + az configure --defaults group= workspace= + ``` - Contact the tool author/support team and report the issue. Provide the error message so they can investigate the root cause. diff --git a/docs/how-to-guides/develop-a-tool/customize_an_llm_tool.md b/docs/how-to-guides/develop-a-tool/customize_an_llm_tool.md index f29462aa80d..20478f93f2a 100644 --- a/docs/how-to-guides/develop-a-tool/customize_an_llm_tool.md +++ b/docs/how-to-guides/develop-a-tool/customize_an_llm_tool.md @@ -13,7 +13,7 @@ Here we use [an existing tool package](https://github.com/microsoft/promptflow/t ```python from jinja2 import Template - from promptflow import tool + from promptflow.core import tool from promptflow.connections import CustomConnection from promptflow.contracts.types import PromptTemplate diff --git a/docs/how-to-guides/develop-a-tool/use-file-path-as-tool-input.md b/docs/how-to-guides/develop-a-tool/use-file-path-as-tool-input.md index d54fadfa048..9d2cbcd3ca5 100644 --- a/docs/how-to-guides/develop-a-tool/use-file-path-as-tool-input.md +++ b/docs/how-to-guides/develop-a-tool/use-file-path-as-tool-input.md @@ -23,7 +23,7 @@ Here we use [an existing tool package](https://github.com/microsoft/promptflow/t ```python import importlib from pathlib import Path - from promptflow import tool + from promptflow.core import tool # 1. import the FilePath type from promptflow.contracts.types import FilePath @@ -78,7 +78,7 @@ We can also utilize the `FilePath` input type directly in a script tool, elimina ```python import importlib from pathlib import Path - from promptflow import tool + from promptflow.core import tool # 1. import the FilePath type from promptflow.contracts.types import FilePath diff --git a/docs/how-to-guides/enable-streaming-mode.md b/docs/how-to-guides/enable-streaming-mode.md index a53c0759db3..9402b7739b1 100644 --- a/docs/how-to-guides/enable-streaming-mode.md +++ b/docs/how-to-guides/enable-streaming-mode.md @@ -16,15 +16,15 @@ If you want to use the streaming mode, you need to create a flow that has a node ```jinja {# Sample prompt template for LLM node #} - system: + # system: You are a helpful assistant. - user: + # user: {{question}} ``` - Python tools node: This node allows you to write custom Python code that can yield string outputs. You can use this node to call external APIs or libraries that support streaming. For example, you can use this code to echo the input word by word: ```python - from promptflow import tool + from promptflow.core import tool # Sample code echo input by yield in Python tool node @@ -45,7 +45,7 @@ To use the streaming mode, you need to deploy your flow as an online endpoint. T Follow [this guide](./deploy-a-flow/index.md) to deploy your flow as an online endpoint. > [!NOTE] -> +> > You can follow this document to deploy an [online endpoint](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/how-to-deploy-for-real-time-inference?view=azureml-api-2). > Please deploy with runtime environment version later than version `20230816.v10`. > You can check your runtime version and update runtime in the run time detail page. @@ -60,9 +60,9 @@ To understand the streaming process, consider the following steps: - First, the client constructs an HTTP request with the desired media type included in the `Accept` header. The media type tells the server what kind of data format the client expects. It's like the client saying, "Hey, I'm looking for a specific format for the data you'll send me. It could be JSON, text, or something else." For example, `application/json` indicates a preference for JSON data, `text/event-stream` indicates a desire for streaming data, and `*/*` means the client accepts any data format. > [!NOTE] - > + > > If a request lacks an `Accept` header or has empty `Accept` header, it implies that the client will accept any media type in response. The server treats it as `*/*`. - + - Next, the server responds based on the media type specified in the `Accept` header. It's important to note that the client may request multiple media types in the `Accept` header, and the server must consider its capabilities and format priorities to determine the appropriate response. - First, the server checks if `text/event-stream` is explicitly specified in the `Accept` header: - For a stream-enabled flow, the server returns a response with a `Content-Type` of `text/event-stream`, indicating that the data is being streamed. @@ -92,7 +92,7 @@ Accept: text/event-stream } ``` > [!NOTE] -> +> > The `Accept` header is set to `text/event-stream` to request a stream response. @@ -230,15 +230,15 @@ If the response code is "424 Model Error", it means that the error is caused by In this sample usage, we are using the `SSEClient` class. This class is not a built-in Python class and needs to be installed separately. You can install it via pip: ```bash -pip install sseclient-py +pip install sseclient-py ``` A sample usage would like: ```python -import requests -from sseclient import SSEClient -from requests.exceptions import HTTPError +import requests +from sseclient import SSEClient +from requests.exceptions import HTTPError try: response = requests.post(url, json=body, headers=headers, stream=stream) diff --git a/docs/how-to-guides/init-and-test-a-flow.md b/docs/how-to-guides/init-and-test-a-flow.md index 03100edda32..1a1ebf39a57 100644 --- a/docs/how-to-guides/init-and-test-a-flow.md +++ b/docs/how-to-guides/init-and-test-a-flow.md @@ -127,7 +127,7 @@ Promptflow CLI will generate test logs and outputs in `.promptflow`: The return value of `test` function is the flow outputs. ```python -from promptflow import PFClient +from promptflow.client import PFClient pf_client = PFClient() @@ -188,7 +188,7 @@ The log and result of flow node test will be displayed in the terminal. And the Customer can execute this command to test the flow. The return value of `test` function is the node outputs. ```python -from promptflow import PFClient +from promptflow.client import PFClient pf_client = PFClient() @@ -266,7 +266,7 @@ The flow result will be streamed in the terminal as shown below. The LLM node return value of `test` function is a generator, you can consume the result by this way: ```python -from promptflow import PFClient +from promptflow.client import PFClient pf_client = PFClient() diff --git a/docs/how-to-guides/manage-connections.md b/docs/how-to-guides/manage-connections.md index f9fd89129b9..30803949199 100644 --- a/docs/how-to-guides/manage-connections.md +++ b/docs/how-to-guides/manage-connections.md @@ -63,7 +63,7 @@ The expected result is as follows if the connection created successfully. Using SDK, each connection type has a corresponding class to create a connection. The following code snippet shows how to import the required class and create the connection: ```python -from promptflow import PFClient +from promptflow.client import PFClient from promptflow.entities import AzureOpenAIConnection, CustomConnection # Get a pf client to manage connections @@ -162,7 +162,7 @@ pf connection list :sync: SDK List connection command will return the connections object list, note that all secrets and api keys will be scrubbed: ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage connections pf = PFClient() # List and print connections @@ -193,7 +193,7 @@ pf connection delete -n :sync: SDK Delete a connection with the following code snippet: ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage connections pf = PFClient() @@ -211,7 +211,7 @@ On the VS Code primary sidebar > prompt flow pane. You can find the connections :::: ## Load from environment variables -With `promptflow>=1.7.0`, user is able to load a connection object from os environment variables with `.from_env` func. +With `promptflow>=1.8.0`, user is able to load a connection object from os environment variables with `.from_env` func. Note that the connection object will **NOT BE CREATED** to local database. Supported types are as follows: diff --git a/docs/how-to-guides/manage-runs.md b/docs/how-to-guides/manage-runs.md index bf8a495cea0..91d785cd9bf 100644 --- a/docs/how-to-guides/manage-runs.md +++ b/docs/how-to-guides/manage-runs.md @@ -8,7 +8,7 @@ This documentation will walk you through how to manage your runs with CLI, SDK a In general: - For `CLI`, you can run `pf/pfazure run --help` in terminal to see the help messages. -- For `SDK`, you can refer to [Promptflow Python Library Reference](../reference/python-library-reference/promptflow.md) and check `PFClient.runs` for more run operations. +- For `SDK`, you can refer to [Promptflow Python Library Reference](../reference/python-library-reference/promptflow-devkit/promptflow.rst) and check `PFClient.runs` for more run operations. Let's take a look at the following topics: @@ -76,7 +76,7 @@ The expected result is as follows if the run is created successfully. Using SDK, create `Run` object and submit it with `PFClient`. The following code snippet shows how to import the required class and create the run: ```python -from promptflow import PFClient +from promptflow.client import PFClient from promptflow.entities import Run # Get a pf client to manage runs @@ -130,7 +130,7 @@ pf run show --name :sync: SDK Show run with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage runs pf = PFClient() # Get and print the run @@ -154,7 +154,7 @@ print(run) Get run details with TABLE format. ```bash -pf run show --name +pf run show-details --name ``` ![img](../media/how-to-guides/run_show_details.png) @@ -166,7 +166,7 @@ pf run show --name :sync: SDK Show run details with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient from tabulate import tabulate # Get a pf client to manage runs @@ -204,7 +204,7 @@ pf run show-metrics --name :sync: SDK Show run metrics with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient import json # Get a pf client to manage runs @@ -240,7 +240,7 @@ A browser will open and display run outputs. :sync: SDK Visualize run with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage runs pf = PFClient() @@ -280,7 +280,7 @@ pf run list :sync: SDK List with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage runs pf = PFClient() @@ -317,7 +317,7 @@ pf run update --name --set display_name=new_display_name :sync: SDK Update run with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage runs pf = PFClient() @@ -346,7 +346,7 @@ pf run archive --name :sync: SDK Archive with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage runs pf = PFClient() @@ -379,7 +379,7 @@ pf run restore --name :sync: SDK Restore with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage runs pf = PFClient() @@ -409,7 +409,7 @@ pf run delete --name :sync: SDK Delete with `PFClient` ```python -from promptflow import PFClient +from promptflow.client import PFClient # Get a pf client to manage runs pf = PFClient() diff --git a/docs/how-to-guides/quick-start.md b/docs/how-to-guides/quick-start.md index 83c2ca46c7c..d099fe012df 100644 --- a/docs/how-to-guides/quick-start.md +++ b/docs/how-to-guides/quick-start.md @@ -165,7 +165,7 @@ More command details can be found in [CLI reference](../reference/pf-command-ref In SDK, connections can be created and managed with `PFClient`. ```python -from promptflow import PFClient +from promptflow.client import PFClient from promptflow.entities import AzureOpenAIConnection # PFClient can help manage your runs and connections. @@ -254,7 +254,7 @@ pf flow test --flow web-classification # "web-classification" is the directory The return value of `test` function is the flow/node outputs. ```python -from promptflow import PFClient +from promptflow.client import PFClient pf = PFClient() diff --git a/docs/how-to-guides/run-and-evaluate-a-flow/index.md b/docs/how-to-guides/run-and-evaluate-a-flow/index.md index 6747c7ef8c5..a7ad5de1c81 100644 --- a/docs/how-to-guides/run-and-evaluate-a-flow/index.md +++ b/docs/how-to-guides/run-and-evaluate-a-flow/index.md @@ -58,7 +58,7 @@ More details can be found with `pf run --help` :sync: SDK ```python -from promptflow import PFClient +from promptflow.client import PFClient # Please protect the entry point by using `if __name__ == '__main__':`, # otherwise it would cause unintended side effect when promptflow spawn worker processes. @@ -98,7 +98,7 @@ pf.visualize(base_run) ![q_0](../../media/how-to-guides/quick-start/flow-run-visualize-single-run.png) -Feel free to check [Promptflow Python Library Reference](../../reference/python-library-reference/promptflow.md) for all SDK public interfaces. +Feel free to check [Promptflow Python Library Reference](../../reference/python-library-reference/promptflow-devkit/promptflow.rst) for all SDK public interfaces. ::: @@ -180,7 +180,7 @@ After the run is finished, you can evaluate the run with below command, compared More details can be found in [Use column mapping](https://aka.ms/pf/column-mapping). ```python -from promptflow import PFClient +from promptflow.client import PFClient # PFClient can help manage your runs and connections. pf = PFClient() @@ -239,7 +239,7 @@ Learn more about: - [Tune prompts with variants](../tune-prompts-with-variants.md) - [Deploy a flow](../deploy-a-flow/index.md) - [Manage runs](../manage-runs.md) -- [Python library reference](../../reference/python-library-reference/promptflow.md) +- [Python library reference](../../reference/python-library-reference/promptflow-core/promptflow.rst) ```{toctree} :maxdepth: 1 diff --git a/docs/how-to-guides/tune-prompts-with-variants.md b/docs/how-to-guides/tune-prompts-with-variants.md index 8a7b2a171af..33ed3e00a07 100644 --- a/docs/how-to-guides/tune-prompts-with-variants.md +++ b/docs/how-to-guides/tune-prompts-with-variants.md @@ -80,7 +80,7 @@ pf run create --flow web-classification --data web-classification/data.jsonl --v :sync: SDK ```python -from promptflow import PFClient +from promptflow.client import PFClient pf = PFClient() # get a promptflow client flow = "web-classification" diff --git a/docs/index.md b/docs/index.md index ec3a46fe756..9887f03971d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -65,7 +65,7 @@ This documentation site contains guides for prompt flow [sdk, cli](https://pypi. content: " Reference provides technical information about prompt flow API.

- Command line Interface reference: [pf](reference/pf-command-reference.md)
- - Python library reference: [promptflow](reference/python-library-reference/promptflow.md)
+ - Python library reference: [promptflow](reference/python-library-reference/promptflow-core/promptflow.rst)
- Tool reference: [LLM Tool](reference/tools-reference/llm-tool.md), [Python Tool](reference/tools-reference/python-tool.md), [Prompt Tool](reference/tools-reference/prompt-tool.md)
" ``` diff --git a/docs/media/cloud/flow-in-pipeline/pf-base-component.png b/docs/media/cloud/flow-in-pipeline/pf-base-component.png new file mode 100644 index 00000000000..a2f3124111f Binary files /dev/null and b/docs/media/cloud/flow-in-pipeline/pf-base-component.png differ diff --git a/docs/media/cloud/flow-in-pipeline/pf-component-parameters.png b/docs/media/cloud/flow-in-pipeline/pf-component-parameters.png new file mode 100644 index 00000000000..26acf866b7e Binary files /dev/null and b/docs/media/cloud/flow-in-pipeline/pf-component-parameters.png differ diff --git a/docs/reference/flow-yaml-schema-reference.md b/docs/reference/flow-yaml-schema-reference.md index 7804eaf5aab..c9e0a54fb7f 100644 --- a/docs/reference/flow-yaml-schema-reference.md +++ b/docs/reference/flow-yaml-schema-reference.md @@ -8,28 +8,29 @@ The source JSON schema can be found at [Flow.schema.json](https://azuremlschemas ## YAML syntax -| Key | Type | Description | -|----------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `$schema` | string | The YAML schema. If you use the prompt flow VS Code extension to author the YAML file, including `$schema` at the top of your file enables you to invoke schema and resource completions. | -| `inputs` | object | Dictionary of flow inputs. The key is a name for the input within the context of the flow and the value is the flow input definition. | -| `inputs.` | object | The flow input definition. See [Flow input](#flow-input) for the set of configurable properties. | -| `outputs` | object | Dictionary of flow outputs. The key is a name for the output within the context of the flow and the value is the flow output definition. | -| `outputs.` | object | The component output definition. See [Flow output](#flow-output) for the set of configurable properties. | -| `nodes` | array | Sets of dictionary of individual nodes to run as steps within the flow. Node can use built-in tool or third-party tool. See [Nodes](#nodes) for more information. | -| `node_variants` | object | Dictionary of nodes with variants. The key is the node name and value contains variants definition and `default_variant_id`. See [Node variants](#node-variants) for more information. | -| `environment` | object | The environment to use for the flow. The key can be `image` or `python_requirements_txt` and the value can be either a image or a python requirements text file. | -| `additional_includes` | array | Additional includes is a list of files that can be shared among flows. Users can specify additional files and folders used by flow, and prompt flow will help copy them all to the snapshot during flow creation. | +| Key | Type | Description | +|-------------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `$schema` | string | The YAML schema. If you use the prompt flow VS Code extension to author the YAML file, including `$schema` at the top of your file enables you to invoke schema and resource completions. | +| `inputs` | object | Dictionary of flow inputs. The key is a name for the input within the context of the flow and the value is the flow input definition. | +| `inputs.` | object | The flow input definition. See [Flow input](#flow-input) for the set of configurable properties. | +| `outputs` | object | Dictionary of flow outputs. The key is a name for the output within the context of the flow and the value is the flow output definition. | +| `outputs.` | object | The component output definition. See [Flow output](#flow-output) for the set of configurable properties. | +| `nodes` | array | Sets of dictionary of individual nodes to run as steps within the flow. Node can use built-in tool or third-party tool. See [Nodes](#nodes) for more information. | +| `node_variants` | object | Dictionary of nodes with variants. The key is the node name and value contains variants definition and `default_variant_id`. See [Node variants](#node-variants) for more information. | +| `environment` | object | The environment to use for the flow. The key can be `image` or `python_requirements_txt` and the value can be either a image or a python requirements text file. | +| `environment_variables` | object/string | Environment variables to set by specifying a property path and value. Example: `{"key1"="${my_connection.api_key}"}`. The value reference to connection keys will be resolved to the actual value, and all environment variables specified will be set into os.environ. | +| `additional_includes` | array | Additional includes is a list of files that can be shared among flows. Users can specify additional files and folders used by flow, and prompt flow will help copy them all to the snapshot during flow creation. | ### Flow input -| Key | Type | Description | Allowed values | -|-------------------|-------------------------------------------|------------------------------------------------------|-----------------------------------------------------| -| `type` | string | The type of flow input. | `int`, `double`, `bool`, `string`, `list`, `object`, `image` | -| `description` | string | Description of the input. | | -| `default` | int, double, bool, string, list, object, image | The default value for the input. | | -| `is_chat_input` | boolean | Whether the input is the chat flow input. | | -| `is_chat_history` | boolean | Whether the input is the chat history for chat flow. | | +| Key | Type | Description | Allowed values | +|-------------------|------------------------------------------------|------------------------------------------------------|--------------------------------------------------------------| +| `type` | string | The type of flow input. | `int`, `double`, `bool`, `string`, `list`, `object`, `image` | +| `description` | string | Description of the input. | | +| `default` | int, double, bool, string, list, object, image | The default value for the input. | | +| `is_chat_input` | boolean | Whether the input is the chat flow input. | | +| `is_chat_history` | boolean | Whether the input is the chat history for chat flow. | | ### Flow output @@ -43,28 +44,28 @@ The source JSON schema can be found at [Flow.schema.json](https://azuremlschemas ### Nodes Nodes is a set of node which is a dictionary with following fields. Below, we only show the common fields of a single node using built-in tool. -| Key | Type | Description | Allowed values | -|----------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| -| `name` | string | The name of the node. | | -| `type` | string | The type of the node. | Type of built-in tool like `Python`, `Prompt`, `LLM` and third-party tool like `Vector Search`, etc. | -| `inputs` | object | Dictionary of node inputs. The key is the input name and the value can be primitive value or a reference to the flow input or the node output, e.g. `${inputs.}`, `${.output}` or `${.output.}` | | -| `source` | object | Dictionary of tool source used by the node. The key contains `type`, `path` and `tool`. The type can be `code`, `package` and `package_with_prompt`. | | -| `provider` | string | It indicates the provider of the tool. Used when the `type` is LLM. | `AzureOpenAI` or `OpenAI` | -| `connection` | string | The connection name which has been created before. Used when the `type` is LLM. | | -| `api` | string | The api name of the provider. Used when the `type` is LLM. | | -| `module` | string | The module name of the tool using by the node. Used when the `type` is LLM. | | -| `use_variants` | bool | Whether the node has variants. | | +| Key | Type | Description | Allowed values | +|----------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| +| `name` | string | The name of the node. | | +| `type` | string | The type of the node. | Type of built-in tool like `Python`, `Prompt`, `LLM` and third-party tool like `Vector Search`, etc. | +| `inputs` | object | Dictionary of node inputs. The key is the input name and the value can be primitive value or a reference to the flow input or the node output, e.g. `${inputs.}`, `${.output}` or `${.output.}` | | +| `source` | object | Dictionary of tool source used by the node. The key contains `type`, `path` and `tool`. The type can be `code`, `package` and `package_with_prompt`. | | +| `provider` | string | It indicates the provider of the tool. Used when the `type` is LLM. | `AzureOpenAI` or `OpenAI` | +| `connection` | string | The connection name which has been created before. Used when the `type` is LLM. | | +| `api` | string | The api name of the provider. Used when the `type` is LLM. | | +| `module` | string | The module name of the tool using by the node. Used when the `type` is LLM. | | +| `use_variants` | bool | Whether the node has variants. | | ### Node variants Node variants is a dictionary containing variants definition for nodes with variants with their respective node names as dictionary keys. Below, we explore the variants for a single node. -| Key | Type | Description | Allowed values | -|----------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------| -| `` | string | The name of the node. | | -| `default_variant_id` | string | Default variant id. | | -| `variants ` | object | This dictionary contains all node variations, with the variant id serving as the key and a node definition dictionary as the corresponding value. Within the node definition dictionary, the key labeled 'node' should contain a variant definition similar to [Nodes](#nodes), excluding the 'name' field. | | +| Key | Type | Description | Allowed values | +|----------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| `` | string | The name of the node. | | +| `default_variant_id` | string | Default variant id. | | +| `variants ` | object | This dictionary contains all node variations, with the variant id serving as the key and a node definition dictionary as the corresponding value. Within the node definition dictionary, the key labeled 'node' should contain a variant definition similar to [Nodes](#nodes), excluding the 'name' field. | | diff --git a/docs/reference/index.md b/docs/reference/index.md index fe936290c69..9bf312217dc 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -5,6 +5,18 @@ - [promptflow](https://pypi.org/project/promptflow): [![PyPI version](https://badge.fury.io/py/promptflow.svg)](https://badge.fury.io/py/promptflow) [![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow)](https://pypi.org/project/promptflow/) + - [promptflow-tracing](https://pypi.org/project/promptflow-tracing): + [![PyPI version](https://badge.fury.io/py/promptflow-tracing.svg)](https://badge.fury.io/py/promptflow-tracing) + [![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow-tracing)](https://pypi.org/project/promptflow-tracing/) + - [promptflow-core](https://pypi.org/project/promptflow-core): + [![PyPI version](https://badge.fury.io/py/promptflow-core.svg)](https://badge.fury.io/py/promptflow-core) + [![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow-core)](https://pypi.org/project/promptflow-core/) + - [promptflow-devkit](https://pypi.org/project/promptflow-devkit): + [![PyPI version](https://badge.fury.io/py/promptflow-devkit.svg)](https://badge.fury.io/py/promptflow-devkit) + [![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow-devkit)](https://pypi.org/project/promptflow-devkit/) + - [promptflow-azure](https://pypi.org/project/promptflow-azure): + [![PyPI version](https://badge.fury.io/py/promptflow-azure.svg)](https://badge.fury.io/py/promptflow-azure) + [![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow-azure)](https://pypi.org/project/promptflow-azure/) - [promptflow-tools](https://pypi.org/project/promptflow-tools/): [![PyPI version](https://badge.fury.io/py/promptflow-tools.svg)](https://badge.fury.io/py/promptflow-tools) [![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow-tools)](https://pypi.org/project/promptflow-tools/) @@ -23,7 +35,10 @@ pfazure-command-reference.md :caption: Python Library Reference :maxdepth: 4 -python-library-reference/promptflow +python-library-reference/promptflow-tracing/promptflow +python-library-reference/promptflow-core/promptflow +python-library-reference/promptflow-devkit/promptflow +python-library-reference/promptflow-azure/promptflow ``` ```{toctree} diff --git a/docs/reference/pf-command-reference.md b/docs/reference/pf-command-reference.md index 4506e55c249..0f158ba7c7c 100644 --- a/docs/reference/pf-command-reference.md +++ b/docs/reference/pf-command-reference.md @@ -466,7 +466,7 @@ pf run create [--file] [--connections] [--set] [--source] - [--resume-from] # require promptflow>=1.7.0, and original run created with promptflow>=1.7.0 + [--resume-from] # require promptflow>=1.8.0, and original run created with promptflow>=1.8.0 ``` #### Examples @@ -495,7 +495,7 @@ Create a run from an existing run record folder. pf run create --source ``` -Create a run by specifying the `resume_from`. (Require promptflow>=1.7.0, and original run created with promptflow>=1.7.0) +Create a run by specifying the `resume_from`. (Require promptflow>=1.8.0, and original run created with promptflow>=1.8.0) Succeeded line result of the original run will be reused, only remaining/failed lines will be run. diff --git a/docs/reference/pfazure-command-reference.md b/docs/reference/pfazure-command-reference.md index 05554b2bb57..04ee2692cd9 100644 --- a/docs/reference/pfazure-command-reference.md +++ b/docs/reference/pfazure-command-reference.md @@ -192,7 +192,7 @@ pfazure run create [--file] [--stream] [--environment-variables] [--connections] - [--resume-from] # require promptflow>=1.7.0, and original run created with promptflow>=1.7.0 + [--resume-from] # require promptflow>=1.8.0 [--set] [--subscription] [--resource-group] @@ -207,7 +207,17 @@ Local path to the YAML file containing the prompt flow run specification; can be `--flow` -Local path to the flow directory. +The flow source to create the run. It could be: +- Local path to the flow directory. + ```bash + pfazure run create --flow --data --column-mapping + ``` +- The flow name on azure with a prefix `azureml:`. Flow name is a guid that can be found from 2 ways: + - After creating a flow to azure, it can be found in the printed message in "name" attribute. + - Open a flow in azure portal, the guid is in the url. e.g. https://ml.azure.com/prompts/flow/{workspace-id}/{flow-name}/xxx + ```bash + pfazure run create --flow azureml: --data --column-mapping + ``` `--data` @@ -244,7 +254,7 @@ Example: `--connections node1.connection=test_llm_connection node1.deployment_na `--resume-from` -Create a run resume from an existing run. (Require promptflow>=1.7.0, and original run created with promptflow>=1.7.0) +Create a run resume from an existing run. (Require promptflow>=1.8.0) Example: `--resume-from ` `--set` diff --git a/docs/reference/tools-reference/llm-tool.md b/docs/reference/tools-reference/llm-tool.md index fcb932382cc..ecfdde13b77 100644 --- a/docs/reference/tools-reference/llm-tool.md +++ b/docs/reference/tools-reference/llm-tool.md @@ -83,3 +83,71 @@ Setup connections to provisioned resources in prompt flow. 1. Setup and select the connections to OpenAI resources 2. Configure LLM model api and its parameters 3. Prepare the Prompt with [guidance](./prompt-tool.md#how-to-write-prompt). + +## How to write a chat prompt? + +_To grasp the fundamentals of creating a chat prompt, begin with [this section](./prompt-tool.md#how-to-write-prompt) for an introductory understanding of jinja._ + +We offer a method to distinguish between different roles in a chat prompt, such as "system", "user", "assistant". Each role can have "name" and "content" properties. + +### Sample 1 +```jinja +# system: +You are a helpful assistant. + +{% for item in chat_history %} +# user: +{{item.inputs.question}} +# assistant: +{{item.outputs.answer}} +{% endfor %} + +# user: +{{question}} +``` + +In LLM tool, the prompt is transformed to match the [openai messages](https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages) structure before sending to openai chat API. + +``` +[ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "" + }, + { + "role": "assistant", + "content": "" + }, + ... + { + "role": "user", + "content": "" + } +] +``` + +### Sample 2 +```jinja +# system: +{# For role naming customization, the following syntax is used #} +## name: +Alice +## content: +You are a bot can tell good jokes. +``` + +In LLM tool, the prompt is transformed to match the [openai messages](https://platform.openai.com/docs/api-reference/chat/create#chat-create-messages) structure before sending to openai chat API. + +``` +[ + { + "role": "system", + "name": "Alice", + "content": "You are a bot can tell good jokes." + } +] +``` diff --git a/docs/reference/tools-reference/python-tool.md b/docs/reference/tools-reference/python-tool.md index f98837b03e8..5d63819a997 100644 --- a/docs/reference/tools-reference/python-tool.md +++ b/docs/reference/tools-reference/python-tool.md @@ -62,7 +62,7 @@ The snippet below shows the basic structure of a tool function. Promptflow will from function parameters and type annotations. ```python -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomConnection # The inputs section will change based on the arguments of the tool function, after you save the code @@ -97,7 +97,7 @@ we have introduced support for keyword arguments (kwargs) in the Python tool. ```python -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/README.md b/examples/README.md index a080a48caee..9ce7e31ca3b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -109,8 +109,8 @@ ------|--------|------------- | [quickstart.ipynb](tutorials/get-started/quickstart.ipynb) | [![samples_getstarted_quickstart](https://github.com/microsoft/promptflow/actions/workflows/samples_getstarted_quickstart.yml/badge.svg?branch=main)](https://github.com/microsoft/promptflow/actions/workflows/samples_getstarted_quickstart.yml) | A quickstart tutorial to run a flow and evaluate it. | | [quickstart-azure.ipynb](tutorials/get-started/quickstart-azure.ipynb) | [![samples_getstarted_quickstartazure](https://github.com/microsoft/promptflow/actions/workflows/samples_getstarted_quickstartazure.yml/badge.svg?branch=main)](https://github.com/microsoft/promptflow/actions/workflows/samples_getstarted_quickstartazure.yml) | A quickstart tutorial to run a flow in Azure AI and evaluate it. | -| [pipeline.ipynb](tutorials/flow-in-pipeline/pipeline.ipynb) | [![samples_flowinpipeline_pipeline](https://github.com/microsoft/promptflow/actions/workflows/samples_flowinpipeline_pipeline.yml/badge.svg?branch=main)](https://github.com/microsoft/promptflow/actions/workflows/samples_flowinpipeline_pipeline.yml) | Create pipeline using components to run a distributed job with tensorflow | | [flow-as-function.ipynb](tutorials/get-started/flow-as-function.ipynb) | [![samples_getstarted_flowasfunction](https://github.com/microsoft/promptflow/actions/workflows/samples_getstarted_flowasfunction.yml/badge.svg?branch=main)](https://github.com/microsoft/promptflow/actions/workflows/samples_getstarted_flowasfunction.yml) | This guide will walk you through the main scenarios of executing flow as a function. | +| [pipeline.ipynb](tutorials/run-flow-with-pipeline/pipeline.ipynb) | [![samples_runflowwithpipeline_pipeline](https://github.com/microsoft/promptflow/actions/workflows/samples_runflowwithpipeline_pipeline.yml/badge.svg?branch=main)](https://github.com/microsoft/promptflow/actions/workflows/samples_runflowwithpipeline_pipeline.yml) | Create pipeline using components to run a distributed job with tensorflow | | [cloud-run-management.ipynb](tutorials/run-management/cloud-run-management.ipynb) | [![samples_runmanagement_cloudrunmanagement](https://github.com/microsoft/promptflow/actions/workflows/samples_runmanagement_cloudrunmanagement.yml/badge.svg?branch=main)](https://github.com/microsoft/promptflow/actions/workflows/samples_runmanagement_cloudrunmanagement.yml) | Flow run management in Azure AI | | [run-management.ipynb](tutorials/run-management/run-management.ipynb) | [![samples_runmanagement_runmanagement](https://github.com/microsoft/promptflow/actions/workflows/samples_runmanagement_runmanagement.yml/badge.svg?branch=main)](https://github.com/microsoft/promptflow/actions/workflows/samples_runmanagement_runmanagement.yml) | Flow run management | | [connection.ipynb](connections/connection.ipynb) | [![samples_connections_connection](https://github.com/microsoft/promptflow/actions/workflows/samples_connections_connection.yml/badge.svg?branch=main)](https://github.com/microsoft/promptflow/actions/workflows/samples_connections_connection.yml) | Manage various types of connections using sdk | diff --git a/examples/connections/connection.ipynb b/examples/connections/connection.ipynb index aadc6b8fbbe..ac1eae0478d 100644 --- a/examples/connections/connection.ipynb +++ b/examples/connections/connection.ipynb @@ -46,7 +46,7 @@ "metadata": {}, "outputs": [], "source": [ - "from promptflow import PFClient\n", + "from promptflow.client import PFClient\n", "\n", "# client can help manage your runs and connections.\n", "client = PFClient()" diff --git a/examples/flows/chat/chat-basic/README.md b/examples/flows/chat/chat-basic/README.md index c518e0394f1..f6babab329c 100644 --- a/examples/flows/chat/chat-basic/README.md +++ b/examples/flows/chat/chat-basic/README.md @@ -15,21 +15,21 @@ pip install -r requirements.txt In this flow, you will learn - how to compose a chat flow. -- prompt template format of LLM tool chat api. Message delimiter is a separate line containing role name and colon: "system:", "user:", "assistant:". +- prompt template format of LLM tool chat api. Message delimiter is a separate line containing "#", role name and colon: "# system:", "# user:", "# assistant:". See OpenAI Chat for more about message role. ```jinja - system: + # system: You are a chatbot having a conversation with a human. - user: + # user: {{question}} ``` - how to consume chat history in prompt. ```jinja {% for item in chat_history %} - user: + # user: {{item.inputs.question}} - assistant: + # assistant: {{item.outputs.answer}} {% endfor %} ``` @@ -48,7 +48,7 @@ pf connection create --file ../../../connections/azure_openai.yml --set api_key= Note in [flow.dag.yaml](flow.dag.yaml) we are using connection named `open_ai_connection`. ```bash -# show registered connection +# show registered connection pf connection show --name open_ai_connection ``` @@ -56,7 +56,7 @@ pf connection show --name open_ai_connection ```bash # run chat flow with default question in flow.dag.yaml -pf flow test --flow . +pf flow test --flow . # run chat flow with new question pf flow test --flow . --inputs question="What's Azure Machine Learning?" diff --git a/examples/flows/chat/chat-basic/chat.jinja2 b/examples/flows/chat/chat-basic/chat.jinja2 index c5e811e1969..96bfb60a45b 100644 --- a/examples/flows/chat/chat-basic/chat.jinja2 +++ b/examples/flows/chat/chat-basic/chat.jinja2 @@ -1,12 +1,12 @@ -system: +# system: You are a helpful assistant. {% for item in chat_history %} -user: +# user: {{item.inputs.question}} -assistant: +# assistant: {{item.outputs.answer}} {% endfor %} -user: +# user: {{question}} \ No newline at end of file diff --git a/examples/flows/chat/chat-math-variant/chat.jinja2 b/examples/flows/chat/chat-math-variant/chat.jinja2 index b29be64b174..99ccef45c92 100644 --- a/examples/flows/chat/chat-math-variant/chat.jinja2 +++ b/examples/flows/chat/chat-math-variant/chat.jinja2 @@ -1,13 +1,13 @@ -system: -You are an assistant to calculate the answer to the provided math problems. +# system: +You are an assistant to calculate the answer to the provided math problems. Please return the final numerical answer only, without any accompanying reasoning or explanation. {% for item in chat_history %} -user: +# user: {{item.inputs.question}} -assistant: +# assistant: {{item.outputs.answer}} {% endfor %} -user: +# user: {{question}} diff --git a/examples/flows/chat/chat-math-variant/chat_variant_1.jinja2 b/examples/flows/chat/chat-math-variant/chat_variant_1.jinja2 index d54532b39df..2b77e8a3850 100644 --- a/examples/flows/chat/chat-math-variant/chat_variant_1.jinja2 +++ b/examples/flows/chat/chat-math-variant/chat_variant_1.jinja2 @@ -1,23 +1,23 @@ -system: +# system: You are an assistant to calculate the answer to the provided math problems. Please think step by step. Return the final numerical answer only and any accompanying reasoning or explanation seperately as json format. -user: +# user: A jar contains two red marbles, three green marbles, ten white marbles and no other marbles. Two marbles are randomly drawn from this jar without replacement. What is the probability that these two marbles drawn will both be red? Express your answer as a common fraction. -assistant: +# assistant: {Chain of thought: "The total number of marbles is $2+3+10=15$. The probability that the first marble drawn will be red is $2/15$. Then, there will be one red left, out of 14. Therefore, the probability of drawing out two red marbles will be: $$\\frac{2}{15}\\cdot\\frac{1}{14}=\\boxed{\\frac{1}{105}}$$.", "answer": "1/105"} -user: +# user: Find the greatest common divisor of $7!$ and $(5!)^2.$ -assistant: +# assistant: {"Chain of thought": "$$ \\begin{array} 7! &=& 7 \\cdot 6 \\cdot 5 \\cdot 4 \\cdot 3 \\cdot 2 \\cdot 1 &=& 2^4 \\cdot 3^2 \\cdot 5^1 \\cdot 7^1 \\\\ (5!)^2 &=& (5 \\cdot 4 \\cdot 3 \\cdot 2 \\cdot 1)^2 &=& 2^6 \\cdot 3^2 \\cdot 5^2 \\\\ \\text{gcd}(7!, (5!)^2) &=& 2^4 \\cdot 3^2 \\cdot 5^1 &=& \\boxed{720} \\end{array} $$.", "answer": "720"} {% for item in chat_history %} -user: +# user: {{item.inputs.question}} -assistant: +# assistant: {{item.outputs.answer}} {% endfor %} -user: +# user: {{question}} \ No newline at end of file diff --git a/examples/flows/chat/chat-math-variant/chat_variant_2.jinja2 b/examples/flows/chat/chat-math-variant/chat_variant_2.jinja2 index 35c65a9624f..1a5c5d4f242 100644 --- a/examples/flows/chat/chat-math-variant/chat_variant_2.jinja2 +++ b/examples/flows/chat/chat-math-variant/chat_variant_2.jinja2 @@ -1,39 +1,39 @@ -system: +# system: You are an assistant to calculate the answer to the provided math problems. Please think step by step. Return the final numerical answer only and any accompanying reasoning or explanation seperately as json format. -user: +# user: A jar contains two red marbles, three green marbles, ten white marbles and no other marbles. Two marbles are randomly drawn from this jar without replacement. What is the probability that these two marbles drawn will both be red? Express your answer as a common fraction. -assistant: +# assistant: {Chain of thought: "The total number of marbles is $2+3+10=15$. The probability that the first marble drawn will be red is $2/15$. Then, there will be one red left, out of 14. Therefore, the probability of drawing out two red marbles will be: $$\\frac{2}{15}\\cdot\\frac{1}{14}=\\boxed{\\frac{1}{105}}$$.", "answer": "1/105"} -user: +# user: Find the greatest common divisor of $7!$ and $(5!)^2.$ -assistant: +# assistant: {"Chain of thought": "$$ \\begin{array} 7! &=& 7 \\cdot 6 \\cdot 5 \\cdot 4 \\cdot 3 \\cdot 2 \\cdot 1 &=& 2^4 \\cdot 3^2 \\cdot 5^1 \\cdot 7^1 \\\\ (5!)^2 &=& (5 \\cdot 4 \\cdot 3 \\cdot 2 \\cdot 1)^2 &=& 2^6 \\cdot 3^2 \\cdot 5^2 \\\\ \\text{gcd}(7!, (5!)^2) &=& 2^4 \\cdot 3^2 \\cdot 5^1 &=& \\boxed{720} \\end{array} $$.", "answer": "720"} -user: +# user: A club has 10 members, 5 boys and 5 girls. Two of the members are chosen at random. What is the probability that they are both girls? -assistant: +# assistant: {"Chain of thought": "There are $\\binomial{10}{2} = 45$ ways to choose two members of the group, and there are $\\binomial{5}{2} = 10$ ways to choose two girls. Therefore, the probability that two members chosen at random are girls is $\\dfrac{10}{45} = \\boxed{\\dfrac{2}{9}}$.", "answer": "2/9"} -user: +# user: Allison, Brian and Noah each have a 6-sided cube. All of the faces on Allison's cube have a 5. The faces on Brian's cube are numbered 1, 2, 3, 4, 5 and 6. Three of the faces on Noah's cube have a 2 and three of the faces have a 6. All three cubes are rolled. What is the probability that Allison's roll is greater than each of Brian's and Noah's? Express your answer as a common fraction. -assistant: +# assistant: {"Chain of thought": "Since Allison will always roll a 5, we must calculate the probability that both Brian and Noah roll a 4 or lower. The probability of Brian rolling a 4 or lower is $\\frac{4}{6} = \\frac{2}{3}$ since Brian has a standard die. Noah, however, has a $\\frac{3}{6} = \\frac{1}{2}$ probability of rolling a 4 or lower, since the only way he can do so is by rolling one of his 3 sides that have a 2. So, the probability of both of these independent events occurring is $\\frac{2}{3} \\cdot \\frac{1}{2} = \\boxed{\\frac{1}{3}}$.", "answer": "1/3"} -user: +# user: Compute $\\density binomial{50}{2}$. -assistant: +# assistant: {"Chain of thought": "$\\density binomial{50}{2} = \\dfrac{50!}{2!48!}=\\dfrac{50\\times 49}{2\\times 1}=\\boxed{1225}.$", "answer": "1225"} -user: +# user: The set $S = \\{1, 2, 3, \\ldots , 49, 50\\}$ contains the first $50$ positive integers. After the multiples of 2 and the multiples of 3 are removed, how many integers remain in the set $S$? -assistant: +# assistant: {"Chain of thought": "The set $S$ contains $25$ multiples of 2 (that is, even numbers). When these are removed, the set $S$ is left with only the odd integers from 1 to 49. At this point, there are $50-25=25$ integers in $S$. We still need to remove the multiples of 3 from $S$.\n\nSince $S$ only contains odd integers after the multiples of 2 are removed, we must remove the odd multiples of 3 between 1 and 49. These are 3, 9, 15, 21, 27, 33, 39, 45, of which there are 8. Therefore, the number of integers remaining in the set $S$ is $25 - 8 = \\boxed{17}$.", "answer": "17"} {% for item in chat_history %} -user: +# user: {{item.inputs.question}} -assistant: +# assistant: {{item.outputs.answer}} {% endfor %} -user: +# user: {{question}} diff --git a/examples/flows/chat/chat-math-variant/extract_result.py b/examples/flows/chat/chat-math-variant/extract_result.py index 5ce86dd507a..e9b1a0bbb07 100644 --- a/examples/flows/chat/chat-math-variant/extract_result.py +++ b/examples/flows/chat/chat-math-variant/extract_result.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import json import re diff --git a/examples/flows/chat/chat-with-pdf/build_index_tool.py b/examples/flows/chat/chat-with-pdf/build_index_tool.py index abbff62e7ff..21ec19aad6a 100644 --- a/examples/flows/chat/chat-with-pdf/build_index_tool.py +++ b/examples/flows/chat/chat-with-pdf/build_index_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from chat_with_pdf.build_index import create_faiss_index diff --git a/examples/flows/chat/chat-with-pdf/chat_with_pdf_tool.py b/examples/flows/chat/chat-with-pdf/chat_with_pdf_tool.py index 334755322df..6cc3bc1cff5 100644 --- a/examples/flows/chat/chat-with-pdf/chat_with_pdf_tool.py +++ b/examples/flows/chat/chat-with-pdf/chat_with_pdf_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from chat_with_pdf.main import chat_with_pdf diff --git a/examples/flows/chat/chat-with-pdf/download_tool.py b/examples/flows/chat/chat-with-pdf/download_tool.py index 72baa90fac5..08dc07a038b 100644 --- a/examples/flows/chat/chat-with-pdf/download_tool.py +++ b/examples/flows/chat/chat-with-pdf/download_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from chat_with_pdf.download import download diff --git a/examples/flows/chat/chat-with-pdf/find_context_tool.py b/examples/flows/chat/chat-with-pdf/find_context_tool.py index 246ceea2b73..1806bf2c048 100644 --- a/examples/flows/chat/chat-with-pdf/find_context_tool.py +++ b/examples/flows/chat/chat-with-pdf/find_context_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from chat_with_pdf.find_context import find_context diff --git a/examples/flows/chat/chat-with-pdf/qna_tool.py b/examples/flows/chat/chat-with-pdf/qna_tool.py index 98e131b75ef..1c414485e11 100644 --- a/examples/flows/chat/chat-with-pdf/qna_tool.py +++ b/examples/flows/chat/chat-with-pdf/qna_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from chat_with_pdf.qna import qna diff --git a/examples/flows/chat/chat-with-pdf/rewrite_question_tool.py b/examples/flows/chat/chat-with-pdf/rewrite_question_tool.py index 8808c4a00f5..ea2152ca725 100644 --- a/examples/flows/chat/chat-with-pdf/rewrite_question_tool.py +++ b/examples/flows/chat/chat-with-pdf/rewrite_question_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from chat_with_pdf.rewrite_question import rewrite_question diff --git a/examples/flows/chat/chat-with-pdf/setup_env.py b/examples/flows/chat/chat-with-pdf/setup_env.py index 6b231b878c9..9457c2257d0 100644 --- a/examples/flows/chat/chat-with-pdf/setup_env.py +++ b/examples/flows/chat/chat-with-pdf/setup_env.py @@ -1,7 +1,7 @@ import os from typing import Union -from promptflow import tool +from promptflow.core import tool from promptflow.connections import AzureOpenAIConnection, OpenAIConnection from chat_with_pdf.utils.lock import acquire_lock diff --git a/examples/flows/chat/chat-with-wikipedia/README.md b/examples/flows/chat/chat-with-wikipedia/README.md index 418d9142292..d721e1cc216 100644 --- a/examples/flows/chat/chat-with-wikipedia/README.md +++ b/examples/flows/chat/chat-with-wikipedia/README.md @@ -17,21 +17,21 @@ pip install -r requirements.txt In this flow, you will learn - how to compose a chat flow. -- prompt template format of LLM tool chat api. Message delimiter is a separate line containing role name and colon: "system:", "user:", "assistant:". +- prompt template format of LLM tool chat api. Message delimiter is a separate line containing "#", role name and colon: "# system:", "# user:", "# assistant:". See OpenAI Chat for more about message role. ```jinja - system: + # system: You are a chatbot having a conversation with a human. - user: + # user: {{question}} ``` - how to consume chat history in prompt. ```jinja {% for item in chat_history %} - user: + # user: {{item.inputs.question}} - assistant: + # assistant: {{item.outputs.answer}} {% endfor %} ``` @@ -50,7 +50,7 @@ pf connection create --file ../../../connections/azure_openai.yml --set api_key= Note in [flow.dag.yaml](flow.dag.yaml) we are using connection named `open_ai_connection`. ```bash -# show registered connection +# show registered connection pf connection show --name open_ai_connection ``` @@ -58,7 +58,7 @@ pf connection show --name open_ai_connection ```bash # run chat flow with default question in flow.dag.yaml -pf flow test --flow . +pf flow test --flow . # run chat flow with new question pf flow test --flow . --inputs question="What's Azure Machine Learning?" diff --git a/examples/flows/chat/chat-with-wikipedia/augmented_chat.jinja2 b/examples/flows/chat/chat-with-wikipedia/augmented_chat.jinja2 index 0719d1fa09a..71e7377a348 100644 --- a/examples/flows/chat/chat-with-wikipedia/augmented_chat.jinja2 +++ b/examples/flows/chat/chat-with-wikipedia/augmented_chat.jinja2 @@ -1,4 +1,4 @@ -system: +# system: You are a chatbot having a conversation with a human. Given the following extracted parts of a long document and a question, create a final answer with references ("SOURCES"). If you don't know the answer, just say that you don't know. Don't try to make up an answer. @@ -7,11 +7,11 @@ ALWAYS return a "SOURCES" part in your answer. {{contexts}} {% for item in chat_history %} -user: +# user: {{item.inputs.question}} -assistant: +# assistant: {{item.outputs.answer}} {% endfor %} -user: +# user: {{question}} diff --git a/examples/flows/chat/chat-with-wikipedia/extract_query_from_question.jinja2 b/examples/flows/chat/chat-with-wikipedia/extract_query_from_question.jinja2 index 6b08923ddb8..f01976185c4 100644 --- a/examples/flows/chat/chat-with-wikipedia/extract_query_from_question.jinja2 +++ b/examples/flows/chat/chat-with-wikipedia/extract_query_from_question.jinja2 @@ -1,11 +1,11 @@ -system: +# system: You are an AI assistant reading the transcript of a conversation between an AI and a human. Given an input question and conversation history, infer user real intent. The conversation history is provided just in case of a context (e.g. "What is this?" where "this" is defined in previous conversation). Return the output as query used for next round user message. -user: +# user: EXAMPLE Conversation history: Human: I want to find the best restaurants nearby, could you recommend some? diff --git a/examples/flows/chat/chat-with-wikipedia/get_wiki_url.py b/examples/flows/chat/chat-with-wikipedia/get_wiki_url.py index e371fea6d17..a93287da12c 100644 --- a/examples/flows/chat/chat-with-wikipedia/get_wiki_url.py +++ b/examples/flows/chat/chat-with-wikipedia/get_wiki_url.py @@ -3,7 +3,7 @@ import bs4 import requests -from promptflow import tool +from promptflow.core import tool def decode_str(string): diff --git a/examples/flows/chat/chat-with-wikipedia/process_search_result.py b/examples/flows/chat/chat-with-wikipedia/process_search_result.py index 4248ac0f3c1..cf7d98b4195 100644 --- a/examples/flows/chat/chat-with-wikipedia/process_search_result.py +++ b/examples/flows/chat/chat-with-wikipedia/process_search_result.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/chat/chat-with-wikipedia/search_result_from_url.py b/examples/flows/chat/chat-with-wikipedia/search_result_from_url.py index b5344012788..920e0a7d0a5 100644 --- a/examples/flows/chat/chat-with-wikipedia/search_result_from_url.py +++ b/examples/flows/chat/chat-with-wikipedia/search_result_from_url.py @@ -6,7 +6,7 @@ import bs4 import requests -from promptflow import tool +from promptflow.core import tool session = requests.Session() diff --git a/examples/flows/chat/use_functions_with_chat_models/run_function.py b/examples/flows/chat/use_functions_with_chat_models/run_function.py index d1a97198b28..37029bf893a 100644 --- a/examples/flows/chat/use_functions_with_chat_models/run_function.py +++ b/examples/flows/chat/use_functions_with_chat_models/run_function.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import json diff --git a/examples/flows/chat/use_functions_with_chat_models/use_functions_with_chat_models.jinja2 b/examples/flows/chat/use_functions_with_chat_models/use_functions_with_chat_models.jinja2 index 05b4b43a2ac..86f8d8a79ec 100644 --- a/examples/flows/chat/use_functions_with_chat_models/use_functions_with_chat_models.jinja2 +++ b/examples/flows/chat/use_functions_with_chat_models/use_functions_with_chat_models.jinja2 @@ -1,27 +1,27 @@ -system: +# system: Don't make assumptions about what values to plug into functions. Ask for clarification if a user request is ambiguous. {% for item in chat_history %} -user: +# user: {{item.inputs.question}} {% if 'function_call' in item.outputs.llm_output %} -assistant: +# assistant: Function generation requested, function = {{item.outputs.llm_output.function_call.name}}, args = {{item.outputs.llm_output.function_call.arguments}} -function: -name: +# function: +## name: {{item.outputs.llm_output.function_call.name}} -content: +## content: {{item.outputs.answer}} {% else %} -assistant: +# assistant: {{item.outputs.llm_output}}}} {% endif %}} {% endfor %} -user: +# user: {{question}} \ No newline at end of file diff --git a/examples/flows/evaluation/eval-accuracy-maths-to-code/aggregate.py b/examples/flows/evaluation/eval-accuracy-maths-to-code/aggregate.py index ae265856ca4..d8f16d0ecc1 100644 --- a/examples/flows/evaluation/eval-accuracy-maths-to-code/aggregate.py +++ b/examples/flows/evaluation/eval-accuracy-maths-to-code/aggregate.py @@ -1,6 +1,6 @@ from typing import List -from promptflow import tool -from promptflow import log_metric +from promptflow.core import tool +from promptflow.core import log_metric @tool diff --git a/examples/flows/evaluation/eval-accuracy-maths-to-code/line_process.py b/examples/flows/evaluation/eval-accuracy-maths-to-code/line_process.py index a4d78553c95..4d2f701a09e 100644 --- a/examples/flows/evaluation/eval-accuracy-maths-to-code/line_process.py +++ b/examples/flows/evaluation/eval-accuracy-maths-to-code/line_process.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/evaluation/eval-basic/README.md b/examples/flows/evaluation/eval-basic/README.md index 163712cddc0..08a786bf0da 100644 --- a/examples/flows/evaluation/eval-basic/README.md +++ b/examples/flows/evaluation/eval-basic/README.md @@ -15,7 +15,7 @@ pip install -r requirements.txt In this flow, you will learn - how to compose a point based evaluation flow, where you can calculate point-wise metrics. -- the way to log metrics. use `from promptflow import log_metric` +- the way to log metrics. use `from promptflow.core import log_metric` - see file [aggregate](aggregate.py). ### 1. Test flow with single line data diff --git a/examples/flows/evaluation/eval-basic/aggregate.py b/examples/flows/evaluation/eval-basic/aggregate.py index 098a6bd89d9..7bc0df88d4d 100644 --- a/examples/flows/evaluation/eval-basic/aggregate.py +++ b/examples/flows/evaluation/eval-basic/aggregate.py @@ -1,6 +1,6 @@ from typing import List -from promptflow import tool +from promptflow.core import tool @tool @@ -18,7 +18,7 @@ def aggregate(processed_results: List[str]): print(processed_results) # Log metric for each variant - from promptflow import log_metric + from promptflow.core import log_metric log_metric(key="results_num", value=results_num) return results_num diff --git a/examples/flows/evaluation/eval-basic/line_process.py b/examples/flows/evaluation/eval-basic/line_process.py index e61befd9d50..34f029e1be6 100644 --- a/examples/flows/evaluation/eval-basic/line_process.py +++ b/examples/flows/evaluation/eval-basic/line_process.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/evaluation/eval-chat-math/aggregate.py b/examples/flows/evaluation/eval-chat-math/aggregate.py index 537fd66cf53..0e28e035a52 100644 --- a/examples/flows/evaluation/eval-chat-math/aggregate.py +++ b/examples/flows/evaluation/eval-chat-math/aggregate.py @@ -1,6 +1,6 @@ from typing import List -from promptflow import tool -from promptflow import log_metric +from promptflow.core import tool +from promptflow.core import log_metric @tool diff --git a/examples/flows/evaluation/eval-chat-math/line_process.py b/examples/flows/evaluation/eval-chat-math/line_process.py index 454049e91af..96a29760bdf 100644 --- a/examples/flows/evaluation/eval-chat-math/line_process.py +++ b/examples/flows/evaluation/eval-chat-math/line_process.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool def string_to_number(raw_string: str) -> float: diff --git a/examples/flows/evaluation/eval-classification-accuracy/README.md b/examples/flows/evaluation/eval-classification-accuracy/README.md index 517df33ea7a..5a6509e8e29 100644 --- a/examples/flows/evaluation/eval-classification-accuracy/README.md +++ b/examples/flows/evaluation/eval-classification-accuracy/README.md @@ -9,7 +9,7 @@ Tools used in this flow: In this flow, you will learn - how to compose a point based evaluation flow, where you can calculate point-wise metrics. -- the way to log metrics. use `from promptflow import log_metric` +- the way to log metrics. use `from promptflow.core import log_metric` - see file [calculate_accuracy.py](calculate_accuracy.py) ### 0. Setup connection diff --git a/examples/flows/evaluation/eval-classification-accuracy/calculate_accuracy.py b/examples/flows/evaluation/eval-classification-accuracy/calculate_accuracy.py index 35fbc75977b..4ed635bcd31 100644 --- a/examples/flows/evaluation/eval-classification-accuracy/calculate_accuracy.py +++ b/examples/flows/evaluation/eval-classification-accuracy/calculate_accuracy.py @@ -1,6 +1,6 @@ from typing import List -from promptflow import log_metric, tool +from promptflow.core import log_metric, tool @tool diff --git a/examples/flows/evaluation/eval-classification-accuracy/grade.py b/examples/flows/evaluation/eval-classification-accuracy/grade.py index 96a1106a048..62527ff2ec8 100644 --- a/examples/flows/evaluation/eval-classification-accuracy/grade.py +++ b/examples/flows/evaluation/eval-classification-accuracy/grade.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/evaluation/eval-entity-match-rate/cleansing.py b/examples/flows/evaluation/eval-entity-match-rate/cleansing.py index a017d7f1ab9..31ffea06b98 100644 --- a/examples/flows/evaluation/eval-entity-match-rate/cleansing.py +++ b/examples/flows/evaluation/eval-entity-match-rate/cleansing.py @@ -1,5 +1,5 @@ from typing import List -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/evaluation/eval-entity-match-rate/log_metrics.py b/examples/flows/evaluation/eval-entity-match-rate/log_metrics.py index bf45cca8b31..896ff8d38fd 100644 --- a/examples/flows/evaluation/eval-entity-match-rate/log_metrics.py +++ b/examples/flows/evaluation/eval-entity-match-rate/log_metrics.py @@ -1,6 +1,6 @@ -from promptflow import tool +from promptflow.core import tool from typing import List -from promptflow import log_metric +from promptflow.core import log_metric # The inputs section will change based on the arguments of the tool function, after you save the code # Adding type to arguments and return value will help the system show the types properly diff --git a/examples/flows/evaluation/eval-entity-match-rate/match.py b/examples/flows/evaluation/eval-entity-match-rate/match.py index ae7dc993130..a948a9018be 100644 --- a/examples/flows/evaluation/eval-entity-match-rate/match.py +++ b/examples/flows/evaluation/eval-entity-match-rate/match.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from typing import List diff --git a/examples/flows/evaluation/eval-groundedness/aggregate.py b/examples/flows/evaluation/eval-groundedness/aggregate.py index 7ca1c8b04c1..ad565a458cf 100644 --- a/examples/flows/evaluation/eval-groundedness/aggregate.py +++ b/examples/flows/evaluation/eval-groundedness/aggregate.py @@ -1,5 +1,5 @@ from typing import List -from promptflow import tool +from promptflow.core import tool @tool @@ -23,7 +23,7 @@ def aggregate(groundedness_scores: List[float]): aggregated_results["groundedness"] /= aggregated_results["count"] # Log metric for each variant - from promptflow import log_metric + from promptflow.core import log_metric log_metric(key="groundedness", value=aggregated_results["groundedness"]) diff --git a/examples/flows/evaluation/eval-groundedness/calc_groundedness.py b/examples/flows/evaluation/eval-groundedness/calc_groundedness.py index 0375ad65729..020d19d7520 100644 --- a/examples/flows/evaluation/eval-groundedness/calc_groundedness.py +++ b/examples/flows/evaluation/eval-groundedness/calc_groundedness.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import re diff --git a/examples/flows/evaluation/eval-groundedness/gpt_groundedness.md b/examples/flows/evaluation/eval-groundedness/gpt_groundedness.md index b72f45b0e46..ff730f346ce 100644 --- a/examples/flows/evaluation/eval-groundedness/gpt_groundedness.md +++ b/examples/flows/evaluation/eval-groundedness/gpt_groundedness.md @@ -1,4 +1,4 @@ -user: +# user: # Instructions * There are many chatbots that can answer users questions based on the context given from different sources like search results, or snippets from books/papers. They try to understand users's question and then get context by either performing search from search engines, databases or books/papers for relevant content. Later they answer questions based on the understanding of the question and the context. @@ -7,7 +7,7 @@ user: * Score 1 if the answer is stating things that none of them present in the given context * If there're multiple facts in the answer and some of them present in the given context while some of them not, score between 1 to 10 based on fraction of information supported by context * Just respond with the score, nothing else. - + # Real work ## Question diff --git a/examples/flows/evaluation/eval-perceived-intelligence/aggregate.py b/examples/flows/evaluation/eval-perceived-intelligence/aggregate.py index a73f3f29845..60e1cfc1d1e 100644 --- a/examples/flows/evaluation/eval-perceived-intelligence/aggregate.py +++ b/examples/flows/evaluation/eval-perceived-intelligence/aggregate.py @@ -1,5 +1,5 @@ from typing import List -from promptflow import tool +from promptflow.core import tool @tool @@ -14,7 +14,7 @@ def aggregate(perceived_intelligence_score: List[float]): aggregated_results["perceived_intelligence_score"] /= aggregated_results["count"] # Log metric for each variant - from promptflow import log_metric + from promptflow.core import log_metric log_metric(key="perceived_intelligence_score", value=aggregated_results["perceived_intelligence_score"]) diff --git a/examples/flows/evaluation/eval-perceived-intelligence/gpt_perceived_intelligence.md b/examples/flows/evaluation/eval-perceived-intelligence/gpt_perceived_intelligence.md index d9f7c836ab0..8b1e73e4091 100644 --- a/examples/flows/evaluation/eval-perceived-intelligence/gpt_perceived_intelligence.md +++ b/examples/flows/evaluation/eval-perceived-intelligence/gpt_perceived_intelligence.md @@ -1,4 +1,4 @@ -user: +# user: # Instructions * There are many chatbots that can answer users questions based on the context given from different sources like search results, or snippets from books/papers. They try to understand users's question and then get context by either performing search from search engines, databases or books/papers for relevant content. Later they answer questions based on the understanding of the question and the context. @@ -8,7 +8,7 @@ user: * Score 1 means the answer is poor for perceived intelligence * Score 5 means the answer is normal for perceived intelligence * Just respond with the score, nothing else. - + # Real work ## Question diff --git a/examples/flows/evaluation/eval-perceived-intelligence/parse_score.py b/examples/flows/evaluation/eval-perceived-intelligence/parse_score.py index 0375ad65729..020d19d7520 100644 --- a/examples/flows/evaluation/eval-perceived-intelligence/parse_score.py +++ b/examples/flows/evaluation/eval-perceived-intelligence/parse_score.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import re diff --git a/examples/flows/evaluation/eval-qna-non-rag/ada_cosine_similarity_score.py b/examples/flows/evaluation/eval-qna-non-rag/ada_cosine_similarity_score.py index ed1aa87f2d2..5d584365f9a 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/ada_cosine_similarity_score.py +++ b/examples/flows/evaluation/eval-qna-non-rag/ada_cosine_similarity_score.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import numpy as np from numpy.linalg import norm diff --git a/examples/flows/evaluation/eval-qna-non-rag/aggregate_variants_results.py b/examples/flows/evaluation/eval-qna-non-rag/aggregate_variants_results.py index 3b0973f2f1d..0eef04a5ea3 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/aggregate_variants_results.py +++ b/examples/flows/evaluation/eval-qna-non-rag/aggregate_variants_results.py @@ -1,5 +1,5 @@ from typing import List -from promptflow import tool, log_metric +from promptflow.core import tool, log_metric import numpy as np diff --git a/examples/flows/evaluation/eval-qna-non-rag/concat_scores.py b/examples/flows/evaluation/eval-qna-non-rag/concat_scores.py index 94a90846bf1..8238672570a 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/concat_scores.py +++ b/examples/flows/evaluation/eval-qna-non-rag/concat_scores.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import numpy as np import re diff --git a/examples/flows/evaluation/eval-qna-non-rag/f1_score.py b/examples/flows/evaluation/eval-qna-non-rag/f1_score.py index 8f7ce449980..4b3d17f5fd9 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/f1_score.py +++ b/examples/flows/evaluation/eval-qna-non-rag/f1_score.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from collections import Counter diff --git a/examples/flows/evaluation/eval-qna-non-rag/gpt_coherence_prompt.jinja2 b/examples/flows/evaluation/eval-qna-non-rag/gpt_coherence_prompt.jinja2 index be2ddcc43fd..92b3894e857 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/gpt_coherence_prompt.jinja2 +++ b/examples/flows/evaluation/eval-qna-non-rag/gpt_coherence_prompt.jinja2 @@ -1,7 +1,7 @@ -system: +# system: You are an AI assistant. You will be given the definition of an evaluation metric for assessing the quality of an answer in a question-answering task. Your job is to compute an accurate evaluation score using the provided evaluation metric. -user: +# user: Coherence of an answer is measured by how well all the sentences fit together and sound naturally as a whole. Consider the overall quality of the answer when evaluating coherence. Given the question and answer, score the coherence of answer between one to five stars using the following rating scale: One star: the answer completely lacks coherence Two stars: the answer mostly lacks coherence diff --git a/examples/flows/evaluation/eval-qna-non-rag/gpt_fluency_prompt.jinja2 b/examples/flows/evaluation/eval-qna-non-rag/gpt_fluency_prompt.jinja2 index 5d08093f9d6..3fb8df41d52 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/gpt_fluency_prompt.jinja2 +++ b/examples/flows/evaluation/eval-qna-non-rag/gpt_fluency_prompt.jinja2 @@ -1,6 +1,6 @@ -system: +# system: You are an AI assistant. You will be given the definition of an evaluation metric for assessing the quality of an answer in a question-answering task. Your job is to compute an accurate evaluation score using the provided evaluation metric. -user: +# user: Fluency measures the quality of individual sentences in the answer, and whether they are well-written and grammatically correct. Consider the quality of individual sentences when evaluating fluency. Given the question and answer, score the fluency of the answer between one to five stars using the following rating scale: One star: the answer completely lacks fluency Two stars: the answer mostly lacks fluency diff --git a/examples/flows/evaluation/eval-qna-non-rag/gpt_groundedness_prompt.jinja2 b/examples/flows/evaluation/eval-qna-non-rag/gpt_groundedness_prompt.jinja2 index 0122ede248d..ae367ff6c61 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/gpt_groundedness_prompt.jinja2 +++ b/examples/flows/evaluation/eval-qna-non-rag/gpt_groundedness_prompt.jinja2 @@ -1,6 +1,6 @@ -system: +# system: You are an AI assistant. You will be given the definition of an evaluation metric for assessing the quality of an answer in a question-answering task. Your job is to compute an accurate evaluation score using the provided evaluation metric. -user: +# user: You will be presented with a CONTEXT and an ANSWER about that CONTEXT. You need to decide whether the ANSWER is entailed by the CONTEXT by choosing one of the following rating: 1. 5: The ANSWER follows logically from the information contained in the CONTEXT. 2. 1: The ANSWER is logically false from the information contained in the CONTEXT. diff --git a/examples/flows/evaluation/eval-qna-non-rag/gpt_relevance_prompt.jinja2 b/examples/flows/evaluation/eval-qna-non-rag/gpt_relevance_prompt.jinja2 index 7d3f874cfc6..ffdc56effa0 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/gpt_relevance_prompt.jinja2 +++ b/examples/flows/evaluation/eval-qna-non-rag/gpt_relevance_prompt.jinja2 @@ -1,6 +1,6 @@ -system: +# system: You are an AI assistant. You will be given the definition of an evaluation metric for assessing the quality of an answer in a question-answering task. Your job is to compute an accurate evaluation score using the provided evaluation metric. -user: +# user: Relevance measures how well the answer addresses the main aspects of the question, based on the context. Consider whether all and only the important aspects are contained in the answer when evaluating relevance. Given the context and question, score the relevance of the answer between one to five stars using the following rating scale: One star: the answer completely lacks relevance Two stars: the answer mostly lacks relevance diff --git a/examples/flows/evaluation/eval-qna-non-rag/gpt_similarity_prompt.jinja2 b/examples/flows/evaluation/eval-qna-non-rag/gpt_similarity_prompt.jinja2 index a2f4059a3de..3ee08d310db 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/gpt_similarity_prompt.jinja2 +++ b/examples/flows/evaluation/eval-qna-non-rag/gpt_similarity_prompt.jinja2 @@ -1,6 +1,6 @@ -system: +# system: You are an AI assistant. You will be given the definition of an evaluation metric for assessing the quality of an answer in a question-answering task. Your job is to compute an accurate evaluation score using the provided evaluation metric. -user: +# user: Equivalence, as a metric, measures the similarity between the predicted answer and the correct answer. If the information and content in the predicted answer is similar or equivalent to the correct answer, then the value of the Equivalence metric should be high, else it should be low. Given the question, correct answer, and predicted answer, determine the value of Equivalence metric using the following rating scale: One star: the predicted answer is not at all similar to the correct answer Two stars: the predicted answer is mostly not similar to the correct answer diff --git a/examples/flows/evaluation/eval-qna-non-rag/select_metrics.py b/examples/flows/evaluation/eval-qna-non-rag/select_metrics.py index 0a2db17d8de..2fcb853aed2 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/select_metrics.py +++ b/examples/flows/evaluation/eval-qna-non-rag/select_metrics.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/evaluation/eval-qna-non-rag/validate_input.py b/examples/flows/evaluation/eval-qna-non-rag/validate_input.py index 02702bb1c51..1f6e15296e4 100644 --- a/examples/flows/evaluation/eval-qna-non-rag/validate_input.py +++ b/examples/flows/evaluation/eval-qna-non-rag/validate_input.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/aggregate_variants_results.py b/examples/flows/evaluation/eval-qna-rag-metrics/aggregate_variants_results.py index fcff09f5ae7..19d7cd848df 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/aggregate_variants_results.py +++ b/examples/flows/evaluation/eval-qna-rag-metrics/aggregate_variants_results.py @@ -1,5 +1,5 @@ from typing import List -from promptflow import tool, log_metric +from promptflow.core import tool, log_metric import numpy as np diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/concat_scores.py b/examples/flows/evaluation/eval-qna-rag-metrics/concat_scores.py index 955c835116d..f15b4fba8df 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/concat_scores.py +++ b/examples/flows/evaluation/eval-qna-rag-metrics/concat_scores.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import numpy as np diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/parse_generation_score.py b/examples/flows/evaluation/eval-qna-rag-metrics/parse_generation_score.py index bbddf346c42..1be541f89a7 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/parse_generation_score.py +++ b/examples/flows/evaluation/eval-qna-rag-metrics/parse_generation_score.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import re diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/parse_groundedness_score.py b/examples/flows/evaluation/eval-qna-rag-metrics/parse_groundedness_score.py index bbcc4d455d9..bdd0ba53c9d 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/parse_groundedness_score.py +++ b/examples/flows/evaluation/eval-qna-rag-metrics/parse_groundedness_score.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import re diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/parse_retrival_score.py b/examples/flows/evaluation/eval-qna-rag-metrics/parse_retrival_score.py index ec8f084b9a9..e9e362ecffe 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/parse_retrival_score.py +++ b/examples/flows/evaluation/eval-qna-rag-metrics/parse_retrival_score.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import re diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/rag_generation_prompt.jinja2 b/examples/flows/evaluation/eval-qna-rag-metrics/rag_generation_prompt.jinja2 index 4c332a332cc..e876cf6891c 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/rag_generation_prompt.jinja2 +++ b/examples/flows/evaluation/eval-qna-rag-metrics/rag_generation_prompt.jinja2 @@ -1,4 +1,4 @@ -system: +# system: You will be provided a question, a conversation history, fetched documents related to the question and a response to the question in the domain. You task is to evaluate the quality of the provided response by following the steps below: - Understand the context of the question based on the conversation history. - Generate a reference answer that is only based on the conversation history, question, and fetched documents. Don't generate the reference answer based on your own knowledge. @@ -10,7 +10,7 @@ You will be provided a question, a conversation history, fetched documents relat - 1 - Completely Irrelevant: The provided response should never be used for answering this question based on the reference answer and conversation history. - You need to rate the provided response to be 5, if the reference answer can not be generated since no relevant documents were retrieved. - You need to first provide a scoring reason for the evaluation according to the above criteria, and then provide a score for the quality of the provided response. -- You need to translate the provided response into English if it's in another language. +- You need to translate the provided response into English if it's in another language. - Your final response must include both the reference answer and the evaluation result. The evaluation result should be written in English. Your response should be in the following format: ``` [assistant](#evaluation result) @@ -26,7 +26,7 @@ Quality score: [insert score here]/5 ``` - Your answer must end with <|im_end|>. -user: +# user: #conversation history #question @@ -36,6 +36,6 @@ user: #provided response {{answer}} -assistant: +# assistant: #evaluation result """ \ No newline at end of file diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/rag_groundedness_prompt.jinja2 b/examples/flows/evaluation/eval-qna-rag-metrics/rag_groundedness_prompt.jinja2 index 34ac60a92c5..a0c6ce3a9f2 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/rag_groundedness_prompt.jinja2 +++ b/examples/flows/evaluation/eval-qna-rag-metrics/rag_groundedness_prompt.jinja2 @@ -1,15 +1,15 @@ -system: +# system: You are a helpful assistant. -user: +# user: Your task is to check and rate if factual information in chatbot's reply is all grounded to retrieved documents. -You will be given a question, chatbot's response to the question, a chat history between this chatbot and human, and a list of retrieved documents in json format. +You will be given a question, chatbot's response to the question, a chat history between this chatbot and human, and a list of retrieved documents in json format. The chatbot must base its response exclusively on factual information extracted from the retrieved documents, utilizing paraphrasing, summarization, or inference techniques. When the chatbot responds to information that is not mentioned in or cannot be inferred from the retrieved documents, we refer to it as a grounded issue. To rate the groundness of chat response, follow the below steps: 1. Review the chat history to understand better about the question and chat response -2. Look for all the factual information in chatbot's response -3. Compare the factual information in chatbot's response with the retrieved documents. Check if there are any facts that are not in the retrieved documents at all,or that contradict or distort the facts in the retrieved documents. If there are, write them down. If there are none, leave it blank. Note that some facts may be implied or suggested by the retrieved documents, but not explicitly stated. In that case, use your best judgment to decide if the fact is grounded or not. - For example, if the retrieved documents mention that a film was nominated for 12 awards, and chatbot's reply states the same, you can consider that fact as grounded, as it is directly taken from the retrieved documents. +2. Look for all the factual information in chatbot's response +3. Compare the factual information in chatbot's response with the retrieved documents. Check if there are any facts that are not in the retrieved documents at all,or that contradict or distort the facts in the retrieved documents. If there are, write them down. If there are none, leave it blank. Note that some facts may be implied or suggested by the retrieved documents, but not explicitly stated. In that case, use your best judgment to decide if the fact is grounded or not. + For example, if the retrieved documents mention that a film was nominated for 12 awards, and chatbot's reply states the same, you can consider that fact as grounded, as it is directly taken from the retrieved documents. However, if the retrieved documents do not mention the film won any awards at all, and chatbot reply states that the film won some awards, you should consider that fact as not grounded. 4. Rate how well grounded the chatbot response is on a Likert scale from 1 to 5 judging if chatbot response has no ungrounded facts. (higher better) 5: agree strongly @@ -17,8 +17,8 @@ To rate the groundness of chat response, follow the below steps: 3: neither agree or disagree 2: disagree 1: disagree strongly - If the chatbot response used information from outside sources, or made claims that are not backed up by the retrieved documents, give it a low score. -5. Your answer should follow the format: + If the chatbot response used information from outside sources, or made claims that are not backed up by the retrieved documents, give it a low score. +5. Your answer should follow the format: [insert reasoning here] Your answer must end with . diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/rag_retrieval_prompt.jinja2 b/examples/flows/evaluation/eval-qna-rag-metrics/rag_retrieval_prompt.jinja2 index 640b42e407c..72c8ef52170 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/rag_retrieval_prompt.jinja2 +++ b/examples/flows/evaluation/eval-qna-rag-metrics/rag_retrieval_prompt.jinja2 @@ -1,16 +1,16 @@ -system: +# system: You are a helpful assistant. -user: +# user: A chat history between user and bot is shown below -A list of documents is shown below in json format, and each document has one unique id. +A list of documents is shown below in json format, and each document has one unique id. These listed documents are used as contex to answer the given question. -The task is to score the relevance between the documents and the potential answer to the given question in the range of 1 to 5. +The task is to score the relevance between the documents and the potential answer to the given question in the range of 1 to 5. 1 means none of the documents is relevant to the question at all. 5 means either one of the document or combination of a few documents is ideal for answering the given question. Think through step by step: - Summarize each given document first -- Determine the underlying intent of the given question, when the question is ambiguous, refer to the given chat history -- Measure how suitable each document to the given question, list the document id and the corresponding relevance score. -- Summarize the overall relevance of given list of documents to the given question after # Overall Reason, note that the answer to the question can solely from single document or a combination of multiple documents. +- Determine the underlying intent of the given question, when the question is ambiguous, refer to the given chat history +- Measure how suitable each document to the given question, list the document id and the corresponding relevance score. +- Summarize the overall relevance of given list of documents to the given question after # Overall Reason, note that the answer to the question can solely from single document or a combination of multiple documents. - Finally, output "# Result" followed by a score from 1 to 5. # Question diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/select_metrics.py b/examples/flows/evaluation/eval-qna-rag-metrics/select_metrics.py index 29702208831..9aa3a44605d 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/select_metrics.py +++ b/examples/flows/evaluation/eval-qna-rag-metrics/select_metrics.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/evaluation/eval-qna-rag-metrics/validate_input.py b/examples/flows/evaluation/eval-qna-rag-metrics/validate_input.py index 66ec5774edd..796a9eec03a 100644 --- a/examples/flows/evaluation/eval-qna-rag-metrics/validate_input.py +++ b/examples/flows/evaluation/eval-qna-rag-metrics/validate_input.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool def is_valid(input_item): diff --git a/examples/flows/evaluation/eval-summarization/average_scores.py b/examples/flows/evaluation/eval-summarization/average_scores.py index e10b4bd8a93..16c59b5528a 100644 --- a/examples/flows/evaluation/eval-summarization/average_scores.py +++ b/examples/flows/evaluation/eval-summarization/average_scores.py @@ -1,6 +1,6 @@ from typing import Dict, List -from promptflow import log_metric, tool +from promptflow.core import log_metric, tool @tool diff --git a/examples/flows/evaluation/eval-summarization/data.jsonl b/examples/flows/evaluation/eval-summarization/data.jsonl index 07d5faea353..26e87cf4fa8 100644 --- a/examples/flows/evaluation/eval-summarization/data.jsonl +++ b/examples/flows/evaluation/eval-summarization/data.jsonl @@ -1,2 +1,2 @@ -{"document": "this is a test document", "summary": "test document"} -{"document": "this is a test document2", "summary": "test document2"} +{"document": "this is a test document", "summary": "test document"} +{"document": "this is a test document2", "summary": "test document2"} diff --git a/examples/flows/evaluation/eval-summarization/flow.dag.yaml b/examples/flows/evaluation/eval-summarization/flow.dag.yaml index b5cd0dd93e6..1a98cb33404 100644 --- a/examples/flows/evaluation/eval-summarization/flow.dag.yaml +++ b/examples/flows/evaluation/eval-summarization/flow.dag.yaml @@ -1,104 +1,104 @@ -$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json -environment: - python_requirements_txt: requirements.txt -inputs: - document: - type: string - summary: - type: string -outputs: - coherence: - type: double - reference: ${score_coherence.output} - consistency: - type: double - reference: ${score_consistency.output} - fluency: - type: double - reference: ${score_fluency.output} - relevance: - type: double - reference: ${score_relevance.output} -nodes: -- name: prompt_coherence - type: prompt - source: - type: code - path: prompts/coherence.jinja2 - inputs: - Document: ${inputs.document} - Summary: ${inputs.summary} -- name: score_coherence - type: python - source: - type: code - path: geval.py - inputs: - connection: open_ai_connection - prompt_with_src_and_gen: ${prompt_coherence.output} - max_score: 5 - deployment_name: gpt-4 -- name: prompt_consistency - type: prompt - source: - type: code - path: prompts/consistency.jinja2 - inputs: - Document: ${inputs.document} - Summary: ${inputs.summary} -- name: score_consistency - type: python - source: - type: code - path: geval.py - inputs: - connection: open_ai_connection - prompt_with_src_and_gen: ${prompt_consistency.output} - max_score: 5 - deployment_name: gpt-4 -- name: prompt_fluency - type: prompt - source: - type: code - path: prompts/fluency.jinja2 - inputs: - Summary: ${inputs.summary} -- name: score_fluency - type: python - source: - type: code - path: geval.py - inputs: - connection: open_ai_connection - prompt_with_src_and_gen: ${prompt_fluency.output} - max_score: 3 - deployment_name: gpt-4 -- name: prompt_relevance - type: prompt - source: - type: code - path: prompts/relevance.jinja2 - inputs: - Document: ${inputs.document} - Summary: ${inputs.summary} -- name: score_relevance - type: python - source: - type: code - path: geval.py - inputs: - connection: open_ai_connection - prompt_with_src_and_gen: ${prompt_relevance.output} - max_score: 5 - deployment_name: gpt-4 -- name: average_scores - type: python - source: - type: code - path: average_scores.py - inputs: - fluency_list: ${score_fluency.output} - consistency_list: ${score_consistency.output} - relevance_list: ${score_relevance.output} - coherence_list: ${score_coherence.output} - aggregation: true +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json +environment: + python_requirements_txt: requirements.txt +inputs: + document: + type: string + summary: + type: string +outputs: + coherence: + type: double + reference: ${score_coherence.output} + consistency: + type: double + reference: ${score_consistency.output} + fluency: + type: double + reference: ${score_fluency.output} + relevance: + type: double + reference: ${score_relevance.output} +nodes: +- name: prompt_coherence + type: prompt + source: + type: code + path: prompts/coherence.jinja2 + inputs: + Document: ${inputs.document} + Summary: ${inputs.summary} +- name: score_coherence + type: python + source: + type: code + path: geval.py + inputs: + connection: open_ai_connection + prompt_with_src_and_gen: ${prompt_coherence.output} + max_score: 5 + deployment_name: gpt-4 +- name: prompt_consistency + type: prompt + source: + type: code + path: prompts/consistency.jinja2 + inputs: + Document: ${inputs.document} + Summary: ${inputs.summary} +- name: score_consistency + type: python + source: + type: code + path: geval.py + inputs: + connection: open_ai_connection + prompt_with_src_and_gen: ${prompt_consistency.output} + max_score: 5 + deployment_name: gpt-4 +- name: prompt_fluency + type: prompt + source: + type: code + path: prompts/fluency.jinja2 + inputs: + Summary: ${inputs.summary} +- name: score_fluency + type: python + source: + type: code + path: geval.py + inputs: + connection: open_ai_connection + prompt_with_src_and_gen: ${prompt_fluency.output} + max_score: 3 + deployment_name: gpt-4 +- name: prompt_relevance + type: prompt + source: + type: code + path: prompts/relevance.jinja2 + inputs: + Document: ${inputs.document} + Summary: ${inputs.summary} +- name: score_relevance + type: python + source: + type: code + path: geval.py + inputs: + connection: open_ai_connection + prompt_with_src_and_gen: ${prompt_relevance.output} + max_score: 5 + deployment_name: gpt-4 +- name: average_scores + type: python + source: + type: code + path: average_scores.py + inputs: + fluency_list: ${score_fluency.output} + consistency_list: ${score_consistency.output} + relevance_list: ${score_relevance.output} + coherence_list: ${score_coherence.output} + aggregation: true diff --git a/examples/flows/integrations/azure-ai-language/analyze_documents/create_document.py b/examples/flows/integrations/azure-ai-language/analyze_documents/create_document.py index d891b1c4a96..7728ec39788 100644 --- a/examples/flows/integrations/azure-ai-language/analyze_documents/create_document.py +++ b/examples/flows/integrations/azure-ai-language/analyze_documents/create_document.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/integrations/azure-ai-language/analyze_documents/parse_skill_to_text.py b/examples/flows/integrations/azure-ai-language/analyze_documents/parse_skill_to_text.py index 7bf7d4e1c3a..acc7d2d6df9 100644 --- a/examples/flows/integrations/azure-ai-language/analyze_documents/parse_skill_to_text.py +++ b/examples/flows/integrations/azure-ai-language/analyze_documents/parse_skill_to_text.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/integrations/azure-ai-language/analyze_documents/read_file.py b/examples/flows/integrations/azure-ai-language/analyze_documents/read_file.py index 18a73b32042..da4b58089c7 100644 --- a/examples/flows/integrations/azure-ai-language/analyze_documents/read_file.py +++ b/examples/flows/integrations/azure-ai-language/analyze_documents/read_file.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/integrations/azure-ai-language/analyze_meetings/create_conversation.py b/examples/flows/integrations/azure-ai-language/analyze_meetings/create_conversation.py index fdd2b8dd730..44449e40f30 100644 --- a/examples/flows/integrations/azure-ai-language/analyze_meetings/create_conversation.py +++ b/examples/flows/integrations/azure-ai-language/analyze_meetings/create_conversation.py @@ -1,5 +1,5 @@ from enum import Enum -from promptflow import tool +from promptflow.core import tool class ConversationModality(str, Enum): diff --git a/examples/flows/integrations/azure-ai-language/analyze_meetings/create_document.py b/examples/flows/integrations/azure-ai-language/analyze_meetings/create_document.py index d891b1c4a96..7728ec39788 100644 --- a/examples/flows/integrations/azure-ai-language/analyze_meetings/create_document.py +++ b/examples/flows/integrations/azure-ai-language/analyze_meetings/create_document.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/integrations/azure-ai-language/analyze_meetings/create_redacted_conversation.py b/examples/flows/integrations/azure-ai-language/analyze_meetings/create_redacted_conversation.py index 283bfa28eb3..b63605d26cd 100644 --- a/examples/flows/integrations/azure-ai-language/analyze_meetings/create_redacted_conversation.py +++ b/examples/flows/integrations/azure-ai-language/analyze_meetings/create_redacted_conversation.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/integrations/azure-ai-language/analyze_meetings/extract_language_code.py b/examples/flows/integrations/azure-ai-language/analyze_meetings/extract_language_code.py index 768cd1d1f28..ca17572dc37 100644 --- a/examples/flows/integrations/azure-ai-language/analyze_meetings/extract_language_code.py +++ b/examples/flows/integrations/azure-ai-language/analyze_meetings/extract_language_code.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/integrations/azure-ai-language/analyze_meetings/read_file.py b/examples/flows/integrations/azure-ai-language/analyze_meetings/read_file.py index 18a73b32042..da4b58089c7 100644 --- a/examples/flows/integrations/azure-ai-language/analyze_meetings/read_file.py +++ b/examples/flows/integrations/azure-ai-language/analyze_meetings/read_file.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/integrations/azure-ai-language/multi_intent_conversational_language_understanding/chat.jinja2 b/examples/flows/integrations/azure-ai-language/multi_intent_conversational_language_understanding/chat.jinja2 index 88f82843980..449f8ddc352 100644 --- a/examples/flows/integrations/azure-ai-language/multi_intent_conversational_language_understanding/chat.jinja2 +++ b/examples/flows/integrations/azure-ai-language/multi_intent_conversational_language_understanding/chat.jinja2 @@ -1,13 +1,13 @@ -system: +# system: Your task is to break down compound sentences into separate sentences. For simple sentences just repeat the user input. Remember to use a json array for the output. -user: +# user: The output must be a json array. Here are a few examples: -user input: Play Eric Clapton and turn down the volume. +user input: Play Eric Clapton and turn down the volume. OUTPUT: ["Play Eric Clapton.","Turn down the volume."] user input: Play some Pink Floyd diff --git a/examples/flows/standard/autonomous-agent/autogpt_easy_start.py b/examples/flows/standard/autonomous-agent/autogpt_easy_start.py index 945b714954e..04bc1c1fae0 100644 --- a/examples/flows/standard/autonomous-agent/autogpt_easy_start.py +++ b/examples/flows/standard/autonomous-agent/autogpt_easy_start.py @@ -1,6 +1,6 @@ from typing import Union -from promptflow import tool +from promptflow.core import tool from promptflow.connections import AzureOpenAIConnection, OpenAIConnection diff --git a/examples/flows/standard/autonomous-agent/functions.py b/examples/flows/standard/autonomous-agent/functions.py index 33eb276f777..2893c67d8c1 100644 --- a/examples/flows/standard/autonomous-agent/functions.py +++ b/examples/flows/standard/autonomous-agent/functions.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/autonomous-agent/generate_goal.py b/examples/flows/standard/autonomous-agent/generate_goal.py index 0cff4a431bf..5c3c04005cd 100644 --- a/examples/flows/standard/autonomous-agent/generate_goal.py +++ b/examples/flows/standard/autonomous-agent/generate_goal.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/basic-with-builtin-llm/hello.jinja2 b/examples/flows/standard/basic-with-builtin-llm/hello.jinja2 index e697120d02f..1b80ed3fb6f 100644 --- a/examples/flows/standard/basic-with-builtin-llm/hello.jinja2 +++ b/examples/flows/standard/basic-with-builtin-llm/hello.jinja2 @@ -1,5 +1,5 @@ -system: +# system: You are a assistant which can write code. Response should only contain code. -user: +# user: Write a simple {{text}} program that displays the greeting message. \ No newline at end of file diff --git a/examples/flows/standard/basic-with-connection/hello.py b/examples/flows/standard/basic-with-connection/hello.py index 246c77af520..dce6f5768ab 100644 --- a/examples/flows/standard/basic-with-connection/hello.py +++ b/examples/flows/standard/basic-with-connection/hello.py @@ -1,7 +1,7 @@ from typing import Union from openai.version import VERSION as OPENAI_VERSION -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomConnection, AzureOpenAIConnection # The inputs section will change based on the arguments of the tool function, after you save the code diff --git a/examples/flows/standard/basic/hello.py b/examples/flows/standard/basic/hello.py index 07da0d31c1a..74d95785d0a 100644 --- a/examples/flows/standard/basic/hello.py +++ b/examples/flows/standard/basic/hello.py @@ -2,7 +2,7 @@ from openai.version import VERSION as OPENAI_VERSION from dotenv import load_dotenv -from promptflow import tool +from promptflow.core import tool # The inputs section will change based on the arguments of the tool function, after you save the code # Adding type to arguments and return value will help the system show the types properly diff --git a/examples/flows/standard/conditional-flow-for-if-else/content_safety_check.py b/examples/flows/standard/conditional-flow-for-if-else/content_safety_check.py index 79516e69fab..0dd223dcf8e 100644 --- a/examples/flows/standard/conditional-flow-for-if-else/content_safety_check.py +++ b/examples/flows/standard/conditional-flow-for-if-else/content_safety_check.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import random diff --git a/examples/flows/standard/conditional-flow-for-if-else/default_result.py b/examples/flows/standard/conditional-flow-for-if-else/default_result.py index a4b547f337b..d892db77e69 100644 --- a/examples/flows/standard/conditional-flow-for-if-else/default_result.py +++ b/examples/flows/standard/conditional-flow-for-if-else/default_result.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/conditional-flow-for-if-else/generate_result.py b/examples/flows/standard/conditional-flow-for-if-else/generate_result.py index c238605bc22..872217f6807 100644 --- a/examples/flows/standard/conditional-flow-for-if-else/generate_result.py +++ b/examples/flows/standard/conditional-flow-for-if-else/generate_result.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/conditional-flow-for-if-else/llm_result.py b/examples/flows/standard/conditional-flow-for-if-else/llm_result.py index 82b1910cc9e..d1624bb5e0e 100644 --- a/examples/flows/standard/conditional-flow-for-if-else/llm_result.py +++ b/examples/flows/standard/conditional-flow-for-if-else/llm_result.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/conditional-flow-for-switch/class_check.py b/examples/flows/standard/conditional-flow-for-switch/class_check.py index 6cd08108575..da253db5304 100644 --- a/examples/flows/standard/conditional-flow-for-switch/class_check.py +++ b/examples/flows/standard/conditional-flow-for-switch/class_check.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/conditional-flow-for-switch/classify_with_llm.jinja2 b/examples/flows/standard/conditional-flow-for-switch/classify_with_llm.jinja2 index 6bcf164794f..dbbaf049b3d 100644 --- a/examples/flows/standard/conditional-flow-for-switch/classify_with_llm.jinja2 +++ b/examples/flows/standard/conditional-flow-for-switch/classify_with_llm.jinja2 @@ -1,4 +1,4 @@ -system: +# system: There is a search bar in the mall APP and users can enter any query in the search bar. The user may want to search for orders, view product information, or seek recommended products. @@ -7,5 +7,5 @@ Therefore, please classify user intentions into the following three types accord Please note that only the above three situations can be returned, and try not to include other return values. -user: +# user: The user's query is {{query}} \ No newline at end of file diff --git a/examples/flows/standard/conditional-flow-for-switch/generate_response.py b/examples/flows/standard/conditional-flow-for-switch/generate_response.py index ed20a46e0ce..f2ae7b4469d 100644 --- a/examples/flows/standard/conditional-flow-for-switch/generate_response.py +++ b/examples/flows/standard/conditional-flow-for-switch/generate_response.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/conditional-flow-for-switch/order_search.py b/examples/flows/standard/conditional-flow-for-switch/order_search.py index f4cb3b8030d..d910bf8ed7a 100644 --- a/examples/flows/standard/conditional-flow-for-switch/order_search.py +++ b/examples/flows/standard/conditional-flow-for-switch/order_search.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/conditional-flow-for-switch/product_info.py b/examples/flows/standard/conditional-flow-for-switch/product_info.py index 0f4a879a0e2..f18b5557eaa 100644 --- a/examples/flows/standard/conditional-flow-for-switch/product_info.py +++ b/examples/flows/standard/conditional-flow-for-switch/product_info.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/conditional-flow-for-switch/product_recommendation.py b/examples/flows/standard/conditional-flow-for-switch/product_recommendation.py index 8ee53314ca6..a38cb0f5398 100644 --- a/examples/flows/standard/conditional-flow-for-switch/product_recommendation.py +++ b/examples/flows/standard/conditional-flow-for-switch/product_recommendation.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/customer-intent-extraction/extract_intent_tool.py b/examples/flows/standard/customer-intent-extraction/extract_intent_tool.py index ec71f45ec5d..218517989de 100644 --- a/examples/flows/standard/customer-intent-extraction/extract_intent_tool.py +++ b/examples/flows/standard/customer-intent-extraction/extract_intent_tool.py @@ -1,6 +1,6 @@ import os -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomConnection from intent import extract_intent diff --git a/examples/flows/standard/describe-image/flip_image.py b/examples/flows/standard/describe-image/flip_image.py index b106b79cd42..6972b5130b3 100644 --- a/examples/flows/standard/describe-image/flip_image.py +++ b/examples/flows/standard/describe-image/flip_image.py @@ -1,5 +1,5 @@ import io -from promptflow import tool +from promptflow.core import tool from promptflow.contracts.multimedia import Image from PIL import Image as PIL_Image diff --git a/examples/flows/standard/gen-docstring/combine_code_tool.py b/examples/flows/standard/gen-docstring/combine_code_tool.py index cf629507f69..619a7a407c2 100644 --- a/examples/flows/standard/gen-docstring/combine_code_tool.py +++ b/examples/flows/standard/gen-docstring/combine_code_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from divider import Divider from typing import List diff --git a/examples/flows/standard/gen-docstring/divide_code_tool.py b/examples/flows/standard/gen-docstring/divide_code_tool.py index 5a02f061d65..9720c9c9e26 100644 --- a/examples/flows/standard/gen-docstring/divide_code_tool.py +++ b/examples/flows/standard/gen-docstring/divide_code_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from divider import Divider diff --git a/examples/flows/standard/gen-docstring/generate_docstring_tool.py b/examples/flows/standard/gen-docstring/generate_docstring_tool.py index 6368a83bc43..a7f09dcda41 100644 --- a/examples/flows/standard/gen-docstring/generate_docstring_tool.py +++ b/examples/flows/standard/gen-docstring/generate_docstring_tool.py @@ -4,7 +4,7 @@ import os import sys from typing import Union, List -from promptflow import tool +from promptflow.core import tool from azure_open_ai import ChatLLM from divider import Divider from prompt import docstring_prompt, PromptLimitException diff --git a/examples/flows/standard/gen-docstring/load_code_tool.py b/examples/flows/standard/gen-docstring/load_code_tool.py index ae4d10799b5..2369d002ac0 100644 --- a/examples/flows/standard/gen-docstring/load_code_tool.py +++ b/examples/flows/standard/gen-docstring/load_code_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from file import File diff --git a/examples/flows/standard/gen-docstring/main.py b/examples/flows/standard/gen-docstring/main.py index be23d24c232..a5e565ada52 100644 --- a/examples/flows/standard/gen-docstring/main.py +++ b/examples/flows/standard/gen-docstring/main.py @@ -2,7 +2,7 @@ from file import File from diff import show_diff from load_code_tool import load_code -from promptflow import PFClient +from promptflow.client import PFClient from pathlib import Path diff --git a/examples/flows/standard/maths-to-code/ask_llm.jinja2 b/examples/flows/standard/maths-to-code/ask_llm.jinja2 index 8fea4ce5875..d6c328f3ef2 100644 --- a/examples/flows/standard/maths-to-code/ask_llm.jinja2 +++ b/examples/flows/standard/maths-to-code/ask_llm.jinja2 @@ -1,4 +1,4 @@ -system: +# system: I want you to act as a Math expert specializing in Algebra, Geometry, and Calculus. Given the question, develop python code to model the user's question. The python code will print the result at the end. Please generate executable python code, your reply will be in JSON format, something like: @@ -6,7 +6,7 @@ Please generate executable python code, your reply will be in JSON format, somet "code": "print(1+1)" } -user: +# user: This a set of examples including question and the final answer: {% for ex in examples %} QUESTION: {{ ex.question }} diff --git a/examples/flows/standard/maths-to-code/code_execution.py b/examples/flows/standard/maths-to-code/code_execution.py index 2c082e28a5f..1df8a357531 100644 --- a/examples/flows/standard/maths-to-code/code_execution.py +++ b/examples/flows/standard/maths-to-code/code_execution.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import sys from io import StringIO diff --git a/examples/flows/standard/maths-to-code/code_refine.py b/examples/flows/standard/maths-to-code/code_refine.py index 0e671c4fc58..a76d8b1592b 100644 --- a/examples/flows/standard/maths-to-code/code_refine.py +++ b/examples/flows/standard/maths-to-code/code_refine.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool import ast import json diff --git a/examples/flows/standard/maths-to-code/math_example.py b/examples/flows/standard/maths-to-code/math_example.py index 74ce04fb1ff..eeef55dca66 100644 --- a/examples/flows/standard/maths-to-code/math_example.py +++ b/examples/flows/standard/maths-to-code/math_example.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/maths-to-code/math_test.ipynb b/examples/flows/standard/maths-to-code/math_test.ipynb index dee3ebdff9d..1e3f43c151c 100644 --- a/examples/flows/standard/maths-to-code/math_test.ipynb +++ b/examples/flows/standard/maths-to-code/math_test.ipynb @@ -8,7 +8,7 @@ "source": [ "# setup pf client and execution path\n", "\n", - "from promptflow import PFClient\n", + "from promptflow.client import PFClient\n", "import json\n", "import os\n", "\n", @@ -28,8 +28,8 @@ "source": [ "# start batch run of maths-to-code\n", "base_run = pf.run(\n", - " flow = flow, \n", - " data = data, \n", + " flow = flow,\n", + " data = data,\n", " column_mapping={\"math_question\": \"${data.question}\"},\n", " display_name=\"maths_to_code_batch_run\",\n", " stream=True\n", @@ -277,8 +277,8 @@ "source": [ "# evaluate against the batch run and groundtruth data\n", "eval_run = pf.run(\n", - " flow = eval_flow, \n", - " data = data, \n", + " flow = eval_flow,\n", + " data = data,\n", " run = base_run,\n", " column_mapping={\"groundtruth\": \"${data.answer}\", \"prediction\": \"${run.outputs.answer}\"},\n", " display_name=\"maths_to_code_eval_run\",\n", @@ -643,8 +643,8 @@ "# evaluation run against base run\n", "\n", "eval_run = pf.run(\n", - " flow = eval_flow, \n", - " data = data, \n", + " flow = eval_flow,\n", + " data = data,\n", " run = base_run,\n", " column_mapping={\"groundtruth\": \"${data.answer}\", \"prediction\": \"${run.outputs.answer}\"},\n", " stream = True,\n", diff --git a/examples/flows/standard/maths-to-code/prompt_gen.jinja2 b/examples/flows/standard/maths-to-code/prompt_gen.jinja2 index b676bc0818b..48d9795ee46 100644 --- a/examples/flows/standard/maths-to-code/prompt_gen.jinja2 +++ b/examples/flows/standard/maths-to-code/prompt_gen.jinja2 @@ -1,4 +1,4 @@ -system: +# system: I want you to act as a Math expert specializing in Algebra, Geometry, and Calculus. Given the question, develop python code to model the user's question. The python code will print the result at the end. Please generate executable python code, your reply will be in JSON format, something like: @@ -6,7 +6,7 @@ Please generate executable python code, your reply will be in JSON format, somet "code": "print(1+1)" } -user: +# user: This a set of examples including question and the final answer: {% for ex in examples %} QUESTION: {{ ex.question }} diff --git a/examples/flows/standard/named-entity-recognition/NER_LLM.jinja2 b/examples/flows/standard/named-entity-recognition/NER_LLM.jinja2 index a58a23aad51..714f4a63bd9 100644 --- a/examples/flows/standard/named-entity-recognition/NER_LLM.jinja2 +++ b/examples/flows/standard/named-entity-recognition/NER_LLM.jinja2 @@ -1,10 +1,10 @@ -system: +# system: Your task is to find entities of certain type from the given text content. If there're multiple entities, please return them all with comma separated, e.g. "entity1, entity2, entity3". You should only return the entity list, nothing else. If there's no such entity, please return "None". -user: +# user: Entity type: {{entity_type}} Text content: {{text}} Entities: \ No newline at end of file diff --git a/examples/flows/standard/named-entity-recognition/cleansing.py b/examples/flows/standard/named-entity-recognition/cleansing.py index a017d7f1ab9..31ffea06b98 100644 --- a/examples/flows/standard/named-entity-recognition/cleansing.py +++ b/examples/flows/standard/named-entity-recognition/cleansing.py @@ -1,5 +1,5 @@ from typing import List -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/web-classification/classify_with_llm.jinja2 b/examples/flows/standard/web-classification/classify_with_llm.jinja2 index 6d7c3da4005..975f3ff67d5 100644 --- a/examples/flows/standard/web-classification/classify_with_llm.jinja2 +++ b/examples/flows/standard/web-classification/classify_with_llm.jinja2 @@ -1,9 +1,9 @@ -system: +# system: Your task is to classify a given url into one of the following categories: Movie, App, Academic, Channel, Profile, PDF or None based on the text content information. The classification will be based on the url, the webpage text content summary, or both. -user: +# user: The selection range of the value of "category" must be within "Movie", "App", "Academic", "Channel", "Profile", "PDF" and "None". The selection range of the value of "evidence" must be within "Url", "Text content", and "Both". Here are a few examples: diff --git a/examples/flows/standard/web-classification/convert_to_dict.py b/examples/flows/standard/web-classification/convert_to_dict.py index 8e9490b801a..8ca97ff42d9 100644 --- a/examples/flows/standard/web-classification/convert_to_dict.py +++ b/examples/flows/standard/web-classification/convert_to_dict.py @@ -1,6 +1,6 @@ import json -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/web-classification/fetch_text_content_from_url.py b/examples/flows/standard/web-classification/fetch_text_content_from_url.py index 1ff7f792909..47cfde8b8af 100644 --- a/examples/flows/standard/web-classification/fetch_text_content_from_url.py +++ b/examples/flows/standard/web-classification/fetch_text_content_from_url.py @@ -1,7 +1,7 @@ import bs4 import requests -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/web-classification/prepare_examples.py b/examples/flows/standard/web-classification/prepare_examples.py index c4ccb76d732..c6cf34c35bf 100644 --- a/examples/flows/standard/web-classification/prepare_examples.py +++ b/examples/flows/standard/web-classification/prepare_examples.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool @tool diff --git a/examples/flows/standard/web-classification/requirements.txt b/examples/flows/standard/web-classification/requirements.txt index ccef8cfd3cc..9ee5995790e 100644 --- a/examples/flows/standard/web-classification/requirements.txt +++ b/examples/flows/standard/web-classification/requirements.txt @@ -1,3 +1,3 @@ -promptflow[azure] +promptflow[azure]>=1.7.0 promptflow-tools bs4 \ No newline at end of file diff --git a/examples/flows/standard/web-classification/summarize_text_content.jinja2 b/examples/flows/standard/web-classification/summarize_text_content.jinja2 index 81078019db8..3352c4e8789 100644 --- a/examples/flows/standard/web-classification/summarize_text_content.jinja2 +++ b/examples/flows/standard/web-classification/summarize_text_content.jinja2 @@ -1,7 +1,7 @@ -system: +# system: Please summarize the following text in one paragraph. 100 words. Do not add any information that is not in the text. -user: +# user: Text: {{text}} -Summary: \ No newline at end of file +Summary: \ No newline at end of file diff --git a/examples/flows/standard/web-classification/summarize_text_content__variant_1.jinja2 b/examples/flows/standard/web-classification/summarize_text_content__variant_1.jinja2 index 5fb816079d5..09d0023df61 100644 --- a/examples/flows/standard/web-classification/summarize_text_content__variant_1.jinja2 +++ b/examples/flows/standard/web-classification/summarize_text_content__variant_1.jinja2 @@ -1,7 +1,7 @@ -system: +# system: Please summarize some keywords of this paragraph and have some details of each keywords. Do not add any information that is not in the text. -user: +# user: Text: {{text}} -Summary: \ No newline at end of file +Summary: \ No newline at end of file diff --git a/examples/tools/tool-package-quickstart/my_tool_package/tools/my_tool_1.py b/examples/tools/tool-package-quickstart/my_tool_package/tools/my_tool_1.py index aab5630f3e3..7287a7dc9ef 100644 --- a/examples/tools/tool-package-quickstart/my_tool_package/tools/my_tool_1.py +++ b/examples/tools/tool-package-quickstart/my_tool_package/tools/my_tool_1.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomConnection diff --git a/examples/tools/tool-package-quickstart/my_tool_package/tools/my_tool_2.py b/examples/tools/tool-package-quickstart/my_tool_package/tools/my_tool_2.py index 7921e62f4dc..636ee0436e4 100644 --- a/examples/tools/tool-package-quickstart/my_tool_package/tools/my_tool_2.py +++ b/examples/tools/tool-package-quickstart/my_tool_package/tools/my_tool_2.py @@ -1,4 +1,4 @@ -from promptflow import ToolProvider, tool +from promptflow.core import ToolProvider, tool from promptflow.connections import CustomConnection diff --git a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_cascading_inputs.py b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_cascading_inputs.py index 0b706f52884..2ba68cda6fe 100644 --- a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_cascading_inputs.py +++ b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_cascading_inputs.py @@ -1,6 +1,6 @@ from enum import Enum -from promptflow import tool +from promptflow.core import tool class UserType(str, Enum): diff --git a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_custom_llm_type.py b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_custom_llm_type.py index 9aad08fddb3..55bb94f139a 100644 --- a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_custom_llm_type.py +++ b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_custom_llm_type.py @@ -1,5 +1,5 @@ from jinja2 import Template -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomConnection from promptflow.contracts.types import PromptTemplate diff --git a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_custom_strong_type_connection.py b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_custom_strong_type_connection.py index 4450d49b198..7b965bb048c 100644 --- a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_custom_strong_type_connection.py +++ b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_custom_strong_type_connection.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomStrongTypeConnection from promptflow.contracts.types import Secret diff --git a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_dynamic_list_input.py b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_dynamic_list_input.py index e5950b452d1..b106757b01c 100644 --- a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_dynamic_list_input.py +++ b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_dynamic_list_input.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from typing import List, Union, Dict @@ -31,7 +31,10 @@ def my_list_func(prefix: str = "", size: int = 10, **kwargs) -> List[Dict[str, U return result -def list_endpoint_names(subscription_id, resource_group_name, workspace_name, prefix: str = "") -> List[Dict[str, str]]: +def list_endpoint_names(subscription_id: str = None, + resource_group_name: str = None, + workspace_name: str = None, + prefix: str = "") -> List[Dict[str, str]]: """This is an example to show how to get Azure ML resource in tool input list function. :param subscription_id: Azure subscription id. @@ -39,6 +42,10 @@ def list_endpoint_names(subscription_id, resource_group_name, workspace_name, pr :param workspace_name: Azure ML workspace name. :param prefix: prefix to add to each item. """ + # return an empty list if workspace triad is not available. + if not subscription_id or not resource_group_name or not workspace_name: + return [] + from azure.ai.ml import MLClient from azure.identity import DefaultAzureCredential diff --git a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_file_path_input.py b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_file_path_input.py index 83af836751e..76d75039a4a 100644 --- a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_file_path_input.py +++ b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_file_path_input.py @@ -1,6 +1,6 @@ import importlib from pathlib import Path -from promptflow import tool +from promptflow.core import tool from promptflow.contracts.types import FilePath diff --git a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_generated_by_input.py b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_generated_by_input.py index 898eff128af..ff6a923c1e9 100644 --- a/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_generated_by_input.py +++ b/examples/tools/tool-package-quickstart/my_tool_package/tools/tool_with_generated_by_input.py @@ -1,6 +1,6 @@ from typing import Union -from promptflow import tool +from promptflow.core import tool from typing import Dict, List from promptflow.connections import AzureOpenAIConnection, OpenAIConnection, CognitiveSearchConnection diff --git a/examples/tools/use-cases/custom-strong-type-connection-package-tool-showcase/requirements.txt b/examples/tools/use-cases/custom-strong-type-connection-package-tool-showcase/requirements.txt index 9ae1aaa439a..af50f7418c2 100644 --- a/examples/tools/use-cases/custom-strong-type-connection-package-tool-showcase/requirements.txt +++ b/examples/tools/use-cases/custom-strong-type-connection-package-tool-showcase/requirements.txt @@ -1,2 +1,2 @@ -promptflow[azure]==1.1.0 +promptflow[azure] my-tools-package==0.0.5 diff --git a/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/my_script_tool.py b/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/my_script_tool.py index b2d0d7d0377..6a568678147 100644 --- a/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/my_script_tool.py +++ b/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/my_script_tool.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomStrongTypeConnection from promptflow.contracts.types import Secret diff --git a/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/requirements.txt b/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/requirements.txt index 7f40ec1297c..957c9676144 100644 --- a/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/requirements.txt +++ b/examples/tools/use-cases/custom-strong-type-connection-script-tool-showcase/requirements.txt @@ -1 +1 @@ -promptflow[azure]==1.1.0 +promptflow[azure] diff --git a/examples/tutorials/e2e-development/chat-with-pdf.md b/examples/tutorials/e2e-development/chat-with-pdf.md index 85b04769f4e..a39f121896b 100644 --- a/examples/tutorials/e2e-development/chat-with-pdf.md +++ b/examples/tutorials/e2e-development/chat-with-pdf.md @@ -162,7 +162,7 @@ Check out below: E.g. build_index_tool wrapper: ```python -from promptflow import tool +from promptflow.core import tool from chat_with_pdf.build_index import create_faiss_index diff --git a/examples/tutorials/flow-deploy/create-service-with-flow/echo_connection_flow/echo_connection.py b/examples/tutorials/flow-deploy/create-service-with-flow/echo_connection_flow/echo_connection.py index 9a661708289..a3362a8e5e4 100644 --- a/examples/tutorials/flow-deploy/create-service-with-flow/echo_connection_flow/echo_connection.py +++ b/examples/tutorials/flow-deploy/create-service-with-flow/echo_connection_flow/echo_connection.py @@ -1,4 +1,4 @@ -from promptflow import tool +from promptflow.core import tool from promptflow.connections import AzureOpenAIConnection diff --git a/examples/tutorials/flow-deploy/create-service-with-flow/simple_score.py b/examples/tutorials/flow-deploy/create-service-with-flow/simple_score.py index acd1c33e008..b5ffe8fbf61 100644 --- a/examples/tutorials/flow-deploy/create-service-with-flow/simple_score.py +++ b/examples/tutorials/flow-deploy/create-service-with-flow/simple_score.py @@ -3,7 +3,7 @@ from flask import Flask, jsonify, request -from promptflow import load_flow +from promptflow.client import load_flow from promptflow.connections import AzureOpenAIConnection from promptflow.entities import FlowContext from promptflow.exceptions import SystemErrorException, UserErrorException @@ -72,7 +72,7 @@ def score(): # data in request will be passed to flow as kwargs result_dict = f(**data) # Note: if specified streaming=True in the flow context, the result will be a generator - # reference promptflow._sdk._serving.response_creator.ResponseCreator on how to handle it in app. + # reference promptflow.core._serving.response_creator.ResponseCreator on how to handle it in app. return jsonify(result_dict) diff --git a/examples/tutorials/flow-deploy/distribute-flow-as-executable-app/main.py b/examples/tutorials/flow-deploy/distribute-flow-as-executable-app/main.py index 89d4def2fea..2f8ee178ff1 100644 --- a/examples/tutorials/flow-deploy/distribute-flow-as-executable-app/main.py +++ b/examples/tutorials/flow-deploy/distribute-flow-as-executable-app/main.py @@ -2,14 +2,15 @@ import json import os import re -import streamlit as st from pathlib import Path -from streamlit_quill import st_quill # noqa: F401 + +import streamlit as st from bs4 import BeautifulSoup, NavigableString, Tag +from streamlit_quill import st_quill # noqa: F401 from promptflow._sdk._utils import print_yellow_warning -from promptflow._sdk._serving.flow_invoker import FlowInvoker -from promptflow._utils.multimedia_utils import is_multimedia_dict, MIME_PATTERN +from promptflow._utils.multimedia_utils import MIME_PATTERN, BasicMultimediaProcessor +from promptflow.core._serving.flow_invoker import FlowInvoker invoker = None @@ -20,7 +21,7 @@ def clear_chat() -> None: def show_image(image, key=None): if not image.startswith("data:image"): - st.image(key + ',' + image) + st.image(key + "," + image) else: st.image(image) @@ -50,12 +51,12 @@ def is_dict_contains_rich_text(rich_text): elif isinstance(rich_text_value, dict): result |= is_dict_contains_rich_text(rich_text_value) elif re.match(MIME_PATTERN, rich_text_key) or ( - isinstance(rich_text_value, str) and rich_text_value.startswith("data:image")): + isinstance(rich_text_value, str) and rich_text_value.startswith("data:image") + ): result = True return result def render_message(role, message_items): - def item_render_message(value, key=None): if key and re.match(MIME_PATTERN, key): show_image(value, key) @@ -82,7 +83,7 @@ def list_iter_render_message(message_items): st.markdown(f"`{json_dumps(message_items)},`") def dict_iter_render_message(message_items): - if is_multimedia_dict(message_items): + if BasicMultimediaProcessor.is_multimedia_dict(message_items): key = list(message_items.keys())[0] value = message_items[key] show_image(value, key) @@ -154,8 +155,8 @@ def extract_content(node): if text: return [text] elif isinstance(node, Tag): - if node.name == 'img': - prefix, base64_str = node['src'].split(',', 1) + if node.name == "img": + prefix, base64_str = node["src"].split(",", 1) return [{prefix: base64_str}] else: result = [] @@ -165,16 +166,16 @@ def extract_content(node): return [] def parse_html_content(html_content): - soup = BeautifulSoup(html_content, 'html.parser') + soup = BeautifulSoup(html_content, "html.parser") result = [] - for p in soup.find_all('p'): + for p in soup.find_all("p"): result.extend(extract_content(p)) return result def parse_image_content(image_content, image_type): if image_content is not None: file_contents = image_content.read() - image_content = base64.b64encode(file_contents).decode('utf-8') + image_content = base64.b64encode(file_contents).decode("utf-8") prefix = f"data:{image_type};base64" return {prefix: image_content} @@ -184,7 +185,7 @@ def parse_image_content(image_content, image_type): with container: show_conversation() - with st.form(key='input_form', clear_on_submit=True): + with st.form(key="input_form", clear_on_submit=True): settings_path = os.path.join(os.path.dirname(__file__), "settings.json") if os.path.exists(settings_path): with open(settings_path, "r") as file: @@ -195,15 +196,17 @@ def parse_image_content(image_content, image_type): label=environment_variable, type="password", placeholder=f"Please input {environment_variable} here. If you input before, you can leave it " - f"blank.") + f"blank.", + ) if secret_input != "": os.environ[environment_variable] = secret_input - url = st.text_input(label='url', - placeholder='https://play.google.com/store/apps/details?id=com.twitter.android') + url = st.text_input( + label="url", placeholder="https://play.google.com/store/apps/details?id=com.twitter.android" + ) cols = st.columns(7) - submit_bt = cols[0].form_submit_button(label='Submit') - clear_bt = cols[1].form_submit_button(label='Clear') + submit_bt = cols[0].form_submit_button(label="Submit") + clear_bt = cols[1].form_submit_button(label="Clear") if submit_bt: submit(url=url) diff --git a/examples/tutorials/flow-fine-tuning-evaluation/promptflow-quality-improvement.md b/examples/tutorials/flow-fine-tuning-evaluation/promptflow-quality-improvement.md index a2119e9da00..fd6a893c1bc 100644 --- a/examples/tutorials/flow-fine-tuning-evaluation/promptflow-quality-improvement.md +++ b/examples/tutorials/flow-fine-tuning-evaluation/promptflow-quality-improvement.md @@ -62,18 +62,18 @@ cd ../../flows/chat/chat-basic/ To enable your chatbot flow to solve math problems, you need to instruct the LLM about the task and target in the prompt. Open `chat.jinja2`, update the prompt as below: ```jinja -system: +# system: You are an assistant to calculate the answer to the provided math problems. Please return the final numerical answer only, without any accompanying reasoning or explanation. {% for item in chat_history %} -user: +# user: {{item.inputs.question}} -assistant: +# assistant: {{item.outputs.answer}} {% endfor %} -user: +# user: {{question}} ``` @@ -304,17 +304,17 @@ We leverage the Chain of Thought (CoT) prompt engineering method to adjust the p Variant_1: 2 CoT examples ```jinja -system: +# system: You are an assistant to calculate the answer to the provided math problems. Please think step by step. Return the final numerical answer only and any accompanying reasoning or explanation seperately as json format.
-user: +# user: A jar contains two red marbles, three green marbles, ten white marbles and no other marbles. Two marbles are randomly drawn from this jar without replacement. What is the probability that these two marbles drawn will both be red? Express your answer as a common fraction. -assistant: +# assistant: {Chain of thought: "The total number of marbles is $2+3+10=15$. The probability that the first marble drawn will be red is $2/15$. Then, there will be one red left, out of 14. Therefore, the probability of drawing out two red marbles will be: $$\\frac{2}{15}\\cdot\\frac{1}{14}=\\boxed{\\frac{1}{105}}$$.", "answer": "1/105"} -user: +# user: Find the greatest common divisor of $7!$ and $(5!)^2.$ -assistant: +# assistant: {"Chain of thought": "$$ \\begin{array} 7! &=& 7 \\cdot 6 \\cdot 5 \\cdot 4 \\cdot 3 \\cdot 2 \\cdot 1 &=& 2^4 \\cdot 3^2 \\cdot 5^1 \\cdot 7^1 \\\\ (5!)^2 &=& (5 \\cdot 4 \\cdot 3 \\cdot 2 \\cdot 1)^2 &=& 2^6 \\cdot 3^2 \\cdot 5^2 \\\\ \\text{gcd}(7!, (5!)^2) &=& 2^4 \\cdot 3^2 \\cdot 5^1 &=& \\boxed{720} \\end{array} $$.", "answer": "720"} ``` @@ -323,34 +323,34 @@ assistant: Variant_2 : 6 CoT examples. ```jinja -system: +# system: You are an assistant to calculate the answer to the provided math problems. Please think step by step. Return the final numerical answer only and any accompanying reasoning or explanation seperately as json format. -user: +# user: A jar contains two red marbles, three green marbles, ten white marbles and no other marbles. Two marbles are randomly drawn from this jar without replacement. What is the probability that these two marbles drawn will both be red? Express your answer as a common fraction. -assistant: +# assistant: {Chain of thought: "The total number of marbles is $2+3+10=15$. The probability that the first marble drawn will be red is $2/15$. Then, there will be one red left, out of 14. Therefore, the probability of drawing out two red marbles will be: $$\\frac{2}{15}\\cdot\\frac{1}{14}=\\boxed{\\frac{1}{105}}$$.", "answer": "1/105"} -user: +# user: Find the greatest common divisor of $7!$ and $(5!)^2.$ -assistant: +# assistant: {"Chain of thought": "$$ \\begin{array} 7! &=& 7 \\cdot 6 \\cdot 5 \\cdot 4 \\cdot 3 \\cdot 2 \\cdot 1 &=& 2^4 \\cdot 3^2 \\cdot 5^1 \\cdot 7^1 \\\\ (5!)^2 &=& (5 \\cdot 4 \\cdot 3 \\cdot 2 \\cdot 1)^2 &=& 2^6 \\cdot 3^2 \\cdot 5^2 \\\\ \\text{gcd}(7!, (5!)^2) &=& 2^4 \\cdot 3^2 \\cdot 5^1 &=& \\boxed{720} \\end{array} $$.", "answer": "720"} -user: +# user: A club has 10 members, 5 boys and 5 girls. Two of the members are chosen at random. What is the probability that they are both girls? -assistant: +# assistant: {"Chain of thought": "There are $\\binomial{10}{2} = 45$ ways to choose two members of the group, and there are $\\binomial{5}{2} = 10$ ways to choose two girls. Therefore, the probability that two members chosen at random are girls is $\\dfrac{10}{45} = \\boxed{\\dfrac{2}{9}}$.", "answer": "2/9"} -user: +# user: Allison, Brian and Noah each have a 6-sided cube. All of the faces on Allison's cube have a 5. The faces on Brian's cube are numbered 1, 2, 3, 4, 5 and 6. Three of the faces on Noah's cube have a 2 and three of the faces have a 6. All three cubes are rolled. What is the probability that Allison's roll is greater than each of Brian's and Noah's? Express your answer as a common fraction. -assistant: +# assistant: {"Chain of thought": "Since Allison will always roll a 5, we must calculate the probability that both Brian and Noah roll a 4 or lower. The probability of Brian rolling a 4 or lower is $\\frac{4}{6} = \\frac{2}{3}$ since Brian has a standard die. Noah, however, has a $\\frac{3}{6} = \\frac{1}{2}$ probability of rolling a 4 or lower, since the only way he can do so is by rolling one of his 3 sides that have a 2. So, the probability of both of these independent events occurring is $\\frac{2}{3} \\cdot \\frac{1}{2} = \\boxed{\\frac{1}{3}}$.", "answer": "1/3"} -user: +# user: Compute $\\density binomial{50}{2}$. -assistant: +# assistant: {"Chain of thought": "$\\density binomial{50}{2} = \\dfrac{50!}{2!48!}=\\dfrac{50\\times 49}{2\\times 1}=\\boxed{1225}.$", "answer": "1225"} -user: +# user: The set $S = \\{1, 2, 3, \\ldots , 49, 50\\}$ contains the first $50$ positive integers. After the multiples of 2 and the multiples of 3 are removed, how many integers remain in the set $S$? -assistant: +# assistant: {"Chain of thought": "The set $S$ contains $25$ multiples of 2 (that is, even numbers). When these are removed, the set $S$ is left with only the odd integers from 1 to 49. At this point, there are $50-25=25$ integers in $S$. We still need to remove the multiples of 3 from $S$.\n\nSince $S$ only contains odd integers after the multiples of 2 are removed, we must remove the odd multiples of 3 between 1 and 49. These are 3, 9, 15, 21, 27, 33, 39, 45, of which there are 8. Therefore, the number of integers remaining in the set $S$ is $25 - 8 = \\boxed{17}$.", "answer": "17"} ``` diff --git a/examples/tutorials/flow-in-pipeline/pipeline.ipynb b/examples/tutorials/flow-in-pipeline/pipeline.ipynb deleted file mode 100644 index b890e4819d8..00000000000 --- a/examples/tutorials/flow-in-pipeline/pipeline.ipynb +++ /dev/null @@ -1,220 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Use Flow as Component in Pipeline\n", - "\n", - "**Requirements** - In order to benefit from this tutorial, you will need:\n", - "- A basic understanding of Machine Learning\n", - "- An Azure account with an active subscription - [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F)\n", - "- An Azure ML workspace with computer cluster - [Configure workspace](../../configuration.ipynb)\n", - "- A python environment\n", - "- Installed Azure Machine Learning Python SDK v2 - [install instructions](../../../README.md) - check the getting started section\n", - "\n", - "**Learning Objectives** - By the end of this tutorial, you should be able to:\n", - "- Connect to your AML workspace from the Python SDK\n", - "- Create `Pipeline` with a component loaded from `flow.dag.yaml`\n", - "\n", - "**Motivations** - This notebook explains how to run a pipeline with distributed training component." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 1. Connect to Azure Machine Learning Workspace\n", - "\n", - "The [workspace](https://docs.microsoft.com/en-us/azure/machine-learning/concept-workspace) is the top-level resource for Azure Machine Learning, providing a centralized place to work with all the artifacts you create when you use Azure Machine Learning. In this section we will connect to the workspace in which the job will be run.\n", - "\n", - "## 1.1 Import the required libraries" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import required libraries\n", - "from azure.identity import DefaultAzureCredential, InteractiveBrowserCredential\n", - "\n", - "from azure.ai.ml import MLClient, load_component, Input\n", - "from azure.ai.ml.constants import AssetTypes\n", - "from azure.ai.ml.dsl import pipeline" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 1.2 Configure credential\n", - "\n", - "We are using `DefaultAzureCredential` to get access to workspace. \n", - "`DefaultAzureCredential` should be capable of handling most Azure SDK authentication scenarios. \n", - "\n", - "Reference for more available credentials if it does not work for you: [configure credential example](../../configuration.ipynb), [azure-identity reference doc](https://docs.microsoft.com/en-us/python/api/azure-identity/azure.identity?view=azure-python)." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "try:\n", - " credential = DefaultAzureCredential()\n", - " # Check if given credential can get token successfully.\n", - " credential.get_token(\"https://management.azure.com/.default\")\n", - "except Exception as ex:\n", - " # Fall back to InteractiveBrowserCredential in case DefaultAzureCredential not work\n", - " credential = InteractiveBrowserCredential()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 1.3 Get a handle to the workspace\n", - "\n", - "We use config file to connect to a workspace. The Azure ML workspace should be configured with computer cluster. [Check this notebook for configure a workspace](../../configuration.ipynb)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Get a handle to workspace\n", - "ml_client = MLClient.from_config(credential=credential)\n", - "\n", - "# Retrieve an already attached Azure Machine Learning Compute.\n", - "cluster_name = \"cpu-cluster\"\n", - "print(ml_client.compute.get(cluster_name))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 2. Load flow as component\n", - "\n", - "We suppose that there has already been a flow authored with Promptflow SDK/CLI/portal. Then we can load its flow dag yaml as a component like regular component specs." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "flow_component = load_component(\"../../flows/standard/web-classification/flow.dag.yaml\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 3. Pipeline job\n", - "## 3.1 Build pipeline" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "data_input = Input(\n", - " path=\"../../flows/standard/web-classification/data.jsonl\", type=AssetTypes.URI_FILE\n", - ")\n", - "\n", - "\n", - "@pipeline()\n", - "def pipeline_func_with_flow(data):\n", - " flow_node = flow_component(\n", - " data=data,\n", - " url=\"${data.url}\",\n", - " connections={\n", - " \"summarize_text_content\": {\n", - " \"connection\": \"azure_open_ai_connection\",\n", - " \"deployment_name\": \"gpt-35-turbo\",\n", - " },\n", - " \"classify_with_llm\": {\n", - " \"connection\": \"azure_open_ai_connection\",\n", - " \"deployment_name\": \"gpt-35-turbo\",\n", - " },\n", - " },\n", - " )\n", - " flow_node.compute = \"cpu-cluster\"\n", - "\n", - "\n", - "# create pipeline instance\n", - "pipeline_job = pipeline_func_with_flow(data=data_input)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 3.2 Submit pipeline job" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# submit job to workspace\n", - "pipeline_job = ml_client.jobs.create_or_update(\n", - " pipeline_job, experiment_name=\"pipeline_samples\"\n", - ")\n", - "pipeline_job" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Wait until the job completes\n", - "ml_client.jobs.stream(pipeline_job.name)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Next Steps\n", - "You can see further examples of running a pipeline job [here](../)" - ] - } - ], - "metadata": { - "description": "Create pipeline using components to run a distributed job with tensorflow", - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.17" - }, - "resources": "examples/flows/standard/web-classification" - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/examples/tutorials/get-started/flow-as-function.ipynb b/examples/tutorials/get-started/flow-as-function.ipynb index 86635181d57..8160ad6ade1 100644 --- a/examples/tutorials/get-started/flow-as-function.ipynb +++ b/examples/tutorials/get-started/flow-as-function.ipynb @@ -36,7 +36,7 @@ "metadata": {}, "outputs": [], "source": [ - "from promptflow import load_flow\n", + "from promptflow.client import load_flow\n", "\n", "\n", "flow_path = \"../../flows/standard/web-classification\"\n", diff --git a/examples/tutorials/get-started/quickstart.ipynb b/examples/tutorials/get-started/quickstart.ipynb index e85e66c1e3b..11593e5c2fe 100644 --- a/examples/tutorials/get-started/quickstart.ipynb +++ b/examples/tutorials/get-started/quickstart.ipynb @@ -58,7 +58,7 @@ "outputs": [], "source": [ "import json\n", - "from promptflow import PFClient\n", + "from promptflow.client import PFClient\n", "from promptflow.connections import AzureOpenAIConnection, OpenAIConnection\n", "\n", "# client can help manage your runs and connections.\n", @@ -174,7 +174,7 @@ "metadata": {}, "outputs": [], "source": [ - "from promptflow import load_flow\n", + "from promptflow.client import load_flow\n", "\n", "flow_func = load_flow(flow)\n", "flow_result = flow_func(**flow_inputs)\n", @@ -431,7 +431,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.9.18" }, "resources": "examples/requirements.txt, examples/flows/standard/web-classification, examples/flows/evaluation/eval-classification-accuracy" }, diff --git a/examples/tutorials/run-flow-with-pipeline/components/data-prep/conda.yaml b/examples/tutorials/run-flow-with-pipeline/components/data-prep/conda.yaml new file mode 100644 index 00000000000..fd3340b7d51 --- /dev/null +++ b/examples/tutorials/run-flow-with-pipeline/components/data-prep/conda.yaml @@ -0,0 +1,15 @@ +name: my-env +channels: + - conda-forge +dependencies: + - python=3.9 + - pip + - pip: + - mlflow + - azureml-core + - azure-ai-ml>=1.12.0 + - azureml-dataset-runtime[pandas,fuse] + - azureml-telemetry + - mltable>=1.2.0 + - pandas + - pillow \ No newline at end of file diff --git a/examples/tutorials/run-flow-with-pipeline/components/data-prep/data-prep.py b/examples/tutorials/run-flow-with-pipeline/components/data-prep/data-prep.py new file mode 100644 index 00000000000..b606b2e69a3 --- /dev/null +++ b/examples/tutorials/run-flow-with-pipeline/components/data-prep/data-prep.py @@ -0,0 +1,21 @@ +# Copyright (c) Microsoft. All rights reserved. +# Licensed under the MIT license. + +import os +import pandas as pd +import argparse + +parser = argparse.ArgumentParser() +parser.add_argument("--input_data_file", type=str) +parser.add_argument("--output_data_folder", type=str) + +args, _ = parser.parse_known_args() + +input_df = pd.read_json(args.input_data_file, lines=True) + +# data preparation, e.g. data sampling, data cleaning, etc. +processed_data = input_df.sample(n=20, replace=True, random_state=1) + +# export data into output folder +output_file_path = os.path.join(args.output_data_folder, "processed_data.csv") +processed_data.to_csv(output_file_path, index=False, header=True) diff --git a/examples/tutorials/run-flow-with-pipeline/components/data-prep/data-prep.yaml b/examples/tutorials/run-flow-with-pipeline/components/data-prep/data-prep.yaml new file mode 100644 index 00000000000..8a0c16adc7a --- /dev/null +++ b/examples/tutorials/run-flow-with-pipeline/components/data-prep/data-prep.yaml @@ -0,0 +1,26 @@ +$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json + +type: command + +name: data_prep +display_name: data preparation +version: 0.0.1 + +inputs: + input_data_file: + type: uri_file + +outputs: + output_data_folder: + type: uri_folder + +code: ./ + +environment: + image: mcr.microsoft.com/azureml/inference-base-2004:latest + conda_file: ./conda.yaml + +command: >- + python data-prep.py + --input_data_file ${{inputs.input_data_file}} + --output_data_folder ${{outputs.output_data_folder}} diff --git a/examples/tutorials/run-flow-with-pipeline/components/result-parser/conda.yaml b/examples/tutorials/run-flow-with-pipeline/components/result-parser/conda.yaml new file mode 100644 index 00000000000..fd3340b7d51 --- /dev/null +++ b/examples/tutorials/run-flow-with-pipeline/components/result-parser/conda.yaml @@ -0,0 +1,15 @@ +name: my-env +channels: + - conda-forge +dependencies: + - python=3.9 + - pip + - pip: + - mlflow + - azureml-core + - azure-ai-ml>=1.12.0 + - azureml-dataset-runtime[pandas,fuse] + - azureml-telemetry + - mltable>=1.2.0 + - pandas + - pillow \ No newline at end of file diff --git a/examples/tutorials/run-flow-with-pipeline/components/result-parser/result-parser.py b/examples/tutorials/run-flow-with-pipeline/components/result-parser/result-parser.py new file mode 100644 index 00000000000..e2a448c5e5f --- /dev/null +++ b/examples/tutorials/run-flow-with-pipeline/components/result-parser/result-parser.py @@ -0,0 +1,51 @@ +# Copyright (c) Microsoft. All rights reserved. +# Licensed under the MIT license. + +import os +import pandas as pd +import argparse +import glob +import numpy as np + +parser = argparse.ArgumentParser() +parser.add_argument("--source_data", type=str) +parser.add_argument("--pf_output_data", type=str) +parser.add_argument("--pf_debug_data", type=str) +parser.add_argument("--merged_data", type=str) + +args, _ = parser.parse_known_args() + +source_data_path = os.path.join(args.source_data, "processed_data.csv") +pf_output_path = os.path.join(args.pf_output_data, "parallel_run_step.jsonl") +merged_data_path = os.path.join(args.merged_data, "merged_data.jsonl") + +if args.pf_debug_data is not None: + pf_debug_files = glob.glob(os.path.join(args.pf_debug_data, "flow_artifacts/*.jsonl")) + +source_data_df = pd.read_csv(source_data_path) +pf_output_df = pd.read_json(pf_output_path, lines=True) +pf_output_df.sort_values(by="line_number", inplace=True, ignore_index=True) + +if len(source_data_df) != len(pf_output_df): + raise Exception("Index mismatch between data source and pf result") + +source_data_df.loc[:, "line_number"] = pf_output_df.loc[:, "line_number"] +source_data_df.loc[:, "pred_category"] = pf_output_df.loc[:, "category"] +source_data_df.loc[:, "pred_evidence"] = pf_output_df.loc[:, "evidence"] + +if pf_debug_files is not None and len(pf_debug_files) > 0: + debug_df = pd.concat([pd.read_json(file, lines=True) for file in pf_debug_files]) + debug_df.sort_values(by="line_number", inplace=True, ignore_index=True) + for i in range(len(debug_df)): + source_data_df.loc[i, "prompt_tokens"] = debug_df.loc[i, "run_info"]["system_metrics"]["prompt_tokens"] + source_data_df.loc[i, "duration"] = debug_df.loc[i, "run_info"]["system_metrics"]["duration"] + source_data_df.loc[i, "completion_tokens"] = debug_df.loc[i, "run_info"]["system_metrics"]["completion_tokens"] + source_data_df.loc[i, "total_tokens"] = debug_df.loc[i, "run_info"]["system_metrics"]["total_tokens"] +else: + source_data_df.loc[:, "prompt_tokens"] = np.nan + source_data_df.loc[:, "duration"] = np.nan + source_data_df.loc[:, "completion_tokens"] = np.nan + source_data_df.loc[:, "total_tokens"] = np.nan + +with open(merged_data_path, "w") as file: + file.write(source_data_df.to_json(orient="records", lines=True)) diff --git a/examples/tutorials/run-flow-with-pipeline/components/result-parser/result-parser.yaml b/examples/tutorials/run-flow-with-pipeline/components/result-parser/result-parser.yaml new file mode 100644 index 00000000000..04ea9d5759f --- /dev/null +++ b/examples/tutorials/run-flow-with-pipeline/components/result-parser/result-parser.yaml @@ -0,0 +1,34 @@ +$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json + +type: command + +name: result_parser +description: Aggregate pf source data with output and debug data. +display_name: result parser. +version: 0.0.1 + +inputs: + source_data: + type: uri_folder + pf_output_data: + type: uri_folder + pf_debug_data: + optional: true + type: uri_folder + +outputs: + merged_data : + type: uri_folder + +code: ./ + +environment: + image: mcr.microsoft.com/azureml/inference-base-2004:latest + conda_file: ./conda.yaml + +command: >- + python result-parser.py + --source_data ${{inputs.source_data}} + --pf_output_data ${{inputs.pf_output_data}} + $[[--pf_debug_data ${{inputs.pf_debug_data}}]] + --merged_data ${{outputs.merged_data}} diff --git a/examples/tutorials/run-flow-with-pipeline/pipeline.ipynb b/examples/tutorials/run-flow-with-pipeline/pipeline.ipynb new file mode 100644 index 00000000000..831364aa4f0 --- /dev/null +++ b/examples/tutorials/run-flow-with-pipeline/pipeline.ipynb @@ -0,0 +1,631 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Why use Azure machine learning(ML) pipelines to run your flows on the cloud?\n", + "In real-world scenarios, flows serve various purposes. For example, consider a flow designed to evaluate the relevance score for a communication session between humans and agents. Suppose you want to trigger this flow every night to assess today’s performance and avoid peak hours for LLM (Language Model) endpoints. In this common scenario, people often encounter the following needs:\n", + "- Handling Large Data Inputs: Running flows with thousands or millions of data inputs at once.\n", + "- Scalability and Efficiency: Requiring a scalable, efficient, and resilient platform to ensure success.\n", + "- Automations: Automatically triggering batch flows when upstream data is ready or at fixed intervals.\n", + "\n", + "__Azure ML pipelines__ address all these offline requirements effectively. With the integration of prompt flows and Azure ML pipeline, flow users could very easily achieve above goals and in this tutorial, you can learn:\n", + "- How to use python SDK to automatically convert your flow into a 'step' in Azure ML pipeline.\n", + "- How to feed your data into pipeline to trigger the batch flow runs.\n", + "- How to build other pipeline steps ahead or behind your prompt flow step. e.g. data preprocessing or result aggregation.\n", + "- How to setup a simple scheduler on my pipeline.\n", + "- How to deploy pipeline to an Azure ML batch endpoint. Then I can invoke it with new data when needed.\n", + "\n", + "Before you begin, consider the following prerequisites:\n", + "- Introduction to Azure ML Platform:\n", + " - [Core site of Azure ML platform](https://learn.microsoft.com/en-us/azure/machine-learning/overview-what-is-azure-machine-learning?view=azureml-api-2).\n", + " - Understand what [Azure ML pipelines](https://learn.microsoft.com/en-us/azure/machine-learning/concept-ml-pipelines?view=azureml-api-2) and [component](https://learn.microsoft.com/en-us/azure/machine-learning/concept-component?view=azureml-api-2) are.\n", + "- Azure cloud setup:\n", + " - An Azure account with an active subscription - [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F)\n", + " - Create an Azure ML resource from Azure portal - [Create a Azure ML workspace](https://ms.portal.azure.com/#view/Microsoft_Azure_Marketplace/MarketplaceOffersBlade/searchQuery/machine%20learning)\n", + " - Connect to your workspace then setup a basic computer cluster - [Configure workspace](../../configuration.ipynb)\n", + "- Local environment setup:\n", + " - A python environment\n", + " - Installed Azure Machine Learning Python SDK v2 - [install instructions](../../../README.md) - check the getting started section and make sure version of 'azure-ai-ml' is higher than `1.12.0`" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 1. Connect to Azure Machine Learning Workspace\n", + "\n", + "The [workspace](https://docs.microsoft.com/en-us/azure/machine-learning/concept-workspace) is the top-level resource for Azure Machine Learning, providing a centralized place to work with all the artifacts you create when you use Azure Machine Learning. In this section we will connect to the workspace in which the job will be run.\n", + "\n", + "## 1.1 Import the required libraries" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# import required libraries\n", + "from azure.identity import DefaultAzureCredential, InteractiveBrowserCredential\n", + "from azure.ai.ml import MLClient, load_component, Input, Output\n", + "from azure.ai.ml.constants import AssetTypes\n", + "from azure.ai.ml.dsl import pipeline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1.2 Configure credential\n", + "\n", + "We are using `DefaultAzureCredential` to get access to workspace. \n", + "`DefaultAzureCredential` should be capable of handling most Azure SDK authentication scenarios. \n", + "\n", + "Reference for more available credentials if it does not work for you: [configure credential example](../../configuration.ipynb), [azure-identity reference doc](https://docs.microsoft.com/en-us/python/api/azure-identity/azure.identity?view=azure-python)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "try:\n", + " credential = DefaultAzureCredential()\n", + " # Check if given credential can get token successfully.\n", + " credential.get_token(\"https://management.azure.com/.default\")\n", + "except Exception as ex:\n", + " # Fall back to InteractiveBrowserCredential in case DefaultAzureCredential not work\n", + " credential = InteractiveBrowserCredential()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1.3 Get a handle to the workspace\n", + "\n", + "We use 'config file' to connect to your workspace. Check [this notebook](../../configuration.ipynb) to get your config file from Azure ML workspace portal and paste it into this folder. Then if you pass the next code block, you've all set for the environment." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Get a handle to workspace\n", + "ml_client = MLClient.from_config(credential=credential)\n", + "\n", + "# Retrieve an already attached Azure Machine Learning Compute.\n", + "cluster_name = \"cpu-cluster\"\n", + "print(ml_client.compute.get(cluster_name))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 2. Load flow as component\n", + "If you’ve already authored a flow using the Promptflow SDK or portal, you can locate the flow.dag.yaml file within the flow folder. This YAML specification is essential for loading your flow into an Azure ML component.\n", + "\n", + "> __REMARK:__ To use `load_component` function with flow.dag.yaml, please ensure the following:
\n", + "> - The `$schema` should be defined in target DAG yaml file. For example: `$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json`.
\n", + "> - Flow metadata must be generated and kept up-to-date by verifying the file '/.promptflow/flow.tools.json'. If it doesn't exist, run the following command to generate and update it: `pf flow validate --file `." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "flow_component = load_component(\"../../flows/standard/web-classification/flow.dag.yaml\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When using the `load_component` function and the flow YAML specification, your flow is automatically transformed into a __[parallel component](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-use-parallel-job-in-pipeline?view=azureml-api-2&tabs=cliv2#why-are-parallel-jobs-needed)__. This parallel component is designed for large-scale, offline, parallelized processing with efficiency and resilience. Here are some key features of this auto-converted component:\n", + "\n", + " - Pre-defined input and output ports:\n", + "\n", + "| port name | type | description |\n", + "| --------- | ---- | ----------- |\n", + "| data | uri_folder or uri_file | Accepts batch data input to your flow. You can use either the `uri_file` data type if your data is a single file or the `uri_folder` data type if your folder contains multiple files with the same schema. The default data type is jsonl, but you can customize this setting after declaring an instance of this flow component in your pipeline. Note that your data will be converted into a dataframe, so ensure that your CSV or TSV data includes a header line for proper mapping. |\n", + "| flow_outputs | uri_file | Generates a single output file named parallel_run_step.jsonl. Each line in this data file corresponds to a JSON object representing the flow returns, along with an additional column called line_number indicating its position from the original file. |\n", + "| debug_info | uri_folder | If you run your flow component in __debug mode__, this port provides debugging information for each run of your lines. E.g. intermediate outputs between steps, or LLM response and token usage. |\n", + "\n", + "![prompt flow base component image](../../../docs/media/cloud/flow-in-pipeline/pf-base-component.png)\n", + " \n", + " - Auto-generated parameters \n", + " \n", + " These parameters represent all your flow inputs and connections associated with your flow steps. You can set default values in the flow/run definition, and they can be further customized during job submission. Use '[web-classification](../../flows/standard/web-classification/flow.dag.yaml)' sample flow for example, this flow has only one input named 'url' and 2 LLM steps 'summarize_text_content' and 'classify_with_llm'. The input parameters of this flow component are:\n", + " \n", + " ![prompt flow base component image](../../../docs/media/cloud/flow-in-pipeline/pf-component-parameters.png)\n", + "\n", + " - Auto-generated environment\n", + "\n", + " The environment of the created component will be inherited by latest promptflow runtime image. User can include custom packages in the environment by specifying the `environment` attribute in `flow.dag.yaml`, along with a 'requirements.txt' file located under the same flow folder:\n", + " ```yaml\n", + " ...\n", + " environment:\n", + " python_requirements_txt: requirements.txt\n", + " ```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3. Build your pipeline\n", + "## 3.1 Declare input and output\n", + "To supply your pipeline with data, you need to declare an input using the `path`, `type`, and `mode` properties. Please note: `mount` is the default and suggested mode for your file or folder data input.\n", + "\n", + "Declaring the pipeline output is optional. However, if you require a customized output path in the cloud, you can follow the example below to set the path on the datastore. For more detailed information on valid path values, refer to this documentation - [manage pipeline inputs outputs](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-inputs-outputs-pipeline?view=azureml-api-2&tabs=cli#path-and-mode-for-data-inputsoutputs)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "data_input = Input(\n", + " path=\"../../flows/standard/web-classification/data.jsonl\",\n", + " type=AssetTypes.URI_FILE,\n", + " mode=\"mount\",\n", + ")\n", + "\n", + "pipeline_output = Output(\n", + " # Provide custom flow output file path if needed\n", + " # path=\"azureml://datastores//paths/\",\n", + " type=AssetTypes.URI_FOLDER,\n", + " # rw_mount is suggested for flow output\n", + " mode=\"rw_mount\",\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3.2.1 Run pipeline with single flow component\n", + "Since all Promptflow components are based on Azure ML parallel components, users can leverage specific __run settings__ to control the parallelization of flow runs. Below are some useful settings:\n", + "\n", + "| run settings | description | allowed values | default value |\n", + "| ------------ | ----------- | -------------- | ------------- |\n", + "| PF_INPUT_FORMAT | When utilizing `uri_folder` as the input data, this setting allows you to specify which file extensions should be treated as data files for initializing flow runs. | json, jsonl, csv, tsv | jsonl |\n", + "| compute | Defines which compute cluster from your Azure ML workspace will be used for this job. | | |\n", + "| instance_count | Define how many nodes from your compute cluster will be assigned to this job. | from 1 to node count of compute cluster. | 1 |\n", + "| max_concurrency_per_instance | Defines how many dedicated processors will run the flow in parallel on 1 node. When combined with the 'instance_count' setting, the total parallelization of your flow will be instance_count*max_concurrency_per_instance.| >1 | 1 |\n", + "| mini_batch_size | Define the number of lines for each mini-batches. A __mini-batch__ is the basic granularity for processing full data with parallelization. Each worker processor handles one mini-batch at a time, and all workers work in parallel across different nodes. | > 0 | 1 |\n", + "| max_retries | Defines the retry count if any mini-batch encounters an inner exception.

Remark: The retry granularity is based on mini-batches. For instance, with the previous setting, you can set 100 lines per mini-batch. When one line execution encounters a transient issue or an unhandled exception, these 100 lines will be retried together, even if the remaining 99 lines are successful. Additionally, LLM responses with status code 429 will be handled internally for flow runs in most cases and will not trigger mini-batch failure. | >= 0 | 3 |\n", + "| error_threshold | Defines how many failed lines are acceptable. If the count of failed lines exceeds this threshold, the job will be stopped and marked as failed. Set '-1' to disable this failure check. | -1 or >=0 | -1 |\n", + "| mini_batch_error_threshold | Defines the maximum number of failed mini-batches that can be tolerated after all retries. Set '-1' to disable this failure check. | -1 or >=0 | -1 |\n", + "| logging_level | Determines how parallel jobs save logs to disk. Setting to ‘DEBUG’ for the flow component allows the component to output intermediate flow logs into the ‘debug_info’ port. | INFO, WARNING, DEBUG | INFO |\n", + "| timeout | Sets the timeout checker for each mini-batch execution in milliseconds. If a mini-batch runs longer than this threshold, it will be marked as failed and trigger the next retry. Consider setting a higher value based on your mini-batch size and total traffic throughput for your LLM endpoints. | > 0 | 600 |\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Define the pipeline as a function\n", + "@pipeline()\n", + "def pipeline_func_with_flow(\n", + " # Function inputs will be treated as pipeline input data or parameters.\n", + " # Pipeline input could be linked to step inputs to pass data between steps.\n", + " # Users are not required to define pipeline inputs.\n", + " # With pipeline inputs, user can provide the different data or values when they trigger different pipeline runs.\n", + " pipeline_input_data: Input,\n", + " parallel_node_count: int = 1,\n", + "):\n", + " # Declare pipeline step 'flow_node' by using flow component\n", + " flow_node = flow_component(\n", + " # Bind the pipeline intput data to the port 'data' of the flow component\n", + " # If you don't have pipeline input, you can directly pass the 'data_input' object to the 'data'\n", + " # But with this approach, you can't provide different data when you trigger different pipeline runs.\n", + " # data=data_input,\n", + " data=pipeline_input_data,\n", + " # Declare which column of input data should be mapped to flow input\n", + " # the value pattern follows ${data.}\n", + " url=\"${data.url}\",\n", + " # Provide the connection values of the flow component\n", + " # The value of connection and deployment_name should align with your workspace connection settings.\n", + " connections={\n", + " \"summarize_text_content\": {\n", + " \"connection\": \"azure_open_ai_connection\",\n", + " \"deployment_name\": \"gpt-35-turbo\",\n", + " },\n", + " \"classify_with_llm\": {\n", + " \"connection\": \"azure_open_ai_connection\",\n", + " \"deployment_name\": \"gpt-35-turbo\",\n", + " },\n", + " },\n", + " )\n", + "\n", + " # Provide run settings of your flow component\n", + " # Only 'compute' is required and other setting will keep default value if not provided.\n", + " flow_node.environment_variables = {\n", + " \"PF_INPUT_FORMAT\": \"jsonl\",\n", + " }\n", + " flow_node.compute = \"cpu-cluster\"\n", + " flow_node.resources = {\"instance_count\": parallel_node_count}\n", + " flow_node.mini_batch_size = 5\n", + " flow_node.max_concurrency_per_instance = 2\n", + " flow_node.retry_settings = {\n", + " \"max_retries\": 1,\n", + " \"timeout\": 1200,\n", + " }\n", + " flow_node.error_threshold = -1\n", + " flow_node.mini_batch_error_threshold = -1\n", + " flow_node.logging_level = \"DEBUG\"\n", + "\n", + " # Function return will be treated as pipeline output. This is not required.\n", + " return {\"flow_result_folder\": flow_node.outputs.flow_outputs}\n", + "\n", + "\n", + "# create pipeline instance\n", + "pipeline_job_def = pipeline_func_with_flow(pipeline_input_data=data_input)\n", + "pipeline_job_def.outputs.flow_result_folder = pipeline_output" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Submit the pipeline job to your workspace then check the status of your job on UI through the link in the output." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Submit the pipeline job to your workspace\n", + "pipeline_job_run = ml_client.jobs.create_or_update(\n", + " pipeline_job_def, experiment_name=\"Single_flow_component_pipeline_job\"\n", + ")\n", + "pipeline_job_run\n", + "\n", + "ml_client.jobs.stream(pipeline_job_run.name)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "> __NOTE:__
\n", + "> \n", + "> - The choice of `mini_batch_size` significantly affects the efficiency of the flow job. Since the lines within each mini-batch run sequentially, setting a higher value for this parameter increases the chunk size, which reduces parallelization. On the other hand, larger batch sizes also raise the cost of retries, as retries are based on the entire mini-batch. Conversely, opting for the lowest value (e.g., mini_batch_size=1) may introduce additional overhead, affecting efficiency across multiple mini-batches during orchestration or result summarization. So it is recommended to start with a value between 10 and 100 and fine-tune it later based on your specific requirements.
\n", + "> - The `max_concurrency_per_instance` setting can significantly enhance parallel efficiency within a single compute node. However, it also introduces several potential issues: 1) increase the risk of running out of memory, 2) LLM endpoint may experience throttling when too many requests arrive simultaneously. In general, it is advisable to set the max_concurrency_per_instance number equal to the core count of your compute to strike a balance between parallelism and resource constraints.
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3.2.2 Run complex pipeline with multiple component\n", + "In a typical pipeline, you’ll find multiple steps that encompass all your offline business requirements. If you’re aiming to construct a more intricate pipeline for production, explore the following resources:\n", + " - [how to create component with SDK v2](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-component-pipeline-python?view=azureml-api-2)\n", + " - Various component types:\n", + " - [Command](https://learn.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command?view=azureml-api-2)\n", + " - [Spark](https://learn.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-spark?view=azureml-api-2)\n", + " - [Pipeline](https://learn.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-pipeline?view=azureml-api-2)\n", + "\n", + "\n", + "Additionally, consider the following sample code that loads two extra command components from a repository to construct a single offline pipeline:\n", + " - __data_prep_component__ : This dummy data preprocessing step performs simple data sampling.\n", + " - __result_parser_component__: Combining source data, flow results, and debugging output, it generates a single file containing origin queries, LLM predictions, and LLM token usages." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# load Azure ML components\n", + "data_prep_component = load_component(\"./components/data-prep/data-prep.yaml\")\n", + "result_parser_component = load_component(\n", + " \"./components/result-parser/result-parser.yaml\"\n", + ")\n", + "\n", + "# load flow as component\n", + "flow_component = load_component(\"../../flows/standard/web-classification/flow.dag.yaml\")\n", + "\n", + "\n", + "@pipeline()\n", + "def pipeline_func_with_flow(pipeline_input_data):\n", + " data_prep_node = data_prep_component(\n", + " input_data_file=pipeline_input_data,\n", + " )\n", + " data_prep_node.compute = \"cpu-cluster\"\n", + "\n", + " flow_node = flow_component(\n", + " # Feed the output of data_prep_node to the flow component\n", + " data=data_prep_node.outputs.output_data_folder,\n", + " url=\"${data.url}\",\n", + " connections={\n", + " \"summarize_text_content\": {\n", + " \"connection\": \"azure_open_ai_connection\",\n", + " \"deployment_name\": \"gpt-35-turbo\",\n", + " },\n", + " \"classify_with_llm\": {\n", + " \"connection\": \"azure_open_ai_connection\",\n", + " \"deployment_name\": \"gpt-35-turbo\",\n", + " },\n", + " },\n", + " )\n", + "\n", + " flow_node.environment_variables = {\"PF_INPUT_FORMAT\": \"csv\"}\n", + " flow_node.compute = \"cpu-cluster\"\n", + " flow_node.mini_batch_size = 5\n", + " flow_node.max_concurrency_per_instance = 2\n", + " flow_node.resources = {\"instance_count\": 1}\n", + " flow_node.outputs.flow_outputs.mode = \"rw_mount\"\n", + " flow_node.logging_level = \"DEBUG\"\n", + "\n", + " result_parser_node = result_parser_component(\n", + " source_data=data_prep_node.outputs.output_data_folder,\n", + " pf_output_data=flow_node.outputs.flow_outputs,\n", + " pf_debug_data=flow_node.outputs.debug_info,\n", + " )\n", + "\n", + " flow_node.retry_settings = {\n", + " \"max_retries\": 1,\n", + " \"timeout\": 6000,\n", + " }\n", + "\n", + " result_parser_node.compute = \"cpu-cluster\"\n", + "\n", + " return {\"flow_result_folder\": result_parser_node.outputs.merged_data}\n", + "\n", + "\n", + "# create pipeline instance\n", + "pipeline_job_def = pipeline_func_with_flow(pipeline_input_data=data_input)\n", + "pipeline_job_def.outputs.flow_result_folder = pipeline_output" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Submit the pipeline job to your workspace then check the status of your job on UI through the link in the output." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# submit job to workspace\n", + "pipeline_job_run = ml_client.jobs.create_or_update(\n", + " pipeline_job_def, experiment_name=\"Complex_flow_component_pipeline_job\"\n", + ")\n", + "pipeline_job_run\n", + "\n", + "ml_client.jobs.stream(pipeline_job_run.name)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 4.1 Next step - Setup scheduler for your pipeline\n", + "\n", + "Azure Machine Learning pipelines support native __scheduler__ to help users regularly run their pipeline jobs with predefined time triggers. Here’s a code example for setting up a scheduler on a newly created pipeline using the flow component.\n", + "\n", + "Let’s begin by declaring a scheduler with a customized recurrence pattern." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from datetime import datetime\n", + "from azure.ai.ml.entities import JobSchedule, RecurrenceTrigger, RecurrencePattern\n", + "from azure.ai.ml.constants import TimeZone\n", + "\n", + "schedule_name = \"simple_sdk_create_schedule_recurrence\"\n", + "schedule_start_time = datetime.utcnow()\n", + "\n", + "recurrence_trigger = RecurrenceTrigger(\n", + " frequency=\"day\", # could accept \"hour\", \"minute\", \"day\", \"week\", \"month\"\n", + " interval=1,\n", + " schedule=RecurrencePattern(hours=10, minutes=[0, 1]),\n", + " start_time=schedule_start_time,\n", + " time_zone=TimeZone.UTC,\n", + ")\n", + "\n", + "job_schedule = JobSchedule(\n", + " name=schedule_name,\n", + " trigger=recurrence_trigger,\n", + " # Declare the pipeline job to be scheduled. Here we uses the pipeline job created in previous example.\n", + " create_job=pipeline_job_def,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To initiate the scheduler, follow this example:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "job_schedule = ml_client.schedules.begin_create_or_update(\n", + " schedule=job_schedule\n", + ").result()\n", + "print(job_schedule)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To review all your scheduled jobs, navigate to the __Job List__ page within the Azure Machine Learning workspace UI. Any job triggered by the scheduler will have a display name following this format: `-`. For instance, if you have a schedule named “named-schedule,” a job triggered on January 1, 2021, at 06:00:00 UTC will have the display name “named-schedule-20210101T060000Z.”\n", + "\n", + "To disable or shut down a running scheduler, follow this example:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "job_schedule = ml_client.schedules.begin_disable(name=schedule_name).result()\n", + "job_schedule.is_enabled" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To explore further details about scheduling Azure Machine Learning pipeline jobs, visit this article on [how to schedule pipeline job](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-schedule-pipeline-job?view=azureml-api-2&tabs=python)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 4.2 Next step - Deploy pipeline to an endpoint\n", + "Azure Machine Learning also offers __batch endpoints__, which enable you to deploy pipelines to an endpoint for efficient operationalization. If you require scheduling for your flow pipeline using an external orchestrator, such as Azure Data Factory or Microsoft Fabric, utilizing batch endpoints is the optimal recommendation for your flow pipeline.\n", + "\n", + "Let’s start by creating a new batch endpoint in your workspace." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from azure.ai.ml.entities import BatchEndpoint, PipelineComponentBatchDeployment\n", + "\n", + "# from azure.ai.ml.entities import ModelBatchDeployment, ModelBatchDeploymentSettings, Model, AmlCompute, Data, BatchRetrySettings, CodeConfiguration, Environment, Data\n", + "# from azure.ai.ml.constants import BatchDeploymentOutputAction\n", + "\n", + "\n", + "endpoint_name = \"hello-my-pipeline-endpoint\"\n", + "endpoint = BatchEndpoint(\n", + " name=endpoint_name,\n", + " description=\"A hello world endpoint for pipeline\",\n", + ")\n", + "\n", + "ml_client.batch_endpoints.begin_create_or_update(endpoint).result()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Each endpoint can support multiple deployments, each associated with distinct pipelines. In this context, we initiate a new deployment using our flow pipeline job, targeting the recently established endpoint." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "deployment = PipelineComponentBatchDeployment(\n", + " name=\"my-pipeline-deployment\",\n", + " description=\"A hello world deployment with a pipeline job.\",\n", + " endpoint_name=endpoint.name,\n", + " # Make sure 'pipeline_job_run' run successfully before deploying the endpoint\n", + " job_definition=pipeline_job_run,\n", + " settings={\"default_compute\": \"cpu-cluster\", \"continue_on_step_failure\": False},\n", + ")\n", + "\n", + "ml_client.batch_deployments.begin_create_or_update(deployment).result()\n", + "\n", + "# Refresh the default deployment to the latest one at our endpoint.\n", + "endpoint = ml_client.batch_endpoints.get(endpoint.name)\n", + "endpoint.defaults.deployment_name = deployment.name\n", + "ml_client.batch_endpoints.begin_create_or_update(endpoint).result()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Invoke the default deployment to target endpoint with proper data:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "batch_endpoint_job = ml_client.batch_endpoints.invoke(\n", + " endpoint_name=endpoint.name,\n", + " inputs={\"pipeline_input_data\": data_input},\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finally, verify the invocation on the workspace UI using the following link:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "ml_client.jobs.get(batch_endpoint_job.name)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To explore further details about Azure Machine Learning batch endpoint, visit this article on [how-to-use-batch-pipeline-deployments](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-use-batch-pipeline-deployments?view=azureml-api-2&tabs=python)" + ] + } + ], + "metadata": { + "description": "Create pipeline using components to run a distributed job with tensorflow", + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.13" + }, + "resources": "examples/flows/standard/web-classification" + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/examples/tutorials/run-management/run-management.ipynb b/examples/tutorials/run-management/run-management.ipynb index 3d34d903e7f..25a638bf281 100644 --- a/examples/tutorials/run-management/run-management.ipynb +++ b/examples/tutorials/run-management/run-management.ipynb @@ -58,7 +58,7 @@ "outputs": [], "source": [ "import json\n", - "from promptflow import PFClient\n", + "from promptflow.client import PFClient\n", "from promptflow.connections import AzureOpenAIConnection, OpenAIConnection\n", "\n", "# client can help manage your runs and connections.\n", @@ -113,7 +113,7 @@ "metadata": {}, "outputs": [], "source": [ - "from promptflow._sdk._load_functions import load_run\n", + "from promptflow.client import load_run\n", "\n", "# load a run from YAML file\n", "base_run = load_run(\n", diff --git a/scripts/building/dev_setup.py b/scripts/building/dev_setup.py deleted file mode 100644 index d4a0935037c..00000000000 --- a/scripts/building/dev_setup.py +++ /dev/null @@ -1,43 +0,0 @@ -import argparse -from pathlib import Path -from platform import system - -from utils import print_blue, run_command - - -def setup_promptflow(extra_deps: list, command_args: dict) -> None: - print_blue("- Setting up the promptflow SDK ") - print_blue("- Installing promptflow Python SDK from local directory") - package_location = f"{Path('./src/promptflow/').absolute()}" - if extra_deps: - print_blue(f"- Installing with extra dependencies: {extra_deps}") - extra_deps = ",".join(extra_deps) - package_location = f"{package_location}[{extra_deps}]" - cmds = ["pip", "install", "-e", package_location] - print_blue(f"Running {cmds}") - run_command(commands=cmds, **command_args) - run_command( - commands=["pip", "install", "-r", str(Path("./src/promptflow/dev_requirements.txt").absolute())], - **command_args, - ) - - -if __name__ == "__main__": - epilog = """ - Sample Usages: - python scripts/building/dev_setup.py - python scripts/building/dev_setup.py --promptflow-extra-deps azure - """ - parser = argparse.ArgumentParser( - description="Welcome to promptflow dev setup!", - epilog=epilog, - ) - parser.add_argument( - "--promptflow-extra-deps", required=False, nargs="+", type=str, help="extra dependencies for promptflow" - ) - parser.add_argument("-v", "--verbose", action="store_true", required=False, help="turn on verbose output") - args = parser.parse_args() - - command_args = {"shell": system() == "Windows", "stream_stdout": args.verbose} - setup_promptflow(extra_deps=args.promptflow_extra_deps, command_args=command_args) - run_command(commands=["pre-commit", "install"], **command_args) diff --git a/scripts/compliance-check/user_exclusion.xml b/scripts/compliance-check/user_exclusion.xml index 2733c3cb150..73646e29452 100644 --- a/scripts/compliance-check/user_exclusion.xml +++ b/scripts/compliance-check/user_exclusion.xml @@ -1,6 +1,7 @@ - SRC\PROMPTFLOW\PROMPTFLOW\_SDK\_SERVING\STATIC\INDEX.JS + SRC\PROMPTFLOW-CORE\PROMPTFLOW\CORE\_SERVING\STATIC\INDEX.JS .MIN.JS + SRC\PROMPTFLOW-DEVKIT\PROMPTFLOW\_SDK\_SERVICE\STATIC\ diff --git a/scripts/dev-setup/main.py b/scripts/dev-setup/main.py new file mode 100644 index 00000000000..41e57ac65fc --- /dev/null +++ b/scripts/dev-setup/main.py @@ -0,0 +1,157 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import argparse +import os +import site +import typing +from dataclasses import dataclass +from pathlib import Path + +from test_resources import REGISTERED_TEST_RESOURCES_FUNCTIONS +from utils import REPO_ROOT_DIR, change_cwd, print_blue, run_cmd + +PROMPT_FLOW_PKGS = [ + "promptflow-tracing", + "promptflow-core", + "promptflow-devkit", + "promptflow-azure", + "promptflow[azure]", + "promptflow-tools", +] + + +def set_up_git_hook_scripts(verbose: bool) -> None: + run_cmd(["pip", "install", "pre-commit"], verbose=False) # ensure pre-commit is installed + cmd = ["pre-commit", "install"] + print_blue("Running `pre-commit install` to set up the git hook scripts") + run_cmd(cmd, verbose=verbose) + + +def collect_and_install_from_pyproject() -> None: + # collect dependencies from pyproject.toml and install + deps = [] + # cwd is already changed to the package folder in the context + # so we can safely open pyproject.toml here + with open("pyproject.toml", mode="r", encoding="utf-8") as f: + lines = f.readlines() + collect_flag = False + for line in lines: + line = line.strip() + if line.startswith("["): + if "[tool.poetry.group.dev.dependencies]" in line or "[tool.poetry.group.test.dependencies]" in line: + collect_flag = True + continue + else: + collect_flag = False + if collect_flag and line: + deps.append(line.split("=")[0].strip()) + cmd = ["pip", "install"] + deps + run_cmd(cmd) + + +def inject_pth_file() -> None: + # content of the .pth file will be added to `sys.path` + # for packages installed from pyproject.toml, this file should already be there + # for `promptflow`, inject this, and we can avoid `conda env config vars set` + # reference: https://docs.python.org/3/library/site.html + site_packages_path = Path(site.getsitepackages()[0]) + with open(site_packages_path / "promptflow.pth", mode="w", encoding="utf-8") as f: + f.write((REPO_ROOT_DIR / "src" / "promptflow").resolve().absolute().as_posix()) + + +def install_pkg_editable(pkg: str, verbose: bool, is_vscode: bool = False) -> None: + if "[" in pkg: + folder_name, extras = pkg.split("[") + extras = f"[{extras}" + else: + folder_name = pkg + extras = "" + pkg_working_dir = REPO_ROOT_DIR / "src" / folder_name + with change_cwd(pkg_working_dir): + print_blue(f"- Setting up {pkg}") + + # pip install -e . from pyproject.toml/setup.py + print_blue(f"- Installing {pkg} from source") + cmd = ["pip", "install", "--editable", f".{extras}"] + run_cmd(cmd, verbose=verbose) + + # dev and test dependencies + print_blue(f"- Installing dev and test dependencies for {pkg}") + # promptflow folder has "dev_requirements.txt", directly install it + if folder_name == "promptflow": + cmd = ["pip", "install", "-r", "dev_requirements.txt"] + run_cmd(cmd, verbose=verbose) + inject_pth_file() + # promptflow-tools + # reference: https://github.com/microsoft/promptflow/blob/main/src/promptflow-tools/README.dev.md + elif pkg == "promptflow-tools": + cmd = ["pip", "install", "-r", "requirements.txt"] + run_cmd(cmd, verbose=verbose) + cmd = ["pip", "install", "pytest", "pytest-mock"] + run_cmd(cmd, verbose=verbose) + # promptflow-* will have "pyproject.toml", parse and install + # we can refine this leveraging `poetry export` later + elif os.path.exists("pyproject.toml"): + collect_and_install_from_pyproject() + + # touch __init__.py for the package for VS Code + # NOTE that this is a workaround to enable VS Code to recognize the namespace package + # we should be able to remove this after we fully deprecate promptflow in local development + if is_vscode: + with open(pkg_working_dir / "promptflow" / "__init__.py", mode="w", encoding="utf-8") as f: + f.write("") + + +@dataclass +class Arguments: + packages: typing.List[str] + verbose: bool = False + vscode: bool = False + + @staticmethod + def parse_args() -> "Arguments": + epilog = "Example usage: main.py --packages promptflow-tracing promptflow-core" + parser = argparse.ArgumentParser( + description="Welcome to promptflow dev setup!", + epilog=epilog, + ) + parser.add_argument( + "--packages", + required=False, + nargs="+", + type=str, + default=PROMPT_FLOW_PKGS, + help="packages to install in editable mode", + ) + parser.add_argument( + "-v", + "--verbose", + action="store_true", + help="turn on verbose output", + ) + parser.add_argument( + "--vscode", + action="store_true", + help="extra setup step for Visual Studio Code", + ) + args = parser.parse_args() + return Arguments( + packages=args.packages, + verbose=args.verbose, + vscode=args.vscode, + ) + + +def main(args: Arguments) -> None: + for pkg in args.packages: + install_pkg_editable(pkg, verbose=args.verbose, is_vscode=args.vscode) + # invoke test resource template creation function if available + if pkg in REGISTERED_TEST_RESOURCES_FUNCTIONS: + REGISTERED_TEST_RESOURCES_FUNCTIONS[pkg]() + set_up_git_hook_scripts(verbose=args.verbose) + + +if __name__ == "__main__": + main(args=Arguments.parse_args()) diff --git a/scripts/dev-setup/test_resources.py b/scripts/dev-setup/test_resources.py new file mode 100644 index 00000000000..b9f452200aa --- /dev/null +++ b/scripts/dev-setup/test_resources.py @@ -0,0 +1,49 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import json +import shutil +from pathlib import Path + +from utils import REPO_ROOT_DIR, print_yellow + + +def _prompt_user_for_test_resources(path: Path) -> None: + prompt_msg = ( + f"Created test-required file {path.name!r} at {path.as_posix()!r}, " + "please update with your test resource(s)." + ) + print_yellow(prompt_msg) + + +def create_tracing_test_resource_template() -> None: + working_dir = REPO_ROOT_DIR / "src" / "promptflow-tracing" + connections_filename = "connections.json" + connections_file_path = (working_dir / connections_filename).resolve().absolute() + connections_template = { + "azure_open_ai_connection": { + "value": { + "api_key": "aoai-api-key", + "api_base": "aoai-api-endpoint", + "api_version": "2023-07-01-preview", + } + } + } + with open(connections_file_path, mode="w", encoding="utf-8") as f: + json.dump(connections_template, f, ensure_ascii=False, indent=4) + _prompt_user_for_test_resources(connections_file_path) + + +def create_tools_test_resource_template() -> None: + working_dir = REPO_ROOT_DIR / "src" / "promptflow-tools" + example_file_path = (working_dir / "connections.json.example").resolve().absolute() + target_file_path = (working_dir / "connections.json").resolve().absolute() + shutil.copy(example_file_path, target_file_path) + _prompt_user_for_test_resources(target_file_path) + + +REGISTERED_TEST_RESOURCES_FUNCTIONS = { + "promptflow-tracing": create_tracing_test_resource_template, + "promptflow-tools": create_tools_test_resource_template, +} diff --git a/scripts/dev-setup/utils.py b/scripts/dev-setup/utils.py new file mode 100644 index 00000000000..84bc6a9a3e2 --- /dev/null +++ b/scripts/dev-setup/utils.py @@ -0,0 +1,52 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import contextlib +import os +import platform +import subprocess +import sys +from pathlib import Path + +REPO_ROOT_DIR = Path(__file__).parent.parent.parent + + +class Color: + BLUE = "\033[94m" + YELLOW = "\033[93m" + END = "\033[0m" + + +def print_blue(msg: str) -> None: + print(Color.BLUE + msg + Color.END) + + +def print_yellow(msg: str) -> None: + print(Color.YELLOW + msg + Color.END) + + +@contextlib.contextmanager +def change_cwd(path): + cwd = os.getcwd() + try: + os.chdir(path) + yield + finally: + os.chdir(cwd) + + +def run_cmd(cmd, verbose: bool = False) -> None: + print_blue(f"Running {' '.join(cmd)}") + shell = platform.system() == "Windows" + p = subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + shell=shell, + ) + for line in p.stdout: + line = line.decode("utf-8").rstrip() + if verbose: + sys.stdout.write(f"{line}\n") + p.communicate() diff --git a/scripts/docs/api_doc_templates/package.rst_t b/scripts/docs/api_doc_templates/package.rst_t new file mode 100644 index 00000000000..2610d09c415 --- /dev/null +++ b/scripts/docs/api_doc_templates/package.rst_t @@ -0,0 +1,57 @@ +{%- macro automodule(modname, options) -%} +.. automodule:: {{ modname }} +{%- for option in options %} + :{{ option }}: +{%- endfor %} +{%- endmacro %} + +{%- macro toctree(docnames) -%} +.. toctree:: + :maxdepth: {{ maxdepth }} +{% for docname in docnames %} + {{ docname }} +{%- endfor %} +{%- endmacro %} + +{%- if is_namespace %} +{{- [pkgname, "namespace"] | join(" ") | e | heading }} +{% else %} +{{- [pkgname, ""] | join(" ") | e | heading }} +{% endif %} + +{%- if is_namespace %} +.. py:module:: {{ pkgname }} +{% endif %} + +{%- if modulefirst and not is_namespace %} +{{ automodule(pkgname, automodule_options) }} +{% endif %} + +{%- if subpackages %} +Subpackages +----------- + +{{ toctree(subpackages) }} +{% endif %} + +{%- if submodules %} +Submodules +---------- +{% if separatemodules %} +{{ toctree(submodules) }} +{% else %} +{%- for submodule in submodules %} +{% if show_headings %} +{{- [submodule, "module"] | join(" ") | e | heading(2) }} +{% endif %} +{{ automodule(submodule, automodule_options) }} +{% endfor %} +{%- endif %} +{%- endif %} + +{%- if not modulefirst and not is_namespace %} +Module contents +--------------- + +{{ automodule(pkgname, automodule_options) }} +{% endif %} \ No newline at end of file diff --git a/scripts/docs/doc_generation.ps1 b/scripts/docs/doc_generation.ps1 index bf6eaa491d6..37a5913f389 100644 --- a/scripts/docs/doc_generation.ps1 +++ b/scripts/docs/doc_generation.ps1 @@ -19,7 +19,7 @@ param( [string] $RepoRootPath = $ScriptPath | Split-Path -Parent | Split-Path -Parent [string] $DocPath = [System.IO.Path]::Combine($RepoRootPath, "docs") [string] $TempDocPath = New-TemporaryFile | % { Remove-Item $_; New-Item -ItemType Directory -Path $_ } -[string] $PkgSrcPath = [System.IO.Path]::Combine($RepoRootPath, "src\promptflow\promptflow") +[string] $PkgSrcPath = [System.IO.Path]::Combine($RepoRootPath, "src") [string] $OutPath = [System.IO.Path]::Combine($ScriptPath, "_build") [string] $SphinxApiDoc = [System.IO.Path]::Combine($DocPath, "sphinx_apidoc.log") [string] $SphinxBuildDoc = [System.IO.Path]::Combine($DocPath, "sphinx_build.log") @@ -62,6 +62,32 @@ Write-Host "Copy doc to: $TempDocPath" ROBOCOPY $DocPath $TempDocPath /S /NFL /NDL /XD "*.git" [System.IO.Path]::Combine($DocPath, "_scripts\_build") ProcessFiles +function ForceOverwrite { + param ( + [string] $Module + ) + $FileName = "promptflow.{0}.rst" -f $Module + $TargetRst = [System.IO.Path]::Combine($RepoRootPath, ("scripts\docs\{0}" -f $FileName)) + $AutoGenRst = [System.IO.Path]::Combine($RefDocPath, $FileName) + Copy-Item -Path $TargetRst -Destination $AutoGenRst -Force +} + +function Update-Sub-Pkg-Index-Title { + param ( + [string] $SubPkgRefDocPath, + [string] $SubPkgName + ) + # This is used to update the title of the promptflow.rst file in the sub package + # from 'promptflow namespaces' to package name + $IndexRst = [System.IO.Path]::Combine($SubPkgRefDocPath, "promptflow.rst") + $IndexContent = Get-Content $IndexRst + $IndexContent[0] = ("{0} package" -f $SubPkgName) + $IndexContent[1] = "=================================" + $IndexContent[2] = ".. py:module:: promptflow" + $IndexContent[3] = " :noindex:" + Set-Content $IndexRst $IndexContent +} + if($WithReferenceDoc){ $RefDocRelativePath = "reference\python-library-reference" $RefDocPath = [System.IO.Path]::Combine($TempDocPath, $RefDocRelativePath) @@ -70,15 +96,27 @@ if($WithReferenceDoc){ } Remove-Item $RefDocPath -Recurse -Force Write-Host "===============Build Promptflow Reference Doc===============" - sphinx-apidoc --module-first --no-headings --no-toc --implicit-namespaces "$PkgSrcPath" -o "$RefDocPath" | Tee-Object -FilePath $SphinxApiDoc - $apidocWarningsAndErrors = Select-String -Path $SphinxApiDoc -Pattern $WarningErrorPattern - - Write-Host "=============== Overwrite promptflow.connections.rst ===============" - # We are doing this overwrite because the connection entities are also defined in the promptflow.entities module - # and it will raise duplicate object description error if we don't do so when we run sphinx-build later. - $ConnectionRst = [System.IO.Path]::Combine($RepoRootPath, "scripts\docs\promptflow.connections.rst") - $AutoGenConnectionRst = [System.IO.Path]::Combine($RefDocPath, "promptflow.connections.rst") - Copy-Item -Path $ConnectionRst -Destination $AutoGenConnectionRst -Force + $ApidocWarningsAndErrors = [System.Collections.ArrayList]::new() + $IgnoreList = @("promptflow-recording", "promptflow", "promptflow-tools") + foreach($Item in Get-Childitem -path $PkgSrcPath){ + if(-not ($Item -is [System.IO.DirectoryInfo])){ + # Only looking for package directory + continue + } + if($IgnoreList -contains $Item.Name){ + continue + } + $SubPkgPath = [System.IO.Path]::Combine($Item.FullName, "promptflow") + $SubPkgRefDocPath = [System.IO.Path]::Combine($RefDocPath, $Item.Name) + Write-Host "===============Build $Item Reference Doc===============" + $TemplatePath = [System.IO.Path]::Combine($RepoRootPath, "scripts\docs\api_doc_templates") + sphinx-apidoc --module-first --no-headings --no-toc --implicit-namespaces "$SubPkgPath" -o "$SubPkgRefDocPath" -t $TemplatePath | Tee-Object -FilePath $SphinxApiDoc + $SubPkgWarningsAndErrors = Select-String -Path $SphinxApiDoc -Pattern $WarningErrorPattern + if($SubPkgWarningsAndErrors){ + $ApidocWarningsAndErrors.AddRange($SubPkgWarningsAndErrors) + } + Update-Sub-Pkg-Index-Title $SubPkgRefDocPath $Item.Name + } } @@ -97,9 +135,9 @@ $buildWarningsAndErrors = Select-String -Path $SphinxBuildDoc -Pattern $WarningE Write-Host "Clean path: $TempDocPath" Remove-Item $TempDocPath -Recurse -Confirm:$False -Force -if ($apidocWarningsAndErrors) { +if ($ApidocWarningsAndErrors) { Write-Host "=============== API doc warnings and errors ===============" - foreach ($line in $apidocWarningsAndErrors) { + foreach ($line in $ApidocWarningsAndErrors) { Write-Host $line -ForegroundColor Red } } diff --git a/scripts/docs/promptflow.connections.rst b/scripts/docs/promptflow.connections.rst deleted file mode 100644 index 6339308852e..00000000000 --- a/scripts/docs/promptflow.connections.rst +++ /dev/null @@ -1,44 +0,0 @@ -promptflow.connections package -============================== - -.. autoclass:: promptflow.connections.AzureContentSafetyConnection - :members: - :undoc-members: - :show-inheritance: - :noindex: - -.. autoclass:: promptflow.connections.AzureOpenAIConnection - :members: - :undoc-members: - :show-inheritance: - :noindex: - -.. autoclass:: promptflow.connections.CognitiveSearchConnection - :members: - :undoc-members: - :show-inheritance: - :noindex: - -.. autoclass:: promptflow.connections.CustomConnection - :members: - :undoc-members: - :show-inheritance: - :noindex: - -.. autoclass:: promptflow.connections.FormRecognizerConnection - :members: - :undoc-members: - :show-inheritance: - :noindex: - -.. autoclass:: promptflow.connections.OpenAIConnection - :members: - :undoc-members: - :show-inheritance: - :noindex: - -.. autoclass:: promptflow.connections.SerpConnection - :members: - :undoc-members: - :show-inheritance: - :noindex: diff --git a/scripts/installer/curl_install_pypi/README.md b/scripts/installer/curl_install_pypi/README.md index 90185f83b2f..33c2a9cf3ca 100644 --- a/scripts/installer/curl_install_pypi/README.md +++ b/scripts/installer/curl_install_pypi/README.md @@ -17,15 +17,12 @@ Uninstall the promptflow by directly deleting the files from the location chosen ```bash # The default install/executable location is the user's home directory ($HOME). rm -r $HOME/lib/promptflow - rm $HOME/bin/pf - rm $HOME/bin/pfs - rm $HOME/bin/pfazure ``` 2. Modify your `$HOME/.bash_profile` or `$HOME/.bashrc` file to remove the following line: ```text - export PATH=$PATH:$HOME/bin + export PATH=$PATH:$HOME/lib/promptflow/bin ``` 3. If using `bash` or `zsh`, reload your shell's command cache. diff --git a/scripts/installer/curl_install_pypi/install.py b/scripts/installer/curl_install_pypi/install.py index 897a3c2cc62..5d4a7499ff5 100644 --- a/scripts/installer/curl_install_pypi/install.py +++ b/scripts/installer/curl_install_pypi/install.py @@ -15,31 +15,15 @@ import os import sys import platform -import stat import tempfile import shutil import subprocess -import hashlib -PF_DISPATCH_TEMPLATE = """#!/usr/bin/env bash -export PF_INSTALLER=Script -{install_dir}/bin/python -m promptflow._cli._pf.entry "$@" -""" - -PFAZURE_DISPATCH_TEMPLATE = """#!/usr/bin/env bash -{install_dir}/bin/python -m promptflow._cli._pf_azure.entry "$@" -""" - -PFS_DISPATCH_TEMPLATE = """#!/usr/bin/env bash -{install_dir}/bin/python -m promptflow._sdk._service.entry "$@" -""" - DEFAULT_INSTALL_DIR = os.path.expanduser(os.path.join('~', 'lib', 'promptflow')) DEFAULT_EXEC_DIR = os.path.expanduser(os.path.join('~', 'bin')) PF_EXECUTABLE_NAME = 'pf' PFAZURE_EXECUTABLE_NAME = 'pfazure' -PFS_EXECUTABLE_NAME = 'pfs' USER_BASH_RC = os.path.expanduser(os.path.join('~', '.bashrc')) @@ -96,14 +80,6 @@ def create_dir(dir): os.makedirs(dir) -def is_valid_sha256sum(a_file, expected_sum): - sha256 = hashlib.sha256() - with open(a_file, 'rb') as f: - sha256.update(f.read()) - computed_hash = sha256.hexdigest() - return expected_sum == computed_hash - - def create_virtualenv(install_dir): cmd = [sys.executable, '-m', 'venv', install_dir] exec_command(cmd) @@ -111,8 +87,8 @@ def create_virtualenv(install_dir): def install_cli(install_dir, tmp_dir): path_to_pip = os.path.join(install_dir, 'bin', 'pip') - cmd = [path_to_pip, 'install', '--cache-dir', tmp_dir, 'promptflow[azure,executable,azureml-serving]', - '--upgrade'] + cmd = [path_to_pip, 'install', '--cache-dir', tmp_dir, + 'promptflow[azure,executable,azureml-serving,executor-service]', '--upgrade'] exec_command(cmd) cmd = [path_to_pip, 'install', '--cache-dir', tmp_dir, 'promptflow-tools', '--upgrade'] exec_command(cmd) @@ -120,22 +96,6 @@ def install_cli(install_dir, tmp_dir): exec_command(cmd) -def create_executable(exec_dir, install_dir): - create_dir(exec_dir) - exec_filepaths = [] - for filename, template in [(PF_EXECUTABLE_NAME, PF_DISPATCH_TEMPLATE), - (PFAZURE_EXECUTABLE_NAME, PFAZURE_DISPATCH_TEMPLATE), - (PFS_EXECUTABLE_NAME, PFS_DISPATCH_TEMPLATE)]: - exec_filepath = os.path.join(exec_dir, filename) - with open(exec_filepath, 'w') as exec_file: - exec_file.write(template.format(install_dir=install_dir)) - cur_stat = os.stat(exec_filepath) - os.chmod(exec_filepath, cur_stat.st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH) - print_status("The executable is available at '{}'.".format(exec_filepath)) - exec_filepaths.append(exec_filepath) - return exec_filepaths - - def get_install_dir(): install_dir = None while not install_dir: @@ -161,21 +121,6 @@ def get_install_dir(): return install_dir -def get_exec_dir(): - exec_dir = None - while not exec_dir: - prompt_message = (f"In what directory would you like to place the " - f"'{PFS_EXECUTABLE_NAME}/{PFS_EXECUTABLE_NAME}/{PFAZURE_EXECUTABLE_NAME}' executable?") - exec_dir = prompt_input_with_default(prompt_message, DEFAULT_EXEC_DIR) - exec_dir = os.path.realpath(os.path.expanduser(exec_dir)) - if ' ' in exec_dir: - print_status("The executable directory '{}' cannot contain spaces.".format(exec_dir)) - exec_dir = None - create_dir(exec_dir) - print_status("The executable will be in '{}'.".format(exec_dir)) - return exec_dir - - def _backup_rc(rc_file): try: shutil.copyfile(rc_file, rc_file+'.backup') @@ -240,28 +185,28 @@ def warn_other_azs_on_path(exec_dir, exec_filepath): conflicting_paths = [] if env_path: for p in env_path.split(':'): - for file in [PF_EXECUTABLE_NAME, PFAZURE_EXECUTABLE_NAME, PFS_EXECUTABLE_NAME]: + for file in [PF_EXECUTABLE_NAME, PFAZURE_EXECUTABLE_NAME]: p_to_pf = os.path.join(p, file) if p != exec_dir and os.path.isfile(p_to_pf): conflicting_paths.append(p_to_pf) if conflicting_paths: print_status() - print_status(f"** WARNING: Other '{PFS_EXECUTABLE_NAME}/{PFS_EXECUTABLE_NAME}/{PFAZURE_EXECUTABLE_NAME}' " + print_status(f"** WARNING: Other '{PF_EXECUTABLE_NAME}/{PFAZURE_EXECUTABLE_NAME}' " f"executables are on your $PATH. **") print_status("Conflicting paths: {}".format(', '.join(conflicting_paths))) print_status("You can run this installation of the promptflow with '{}'.".format(exec_filepath)) -def handle_path_and_tab_completion(exec_filepath, exec_dir): +def handle_path_and_tab_completion(exec_filepath, install_dir): ans_yes = prompt_y_n('Modify profile to update your $PATH now?', 'y') if ans_yes: rc_file_path = get_rc_file_path() if not rc_file_path: raise CLIInstallError('No suitable profile file found.') _backup_rc(rc_file_path) - line_to_add = "export PATH=$PATH:{}".format(exec_dir) + line_to_add = "export PATH=$PATH:{}".format(os.path.join(install_dir, "bin")) _modify_rc(rc_file_path, line_to_add) - warn_other_azs_on_path(exec_dir, exec_filepath) + warn_other_azs_on_path(install_dir, exec_filepath) print_status() print_status('** Run `exec -l $SHELL` to restart your shell. **') print_status() @@ -280,59 +225,16 @@ def verify_python_version(): print_status('Python version {}.{}.{} okay.'.format(v.major, v.minor, v.micro)) -def _native_dependencies_for_dist(verify_cmd_args, install_cmd_args, dep_list): - try: - print_status("Executing: '{} {}'".format(' '.join(verify_cmd_args), ' '.join(dep_list))) - subprocess.check_output(verify_cmd_args + dep_list, stderr=subprocess.STDOUT) - print_status('Native dependencies okay.') - except subprocess.CalledProcessError: - err_msg = 'One or more of the following native dependencies are not currently installed and may be required.\n' - err_msg += '"{}"'.format(' '.join(install_cmd_args + dep_list)) - print_status(err_msg) - ans_yes = prompt_y_n('Missing native dependencies. Attempt to continue anyway?', 'n') - if not ans_yes: - raise CLIInstallError('Please install the native dependencies and try again.') - - -def _get_linux_distro(): - if platform.system() != 'Linux': - return None, None - - try: - with open('/etc/os-release') as lines: - tokens = [line.strip() for line in lines] - except Exception: - return None, None - - release_info = {} - for token in tokens: - if '=' in token: - k, v = token.split('=', 1) - release_info[k.lower()] = v.strip('"') - - return release_info.get('name', None), release_info.get('version_id', None) - - -def verify_install_dir_exec_path_conflict(install_dir, exec_dir): - for exec_name in [PF_EXECUTABLE_NAME, PFAZURE_EXECUTABLE_NAME, PFS_EXECUTABLE_NAME]: - exec_path = os.path.join(exec_dir, exec_name) - if install_dir == exec_path: - raise CLIInstallError("The executable file '{}' would clash with the install directory of '{}'. Choose " - "either a different install directory or directory to place the " - "executable.".format(exec_path, install_dir)) - - def main(): verify_python_version() tmp_dir = create_tmp_dir() install_dir = get_install_dir() - exec_dir = get_exec_dir() - verify_install_dir_exec_path_conflict(install_dir, exec_dir) create_virtualenv(install_dir) install_cli(install_dir, tmp_dir) - exec_filepath = create_executable(exec_dir, install_dir) + exec_filepath = [os.path.join(install_dir, "bin", PF_EXECUTABLE_NAME), + os.path.join(install_dir, "bin", PFAZURE_EXECUTABLE_NAME)] try: - handle_path_and_tab_completion(exec_filepath, exec_dir) + handle_path_and_tab_completion(exec_filepath, install_dir) except Exception as e: print_status("Unable to set up PATH. ERROR: {}".format(str(e))) shutil.rmtree(tmp_dir) @@ -351,10 +253,10 @@ def main(): sys.exit(1) # SIG # Begin signature block -# Z1F07ShfIJ7kejST2NXwW1QcFPEya4xaO2xZz6vLT847zaMzbc/PaEa1RKFlD881 -# 4J+i6Au2wtbHzOXDisyH6WeLQ3gh0X2gxFRa4EzW7Nzjcvwm4+WogiTcnPVVxlk3 -# qafM/oyVqs3695K7W5XttOiq2guv/yedsf/TW2BKSEKruFQh9IwDfIiBoi9Zv3wa -# iuzQulRR8KyrCtjEPDV0t4WnZVB/edQea6xJZeTlMG+uLR/miBTbPhUb/VZkVjBf -# qHBv623oLXICzoTNuaPTln9OWvL2NZpisGYvNzebKO7/Ho6AOWZNs5XOVnjs0Ax2 -# aeXvlwBzIQyfyxd25487/Q== +# Op0/tmmNDX4QgQefj28K91e/ClVKWeYaA1w1kb5Hi8ALJZtmvyhwvxYlCRZ9eWT+ +# wFBfSvpUIzAWYxEMfVqqWy7g9AzqHGa5vE37zQ7uGkIyR0OsmO0bkauOv5FxuCWX +# U0u9d9sir6sRTb2nrEj2O1EXAcP2xNaW77w1fcOtMX9W6ytHXx/+v5p387+/HBnQ +# y00GvJrrcIJeRj4MboBdDdv0VgGJAAlTJp0hxO0lt5ZQUMJvi/sM4e1cPUTcx7uB +# djCmvSZzZrJO2ZIIWiyiP2XNYWJv4A9klJWMbWKukeZOSjxYPS0pO2mTftkKoL5U +# sOJu9RtRWIIx/kLG/Axliw== # SIG # End signature block diff --git a/scripts/installer/windows/README.md b/scripts/installer/windows/README.md index 95657c1c821..7a8564bcd3b 100644 --- a/scripts/installer/windows/README.md +++ b/scripts/installer/windows/README.md @@ -20,14 +20,16 @@ Trigger the [workflow](https://github.com/microsoft/promptflow/actions/workflows 5. We recommend creating a clean virtual Python environment and installing all dependencies using src/promptflow/setup.py. - `python -m venv venv` - `venv\Scripts\activate` - - `pip install promptflow[azure,executable] promptflow-tools` + - `pip install promptflow[azure,executable,azureml-serving,executor-service] promptflow-tools` ### Building 1. Update the version number `$(env.CLI_VERSION)` and `$(env.FILE_VERSION)` in `product.wxs`, `promptflow.wixproj` and `version_info.txt`. -2. `cd scripts/installer/windows/scripts` and run `pyinstaller promptflow.spec`. -3. `cd scripts/installer/windows` and Run `msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj`. -4. The unsigned MSI will be in the `scripts/installer/windows/out` folder. +2. `cd scripts/installer/windows/scripts` and run `python generate_dependency.py`. +3. run `pyinstaller promptflow.spec`. +4. `cd scripts/installer/windows` and Run `msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64 promptflow.wixproj`. +5. The unsigned MSI will be in the `scripts/installer/windows/out` folder. ## Notes -- If you encounter "Access is denied" error when running promptflow. Please follow the [link](https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/attack-surface-reduction-rules-deployment-implement?view=o365-worldwide#customize-attack-surface-reduction-rules) to add the executable to the Windows Defender Attack Surface Reduction (ASR) rule. \ No newline at end of file +- If you encounter "Access is denied" error when running promptflow. Please follow the [link](https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/attack-surface-reduction-rules-deployment-implement?view=o365-worldwide#customize-attack-surface-reduction-rules) to add the executable to the Windows Defender Attack Surface Reduction (ASR) rule. +Or you can add promptflow installation folder to the Windows Defender exclusion list. \ No newline at end of file diff --git a/scripts/installer/windows/scripts/generate_dependency.py b/scripts/installer/windows/scripts/generate_dependency.py new file mode 100644 index 00000000000..fd365df7e4c --- /dev/null +++ b/scripts/installer/windows/scripts/generate_dependency.py @@ -0,0 +1,136 @@ +import ast +import re +import subprocess +import copy +from pip._vendor import tomli as toml +from pathlib import Path +from promptflow._sdk._utils import render_jinja_template + + +def get_git_base_dir(): + return Path( + subprocess.run(['git', 'rev-parse', '--show-toplevel'], stdout=subprocess.PIPE) + .stdout.decode('utf-8').strip()) + + +def is_tool(name): + """Check whether `name` is on PATH and marked as executable.""" + + # from whichcraft import which + from shutil import which + + return which(name) is not None + + +def extract_requirements(file_path): + with open(file_path, 'r') as file: + tree = ast.parse(file.read()) + + install_requires = [] + extras_requires = {} + for node in ast.walk(tree): + if isinstance(node, ast.Assign) and node.targets[0].id == 'REQUIRES': + install_requires = [elt.s for elt in node.value.elts] + elif isinstance(node, ast.Call) and getattr(node.func, 'id', None) == 'setup': + for keyword in node.keywords: + if keyword.arg == 'extras_require': + extras_requires = ast.literal_eval(keyword.value) + return install_requires, extras_requires + + +def extract_package_names(packages): + package_names = [] + for package in packages: + match = re.match(r'^([a-zA-Z0-9-_.]+)', package) + if match: + package_names.append(match.group(1)) + return package_names + + +def get_toml_dependencies(packages): + file_list = ["promptflow-tracing", "promptflow-core", "promptflow-devkit", "promptflow-azure"] + dependencies = [] + + for package in packages: + if package in file_list: + with open(get_git_base_dir() / "src" / package / "pyproject.toml", 'rb') as file: + data = toml.load(file) + extra_package_names = data.get('tool', {}).get('poetry', {}).get('dependencies', {}) + dependencies.extend(extra_package_names.keys()) + dependencies = [dependency for dependency in dependencies + if not dependency.startswith('promptflow') and not dependency == 'python'] + return dependencies + + +def get_package_dependencies(package_name_list): + dependencies = [] + for package_name in package_name_list: + if (is_tool('conda')): + result = subprocess.run('conda activate root | pip show {}'.format(package_name), + shell=True, stdout=subprocess.PIPE) + else: + result = subprocess.run(['pip', 'show', package_name], stdout=subprocess.PIPE) + print("---" + package_name) + print(result.stdout) + lines = result.stdout.decode('utf-8', errors="ignore").splitlines() + for line in lines: + if line.startswith('Requires'): + dependency = line.split(': ')[1].split(', ') + if dependency != ['']: + dependencies.extend(dependency) + break + + dependencies = [dependency for dependency in dependencies if not dependency.startswith('promptflow')] + return dependencies + + +if __name__ == '__main__': + dependencies = [] + install_requires, extras_requires = extract_requirements(get_git_base_dir() / 'src/promptflow/setup.py') + install_requires_names = extract_package_names(install_requires) + dependencies.extend(install_requires_names) + + for key in extras_requires: + extras_require_names = extract_package_names(extras_requires[key]) + dependencies.extend(extras_require_names) + # get toml dependencies + dependencies = list(set(dependencies)) + direct_package_dependencies = get_toml_dependencies(dependencies) + + # get one step furture for dependencies + dependencies = list(set(direct_package_dependencies)) + direct_package_dependencies = get_package_dependencies(dependencies) + + # get all dependencies + all_packages = list(set(dependencies) | set(direct_package_dependencies)) + + # remove all packages starting with promptflow + all_packages = [package for package in all_packages if not package.startswith('promptflow')] + + hidden_imports = copy.deepcopy(all_packages) + meta_packages = copy.deepcopy(all_packages) + + special_packages = ["streamlit-quill", "flask-cors", "flask-restx"] + for i in range(len(hidden_imports)): + # need special handeling because it use _ to import + if hidden_imports[i] in special_packages: + hidden_imports[i] = hidden_imports[i].replace('-', '_').lower() + else: + hidden_imports[i] = hidden_imports[i].replace('-', '.').lower() + + hidden_imports.remove("azure.storage.file.share") + hidden_imports.append("azure.storage.fileshare") + hidden_imports.remove("azure.storage.file.datalake") + hidden_imports.append("azure.storage.filedatalake") + + render_context = { + "hidden_imports": hidden_imports, + "all_packages": all_packages, + "meta_packages": meta_packages, + } + # always use unix line ending + Path("./promptflow.spec").write_bytes( + render_jinja_template( + get_git_base_dir() / "scripts/installer/windows/scripts/promptflow.spec.jinja2", **render_context) + .encode("utf-8") + .replace(b"\r\n", b"\n"),) diff --git a/scripts/installer/windows/scripts/pf.bat b/scripts/installer/windows/scripts/pf.bat index 549ba723590..b4319cce62d 100644 --- a/scripts/installer/windows/scripts/pf.bat +++ b/scripts/installer/windows/scripts/pf.bat @@ -3,4 +3,17 @@ setlocal SET PF_INSTALLER=MSI set MAIN_EXE=%~dp0.\pfcli.exe -"%MAIN_EXE%" pf %* \ No newline at end of file +REM Check if the first argument is 'start' +if "%~1"=="service" ( + REM Check if the second argument is 'start' + if "%~2"=="start" ( + cscript //nologo %~dp0.\start_pfs.vbs """%MAIN_EXE%"" pf %*" + REM since we won't wait for vbs to finish, we need to wait for the output file to be flushed to disk + timeout /t 5 >nul + type "%~dp0output.txt" + ) else ( + "%MAIN_EXE%" pf %* + ) +) else ( + "%MAIN_EXE%" pf %* +) \ No newline at end of file diff --git a/scripts/installer/windows/scripts/pfcli.py b/scripts/installer/windows/scripts/pfcli.py index e5a71768290..6ced55dd24e 100644 --- a/scripts/installer/windows/scripts/pfcli.py +++ b/scripts/installer/windows/scripts/pfcli.py @@ -11,13 +11,7 @@ from promptflow._cli._pf.entry import main as pf_main pf_main() elif command == 'pfazure': - from promptflow._cli._pf_azure.entry import main as pfazure_main + from promptflow.azure._cli.entry import main as pfazure_main pfazure_main() - elif command == 'pfs': - from promptflow._sdk._service.entry import main as pfs_main - pfs_main() - elif command == 'pfsvc': - from promptflow._sdk._service.pfsvc import init as pfsvc_init - pfsvc_init() else: - print(f"Invalid command {sys.argv}. Please use 'pf', 'pfazure', 'pfs' or 'pfsvc'.") + print(f"Invalid command {sys.argv}. Please use 'pf', 'pfazure'.") diff --git a/scripts/installer/windows/scripts/pfs.bat b/scripts/installer/windows/scripts/pfs.bat deleted file mode 100644 index 9f402a1640c..00000000000 --- a/scripts/installer/windows/scripts/pfs.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -setlocal - -set MAIN_EXE=%~dp0.\pfcli.exe -"%MAIN_EXE%" pfs %* \ No newline at end of file diff --git a/scripts/installer/windows/scripts/pfsvc.bat b/scripts/installer/windows/scripts/pfsvc.bat deleted file mode 100644 index 957ae245cb7..00000000000 --- a/scripts/installer/windows/scripts/pfsvc.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -setlocal - -set MAIN_EXE=%~dp0.\pfcli.exe -"%MAIN_EXE%" pfsvc %* \ No newline at end of file diff --git a/scripts/installer/windows/scripts/promptflow.spec b/scripts/installer/windows/scripts/promptflow.spec.jinja2 similarity index 58% rename from scripts/installer/windows/scripts/promptflow.spec rename to scripts/installer/windows/scripts/promptflow.spec.jinja2 index a1f3955be85..64c591fbe10 100644 --- a/scripts/installer/windows/scripts/promptflow.spec +++ b/scripts/installer/windows/scripts/promptflow.spec.jinja2 @@ -1,25 +1,38 @@ # -*- mode: python ; coding: utf-8 -*- -from PyInstaller.utils.hooks import collect_data_files -from PyInstaller.utils.hooks import copy_metadata +from PyInstaller.utils.hooks import collect_data_files, collect_all, copy_metadata datas = [('../resources/CLI_LICENSE.rtf', '.'), ('../../../../src/promptflow/NOTICE.txt', '.'), -('../../../../src/promptflow/promptflow/_sdk/data/executable/', './promptflow/_sdk/data/executable/'), +('../../../../src/promptflow-devkit/promptflow/_sdk/data/executable/', './promptflow/_sdk/data/executable/'), ('../../../../src/promptflow-tools/promptflow/tools/', './promptflow/tools/'), -('./pf.bat', '.'), ('./pfs.bat', '.'), ('./pfazure.bat', '.'), ('./pfsvc.bat', '.')] +('./pf.bat', '.'), ('./pfazure.bat', '.'), ('./start_pfs.vbs', '.')] -datas += collect_data_files('streamlit') -datas += copy_metadata('streamlit') + +all_packages = {{all_packages}} +meta_packages = {{meta_packages}} + +for package in all_packages: + datas += collect_data_files(package) + +for package in meta_packages: + datas += copy_metadata(package) + +opentelemetry_datas, opentelemetry_binaries, opentelemetry_hiddenimports = collect_all('opentelemetry') +datas += opentelemetry_datas datas += collect_data_files('streamlit_quill') datas += collect_data_files('promptflow') -datas += copy_metadata('opentelemetry-sdk') -hidden_imports = ['streamlit.runtime.scriptrunner.magic_funcs', 'win32timezone', 'promptflow', 'opentelemetry.exporter.otlp.proto.http'] +datas += copy_metadata('promptflow') +hidden_imports = ['win32timezone', 'promptflow', 'opentelemetry.context.contextvars_context', 'streamlit.runtime.scriptrunner.magic_funcs'] + {{hidden_imports}} + +hidden_imports += opentelemetry_hiddenimports +binaries = [] +binaries += opentelemetry_binaries block_cipher = None pfcli_a = Analysis( ['pfcli.py'], pathex=[], - binaries=[], + binaries=binaries, datas=datas, hiddenimports=hidden_imports, hookspath=[], @@ -62,4 +75,4 @@ coll = COLLECT( upx=True, upx_exclude=[], name='promptflow', -) +) \ No newline at end of file diff --git a/scripts/installer/windows/scripts/promptflow_service.vbs b/scripts/installer/windows/scripts/promptflow_service.vbs index 4fea58c1743..0d01c144ffa 100644 --- a/scripts/installer/windows/scripts/promptflow_service.vbs +++ b/scripts/installer/windows/scripts/promptflow_service.vbs @@ -1,3 +1,3 @@ DIM objshell set objshell = wscript.createobject("wscript.shell") -iReturn = objshell.run("pfs.bat start --force", 0, true) \ No newline at end of file +iReturn = objshell.run("pfcli.exe pf service start --force", 0, true) \ No newline at end of file diff --git a/scripts/installer/windows/scripts/start_pfs.vbs b/scripts/installer/windows/scripts/start_pfs.vbs new file mode 100644 index 00000000000..8b75eb91d1f --- /dev/null +++ b/scripts/installer/windows/scripts/start_pfs.vbs @@ -0,0 +1,4 @@ +DIM objshell +set objshell = wscript.createobject("wscript.shell") +cmd = WScript.Arguments(0) +iReturn = objshell.run(cmd, 0, false) \ No newline at end of file diff --git a/scripts/readme/schema_checker.py b/scripts/readme/schema_checker.py index 16d7d32256d..c2fcc93e966 100644 --- a/scripts/readme/schema_checker.py +++ b/scripts/readme/schema_checker.py @@ -30,7 +30,17 @@ def main(input_glob_flow_dag): if error is False: new_links = [] if (Path(file).parent / "requirements.txt").exists(): + # remove all promptflow lines in requirements.txt + # and save time, or else it will check all dependencies of promptflow time by time + with open(Path(file).parent / "requirements.txt", "r") as f: + lines = f.readlines() + with open(Path(file).parent / "requirements.txt", "w") as f: + for line in lines: + if "promptflow" not in line: + f.write(line) + install(Path(file).parent / "requirements.txt") + if "flow-with-symlinks" in str(file): saved_path = os.getcwd() os.chdir(str(file.parent)) diff --git a/scripts/readme/workflow_generator.py b/scripts/readme/workflow_generator.py index 3e79887b2f6..86e2217c86b 100644 --- a/scripts/readme/workflow_generator.py +++ b/scripts/readme/workflow_generator.py @@ -72,7 +72,7 @@ def write_notebook_workflow(notebook, name, output_telemetry=Telemetry()): # these workflows require config.json to init PF/ML client workflows_require_config_json = [ "configuration", - "flowinpipeline", + "runflowwithpipeline", "quickstartazure", "cloudrunmanagement", ] diff --git a/setup.cfg b/setup.cfg index 74a0db43987..a35c3e642ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,8 +11,9 @@ exclude = docs/* venv,.pytest_cache build - src/promptflow/promptflow/azure/_restclient - src/promptflow/promptflow/azure/_models + src/promptflow-azure/promptflow/azure/_restclient + src/promptflow-azure/promptflow/azure/_models + src/promptflow-core/promptflow/core/_connection_provider/_models src/promptflow/tests/test_configs/* import-order-style = google @@ -50,4 +51,4 @@ skip_glob = [ samples/**, ] known_third_party = azure,mock,numpy,pandas,pydash,pytest,pytest_mock,requests,setuptools,six,sklearn,tqdm,urllib3,utilities,utils,yaml,jsonschema,strictyaml,jwt,pathspec,isodate,docker -known_first_party = promptflow,promptflow_test +known_first_party = promptflow diff --git a/src/promptflow-azure/README.md b/src/promptflow-azure/README.md new file mode 100644 index 00000000000..f76d9f22350 --- /dev/null +++ b/src/promptflow-azure/README.md @@ -0,0 +1,24 @@ +# Prompt flow azure + +[![Python package](https://img.shields.io/pypi/v/promptflow-azure)](https://pypi.org/project/promptflow-azure/) +[![Python](https://img.shields.io/pypi/pyversions/promptflow.svg?maxAge=2592000)](https://pypi.python.org/pypi/promptflow-azure/) +[![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow-azure)](https://pypi.org/project/promptflow-azure/) +[![CLI](https://img.shields.io/badge/CLI-reference-blue)](https://microsoft.github.io/promptflow/reference/pfazure-command-reference.html) +[![SDK](https://img.shields.io/badge/SDK-reference-blue)](https://microsoft.github.io/promptflow/reference/python-library-reference/promptflow-azure/promptflow.azure.html) + +## Introduction + +Azure Machine Learning prompt flow is a development tool designed to streamline the entire development cycle of AI applications powered by Large Language Models (LLMs). As the momentum for LLM-based AI applications continues to grow across the globe, Azure Machine Learning prompt flow provides a comprehensive solution that simplifies the process of prototyping, experimenting, iterating, and deploying your AI applications. + +The `promptflow-azure` package help user to leverage the cloud version of [prompt flow in Azure AI](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/overview-what-is-prompt-flow?view=azureml-api-2), which provides below features: + +- Create executable flows that link LLMs, prompts, and Python tools through a visualized graph or flex flow code. +- Debug, share, and iterate your flows with ease through team collaboration. +- Evaluate their performance through large-scale batch run. + + +# Release History + +## 0.1.0b1 (Upcoming) + +- Stub version in PyPI. diff --git a/src/promptflow/promptflow/azure/__init__.py b/src/promptflow-azure/promptflow/azure/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/__init__.py rename to src/promptflow-azure/promptflow/azure/__init__.py diff --git a/src/promptflow/promptflow/_cli/__init__.py b/src/promptflow-azure/promptflow/azure/_cli/__init__.py similarity index 100% rename from src/promptflow/promptflow/_cli/__init__.py rename to src/promptflow-azure/promptflow/azure/_cli/__init__.py diff --git a/src/promptflow/promptflow/_cli/_pf_azure/_connection.py b/src/promptflow-azure/promptflow/azure/_cli/_connection.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf_azure/_connection.py rename to src/promptflow-azure/promptflow/azure/_cli/_connection.py diff --git a/src/promptflow/promptflow/_cli/_pf_azure/_flow.py b/src/promptflow-azure/promptflow/azure/_cli/_flow.py similarity index 99% rename from src/promptflow/promptflow/_cli/_pf_azure/_flow.py rename to src/promptflow-azure/promptflow/azure/_cli/_flow.py index 563e2d8567b..b339b2daa5e 100644 --- a/src/promptflow/promptflow/_cli/_pf_azure/_flow.py +++ b/src/promptflow-azure/promptflow/azure/_cli/_flow.py @@ -16,13 +16,13 @@ add_param_set, base_params, ) -from promptflow._cli._pf_azure._utils import _get_azure_pf_client from promptflow._cli._utils import ( _output_result_list_with_format, _set_workspace_argument_for_subparsers, activate_action, ) from promptflow._sdk._constants import AzureFlowSource, get_list_view_type +from promptflow.azure._cli._utils import _get_azure_pf_client from promptflow.azure._entities._flow import Flow diff --git a/src/promptflow/promptflow/_cli/_pf_azure/_run.py b/src/promptflow-azure/promptflow/azure/_cli/_run.py similarity index 99% rename from src/promptflow/promptflow/_cli/_pf_azure/_run.py rename to src/promptflow-azure/promptflow/azure/_cli/_run.py index f4df8553a1e..198c183b816 100644 --- a/src/promptflow/promptflow/_cli/_pf_azure/_run.py +++ b/src/promptflow-azure/promptflow/azure/_cli/_run.py @@ -20,7 +20,6 @@ base_params, ) from promptflow._cli._pf._run import _parse_metadata_args, add_run_create_common, create_run -from promptflow._cli._pf_azure._utils import _get_azure_pf_client from promptflow._cli._utils import ( _output_result_list_with_format, _set_workspace_argument_for_subparsers, @@ -30,6 +29,7 @@ from promptflow._sdk._constants import MAX_SHOW_DETAILS_RESULTS, ListViewType from promptflow._sdk._errors import InvalidRunStatusError from promptflow._sdk._utils import print_red_error +from promptflow.azure._cli._utils import _get_azure_pf_client from promptflow.azure._restclient.flow_service_caller import FlowRequestException diff --git a/src/promptflow/promptflow/_cli/_pf_azure/_utils.py b/src/promptflow-azure/promptflow/azure/_cli/_utils.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf_azure/_utils.py rename to src/promptflow-azure/promptflow/azure/_cli/_utils.py diff --git a/src/promptflow/promptflow/_cli/_pf_azure/entry.py b/src/promptflow-azure/promptflow/azure/_cli/entry.py similarity index 90% rename from src/promptflow/promptflow/_cli/_pf_azure/entry.py rename to src/promptflow-azure/promptflow/azure/_cli/entry.py index bb15ec9972d..14113c8d06b 100644 --- a/src/promptflow/promptflow/_cli/_pf_azure/entry.py +++ b/src/promptflow-azure/promptflow/azure/_cli/entry.py @@ -7,7 +7,7 @@ from promptflow._cli._pf.help import show_privacy_statement, show_welcome_message from promptflow._cli._user_agent import USER_AGENT -from promptflow._cli._utils import _get_cli_activity_name, get_client_info_for_cli, cli_exception_and_telemetry_handler +from promptflow._cli._utils import _get_cli_activity_name, cli_exception_and_telemetry_handler, get_client_info_for_cli # Log the start time start_time = time.perf_counter() @@ -17,14 +17,11 @@ import logging # noqa: E402 import sys # noqa: E402 -from promptflow._cli._pf_azure._flow import add_parser_flow, dispatch_flow_commands # noqa: E402 -from promptflow._cli._pf_azure._run import add_parser_run, dispatch_run_commands # noqa: E402 -from promptflow._sdk._utils import ( # noqa: E402 - get_promptflow_sdk_version, - print_pf_version, - setup_user_agent_to_operation_context, -) +from promptflow._sdk._utils import get_promptflow_sdk_version, print_pf_version # noqa: E402 from promptflow._utils.logger_utils import get_cli_sdk_logger # noqa: E402 +from promptflow._utils.user_agent_utils import setup_user_agent_to_operation_context # noqa: E402 +from promptflow.azure._cli._flow import add_parser_flow, dispatch_flow_commands # noqa: E402 +from promptflow.azure._cli._run import add_parser_run, dispatch_run_commands # noqa: E402 # get logger for CLI logger = get_cli_sdk_logger() diff --git a/src/promptflow/promptflow/azure/_constants/__init__.py b/src/promptflow-azure/promptflow/azure/_constants/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_constants/__init__.py rename to src/promptflow-azure/promptflow/azure/_constants/__init__.py diff --git a/src/promptflow/promptflow/azure/_constants/_component.py b/src/promptflow-azure/promptflow/azure/_constants/_component.py similarity index 100% rename from src/promptflow/promptflow/azure/_constants/_component.py rename to src/promptflow-azure/promptflow/azure/_constants/_component.py diff --git a/src/promptflow/promptflow/azure/_constants/_flow.py b/src/promptflow-azure/promptflow/azure/_constants/_flow.py similarity index 100% rename from src/promptflow/promptflow/azure/_constants/_flow.py rename to src/promptflow-azure/promptflow/azure/_constants/_flow.py diff --git a/src/promptflow/promptflow/_cli/_pf/__init__.py b/src/promptflow-azure/promptflow/azure/_entities/__init__.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf/__init__.py rename to src/promptflow-azure/promptflow/azure/_entities/__init__.py diff --git a/src/promptflow/promptflow/azure/_entities/_flow.py b/src/promptflow-azure/promptflow/azure/_entities/_flow.py similarity index 97% rename from src/promptflow/promptflow/azure/_entities/_flow.py rename to src/promptflow-azure/promptflow/azure/_entities/_flow.py index 5e5daf21ea2..c18a7815640 100644 --- a/src/promptflow/promptflow/azure/_entities/_flow.py +++ b/src/promptflow-azure/promptflow/azure/_entities/_flow.py @@ -10,13 +10,13 @@ import pydash +from promptflow._constants import FlowLanguage from promptflow._sdk._constants import DAG_FILE_NAME, SERVICE_FLOW_TYPE_2_CLIENT_FLOW_TYPE, AzureFlowSource, FlowType +from promptflow._sdk._utils import PromptflowIgnoreFile, load_yaml, remove_empty_element_from_dict +from promptflow._utils.flow_utils import dump_flow_dag, load_flow_dag +from promptflow._utils.logger_utils import LoggerFactory from promptflow.azure._ml import AdditionalIncludesMixin, Code -from ..._constants import FlowLanguage -from ..._sdk._utils import PromptflowIgnoreFile, load_yaml, remove_empty_element_from_dict -from ..._utils.flow_utils import dump_flow_dag, load_flow_dag -from ..._utils.logger_utils import LoggerFactory from .._constants._flow import ADDITIONAL_INCLUDES, DEFAULT_STORAGE, ENVIRONMENT, PYTHON_REQUIREMENTS_TXT from .._restclient.flow.models import FlowDto diff --git a/src/promptflow/promptflow/azure/_entities/_workspace_connection_spec.py b/src/promptflow-azure/promptflow/azure/_entities/_workspace_connection_spec.py similarity index 100% rename from src/promptflow/promptflow/azure/_entities/_workspace_connection_spec.py rename to src/promptflow-azure/promptflow/azure/_entities/_workspace_connection_spec.py diff --git a/src/promptflow/promptflow/azure/_load_functions.py b/src/promptflow-azure/promptflow/azure/_load_functions.py similarity index 100% rename from src/promptflow/promptflow/azure/_load_functions.py rename to src/promptflow-azure/promptflow/azure/_load_functions.py diff --git a/src/promptflow/promptflow/azure/_ml/__init__.py b/src/promptflow-azure/promptflow/azure/_ml/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_ml/__init__.py rename to src/promptflow-azure/promptflow/azure/_ml/__init__.py diff --git a/src/promptflow/promptflow/azure/_pf_client.py b/src/promptflow-azure/promptflow/azure/_pf_client.py similarity index 92% rename from src/promptflow/promptflow/azure/_pf_client.py rename to src/promptflow-azure/promptflow/azure/_pf_client.py index cc0a22c431f..a81c370015f 100644 --- a/src/promptflow/promptflow/azure/_pf_client.py +++ b/src/promptflow-azure/promptflow/azure/_pf_client.py @@ -11,8 +11,9 @@ from promptflow._sdk._constants import MAX_SHOW_DETAILS_RESULTS from promptflow._sdk._errors import RunOperationParameterError from promptflow._sdk._user_agent import USER_AGENT -from promptflow._sdk._utils import ClientUserAgentUtil, setup_user_agent_to_operation_context +from promptflow._sdk._utils import generate_yaml_entry from promptflow._sdk.entities import Run +from promptflow._utils.user_agent_utils import ClientUserAgentUtil, setup_user_agent_to_operation_context from promptflow.azure._restclient.service_caller_factory import _FlowServiceCallerFactory from promptflow.azure.operations import RunOperations from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations @@ -196,6 +197,8 @@ def run( display_name: str = None, tags: Dict[str, str] = None, resume_from: Union[str, Run] = None, + code: Union[str, PathLike] = None, + init: Optional[dict] = None, **kwargs, ) -> Run: """Run flow against provided data or run. @@ -251,9 +254,16 @@ def run( :type tags: Dict[str, str] :param resume_from: Create run resume from an existing run. :type resume_from: str + :param code: Path to the code directory to run. + :type code: Union[str, PathLike] + :param init: Initialization parameters for flex flow, only supported when flow is callable class. + :type init: dict :return: flow run info. :rtype: ~promptflow.entities.Run """ + # TODO(3047273): support cloud run init + if init: + raise NotImplementedError("init is not supported for pfazure.") if resume_from: unsupported = { k: v @@ -276,20 +286,22 @@ def run( return self.runs._create_by_resume_from( resume_from=resume_from, name=name, display_name=display_name, tags=tags, **kwargs ) - # TODO(2887134): support cloud eager Run CRUD - run = Run( - name=name, - display_name=display_name, - tags=tags, - data=data, - column_mapping=column_mapping, - run=run, - variant=variant, - flow=flow, - connections=connections, - environment_variables=environment_variables, - ) - return self.runs.create_or_update(run=run, **kwargs) + if callable(flow): + raise UserErrorException(f"Providing callable {flow} as flow is not supported.") + with generate_yaml_entry(entry=flow, code=code) as flow: + run = Run( + name=name, + display_name=display_name, + tags=tags, + data=data, + column_mapping=column_mapping, + run=run, + variant=variant, + flow=flow, + connections=connections, + environment_variables=environment_variables, + ) + return self.runs.create_or_update(run=run, **kwargs) def stream(self, run: Union[str, Run], raise_on_error: bool = True) -> Run: """Stream run logs to the console. diff --git a/src/promptflow/promptflow/azure/_restclient/README.md b/src/promptflow-azure/promptflow/azure/_restclient/README.md similarity index 96% rename from src/promptflow/promptflow/azure/_restclient/README.md rename to src/promptflow-azure/promptflow/azure/_restclient/README.md index cbb1b00ff8d..9a4b0eeec55 100644 --- a/src/promptflow/promptflow/azure/_restclient/README.md +++ b/src/promptflow-azure/promptflow/azure/_restclient/README.md @@ -22,6 +22,7 @@ Download swagger.json from [here](https://int.api.azureml-test.ms/flow/swagger/v - 2024.2.2 - [Support specify compute instance as session compute](https://github.com/microsoft/promptflow/pull/1925) - 2024.2.5 - [Support retrieve Cosmos token](https://github.com/microsoft/promptflow/pull/1972) - 2024.2.19 - [Update SDK restclient](https://github.com/microsoft/promptflow/pull/2165) +- 2024.3.14 - [Add enable_multi_container](https://github.com/microsoft/promptflow/pull/2313) ## Troubleshooting diff --git a/src/promptflow/promptflow/_core/__init__.py b/src/promptflow-azure/promptflow/azure/_restclient/__init__.py similarity index 100% rename from src/promptflow/promptflow/_core/__init__.py rename to src/promptflow-azure/promptflow/azure/_restclient/__init__.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/__init__.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/__init__.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/__init__.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/_azure_machine_learning_designer_service_client.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/_azure_machine_learning_designer_service_client.py similarity index 88% rename from src/promptflow/promptflow/azure/_restclient/flow/_azure_machine_learning_designer_service_client.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/_azure_machine_learning_designer_service_client.py index 9911fa57f17..4278f9314e6 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/_azure_machine_learning_designer_service_client.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/_azure_machine_learning_designer_service_client.py @@ -12,7 +12,7 @@ from . import models from ._configuration import AzureMachineLearningDesignerServiceClientConfiguration -from .operations import BulkRunsOperations, ConnectionOperations, ConnectionsOperations, FlowRuntimesOperations, FlowRuntimesWorkspaceIndependentOperations, FlowSessionsOperations, FlowsOperations, FlowsProviderOperations, ToolsOperations, TraceSessionsOperations +from .operations import BulkRunsOperations, ConnectionOperations, ConnectionsOperations, ExperimentTemplatesOperations, ExperimentsOperations, FlowRuntimesOperations, FlowRuntimesWorkspaceIndependentOperations, FlowSessionsOperations, FlowsOperations, FlowsProviderOperations, ToolsOperations, TraceSessionsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -29,6 +29,10 @@ class AzureMachineLearningDesignerServiceClient(object): :vartype connection: flow.operations.ConnectionOperations :ivar connections: ConnectionsOperations operations :vartype connections: flow.operations.ConnectionsOperations + :ivar experiments: ExperimentsOperations operations + :vartype experiments: flow.operations.ExperimentsOperations + :ivar experiment_templates: ExperimentTemplatesOperations operations + :vartype experiment_templates: flow.operations.ExperimentTemplatesOperations :ivar flow_runtimes: FlowRuntimesOperations operations :vartype flow_runtimes: flow.operations.FlowRuntimesOperations :ivar flow_runtimes_workspace_independent: FlowRuntimesWorkspaceIndependentOperations @@ -68,6 +72,8 @@ def __init__( self.bulk_runs = BulkRunsOperations(self._client, self._config, self._serialize, self._deserialize) self.connection = ConnectionOperations(self._client, self._config, self._serialize, self._deserialize) self.connections = ConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.experiments = ExperimentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.experiment_templates = ExperimentTemplatesOperations(self._client, self._config, self._serialize, self._deserialize) self.flow_runtimes = FlowRuntimesOperations(self._client, self._config, self._serialize, self._deserialize) self.flow_runtimes_workspace_independent = FlowRuntimesWorkspaceIndependentOperations(self._client, self._config, self._serialize, self._deserialize) self.flows = FlowsOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/src/promptflow/promptflow/azure/_restclient/flow/_configuration.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/_configuration.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/_configuration.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/_configuration.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/_patch.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/_patch.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/_patch.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/_patch.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/_vendor.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/_vendor.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/_vendor.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/_vendor.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/__init__.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/__init__.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/__init__.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py similarity index 87% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py index 4066ccb21c3..e9f3a30193c 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/_azure_machine_learning_designer_service_client.py @@ -13,7 +13,7 @@ from .. import models from ._configuration import AzureMachineLearningDesignerServiceClientConfiguration -from .operations import BulkRunsOperations, ConnectionOperations, ConnectionsOperations, FlowRuntimesOperations, FlowRuntimesWorkspaceIndependentOperations, FlowSessionsOperations, FlowsOperations, FlowsProviderOperations, ToolsOperations, TraceSessionsOperations +from .operations import BulkRunsOperations, ConnectionOperations, ConnectionsOperations, ExperimentTemplatesOperations, ExperimentsOperations, FlowRuntimesOperations, FlowRuntimesWorkspaceIndependentOperations, FlowSessionsOperations, FlowsOperations, FlowsProviderOperations, ToolsOperations, TraceSessionsOperations class AzureMachineLearningDesignerServiceClient: """AzureMachineLearningDesignerServiceClient. @@ -24,6 +24,10 @@ class AzureMachineLearningDesignerServiceClient: :vartype connection: flow.aio.operations.ConnectionOperations :ivar connections: ConnectionsOperations operations :vartype connections: flow.aio.operations.ConnectionsOperations + :ivar experiments: ExperimentsOperations operations + :vartype experiments: flow.aio.operations.ExperimentsOperations + :ivar experiment_templates: ExperimentTemplatesOperations operations + :vartype experiment_templates: flow.aio.operations.ExperimentTemplatesOperations :ivar flow_runtimes: FlowRuntimesOperations operations :vartype flow_runtimes: flow.aio.operations.FlowRuntimesOperations :ivar flow_runtimes_workspace_independent: FlowRuntimesWorkspaceIndependentOperations @@ -62,6 +66,8 @@ def __init__( self.bulk_runs = BulkRunsOperations(self._client, self._config, self._serialize, self._deserialize) self.connection = ConnectionOperations(self._client, self._config, self._serialize, self._deserialize) self.connections = ConnectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.experiments = ExperimentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.experiment_templates = ExperimentTemplatesOperations(self._client, self._config, self._serialize, self._deserialize) self.flow_runtimes = FlowRuntimesOperations(self._client, self._config, self._serialize, self._deserialize) self.flow_runtimes_workspace_independent = FlowRuntimesWorkspaceIndependentOperations(self._client, self._config, self._serialize, self._deserialize) self.flows = FlowsOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/_configuration.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/_configuration.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/_configuration.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/_configuration.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/_patch.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/_patch.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/_patch.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/_patch.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/__init__.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/__init__.py similarity index 86% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/__init__.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/__init__.py index ee2ed88a873..c18cf94c582 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/__init__.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/__init__.py @@ -7,6 +7,8 @@ from ._bulk_runs_operations import BulkRunsOperations from ._connection_operations import ConnectionOperations from ._connections_operations import ConnectionsOperations +from ._experiments_operations import ExperimentsOperations +from ._experiment_templates_operations import ExperimentTemplatesOperations from ._flow_runtimes_operations import FlowRuntimesOperations from ._flow_runtimes_workspace_independent_operations import FlowRuntimesWorkspaceIndependentOperations from ._flows_operations import FlowsOperations @@ -19,6 +21,8 @@ 'BulkRunsOperations', 'ConnectionOperations', 'ConnectionsOperations', + 'ExperimentsOperations', + 'ExperimentTemplatesOperations', 'FlowRuntimesOperations', 'FlowRuntimesWorkspaceIndependentOperations', 'FlowsOperations', diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_bulk_runs_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_bulk_runs_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_bulk_runs_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_bulk_runs_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_connection_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_connection_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_connection_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_connection_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_connections_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_connections_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_connections_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_connections_operations.py diff --git a/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_experiment_templates_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_experiment_templates_operations.py new file mode 100644 index 00000000000..32a3e158c02 --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_experiment_templates_operations.py @@ -0,0 +1,171 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._experiment_templates_operations import build_create_experiment_template_request, build_get_experiment_template_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExperimentTemplatesOperations: + """ExperimentTemplatesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~flow.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def create_experiment_template( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + experiment_template_id: str, + body: Optional["_models.CreateExperimentTemplateRequest"] = None, + **kwargs: Any + ) -> "_models.ExperimentTemplateDto": + """create_experiment_template. + + :param subscription_id: The Azure Subscription ID. + :type subscription_id: str + :param resource_group_name: The Name of the resource group in which the workspace is located. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param experiment_template_id: + :type experiment_template_id: str + :param body: + :type body: ~flow.models.CreateExperimentTemplateRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentTemplateDto, or the result of cls(response) + :rtype: ~flow.models.ExperimentTemplateDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentTemplateDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'CreateExperimentTemplateRequest') + else: + _json = None + + request = build_create_experiment_template_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + experiment_template_id=experiment_template_id, + content_type=content_type, + json=_json, + template_url=self.create_experiment_template.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ExperimentTemplateDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_experiment_template.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/ExperimentTemplates/{experimentTemplateId}'} # type: ignore + + + @distributed_trace_async + async def get_experiment_template( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + experiment_template_id: str, + **kwargs: Any + ) -> "_models.ExperimentTemplateDto": + """get_experiment_template. + + :param subscription_id: The Azure Subscription ID. + :type subscription_id: str + :param resource_group_name: The Name of the resource group in which the workspace is located. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param experiment_template_id: + :type experiment_template_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentTemplateDto, or the result of cls(response) + :rtype: ~flow.models.ExperimentTemplateDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentTemplateDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_experiment_template_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + experiment_template_id=experiment_template_id, + template_url=self.get_experiment_template.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ExperimentTemplateDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_experiment_template.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/ExperimentTemplates/{experimentTemplateId}'} # type: ignore + diff --git a/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_experiments_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_experiments_operations.py new file mode 100644 index 00000000000..1686528a2e8 --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_experiments_operations.py @@ -0,0 +1,179 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._experiments_operations import build_get_experiment_request, build_submit_experiment_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExperimentsOperations: + """ExperimentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~flow.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def submit_experiment( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + experiment_id: str, + experiment_name: Optional[str] = None, + description: Optional[str] = None, + body: Optional["_models.SubmitExperimentRequest"] = None, + **kwargs: Any + ) -> "_models.FlowDto": + """submit_experiment. + + :param subscription_id: The Azure Subscription ID. + :type subscription_id: str + :param resource_group_name: The Name of the resource group in which the workspace is located. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param experiment_id: + :type experiment_id: str + :param experiment_name: + :type experiment_name: str + :param description: + :type description: str + :param body: + :type body: ~flow.models.SubmitExperimentRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FlowDto, or the result of cls(response) + :rtype: ~flow.models.FlowDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'SubmitExperimentRequest') + else: + _json = None + + request = build_submit_experiment_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + experiment_id=experiment_id, + content_type=content_type, + json=_json, + experiment_name=experiment_name, + description=description, + template_url=self.submit_experiment.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('FlowDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + submit_experiment.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Experiments/{experimentId}'} # type: ignore + + + @distributed_trace_async + async def get_experiment( + self, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + experiment_id: str, + **kwargs: Any + ) -> "_models.ExperimentDefinition": + """get_experiment. + + :param subscription_id: The Azure Subscription ID. + :type subscription_id: str + :param resource_group_name: The Name of the resource group in which the workspace is located. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param experiment_id: + :type experiment_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentDefinition, or the result of cls(response) + :rtype: ~flow.models.ExperimentDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_experiment_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + experiment_id=experiment_id, + template_url=self.get_experiment.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ExperimentDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_experiment.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Experiments/{experimentId}'} # type: ignore + diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runs_admin_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_runs_admin_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runs_admin_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_runs_admin_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_workspace_independent_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_workspace_independent_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_workspace_independent_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_runtimes_workspace_independent_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_admin_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_admin_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_admin_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_admin_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flow_sessions_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flows_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flows_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flows_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flows_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flows_provider_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flows_provider_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_flows_provider_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_flows_provider_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_tools_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_tools_operations.py similarity index 83% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_tools_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_tools_operations.py index 3b4392625d8..73baf4989d7 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_tools_operations.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_tools_operations.py @@ -15,7 +15,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._tools_operations import build_get_dynamic_list_request, build_get_package_tools_request, build_get_tool_meta_request, build_get_tool_meta_v2_request, build_get_tool_setting_request, build_retrieve_tool_func_result_request +from ...operations._tools_operations import build_get_dynamic_list_request, build_get_package_tools_request, build_get_tool_meta_v2_request, build_get_tool_setting_request, build_retrieve_tool_func_result_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -96,89 +96,6 @@ async def get_tool_setting( get_tool_setting.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/setting'} # type: ignore - @distributed_trace_async - async def get_tool_meta( - self, - subscription_id: str, - resource_group_name: str, - workspace_name: str, - tool_name: str, - tool_type: str, - endpoint_name: Optional[str] = None, - flow_runtime_name: Optional[str] = None, - flow_id: Optional[str] = None, - data: Optional[str] = None, - **kwargs: Any - ) -> str: - """get_tool_meta. - - :param subscription_id: The Azure Subscription ID. - :type subscription_id: str - :param resource_group_name: The Name of the resource group in which the workspace is located. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param tool_name: - :type tool_name: str - :param tool_type: - :type tool_type: str - :param endpoint_name: - :type endpoint_name: str - :param flow_runtime_name: - :type flow_runtime_name: str - :param flow_id: - :type flow_id: str - :param data: - :type data: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - content_type = kwargs.pop('content_type', "text/plain") # type: Optional[str] - - _content = data - - request = build_get_tool_meta_request( - subscription_id=subscription_id, - resource_group_name=resource_group_name, - workspace_name=workspace_name, - content_type=content_type, - tool_name=tool_name, - tool_type=tool_type, - content=_content, - endpoint_name=endpoint_name, - flow_runtime_name=flow_runtime_name, - flow_id=flow_id, - template_url=self.get_tool_meta.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_tool_meta.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/meta'} # type: ignore - - @distributed_trace_async async def get_tool_meta_v2( self, diff --git a/src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_trace_sessions_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_trace_sessions_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/aio/operations/_trace_sessions_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/aio/operations/_trace_sessions_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/models/__init__.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/models/__init__.py similarity index 98% rename from src/promptflow/promptflow/azure/_restclient/flow/models/__init__.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/models/__init__.py index 6e58479b934..b7719f602d8 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/models/__init__.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/models/__init__.py @@ -194,6 +194,7 @@ from ._models_py3 import BatchGetComponentRequest from ._models_py3 import Binding from ._models_py3 import BulkTestDto + from ._models_py3 import ChatGroupRole from ._models_py3 import CloudError from ._models_py3 import CloudPrioritySetting from ._models_py3 import CloudSettings @@ -239,6 +240,7 @@ from ._models_py3 import ControlInput from ._models_py3 import ControlOutput from ._models_py3 import CopyDataTask + from ._models_py3 import CreateExperimentTemplateRequest from ._models_py3 import CreateFlowRequest from ._models_py3 import CreateFlowRuntimeRequest from ._models_py3 import CreateFlowSessionRequest @@ -320,7 +322,12 @@ from ._models_py3 import ExecutionDataPath from ._models_py3 import ExecutionGlobsOptions from ._models_py3 import ExperimentComputeMetaInfo + from ._models_py3 import ExperimentData + from ._models_py3 import ExperimentDefinition + from ._models_py3 import ExperimentDefinitionSource from ._models_py3 import ExperimentInfo + from ._models_py3 import ExperimentNode + from ._models_py3 import ExperimentTemplateDto from ._models_py3 import ExportComponentMetaInfo from ._models_py3 import ExportDataTask from ._models_py3 import FeaturizationSettings @@ -330,6 +337,7 @@ from ._models_py3 import Flow from ._models_py3 import FlowAnnotations from ._models_py3 import FlowBaseDto + from ._models_py3 import FlowDiagnostics from ._models_py3 import FlowDto from ._models_py3 import FlowEnvironment from ._models_py3 import FlowFeature @@ -593,6 +601,7 @@ from ._models_py3 import SessionApplication from ._models_py3 import SessionApplicationRunCommandResult from ._models_py3 import SessionProperties + from ._models_py3 import SessionRuntimeResources from ._models_py3 import SetupFlowSessionRequest from ._models_py3 import SharingScope from ._models_py3 import Snapshot @@ -634,6 +643,7 @@ from ._models_py3 import SubStatusPeriod from ._models_py3 import SubmitBulkRunRequest from ._models_py3 import SubmitBulkRunResponse + from ._models_py3 import SubmitExperimentRequest from ._models_py3 import SubmitFlowRequest from ._models_py3 import SubmitPipelineRunRequest from ._models_py3 import SweepEarlyTerminationPolicy @@ -890,6 +900,7 @@ from ._models import BatchGetComponentRequest # type: ignore from ._models import Binding # type: ignore from ._models import BulkTestDto # type: ignore + from ._models import ChatGroupRole # type: ignore from ._models import CloudError # type: ignore from ._models import CloudPrioritySetting # type: ignore from ._models import CloudSettings # type: ignore @@ -935,6 +946,7 @@ from ._models import ControlInput # type: ignore from ._models import ControlOutput # type: ignore from ._models import CopyDataTask # type: ignore + from ._models import CreateExperimentTemplateRequest # type: ignore from ._models import CreateFlowRequest # type: ignore from ._models import CreateFlowRuntimeRequest # type: ignore from ._models import CreateFlowSessionRequest # type: ignore @@ -1016,7 +1028,12 @@ from ._models import ExecutionDataPath # type: ignore from ._models import ExecutionGlobsOptions # type: ignore from ._models import ExperimentComputeMetaInfo # type: ignore + from ._models import ExperimentData # type: ignore + from ._models import ExperimentDefinition # type: ignore + from ._models import ExperimentDefinitionSource # type: ignore from ._models import ExperimentInfo # type: ignore + from ._models import ExperimentNode # type: ignore + from ._models import ExperimentTemplateDto # type: ignore from ._models import ExportComponentMetaInfo # type: ignore from ._models import ExportDataTask # type: ignore from ._models import FeaturizationSettings # type: ignore @@ -1026,6 +1043,7 @@ from ._models import Flow # type: ignore from ._models import FlowAnnotations # type: ignore from ._models import FlowBaseDto # type: ignore + from ._models import FlowDiagnostics # type: ignore from ._models import FlowDto # type: ignore from ._models import FlowEnvironment # type: ignore from ._models import FlowFeature # type: ignore @@ -1289,6 +1307,7 @@ from ._models import SessionApplication # type: ignore from ._models import SessionApplicationRunCommandResult # type: ignore from ._models import SessionProperties # type: ignore + from ._models import SessionRuntimeResources # type: ignore from ._models import SetupFlowSessionRequest # type: ignore from ._models import SharingScope # type: ignore from ._models import Snapshot # type: ignore @@ -1330,6 +1349,7 @@ from ._models import SubStatusPeriod # type: ignore from ._models import SubmitBulkRunRequest # type: ignore from ._models import SubmitBulkRunResponse # type: ignore + from ._models import SubmitExperimentRequest # type: ignore from ._models import SubmitFlowRequest # type: ignore from ._models import SubmitPipelineRunRequest # type: ignore from ._models import SweepEarlyTerminationPolicy # type: ignore @@ -1497,6 +1517,8 @@ EntityStatus, ErrorHandlingMode, ExecutionPhase, + ExperimentDefinitionSourceType, + ExperimentNodeType, FeaturizationMode, FlowFeatureStateEnum, FlowLanguage, @@ -1803,6 +1825,7 @@ 'BatchGetComponentRequest', 'Binding', 'BulkTestDto', + 'ChatGroupRole', 'CloudError', 'CloudPrioritySetting', 'CloudSettings', @@ -1848,6 +1871,7 @@ 'ControlInput', 'ControlOutput', 'CopyDataTask', + 'CreateExperimentTemplateRequest', 'CreateFlowRequest', 'CreateFlowRuntimeRequest', 'CreateFlowSessionRequest', @@ -1929,7 +1953,12 @@ 'ExecutionDataPath', 'ExecutionGlobsOptions', 'ExperimentComputeMetaInfo', + 'ExperimentData', + 'ExperimentDefinition', + 'ExperimentDefinitionSource', 'ExperimentInfo', + 'ExperimentNode', + 'ExperimentTemplateDto', 'ExportComponentMetaInfo', 'ExportDataTask', 'FeaturizationSettings', @@ -1939,6 +1968,7 @@ 'Flow', 'FlowAnnotations', 'FlowBaseDto', + 'FlowDiagnostics', 'FlowDto', 'FlowEnvironment', 'FlowFeature', @@ -2202,6 +2232,7 @@ 'SessionApplication', 'SessionApplicationRunCommandResult', 'SessionProperties', + 'SessionRuntimeResources', 'SetupFlowSessionRequest', 'SharingScope', 'Snapshot', @@ -2243,6 +2274,7 @@ 'SubStatusPeriod', 'SubmitBulkRunRequest', 'SubmitBulkRunResponse', + 'SubmitExperimentRequest', 'SubmitFlowRequest', 'SubmitPipelineRunRequest', 'SweepEarlyTerminationPolicy', @@ -2408,6 +2440,8 @@ 'EntityStatus', 'ErrorHandlingMode', 'ExecutionPhase', + 'ExperimentDefinitionSourceType', + 'ExperimentNodeType', 'FeaturizationMode', 'FlowFeatureStateEnum', 'FlowLanguage', diff --git a/src/promptflow/promptflow/azure/_restclient/flow/models/_azure_machine_learning_designer_service_client_enums.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/models/_azure_machine_learning_designer_service_client_enums.py similarity index 99% rename from src/promptflow/promptflow/azure/_restclient/flow/models/_azure_machine_learning_designer_service_client_enums.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/models/_azure_machine_learning_designer_service_client_enums.py index 925a76ca14d..9ae900f2c39 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/models/_azure_machine_learning_designer_service_client_enums.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/models/_azure_machine_learning_designer_service_client_enums.py @@ -439,10 +439,8 @@ class AssetType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): DATASET = "Dataset" DATA_STORE = "DataStore" SAMPLE_GRAPH = "SampleGraph" - FLOW_TOOL = "FlowTool" FLOW_TOOL_SETTING = "FlowToolSetting" FLOW_CONNECTION = "FlowConnection" - FLOW_SAMPLE = "FlowSample" FLOW_RUNTIME_SPEC = "FlowRuntimeSpec" class AutoDeleteCondition(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): @@ -857,6 +855,16 @@ class ExecutionPhase(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): INITIALIZATION = "Initialization" FINALIZATION = "Finalization" +class ExperimentDefinitionSourceType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + DATA_URI = "DataUri" + DEFINITION = "Definition" + +class ExperimentNodeType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + + FLOW = "Flow" + CHAT_GROUP = "ChatGroup" + class FeaturizationMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): AUTO = "Auto" @@ -1699,6 +1707,7 @@ class ToolState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): STABLE = "Stable" PREVIEW = "Preview" DEPRECATED = "Deprecated" + ARCHIVED = "Archived" class ToolType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): diff --git a/src/promptflow/promptflow/azure/_restclient/flow/models/_models.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/models/_models.py similarity index 98% rename from src/promptflow/promptflow/azure/_restclient/flow/models/_models.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/models/_models.py index feb65cc6b06..594323e20a5 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/models/_models.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/models/_models.py @@ -8022,8 +8022,7 @@ class AssetVersionPublishRequest(msrest.serialization.Model): """AssetVersionPublishRequest. :ivar asset_type: Possible values include: "Component", "Model", "Environment", "Dataset", - "DataStore", "SampleGraph", "FlowTool", "FlowToolSetting", "FlowConnection", "FlowSample", - "FlowRuntimeSpec". + "DataStore", "SampleGraph", "FlowToolSetting", "FlowConnection", "FlowRuntimeSpec". :vartype asset_type: str or ~flow.models.AssetType :ivar asset_source_type: Possible values include: "Unknown", "Local", "GithubFile", "GithubFolder", "DevopsArtifactsZip". @@ -8065,8 +8064,7 @@ def __init__( ): """ :keyword asset_type: Possible values include: "Component", "Model", "Environment", "Dataset", - "DataStore", "SampleGraph", "FlowTool", "FlowToolSetting", "FlowConnection", "FlowSample", - "FlowRuntimeSpec". + "DataStore", "SampleGraph", "FlowToolSetting", "FlowConnection", "FlowRuntimeSpec". :paramtype asset_type: str or ~flow.models.AssetType :keyword asset_source_type: Possible values include: "Unknown", "Local", "GithubFile", "GithubFolder", "DevopsArtifactsZip". @@ -9192,6 +9190,101 @@ def __init__( self.batch_data_input = kwargs.get('batch_data_input', None) +class ChatGroupRole(msrest.serialization.Model): + """ChatGroupRole. + + :ivar name: + :vartype name: str + :ivar role: + :vartype role: str + :ivar stop_signal: + :vartype stop_signal: str + :ivar path: + :vartype path: str + :ivar variant: + :vartype variant: str + :ivar connections: This is a dictionary. + :vartype connections: dict[str, dict[str, str]] + :ivar environment_variables: This is a dictionary. + :vartype environment_variables: dict[str, str] + :ivar display_name: + :vartype display_name: str + :ivar description: + :vartype description: str + :ivar tags: A set of tags. This is a dictionary. + :vartype tags: dict[str, str] + :ivar properties: This is a dictionary. + :vartype properties: dict[str, str] + :ivar resources: + :vartype resources: ~flow.models.SessionRuntimeResources + :ivar inputs: Dictionary of :code:``. + :vartype inputs: dict[str, any] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + 'stop_signal': {'key': 'stop_signal', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'variant': {'key': 'variant', 'type': 'str'}, + 'connections': {'key': 'connections', 'type': '{{str}}'}, + 'environment_variables': {'key': 'environment_variables', 'type': '{str}'}, + 'display_name': {'key': 'display_name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'SessionRuntimeResources'}, + 'inputs': {'key': 'inputs', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword role: + :paramtype role: str + :keyword stop_signal: + :paramtype stop_signal: str + :keyword path: + :paramtype path: str + :keyword variant: + :paramtype variant: str + :keyword connections: This is a dictionary. + :paramtype connections: dict[str, dict[str, str]] + :keyword environment_variables: This is a dictionary. + :paramtype environment_variables: dict[str, str] + :keyword display_name: + :paramtype display_name: str + :keyword description: + :paramtype description: str + :keyword tags: A set of tags. This is a dictionary. + :paramtype tags: dict[str, str] + :keyword properties: This is a dictionary. + :paramtype properties: dict[str, str] + :keyword resources: + :paramtype resources: ~flow.models.SessionRuntimeResources + :keyword inputs: Dictionary of :code:``. + :paramtype inputs: dict[str, any] + """ + super(ChatGroupRole, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.role = kwargs.get('role', None) + self.stop_signal = kwargs.get('stop_signal', None) + self.path = kwargs.get('path', None) + self.variant = kwargs.get('variant', None) + self.connections = kwargs.get('connections', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + self.resources = kwargs.get('resources', None) + self.inputs = kwargs.get('inputs', None) + + class CloudError(msrest.serialization.Model): """CloudError. @@ -11583,6 +11676,29 @@ def __init__( self.location = kwargs.get('location', None) +class CreateExperimentTemplateRequest(msrest.serialization.Model): + """CreateExperimentTemplateRequest. + + :ivar experiment_definition_source: + :vartype experiment_definition_source: ~flow.models.ExperimentDefinitionSource + """ + + _attribute_map = { + 'experiment_definition_source': {'key': 'experimentDefinitionSource', 'type': 'ExperimentDefinitionSource'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword experiment_definition_source: + :paramtype experiment_definition_source: ~flow.models.ExperimentDefinitionSource + """ + super(CreateExperimentTemplateRequest, self).__init__(**kwargs) + self.experiment_definition_source = kwargs.get('experiment_definition_source', None) + + class CreateFlowRequest(msrest.serialization.Model): """CreateFlowRequest. @@ -16114,6 +16230,117 @@ def __init__( self.compute_type = kwargs.get('compute_type', None) +class ExperimentData(msrest.serialization.Model): + """ExperimentData. + + :ivar name: + :vartype name: str + :ivar path: + :vartype path: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword path: + :paramtype path: str + """ + super(ExperimentData, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.path = kwargs.get('path', None) + + +class ExperimentDefinition(msrest.serialization.Model): + """ExperimentDefinition. + + :ivar name: + :vartype name: str + :ivar description: + :vartype description: str + :ivar inputs: + :vartype inputs: list[~flow.models.FlowInputDefinition] + :ivar data: + :vartype data: list[~flow.models.ExperimentData] + :ivar nodes: + :vartype nodes: list[~flow.models.ExperimentNode] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[FlowInputDefinition]'}, + 'data': {'key': 'data', 'type': '[ExperimentData]'}, + 'nodes': {'key': 'nodes', 'type': '[ExperimentNode]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword description: + :paramtype description: str + :keyword inputs: + :paramtype inputs: list[~flow.models.FlowInputDefinition] + :keyword data: + :paramtype data: list[~flow.models.ExperimentData] + :keyword nodes: + :paramtype nodes: list[~flow.models.ExperimentNode] + """ + super(ExperimentDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.inputs = kwargs.get('inputs', None) + self.data = kwargs.get('data', None) + self.nodes = kwargs.get('nodes', None) + + +class ExperimentDefinitionSource(msrest.serialization.Model): + """ExperimentDefinitionSource. + + :ivar source_type: Possible values include: "DataUri", "Definition". + :vartype source_type: str or ~flow.models.ExperimentDefinitionSourceType + :ivar experiment_definition_data_uri: + :vartype experiment_definition_data_uri: str + :ivar experiment_definition: + :vartype experiment_definition: ~flow.models.ExperimentDefinition + """ + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'experiment_definition_data_uri': {'key': 'experimentDefinitionDataUri', 'type': 'str'}, + 'experiment_definition': {'key': 'experimentDefinition', 'type': 'ExperimentDefinition'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword source_type: Possible values include: "DataUri", "Definition". + :paramtype source_type: str or ~flow.models.ExperimentDefinitionSourceType + :keyword experiment_definition_data_uri: + :paramtype experiment_definition_data_uri: str + :keyword experiment_definition: + :paramtype experiment_definition: ~flow.models.ExperimentDefinition + """ + super(ExperimentDefinitionSource, self).__init__(**kwargs) + self.source_type = kwargs.get('source_type', None) + self.experiment_definition_data_uri = kwargs.get('experiment_definition_data_uri', None) + self.experiment_definition = kwargs.get('experiment_definition', None) + + class ExperimentInfo(msrest.serialization.Model): """ExperimentInfo. @@ -16143,6 +16370,178 @@ def __init__( self.experiment_id = kwargs.get('experiment_id', None) +class ExperimentNode(msrest.serialization.Model): + """ExperimentNode. + + :ivar name: + :vartype name: str + :ivar type: Possible values include: "Flow", "ChatGroup". + :vartype type: str or ~flow.models.ExperimentNodeType + :ivar max_turns: + :vartype max_turns: int + :ivar roles: + :vartype roles: list[~flow.models.ChatGroupRole] + :ivar path: + :vartype path: str + :ivar variant: + :vartype variant: str + :ivar connections: This is a dictionary. + :vartype connections: dict[str, dict[str, str]] + :ivar environment_variables: This is a dictionary. + :vartype environment_variables: dict[str, str] + :ivar display_name: + :vartype display_name: str + :ivar description: + :vartype description: str + :ivar tags: A set of tags. This is a dictionary. + :vartype tags: dict[str, str] + :ivar properties: This is a dictionary. + :vartype properties: dict[str, str] + :ivar resources: + :vartype resources: ~flow.models.SessionRuntimeResources + :ivar inputs: Dictionary of :code:``. + :vartype inputs: dict[str, any] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_turns': {'key': 'max_turns', 'type': 'int'}, + 'roles': {'key': 'roles', 'type': '[ChatGroupRole]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'variant': {'key': 'variant', 'type': 'str'}, + 'connections': {'key': 'connections', 'type': '{{str}}'}, + 'environment_variables': {'key': 'environment_variables', 'type': '{str}'}, + 'display_name': {'key': 'display_name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'SessionRuntimeResources'}, + 'inputs': {'key': 'inputs', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword type: Possible values include: "Flow", "ChatGroup". + :paramtype type: str or ~flow.models.ExperimentNodeType + :keyword max_turns: + :paramtype max_turns: int + :keyword roles: + :paramtype roles: list[~flow.models.ChatGroupRole] + :keyword path: + :paramtype path: str + :keyword variant: + :paramtype variant: str + :keyword connections: This is a dictionary. + :paramtype connections: dict[str, dict[str, str]] + :keyword environment_variables: This is a dictionary. + :paramtype environment_variables: dict[str, str] + :keyword display_name: + :paramtype display_name: str + :keyword description: + :paramtype description: str + :keyword tags: A set of tags. This is a dictionary. + :paramtype tags: dict[str, str] + :keyword properties: This is a dictionary. + :paramtype properties: dict[str, str] + :keyword resources: + :paramtype resources: ~flow.models.SessionRuntimeResources + :keyword inputs: Dictionary of :code:``. + :paramtype inputs: dict[str, any] + """ + super(ExperimentNode, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.max_turns = kwargs.get('max_turns', None) + self.roles = kwargs.get('roles', None) + self.path = kwargs.get('path', None) + self.variant = kwargs.get('variant', None) + self.connections = kwargs.get('connections', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + self.resources = kwargs.get('resources', None) + self.inputs = kwargs.get('inputs', None) + + +class ExperimentTemplateDto(msrest.serialization.Model): + """ExperimentTemplateDto. + + :ivar id: + :vartype id: str + :ivar created_date: + :vartype created_date: ~datetime.datetime + :ivar last_modified_date: + :vartype last_modified_date: ~datetime.datetime + :ivar owner: + :vartype owner: ~flow.models.SchemaContractsCreatedBy + :ivar name: + :vartype name: str + :ivar description: + :vartype description: str + :ivar inputs: + :vartype inputs: list[~flow.models.FlowInputDefinition] + :ivar data: + :vartype data: list[~flow.models.ExperimentData] + :ivar nodes: + :vartype nodes: list[~flow.models.ExperimentNode] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'last_modified_date': {'key': 'lastModifiedDate', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'SchemaContractsCreatedBy'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[FlowInputDefinition]'}, + 'data': {'key': 'data', 'type': '[ExperimentData]'}, + 'nodes': {'key': 'nodes', 'type': '[ExperimentNode]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword created_date: + :paramtype created_date: ~datetime.datetime + :keyword last_modified_date: + :paramtype last_modified_date: ~datetime.datetime + :keyword owner: + :paramtype owner: ~flow.models.SchemaContractsCreatedBy + :keyword name: + :paramtype name: str + :keyword description: + :paramtype description: str + :keyword inputs: + :paramtype inputs: list[~flow.models.FlowInputDefinition] + :keyword data: + :paramtype data: list[~flow.models.ExperimentData] + :keyword nodes: + :paramtype nodes: list[~flow.models.ExperimentNode] + """ + super(ExperimentTemplateDto, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.created_date = kwargs.get('created_date', None) + self.last_modified_date = kwargs.get('last_modified_date', None) + self.owner = kwargs.get('owner', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.inputs = kwargs.get('inputs', None) + self.data = kwargs.get('data', None) + self.nodes = kwargs.get('nodes', None) + + class ExportComponentMetaInfo(msrest.serialization.Model): """ExportComponentMetaInfo. @@ -16602,6 +17001,8 @@ class FlowBaseDto(msrest.serialization.Model): :vartype max_idle_time_seconds: long :ivar identity: :vartype identity: str + :ivar flow_diagnostics: + :vartype flow_diagnostics: ~flow.models.FlowDiagnostics """ _attribute_map = { @@ -16620,6 +17021,7 @@ class FlowBaseDto(msrest.serialization.Model): 'vm_size': {'key': 'vmSize', 'type': 'str'}, 'max_idle_time_seconds': {'key': 'maxIdleTimeSeconds', 'type': 'long'}, 'identity': {'key': 'identity', 'type': 'str'}, + 'flow_diagnostics': {'key': 'flowDiagnostics', 'type': 'FlowDiagnostics'}, } def __init__( @@ -16657,6 +17059,8 @@ def __init__( :paramtype max_idle_time_seconds: long :keyword identity: :paramtype identity: str + :keyword flow_diagnostics: + :paramtype flow_diagnostics: ~flow.models.FlowDiagnostics """ super(FlowBaseDto, self).__init__(**kwargs) self.flow_id = kwargs.get('flow_id', None) @@ -16674,6 +17078,54 @@ def __init__( self.vm_size = kwargs.get('vm_size', None) self.max_idle_time_seconds = kwargs.get('max_idle_time_seconds', None) self.identity = kwargs.get('identity', None) + self.flow_diagnostics = kwargs.get('flow_diagnostics', None) + + +class FlowDiagnostics(msrest.serialization.Model): + """FlowDiagnostics. + + :ivar datastore: + :vartype datastore: str + :ivar artifact_origin: + :vartype artifact_origin: str + :ivar container: + :vartype container: str + :ivar session_log_relative_path: + :vartype session_log_relative_path: str + :ivar session_artifact_id: + :vartype session_artifact_id: str + """ + + _attribute_map = { + 'datastore': {'key': 'datastore', 'type': 'str'}, + 'artifact_origin': {'key': 'artifactOrigin', 'type': 'str'}, + 'container': {'key': 'container', 'type': 'str'}, + 'session_log_relative_path': {'key': 'sessionLogRelativePath', 'type': 'str'}, + 'session_artifact_id': {'key': 'sessionArtifactId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword datastore: + :paramtype datastore: str + :keyword artifact_origin: + :paramtype artifact_origin: str + :keyword container: + :paramtype container: str + :keyword session_log_relative_path: + :paramtype session_log_relative_path: str + :keyword session_artifact_id: + :paramtype session_artifact_id: str + """ + super(FlowDiagnostics, self).__init__(**kwargs) + self.datastore = kwargs.get('datastore', None) + self.artifact_origin = kwargs.get('artifact_origin', None) + self.container = kwargs.get('container', None) + self.session_log_relative_path = kwargs.get('session_log_relative_path', None) + self.session_artifact_id = kwargs.get('session_artifact_id', None) class FlowDto(msrest.serialization.Model): @@ -16725,6 +17177,8 @@ class FlowDto(msrest.serialization.Model): :vartype max_idle_time_seconds: long :ivar identity: :vartype identity: str + :ivar flow_diagnostics: + :vartype flow_diagnostics: ~flow.models.FlowDiagnostics """ _attribute_map = { @@ -16751,6 +17205,7 @@ class FlowDto(msrest.serialization.Model): 'vm_size': {'key': 'vmSize', 'type': 'str'}, 'max_idle_time_seconds': {'key': 'maxIdleTimeSeconds', 'type': 'long'}, 'identity': {'key': 'identity', 'type': 'str'}, + 'flow_diagnostics': {'key': 'flowDiagnostics', 'type': 'FlowDiagnostics'}, } def __init__( @@ -16804,6 +17259,8 @@ def __init__( :paramtype max_idle_time_seconds: long :keyword identity: :paramtype identity: str + :keyword flow_diagnostics: + :paramtype flow_diagnostics: ~flow.models.FlowDiagnostics """ super(FlowDto, self).__init__(**kwargs) self.timestamp = kwargs.get('timestamp', None) @@ -16829,6 +17286,7 @@ def __init__( self.vm_size = kwargs.get('vm_size', None) self.max_idle_time_seconds = kwargs.get('max_idle_time_seconds', None) self.identity = kwargs.get('identity', None) + self.flow_diagnostics = kwargs.get('flow_diagnostics', None) class FlowEnvironment(msrest.serialization.Model): @@ -18155,6 +18613,16 @@ def __init__( class FlowRunSettingsBase(msrest.serialization.Model): """FlowRunSettingsBase. + :ivar batch_inputs: + :vartype batch_inputs: list[dict[str, any]] + :ivar input_universal_link: + :vartype input_universal_link: str + :ivar data_inputs: This is a dictionary. + :vartype data_inputs: dict[str, str] + :ivar flow_run_output_directory: + :vartype flow_run_output_directory: str + :ivar connection_overrides: + :vartype connection_overrides: list[~flow.models.ConnectionOverrideSetting] :ivar flow_run_display_name: :vartype flow_run_display_name: str :ivar description: @@ -18188,19 +18656,14 @@ class FlowRunSettingsBase(msrest.serialization.Model): :vartype promptflow_engine_type: str or ~flow.models.PromptflowEngineType :ivar experiment_node_name: :vartype experiment_node_name: str - :ivar batch_inputs: - :vartype batch_inputs: list[dict[str, any]] - :ivar input_universal_link: - :vartype input_universal_link: str - :ivar data_inputs: This is a dictionary. - :vartype data_inputs: dict[str, str] - :ivar flow_run_output_directory: - :vartype flow_run_output_directory: str - :ivar connection_overrides: - :vartype connection_overrides: list[~flow.models.ConnectionOverrideSetting] """ _attribute_map = { + 'batch_inputs': {'key': 'batch_inputs', 'type': '[{object}]'}, + 'input_universal_link': {'key': 'inputUniversalLink', 'type': 'str'}, + 'data_inputs': {'key': 'dataInputs', 'type': '{str}'}, + 'flow_run_output_directory': {'key': 'flowRunOutputDirectory', 'type': 'str'}, + 'connection_overrides': {'key': 'connectionOverrides', 'type': '[ConnectionOverrideSetting]'}, 'flow_run_display_name': {'key': 'flowRunDisplayName', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, @@ -18217,11 +18680,6 @@ class FlowRunSettingsBase(msrest.serialization.Model): 'timeout_in_seconds': {'key': 'timeoutInSeconds', 'type': 'int'}, 'promptflow_engine_type': {'key': 'promptflowEngineType', 'type': 'str'}, 'experiment_node_name': {'key': 'experimentNodeName', 'type': 'str'}, - 'batch_inputs': {'key': 'batch_inputs', 'type': '[{object}]'}, - 'input_universal_link': {'key': 'inputUniversalLink', 'type': 'str'}, - 'data_inputs': {'key': 'dataInputs', 'type': '{str}'}, - 'flow_run_output_directory': {'key': 'flowRunOutputDirectory', 'type': 'str'}, - 'connection_overrides': {'key': 'connectionOverrides', 'type': '[ConnectionOverrideSetting]'}, } def __init__( @@ -18229,6 +18687,16 @@ def __init__( **kwargs ): """ + :keyword batch_inputs: + :paramtype batch_inputs: list[dict[str, any]] + :keyword input_universal_link: + :paramtype input_universal_link: str + :keyword data_inputs: This is a dictionary. + :paramtype data_inputs: dict[str, str] + :keyword flow_run_output_directory: + :paramtype flow_run_output_directory: str + :keyword connection_overrides: + :paramtype connection_overrides: list[~flow.models.ConnectionOverrideSetting] :keyword flow_run_display_name: :paramtype flow_run_display_name: str :keyword description: @@ -18262,18 +18730,13 @@ def __init__( :paramtype promptflow_engine_type: str or ~flow.models.PromptflowEngineType :keyword experiment_node_name: :paramtype experiment_node_name: str - :keyword batch_inputs: - :paramtype batch_inputs: list[dict[str, any]] - :keyword input_universal_link: - :paramtype input_universal_link: str - :keyword data_inputs: This is a dictionary. - :paramtype data_inputs: dict[str, str] - :keyword flow_run_output_directory: - :paramtype flow_run_output_directory: str - :keyword connection_overrides: - :paramtype connection_overrides: list[~flow.models.ConnectionOverrideSetting] """ super(FlowRunSettingsBase, self).__init__(**kwargs) + self.batch_inputs = kwargs.get('batch_inputs', None) + self.input_universal_link = kwargs.get('input_universal_link', None) + self.data_inputs = kwargs.get('data_inputs', None) + self.flow_run_output_directory = kwargs.get('flow_run_output_directory', None) + self.connection_overrides = kwargs.get('connection_overrides', None) self.flow_run_display_name = kwargs.get('flow_run_display_name', None) self.description = kwargs.get('description', None) self.tags = kwargs.get('tags', None) @@ -18290,11 +18753,6 @@ def __init__( self.timeout_in_seconds = kwargs.get('timeout_in_seconds', None) self.promptflow_engine_type = kwargs.get('promptflow_engine_type', None) self.experiment_node_name = kwargs.get('experiment_node_name', None) - self.batch_inputs = kwargs.get('batch_inputs', None) - self.input_universal_link = kwargs.get('input_universal_link', None) - self.data_inputs = kwargs.get('data_inputs', None) - self.flow_run_output_directory = kwargs.get('flow_run_output_directory', None) - self.connection_overrides = kwargs.get('connection_overrides', None) class FlowRunStatusResponse(msrest.serialization.Model): @@ -18760,8 +19218,6 @@ class FlowSnapshot(msrest.serialization.Model): :vartype environment_variables: dict[str, any] :ivar language: Possible values include: "Python", "CSharp", "TypeScript", "JavaScript". :vartype language: str or ~flow.models.FlowLanguage - :ivar path: - :vartype path: str :ivar entry: :vartype entry: str """ @@ -18774,7 +19230,6 @@ class FlowSnapshot(msrest.serialization.Model): 'environment': {'key': 'environment', 'type': 'FlowEnvironment'}, 'environment_variables': {'key': 'environment_variables', 'type': '{object}'}, 'language': {'key': 'language', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, 'entry': {'key': 'entry', 'type': 'str'}, } @@ -18797,8 +19252,6 @@ def __init__( :paramtype environment_variables: dict[str, any] :keyword language: Possible values include: "Python", "CSharp", "TypeScript", "JavaScript". :paramtype language: str or ~flow.models.FlowLanguage - :keyword path: - :paramtype path: str :keyword entry: :paramtype entry: str """ @@ -18810,7 +19263,6 @@ def __init__( self.environment = kwargs.get('environment', None) self.environment_variables = kwargs.get('environment_variables', None) self.language = kwargs.get('language', None) - self.path = kwargs.get('path', None) self.entry = kwargs.get('entry', None) @@ -21532,7 +21984,7 @@ class InputDefinition(msrest.serialization.Model): :ivar description: :vartype description: str :ivar enum: - :vartype enum: list[str] + :vartype enum: list[any] :ivar enabled_by: :vartype enabled_by: str :ivar enabled_by_type: @@ -21564,7 +22016,7 @@ class InputDefinition(msrest.serialization.Model): 'type': {'key': 'type', 'type': '[str]'}, 'default': {'key': 'default', 'type': 'object'}, 'description': {'key': 'description', 'type': 'str'}, - 'enum': {'key': 'enum', 'type': '[str]'}, + 'enum': {'key': 'enum', 'type': '[object]'}, 'enabled_by': {'key': 'enabled_by', 'type': 'str'}, 'enabled_by_type': {'key': 'enabled_by_type', 'type': '[str]'}, 'enabled_by_value': {'key': 'enabled_by_value', 'type': '[object]'}, @@ -21593,7 +22045,7 @@ def __init__( :keyword description: :paramtype description: str :keyword enum: - :paramtype enum: list[str] + :paramtype enum: list[any] :keyword enabled_by: :paramtype enabled_by: str :keyword enabled_by_type: @@ -34483,6 +34935,53 @@ def __init__( self.last_alive_time = kwargs.get('last_alive_time', None) +class SessionRuntimeResources(msrest.serialization.Model): + """SessionRuntimeResources. + + :ivar vm_size: + :vartype vm_size: str + :ivar max_idle_time_seconds: + :vartype max_idle_time_seconds: long + :ivar identity: + :vartype identity: str + :ivar compute_name: + :vartype compute_name: str + :ivar enable_multi_container: + :vartype enable_multi_container: bool + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'max_idle_time_seconds': {'key': 'maxIdleTimeSeconds', 'type': 'long'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'compute_name': {'key': 'computeName', 'type': 'str'}, + 'enable_multi_container': {'key': 'enableMultiContainer', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword vm_size: + :paramtype vm_size: str + :keyword max_idle_time_seconds: + :paramtype max_idle_time_seconds: long + :keyword identity: + :paramtype identity: str + :keyword compute_name: + :paramtype compute_name: str + :keyword enable_multi_container: + :paramtype enable_multi_container: bool + """ + super(SessionRuntimeResources, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.max_idle_time_seconds = kwargs.get('max_idle_time_seconds', None) + self.identity = kwargs.get('identity', None) + self.compute_name = kwargs.get('compute_name', None) + self.enable_multi_container = kwargs.get('enable_multi_container', None) + + class SetupFlowSessionRequest(msrest.serialization.Model): """SetupFlowSessionRequest. @@ -36751,6 +37250,35 @@ def __init__( self.variant_run_to_evaluation_runs_id_mapping = kwargs.get('variant_run_to_evaluation_runs_id_mapping', None) +class SubmitExperimentRequest(msrest.serialization.Model): + """SubmitExperimentRequest. + + :ivar experiment_template_id: + :vartype experiment_template_id: str + :ivar experiment_definition_source: + :vartype experiment_definition_source: ~flow.models.ExperimentDefinitionSource + """ + + _attribute_map = { + 'experiment_template_id': {'key': 'experimentTemplateId', 'type': 'str'}, + 'experiment_definition_source': {'key': 'experimentDefinitionSource', 'type': 'ExperimentDefinitionSource'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword experiment_template_id: + :paramtype experiment_template_id: str + :keyword experiment_definition_source: + :paramtype experiment_definition_source: ~flow.models.ExperimentDefinitionSource + """ + super(SubmitExperimentRequest, self).__init__(**kwargs) + self.experiment_template_id = kwargs.get('experiment_template_id', None) + self.experiment_definition_source = kwargs.get('experiment_definition_source', None) + + class SubmitFlowRequest(msrest.serialization.Model): """SubmitFlowRequest. @@ -37872,7 +38400,7 @@ class Tool(msrest.serialization.Model): :vartype enable_kwargs: bool :ivar deprecated_tools: :vartype deprecated_tools: list[str] - :ivar tool_state: Possible values include: "Stable", "Preview", "Deprecated". + :ivar tool_state: Possible values include: "Stable", "Preview", "Deprecated", "Archived". :vartype tool_state: str or ~flow.models.ToolState """ @@ -37958,7 +38486,7 @@ def __init__( :paramtype enable_kwargs: bool :keyword deprecated_tools: :paramtype deprecated_tools: list[str] - :keyword tool_state: Possible values include: "Stable", "Preview", "Deprecated". + :keyword tool_state: Possible values include: "Stable", "Preview", "Deprecated", "Archived". :paramtype tool_state: str or ~flow.models.ToolState """ super(Tool, self).__init__(**kwargs) diff --git a/src/promptflow/promptflow/azure/_restclient/flow/models/_models_py3.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/models/_models_py3.py similarity index 98% rename from src/promptflow/promptflow/azure/_restclient/flow/models/_models_py3.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/models/_models_py3.py index 4ab05dae203..6a1748949ba 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/models/_models_py3.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/models/_models_py3.py @@ -9051,8 +9051,7 @@ class AssetVersionPublishRequest(msrest.serialization.Model): """AssetVersionPublishRequest. :ivar asset_type: Possible values include: "Component", "Model", "Environment", "Dataset", - "DataStore", "SampleGraph", "FlowTool", "FlowToolSetting", "FlowConnection", "FlowSample", - "FlowRuntimeSpec". + "DataStore", "SampleGraph", "FlowToolSetting", "FlowConnection", "FlowRuntimeSpec". :vartype asset_type: str or ~flow.models.AssetType :ivar asset_source_type: Possible values include: "Unknown", "Local", "GithubFile", "GithubFolder", "DevopsArtifactsZip". @@ -9105,8 +9104,7 @@ def __init__( ): """ :keyword asset_type: Possible values include: "Component", "Model", "Environment", "Dataset", - "DataStore", "SampleGraph", "FlowTool", "FlowToolSetting", "FlowConnection", "FlowSample", - "FlowRuntimeSpec". + "DataStore", "SampleGraph", "FlowToolSetting", "FlowConnection", "FlowRuntimeSpec". :paramtype asset_type: str or ~flow.models.AssetType :keyword asset_source_type: Possible values include: "Unknown", "Local", "GithubFile", "GithubFolder", "DevopsArtifactsZip". @@ -10364,6 +10362,115 @@ def __init__( self.batch_data_input = batch_data_input +class ChatGroupRole(msrest.serialization.Model): + """ChatGroupRole. + + :ivar name: + :vartype name: str + :ivar role: + :vartype role: str + :ivar stop_signal: + :vartype stop_signal: str + :ivar path: + :vartype path: str + :ivar variant: + :vartype variant: str + :ivar connections: This is a dictionary. + :vartype connections: dict[str, dict[str, str]] + :ivar environment_variables: This is a dictionary. + :vartype environment_variables: dict[str, str] + :ivar display_name: + :vartype display_name: str + :ivar description: + :vartype description: str + :ivar tags: A set of tags. This is a dictionary. + :vartype tags: dict[str, str] + :ivar properties: This is a dictionary. + :vartype properties: dict[str, str] + :ivar resources: + :vartype resources: ~flow.models.SessionRuntimeResources + :ivar inputs: Dictionary of :code:``. + :vartype inputs: dict[str, any] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + 'stop_signal': {'key': 'stop_signal', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'variant': {'key': 'variant', 'type': 'str'}, + 'connections': {'key': 'connections', 'type': '{{str}}'}, + 'environment_variables': {'key': 'environment_variables', 'type': '{str}'}, + 'display_name': {'key': 'display_name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'SessionRuntimeResources'}, + 'inputs': {'key': 'inputs', 'type': '{object}'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + role: Optional[str] = None, + stop_signal: Optional[str] = None, + path: Optional[str] = None, + variant: Optional[str] = None, + connections: Optional[Dict[str, Dict[str, str]]] = None, + environment_variables: Optional[Dict[str, str]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + resources: Optional["SessionRuntimeResources"] = None, + inputs: Optional[Dict[str, Any]] = None, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword role: + :paramtype role: str + :keyword stop_signal: + :paramtype stop_signal: str + :keyword path: + :paramtype path: str + :keyword variant: + :paramtype variant: str + :keyword connections: This is a dictionary. + :paramtype connections: dict[str, dict[str, str]] + :keyword environment_variables: This is a dictionary. + :paramtype environment_variables: dict[str, str] + :keyword display_name: + :paramtype display_name: str + :keyword description: + :paramtype description: str + :keyword tags: A set of tags. This is a dictionary. + :paramtype tags: dict[str, str] + :keyword properties: This is a dictionary. + :paramtype properties: dict[str, str] + :keyword resources: + :paramtype resources: ~flow.models.SessionRuntimeResources + :keyword inputs: Dictionary of :code:``. + :paramtype inputs: dict[str, any] + """ + super(ChatGroupRole, self).__init__(**kwargs) + self.name = name + self.role = role + self.stop_signal = stop_signal + self.path = path + self.variant = variant + self.connections = connections + self.environment_variables = environment_variables + self.display_name = display_name + self.description = description + self.tags = tags + self.properties = properties + self.resources = resources + self.inputs = inputs + + class CloudError(msrest.serialization.Model): """CloudError. @@ -13054,6 +13161,31 @@ def __init__( self.location = location +class CreateExperimentTemplateRequest(msrest.serialization.Model): + """CreateExperimentTemplateRequest. + + :ivar experiment_definition_source: + :vartype experiment_definition_source: ~flow.models.ExperimentDefinitionSource + """ + + _attribute_map = { + 'experiment_definition_source': {'key': 'experimentDefinitionSource', 'type': 'ExperimentDefinitionSource'}, + } + + def __init__( + self, + *, + experiment_definition_source: Optional["ExperimentDefinitionSource"] = None, + **kwargs + ): + """ + :keyword experiment_definition_source: + :paramtype experiment_definition_source: ~flow.models.ExperimentDefinitionSource + """ + super(CreateExperimentTemplateRequest, self).__init__(**kwargs) + self.experiment_definition_source = experiment_definition_source + + class CreateFlowRequest(msrest.serialization.Model): """CreateFlowRequest. @@ -18185,6 +18317,130 @@ def __init__( self.compute_type = compute_type +class ExperimentData(msrest.serialization.Model): + """ExperimentData. + + :ivar name: + :vartype name: str + :ivar path: + :vartype path: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + path: Optional[str] = None, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword path: + :paramtype path: str + """ + super(ExperimentData, self).__init__(**kwargs) + self.name = name + self.path = path + + +class ExperimentDefinition(msrest.serialization.Model): + """ExperimentDefinition. + + :ivar name: + :vartype name: str + :ivar description: + :vartype description: str + :ivar inputs: + :vartype inputs: list[~flow.models.FlowInputDefinition] + :ivar data: + :vartype data: list[~flow.models.ExperimentData] + :ivar nodes: + :vartype nodes: list[~flow.models.ExperimentNode] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[FlowInputDefinition]'}, + 'data': {'key': 'data', 'type': '[ExperimentData]'}, + 'nodes': {'key': 'nodes', 'type': '[ExperimentNode]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + inputs: Optional[List["FlowInputDefinition"]] = None, + data: Optional[List["ExperimentData"]] = None, + nodes: Optional[List["ExperimentNode"]] = None, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword description: + :paramtype description: str + :keyword inputs: + :paramtype inputs: list[~flow.models.FlowInputDefinition] + :keyword data: + :paramtype data: list[~flow.models.ExperimentData] + :keyword nodes: + :paramtype nodes: list[~flow.models.ExperimentNode] + """ + super(ExperimentDefinition, self).__init__(**kwargs) + self.name = name + self.description = description + self.inputs = inputs + self.data = data + self.nodes = nodes + + +class ExperimentDefinitionSource(msrest.serialization.Model): + """ExperimentDefinitionSource. + + :ivar source_type: Possible values include: "DataUri", "Definition". + :vartype source_type: str or ~flow.models.ExperimentDefinitionSourceType + :ivar experiment_definition_data_uri: + :vartype experiment_definition_data_uri: str + :ivar experiment_definition: + :vartype experiment_definition: ~flow.models.ExperimentDefinition + """ + + _attribute_map = { + 'source_type': {'key': 'sourceType', 'type': 'str'}, + 'experiment_definition_data_uri': {'key': 'experimentDefinitionDataUri', 'type': 'str'}, + 'experiment_definition': {'key': 'experimentDefinition', 'type': 'ExperimentDefinition'}, + } + + def __init__( + self, + *, + source_type: Optional[Union[str, "ExperimentDefinitionSourceType"]] = None, + experiment_definition_data_uri: Optional[str] = None, + experiment_definition: Optional["ExperimentDefinition"] = None, + **kwargs + ): + """ + :keyword source_type: Possible values include: "DataUri", "Definition". + :paramtype source_type: str or ~flow.models.ExperimentDefinitionSourceType + :keyword experiment_definition_data_uri: + :paramtype experiment_definition_data_uri: str + :keyword experiment_definition: + :paramtype experiment_definition: ~flow.models.ExperimentDefinition + """ + super(ExperimentDefinitionSource, self).__init__(**kwargs) + self.source_type = source_type + self.experiment_definition_data_uri = experiment_definition_data_uri + self.experiment_definition = experiment_definition + + class ExperimentInfo(msrest.serialization.Model): """ExperimentInfo. @@ -18217,6 +18473,203 @@ def __init__( self.experiment_id = experiment_id +class ExperimentNode(msrest.serialization.Model): + """ExperimentNode. + + :ivar name: + :vartype name: str + :ivar type: Possible values include: "Flow", "ChatGroup". + :vartype type: str or ~flow.models.ExperimentNodeType + :ivar max_turns: + :vartype max_turns: int + :ivar roles: + :vartype roles: list[~flow.models.ChatGroupRole] + :ivar path: + :vartype path: str + :ivar variant: + :vartype variant: str + :ivar connections: This is a dictionary. + :vartype connections: dict[str, dict[str, str]] + :ivar environment_variables: This is a dictionary. + :vartype environment_variables: dict[str, str] + :ivar display_name: + :vartype display_name: str + :ivar description: + :vartype description: str + :ivar tags: A set of tags. This is a dictionary. + :vartype tags: dict[str, str] + :ivar properties: This is a dictionary. + :vartype properties: dict[str, str] + :ivar resources: + :vartype resources: ~flow.models.SessionRuntimeResources + :ivar inputs: Dictionary of :code:``. + :vartype inputs: dict[str, any] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'max_turns': {'key': 'max_turns', 'type': 'int'}, + 'roles': {'key': 'roles', 'type': '[ChatGroupRole]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'variant': {'key': 'variant', 'type': 'str'}, + 'connections': {'key': 'connections', 'type': '{{str}}'}, + 'environment_variables': {'key': 'environment_variables', 'type': '{str}'}, + 'display_name': {'key': 'display_name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'SessionRuntimeResources'}, + 'inputs': {'key': 'inputs', 'type': '{object}'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "ExperimentNodeType"]] = None, + max_turns: Optional[int] = None, + roles: Optional[List["ChatGroupRole"]] = None, + path: Optional[str] = None, + variant: Optional[str] = None, + connections: Optional[Dict[str, Dict[str, str]]] = None, + environment_variables: Optional[Dict[str, str]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + properties: Optional[Dict[str, str]] = None, + resources: Optional["SessionRuntimeResources"] = None, + inputs: Optional[Dict[str, Any]] = None, + **kwargs + ): + """ + :keyword name: + :paramtype name: str + :keyword type: Possible values include: "Flow", "ChatGroup". + :paramtype type: str or ~flow.models.ExperimentNodeType + :keyword max_turns: + :paramtype max_turns: int + :keyword roles: + :paramtype roles: list[~flow.models.ChatGroupRole] + :keyword path: + :paramtype path: str + :keyword variant: + :paramtype variant: str + :keyword connections: This is a dictionary. + :paramtype connections: dict[str, dict[str, str]] + :keyword environment_variables: This is a dictionary. + :paramtype environment_variables: dict[str, str] + :keyword display_name: + :paramtype display_name: str + :keyword description: + :paramtype description: str + :keyword tags: A set of tags. This is a dictionary. + :paramtype tags: dict[str, str] + :keyword properties: This is a dictionary. + :paramtype properties: dict[str, str] + :keyword resources: + :paramtype resources: ~flow.models.SessionRuntimeResources + :keyword inputs: Dictionary of :code:``. + :paramtype inputs: dict[str, any] + """ + super(ExperimentNode, self).__init__(**kwargs) + self.name = name + self.type = type + self.max_turns = max_turns + self.roles = roles + self.path = path + self.variant = variant + self.connections = connections + self.environment_variables = environment_variables + self.display_name = display_name + self.description = description + self.tags = tags + self.properties = properties + self.resources = resources + self.inputs = inputs + + +class ExperimentTemplateDto(msrest.serialization.Model): + """ExperimentTemplateDto. + + :ivar id: + :vartype id: str + :ivar created_date: + :vartype created_date: ~datetime.datetime + :ivar last_modified_date: + :vartype last_modified_date: ~datetime.datetime + :ivar owner: + :vartype owner: ~flow.models.SchemaContractsCreatedBy + :ivar name: + :vartype name: str + :ivar description: + :vartype description: str + :ivar inputs: + :vartype inputs: list[~flow.models.FlowInputDefinition] + :ivar data: + :vartype data: list[~flow.models.ExperimentData] + :ivar nodes: + :vartype nodes: list[~flow.models.ExperimentNode] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'last_modified_date': {'key': 'lastModifiedDate', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'SchemaContractsCreatedBy'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[FlowInputDefinition]'}, + 'data': {'key': 'data', 'type': '[ExperimentData]'}, + 'nodes': {'key': 'nodes', 'type': '[ExperimentNode]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + created_date: Optional[datetime.datetime] = None, + last_modified_date: Optional[datetime.datetime] = None, + owner: Optional["SchemaContractsCreatedBy"] = None, + name: Optional[str] = None, + description: Optional[str] = None, + inputs: Optional[List["FlowInputDefinition"]] = None, + data: Optional[List["ExperimentData"]] = None, + nodes: Optional[List["ExperimentNode"]] = None, + **kwargs + ): + """ + :keyword id: + :paramtype id: str + :keyword created_date: + :paramtype created_date: ~datetime.datetime + :keyword last_modified_date: + :paramtype last_modified_date: ~datetime.datetime + :keyword owner: + :paramtype owner: ~flow.models.SchemaContractsCreatedBy + :keyword name: + :paramtype name: str + :keyword description: + :paramtype description: str + :keyword inputs: + :paramtype inputs: list[~flow.models.FlowInputDefinition] + :keyword data: + :paramtype data: list[~flow.models.ExperimentData] + :keyword nodes: + :paramtype nodes: list[~flow.models.ExperimentNode] + """ + super(ExperimentTemplateDto, self).__init__(**kwargs) + self.id = id + self.created_date = created_date + self.last_modified_date = last_modified_date + self.owner = owner + self.name = name + self.description = description + self.inputs = inputs + self.data = data + self.nodes = nodes + + class ExportComponentMetaInfo(msrest.serialization.Model): """ExportComponentMetaInfo. @@ -18732,6 +19185,8 @@ class FlowBaseDto(msrest.serialization.Model): :vartype max_idle_time_seconds: long :ivar identity: :vartype identity: str + :ivar flow_diagnostics: + :vartype flow_diagnostics: ~flow.models.FlowDiagnostics """ _attribute_map = { @@ -18750,6 +19205,7 @@ class FlowBaseDto(msrest.serialization.Model): 'vm_size': {'key': 'vmSize', 'type': 'str'}, 'max_idle_time_seconds': {'key': 'maxIdleTimeSeconds', 'type': 'long'}, 'identity': {'key': 'identity', 'type': 'str'}, + 'flow_diagnostics': {'key': 'flowDiagnostics', 'type': 'FlowDiagnostics'}, } def __init__( @@ -18770,6 +19226,7 @@ def __init__( vm_size: Optional[str] = None, max_idle_time_seconds: Optional[int] = None, identity: Optional[str] = None, + flow_diagnostics: Optional["FlowDiagnostics"] = None, **kwargs ): """ @@ -18803,6 +19260,8 @@ def __init__( :paramtype max_idle_time_seconds: long :keyword identity: :paramtype identity: str + :keyword flow_diagnostics: + :paramtype flow_diagnostics: ~flow.models.FlowDiagnostics """ super(FlowBaseDto, self).__init__(**kwargs) self.flow_id = flow_id @@ -18820,6 +19279,60 @@ def __init__( self.vm_size = vm_size self.max_idle_time_seconds = max_idle_time_seconds self.identity = identity + self.flow_diagnostics = flow_diagnostics + + +class FlowDiagnostics(msrest.serialization.Model): + """FlowDiagnostics. + + :ivar datastore: + :vartype datastore: str + :ivar artifact_origin: + :vartype artifact_origin: str + :ivar container: + :vartype container: str + :ivar session_log_relative_path: + :vartype session_log_relative_path: str + :ivar session_artifact_id: + :vartype session_artifact_id: str + """ + + _attribute_map = { + 'datastore': {'key': 'datastore', 'type': 'str'}, + 'artifact_origin': {'key': 'artifactOrigin', 'type': 'str'}, + 'container': {'key': 'container', 'type': 'str'}, + 'session_log_relative_path': {'key': 'sessionLogRelativePath', 'type': 'str'}, + 'session_artifact_id': {'key': 'sessionArtifactId', 'type': 'str'}, + } + + def __init__( + self, + *, + datastore: Optional[str] = None, + artifact_origin: Optional[str] = None, + container: Optional[str] = None, + session_log_relative_path: Optional[str] = None, + session_artifact_id: Optional[str] = None, + **kwargs + ): + """ + :keyword datastore: + :paramtype datastore: str + :keyword artifact_origin: + :paramtype artifact_origin: str + :keyword container: + :paramtype container: str + :keyword session_log_relative_path: + :paramtype session_log_relative_path: str + :keyword session_artifact_id: + :paramtype session_artifact_id: str + """ + super(FlowDiagnostics, self).__init__(**kwargs) + self.datastore = datastore + self.artifact_origin = artifact_origin + self.container = container + self.session_log_relative_path = session_log_relative_path + self.session_artifact_id = session_artifact_id class FlowDto(msrest.serialization.Model): @@ -18871,6 +19384,8 @@ class FlowDto(msrest.serialization.Model): :vartype max_idle_time_seconds: long :ivar identity: :vartype identity: str + :ivar flow_diagnostics: + :vartype flow_diagnostics: ~flow.models.FlowDiagnostics """ _attribute_map = { @@ -18897,6 +19412,7 @@ class FlowDto(msrest.serialization.Model): 'vm_size': {'key': 'vmSize', 'type': 'str'}, 'max_idle_time_seconds': {'key': 'maxIdleTimeSeconds', 'type': 'long'}, 'identity': {'key': 'identity', 'type': 'str'}, + 'flow_diagnostics': {'key': 'flowDiagnostics', 'type': 'FlowDiagnostics'}, } def __init__( @@ -18925,6 +19441,7 @@ def __init__( vm_size: Optional[str] = None, max_idle_time_seconds: Optional[int] = None, identity: Optional[str] = None, + flow_diagnostics: Optional["FlowDiagnostics"] = None, **kwargs ): """ @@ -18974,6 +19491,8 @@ def __init__( :paramtype max_idle_time_seconds: long :keyword identity: :paramtype identity: str + :keyword flow_diagnostics: + :paramtype flow_diagnostics: ~flow.models.FlowDiagnostics """ super(FlowDto, self).__init__(**kwargs) self.timestamp = timestamp @@ -18999,6 +19518,7 @@ def __init__( self.vm_size = vm_size self.max_idle_time_seconds = max_idle_time_seconds self.identity = identity + self.flow_diagnostics = flow_diagnostics class FlowEnvironment(msrest.serialization.Model): @@ -20502,6 +21022,16 @@ def __init__( class FlowRunSettingsBase(msrest.serialization.Model): """FlowRunSettingsBase. + :ivar batch_inputs: + :vartype batch_inputs: list[dict[str, any]] + :ivar input_universal_link: + :vartype input_universal_link: str + :ivar data_inputs: This is a dictionary. + :vartype data_inputs: dict[str, str] + :ivar flow_run_output_directory: + :vartype flow_run_output_directory: str + :ivar connection_overrides: + :vartype connection_overrides: list[~flow.models.ConnectionOverrideSetting] :ivar flow_run_display_name: :vartype flow_run_display_name: str :ivar description: @@ -20535,19 +21065,14 @@ class FlowRunSettingsBase(msrest.serialization.Model): :vartype promptflow_engine_type: str or ~flow.models.PromptflowEngineType :ivar experiment_node_name: :vartype experiment_node_name: str - :ivar batch_inputs: - :vartype batch_inputs: list[dict[str, any]] - :ivar input_universal_link: - :vartype input_universal_link: str - :ivar data_inputs: This is a dictionary. - :vartype data_inputs: dict[str, str] - :ivar flow_run_output_directory: - :vartype flow_run_output_directory: str - :ivar connection_overrides: - :vartype connection_overrides: list[~flow.models.ConnectionOverrideSetting] """ _attribute_map = { + 'batch_inputs': {'key': 'batch_inputs', 'type': '[{object}]'}, + 'input_universal_link': {'key': 'inputUniversalLink', 'type': 'str'}, + 'data_inputs': {'key': 'dataInputs', 'type': '{str}'}, + 'flow_run_output_directory': {'key': 'flowRunOutputDirectory', 'type': 'str'}, + 'connection_overrides': {'key': 'connectionOverrides', 'type': '[ConnectionOverrideSetting]'}, 'flow_run_display_name': {'key': 'flowRunDisplayName', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, @@ -20564,16 +21089,16 @@ class FlowRunSettingsBase(msrest.serialization.Model): 'timeout_in_seconds': {'key': 'timeoutInSeconds', 'type': 'int'}, 'promptflow_engine_type': {'key': 'promptflowEngineType', 'type': 'str'}, 'experiment_node_name': {'key': 'experimentNodeName', 'type': 'str'}, - 'batch_inputs': {'key': 'batch_inputs', 'type': '[{object}]'}, - 'input_universal_link': {'key': 'inputUniversalLink', 'type': 'str'}, - 'data_inputs': {'key': 'dataInputs', 'type': '{str}'}, - 'flow_run_output_directory': {'key': 'flowRunOutputDirectory', 'type': 'str'}, - 'connection_overrides': {'key': 'connectionOverrides', 'type': '[ConnectionOverrideSetting]'}, } def __init__( self, *, + batch_inputs: Optional[List[Dict[str, Any]]] = None, + input_universal_link: Optional[str] = None, + data_inputs: Optional[Dict[str, str]] = None, + flow_run_output_directory: Optional[str] = None, + connection_overrides: Optional[List["ConnectionOverrideSetting"]] = None, flow_run_display_name: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict[str, str]] = None, @@ -20590,14 +21115,19 @@ def __init__( timeout_in_seconds: Optional[int] = None, promptflow_engine_type: Optional[Union[str, "PromptflowEngineType"]] = None, experiment_node_name: Optional[str] = None, - batch_inputs: Optional[List[Dict[str, Any]]] = None, - input_universal_link: Optional[str] = None, - data_inputs: Optional[Dict[str, str]] = None, - flow_run_output_directory: Optional[str] = None, - connection_overrides: Optional[List["ConnectionOverrideSetting"]] = None, **kwargs ): """ + :keyword batch_inputs: + :paramtype batch_inputs: list[dict[str, any]] + :keyword input_universal_link: + :paramtype input_universal_link: str + :keyword data_inputs: This is a dictionary. + :paramtype data_inputs: dict[str, str] + :keyword flow_run_output_directory: + :paramtype flow_run_output_directory: str + :keyword connection_overrides: + :paramtype connection_overrides: list[~flow.models.ConnectionOverrideSetting] :keyword flow_run_display_name: :paramtype flow_run_display_name: str :keyword description: @@ -20631,18 +21161,13 @@ def __init__( :paramtype promptflow_engine_type: str or ~flow.models.PromptflowEngineType :keyword experiment_node_name: :paramtype experiment_node_name: str - :keyword batch_inputs: - :paramtype batch_inputs: list[dict[str, any]] - :keyword input_universal_link: - :paramtype input_universal_link: str - :keyword data_inputs: This is a dictionary. - :paramtype data_inputs: dict[str, str] - :keyword flow_run_output_directory: - :paramtype flow_run_output_directory: str - :keyword connection_overrides: - :paramtype connection_overrides: list[~flow.models.ConnectionOverrideSetting] """ super(FlowRunSettingsBase, self).__init__(**kwargs) + self.batch_inputs = batch_inputs + self.input_universal_link = input_universal_link + self.data_inputs = data_inputs + self.flow_run_output_directory = flow_run_output_directory + self.connection_overrides = connection_overrides self.flow_run_display_name = flow_run_display_name self.description = description self.tags = tags @@ -20659,11 +21184,6 @@ def __init__( self.timeout_in_seconds = timeout_in_seconds self.promptflow_engine_type = promptflow_engine_type self.experiment_node_name = experiment_node_name - self.batch_inputs = batch_inputs - self.input_universal_link = input_universal_link - self.data_inputs = data_inputs - self.flow_run_output_directory = flow_run_output_directory - self.connection_overrides = connection_overrides class FlowRunStatusResponse(msrest.serialization.Model): @@ -21194,8 +21714,6 @@ class FlowSnapshot(msrest.serialization.Model): :vartype environment_variables: dict[str, any] :ivar language: Possible values include: "Python", "CSharp", "TypeScript", "JavaScript". :vartype language: str or ~flow.models.FlowLanguage - :ivar path: - :vartype path: str :ivar entry: :vartype entry: str """ @@ -21208,7 +21726,6 @@ class FlowSnapshot(msrest.serialization.Model): 'environment': {'key': 'environment', 'type': 'FlowEnvironment'}, 'environment_variables': {'key': 'environment_variables', 'type': '{object}'}, 'language': {'key': 'language', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, 'entry': {'key': 'entry', 'type': 'str'}, } @@ -21222,7 +21739,6 @@ def __init__( environment: Optional["FlowEnvironment"] = None, environment_variables: Optional[Dict[str, Any]] = None, language: Optional[Union[str, "FlowLanguage"]] = None, - path: Optional[str] = None, entry: Optional[str] = None, **kwargs ): @@ -21241,8 +21757,6 @@ def __init__( :paramtype environment_variables: dict[str, any] :keyword language: Possible values include: "Python", "CSharp", "TypeScript", "JavaScript". :paramtype language: str or ~flow.models.FlowLanguage - :keyword path: - :paramtype path: str :keyword entry: :paramtype entry: str """ @@ -21254,7 +21768,6 @@ def __init__( self.environment = environment self.environment_variables = environment_variables self.language = language - self.path = path self.entry = entry @@ -24335,7 +24848,7 @@ class InputDefinition(msrest.serialization.Model): :ivar description: :vartype description: str :ivar enum: - :vartype enum: list[str] + :vartype enum: list[any] :ivar enabled_by: :vartype enabled_by: str :ivar enabled_by_type: @@ -24367,7 +24880,7 @@ class InputDefinition(msrest.serialization.Model): 'type': {'key': 'type', 'type': '[str]'}, 'default': {'key': 'default', 'type': 'object'}, 'description': {'key': 'description', 'type': 'str'}, - 'enum': {'key': 'enum', 'type': '[str]'}, + 'enum': {'key': 'enum', 'type': '[object]'}, 'enabled_by': {'key': 'enabled_by', 'type': 'str'}, 'enabled_by_type': {'key': 'enabled_by_type', 'type': '[str]'}, 'enabled_by_value': {'key': 'enabled_by_value', 'type': '[object]'}, @@ -24389,7 +24902,7 @@ def __init__( type: Optional[List[Union[str, "ValueType"]]] = None, default: Optional[Any] = None, description: Optional[str] = None, - enum: Optional[List[str]] = None, + enum: Optional[List[Any]] = None, enabled_by: Optional[str] = None, enabled_by_type: Optional[List[Union[str, "ValueType"]]] = None, enabled_by_value: Optional[List[Any]] = None, @@ -24414,7 +24927,7 @@ def __init__( :keyword description: :paramtype description: str :keyword enum: - :paramtype enum: list[str] + :paramtype enum: list[any] :keyword enabled_by: :paramtype enabled_by: str :keyword enabled_by_type: @@ -39033,6 +39546,59 @@ def __init__( self.last_alive_time = last_alive_time +class SessionRuntimeResources(msrest.serialization.Model): + """SessionRuntimeResources. + + :ivar vm_size: + :vartype vm_size: str + :ivar max_idle_time_seconds: + :vartype max_idle_time_seconds: long + :ivar identity: + :vartype identity: str + :ivar compute_name: + :vartype compute_name: str + :ivar enable_multi_container: + :vartype enable_multi_container: bool + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'max_idle_time_seconds': {'key': 'maxIdleTimeSeconds', 'type': 'long'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'compute_name': {'key': 'computeName', 'type': 'str'}, + 'enable_multi_container': {'key': 'enableMultiContainer', 'type': 'bool'}, + } + + def __init__( + self, + *, + vm_size: Optional[str] = None, + max_idle_time_seconds: Optional[int] = None, + identity: Optional[str] = None, + compute_name: Optional[str] = None, + enable_multi_container: Optional[bool] = None, + **kwargs + ): + """ + :keyword vm_size: + :paramtype vm_size: str + :keyword max_idle_time_seconds: + :paramtype max_idle_time_seconds: long + :keyword identity: + :paramtype identity: str + :keyword compute_name: + :paramtype compute_name: str + :keyword enable_multi_container: + :paramtype enable_multi_container: bool + """ + super(SessionRuntimeResources, self).__init__(**kwargs) + self.vm_size = vm_size + self.max_idle_time_seconds = max_idle_time_seconds + self.identity = identity + self.compute_name = compute_name + self.enable_multi_container = enable_multi_container + + class SetupFlowSessionRequest(msrest.serialization.Model): """SetupFlowSessionRequest. @@ -41597,6 +42163,38 @@ def __init__( self.variant_run_to_evaluation_runs_id_mapping = variant_run_to_evaluation_runs_id_mapping +class SubmitExperimentRequest(msrest.serialization.Model): + """SubmitExperimentRequest. + + :ivar experiment_template_id: + :vartype experiment_template_id: str + :ivar experiment_definition_source: + :vartype experiment_definition_source: ~flow.models.ExperimentDefinitionSource + """ + + _attribute_map = { + 'experiment_template_id': {'key': 'experimentTemplateId', 'type': 'str'}, + 'experiment_definition_source': {'key': 'experimentDefinitionSource', 'type': 'ExperimentDefinitionSource'}, + } + + def __init__( + self, + *, + experiment_template_id: Optional[str] = None, + experiment_definition_source: Optional["ExperimentDefinitionSource"] = None, + **kwargs + ): + """ + :keyword experiment_template_id: + :paramtype experiment_template_id: str + :keyword experiment_definition_source: + :paramtype experiment_definition_source: ~flow.models.ExperimentDefinitionSource + """ + super(SubmitExperimentRequest, self).__init__(**kwargs) + self.experiment_template_id = experiment_template_id + self.experiment_definition_source = experiment_definition_source + + class SubmitFlowRequest(msrest.serialization.Model): """SubmitFlowRequest. @@ -42848,7 +43446,7 @@ class Tool(msrest.serialization.Model): :vartype enable_kwargs: bool :ivar deprecated_tools: :vartype deprecated_tools: list[str] - :ivar tool_state: Possible values include: "Stable", "Preview", "Deprecated". + :ivar tool_state: Possible values include: "Stable", "Preview", "Deprecated", "Archived". :vartype tool_state: str or ~flow.models.ToolState """ @@ -42960,7 +43558,7 @@ def __init__( :paramtype enable_kwargs: bool :keyword deprecated_tools: :paramtype deprecated_tools: list[str] - :keyword tool_state: Possible values include: "Stable", "Preview", "Deprecated". + :keyword tool_state: Possible values include: "Stable", "Preview", "Deprecated", "Archived". :paramtype tool_state: str or ~flow.models.ToolState """ super(Tool, self).__init__(**kwargs) diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/__init__.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/__init__.py similarity index 86% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/__init__.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/__init__.py index ee2ed88a873..c18cf94c582 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/operations/__init__.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/__init__.py @@ -7,6 +7,8 @@ from ._bulk_runs_operations import BulkRunsOperations from ._connection_operations import ConnectionOperations from ._connections_operations import ConnectionsOperations +from ._experiments_operations import ExperimentsOperations +from ._experiment_templates_operations import ExperimentTemplatesOperations from ._flow_runtimes_operations import FlowRuntimesOperations from ._flow_runtimes_workspace_independent_operations import FlowRuntimesWorkspaceIndependentOperations from ._flows_operations import FlowsOperations @@ -19,6 +21,8 @@ 'BulkRunsOperations', 'ConnectionOperations', 'ConnectionsOperations', + 'ExperimentsOperations', + 'ExperimentTemplatesOperations', 'FlowRuntimesOperations', 'FlowRuntimesWorkspaceIndependentOperations', 'FlowsOperations', diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_bulk_runs_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_bulk_runs_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_bulk_runs_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_bulk_runs_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_connection_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_connection_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_connection_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_connection_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_connections_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_connections_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_connections_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_connections_operations.py diff --git a/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_experiment_templates_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_experiment_templates_operations.py new file mode 100644 index 00000000000..6edffd04d58 --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_experiment_templates_operations.py @@ -0,0 +1,249 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_create_experiment_template_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + experiment_template_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/ExperimentTemplates/{experimentTemplateId}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "experimentTemplateId": _SERIALIZER.url("experiment_template_id", experiment_template_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_get_experiment_template_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + experiment_template_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/ExperimentTemplates/{experimentTemplateId}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "experimentTemplateId": _SERIALIZER.url("experiment_template_id", experiment_template_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ExperimentTemplatesOperations(object): + """ExperimentTemplatesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~flow.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def create_experiment_template( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + experiment_template_id, # type: str + body=None, # type: Optional["_models.CreateExperimentTemplateRequest"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ExperimentTemplateDto" + """create_experiment_template. + + :param subscription_id: The Azure Subscription ID. + :type subscription_id: str + :param resource_group_name: The Name of the resource group in which the workspace is located. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param experiment_template_id: + :type experiment_template_id: str + :param body: + :type body: ~flow.models.CreateExperimentTemplateRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentTemplateDto, or the result of cls(response) + :rtype: ~flow.models.ExperimentTemplateDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentTemplateDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'CreateExperimentTemplateRequest') + else: + _json = None + + request = build_create_experiment_template_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + experiment_template_id=experiment_template_id, + content_type=content_type, + json=_json, + template_url=self.create_experiment_template.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ExperimentTemplateDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_experiment_template.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/ExperimentTemplates/{experimentTemplateId}'} # type: ignore + + + @distributed_trace + def get_experiment_template( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + experiment_template_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExperimentTemplateDto" + """get_experiment_template. + + :param subscription_id: The Azure Subscription ID. + :type subscription_id: str + :param resource_group_name: The Name of the resource group in which the workspace is located. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param experiment_template_id: + :type experiment_template_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentTemplateDto, or the result of cls(response) + :rtype: ~flow.models.ExperimentTemplateDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentTemplateDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_experiment_template_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + experiment_template_id=experiment_template_id, + template_url=self.get_experiment_template.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ExperimentTemplateDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_experiment_template.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/ExperimentTemplates/{experimentTemplateId}'} # type: ignore + diff --git a/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_experiments_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_experiments_operations.py new file mode 100644 index 00000000000..bc8b7b47580 --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_experiments_operations.py @@ -0,0 +1,267 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.0, generator: @autorest/python@5.12.2) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_submit_experiment_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + experiment_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + experiment_name = kwargs.pop('experiment_name', None) # type: Optional[str] + description = kwargs.pop('description', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Experiments/{experimentId}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "experimentId": _SERIALIZER.url("experiment_id", experiment_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if experiment_name is not None: + query_parameters['experimentName'] = _SERIALIZER.query("experiment_name", experiment_name, 'str') + if description is not None: + query_parameters['description'] = _SERIALIZER.query("description", description, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_experiment_request( + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + experiment_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Experiments/{experimentId}') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), + "experimentId": _SERIALIZER.url("experiment_id", experiment_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class ExperimentsOperations(object): + """ExperimentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~flow.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def submit_experiment( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + experiment_id, # type: str + experiment_name=None, # type: Optional[str] + description=None, # type: Optional[str] + body=None, # type: Optional["_models.SubmitExperimentRequest"] + **kwargs # type: Any + ): + # type: (...) -> "_models.FlowDto" + """submit_experiment. + + :param subscription_id: The Azure Subscription ID. + :type subscription_id: str + :param resource_group_name: The Name of the resource group in which the workspace is located. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param experiment_id: + :type experiment_id: str + :param experiment_name: + :type experiment_name: str + :param description: + :type description: str + :param body: + :type body: ~flow.models.SubmitExperimentRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FlowDto, or the result of cls(response) + :rtype: ~flow.models.FlowDto + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowDto"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + _json = self._serialize.body(body, 'SubmitExperimentRequest') + else: + _json = None + + request = build_submit_experiment_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + experiment_id=experiment_id, + content_type=content_type, + json=_json, + experiment_name=experiment_name, + description=description, + template_url=self.submit_experiment.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('FlowDto', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + submit_experiment.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Experiments/{experimentId}'} # type: ignore + + + @distributed_trace + def get_experiment( + self, + subscription_id, # type: str + resource_group_name, # type: str + workspace_name, # type: str + experiment_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExperimentDefinition" + """get_experiment. + + :param subscription_id: The Azure Subscription ID. + :type subscription_id: str + :param resource_group_name: The Name of the resource group in which the workspace is located. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param experiment_id: + :type experiment_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentDefinition, or the result of cls(response) + :rtype: ~flow.models.ExperimentDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_get_experiment_request( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + experiment_id=experiment_id, + template_url=self.get_experiment.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ExperimentDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_experiment.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Experiments/{experimentId}'} # type: ignore + diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runs_admin_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_runs_admin_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runs_admin_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_runs_admin_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runtimes_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_runtimes_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runtimes_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_runtimes_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runtimes_workspace_independent_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_runtimes_workspace_independent_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_runtimes_workspace_independent_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_runtimes_workspace_independent_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_sessions_admin_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_sessions_admin_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_sessions_admin_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_sessions_admin_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_sessions_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_sessions_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_flow_sessions_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flow_sessions_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_flows_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flows_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_flows_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flows_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_flows_provider_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flows_provider_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_flows_provider_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_flows_provider_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_tools_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_tools_operations.py similarity index 81% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_tools_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_tools_operations.py index ddf08d83507..f8145505355 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow/operations/_tools_operations.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_tools_operations.py @@ -57,57 +57,6 @@ def build_get_tool_setting_request( ) -def build_get_tool_meta_request( - subscription_id, # type: str - resource_group_name, # type: str - workspace_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - content_type = kwargs.pop('content_type', None) # type: Optional[str] - tool_name = kwargs.pop('tool_name') # type: str - tool_type = kwargs.pop('tool_type') # type: str - endpoint_name = kwargs.pop('endpoint_name', None) # type: Optional[str] - flow_runtime_name = kwargs.pop('flow_runtime_name', None) # type: Optional[str] - flow_id = kwargs.pop('flow_id', None) # type: Optional[str] - - accept = "application/json" - # Construct URL - url = kwargs.pop("template_url", '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/meta') - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), - "workspaceName": _SERIALIZER.url("workspace_name", workspace_name, 'str'), - } - - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['toolName'] = _SERIALIZER.query("tool_name", tool_name, 'str') - query_parameters['toolType'] = _SERIALIZER.query("tool_type", tool_type, 'str') - if endpoint_name is not None: - query_parameters['endpointName'] = _SERIALIZER.query("endpoint_name", endpoint_name, 'str') - if flow_runtime_name is not None: - query_parameters['flowRuntimeName'] = _SERIALIZER.query("flow_runtime_name", flow_runtime_name, 'str') - if flow_id is not None: - query_parameters['flowId'] = _SERIALIZER.query("flow_id", flow_id, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) - - def build_get_tool_meta_v2_request( subscription_id, # type: str resource_group_name, # type: str @@ -359,90 +308,6 @@ def get_tool_setting( get_tool_setting.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/setting'} # type: ignore - @distributed_trace - def get_tool_meta( - self, - subscription_id, # type: str - resource_group_name, # type: str - workspace_name, # type: str - tool_name, # type: str - tool_type, # type: str - endpoint_name=None, # type: Optional[str] - flow_runtime_name=None, # type: Optional[str] - flow_id=None, # type: Optional[str] - data=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> str - """get_tool_meta. - - :param subscription_id: The Azure Subscription ID. - :type subscription_id: str - :param resource_group_name: The Name of the resource group in which the workspace is located. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param tool_name: - :type tool_name: str - :param tool_type: - :type tool_type: str - :param endpoint_name: - :type endpoint_name: str - :param flow_runtime_name: - :type flow_runtime_name: str - :param flow_id: - :type flow_id: str - :param data: - :type data: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - content_type = kwargs.pop('content_type', "text/plain") # type: Optional[str] - - _content = data - - request = build_get_tool_meta_request( - subscription_id=subscription_id, - resource_group_name=resource_group_name, - workspace_name=workspace_name, - content_type=content_type, - tool_name=tool_name, - tool_type=tool_type, - content=_content, - endpoint_name=endpoint_name, - flow_runtime_name=flow_runtime_name, - flow_id=flow_id, - template_url=self.get_tool_meta.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get_tool_meta.metadata = {'url': '/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/meta'} # type: ignore - - @distributed_trace def get_tool_meta_v2( self, diff --git a/src/promptflow/promptflow/azure/_restclient/flow/operations/_trace_sessions_operations.py b/src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_trace_sessions_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/operations/_trace_sessions_operations.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow/operations/_trace_sessions_operations.py diff --git a/src/promptflow/promptflow/azure/_restclient/flow/py.typed b/src/promptflow-azure/promptflow/azure/_restclient/flow/py.typed similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/flow/py.typed rename to src/promptflow-azure/promptflow/azure/_restclient/flow/py.typed diff --git a/src/promptflow/promptflow/azure/_restclient/flow_service_caller.py b/src/promptflow-azure/promptflow/azure/_restclient/flow_service_caller.py similarity index 99% rename from src/promptflow/promptflow/azure/_restclient/flow_service_caller.py rename to src/promptflow-azure/promptflow/azure/_restclient/flow_service_caller.py index b0291ab9ebc..c95c4c38146 100644 --- a/src/promptflow/promptflow/azure/_restclient/flow_service_caller.py +++ b/src/promptflow-azure/promptflow/azure/_restclient/flow_service_caller.py @@ -66,7 +66,8 @@ def wrapper(self, *args, **kwargs): f"Calling {func.__name__} failed with request id: {self._request_id} \n" f"Status code: {e.status_code} \n" f"Reason: {e.reason} \n" - f"Error message: {e.message} \n" + f"Error message: {e.message} \n", + privacy_info=[e.reason, e.message] ) return wrapper diff --git a/src/promptflow/promptflow/azure/_restclient/service_caller_factory.py b/src/promptflow-azure/promptflow/azure/_restclient/service_caller_factory.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/service_caller_factory.py rename to src/promptflow-azure/promptflow/azure/_restclient/service_caller_factory.py diff --git a/src/promptflow-azure/promptflow/azure/_restclient/swagger.json b/src/promptflow-azure/promptflow/azure/_restclient/swagger.json new file mode 100644 index 00000000000..60451e6d236 --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_restclient/swagger.json @@ -0,0 +1,32145 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Azure Machine Learning Designer Service Client", + "version": "1.0.0" + }, + "paths": { + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/submit": { + "post": { + "tags": [ + "BulkRuns" + ], + "operationId": "BulkRuns_SubmitBulkRun", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitBulkRunRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "204": { + "description": "No Content", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/resume": { + "post": { + "tags": [ + "BulkRuns" + ], + "operationId": "BulkRuns_ResumeBulkRun", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResumeBulkRunRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/cancel": { + "post": { + "tags": [ + "BulkRuns" + ], + "operationId": "BulkRuns_CancelFlowRun", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}": { + "get": { + "tags": [ + "BulkRuns" + ], + "operationId": "BulkRuns_GetFlowRunInfo", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRunInfo" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/childRuns": { + "get": { + "tags": [ + "BulkRuns" + ], + "operationId": "BulkRuns_GetFlowChildRuns", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "index", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "endIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/nodeRuns/{nodeName}": { + "get": { + "tags": [ + "BulkRuns" + ], + "operationId": "BulkRuns_GetFlowNodeRuns", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "nodeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "index", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "endIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "aggregation", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/nodeRuns/{nodeName}/basePath": { + "get": { + "tags": [ + "BulkRuns" + ], + "operationId": "BulkRuns_GetFlowNodeRunBasePath", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "nodeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRunBasePath" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/logContent": { + "get": { + "tags": [ + "BulkRuns" + ], + "operationId": "BulkRuns_GetFlowRunLogContent", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connection/{connectionName}": { + "post": { + "tags": [ + "Connection" + ], + "operationId": "Connection_CreateConnection", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrUpdateConnectionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionEntity" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "Connection" + ], + "operationId": "Connection_UpdateConnection", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrUpdateConnectionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionEntity" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "get": { + "tags": [ + "Connection" + ], + "operationId": "Connection_GetConnection", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionEntity" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Connection" + ], + "operationId": "Connection_DeleteConnection", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "connectionScope", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ConnectionScope" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionEntity" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connection": { + "get": { + "tags": [ + "Connection" + ], + "operationId": "Connection_ListConnections", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionEntity" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connection/specs": { + "get": { + "tags": [ + "Connection" + ], + "operationId": "Connection_ListConnectionSpecs", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionSpec" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections/{connectionName}": { + "post": { + "tags": [ + "Connections" + ], + "operationId": "Connections_CreateConnection", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrUpdateConnectionRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "Connections" + ], + "operationId": "Connections_UpdateConnection", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrUpdateConnectionRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "get": { + "tags": [ + "Connections" + ], + "operationId": "Connections_GetConnection", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Connections" + ], + "operationId": "Connections_DeleteConnection", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections/{connectionName}/listsecrets": { + "get": { + "tags": [ + "Connections" + ], + "operationId": "Connections_GetConnectionWithSecrets", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectionDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections": { + "get": { + "tags": [ + "Connections" + ], + "operationId": "Connections_ListConnections", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionDto" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections/specs": { + "get": { + "tags": [ + "Connections" + ], + "operationId": "Connections_ListConnectionSpecs", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkspaceConnectionSpec" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections/{connectionName}/AzureOpenAIDeployments": { + "get": { + "tags": [ + "Connections" + ], + "operationId": "Connections_ListAzureOpenAIDeployments", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "connectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AzureOpenAIDeploymentDto" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Experiments/{experimentId}": { + "post": { + "tags": [ + "Experiments" + ], + "operationId": "Experiments_SubmitExperiment", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "experimentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentName", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "description", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitExperimentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "get": { + "tags": [ + "Experiments" + ], + "operationId": "Experiments_GetExperiment", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "experimentId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentDefinition" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/ExperimentTemplates/{experimentTemplateId}": { + "post": { + "tags": [ + "ExperimentTemplates" + ], + "operationId": "ExperimentTemplates_CreateExperimentTemplate", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "experimentTemplateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateExperimentTemplateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentTemplateDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "get": { + "tags": [ + "ExperimentTemplates" + ], + "operationId": "ExperimentTemplates_GetExperimentTemplate", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "experimentTemplateId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentTemplateDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/{runtimeName}": { + "post": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_CreateRuntime", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "runtimeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "asyncCall", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "msiToken", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "skipPortCheck", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFlowRuntimeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRuntimeDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_UpdateRuntime", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "runtimeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "asyncCall", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "msiToken", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "skipPortCheck", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFlowRuntimeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRuntimeDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "get": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_GetRuntime", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "runtimeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRuntimeDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_DeleteRuntime", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "runtimeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "asyncCall", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "msiToken", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRuntimeDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/checkCiAvailability": { + "get": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_CheckCiAvailability", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "computeInstanceName", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "customAppName", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailabilityResponse" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/checkMirAvailability": { + "get": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_CheckMirAvailability", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "endpointName", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deploymentName", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AvailabilityResponse" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/{runtimeName}/needUpgrade": { + "get": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_CheckRuntimeUpgrade", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "runtimeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/{runtimeName}/capability": { + "get": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_GetRuntimeCapability", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "runtimeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRuntimeCapability" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/latestConfig": { + "get": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_GetRuntimeLatestConfig", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeConfiguration" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes": { + "get": { + "tags": [ + "FlowRuntimes" + ], + "operationId": "FlowRuntimes_ListRuntimes", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowRuntimeDto" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/runtimes/latestConfig": { + "get": { + "tags": [ + "FlowRuntimesWorkspaceIndependent" + ], + "operationId": "FlowRuntimesWorkspaceIndependent_GetRuntimeLatestConfig", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuntimeConfiguration" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_CreateFlow", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "experimentId", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFlowRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_ListFlows", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "experimentId", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "ownedOnly", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "flowType", + "in": "query", + "schema": { + "$ref": "#/components/schemas/FlowType" + } + }, + { + "name": "listViewType", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ListViewType" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowBaseDto" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}": { + "put": { + "tags": [ + "Flows" + ], + "operationId": "Flows_UpdateFlow", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFlowRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "patch": { + "tags": [ + "Flows" + ], + "operationId": "Flows_PatchFlow", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/PatchFlowRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlow", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/submit": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_SubmitFlow", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "endpointName", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitFlowRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRunResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/{flowRunId}/status": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowRunStatus", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRunResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowRunInfo", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRunInfo" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}/childRuns": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowChildRuns", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "index", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "endIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}/nodeRuns/{nodeName}": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowNodeRuns", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "nodeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "index", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "startIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "endIndex", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "aggregation", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}/nodeRuns/{nodeName}/basePath": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowNodeRunBasePath", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "nodeName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowRunBasePath" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/bulkTests": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_ListBulkTests", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BulkTestDto" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/bulkTests/{bulkTestId}": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetBulkTest", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "bulkTestId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkTestDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/DeployReservedEnvironmentVariableNames": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowDeployReservedEnvironmentVariableNames", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/deploy": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_DeployFlow", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "asyncCall", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "msiToken", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeployFlowRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}/logContent": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowRunLogContent", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/runs/{flowRunId}/cancel": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_CancelFlowRun", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/flowTests/{flowRunId}/cancel": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_CancelFlowTest", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "flowRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/bulkTests/{bulkTestRunId}/cancel": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_CancelBulkTestRun", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "bulkTestRunId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/FlowSnapshot": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowSnapshot", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFlowRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowSnapshot" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/connectionOverride": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetConnectionOverrideSettings", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "runtimeName", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowGraphReference" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionOverrideSetting" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/flowInputs": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowInputs", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowGraphReference" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowInputDefinition" + }, + "description": "This is a dictionary" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/LoadAsComponent": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_LoadAsComponent", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoadFlowAsComponentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/flowTools": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowTools", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "flowRuntimeName", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowToolsDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/sessions": { + "post": { + "tags": [ + "Flows" + ], + "operationId": "Flows_SetupFlowSession", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetupFlowSessionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Flows" + ], + "operationId": "Flows_DeleteFlowSession", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/sessions/status": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_GetFlowSessionStatus", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FlowSessionDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/sessions/pipPackages": { + "get": { + "tags": [ + "Flows" + ], + "operationId": "Flows_ListFlowSessionPipPackages", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "experimentId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowSessions/{sessionId}": { + "post": { + "tags": [ + "FlowSessions" + ], + "operationId": "FlowSessions_CreateFlowSession", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFlowSessionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "get": { + "tags": [ + "FlowSessions" + ], + "operationId": "FlowSessions_GetFlowSession", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTrainingSessionDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "FlowSessions" + ], + "operationId": "FlowSessions_DeleteFlowSession", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowSessions/{sessionId}/pipPackages": { + "get": { + "tags": [ + "FlowSessions" + ], + "operationId": "FlowSessions_ListFlowSessionPipPackages", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowSessions/{sessionId}/{actionType}/locations/{location}/operations/{operationId}": { + "get": { + "tags": [ + "FlowSessions" + ], + "operationId": "FlowSessions_PollOperationStatus", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "sessionId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "actionType", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/SetupFlowSessionAction" + } + }, + { + "name": "location", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowSessions/standbypools": { + "get": { + "tags": [ + "FlowSessions" + ], + "operationId": "FlowSessions_GetStandbyPools", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StandbyPoolProperties" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/v1.0/flows/getIndexEntities": { + "post": { + "tags": [ + "FlowsProvider" + ], + "operationId": "FlowsProvider_GetIndexEntityById", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnversionedEntityRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnversionedEntityResponseDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/v1.0/flows/rebuildIndex": { + "post": { + "tags": [ + "FlowsProvider" + ], + "operationId": "FlowsProvider_GetUpdatedEntityIdsForWorkspace", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnversionedRebuildIndexDto" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnversionedRebuildResponseDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/setting": { + "get": { + "tags": [ + "Tools" + ], + "operationId": "Tools_GetToolSetting", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolSetting" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/meta-v2": { + "post": { + "tags": [ + "Tools" + ], + "operationId": "Tools_GetToolMetaV2", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRuntimeName", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "flowId", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateToolMetaRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolMetaDto" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/packageTools": { + "get": { + "tags": [ + "Tools" + ], + "operationId": "Tools_GetPackageTools", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRuntimeName", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "flowId", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Tool" + } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/dynamicList": { + "post": { + "tags": [ + "Tools" + ], + "operationId": "Tools_GetDynamicList", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRuntimeName", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "flowId", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetDynamicListRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { } + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/RetrieveToolFuncResult": { + "post": { + "tags": [ + "Tools" + ], + "operationId": "Tools_RetrieveToolFuncResult", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "flowRuntimeName", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "flowId", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RetrieveToolFuncResultRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToolFuncResponse" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/initialize": { + "post": { + "tags": [ + "TraceSessions" + ], + "operationId": "TraceSessions_InitTraceSessionAsync", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "overwrite", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TraceCosmosResourceDtos" + } + } + } + }, + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/cleanup": { + "post": { + "tags": [ + "TraceSessions" + ], + "operationId": "TraceSessions_CleanupTraceSessionAsync", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + } + ], + "responses": { + "202": { + "description": "Accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/operation/{operationType}/{operationId}": { + "get": { + "tags": [ + "TraceSessions" + ], + "operationId": "TraceSessions_PollTraceSessionStatus", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "operationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operationType", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/attachDb": { + "post": { + "tags": [ + "TraceSessions" + ], + "operationId": "TraceSessions_AttachCosmosAccount", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "overwrite", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachCosmosRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IActionResult" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/container/{containerName}/resourceToken": { + "get": { + "tags": [ + "TraceSessions" + ], + "operationId": "TraceSessions_GetCosmosResourceToken", + "parameters": [ + { + "$ref": "#/components/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/components/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/components/parameters/workspaceNameParameter" + }, + { + "name": "containerName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "acquireWrite", + "in": "query", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ACIAdvanceSettings": { + "type": "object", + "properties": { + "containerResourceRequirements": { + "$ref": "#/components/schemas/ContainerResourceRequirements" + }, + "appInsightsEnabled": { + "type": "boolean", + "nullable": true + }, + "sslEnabled": { + "type": "boolean", + "nullable": true + }, + "sslCertificate": { + "type": "string", + "nullable": true + }, + "sslKey": { + "type": "string", + "nullable": true + }, + "cName": { + "type": "string", + "nullable": true + }, + "dnsNameLabel": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AEVAAssetType": { + "enum": [ + "UriFile", + "UriFolder", + "MLTable", + "CustomModel", + "MLFlowModel", + "TritonModel", + "OpenAIModel" + ], + "type": "string" + }, + "AEVAComputeConfiguration": { + "type": "object", + "properties": { + "target": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "isLocal": { + "type": "boolean" + }, + "location": { + "type": "string", + "nullable": true + }, + "isClusterless": { + "type": "boolean" + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "isPreemptable": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "AEVADataStoreMode": { + "enum": [ + "None", + "Mount", + "Download", + "Upload", + "Direct", + "Hdfs", + "Link" + ], + "type": "string" + }, + "AEVAIdentityType": { + "enum": [ + "UserIdentity", + "Managed", + "AMLToken" + ], + "type": "string" + }, + "AEVAResourceConfiguration": { + "type": "object", + "properties": { + "instanceCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "locations": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "instancePriority": { + "type": "string", + "nullable": true + }, + "quotaEnforcementResourceId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AISuperComputerConfiguration": { + "type": "object", + "properties": { + "instanceType": { + "type": "string", + "nullable": true + }, + "instanceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "imageVersion": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "locations": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "aiSuperComputerStorageData": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AISuperComputerStorageReferenceConfiguration" + }, + "nullable": true + }, + "interactive": { + "type": "boolean" + }, + "scalePolicy": { + "$ref": "#/components/schemas/AISuperComputerScalePolicy" + }, + "virtualClusterArmId": { + "type": "string", + "nullable": true + }, + "tensorboardLogDirectory": { + "type": "string", + "nullable": true + }, + "sshPublicKey": { + "type": "string", + "nullable": true + }, + "sshPublicKeys": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enableAzmlInt": { + "type": "boolean" + }, + "priority": { + "type": "string", + "nullable": true + }, + "slaTier": { + "type": "string", + "nullable": true + }, + "suspendOnIdleTimeHours": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "userAlias": { + "type": "string", + "nullable": true + }, + "quotaEnforcementResourceId": { + "type": "string", + "nullable": true + }, + "modelComputeSpecificationId": { + "type": "string", + "nullable": true + }, + "groupPolicyName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AISuperComputerScalePolicy": { + "type": "object", + "properties": { + "autoScaleInstanceTypeCountSet": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "autoScaleIntervalInSec": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxInstanceTypeCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "minInstanceTypeCount": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AISuperComputerStorageReferenceConfiguration": { + "type": "object", + "properties": { + "containerName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AKSAdvanceSettings": { + "type": "object", + "properties": { + "autoScaler": { + "$ref": "#/components/schemas/AutoScaler" + }, + "containerResourceRequirements": { + "$ref": "#/components/schemas/ContainerResourceRequirements" + }, + "appInsightsEnabled": { + "type": "boolean", + "nullable": true + }, + "scoringTimeoutMs": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "numReplicas": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AKSReplicaStatus": { + "type": "object", + "properties": { + "desiredReplicas": { + "type": "integer", + "format": "int32" + }, + "updatedReplicas": { + "type": "integer", + "format": "int32" + }, + "availableReplicas": { + "type": "integer", + "format": "int32" + }, + "error": { + "$ref": "#/components/schemas/ModelManagementErrorResponse" + } + }, + "additionalProperties": false + }, + "AMLComputeConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "vmPriority": { + "$ref": "#/components/schemas/VmPriority" + }, + "retainCluster": { + "type": "boolean" + }, + "clusterMaxNodeCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "osType": { + "type": "string", + "nullable": true + }, + "virtualMachineImage": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "APCloudConfiguration": { + "type": "object", + "properties": { + "referencedAPModuleGuid": { + "type": "string", + "nullable": true + }, + "userAlias": { + "type": "string", + "nullable": true + }, + "aetherModuleType": { + "type": "string", + "nullable": true + }, + "allowOverwrite": { + "type": "boolean", + "nullable": true + }, + "destinationExpirationDays": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "shouldRespectLineBoundaries": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "ActionType": { + "enum": [ + "SendValidationRequest", + "GetValidationStatus", + "SubmitBulkRun", + "LogRunResult", + "LogRunTerminatedEvent", + "SubmitFlowRun" + ], + "type": "string" + }, + "Activate": { + "type": "object", + "properties": { + "when": { + "type": "string", + "nullable": true + }, + "is": { + "nullable": true + } + }, + "additionalProperties": false + }, + "AdditionalErrorInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "info": { + "nullable": true + } + }, + "additionalProperties": false + }, + "AdhocTriggerScheduledCommandJobRequest": { + "type": "object", + "properties": { + "jobName": { + "type": "string", + "nullable": true + }, + "jobDisplayName": { + "type": "string", + "nullable": true + }, + "triggerTimeString": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AdhocTriggerScheduledSparkJobRequest": { + "type": "object", + "properties": { + "jobName": { + "type": "string", + "nullable": true + }, + "jobDisplayName": { + "type": "string", + "nullable": true + }, + "triggerTimeString": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAPCloudConfiguration": { + "type": "object", + "properties": { + "referencedAPModuleGuid": { + "type": "string", + "nullable": true + }, + "userAlias": { + "type": "string", + "nullable": true + }, + "aetherModuleType": { + "type": "string", + "nullable": true + }, + "allowOverwrite": { + "type": "boolean", + "nullable": true + }, + "destinationExpirationDays": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "shouldRespectLineBoundaries": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAmlDataset": { + "type": "object", + "properties": { + "registeredDataSetReference": { + "$ref": "#/components/schemas/AetherRegisteredDataSetReference" + }, + "savedDataSetReference": { + "$ref": "#/components/schemas/AetherSavedDataSetReference" + }, + "additionalTransformations": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAmlSparkCloudSetting": { + "type": "object", + "properties": { + "entry": { + "$ref": "#/components/schemas/AetherEntrySetting" + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "archives": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "jars": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "pyFiles": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "driverMemory": { + "type": "string", + "nullable": true + }, + "driverCores": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "executorMemory": { + "type": "string", + "nullable": true + }, + "executorCores": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "numberExecutors": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "environmentAssetId": { + "type": "string", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "inlineEnvironmentDefinitionString": { + "type": "string", + "nullable": true + }, + "conf": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "compute": { + "type": "string", + "nullable": true + }, + "resources": { + "$ref": "#/components/schemas/AetherResourcesSetting" + }, + "identity": { + "$ref": "#/components/schemas/AetherIdentitySetting" + } + }, + "additionalProperties": false + }, + "AetherArgumentAssignment": { + "type": "object", + "properties": { + "valueType": { + "$ref": "#/components/schemas/AetherArgumentValueType" + }, + "value": { + "type": "string", + "nullable": true + }, + "nestedArgumentList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherArgumentAssignment" + }, + "nullable": true + }, + "stringInterpolationArgumentList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherArgumentAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherArgumentValueType": { + "enum": [ + "Literal", + "Parameter", + "Input", + "Output", + "NestedList", + "StringInterpolationList" + ], + "type": "string" + }, + "AetherAssetDefinition": { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/AetherAssetType" + }, + "assetId": { + "type": "string", + "nullable": true + }, + "initialAssetId": { + "type": "string", + "nullable": true + }, + "serializedAssetId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAssetOutputSettings": { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "PathParameterAssignment": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "type": { + "$ref": "#/components/schemas/AetherAssetType" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AetherDataStoreMode" + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAssetType": { + "enum": [ + "UriFile", + "UriFolder", + "MLTable", + "CustomModel", + "MLFlowModel", + "TritonModel", + "OpenAIModel" + ], + "type": "string" + }, + "AetherAutoFeaturizeConfiguration": { + "type": "object", + "properties": { + "featurizationConfig": { + "$ref": "#/components/schemas/AetherFeaturizationSettings" + } + }, + "additionalProperties": false + }, + "AetherAutoMLComponentConfiguration": { + "type": "object", + "properties": { + "autoTrainConfig": { + "$ref": "#/components/schemas/AetherAutoTrainConfiguration" + }, + "autoFeaturizeConfig": { + "$ref": "#/components/schemas/AetherAutoFeaturizeConfiguration" + } + }, + "additionalProperties": false + }, + "AetherAutoTrainConfiguration": { + "type": "object", + "properties": { + "generalSettings": { + "$ref": "#/components/schemas/AetherGeneralSettings" + }, + "limitSettings": { + "$ref": "#/components/schemas/AetherLimitSettings" + }, + "dataSettings": { + "$ref": "#/components/schemas/AetherDataSettings" + }, + "forecastingSettings": { + "$ref": "#/components/schemas/AetherForecastingSettings" + }, + "trainingSettings": { + "$ref": "#/components/schemas/AetherTrainingSettings" + }, + "sweepSettings": { + "$ref": "#/components/schemas/AetherSweepSettings" + }, + "imageModelSettings": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "computeConfiguration": { + "$ref": "#/components/schemas/AetherComputeConfiguration" + }, + "resourceConfigurtion": { + "$ref": "#/components/schemas/AetherResourceConfiguration" + }, + "environmentId": { + "type": "string", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAzureBlobReference": { + "type": "object", + "properties": { + "container": { + "type": "string", + "nullable": true + }, + "sasToken": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "pathType": { + "$ref": "#/components/schemas/AetherFileBasedPathType" + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAzureDataLakeGen2Reference": { + "type": "object", + "properties": { + "fileSystemName": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "pathType": { + "$ref": "#/components/schemas/AetherFileBasedPathType" + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAzureDataLakeReference": { + "type": "object", + "properties": { + "tenant": { + "type": "string", + "nullable": true + }, + "subscription": { + "type": "string", + "nullable": true + }, + "resourceGroup": { + "type": "string", + "nullable": true + }, + "dataLakeUri": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "pathType": { + "$ref": "#/components/schemas/AetherFileBasedPathType" + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAzureDatabaseReference": { + "type": "object", + "properties": { + "serverUri": { + "type": "string", + "nullable": true + }, + "databaseName": { + "type": "string", + "nullable": true + }, + "tableName": { + "type": "string", + "nullable": true + }, + "sqlQuery": { + "type": "string", + "nullable": true + }, + "storedProcedureName": { + "type": "string", + "nullable": true + }, + "storedProcedureParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherStoredProcedureParameter" + }, + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherAzureFilesReference": { + "type": "object", + "properties": { + "share": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "pathType": { + "$ref": "#/components/schemas/AetherFileBasedPathType" + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherBatchAiComputeInfo": { + "type": "object", + "properties": { + "batchAiSubscriptionId": { + "type": "string", + "nullable": true + }, + "batchAiResourceGroup": { + "type": "string", + "nullable": true + }, + "batchAiWorkspaceName": { + "type": "string", + "nullable": true + }, + "clusterName": { + "type": "string", + "nullable": true + }, + "nativeSharedDirectory": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherBuildArtifactInfo": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/AetherBuildSourceType" + }, + "cloudBuildDropPathInfo": { + "$ref": "#/components/schemas/AetherCloudBuildDropPathInfo" + }, + "vsoBuildArtifactInfo": { + "$ref": "#/components/schemas/AetherVsoBuildArtifactInfo" + } + }, + "additionalProperties": false + }, + "AetherBuildSourceType": { + "enum": [ + "CloudBuild", + "Vso", + "VsoGit" + ], + "type": "string" + }, + "AetherCloudBuildDropPathInfo": { + "type": "object", + "properties": { + "buildInfo": { + "$ref": "#/components/schemas/AetherCloudBuildInfo" + }, + "root": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherCloudBuildInfo": { + "type": "object", + "properties": { + "queueInfo": { + "$ref": "#/components/schemas/AetherCloudBuildQueueInfo" + }, + "buildId": { + "type": "string", + "nullable": true + }, + "dropUrl": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherCloudBuildQueueInfo": { + "type": "object", + "properties": { + "buildQueue": { + "type": "string", + "nullable": true + }, + "buildRole": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherCloudPrioritySetting": { + "type": "object", + "properties": { + "scopePriority": { + "$ref": "#/components/schemas/AetherPriorityConfiguration" + }, + "AmlComputePriority": { + "$ref": "#/components/schemas/AetherPriorityConfiguration" + }, + "ItpPriority": { + "$ref": "#/components/schemas/AetherPriorityConfiguration" + }, + "SingularityPriority": { + "$ref": "#/components/schemas/AetherPriorityConfiguration" + } + }, + "additionalProperties": false + }, + "AetherCloudSettings": { + "type": "object", + "properties": { + "linkedSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "nullable": true + }, + "priorityConfig": { + "$ref": "#/components/schemas/AetherPriorityConfiguration" + }, + "hdiRunConfig": { + "$ref": "#/components/schemas/AetherHdiRunConfiguration" + }, + "subGraphConfig": { + "$ref": "#/components/schemas/AetherSubGraphConfiguration" + }, + "autoMLComponentConfig": { + "$ref": "#/components/schemas/AetherAutoMLComponentConfiguration" + }, + "apCloudConfig": { + "$ref": "#/components/schemas/AetherAPCloudConfiguration" + }, + "scopeCloudConfig": { + "$ref": "#/components/schemas/AetherScopeCloudConfiguration" + }, + "esCloudConfig": { + "$ref": "#/components/schemas/AetherEsCloudConfiguration" + }, + "dataTransferCloudConfig": { + "$ref": "#/components/schemas/AetherDataTransferCloudConfiguration" + }, + "amlSparkCloudSetting": { + "$ref": "#/components/schemas/AetherAmlSparkCloudSetting" + }, + "dataTransferV2CloudSetting": { + "$ref": "#/components/schemas/AetherDataTransferV2CloudSetting" + } + }, + "additionalProperties": false + }, + "AetherColumnTransformer": { + "type": "object", + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "parameters": { + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherComputeConfiguration": { + "type": "object", + "properties": { + "target": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "isLocal": { + "type": "boolean" + }, + "location": { + "type": "string", + "nullable": true + }, + "isClusterless": { + "type": "boolean" + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "isPreemptable": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "AetherComputeSetting": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "computeType": { + "$ref": "#/components/schemas/AetherComputeType" + }, + "batchAiComputeInfo": { + "$ref": "#/components/schemas/AetherBatchAiComputeInfo" + }, + "remoteDockerComputeInfo": { + "$ref": "#/components/schemas/AetherRemoteDockerComputeInfo" + }, + "hdiClusterComputeInfo": { + "$ref": "#/components/schemas/AetherHdiClusterComputeInfo" + }, + "mlcComputeInfo": { + "$ref": "#/components/schemas/AetherMlcComputeInfo" + }, + "databricksComputeInfo": { + "$ref": "#/components/schemas/AetherDatabricksComputeInfo" + } + }, + "additionalProperties": false + }, + "AetherComputeType": { + "enum": [ + "BatchAi", + "MLC", + "HdiCluster", + "RemoteDocker", + "Databricks", + "Aisc" + ], + "type": "string" + }, + "AetherControlFlowType": { + "enum": [ + "None", + "DoWhile", + "ParallelFor" + ], + "type": "string" + }, + "AetherControlInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "defaultValue": { + "$ref": "#/components/schemas/AetherControlInputValue" + } + }, + "additionalProperties": false + }, + "AetherControlInputValue": { + "enum": [ + "None", + "False", + "True", + "Skipped" + ], + "type": "string" + }, + "AetherControlOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherControlType": { + "enum": [ + "IfElse" + ], + "type": "string" + }, + "AetherCopyDataTask": { + "type": "object", + "properties": { + "DataCopyMode": { + "$ref": "#/components/schemas/AetherDataCopyMode" + } + }, + "additionalProperties": false + }, + "AetherCosmosReference": { + "type": "object", + "properties": { + "cluster": { + "type": "string", + "nullable": true + }, + "vc": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherCreatedBy": { + "type": "object", + "properties": { + "userObjectId": { + "type": "string", + "nullable": true + }, + "userTenantId": { + "type": "string", + "nullable": true + }, + "userName": { + "type": "string", + "nullable": true + }, + "puid": { + "type": "string", + "nullable": true + }, + "iss": { + "type": "string", + "nullable": true + }, + "idp": { + "type": "string", + "nullable": true + }, + "altsecId": { + "type": "string", + "nullable": true + }, + "sourceIp": { + "type": "string", + "nullable": true + }, + "skipRegistryPrivateLinkCheck": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "AetherCustomReference": { + "type": "object", + "properties": { + "amlDataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDBFSReference": { + "type": "object", + "properties": { + "relativePath": { + "type": "string", + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDataCopyMode": { + "enum": [ + "MergeWithOverwrite", + "FailIfConflict" + ], + "type": "string" + }, + "AetherDataLocation": { + "type": "object", + "properties": { + "storageType": { + "$ref": "#/components/schemas/AetherDataLocationStorageType" + }, + "storageId": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "dataReference": { + "$ref": "#/components/schemas/AetherDataReference" + }, + "amlDataset": { + "$ref": "#/components/schemas/AetherAmlDataset" + }, + "assetDefinition": { + "$ref": "#/components/schemas/AetherAssetDefinition" + }, + "isCompliant": { + "type": "boolean" + }, + "reuseCalculationFields": { + "$ref": "#/components/schemas/AetherDataLocationReuseCalculationFields" + } + }, + "additionalProperties": false + }, + "AetherDataLocationReuseCalculationFields": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "dataExperimentId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDataLocationStorageType": { + "enum": [ + "Cosmos", + "AzureBlob", + "Artifact", + "Snapshot", + "SavedAmlDataset", + "Asset" + ], + "type": "string" + }, + "AetherDataPath": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "sqlDataPath": { + "$ref": "#/components/schemas/AetherSqlDataPath" + } + }, + "additionalProperties": false + }, + "AetherDataReference": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/AetherDataReferenceType" + }, + "azureBlobReference": { + "$ref": "#/components/schemas/AetherAzureBlobReference" + }, + "azureDataLakeReference": { + "$ref": "#/components/schemas/AetherAzureDataLakeReference" + }, + "azureFilesReference": { + "$ref": "#/components/schemas/AetherAzureFilesReference" + }, + "cosmosReference": { + "$ref": "#/components/schemas/AetherCosmosReference" + }, + "phillyHdfsReference": { + "$ref": "#/components/schemas/AetherPhillyHdfsReference" + }, + "azureSqlDatabaseReference": { + "$ref": "#/components/schemas/AetherAzureDatabaseReference" + }, + "azurePostgresDatabaseReference": { + "$ref": "#/components/schemas/AetherAzureDatabaseReference" + }, + "azureDataLakeGen2Reference": { + "$ref": "#/components/schemas/AetherAzureDataLakeGen2Reference" + }, + "dbfsReference": { + "$ref": "#/components/schemas/AetherDBFSReference" + }, + "azureMySqlDatabaseReference": { + "$ref": "#/components/schemas/AetherAzureDatabaseReference" + }, + "customReference": { + "$ref": "#/components/schemas/AetherCustomReference" + }, + "hdfsReference": { + "$ref": "#/components/schemas/AetherHdfsReference" + } + }, + "additionalProperties": false + }, + "AetherDataReferenceType": { + "enum": [ + "None", + "AzureBlob", + "AzureDataLake", + "AzureFiles", + "Cosmos", + "PhillyHdfs", + "AzureSqlDatabase", + "AzurePostgresDatabase", + "AzureDataLakeGen2", + "DBFS", + "AzureMySqlDatabase", + "Custom", + "Hdfs" + ], + "type": "string" + }, + "AetherDataSetDefinition": { + "type": "object", + "properties": { + "dataTypeShortName": { + "type": "string", + "nullable": true + }, + "parameterName": { + "type": "string", + "nullable": true + }, + "value": { + "$ref": "#/components/schemas/AetherDataSetDefinitionValue" + } + }, + "additionalProperties": false + }, + "AetherDataSetDefinitionValue": { + "type": "object", + "properties": { + "literalValue": { + "$ref": "#/components/schemas/AetherDataPath" + }, + "dataSetReference": { + "$ref": "#/components/schemas/AetherRegisteredDataSetReference" + }, + "savedDataSetReference": { + "$ref": "#/components/schemas/AetherSavedDataSetReference" + }, + "assetDefinition": { + "$ref": "#/components/schemas/AetherAssetDefinition" + } + }, + "additionalProperties": false + }, + "AetherDataSettings": { + "type": "object", + "properties": { + "targetColumnName": { + "type": "string", + "nullable": true + }, + "weightColumnName": { + "type": "string", + "nullable": true + }, + "positiveLabel": { + "type": "string", + "nullable": true + }, + "validationData": { + "$ref": "#/components/schemas/AetherValidationDataSettings" + }, + "testData": { + "$ref": "#/components/schemas/AetherTestDataSettings" + } + }, + "additionalProperties": false + }, + "AetherDataStoreMode": { + "enum": [ + "None", + "Mount", + "Download", + "Upload", + "Direct", + "Hdfs", + "Link" + ], + "type": "string" + }, + "AetherDataTransferCloudConfiguration": { + "type": "object", + "properties": { + "AllowOverwrite": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDataTransferSink": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/AetherDataTransferStorageType" + }, + "fileSystem": { + "$ref": "#/components/schemas/AetherFileSystem" + }, + "databaseSink": { + "$ref": "#/components/schemas/AetherDatabaseSink" + } + }, + "additionalProperties": false + }, + "AetherDataTransferSource": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/AetherDataTransferStorageType" + }, + "fileSystem": { + "$ref": "#/components/schemas/AetherFileSystem" + }, + "databaseSource": { + "$ref": "#/components/schemas/AetherDatabaseSource" + } + }, + "additionalProperties": false + }, + "AetherDataTransferStorageType": { + "enum": [ + "DataBase", + "FileSystem" + ], + "type": "string" + }, + "AetherDataTransferTaskType": { + "enum": [ + "ImportData", + "ExportData", + "CopyData" + ], + "type": "string" + }, + "AetherDataTransferV2CloudSetting": { + "type": "object", + "properties": { + "taskType": { + "$ref": "#/components/schemas/AetherDataTransferTaskType" + }, + "ComputeName": { + "type": "string", + "nullable": true + }, + "CopyDataTask": { + "$ref": "#/components/schemas/AetherCopyDataTask" + }, + "ImportDataTask": { + "$ref": "#/components/schemas/AetherImportDataTask" + }, + "ExportDataTask": { + "$ref": "#/components/schemas/AetherExportDataTask" + }, + "DataTransferSources": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AetherDataTransferSource" + }, + "description": "This is a dictionary", + "nullable": true + }, + "DataTransferSinks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AetherDataTransferSink" + }, + "description": "This is a dictionary", + "nullable": true + }, + "DataCopyMode": { + "$ref": "#/components/schemas/AetherDataCopyMode" + } + }, + "additionalProperties": false + }, + "AetherDatabaseSink": { + "type": "object", + "properties": { + "connection": { + "type": "string", + "nullable": true + }, + "table": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDatabaseSource": { + "type": "object", + "properties": { + "connection": { + "type": "string", + "nullable": true + }, + "query": { + "type": "string", + "nullable": true + }, + "storedProcedureName": { + "type": "string", + "nullable": true + }, + "storedProcedureParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherStoredProcedureParameter" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDatabricksComputeInfo": { + "type": "object", + "properties": { + "existingClusterId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDatasetOutput": { + "type": "object", + "properties": { + "datasetType": { + "$ref": "#/components/schemas/AetherDatasetType" + }, + "datasetRegistration": { + "$ref": "#/components/schemas/AetherDatasetRegistration" + }, + "datasetOutputOptions": { + "$ref": "#/components/schemas/AetherDatasetOutputOptions" + } + }, + "additionalProperties": false + }, + "AetherDatasetOutputOptions": { + "type": "object", + "properties": { + "sourceGlobs": { + "$ref": "#/components/schemas/AetherGlobsOptions" + }, + "pathOnDatastore": { + "type": "string", + "nullable": true + }, + "PathOnDatastoreParameterAssignment": { + "$ref": "#/components/schemas/AetherParameterAssignment" + } + }, + "additionalProperties": false + }, + "AetherDatasetRegistration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "createNewVersion": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "additionalTransformations": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDatasetType": { + "enum": [ + "File", + "Tabular" + ], + "type": "string" + }, + "AetherDatastoreSetting": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherDoWhileControlFlowInfo": { + "type": "object", + "properties": { + "outputPortNameToInputPortNamesMapping": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "nullable": true + }, + "conditionOutputPortName": { + "type": "string", + "nullable": true + }, + "runSettings": { + "$ref": "#/components/schemas/AetherDoWhileControlFlowRunSettings" + } + }, + "additionalProperties": false + }, + "AetherDoWhileControlFlowRunSettings": { + "type": "object", + "properties": { + "maxLoopIterationCount": { + "$ref": "#/components/schemas/AetherParameterAssignment" + } + }, + "additionalProperties": false + }, + "AetherDockerSettingConfiguration": { + "type": "object", + "properties": { + "useDocker": { + "type": "boolean", + "nullable": true + }, + "sharedVolumes": { + "type": "boolean", + "nullable": true + }, + "shmSize": { + "type": "string", + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherEarlyTerminationPolicyType": { + "enum": [ + "Bandit", + "MedianStopping", + "TruncationSelection" + ], + "type": "string" + }, + "AetherEntityInterfaceDocumentation": { + "type": "object", + "properties": { + "inputsDocumentation": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "outputsDocumentation": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "parametersDocumentation": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherEntityStatus": { + "enum": [ + "Active", + "Deprecated", + "Disabled" + ], + "type": "string" + }, + "AetherEntrySetting": { + "type": "object", + "properties": { + "file": { + "type": "string", + "nullable": true + }, + "className": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherEnvironmentConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "useEnvironmentDefinition": { + "type": "boolean" + }, + "environmentDefinitionString": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherEsCloudConfiguration": { + "type": "object", + "properties": { + "enableOutputToFileBasedOnDataTypeId": { + "type": "boolean", + "nullable": true + }, + "amlComputePriorityInternal": { + "$ref": "#/components/schemas/AetherPriorityConfiguration" + }, + "itpPriorityInternal": { + "$ref": "#/components/schemas/AetherPriorityConfiguration" + }, + "singularityPriorityInternal": { + "$ref": "#/components/schemas/AetherPriorityConfiguration" + }, + "environment": { + "$ref": "#/components/schemas/AetherEnvironmentConfiguration" + }, + "hyperDriveConfiguration": { + "$ref": "#/components/schemas/AetherHyperDriveConfiguration" + }, + "k8sConfig": { + "$ref": "#/components/schemas/AetherK8sConfiguration" + }, + "resourceConfig": { + "$ref": "#/components/schemas/AetherResourceConfiguration" + }, + "torchDistributedConfig": { + "$ref": "#/components/schemas/AetherTorchDistributedConfiguration" + }, + "targetSelectorConfig": { + "$ref": "#/components/schemas/AetherTargetSelectorConfiguration" + }, + "dockerConfig": { + "$ref": "#/components/schemas/AetherDockerSettingConfiguration" + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "maxRunDurationSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "identity": { + "$ref": "#/components/schemas/AetherIdentitySetting" + }, + "applicationEndpoints": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ApplicationEndpointConfiguration" + }, + "nullable": true + }, + "runConfig": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherExecutionEnvironment": { + "enum": [ + "ExeWorkerMachine", + "DockerContainerWithoutNetwork", + "DockerContainerWithNetwork", + "HyperVWithoutNetwork", + "HyperVWithNetwork" + ], + "type": "string" + }, + "AetherExecutionPhase": { + "enum": [ + "Execution", + "Initialization", + "Finalization" + ], + "type": "string" + }, + "AetherExportDataTask": { + "type": "object", + "properties": { + "DataTransferSink": { + "$ref": "#/components/schemas/AetherDataTransferSink" + } + }, + "additionalProperties": false + }, + "AetherFeaturizationMode": { + "enum": [ + "Auto", + "Custom", + "Off" + ], + "type": "string" + }, + "AetherFeaturizationSettings": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/AetherFeaturizationMode" + }, + "blockedTransformers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "columnPurposes": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "dropColumns": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "transformerParams": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherColumnTransformer" + }, + "nullable": true + }, + "nullable": true + }, + "datasetLanguage": { + "type": "string", + "nullable": true + }, + "enableDnnFeaturization": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherFileBasedPathType": { + "enum": [ + "Unknown", + "File", + "Folder" + ], + "type": "string" + }, + "AetherFileSystem": { + "type": "object", + "properties": { + "connection": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherForecastHorizon": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/AetherForecastHorizonMode" + }, + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AetherForecastHorizonMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "AetherForecastingSettings": { + "type": "object", + "properties": { + "countryOrRegionForHolidays": { + "type": "string", + "nullable": true + }, + "timeColumnName": { + "type": "string", + "nullable": true + }, + "targetLags": { + "$ref": "#/components/schemas/AetherTargetLags" + }, + "targetRollingWindowSize": { + "$ref": "#/components/schemas/AetherTargetRollingWindowSize" + }, + "forecastHorizon": { + "$ref": "#/components/schemas/AetherForecastHorizon" + }, + "timeSeriesIdColumnNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "frequency": { + "type": "string", + "nullable": true + }, + "featureLags": { + "type": "string", + "nullable": true + }, + "seasonality": { + "$ref": "#/components/schemas/AetherSeasonality" + }, + "shortSeriesHandlingConfig": { + "$ref": "#/components/schemas/AetherShortSeriesHandlingConfiguration" + }, + "useStl": { + "$ref": "#/components/schemas/AetherUseStl" + }, + "targetAggregateFunction": { + "$ref": "#/components/schemas/AetherTargetAggregationFunction" + }, + "cvStepSize": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "featuresUnknownAtForecastTime": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherGeneralSettings": { + "type": "object", + "properties": { + "primaryMetric": { + "$ref": "#/components/schemas/AetherPrimaryMetrics" + }, + "taskType": { + "$ref": "#/components/schemas/AetherTaskType" + }, + "logVerbosity": { + "$ref": "#/components/schemas/AetherLogVerbosity" + } + }, + "additionalProperties": false + }, + "AetherGlobsOptions": { + "type": "object", + "properties": { + "globPatterns": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherGraphControlNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "controlType": { + "$ref": "#/components/schemas/AetherControlType" + }, + "controlParameter": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "runAttribution": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherGraphControlReferenceNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "comment": { + "type": "string", + "nullable": true + }, + "controlFlowType": { + "$ref": "#/components/schemas/AetherControlFlowType" + }, + "referenceNodeId": { + "type": "string", + "nullable": true + }, + "doWhileControlFlowInfo": { + "$ref": "#/components/schemas/AetherDoWhileControlFlowInfo" + }, + "parallelForControlFlowInfo": { + "$ref": "#/components/schemas/AetherParallelForControlFlowInfo" + }, + "runAttribution": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherGraphDatasetNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "datasetId": { + "type": "string", + "nullable": true + }, + "dataPathParameterName": { + "type": "string", + "nullable": true + }, + "dataSetDefinition": { + "$ref": "#/components/schemas/AetherDataSetDefinition" + } + }, + "additionalProperties": false + }, + "AetherGraphEdge": { + "type": "object", + "properties": { + "sourceOutputPort": { + "$ref": "#/components/schemas/AetherPortInfo" + }, + "destinationInputPort": { + "$ref": "#/components/schemas/AetherPortInfo" + } + }, + "additionalProperties": false + }, + "AetherGraphEntity": { + "type": "object", + "properties": { + "moduleNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherGraphModuleNode" + }, + "nullable": true + }, + "datasetNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherGraphDatasetNode" + }, + "nullable": true + }, + "subGraphNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherGraphReferenceNode" + }, + "nullable": true + }, + "controlReferenceNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherGraphControlReferenceNode" + }, + "nullable": true + }, + "controlNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherGraphControlNode" + }, + "nullable": true + }, + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherGraphEdge" + }, + "nullable": true + }, + "defaultCompute": { + "$ref": "#/components/schemas/AetherComputeSetting" + }, + "defaultDatastore": { + "$ref": "#/components/schemas/AetherDatastoreSetting" + }, + "defaultCloudPriority": { + "$ref": "#/components/schemas/AetherCloudPrioritySetting" + }, + "parentSubGraphModuleIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "workspaceId": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + }, + "entityStatus": { + "$ref": "#/components/schemas/AetherEntityStatus" + } + }, + "additionalProperties": false + }, + "AetherGraphModuleNode": { + "type": "object", + "properties": { + "cloudPriority": { + "type": "integer", + "format": "int32" + }, + "defaultDataRetentionHint": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "complianceCluster": { + "type": "string", + "nullable": true + }, + "euclidWorkspaceId": { + "type": "string", + "nullable": true + }, + "attachedModules": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "acceptableMachineClusters": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "customDataLocationId": { + "type": "string", + "nullable": true + }, + "alertTimeoutDuration": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "runconfig": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "moduleId": { + "type": "string", + "nullable": true + }, + "comment": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "moduleParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "nullable": true + }, + "moduleMetadataParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "nullable": true + }, + "moduleOutputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherOutputSetting" + }, + "nullable": true + }, + "moduleInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherInputSetting" + }, + "nullable": true + }, + "useGraphDefaultCompute": { + "type": "boolean" + }, + "useGraphDefaultDatastore": { + "type": "boolean" + }, + "regenerateOutput": { + "type": "boolean" + }, + "controlInputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherControlInput" + }, + "nullable": true + }, + "cloudSettings": { + "$ref": "#/components/schemas/AetherCloudSettings" + }, + "executionPhase": { + "$ref": "#/components/schemas/AetherExecutionPhase" + }, + "runAttribution": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherGraphReferenceNode": { + "type": "object", + "properties": { + "graphId": { + "type": "string", + "nullable": true + }, + "defaultCompute": { + "$ref": "#/components/schemas/AetherComputeSetting" + }, + "defaultDatastore": { + "$ref": "#/components/schemas/AetherDatastoreSetting" + }, + "id": { + "type": "string", + "nullable": true + }, + "moduleId": { + "type": "string", + "nullable": true + }, + "comment": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "moduleParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "nullable": true + }, + "moduleMetadataParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "nullable": true + }, + "moduleOutputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherOutputSetting" + }, + "nullable": true + }, + "moduleInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherInputSetting" + }, + "nullable": true + }, + "useGraphDefaultCompute": { + "type": "boolean" + }, + "useGraphDefaultDatastore": { + "type": "boolean" + }, + "regenerateOutput": { + "type": "boolean" + }, + "controlInputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherControlInput" + }, + "nullable": true + }, + "cloudSettings": { + "$ref": "#/components/schemas/AetherCloudSettings" + }, + "executionPhase": { + "$ref": "#/components/schemas/AetherExecutionPhase" + }, + "runAttribution": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherHdfsReference": { + "type": "object", + "properties": { + "amlDataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherHdiClusterComputeInfo": { + "type": "object", + "properties": { + "address": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "privateKey": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherHdiRunConfiguration": { + "type": "object", + "properties": { + "file": { + "type": "string", + "nullable": true + }, + "className": { + "type": "string", + "nullable": true + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "archives": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "jars": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "pyFiles": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "queue": { + "type": "string", + "nullable": true + }, + "driverMemory": { + "type": "string", + "nullable": true + }, + "driverCores": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "executorMemory": { + "type": "string", + "nullable": true + }, + "executorCores": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "numberExecutors": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "conf": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherHyperDriveConfiguration": { + "type": "object", + "properties": { + "hyperDriveRunConfig": { + "type": "string", + "nullable": true + }, + "primaryMetricGoal": { + "type": "string", + "nullable": true + }, + "primaryMetricName": { + "type": "string", + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherArgumentAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherIdentitySetting": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/AetherIdentityType" + }, + "clientId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "objectId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "msiResourceId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherIdentityType": { + "enum": [ + "UserIdentity", + "Managed", + "AMLToken" + ], + "type": "string" + }, + "AetherImportDataTask": { + "type": "object", + "properties": { + "DataTransferSource": { + "$ref": "#/components/schemas/AetherDataTransferSource" + } + }, + "additionalProperties": false + }, + "AetherInputSetting": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AetherDataStoreMode" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "additionalTransformations": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherInteractiveConfig": { + "type": "object", + "properties": { + "isSSHEnabled": { + "type": "boolean", + "nullable": true + }, + "sshPublicKey": { + "type": "string", + "nullable": true + }, + "isIPythonEnabled": { + "type": "boolean", + "nullable": true + }, + "isTensorBoardEnabled": { + "type": "boolean", + "nullable": true + }, + "interactivePort": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherK8sConfiguration": { + "type": "object", + "properties": { + "maxRetryCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "resourceConfiguration": { + "$ref": "#/components/schemas/AetherResourceConfig" + }, + "priorityConfiguration": { + "$ref": "#/components/schemas/AetherPriorityConfig" + }, + "interactiveConfiguration": { + "$ref": "#/components/schemas/AetherInteractiveConfig" + } + }, + "additionalProperties": false + }, + "AetherLegacyDataPath": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AetherDataStoreMode" + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherLimitSettings": { + "type": "object", + "properties": { + "maxTrials": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timeout": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "trialTimeout": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "maxConcurrentTrials": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxCoresPerTrial": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exitScore": { + "type": "number", + "format": "double", + "nullable": true + }, + "enableEarlyTermination": { + "type": "boolean", + "nullable": true + }, + "maxNodes": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherLogVerbosity": { + "enum": [ + "NotSet", + "Debug", + "Info", + "Warning", + "Error", + "Critical" + ], + "type": "string" + }, + "AetherMlcComputeInfo": { + "type": "object", + "properties": { + "mlcComputeType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherModuleDeploymentSource": { + "enum": [ + "Client", + "AutoDeployment", + "Vsts" + ], + "type": "string" + }, + "AetherModuleEntity": { + "type": "object", + "properties": { + "lastUpdatedBy": { + "$ref": "#/components/schemas/AetherCreatedBy" + }, + "displayName": { + "type": "string", + "nullable": true + }, + "moduleExecutionType": { + "type": "string", + "nullable": true + }, + "moduleType": { + "$ref": "#/components/schemas/AetherModuleType" + }, + "moduleTypeVersion": { + "type": "string", + "nullable": true + }, + "resourceRequirements": { + "$ref": "#/components/schemas/AetherResourceModel" + }, + "machineCluster": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "defaultComplianceCluster": { + "type": "string", + "nullable": true + }, + "repositoryType": { + "$ref": "#/components/schemas/AetherRepositoryType" + }, + "relativePathToSourceCode": { + "type": "string", + "nullable": true + }, + "commitId": { + "type": "string", + "nullable": true + }, + "codeReviewLink": { + "type": "string", + "nullable": true + }, + "unitTestsAvailable": { + "type": "boolean" + }, + "isCompressed": { + "type": "boolean" + }, + "executionEnvironment": { + "$ref": "#/components/schemas/AetherExecutionEnvironment" + }, + "isOutputMarkupEnabled": { + "type": "boolean" + }, + "dockerImageId": { + "type": "string", + "nullable": true + }, + "dockerImageReference": { + "type": "string", + "nullable": true + }, + "dockerImageSecurityGroups": { + "type": "string", + "nullable": true + }, + "extendedProperties": { + "$ref": "#/components/schemas/AetherModuleExtendedProperties" + }, + "deploymentSource": { + "$ref": "#/components/schemas/AetherModuleDeploymentSource" + }, + "deploymentSourceMetadata": { + "type": "string", + "nullable": true + }, + "identifierHash": { + "type": "string", + "nullable": true + }, + "identifierHashV2": { + "type": "string", + "nullable": true + }, + "kvTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "createdBy": { + "$ref": "#/components/schemas/AetherCreatedBy" + }, + "runconfig": { + "type": "string", + "nullable": true + }, + "cloudSettings": { + "$ref": "#/components/schemas/AetherCloudSettings" + }, + "category": { + "type": "string", + "nullable": true + }, + "stepType": { + "type": "string", + "nullable": true + }, + "stage": { + "type": "string", + "nullable": true + }, + "uploadState": { + "$ref": "#/components/schemas/AetherUploadState" + }, + "sourceCodeLocation": { + "type": "string", + "nullable": true + }, + "sizeInBytes": { + "type": "integer", + "format": "int64" + }, + "downloadLocation": { + "type": "string", + "nullable": true + }, + "dataLocation": { + "$ref": "#/components/schemas/AetherDataLocation" + }, + "scriptingRuntimeId": { + "type": "string", + "nullable": true + }, + "interfaceDocumentation": { + "$ref": "#/components/schemas/AetherEntityInterfaceDocumentation" + }, + "isEyesOn": { + "type": "boolean" + }, + "complianceCluster": { + "type": "string", + "nullable": true + }, + "isDeterministic": { + "type": "boolean" + }, + "informationUrl": { + "type": "string", + "nullable": true + }, + "isExperimentIdInParameters": { + "type": "boolean" + }, + "interfaceString": { + "type": "string", + "nullable": true + }, + "defaultParameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "structuredInterface": { + "$ref": "#/components/schemas/AetherStructuredInterface" + }, + "familyId": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "sequenceNumberInFamily": { + "type": "integer", + "format": "int32" + }, + "owner": { + "type": "string", + "nullable": true + }, + "azureTenantId": { + "type": "string", + "nullable": true + }, + "azureUserId": { + "type": "string", + "nullable": true + }, + "collaborators": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "workspaceId": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + }, + "entityStatus": { + "$ref": "#/components/schemas/AetherEntityStatus" + } + }, + "additionalProperties": false + }, + "AetherModuleExtendedProperties": { + "type": "object", + "properties": { + "autoDeployedArtifact": { + "$ref": "#/components/schemas/AetherBuildArtifactInfo" + }, + "scriptNeedsApproval": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "AetherModuleHashVersion": { + "enum": [ + "IdentifierHash", + "IdentifierHashV2" + ], + "type": "string" + }, + "AetherModuleType": { + "enum": [ + "None", + "BatchInferencing" + ], + "type": "string" + }, + "AetherNCrossValidationMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "AetherNCrossValidations": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/AetherNCrossValidationMode" + }, + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AetherOutputSetting": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "DataStoreNameParameterAssignment": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AetherDataStoreMode" + }, + "DataStoreModeParameterAssignment": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "PathOnComputeParameterAssignment": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "overwrite": { + "type": "boolean" + }, + "dataReferenceName": { + "type": "string", + "nullable": true + }, + "webServicePort": { + "type": "string", + "nullable": true + }, + "datasetRegistration": { + "$ref": "#/components/schemas/AetherDatasetRegistration" + }, + "datasetOutputOptions": { + "$ref": "#/components/schemas/AetherDatasetOutputOptions" + }, + "AssetOutputSettings": { + "$ref": "#/components/schemas/AetherAssetOutputSettings" + }, + "parameterName": { + "type": "string", + "nullable": true + }, + "AssetOutputSettingsParameterName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherParallelForControlFlowInfo": { + "type": "object", + "properties": { + "parallelForItemsInput": { + "$ref": "#/components/schemas/AetherParameterAssignment" + } + }, + "additionalProperties": false + }, + "AetherParameterAssignment": { + "type": "object", + "properties": { + "valueType": { + "$ref": "#/components/schemas/AetherParameterValueType" + }, + "assignmentsToConcatenate": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherParameterAssignment" + }, + "nullable": true + }, + "dataPathAssignment": { + "$ref": "#/components/schemas/AetherLegacyDataPath" + }, + "dataSetDefinitionValueAssignment": { + "$ref": "#/components/schemas/AetherDataSetDefinitionValue" + }, + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherParameterType": { + "enum": [ + "Int", + "Double", + "Bool", + "String", + "Undefined" + ], + "type": "string" + }, + "AetherParameterValueType": { + "enum": [ + "Literal", + "GraphParameterName", + "Concatenate", + "Input", + "DataPath", + "DataSetDefinition" + ], + "type": "string" + }, + "AetherPhillyHdfsReference": { + "type": "object", + "properties": { + "cluster": { + "type": "string", + "nullable": true + }, + "vc": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherPortInfo": { + "type": "object", + "properties": { + "nodeId": { + "type": "string", + "nullable": true + }, + "portName": { + "type": "string", + "nullable": true + }, + "graphPortName": { + "type": "string", + "nullable": true + }, + "isParameter": { + "type": "boolean" + }, + "webServicePort": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherPrimaryMetrics": { + "enum": [ + "AUCWeighted", + "Accuracy", + "NormMacroRecall", + "AveragePrecisionScoreWeighted", + "PrecisionScoreWeighted", + "SpearmanCorrelation", + "NormalizedRootMeanSquaredError", + "R2Score", + "NormalizedMeanAbsoluteError", + "NormalizedRootMeanSquaredLogError", + "MeanAveragePrecision", + "Iou" + ], + "type": "string" + }, + "AetherPriorityConfig": { + "type": "object", + "properties": { + "jobPriority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "isPreemptible": { + "type": "boolean", + "nullable": true + }, + "nodeCountSet": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "scaleInterval": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherPriorityConfiguration": { + "type": "object", + "properties": { + "cloudPriority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "stringTypePriority": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherRegisteredDataSetReference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherRemoteDockerComputeInfo": { + "type": "object", + "properties": { + "address": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "privateKey": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherRepositoryType": { + "enum": [ + "None", + "Other", + "Git", + "SourceDepot", + "Cosmos" + ], + "type": "string" + }, + "AetherResourceAssignment": { + "type": "object", + "properties": { + "attributes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AetherResourceAttributeAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherResourceAttributeAssignment": { + "type": "object", + "properties": { + "attribute": { + "$ref": "#/components/schemas/AetherResourceAttributeDefinition" + }, + "operator": { + "$ref": "#/components/schemas/AetherResourceOperator" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherResourceAttributeDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/AetherResourceValueType" + }, + "units": { + "type": "string", + "nullable": true + }, + "allowedOperators": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherResourceOperator" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherResourceConfig": { + "type": "object", + "properties": { + "gpuCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "cpuCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "memoryRequestInGB": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherResourceConfiguration": { + "type": "object", + "properties": { + "instanceCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "locations": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "instancePriority": { + "type": "string", + "nullable": true + }, + "quotaEnforcementResourceId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherResourceModel": { + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherResourceAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherResourceOperator": { + "enum": [ + "Equal", + "Contain", + "GreaterOrEqual" + ], + "type": "string" + }, + "AetherResourceValueType": { + "enum": [ + "String", + "Double" + ], + "type": "string" + }, + "AetherResourcesSetting": { + "type": "object", + "properties": { + "instanceSize": { + "type": "string", + "nullable": true + }, + "sparkVersion": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherSamplingAlgorithmType": { + "enum": [ + "Random", + "Grid", + "Bayesian" + ], + "type": "string" + }, + "AetherSavedDataSetReference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherScopeCloudConfiguration": { + "type": "object", + "properties": { + "inputPathSuffixes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AetherArgumentAssignment" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputPathSuffixes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AetherArgumentAssignment" + }, + "description": "This is a dictionary", + "nullable": true + }, + "userAlias": { + "type": "string", + "nullable": true + }, + "tokens": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "autoToken": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vcp": { + "type": "number", + "format": "float", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherSeasonality": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/AetherSeasonalityMode" + }, + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AetherSeasonalityMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "AetherShortSeriesHandlingConfiguration": { + "enum": [ + "Auto", + "Pad", + "Drop" + ], + "type": "string" + }, + "AetherSqlDataPath": { + "type": "object", + "properties": { + "sqlTableName": { + "type": "string", + "nullable": true + }, + "sqlQuery": { + "type": "string", + "nullable": true + }, + "sqlStoredProcedureName": { + "type": "string", + "nullable": true + }, + "sqlStoredProcedureParams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherStoredProcedureParameter" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherStackEnsembleSettings": { + "type": "object", + "properties": { + "stackMetaLearnerType": { + "$ref": "#/components/schemas/AetherStackMetaLearnerType" + }, + "stackMetaLearnerTrainPercentage": { + "type": "number", + "format": "double", + "nullable": true + }, + "stackMetaLearnerKWargs": { + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherStackMetaLearnerType": { + "enum": [ + "None", + "LogisticRegression", + "LogisticRegressionCV", + "LightGBMClassifier", + "ElasticNet", + "ElasticNetCV", + "LightGBMRegressor", + "LinearRegression" + ], + "type": "string" + }, + "AetherStoredProcedureParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/AetherStoredProcedureParameterType" + } + }, + "additionalProperties": false + }, + "AetherStoredProcedureParameterType": { + "enum": [ + "String", + "Int", + "Decimal", + "Guid", + "Boolean", + "Date" + ], + "type": "string" + }, + "AetherStructuredInterface": { + "type": "object", + "properties": { + "commandLinePattern": { + "type": "string", + "nullable": true + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherStructuredInterfaceInput" + }, + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherStructuredInterfaceOutput" + }, + "nullable": true + }, + "controlOutputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherControlOutput" + }, + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherStructuredInterfaceParameter" + }, + "nullable": true + }, + "metadataParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherStructuredInterfaceParameter" + }, + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherArgumentAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherStructuredInterfaceInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "dataTypeIdsList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "isOptional": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + }, + "skipProcessing": { + "type": "boolean" + }, + "isResource": { + "type": "boolean" + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AetherDataStoreMode" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "overwrite": { + "type": "boolean" + }, + "dataReferenceName": { + "type": "string", + "nullable": true + }, + "datasetTypes": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/AetherDatasetType" + }, + "nullable": true + }, + "additionalTransformations": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherStructuredInterfaceOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "dataTypeId": { + "type": "string", + "nullable": true + }, + "passThroughDataTypeInputName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "skipProcessing": { + "type": "boolean" + }, + "isArtifact": { + "type": "boolean" + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AetherDataStoreMode" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "overwrite": { + "type": "boolean" + }, + "dataReferenceName": { + "type": "string", + "nullable": true + }, + "trainingOutput": { + "$ref": "#/components/schemas/AetherTrainingOutput" + }, + "datasetOutput": { + "$ref": "#/components/schemas/AetherDatasetOutput" + }, + "AssetOutputSettings": { + "$ref": "#/components/schemas/AetherAssetOutputSettings" + }, + "earlyAvailable": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "AetherStructuredInterfaceParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "parameterType": { + "$ref": "#/components/schemas/AetherParameterType" + }, + "isOptional": { + "type": "boolean" + }, + "defaultValue": { + "type": "string", + "nullable": true + }, + "lowerBound": { + "type": "string", + "nullable": true + }, + "upperBound": { + "type": "string", + "nullable": true + }, + "enumValues": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enumValuesToArgumentStrings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "setEnvironmentVariable": { + "type": "boolean" + }, + "environmentVariableOverride": { + "type": "string", + "nullable": true + }, + "enabledByParameterName": { + "type": "string", + "nullable": true + }, + "enabledByParameterValues": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "uiHint": { + "$ref": "#/components/schemas/AetherUIParameterHint" + }, + "groupNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "argumentName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherSubGraphConfiguration": { + "type": "object", + "properties": { + "graphId": { + "type": "string", + "nullable": true + }, + "graphDraftId": { + "type": "string", + "nullable": true + }, + "defaultComputeInternal": { + "$ref": "#/components/schemas/AetherComputeSetting" + }, + "defaultDatastoreInternal": { + "$ref": "#/components/schemas/AetherDatastoreSetting" + }, + "DefaultCloudPriority": { + "$ref": "#/components/schemas/AetherCloudPrioritySetting" + }, + "UserAlias": { + "type": "string", + "nullable": true + }, + "IsDynamic": { + "type": "boolean", + "default": false, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherSweepEarlyTerminationPolicy": { + "type": "object", + "properties": { + "policyType": { + "$ref": "#/components/schemas/AetherEarlyTerminationPolicyType" + }, + "evaluationInterval": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "delayEvaluation": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "slackFactor": { + "type": "number", + "format": "float", + "nullable": true + }, + "slackAmount": { + "type": "number", + "format": "float", + "nullable": true + }, + "truncationPercentage": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherSweepSettings": { + "type": "object", + "properties": { + "limits": { + "$ref": "#/components/schemas/AetherSweepSettingsLimits" + }, + "searchSpace": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "nullable": true + }, + "samplingAlgorithm": { + "$ref": "#/components/schemas/AetherSamplingAlgorithmType" + }, + "earlyTermination": { + "$ref": "#/components/schemas/AetherSweepEarlyTerminationPolicy" + } + }, + "additionalProperties": false + }, + "AetherSweepSettingsLimits": { + "type": "object", + "properties": { + "maxTotalTrials": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxConcurrentTrials": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherTabularTrainingMode": { + "enum": [ + "Distributed", + "NonDistributed", + "Auto" + ], + "type": "string" + }, + "AetherTargetAggregationFunction": { + "enum": [ + "Sum", + "Max", + "Min", + "Mean" + ], + "type": "string" + }, + "AetherTargetLags": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/AetherTargetLagsMode" + }, + "values": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherTargetLagsMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "AetherTargetRollingWindowSize": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/AetherTargetRollingWindowSizeMode" + }, + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AetherTargetRollingWindowSizeMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "AetherTargetSelectorConfiguration": { + "type": "object", + "properties": { + "lowPriorityVMTolerant": { + "type": "boolean" + }, + "clusterBlockList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "computeType": { + "type": "string", + "nullable": true + }, + "instanceType": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "instanceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "myResourceOnly": { + "type": "boolean" + }, + "planId": { + "type": "string", + "nullable": true + }, + "planRegionId": { + "type": "string", + "nullable": true + }, + "region": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "regions": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "vcBlockList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherTaskType": { + "enum": [ + "Classification", + "Regression", + "Forecasting", + "ImageClassification", + "ImageClassificationMultilabel", + "ImageObjectDetection", + "ImageInstanceSegmentation", + "TextClassification", + "TextMultiLabeling", + "TextNER", + "TextClassificationMultilabel" + ], + "type": "string" + }, + "AetherTestDataSettings": { + "type": "object", + "properties": { + "testDataSize": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherTorchDistributedConfiguration": { + "type": "object", + "properties": { + "processCountPerNode": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherTrainingOutput": { + "type": "object", + "properties": { + "trainingOutputType": { + "$ref": "#/components/schemas/AetherTrainingOutputType" + }, + "iteration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "metric": { + "type": "string", + "nullable": true + }, + "modelFile": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherTrainingOutputType": { + "enum": [ + "Metrics", + "Model" + ], + "type": "string" + }, + "AetherTrainingSettings": { + "type": "object", + "properties": { + "blockListModels": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "allowListModels": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enableDnnTraining": { + "type": "boolean", + "nullable": true + }, + "enableOnnxCompatibleModels": { + "type": "boolean", + "nullable": true + }, + "stackEnsembleSettings": { + "$ref": "#/components/schemas/AetherStackEnsembleSettings" + }, + "enableStackEnsemble": { + "type": "boolean", + "nullable": true + }, + "enableVoteEnsemble": { + "type": "boolean", + "nullable": true + }, + "ensembleModelDownloadTimeout": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "enableModelExplainability": { + "type": "boolean", + "nullable": true + }, + "trainingMode": { + "$ref": "#/components/schemas/AetherTabularTrainingMode" + } + }, + "additionalProperties": false + }, + "AetherUIAzureOpenAIDeploymentNameSelector": { + "type": "object", + "properties": { + "Capabilities": { + "$ref": "#/components/schemas/AetherUIAzureOpenAIModelCapabilities" + } + }, + "additionalProperties": false + }, + "AetherUIAzureOpenAIModelCapabilities": { + "type": "object", + "properties": { + "Completion": { + "type": "boolean", + "nullable": true + }, + "ChatCompletion": { + "type": "boolean", + "nullable": true + }, + "Embeddings": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherUIColumnPicker": { + "type": "object", + "properties": { + "columnPickerFor": { + "type": "string", + "nullable": true + }, + "columnSelectionCategories": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "singleColumnSelection": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "AetherUIJsonEditor": { + "type": "object", + "properties": { + "jsonSchema": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherUIParameterHint": { + "type": "object", + "properties": { + "uiWidgetType": { + "$ref": "#/components/schemas/AetherUIWidgetTypeEnum" + }, + "columnPicker": { + "$ref": "#/components/schemas/AetherUIColumnPicker" + }, + "uiScriptLanguage": { + "$ref": "#/components/schemas/AetherUIScriptLanguageEnum" + }, + "jsonEditor": { + "$ref": "#/components/schemas/AetherUIJsonEditor" + }, + "PromptFlowConnectionSelector": { + "$ref": "#/components/schemas/AetherUIPromptFlowConnectionSelector" + }, + "AzureOpenAIDeploymentNameSelector": { + "$ref": "#/components/schemas/AetherUIAzureOpenAIDeploymentNameSelector" + }, + "UxIgnore": { + "type": "boolean" + }, + "Anonymous": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "AetherUIPromptFlowConnectionSelector": { + "type": "object", + "properties": { + "PromptFlowConnectionType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherUIScriptLanguageEnum": { + "enum": [ + "None", + "Python", + "R", + "Json", + "Sql" + ], + "type": "string" + }, + "AetherUIWidgetTypeEnum": { + "enum": [ + "Default", + "Mode", + "ColumnPicker", + "Credential", + "Script", + "ComputeSelection", + "JsonEditor", + "SearchSpaceParameter", + "SectionToggle", + "YamlEditor", + "EnableRuntimeSweep", + "DataStoreSelection", + "InstanceTypeSelection", + "ConnectionSelection", + "PromptFlowConnectionSelection", + "AzureOpenAIDeploymentNameSelection" + ], + "type": "string" + }, + "AetherUploadState": { + "enum": [ + "Uploading", + "Completed", + "Canceled", + "Failed" + ], + "type": "string" + }, + "AetherUseStl": { + "enum": [ + "Season", + "SeasonTrend" + ], + "type": "string" + }, + "AetherValidationDataSettings": { + "type": "object", + "properties": { + "nCrossValidations": { + "$ref": "#/components/schemas/AetherNCrossValidations" + }, + "validationDataSize": { + "type": "number", + "format": "double", + "nullable": true + }, + "cvSplitColumnNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "validationType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherVsoBuildArtifactInfo": { + "type": "object", + "properties": { + "buildInfo": { + "$ref": "#/components/schemas/AetherVsoBuildInfo" + }, + "downloadUrl": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AetherVsoBuildDefinitionInfo": { + "type": "object", + "properties": { + "accountName": { + "type": "string", + "nullable": true + }, + "projectId": { + "type": "string", + "format": "uuid" + }, + "buildDefinitionId": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AetherVsoBuildInfo": { + "type": "object", + "properties": { + "definitionInfo": { + "$ref": "#/components/schemas/AetherVsoBuildDefinitionInfo" + }, + "buildId": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AmlDataset": { + "type": "object", + "properties": { + "registeredDataSetReference": { + "$ref": "#/components/schemas/RegisteredDataSetReference" + }, + "savedDataSetReference": { + "$ref": "#/components/schemas/SavedDataSetReference" + }, + "additionalTransformations": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AmlK8sConfiguration": { + "type": "object", + "properties": { + "resourceConfiguration": { + "$ref": "#/components/schemas/ResourceConfiguration" + }, + "priorityConfiguration": { + "$ref": "#/components/schemas/AmlK8sPriorityConfiguration" + }, + "interactiveConfiguration": { + "$ref": "#/components/schemas/InteractiveConfiguration" + } + }, + "additionalProperties": false + }, + "AmlK8sPriorityConfiguration": { + "type": "object", + "properties": { + "jobPriority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "isPreemptible": { + "type": "boolean", + "nullable": true + }, + "nodeCountSet": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "scaleInterval": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AmlSparkCloudSetting": { + "type": "object", + "properties": { + "entry": { + "$ref": "#/components/schemas/EntrySetting" + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "archives": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "jars": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "pyFiles": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "driverMemory": { + "type": "string", + "nullable": true + }, + "driverCores": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "executorMemory": { + "type": "string", + "nullable": true + }, + "executorCores": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "numberExecutors": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "environmentAssetId": { + "type": "string", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "inlineEnvironmentDefinitionString": { + "type": "string", + "nullable": true + }, + "conf": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "compute": { + "type": "string", + "nullable": true + }, + "resources": { + "$ref": "#/components/schemas/ResourcesSetting" + }, + "identity": { + "$ref": "#/components/schemas/IdentitySetting" + } + }, + "additionalProperties": false + }, + "ApiAndParameters": { + "type": "object", + "properties": { + "api": { + "type": "string", + "nullable": true + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowToolSettingParameter" + }, + "description": "This is a dictionary", + "nullable": true + }, + "default_prompt": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ApplicationEndpointConfiguration": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ApplicationEndpointType" + }, + "port": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "nodes": { + "$ref": "#/components/schemas/Nodes" + } + }, + "additionalProperties": false + }, + "ApplicationEndpointType": { + "enum": [ + "Jupyter", + "JupyterLab", + "SSH", + "TensorBoard", + "VSCode", + "Theia", + "Grafana", + "Custom", + "RayDashboard" + ], + "type": "string" + }, + "ArgumentAssignment": { + "type": "object", + "properties": { + "valueType": { + "$ref": "#/components/schemas/ArgumentValueType" + }, + "value": { + "type": "string", + "nullable": true + }, + "nestedArgumentList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArgumentAssignment" + }, + "nullable": true + }, + "stringInterpolationArgumentList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArgumentAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ArgumentValueType": { + "enum": [ + "Literal", + "Parameter", + "Input", + "Output", + "NestedList", + "StringInterpolationList" + ], + "type": "string" + }, + "Asset": { + "type": "object", + "properties": { + "assetId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AssetDefinition": { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/AEVAAssetType" + }, + "assetId": { + "type": "string", + "nullable": true + }, + "serializedAssetId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AssetNameAndVersionIdentifier": { + "type": "object", + "properties": { + "assetName": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "feedName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AssetOutputSettings": { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "PathParameterAssignment": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "type": { + "$ref": "#/components/schemas/AEVAAssetType" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AEVADataStoreMode" + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AssetOutputSettingsParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "documentation": { + "type": "string", + "nullable": true + }, + "defaultValue": { + "$ref": "#/components/schemas/AssetOutputSettings" + } + }, + "additionalProperties": false + }, + "AssetPublishResult": { + "type": "object", + "properties": { + "feedName": { + "type": "string", + "nullable": true + }, + "assetName": { + "type": "string", + "nullable": true + }, + "assetVersion": { + "type": "string", + "nullable": true + }, + "stepName": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "errorMessage": { + "type": "string", + "nullable": true + }, + "createdTime": { + "type": "string", + "format": "date-time" + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "regionalPublishResults": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetPublishSingleRegionResult" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AssetPublishSingleRegionResult": { + "type": "object", + "properties": { + "stepName": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "errorMessage": { + "type": "string", + "nullable": true + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time" + }, + "totalSteps": { + "type": "integer", + "format": "int32" + }, + "finishedSteps": { + "type": "integer", + "format": "int32" + }, + "remainingSteps": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "AssetScopeTypes": { + "enum": [ + "Workspace", + "Global", + "All", + "Feed" + ], + "type": "string" + }, + "AssetSourceType": { + "enum": [ + "Unknown", + "Local", + "GithubFile", + "GithubFolder", + "DevopsArtifactsZip" + ], + "type": "string" + }, + "AssetType": { + "enum": [ + "Component", + "Model", + "Environment", + "Dataset", + "DataStore", + "SampleGraph", + "FlowToolSetting", + "FlowConnection", + "FlowRuntimeSpec" + ], + "type": "string" + }, + "AssetTypeMetaInfo": { + "type": "object", + "properties": { + "consumptionMode": { + "$ref": "#/components/schemas/ConsumeMode" + } + }, + "additionalProperties": false + }, + "AssetVersionPublishRequest": { + "type": "object", + "properties": { + "assetType": { + "$ref": "#/components/schemas/AssetType" + }, + "assetSourceType": { + "$ref": "#/components/schemas/AssetSourceType" + }, + "yamlFile": { + "type": "string", + "nullable": true + }, + "sourceZipUrl": { + "type": "string", + "nullable": true + }, + "sourceZipFile": { + "type": "string", + "format": "binary", + "nullable": true + }, + "feedName": { + "type": "string", + "nullable": true + }, + "setAsDefaultVersion": { + "type": "boolean" + }, + "referencedAssets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssetNameAndVersionIdentifier" + }, + "nullable": true + }, + "flowFile": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AssignedUser": { + "type": "object", + "properties": { + "objectId": { + "type": "string", + "nullable": true + }, + "tenantId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AttachCosmosRequest": { + "type": "object", + "properties": { + "accountEndpoint": { + "type": "string", + "nullable": true + }, + "resourceArmId": { + "type": "string", + "nullable": true + }, + "databaseName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AuthKeys": { + "type": "object", + "properties": { + "primaryKey": { + "type": "string", + "nullable": true + }, + "secondaryKey": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AutoClusterComputeSpecification": { + "type": "object", + "properties": { + "instanceSize": { + "type": "string", + "nullable": true + }, + "instancePriority": { + "type": "string", + "nullable": true + }, + "osType": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "runtimeVersion": { + "type": "string", + "nullable": true + }, + "quotaEnforcementResourceId": { + "type": "string", + "nullable": true + }, + "modelComputeSpecificationId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AutoDeleteCondition": { + "enum": [ + "CreatedGreaterThan", + "LastAccessedGreaterThan" + ], + "type": "string" + }, + "AutoDeleteSetting": { + "type": "object", + "properties": { + "condition": { + "$ref": "#/components/schemas/AutoDeleteCondition" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AutoFeaturizeConfiguration": { + "type": "object", + "properties": { + "featurizationConfig": { + "$ref": "#/components/schemas/FeaturizationSettings" + } + }, + "additionalProperties": false + }, + "AutoMLComponentConfiguration": { + "type": "object", + "properties": { + "autoTrainConfig": { + "$ref": "#/components/schemas/AutoTrainConfiguration" + }, + "autoFeaturizeConfig": { + "$ref": "#/components/schemas/AutoFeaturizeConfiguration" + } + }, + "additionalProperties": false + }, + "AutoScaler": { + "type": "object", + "properties": { + "autoscaleEnabled": { + "type": "boolean", + "nullable": true + }, + "minReplicas": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxReplicas": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "targetUtilization": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "refreshPeriodInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "AutoTrainConfiguration": { + "type": "object", + "properties": { + "generalSettings": { + "$ref": "#/components/schemas/GeneralSettings" + }, + "limitSettings": { + "$ref": "#/components/schemas/LimitSettings" + }, + "dataSettings": { + "$ref": "#/components/schemas/DataSettings" + }, + "forecastingSettings": { + "$ref": "#/components/schemas/ForecastingSettings" + }, + "trainingSettings": { + "$ref": "#/components/schemas/TrainingSettings" + }, + "sweepSettings": { + "$ref": "#/components/schemas/SweepSettings" + }, + "imageModelSettings": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "computeConfiguration": { + "$ref": "#/components/schemas/AEVAComputeConfiguration" + }, + "resourceConfigurtion": { + "$ref": "#/components/schemas/AEVAResourceConfiguration" + }, + "environmentId": { + "type": "string", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "AutologgerSettings": { + "type": "object", + "properties": { + "mlFlowAutologger": { + "$ref": "#/components/schemas/MLFlowAutologgerState" + } + }, + "additionalProperties": false + }, + "AvailabilityResponse": { + "type": "object", + "properties": { + "isAvailable": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorResponse" + } + }, + "additionalProperties": false + }, + "AzureBlobReference": { + "type": "object", + "properties": { + "container": { + "type": "string", + "nullable": true + }, + "sasToken": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AzureDataLakeGen2Reference": { + "type": "object", + "properties": { + "fileSystemName": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AzureDataLakeReference": { + "type": "object", + "properties": { + "tenant": { + "type": "string", + "nullable": true + }, + "subscription": { + "type": "string", + "nullable": true + }, + "resourceGroup": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AzureDatabaseReference": { + "type": "object", + "properties": { + "tableName": { + "type": "string", + "nullable": true + }, + "sqlQuery": { + "type": "string", + "nullable": true + }, + "storedProcedureName": { + "type": "string", + "nullable": true + }, + "storedProcedureParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StoredProcedureParameter" + }, + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AzureFilesReference": { + "type": "object", + "properties": { + "share": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AzureMLModuleVersionDescriptor": { + "type": "object", + "properties": { + "moduleVersionId": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AzureOpenAIDeploymentDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "modelName": { + "type": "string", + "nullable": true + }, + "capabilities": { + "$ref": "#/components/schemas/AzureOpenAIModelCapabilities" + } + }, + "additionalProperties": false + }, + "AzureOpenAIModelCapabilities": { + "type": "object", + "properties": { + "completion": { + "type": "boolean", + "nullable": true + }, + "chat_completion": { + "type": "boolean", + "nullable": true + }, + "embeddings": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "BatchAiComputeInfo": { + "type": "object", + "properties": { + "batchAiSubscriptionId": { + "type": "string", + "nullable": true + }, + "batchAiResourceGroup": { + "type": "string", + "nullable": true + }, + "batchAiWorkspaceName": { + "type": "string", + "nullable": true + }, + "clusterName": { + "type": "string", + "nullable": true + }, + "nativeSharedDirectory": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "BatchDataInput": { + "type": "object", + "properties": { + "dataUri": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "BatchExportComponentSpecResponse": { + "type": "object", + "properties": { + "componentSpecMetaInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentSpecMetaInfo" + }, + "nullable": true + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "BatchExportRawComponentResponse": { + "type": "object", + "properties": { + "rawComponentDtos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RawComponentDto" + }, + "nullable": true + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "BatchGetComponentHashesRequest": { + "type": "object", + "properties": { + "moduleHashVersion": { + "$ref": "#/components/schemas/AetherModuleHashVersion" + }, + "moduleEntities": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AetherModuleEntity" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "BatchGetComponentRequest": { + "type": "object", + "properties": { + "versionIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "nameAndVersions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentNameMetaInfo" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Binding": { + "type": "object", + "properties": { + "bindingType": { + "$ref": "#/components/schemas/BindingType" + } + }, + "additionalProperties": false + }, + "BindingType": { + "enum": [ + "Basic" + ], + "type": "string" + }, + "BuildContextLocationType": { + "enum": [ + "Git", + "StorageAccount" + ], + "type": "string" + }, + "BulkTestDto": { + "type": "object", + "properties": { + "bulkTestId": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "runtime": { + "type": "string", + "nullable": true + }, + "createdBy": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "createdOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "evaluationCount": { + "type": "integer", + "format": "int32" + }, + "variantCount": { + "type": "integer", + "format": "int32" + }, + "flowSubmitRunSettings": { + "$ref": "#/components/schemas/FlowSubmitRunSettings" + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowInputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowOutputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "batch_inputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + } + }, + "additionalProperties": false + }, + "ChatGroupRole": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "role": { + "type": "string", + "nullable": true + }, + "stop_signal": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + }, + "variant": { + "type": "string", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environment_variables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "display_name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "resources": { + "$ref": "#/components/schemas/SessionRuntimeResources" + }, + "inputs": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "CloudError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "target": { + "type": "string", + "nullable": true + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CloudError" + }, + "nullable": true, + "readOnly": true + }, + "additionalInfo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AdditionalErrorInfo" + }, + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false + }, + "CloudPrioritySetting": { + "type": "object", + "properties": { + "scopePriority": { + "$ref": "#/components/schemas/PriorityConfiguration" + }, + "AmlComputePriority": { + "$ref": "#/components/schemas/PriorityConfiguration" + }, + "ItpPriority": { + "$ref": "#/components/schemas/PriorityConfiguration" + }, + "SingularityPriority": { + "$ref": "#/components/schemas/PriorityConfiguration" + } + }, + "additionalProperties": false + }, + "CloudSettings": { + "type": "object", + "properties": { + "linkedSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "nullable": true + }, + "priorityConfig": { + "$ref": "#/components/schemas/PriorityConfiguration" + }, + "hdiRunConfig": { + "$ref": "#/components/schemas/HdiRunConfiguration" + }, + "subGraphConfig": { + "$ref": "#/components/schemas/SubGraphConfiguration" + }, + "autoMLComponentConfig": { + "$ref": "#/components/schemas/AutoMLComponentConfiguration" + }, + "apCloudConfig": { + "$ref": "#/components/schemas/APCloudConfiguration" + }, + "scopeCloudConfig": { + "$ref": "#/components/schemas/ScopeCloudConfiguration" + }, + "esCloudConfig": { + "$ref": "#/components/schemas/EsCloudConfiguration" + }, + "dataTransferCloudConfig": { + "$ref": "#/components/schemas/DataTransferCloudConfiguration" + }, + "amlSparkCloudSetting": { + "$ref": "#/components/schemas/AmlSparkCloudSetting" + }, + "dataTransferV2CloudSetting": { + "$ref": "#/components/schemas/DataTransferV2CloudSetting" + } + }, + "additionalProperties": false + }, + "CollieRunSettings": { + "type": "object", + "properties": { + "amlComputeName": { + "type": "string", + "nullable": true + }, + "nodeCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "managedIdentityClientId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ColumnTransformer": { + "type": "object", + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "parameters": { + "nullable": true + } + }, + "additionalProperties": false + }, + "CommandJob": { + "type": "object", + "properties": { + "jobType": { + "$ref": "#/components/schemas/JobType" + }, + "codeId": { + "type": "string", + "nullable": true + }, + "command": { + "minLength": 1, + "type": "string", + "nullable": true + }, + "environmentId": { + "type": "string", + "nullable": true + }, + "inputDataBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InputDataBinding" + }, + "nullable": true + }, + "outputDataBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OutputDataBinding" + }, + "nullable": true + }, + "distribution": { + "$ref": "#/components/schemas/DistributionConfiguration" + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "parameters": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "autologgerSettings": { + "$ref": "#/components/schemas/MfeInternalAutologgerSettings" + }, + "limits": { + "$ref": "#/components/schemas/CommandJobLimits" + }, + "provisioningState": { + "$ref": "#/components/schemas/JobProvisioningState" + }, + "parentJobName": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "interactionEndpoints": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JobEndpoint" + }, + "nullable": true + }, + "identity": { + "$ref": "#/components/schemas/MfeInternalIdentityConfiguration" + }, + "compute": { + "$ref": "#/components/schemas/ComputeConfiguration" + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "output": { + "$ref": "#/components/schemas/JobOutputArtifacts" + }, + "isArchived": { + "type": "boolean" + }, + "schedule": { + "$ref": "#/components/schemas/ScheduleBase" + }, + "componentId": { + "type": "string", + "nullable": true + }, + "notificationSetting": { + "$ref": "#/components/schemas/NotificationSetting" + }, + "secretsConfiguration": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MfeInternalSecretConfiguration" + }, + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "CommandJobLimits": { + "type": "object", + "properties": { + "jobLimitsType": { + "$ref": "#/components/schemas/JobLimitsType" + }, + "timeout": { + "type": "string", + "format": "date-span", + "nullable": true + } + }, + "additionalProperties": false + }, + "CommandReturnCodeConfig": { + "type": "object", + "properties": { + "returnCode": { + "$ref": "#/components/schemas/SuccessfulCommandReturnCode" + }, + "successfulReturnCodes": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Communicator": { + "enum": [ + "None", + "ParameterServer", + "Gloo", + "Mpi", + "Nccl", + "ParallelTask" + ], + "type": "string" + }, + "ComponentConfiguration": { + "type": "object", + "properties": { + "componentIdentifier": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "optional": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "default": { + "type": "string", + "nullable": true + }, + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "min": { + "type": "string", + "nullable": true + }, + "max": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentJob": { + "type": "object", + "properties": { + "compute": { + "$ref": "#/components/schemas/ComputeConfiguration" + }, + "componentId": { + "type": "string", + "nullable": true + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComponentJobInput" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComponentJobOutput" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentJobInput": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InputData" + }, + "inputBinding": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentJobOutput": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MfeInternalOutputData" + }, + "outputBinding": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentNameAndDefaultVersion": { + "type": "object", + "properties": { + "componentName": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "feedName": { + "type": "string", + "nullable": true + }, + "registryName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentNameMetaInfo": { + "type": "object", + "properties": { + "feedName": { + "type": "string", + "nullable": true + }, + "componentName": { + "type": "string", + "nullable": true + }, + "componentVersion": { + "type": "string", + "nullable": true + }, + "registryName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentPreflightResult": { + "type": "object", + "properties": { + "errorDetails": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RootError" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentRegistrationTypeEnum": { + "enum": [ + "Normal", + "AnonymousAmlModule", + "AnonymousAmlModuleVersion", + "ModuleEntityOnly" + ], + "type": "string" + }, + "ComponentSpecMetaInfo": { + "type": "object", + "properties": { + "componentSpec": { + "nullable": true + }, + "componentVersion": { + "type": "string", + "nullable": true + }, + "isAnonymous": { + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "componentName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "isArchived": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ComponentType": { + "enum": [ + "Unknown", + "CommandComponent", + "Command" + ], + "type": "string" + }, + "ComponentUpdateRequest": { + "type": "object", + "properties": { + "originalModuleEntity": { + "$ref": "#/components/schemas/ModuleEntity" + }, + "updateModuleEntity": { + "$ref": "#/components/schemas/ModuleEntity" + }, + "moduleName": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "overwriteWithOriginalNameAndVersion": { + "type": "boolean", + "nullable": true + }, + "snapshotId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentValidationRequest": { + "type": "object", + "properties": { + "componentIdentifier": { + "type": "string", + "nullable": true + }, + "computeIdentity": { + "$ref": "#/components/schemas/ComputeIdentityDto" + }, + "executionContextDto": { + "$ref": "#/components/schemas/ExecutionContextDto" + }, + "environmentDefinition": { + "$ref": "#/components/schemas/EnvironmentDefinitionDto" + }, + "dataPortDtos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataPortDto" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ComponentValidationResponse": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/ValidationStatus" + }, + "error": { + "$ref": "#/components/schemas/ErrorResponse" + } + }, + "additionalProperties": false + }, + "Compute": { + "type": "object", + "properties": { + "target": { + "type": "string", + "nullable": true + }, + "targetType": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "gpuCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "priority": { + "type": "string", + "nullable": true + }, + "region": { + "type": "string", + "nullable": true + }, + "armId": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeConfiguration": { + "type": "object", + "properties": { + "target": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxInstanceCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "isLocal": { + "type": "boolean" + }, + "location": { + "type": "string", + "nullable": true + }, + "isClusterless": { + "type": "boolean" + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "instancePriority": { + "type": "string", + "nullable": true + }, + "jobPriority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "shmSize": { + "type": "string", + "nullable": true + }, + "dockerArgs": { + "type": "string", + "nullable": true + }, + "locations": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeContract": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "location": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "identity": { + "$ref": "#/components/schemas/ComputeIdentityContract" + }, + "properties": { + "$ref": "#/components/schemas/ComputeProperties" + } + }, + "additionalProperties": false + }, + "ComputeDetails": { + "type": "object" + }, + "ComputeEnvironmentType": { + "enum": [ + "ACI", + "AKS", + "AMLCOMPUTE", + "IOT", + "AKSENDPOINT", + "MIRSINGLEMODEL", + "MIRAMLCOMPUTE", + "MIRGA", + "AMLARC", + "BATCHAMLCOMPUTE", + "UNKNOWN" + ], + "type": "string" + }, + "ComputeIdentityContract": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "systemIdentityUrl": { + "type": "string", + "nullable": true + }, + "principalId": { + "type": "string", + "nullable": true + }, + "tenantId": { + "type": "string", + "nullable": true + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecretUrl": { + "type": "string", + "nullable": true + }, + "userAssignedIdentities": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComputeRPUserAssignedIdentity" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeIdentityDto": { + "type": "object", + "properties": { + "computeName": { + "type": "string", + "nullable": true + }, + "computeTargetType": { + "$ref": "#/components/schemas/ComputeTargetType" + }, + "intellectualPropertyPublisher": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeInfo": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "computeType": { + "$ref": "#/components/schemas/ComputeEnvironmentType" + }, + "isSslEnabled": { + "type": "boolean" + }, + "isGpuType": { + "type": "boolean" + }, + "clusterPurpose": { + "type": "string", + "nullable": true + }, + "publicIpAddress": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeProperties": { + "required": [ + "computeType" + ], + "type": "object", + "properties": { + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "disableLocalAuth": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "computeType": { + "minLength": 1, + "type": "string" + }, + "computeLocation": { + "type": "string", + "nullable": true + }, + "provisioningState": { + "$ref": "#/components/schemas/ProvisioningState" + }, + "provisioningErrors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ODataErrorResponse" + }, + "nullable": true + }, + "provisioningWarnings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "isAttachedCompute": { + "type": "boolean" + }, + "properties": { + "$ref": "#/components/schemas/ComputeDetails" + }, + "status": { + "$ref": "#/components/schemas/ComputeStatus" + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ComputeWarning" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeRPUserAssignedIdentity": { + "type": "object", + "properties": { + "principalId": { + "type": "string", + "nullable": true + }, + "tenantId": { + "type": "string", + "nullable": true + }, + "clientId": { + "type": "string", + "nullable": true + }, + "clientSecretUrl": { + "type": "string", + "nullable": true + }, + "resourceId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeRequest": { + "type": "object", + "properties": { + "nodeCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "gpuCount": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeSetting": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "computeType": { + "$ref": "#/components/schemas/ComputeType" + }, + "batchAiComputeInfo": { + "$ref": "#/components/schemas/BatchAiComputeInfo" + }, + "remoteDockerComputeInfo": { + "$ref": "#/components/schemas/RemoteDockerComputeInfo" + }, + "hdiClusterComputeInfo": { + "$ref": "#/components/schemas/HdiClusterComputeInfo" + }, + "mlcComputeInfo": { + "$ref": "#/components/schemas/MlcComputeInfo" + }, + "databricksComputeInfo": { + "$ref": "#/components/schemas/DatabricksComputeInfo" + } + }, + "additionalProperties": false + }, + "ComputeStatus": { + "type": "object", + "properties": { + "isStatusAvailable": { + "type": "boolean", + "readOnly": true + }, + "detailedStatus": { + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/ODataError" + } + }, + "additionalProperties": false + }, + "ComputeStatusDetail": { + "type": "object", + "properties": { + "provisioningState": { + "type": "string", + "nullable": true + }, + "provisioningErrorMessage": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ComputeTargetType": { + "enum": [ + "Local", + "Remote", + "HdiCluster", + "ContainerInstance", + "AmlCompute", + "ComputeInstance", + "Cmk8s", + "SynapseSpark", + "Kubernetes", + "Aisc", + "GlobalJobDispatcher", + "Databricks", + "MockedCompute" + ], + "type": "string" + }, + "ComputeType": { + "enum": [ + "BatchAi", + "MLC", + "HdiCluster", + "RemoteDocker", + "Databricks", + "Aisc" + ], + "type": "string" + }, + "ComputeWarning": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "code": { + "type": "string", + "nullable": true + }, + "severity": { + "$ref": "#/components/schemas/SeverityLevel" + } + }, + "additionalProperties": false + }, + "ConfigValueType": { + "enum": [ + "String", + "Secret" + ], + "type": "string" + }, + "ConnectionAuthMode": { + "enum": [ + "Key", + "MeidToken" + ], + "type": "string" + }, + "ConnectionCategory": { + "enum": [ + "PythonFeed", + "ACR", + "Git", + "S3", + "Snowflake", + "AzureSqlDb", + "AzureSynapseAnalytics", + "AzureMySqlDb", + "AzurePostgresDb", + "AzureDataLakeGen2", + "Redis", + "ApiKey", + "AzureOpenAI", + "CognitiveSearch", + "CognitiveService", + "CustomKeys", + "AzureBlob", + "AzureOneLake", + "CosmosDb", + "CosmosDbMongoDbApi", + "AzureDataExplorer", + "AzureMariaDb", + "AzureDatabricksDeltaLake", + "AzureSqlMi", + "AzureTableStorage", + "AmazonRdsForOracle", + "AmazonRdsForSqlServer", + "AmazonRedshift", + "Db2", + "Drill", + "GoogleBigQuery", + "Greenplum", + "Hbase", + "Hive", + "Impala", + "Informix", + "MariaDb", + "MicrosoftAccess", + "MySql", + "Netezza", + "Oracle", + "Phoenix", + "PostgreSql", + "Presto", + "SapOpenHub", + "SapBw", + "SapHana", + "SapTable", + "Spark", + "SqlServer", + "Sybase", + "Teradata", + "Vertica", + "Cassandra", + "Couchbase", + "MongoDbV2", + "MongoDbAtlas", + "AmazonS3Compatible", + "FileServer", + "FtpServer", + "GoogleCloudStorage", + "Hdfs", + "OracleCloudStorage", + "Sftp", + "GenericHttp", + "ODataRest", + "Odbc", + "GenericRest", + "AmazonMws", + "Concur", + "Dynamics", + "DynamicsAx", + "DynamicsCrm", + "GoogleAdWords", + "Hubspot", + "Jira", + "Magento", + "Marketo", + "Office365", + "Eloqua", + "Responsys", + "OracleServiceCloud", + "PayPal", + "QuickBooks", + "Salesforce", + "SalesforceServiceCloud", + "SalesforceMarketingCloud", + "SapCloudForCustomer", + "SapEcc", + "ServiceNow", + "SharePointOnlineList", + "Shopify", + "Square", + "WebTable", + "Xero", + "Zoho", + "GenericContainerRegistry", + "OpenAI", + "Serp", + "BingLLMSearch", + "Serverless" + ], + "type": "string" + }, + "ConnectionConfigSpec": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "configValueType": { + "$ref": "#/components/schemas/ConfigValueType" + }, + "description": { + "type": "string", + "nullable": true + }, + "defaultValue": { + "type": "string", + "nullable": true + }, + "enumValues": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "isOptional": { + "type": "boolean" + }, + "supportedAuthModes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionAuthMode" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ConnectionDto": { + "type": "object", + "properties": { + "connectionName": { + "type": "string", + "nullable": true + }, + "connectionType": { + "$ref": "#/components/schemas/ConnectionType" + }, + "configs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "customConfigs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/CustomConnectionConfig" + }, + "description": "This is a dictionary", + "nullable": true + }, + "expiryTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "owner": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "createdDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "ConnectionEntity": { + "type": "object", + "properties": { + "connectionId": { + "type": "string", + "nullable": true + }, + "connectionName": { + "type": "string", + "nullable": true + }, + "connectionType": { + "$ref": "#/components/schemas/ConnectionType" + }, + "connectionScope": { + "$ref": "#/components/schemas/ConnectionScope" + }, + "configs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "customConfigs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/CustomConnectionConfig" + }, + "description": "This is a dictionary", + "nullable": true + }, + "expiryTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "secretName": { + "type": "string", + "nullable": true + }, + "owner": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "ConnectionOverrideSetting": { + "type": "object", + "properties": { + "connectionSourceType": { + "$ref": "#/components/schemas/ConnectionSourceType" + }, + "nodeName": { + "type": "string", + "nullable": true + }, + "nodeInputName": { + "type": "string", + "nullable": true + }, + "nodeDeploymentNameInput": { + "type": "string", + "nullable": true + }, + "nodeModelInput": { + "type": "string", + "nullable": true + }, + "connectionName": { + "type": "string", + "nullable": true + }, + "deploymentName": { + "type": "string", + "nullable": true + }, + "model": { + "type": "string", + "nullable": true + }, + "connectionTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionType" + }, + "nullable": true + }, + "capabilities": { + "$ref": "#/components/schemas/AzureOpenAIModelCapabilities" + }, + "modelEnum": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ConnectionScope": { + "enum": [ + "User", + "WorkspaceShared" + ], + "type": "string" + }, + "ConnectionSourceType": { + "enum": [ + "Node", + "NodeInput" + ], + "type": "string" + }, + "ConnectionSpec": { + "type": "object", + "properties": { + "connectionType": { + "$ref": "#/components/schemas/ConnectionType" + }, + "configSpecs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionConfigSpec" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ConnectionType": { + "enum": [ + "OpenAI", + "AzureOpenAI", + "Serp", + "Bing", + "AzureContentModerator", + "Custom", + "AzureContentSafety", + "CognitiveSearch", + "SubstrateLLM", + "Pinecone", + "Qdrant", + "Weaviate", + "FormRecognizer", + "Serverless" + ], + "type": "string" + }, + "ConsumeMode": { + "enum": [ + "Reference", + "Copy", + "CopyAndAutoUpgrade" + ], + "type": "string" + }, + "ContainerInstanceConfiguration": { + "type": "object", + "properties": { + "region": { + "type": "string", + "nullable": true + }, + "cpuCores": { + "type": "number", + "format": "double" + }, + "memoryGb": { + "type": "number", + "format": "double" + } + }, + "additionalProperties": false + }, + "ContainerRegistry": { + "type": "object", + "properties": { + "address": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "credentialType": { + "type": "string", + "nullable": true + }, + "registryIdentity": { + "$ref": "#/components/schemas/RegistryIdentity" + } + }, + "additionalProperties": false + }, + "ContainerResourceRequirements": { + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "double", + "nullable": true + }, + "cpuLimit": { + "type": "number", + "format": "double", + "nullable": true + }, + "memoryInGB": { + "type": "number", + "format": "double", + "nullable": true + }, + "memoryInGBLimit": { + "type": "number", + "format": "double", + "nullable": true + }, + "gpuEnabled": { + "type": "boolean", + "nullable": true + }, + "gpu": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "fpga": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "ControlFlowType": { + "enum": [ + "None", + "DoWhile", + "ParallelFor" + ], + "type": "string" + }, + "ControlInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "defaultValue": { + "$ref": "#/components/schemas/ControlInputValue" + } + }, + "additionalProperties": false + }, + "ControlInputValue": { + "enum": [ + "None", + "False", + "True", + "Skipped" + ], + "type": "string" + }, + "ControlOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ControlType": { + "enum": [ + "IfElse" + ], + "type": "string" + }, + "CopyDataTask": { + "type": "object", + "properties": { + "DataCopyMode": { + "$ref": "#/components/schemas/DataCopyMode" + } + }, + "additionalProperties": false + }, + "CreateExperimentTemplateRequest": { + "type": "object", + "properties": { + "experimentDefinitionSource": { + "$ref": "#/components/schemas/ExperimentDefinitionSource" + } + }, + "additionalProperties": false + }, + "CreateFlowRequest": { + "type": "object", + "properties": { + "flowName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "details": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "flow": { + "$ref": "#/components/schemas/Flow" + }, + "flowDefinitionFilePath": { + "type": "string", + "nullable": true + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "flowRunSettings": { + "$ref": "#/components/schemas/FlowRunSettings" + }, + "isArchived": { + "type": "boolean" + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "CreateFlowRuntimeRequest": { + "type": "object", + "properties": { + "runtimeType": { + "$ref": "#/components/schemas/RuntimeType" + }, + "identity": { + "$ref": "#/components/schemas/ManagedServiceIdentity" + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "fromExistingEndpoint": { + "type": "boolean" + }, + "fromExistingDeployment": { + "type": "boolean" + }, + "endpointName": { + "type": "string", + "nullable": true + }, + "deploymentName": { + "type": "string", + "nullable": true + }, + "computeInstanceName": { + "type": "string", + "nullable": true + }, + "fromExistingCustomApp": { + "type": "boolean" + }, + "customAppName": { + "type": "string", + "nullable": true + }, + "runtimeDescription": { + "type": "string", + "nullable": true + }, + "environment": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "CreateFlowSessionRequest": { + "type": "object", + "properties": { + "pythonPipRequirements": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "baseImage": { + "type": "string", + "nullable": true + }, + "action": { + "$ref": "#/components/schemas/SetupFlowSessionAction" + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "enableMultiContainer": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "CreateInferencePipelineRequest": { + "type": "object", + "properties": { + "moduleNodeId": { + "type": "string", + "nullable": true + }, + "portName": { + "type": "string", + "nullable": true + }, + "trainingPipelineDraftName": { + "type": "string", + "nullable": true + }, + "trainingPipelineRunDisplayName": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "pipelineType": { + "$ref": "#/components/schemas/PipelineType" + }, + "pipelineDraftMode": { + "$ref": "#/components/schemas/PipelineDraftMode" + }, + "graphComponentsMode": { + "$ref": "#/components/schemas/GraphComponentsMode" + }, + "subPipelinesInfo": { + "$ref": "#/components/schemas/SubPipelinesInfo" + }, + "flattenedSubGraphs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineSubDraft" + }, + "nullable": true + }, + "pipelineParameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataPathAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "assetOutputSettingsAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "graph": { + "$ref": "#/components/schemas/GraphDraftEntity" + }, + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "moduleNodeRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeRunSetting" + }, + "nullable": true + }, + "moduleNodeUIInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enforceRerun": { + "type": "boolean", + "nullable": true + }, + "datasetAccessModes": { + "$ref": "#/components/schemas/DatasetAccessModes" + } + }, + "additionalProperties": false + }, + "CreateOrUpdateConnectionRequest": { + "type": "object", + "properties": { + "connectionType": { + "$ref": "#/components/schemas/ConnectionType" + }, + "connectionScope": { + "$ref": "#/components/schemas/ConnectionScope" + }, + "configs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "customConfigs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/CustomConnectionConfig" + }, + "description": "This is a dictionary", + "nullable": true + }, + "expiryTime": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "CreateOrUpdateConnectionRequestDto": { + "type": "object", + "properties": { + "connectionType": { + "$ref": "#/components/schemas/ConnectionType" + }, + "configs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "customConfigs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/CustomConnectionConfig" + }, + "description": "This is a dictionary", + "nullable": true + }, + "expiryTime": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "CreatePipelineDraftRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "pipelineType": { + "$ref": "#/components/schemas/PipelineType" + }, + "pipelineDraftMode": { + "$ref": "#/components/schemas/PipelineDraftMode" + }, + "graphComponentsMode": { + "$ref": "#/components/schemas/GraphComponentsMode" + }, + "subPipelinesInfo": { + "$ref": "#/components/schemas/SubPipelinesInfo" + }, + "flattenedSubGraphs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineSubDraft" + }, + "nullable": true + }, + "pipelineParameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataPathAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "assetOutputSettingsAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "graph": { + "$ref": "#/components/schemas/GraphDraftEntity" + }, + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "moduleNodeRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeRunSetting" + }, + "nullable": true + }, + "moduleNodeUIInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enforceRerun": { + "type": "boolean", + "nullable": true + }, + "datasetAccessModes": { + "$ref": "#/components/schemas/DatasetAccessModes" + } + }, + "additionalProperties": false + }, + "CreatePipelineJobScheduleDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "pipelineJobName": { + "type": "string", + "nullable": true + }, + "pipelineJobRuntimeSettings": { + "$ref": "#/components/schemas/PipelineJobRuntimeBasicSettings" + }, + "displayName": { + "type": "string", + "nullable": true + }, + "triggerType": { + "$ref": "#/components/schemas/TriggerType" + }, + "recurrence": { + "$ref": "#/components/schemas/Recurrence" + }, + "cron": { + "$ref": "#/components/schemas/Cron" + }, + "status": { + "$ref": "#/components/schemas/ScheduleStatus" + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "CreatePublishedPipelineRequest": { + "type": "object", + "properties": { + "usePipelineEndpoint": { + "type": "boolean" + }, + "pipelineName": { + "type": "string", + "nullable": true + }, + "pipelineDescription": { + "type": "string", + "nullable": true + }, + "useExistingPipelineEndpoint": { + "type": "boolean" + }, + "pipelineEndpointName": { + "type": "string", + "nullable": true + }, + "pipelineEndpointDescription": { + "type": "string", + "nullable": true + }, + "setAsDefaultPipelineForEndpoint": { + "type": "boolean" + }, + "stepTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "pipelineParameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataPathAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "assetOutputSettingsAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enableNotification": { + "type": "boolean", + "nullable": true + }, + "subPipelinesInfo": { + "$ref": "#/components/schemas/SubPipelinesInfo" + }, + "displayName": { + "type": "string", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "parentRunId": { + "type": "string", + "nullable": true + }, + "graph": { + "$ref": "#/components/schemas/GraphDraftEntity" + }, + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "moduleNodeRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeRunSetting" + }, + "nullable": true + }, + "moduleNodeUIInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enforceRerun": { + "type": "boolean", + "nullable": true + }, + "datasetAccessModes": { + "$ref": "#/components/schemas/DatasetAccessModes" + } + }, + "additionalProperties": false + }, + "CreateRealTimeEndpointRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "computeInfo": { + "$ref": "#/components/schemas/ComputeInfo" + }, + "description": { + "type": "string", + "nullable": true + }, + "linkedPipelineDraftId": { + "type": "string", + "nullable": true + }, + "linkedPipelineRunId": { + "type": "string", + "nullable": true + }, + "aksAdvanceSettings": { + "$ref": "#/components/schemas/AKSAdvanceSettings" + }, + "aciAdvanceSettings": { + "$ref": "#/components/schemas/ACIAdvanceSettings" + }, + "linkedTrainingPipelineRunId": { + "type": "string", + "nullable": true + }, + "linkedExperimentName": { + "type": "string", + "nullable": true + }, + "graphNodesRunIdMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "workflow": { + "$ref": "#/components/schemas/PipelineGraph" + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InputOutputPortMetadata" + }, + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InputOutputPortMetadata" + }, + "nullable": true + }, + "exampleRequest": { + "$ref": "#/components/schemas/ExampleRequest" + }, + "userStorageConnectionString": { + "type": "string", + "nullable": true + }, + "userStorageEndpointUri": { + "type": "string", + "format": "uri", + "nullable": true + }, + "userStorageWorkspaceSaiToken": { + "type": "string", + "nullable": true + }, + "userStorageContainerName": { + "type": "string", + "nullable": true + }, + "pipelineRunId": { + "type": "string", + "nullable": true + }, + "rootPipelineRunId": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "CreatedBy": { + "type": "object", + "properties": { + "userObjectId": { + "type": "string", + "nullable": true + }, + "userTenantId": { + "type": "string", + "nullable": true + }, + "userName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "CreatedFromDto": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/CreatedFromType" + }, + "locationType": { + "$ref": "#/components/schemas/CreatedFromLocationType" + }, + "location": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "CreatedFromLocationType": { + "enum": [ + "ArtifactId" + ], + "type": "string" + }, + "CreatedFromType": { + "enum": [ + "Notebook" + ], + "type": "string" + }, + "CreationContext": { + "type": "object", + "properties": { + "createdTime": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "creationSource": { + "type": "string", + "nullable": true + } + } + }, + "Cron": { + "type": "object", + "properties": { + "expression": { + "type": "string", + "nullable": true + }, + "endTime": { + "type": "string", + "nullable": true + }, + "startTime": { + "type": "string", + "nullable": true + }, + "timeZone": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "CustomConnectionConfig": { + "type": "object", + "properties": { + "configValueType": { + "$ref": "#/components/schemas/ConfigValueType" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "CustomReference": { + "type": "object", + "properties": { + "amlDataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DBFSReference": { + "type": "object", + "properties": { + "relativePath": { + "type": "string", + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Data": { + "type": "object", + "properties": { + "dataLocation": { + "$ref": "#/components/schemas/ExecutionDataLocation" + }, + "mechanism": { + "$ref": "#/components/schemas/DeliveryMechanism" + }, + "environmentVariableName": { + "type": "string", + "nullable": true + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "overwrite": { + "type": "boolean" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DataBindingMode": { + "enum": [ + "Mount", + "Download", + "Upload", + "ReadOnlyMount", + "ReadWriteMount", + "Direct", + "EvalMount", + "EvalDownload" + ], + "type": "string" + }, + "DataCategory": { + "enum": [ + "All", + "Dataset", + "Model" + ], + "type": "string" + }, + "DataCopyMode": { + "enum": [ + "MergeWithOverwrite", + "FailIfConflict" + ], + "type": "string" + }, + "DataInfo": { + "type": "object", + "properties": { + "feedName": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "dataSourceType": { + "$ref": "#/components/schemas/DataSourceType" + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "dataTypeId": { + "type": "string", + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "modifiedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "registeredBy": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "createdByStudio": { + "type": "boolean", + "nullable": true + }, + "dataReferenceType": { + "$ref": "#/components/schemas/DataReferenceType" + }, + "datasetType": { + "type": "string", + "nullable": true + }, + "savedDatasetId": { + "type": "string", + "nullable": true + }, + "datasetVersionId": { + "type": "string", + "nullable": true + }, + "isVisible": { + "type": "boolean" + }, + "isRegistered": { + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + }, + "connectionString": { + "type": "string", + "nullable": true + }, + "containerName": { + "type": "string", + "nullable": true + }, + "dataStorageEndpointUri": { + "type": "string", + "format": "uri", + "nullable": true + }, + "workspaceSaiToken": { + "type": "string", + "nullable": true + }, + "amlDatasetDataFlow": { + "type": "string", + "nullable": true + }, + "systemData": { + "$ref": "#/components/schemas/SystemData" + }, + "armId": { + "type": "string", + "nullable": true + }, + "assetId": { + "type": "string", + "nullable": true + }, + "assetUri": { + "type": "string", + "nullable": true + }, + "assetType": { + "type": "string", + "nullable": true + }, + "isDataV2": { + "type": "boolean", + "nullable": true + }, + "assetScopeType": { + "$ref": "#/components/schemas/AssetScopeTypes" + }, + "pipelineRunId": { + "type": "string", + "nullable": true + }, + "moduleNodeId": { + "type": "string", + "nullable": true + }, + "outputPortName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DataLocation": { + "type": "object", + "properties": { + "storageType": { + "$ref": "#/components/schemas/DataLocationStorageType" + }, + "storageId": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "dataReference": { + "$ref": "#/components/schemas/DataReference" + }, + "amlDataset": { + "$ref": "#/components/schemas/AmlDataset" + }, + "assetDefinition": { + "$ref": "#/components/schemas/AssetDefinition" + } + }, + "additionalProperties": false + }, + "DataLocationStorageType": { + "enum": [ + "None", + "AzureBlob", + "Artifact", + "Snapshot", + "SavedAmlDataset", + "Asset" + ], + "type": "string" + }, + "DataPath": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "sqlDataPath": { + "$ref": "#/components/schemas/SqlDataPath" + } + }, + "additionalProperties": false + }, + "DataPathParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "documentation": { + "type": "string", + "nullable": true + }, + "defaultValue": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "isOptional": { + "type": "boolean" + }, + "dataTypeId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DataPortDto": { + "type": "object", + "properties": { + "dataPortType": { + "$ref": "#/components/schemas/DataPortType" + }, + "dataPortName": { + "type": "string", + "nullable": true + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "dataStoreIntellectualPropertyAccessMode": { + "$ref": "#/components/schemas/IntellectualPropertyAccessMode" + }, + "dataStoreIntellectualPropertyPublisher": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DataPortType": { + "enum": [ + "Input", + "Output" + ], + "type": "string" + }, + "DataReference": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/DataReferenceType" + }, + "azureBlobReference": { + "$ref": "#/components/schemas/AzureBlobReference" + }, + "azureDataLakeReference": { + "$ref": "#/components/schemas/AzureDataLakeReference" + }, + "azureFilesReference": { + "$ref": "#/components/schemas/AzureFilesReference" + }, + "azureSqlDatabaseReference": { + "$ref": "#/components/schemas/AzureDatabaseReference" + }, + "azurePostgresDatabaseReference": { + "$ref": "#/components/schemas/AzureDatabaseReference" + }, + "azureDataLakeGen2Reference": { + "$ref": "#/components/schemas/AzureDataLakeGen2Reference" + }, + "dbfsReference": { + "$ref": "#/components/schemas/DBFSReference" + }, + "azureMySqlDatabaseReference": { + "$ref": "#/components/schemas/AzureDatabaseReference" + }, + "customReference": { + "$ref": "#/components/schemas/CustomReference" + }, + "hdfsReference": { + "$ref": "#/components/schemas/HdfsReference" + } + }, + "additionalProperties": false + }, + "DataReferenceConfiguration": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + }, + "mode": { + "$ref": "#/components/schemas/DataStoreMode" + }, + "pathOnDataStore": { + "type": "string", + "nullable": true + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "overwrite": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "DataReferenceType": { + "enum": [ + "None", + "AzureBlob", + "AzureDataLake", + "AzureFiles", + "AzureSqlDatabase", + "AzurePostgresDatabase", + "AzureDataLakeGen2", + "DBFS", + "AzureMySqlDatabase", + "Custom", + "Hdfs" + ], + "type": "string" + }, + "DataSetDefinition": { + "type": "object", + "properties": { + "dataTypeShortName": { + "type": "string", + "nullable": true + }, + "parameterName": { + "type": "string", + "nullable": true + }, + "value": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + } + }, + "additionalProperties": false + }, + "DataSetDefinitionValue": { + "type": "object", + "properties": { + "literalValue": { + "$ref": "#/components/schemas/DataPath" + }, + "dataSetReference": { + "$ref": "#/components/schemas/RegisteredDataSetReference" + }, + "savedDataSetReference": { + "$ref": "#/components/schemas/SavedDataSetReference" + }, + "assetDefinition": { + "$ref": "#/components/schemas/AssetDefinition" + } + }, + "additionalProperties": false + }, + "DataSetPathParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "documentation": { + "type": "string", + "nullable": true + }, + "defaultValue": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "isOptional": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "DataSettings": { + "type": "object", + "properties": { + "targetColumnName": { + "type": "string", + "nullable": true + }, + "weightColumnName": { + "type": "string", + "nullable": true + }, + "positiveLabel": { + "type": "string", + "nullable": true + }, + "validationData": { + "$ref": "#/components/schemas/ValidationDataSettings" + }, + "testData": { + "$ref": "#/components/schemas/TestDataSettings" + } + }, + "additionalProperties": false + }, + "DataSourceType": { + "enum": [ + "None", + "PipelineDataSource", + "AmlDataset", + "GlobalDataset", + "FeedModel", + "FeedDataset", + "AmlDataVersion", + "AMLModelVersion" + ], + "type": "string" + }, + "DataStoreMode": { + "enum": [ + "Mount", + "Download", + "Upload" + ], + "type": "string" + }, + "DataTransferCloudConfiguration": { + "type": "object", + "properties": { + "AllowOverwrite": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "DataTransferSink": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/DataTransferStorageType" + }, + "fileSystem": { + "$ref": "#/components/schemas/FileSystem" + }, + "databaseSink": { + "$ref": "#/components/schemas/DatabaseSink" + } + }, + "additionalProperties": false + }, + "DataTransferSource": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/DataTransferStorageType" + }, + "fileSystem": { + "$ref": "#/components/schemas/FileSystem" + }, + "databaseSource": { + "$ref": "#/components/schemas/DatabaseSource" + } + }, + "additionalProperties": false + }, + "DataTransferStorageType": { + "enum": [ + "DataBase", + "FileSystem" + ], + "type": "string" + }, + "DataTransferTaskType": { + "enum": [ + "ImportData", + "ExportData", + "CopyData" + ], + "type": "string" + }, + "DataTransferV2CloudSetting": { + "type": "object", + "properties": { + "taskType": { + "$ref": "#/components/schemas/DataTransferTaskType" + }, + "ComputeName": { + "type": "string", + "nullable": true + }, + "CopyDataTask": { + "$ref": "#/components/schemas/CopyDataTask" + }, + "ImportDataTask": { + "$ref": "#/components/schemas/ImportDataTask" + }, + "ExportDataTask": { + "$ref": "#/components/schemas/ExportDataTask" + }, + "DataTransferSources": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataTransferSource" + }, + "description": "This is a dictionary", + "nullable": true + }, + "DataTransferSinks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataTransferSink" + }, + "description": "This is a dictionary", + "nullable": true + }, + "DataCopyMode": { + "$ref": "#/components/schemas/DataCopyMode" + } + }, + "additionalProperties": false + }, + "DataTypeCreationInfo": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "isDirectory": { + "type": "boolean" + }, + "fileExtension": { + "type": "string", + "nullable": true + }, + "parentDataTypeIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DataTypeMechanism": { + "enum": [ + "ErrorWhenNotExisting", + "RegisterWhenNotExisting", + "RegisterBuildinDataTypeOnly" + ], + "type": "string" + }, + "DatabaseSink": { + "type": "object", + "properties": { + "connection": { + "type": "string", + "nullable": true + }, + "table": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DatabaseSource": { + "type": "object", + "properties": { + "connection": { + "type": "string", + "nullable": true + }, + "query": { + "type": "string", + "nullable": true + }, + "storedProcedureName": { + "type": "string", + "nullable": true + }, + "storedProcedureParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StoredProcedureParameter" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DatabricksComputeInfo": { + "type": "object", + "properties": { + "existingClusterId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DatabricksConfiguration": { + "type": "object", + "properties": { + "workers": { + "type": "integer", + "format": "int32" + }, + "minimumWorkerCount": { + "type": "integer", + "format": "int32" + }, + "maxMumWorkerCount": { + "type": "integer", + "format": "int32" + }, + "sparkVersion": { + "type": "string", + "nullable": true + }, + "nodeTypeId": { + "type": "string", + "nullable": true + }, + "sparkConf": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "sparkEnvVars": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "clusterLogConfDbfsPath": { + "type": "string", + "nullable": true + }, + "dbfsInitScripts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InitScriptInfoDto" + }, + "nullable": true + }, + "instancePoolId": { + "type": "string", + "nullable": true + }, + "timeoutSeconds": { + "type": "integer", + "format": "int32" + }, + "notebookTask": { + "$ref": "#/components/schemas/NoteBookTaskDto" + }, + "sparkPythonTask": { + "$ref": "#/components/schemas/SparkPythonTaskDto" + }, + "sparkJarTask": { + "$ref": "#/components/schemas/SparkJarTaskDto" + }, + "sparkSubmitTask": { + "$ref": "#/components/schemas/SparkSubmitTaskDto" + }, + "jarLibraries": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "eggLibraries": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "whlLibraries": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "pypiLibraries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PythonPyPiOrRCranLibraryDto" + }, + "nullable": true + }, + "rCranLibraries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PythonPyPiOrRCranLibraryDto" + }, + "nullable": true + }, + "mavenLibraries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MavenLibraryDto" + }, + "nullable": true + }, + "libraries": { + "type": "array", + "items": { }, + "nullable": true + }, + "linkedADBWorkspaceMetadata": { + "$ref": "#/components/schemas/LinkedADBWorkspaceMetadata" + }, + "databrickResourceId": { + "type": "string", + "nullable": true + }, + "autoScale": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "DatacacheConfiguration": { + "type": "object", + "properties": { + "datacacheId": { + "type": "string", + "format": "uuid" + }, + "datacacheStore": { + "type": "string", + "nullable": true + }, + "datasetId": { + "type": "string", + "format": "uuid" + }, + "mode": { + "$ref": "#/components/schemas/DatacacheMode" + }, + "replica": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "failureFallback": { + "type": "boolean" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DatacacheMode": { + "enum": [ + "Mount" + ], + "type": "string" + }, + "DatasetAccessModes": { + "enum": [ + "Default", + "DatasetInDpv2", + "AssetInDpv2", + "DatasetInDesignerUI", + "DatasetInDpv2WithDatasetInDesignerUI", + "Dataset", + "AssetInDpv2WithDatasetInDesignerUI", + "DatasetAndAssetInDpv2WithDatasetInDesignerUI", + "AssetInDesignerUI", + "AssetInDpv2WithAssetInDesignerUI", + "Asset" + ], + "type": "string" + }, + "DatasetConsumptionType": { + "enum": [ + "RunInput", + "Reference" + ], + "type": "string" + }, + "DatasetDeliveryMechanism": { + "enum": [ + "Direct", + "Mount", + "Download", + "Hdfs" + ], + "type": "string" + }, + "DatasetIdentifier": { + "type": "object", + "properties": { + "savedId": { + "type": "string", + "nullable": true + }, + "registeredId": { + "type": "string", + "nullable": true + }, + "registeredVersion": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DatasetInputDetails": { + "type": "object", + "properties": { + "inputName": { + "type": "string", + "nullable": true + }, + "mechanism": { + "$ref": "#/components/schemas/DatasetDeliveryMechanism" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DatasetLineage": { + "type": "object", + "properties": { + "identifier": { + "$ref": "#/components/schemas/DatasetIdentifier" + }, + "consumptionType": { + "$ref": "#/components/schemas/DatasetConsumptionType" + }, + "inputDetails": { + "$ref": "#/components/schemas/DatasetInputDetails" + } + }, + "additionalProperties": false + }, + "DatasetOutput": { + "type": "object", + "properties": { + "datasetType": { + "$ref": "#/components/schemas/DatasetType" + }, + "datasetRegistration": { + "$ref": "#/components/schemas/DatasetRegistration" + }, + "datasetOutputOptions": { + "$ref": "#/components/schemas/DatasetOutputOptions" + } + }, + "additionalProperties": false + }, + "DatasetOutputDetails": { + "type": "object", + "properties": { + "outputName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DatasetOutputOptions": { + "type": "object", + "properties": { + "sourceGlobs": { + "$ref": "#/components/schemas/GlobsOptions" + }, + "pathOnDatastore": { + "type": "string", + "nullable": true + }, + "PathOnDatastoreParameterAssignment": { + "$ref": "#/components/schemas/ParameterAssignment" + } + }, + "additionalProperties": false + }, + "DatasetOutputType": { + "enum": [ + "RunOutput", + "Reference" + ], + "type": "string" + }, + "DatasetRegistration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "createNewVersion": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "additionalTransformations": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DatasetRegistrationOptions": { + "type": "object", + "properties": { + "additionalTransformation": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DatasetType": { + "enum": [ + "File", + "Tabular" + ], + "type": "string" + }, + "DatastoreSetting": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DbfsStorageInfoDto": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DebugInfoResponse": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type.", + "nullable": true + }, + "message": { + "type": "string", + "description": "The message.", + "nullable": true + }, + "stackTrace": { + "type": "string", + "description": "The stack trace.", + "nullable": true + }, + "innerException": { + "$ref": "#/components/schemas/DebugInfoResponse" + }, + "data": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + }, + "errorResponse": { + "$ref": "#/components/schemas/ErrorResponse" + } + }, + "additionalProperties": false, + "description": "Internal debugging information not intended for external clients." + }, + "DeliveryMechanism": { + "enum": [ + "Direct", + "Mount", + "Download", + "Hdfs" + ], + "type": "string" + }, + "DeployFlowRequest": { + "type": "object", + "properties": { + "sourceResourceId": { + "type": "string", + "nullable": true + }, + "sourceFlowRunId": { + "type": "string", + "nullable": true + }, + "sourceFlowId": { + "type": "string", + "nullable": true + }, + "flow": { + "$ref": "#/components/schemas/Flow" + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "flowSubmitRunSettings": { + "$ref": "#/components/schemas/FlowSubmitRunSettings" + }, + "outputNamesIncludedInEndpointResponse": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "endpointName": { + "type": "string", + "nullable": true + }, + "endpointDescription": { + "type": "string", + "nullable": true + }, + "authMode": { + "$ref": "#/components/schemas/EndpointAuthMode" + }, + "identity": { + "$ref": "#/components/schemas/ManagedServiceIdentity" + }, + "endpointTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enablePublicNetworkAccess": { + "type": "boolean", + "nullable": true + }, + "connectionOverrides": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionOverrideSetting" + }, + "nullable": true + }, + "useWorkspaceConnection": { + "type": "boolean" + }, + "deploymentName": { + "type": "string", + "nullable": true + }, + "environment": { + "type": "string", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "deploymentTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "appInsightsEnabled": { + "type": "boolean" + }, + "enableModelDataCollector": { + "type": "boolean" + }, + "skipUpdateTrafficToFull": { + "type": "boolean" + }, + "enableStreamingResponse": { + "type": "boolean" + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32" + }, + "autoGrantConnectionPermission": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "DeploymentInfo": { + "type": "object", + "properties": { + "operationId": { + "type": "string", + "nullable": true + }, + "serviceId": { + "type": "string", + "nullable": true + }, + "serviceName": { + "type": "string", + "nullable": true + }, + "statusDetail": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DistributionConfiguration": { + "type": "object", + "properties": { + "distributionType": { + "$ref": "#/components/schemas/DistributionType" + } + }, + "additionalProperties": false + }, + "DistributionParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "inputType": { + "$ref": "#/components/schemas/DistributionParameterEnum" + } + }, + "additionalProperties": false + }, + "DistributionParameterEnum": { + "enum": [ + "Text", + "Number" + ], + "type": "string" + }, + "DistributionType": { + "enum": [ + "PyTorch", + "TensorFlow", + "Mpi", + "Ray" + ], + "type": "string" + }, + "DoWhileControlFlowInfo": { + "type": "object", + "properties": { + "outputPortNameToInputPortNamesMapping": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "nullable": true + }, + "conditionOutputPortName": { + "type": "string", + "nullable": true + }, + "runSettings": { + "$ref": "#/components/schemas/DoWhileControlFlowRunSettings" + } + }, + "additionalProperties": false + }, + "DoWhileControlFlowRunSettings": { + "type": "object", + "properties": { + "maxLoopIterationCount": { + "$ref": "#/components/schemas/ParameterAssignment" + } + }, + "additionalProperties": false + }, + "DockerBuildContext": { + "type": "object", + "properties": { + "locationType": { + "$ref": "#/components/schemas/BuildContextLocationType" + }, + "location": { + "type": "string", + "nullable": true + }, + "dockerfilePath": { + "type": "string", + "default": "Dockerfile", + "nullable": true + } + }, + "additionalProperties": false + }, + "DockerConfiguration": { + "type": "object", + "properties": { + "useDocker": { + "type": "boolean", + "nullable": true + }, + "sharedVolumes": { + "type": "boolean", + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DockerImagePlatform": { + "type": "object", + "properties": { + "os": { + "type": "string", + "nullable": true + }, + "architecture": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DockerSection": { + "type": "object", + "properties": { + "baseImage": { + "type": "string", + "nullable": true + }, + "platform": { + "$ref": "#/components/schemas/DockerImagePlatform" + }, + "baseDockerfile": { + "type": "string", + "nullable": true + }, + "buildContext": { + "$ref": "#/components/schemas/DockerBuildContext" + }, + "baseImageRegistry": { + "$ref": "#/components/schemas/ContainerRegistry" + } + }, + "additionalProperties": false + }, + "DockerSettingConfiguration": { + "type": "object", + "properties": { + "useDocker": { + "type": "boolean", + "nullable": true + }, + "sharedVolumes": { + "type": "boolean", + "nullable": true + }, + "shmSize": { + "type": "string", + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DownloadResourceInfo": { + "type": "object", + "properties": { + "downloadUrl": { + "type": "string", + "nullable": true + }, + "size": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "EPRPipelineRunErrorClassificationRequest": { + "type": "object", + "properties": { + "rootRunId": { + "type": "string", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "taskResult": { + "type": "string", + "nullable": true + }, + "failureType": { + "type": "string", + "nullable": true + }, + "failureName": { + "type": "string", + "nullable": true + }, + "responsibleTeam": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ETag": { + "type": "object", + "additionalProperties": false + }, + "EarlyTerminationPolicyType": { + "enum": [ + "Bandit", + "MedianStopping", + "TruncationSelection" + ], + "type": "string" + }, + "EmailNotificationEnableType": { + "enum": [ + "JobCompleted", + "JobFailed", + "JobCancelled" + ], + "type": "string" + }, + "EndpointAuthMode": { + "enum": [ + "AMLToken", + "Key", + "AADToken" + ], + "type": "string" + }, + "EndpointSetting": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "port": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "sslThumbprint": { + "type": "string", + "nullable": true + }, + "endpoint": { + "type": "string", + "nullable": true + }, + "proxyEndpoint": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "errorMessage": { + "type": "string", + "nullable": true + }, + "enabled": { + "type": "boolean", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "nodes": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "EntityInterface": { + "type": "object", + "properties": { + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Parameter" + }, + "nullable": true + }, + "ports": { + "$ref": "#/components/schemas/NodePortInterface" + }, + "metadataParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Parameter" + }, + "nullable": true + }, + "dataPathParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataPathParameter" + }, + "nullable": true + }, + "dataPathParameterList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataSetPathParameter" + }, + "nullable": true + }, + "AssetOutputSettingsParameterList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssetOutputSettingsParameter" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "EntityKind": { + "enum": [ + "Invalid", + "LineageRoot", + "Versioned", + "Unversioned" + ], + "type": "string" + }, + "EntityStatus": { + "enum": [ + "Active", + "Deprecated", + "Disabled" + ], + "type": "string" + }, + "EntityUsage": { + "type": "object", + "properties": { + "totalCount": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "EntrySetting": { + "type": "object", + "properties": { + "file": { + "type": "string", + "nullable": true + }, + "className": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "EnumParameterRule": { + "type": "object", + "properties": { + "validValues": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "EnvironmentConfiguration": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "useEnvironmentDefinition": { + "type": "boolean" + }, + "environmentDefinitionString": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "EnvironmentDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "assetId": { + "type": "string", + "nullable": true + }, + "autoRebuild": { + "type": "boolean", + "nullable": true + }, + "python": { + "$ref": "#/components/schemas/PythonSection" + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "docker": { + "$ref": "#/components/schemas/DockerSection" + }, + "spark": { + "$ref": "#/components/schemas/SparkSection" + }, + "r": { + "$ref": "#/components/schemas/RSection" + }, + "inferencingStackVersion": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "EnvironmentDefinitionDto": { + "type": "object", + "properties": { + "environmentName": { + "type": "string", + "nullable": true + }, + "environmentVersion": { + "type": "string", + "nullable": true + }, + "intellectualPropertyPublisher": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ErrorAdditionalInfo": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The additional info type.", + "nullable": true + }, + "info": { + "description": "The additional info.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The resource management error additional info." + }, + "ErrorHandlingMode": { + "enum": [ + "DefaultInterpolation", + "CustomerFacingInterpolation" + ], + "type": "string" + }, + "ErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/RootError" + }, + "correlation": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Dictionary containing correlation details for the error.", + "nullable": true + }, + "environment": { + "type": "string", + "description": "The hosting environment.", + "nullable": true + }, + "location": { + "type": "string", + "description": "The Azure region.", + "nullable": true + }, + "time": { + "type": "string", + "description": "The time in UTC.", + "format": "date-time" + }, + "componentName": { + "type": "string", + "description": "Component name where error originated/encountered.", + "nullable": true + } + }, + "description": "The error response." + }, + "EsCloudConfiguration": { + "type": "object", + "properties": { + "enableOutputToFileBasedOnDataTypeId": { + "type": "boolean", + "nullable": true + }, + "environment": { + "$ref": "#/components/schemas/EnvironmentConfiguration" + }, + "hyperDriveConfiguration": { + "$ref": "#/components/schemas/HyperDriveConfiguration" + }, + "k8sConfig": { + "$ref": "#/components/schemas/K8sConfiguration" + }, + "resourceConfig": { + "$ref": "#/components/schemas/AEVAResourceConfiguration" + }, + "torchDistributedConfig": { + "$ref": "#/components/schemas/TorchDistributedConfiguration" + }, + "targetSelectorConfig": { + "$ref": "#/components/schemas/TargetSelectorConfiguration" + }, + "dockerConfig": { + "$ref": "#/components/schemas/DockerSettingConfiguration" + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "maxRunDurationSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "identity": { + "$ref": "#/components/schemas/IdentitySetting" + }, + "applicationEndpoints": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ApplicationEndpointConfiguration" + }, + "nullable": true + }, + "runConfig": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "EvaluationFlowRunSettings": { + "type": "object", + "properties": { + "flowRunId": { + "type": "string", + "nullable": true + }, + "upstreamVariantRunVariants": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariantIdentifier" + }, + "description": "This is a dictionary", + "nullable": true + }, + "batch_inputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "inputUniversalLink": { + "type": "string", + "nullable": true + }, + "dataInputs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "flowRunOutputDirectory": { + "type": "string", + "nullable": true + }, + "connectionOverrides": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionOverrideSetting" + }, + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "inputsMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputDataStore": { + "type": "string", + "nullable": true + }, + "runDisplayNameGenerationType": { + "$ref": "#/components/schemas/RunDisplayNameGenerationType" + }, + "collieRunSettings": { + "$ref": "#/components/schemas/CollieRunSettings" + }, + "workerCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timeoutInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "promptflowEngineType": { + "$ref": "#/components/schemas/PromptflowEngineType" + }, + "experimentNodeName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExampleRequest": { + "type": "object", + "properties": { + "inputs": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "array", + "items": { } + } + }, + "description": "This is a dictionary", + "nullable": true + }, + "globalParameters": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExecutionContextDto": { + "type": "object", + "properties": { + "executable": { + "type": "string", + "nullable": true + }, + "userCode": { + "type": "string", + "nullable": true + }, + "arguments": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExecutionDataLocation": { + "type": "object", + "properties": { + "dataset": { + "$ref": "#/components/schemas/RunDatasetReference" + }, + "dataPath": { + "$ref": "#/components/schemas/ExecutionDataPath" + }, + "uri": { + "$ref": "#/components/schemas/UriReference" + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExecutionDataPath": { + "type": "object", + "properties": { + "datastoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExecutionGlobsOptions": { + "type": "object", + "properties": { + "globPatterns": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ExecutionPhase": { + "enum": [ + "Execution", + "Initialization", + "Finalization" + ], + "type": "string" + }, + "ExperimentComputeMetaInfo": { + "type": "object", + "properties": { + "currentNodeCount": { + "type": "integer", + "format": "int32" + }, + "targetNodeCount": { + "type": "integer", + "format": "int32" + }, + "maxNodeCount": { + "type": "integer", + "format": "int32" + }, + "minNodeCount": { + "type": "integer", + "format": "int32" + }, + "idleNodeCount": { + "type": "integer", + "format": "int32" + }, + "runningNodeCount": { + "type": "integer", + "format": "int32" + }, + "preparingNodeCount": { + "type": "integer", + "format": "int32" + }, + "unusableNodeCount": { + "type": "integer", + "format": "int32" + }, + "leavingNodeCount": { + "type": "integer", + "format": "int32" + }, + "preemptedNodeCount": { + "type": "integer", + "format": "int32" + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "provisioningState": { + "type": "string", + "nullable": true + }, + "state": { + "type": "string", + "nullable": true + }, + "osType": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "createdByStudio": { + "type": "boolean" + }, + "isGpuType": { + "type": "boolean" + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "computeType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExperimentData": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExperimentDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowInputDefinition" + }, + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentData" + }, + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentNode" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ExperimentDefinitionSource": { + "type": "object", + "properties": { + "sourceType": { + "$ref": "#/components/schemas/ExperimentDefinitionSourceType" + }, + "experimentDefinitionDataUri": { + "type": "string", + "nullable": true + }, + "experimentDefinition": { + "$ref": "#/components/schemas/ExperimentDefinition" + } + }, + "additionalProperties": false + }, + "ExperimentDefinitionSourceType": { + "enum": [ + "DataUri", + "Definition" + ], + "type": "string" + }, + "ExperimentInfo": { + "type": "object", + "properties": { + "experimentName": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExperimentNode": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ExperimentNodeType" + }, + "max_turns": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatGroupRole" + }, + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + }, + "variant": { + "type": "string", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environment_variables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "display_name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "resources": { + "$ref": "#/components/schemas/SessionRuntimeResources" + }, + "inputs": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ExperimentNodeType": { + "enum": [ + "Flow", + "ChatGroup" + ], + "type": "string" + }, + "ExperimentTemplateDto": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "owner": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowInputDefinition" + }, + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentData" + }, + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExperimentNode" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportComponentMetaInfo": { + "type": "object", + "properties": { + "moduleEntity": { + "$ref": "#/components/schemas/ModuleEntity" + }, + "moduleVersion": { + "type": "string", + "nullable": true + }, + "isAnonymous": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportDataTask": { + "type": "object", + "properties": { + "DataTransferSink": { + "$ref": "#/components/schemas/DataTransferSink" + } + }, + "additionalProperties": false + }, + "ExtensibleObject": { + "type": "object" + }, + "FeaturizationMode": { + "enum": [ + "Auto", + "Custom", + "Off" + ], + "type": "string" + }, + "FeaturizationSettings": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/FeaturizationMode" + }, + "blockedTransformers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "columnPurposes": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "dropColumns": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "transformerParams": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnTransformer" + }, + "nullable": true + }, + "nullable": true + }, + "datasetLanguage": { + "type": "string", + "nullable": true + }, + "enableDnnFeaturization": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "FeedDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "sharingScopes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SharingScope" + }, + "nullable": true + }, + "supportedAssetTypes": { + "type": "object", + "properties": { + "Component": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "Model": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "Environment": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "Dataset": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "DataStore": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "SampleGraph": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "FlowTool": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "FlowToolSetting": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "FlowConnection": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "FlowSample": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + }, + "FlowRuntimeSpec": { + "$ref": "#/components/schemas/AssetTypeMetaInfo" + } + }, + "additionalProperties": false, + "nullable": true + }, + "regionalWorkspaceStorage": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "This is a dictionary", + "nullable": true + }, + "intellectualPropertyPublisher": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FileSystem": { + "type": "object", + "properties": { + "connection": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Flow": { + "type": "object", + "properties": { + "sourceResourceId": { + "type": "string", + "nullable": true + }, + "flowGraph": { + "$ref": "#/components/schemas/FlowGraph" + }, + "nodeVariants": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/NodeVariant" + }, + "description": "This is a dictionary", + "nullable": true + }, + "flowGraphLayout": { + "$ref": "#/components/schemas/FlowGraphLayout" + }, + "bulkTestData": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "evaluationFlows": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowGraphReference" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowAnnotations": { + "type": "object", + "properties": { + "flowName": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + }, + "owner": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "isArchived": { + "type": "boolean" + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "archived": { + "type": "boolean" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + } + }, + "FlowBaseDto": { + "type": "object", + "properties": { + "flowId": { + "type": "string", + "nullable": true + }, + "flowName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + }, + "owner": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "flowResourceId": { + "type": "string", + "nullable": true + }, + "isArchived": { + "type": "boolean" + }, + "flowDefinitionFilePath": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + }, + "flowDiagnostics": { + "$ref": "#/components/schemas/FlowDiagnostics" + } + }, + "additionalProperties": false + }, + "FlowDiagnostics": { + "type": "object", + "properties": { + "datastore": { + "type": "string", + "nullable": true + }, + "artifactOrigin": { + "type": "string", + "nullable": true + }, + "container": { + "type": "string", + "nullable": true + }, + "sessionLogRelativePath": { + "type": "string", + "nullable": true + }, + "sessionArtifactId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowDto": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "eTag": { + "$ref": "#/components/schemas/ETag" + }, + "flow": { + "$ref": "#/components/schemas/Flow" + }, + "flowRunSettings": { + "$ref": "#/components/schemas/FlowRunSettings" + }, + "flowRunResult": { + "$ref": "#/components/schemas/FlowRunResult" + }, + "flowTestMode": { + "$ref": "#/components/schemas/FlowTestMode" + }, + "flowTestInfos": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowTestInfo" + }, + "nullable": true + }, + "studioPortalEndpoint": { + "type": "string", + "nullable": true + }, + "flowId": { + "type": "string", + "nullable": true + }, + "flowName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + }, + "owner": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "flowResourceId": { + "type": "string", + "nullable": true + }, + "isArchived": { + "type": "boolean" + }, + "flowDefinitionFilePath": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + }, + "flowDiagnostics": { + "$ref": "#/components/schemas/FlowDiagnostics" + } + }, + "additionalProperties": false + }, + "FlowEnvironment": { + "type": "object", + "properties": { + "image": { + "type": "string", + "nullable": true + }, + "python_requirements_txt": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowFeature": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "state": { + "type": "object", + "properties": { + "Runtime": { + "$ref": "#/components/schemas/FlowFeatureStateEnum" + }, + "Executor": { + "$ref": "#/components/schemas/FlowFeatureStateEnum" + }, + "PFS": { + "$ref": "#/components/schemas/FlowFeatureStateEnum" + } + }, + "additionalProperties": false, + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowFeatureStateEnum": { + "enum": [ + "Ready", + "E2ETest" + ], + "type": "string" + }, + "FlowGraph": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node" + }, + "nullable": true + }, + "tools": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tool" + }, + "nullable": true + }, + "codes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowInputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowOutputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowGraphAnnotationNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "content": { + "type": "string", + "nullable": true + }, + "mentionedNodeNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "structuredContent": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowGraphLayout": { + "type": "object", + "properties": { + "nodeLayouts": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowNodeLayout" + }, + "description": "This is a dictionary", + "nullable": true + }, + "extendedData": { + "type": "string", + "nullable": true + }, + "annotationNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowGraphAnnotationNode" + }, + "nullable": true + }, + "orientation": { + "$ref": "#/components/schemas/Orientation" + } + }, + "additionalProperties": false + }, + "FlowGraphReference": { + "type": "object", + "properties": { + "flowGraph": { + "$ref": "#/components/schemas/FlowGraph" + }, + "referenceResourceId": { + "type": "string", + "nullable": true + }, + "variant": { + "$ref": "#/components/schemas/VariantIdentifier" + } + }, + "additionalProperties": false + }, + "FlowIndexEntity": { + "type": "object", + "properties": { + "schemaId": { + "type": "string", + "nullable": true + }, + "entityId": { + "type": "string", + "nullable": true + }, + "kind": { + "$ref": "#/components/schemas/EntityKind" + }, + "annotations": { + "$ref": "#/components/schemas/FlowAnnotations" + }, + "properties": { + "$ref": "#/components/schemas/FlowProperties" + }, + "internal": { + "$ref": "#/components/schemas/ExtensibleObject" + }, + "updateSequence": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "entityContainerId": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "entityObjectId": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "resourceType": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Relationship" + }, + "nullable": true + }, + "assetId": { + "type": "string", + "nullable": true + }, + "usage": { + "$ref": "#/components/schemas/EntityUsage" + }, + "isAFragment": { + "type": "boolean" + }, + "fragmentId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowInputDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ValueType" + }, + "default": { + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "is_chat_input": { + "type": "boolean" + }, + "is_chat_history": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowLanguage": { + "enum": [ + "Python", + "CSharp", + "TypeScript", + "JavaScript" + ], + "type": "string" + }, + "FlowNode": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ToolType" + }, + "source": { + "$ref": "#/components/schemas/NodeSource" + }, + "inputs": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "activate": { + "$ref": "#/components/schemas/Activate" + }, + "use_variants": { + "type": "boolean" + }, + "comment": { + "type": "string", + "nullable": true + }, + "api": { + "type": "string", + "nullable": true + }, + "provider": { + "type": "string", + "nullable": true + }, + "connection": { + "type": "string", + "nullable": true + }, + "module": { + "type": "string", + "nullable": true + }, + "aggregation": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FlowNodeLayout": { + "type": "object", + "properties": { + "x": { + "type": "number", + "format": "float" + }, + "y": { + "type": "number", + "format": "float" + }, + "width": { + "type": "number", + "format": "float" + }, + "height": { + "type": "number", + "format": "float" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "extendedData": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowNodeVariant": { + "type": "object", + "properties": { + "default_variant_id": { + "type": "string", + "nullable": true + }, + "variants": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowVariantNode" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowOutputDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ValueType" + }, + "description": { + "type": "string", + "nullable": true + }, + "reference": { + "type": "string", + "nullable": true + }, + "evaluation_only": { + "type": "boolean" + }, + "is_chat_output": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "FlowPatchOperationType": { + "enum": [ + "ArchiveFlow", + "RestoreFlow", + "ExportFlowToFile" + ], + "type": "string" + }, + "FlowProperties": { + "type": "object", + "properties": { + "flowId": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "flowDefinitionFilePath": { + "type": "string", + "nullable": true + }, + "creationContext": { + "$ref": "#/components/schemas/CreationContext" + } + } + }, + "FlowRunBasePath": { + "type": "object", + "properties": { + "outputDatastoreName": { + "type": "string", + "nullable": true + }, + "basePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowRunInfo": { + "type": "object", + "properties": { + "flowGraph": { + "$ref": "#/components/schemas/FlowGraph" + }, + "flowGraphLayout": { + "$ref": "#/components/schemas/FlowGraphLayout" + }, + "flowName": { + "type": "string", + "nullable": true + }, + "flowRunResourceId": { + "type": "string", + "nullable": true + }, + "flowRunId": { + "type": "string", + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "batchInputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "flowRunType": { + "$ref": "#/components/schemas/FlowRunTypeEnum" + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "bulkTestId": { + "type": "string", + "nullable": true + }, + "createdBy": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "createdOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "inputsMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputDatastoreName": { + "type": "string", + "nullable": true + }, + "childRunBasePath": { + "type": "string", + "nullable": true + }, + "workingDirectory": { + "type": "string", + "nullable": true + }, + "flowDagFileRelativePath": { + "type": "string", + "nullable": true + }, + "flowSnapshotId": { + "type": "string", + "nullable": true + }, + "studioPortalEndpoint": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowRunMode": { + "enum": [ + "Flow", + "SingleNode", + "FromNode", + "BulkTest", + "Eval", + "PairwiseEval", + "ExperimentTest", + "ExperimentEval" + ], + "type": "string" + }, + "FlowRunResult": { + "type": "object", + "properties": { + "flow_runs": { + "type": "array", + "items": { }, + "nullable": true + }, + "node_runs": { + "type": "array", + "items": { }, + "nullable": true + }, + "errorResponse": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "flowName": { + "type": "string", + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "flowRunId": { + "type": "string", + "nullable": true + }, + "flowGraph": { + "$ref": "#/components/schemas/FlowGraph" + }, + "flowGraphLayout": { + "$ref": "#/components/schemas/FlowGraphLayout" + }, + "flowRunResourceId": { + "type": "string", + "nullable": true + }, + "bulkTestId": { + "type": "string", + "nullable": true + }, + "batchInputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "createdBy": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "createdOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "flowRunType": { + "$ref": "#/components/schemas/FlowRunTypeEnum" + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "amlComputeName": { + "type": "string", + "nullable": true + }, + "flowRunLogs": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "flowTestMode": { + "$ref": "#/components/schemas/FlowTestMode" + }, + "flowTestInfos": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowTestInfo" + }, + "nullable": true + }, + "workingDirectory": { + "type": "string", + "nullable": true + }, + "flowDagFileRelativePath": { + "type": "string", + "nullable": true + }, + "flowSnapshotId": { + "type": "string", + "nullable": true + }, + "variantRunToEvaluationRunsIdMapping": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowRunSettings": { + "type": "object", + "properties": { + "runMode": { + "$ref": "#/components/schemas/FlowRunMode" + }, + "tuningNodeNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "tuningNodeSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TuningNodeSetting" + }, + "description": "This is a dictionary", + "nullable": true + }, + "baselineVariantId": { + "type": "string", + "nullable": true + }, + "defaultVariantId": { + "type": "string", + "nullable": true + }, + "variants": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node" + } + }, + "description": "This is a dictionary", + "nullable": true + }, + "nodeName": { + "type": "string", + "nullable": true + }, + "isDefaultVariant": { + "type": "boolean" + }, + "nodeVariantId": { + "type": "string", + "nullable": true + }, + "nodeOutputPaths": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "baseFlowRunId": { + "type": "string", + "nullable": true + }, + "flowTestInfos": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowTestInfo" + }, + "nullable": true + }, + "bulkTestId": { + "type": "string", + "nullable": true + }, + "evaluationFlowRunSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EvaluationFlowRunSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "bulkTestFlowId": { + "type": "string", + "nullable": true + }, + "bulkTestFlowRunIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "batch_inputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "inputUniversalLink": { + "type": "string", + "nullable": true + }, + "dataInputs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "flowRunOutputDirectory": { + "type": "string", + "nullable": true + }, + "connectionOverrides": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionOverrideSetting" + }, + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "inputsMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputDataStore": { + "type": "string", + "nullable": true + }, + "runDisplayNameGenerationType": { + "$ref": "#/components/schemas/RunDisplayNameGenerationType" + }, + "collieRunSettings": { + "$ref": "#/components/schemas/CollieRunSettings" + }, + "workerCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timeoutInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "promptflowEngineType": { + "$ref": "#/components/schemas/PromptflowEngineType" + }, + "experimentNodeName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowRunSettingsBase": { + "type": "object", + "properties": { + "batch_inputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "inputUniversalLink": { + "type": "string", + "nullable": true + }, + "dataInputs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "flowRunOutputDirectory": { + "type": "string", + "nullable": true + }, + "connectionOverrides": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionOverrideSetting" + }, + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "inputsMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputDataStore": { + "type": "string", + "nullable": true + }, + "runDisplayNameGenerationType": { + "$ref": "#/components/schemas/RunDisplayNameGenerationType" + }, + "collieRunSettings": { + "$ref": "#/components/schemas/CollieRunSettings" + }, + "workerCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timeoutInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "promptflowEngineType": { + "$ref": "#/components/schemas/PromptflowEngineType" + }, + "experimentNodeName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowRunStatusEnum": { + "enum": [ + "Started", + "Completed", + "Failed", + "Cancelled", + "NotStarted", + "Running", + "Queued", + "Paused", + "Unapproved", + "Starting", + "Preparing", + "CancelRequested", + "Pausing", + "Finalizing", + "Canceled", + "Bypassed" + ], + "type": "string" + }, + "FlowRunStatusResponse": { + "type": "object", + "properties": { + "flowRunStatus": { + "$ref": "#/components/schemas/FlowRunStatusEnum" + }, + "lastCheckedTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "flowRunCreatedTime": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "FlowRunTypeEnum": { + "enum": [ + "FlowRun", + "EvaluationRun", + "PairwiseEvaluationRun", + "SingleNodeRun", + "FromNodeRun" + ], + "type": "string" + }, + "FlowRuntimeCapability": { + "type": "object", + "properties": { + "flowFeatures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowFeature" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowRuntimeDto": { + "type": "object", + "properties": { + "runtimeName": { + "type": "string", + "nullable": true + }, + "runtimeDescription": { + "type": "string", + "nullable": true + }, + "runtimeType": { + "$ref": "#/components/schemas/RuntimeType" + }, + "environment": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/RuntimeStatusEnum" + }, + "statusMessage": { + "type": "string", + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "fromExistingEndpoint": { + "type": "boolean" + }, + "endpointName": { + "type": "string", + "nullable": true + }, + "fromExistingDeployment": { + "type": "boolean" + }, + "deploymentName": { + "type": "string", + "nullable": true + }, + "identity": { + "$ref": "#/components/schemas/ManagedServiceIdentity" + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32" + }, + "computeInstanceName": { + "type": "string", + "nullable": true + }, + "dockerImage": { + "type": "string", + "nullable": true + }, + "publishedPort": { + "type": "integer", + "format": "int32" + }, + "targetPort": { + "type": "integer", + "format": "int32" + }, + "fromExistingCustomApp": { + "type": "boolean" + }, + "customAppName": { + "type": "string", + "nullable": true + }, + "assignedTo": { + "$ref": "#/components/schemas/AssignedUser" + }, + "endpointUrl": { + "type": "string", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "owner": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + } + }, + "additionalProperties": false + }, + "FlowSessionDto": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "nullable": true + }, + "baseImage": { + "type": "string", + "nullable": true + }, + "packages": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "flowFeatures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowFeature" + }, + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "runtimeDescription": { + "type": "string", + "nullable": true + }, + "runtimeType": { + "$ref": "#/components/schemas/RuntimeType" + }, + "environment": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/RuntimeStatusEnum" + }, + "statusMessage": { + "type": "string", + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "fromExistingEndpoint": { + "type": "boolean" + }, + "endpointName": { + "type": "string", + "nullable": true + }, + "fromExistingDeployment": { + "type": "boolean" + }, + "deploymentName": { + "type": "string", + "nullable": true + }, + "identity": { + "$ref": "#/components/schemas/ManagedServiceIdentity" + }, + "instanceType": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32" + }, + "computeInstanceName": { + "type": "string", + "nullable": true + }, + "dockerImage": { + "type": "string", + "nullable": true + }, + "publishedPort": { + "type": "integer", + "format": "int32" + }, + "targetPort": { + "type": "integer", + "format": "int32" + }, + "fromExistingCustomApp": { + "type": "boolean" + }, + "customAppName": { + "type": "string", + "nullable": true + }, + "assignedTo": { + "$ref": "#/components/schemas/AssignedUser" + }, + "endpointUrl": { + "type": "string", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "owner": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + } + }, + "additionalProperties": false + }, + "FlowSnapshot": { + "type": "object", + "properties": { + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowInputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowOutputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowNode" + }, + "nullable": true + }, + "node_variants": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowNodeVariant" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environment": { + "$ref": "#/components/schemas/FlowEnvironment" + }, + "environment_variables": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + }, + "language": { + "$ref": "#/components/schemas/FlowLanguage" + }, + "entry": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowSubmitRunSettings": { + "type": "object", + "properties": { + "nodeInputs": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + }, + "runMode": { + "$ref": "#/components/schemas/FlowRunMode" + }, + "tuningNodeNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "tuningNodeSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TuningNodeSetting" + }, + "description": "This is a dictionary", + "nullable": true + }, + "baselineVariantId": { + "type": "string", + "nullable": true + }, + "defaultVariantId": { + "type": "string", + "nullable": true + }, + "variants": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Node" + } + }, + "description": "This is a dictionary", + "nullable": true + }, + "nodeName": { + "type": "string", + "nullable": true + }, + "isDefaultVariant": { + "type": "boolean" + }, + "nodeVariantId": { + "type": "string", + "nullable": true + }, + "nodeOutputPaths": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "baseFlowRunId": { + "type": "string", + "nullable": true + }, + "flowTestInfos": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowTestInfo" + }, + "nullable": true + }, + "bulkTestId": { + "type": "string", + "nullable": true + }, + "evaluationFlowRunSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EvaluationFlowRunSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "bulkTestFlowId": { + "type": "string", + "nullable": true + }, + "bulkTestFlowRunIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "batch_inputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "inputUniversalLink": { + "type": "string", + "nullable": true + }, + "dataInputs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "flowRunOutputDirectory": { + "type": "string", + "nullable": true + }, + "connectionOverrides": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionOverrideSetting" + }, + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "inputsMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputDataStore": { + "type": "string", + "nullable": true + }, + "runDisplayNameGenerationType": { + "$ref": "#/components/schemas/RunDisplayNameGenerationType" + }, + "collieRunSettings": { + "$ref": "#/components/schemas/CollieRunSettings" + }, + "workerCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timeoutInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "promptflowEngineType": { + "$ref": "#/components/schemas/PromptflowEngineType" + }, + "experimentNodeName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowTestInfo": { + "type": "object", + "properties": { + "variantId": { + "type": "string", + "nullable": true + }, + "tuningNodeName": { + "type": "string", + "nullable": true + }, + "flowRunId": { + "type": "string", + "nullable": true + }, + "flowTestStorageSetting": { + "$ref": "#/components/schemas/FlowTestStorageSetting" + }, + "flowRunType": { + "$ref": "#/components/schemas/FlowRunTypeEnum" + }, + "variantRunId": { + "type": "string", + "nullable": true + }, + "evaluationName": { + "type": "string", + "nullable": true + }, + "outputUniversalLink": { + "type": "string", + "nullable": true + }, + "experimentNodeName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowTestMode": { + "enum": [ + "Sync", + "Async" + ], + "type": "string" + }, + "FlowTestStorageSetting": { + "type": "object", + "properties": { + "storageAccountName": { + "type": "string", + "nullable": true + }, + "blobContainerName": { + "type": "string", + "nullable": true + }, + "flowArtifactsRootPath": { + "type": "string", + "nullable": true + }, + "outputDatastoreName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowToolSettingParameter": { + "type": "object", + "properties": { + "type": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValueType" + }, + "nullable": true + }, + "default": { + "type": "string", + "nullable": true + }, + "advanced": { + "type": "boolean", + "nullable": true + }, + "enum": { + "type": "array", + "items": { }, + "nullable": true + }, + "model_list": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "capabilities": { + "$ref": "#/components/schemas/AzureOpenAIModelCapabilities" + }, + "allow_manual_entry": { + "type": "boolean", + "nullable": true + }, + "ui_hints": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowToolsDto": { + "type": "object", + "properties": { + "package": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Tool" + }, + "description": "This is a dictionary", + "nullable": true + }, + "code": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Tool" + }, + "description": "This is a dictionary", + "nullable": true + }, + "errors": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "FlowType": { + "enum": [ + "Default", + "Evaluation", + "Chat", + "Rag" + ], + "type": "string" + }, + "FlowVariantNode": { + "type": "object", + "properties": { + "node": { + "$ref": "#/components/schemas/FlowNode" + }, + "description": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ForecastHorizon": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/ForecastHorizonMode" + }, + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "ForecastHorizonMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "ForecastingSettings": { + "type": "object", + "properties": { + "countryOrRegionForHolidays": { + "type": "string", + "nullable": true + }, + "timeColumnName": { + "type": "string", + "nullable": true + }, + "targetLags": { + "$ref": "#/components/schemas/TargetLags" + }, + "targetRollingWindowSize": { + "$ref": "#/components/schemas/TargetRollingWindowSize" + }, + "forecastHorizon": { + "$ref": "#/components/schemas/ForecastHorizon" + }, + "timeSeriesIdColumnNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "frequency": { + "type": "string", + "nullable": true + }, + "featureLags": { + "type": "string", + "nullable": true + }, + "seasonality": { + "$ref": "#/components/schemas/Seasonality" + }, + "shortSeriesHandlingConfig": { + "$ref": "#/components/schemas/ShortSeriesHandlingConfiguration" + }, + "useStl": { + "$ref": "#/components/schemas/UseStl" + }, + "targetAggregateFunction": { + "$ref": "#/components/schemas/TargetAggregationFunction" + }, + "cvStepSize": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "featuresUnknownAtForecastTime": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Framework": { + "enum": [ + "Python", + "PySpark", + "Cntk", + "TensorFlow", + "PyTorch", + "PySparkInteractive", + "R" + ], + "type": "string" + }, + "Frequency": { + "enum": [ + "Month", + "Week", + "Day", + "Hour", + "Minute" + ], + "type": "string" + }, + "GeneralSettings": { + "type": "object", + "properties": { + "primaryMetric": { + "$ref": "#/components/schemas/PrimaryMetrics" + }, + "taskType": { + "$ref": "#/components/schemas/TaskType" + }, + "logVerbosity": { + "$ref": "#/components/schemas/LogVerbosity" + } + }, + "additionalProperties": false + }, + "GeneratePipelineComponentRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "moduleScope": { + "$ref": "#/components/schemas/ModuleScope" + }, + "isDeterministic": { + "type": "boolean", + "nullable": true + }, + "category": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "setAsDefaultVersion": { + "type": "boolean" + }, + "registryName": { + "type": "string", + "nullable": true + }, + "graph": { + "$ref": "#/components/schemas/GraphDraftEntity" + }, + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "moduleNodeRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeRunSetting" + }, + "nullable": true + }, + "moduleNodeUIInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enforceRerun": { + "type": "boolean", + "nullable": true + }, + "datasetAccessModes": { + "$ref": "#/components/schemas/DatasetAccessModes" + } + }, + "additionalProperties": false + }, + "GenerateToolMetaRequest": { + "type": "object", + "properties": { + "tools": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ToolSourceMeta" + }, + "description": "This is a dictionary", + "nullable": true + }, + "working_dir": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "GetDynamicListRequest": { + "type": "object", + "properties": { + "func_path": { + "type": "string", + "nullable": true + }, + "func_kwargs": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "GetRunDataResultDto": { + "type": "object", + "properties": { + "runMetadata": { + "$ref": "#/components/schemas/RunDto" + }, + "runDefinition": { + "nullable": true + }, + "jobSpecification": { + "nullable": true + }, + "systemSettings": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "GetTrainingSessionDto": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/components/schemas/SessionProperties" + }, + "compute": { + "$ref": "#/components/schemas/ComputeContract" + } + }, + "additionalProperties": false + }, + "GlobalJobDispatcherConfiguration": { + "type": "object", + "properties": { + "vmSize": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "computeType": { + "$ref": "#/components/schemas/GlobalJobDispatcherSupportedComputeType" + }, + "region": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "myResourceOnly": { + "type": "boolean" + }, + "redispatchAllowed": { + "type": "boolean", + "nullable": true + }, + "lowPriorityVMTolerant": { + "type": "boolean" + }, + "vcList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "planId": { + "type": "string", + "nullable": true + }, + "planRegionId": { + "type": "string", + "nullable": true + }, + "vcBlockList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "clusterBlockList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "GlobalJobDispatcherSupportedComputeType": { + "enum": [ + "AmlCompute", + "AmlK8s" + ], + "type": "string" + }, + "GlobsOptions": { + "type": "object", + "properties": { + "globPatterns": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphAnnotationNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "content": { + "type": "string", + "nullable": true + }, + "mentionedNodeNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "structuredContent": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphComponentsMode": { + "enum": [ + "Normal", + "AllDesignerBuildin", + "ContainsDesignerBuildin" + ], + "type": "string" + }, + "GraphControlNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "controlType": { + "$ref": "#/components/schemas/ControlType" + }, + "controlParameter": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "runAttribution": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphControlReferenceNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "comment": { + "type": "string", + "nullable": true + }, + "controlFlowType": { + "$ref": "#/components/schemas/ControlFlowType" + }, + "referenceNodeId": { + "type": "string", + "nullable": true + }, + "doWhileControlFlowInfo": { + "$ref": "#/components/schemas/DoWhileControlFlowInfo" + }, + "parallelForControlFlowInfo": { + "$ref": "#/components/schemas/ParallelForControlFlowInfo" + }, + "runAttribution": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphDatasetNode": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "datasetId": { + "type": "string", + "nullable": true + }, + "dataPathParameterName": { + "type": "string", + "nullable": true + }, + "dataSetDefinition": { + "$ref": "#/components/schemas/DataSetDefinition" + } + }, + "additionalProperties": false + }, + "GraphDatasetsLoadModes": { + "enum": [ + "SkipDatasetsLoad", + "V1RegisteredDataset", + "V1SavedDataset", + "PersistDatasetsInfo", + "SubmissionNeededUpstreamDatasetOnly", + "SubmissionNeededInCompleteDatasetOnly", + "V2Asset", + "Submission", + "AllRegisteredData", + "AllData" + ], + "type": "string" + }, + "GraphDraftEntity": { + "type": "object", + "properties": { + "moduleNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNode" + }, + "nullable": true + }, + "datasetNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphDatasetNode" + }, + "nullable": true + }, + "subGraphNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphReferenceNode" + }, + "nullable": true + }, + "controlReferenceNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphControlReferenceNode" + }, + "nullable": true + }, + "controlNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphControlNode" + }, + "nullable": true + }, + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphEdge" + }, + "nullable": true + }, + "entityInterface": { + "$ref": "#/components/schemas/EntityInterface" + }, + "graphLayout": { + "$ref": "#/components/schemas/GraphLayout" + }, + "createdBy": { + "$ref": "#/components/schemas/CreatedBy" + }, + "lastUpdatedBy": { + "$ref": "#/components/schemas/CreatedBy" + }, + "defaultCompute": { + "$ref": "#/components/schemas/ComputeSetting" + }, + "defaultDatastore": { + "$ref": "#/components/schemas/DatastoreSetting" + }, + "defaultCloudPriority": { + "$ref": "#/components/schemas/CloudPrioritySetting" + }, + "extendedProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "parentSubGraphModuleIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "GraphEdge": { + "type": "object", + "properties": { + "sourceOutputPort": { + "$ref": "#/components/schemas/PortInfo" + }, + "destinationInputPort": { + "$ref": "#/components/schemas/PortInfo" + } + }, + "additionalProperties": false + }, + "GraphLayout": { + "type": "object", + "properties": { + "nodeLayouts": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/NodeLayout" + }, + "description": "This is a dictionary", + "nullable": true + }, + "extendedData": { + "type": "string", + "nullable": true + }, + "annotationNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphAnnotationNode" + }, + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "GraphLayoutCreationInfo": { + "type": "object", + "properties": { + "nodeLayouts": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/NodeLayout" + }, + "description": "This is a dictionary", + "nullable": true + }, + "extendedData": { + "type": "string", + "nullable": true + }, + "annotationNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphAnnotationNode" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphModuleNode": { + "type": "object", + "properties": { + "moduleType": { + "$ref": "#/components/schemas/ModuleType" + }, + "runconfig": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "moduleId": { + "type": "string", + "nullable": true + }, + "comment": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "moduleParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "nullable": true + }, + "moduleMetadataParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "nullable": true + }, + "moduleOutputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutputSetting" + }, + "nullable": true + }, + "moduleInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InputSetting" + }, + "nullable": true + }, + "useGraphDefaultCompute": { + "type": "boolean" + }, + "useGraphDefaultDatastore": { + "type": "boolean" + }, + "regenerateOutput": { + "type": "boolean" + }, + "controlInputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ControlInput" + }, + "nullable": true + }, + "cloudSettings": { + "$ref": "#/components/schemas/CloudSettings" + }, + "executionPhase": { + "$ref": "#/components/schemas/ExecutionPhase" + }, + "runAttribution": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphModuleNodeRunSetting": { + "type": "object", + "properties": { + "nodeId": { + "type": "string", + "nullable": true + }, + "moduleId": { + "type": "string", + "nullable": true + }, + "stepType": { + "type": "string", + "nullable": true + }, + "runSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphModuleNodeUIInputSetting": { + "type": "object", + "properties": { + "nodeId": { + "type": "string", + "nullable": true + }, + "moduleId": { + "type": "string", + "nullable": true + }, + "moduleInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UIInputSetting" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphNodeStatusInfo": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/TaskStatusCode" + }, + "runStatus": { + "$ref": "#/components/schemas/RunStatus" + }, + "isBypassed": { + "type": "boolean" + }, + "hasFailedChildRun": { + "type": "boolean" + }, + "partiallyExecuted": { + "type": "boolean" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "aetherStartTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "aetherEndTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "aetherCreationTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runHistoryStartTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runHistoryEndTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runHistoryCreationTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "reuseInfo": { + "$ref": "#/components/schemas/TaskReuseInfo" + }, + "controlFlowInfo": { + "$ref": "#/components/schemas/TaskControlFlowInfo" + }, + "statusCode": { + "$ref": "#/components/schemas/TaskStatusCode" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "creationTime": { + "type": "string", + "format": "date-time" + }, + "scheduleTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requestId": { + "type": "string", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "dataContainerId": { + "type": "string", + "nullable": true + }, + "realTimeLogPath": { + "type": "string", + "nullable": true + }, + "hasWarnings": { + "type": "boolean" + }, + "compositeNodeId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphReferenceNode": { + "type": "object", + "properties": { + "graphId": { + "type": "string", + "nullable": true + }, + "defaultCompute": { + "$ref": "#/components/schemas/ComputeSetting" + }, + "defaultDatastore": { + "$ref": "#/components/schemas/DatastoreSetting" + }, + "id": { + "type": "string", + "nullable": true + }, + "moduleId": { + "type": "string", + "nullable": true + }, + "comment": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "moduleParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "nullable": true + }, + "moduleMetadataParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "nullable": true + }, + "moduleOutputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OutputSetting" + }, + "nullable": true + }, + "moduleInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InputSetting" + }, + "nullable": true + }, + "useGraphDefaultCompute": { + "type": "boolean" + }, + "useGraphDefaultDatastore": { + "type": "boolean" + }, + "regenerateOutput": { + "type": "boolean" + }, + "controlInputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ControlInput" + }, + "nullable": true + }, + "cloudSettings": { + "$ref": "#/components/schemas/CloudSettings" + }, + "executionPhase": { + "$ref": "#/components/schemas/ExecutionPhase" + }, + "runAttribution": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "GraphSdkCodeType": { + "enum": [ + "Python", + "JupyterNotebook", + "Unknown" + ], + "type": "string" + }, + "HdfsReference": { + "type": "object", + "properties": { + "amlDataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "HdiClusterComputeInfo": { + "type": "object", + "properties": { + "address": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "privateKey": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "HdiConfiguration": { + "type": "object", + "properties": { + "yarnDeployMode": { + "$ref": "#/components/schemas/YarnDeployMode" + } + }, + "additionalProperties": false + }, + "HdiRunConfiguration": { + "type": "object", + "properties": { + "file": { + "type": "string", + "nullable": true + }, + "className": { + "type": "string", + "nullable": true + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "archives": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "jars": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "pyFiles": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "queue": { + "type": "string", + "nullable": true + }, + "driverMemory": { + "type": "string", + "nullable": true + }, + "driverCores": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "executorMemory": { + "type": "string", + "nullable": true + }, + "executorCores": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "numberExecutors": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "conf": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "HistoryConfiguration": { + "type": "object", + "properties": { + "outputCollection": { + "type": "boolean", + "default": true + }, + "directoriesToWatch": { + "type": "array", + "items": { + "type": "string" + }, + "default": [ + "logs" + ], + "nullable": true + }, + "enableMLflowTracking": { + "type": "boolean", + "default": true + } + } + }, + "HttpStatusCode": { + "enum": [ + "Continue", + "SwitchingProtocols", + "Processing", + "EarlyHints", + "OK", + "Created", + "Accepted", + "NonAuthoritativeInformation", + "NoContent", + "ResetContent", + "PartialContent", + "MultiStatus", + "AlreadyReported", + "IMUsed", + "MultipleChoices", + "Ambiguous", + "MovedPermanently", + "Moved", + "Found", + "Redirect", + "SeeOther", + "RedirectMethod", + "NotModified", + "UseProxy", + "Unused", + "TemporaryRedirect", + "RedirectKeepVerb", + "PermanentRedirect", + "BadRequest", + "Unauthorized", + "PaymentRequired", + "Forbidden", + "NotFound", + "MethodNotAllowed", + "NotAcceptable", + "ProxyAuthenticationRequired", + "RequestTimeout", + "Conflict", + "Gone", + "LengthRequired", + "PreconditionFailed", + "RequestEntityTooLarge", + "RequestUriTooLong", + "UnsupportedMediaType", + "RequestedRangeNotSatisfiable", + "ExpectationFailed", + "MisdirectedRequest", + "UnprocessableEntity", + "Locked", + "FailedDependency", + "UpgradeRequired", + "PreconditionRequired", + "TooManyRequests", + "RequestHeaderFieldsTooLarge", + "UnavailableForLegalReasons", + "InternalServerError", + "NotImplemented", + "BadGateway", + "ServiceUnavailable", + "GatewayTimeout", + "HttpVersionNotSupported", + "VariantAlsoNegotiates", + "InsufficientStorage", + "LoopDetected", + "NotExtended", + "NetworkAuthenticationRequired" + ], + "type": "string" + }, + "HyperDriveConfiguration": { + "type": "object", + "properties": { + "hyperDriveRunConfig": { + "type": "string", + "nullable": true + }, + "primaryMetricGoal": { + "type": "string", + "nullable": true + }, + "primaryMetricName": { + "type": "string", + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArgumentAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "IActionResult": { + "type": "object", + "additionalProperties": false + }, + "ICheckableLongRunningOperationResponse": { + "type": "object", + "properties": { + "completionResult": { + "$ref": "#/components/schemas/LongRunningNullResponse" + }, + "location": { + "type": "string", + "format": "uri", + "nullable": true + }, + "operationResult": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "additionalProperties": false + }, + "IdentityConfiguration": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/IdentityType" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "secret": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "IdentitySetting": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/AEVAIdentityType" + }, + "clientId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "objectId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "msiResourceId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "IdentityType": { + "enum": [ + "Managed", + "ServicePrincipal", + "AMLToken" + ], + "type": "string" + }, + "ImportDataTask": { + "type": "object", + "properties": { + "DataTransferSource": { + "$ref": "#/components/schemas/DataTransferSource" + } + }, + "additionalProperties": false + }, + "IndexedErrorResponse": { + "type": "object", + "properties": { + "code": { + "type": "string", + "nullable": true + }, + "errorCodeHierarchy": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "time": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "componentName": { + "type": "string", + "nullable": true + }, + "severity": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "detailsUri": { + "type": "string", + "format": "uri", + "nullable": true + }, + "referenceCode": { + "type": "string", + "nullable": true + } + } + }, + "InitScriptInfoDto": { + "type": "object", + "properties": { + "dbfs": { + "$ref": "#/components/schemas/DbfsStorageInfoDto" + } + }, + "additionalProperties": false + }, + "InnerErrorDetails": { + "type": "object", + "properties": { + "code": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "target": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "InnerErrorResponse": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code.", + "nullable": true + }, + "innerError": { + "$ref": "#/components/schemas/InnerErrorResponse" + } + }, + "additionalProperties": false, + "description": "A nested structure of errors." + }, + "InputAsset": { + "type": "object", + "properties": { + "asset": { + "$ref": "#/components/schemas/Asset" + }, + "mechanism": { + "$ref": "#/components/schemas/DeliveryMechanism" + }, + "environmentVariableName": { + "type": "string", + "nullable": true + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "overwrite": { + "type": "boolean" + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "InputData": { + "type": "object", + "properties": { + "datasetId": { + "type": "string", + "nullable": true + }, + "mode": { + "$ref": "#/components/schemas/DataBindingMode" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "InputDataBinding": { + "type": "object", + "properties": { + "dataId": { + "type": "string", + "nullable": true + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "mode": { + "$ref": "#/components/schemas/DataBindingMode" + }, + "description": { + "type": "string", + "nullable": true + }, + "uri": { + "$ref": "#/components/schemas/MfeInternalUriReference" + }, + "value": { + "type": "string", + "nullable": true + }, + "assetUri": { + "type": "string", + "nullable": true + }, + "jobInputType": { + "$ref": "#/components/schemas/JobInputType" + } + }, + "additionalProperties": false + }, + "InputDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValueType" + }, + "nullable": true + }, + "default": { + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "enum": { + "type": "array", + "items": { }, + "nullable": true + }, + "enabled_by": { + "type": "string", + "nullable": true + }, + "enabled_by_type": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValueType" + }, + "nullable": true + }, + "enabled_by_value": { + "type": "array", + "items": { }, + "nullable": true + }, + "model_list": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "capabilities": { + "$ref": "#/components/schemas/AzureOpenAIModelCapabilities" + }, + "dynamic_list": { + "$ref": "#/components/schemas/ToolInputDynamicList" + }, + "allow_manual_entry": { + "type": "boolean" + }, + "is_multi_select": { + "type": "boolean" + }, + "generated_by": { + "$ref": "#/components/schemas/ToolInputGeneratedBy" + }, + "input_type": { + "$ref": "#/components/schemas/InputType" + }, + "advanced": { + "type": "boolean", + "nullable": true + }, + "ui_hints": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "InputOutputPortMetadata": { + "type": "object", + "properties": { + "graphModuleNodeId": { + "type": "string", + "nullable": true + }, + "portName": { + "type": "string", + "nullable": true + }, + "schema": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false + }, + "InputSetting": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AEVADataStoreMode" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "options": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "additionalTransformations": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "InputType": { + "enum": [ + "default", + "uionly_hidden" + ], + "type": "string" + }, + "IntellectualPropertyAccessMode": { + "enum": [ + "ReadOnly", + "ReadWrite" + ], + "type": "string" + }, + "IntellectualPropertyPublisherInformation": { + "type": "object", + "properties": { + "intellectualPropertyPublisher": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "InteractiveConfig": { + "type": "object", + "properties": { + "isSSHEnabled": { + "type": "boolean", + "nullable": true + }, + "sshPublicKey": { + "type": "string", + "nullable": true + }, + "isIPythonEnabled": { + "type": "boolean", + "nullable": true + }, + "isTensorBoardEnabled": { + "type": "boolean", + "nullable": true + }, + "interactivePort": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "InteractiveConfiguration": { + "type": "object", + "properties": { + "isSSHEnabled": { + "type": "boolean", + "nullable": true + }, + "sshPublicKey": { + "type": "string", + "nullable": true + }, + "isIPythonEnabled": { + "type": "boolean", + "nullable": true + }, + "isTensorBoardEnabled": { + "type": "boolean", + "nullable": true + }, + "interactivePort": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "JobCost": { + "type": "object", + "properties": { + "chargedCpuCoreSeconds": { + "type": "number", + "format": "double", + "nullable": true + }, + "chargedCpuMemoryMegabyteSeconds": { + "type": "number", + "format": "double", + "nullable": true + }, + "chargedGpuSeconds": { + "type": "number", + "format": "double", + "nullable": true + }, + "chargedNodeUtilizationSeconds": { + "type": "number", + "format": "double", + "nullable": true + } + } + }, + "JobEndpoint": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "port": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "endpoint": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "errorMessage": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "nodes": { + "$ref": "#/components/schemas/MfeInternalNodes" + } + }, + "additionalProperties": false + }, + "JobInput": { + "required": [ + "jobInputType" + ], + "type": "object", + "properties": { + "jobInputType": { + "$ref": "#/components/schemas/JobInputType" + }, + "description": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "JobInputType": { + "enum": [ + "Dataset", + "Uri", + "Literal", + "UriFile", + "UriFolder", + "MLTable", + "CustomModel", + "MLFlowModel", + "TritonModel" + ], + "type": "string" + }, + "JobLimitsType": { + "enum": [ + "Command", + "Sweep" + ], + "type": "string" + }, + "JobOutput": { + "required": [ + "jobOutputType" + ], + "type": "object", + "properties": { + "jobOutputType": { + "$ref": "#/components/schemas/JobOutputType" + }, + "description": { + "type": "string", + "nullable": true + }, + "autoDeleteSetting": { + "$ref": "#/components/schemas/AutoDeleteSetting" + } + }, + "additionalProperties": false + }, + "JobOutputArtifacts": { + "type": "object", + "properties": { + "datastoreId": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "JobOutputType": { + "enum": [ + "Uri", + "Dataset", + "UriFile", + "UriFolder", + "MLTable", + "CustomModel", + "MLFlowModel", + "TritonModel" + ], + "type": "string" + }, + "JobProvisioningState": { + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "InProgress" + ], + "type": "string" + }, + "JobScheduleDto": { + "type": "object", + "properties": { + "jobType": { + "$ref": "#/components/schemas/JobType" + }, + "systemData": { + "$ref": "#/components/schemas/SystemData" + }, + "name": { + "type": "string", + "nullable": true + }, + "jobDefinitionId": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "triggerType": { + "$ref": "#/components/schemas/TriggerType" + }, + "recurrence": { + "$ref": "#/components/schemas/Recurrence" + }, + "cron": { + "$ref": "#/components/schemas/Cron" + }, + "status": { + "$ref": "#/components/schemas/ScheduleStatus" + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "JobStatus": { + "enum": [ + "NotStarted", + "Starting", + "Provisioning", + "Preparing", + "Queued", + "Running", + "Finalizing", + "CancelRequested", + "Completed", + "Failed", + "Canceled", + "NotResponding", + "Paused", + "Unknown", + "Scheduled" + ], + "type": "string" + }, + "JobType": { + "enum": [ + "Command", + "Sweep", + "Labeling", + "Pipeline", + "Data", + "AutoML", + "Spark", + "Base", + "FineTuning" + ], + "type": "string" + }, + "K8sConfiguration": { + "type": "object", + "properties": { + "maxRetryCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "resourceConfiguration": { + "$ref": "#/components/schemas/ResourceConfig" + }, + "priorityConfiguration": { + "$ref": "#/components/schemas/PriorityConfig" + }, + "interactiveConfiguration": { + "$ref": "#/components/schemas/InteractiveConfig" + } + }, + "additionalProperties": false + }, + "KeyType": { + "enum": [ + "Primary", + "Secondary" + ], + "type": "string" + }, + "KeyValuePairComponentNameMetaInfoErrorResponse": { + "type": "object", + "properties": { + "key": { + "$ref": "#/components/schemas/ComponentNameMetaInfo" + }, + "value": { + "$ref": "#/components/schemas/ErrorResponse" + } + }, + "additionalProperties": false + }, + "KeyValuePairComponentNameMetaInfoModuleDto": { + "type": "object", + "properties": { + "key": { + "$ref": "#/components/schemas/ComponentNameMetaInfo" + }, + "value": { + "$ref": "#/components/schemas/ModuleDto" + } + }, + "additionalProperties": false + }, + "KeyValuePairStringObject": { + "type": "object", + "properties": { + "key": { + "type": "string", + "nullable": true + }, + "value": { + "nullable": true + } + }, + "additionalProperties": false + }, + "KubernetesConfiguration": { + "type": "object", + "properties": { + "instanceType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Kwarg": { + "type": "object", + "properties": { + "key": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "LegacyDataPath": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AEVADataStoreMode" + }, + "relativePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "LimitSettings": { + "type": "object", + "properties": { + "maxTrials": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timeout": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "trialTimeout": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "maxConcurrentTrials": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxCoresPerTrial": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exitScore": { + "type": "number", + "format": "double", + "nullable": true + }, + "enableEarlyTermination": { + "type": "boolean", + "nullable": true + }, + "maxNodes": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "LinkedADBWorkspaceMetadata": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "nullable": true + }, + "region": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "LinkedPipelineInfo": { + "type": "object", + "properties": { + "pipelineType": { + "$ref": "#/components/schemas/PipelineType" + }, + "moduleNodeId": { + "type": "string", + "nullable": true + }, + "portName": { + "type": "string", + "nullable": true + }, + "linkedPipelineDraftId": { + "type": "string", + "nullable": true + }, + "linkedPipelineRunId": { + "type": "string", + "nullable": true + }, + "isDirectLink": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ListViewType": { + "enum": [ + "ActiveOnly", + "ArchivedOnly", + "All" + ], + "type": "string" + }, + "LoadFlowAsComponentRequest": { + "type": "object", + "properties": { + "componentName": { + "type": "string", + "nullable": true + }, + "componentVersion": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "isDeterministic": { + "type": "boolean" + }, + "flowDefinitionFilePath": { + "type": "string", + "nullable": true + }, + "flowDefinitionResourceId": { + "type": "string", + "nullable": true + }, + "flowDefinitionDataStoreName": { + "type": "string", + "nullable": true + }, + "flowDefinitionBlobPath": { + "type": "string", + "nullable": true + }, + "flowDefinitionDataUri": { + "type": "string", + "nullable": true + }, + "nodeVariant": { + "type": "string", + "nullable": true + }, + "inputsMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "sessionId": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "LogLevel": { + "enum": [ + "Trace", + "Debug", + "Information", + "Warning", + "Error", + "Critical", + "None" + ], + "type": "string" + }, + "LogRunTerminatedEventDto": { + "type": "object", + "properties": { + "nextActionIntervalInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "actionType": { + "$ref": "#/components/schemas/ActionType" + }, + "lastCheckedTime": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "LogVerbosity": { + "enum": [ + "NotSet", + "Debug", + "Info", + "Warning", + "Error", + "Critical" + ], + "type": "string" + }, + "LongRunningNullResponse": { + "type": "object", + "additionalProperties": false + }, + "LongRunningOperationUriResponse": { + "type": "object", + "properties": { + "location": { + "type": "string", + "format": "uri", + "nullable": true + }, + "operationResult": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "additionalProperties": false + }, + "LongRunningUpdateRegistryComponentRequest": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "registryName": { + "type": "string", + "nullable": true + }, + "componentName": { + "type": "string", + "nullable": true + }, + "componentVersion": { + "type": "string", + "nullable": true + }, + "updateType": { + "$ref": "#/components/schemas/LongRunningUpdateType" + } + }, + "additionalProperties": false + }, + "LongRunningUpdateType": { + "enum": [ + "EnableModule", + "DisableModule", + "UpdateDisplayName", + "UpdateDescription", + "UpdateTags" + ], + "type": "string" + }, + "MLFlowAutologgerState": { + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string" + }, + "ManagedServiceIdentity": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ManagedServiceIdentityType" + }, + "principalId": { + "type": "string", + "format": "uuid" + }, + "tenantId": { + "type": "string", + "format": "uuid" + }, + "userAssignedIdentities": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/UserAssignedIdentity" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ManagedServiceIdentityType": { + "enum": [ + "SystemAssigned", + "UserAssigned", + "SystemAssignedUserAssigned", + "None" + ], + "type": "string" + }, + "MavenLibraryDto": { + "type": "object", + "properties": { + "coordinates": { + "type": "string", + "nullable": true + }, + "repo": { + "type": "string", + "nullable": true + }, + "exclusions": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "MetricProperties": { + "type": "object", + "properties": { + "uxMetricType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "MetricSchemaDto": { + "type": "object", + "properties": { + "numProperties": { + "type": "integer", + "format": "int32" + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricSchemaPropertyDto" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "MetricSchemaPropertyDto": { + "type": "object", + "properties": { + "propertyId": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "MetricV2Dto": { + "type": "object", + "properties": { + "dataContainerId": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "columns": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MetricValueType" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "$ref": "#/components/schemas/MetricProperties" + }, + "namespace": { + "type": "string", + "nullable": true + }, + "standardSchemaId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MetricV2Value" + }, + "nullable": true + }, + "continuationToken": { + "type": "string", + "description": "The token used in retrieving the next page. If null, there are no additional pages.", + "nullable": true + }, + "nextLink": { + "type": "string", + "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", + "nullable": true + } + }, + "additionalProperties": false + }, + "MetricV2Value": { + "type": "object", + "properties": { + "metricId": { + "type": "string", + "nullable": true + }, + "createdUtc": { + "type": "string", + "format": "date-time" + }, + "step": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "data": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "sasUri": { + "type": "string", + "format": "uri", + "nullable": true + } + }, + "additionalProperties": false + }, + "MetricValueType": { + "enum": [ + "Int", + "Double", + "String", + "Bool", + "Artifact", + "Histogram", + "Malformed" + ], + "type": "string" + }, + "MfeInternalAutologgerSettings": { + "type": "object", + "properties": { + "mlflowAutologger": { + "$ref": "#/components/schemas/MfeInternalMLFlowAutologgerState" + } + }, + "additionalProperties": false + }, + "MfeInternalIdentityConfiguration": { + "type": "object", + "properties": { + "identityType": { + "$ref": "#/components/schemas/MfeInternalIdentityType" + } + }, + "additionalProperties": false + }, + "MfeInternalIdentityType": { + "enum": [ + "Managed", + "AMLToken", + "UserIdentity" + ], + "type": "string" + }, + "MfeInternalMLFlowAutologgerState": { + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string" + }, + "MfeInternalNodes": { + "type": "object", + "properties": { + "nodesValueType": { + "$ref": "#/components/schemas/MfeInternalNodesValueType" + } + }, + "additionalProperties": false + }, + "MfeInternalNodesValueType": { + "enum": [ + "All" + ], + "type": "string" + }, + "MfeInternalOutputData": { + "type": "object", + "properties": { + "datasetName": { + "type": "string", + "nullable": true + }, + "datastore": { + "type": "string", + "nullable": true + }, + "datapath": { + "type": "string", + "nullable": true + }, + "mode": { + "$ref": "#/components/schemas/DataBindingMode" + } + }, + "additionalProperties": false + }, + "MfeInternalPipelineType": { + "enum": [ + "AzureML" + ], + "type": "string" + }, + "MfeInternalScheduleStatus": { + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string" + }, + "MfeInternalSecretConfiguration": { + "type": "object", + "properties": { + "workspaceSecretName": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "MfeInternalUriReference": { + "type": "object", + "properties": { + "file": { + "type": "string", + "nullable": true + }, + "folder": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "MfeInternalV20211001ComponentJob": { + "type": "object", + "properties": { + "computeId": { + "type": "string", + "nullable": true + }, + "componentId": { + "type": "string", + "nullable": true + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JobInput" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JobOutput" + }, + "description": "This is a dictionary", + "nullable": true + }, + "overrides": { + "nullable": true + } + }, + "additionalProperties": false + }, + "MinMaxParameterRule": { + "type": "object", + "properties": { + "min": { + "type": "number", + "format": "double", + "nullable": true + }, + "max": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "MlcComputeInfo": { + "type": "object", + "properties": { + "mlcComputeType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ModelDto": { + "type": "object", + "properties": { + "feedName": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "amlDataStoreName": { + "type": "string", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "systemData": { + "$ref": "#/components/schemas/SystemData" + }, + "armId": { + "type": "string", + "nullable": true + }, + "onlineEndpointYamlStr": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ModelManagementErrorResponse": { + "type": "object", + "properties": { + "code": { + "type": "string", + "nullable": true + }, + "statusCode": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string", + "nullable": true + }, + "target": { + "type": "string", + "nullable": true + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InnerErrorDetails" + }, + "nullable": true + }, + "correlation": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ModifyPipelineJobScheduleDto": { + "type": "object", + "properties": { + "pipelineJobName": { + "type": "string", + "nullable": true + }, + "pipelineJobRuntimeSettings": { + "$ref": "#/components/schemas/PipelineJobRuntimeBasicSettings" + }, + "displayName": { + "type": "string", + "nullable": true + }, + "triggerType": { + "$ref": "#/components/schemas/TriggerType" + }, + "recurrence": { + "$ref": "#/components/schemas/Recurrence" + }, + "cron": { + "$ref": "#/components/schemas/Cron" + }, + "status": { + "$ref": "#/components/schemas/ScheduleStatus" + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "ModuleDto": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "dictTags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "moduleVersionId": { + "type": "string", + "nullable": true + }, + "feedName": { + "type": "string", + "nullable": true + }, + "registryName": { + "type": "string", + "nullable": true + }, + "moduleName": { + "type": "string", + "nullable": true + }, + "moduleVersion": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "owner": { + "type": "string", + "nullable": true + }, + "jobType": { + "type": "string", + "nullable": true + }, + "defaultVersion": { + "type": "string", + "nullable": true + }, + "familyId": { + "type": "string", + "nullable": true + }, + "helpDocument": { + "type": "string", + "nullable": true + }, + "codegenBy": { + "type": "string", + "nullable": true + }, + "armId": { + "type": "string", + "nullable": true + }, + "moduleScope": { + "$ref": "#/components/schemas/ModuleScope" + }, + "moduleEntity": { + "$ref": "#/components/schemas/ModuleEntity" + }, + "inputTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "outputTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + }, + "yamlLink": { + "type": "string", + "nullable": true + }, + "yamlLinkWithCommitSha": { + "type": "string", + "nullable": true + }, + "moduleSourceType": { + "$ref": "#/components/schemas/ModuleSourceType" + }, + "registeredBy": { + "type": "string", + "nullable": true + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AzureMLModuleVersionDescriptor" + }, + "nullable": true + }, + "isDefaultModuleVersion": { + "type": "boolean", + "nullable": true + }, + "systemData": { + "$ref": "#/components/schemas/SystemData" + }, + "systemMeta": { + "$ref": "#/components/schemas/SystemMeta" + }, + "snapshotId": { + "type": "string", + "nullable": true + }, + "entry": { + "type": "string", + "nullable": true + }, + "osType": { + "type": "string", + "nullable": true + }, + "requireGpu": { + "type": "boolean", + "nullable": true + }, + "modulePythonInterface": { + "$ref": "#/components/schemas/ModulePythonInterface" + }, + "environmentAssetId": { + "type": "string", + "nullable": true + }, + "runSettingParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameter" + }, + "nullable": true + }, + "supportedUIInputDataDeliveryModes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UIInputDataDeliveryMode" + }, + "nullable": true + }, + "nullable": true + }, + "outputSettingSpecs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OutputSettingSpec" + }, + "nullable": true + }, + "yamlStr": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ModuleDtoFields": { + "enum": [ + "Definition", + "YamlStr", + "RegistrationContext", + "RunSettingParameters", + "RunDefinition", + "All", + "Default", + "Basic", + "Minimal" + ], + "type": "string" + }, + "ModuleDtoWithErrors": { + "type": "object", + "properties": { + "versionIdToModuleDto": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ModuleDto" + }, + "description": "This is a dictionary", + "nullable": true + }, + "nameAndVersionToModuleDto": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KeyValuePairComponentNameMetaInfoModuleDto" + }, + "nullable": true + }, + "versionIdToError": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "description": "This is a dictionary", + "nullable": true + }, + "nameAndVersionToError": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KeyValuePairComponentNameMetaInfoErrorResponse" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ModuleDtoWithValidateStatus": { + "type": "object", + "properties": { + "existingModuleEntity": { + "$ref": "#/components/schemas/ModuleEntity" + }, + "status": { + "$ref": "#/components/schemas/ModuleInfoFromYamlStatusEnum" + }, + "statusDetails": { + "type": "string", + "nullable": true + }, + "errorDetails": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "serializedModuleInfo": { + "type": "string", + "nullable": true + }, + "namespace": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "dictTags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "moduleVersionId": { + "type": "string", + "nullable": true + }, + "feedName": { + "type": "string", + "nullable": true + }, + "registryName": { + "type": "string", + "nullable": true + }, + "moduleName": { + "type": "string", + "nullable": true + }, + "moduleVersion": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "owner": { + "type": "string", + "nullable": true + }, + "jobType": { + "type": "string", + "nullable": true + }, + "defaultVersion": { + "type": "string", + "nullable": true + }, + "familyId": { + "type": "string", + "nullable": true + }, + "helpDocument": { + "type": "string", + "nullable": true + }, + "codegenBy": { + "type": "string", + "nullable": true + }, + "armId": { + "type": "string", + "nullable": true + }, + "moduleScope": { + "$ref": "#/components/schemas/ModuleScope" + }, + "moduleEntity": { + "$ref": "#/components/schemas/ModuleEntity" + }, + "inputTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "outputTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + }, + "yamlLink": { + "type": "string", + "nullable": true + }, + "yamlLinkWithCommitSha": { + "type": "string", + "nullable": true + }, + "moduleSourceType": { + "$ref": "#/components/schemas/ModuleSourceType" + }, + "registeredBy": { + "type": "string", + "nullable": true + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AzureMLModuleVersionDescriptor" + }, + "nullable": true + }, + "isDefaultModuleVersion": { + "type": "boolean", + "nullable": true + }, + "systemData": { + "$ref": "#/components/schemas/SystemData" + }, + "systemMeta": { + "$ref": "#/components/schemas/SystemMeta" + }, + "snapshotId": { + "type": "string", + "nullable": true + }, + "entry": { + "type": "string", + "nullable": true + }, + "osType": { + "type": "string", + "nullable": true + }, + "requireGpu": { + "type": "boolean", + "nullable": true + }, + "modulePythonInterface": { + "$ref": "#/components/schemas/ModulePythonInterface" + }, + "environmentAssetId": { + "type": "string", + "nullable": true + }, + "runSettingParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameter" + }, + "nullable": true + }, + "supportedUIInputDataDeliveryModes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UIInputDataDeliveryMode" + }, + "nullable": true + }, + "nullable": true + }, + "outputSettingSpecs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OutputSettingSpec" + }, + "nullable": true + }, + "yamlStr": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ModuleEntity": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "nullable": true + }, + "moduleExecutionType": { + "type": "string", + "nullable": true + }, + "moduleType": { + "$ref": "#/components/schemas/ModuleType" + }, + "moduleTypeVersion": { + "type": "string", + "nullable": true + }, + "uploadState": { + "$ref": "#/components/schemas/UploadState" + }, + "isDeterministic": { + "type": "boolean" + }, + "structuredInterface": { + "$ref": "#/components/schemas/StructuredInterface" + }, + "dataLocation": { + "$ref": "#/components/schemas/DataLocation" + }, + "identifierHash": { + "type": "string", + "nullable": true + }, + "identifierHashV2": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "createdBy": { + "$ref": "#/components/schemas/CreatedBy" + }, + "lastUpdatedBy": { + "$ref": "#/components/schemas/CreatedBy" + }, + "runconfig": { + "type": "string", + "nullable": true + }, + "cloudSettings": { + "$ref": "#/components/schemas/CloudSettings" + }, + "category": { + "type": "string", + "nullable": true + }, + "stepType": { + "type": "string", + "nullable": true + }, + "stage": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "ModuleInfoFromYamlStatusEnum": { + "enum": [ + "NewModule", + "NewVersion", + "Conflict", + "ParseError", + "ProcessRequestError" + ], + "type": "string" + }, + "ModulePythonInterface": { + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PythonInterfaceMapping" + }, + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PythonInterfaceMapping" + }, + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PythonInterfaceMapping" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ModuleRunSettingTypes": { + "enum": [ + "All", + "Released", + "Default", + "Testing", + "Legacy", + "Preview", + "UxFull", + "Integration", + "UxIntegration", + "Full" + ], + "type": "string" + }, + "ModuleScope": { + "enum": [ + "All", + "Global", + "Workspace", + "Anonymous", + "Step", + "Draft", + "Feed", + "Registry", + "SystemAutoCreated" + ], + "type": "string" + }, + "ModuleSourceType": { + "enum": [ + "Unknown", + "Local", + "GithubFile", + "GithubFolder", + "DevopsArtifactsZip", + "SerializedModuleInfo" + ], + "type": "string" + }, + "ModuleType": { + "enum": [ + "None", + "BatchInferencing" + ], + "type": "string" + }, + "ModuleUpdateOperationType": { + "enum": [ + "SetDefaultVersion", + "EnableModule", + "DisableModule", + "UpdateDisplayName", + "UpdateDescription", + "UpdateTags" + ], + "type": "string" + }, + "ModuleWorkingMechanism": { + "enum": [ + "Normal", + "OutputToDataset" + ], + "type": "string" + }, + "MpiConfiguration": { + "type": "object", + "properties": { + "processCountPerNode": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "NCrossValidationMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "NCrossValidations": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/NCrossValidationMode" + }, + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "Node": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ToolType" + }, + "source": { + "$ref": "#/components/schemas/NodeSource" + }, + "inputs": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "tool": { + "type": "string", + "nullable": true + }, + "reduce": { + "type": "boolean" + }, + "activate": { + "$ref": "#/components/schemas/Activate" + }, + "use_variants": { + "type": "boolean" + }, + "comment": { + "type": "string", + "nullable": true + }, + "api": { + "type": "string", + "nullable": true + }, + "provider": { + "type": "string", + "nullable": true + }, + "connection": { + "type": "string", + "nullable": true + }, + "module": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "NodeCompositionMode": { + "enum": [ + "None", + "OnlySequential", + "Full" + ], + "type": "string" + }, + "NodeInputPort": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "documentation": { + "type": "string", + "nullable": true + }, + "dataTypesIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "isOptional": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "NodeLayout": { + "type": "object", + "properties": { + "x": { + "type": "number", + "format": "float" + }, + "y": { + "type": "number", + "format": "float" + }, + "width": { + "type": "number", + "format": "float" + }, + "height": { + "type": "number", + "format": "float" + }, + "extendedData": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "NodeOutputPort": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "documentation": { + "type": "string", + "nullable": true + }, + "dataTypeId": { + "type": "string", + "nullable": true + }, + "passThroughInputName": { + "type": "string", + "nullable": true + }, + "EarlyAvailable": { + "type": "boolean" + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AEVADataStoreMode" + } + }, + "additionalProperties": false + }, + "NodePortInterface": { + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeInputPort" + }, + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeOutputPort" + }, + "nullable": true + }, + "controlOutputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ControlOutput" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "NodeSource": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "tool": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "NodeTelemetryMetaInfo": { + "type": "object", + "properties": { + "pipelineRunId": { + "type": "string", + "nullable": true + }, + "nodeId": { + "type": "string", + "nullable": true + }, + "versionId": { + "type": "string", + "nullable": true + }, + "nodeType": { + "type": "string", + "nullable": true + }, + "nodeSource": { + "type": "string", + "nullable": true + }, + "isAnonymous": { + "type": "boolean" + }, + "isPipelineComponent": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "NodeVariant": { + "type": "object", + "properties": { + "variants": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/VariantNode" + }, + "description": "This is a dictionary", + "nullable": true + }, + "defaultVariantId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Nodes": { + "required": [ + "nodes_value_type" + ], + "type": "object", + "properties": { + "nodes_value_type": { + "$ref": "#/components/schemas/NodesValueType" + }, + "values": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "NodesValueType": { + "enum": [ + "All", + "Custom" + ], + "type": "string" + }, + "NoteBookTaskDto": { + "type": "object", + "properties": { + "notebook_path": { + "type": "string", + "nullable": true + }, + "base_parameters": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "NotificationSetting": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "emailOn": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EmailNotificationEnableType" + }, + "nullable": true + }, + "webhooks": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Webhook" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ODataError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Gets or sets a language-independent, service-defined error code.\r\nThis code serves as a sub-status for the HTTP error code specified\r\nin the response.", + "nullable": true + }, + "message": { + "type": "string", + "description": "Gets or sets a human-readable, language-dependent representation of the error.\r\nThe `Content-Language` header MUST contain the language code from [RFC5646]\r\ncorresponding to the language in which the value for message is written.", + "nullable": true + }, + "target": { + "type": "string", + "description": "Gets or sets the target of the particular error\r\n(for example, the name of the property in error).", + "nullable": true + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ODataErrorDetail" + }, + "description": "Gets or sets additional details about the error.", + "nullable": true + }, + "innererror": { + "$ref": "#/components/schemas/ODataInnerError" + } + }, + "additionalProperties": false, + "description": "Represents OData v4 error object." + }, + "ODataErrorDetail": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Gets or sets a language-independent, service-defined error code.", + "nullable": true + }, + "message": { + "type": "string", + "description": "Gets or sets a human-readable, language-dependent representation of the error.", + "nullable": true + }, + "target": { + "type": "string", + "description": "Gets or sets the target of the particular error\r\n(for example, the name of the property in error).", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents additional error details." + }, + "ODataErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/ODataError" + } + }, + "additionalProperties": false, + "description": "Represents OData v4 compliant error response message." + }, + "ODataInnerError": { + "type": "object", + "properties": { + "clientRequestId": { + "type": "string", + "description": "Gets or sets the client provided request ID.", + "nullable": true + }, + "serviceRequestId": { + "type": "string", + "description": "Gets or sets the server generated request ID.", + "nullable": true + }, + "trace": { + "type": "string", + "description": "Gets or sets the exception stack trace.\r\nDO NOT INCLUDE IT IN PRODUCTION ENVIRONMENT.", + "nullable": true + }, + "context": { + "type": "string", + "description": "Gets or sets additional context for the exception.\r\nDO NOT INCLUDE IT IN PRODUCTION ENVIRONMENT.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The contents of this object are service-defined.\r\nUsually this object contains information that will help debug the service\r\nand SHOULD only be used in development environments in order to guard\r\nagainst potential security concerns around information disclosure." + }, + "Orientation": { + "enum": [ + "Horizontal", + "Vertical" + ], + "type": "string" + }, + "OutputData": { + "type": "object", + "properties": { + "outputLocation": { + "$ref": "#/components/schemas/ExecutionDataLocation" + }, + "mechanism": { + "$ref": "#/components/schemas/OutputMechanism" + }, + "additionalOptions": { + "$ref": "#/components/schemas/OutputOptions" + }, + "environmentVariableName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "OutputDataBinding": { + "type": "object", + "properties": { + "datastoreId": { + "type": "string", + "nullable": true + }, + "pathOnDatastore": { + "type": "string", + "nullable": true + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "uri": { + "$ref": "#/components/schemas/MfeInternalUriReference" + }, + "mode": { + "$ref": "#/components/schemas/DataBindingMode" + }, + "assetUri": { + "type": "string", + "nullable": true + }, + "isAssetJobOutput": { + "type": "boolean", + "nullable": true + }, + "jobOutputType": { + "$ref": "#/components/schemas/JobOutputType" + }, + "assetName": { + "type": "string", + "nullable": true + }, + "assetVersion": { + "type": "string", + "nullable": true + }, + "autoDeleteSetting": { + "$ref": "#/components/schemas/AutoDeleteSetting" + } + }, + "additionalProperties": false + }, + "OutputDatasetLineage": { + "type": "object", + "properties": { + "identifier": { + "$ref": "#/components/schemas/DatasetIdentifier" + }, + "outputType": { + "$ref": "#/components/schemas/DatasetOutputType" + }, + "outputDetails": { + "$ref": "#/components/schemas/DatasetOutputDetails" + } + }, + "additionalProperties": false + }, + "OutputDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ValueType" + }, + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "isProperty": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "OutputMechanism": { + "enum": [ + "Upload", + "Mount", + "Hdfs", + "Link", + "Direct" + ], + "type": "string" + }, + "OutputOptions": { + "type": "object", + "properties": { + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "registrationOptions": { + "$ref": "#/components/schemas/RegistrationOptions" + }, + "uploadOptions": { + "$ref": "#/components/schemas/UploadOptions" + }, + "mountOptions": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "OutputSetting": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "DataStoreNameParameterAssignment": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AEVADataStoreMode" + }, + "DataStoreModeParameterAssignment": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "PathOnComputeParameterAssignment": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "overwrite": { + "type": "boolean" + }, + "dataReferenceName": { + "type": "string", + "nullable": true + }, + "webServicePort": { + "type": "string", + "nullable": true + }, + "datasetRegistration": { + "$ref": "#/components/schemas/DatasetRegistration" + }, + "datasetOutputOptions": { + "$ref": "#/components/schemas/DatasetOutputOptions" + }, + "AssetOutputSettings": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "parameterName": { + "type": "string", + "nullable": true + }, + "AssetOutputSettingsParameterName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "OutputSettingSpec": { + "type": "object", + "properties": { + "supportedDataStoreModes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AEVADataStoreMode" + }, + "nullable": true + }, + "defaultAssetOutputPath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedDataInfoList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataInfo" + }, + "description": "An array of objects of type DataInfo.", + "nullable": true + }, + "continuationToken": { + "type": "string", + "description": "The token used in retrieving the next page. If null, there are no additional pages.", + "nullable": true + }, + "nextLink": { + "type": "string", + "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A paginated list of DataInfos." + }, + "PaginatedModelDtoList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ModelDto" + }, + "description": "An array of objects of type ModelDto.", + "nullable": true + }, + "continuationToken": { + "type": "string", + "description": "The token used in retrieving the next page. If null, there are no additional pages.", + "nullable": true + }, + "nextLink": { + "type": "string", + "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A paginated list of ModelDtos." + }, + "PaginatedModuleDtoList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ModuleDto" + }, + "description": "An array of objects of type ModuleDto.", + "nullable": true + }, + "continuationToken": { + "type": "string", + "description": "The token used in retrieving the next page. If null, there are no additional pages.", + "nullable": true + }, + "nextLink": { + "type": "string", + "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A paginated list of ModuleDtos." + }, + "PaginatedPipelineDraftSummaryList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PipelineDraftSummary" + }, + "description": "An array of objects of type PipelineDraftSummary.", + "nullable": true + }, + "continuationToken": { + "type": "string", + "description": "The token used in retrieving the next page. If null, there are no additional pages.", + "nullable": true + }, + "nextLink": { + "type": "string", + "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A paginated list of PipelineDraftSummarys." + }, + "PaginatedPipelineEndpointSummaryList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PipelineEndpointSummary" + }, + "description": "An array of objects of type PipelineEndpointSummary.", + "nullable": true + }, + "continuationToken": { + "type": "string", + "description": "The token used in retrieving the next page. If null, there are no additional pages.", + "nullable": true + }, + "nextLink": { + "type": "string", + "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A paginated list of PipelineEndpointSummarys." + }, + "PaginatedPipelineRunSummaryList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PipelineRunSummary" + }, + "description": "An array of objects of type PipelineRunSummary.", + "nullable": true + }, + "continuationToken": { + "type": "string", + "description": "The token used in retrieving the next page. If null, there are no additional pages.", + "nullable": true + }, + "nextLink": { + "type": "string", + "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A paginated list of PipelineRunSummarys." + }, + "PaginatedPublishedPipelineSummaryList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublishedPipelineSummary" + }, + "description": "An array of objects of type PublishedPipelineSummary.", + "nullable": true + }, + "continuationToken": { + "type": "string", + "description": "The token used in retrieving the next page. If null, there are no additional pages.", + "nullable": true + }, + "nextLink": { + "type": "string", + "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A paginated list of PublishedPipelineSummarys." + }, + "ParallelForControlFlowInfo": { + "type": "object", + "properties": { + "parallelForItemsInput": { + "$ref": "#/components/schemas/ParameterAssignment" + } + }, + "additionalProperties": false + }, + "ParallelTaskConfiguration": { + "type": "object", + "properties": { + "maxRetriesPerWorker": { + "type": "integer", + "format": "int32" + }, + "workerCountPerNode": { + "type": "integer", + "format": "int32" + }, + "terminalExitCodes": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "configuration": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Parameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "documentation": { + "type": "string", + "nullable": true + }, + "defaultValue": { + "type": "string", + "nullable": true + }, + "isOptional": { + "type": "boolean" + }, + "minMaxRules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MinMaxParameterRule" + }, + "nullable": true + }, + "enumRules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnumParameterRule" + }, + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ParameterType" + }, + "label": { + "type": "string", + "nullable": true + }, + "groupNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "argumentName": { + "type": "string", + "nullable": true + }, + "uiHint": { + "$ref": "#/components/schemas/UIParameterHint" + } + }, + "additionalProperties": false + }, + "ParameterAssignment": { + "type": "object", + "properties": { + "valueType": { + "$ref": "#/components/schemas/ParameterValueType" + }, + "assignmentsToConcatenate": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "nullable": true + }, + "dataPathAssignment": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "dataSetDefinitionValueAssignment": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ParameterDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + }, + "isOptional": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ParameterType": { + "enum": [ + "Int", + "Double", + "Bool", + "String", + "Undefined" + ], + "type": "string" + }, + "ParameterValueType": { + "enum": [ + "Literal", + "GraphParameterName", + "Concatenate", + "Input", + "DataPath", + "DataSetDefinition" + ], + "type": "string" + }, + "PatchFlowRequest": { + "type": "object", + "properties": { + "flowPatchOperationType": { + "$ref": "#/components/schemas/FlowPatchOperationType" + }, + "flowDefinitionFilePath": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pipeline": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean" + }, + "defaultDatastoreName": { + "type": "string", + "nullable": true + }, + "componentJobs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComponentJob" + }, + "description": "This is a dictionary", + "nullable": true + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineInput" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineOutput" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineDraft": { + "type": "object", + "properties": { + "graphDraftId": { + "type": "string", + "nullable": true + }, + "sourcePipelineRunId": { + "type": "string", + "nullable": true + }, + "latestPipelineRunId": { + "type": "string", + "nullable": true + }, + "latestRunExperimentName": { + "type": "string", + "nullable": true + }, + "latestRunExperimentId": { + "type": "string", + "nullable": true + }, + "isLatestRunExperimentArchived": { + "type": "boolean", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/PipelineStatus" + }, + "graphDetail": { + "$ref": "#/components/schemas/PipelineRunGraphDetail" + }, + "realTimeEndpointInfo": { + "$ref": "#/components/schemas/RealTimeEndpointInfo" + }, + "linkedPipelinesInfo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LinkedPipelineInfo" + }, + "nullable": true + }, + "nodesInDraft": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "studioMigrationInfo": { + "$ref": "#/components/schemas/StudioMigrationInfo" + }, + "flattenedSubGraphs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineSubDraft" + }, + "nullable": true + }, + "pipelineRunSettingParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameter" + }, + "nullable": true + }, + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean" + }, + "continueRunOnFailedOptionalInput": { + "type": "boolean" + }, + "defaultCompute": { + "$ref": "#/components/schemas/ComputeSetting" + }, + "defaultDatastore": { + "$ref": "#/components/schemas/DatastoreSetting" + }, + "defaultCloudPriority": { + "$ref": "#/components/schemas/CloudPrioritySetting" + }, + "enforceRerun": { + "type": "boolean", + "nullable": true + }, + "pipelineParameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataPathAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "assetOutputSettingsAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "pipelineTimeout": { + "type": "integer", + "format": "int32" + }, + "identityConfig": { + "$ref": "#/components/schemas/IdentitySetting" + }, + "graphComponentsMode": { + "$ref": "#/components/schemas/GraphComponentsMode" + }, + "name": { + "type": "string", + "nullable": true + }, + "lastEditedBy": { + "type": "string", + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "pipelineType": { + "$ref": "#/components/schemas/PipelineType" + }, + "pipelineDraftMode": { + "$ref": "#/components/schemas/PipelineDraftMode" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PipelineDraftMode": { + "enum": [ + "None", + "Normal", + "Custom" + ], + "type": "string" + }, + "PipelineDraftStepDetails": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "nullable": true + }, + "target": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/RunStatus" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "parentRunId": { + "type": "string", + "nullable": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "isReused": { + "type": "boolean", + "nullable": true + }, + "reusedRunId": { + "type": "string", + "nullable": true + }, + "reusedPipelineRunId": { + "type": "string", + "nullable": true + }, + "logs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputLog": { + "type": "string", + "nullable": true + }, + "runConfiguration": { + "$ref": "#/components/schemas/RunConfiguration" + }, + "outputs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "portOutputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PortOutputInfo" + }, + "description": "This is a dictionary", + "nullable": true + }, + "isExperimentArchived": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineDraftSummary": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "lastEditedBy": { + "type": "string", + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "pipelineType": { + "$ref": "#/components/schemas/PipelineType" + }, + "pipelineDraftMode": { + "$ref": "#/components/schemas/PipelineDraftMode" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PipelineEndpoint": { + "type": "object", + "properties": { + "defaultVersion": { + "type": "string", + "nullable": true + }, + "defaultPipelineId": { + "type": "string", + "nullable": true + }, + "defaultGraphId": { + "type": "string", + "nullable": true + }, + "restEndpoint": { + "type": "string", + "nullable": true + }, + "publishedDate": { + "type": "string", + "format": "date-time" + }, + "publishedBy": { + "type": "string", + "nullable": true + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignment": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "defaultPipelineName": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "updatedBy": { + "type": "string", + "nullable": true + }, + "swaggerUrl": { + "type": "string", + "nullable": true + }, + "lastRunTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastRunStatus": { + "$ref": "#/components/schemas/PipelineRunStatusCode" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PipelineEndpointSummary": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "updatedBy": { + "type": "string", + "nullable": true + }, + "swaggerUrl": { + "type": "string", + "nullable": true + }, + "lastRunTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastRunStatus": { + "$ref": "#/components/schemas/PipelineRunStatusCode" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PipelineGraph": { + "type": "object", + "properties": { + "graphModuleDtos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ModuleDto" + }, + "nullable": true + }, + "graphDataSources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataInfo" + }, + "nullable": true + }, + "graphs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineGraph" + }, + "description": "This is a dictionary", + "nullable": true + }, + "graphDrafts": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineGraph" + }, + "description": "This is a dictionary", + "nullable": true + }, + "moduleNodeRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeRunSetting" + }, + "nullable": true + }, + "moduleNodeUIInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" + }, + "nullable": true + }, + "subPipelinesInfo": { + "$ref": "#/components/schemas/SubPipelinesInfo" + }, + "referencedNodeId": { + "type": "string", + "nullable": true + }, + "pipelineRunSettingParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameter" + }, + "nullable": true + }, + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "realTimeEndpointInfo": { + "$ref": "#/components/schemas/RealTimeEndpointInfo" + }, + "nodeTelemetryMetaInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NodeTelemetryMetaInfo" + }, + "nullable": true + }, + "graphComponentsMode": { + "$ref": "#/components/schemas/GraphComponentsMode" + }, + "moduleNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNode" + }, + "nullable": true + }, + "datasetNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphDatasetNode" + }, + "nullable": true + }, + "subGraphNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphReferenceNode" + }, + "nullable": true + }, + "controlReferenceNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphControlReferenceNode" + }, + "nullable": true + }, + "controlNodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphControlNode" + }, + "nullable": true + }, + "edges": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphEdge" + }, + "nullable": true + }, + "entityInterface": { + "$ref": "#/components/schemas/EntityInterface" + }, + "graphLayout": { + "$ref": "#/components/schemas/GraphLayout" + }, + "createdBy": { + "$ref": "#/components/schemas/CreatedBy" + }, + "lastUpdatedBy": { + "$ref": "#/components/schemas/CreatedBy" + }, + "defaultCompute": { + "$ref": "#/components/schemas/ComputeSetting" + }, + "defaultDatastore": { + "$ref": "#/components/schemas/DatastoreSetting" + }, + "defaultCloudPriority": { + "$ref": "#/components/schemas/CloudPrioritySetting" + }, + "extendedProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "parentSubGraphModuleIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PipelineInput": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InputData" + } + }, + "additionalProperties": false + }, + "PipelineJob": { + "type": "object", + "properties": { + "jobType": { + "$ref": "#/components/schemas/JobType" + }, + "pipelineJobType": { + "$ref": "#/components/schemas/MfeInternalPipelineType" + }, + "pipeline": { + "$ref": "#/components/schemas/Pipeline" + }, + "computeId": { + "type": "string", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "settings": { + "nullable": true + }, + "componentJobs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MfeInternalV20211001ComponentJob" + }, + "description": "This is a dictionary", + "nullable": true + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JobInput" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JobOutput" + }, + "description": "This is a dictionary", + "nullable": true + }, + "bindings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Binding" + }, + "nullable": true + }, + "jobs": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + }, + "inputBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InputDataBinding" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OutputDataBinding" + }, + "description": "This is a dictionary", + "nullable": true + }, + "sourceJobId": { + "type": "string", + "nullable": true + }, + "provisioningState": { + "$ref": "#/components/schemas/JobProvisioningState" + }, + "parentJobName": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "interactionEndpoints": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JobEndpoint" + }, + "nullable": true + }, + "identity": { + "$ref": "#/components/schemas/MfeInternalIdentityConfiguration" + }, + "compute": { + "$ref": "#/components/schemas/ComputeConfiguration" + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "output": { + "$ref": "#/components/schemas/JobOutputArtifacts" + }, + "isArchived": { + "type": "boolean" + }, + "schedule": { + "$ref": "#/components/schemas/ScheduleBase" + }, + "componentId": { + "type": "string", + "nullable": true + }, + "notificationSetting": { + "$ref": "#/components/schemas/NotificationSetting" + }, + "secretsConfiguration": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MfeInternalSecretConfiguration" + }, + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineJobRuntimeBasicSettings": { + "type": "object", + "properties": { + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "pipelineJobName": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "triggerTimeString": { + "type": "string", + "nullable": true + }, + "pipelineParameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataPathAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "assetOutputSettingsAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineJobScheduleDto": { + "type": "object", + "properties": { + "systemData": { + "$ref": "#/components/schemas/SystemData" + }, + "name": { + "type": "string", + "nullable": true + }, + "pipelineJobName": { + "type": "string", + "nullable": true + }, + "pipelineJobRuntimeSettings": { + "$ref": "#/components/schemas/PipelineJobRuntimeBasicSettings" + }, + "displayName": { + "type": "string", + "nullable": true + }, + "triggerType": { + "$ref": "#/components/schemas/TriggerType" + }, + "recurrence": { + "$ref": "#/components/schemas/Recurrence" + }, + "cron": { + "$ref": "#/components/schemas/Cron" + }, + "status": { + "$ref": "#/components/schemas/ScheduleStatus" + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineOutput": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MfeInternalOutputData" + } + }, + "additionalProperties": false + }, + "PipelineRun": { + "type": "object", + "properties": { + "pipelineId": { + "type": "string", + "nullable": true + }, + "runSource": { + "type": "string", + "nullable": true + }, + "runType": { + "$ref": "#/components/schemas/RunType" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataPathAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignment": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "assetOutputSettingsAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "totalSteps": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "userAlias": { + "type": "string", + "nullable": true + }, + "enforceRerun": { + "type": "boolean", + "nullable": true + }, + "continueRunOnFailedOptionalInput": { + "type": "boolean" + }, + "defaultCompute": { + "$ref": "#/components/schemas/ComputeSetting" + }, + "defaultDatastore": { + "$ref": "#/components/schemas/DatastoreSetting" + }, + "defaultCloudPriority": { + "$ref": "#/components/schemas/CloudPrioritySetting" + }, + "pipelineTimeoutSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean" + }, + "identityConfig": { + "$ref": "#/components/schemas/IdentitySetting" + }, + "description": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "runNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "statusCode": { + "$ref": "#/components/schemas/PipelineStatusCode" + }, + "runStatus": { + "$ref": "#/components/schemas/RunStatus" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "graphId": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "isExperimentArchived": { + "type": "boolean", + "nullable": true + }, + "submittedBy": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "stepTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "aetherStartTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "aetherEndTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runHistoryStartTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runHistoryEndTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "uniqueChildRunComputeTargets": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PipelineRunGraphDetail": { + "type": "object", + "properties": { + "graph": { + "$ref": "#/components/schemas/PipelineGraph" + }, + "graphNodesStatus": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/GraphNodeStatusInfo" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineRunGraphStatus": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/PipelineStatus" + }, + "graphNodesStatus": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/GraphNodeStatusInfo" + }, + "description": "This is a dictionary", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "isExperimentArchived": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineRunProfile": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "nullable": true + }, + "nodeId": { + "type": "string", + "nullable": true + }, + "runUrl": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/PipelineRunStatus" + }, + "createTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "startTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "endTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "profilingTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "stepRunsProfile": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepRunProfile" + }, + "nullable": true + }, + "subPipelineRunProfile": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PipelineRunProfile" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineRunStatus": { + "type": "object", + "properties": { + "statusCode": { + "$ref": "#/components/schemas/PipelineRunStatusCode" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "creationTime": { + "type": "string", + "format": "date-time" + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineRunStatusCode": { + "enum": [ + "NotStarted", + "Running", + "Failed", + "Finished", + "Canceled", + "Queued", + "CancelRequested" + ], + "type": "string" + }, + "PipelineRunStepDetails": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "nullable": true + }, + "target": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/RunStatus" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "parentRunId": { + "type": "string", + "nullable": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "isReused": { + "type": "boolean", + "nullable": true + }, + "logs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "snapshotInfo": { + "$ref": "#/components/schemas/SnapshotInfo" + }, + "inputDatasets": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetLineage" + }, + "nullable": true + }, + "outputDatasets": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/OutputDatasetLineage" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineRunSummary": { + "type": "object", + "properties": { + "description": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "runNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "statusCode": { + "$ref": "#/components/schemas/PipelineStatusCode" + }, + "runStatus": { + "$ref": "#/components/schemas/RunStatus" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "graphId": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "isExperimentArchived": { + "type": "boolean", + "nullable": true + }, + "submittedBy": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "stepTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "aetherStartTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "aetherEndTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runHistoryStartTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runHistoryEndTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "uniqueChildRunComputeTargets": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PipelineStatus": { + "type": "object", + "properties": { + "statusCode": { + "$ref": "#/components/schemas/PipelineStatusCode" + }, + "runStatus": { + "$ref": "#/components/schemas/RunStatus" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "isTerminalState": { + "type": "boolean", + "readOnly": true + } + }, + "additionalProperties": false + }, + "PipelineStatusCode": { + "enum": [ + "NotStarted", + "InDraft", + "Preparing", + "Running", + "Failed", + "Finished", + "Canceled", + "Throttled", + "Unknown" + ], + "type": "string" + }, + "PipelineStepRun": { + "type": "object", + "properties": { + "stepName": { + "type": "string", + "nullable": true + }, + "runNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runStatus": { + "$ref": "#/components/schemas/RunStatus" + }, + "computeTarget": { + "type": "string", + "nullable": true + }, + "computeType": { + "type": "string", + "nullable": true + }, + "runType": { + "type": "string", + "nullable": true + }, + "stepType": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "isReused": { + "type": "boolean", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineStepRunOutputs": { + "type": "object", + "properties": { + "outputs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "portOutputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PortOutputInfo" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "PipelineSubDraft": { + "type": "object", + "properties": { + "parentGraphDraftId": { + "type": "string", + "nullable": true + }, + "parentNodeId": { + "type": "string", + "nullable": true + }, + "graphDetail": { + "$ref": "#/components/schemas/PipelineRunGraphDetail" + }, + "moduleDto": { + "$ref": "#/components/schemas/ModuleDto" + }, + "name": { + "type": "string", + "nullable": true + }, + "lastEditedBy": { + "type": "string", + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "pipelineType": { + "$ref": "#/components/schemas/PipelineType" + }, + "pipelineDraftMode": { + "$ref": "#/components/schemas/PipelineDraftMode" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PipelineType": { + "enum": [ + "TrainingPipeline", + "RealTimeInferencePipeline", + "BatchInferencePipeline", + "Unknown" + ], + "type": "string" + }, + "PolicyValidationResponse": { + "type": "object", + "properties": { + "errorResponse": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "nextActionIntervalInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "actionType": { + "$ref": "#/components/schemas/ActionType" + } + }, + "additionalProperties": false + }, + "PortAction": { + "enum": [ + "Promote", + "ViewInDataStore", + "Visualize", + "GetSchema", + "CreateInferenceGraph", + "RegisterModel", + "PromoteAsTabular" + ], + "type": "string" + }, + "PortInfo": { + "type": "object", + "properties": { + "nodeId": { + "type": "string", + "nullable": true + }, + "portName": { + "type": "string", + "nullable": true + }, + "graphPortName": { + "type": "string", + "nullable": true + }, + "isParameter": { + "type": "boolean" + }, + "webServicePort": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PortOutputInfo": { + "type": "object", + "properties": { + "containerUri": { + "type": "string", + "format": "uri", + "nullable": true + }, + "relativePath": { + "type": "string", + "nullable": true + }, + "previewParams": { + "type": "string", + "nullable": true + }, + "modelOutputPath": { + "type": "string", + "nullable": true + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "dataReferenceType": { + "$ref": "#/components/schemas/DataReferenceType" + }, + "isFile": { + "type": "boolean" + }, + "supportedActions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortAction" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "PrimaryMetrics": { + "enum": [ + "AUCWeighted", + "Accuracy", + "NormMacroRecall", + "AveragePrecisionScoreWeighted", + "PrecisionScoreWeighted", + "SpearmanCorrelation", + "NormalizedRootMeanSquaredError", + "R2Score", + "NormalizedMeanAbsoluteError", + "NormalizedRootMeanSquaredLogError", + "MeanAveragePrecision", + "Iou" + ], + "type": "string" + }, + "PriorityConfig": { + "type": "object", + "properties": { + "jobPriority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "isPreemptible": { + "type": "boolean", + "nullable": true + }, + "nodeCountSet": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "scaleInterval": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "PriorityConfiguration": { + "type": "object", + "properties": { + "cloudPriority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "stringTypePriority": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PromoteDataSetRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "moduleNodeId": { + "type": "string", + "nullable": true + }, + "stepRunId": { + "type": "string", + "nullable": true + }, + "outputPortName": { + "type": "string", + "nullable": true + }, + "modelOutputPath": { + "type": "string", + "nullable": true + }, + "dataTypeId": { + "type": "string", + "nullable": true + }, + "datasetType": { + "type": "string", + "nullable": true + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "outputRelativePath": { + "type": "string", + "nullable": true + }, + "pipelineRunId": { + "type": "string", + "nullable": true + }, + "rootPipelineRunId": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PromptflowEngineType": { + "enum": [ + "FastEngine", + "ScalableEngine" + ], + "type": "string" + }, + "ProviderEntity": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "nullable": true + }, + "module": { + "type": "string", + "nullable": true + }, + "connection_type": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionType" + }, + "nullable": true + }, + "apis": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApiAndParameters" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ProvisioningState": { + "enum": [ + "Unknown", + "Updating", + "Creating", + "Deleting", + "Accepted", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string" + }, + "PublishedPipeline": { + "type": "object", + "properties": { + "totalRunSteps": { + "type": "integer", + "format": "int32" + }, + "totalRuns": { + "type": "integer", + "format": "int32" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignment": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "restEndpoint": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "graphId": { + "type": "string", + "nullable": true + }, + "publishedDate": { + "type": "string", + "format": "date-time" + }, + "lastRunTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastRunStatus": { + "$ref": "#/components/schemas/PipelineRunStatusCode" + }, + "publishedBy": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "isDefault": { + "type": "boolean", + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PublishedPipelineSummary": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "graphId": { + "type": "string", + "nullable": true + }, + "publishedDate": { + "type": "string", + "format": "date-time" + }, + "lastRunTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastRunStatus": { + "$ref": "#/components/schemas/PipelineRunStatusCode" + }, + "publishedBy": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "isDefault": { + "type": "boolean", + "nullable": true + }, + "entityStatus": { + "$ref": "#/components/schemas/EntityStatus" + }, + "id": { + "type": "string", + "nullable": true + }, + "etag": { + "type": "string", + "nullable": true + }, + "createdDate": { + "type": "string", + "format": "date-time" + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PyTorchConfiguration": { + "type": "object", + "properties": { + "communicationBackend": { + "type": "string", + "nullable": true + }, + "processCount": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "PythonInterfaceMapping": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "nameInYaml": { + "type": "string", + "nullable": true + }, + "argumentName": { + "type": "string", + "nullable": true + }, + "commandLineOption": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PythonPyPiOrRCranLibraryDto": { + "type": "object", + "properties": { + "package": { + "type": "string", + "nullable": true + }, + "repo": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PythonSection": { + "type": "object", + "properties": { + "interpreterPath": { + "type": "string", + "nullable": true + }, + "userManagedDependencies": { + "type": "boolean" + }, + "condaDependencies": { + "nullable": true + }, + "baseCondaEnvironment": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "QueueingInfo": { + "type": "object", + "properties": { + "code": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + }, + "lastRefreshTimestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "RCranPackage": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "repository": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RGitHubPackage": { + "type": "object", + "properties": { + "repository": { + "type": "string", + "nullable": true + }, + "authToken": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RSection": { + "type": "object", + "properties": { + "rVersion": { + "type": "string", + "nullable": true + }, + "userManaged": { + "type": "boolean" + }, + "rscriptPath": { + "type": "string", + "nullable": true + }, + "snapshotDate": { + "type": "string", + "nullable": true + }, + "cranPackages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RCranPackage" + }, + "nullable": true + }, + "gitHubPackages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RGitHubPackage" + }, + "nullable": true + }, + "customUrlPackages": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "bioConductorPackages": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RawComponentDto": { + "type": "object", + "properties": { + "componentSchema": { + "type": "string", + "nullable": true + }, + "isAnonymous": { + "type": "boolean" + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ComponentType" + }, + "componentTypeVersion": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "isDeterministic": { + "type": "boolean" + }, + "successfulReturnCode": { + "type": "string", + "nullable": true + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComponentInput" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComponentOutput" + }, + "description": "This is a dictionary", + "nullable": true + }, + "command": { + "type": "string", + "nullable": true + }, + "environmentName": { + "type": "string", + "nullable": true + }, + "environmentVersion": { + "type": "string", + "nullable": true + }, + "snapshotId": { + "type": "string", + "nullable": true + }, + "createdBy": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "lastModifiedBy": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "createdDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastModifiedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "componentInternalId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RayConfiguration": { + "type": "object", + "properties": { + "port": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "address": { + "type": "string", + "nullable": true + }, + "includeDashboard": { + "type": "boolean", + "nullable": true + }, + "dashboardPort": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "headNodeAdditionalArgs": { + "type": "string", + "nullable": true + }, + "workerNodeAdditionalArgs": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RealTimeEndpoint": { + "type": "object", + "properties": { + "createdBy": { + "type": "string", + "nullable": true + }, + "kvTags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "state": { + "$ref": "#/components/schemas/WebServiceState" + }, + "error": { + "$ref": "#/components/schemas/ModelManagementErrorResponse" + }, + "computeType": { + "$ref": "#/components/schemas/ComputeEnvironmentType" + }, + "imageId": { + "type": "string", + "nullable": true + }, + "cpu": { + "type": "number", + "format": "double", + "nullable": true + }, + "memoryInGB": { + "type": "number", + "format": "double", + "nullable": true + }, + "maxConcurrentRequestsPerContainer": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "numReplicas": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "eventHubEnabled": { + "type": "boolean", + "nullable": true + }, + "storageEnabled": { + "type": "boolean", + "nullable": true + }, + "appInsightsEnabled": { + "type": "boolean", + "nullable": true + }, + "autoScaleEnabled": { + "type": "boolean", + "nullable": true + }, + "minReplicas": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxReplicas": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "targetUtilization": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "refreshPeriodInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "scoringUri": { + "type": "string", + "format": "uri", + "nullable": true + }, + "deploymentStatus": { + "$ref": "#/components/schemas/AKSReplicaStatus" + }, + "scoringTimeoutMs": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "authEnabled": { + "type": "boolean", + "nullable": true + }, + "aadAuthEnabled": { + "type": "boolean", + "nullable": true + }, + "region": { + "type": "string", + "nullable": true + }, + "primaryKey": { + "type": "string", + "nullable": true + }, + "secondaryKey": { + "type": "string", + "nullable": true + }, + "swaggerUri": { + "type": "string", + "format": "uri", + "nullable": true + }, + "linkedPipelineDraftId": { + "type": "string", + "nullable": true + }, + "linkedPipelineRunId": { + "type": "string", + "nullable": true + }, + "warning": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "createdTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updatedTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "updatedBy": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RealTimeEndpointInfo": { + "type": "object", + "properties": { + "webServiceInputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebServicePort" + }, + "nullable": true + }, + "webServiceOutputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebServicePort" + }, + "nullable": true + }, + "deploymentsInfo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeploymentInfo" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RealTimeEndpointInternalStepCode": { + "enum": [ + "AboutToDeploy", + "WaitAksComputeReady", + "RegisterModels", + "CreateServiceFromModels", + "UpdateServiceFromModels", + "WaitServiceCreating", + "FetchServiceRelatedInfo", + "TestWithSampleData", + "AboutToDelete", + "DeleteDeployment", + "DeleteAsset", + "DeleteImage", + "DeleteModel", + "DeleteServiceRecord" + ], + "type": "string" + }, + "RealTimeEndpointOpCode": { + "enum": [ + "Create", + "Update", + "Delete" + ], + "type": "string" + }, + "RealTimeEndpointOpStatusCode": { + "enum": [ + "Ongoing", + "Succeeded", + "Failed", + "SucceededWithWarning" + ], + "type": "string" + }, + "RealTimeEndpointStatus": { + "type": "object", + "properties": { + "lastOperation": { + "$ref": "#/components/schemas/RealTimeEndpointOpCode" + }, + "lastOperationStatus": { + "$ref": "#/components/schemas/RealTimeEndpointOpStatusCode" + }, + "internalStep": { + "$ref": "#/components/schemas/RealTimeEndpointInternalStepCode" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "deploymentState": { + "type": "string", + "nullable": true + }, + "serviceId": { + "type": "string", + "nullable": true + }, + "linkedPipelineDraftId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RealTimeEndpointSummary": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "createdTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updatedTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "computeType": { + "$ref": "#/components/schemas/ComputeEnvironmentType" + }, + "computeName": { + "type": "string", + "nullable": true + }, + "updatedBy": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RealTimeEndpointTestRequest": { + "type": "object", + "properties": { + "endPoint": { + "type": "string", + "nullable": true + }, + "authKey": { + "type": "string", + "nullable": true + }, + "payload": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Recurrence": { + "type": "object", + "properties": { + "frequency": { + "$ref": "#/components/schemas/Frequency" + }, + "interval": { + "type": "integer", + "format": "int32" + }, + "schedule": { + "$ref": "#/components/schemas/RecurrenceSchedule" + }, + "endTime": { + "type": "string", + "nullable": true + }, + "startTime": { + "type": "string", + "nullable": true + }, + "timeZone": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RecurrenceFrequency": { + "enum": [ + "Minute", + "Hour", + "Day", + "Week", + "Month" + ], + "type": "string" + }, + "RecurrencePattern": { + "type": "object", + "properties": { + "hours": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "minutes": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "weekdays": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Weekday" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RecurrenceSchedule": { + "type": "object", + "properties": { + "hours": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "minutes": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + }, + "weekDays": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WeekDays" + }, + "nullable": true + }, + "monthDays": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RegenerateServiceKeysRequest": { + "type": "object", + "properties": { + "keyType": { + "$ref": "#/components/schemas/KeyType" + }, + "keyValue": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RegisterComponentMetaInfo": { + "type": "object", + "properties": { + "amlModuleName": { + "type": "string", + "nullable": true + }, + "nameOnlyDisplayInfo": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "moduleVersionId": { + "type": "string", + "nullable": true + }, + "snapshotId": { + "type": "string", + "nullable": true + }, + "componentRegistrationType": { + "$ref": "#/components/schemas/ComponentRegistrationTypeEnum" + }, + "moduleEntityFromYaml": { + "$ref": "#/components/schemas/ModuleEntity" + }, + "setAsDefaultVersion": { + "type": "boolean" + }, + "dataTypesFromYaml": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataTypeCreationInfo" + }, + "nullable": true + }, + "dataTypeMechanism": { + "$ref": "#/components/schemas/DataTypeMechanism" + }, + "identifierHash": { + "type": "string", + "nullable": true + }, + "identifierHashes": { + "type": "object", + "properties": { + "IdentifierHash": { + "type": "string" + }, + "IdentifierHashV2": { + "type": "string" + } + }, + "additionalProperties": false, + "nullable": true + }, + "contentHash": { + "type": "string", + "nullable": true + }, + "extraHash": { + "type": "string", + "nullable": true + }, + "extraHashes": { + "type": "object", + "properties": { + "IdentifierHash": { + "type": "string" + }, + "IdentifierHashV2": { + "type": "string" + } + }, + "additionalProperties": false, + "nullable": true + }, + "registration": { + "type": "boolean", + "nullable": true + }, + "validateOnly": { + "type": "boolean" + }, + "skipWorkspaceRelatedCheck": { + "type": "boolean" + }, + "intellectualPropertyProtectedWorkspaceComponentRegistrationAllowedPublisher": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "systemManagedRegistration": { + "type": "boolean" + }, + "allowDupNameBetweenInputAndOuputPort": { + "type": "boolean" + }, + "moduleSource": { + "type": "string", + "nullable": true + }, + "moduleScope": { + "type": "string", + "nullable": true + }, + "moduleAdditionalIncludesCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "moduleOSType": { + "type": "string", + "nullable": true + }, + "moduleCodegenBy": { + "type": "string", + "nullable": true + }, + "moduleClientSource": { + "type": "string", + "nullable": true + }, + "moduleIsBuiltin": { + "type": "boolean" + }, + "moduleRegisterEventExtensionFields": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RegisterRegistryComponentMetaInfo": { + "type": "object", + "properties": { + "registryName": { + "type": "string", + "nullable": true + }, + "intellectualPropertyPublisherInformation": { + "$ref": "#/components/schemas/IntellectualPropertyPublisherInformation" + }, + "blobReferenceData": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RegistryBlobReferenceData" + }, + "description": "This is a dictionary", + "nullable": true + }, + "amlModuleName": { + "type": "string", + "nullable": true + }, + "nameOnlyDisplayInfo": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "moduleVersionId": { + "type": "string", + "nullable": true + }, + "snapshotId": { + "type": "string", + "nullable": true + }, + "componentRegistrationType": { + "$ref": "#/components/schemas/ComponentRegistrationTypeEnum" + }, + "moduleEntityFromYaml": { + "$ref": "#/components/schemas/ModuleEntity" + }, + "setAsDefaultVersion": { + "type": "boolean" + }, + "dataTypesFromYaml": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataTypeCreationInfo" + }, + "nullable": true + }, + "dataTypeMechanism": { + "$ref": "#/components/schemas/DataTypeMechanism" + }, + "identifierHash": { + "type": "string", + "nullable": true + }, + "identifierHashes": { + "type": "object", + "properties": { + "IdentifierHash": { + "type": "string" + }, + "IdentifierHashV2": { + "type": "string" + } + }, + "additionalProperties": false, + "nullable": true + }, + "contentHash": { + "type": "string", + "nullable": true + }, + "extraHash": { + "type": "string", + "nullable": true + }, + "extraHashes": { + "type": "object", + "properties": { + "IdentifierHash": { + "type": "string" + }, + "IdentifierHashV2": { + "type": "string" + } + }, + "additionalProperties": false, + "nullable": true + }, + "registration": { + "type": "boolean", + "nullable": true + }, + "validateOnly": { + "type": "boolean" + }, + "skipWorkspaceRelatedCheck": { + "type": "boolean" + }, + "intellectualPropertyProtectedWorkspaceComponentRegistrationAllowedPublisher": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "systemManagedRegistration": { + "type": "boolean" + }, + "allowDupNameBetweenInputAndOuputPort": { + "type": "boolean" + }, + "moduleSource": { + "type": "string", + "nullable": true + }, + "moduleScope": { + "type": "string", + "nullable": true + }, + "moduleAdditionalIncludesCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "moduleOSType": { + "type": "string", + "nullable": true + }, + "moduleCodegenBy": { + "type": "string", + "nullable": true + }, + "moduleClientSource": { + "type": "string", + "nullable": true + }, + "moduleIsBuiltin": { + "type": "boolean" + }, + "moduleRegisterEventExtensionFields": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RegisteredDataSetReference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RegistrationOptions": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "datasetRegistrationOptions": { + "$ref": "#/components/schemas/DatasetRegistrationOptions" + } + }, + "additionalProperties": false + }, + "RegistryBlobReferenceData": { + "type": "object", + "properties": { + "dataReferenceId": { + "type": "string", + "nullable": true + }, + "data": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RegistryIdentity": { + "type": "object", + "properties": { + "resourceId": { + "type": "string", + "nullable": true + }, + "clientId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Relationship": { + "type": "object", + "properties": { + "relationType": { + "type": "string", + "nullable": true + }, + "targetEntityId": { + "type": "string", + "nullable": true + }, + "assetId": { + "type": "string", + "nullable": true + }, + "entityType": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "direction": { + "type": "string", + "nullable": true + }, + "entityContainerId": { + "type": "string", + "nullable": true, + "readOnly": true + } + } + }, + "RemoteDockerComputeInfo": { + "type": "object", + "properties": { + "address": { + "type": "string", + "nullable": true + }, + "username": { + "type": "string", + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + }, + "privateKey": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ResourceConfig": { + "type": "object", + "properties": { + "gpuCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "cpuCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "memoryRequestInGB": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "ResourceConfiguration": { + "type": "object", + "properties": { + "gpuCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "cpuCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "memoryRequestInGB": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "ResourcesSetting": { + "type": "object", + "properties": { + "instanceSize": { + "type": "string", + "nullable": true + }, + "sparkVersion": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ResumeBulkRunRequest": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "nullable": true + }, + "runDisplayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "resumeFromRunId": { + "type": "string", + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "enableMultiContainer": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "RetrieveToolFuncResultRequest": { + "type": "object", + "properties": { + "func_path": { + "type": "string", + "nullable": true + }, + "func_kwargs": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + }, + "func_call_scenario": { + "$ref": "#/components/schemas/ToolFuncCallScenario" + } + }, + "additionalProperties": false + }, + "RetryConfiguration": { + "type": "object", + "properties": { + "maxRetryCount": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "RootError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The service-defined error code. Supported error codes: ServiceError, UserError, ValidationError, AzureStorageError, TransientError, RequestThrottled.", + "nullable": true + }, + "severity": { + "type": "integer", + "description": "The Severity of error", + "format": "int32", + "nullable": true + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error.", + "nullable": true + }, + "messageFormat": { + "type": "string", + "description": "An unformatted version of the message with no variable substitution.", + "nullable": true + }, + "messageParameters": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Value substitutions corresponding to the contents of MessageFormat.", + "nullable": true + }, + "referenceCode": { + "type": "string", + "description": "This code can optionally be set by the system generating the error.\r\nIt should be used to classify the problem and identify the module and code area where the failure occured.", + "nullable": true + }, + "detailsUri": { + "type": "string", + "description": "A URI which points to more details about the context of the error.", + "format": "uri", + "nullable": true + }, + "target": { + "type": "string", + "description": "The target of the error (e.g., the name of the property in error).", + "nullable": true + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RootError" + }, + "description": "The related errors that occurred during the request.", + "nullable": true + }, + "innerError": { + "$ref": "#/components/schemas/InnerErrorResponse" + }, + "additionalInfo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorAdditionalInfo" + }, + "description": "The error additional info.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "The root error." + }, + "RunAnnotations": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "primaryMetricName": { + "type": "string", + "nullable": true + }, + "estimatedCost": { + "type": "number", + "format": "double", + "nullable": true + }, + "primaryMetricSummary": { + "$ref": "#/components/schemas/RunIndexMetricSummary" + }, + "metrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/RunIndexMetricSummarySystemObject" + }, + "nullable": true + }, + "parameters": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "settings": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "modifiedTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "retainForLifetimeOfWorkspace": { + "type": "boolean", + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/IndexedErrorResponse" + }, + "resourceMetricSummary": { + "$ref": "#/components/schemas/RunIndexResourceMetricSummary" + }, + "jobCost": { + "$ref": "#/components/schemas/JobCost" + }, + "computeDuration": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "computeDurationMilliseconds": { + "type": "number", + "format": "double", + "nullable": true + }, + "effectiveStartTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "archived": { + "type": "boolean" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + } + }, + "RunCommandsCommandResult": { + "type": "object", + "properties": { + "command": { + "type": "string", + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "exit_code": { + "type": "integer", + "format": "int32" + }, + "stdout": { + "type": "string", + "nullable": true + }, + "stderr": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunConfiguration": { + "type": "object", + "properties": { + "script": { + "type": "string", + "nullable": true + }, + "scriptType": { + "$ref": "#/components/schemas/ScriptType" + }, + "command": { + "type": "string", + "nullable": true + }, + "useAbsolutePath": { + "type": "boolean" + }, + "arguments": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "framework": { + "$ref": "#/components/schemas/Framework" + }, + "communicator": { + "$ref": "#/components/schemas/Communicator" + }, + "target": { + "type": "string", + "nullable": true + }, + "autoClusterComputeSpecification": { + "$ref": "#/components/schemas/AutoClusterComputeSpecification" + }, + "dataReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataReferenceConfiguration" + }, + "nullable": true + }, + "data": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Data" + }, + "nullable": true + }, + "inputAssets": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InputAsset" + }, + "nullable": true + }, + "outputData": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OutputData" + }, + "nullable": true + }, + "datacaches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatacacheConfiguration" + }, + "nullable": true + }, + "jobName": { + "type": "string", + "nullable": true + }, + "maxRunDurationSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "nodeCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxNodeCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "instanceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "credentialPassthrough": { + "type": "boolean" + }, + "identity": { + "$ref": "#/components/schemas/IdentityConfiguration" + }, + "environment": { + "$ref": "#/components/schemas/EnvironmentDefinition" + }, + "history": { + "$ref": "#/components/schemas/HistoryConfiguration" + }, + "spark": { + "$ref": "#/components/schemas/SparkConfiguration" + }, + "parallelTask": { + "$ref": "#/components/schemas/ParallelTaskConfiguration" + }, + "tensorflow": { + "$ref": "#/components/schemas/TensorflowConfiguration" + }, + "mpi": { + "$ref": "#/components/schemas/MpiConfiguration" + }, + "pyTorch": { + "$ref": "#/components/schemas/PyTorchConfiguration" + }, + "ray": { + "$ref": "#/components/schemas/RayConfiguration" + }, + "hdi": { + "$ref": "#/components/schemas/HdiConfiguration" + }, + "docker": { + "$ref": "#/components/schemas/DockerConfiguration" + }, + "commandReturnCodeConfig": { + "$ref": "#/components/schemas/CommandReturnCodeConfig" + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "applicationEndpoints": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ApplicationEndpointConfiguration" + }, + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterDefinition" + }, + "nullable": true + }, + "autologgerSettings": { + "$ref": "#/components/schemas/AutologgerSettings" + }, + "dataBricks": { + "$ref": "#/components/schemas/DatabricksConfiguration" + }, + "trainingDiagnosticConfig": { + "$ref": "#/components/schemas/TrainingDiagnosticConfiguration" + }, + "secretsConfiguration": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SecretConfiguration" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RunDatasetReference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunDefinition": { + "type": "object", + "properties": { + "configuration": { + "$ref": "#/components/schemas/RunConfiguration" + }, + "snapshotId": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "snapshots": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Snapshot" + }, + "nullable": true + }, + "parentRunId": { + "type": "string", + "nullable": true + }, + "runType": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "environmentAssetId": { + "type": "string", + "nullable": true + }, + "primaryMetricName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "cancelReason": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RunDetailsDto": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "nullable": true + }, + "runUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "parentRunUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "rootRunUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "target": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "parentRunId": { + "type": "string", + "nullable": true + }, + "dataContainerId": { + "type": "string", + "nullable": true + }, + "createdTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "startTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunDetailsWarningDto" + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "parameters": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EndpointSetting" + }, + "description": "This is a dictionary", + "nullable": true + }, + "inputDatasets": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetLineage" + }, + "nullable": true + }, + "outputDatasets": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/OutputDatasetLineage" + }, + "nullable": true + }, + "runDefinition": { + "nullable": true + }, + "logFiles": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "jobCost": { + "$ref": "#/components/schemas/JobCost" + }, + "revision": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "runTypeV2": { + "$ref": "#/components/schemas/RunTypeV2" + }, + "settings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "computeRequest": { + "$ref": "#/components/schemas/ComputeRequest" + }, + "compute": { + "$ref": "#/components/schemas/Compute" + }, + "createdBy": { + "$ref": "#/components/schemas/User" + }, + "computeDuration": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "effectiveStartTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "runNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "rootRunId": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "userId": { + "type": "string", + "nullable": true + }, + "statusRevision": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "currentComputeTime": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "lastStartTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastModifiedBy": { + "$ref": "#/components/schemas/User" + }, + "lastModifiedUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TypedAssetReference" + }, + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TypedAssetReference" + }, + "nullable": true + }, + "currentAttemptId": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunDetailsWarningDto": { + "type": "object", + "properties": { + "source": { + "type": "string", + "nullable": true + }, + "message": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunDisplayNameGenerationType": { + "enum": [ + "AutoAppend", + "UserProvidedMacro" + ], + "type": "string" + }, + "RunDto": { + "type": "object", + "properties": { + "runNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "rootRunId": { + "type": "string", + "nullable": true + }, + "createdUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdBy": { + "$ref": "#/components/schemas/User" + }, + "userId": { + "type": "string", + "nullable": true + }, + "token": { + "type": "string", + "nullable": true + }, + "tokenExpiryTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "warnings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunDetailsWarningDto" + }, + "nullable": true + }, + "revision": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "statusRevision": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "runUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "parentRunUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "rootRunUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "lastStartTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "currentComputeTime": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "computeDuration": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "effectiveStartTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastModifiedBy": { + "$ref": "#/components/schemas/User" + }, + "lastModifiedUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "cancelationReason": { + "type": "string", + "nullable": true + }, + "currentAttemptId": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "parentRunId": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "startTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTimeUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "scheduleId": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "dataContainerId": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "hidden": { + "type": "boolean", + "nullable": true + }, + "runType": { + "type": "string", + "nullable": true + }, + "runTypeV2": { + "$ref": "#/components/schemas/RunTypeV2" + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "parameters": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "nullable": true + }, + "actionUris": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "scriptName": { + "type": "string", + "nullable": true + }, + "target": { + "type": "string", + "nullable": true + }, + "uniqueChildRunComputeTargets": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "settings": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "services": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EndpointSetting" + }, + "nullable": true + }, + "inputDatasets": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetLineage" + }, + "nullable": true + }, + "outputDatasets": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/OutputDatasetLineage" + }, + "nullable": true + }, + "runDefinition": { + "nullable": true + }, + "jobSpecification": { + "nullable": true + }, + "primaryMetricName": { + "type": "string", + "nullable": true + }, + "createdFrom": { + "$ref": "#/components/schemas/CreatedFromDto" + }, + "cancelUri": { + "type": "string", + "nullable": true + }, + "completeUri": { + "type": "string", + "nullable": true + }, + "diagnosticsUri": { + "type": "string", + "nullable": true + }, + "computeRequest": { + "$ref": "#/components/schemas/ComputeRequest" + }, + "compute": { + "$ref": "#/components/schemas/Compute" + }, + "retainForLifetimeOfWorkspace": { + "type": "boolean", + "nullable": true + }, + "queueingInfo": { + "$ref": "#/components/schemas/QueueingInfo" + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TypedAssetReference" + }, + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TypedAssetReference" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "RunIndexEntity": { + "type": "object", + "properties": { + "schemaId": { + "type": "string", + "nullable": true + }, + "entityId": { + "type": "string", + "nullable": true + }, + "kind": { + "$ref": "#/components/schemas/EntityKind" + }, + "annotations": { + "$ref": "#/components/schemas/RunAnnotations" + }, + "properties": { + "$ref": "#/components/schemas/RunProperties" + }, + "internal": { + "$ref": "#/components/schemas/ExtensibleObject" + }, + "updateSequence": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "entityContainerId": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "entityObjectId": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "resourceType": { + "type": "string", + "nullable": true, + "readOnly": true + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Relationship" + }, + "nullable": true + }, + "assetId": { + "type": "string", + "nullable": true + }, + "usage": { + "$ref": "#/components/schemas/EntityUsage" + }, + "isAFragment": { + "type": "boolean" + }, + "fragmentId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunIndexMetricSummary": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int64" + }, + "lastValue": { + "nullable": true + }, + "minimumValue": { + "nullable": true + }, + "maximumValue": { + "nullable": true + }, + "metricType": { + "type": "string", + "nullable": true + } + } + }, + "RunIndexMetricSummarySystemObject": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int64" + }, + "lastValue": { + "nullable": true + }, + "minimumValue": { + "nullable": true + }, + "maximumValue": { + "nullable": true + }, + "metricType": { + "type": "string", + "nullable": true + } + } + }, + "RunIndexResourceMetricSummary": { + "type": "object", + "properties": { + "gpuUtilizationPercentLastHour": { + "type": "number", + "format": "double", + "nullable": true + }, + "gpuMemoryUtilizationPercentLastHour": { + "type": "number", + "format": "double", + "nullable": true + }, + "gpuEnergyJoules": { + "type": "number", + "format": "double", + "nullable": true + }, + "resourceMetricNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + } + }, + "RunMetricDto": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "nullable": true + }, + "metricId": { + "type": "string", + "format": "uuid" + }, + "dataContainerId": { + "type": "string", + "nullable": true + }, + "metricType": { + "type": "string", + "nullable": true + }, + "createdUtc": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "numCells": { + "type": "integer", + "format": "int32" + }, + "dataLocation": { + "type": "string", + "nullable": true + }, + "cells": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "schema": { + "$ref": "#/components/schemas/MetricSchemaDto" + } + }, + "additionalProperties": false + }, + "RunMetricsTypesDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunProperties": { + "type": "object", + "properties": { + "dataContainerId": { + "type": "string", + "nullable": true + }, + "targetName": { + "type": "string", + "nullable": true + }, + "runName": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "parentRunId": { + "type": "string", + "nullable": true + }, + "rootRunId": { + "type": "string", + "nullable": true + }, + "runType": { + "type": "string", + "nullable": true + }, + "runTypeV2": { + "$ref": "#/components/schemas/RunTypeV2Index" + }, + "scriptName": { + "type": "string", + "nullable": true + }, + "experimentId": { + "type": "string", + "nullable": true + }, + "runUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "parentRunUuid": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "runNumber": { + "type": "integer", + "format": "int32" + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "computeRequest": { + "$ref": "#/components/schemas/ComputeRequest" + }, + "compute": { + "$ref": "#/components/schemas/Compute" + }, + "userProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "actionUris": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "duration": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "durationMilliseconds": { + "type": "number", + "format": "double", + "nullable": true + }, + "creationContext": { + "$ref": "#/components/schemas/CreationContext" + } + } + }, + "RunSettingParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "parameterType": { + "$ref": "#/components/schemas/RunSettingParameterType" + }, + "isOptional": { + "type": "boolean", + "nullable": true + }, + "defaultValue": { + "type": "string", + "nullable": true + }, + "lowerBound": { + "type": "string", + "nullable": true + }, + "upperBound": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "runSettingUIHint": { + "$ref": "#/components/schemas/RunSettingUIParameterHint" + }, + "argumentName": { + "type": "string", + "nullable": true + }, + "sectionName": { + "type": "string", + "nullable": true + }, + "sectionDescription": { + "type": "string", + "nullable": true + }, + "sectionArgumentName": { + "type": "string", + "nullable": true + }, + "examples": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enumValues": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enumValuesToArgumentStrings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enabledByParameterName": { + "type": "string", + "nullable": true + }, + "enabledByParameterValues": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "disabledByParameters": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "moduleRunSettingType": { + "$ref": "#/components/schemas/ModuleRunSettingTypes" + }, + "linkedParameterDefaultValueMapping": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "linkedParameterKeyName": { + "type": "string", + "nullable": true + }, + "supportLinkSetting": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "RunSettingParameterAssignment": { + "type": "object", + "properties": { + "useGraphDefaultCompute": { + "type": "boolean", + "nullable": true + }, + "mlcComputeType": { + "type": "string", + "nullable": true + }, + "computeRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "linkedParameterName": { + "type": "string", + "nullable": true + }, + "valueType": { + "$ref": "#/components/schemas/ParameterValueType" + }, + "assignmentsToConcatenate": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "nullable": true + }, + "dataPathAssignment": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "dataSetDefinitionValueAssignment": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunSettingParameterType": { + "enum": [ + "Undefined", + "Int", + "Double", + "Bool", + "String", + "JsonString", + "YamlString", + "StringList" + ], + "type": "string" + }, + "RunSettingUIParameterHint": { + "type": "object", + "properties": { + "uiWidgetType": { + "$ref": "#/components/schemas/RunSettingUIWidgetTypeEnum" + }, + "jsonEditor": { + "$ref": "#/components/schemas/UIJsonEditor" + }, + "yamlEditor": { + "$ref": "#/components/schemas/UIYamlEditor" + }, + "computeSelection": { + "$ref": "#/components/schemas/UIComputeSelection" + }, + "hyperparameterConfiguration": { + "$ref": "#/components/schemas/UIHyperparameterConfiguration" + }, + "uxIgnore": { + "type": "boolean" + }, + "anonymous": { + "type": "boolean" + }, + "supportReset": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "RunSettingUIWidgetTypeEnum": { + "enum": [ + "Default", + "ComputeSelection", + "JsonEditor", + "Mode", + "SearchSpaceParameter", + "SectionToggle", + "YamlEditor", + "EnableRuntimeSweep", + "DataStoreSelection", + "Checkbox", + "MultipleSelection", + "HyperparameterConfiguration", + "JsonTextBox", + "Connection", + "Static" + ], + "type": "string" + }, + "RunStatus": { + "enum": [ + "NotStarted", + "Unapproved", + "Pausing", + "Paused", + "Starting", + "Preparing", + "Queued", + "Running", + "Finalizing", + "CancelRequested", + "Completed", + "Failed", + "Canceled" + ], + "type": "string" + }, + "RunStatusPeriod": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/RunStatus" + }, + "subPeriods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubStatusPeriod" + }, + "nullable": true + }, + "start": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "end": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunType": { + "enum": [ + "HTTP", + "SDK", + "Schedule", + "Portal" + ], + "type": "string" + }, + "RunTypeV2": { + "type": "object", + "properties": { + "orchestrator": { + "type": "string", + "nullable": true + }, + "traits": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "attribution": { + "type": "string", + "nullable": true + }, + "computeType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RunTypeV2Index": { + "type": "object", + "properties": { + "orchestrator": { + "type": "string", + "nullable": true + }, + "traits": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "attribution": { + "type": "string", + "nullable": true + }, + "computeType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RuntimeConfiguration": { + "type": "object", + "properties": { + "baseImage": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "RuntimeStatusEnum": { + "enum": [ + "Unavailable", + "Failed", + "NotExist", + "Starting", + "Stopping" + ], + "type": "string" + }, + "RuntimeType": { + "enum": [ + "ManagedOnlineEndpoint", + "ComputeInstance", + "TrainingSession" + ], + "type": "string" + }, + "SampleMeta": { + "type": "object", + "properties": { + "image": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "docLink": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "feedName": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SamplingAlgorithmType": { + "enum": [ + "Random", + "Grid", + "Bayesian" + ], + "type": "string" + }, + "SavePipelineDraftRequest": { + "type": "object", + "properties": { + "uiWidgetMetaInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UIWidgetMetaInfo" + }, + "nullable": true + }, + "webServiceInputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebServicePort" + }, + "nullable": true + }, + "webServiceOutputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WebServicePort" + }, + "nullable": true + }, + "nodesInDraft": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "pipelineType": { + "$ref": "#/components/schemas/PipelineType" + }, + "pipelineDraftMode": { + "$ref": "#/components/schemas/PipelineDraftMode" + }, + "graphComponentsMode": { + "$ref": "#/components/schemas/GraphComponentsMode" + }, + "subPipelinesInfo": { + "$ref": "#/components/schemas/SubPipelinesInfo" + }, + "flattenedSubGraphs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineSubDraft" + }, + "nullable": true + }, + "pipelineParameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataPathAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "assetOutputSettingsAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "graph": { + "$ref": "#/components/schemas/GraphDraftEntity" + }, + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "moduleNodeRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeRunSetting" + }, + "nullable": true + }, + "moduleNodeUIInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enforceRerun": { + "type": "boolean", + "nullable": true + }, + "datasetAccessModes": { + "$ref": "#/components/schemas/DatasetAccessModes" + } + }, + "additionalProperties": false + }, + "SavedDataSetReference": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ScheduleBase": { + "type": "object", + "properties": { + "scheduleStatus": { + "$ref": "#/components/schemas/MfeInternalScheduleStatus" + }, + "scheduleType": { + "$ref": "#/components/schemas/ScheduleType" + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "timeZone": { + "type": "string", + "nullable": true + }, + "expression": { + "type": "string", + "nullable": true + }, + "frequency": { + "$ref": "#/components/schemas/RecurrenceFrequency" + }, + "interval": { + "type": "integer", + "format": "int32" + }, + "pattern": { + "$ref": "#/components/schemas/RecurrencePattern" + } + }, + "additionalProperties": false + }, + "ScheduleProvisioningStatus": { + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string" + }, + "ScheduleStatus": { + "enum": [ + "Enabled", + "Disabled" + ], + "type": "string" + }, + "ScheduleType": { + "enum": [ + "Cron", + "Recurrence" + ], + "type": "string" + }, + "SchemaContractsCreatedBy": { + "type": "object", + "properties": { + "userObjectId": { + "type": "string", + "nullable": true + }, + "userTenantId": { + "type": "string", + "nullable": true + }, + "userName": { + "type": "string", + "nullable": true + }, + "userPrincipalName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ScopeCloudConfiguration": { + "type": "object", + "properties": { + "inputPathSuffixes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ArgumentAssignment" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputPathSuffixes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ArgumentAssignment" + }, + "description": "This is a dictionary", + "nullable": true + }, + "userAlias": { + "type": "string", + "nullable": true + }, + "tokens": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "autoToken": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "vcp": { + "type": "number", + "format": "float", + "nullable": true + } + }, + "additionalProperties": false + }, + "ScopeType": { + "enum": [ + "Global", + "Tenant", + "Subscription", + "ResourceGroup", + "Workspace" + ], + "type": "string" + }, + "ScriptType": { + "enum": [ + "Python", + "Notebook" + ], + "type": "string" + }, + "Seasonality": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/SeasonalityMode" + }, + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "SeasonalityMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "SecretConfiguration": { + "type": "object", + "properties": { + "workspace_secret_name": { + "type": "string", + "nullable": true + }, + "uri": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SegmentedResult`1": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowIndexEntity" + }, + "nullable": true + }, + "continuationToken": { + "type": "string", + "nullable": true + }, + "count": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "nextLink": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ServiceLogRequest": { + "type": "object", + "properties": { + "logLevel": { + "$ref": "#/components/schemas/LogLevel" + }, + "message": { + "type": "string", + "nullable": true + }, + "timestamp": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "SessionApplication": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "image": { + "type": "string", + "nullable": true + }, + "envVars": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "pythonPipRequirements": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Volume" + }, + "nullable": true + }, + "setupResults": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionApplicationRunCommandResult" + }, + "nullable": true + }, + "port": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "SessionApplicationRunCommandResult": { + "type": "object", + "properties": { + "command": { + "type": "string", + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "exitCode": { + "type": "integer", + "format": "int32" + }, + "stdOut": { + "type": "string", + "nullable": true + }, + "stdErr": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SessionConfigModeEnum": { + "enum": [ + "Default", + "ForceInstallPackage", + "ForceReset" + ], + "type": "string" + }, + "SessionProperties": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "nullable": true + }, + "subscriptionId": { + "type": "string", + "nullable": true + }, + "resourceGroupName": { + "type": "string", + "nullable": true + }, + "workspaceName": { + "type": "string", + "nullable": true + }, + "existingUserComputeInstanceName": { + "type": "string", + "nullable": true + }, + "userObjectId": { + "type": "string", + "nullable": true + }, + "userTenantId": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64" + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SessionApplication" + }, + "nullable": true + }, + "application": { + "$ref": "#/components/schemas/SessionApplication" + }, + "lastAliveTime": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "SessionRuntimeResources": { + "type": "object", + "properties": { + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "enableMultiContainer": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "SessionSetupModeEnum": { + "enum": [ + "ClientWait", + "SystemWait" + ], + "type": "string" + }, + "SetupFlowSessionAction": { + "enum": [ + "Install", + "Reset", + "Update", + "Delete" + ], + "type": "string" + }, + "SetupFlowSessionRequest": { + "type": "object", + "properties": { + "action": { + "$ref": "#/components/schemas/SetupFlowSessionAction" + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "enableMultiContainer": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "SeverityLevel": { + "enum": [ + "Critical", + "Error", + "Warning", + "Info" + ], + "type": "string" + }, + "SharingScope": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ScopeType" + }, + "identifier": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ShortSeriesHandlingConfiguration": { + "enum": [ + "Auto", + "Pad", + "Drop" + ], + "type": "string" + }, + "Snapshot": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "directoryName": { + "type": "string", + "nullable": true + }, + "snapshotAssetId": { + "type": "string", + "nullable": true + }, + "snapshotEntityId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SnapshotInfo": { + "type": "object", + "properties": { + "rootDownloadUrl": { + "type": "string", + "nullable": true + }, + "snapshots": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DownloadResourceInfo" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "SourceCodeDataReference": { + "type": "object", + "properties": { + "dataStoreName": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SparkConfiguration": { + "type": "object", + "properties": { + "configuration": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "archives": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "jars": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "pyFiles": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "sparkPoolResourceId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SparkJarTaskDto": { + "type": "object", + "properties": { + "main_class_name": { + "type": "string", + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SparkJob": { + "type": "object", + "properties": { + "jobType": { + "$ref": "#/components/schemas/JobType" + }, + "resources": { + "$ref": "#/components/schemas/SparkResourceConfiguration" + }, + "args": { + "type": "string", + "nullable": true + }, + "codeId": { + "type": "string", + "nullable": true + }, + "entry": { + "$ref": "#/components/schemas/SparkJobEntry" + }, + "pyFiles": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "jars": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "files": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "archives": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "environmentId": { + "type": "string", + "nullable": true + }, + "inputDataBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InputDataBinding" + }, + "nullable": true + }, + "outputDataBindings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OutputDataBinding" + }, + "nullable": true + }, + "conf": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "provisioningState": { + "$ref": "#/components/schemas/JobProvisioningState" + }, + "parentJobName": { + "type": "string", + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/JobStatus" + }, + "interactionEndpoints": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JobEndpoint" + }, + "nullable": true + }, + "identity": { + "$ref": "#/components/schemas/MfeInternalIdentityConfiguration" + }, + "compute": { + "$ref": "#/components/schemas/ComputeConfiguration" + }, + "priority": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "output": { + "$ref": "#/components/schemas/JobOutputArtifacts" + }, + "isArchived": { + "type": "boolean" + }, + "schedule": { + "$ref": "#/components/schemas/ScheduleBase" + }, + "componentId": { + "type": "string", + "nullable": true + }, + "notificationSetting": { + "$ref": "#/components/schemas/NotificationSetting" + }, + "secretsConfiguration": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MfeInternalSecretConfiguration" + }, + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "SparkJobEntry": { + "type": "object", + "properties": { + "file": { + "type": "string", + "nullable": true + }, + "className": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SparkMavenPackage": { + "type": "object", + "properties": { + "group": { + "type": "string", + "nullable": true + }, + "artifact": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SparkPythonTaskDto": { + "type": "object", + "properties": { + "python_file": { + "type": "string", + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SparkResourceConfiguration": { + "type": "object", + "properties": { + "instanceType": { + "type": "string", + "nullable": true + }, + "runtimeVersion": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SparkSection": { + "type": "object", + "properties": { + "repositories": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "packages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SparkMavenPackage" + }, + "nullable": true + }, + "precachePackages": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "SparkSubmitTaskDto": { + "type": "object", + "properties": { + "parameters": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SqlDataPath": { + "type": "object", + "properties": { + "sqlTableName": { + "type": "string", + "nullable": true + }, + "sqlQuery": { + "type": "string", + "nullable": true + }, + "sqlStoredProcedureName": { + "type": "string", + "nullable": true + }, + "sqlStoredProcedureParams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StoredProcedureParameter" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "StackEnsembleSettings": { + "type": "object", + "properties": { + "stackMetaLearnerType": { + "$ref": "#/components/schemas/StackMetaLearnerType" + }, + "stackMetaLearnerTrainPercentage": { + "type": "number", + "format": "double", + "nullable": true + }, + "stackMetaLearnerKWargs": { + "nullable": true + } + }, + "additionalProperties": false + }, + "StackMetaLearnerType": { + "enum": [ + "None", + "LogisticRegression", + "LogisticRegressionCV", + "LightGBMClassifier", + "ElasticNet", + "ElasticNetCV", + "LightGBMRegressor", + "LinearRegression" + ], + "type": "string" + }, + "StandbyPoolProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "count": { + "type": "integer", + "format": "int32" + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "standbyAvailableInstances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StandbyPoolResourceStatus" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "StandbyPoolResourceStatus": { + "type": "object", + "properties": { + "status": { + "type": "string", + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/CloudError" + } + }, + "additionalProperties": false + }, + "StartRunResult": { + "required": [ + "runId" + ], + "type": "object", + "properties": { + "runId": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "StepRunProfile": { + "type": "object", + "properties": { + "stepRunId": { + "type": "string", + "nullable": true + }, + "stepRunNumber": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "runUrl": { + "type": "string", + "nullable": true + }, + "computeTarget": { + "type": "string", + "nullable": true + }, + "computeTargetUrl": { + "type": "string", + "nullable": true + }, + "nodeId": { + "type": "string", + "nullable": true + }, + "nodeName": { + "type": "string", + "nullable": true + }, + "stepName": { + "type": "string", + "nullable": true + }, + "createTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "startTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "endTime": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/RunStatus" + }, + "statusDetail": { + "type": "string", + "nullable": true + }, + "isReused": { + "type": "boolean" + }, + "reusedPipelineRunId": { + "type": "string", + "nullable": true + }, + "reusedStepRunId": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "statusTimeline": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunStatusPeriod" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "StorageAuthType": { + "enum": [ + "MSI", + "ConnectionString", + "SAS" + ], + "type": "string" + }, + "StorageInfo": { + "type": "object", + "properties": { + "storageAuthType": { + "$ref": "#/components/schemas/StorageAuthType" + }, + "connectionString": { + "type": "string", + "nullable": true + }, + "sasToken": { + "type": "string", + "nullable": true + }, + "accountName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "StoredProcedureParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/StoredProcedureParameterType" + } + }, + "additionalProperties": false + }, + "StoredProcedureParameterType": { + "enum": [ + "String", + "Int", + "Decimal", + "Guid", + "Boolean", + "Date" + ], + "type": "string" + }, + "Stream": { + "type": "object", + "properties": { + "canRead": { + "type": "boolean", + "readOnly": true + }, + "canWrite": { + "type": "boolean", + "readOnly": true + }, + "canSeek": { + "type": "boolean", + "readOnly": true + }, + "canTimeout": { + "type": "boolean", + "readOnly": true + }, + "length": { + "type": "integer", + "format": "int64", + "readOnly": true + }, + "position": { + "type": "integer", + "format": "int64" + }, + "readTimeout": { + "type": "integer", + "format": "int32" + }, + "writeTimeout": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "StructuredInterface": { + "type": "object", + "properties": { + "commandLinePattern": { + "type": "string", + "nullable": true + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StructuredInterfaceInput" + }, + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StructuredInterfaceOutput" + }, + "nullable": true + }, + "controlOutputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ControlOutput" + }, + "nullable": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StructuredInterfaceParameter" + }, + "nullable": true + }, + "metadataParameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StructuredInterfaceParameter" + }, + "nullable": true + }, + "arguments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ArgumentAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "StructuredInterfaceInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "dataTypeIdsList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "isOptional": { + "type": "boolean" + }, + "description": { + "type": "string", + "nullable": true + }, + "skipProcessing": { + "type": "boolean" + }, + "isResource": { + "type": "boolean" + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AEVADataStoreMode" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "overwrite": { + "type": "boolean" + }, + "dataReferenceName": { + "type": "string", + "nullable": true + }, + "datasetTypes": { + "uniqueItems": true, + "type": "array", + "items": { + "$ref": "#/components/schemas/DatasetType" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "StructuredInterfaceOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "dataTypeId": { + "type": "string", + "nullable": true + }, + "passThroughDataTypeInputName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "skipProcessing": { + "type": "boolean" + }, + "IsArtifact": { + "type": "boolean" + }, + "dataStoreName": { + "type": "string", + "nullable": true + }, + "dataStoreMode": { + "$ref": "#/components/schemas/AEVADataStoreMode" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + }, + "overwrite": { + "type": "boolean" + }, + "dataReferenceName": { + "type": "string", + "nullable": true + }, + "trainingOutput": { + "$ref": "#/components/schemas/TrainingOutput" + }, + "datasetOutput": { + "$ref": "#/components/schemas/DatasetOutput" + }, + "AssetOutputSettings": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "EarlyAvailable": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "StructuredInterfaceParameter": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "label": { + "type": "string", + "nullable": true + }, + "parameterType": { + "$ref": "#/components/schemas/ParameterType" + }, + "isOptional": { + "type": "boolean" + }, + "defaultValue": { + "type": "string", + "nullable": true + }, + "lowerBound": { + "type": "string", + "nullable": true + }, + "upperBound": { + "type": "string", + "nullable": true + }, + "enumValues": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enumValuesToArgumentStrings": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "setEnvironmentVariable": { + "type": "boolean" + }, + "environmentVariableOverride": { + "type": "string", + "nullable": true + }, + "enabledByParameterName": { + "type": "string", + "nullable": true + }, + "enabledByParameterValues": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "uiHint": { + "$ref": "#/components/schemas/UIParameterHint" + }, + "groupNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "argumentName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "StudioMigrationInfo": { + "type": "object", + "properties": { + "sourceWorkspaceId": { + "type": "string", + "nullable": true + }, + "sourceExperimentId": { + "type": "string", + "nullable": true + }, + "sourceExperimentLink": { + "type": "string", + "nullable": true + }, + "failedNodeIdList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "errorMessage": { + "type": "string", + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false + }, + "SubGraphConcatenateAssignment": { + "type": "object", + "properties": { + "concatenateParameter": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ParameterAssignment" + }, + "nullable": true + }, + "parameterAssignments": { + "$ref": "#/components/schemas/SubPipelineParameterAssignment" + } + }, + "additionalProperties": false + }, + "SubGraphConfiguration": { + "type": "object", + "properties": { + "graphId": { + "type": "string", + "nullable": true + }, + "graphDraftId": { + "type": "string", + "nullable": true + }, + "DefaultCloudPriority": { + "$ref": "#/components/schemas/CloudPrioritySetting" + }, + "IsDynamic": { + "type": "boolean", + "default": false, + "nullable": true + } + }, + "additionalProperties": false + }, + "SubGraphConnectionInfo": { + "type": "object", + "properties": { + "nodeId": { + "type": "string", + "nullable": true + }, + "portName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SubGraphDataPathParameterAssignment": { + "type": "object", + "properties": { + "dataSetPathParameter": { + "$ref": "#/components/schemas/DataSetPathParameter" + }, + "dataSetPathParameterAssignments": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SubGraphInfo": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "defaultComputeTarget": { + "$ref": "#/components/schemas/ComputeSetting" + }, + "defaultDataStore": { + "$ref": "#/components/schemas/DatastoreSetting" + }, + "id": { + "type": "string", + "nullable": true + }, + "parentGraphId": { + "type": "string", + "nullable": true + }, + "pipelineDefinitionId": { + "type": "string", + "nullable": true + }, + "subGraphParameterAssignment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubGraphParameterAssignment" + }, + "nullable": true + }, + "subGraphConcatenateAssignment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubGraphConcatenateAssignment" + }, + "nullable": true + }, + "subGraphDataPathParameterAssignment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubGraphDataPathParameterAssignment" + }, + "nullable": true + }, + "subGraphDefaultComputeTargetNodes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "subGraphDefaultDataStoreNodes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubGraphPortInfo" + }, + "nullable": true + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubGraphPortInfo" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SubGraphParameterAssignment": { + "type": "object", + "properties": { + "parameter": { + "$ref": "#/components/schemas/Parameter" + }, + "parameterAssignments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubPipelineParameterAssignment" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SubGraphPortInfo": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "internal": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubGraphConnectionInfo" + }, + "nullable": true + }, + "external": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubGraphConnectionInfo" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SubPipelineDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "defaultComputeTarget": { + "$ref": "#/components/schemas/ComputeSetting" + }, + "defaultDataStore": { + "$ref": "#/components/schemas/DatastoreSetting" + }, + "pipelineFunctionName": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "parentDefinitionId": { + "type": "string", + "nullable": true + }, + "fromModuleName": { + "type": "string", + "nullable": true + }, + "parameterList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Kwarg" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SubPipelineParameterAssignment": { + "type": "object", + "properties": { + "nodeId": { + "type": "string", + "nullable": true + }, + "parameterName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SubPipelinesInfo": { + "type": "object", + "properties": { + "subGraphInfo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubGraphInfo" + }, + "nullable": true + }, + "nodeIdToSubGraphIdMapping": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "subPipelineDefinition": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubPipelineDefinition" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SubStatusPeriod": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "subPeriods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubStatusPeriod" + }, + "nullable": true + }, + "start": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "end": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "SubmitBulkRunRequest": { + "type": "object", + "properties": { + "flowDefinitionFilePath": { + "type": "string", + "nullable": true + }, + "flowDefinitionResourceId": { + "type": "string", + "nullable": true + }, + "flowDefinitionDataStoreName": { + "type": "string", + "nullable": true + }, + "flowDefinitionBlobPath": { + "type": "string", + "nullable": true + }, + "flowDefinitionDataUri": { + "type": "string", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "runDisplayName": { + "type": "string", + "nullable": true + }, + "runExperimentName": { + "type": "string", + "nullable": true + }, + "nodeVariant": { + "type": "string", + "nullable": true + }, + "variantRunId": { + "type": "string", + "nullable": true + }, + "baselineRunId": { + "type": "string", + "nullable": true + }, + "sessionId": { + "type": "string", + "nullable": true + }, + "sessionSetupMode": { + "$ref": "#/components/schemas/SessionSetupModeEnum" + }, + "sessionConfigMode": { + "$ref": "#/components/schemas/SessionConfigModeEnum" + }, + "flowLineageId": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + }, + "computeName": { + "type": "string", + "nullable": true + }, + "enableMultiContainer": { + "type": "boolean" + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "inputsMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputDataStore": { + "type": "string", + "nullable": true + }, + "runDisplayNameGenerationType": { + "$ref": "#/components/schemas/RunDisplayNameGenerationType" + }, + "collieRunSettings": { + "$ref": "#/components/schemas/CollieRunSettings" + }, + "workerCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timeoutInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "promptflowEngineType": { + "$ref": "#/components/schemas/PromptflowEngineType" + }, + "experimentNodeName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SubmitBulkRunResponse": { + "type": "object", + "properties": { + "nextActionIntervalInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "actionType": { + "$ref": "#/components/schemas/ActionType" + }, + "flow_runs": { + "type": "array", + "items": { }, + "nullable": true + }, + "node_runs": { + "type": "array", + "items": { }, + "nullable": true + }, + "errorResponse": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "flowName": { + "type": "string", + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "flowRunId": { + "type": "string", + "nullable": true + }, + "flowGraph": { + "$ref": "#/components/schemas/FlowGraph" + }, + "flowGraphLayout": { + "$ref": "#/components/schemas/FlowGraphLayout" + }, + "flowRunResourceId": { + "type": "string", + "nullable": true + }, + "bulkTestId": { + "type": "string", + "nullable": true + }, + "batchInputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "createdBy": { + "$ref": "#/components/schemas/SchemaContractsCreatedBy" + }, + "createdOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "flowRunType": { + "$ref": "#/components/schemas/FlowRunTypeEnum" + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "amlComputeName": { + "type": "string", + "nullable": true + }, + "flowRunLogs": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "flowTestMode": { + "$ref": "#/components/schemas/FlowTestMode" + }, + "flowTestInfos": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowTestInfo" + }, + "nullable": true + }, + "workingDirectory": { + "type": "string", + "nullable": true + }, + "flowDagFileRelativePath": { + "type": "string", + "nullable": true + }, + "flowSnapshotId": { + "type": "string", + "nullable": true + }, + "variantRunToEvaluationRunsIdMapping": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "SubmitExperimentRequest": { + "type": "object", + "properties": { + "experimentTemplateId": { + "type": "string", + "nullable": true + }, + "experimentDefinitionSource": { + "$ref": "#/components/schemas/ExperimentDefinitionSource" + } + }, + "additionalProperties": false + }, + "SubmitFlowRequest": { + "type": "object", + "properties": { + "flowRunId": { + "type": "string", + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "flowId": { + "type": "string", + "nullable": true + }, + "flow": { + "$ref": "#/components/schemas/Flow" + }, + "flowSubmitRunSettings": { + "$ref": "#/components/schemas/FlowSubmitRunSettings" + }, + "asyncSubmission": { + "type": "boolean" + }, + "useWorkspaceConnection": { + "type": "boolean" + }, + "enableAsyncFlowTest": { + "type": "boolean" + }, + "runDisplayNameGenerationType": { + "$ref": "#/components/schemas/RunDisplayNameGenerationType" + } + }, + "additionalProperties": false + }, + "SubmitPipelineRunRequest": { + "type": "object", + "properties": { + "computeTarget": { + "type": "string", + "nullable": true + }, + "flattenedSubGraphs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/PipelineSubDraft" + }, + "nullable": true + }, + "stepTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "experimentName": { + "type": "string", + "nullable": true + }, + "pipelineParameters": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataPathAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/LegacyDataPath" + }, + "description": "This is a dictionary", + "nullable": true + }, + "dataSetDefinitionValueAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/DataSetDefinitionValue" + }, + "description": "This is a dictionary", + "nullable": true + }, + "assetOutputSettingsAssignments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AssetOutputSettings" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enableNotification": { + "type": "boolean", + "nullable": true + }, + "subPipelinesInfo": { + "$ref": "#/components/schemas/SubPipelinesInfo" + }, + "displayName": { + "type": "string", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "parentRunId": { + "type": "string", + "nullable": true + }, + "graph": { + "$ref": "#/components/schemas/GraphDraftEntity" + }, + "pipelineRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameterAssignment" + }, + "nullable": true + }, + "moduleNodeRunSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeRunSetting" + }, + "nullable": true + }, + "moduleNodeUIInputSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" + }, + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "continueRunOnStepFailure": { + "type": "boolean", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "enforceRerun": { + "type": "boolean", + "nullable": true + }, + "datasetAccessModes": { + "$ref": "#/components/schemas/DatasetAccessModes" + } + }, + "additionalProperties": false + }, + "SuccessfulCommandReturnCode": { + "enum": [ + "Zero", + "ZeroOrGreater" + ], + "type": "string" + }, + "SweepEarlyTerminationPolicy": { + "type": "object", + "properties": { + "policyType": { + "$ref": "#/components/schemas/EarlyTerminationPolicyType" + }, + "evaluationInterval": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "delayEvaluation": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "slackFactor": { + "type": "number", + "format": "float", + "nullable": true + }, + "slackAmount": { + "type": "number", + "format": "float", + "nullable": true + }, + "truncationPercentage": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "SweepSettings": { + "type": "object", + "properties": { + "limits": { + "$ref": "#/components/schemas/SweepSettingsLimits" + }, + "searchSpace": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "nullable": true + }, + "samplingAlgorithm": { + "$ref": "#/components/schemas/SamplingAlgorithmType" + }, + "earlyTermination": { + "$ref": "#/components/schemas/SweepEarlyTerminationPolicy" + } + }, + "additionalProperties": false + }, + "SweepSettingsLimits": { + "type": "object", + "properties": { + "maxTotalTrials": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "maxConcurrentTrials": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "SystemData": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "createdByType": { + "$ref": "#/components/schemas/UserType" + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastModifiedBy": { + "type": "string", + "nullable": true + }, + "lastModifiedByType": { + "$ref": "#/components/schemas/UserType" + } + }, + "additionalProperties": false + }, + "SystemMeta": { + "type": "object", + "properties": { + "identifierHash": { + "type": "string", + "nullable": true + }, + "extraHash": { + "type": "string", + "nullable": true + }, + "contentHash": { + "type": "string", + "nullable": true + }, + "identifierHashes": { + "type": "object", + "properties": { + "IdentifierHash": { + "type": "string" + }, + "IdentifierHashV2": { + "type": "string" + } + }, + "additionalProperties": false, + "nullable": true + }, + "extraHashes": { + "type": "object", + "properties": { + "IdentifierHash": { + "type": "string" + }, + "IdentifierHashV2": { + "type": "string" + } + }, + "additionalProperties": false, + "nullable": true + } + }, + "additionalProperties": false + }, + "TabularTrainingMode": { + "enum": [ + "Distributed", + "NonDistributed", + "Auto" + ], + "type": "string" + }, + "TargetAggregationFunction": { + "enum": [ + "Sum", + "Max", + "Min", + "Mean" + ], + "type": "string" + }, + "TargetLags": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/TargetLagsMode" + }, + "values": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "TargetLagsMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "TargetRollingWindowSize": { + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/TargetRollingWindowSizeMode" + }, + "value": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "TargetRollingWindowSizeMode": { + "enum": [ + "Auto", + "Custom" + ], + "type": "string" + }, + "TargetSelectorConfiguration": { + "type": "object", + "properties": { + "lowPriorityVMTolerant": { + "type": "boolean" + }, + "clusterBlockList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "computeType": { + "type": "string", + "nullable": true + }, + "instanceType": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "instanceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "myResourceOnly": { + "type": "boolean" + }, + "planId": { + "type": "string", + "nullable": true + }, + "planRegionId": { + "type": "string", + "nullable": true + }, + "region": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "regions": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "vcBlockList": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Task": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "exception": { + "nullable": true, + "readOnly": true + }, + "status": { + "$ref": "#/components/schemas/TaskStatus" + }, + "isCanceled": { + "type": "boolean", + "readOnly": true + }, + "isCompleted": { + "type": "boolean", + "readOnly": true + }, + "isCompletedSuccessfully": { + "type": "boolean", + "readOnly": true + }, + "creationOptions": { + "$ref": "#/components/schemas/TaskCreationOptions" + }, + "asyncState": { + "nullable": true, + "readOnly": true + }, + "isFaulted": { + "type": "boolean", + "readOnly": true + } + }, + "additionalProperties": false + }, + "TaskControlFlowInfo": { + "type": "object", + "properties": { + "controlFlowType": { + "$ref": "#/components/schemas/ControlFlowType" + }, + "iterationIndex": { + "type": "integer", + "format": "int32" + }, + "itemName": { + "type": "string", + "nullable": true + }, + "parametersOverwritten": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "isReused": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "TaskCreationOptions": { + "enum": [ + "None", + "PreferFairness", + "LongRunning", + "AttachedToParent", + "DenyChildAttach", + "HideScheduler", + "RunContinuationsAsynchronously" + ], + "type": "string" + }, + "TaskReuseInfo": { + "type": "object", + "properties": { + "experimentId": { + "type": "string", + "nullable": true + }, + "pipelineRunId": { + "type": "string", + "nullable": true + }, + "nodeId": { + "type": "string", + "nullable": true + }, + "requestId": { + "type": "string", + "nullable": true + }, + "runId": { + "type": "string", + "nullable": true + }, + "nodeStartTime": { + "type": "string", + "format": "date-time" + }, + "nodeEndTime": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "TaskStatus": { + "enum": [ + "Created", + "WaitingForActivation", + "WaitingToRun", + "Running", + "WaitingForChildrenToComplete", + "RanToCompletion", + "Canceled", + "Faulted" + ], + "type": "string" + }, + "TaskStatusCode": { + "enum": [ + "NotStarted", + "Queued", + "Running", + "Failed", + "Finished", + "Canceled", + "PartiallyExecuted", + "Bypassed" + ], + "type": "string" + }, + "TaskType": { + "enum": [ + "Classification", + "Regression", + "Forecasting", + "ImageClassification", + "ImageClassificationMultilabel", + "ImageObjectDetection", + "ImageInstanceSegmentation", + "TextClassification", + "TextMultiLabeling", + "TextNER", + "TextClassificationMultilabel" + ], + "type": "string" + }, + "TensorflowConfiguration": { + "type": "object", + "properties": { + "workerCount": { + "type": "integer", + "format": "int32" + }, + "parameterServerCount": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "TestDataSettings": { + "type": "object", + "properties": { + "testDataSize": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "Tool": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ToolType" + }, + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/OutputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "connection_type": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionType" + }, + "nullable": true + }, + "module": { + "type": "string", + "nullable": true + }, + "class_name": { + "type": "string", + "nullable": true + }, + "source": { + "type": "string", + "nullable": true + }, + "lkgCode": { + "type": "string", + "nullable": true + }, + "code": { + "type": "string", + "nullable": true + }, + "function": { + "type": "string", + "nullable": true + }, + "action_type": { + "type": "string", + "nullable": true + }, + "provider_config": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "function_config": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/InputDefinition" + }, + "description": "This is a dictionary", + "nullable": true + }, + "icon": { + "nullable": true + }, + "category": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary", + "nullable": true + }, + "is_builtin": { + "type": "boolean" + }, + "package": { + "type": "string", + "nullable": true + }, + "package_version": { + "type": "string", + "nullable": true + }, + "default_prompt": { + "type": "string", + "nullable": true + }, + "enable_kwargs": { + "type": "boolean" + }, + "deprecated_tools": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "tool_state": { + "$ref": "#/components/schemas/ToolState" + } + }, + "additionalProperties": false + }, + "ToolFuncCallScenario": { + "enum": [ + "generated_by", + "reverse_generated_by", + "dynamic_list" + ], + "type": "string" + }, + "ToolFuncResponse": { + "type": "object", + "properties": { + "result": { + "nullable": true + }, + "logs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "ToolInputDynamicList": { + "type": "object", + "properties": { + "func_path": { + "type": "string", + "nullable": true + }, + "func_kwargs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ToolInputGeneratedBy": { + "type": "object", + "properties": { + "func_path": { + "type": "string", + "nullable": true + }, + "func_kwargs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "reverse_func_path": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ToolMetaDto": { + "type": "object", + "properties": { + "tools": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Tool" + }, + "description": "This is a dictionary", + "nullable": true + }, + "errors": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "ToolSetting": { + "type": "object", + "properties": { + "providers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProviderEntity" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ToolSourceMeta": { + "type": "object", + "properties": { + "tool_type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ToolState": { + "enum": [ + "Stable", + "Preview", + "Deprecated", + "Archived" + ], + "type": "string" + }, + "ToolType": { + "enum": [ + "llm", + "python", + "action", + "prompt", + "custom_llm", + "csharp", + "typescript" + ], + "type": "string" + }, + "TorchDistributedConfiguration": { + "type": "object", + "properties": { + "processCountPerNode": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "TraceCosmosResourceDto": { + "type": "object", + "properties": { + "accountEndpoint": { + "type": "string", + "nullable": true + }, + "databaseName": { + "type": "string", + "nullable": true + }, + "containerName": { + "type": "string", + "nullable": true + }, + "resourceUrl": { + "type": "string", + "nullable": true + }, + "resourceToken": { + "type": "string", + "nullable": true + }, + "permissionMode": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TraceCosmosResourceDtos": { + "type": "object", + "properties": { + "resourceTokens": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TraceCosmosResourceDto" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "TrainingDiagnosticConfiguration": { + "type": "object", + "properties": { + "jobHeartBeatTimeoutSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "TrainingOutput": { + "type": "object", + "properties": { + "trainingOutputType": { + "$ref": "#/components/schemas/TrainingOutputType" + }, + "iteration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "metric": { + "type": "string", + "nullable": true + }, + "modelFile": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TrainingOutputType": { + "enum": [ + "Metrics", + "Model" + ], + "type": "string" + }, + "TrainingSettings": { + "type": "object", + "properties": { + "blockListModels": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "allowListModels": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "enableDnnTraining": { + "type": "boolean", + "nullable": true + }, + "enableOnnxCompatibleModels": { + "type": "boolean", + "nullable": true + }, + "stackEnsembleSettings": { + "$ref": "#/components/schemas/StackEnsembleSettings" + }, + "enableStackEnsemble": { + "type": "boolean", + "nullable": true + }, + "enableVoteEnsemble": { + "type": "boolean", + "nullable": true + }, + "ensembleModelDownloadTimeout": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "enableModelExplainability": { + "type": "boolean", + "nullable": true + }, + "trainingMode": { + "$ref": "#/components/schemas/TabularTrainingMode" + } + }, + "additionalProperties": false + }, + "TriggerAsyncOperationStatus": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "operationType": { + "$ref": "#/components/schemas/TriggerOperationType" + }, + "provisioningStatus": { + "$ref": "#/components/schemas/ScheduleProvisioningStatus" + }, + "createdTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "error": { + "$ref": "#/components/schemas/ErrorResponse" + }, + "statusCode": { + "$ref": "#/components/schemas/HttpStatusCode" + } + }, + "additionalProperties": false + }, + "TriggerOperationType": { + "enum": [ + "Create", + "Update", + "Delete", + "CreateOrUpdate" + ], + "type": "string" + }, + "TriggerType": { + "enum": [ + "Recurrence", + "Cron" + ], + "type": "string" + }, + "TuningNodeRunSetting": { + "type": "object", + "properties": { + "simulationFlow": { + "$ref": "#/components/schemas/FlowGraphReference" + }, + "simulationFlowRunSetting": { + "$ref": "#/components/schemas/FlowRunSettingsBase" + }, + "batch_inputs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { }, + "description": "This is a dictionary" + }, + "nullable": true + }, + "inputUniversalLink": { + "type": "string", + "nullable": true + }, + "dataInputs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "flowRunOutputDirectory": { + "type": "string", + "nullable": true + }, + "connectionOverrides": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionOverrideSetting" + }, + "nullable": true + }, + "flowRunDisplayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "properties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "runtimeName": { + "type": "string", + "nullable": true + }, + "batchDataInput": { + "$ref": "#/components/schemas/BatchDataInput" + }, + "inputsMapping": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "connections": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary" + }, + "description": "This is a dictionary", + "nullable": true + }, + "environmentVariables": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "This is a dictionary", + "nullable": true + }, + "outputDataStore": { + "type": "string", + "nullable": true + }, + "runDisplayNameGenerationType": { + "$ref": "#/components/schemas/RunDisplayNameGenerationType" + }, + "collieRunSettings": { + "$ref": "#/components/schemas/CollieRunSettings" + }, + "workerCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timeoutInSeconds": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "promptflowEngineType": { + "$ref": "#/components/schemas/PromptflowEngineType" + }, + "experimentNodeName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TuningNodeSetting": { + "type": "object", + "properties": { + "variantIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "tuningNodeRunSettings": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TuningNodeRunSetting" + } + }, + "description": "This is a dictionary", + "nullable": true + } + }, + "additionalProperties": false + }, + "TypedAssetReference": { + "type": "object", + "properties": { + "assetId": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UIAzureOpenAIDeploymentNameSelector": { + "type": "object", + "properties": { + "Capabilities": { + "$ref": "#/components/schemas/UIAzureOpenAIModelCapabilities" + } + }, + "additionalProperties": false + }, + "UIAzureOpenAIModelCapabilities": { + "type": "object", + "properties": { + "Completion": { + "type": "boolean", + "nullable": true + }, + "ChatCompletion": { + "type": "boolean", + "nullable": true + }, + "Embeddings": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "UIColumnPicker": { + "type": "object", + "properties": { + "columnPickerFor": { + "type": "string", + "nullable": true + }, + "columnSelectionCategories": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "singleColumnSelection": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "UIComputeSelection": { + "type": "object", + "properties": { + "computeTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "requireGpu": { + "type": "boolean", + "nullable": true + }, + "osTypes": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "supportServerless": { + "type": "boolean" + }, + "computeRunSettingsMapping": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RunSettingParameter" + }, + "nullable": true + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "UIHyperparameterConfiguration": { + "type": "object", + "properties": { + "modelNameToHyperParameterAndDistributionMapping": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "nullable": true + }, + "nullable": true + }, + "distributionParametersMapping": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DistributionParameter" + }, + "nullable": true + }, + "nullable": true + }, + "jsonSchema": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UIInputDataDeliveryMode": { + "enum": [ + "Read-only mount", + "Read-write mount", + "Download", + "Direct", + "Evaluate mount", + "Evaluate download", + "Hdfs" + ], + "type": "string" + }, + "UIInputSetting": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "dataDeliveryMode": { + "$ref": "#/components/schemas/UIInputDataDeliveryMode" + }, + "pathOnCompute": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UIJsonEditor": { + "type": "object", + "properties": { + "jsonSchema": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UIParameterHint": { + "type": "object", + "properties": { + "uiWidgetType": { + "$ref": "#/components/schemas/UIWidgetTypeEnum" + }, + "columnPicker": { + "$ref": "#/components/schemas/UIColumnPicker" + }, + "uiScriptLanguage": { + "$ref": "#/components/schemas/UIScriptLanguageEnum" + }, + "jsonEditor": { + "$ref": "#/components/schemas/UIJsonEditor" + }, + "PromptFlowConnectionSelector": { + "$ref": "#/components/schemas/UIPromptFlowConnectionSelector" + }, + "AzureOpenAIDeploymentNameSelector": { + "$ref": "#/components/schemas/UIAzureOpenAIDeploymentNameSelector" + }, + "UxIgnore": { + "type": "boolean" + }, + "Anonymous": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "UIPromptFlowConnectionSelector": { + "type": "object", + "properties": { + "PromptFlowConnectionType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UIScriptLanguageEnum": { + "enum": [ + "None", + "Python", + "R", + "Json", + "Sql" + ], + "type": "string" + }, + "UIWidgetMetaInfo": { + "type": "object", + "properties": { + "moduleNodeId": { + "type": "string", + "nullable": true + }, + "metaModuleId": { + "type": "string", + "nullable": true + }, + "parameterName": { + "type": "string", + "nullable": true + }, + "uiWidgetType": { + "$ref": "#/components/schemas/UIWidgetTypeEnum" + } + }, + "additionalProperties": false + }, + "UIWidgetTypeEnum": { + "enum": [ + "Default", + "Mode", + "ColumnPicker", + "Credential", + "Script", + "ComputeSelection", + "JsonEditor", + "SearchSpaceParameter", + "SectionToggle", + "YamlEditor", + "EnableRuntimeSweep", + "DataStoreSelection", + "InstanceTypeSelection", + "ConnectionSelection", + "PromptFlowConnectionSelection", + "AzureOpenAIDeploymentNameSelection" + ], + "type": "string" + }, + "UIYamlEditor": { + "type": "object", + "properties": { + "jsonSchema": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UnversionedEntityRequestDto": { + "type": "object", + "properties": { + "unversionedEntityIds": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "UnversionedEntityResponseDto": { + "type": "object", + "properties": { + "unversionedEntities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FlowIndexEntity" + }, + "nullable": true + }, + "unversionedEntityJsonSchema": { + "nullable": true + }, + "normalizedRequestCharge": { + "type": "number", + "format": "double" + }, + "normalizedRequestChargePeriod": { + "type": "string", + "format": "date-span" + } + }, + "additionalProperties": false + }, + "UnversionedRebuildIndexDto": { + "type": "object", + "properties": { + "continuationToken": { + "type": "string", + "nullable": true + }, + "entityCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "entityContainerType": { + "type": "string", + "nullable": true + }, + "entityType": { + "type": "string", + "nullable": true + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "workspaceId": { + "type": "string", + "nullable": true + }, + "immutableResourceId": { + "type": "string", + "format": "uuid" + }, + "startTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "UnversionedRebuildResponseDto": { + "type": "object", + "properties": { + "entities": { + "$ref": "#/components/schemas/SegmentedResult`1" + }, + "unversionedEntitySchema": { + "nullable": true + }, + "normalizedRequestCharge": { + "type": "number", + "format": "double" + }, + "normalizedRequestChargePeriod": { + "type": "string", + "format": "date-span" + } + }, + "additionalProperties": false + }, + "UpdateComponentRequest": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "moduleUpdateOperationType": { + "$ref": "#/components/schemas/ModuleUpdateOperationType" + }, + "moduleVersion": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UpdateFlowRequest": { + "type": "object", + "properties": { + "flowRunResult": { + "$ref": "#/components/schemas/FlowRunResult" + }, + "flowTestMode": { + "$ref": "#/components/schemas/FlowTestMode" + }, + "flowTestInfos": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/FlowTestInfo" + }, + "nullable": true + }, + "flowName": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "details": { + "type": "string", + "nullable": true + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true + }, + "flow": { + "$ref": "#/components/schemas/Flow" + }, + "flowDefinitionFilePath": { + "type": "string", + "nullable": true + }, + "flowType": { + "$ref": "#/components/schemas/FlowType" + }, + "flowRunSettings": { + "$ref": "#/components/schemas/FlowRunSettings" + }, + "isArchived": { + "type": "boolean" + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "maxIdleTimeSeconds": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "identity": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UpdateFlowRuntimeRequest": { + "type": "object", + "properties": { + "runtimeDescription": { + "type": "string", + "nullable": true + }, + "environment": { + "type": "string", + "nullable": true + }, + "instanceCount": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "UpdateFlowStatusRequest": { + "type": "object", + "properties": { + "flowRunStatus": { + "$ref": "#/components/schemas/FlowRunStatusEnum" + }, + "errorResponse": { + "$ref": "#/components/schemas/ErrorResponse" + } + }, + "additionalProperties": false + }, + "UpdateRegistryComponentRequest": { + "type": "object", + "properties": { + "registryName": { + "type": "string", + "nullable": true + }, + "componentName": { + "type": "string", + "nullable": true + }, + "componentVersion": { + "type": "string", + "nullable": true + }, + "updateType": { + "$ref": "#/components/schemas/UpdateType" + } + }, + "additionalProperties": false + }, + "UpdateType": { + "enum": [ + "SetDefaultVersion" + ], + "type": "string" + }, + "UploadOptions": { + "type": "object", + "properties": { + "overwrite": { + "type": "boolean" + }, + "sourceGlobs": { + "$ref": "#/components/schemas/ExecutionGlobsOptions" + } + }, + "additionalProperties": false + }, + "UploadState": { + "enum": [ + "Uploading", + "Completed", + "Canceled", + "Failed" + ], + "type": "string" + }, + "UriReference": { + "type": "object", + "properties": { + "path": { + "type": "string", + "nullable": true + }, + "isFile": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "UseStl": { + "enum": [ + "Season", + "SeasonTrend" + ], + "type": "string" + }, + "User": { + "type": "object", + "properties": { + "userObjectId": { + "type": "string", + "description": "A user or service principal's object ID.\r\nThis is EUPI and may only be logged to warm path telemetry.", + "nullable": true + }, + "userPuId": { + "type": "string", + "description": "A user or service principal's PuID.\r\nThis is PII and should never be logged.", + "nullable": true + }, + "userIdp": { + "type": "string", + "description": "A user identity provider. Eg live.com\r\nThis is PII and should never be logged.", + "nullable": true + }, + "userAltSecId": { + "type": "string", + "description": "A user alternate sec id. This represents the user in a different identity provider system Eg.1:live.com:puid\r\nThis is PII and should never be logged.", + "nullable": true + }, + "userIss": { + "type": "string", + "description": "The issuer which issed the token for this user.\r\nThis is PII and should never be logged.", + "nullable": true + }, + "userTenantId": { + "type": "string", + "description": "A user or service principal's tenant ID.", + "nullable": true + }, + "userName": { + "type": "string", + "description": "A user's full name or a service principal's app ID.\r\nThis is PII and should never be logged.", + "nullable": true + }, + "upn": { + "type": "string", + "description": "A user's Principal name (upn)\r\nThis is PII andshould never be logged", + "nullable": true + } + }, + "additionalProperties": false + }, + "UserAssignedIdentity": { + "type": "object", + "properties": { + "principalId": { + "type": "string", + "format": "uuid" + }, + "clientId": { + "type": "string", + "format": "uuid" + } + }, + "additionalProperties": false + }, + "UserType": { + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "type": "string" + }, + "ValidationDataSettings": { + "type": "object", + "properties": { + "nCrossValidations": { + "$ref": "#/components/schemas/NCrossValidations" + }, + "validationDataSize": { + "type": "number", + "format": "double", + "nullable": true + }, + "cvSplitColumnNames": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "validationType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ValidationStatus": { + "enum": [ + "Succeeded", + "Failed" + ], + "type": "string" + }, + "ValueType": { + "enum": [ + "int", + "double", + "bool", + "string", + "secret", + "prompt_template", + "object", + "list", + "BingConnection", + "OpenAIConnection", + "AzureOpenAIConnection", + "AzureContentModeratorConnection", + "CustomConnection", + "AzureContentSafetyConnection", + "SerpConnection", + "CognitiveSearchConnection", + "SubstrateLLMConnection", + "PineconeConnection", + "QdrantConnection", + "WeaviateConnection", + "function_list", + "function_str", + "FormRecognizerConnection", + "file_path", + "image", + "assistant_definition", + "ServerlessConnection" + ], + "type": "string" + }, + "VariantIdentifier": { + "type": "object", + "properties": { + "variantId": { + "type": "string", + "nullable": true + }, + "tuningNodeName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "VariantNode": { + "type": "object", + "properties": { + "node": { + "$ref": "#/components/schemas/Node" + }, + "description": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "VmPriority": { + "enum": [ + "Dedicated", + "Lowpriority" + ], + "type": "string" + }, + "Volume": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "source": { + "type": "string", + "nullable": true + }, + "target": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "WebServiceComputeMetaInfo": { + "type": "object", + "properties": { + "nodeCount": { + "type": "integer", + "format": "int32" + }, + "isSslEnabled": { + "type": "boolean" + }, + "aksNotFound": { + "type": "boolean" + }, + "clusterPurpose": { + "type": "string", + "nullable": true + }, + "publicIpAddress": { + "type": "string", + "nullable": true + }, + "vmSize": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "provisioningState": { + "type": "string", + "nullable": true + }, + "state": { + "type": "string", + "nullable": true + }, + "osType": { + "type": "string", + "nullable": true + }, + "id": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "createdByStudio": { + "type": "boolean" + }, + "isGpuType": { + "type": "boolean" + }, + "resourceId": { + "type": "string", + "nullable": true + }, + "computeType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "WebServicePort": { + "type": "object", + "properties": { + "nodeId": { + "type": "string", + "nullable": true + }, + "portName": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "WebServiceState": { + "enum": [ + "Transitioning", + "Healthy", + "Unhealthy", + "Failed", + "Unschedulable" + ], + "type": "string" + }, + "Webhook": { + "type": "object", + "properties": { + "webhookType": { + "$ref": "#/components/schemas/WebhookType" + }, + "eventType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "WebhookType": { + "enum": [ + "AzureDevOps" + ], + "type": "string" + }, + "WeekDays": { + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "Weekday": { + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "WorkspaceConnectionSpec": { + "type": "object", + "properties": { + "connectionCategory": { + "$ref": "#/components/schemas/ConnectionCategory" + }, + "flowValueType": { + "$ref": "#/components/schemas/ValueType" + }, + "connectionType": { + "$ref": "#/components/schemas/ConnectionType" + }, + "connectionTypeDisplayName": { + "type": "string", + "nullable": true + }, + "configSpecs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConnectionConfigSpec" + }, + "nullable": true + }, + "module": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "YarnDeployMode": { + "enum": [ + "None", + "Client", + "Cluster" + ], + "type": "string" + } + }, + "parameters": { + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The Azure Subscription ID.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "x-ms-parameter-location": "method" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The Name of the resource group in which the workspace is located.", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-parameter-location": "method" + }, + "workspaceNameParameter": { + "name": "workspaceName", + "in": "path", + "description": "The name of the workspace.", + "required": true, + "schema": { + "type": "string" + }, + "x-ms-parameter-location": "method" + } + }, + "securitySchemes": { + "azure_auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} \ No newline at end of file diff --git a/src/promptflow/promptflow/_cli/_pf_azure/__init__.py b/src/promptflow-azure/promptflow/azure/_schemas/__init__.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf_azure/__init__.py rename to src/promptflow-azure/promptflow/azure/_schemas/__init__.py diff --git a/src/promptflow/promptflow/azure/_schemas/_flow_schema.py b/src/promptflow-azure/promptflow/azure/_schemas/_flow_schema.py similarity index 100% rename from src/promptflow/promptflow/azure/_schemas/_flow_schema.py rename to src/promptflow-azure/promptflow/azure/_schemas/_flow_schema.py diff --git a/src/promptflow/promptflow/_utils/__init__.py b/src/promptflow-azure/promptflow/azure/_storage/__init__.py similarity index 100% rename from src/promptflow/promptflow/_utils/__init__.py rename to src/promptflow-azure/promptflow/azure/_storage/__init__.py diff --git a/src/promptflow/promptflow/azure/_restclient/__init__.py b/src/promptflow-azure/promptflow/azure/_storage/blob/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_restclient/__init__.py rename to src/promptflow-azure/promptflow/azure/_storage/blob/__init__.py diff --git a/src/promptflow-azure/promptflow/azure/_storage/blob/client.py b/src/promptflow-azure/promptflow/azure/_storage/blob/client.py new file mode 100644 index 00000000000..3b880cdea0d --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_storage/blob/client.py @@ -0,0 +1,113 @@ +import datetime +import logging +import threading +import traceback +from typing import Optional, Tuple + +from azure.ai.ml import MLClient +from azure.ai.ml._azure_environments import _get_storage_endpoint_from_metadata +from azure.ai.ml._restclient.v2022_10_01.models import DatastoreType +from azure.ai.ml.constants._common import LONG_URI_FORMAT, STORAGE_ACCOUNT_URLS +from azure.ai.ml.entities._datastore.datastore import Datastore +from azure.storage.blob import ContainerClient + +from promptflow.exceptions import UserErrorException + +_datastore_cache = {} +_thread_lock = threading.Lock() +_cache_timeout = 60 * 4 # Align the cache ttl with cosmosdb client. + + +def get_datastore_container_client( + logger: logging.Logger, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + credential: Optional[object] = None, +) -> Tuple[ContainerClient, str]: + try: + # To write data to blob, user should have "Storage Blob Data Contributor" to the storage account. + if credential is None: + from azure.identity import DefaultAzureCredential + + credential = DefaultAzureCredential() + + default_datastore = get_default_datastore(subscription_id, resource_group_name, workspace_name, credential) + + storage_endpoint = _get_storage_endpoint_from_metadata() + account_url = STORAGE_ACCOUNT_URLS[DatastoreType.AZURE_BLOB].format( + default_datastore.account_name, storage_endpoint + ) + + # Datastore is a notion of AzureML, it is not a notion of Blob Storage. + # So, we cannot get datastore name by blob client. + # To generate the azureml uri has datastore name, we need to generate the uri here and pass in to db client. + container_client = ContainerClient( + account_url=account_url, container_name=default_datastore.container_name, credential=credential + ) + blob_base_uri = LONG_URI_FORMAT.format( + subscription_id, resource_group_name, workspace_name, default_datastore.name, "" + ) + if not blob_base_uri.endswith("/"): + blob_base_uri += "/" + + logger.info(f"Get blob base url for {blob_base_uri}") + + return container_client, blob_base_uri + + except Exception as e: + stack_trace = traceback.format_exc() + logger.error(f"Failed to get blob client: {e}, stack trace is {stack_trace}") + raise + + +def get_default_datastore( + subscription_id: str, resource_group_name: str, workspace_name: str, credential: Optional[object] +) -> Datastore: + + datastore_key = _get_datastore_client_key(subscription_id, resource_group_name, workspace_name) + datastore = _get_datastore_from_cache(datastore_key=datastore_key) + if datastore is None: + with _thread_lock: + datastore = _get_datastore_from_cache(datastore_key=datastore_key) + if datastore is None: + datastore = _get_default_datastore(subscription_id, resource_group_name, workspace_name, credential) + _datastore_cache[datastore_key] = { + "expire_at": datetime.datetime.now() + datetime.timedelta(seconds=_cache_timeout), + "datastore": datastore, + } + return datastore + + +def _get_datastore_from_cache(datastore_key: str): + datastore = _datastore_cache.get(datastore_key) + + if datastore and datastore["expire_at"] > datetime.datetime.now(): + return datastore["datastore"] + + return None + + +def _get_datastore_client_key(subscription_id: str, resource_group_name: str, workspace_name: str) -> str: + # Azure name allow hyphens and underscores. User @ to avoid possible conflict. + return f"{subscription_id}@{resource_group_name}@{workspace_name}" + + +def _get_default_datastore( + subscription_id: str, resource_group_name: str, workspace_name: str, credential: Optional[object] +) -> Datastore: + + ml_client = MLClient( + credential=credential, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + ) + + default_datastore = ml_client.datastores.get_default() + if default_datastore.type != DatastoreType.AZURE_BLOB: + raise UserErrorException( + message=f"Default datastore {default_datastore.name} is {default_datastore.type}, not AzureBlob." + ) + + return default_datastore diff --git a/src/promptflow/promptflow/azure/_storage/__init__.py b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_storage/__init__.py rename to src/promptflow-azure/promptflow/azure/_storage/cosmosdb/__init__.py diff --git a/src/promptflow/promptflow/azure/_storage/cosmosdb/client.py b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/client.py similarity index 77% rename from src/promptflow/promptflow/azure/_storage/cosmosdb/client.py rename to src/promptflow-azure/promptflow/azure/_storage/cosmosdb/client.py index c91dc3b27e6..22e7f173c9c 100644 --- a/src/promptflow/promptflow/azure/_storage/cosmosdb/client.py +++ b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/client.py @@ -5,6 +5,7 @@ import ast import datetime import threading +from typing import Optional client_map = {} _thread_lock = threading.Lock() @@ -12,7 +13,13 @@ _token_timeout = 60 * 4 # Will try to refresh token if exceed 4 minutes -def get_client(container_name: str, subscription_id: str, resource_group_name: str, workspace_name: str): +def get_client( + container_name: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + credential: Optional[object] = None, +): client_key = _get_db_client_key(container_name, subscription_id, resource_group_name, workspace_name) container_client = _get_client_from_map(client_key) if container_client is None: @@ -21,7 +28,13 @@ def get_client(container_name: str, subscription_id: str, resource_group_name: s with container_lock: container_client = _get_client_from_map(client_key) if container_client is None: - token = _get_resource_token(container_name, subscription_id, resource_group_name, workspace_name) + if credential is None: + from azure.identity import DefaultAzureCredential + + credential = DefaultAzureCredential() + token = _get_resource_token( + container_name, subscription_id, resource_group_name, workspace_name, credential + ) container_client = _init_container_client( endpoint=token["accountEndpoint"], database_name=token["databaseName"], @@ -57,14 +70,16 @@ def _get_container_lock(client_key: str): def _get_resource_token( - container_name: str, subscription_id: str, resource_group_name: str, workspace_name: str + container_name: str, + subscription_id: str, + resource_group_name: str, + workspace_name: str, + credential: Optional[object], ) -> object: - from azure.identity import DefaultAzureCredential - from promptflow.azure import PFClient pf_client = PFClient( - credential=DefaultAzureCredential(), + credential=credential, subscription_id=subscription_id, resource_group_name=resource_group_name, workspace_name=workspace_name, @@ -86,4 +101,5 @@ def _init_container_client(endpoint: str, database_name: str, container_name: st def _get_db_client_key(container_name: str, subscription_id: str, resource_group_name: str, workspace_name: str) -> str: - return f"{subscription_id}_{resource_group_name}_{workspace_name}_{container_name}" + # Azure name allow hyphens and underscores. User @ to avoid possible conflict. + return f"{subscription_id}@{resource_group_name}@{workspace_name}@{container_name}" diff --git a/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/collection.py b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/collection.py new file mode 100644 index 00000000000..4f3eaa74261 --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/collection.py @@ -0,0 +1,88 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import time +from dataclasses import dataclass +from enum import Enum +from typing import Any, Dict + +from azure.cosmos import ContainerProxy + +from promptflow._constants import SpanAttributeFieldName, SpanResourceAttributesFieldName, SpanResourceFieldName +from promptflow._sdk._constants import TRACE_DEFAULT_COLLECTION, CreatedByFieldName +from promptflow._sdk.entities._trace import Span +from promptflow.azure._storage.cosmosdb.cosmosdb_utils import safe_create_cosmosdb_item + + +@dataclass +class Collection: + id: str # Collection id for cosmosDB query, usually hide from customer + partition_key: str + name: str # Display name for customer facing UI + created_at: int + updated_at: int + created_by: Dict[str, Any] + location: int + + +class LocationType(int, Enum): + LOCAL = 0 + CLOUD = 1 + + +def generate_collection_id_by_name_and_created_by(name: str, created_by: Dict[str, Any]) -> str: + return f"{name}_{created_by[CreatedByFieldName.OBJECT_ID]}" + + +class CollectionCosmosDB: + def __init__(self, span: Span, is_cloud_trace: bool, created_by: Dict[str, Any]): + self.span = span + self.created_by = created_by + self.location = LocationType.CLOUD if is_cloud_trace else LocationType.LOCAL + resource_attributes = span.resource.get(SpanResourceFieldName.ATTRIBUTES, {}) + self.collection_name = resource_attributes.get( + SpanResourceAttributesFieldName.COLLECTION, TRACE_DEFAULT_COLLECTION + ) + span_attributes = self.span.attributes + if SpanAttributeFieldName.BATCH_RUN_ID in span_attributes: + self.collection_id = span_attributes[SpanAttributeFieldName.BATCH_RUN_ID] + else: + self.collection_id = ( + resource_attributes[SpanResourceAttributesFieldName.COLLECTION_ID] + if is_cloud_trace + else generate_collection_id_by_name_and_created_by(self.collection_name, created_by) + ) + + def create_collection_if_not_exist(self, client: ContainerProxy): + span_attributes = self.span.attributes + # For batch run, ignore collection operation + if SpanAttributeFieldName.BATCH_RUN_ID in span_attributes: + return + + item = Collection( + id=self.collection_id, + partition_key=self.collection_id, + name=self.collection_name, + created_at=int(time.time()), + updated_at=int(time.time()), + created_by=self.created_by, + location=self.location, + ) + safe_create_cosmosdb_item(client, item) + # Update name if customer change flow display name + patch_operations = [{"op": "replace", "path": "/name", "value": self.collection_name}] + return client.patch_item( + item=self.collection_id, partition_key=self.collection_id, patch_operations=patch_operations + ) + + def update_collection_updated_at_info(self, client: ContainerProxy): + span_attributes = self.span.attributes + # For batch run, ignore collection operation + if SpanAttributeFieldName.BATCH_RUN_ID in span_attributes: + return + + patch_operations = [{"op": "replace", "path": "/updated_at", "value": int(time.time())}] + return client.patch_item( + item=self.collection_id, partition_key=self.collection_id, patch_operations=patch_operations + ) diff --git a/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/cosmosdb_utils.py b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/cosmosdb_utils.py new file mode 100644 index 00000000000..7084f3845fc --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/cosmosdb_utils.py @@ -0,0 +1,17 @@ +from dataclasses import asdict + +from azure.cosmos import ContainerProxy +from azure.cosmos.exceptions import CosmosResourceExistsError, CosmosResourceNotFoundError + + +def safe_create_cosmosdb_item(client: ContainerProxy, dataclass_item): + try: + # Attempt to read the item using its ID and partition key + client.read_item(item=dataclass_item.id, partition_key=dataclass_item.partition_key) + except CosmosResourceNotFoundError: + # Only create for not exist situation. + try: + client.create_item(body=asdict(dataclass_item)) + except CosmosResourceExistsError: + # Ignore conflict error. + return diff --git a/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/span.py b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/span.py new file mode 100644 index 00000000000..699f854cb2b --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/span.py @@ -0,0 +1,85 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import json +from typing import Any, Dict + +from azure.cosmos.container import ContainerProxy +from azure.storage.blob import ContainerClient + +from promptflow._constants import SpanContextFieldName, SpanEventFieldName, SpanFieldName +from promptflow._sdk.entities._trace import Span as SpanEntity + + +class Span: + name: str = None + context: dict = None + kind: str = None + parent_id: str = None + start_time: str = None + end_time: str = None + status: dict = None + attributes: dict = None + events: list = None + links: list = None + resource: dict = None + id: str = None + partition_key: str = None + collection_id: str = None + created_by: dict = None + external_event_data_uris: list = None + + def __init__(self, span: SpanEntity, collection_id: str, created_by: dict) -> None: + self.name = span.name + self.context = span.context + self.kind = span.kind + self.parent_id = span.parent_id + self.start_time = span.start_time.isoformat() + self.end_time = span.end_time.isoformat() + self.status = span.status + self.attributes = span.attributes + self.events = span.events + self.links = span.links + self.resource = span.resource + self.partition_key = collection_id + self.collection_id = collection_id + self.id = span.span_id + self.created_by = created_by + self.external_event_data_uris = [] + + def persist(self, cosmos_client: ContainerProxy, blob_container_client: ContainerClient, blob_base_uri: str): + if self.id is None or self.partition_key is None or self.resource is None: + return + + resource_attributes = self.resource.get(SpanFieldName.ATTRIBUTES, None) + if resource_attributes is None: + return + + if self.events and blob_container_client is not None and blob_base_uri is not None: + self._persist_events(blob_container_client, blob_base_uri) + + from azure.cosmos.exceptions import CosmosResourceExistsError + + try: + return cosmos_client.create_item(body=self.to_dict()) + except CosmosResourceExistsError: + return + + def to_dict(self) -> Dict[str, Any]: + return {k: v for k, v in self.__dict__.items() if v} + + def _persist_events(self, blob_container_client: ContainerClient, blob_base_uri: str): + for idx, event in enumerate(self.events): + event_data = json.dumps(event) + blob_client = blob_container_client.get_blob_client(self._event_path(idx)) + blob_client.upload_blob(event_data) + + event[SpanEventFieldName.ATTRIBUTES] = {} + self.external_event_data_uris.append(f"{blob_base_uri}{self._event_path(idx)}") + + EVENT_PATH_PREFIX = ".promptflow/.trace" + + def _event_path(self, idx: int) -> str: + trace_id = self.context[SpanContextFieldName.TRACE_ID] + return f"{self.EVENT_PATH_PREFIX}/{self.collection_id}/{trace_id}/{self.id}/{idx}" diff --git a/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/summary.py b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/summary.py new file mode 100644 index 00000000000..259a308229e --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_storage/cosmosdb/summary.py @@ -0,0 +1,254 @@ +import datetime +import logging +import time +import typing +from dataclasses import asdict, dataclass, field + +from azure.cosmos import ContainerProxy + +from promptflow._constants import ( + OK_LINE_RUN_STATUS, + RUNNING_LINE_RUN_STATUS, + SpanAttributeFieldName, + SpanResourceAttributesFieldName, + SpanStatusFieldName, +) +from promptflow._sdk._constants import TRACE_DEFAULT_COLLECTION +from promptflow._sdk._utils import json_loads_parse_const_as_str +from promptflow._sdk.entities._trace import Span +from promptflow.azure._storage.cosmosdb.cosmosdb_utils import safe_create_cosmosdb_item + + +@dataclass +class SummaryLine: + """ + This class represents an Item in Summary container + """ + + id: str + partition_key: str + session_id: str + trace_id: str + collection_id: str + root_span_id: str = "" + inputs: typing.Dict = field(default_factory=dict) + outputs: typing.Dict = field(default_factory=dict) + start_time: str = "" + end_time: str = "" + status: str = "" + latency: float = 0.0 + name: str = "" + kind: str = "" + created_by: typing.Dict = field(default_factory=dict) + cumulative_token_count: typing.Optional[typing.Dict[str, int]] = field(default_factory=dict) + evaluations: typing.Dict = field(default_factory=dict) + # Only for batch run + batch_run_id: str = None + line_number: str = None + # Only for line run + line_run_id: str = None + + +@dataclass +class LineEvaluation: + """ + This class represents an evaluation value in Summary container item. + + """ + + outputs: typing.Dict + trace_id: str + root_span_id: str + name: str + created_by: typing.Dict + collection_id: str + flow_id: str = None + # Only for batch run + batch_run_id: str = None + line_number: str = None + # Only for line run + line_run_id: str = None + + +class Summary: + def __init__(self, span: Span, collection_id: str, created_by: typing.Dict, logger: logging.Logger) -> None: + self.span = span + self.created_by = created_by + self.logger = logger + self.session_id = self.span.resource.get(SpanResourceAttributesFieldName.COLLECTION, TRACE_DEFAULT_COLLECTION) + self.collection_id = collection_id + + def persist(self, client: ContainerProxy): + if self.span.parent_id: + # For non root span, write a placeholder item to LineSummary table. + self._persist_running_item(client) + return + attributes = self.span.attributes + + # Persist root span as a line run. + self._persist_line_run(client) + + if ( + SpanAttributeFieldName.LINE_RUN_ID not in attributes + and SpanAttributeFieldName.BATCH_RUN_ID not in attributes + ): + self.logger.info( + "No line run id or batch run id found. Could be aggregate node, eager flow or arbitrary script. " + "Ignore for patching evaluations." + ) + return + + if SpanAttributeFieldName.REFERENCED_LINE_RUN_ID in attributes or ( + SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID in attributes + and SpanAttributeFieldName.LINE_NUMBER in attributes + ): + self._insert_evaluation_with_retry(client) + + # When there is the first span for line run, write placeholder item to LineSummary table. + def _persist_running_item(self, client: ContainerProxy): + trace_id = self.span.trace_id + session_id = self.session_id + + item = SummaryLine( + id=trace_id, + partition_key=self.collection_id, + session_id=session_id, + trace_id=trace_id, + status=RUNNING_LINE_RUN_STATUS, + collection_id=self.collection_id, + created_by=self.created_by, + start_time=self.span.start_time.isoformat(), + ) + attributes: dict = self.span.attributes + if SpanAttributeFieldName.LINE_RUN_ID in attributes: + item.line_run_id = attributes[SpanAttributeFieldName.LINE_RUN_ID] + elif SpanAttributeFieldName.BATCH_RUN_ID in attributes and SpanAttributeFieldName.LINE_NUMBER in attributes: + item.batch_run_id = attributes[SpanAttributeFieldName.BATCH_RUN_ID] + item.line_number = attributes[SpanAttributeFieldName.LINE_NUMBER] + safe_create_cosmosdb_item(client, item) + + def _persist_line_run(self, client: ContainerProxy): + attributes: dict = self.span.attributes + + session_id = self.session_id + start_time = self.span.start_time.isoformat() + end_time = self.span.end_time.isoformat() + + # Span's original format don't include latency, so we need to calculate it. + # Convert ISO 8601 formatted strings to datetime objects + start_time_date = datetime.datetime.fromisoformat(start_time.replace("Z", "+00:00")) + end_time_date = datetime.datetime.fromisoformat(end_time.replace("Z", "+00:00")) + latency = (end_time_date - start_time_date).total_seconds() + # calculate `cumulative_token_count` + completion_token_count = int(attributes.get(SpanAttributeFieldName.COMPLETION_TOKEN_COUNT, 0)) + prompt_token_count = int(attributes.get(SpanAttributeFieldName.PROMPT_TOKEN_COUNT, 0)) + total_token_count = int(attributes.get(SpanAttributeFieldName.TOTAL_TOKEN_COUNT, 0)) + # if there is no token usage, set `cumulative_token_count` to None + if total_token_count > 0: + cumulative_token_count = { + "completion": completion_token_count, + "prompt": prompt_token_count, + "total": total_token_count, + } + else: + cumulative_token_count = None + item = SummaryLine( + id=self.span.trace_id, # trace id is unique for LineSummary container + partition_key=self.collection_id, + session_id=session_id, + trace_id=self.span.trace_id, + collection_id=self.collection_id, + root_span_id=self.span.span_id, + inputs=json_loads_parse_const_as_str(attributes.get(SpanAttributeFieldName.INPUTS, "{}")), + outputs=json_loads_parse_const_as_str(attributes.get(SpanAttributeFieldName.OUTPUT, "{}")), + start_time=start_time, + end_time=end_time, + status=self.span.status[SpanStatusFieldName.STATUS_CODE], + latency=latency, + name=self.span.name, + kind=attributes[SpanAttributeFieldName.SPAN_TYPE], + cumulative_token_count=cumulative_token_count, + created_by=self.created_by, + ) + if SpanAttributeFieldName.LINE_RUN_ID in attributes: + item.line_run_id = attributes[SpanAttributeFieldName.LINE_RUN_ID] + elif SpanAttributeFieldName.BATCH_RUN_ID in attributes and SpanAttributeFieldName.LINE_NUMBER in attributes: + item.batch_run_id = attributes[SpanAttributeFieldName.BATCH_RUN_ID] + item.line_number = attributes[SpanAttributeFieldName.LINE_NUMBER] + + self.logger.info(f"Persist main run for LineSummary id: {item.id}") + # Use upsert because we may create running item in advance. + return client.upsert_item(body=asdict(item)) + + def _insert_evaluation_with_retry(self, client: ContainerProxy): + for attempt in range(3): + try: + # We receive requests to persist main flow first and then evaluation, + # but init cosmosDB client could be time consuming, and the later request will reuse the same client, + # so it's possible that the main run is not persisted when we start to patch evaluation to it. + self._insert_evaluation(client) + break + except InsertEvaluationsRetriableException as e: + if attempt == 2: # If this is the last attempt, ignore and just return + self.logger.error(f"Error while inserting evaluation: {e}") + return + time.sleep(1) + + def _insert_evaluation(self, client: ContainerProxy): + attributes: dict = self.span.attributes + item = LineEvaluation( + trace_id=self.span.trace_id, + root_span_id=self.span.span_id, + collection_id=self.collection_id, + outputs=json_loads_parse_const_as_str(attributes.get(SpanAttributeFieldName.OUTPUT, "{}")), + name=self.span.name, + created_by=self.created_by, + ) + + # None is the default value for the field. + referenced_line_run_id = attributes.get(SpanAttributeFieldName.REFERENCED_LINE_RUN_ID, None) + referenced_batch_run_id = attributes.get(SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID, None) + line_number = attributes.get(SpanAttributeFieldName.LINE_NUMBER, None) + + query = ( + "SELECT * FROM c WHERE " + "c.line_run_id = @line_run_id AND c.batch_run_id = @batch_run_id AND c.line_number = @line_number" + ) + parameters = [ + {"name": "@line_run_id", "value": referenced_line_run_id}, + {"name": "@batch_run_id", "value": referenced_batch_run_id}, + {"name": "@line_number", "value": line_number}, + ] + # Don't use partition key for query, we can't know the partition key of main run in all scenarios. + query_results = list(client.query_items(query=query, parameters=parameters, enable_cross_partition_query=True)) + + if query_results: + current_status = query_results[0].get("status", "") + if current_status != OK_LINE_RUN_STATUS: + raise InsertEvaluationsRetriableException( + f"Main run status is {current_status}, cannot patch evaluation now." + ) + main_id = query_results[0]["id"] + main_partition_key = query_results[0]["partition_key"] + else: + raise InsertEvaluationsRetriableException(f"Cannot find main run by parameter {parameters}.") + + if SpanAttributeFieldName.LINE_RUN_ID in attributes: + item.line_run_id = attributes[SpanAttributeFieldName.LINE_RUN_ID] + key = self.span.name + else: + batch_run_id = attributes[SpanAttributeFieldName.BATCH_RUN_ID] + item.batch_run_id = batch_run_id + item.line_number = line_number + # Use the batch run id, instead of the name, as the key in the evaluations dictionary. + # Customers may execute the same evaluation flow multiple times for a batch run. + # We should be able to save all evaluations, as customers use batch runs in a critical manner. + key = batch_run_id + + patch_operations = [{"op": "add", "path": f"/evaluations/{key}", "value": asdict(item)}] + self.logger.info(f"Insert evaluation for LineSummary main_id: {main_id}") + return client.patch_item(item=main_id, partition_key=main_partition_key, patch_operations=patch_operations) + + +class InsertEvaluationsRetriableException(Exception): + pass diff --git a/src/promptflow/promptflow/azure/_utils/__init__.py b/src/promptflow-azure/promptflow/azure/_utils/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_utils/__init__.py rename to src/promptflow-azure/promptflow/azure/_utils/__init__.py diff --git a/src/promptflow-azure/promptflow/azure/_utils/_tracing.py b/src/promptflow-azure/promptflow/azure/_utils/_tracing.py new file mode 100644 index 00000000000..13865d697a0 --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_utils/_tracing.py @@ -0,0 +1,72 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import typing + +from azure.ai.ml import MLClient +from azure.core.exceptions import ResourceNotFoundError +from azure.identity import AzureCliCredential, DefaultAzureCredential + +from promptflow._constants import CosmosDBContainerName +from promptflow._sdk._tracing import get_ws_tracing_base_url +from promptflow._sdk._utils import extract_workspace_triad_from_trace_provider +from promptflow.azure import PFClient +from promptflow.azure._restclient.flow_service_caller import FlowRequestException +from promptflow.exceptions import ErrorTarget, UserErrorException + + +def _get_credential() -> typing.Union[AzureCliCredential, DefaultAzureCredential]: + try: + credential = AzureCliCredential() + credential.get_token("https://management.azure.com/.default") + return credential + except Exception: + return DefaultAzureCredential() + + +def _create_trace_provider_value_user_error(message: str) -> UserErrorException: + return UserErrorException(message=message, target=ErrorTarget.CONTROL_PLANE_SDK) + + +def validate_trace_provider(value: str) -> None: + """Validate `trace.provider` in pf config. + + 1. the value is a valid ARM resource ID for Azure ML workspace + 2. the workspace exists + 3. the workspace Cosmos DB is initialized + """ + # valid Azure ML workspace ARM resource ID; otherwise, a ValueError will be raised + try: + workspace_triad = extract_workspace_triad_from_trace_provider(value) + except ValueError as e: + raise _create_trace_provider_value_user_error(str(e)) + + # the workspace exists + ml_client = MLClient( + credential=_get_credential(), + subscription_id=workspace_triad.subscription_id, + resource_group_name=workspace_triad.resource_group_name, + workspace_name=workspace_triad.workspace_name, + ) + try: + ml_client.workspaces.get(name=workspace_triad.workspace_name) + except ResourceNotFoundError as e: + raise _create_trace_provider_value_user_error(str(e)) + + # the workspace Cosmos DB is initialized + # call PFS API to try to retrieve the token + # otherwise, print the trace ui and hint the user to init the Cosmos DB from Azure portal + pf_client = PFClient(ml_client=ml_client) + try: + pf_client._traces._get_cosmos_db_token(container_name=CosmosDBContainerName.SPAN) + except FlowRequestException as e: + ws_tracing_url = get_ws_tracing_base_url(workspace_triad) + msg = ( + f"Failed attempt to retrieve the Cosmos DB token: {str(e)}, " + "this might because you have not initialized the Cosmos DB for the given workspace, " + "or it's still be initializing.\n" + f"Please open the following link to manually initialize it: {ws_tracing_url}; " + "when it's done, retry the command to set the trace provider again." + ) + raise _create_trace_provider_value_user_error(msg) diff --git a/src/promptflow/promptflow/azure/_utils/_url_utils.py b/src/promptflow-azure/promptflow/azure/_utils/_url_utils.py similarity index 100% rename from src/promptflow/promptflow/azure/_utils/_url_utils.py rename to src/promptflow-azure/promptflow/azure/_utils/_url_utils.py diff --git a/src/promptflow-azure/promptflow/azure/_utils/general.py b/src/promptflow-azure/promptflow/azure/_utils/general.py new file mode 100644 index 00000000000..8785801dd7f --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/_utils/general.py @@ -0,0 +1,39 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import jwt + +from promptflow.core._connection_provider._utils import get_arm_token, get_token + + +def is_arm_id(obj) -> bool: + return isinstance(obj, str) and obj.startswith("azureml://") + + +# Add for backward compitability +get_token = get_token +get_arm_token = get_arm_token + + +def get_aml_token(credential) -> str: + from azure.ai.ml._azure_environments import _get_aml_resource_id_from_metadata + + resource = _get_aml_resource_id_from_metadata() + return get_token(credential, resource) + + +def get_authorization(credential=None) -> str: + token = get_arm_token(credential=credential) + return "Bearer " + token + + +def get_user_alias_from_credential(credential): + token = get_arm_token(credential=credential) + decode_json = jwt.decode(token, options={"verify_signature": False, "verify_aud": False}) + try: + email = decode_json.get("upn", decode_json.get("email", None)) + return email.split("@")[0] + except Exception: + # use oid when failed to get upn, e.g. service principal + return decode_json["oid"] diff --git a/src/promptflow/promptflow/azure/operations/__init__.py b/src/promptflow-azure/promptflow/azure/operations/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/operations/__init__.py rename to src/promptflow-azure/promptflow/azure/operations/__init__.py diff --git a/src/promptflow-azure/promptflow/azure/operations/_arm_connection_operations.py b/src/promptflow-azure/promptflow/azure/operations/_arm_connection_operations.py new file mode 100644 index 00000000000..14c78caf9df --- /dev/null +++ b/src/promptflow-azure/promptflow/azure/operations/_arm_connection_operations.py @@ -0,0 +1,63 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from typing import Dict + +from azure.ai.ml._scope_dependent_operations import ( + OperationConfig, + OperationsContainer, + OperationScope, + _ScopeDependentOperations, +) + +from promptflow.azure._restclient.flow_service_caller import FlowServiceCaller +from promptflow.core._connection_provider._workspace_connection_provider import WorkspaceConnectionProvider +from promptflow.core._errors import OpenURLFailedUserError + + +class ArmConnectionOperations(_ScopeDependentOperations): + """ArmConnectionOperations. + + Get connections from arm api. You should not instantiate this class directly. Instead, you should + create an PFClient instance that instantiates it for you and + attaches it as an attribute. + """ + + def __init__( + self, + operation_scope: OperationScope, + operation_config: OperationConfig, + all_operations: OperationsContainer, + credential, + service_caller: FlowServiceCaller, + **kwargs: Dict, + ): + super(ArmConnectionOperations, self).__init__(operation_scope, operation_config) + self._all_operations = all_operations + self._service_caller = service_caller + self._credential = credential + self._provider = WorkspaceConnectionProvider( + self._operation_scope.subscription_id, + self._operation_scope.resource_group_name, + self._operation_scope.workspace_name, + self._credential, + ) + + def get(self, name, **kwargs): + return self._provider.get(name) + + @classmethod + def _direct_get(cls, name, subscription_id, resource_group_name, workspace_name, credential): + """ + This method is added for local pf_client with workspace provider to ensure we only require limited + permission(workspace/list secrets). As create azure pf_client requires workspace read permission. + """ + provider = WorkspaceConnectionProvider(subscription_id, resource_group_name, workspace_name, credential) + return provider.get(name=name) + + # Keep this as promptflow tools is using this method + _build_connection_dict = WorkspaceConnectionProvider._build_connection_dict + + +# Keep this for backward compatibility of promptflow-tools +OpenURLFailedUserError = OpenURLFailedUserError diff --git a/src/promptflow/promptflow/azure/operations/_artifact_utilities.py b/src/promptflow-azure/promptflow/azure/operations/_artifact_utilities.py similarity index 99% rename from src/promptflow/promptflow/azure/operations/_artifact_utilities.py rename to src/promptflow-azure/promptflow/azure/operations/_artifact_utilities.py index dfcb7893cf9..c4c5cf23011 100644 --- a/src/promptflow/promptflow/azure/operations/_artifact_utilities.py +++ b/src/promptflow-azure/promptflow/azure/operations/_artifact_utilities.py @@ -43,7 +43,8 @@ from azure.storage.blob import BlobSasPermissions, generate_blob_sas from azure.storage.filedatalake import FileSasPermissions, generate_file_sas -from ..._utils.logger_utils import LoggerFactory +from promptflow._utils.logger_utils import LoggerFactory + from ._fileshare_storeage_helper import FlowFileStorageClient module_logger = LoggerFactory.get_logger(__name__) diff --git a/src/promptflow/promptflow/azure/operations/_async_run_downloader.py b/src/promptflow-azure/promptflow/azure/operations/_async_run_downloader.py similarity index 100% rename from src/promptflow/promptflow/azure/operations/_async_run_downloader.py rename to src/promptflow-azure/promptflow/azure/operations/_async_run_downloader.py diff --git a/src/promptflow/promptflow/azure/operations/_connection_operations.py b/src/promptflow-azure/promptflow/azure/operations/_connection_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/operations/_connection_operations.py rename to src/promptflow-azure/promptflow/azure/operations/_connection_operations.py diff --git a/src/promptflow/promptflow/azure/operations/_fileshare_storeage_helper.py b/src/promptflow-azure/promptflow/azure/operations/_fileshare_storeage_helper.py similarity index 100% rename from src/promptflow/promptflow/azure/operations/_fileshare_storeage_helper.py rename to src/promptflow-azure/promptflow/azure/operations/_fileshare_storeage_helper.py diff --git a/src/promptflow/promptflow/azure/operations/_flow_operations.py b/src/promptflow-azure/promptflow/azure/operations/_flow_operations.py similarity index 95% rename from src/promptflow/promptflow/azure/operations/_flow_operations.py rename to src/promptflow-azure/promptflow/azure/operations/_flow_operations.py index 91c2dafdb0d..486b5584043 100644 --- a/src/promptflow/promptflow/azure/operations/_flow_operations.py +++ b/src/promptflow-azure/promptflow/azure/operations/_flow_operations.py @@ -24,7 +24,8 @@ from azure.ai.ml.operations._operation_orchestrator import OperationOrchestrator from azure.core.exceptions import HttpResponseError -from promptflow._constants import FlowLanguage +from promptflow._constants import FLEX_FLOW_PUBLIC_NAME +from promptflow._proxy import ProxyFactory from promptflow._sdk._constants import ( CLIENT_FLOW_TYPE_2_SERVICE_FLOW_TYPE, DAG_FILE_NAME, @@ -35,8 +36,9 @@ ) from promptflow._sdk._errors import FlowOperationError from promptflow._sdk._telemetry import ActivityType, WorkspaceTelemetryMixin, monitor_operation -from promptflow._sdk._utils import PromptflowIgnoreFile, generate_flow_meta +from promptflow._sdk._utils import PromptflowIgnoreFile from promptflow._sdk._vendor._asset_utils import traverse_directory +from promptflow._utils.flow_utils import resolve_flow_path from promptflow._utils.logger_utils import get_cli_sdk_logger from promptflow.azure._constants._flow import DEFAULT_STORAGE from promptflow.azure._entities._flow import Flow @@ -206,6 +208,9 @@ def _update_azure_flow(self, flow: Flow, display_name, **kwargs): @staticmethod def _validate_flow_creation_parameters(source, flow_display_name=None, flow_type=None, **kwargs): """Validate the parameters for flow creation operation.""" + from promptflow._sdk.entities._flow import FlexFlow + from promptflow.client import load_flow as load_local_flow + # validate the source folder logger.info("Validating flow source.") if not Path(source, DAG_FILE_NAME).exists(): @@ -213,6 +218,13 @@ def _validate_flow_creation_parameters(source, flow_display_name=None, flow_type f"Flow source must be a directory with flow definition yaml '{DAG_FILE_NAME}'. " f"Got {Path(source).resolve().as_posix()!r}." ) + # eager flow is not supported since eager flow don't have cloud authoring experience + flow_entity = load_local_flow(source) + if isinstance(flow_entity, FlexFlow): + raise UserErrorException( + f"Flow source {Path(source).resolve().as_posix()!r}. is {FLEX_FLOW_PUBLIC_NAME} flow. " + "Creating it to cloud is not supported." + ) # validate flow source with flow schema logger.info("Validating flow schema.") @@ -244,7 +256,7 @@ def _validate_flow_creation_parameters(source, flow_display_name=None, flow_type @staticmethod def _validate_flow_schema(source, display_name=None, type=None, **kwargs): """Validate the flow schema.""" - from promptflow._sdk.entities._flow import ProtectedFlow + from promptflow._sdk.entities._flow import Flow params_override = copy.deepcopy(kwargs) if display_name is not None: @@ -252,7 +264,7 @@ def _validate_flow_schema(source, display_name=None, type=None, **kwargs): if type is not None: params_override["type"] = type - flow_entity = ProtectedFlow.load(source=source, params_override=params_override) + flow_entity = Flow.load(source=source, params_override=params_override) flow_entity._validate(raise_error=True) # raise error if validation failed flow_dict = flow_entity._dump_for_validation() return flow_dict @@ -481,7 +493,14 @@ def _try_resolve_code_for_flow(cls, flow: Flow, ops: OperationOrchestrator, igno return if flow._code_uploaded: return - cls._generate_meta_for_eager_flow(code=code) + + # generate .promptflow/flow.json for eager flow and .promptflow/flow.dag.yaml for non-eager flow + flow_directory, flow_file = resolve_flow_path(code.path) + ProxyFactory().get_executor_proxy_cls(flow.language).dump_metadata( + flow_file=flow_directory / flow_file, + working_dir=flow_directory, + ) + if ignore_tools_json: ignore_file = code._ignore_file if isinstance(ignore_file, PromptflowIgnoreFile): @@ -597,18 +616,3 @@ def _try_resolve_code_for_flow_to_file_share(cls, flow: Flow, ops: OperationOrch flow._code_uploaded = True # endregion - - @classmethod - def _generate_meta_for_eager_flow(cls, code): - from promptflow import load_flow as load_local_flow - from promptflow._sdk.entities._eager_flow import EagerFlow - - flow = load_local_flow(code.path) - if isinstance(flow, EagerFlow) and flow.language == FlowLanguage.Python: - # TODO: support generate meta for CSharp flow - generate_flow_meta( - flow_directory=code.path, - source_path=flow.entry_file, - entry=flow.entry, - dump=True, - ) diff --git a/src/promptflow/promptflow/azure/operations/_run_operations.py b/src/promptflow-azure/promptflow/azure/operations/_run_operations.py similarity index 96% rename from src/promptflow/promptflow/azure/operations/_run_operations.py rename to src/promptflow-azure/promptflow/azure/operations/_run_operations.py index 987c9703195..23aab7338b8 100644 --- a/src/promptflow/promptflow/azure/operations/_run_operations.py +++ b/src/promptflow-azure/promptflow/azure/operations/_run_operations.py @@ -46,10 +46,11 @@ ) from promptflow._sdk._errors import InvalidRunStatusError, RunNotFoundError, RunOperationParameterError from promptflow._sdk._telemetry import ActivityType, WorkspaceTelemetryMixin, monitor_operation -from promptflow._sdk._utils import in_jupyter_notebook, incremental_print, is_remote_uri, print_red_error +from promptflow._sdk._utils import incremental_print, is_multi_container_enabled, is_remote_uri, print_red_error from promptflow._sdk.entities import Run from promptflow._utils.async_utils import async_run_allowing_running_loop from promptflow._utils.logger_utils import get_cli_sdk_logger +from promptflow._utils.utils import in_jupyter_notebook from promptflow.azure._constants._flow import AUTOMATIC_RUNTIME, AUTOMATIC_RUNTIME_NAME, CLOUD_RUNS_PAGE_SIZE from promptflow.azure._load_functions import load_flow from promptflow.azure._restclient.flow_service_caller import FlowServiceCaller @@ -102,7 +103,6 @@ def __init__( self._credential = credential self._flow_operations = flow_operations self._orchestrators = OperationOrchestrator(self._all_operations, self._operation_scope, self._operation_config) - self._workspace_default_datastore = self._datastore_operations.get_default() @property def _data_operations(self): @@ -118,6 +118,18 @@ def _run_history_endpoint_url(self): endpoint = self._service_caller._service_endpoint return endpoint + "history/v1.0" + self._service_caller._common_azure_url_pattern + @cached_property + def _workspace_default_datastore(self): + kind = self._workspace._kind + # for a normal workspace the kind is "default", for an ai project it's "project". Except these two values, it + # can also be "hub" which is not a supported workspace type to get default datastore. + if kind not in ["default", "project"]: + raise RunOperationParameterError( + "Failed to get default workspace datastore. Please make sure you are using the right workspace which " + f"is either an azure machine learning studio workspace or an azure ai project. Got {kind!r} instead." + ) + return self._datastore_operations.get_default() + def _get_run_portal_url(self, run_id: str): """Get the portal url for the run.""" portal_url, run_info = None, None @@ -1000,13 +1012,14 @@ def _build_resume_request_rest_object( vm_size=resources.get("instance_type"), identity=identity, compute_name=resources.get("compute"), + enable_multi_container=is_multi_container_enabled(), ) return rest_obj @monitor_operation(activity_name="pfazure.runs.resume", activity_type=ActivityType.PUBLICAPI) def _create_by_resume_from(self, resume_from: str, **kwargs): """Create a run by specify resume_from to an existing run.""" - stream = kwargs.get("stream", False) + stream = kwargs.pop("stream", False) run_name = self._service_caller.resume_bulk_run( subscription_id=self._operation_scope.subscription_id, resource_group_name=self._operation_scope.resource_group_name, @@ -1056,3 +1069,15 @@ def _resolve_identity(self, run: Run): run._identity[IdentityKeys.RESOURCE_ID] = resource_id else: raise UserErrorException(f"Identity type {identity_type!r} is not supported.") + + def _get_telemetry_values(self, *args, **kwargs): + activity_name = kwargs.get("activity_name", None) + telemetry_values = super()._get_telemetry_values(*args, **kwargs) + try: + if activity_name == "pfazure.runs.create_or_update": + run: Run = kwargs.get("run", None) or args[0] + telemetry_values["flow_type"] = run._flow_type + except Exception as e: + logger.error(f"Failed to get telemetry values: {str(e)}") + + return telemetry_values diff --git a/src/promptflow/promptflow/azure/operations/_trace_operations.py b/src/promptflow-azure/promptflow/azure/operations/_trace_operations.py similarity index 100% rename from src/promptflow/promptflow/azure/operations/_trace_operations.py rename to src/promptflow-azure/promptflow/azure/operations/_trace_operations.py diff --git a/src/promptflow/promptflow/azure/resources/component_spec_template.yaml b/src/promptflow-azure/promptflow/azure/resources/component_spec_template.yaml similarity index 100% rename from src/promptflow/promptflow/azure/resources/component_spec_template.yaml rename to src/promptflow-azure/promptflow/azure/resources/component_spec_template.yaml diff --git a/src/promptflow-azure/pyproject.toml b/src/promptflow-azure/pyproject.toml new file mode 100644 index 00000000000..5852b07c531 --- /dev/null +++ b/src/promptflow-azure/pyproject.toml @@ -0,0 +1,105 @@ +[tool.poetry] +name = "promptflow-azure" +version = "1.0.0.dev0" +description = "Prompt flow azure" +include = [ + "promptflow/azure/resources/*" +] + +license = "MIT" + +authors = [ + "Microsoft Corporation " +] + +repository = "https://github.com/microsoft/promptflow" +homepage = "https://microsoft.github.io/promptflow/" + +readme = ["README.md"] +keywords = ["azure"] + +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +packages = [ + { include = "promptflow" } +] + +[tool.poetry.urls] +"Bug Reports" = "https://github.com/microsoft/promptflow/issues" + +[tool.poetry.dependencies] +python = ">=3.8,<3.9.7 || >3.9.7,<3.13" +azure-core = ">=1.26.4,<2.0.0" +azure-storage-blob = {extras = ["aio"], version = ">=12.17.0,<13.0.0"} # add [aio] for async run download feature +azure-identity = ">=1.12.0,<2.0.0" +azure-ai-ml = ">=1.14.0,<2.0.0" +azure-cosmos = ">=4.5.1,<5.0.0" # used to upload trace to cloud +pyjwt = ">=2.4.0,<3.0.0" # requirement of control plane SDK +promptflow-devkit = "<2.0.0" + +[tool.poetry.group.dev.dependencies] +pre-commit = "*" +import-linter = "*" + +[tool.poetry.group.test.dependencies] +pytest = "*" +pytest-cov = "*" +pytest-xdist = "*" + +[build-system] +requires = ["poetry-core>=1.5.0"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry.scripts] +pfazure = "promptflow.azure._cli.entry:main" + +[tool.pytest.ini_options] +markers = [ + "unittest", +] +# junit - analyse and publish test results (https://github.com/EnricoMi/publish-unit-test-result-action) +# durations - list the slowest test durations +addopts = """ +--junit-xml=test-results.xml \ +--cov=promptflow \ +--cov-config=pyproject.toml \ +--cov-report=term \ +--cov-report=html \ +--cov-report=xml \ +--dist loadfile \ +--log-level=info \ +--log-format="%(asctime)s %(levelname)s %(message)s" \ +--log-date-format="[%Y-%m-%d %H:%M:%S]" \ +--durations=5 \ +-ra \ +-vv +""" +testpaths = ["tests"] + +[tool.coverage.run] +omit = [ + "__init__.py", +] + +[tool.black] +line-length = 120 + +[tool.importlinter] +root_package = "promptflow" +include_external_packages = "True" + +[[tool.importlinter.contracts]] +name = "Contract forbidden modules" +type = "forbidden" +source_modules = ["promptflow.azure"] +forbidden_modules = [] diff --git a/src/promptflow-azure/tests/unittests/test.py b/src/promptflow-azure/tests/unittests/test.py new file mode 100644 index 00000000000..226a2ed4261 --- /dev/null +++ b/src/promptflow-azure/tests/unittests/test.py @@ -0,0 +1,11 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import pytest + + +@pytest.mark.unittest +class TestStartTrace: + def test_import(self): + assert True diff --git a/src/promptflow-core/README.md b/src/promptflow-core/README.md new file mode 100644 index 00000000000..0e9121ac628 --- /dev/null +++ b/src/promptflow-core/README.md @@ -0,0 +1,20 @@ +# Prompt flow core + +[![Python package](https://img.shields.io/pypi/v/promptflow-core)](https://pypi.org/project/promptflow-core/) +[![Python](https://img.shields.io/pypi/pyversions/promptflow.svg?maxAge=2592000)](https://pypi.python.org/pypi/promptflow-core/) +[![SDK](https://img.shields.io/badge/SDK-reference-blue)](https://microsoft.github.io/promptflow/reference/python-library-reference/promptflow-core/promptflow.html) +[![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow-core)](https://pypi.org/project/promptflow-core/) + +## Introduction + +The `promptflow-core` package provides the essential features needed to execute a `flow` in prompt flow. + +For those seeking a **minimal** dependency to execute a flow in serving or cloud run scenarios, installing this package alone will suffice. + +However, if you require the full capabilities of the `devkit` to simplify the usage of flow, connection, and run in local development lifecycle, please install the complete package using `pip install promptflow`. + +# Release History + +## 0.1.0b1 (Upcoming) + +- Stub version in PyPI. diff --git a/src/promptflow/promptflow/_constants.py b/src/promptflow-core/promptflow/_constants.py similarity index 56% rename from src/promptflow/promptflow/_constants.py rename to src/promptflow-core/promptflow/_constants.py index be31a095d7c..f81b9588943 100644 --- a/src/promptflow/promptflow/_constants.py +++ b/src/promptflow-core/promptflow/_constants.py @@ -1,13 +1,18 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +from enum import Enum from pathlib import Path CONNECTION_NAME_PROPERTY = "__connection_name" CONNECTION_SECRET_KEYS = "__secret_keys" +CONNECTION_SCRUBBED_VALUE = "******" +CONNECTION_SCRUBBED_VALUE_NO_CHANGE = "" PROMPTFLOW_CONNECTIONS = "PROMPTFLOW_CONNECTIONS" PROMPTFLOW_SECRETS_FILE = "PROMPTFLOW_SECRETS_FILE" PF_NO_INTERACTIVE_LOGIN = "PF_NO_INTERACTIVE_LOGIN" +PF_RUN_AS_BUILT_BINARY = "PF_RUN_AS_BUILT_BINARY" +ENABLE_MULTI_CONTAINER_KEY = "PF_ENABLE_MULTI_CONTAINER" PF_LOGGING_LEVEL = "PF_LOGGING_LEVEL" OPENAI_API_KEY = "openai-api-key" BING_API_KEY = "bing-api-key" @@ -17,6 +22,11 @@ ERROR_RESPONSE_COMPONENT_NAME = "promptflow" EXTENSION_UA = "prompt-flow-extension" LANGUAGE_KEY = "language" +USER_AGENT_OVERRIDE_KEY = "user_agent_override" + +DEFAULT_FLOW_YAML_FILE_NAME = "flow.dag.yaml" + +CHAT_HISTORY = "chat_history" # Tool meta info ICON_DARK = "icon_dark" @@ -24,15 +34,24 @@ ICON = "icon" UIONLY_HIDDEN = "uionly_hidden" SKIP_FUNC_PARAMS = ["subscription_id", "resource_group_name", "workspace_name"] -TOOL_SCHEMA = Path(__file__).parent / "_sdk" / "data" / "tool.schema.json" +TOOL_SCHEMA = Path(__file__).parent / "_core" / "data" / "tool.schema.json" PF_MAIN_MODULE_NAME = "__pf_main__" DEFAULT_ENCODING = "utf-8" +FLOW_META_JSON = "flow.json" +FLOW_META_JSON_GEN_TIMEOUT = 60 +PROMPT_FLOW_DIR_NAME = ".promptflow" +FLOW_TOOLS_JSON = "flow.tools.json" # Constants related to execution LINE_NUMBER_KEY = "line_number" # Using the same key with portal. +# Fill zero to the left of line number to make it 9 digits. This is to make sure the line number file name is sortable. +LINE_NUMBER_WIDTH = 9 LINE_TIMEOUT_SEC = 600 +# Environment variables +PF_LONG_RUNNING_LOGGING_INTERVAL = "PF_LONG_RUNNING_LOGGING_INTERVAL" + class FlowLanguage: """The enum of tool source type.""" @@ -41,6 +60,20 @@ class FlowLanguage: CSharp = "csharp" +class FlowEntryRegex: + """The regex pattern for flow entry function.""" + + Python = r"^[a-zA-Z0-9_.]+:[a-zA-Z0-9_]+$" + CSharp = r"\((.+)\)[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+" + + +class FlowType: + """The enum of flow type.""" + + DAG_FLOW = "dag" + FLEX_FLOW = "flex" + + class AvailableIDE: VS = "vs" VS_CODE = "vsc" @@ -64,11 +97,16 @@ class AvailableIDE: # trace related OTEL_RESOURCE_SERVICE_NAME = "promptflow" DEFAULT_SPAN_TYPE = "default" +RUNNING_LINE_RUN_STATUS = "Running" +OK_LINE_RUN_STATUS = "Ok" +SPAN_EVENTS_ATTRIBUTES_EVENT_ID = "event.id" class TraceEnvironmentVariableName: EXPERIMENT = "PF_TRACE_EXPERIMENT" - SESSION_ID = "PF_TRACE_SESSION_ID" + COLLECTION = "PF_TRACE_COLLECTION" + SESSION_ID = "PF_TRACE_SESSION_ID" # will be deprecated + COLLECTION_ID = "PF_TRACE_COLLECTION_ID" SUBSCRIPTION_ID = "PF_TRACE_SUBSCRIPTION_ID" RESOURCE_GROUP_NAME = "PF_TRACE_RESOURCE_GROUP_NAME" WORKSPACE_NAME = "PF_TRACE_WORKSPACE_NAME" @@ -77,6 +115,7 @@ class TraceEnvironmentVariableName: class CosmosDBContainerName: SPAN = "Span" LINE_SUMMARY = "LineSummary" + COLLECTION = "Collection" class SpanFieldName: @@ -91,6 +130,7 @@ class SpanFieldName: EVENTS = "events" LINKS = "links" RESOURCE = "resource" + EXTERNAL_EVENT_DATA_URIS = "external_event_data_uris" class SpanContextFieldName: @@ -111,9 +151,9 @@ class SpanAttributeFieldName: INPUTS = "inputs" OUTPUT = "output" # token metrics - COMPLETION_TOKEN_COUNT = "llm.token_count.completion" - PROMPT_TOKEN_COUNT = "llm.token_count.prompt" - TOTAL_TOKEN_COUNT = "llm.token_count.total" + COMPLETION_TOKEN_COUNT = "llm.usage.completion_tokens" + PROMPT_TOKEN_COUNT = "llm.usage.prompt_tokens" + TOTAL_TOKEN_COUNT = "llm.usage.total_tokens" CUMULATIVE_COMPLETION_TOKEN_COUNT = "__computed__.cumulative_token_count.completion" CUMULATIVE_PROMPT_TOKEN_COUNT = "__computed__.cumulative_token_count.prompt" CUMULATIVE_TOTAL_TOKEN_COUNT = "__computed__.cumulative_token_count.total" @@ -127,10 +167,14 @@ class SpanAttributeFieldName: PROMPT_TOKEN_COUNT = "__computed__.cumulative_token_count.prompt" TOTAL_TOKEN_COUNT = "__computed__.cumulative_token_count.total" + SESSION_ID = "session_id" + class SpanResourceAttributesFieldName: SERVICE_NAME = "service.name" SESSION_ID = "session.id" + COLLECTION = "collection" # local + COLLECTION_ID = "collection.id" # cloud & local to cloud EXPERIMENT_NAME = "experiment.name" # local to cloud SUBSCRIPTION_ID = "subscription.id" @@ -160,7 +204,64 @@ class SpanLinkFieldName: class MessageFormatType: BASIC = "basic" - OPENAI_VISION = "openai_vision" + OPENAI_VISION = "openai-vision" DEFAULT_OUTPUT_NAME = "output" +OUTPUT_FILE_NAME = "output.jsonl" + + +class OutputsFolderName: + FLOW_OUTPUTS = "flow_outputs" + FLOW_ARTIFACTS = "flow_artifacts" + NODE_ARTIFACTS = "node_artifacts" + + +class ConnectionType(str, Enum): + _NOT_SET = "NotSet" + AZURE_OPEN_AI = "AzureOpenAI" + OPEN_AI = "OpenAI" + QDRANT = "Qdrant" + COGNITIVE_SEARCH = "CognitiveSearch" + SERP = "Serp" + AZURE_CONTENT_SAFETY = "AzureContentSafety" + FORM_RECOGNIZER = "FormRecognizer" + WEAVIATE = "Weaviate" + SERVERLESS = "Serverless" + CUSTOM = "Custom" + + +class ConnectionAuthMode: + KEY = "key" + MEID_TOKEN = "meid_token" # Microsoft Entra ID + + +class CustomStrongTypeConnectionConfigs: + PREFIX = "promptflow.connection." + TYPE = "custom_type" + MODULE = "module" + PACKAGE = "package" + PACKAGE_VERSION = "package_version" + PROMPTFLOW_TYPE_KEY = PREFIX + TYPE + PROMPTFLOW_MODULE_KEY = PREFIX + MODULE + PROMPTFLOW_PACKAGE_KEY = PREFIX + PACKAGE + PROMPTFLOW_PACKAGE_VERSION_KEY = PREFIX + PACKAGE_VERSION + + @staticmethod + def is_custom_key(key): + return key not in [ + CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY, + CustomStrongTypeConnectionConfigs.PROMPTFLOW_MODULE_KEY, + CustomStrongTypeConnectionConfigs.PROMPTFLOW_PACKAGE_KEY, + CustomStrongTypeConnectionConfigs.PROMPTFLOW_PACKAGE_VERSION_KEY, + ] + + +class ConnectionProviderConfig: + LOCAL = "local" + AZUREML = "azureml" + + +CONNECTION_DATA_CLASS_KEY = "DATA_CLASS" + +FLEX_FLOW_PUBLIC_NAME = "flex" diff --git a/src/promptflow/promptflow/azure/_storage/cosmosdb/__init__.py b/src/promptflow-core/promptflow/_core/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_storage/cosmosdb/__init__.py rename to src/promptflow-core/promptflow/_core/__init__.py diff --git a/src/promptflow/promptflow/_core/_errors.py b/src/promptflow-core/promptflow/_core/_errors.py similarity index 100% rename from src/promptflow/promptflow/_core/_errors.py rename to src/promptflow-core/promptflow/_core/_errors.py diff --git a/src/promptflow/promptflow/_core/cache_manager.py b/src/promptflow-core/promptflow/_core/cache_manager.py similarity index 100% rename from src/promptflow/promptflow/_core/cache_manager.py rename to src/promptflow-core/promptflow/_core/cache_manager.py diff --git a/src/promptflow/promptflow/_core/connection_manager.py b/src/promptflow-core/promptflow/_core/connection_manager.py similarity index 97% rename from src/promptflow/promptflow/_core/connection_manager.py rename to src/promptflow-core/promptflow/_core/connection_manager.py index e1bc4b4b1b4..f94daf0df77 100644 --- a/src/promptflow/promptflow/_core/connection_manager.py +++ b/src/promptflow-core/promptflow/_core/connection_manager.py @@ -9,8 +9,12 @@ from pathlib import Path from typing import Any, Dict, List -from promptflow._constants import CONNECTION_NAME_PROPERTY, CONNECTION_SECRET_KEYS, PROMPTFLOW_CONNECTIONS -from promptflow._sdk._constants import CustomStrongTypeConnectionConfigs +from promptflow._constants import ( + CONNECTION_NAME_PROPERTY, + CONNECTION_SECRET_KEYS, + PROMPTFLOW_CONNECTIONS, + CustomStrongTypeConnectionConfigs, +) from promptflow._utils.utils import try_import from promptflow.contracts.tool import ConnectionType from promptflow.contracts.types import Secret diff --git a/src/promptflow/promptflow/_sdk/data/tool.schema.json b/src/promptflow-core/promptflow/_core/data/tool.schema.json similarity index 100% rename from src/promptflow/promptflow/_sdk/data/tool.schema.json rename to src/promptflow-core/promptflow/_core/data/tool.schema.json diff --git a/src/promptflow/promptflow/_core/flow_execution_context.py b/src/promptflow-core/promptflow/_core/flow_execution_context.py similarity index 92% rename from src/promptflow/promptflow/_core/flow_execution_context.py rename to src/promptflow-core/promptflow/_core/flow_execution_context.py index 55d2e4d3755..4d93f6cff09 100644 --- a/src/promptflow/promptflow/_core/flow_execution_context.py +++ b/src/promptflow-core/promptflow/_core/flow_execution_context.py @@ -13,18 +13,21 @@ from logging import WARNING from typing import Callable +from promptflow._constants import MessageFormatType from promptflow._core._errors import ToolExecutionError, UnexpectedError from promptflow._core.cache_manager import AbstractCacheManager, CacheInfo, CacheResult from promptflow._utils.logger_utils import flow_logger, logger from promptflow._utils.thread_utils import RepeatLogTimer -from promptflow._utils.utils import generate_elapsed_time_messages +from promptflow._utils.utils import generate_elapsed_time_messages, try_get_long_running_logging_interval from promptflow.contracts.flow import Node from promptflow.contracts.run_info import RunInfo from promptflow.exceptions import PromptflowException +from promptflow.tracing._thread_local_singleton import ThreadLocalSingleton from promptflow.tracing._tracer import Tracer from .run_tracker import RunTracker -from .thread_local_singleton import ThreadLocalSingleton + +DEFAULT_LOGGING_INTERVAL = 60 class FlowExecutionContext(ThreadLocalSingleton): @@ -41,7 +44,7 @@ def __init__( run_id=None, flow_id=None, line_number=None, - variant_id=None, + message_format=MessageFormatType.BASIC, ): self._name = name self._run_tracker = run_tracker @@ -49,7 +52,7 @@ def __init__( self._run_id = run_id or str(uuid.uuid4()) self._flow_id = flow_id or self._run_id self._line_number = line_number - self._variant_id = variant_id + self._message_format = message_format def copy(self): return FlowExecutionContext( @@ -59,11 +62,10 @@ def copy(self): run_id=self._run_id, flow_id=self._flow_id, line_number=self._line_number, - variant_id=self._variant_id, ) def cancel_node_runs(self, msg): - self._run_tracker.cancel_node_runs(msg, self._run_id) + self._run_tracker.cancel_node_runs(self._run_id, msg) def invoke_tool(self, node: Node, f: Callable, kwargs): run_info = self._prepare_node_run(node, f, kwargs) @@ -85,7 +87,7 @@ def invoke_tool(self, node: Node, f: Callable, kwargs): if not hit_cache: Tracer.start_tracing(node_run_id, node.name) - result = self._invoke_tool_with_timer(node, f, kwargs) + result = self._invoke_tool_inner(node, f, kwargs) traces = Tracer.end_tracing(node_run_id) self._run_tracker.end_run(node_run_id, result=result, traces=traces) @@ -114,9 +116,9 @@ def _prepare_node_run(self, node: Node, f, kwargs={}): parent_run_id=parent_run_id, run_id=node_run_id, index=self._line_number, + message_format=self._message_format, ) run_info.index = self._line_number - run_info.variant_id = self._variant_id self._run_tracker.set_inputs(node_run_id, {key: value for key, value in kwargs.items() if key != "self"}) return run_info @@ -170,14 +172,17 @@ async def _invoke_tool_async_inner(self, node: Node, f: Callable, kwargs): # and shows stack trace in the error message to make it easy for user to troubleshoot. raise ToolExecutionError(node_name=node.name, module=module) from e - def _invoke_tool_with_timer(self, node: Node, f: Callable, kwargs): + def _invoke_tool_inner(self, node: Node, f: Callable, kwargs): module = f.func.__module__ if isinstance(f, functools.partial) else f.__module__ node_name = node.name try: + if ( + interval_seconds := try_get_long_running_logging_interval(flow_logger, DEFAULT_LOGGING_INTERVAL) + ) is None: + return f(**kwargs) logging_name = node_name if self._line_number is not None: logging_name = f"{node_name} in line {self._line_number}" - interval_seconds = 60 start_time = time.perf_counter() thread_id = threading.current_thread().ident with RepeatLogTimer( @@ -211,7 +216,7 @@ def bypass_node(self, node: Node): parent_run_id=parent_run_id, run_id=node_run_id, index=self._line_number, - variant_id=self._variant_id, + message_format=self._message_format, ) self._run_tracker.persist_node_run(run_info) diff --git a/src/promptflow/promptflow/_core/log_manager.py b/src/promptflow-core/promptflow/_core/log_manager.py similarity index 92% rename from src/promptflow/promptflow/_core/log_manager.py rename to src/promptflow-core/promptflow/_core/log_manager.py index ca3b6fc019a..229b74c14a3 100644 --- a/src/promptflow/promptflow/_core/log_manager.py +++ b/src/promptflow-core/promptflow/_core/log_manager.py @@ -119,6 +119,12 @@ def write(self, s: str): else: self._write_to_flow_log(log_info, s) stdout: StringIO = self.run_id_to_stdout.get(log_info.run_id) + # When the line execution timeout is reached, all running nodes will be cancelled and node info will + # be cleared. This will remove StringIO from self.run_id_to_stdout. For sync tools running in a worker + # thread, they can't be stopped and self._context won't change in the worker + # thread because it's a thread-local variable. Therefore, we need to check if StringIO is None here. + if stdout is None: + return if self._record_datetime and s != "\n": # For line breaker, do not add datetime prefix. s = f"[{datetime.now(timezone.utc).strftime(self.DATETIME_FORMAT)}] {s}" stdout.write(s) diff --git a/src/promptflow/promptflow/_core/metric_logger.py b/src/promptflow-core/promptflow/_core/metric_logger.py similarity index 100% rename from src/promptflow/promptflow/_core/metric_logger.py rename to src/promptflow-core/promptflow/_core/metric_logger.py diff --git a/src/promptflow-core/promptflow/_core/operation_context.py b/src/promptflow-core/promptflow/_core/operation_context.py new file mode 100644 index 00000000000..1dd5812a377 --- /dev/null +++ b/src/promptflow-core/promptflow/_core/operation_context.py @@ -0,0 +1,3 @@ +# flake8: noqa +# for backward compatibility of PRS +from promptflow.tracing._operation_context import OperationContext diff --git a/src/promptflow/promptflow/_core/run_tracker.py b/src/promptflow-core/promptflow/_core/run_tracker.py similarity index 94% rename from src/promptflow/promptflow/_core/run_tracker.py rename to src/promptflow-core/promptflow/_core/run_tracker.py index 6a6cfcac5fa..c10a20dd2cb 100644 --- a/src/promptflow/promptflow/_core/run_tracker.py +++ b/src/promptflow-core/promptflow/_core/run_tracker.py @@ -9,13 +9,11 @@ from types import GeneratorType from typing import Any, Dict, List, Mapping, Optional, Union +from promptflow._constants import MessageFormatType from promptflow._core._errors import FlowOutputUnserializable, RunRecordNotFound, ToolCanceledError from promptflow._core.log_manager import NodeLogManager -from promptflow._core.thread_local_singleton import ThreadLocalSingleton -from promptflow._utils.dataclass_serializer import serialize from promptflow._utils.exception_utils import ExceptionPresenter from promptflow._utils.logger_utils import flow_logger -from promptflow._utils.openai_metrics_calculator import OpenAIMetricsCalculator from promptflow._utils.run_tracker_utils import _deep_copy_and_extract_items_from_generator_proxy from promptflow._utils.utils import default_json_encoder from promptflow.contracts.run_info import FlowRunInfo, RunInfo, Status @@ -24,6 +22,10 @@ from promptflow.exceptions import ErrorTarget from promptflow.storage import AbstractRunStorage from promptflow.storage._run_storage import DummyRunStorage +from promptflow.tracing._openai_utils import OpenAIMetricsCalculator +from promptflow.tracing._operation_context import OperationContext +from promptflow.tracing._thread_local_singleton import ThreadLocalSingleton +from promptflow.tracing._utils import serialize class RunTracker(ThreadLocalSingleton): @@ -81,7 +83,7 @@ def start_flow_run( parent_run_id="", inputs=None, index=None, - variant_id="", + message_format=MessageFormatType.BASIC, ) -> FlowRunInfo: """Create a flow run and save to run storage on demand.""" run_info = FlowRunInfo( @@ -99,7 +101,7 @@ def start_flow_run( start_time=datetime.utcnow(), end_time=None, index=index, - variant_id=variant_id, + message_format=message_format, ) self.persist_flow_run(run_info) self._flow_runs[run_id] = run_info @@ -113,6 +115,7 @@ def start_node_run( parent_run_id, run_id, index, + message_format=MessageFormatType.BASIC, ): run_info = RunInfo( node=node, @@ -126,6 +129,7 @@ def start_node_run( parent_run_id=parent_run_id, start_time=datetime.utcnow(), end_time=None, + message_format=message_format, ) self._node_runs[run_id] = run_info self._current_run_id = run_id @@ -140,7 +144,7 @@ def bypass_node_run( parent_run_id, run_id, index, - variant_id, + message_format=MessageFormatType.BASIC, ): run_info = RunInfo( node=node, @@ -156,13 +160,15 @@ def bypass_node_run( end_time=datetime.utcnow(), result=None, index=index, - variant_id=variant_id, api_calls=[], + message_format=message_format, ) self._node_runs[run_id] = run_info return run_info def _flow_run_postprocess(self, run_info: FlowRunInfo, output, ex: Optional[Exception]): + # Try get otel trace id for correlation. + run_info.otel_trace_id = OperationContext.get_instance().get("otel_trace_id") if output: try: self._assert_flow_output_serializable(output) @@ -242,14 +248,14 @@ def _common_postprocess(self, run_info, output, ex): run_info.system_metrics = run_info.system_metrics or {} run_info.system_metrics["duration"] = duration - def cancel_node_runs(self, msg: str, flow_run_id): + def cancel_node_runs(self, flow_run_id: Optional[str] = None, msg: str = "Received cancel request."): node_runs = self.collect_node_runs(flow_run_id) for node_run_info in node_runs: if node_run_info.status != Status.Running: continue msg = msg.rstrip(".") # Avoid duplicated "." in the end of the message. err = ToolCanceledError( - message_format="Tool execution is canceled because of the error: {msg}.", + message_format="Tool execution is canceled because: {msg}.", msg=msg, target=ErrorTarget.EXECUTOR, ) @@ -341,10 +347,15 @@ def _enrich_run_info_with_exception(self, run_info: Union[RunInfo, FlowRunInfo], """Update exception details into run info.""" # Update status to Cancelled the run terminates because of KeyboardInterruption or CancelledError. if isinstance(ex, KeyboardInterrupt) or isinstance(ex, asyncio.CancelledError): + ex = ToolCanceledError( + message_format="Tool execution is canceled because: {msg}.", + msg="Received cancel request.", + target=ErrorTarget.EXECUTOR, + ) run_info.status = Status.Canceled else: - run_info.error = ExceptionPresenter.create(ex).to_dict(include_debug_info=self._debug) run_info.status = Status.Failed + run_info.error = ExceptionPresenter.create(ex).to_dict(include_debug_info=self._debug) def collect_all_run_infos_as_dicts(self) -> Mapping[str, List[Mapping[str, Any]]]: flow_runs = self.flow_run_list diff --git a/src/promptflow/promptflow/_core/token_provider.py b/src/promptflow-core/promptflow/_core/token_provider.py similarity index 100% rename from src/promptflow/promptflow/_core/token_provider.py rename to src/promptflow-core/promptflow/_core/token_provider.py diff --git a/src/promptflow/promptflow/_core/tool.py b/src/promptflow-core/promptflow/_core/tool.py similarity index 99% rename from src/promptflow/promptflow/_core/tool.py rename to src/promptflow-core/promptflow/_core/tool.py index 6ed35dd3b8f..ae326524b5a 100644 --- a/src/promptflow/promptflow/_core/tool.py +++ b/src/promptflow-core/promptflow/_core/tool.py @@ -76,7 +76,7 @@ def tool_decorator(func: Callable) -> Callable: raise UserErrorException(f"Tool type {type} is not supported yet.") # Calls to tool functions should be traced automatically. - new_f = _traced(func, trace_type=TraceType.TOOL) + new_f = _traced(func, trace_type=TraceType.FUNCTION) new_f.__tool = None # This will be set when generating the tool definition. new_f.__name = name diff --git a/src/promptflow/promptflow/_core/tool_meta_generator.py b/src/promptflow-core/promptflow/_core/tool_meta_generator.py similarity index 97% rename from src/promptflow/promptflow/_core/tool_meta_generator.py rename to src/promptflow-core/promptflow/_core/tool_meta_generator.py index 138c11ed465..df14b42b1c4 100644 --- a/src/promptflow/promptflow/_core/tool_meta_generator.py +++ b/src/promptflow-core/promptflow/_core/tool_meta_generator.py @@ -118,6 +118,9 @@ def collect_flow_entry_in_module(m, entry): func = getattr(m, func_name, None) if isinstance(func, types.FunctionType): return func + elif inspect.isclass(func) and hasattr(func, "__call__"): + # check if the entry is a callable class + return func.__call__ raise PythonLoadError( message_format="Failed to collect flow entry '{entry}' in module '{module}'.", entry=entry, @@ -492,7 +495,12 @@ def generate_tool_meta_in_subprocess( return tool_dict, exception_dict -def generate_flow_meta_dict_by_file(entry: str, source: str = None, path: str = None): +def generate_flow_meta_dict_by_file(data: dict, source: str = None, path: str = None): + """Generate flow meta for eager flow data. + Original flow configuration like environment variables will be generated in meta. + """ + + entry = data.get("entry") if path: m = load_python_module_from_file(Path(path)) else: @@ -503,7 +511,8 @@ def generate_flow_meta_dict_by_file(entry: str, source: str = None, path: str = # _parse_tool_from_function to parse the interface of the entry function to get the inputs and outputs. tool = _parse_tool_from_function(f, include_outputs=True) - flow_meta = {"entry": entry, "function": f.__name__} + # Include data in generated meta to avoid flow definition's fields(e.g. environment variable) missing. + flow_meta = {"function": f.__name__, **data} if source: flow_meta["source"] = source if tool.inputs: @@ -511,6 +520,8 @@ def generate_flow_meta_dict_by_file(entry: str, source: str = None, path: str = for k, v in tool.inputs.items(): # We didn't support specifying multiple types for inputs, so we only take the first one. flow_meta["inputs"][k] = {"type": v.type[0].value} + if v.default is not None: + flow_meta["inputs"][k]["default"] = v.default if tool.outputs: flow_meta["outputs"] = {} for k, v in tool.outputs.items(): diff --git a/src/promptflow/promptflow/_core/tool_settings_parser.py b/src/promptflow-core/promptflow/_core/tool_settings_parser.py similarity index 94% rename from src/promptflow/promptflow/_core/tool_settings_parser.py rename to src/promptflow-core/promptflow/_core/tool_settings_parser.py index b658342597c..ceff40e4182 100644 --- a/src/promptflow/promptflow/_core/tool_settings_parser.py +++ b/src/promptflow-core/promptflow/_core/tool_settings_parser.py @@ -5,7 +5,6 @@ from pathlib import Path from promptflow._constants import ICON, ICON_DARK, ICON_LIGHT -from promptflow._utils.multimedia_utils import convert_multimedia_data_to_base64 from promptflow._utils.tool_utils import asdict_without_none from promptflow.contracts.multimedia import Image from promptflow.exceptions import UserErrorException @@ -75,5 +74,5 @@ def _serialize_image_data(image_path): buffered = io.BytesIO() img.save(buffered, format="PNG") icon_image = Image(buffered.getvalue(), mime_type="image/png") - image_url = convert_multimedia_data_to_base64(icon_image, with_type=True) + image_url = icon_image.to_base64(with_type=True) return image_url diff --git a/src/promptflow/promptflow/_core/tool_validation.py b/src/promptflow-core/promptflow/_core/tool_validation.py similarity index 100% rename from src/promptflow/promptflow/_core/tool_validation.py rename to src/promptflow-core/promptflow/_core/tool_validation.py diff --git a/src/promptflow/promptflow/_core/tools_manager.py b/src/promptflow-core/promptflow/_core/tools_manager.py similarity index 93% rename from src/promptflow/promptflow/_core/tools_manager.py rename to src/promptflow-core/promptflow/_core/tools_manager.py index 3b2272d3985..f790258f0c6 100644 --- a/src/promptflow/promptflow/_core/tools_manager.py +++ b/src/promptflow-core/promptflow/_core/tools_manager.py @@ -10,7 +10,7 @@ import types from functools import partial from pathlib import Path -from typing import Callable, Dict, List, Mapping, Optional, Tuple, Union +from typing import Callable, Dict, List, Mapping, Optional, Tuple, Union, get_origin, get_args from promptflow._core._errors import ( InputTypeMismatch, @@ -34,12 +34,12 @@ RetrieveToolFuncResultError, _find_deprecated_tools, append_workspace_triple_to_func_input_params, + assign_tool_input_index_for_ux_order_if_needed, function_to_tool_definition, get_prompt_param_name_from_func, load_function_from_function_path, validate_dynamic_list_func_response_type, validate_tool_func_result, - assign_tool_input_index_for_ux_order_if_needed, ) from promptflow._utils.yaml_utils import load_yaml from promptflow.contracts.flow import InputAssignment, InputValueType, Node, ToolSourceType @@ -409,38 +409,42 @@ def load_tool_for_node(self, node: Node) -> Tool: else: raise NotImplementedError(f"Tool type {node.type} is not supported yet.") - def load_tool_for_package_node(self, node: Node) -> Tool: - if node.source.tool in self._package_tools: - return Tool.deserialize(self._package_tools[node.source.tool]) + def load_package_tool(self, tool: str) -> Tool: + if tool in self._package_tools: + return Tool.deserialize(self._package_tools[tool]) # If node source tool is not in package tools, try to find the tool ID in deprecated tools. # If found, load the tool with the new tool ID for backward compatibility. - if node.source.tool in self._deprecated_tools: - new_tool_id = self._deprecated_tools[node.source.tool] + if tool in self._deprecated_tools: + new_tool_id = self._deprecated_tools[tool] # Used to collect deprecated tool usage and warn user to replace the deprecated tool with the new one. - module_logger.warning(f"Tool ID '{node.source.tool}' is deprecated. Please use '{new_tool_id}' instead.") + module_logger.warning(f"Tool ID '{tool}' is deprecated. Please use '{new_tool_id}' instead.") return Tool.deserialize(self._package_tools[new_tool_id]) raise PackageToolNotFoundError( - f"Package tool '{node.source.tool}' is not found in the current environment. " + f"Package tool '{tool}' is not found in the current environment. " f"All available package tools are: {list(self._package_tools.keys())}.", target=ErrorTarget.EXECUTOR, ) - def load_tool_for_script_node(self, node: Node) -> Tuple[types.ModuleType, Tool]: - if node.source.path is None: + def load_tool_for_package_node(self, node: Node) -> Tool: + tool = node.source.tool + return self.load_package_tool(tool) + + def load_script_tool(self, path: str, node_name: str) -> Tuple[types.ModuleType, Tool]: + if path is None: raise InvalidSource( target=ErrorTarget.EXECUTOR, message_format="Load tool failed for node '{node_name}'. The source path is 'None'.", - node_name=node.name, + node_name=node_name, ) - path = node.source.path if not (self._working_dir / path).is_file(): raise InvalidSource( target=ErrorTarget.EXECUTOR, - message_format="Load tool failed for node '{node_name}'. Tool file '{source_path}' can not be found.", + message_format="Load tool failed for node '{node_name}'. " + "Tool file '{source_path}' can not be found.", source_path=path, - node_name=node.name, + node_name=node_name, ) m = load_python_module_from_file(self._working_dir / path) if m is None: @@ -448,6 +452,11 @@ def load_tool_for_script_node(self, node: Node) -> Tuple[types.ModuleType, Tool] f, init_inputs = collect_tool_function_in_module(m) return m, _parse_tool_from_function(f, init_inputs, gen_custom_type_conn=True) + def load_tool_for_script_node(self, node: Node) -> Tuple[types.ModuleType, Tool]: + """Load tool for script node.""" + path = node.source.path + return self.load_script_tool(path, node.name) + def load_tool_for_llm_node(self, node: Node) -> Tool: api_name = f"{node.provider}.{node.api}" return BuiltinsManager._load_llm_api(api_name) @@ -459,6 +468,18 @@ def load_tool_for_llm_node(self, node: Node) -> Tool: connection_type_to_api_mapping = {} +def get_all_supported_types(param_annotation) -> list: + types = [] + origin = get_origin(param_annotation) + if origin != Union: + types.append(param_annotation.__name__) + else: + for arg in get_args(param_annotation): + types.append(arg.__name__) + + return types + + def _register(provider_cls, collection, type): from promptflow._core.tool import ToolProvider @@ -474,14 +495,18 @@ def _register(provider_cls, collection, type): module_logger.debug(f"Registered {name} as a builtin function") # Get the connection type - provider name mapping for execution use # Tools/Providers related connection must have been imported + api_name = provider_cls.__name__ + should_break = False for param in initialize_inputs.values(): if not param.annotation: continue - annotation_type_name = param.annotation.__name__ - if annotation_type_name in connections: - api_name = provider_cls.__name__ - module_logger.debug(f"Add connection type {annotation_type_name} to api {api_name} mapping") - connection_type_to_api_mapping[annotation_type_name] = api_name + types = get_all_supported_types(param.annotation) + for type in types: + if type in connections: + module_logger.debug(f"Add connection type {type} to api {api_name} mapping") + connection_type_to_api_mapping[type] = api_name + should_break = True + if should_break: break diff --git a/src/promptflow/promptflow/contracts/__init__.py b/src/promptflow-core/promptflow/_utils/__init__.py similarity index 100% rename from src/promptflow/promptflow/contracts/__init__.py rename to src/promptflow-core/promptflow/_utils/__init__.py diff --git a/src/promptflow-core/promptflow/_utils/_errors.py b/src/promptflow-core/promptflow/_utils/_errors.py new file mode 100644 index 00000000000..65c9b7352ce --- /dev/null +++ b/src/promptflow-core/promptflow/_utils/_errors.py @@ -0,0 +1,26 @@ +from promptflow.exceptions import ErrorTarget, SystemErrorException, UserErrorException, ValidationException + + +class InvalidImageInput(ValidationException): + pass + + +class LoadMultimediaDataError(UserErrorException): + pass + + +class YamlParseError(SystemErrorException): + """Exception raised when yaml parse failed.""" + + pass + + +class ApplyInputMappingError(ValidationException): + def __init__(self, target: ErrorTarget = ErrorTarget.CORE, **kwargs): + super().__init__(target=target, **kwargs) + + +class InvalidMessageFormatType(UserErrorException): + """Exception raised when the message format from yaml is invalid.""" + + pass diff --git a/src/promptflow/promptflow/_utils/async_utils.py b/src/promptflow-core/promptflow/_utils/async_utils.py similarity index 100% rename from src/promptflow/promptflow/_utils/async_utils.py rename to src/promptflow-core/promptflow/_utils/async_utils.py diff --git a/src/promptflow/promptflow/_utils/connection_utils.py b/src/promptflow-core/promptflow/_utils/connection_utils.py similarity index 100% rename from src/promptflow/promptflow/_utils/connection_utils.py rename to src/promptflow-core/promptflow/_utils/connection_utils.py diff --git a/src/promptflow/promptflow/_utils/context_utils.py b/src/promptflow-core/promptflow/_utils/context_utils.py similarity index 100% rename from src/promptflow/promptflow/_utils/context_utils.py rename to src/promptflow-core/promptflow/_utils/context_utils.py diff --git a/src/promptflow/promptflow/_utils/credential_scrubber.py b/src/promptflow-core/promptflow/_utils/credential_scrubber.py similarity index 100% rename from src/promptflow/promptflow/_utils/credential_scrubber.py rename to src/promptflow-core/promptflow/_utils/credential_scrubber.py diff --git a/src/promptflow/promptflow/_utils/credential_utils.py b/src/promptflow-core/promptflow/_utils/credential_utils.py similarity index 86% rename from src/promptflow/promptflow/_utils/credential_utils.py rename to src/promptflow-core/promptflow/_utils/credential_utils.py index c9254f03f6f..720fbdea45f 100644 --- a/src/promptflow/promptflow/_utils/credential_utils.py +++ b/src/promptflow-core/promptflow/_utils/credential_utils.py @@ -2,10 +2,12 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- + def get_default_azure_credential(): from azure.identity import DefaultAzureCredential + try: - from azure.ai.ml._azure_environments import _get_default_cloud_name, EndpointURLS, _get_cloud, AzureEnvironments + from azure.ai.ml._azure_environments import AzureEnvironments, EndpointURLS, _get_cloud, _get_default_cloud_name except ImportError: return DefaultAzureCredential() # Support sovereign cloud cases, like mooncake, fairfax. diff --git a/src/promptflow/promptflow/_utils/dataclass_serializer.py b/src/promptflow-core/promptflow/_utils/dataclass_serializer.py similarity index 59% rename from src/promptflow/promptflow/_utils/dataclass_serializer.py rename to src/promptflow-core/promptflow/_utils/dataclass_serializer.py index b5a09b4b97d..466c64dfd9c 100644 --- a/src/promptflow/promptflow/_utils/dataclass_serializer.py +++ b/src/promptflow-core/promptflow/_utils/dataclass_serializer.py @@ -5,11 +5,9 @@ from dataclasses import fields, is_dataclass from datetime import datetime from enum import Enum -from typing import Any, Callable, Dict, List, Type, TypeVar +from typing import Any, Dict, List, Type, TypeVar from promptflow._constants import DEFAULT_OUTPUT_NAME -from promptflow._core.generator_proxy import GeneratorProxy -from promptflow.contracts.tool import ConnectionType T = TypeVar("T") @@ -58,51 +56,6 @@ def deserialize_value(obj, field_type): return obj -def serialize(value: object, remove_null: bool = False, serialization_funcs: Dict[type, Callable] = None) -> dict: - if serialization_funcs: - for cls, f in serialization_funcs.items(): - if isinstance(value, cls): - return f(value) - if isinstance(value, datetime): - return value.isoformat() + "Z" - if isinstance(value, Enum): - return value.value - if isinstance(value, list): - return [serialize(v, remove_null, serialization_funcs) for v in value] - if isinstance(value, GeneratorProxy): - # TODO: The current implementation of the serialize function is not self-explanatory, as value.items is mutable - # whereas the serialize function should deal with a fixed object. We should rename the function to - # to_serializable to better reflect its purpose. - return value.items - # Note that custom connection check should before dict check - if ConnectionType.is_connection_value(value): - return ConnectionType.serialize_conn(value) - if isinstance(value, dict): - return {k: serialize(v, remove_null, serialization_funcs) for k, v in value.items()} - if is_dataclass(value): - if hasattr(value, "serialize"): - result = value.serialize() - else: - result = { - f.name: serialize(getattr(value, f.name), remove_null, serialization_funcs) for f in fields(value) - } - if not remove_null: - return result - null_keys = [k for k, v in result.items() if v is None] - for k in null_keys: - result.pop(k) - return result - try: - from pydantic import BaseModel - - if isinstance(value, BaseModel): # Handle pydantic model, which is used in langchain - return value.dict() - except ImportError: - # Ignore ImportError if pydantic is not installed - pass - return value - - def assertEqual(a: dict, b: dict, path: str = ""): if isinstance(a, dict): assert isinstance(b, dict), f"{path}: {type(a)} != {type(b)}" diff --git a/src/promptflow/promptflow/_utils/exception_utils.py b/src/promptflow-core/promptflow/_utils/exception_utils.py similarity index 99% rename from src/promptflow/promptflow/_utils/exception_utils.py rename to src/promptflow-core/promptflow/_utils/exception_utils.py index 8e40f331638..ee47dad0feb 100644 --- a/src/promptflow/promptflow/_utils/exception_utils.py +++ b/src/promptflow-core/promptflow/_utils/exception_utils.py @@ -7,9 +7,10 @@ from datetime import datetime from enum import Enum from traceback import TracebackException, format_tb -from types import TracebackType, FrameType +from types import FrameType, TracebackType from promptflow.exceptions import PromptflowException, SystemErrorException, UserErrorException, ValidationException +from promptflow.tracing._operation_context import OperationContext ADDITIONAL_INFO_USER_EXECUTION_ERROR = "ToolExecutionErrorDetails" ADDITIONAL_INFO_USER_CODE_STACKTRACE = "UserCodeStackTrace" @@ -107,8 +108,6 @@ def get_user_execution_error_info(self): return user_execution_error_info def to_dict(self): - from promptflow._core.operation_context import OperationContext - return { "error": self._error_dict, "correlation": None, # TODO: to be implemented diff --git a/src/promptflow/promptflow/_utils/execution_utils.py b/src/promptflow-core/promptflow/_utils/execution_utils.py similarity index 56% rename from src/promptflow/promptflow/_utils/execution_utils.py rename to src/promptflow-core/promptflow/_utils/execution_utils.py index bcf90c9ec97..fcf97e4793f 100644 --- a/src/promptflow/promptflow/_utils/execution_utils.py +++ b/src/promptflow-core/promptflow/_utils/execution_utils.py @@ -7,6 +7,7 @@ from promptflow.contracts.flow import Flow, FlowInputDefinition, InputAssignment, InputValueType from promptflow.contracts.run_info import FlowRunInfo, Status from promptflow.executor import _input_assignment_parser +from promptflow.tracing._operation_context import OperationContext def apply_default_value_for_input(inputs: Dict[str, FlowInputDefinition], line_inputs: Mapping) -> Dict[str, Any]: @@ -69,3 +70,48 @@ def _parse_aggregation_input(nodes_outputs: dict, aggregation_input_property: st """Parse the value of the aggregation input from the nodes outputs.""" assign = InputAssignment.deserialize(aggregation_input_property) return _input_assignment_parser.parse_value(assign, nodes_outputs, {}) + + +def set_batch_input_source_from_inputs_mapping(inputs_mapping): + """Infer the batch input source from the input mapping and set it in the OperationContext instance. + + This method analyzes the `inputs_mapping` to ascertain the origin of the inputs for a batch operation. + The `inputs_mapping` should be a dictionary with keys representing input names and values specifying the sources + of these inputs. Inputs can originate from direct data or from the outputs of a previous run. + + The `inputs_mapping` is dictated entirely by the external caller. For more details on column mapping, refer to + https://aka.ms/pf/column-mapping. The mapping can include references to both the inputs and outputs of previous + runs, using a reserved source name 'run' to indicate such references. However, this method specifically checks + for references to outputs of previous runs, which are denoted by values starting with "${run.outputs". When such + a reference is found, the `batch_input_source` attribute of the OperationContext instance is set to "Run" to + reflect that the batch operation is utilizing outputs from a prior run. + + If no values in the `inputs_mapping` start with "${run.outputs", it is inferred that the inputs do not derive + from a previous run, and the `batch_input_source` is set to "Data". + + Examples of `inputs_mapping`: + - Referencing a previous run's output: + {'input1': '${run.outputs.some_output}', 'input2': 'direct_data'} + In this case, 'input1' is sourced from a prior run's output, and 'input2' is from direct data. + The `batch_input_source` would be set to "Run". + + - Sourcing directly from data: + {'input1': 'data_source1', 'input2': 'data_source2'} + Since no values start with "${run.outputs", the `batch_input_source` is set to "Data". + + Args: + inputs_mapping (Mapping[str, str]): A dictionary mapping input names to their sources, where the sources + can be either direct data or outputs from a previous run. The structure and content of this mapping are + entirely under the control of the external caller. + + Returns: + None + """ + + if inputs_mapping and any( + isinstance(value, str) and value.startswith("${run.outputs") for value in inputs_mapping.values() + ): + batch_input_source = "Run" + else: + batch_input_source = "Data" + OperationContext.get_instance()["batch_input_source"] = batch_input_source diff --git a/src/promptflow/promptflow/_utils/feature_utils.py b/src/promptflow-core/promptflow/_utils/feature_utils.py similarity index 89% rename from src/promptflow/promptflow/_utils/feature_utils.py rename to src/promptflow-core/promptflow/_utils/feature_utils.py index aff621370da..b4bc56fd728 100644 --- a/src/promptflow/promptflow/_utils/feature_utils.py +++ b/src/promptflow-core/promptflow/_utils/feature_utils.py @@ -56,6 +56,11 @@ def get_feature_list(): description="Support resuming batch run.", state=FeatureState.E2ETEST, ), + Feature( + name="LocalPfsForChat", + description="Support starting local http server for flow test.", + state=FeatureState.E2ETEST, + ), ] return feature_list diff --git a/src/promptflow-core/promptflow/_utils/flow_utils.py b/src/promptflow-core/promptflow/_utils/flow_utils.py new file mode 100644 index 00000000000..b723bc45e1f --- /dev/null +++ b/src/promptflow-core/promptflow/_utils/flow_utils.py @@ -0,0 +1,252 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import hashlib +import json +import os +import re +from os import PathLike +from pathlib import Path +from typing import Optional, Tuple, Union + +from promptflow._constants import CHAT_HISTORY, DEFAULT_ENCODING, DEFAULT_FLOW_YAML_FILE_NAME, PROMPT_FLOW_DIR_NAME +from promptflow._core._errors import MetaFileNotFound, MetaFileReadError +from promptflow._utils.logger_utils import LoggerFactory +from promptflow._utils.utils import strip_quotation +from promptflow._utils.yaml_utils import dump_yaml, load_yaml +from promptflow.contracts.flow import Flow as ExecutableFlow +from promptflow.exceptions import ErrorTarget, UserErrorException +from promptflow.tracing._utils import serialize + +logger = LoggerFactory.get_logger(name=__name__) + + +def get_flow_lineage_id(flow_dir: Union[str, PathLike]): + """ + Get the lineage id for flow. The flow lineage id will be same for same flow in same GIT repo or device. + If the flow locates in GIT repo: + use Repo name + relative path to flow_dir as session id + Otherwise: + use device id + absolute path to flow_dir as session id + :param flow_dir: flow directory + """ + flow_dir = Path(flow_dir).resolve() + if not flow_dir.is_dir(): + flow_dir = flow_dir.parent + try: + from git import Repo + + repo = Repo(flow_dir, search_parent_directories=True) + lineage_id = f"{os.path.basename(repo.working_dir)}/{flow_dir.relative_to(repo.working_dir).as_posix()}" + logger.debug("Got lineage id %s from git repo.", lineage_id) + + except Exception: + # failed to get repo, use device id + absolute path to flow_dir as session id + import uuid + + device_id = uuid.getnode() + lineage_id = f"{device_id}/{flow_dir.absolute().as_posix()}" + logger.debug("Got lineage id %s from local since failed to get git info.", lineage_id) + + # hash the value to avoid it gets too long, and it's not user visible. + lineage_id = hashlib.sha256(lineage_id.encode()).hexdigest() + return lineage_id + + +def resolve_flow_path( + flow_path: Union[str, Path, PathLike], base_path: Union[str, Path, PathLike, None] = None, new: bool = False +) -> Tuple[Path, str]: + """Resolve flow path and return the flow directory path and the file name of the target yaml. + + :param flow_path: The path of the flow directory or the flow yaml file. It can either point to a + flow directory or a flow yaml file. + :type flow_path: Union[str, Path, PathLike] + :param base_path: The base path to resolve the flow path. If not specified, the flow path will be + resolved based on the current working directory. + :type base_path: Union[str, Path, PathLike] + :param new: If True, the function will return the flow directory path and the file name of the + target yaml that should be created. If False, the function will try to find the existing + target yaml and raise FileNotFoundError if not found. + :return: The flow directory path and the file name of the target yaml. + :rtype: Tuple[Path, str] + """ + if base_path: + flow_path = Path(base_path) / flow_path + else: + flow_path = Path(flow_path) + + if new: + if flow_path.is_dir(): + return flow_path, DEFAULT_FLOW_YAML_FILE_NAME + return flow_path.parent, flow_path.name + + if flow_path.is_dir() and (flow_path / DEFAULT_FLOW_YAML_FILE_NAME).is_file(): + return flow_path, DEFAULT_FLOW_YAML_FILE_NAME + elif flow_path.is_file(): + return flow_path.parent, flow_path.name + + raise FileNotFoundError(f"Can't find flow with path {flow_path.as_posix()}.") + + +def load_flow_dag(flow_path: Path): + """Load flow dag from given flow path.""" + flow_dir, file_name = resolve_flow_path(flow_path) + flow_path = flow_dir / file_name + if not flow_path.exists(): + raise FileNotFoundError(f"Flow file {flow_path} not found") + with open(flow_path, "r", encoding=DEFAULT_ENCODING) as f: + flow_dag = load_yaml(f) + return flow_path, flow_dag + + +def dump_flow_dag(flow_dag: dict, flow_path: Path): + """Dump flow dag to given flow path.""" + flow_dir, flow_filename = resolve_flow_path(flow_path, new=True) + flow_path = flow_dir / flow_filename + with open(flow_path, "w", encoding=DEFAULT_ENCODING) as f: + dump_yaml(flow_dag, f) + return flow_path + + +def is_flex_flow( + *, file_path: Union[str, Path, None] = None, yaml_dict: Optional[dict] = None, working_dir: Optional[Path] = None +): + """Check if the flow is a flex flow.""" + if file_path is None and yaml_dict is None: + raise UserErrorException("Either file_path or yaml_dict should be provided.") + if file_path is not None and yaml_dict is not None: + raise UserErrorException("Only one of file_path and yaml_dict should be provided.") + if file_path is not None: + file_path = Path(file_path) + if working_dir is not None and not file_path.is_absolute(): + file_path = working_dir / file_path + if file_path.suffix.lower() not in [".yaml", ".yml"]: + return False + yaml_dict = load_yaml(file_path) + return isinstance(yaml_dict, dict) and "entry" in yaml_dict + + +def resolve_entry_file(entry: str, working_dir: Path) -> Optional[str]: + """Resolve entry file from entry. + If entry is a local file, e.g. my.local.file:entry_function, return the local file: my/local/file.py + and executor will import it from local file. + Else, assume the entry is from a package e.g. external.module:entry, return None + and executor will try import it from package. + """ + try: + entry_file = f'{entry.split(":")[0].replace(".", "/")}.py' + except Exception as e: + raise UserErrorException(f"Entry function {entry} is not valid: {e}") + entry_file = working_dir / entry_file + if entry_file.exists(): + return entry_file.resolve().absolute().as_posix() + # when entry file not found in working directory, return None since it can come from package + return None + + +def read_json_content(file_path: Path, target: str) -> dict: + if file_path.is_file(): + with open(file_path, mode="r", encoding=DEFAULT_ENCODING) as f: + try: + return json.load(f) + except json.JSONDecodeError: + raise MetaFileReadError( + message_format="Failed to fetch {target_obj}: {file_path} is not a valid json file.", + file_path=file_path.absolute().as_posix(), + target_obj=target, + ) + raise MetaFileNotFound( + message_format=( + "Failed to fetch meta of tools: cannot find {file_path}, " + "please build the flow project with extension first." + ), + file_path=file_path.absolute().as_posix(), + ) + + +def dump_flow_result(flow_folder, prefix, flow_result=None, node_result=None, custom_path=None): + """Dump flow result for extension. + + :param flow_folder: The flow folder. + :param prefix: The file prefix. + :param flow_result: The flow result returned by exec_line. + :param node_result: The node result when test node returned by load_and_exec_node. + :param custom_path: The custom path to dump flow result. + """ + if flow_result: + flow_serialize_result = { + "flow_runs": [serialize(flow_result.run_info)], + "node_runs": [serialize(run) for run in flow_result.node_run_infos.values()], + } + else: + flow_serialize_result = { + "flow_runs": [], + "node_runs": [serialize(node_result)], + } + + dump_folder = Path(flow_folder) / PROMPT_FLOW_DIR_NAME if custom_path is None else Path(custom_path) + dump_folder.mkdir(parents=True, exist_ok=True) + + with open(dump_folder / f"{prefix}.detail.json", "w", encoding=DEFAULT_ENCODING) as f: + json.dump(flow_serialize_result, f, indent=2, ensure_ascii=False) + if node_result: + metrics = flow_serialize_result["node_runs"][0]["metrics"] + output = flow_serialize_result["node_runs"][0]["output"] + else: + metrics = flow_serialize_result["flow_runs"][0]["metrics"] + output = flow_serialize_result["flow_runs"][0]["output"] + if metrics: + with open(dump_folder / f"{prefix}.metrics.json", "w", encoding=DEFAULT_ENCODING) as f: + json.dump(metrics, f, indent=2, ensure_ascii=False) + if output: + with open(dump_folder / f"{prefix}.output.json", "w", encoding=DEFAULT_ENCODING) as f: + json.dump(output, f, indent=2, ensure_ascii=False) + + +def is_executable_chat_flow(flow: ExecutableFlow): + """ + Check if the flow is chat flow. + Check if chat_history in the flow input and only one chat input and + one chat output to determine if it is a chat flow. + + :param flow: The flow object. + :type flow: promptflow.contracts.flow.Flow + """ + chat_inputs = [item for item in flow.inputs.values() if item.is_chat_input] + chat_outputs = [item for item in flow.outputs.values() if item.is_chat_output] + chat_history_input_name = next( + iter([input_name for input_name, value in flow.inputs.items() if value.is_chat_history]), None + ) + if ( + not chat_history_input_name + and CHAT_HISTORY in flow.inputs + and flow.inputs[CHAT_HISTORY].is_chat_history is not False + ): + chat_history_input_name = CHAT_HISTORY + _is_chat_flow, error_msg = True, "" + if len(chat_inputs) != 1: + _is_chat_flow = False + error_msg = "chat flow does not support multiple chat inputs" + elif len(chat_outputs) != 1: + _is_chat_flow = False + error_msg = "chat flow does not support multiple chat outputs" + elif not chat_history_input_name: + _is_chat_flow = False + error_msg = "chat_history is required in the inputs of chat flow" + return _is_chat_flow, chat_history_input_name, error_msg + + +def parse_variant(variant: str) -> Tuple[str, str]: + variant_regex = r"\${([^.]+).([^}]+)}" + match = re.match(variant_regex, strip_quotation(variant)) + if match: + return match.group(1), match.group(2) + else: + error = ValueError( + f"Invalid variant format: {variant}, variant should be in format of ${{TUNING_NODE.VARIANT}}" + ) + raise UserErrorException( + target=ErrorTarget.CONTROL_PLANE_SDK, + message=str(error), + error=error, + ) diff --git a/src/promptflow/promptflow/_utils/inputs_mapping_utils.py b/src/promptflow-core/promptflow/_utils/inputs_mapping_utils.py similarity index 97% rename from src/promptflow/promptflow/_utils/inputs_mapping_utils.py rename to src/promptflow-core/promptflow/_utils/inputs_mapping_utils.py index 4a681bdbafd..ea93ab823ad 100644 --- a/src/promptflow/promptflow/_utils/inputs_mapping_utils.py +++ b/src/promptflow-core/promptflow/_utils/inputs_mapping_utils.py @@ -5,8 +5,8 @@ from typing import Any, Dict, Mapping from promptflow._constants import LINE_NUMBER_KEY +from promptflow._utils._errors import ApplyInputMappingError from promptflow._utils.logger_utils import LoggerFactory -from promptflow.batch._errors import InputMappingError logger = LoggerFactory.get_logger(name=__name__) @@ -78,7 +78,7 @@ def apply_inputs_mapping( # Return all not found mapping relations in one exception to provide better debug experience. if notfound_mapping_relations: invalid_relations = ", ".join(notfound_mapping_relations) - raise InputMappingError( + raise ApplyInputMappingError( message_format=( "The input for batch run is incorrect. Couldn't find these mapping relations: {invalid_relations}. " "Please make sure your input mapping keys and values match your YAML input section and input data. " diff --git a/src/promptflow/promptflow/_utils/load_data.py b/src/promptflow-core/promptflow/_utils/load_data.py similarity index 93% rename from src/promptflow/promptflow/_utils/load_data.py rename to src/promptflow-core/promptflow/_utils/load_data.py index 45cdce49342..806c7d699fa 100644 --- a/src/promptflow/promptflow/_utils/load_data.py +++ b/src/promptflow-core/promptflow/_utils/load_data.py @@ -59,12 +59,13 @@ def _bfs_dir(dir_path: List[str]) -> Tuple[List[str], List[str]]: """BFS traverse directory with depth 1, returns files and directories""" files, dirs = [], [] for path in dir_path: - for filename in os.listdir(path): - file = Path(path, filename).resolve() - if file.is_file(): - files.append(str(file)) - else: - dirs.append(str(file)) + if os.path.exists(path): + for filename in os.listdir(path): # Path does not exist and will throw FileNotFoundError + file = Path(path, filename).resolve() + if file.is_file(): + files.append(str(file)) + else: + dirs.append(str(file)) return files, dirs diff --git a/src/promptflow/promptflow/_utils/logger_utils.py b/src/promptflow-core/promptflow/_utils/logger_utils.py similarity index 87% rename from src/promptflow/promptflow/_utils/logger_utils.py rename to src/promptflow-core/promptflow/_utils/logger_utils.py index 2bb8d067298..fca4c9c0a7e 100644 --- a/src/promptflow/promptflow/_utils/logger_utils.py +++ b/src/promptflow-core/promptflow/_utils/logger_utils.py @@ -13,9 +13,10 @@ from contextvars import ContextVar from dataclasses import dataclass from functools import partial +from pathlib import Path from typing import List, Optional -from promptflow._constants import PF_LOGGING_LEVEL +from promptflow._constants import LINE_NUMBER_WIDTH, PF_LOGGING_LEVEL from promptflow._utils.credential_scrubber import CredentialScrubber from promptflow._utils.exception_utils import ExceptionPresenter from promptflow.contracts.run_mode import RunMode @@ -217,10 +218,22 @@ class LogContext: run_mode: Optional[RunMode] = RunMode.Test credential_list: Optional[List[str]] = None # These credentials will be scrubbed in logs. input_logger: logging.Logger = None # If set, then context will also be set for input_logger. + flow_logs_folder: Optional[str] = None # Used in batch mode to specify the folder for flow logs. + line_number: Optional[int] = None # Used in batch mode to specify the line log file name. + + # Before, we only have one FileHandlerConcurrentWrapper for any run mode. + # Now, we have two for batch run mode, one for whole run log, one for single line log. + # For single line log handlers, we create and remove them in __enter__ and __exit__ method, + # to avoid setting same logger path for 2 handlers. + temporary_flow_log_handlers = [] def get_initializer(self): return partial( - LogContext, file_path=self.file_path, run_mode=self.run_mode, credential_list=self.credential_list + LogContext, + file_path=self.file_path, + run_mode=self.run_mode, + credential_list=self.credential_list, + flow_logs_folder=self.flow_logs_folder, ) @staticmethod @@ -244,6 +257,7 @@ def clear_current(): def __enter__(self): self._set_log_path() + self._add_batch_run_flow_logs_handler() self._set_credential_list() LogContext.set_current(self) @@ -258,6 +272,9 @@ def __exit__(self, *args): handler.clear() elif isinstance(handler.formatter, CredentialScrubberFormatter): handler.formatter.clear() + for handlers_to_remove in self.temporary_flow_log_handlers: + logger_.removeHandler(handlers_to_remove) + self.temporary_flow_log_handlers.clear() LogContext.clear_current() def _set_log_path(self): @@ -271,6 +288,21 @@ def _set_log_path(self): handler = FileHandler(self.file_path) log_handler.handler = handler + # During __enter__ method, add FileHandlerConcurrentWrapper for batch run mode's single line execution log. + # And remove it during __exit__ method. + def _add_batch_run_flow_logs_handler(self): + if self.run_mode != RunMode.Batch or self.flow_logs_folder is None or self.line_number is None: + return + + file_name = f"{str(self.line_number).zfill(LINE_NUMBER_WIDTH)}.log" + path = Path(self.flow_logs_folder) / file_name + for logger_ in self._get_batch_run_flow_loggers_list(): + flow_log_handler = FileHandlerConcurrentWrapper() + handler = FileHandler(path) + flow_log_handler.handler = handler + logger_.addHandler(flow_log_handler) + self.temporary_flow_log_handlers.append(flow_log_handler) + def _set_credential_list(self): # Set credential list to all loggers. all_logger_list = self._get_execute_loggers_list() @@ -302,6 +334,11 @@ def _get_execute_loggers_list(cls) -> List[logging.Logger]: # return all loggers for executor return [logger, flow_logger, bulk_logger] + @classmethod + def _get_batch_run_flow_loggers_list(cls) -> List[logging.Logger]: + # Exclude bulk_logger for line execution log. + return [logger, flow_logger] + def update_log_path(log_path: str, input_logger: logging.Logger = None): logger_list = [logger, bulk_logger, flow_logger] diff --git a/src/promptflow/promptflow/_utils/multimedia_data_converter.py b/src/promptflow-core/promptflow/_utils/multimedia_data_converter.py similarity index 93% rename from src/promptflow/promptflow/_utils/multimedia_data_converter.py rename to src/promptflow-core/promptflow/_utils/multimedia_data_converter.py index 8dd6a1e6733..84ef560c4e9 100644 --- a/src/promptflow/promptflow/_utils/multimedia_data_converter.py +++ b/src/promptflow-core/promptflow/_utils/multimedia_data_converter.py @@ -5,7 +5,7 @@ from pathlib import Path from typing import Any, Callable -from promptflow._utils.multimedia_utils import is_multimedia_dict +from promptflow._utils.multimedia_utils import BasicMultimediaProcessor class ResourceType(Enum): @@ -77,7 +77,7 @@ class MultimediaFormatAdapter20231201(AbstractMultimediaFormatAdapter): MIME_PATTERN = re.compile(r"^data:(.*);(path|base64|url)$") def is_valid_format(self, original_data: Any): - return isinstance(original_data, dict) and is_multimedia_dict(original_data) + return isinstance(original_data, dict) and BasicMultimediaProcessor.is_multimedia_dict(original_data) def extract_info(self, original_data: Any) -> MultimediaInfo: if not self.is_valid_format(original_data): @@ -116,9 +116,9 @@ def __init__(self, flow_file: Path): :param flow_file: The path to the YAML file. The YAML content will be used to determine the contract version. :type flow_file: Path """ - # TODO: check yaml content to determine the current contract version. - # Different contract version will have different multimedia format. - # The version exists in the yaml file, so we need to load the yaml to get version and init converter. + # TODO: read flow.MessageFormatType from flow yaml file. + # Implement the format_adapter class for the openai-vision type. + # Then initialize the format_adapter for different MessageFormatType. self.format_adapter = MultimediaFormatAdapter20231201() def convert_content_recursively(self, content: Any, client_converter: AbstractMultimediaInfoConverter): diff --git a/src/promptflow-core/promptflow/_utils/multimedia_utils.py b/src/promptflow-core/promptflow/_utils/multimedia_utils.py new file mode 100644 index 00000000000..d75d40c43cf --- /dev/null +++ b/src/promptflow-core/promptflow/_utils/multimedia_utils.py @@ -0,0 +1,514 @@ +import base64 +import os +import re +import uuid +from abc import ABC, abstractmethod, abstractstaticmethod +from functools import partial +from pathlib import Path +from typing import Any, Callable, Dict, Optional, Union +from urllib.parse import urlparse + +import requests + +from promptflow._constants import MessageFormatType +from promptflow._utils._errors import InvalidImageInput, InvalidMessageFormatType, LoadMultimediaDataError +from promptflow._utils.yaml_utils import load_yaml +from promptflow.contracts.flow import FlowInputDefinition +from promptflow.contracts.multimedia import Image, PFBytes, Text +from promptflow.contracts.run_info import FlowRunInfo +from promptflow.contracts.run_info import RunInfo as NodeRunInfo +from promptflow.contracts.tool import ValueType +from promptflow.exceptions import ErrorTarget + + +# TODO: Move this function to a more general place and integrate serialization to this function. +def _process_recursively(value: Any, process_funcs: Dict[type, Callable] = None, inplace: bool = False) -> dict: + if process_funcs: + for cls, f in process_funcs.items(): + if isinstance(value, cls): + return f(value) + if isinstance(value, list): + if inplace: + for i in range(len(value)): + value[i] = _process_recursively(value[i], process_funcs, inplace) + else: + return [_process_recursively(v, process_funcs, inplace) for v in value] + elif isinstance(value, dict): + if inplace: + for k, v in value.items(): + value[k] = _process_recursively(v, process_funcs, inplace) + else: + return {k: _process_recursively(v, process_funcs, inplace) for k, v in value.items()} + return value + + +MIME_PATTERN = re.compile(r"^data:image/(.*);(path|base64|url)$") + + +class ImageProcessor: + @staticmethod + def get_extension_from_mime_type(mime_type: str): + ext = mime_type.split("/")[-1] + if ext == "*": + return None + return ext + + @staticmethod + def get_multimedia_info(key: str): + match = re.match(MIME_PATTERN, key) + if match: + return match.group(1), match.group(2) + return None, None + + @staticmethod + def is_url(value: str): + try: + result = urlparse(value) + return all([result.scheme, result.netloc]) + except ValueError: + return False + + @staticmethod + def is_base64(value: str): + prefix_regex = re.compile(r"^data:image/(.*);base64") + base64_regex = re.compile(r"^([A-Za-z0-9+/]{4})*(([A-Za-z0-9+/]{2})*(==|[A-Za-z0-9+/]=)?)?$") + base64_with_prefix = value.split(",") + if len(base64_with_prefix) == 2: + if re.match(prefix_regex, base64_with_prefix[0]) and re.match(base64_regex, base64_with_prefix[1]): + return True + elif len(base64_with_prefix) == 1: + if re.match(base64_regex, value): + return True + return False + + @staticmethod + def create_image_from_file(f: Path, mime_type: str = None): + with open(f, "rb") as fin: + return Image(fin.read(), mime_type=mime_type) + + @staticmethod + def create_image_from_base64(base64_str: str, mime_type: str = None): + base64_str = base64_str.split(",")[-1] + image_bytes = base64.b64decode(base64_str) + return Image(image_bytes, mime_type=mime_type) + + @staticmethod + def create_image_from_url(url: str, mime_type: str = None): + response = requests.get(url) + if response.status_code == 200: + return Image(response.content, mime_type=mime_type, source_url=url) + else: + raise InvalidImageInput( + message_format=( + "Failed to fetch image from URL: {url}. Error code: {error_code}. " + "Error message: {error_message}." + ), + target=ErrorTarget.EXECUTOR, + url=url, + error_code=response.status_code, + error_message=response.text, + ) + + @staticmethod + def create_image_from_string(value: str): + if ImageProcessor.is_base64(value): + return ImageProcessor.create_image_from_base64(value) + elif ImageProcessor.is_url(value): + return ImageProcessor.create_image_from_url(value) + else: + return ImageProcessor.create_image_from_file(Path(value)) + + +class TextProcessor: + @staticmethod + def is_text_dict(text_dict: dict): + if len(text_dict) != 2: + return False + if "type" not in text_dict: + return False + if text_dict["type"] == "text" and "text" in text_dict: + text = text_dict["text"] + if isinstance(text, str): + return True + elif isinstance(text, dict): + if "value" in text and isinstance(text["value"], str): + return True + return False + + @staticmethod + def create_text_from_dict(text_dict: any): + return Text.deserialize(text_dict) + + +class MultimediaProcessor(ABC): + @staticmethod + def create(message_format_type: str = MessageFormatType.BASIC): + if not message_format_type or message_format_type.lower() == MessageFormatType.BASIC: + return BasicMultimediaProcessor() + if message_format_type.lower() == MessageFormatType.OPENAI_VISION: + return OpenaiVisionMultimediaProcessor() + raise InvalidMessageFormatType( + message_format=( + f"Invalid message format '{message_format_type}'. " + "Supported message formats are ['basic', 'openai-vision']." + ), + ) + + @staticmethod + def create_from_yaml(flow_file: Path, working_dir: Optional[Path] = None): + if flow_file and Path(flow_file).suffix.lower() in [".yaml", ".yml"]: + flow_file = working_dir / flow_file if working_dir else flow_file + with open(flow_file, "r", encoding="utf-8") as fin: + flow_dag = load_yaml(fin) + message_format_type = flow_dag.get("message_format", MessageFormatType.BASIC) + return MultimediaProcessor.create(message_format_type) + return BasicMultimediaProcessor() + + def create_image(self, value: any): + if isinstance(value, PFBytes): + return value + elif isinstance(value, dict): + if self.is_multimedia_dict(value): + return self._create_image_from_dict(value) + else: + raise InvalidImageInput( + message_format=( + "Invalid image input format. The image input should be a dictionary like: " + "{{data:image/;[path|base64|url]: }}." + ), + target=ErrorTarget.EXECUTOR, + ) + elif isinstance(value, str): + if not value: + raise InvalidImageInput( + message_format="The image input should not be empty.", target=ErrorTarget.EXECUTOR + ) + return ImageProcessor.create_image_from_string(value) + else: + raise InvalidImageInput( + message_format=( + f"Unsupported image input type: {type(value)}. " + "The image inputs should be a string or a dictionary." + ), + target=ErrorTarget.EXECUTOR, + ) + + def _save_image_to_file( + self, image: Image, file_name: str, folder_path: Path, relative_path: Path = None, use_absolute_path=False + ): + ext = ImageProcessor.get_extension_from_mime_type(image._mime_type) + file_name = f"{file_name}.{ext}" if ext else file_name + image_path = (relative_path / file_name).as_posix() if relative_path else file_name + if use_absolute_path: + image_path = Path(folder_path / image_path).resolve().as_posix() + image_reference = self._generate_image_file_reference(image, image_path) + path = folder_path / relative_path if relative_path else folder_path + os.makedirs(path, exist_ok=True) + with open(os.path.join(path, file_name), "wb") as file: + file.write(image) + return image_reference + + def get_file_reference_encoder( + self, folder_path: Path, relative_path: Path = None, use_absolute_path=False + ) -> Callable: + def pfbytes_file_reference_encoder(obj): + """Dumps PFBytes to a file and returns its reference.""" + if obj.source_url: + return self._generate_image_url_reference(obj) + if isinstance(obj, PFBytes): + file_name = str(uuid.uuid4()) + # If use_absolute_path is True, the image file path in image dictionary will be absolute path. + return self._save_image_to_file(obj, file_name, folder_path, relative_path, use_absolute_path) + raise TypeError(f"Not supported to dump type '{type(obj).__name__}'.") + + return pfbytes_file_reference_encoder + + def load_multimedia_data(self, inputs: Dict[str, FlowInputDefinition], line_inputs: dict): + updated_inputs = dict(line_inputs or {}) + for key, value in inputs.items(): + try: + if value.type == ValueType.IMAGE: + if isinstance(updated_inputs[key], list): + # For aggregation node, the image input is a list. + updated_inputs[key] = [self.create_image(item) for item in updated_inputs[key]] + else: + updated_inputs[key] = self.create_image(updated_inputs[key]) + elif value.type == ValueType.LIST or value.type == ValueType.OBJECT: + updated_inputs[key] = self.load_multimedia_data_recursively(updated_inputs[key]) + except Exception as ex: + error_type_and_message = f"({ex.__class__.__name__}) {ex}" + raise LoadMultimediaDataError( + message_format="Failed to load image for input '{key}': {error_type_and_message}", + key=key, + error_type_and_message=error_type_and_message, + target=ErrorTarget.EXECUTOR, + ) from ex + return updated_inputs + + @staticmethod + def _process_multimedia_dict_recursively(value: Any, process_funcs: Dict[Callable[[dict], bool], Callable]) -> dict: + if isinstance(value, list): + return [MultimediaProcessor._process_multimedia_dict_recursively(item, process_funcs) for item in value] + elif isinstance(value, dict): + for check_func, process_func in process_funcs.items(): + if check_func(value): + return process_func(value) + return { + k: MultimediaProcessor._process_multimedia_dict_recursively(v, process_funcs) for k, v in value.items() + } + else: + return value + + @staticmethod + def convert_multimedia_data_to_string(value: Any, inplace=False): + serialization_funcs = {Image: partial(Image.serialize, **{"encoder": None})} + return _process_recursively(value, process_funcs=serialization_funcs, inplace=inplace) + + def process_multimedia_in_run_info( + self, run_info: Union[FlowRunInfo, NodeRunInfo], base_dir: Path, sub_dir: Path = None, use_absolute_path=False + ): + """Persist multimedia data in run info to file and update the run info with the file path. + If sub_dir is not None, the multimedia file path will be sub_dir/file_name, otherwise file_name. + If use_absolute_path is True, the multimedia file path will be absolute path. + """ + if run_info.inputs: + run_info.inputs = self.persist_multimedia_data(run_info.inputs, base_dir, sub_dir, use_absolute_path) + if run_info.output: + run_info.output = self.persist_multimedia_data(run_info.output, base_dir, sub_dir, use_absolute_path) + run_info.result = None + if run_info.api_calls: + run_info.api_calls = self.persist_multimedia_data(run_info.api_calls, base_dir, sub_dir, use_absolute_path) + + @abstractstaticmethod + def is_multimedia_dict(multimedia_dict: dict): + pass + + @abstractstaticmethod + def _create_image_from_dict(image_dict: dict): + pass + + @abstractmethod + def load_multimedia_data_recursively(self, value: Any): + pass + + @abstractstaticmethod + def _generate_image_file_reference(image: PFBytes, image_path: str): + pass + + @abstractstaticmethod + def _generate_image_url_reference(image: PFBytes): + pass + + @abstractmethod + def resolve_multimedia_data_recursively(self, input_dir: Path, value: Any): + pass + + @abstractmethod + def persist_multimedia_data( + self, value: Any, base_dir: Path, sub_dir: Path = None, use_absolute_path=False, inplace: bool = False + ): + pass + + @abstractstaticmethod + def convert_multimedia_data_to_base64_dict(value: Any): + pass + + +class BasicMultimediaProcessor(MultimediaProcessor): + @staticmethod + def is_multimedia_dict(multimedia_dict: dict): + if len(multimedia_dict) != 1: + return False + key = list(multimedia_dict.keys())[0] + if re.match(MIME_PATTERN, key): + return True + return False + + @staticmethod + def _create_image_from_dict(image_dict: dict): + for k, v in image_dict.items(): + format, resource = ImageProcessor.get_multimedia_info(k) + if resource == "path": + return ImageProcessor.create_image_from_file(Path(v), mime_type=f"image/{format}") + elif resource == "base64": + if ImageProcessor.is_base64(v): + return ImageProcessor.create_image_from_base64(v, mime_type=f"image/{format}") + else: + raise InvalidImageInput( + message_format=f"Invalid base64 image: {v}.", + target=ErrorTarget.EXECUTOR, + ) + elif resource == "url": + return ImageProcessor.create_image_from_url(v, mime_type=f"image/{format}") + else: + raise InvalidImageInput( + message_format=( + f"Unsupported image resource: {resource}. Supported Resources are [path, base64, url]." + ), + target=ErrorTarget.EXECUTOR, + ) + + def load_multimedia_data_recursively(self, value: Any): + process_funcs = {self.is_multimedia_dict: self._create_image_from_dict} + return self._process_multimedia_dict_recursively(value, process_funcs) + + @staticmethod + def _generate_image_file_reference(obj: PFBytes, image_path: str): + return {f"data:{obj._mime_type};path": image_path} + + @staticmethod + def _generate_image_url_reference(obj: PFBytes): + return {f"data:{obj._mime_type};url": obj.source_url} + + def _resolve_image_path(self, input_dir: Path, image_dict: dict): + """Resolve image path to absolute path in image dict""" + + input_dir = input_dir.parent if input_dir.is_file() else input_dir + if self.is_multimedia_dict(image_dict): + for key in image_dict: + _, resource = ImageProcessor.get_multimedia_info(key) + if resource == "path": + image_dict[key] = str(input_dir / image_dict[key]) + return image_dict + + def resolve_multimedia_data_recursively(self, input_dir: Path, value: Any): + process_funcs = {self.is_multimedia_dict: partial(self._resolve_image_path, input_dir)} + return self._process_multimedia_dict_recursively(value, process_funcs) + + def persist_multimedia_data( + self, value: Any, base_dir: Path, sub_dir: Path = None, use_absolute_path=False, inplace: bool = False + ): + pfbytes_file_reference_encoder = ( + self.get_file_reference_encoder(base_dir, sub_dir, use_absolute_path=use_absolute_path) + if base_dir + else None + ) + serialization_funcs = {Image: partial(Image.serialize, **{"encoder": pfbytes_file_reference_encoder})} + return _process_recursively(value, process_funcs=serialization_funcs, inplace=inplace) + + @staticmethod + def convert_multimedia_data_to_base64_dict(value: Any): + def convert_pfbytes_to_base64_dict(obj: PFBytes): + return {f"data:{obj._mime_type};base64": obj.to_base64()} + + to_base64_funcs = {PFBytes: convert_pfbytes_to_base64_dict} + return _process_recursively(value, process_funcs=to_base64_funcs) + + +class OpenaiVisionMultimediaProcessor(MultimediaProcessor): + @staticmethod + def is_multimedia_dict(multimedia_dict: dict): + if len(multimedia_dict) != 2: + return False + if "type" not in multimedia_dict: + return False + image_type = multimedia_dict["type"] + if image_type not in multimedia_dict or not isinstance(multimedia_dict[image_type], dict): + return False + if image_type == "image_url" and "url" in multimedia_dict[image_type]: + return True + if image_type == "image_file" and "path" in multimedia_dict[image_type]: + return True + return False + + @staticmethod + def _create_image_from_dict(image_dict: dict): + image_type = image_dict["type"] + if image_type == "image_url": + image_url = image_dict["image_url"]["url"] + if ImageProcessor.is_base64(image_url): + return ImageProcessor.create_image_from_base64(image_url) + elif ImageProcessor.is_url(image_url): + return ImageProcessor.create_image_from_url(image_url) + else: + raise InvalidImageInput( + message_format=f"Invalid image url: {image_url}. Should be a valid url or base64 string.", + target=ErrorTarget.EXECUTOR, + ) + elif image_type == "image_file": + return ImageProcessor.create_image_from_file(Path(image_dict["image_file"]["path"])) + else: + raise InvalidImageInput( + message_format=f"Unsupported image type: {image_type}. Supported types are [image_url, image_file].", + target=ErrorTarget.EXECUTOR, + ) + + def load_multimedia_data_recursively(self, value: Any): + process_funcs = { + self.is_multimedia_dict: self._create_image_from_dict, + TextProcessor.is_text_dict: TextProcessor.create_text_from_dict, + } + return self._process_multimedia_dict_recursively(value, process_funcs) + + @staticmethod + def _generate_image_file_reference(obj: PFBytes, image_path: str): + return {"type": "image_file", "image_file": {"path": image_path}} + + @staticmethod + def _generate_image_url_reference(obj: PFBytes): + return {"type": "image_url", "image_url": {"url": obj.source_url}} + + def _resolve_image_path(self, input_dir: Path, image_dict: dict): + """Resolve image path to absolute path in image dict""" + + input_dir = input_dir.parent if input_dir.is_file() else input_dir + if self.is_multimedia_dict(image_dict): + image_type = image_dict["type"] + if image_type == "image_file" and "path" in image_dict["image_file"]: + image_dict["image_file"]["path"] = str(input_dir / image_dict["image_file"]["path"]) + return image_dict + + def resolve_multimedia_data_recursively(self, input_dir: Path, value: Any): + process_funcs = {self.is_multimedia_dict: partial(self._resolve_image_path, input_dir)} + return self._process_multimedia_dict_recursively(value, process_funcs) + + def persist_multimedia_data( + self, value: Any, base_dir: Path, sub_dir: Path = None, use_absolute_path=False, inplace: bool = False + ): + pfbytes_file_reference_encoder = ( + self.get_file_reference_encoder(base_dir, sub_dir, use_absolute_path=use_absolute_path) + if base_dir + else None + ) + serialization_funcs = { + Image: partial(Image.serialize, **{"encoder": pfbytes_file_reference_encoder}), + Text: Text.serialize, + } + return _process_recursively(value, process_funcs=serialization_funcs, inplace=inplace) + + @staticmethod + def convert_multimedia_data_to_base64_dict(value: Any): + def convert_pfbytes_to_base64_dict(obj: PFBytes): + return {"type": "image_url", "image_url": {"url": obj.to_base64(with_type=True)}} + + to_base64_funcs = {PFBytes: convert_pfbytes_to_base64_dict} + return _process_recursively(value, process_funcs=to_base64_funcs) + + +# TODO:Runtime relies on these old interfaces and will be removed in the future. +def persist_multimedia_data( + value: Any, + base_dir: Path, + sub_dir: Path = None, + use_absolute_path=False, + multimedia_processor: MultimediaProcessor = None, +): + if multimedia_processor: + return multimedia_processor.persist_multimedia_data( + value, base_dir, sub_dir, use_absolute_path=use_absolute_path + ) + return BasicMultimediaProcessor().persist_multimedia_data( + value, base_dir, sub_dir, use_absolute_path=use_absolute_path + ) + + +def load_multimedia_data_recursively(value: Any, multimedia_processor: MultimediaProcessor = None): + if multimedia_processor: + return multimedia_processor.load_multimedia_data_recursively(value) + return BasicMultimediaProcessor().load_multimedia_data_recursively(value) + + +def resolve_multimedia_data_recursively(input_dir: Path, value: Any, multimedia_processor: MultimediaProcessor = None): + if multimedia_processor: + return multimedia_processor.resolve_multimedia_data_recursively(input_dir, value) + return BasicMultimediaProcessor().resolve_multimedia_data_recursively(input_dir, value) diff --git a/src/promptflow-core/promptflow/_utils/process_utils.py b/src/promptflow-core/promptflow/_utils/process_utils.py new file mode 100644 index 00000000000..d4c4bd35eaa --- /dev/null +++ b/src/promptflow-core/promptflow/_utils/process_utils.py @@ -0,0 +1,87 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import logging +import os +import signal + +import psutil + +from promptflow._utils.logger_utils import bulk_logger + + +def block_terminate_signal_to_parent(): + """ + In uvicorn app, the main process listens for requests and handles graceful shutdowns through + signal listeners set up at initialization. These listeners use a file descriptor for event notifications. + + However, when a child process is forked within the application, it inherits this file descriptor, + leading to an issue where signals sent to terminate the child process are also intercepted by the main process, + causing an unintended shutdown of the entire application. + + To avoid this, we should return the default behavior of signal handlers for child process and call + signal.set_wakeup_fd(-1) in the child process to prevent it from using the parent's file descriptor + and avoiding unintended shutdowns of the main process. + + References: https://github.com/tiangolo/fastapi/discussions/7442 + """ + signal.set_wakeup_fd(-1) + + signal.signal(signal.SIGTERM, signal.SIG_DFL) + signal.signal(signal.SIGINT, signal.SIG_DFL) + + +def get_available_max_worker_count(logger: logging.Logger = bulk_logger): + """ + When creating processes using the spawn method, it consumes certain resources. + So we can use this method to determine how many workers can be maximally created. + """ + pid = os.getpid() + mem_info = psutil.virtual_memory() + available_memory = mem_info.available / (1024 * 1024) # in MB + process = psutil.Process(pid) + process_memory_info = process.memory_info() + process_memory = process_memory_info.rss / (1024 * 1024) # in MB + estimated_available_worker_count = int(available_memory // process_memory) + if estimated_available_worker_count < 1: + # TODO: For the case of vector db, Optimize execution logic + # 1. Let the main process not consume memory because it does not actually invoke + # 2. When the degree of parallelism is 1, main process executes the task directly + # and not create the child process + logger.warning( + f"Current system's available memory is {available_memory}MB, less than the memory " + f"{process_memory}MB required by the process. The maximum available worker count is 1." + ) + estimated_available_worker_count = 1 + else: + logger.info( + f"Current system's available memory is {available_memory}MB, " + f"memory consumption of current process is {process_memory}MB, " + f"estimated available worker count is {available_memory}/{process_memory} " + f"= {estimated_available_worker_count}" + ) + return estimated_available_worker_count + + +def log_errors_from_file(log_path): + try: + with open(log_path, "r") as f: + error_logs = "".join(f.readlines()) + bulk_logger.error(error_logs) + return True + except FileNotFoundError: + return False + + +def get_subprocess_log_path(index): + from promptflow.executor._process_manager import ProcessPoolConstants + + logName_i = "{}_{}.log".format(ProcessPoolConstants.PROCESS_LOG_NAME, index) + return ProcessPoolConstants.PROCESS_LOG_PATH / logName_i + + +def get_manager_process_log_path(): + from promptflow.executor._process_manager import ProcessPoolConstants + + return ProcessPoolConstants.PROCESS_LOG_PATH / ProcessPoolConstants.MANAGER_PROCESS_LOG_NAME diff --git a/src/promptflow/promptflow/_utils/retry_utils.py b/src/promptflow-core/promptflow/_utils/retry_utils.py similarity index 100% rename from src/promptflow/promptflow/_utils/retry_utils.py rename to src/promptflow-core/promptflow/_utils/retry_utils.py diff --git a/src/promptflow/promptflow/_utils/run_tracker_utils.py b/src/promptflow-core/promptflow/_utils/run_tracker_utils.py similarity index 92% rename from src/promptflow/promptflow/_utils/run_tracker_utils.py rename to src/promptflow-core/promptflow/_utils/run_tracker_utils.py index 0a846555eef..1f44535db36 100644 --- a/src/promptflow/promptflow/_utils/run_tracker_utils.py +++ b/src/promptflow-core/promptflow/_utils/run_tracker_utils.py @@ -3,7 +3,7 @@ # --------------------------------------------------------- from copy import deepcopy -from promptflow._core.generator_proxy import GeneratorProxy +from promptflow.tracing.contracts.generator_proxy import GeneratorProxy def _deep_copy_and_extract_items_from_generator_proxy(value: object) -> object: diff --git a/src/promptflow/promptflow/_utils/thread_utils.py b/src/promptflow-core/promptflow/_utils/thread_utils.py similarity index 100% rename from src/promptflow/promptflow/_utils/thread_utils.py rename to src/promptflow-core/promptflow/_utils/thread_utils.py diff --git a/src/promptflow/promptflow/_utils/tool_utils.py b/src/promptflow-core/promptflow/_utils/tool_utils.py similarity index 94% rename from src/promptflow/promptflow/_utils/tool_utils.py rename to src/promptflow-core/promptflow/_utils/tool_utils.py index 64467277db6..9e02e5cabdc 100644 --- a/src/promptflow/promptflow/_utils/tool_utils.py +++ b/src/promptflow-core/promptflow/_utils/tool_utils.py @@ -8,12 +8,14 @@ import re from dataclasses import asdict, fields, is_dataclass from enum import Enum, EnumMeta +from pathlib import Path from typing import Any, Callable, Dict, List, Union, get_args, get_origin from jinja2 import Environment, meta from promptflow._constants import PF_MAIN_MODULE_NAME from promptflow._core._errors import DuplicateToolMappingError +from promptflow._utils.context_utils import _change_working_dir from promptflow._utils.utils import is_json_serializable from promptflow.exceptions import ErrorTarget, UserErrorException @@ -279,8 +281,8 @@ def validate_dynamic_list_func_response_type(response: Any, f: str): def validate_tool_func_result(func_call_scenario: str, result): if func_call_scenario not in list(ToolFuncCallScenario): raise RetrieveToolFuncResultValidationError( - f"Invalid tool func call scenario: {func_call_scenario}. " - f"Available scenarios are {list(ToolFuncCallScenario)}" + f"Invalid tool func call scenario: {func_call_scenario}. " + f"Available scenarios are {list(ToolFuncCallScenario)}" ) if func_call_scenario == ToolFuncCallScenario.REVERSE_GENERATED_BY: if not isinstance(result, Dict): @@ -322,11 +324,20 @@ def append_workspace_triple_to_func_input_params( def load_function_from_function_path(func_path: str): """Load a function from a function path. - The function path should be in the format of "module_name.function_name". + If function is in an installed package, the function path should be in the format of "module_name.function_name". + If function is in a script, the function path should be in the format of "function_path:function_name". """ try: - module_name, func_name = func_path.rsplit(".", 1) - module = importlib.import_module(module_name) + if ":" in func_path: + script_path, func_name = func_path.rsplit(":", 1) + script_name = Path(script_path).stem + with _change_working_dir(Path(script_path).parent): + spec = importlib.util.spec_from_file_location(script_name, script_path) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + else: + module_name, func_name = func_path.rsplit(".", 1) + module = importlib.import_module(module_name) f = getattr(module, func_name) if callable(f): return f @@ -437,7 +448,7 @@ def _get_function_path(function): elif isinstance(function, Callable): func = function if function.__module__ == PF_MAIN_MODULE_NAME: - func_path = function.__name__ + func_path = f"{inspect.getfile(function)}:{function.__name__}" else: func_path = f"{function.__module__}.{function.__name__}" else: diff --git a/src/promptflow-core/promptflow/_utils/user_agent_utils.py b/src/promptflow-core/promptflow/_utils/user_agent_utils.py new file mode 100644 index 00000000000..0a3a9ea744a --- /dev/null +++ b/src/promptflow-core/promptflow/_utils/user_agent_utils.py @@ -0,0 +1,69 @@ +import os +from typing import Optional + +from promptflow._constants import PF_USER_AGENT, USER_AGENT +from promptflow.core._version import __version__ +from promptflow.tracing._operation_context import OperationContext + + +class ClientUserAgentUtil: + """SDK/CLI side user agent utilities.""" + + @classmethod + def _get_context(cls): + return OperationContext.get_instance() + + @classmethod + def get_user_agent(cls): + context = cls._get_context() + # directly get from context since client side won't need promptflow/xxx. + return context.get(OperationContext.USER_AGENT_KEY, "").strip() + + @classmethod + def append_user_agent(cls, user_agent: Optional[str]): + if not user_agent: + return + context = cls._get_context() + context.append_user_agent(user_agent) + + @classmethod + def update_user_agent_from_env_var(cls): + # this is for backward compatibility: we should use PF_USER_AGENT in newer versions. + for env_name in [USER_AGENT, PF_USER_AGENT]: + if env_name in os.environ: + cls.append_user_agent(os.environ[env_name]) + + @classmethod + def update_user_agent_from_config(cls): + """Update user agent from config. 1p customer will set it. We'll add PFCustomer_ as prefix.""" + from promptflow._sdk._configuration import Configuration + + config = Configuration.get_instance() + user_agent = config.get_user_agent() + if user_agent: + cls.append_user_agent(user_agent) + + +def setup_user_agent_to_operation_context(user_agent): + """Setup user agent to OperationContext. + For calls from extension, ua will be like: prompt-flow-extension/ promptflow-cli/ promptflow-sdk/ + For calls from CLI, ua will be like: promptflow-cli/ promptflow-sdk/ + For calls from SDK, ua will be like: promptflow-sdk/ + For 1p customer call which set user agent in config, ua will be like: PFCustomer_XXX/ + For serving with promptflow-core only env, ua will be like: promptflow-local-serving/ promptflow-core/ + """ + # add user added UA after SDK/CLI + ClientUserAgentUtil.append_user_agent(user_agent) + ClientUserAgentUtil.update_user_agent_from_env_var() + ClientUserAgentUtil.update_user_agent_from_config() + return ClientUserAgentUtil.get_user_agent() + + +def append_promptflow_package_ua(operation_context: OperationContext): + try: + from promptflow._version import VERSION as PF_VERSION + + operation_context.append_user_agent(f"promptflow/{PF_VERSION}") + except ImportError: + pass + operation_context.append_user_agent(f"promptflow-core/{__version__}") diff --git a/src/promptflow/promptflow/_utils/utils.py b/src/promptflow-core/promptflow/_utils/utils.py similarity index 78% rename from src/promptflow/promptflow/_utils/utils.py rename to src/promptflow-core/promptflow/_utils/utils.py index 2c184996669..7af01b61774 100644 --- a/src/promptflow/promptflow/_utils/utils.py +++ b/src/promptflow-core/promptflow/_utils/utils.py @@ -20,7 +20,8 @@ from pathlib import Path from typing import Any, Dict, Iterable, Iterator, List, Optional, TypeVar, Union -from promptflow._constants import DEFAULT_ENCODING +from promptflow._constants import DEFAULT_ENCODING, PF_LONG_RUNNING_LOGGING_INTERVAL +from promptflow._utils.logger_utils import bulk_logger from promptflow.contracts.multimedia import PFBytes from promptflow.contracts.types import AssistantDefinition @@ -150,33 +151,35 @@ def count_and_log_progress( def log_progress( run_start_time: datetime, - logger: logging.Logger, - count: int, total_count: int, + current_count: int, + last_log_count: int, + logger: logging.Logger = bulk_logger, formatter="Finished {count} / {total_count} lines.", - *, - last_log_count: Optional[int] = None, ): + """Log progress of the current execution. Return the last_log_count for the next iteration.""" + # Calculate log_interval to determine when to log progress. # If total_count is less than 100, log every 10% of total_count; otherwise, log every 10 lines. log_interval = min(10, max(int(total_count / 10), 1)) - # If last_log_count is not None, determine whether to log based on whether the difference - # between the current count and the previous count exceeds log_interval. - # Otherwise, decide based on whether the current count is evenly divisible by log_interval. - if last_log_count: - log_flag = (count - last_log_count) >= log_interval - else: - log_flag = count % log_interval == 0 - - if count > 0 and (log_flag or count == total_count): - average_execution_time = round((datetime.utcnow().timestamp() - run_start_time.timestamp()) / count, 2) - estimated_execution_time = round(average_execution_time * (total_count - count), 2) - logger.info(formatter.format(count=count, total_count=total_count)) + # There are two situations that we will print the progress log: + # 1. The difference between current_count and last_log_count exceeds log_interval. + # 2. The current_count is evenly divisible by log_interval. + log_flag = (current_count - last_log_count) >= log_interval or ( + current_count > last_log_count and current_count % log_interval == 0 + ) + + if current_count > 0 and (log_flag or current_count == total_count): + average_execution_time = round((datetime.utcnow().timestamp() - run_start_time.timestamp()) / current_count, 2) + estimated_execution_time = round(average_execution_time * (total_count - current_count), 2) + logger.info(formatter.format(count=current_count, total_count=total_count)) logger.info( f"Average execution time for completed lines: {average_execution_time} seconds. " f"Estimated time for incomplete lines: {estimated_execution_time} seconds." ) + return current_count + return last_log_count def extract_user_frame_summaries(frame_summaries: List[traceback.FrameSummary]): @@ -324,7 +327,7 @@ def _sanitize_python_variable_name(name: str): def default_json_encoder(obj): if isinstance(obj, PFBytes): - return str(obj) + return obj.to_base64(with_type=True) if isinstance(obj, AssistantDefinition): return obj.serialize() else: @@ -366,3 +369,68 @@ def copy_file_except(src_dir, dst_dir, exclude_file): src_file_path = os.path.join(root, file) dst_file_path = os.path.join(current_dst_dir, file) shutil.copy2(src_file_path, dst_file_path) + + +def in_jupyter_notebook() -> bool: + """ + Checks if user is using a Jupyter Notebook. This is necessary because logging is not allowed in + non-Jupyter contexts. + + Adapted from https://stackoverflow.com/a/22424821 + """ + try: # cspell:ignore ipython + from IPython import get_ipython + + if "IPKernelApp" not in get_ipython().config: + return False + except ImportError: + return False + except AttributeError: + return False + return True + + +def snake_to_camel(name): + return re.sub(r"(?:^|_)([a-z])", lambda x: x.group(1).upper(), name) + + +def prepare_folder(path: Union[str, Path]) -> Path: + """Create folder if not exists and return the folder path.""" + path = Path(path) + path.mkdir(parents=True, exist_ok=True) + return path + + +def try_get_long_running_logging_interval(logger: logging.Logger, default_interval: int): + logging_interval_in_env = os.environ.get(PF_LONG_RUNNING_LOGGING_INTERVAL, None) + if logging_interval_in_env: + try: + value = int(logging_interval_in_env) + if value <= 0: + raise ValueError + logger.info( + f"Using value of {PF_LONG_RUNNING_LOGGING_INTERVAL} in environment variable as " + f"logging interval: {logging_interval_in_env}" + ) + return value + except ValueError: + logger.warning( + f"Value of {PF_LONG_RUNNING_LOGGING_INTERVAL} in environment variable " + f"('{logging_interval_in_env}') is invalid, use default value {default_interval}" + ) + return default_interval + # If the environment variable is not set, return none to disable the long running logging + return None + + +def strip_quotation(value): + """ + To avoid escaping chars in command args, args will be surrounded in quotas. + Need to remove the pair of quotation first. + """ + if value.startswith('"') and value.endswith('"'): + return value[1:-1] + elif value.startswith("'") and value.endswith("'"): + return value[1:-1] + else: + return value diff --git a/src/promptflow/promptflow/_utils/version_hint_utils.py b/src/promptflow-core/promptflow/_utils/version_hint_utils.py similarity index 100% rename from src/promptflow/promptflow/_utils/version_hint_utils.py rename to src/promptflow-core/promptflow/_utils/version_hint_utils.py diff --git a/src/promptflow/promptflow/_utils/yaml_utils.py b/src/promptflow-core/promptflow/_utils/yaml_utils.py similarity index 94% rename from src/promptflow/promptflow/_utils/yaml_utils.py rename to src/promptflow-core/promptflow/_utils/yaml_utils.py index 36b1bc86586..3380ab90d11 100644 --- a/src/promptflow/promptflow/_utils/yaml_utils.py +++ b/src/promptflow-core/promptflow/_utils/yaml_utils.py @@ -6,6 +6,7 @@ from promptflow._constants import DEFAULT_ENCODING from promptflow._utils._errors import YamlParseError +from promptflow.exceptions import UserErrorException def load_yaml(source: Optional[Union[AnyStr, PathLike, IO]]) -> Dict: @@ -58,8 +59,8 @@ def load_yaml(source: Optional[Union[AnyStr, PathLike, IO]]) -> Dict: try: input = open(source, "r", encoding=DEFAULT_ENCODING) except OSError: # FileNotFoundError introduced in Python 3 - msg = "No such file or directory: {}" - raise FileNotFoundError(msg.format(source)) + e = FileNotFoundError("No such file or directory: {}".format(source)) + raise UserErrorException(str(e), privacy_info=[str(source)]) from e # input should now be a readable file or stream. Parse it. try: yaml = YAML() diff --git a/src/promptflow/promptflow/connections/__init__.py b/src/promptflow-core/promptflow/connections/__init__.py similarity index 92% rename from src/promptflow/promptflow/connections/__init__.py rename to src/promptflow-core/promptflow/connections/__init__.py index c9d5b0466c2..70b29858f3a 100644 --- a/src/promptflow/promptflow/connections/__init__.py +++ b/src/promptflow-core/promptflow/connections/__init__.py @@ -4,7 +4,8 @@ from dataclasses import dataclass, is_dataclass from promptflow._core.tools_manager import register_connections -from promptflow._sdk.entities import ( +from promptflow.contracts.types import Secret +from promptflow.core._connection import ( AzureContentSafetyConnection, AzureOpenAIConnection, CognitiveSearchConnection, @@ -14,9 +15,8 @@ OpenAIConnection, SerpConnection, ServerlessConnection, + _Connection, ) -from promptflow._sdk.entities._connection import _Connection -from promptflow.contracts.types import Secret @dataclass diff --git a/src/promptflow/promptflow/executor/_service/__init__.py b/src/promptflow-core/promptflow/contracts/__init__.py similarity index 100% rename from src/promptflow/promptflow/executor/_service/__init__.py rename to src/promptflow-core/promptflow/contracts/__init__.py diff --git a/src/promptflow/promptflow/contracts/_errors.py b/src/promptflow-core/promptflow/contracts/_errors.py similarity index 100% rename from src/promptflow/promptflow/contracts/_errors.py rename to src/promptflow-core/promptflow/contracts/_errors.py diff --git a/src/promptflow/promptflow/contracts/_run_management.py b/src/promptflow-core/promptflow/contracts/_run_management.py similarity index 100% rename from src/promptflow/promptflow/contracts/_run_management.py rename to src/promptflow-core/promptflow/contracts/_run_management.py diff --git a/src/promptflow/promptflow/contracts/flow.py b/src/promptflow-core/promptflow/contracts/flow.py similarity index 93% rename from src/promptflow/promptflow/contracts/flow.py rename to src/promptflow-core/promptflow/contracts/flow.py index 29f2389c021..9adeba1f89d 100644 --- a/src/promptflow/promptflow/contracts/flow.py +++ b/src/promptflow-core/promptflow/contracts/flow.py @@ -10,14 +10,13 @@ from pathlib import Path from typing import Any, Dict, List, Optional +from promptflow._constants import DEFAULT_ENCODING, LANGUAGE_KEY, FlowLanguage, MessageFormatType +from promptflow._utils.utils import _match_reference, _sanitize_python_variable_name, try_import from promptflow._utils.yaml_utils import load_yaml from promptflow.contracts._errors import FlowDefinitionError from promptflow.exceptions import ErrorTarget +from promptflow.tracing._utils import serialize -from .._constants import LANGUAGE_KEY, FlowLanguage, MessageFormatType -from .._sdk._constants import DEFAULT_ENCODING -from .._utils.dataclass_serializer import serialize -from .._utils.utils import _match_reference, _sanitize_python_variable_name, try_import from ._errors import FailedToImportModule from .tool import ConnectionType, Tool, ToolType, ValueType @@ -546,13 +545,21 @@ def get_environment_variables_with_overrides( environment_variables[k] = v return environment_variables - def get_connection_names(self): - """Return connection names.""" - connection_names = set({}) + def get_connection_names(self, environment_variables_overrides: Dict[str, str] = None): + """Return connection names with environment variables overrides. + Note: only environment variables exist in flow.environment_variables will be considered. + :param environment_variables_overrides: used to override flow's environment variables. + :return: connection names used in this flow. + """ + environment_variables_overrides = environment_variables_overrides or {} + connection_names = set({}) # Add connection names from environment variable reference if self.environment_variables: for k, v in self.environment_variables.items(): + if k in environment_variables_overrides: + # Apply environment variables overrides + v = environment_variables_overrides[k] if not isinstance(v, str) or not v.startswith("${"): continue connection_name, _ = _match_reference(v) @@ -731,6 +738,15 @@ def load_env_variables( environment_variables_overrides=environment_variables_overrides ) + @staticmethod + def load_message_format_from_yaml(flow_file: Path, working_dir=None) -> str: + if flow_file and Path(flow_file).suffix.lower() in [".yaml", ".yml"]: + flow_file = working_dir / flow_file if working_dir else flow_file + with open(flow_file, "r", encoding="utf-8") as fin: + flow_dag = load_yaml(fin) + return flow_dag.get("message_format", MessageFormatType.BASIC) + return MessageFormatType.BASIC + def _set_tool_loader(self, working_dir): package_tool_keys = [node.source.tool for node in self.nodes if node.source and node.source.tool] from promptflow._core.tools_manager import ToolLoader @@ -843,9 +859,19 @@ def _get_connection_name_from_tool(self, tool: Tool, node: Node): connection_names[k] = input_assignment.value return connection_names - def get_connection_names(self): + @classmethod + def _get_connection_inputs_from_tool(cls, tool: Tool) -> list: + """Return tool's connection inputs.""" + connection_inputs = [] + for k, v in tool.inputs.items(): + input_type = [typ.value if isinstance(typ, Enum) else typ for typ in v.type] + if all(ConnectionType.is_connection_class_name(t) for t in input_type): + connection_inputs.append(k) + return connection_inputs + + def get_connection_names(self, environment_variables_overrides: Dict[str, str] = None): """Return connection names.""" - connection_names = super().get_connection_names() + connection_names = super().get_connection_names(environment_variables_overrides=environment_variables_overrides) nodes = [ self._apply_default_node_variant(node, self.node_variants) if node.use_variants else node for node in self.nodes @@ -871,7 +897,11 @@ def get_connection_names(self): return set({item for item in connection_names if item}) def get_connection_input_names_for_node(self, node_name): - """Return connection input names.""" + """Return connection input names for a node, will also return node connection inputs without assignment. + + :param node_name: node name + """ + node = self.get_node(node_name) if node and node.use_variants: node = self._apply_default_node_variant(node, self.node_variants) @@ -880,7 +910,7 @@ def get_connection_input_names_for_node(self, node_name): return [] tool = self.get_tool(node.tool) or self._tool_loader.load_tool_for_node(node) if tool: - return list(self._get_connection_name_from_tool(tool, node).keys()) + return self._get_connection_inputs_from_tool(tool) return [] def _replace_with_variant(self, variant_node: Node, variant_tools: list): @@ -907,10 +937,14 @@ class EagerFlow(FlowBase): :type program_language: str :param environment_variables: The default environment variables of the flow. :type environment_variables: Dict[str, object] + :param message_format: The message format type of the flow to represent different multimedia contracts. + :type message_format: str """ program_language: str = FlowLanguage.Python environment_variables: Dict[str, object] = None + # eager flow does not support multimedia contract currently, it is set to basic by default. + message_format: str = MessageFormatType.BASIC @staticmethod def deserialize(data: dict) -> "EagerFlow": diff --git a/src/promptflow/promptflow/contracts/multimedia.py b/src/promptflow-core/promptflow/contracts/multimedia.py similarity index 70% rename from src/promptflow/promptflow/contracts/multimedia.py rename to src/promptflow-core/promptflow/contracts/multimedia.py index 6ac0559fb95..c33511d106e 100644 --- a/src/promptflow/promptflow/contracts/multimedia.py +++ b/src/promptflow-core/promptflow/contracts/multimedia.py @@ -1,8 +1,9 @@ import base64 -import filetype import hashlib from typing import Callable, Optional +import filetype + class PFBytes(bytes): """This class is used to represent a bytes object in PromptFlow. @@ -29,13 +30,11 @@ def __init__(self, value: bytes, mime_type: str, source_url: Optional[str] = Non def source_url(self): return self._source_url - def to_base64(self, with_type: bool = False, dict_type: bool = False): + def to_base64(self, with_type: bool = False): """Returns the base64 representation of the PFBytes.""" if with_type: - if not dict_type: - return f"data:{self._mime_type};base64," + base64.b64encode(self).decode("utf-8") - return {f"data:{self._mime_type};base64": base64.b64encode(self).decode("utf-8")} + return f"data:{self._mime_type};base64," + base64.b64encode(self).decode("utf-8") return base64.b64encode(self).decode("utf-8") @@ -63,3 +62,28 @@ def serialize(self, encoder: Callable = None): if encoder is None: return self.__str__() return encoder(self) + + +class Text(str): + def __new__(cls, value: str, annotations: list = None): + obj = str.__new__(cls, value) + obj._annotations = annotations + return obj + + @classmethod + def deserialize(cls, data: dict): + """Deserialize the dictionary to the text object.""" + + text = data.get("text", "") + if isinstance(text, dict): + return cls(value=text.get("value", ""), annotations=text.get("annotations", [])) + else: + return cls(value=text) + + def serialize(self): + """Serialize the text to a dictionary.""" + + if self._annotations is None: + return {"type": "text", "text": self} + else: + return {"type": "text", "text": {"value": self, "annotations": self._annotations}} diff --git a/src/promptflow/promptflow/contracts/run_info.py b/src/promptflow-core/promptflow/contracts/run_info.py similarity index 90% rename from src/promptflow/promptflow/contracts/run_info.py rename to src/promptflow-core/promptflow/contracts/run_info.py index d3522168f98..df0223731bf 100644 --- a/src/promptflow/promptflow/contracts/run_info.py +++ b/src/promptflow-core/promptflow/contracts/run_info.py @@ -9,6 +9,8 @@ from dateutil import parser +from .._constants import MessageFormatType + class Status(Enum): """An enumeration class for different types of run status.""" @@ -66,8 +68,6 @@ class RunInfo: :type index: Optional[int] :param api_calls: API calls made during the run :type api_calls: Optional[List[Dict[str, Any]]] - :param variant_id: Variant id of the run - :type variant_id: Optional[str] :param cached_run_id: Cached run id :type cached_run_id: Optional[str] :param cached_flow_run_id: Cached flow run id @@ -78,6 +78,8 @@ class RunInfo: :type system_metrics: Optional[Dict[str, Any]] :param result: Result of the run :type result: Optional[object] + :param message_format: The message format type to represent different multimedia contracts. + :type message_format: str """ node: str @@ -93,16 +95,18 @@ class RunInfo: end_time: datetime index: Optional[int] = None api_calls: Optional[List[Dict[str, Any]]] = None - variant_id: str = "" cached_run_id: str = None cached_flow_run_id: str = None logs: Optional[Dict[str, str]] = None system_metrics: Dict[str, Any] = None result: object = None + message_format: str = MessageFormatType.BASIC @staticmethod def deserialize(data: dict) -> "RunInfo": """Deserialize the RunInfo from a dict.""" + start_time = data.get("start_time", None) + end_time = data.get("end_time", None) run_info = RunInfo( node=data.get("node"), flow_run_id=data.get("flow_run_id"), @@ -113,16 +117,16 @@ def deserialize(data: dict) -> "RunInfo": metrics=data.get("metrics", None), error=data.get("error", None), parent_run_id=data.get("parent_run_id", None), - start_time=parser.parse(data.get("start_time")).replace(tzinfo=None), - end_time=parser.parse(data.get("end_time")).replace(tzinfo=None), + start_time=parser.parse(start_time).replace(tzinfo=None) if start_time else None, + end_time=parser.parse(end_time).replace(tzinfo=None) if end_time else None, index=data.get("index", None), api_calls=data.get("api_calls", None), - variant_id=data.get("variant_id", ""), cached_run_id=data.get("cached_run_id", None), cached_flow_run_id=data.get("cached_flow_run_id", None), logs=data.get("logs", None), system_metrics=data.get("system_metrics", None), result=data.get("result", None), + message_format=data.get("message_format", MessageFormatType.BASIC), ) return run_info @@ -161,8 +165,6 @@ class FlowRunInfo: :type index: Optional[int] :param api_calls: API calls made during the flow run :type api_calls: Optional[List[Dict[str, Any]]] - :param variant_id: Variant id of the flow run - :type variant_id: Optional[str] :param name: Name of the flow run :type name: Optional[str] :param description: Description of the flow run @@ -175,6 +177,8 @@ class FlowRunInfo: :type result: Optional[object] :param upload_metrics: Flag indicating whether to upload metrics for the flow run :type upload_metrics: Optional[bool] + :param message_format: The message format type to represent different multimedia contracts. + :type message_format: str """ run_id: str @@ -192,13 +196,14 @@ class FlowRunInfo: end_time: datetime index: Optional[int] = None api_calls: Optional[List[Dict[str, Any]]] = None - variant_id: str = "" name: str = "" description: str = "" tags: Optional[Mapping[str, str]] = None system_metrics: Dict[str, Any] = None result: object = None upload_metrics: bool = False # only set as true for root runs in bulk test mode and evaluation mode + otel_trace_id: Optional[str] = "" + message_format: str = MessageFormatType.BASIC @staticmethod def deserialize(data: dict) -> "FlowRunInfo": @@ -219,13 +224,13 @@ def deserialize(data: dict) -> "FlowRunInfo": end_time=parser.parse(data.get("end_time")).replace(tzinfo=None), index=data.get("index", None), api_calls=data.get("api_calls", None), - variant_id=data.get("variant_id", ""), name=data.get("name", ""), description=data.get("description", ""), tags=data.get("tags", None), system_metrics=data.get("system_metrics", None), result=data.get("result", None), upload_metrics=data.get("upload_metrics", False), + message_format=data.get("message_format", MessageFormatType.BASIC), ) return flow_run_info diff --git a/src/promptflow/promptflow/contracts/run_mode.py b/src/promptflow-core/promptflow/contracts/run_mode.py similarity index 100% rename from src/promptflow/promptflow/contracts/run_mode.py rename to src/promptflow-core/promptflow/contracts/run_mode.py diff --git a/src/promptflow/promptflow/contracts/tool.py b/src/promptflow-core/promptflow/contracts/tool.py similarity index 97% rename from src/promptflow/promptflow/contracts/tool.py rename to src/promptflow-core/promptflow/contracts/tool.py index deeeb350069..42ad59fdc02 100644 --- a/src/promptflow/promptflow/contracts/tool.py +++ b/src/promptflow-core/promptflow/contracts/tool.py @@ -8,7 +8,7 @@ from enum import Enum from typing import Any, Dict, List, Optional, Type, TypeVar -from promptflow._constants import CONNECTION_NAME_PROPERTY +from promptflow._constants import CONNECTION_NAME_PROPERTY, CONNECTION_DATA_CLASS_KEY from .multimedia import Image from .types import AssistantDefinition, FilePath, PromptTemplate, Secret @@ -190,6 +190,11 @@ def is_connection_value(val: Any) -> bool: from promptflow._core.tools_manager import connections val = type(val) if not isinstance(val, type) else val + if hasattr(val, CONNECTION_DATA_CLASS_KEY): + # Get the data class for sdk connection object + data_class = getattr(val, CONNECTION_DATA_CLASS_KEY) + logger.debug(f"val {val} has DATA_CLASS key, get the data plane class {data_class}.") + val = data_class return val in connections.values() or ConnectionType.is_custom_strong_type(val) @staticmethod diff --git a/src/promptflow/promptflow/contracts/types.py b/src/promptflow-core/promptflow/contracts/types.py similarity index 100% rename from src/promptflow/promptflow/contracts/types.py rename to src/promptflow-core/promptflow/contracts/types.py diff --git a/src/promptflow-core/promptflow/core/__init__.py b/src/promptflow-core/promptflow/core/__init__.py new file mode 100644 index 00000000000..803a98fe719 --- /dev/null +++ b/src/promptflow-core/promptflow/core/__init__.py @@ -0,0 +1,16 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore + +from promptflow._core.metric_logger import log_metric +from ._version import __version__ + +# flake8: noqa +from promptflow._core.tool import ToolProvider, tool +from promptflow.core._flow import AsyncFlow, Flow + +# backward compatibility +log_flow_metric = log_metric + +__all__ = ["log_metric", "ToolProvider", "tool", "Flow", "AsyncFlow", "__version__"] diff --git a/src/promptflow/promptflow/_sdk/entities/_connection.py b/src/promptflow-core/promptflow/core/_connection.py similarity index 62% rename from src/promptflow/promptflow/_sdk/entities/_connection.py rename to src/promptflow-core/promptflow/core/_connection.py index 93dbabc11a5..3d980e6f21b 100644 --- a/src/promptflow/promptflow/_sdk/entities/_connection.py +++ b/src/promptflow-core/promptflow/core/_connection.py @@ -1,64 +1,25 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -import abc import importlib -import json import os import types -from os import PathLike -from pathlib import Path -from typing import Dict, List, Union - -from marshmallow import INCLUDE +from typing import Dict, List +from promptflow._constants import CONNECTION_SCRUBBED_VALUE as SCRUBBED_VALUE, CONNECTION_SCRUBBED_VALUE_NO_CHANGE +from promptflow._constants import ConnectionAuthMode, ConnectionType, CustomStrongTypeConnectionConfigs from promptflow._core.token_provider import AzureTokenProvider -from promptflow._sdk._constants import ( - BASE_PATH_CONTEXT_KEY, - PARAMS_OVERRIDE_KEY, - SCHEMA_KEYS_CONTEXT_CONFIG_KEY, - SCHEMA_KEYS_CONTEXT_SECRET_KEY, - SCRUBBED_VALUE, - SCRUBBED_VALUE_NO_CHANGE, - SCRUBBED_VALUE_USER_INPUT, - ConfigValueType, - ConnectionAuthMode, - ConnectionType, - CustomStrongTypeConnectionConfigs, -) -from promptflow._sdk._errors import RequiredEnvironmentVariablesNotSetError, SDKError, UnsecureConnectionError -from promptflow._sdk._orm.connection import Connection as ORMConnection -from promptflow._sdk._utils import ( - decrypt_secret_value, - encrypt_secret_value, - find_type_in_override, - in_jupyter_notebook, - print_yellow_warning, - snake_to_camel, -) -from promptflow._sdk.entities._yaml_translatable import YAMLTranslatableMixin -from promptflow._sdk.schemas._connection import ( - AzureContentSafetyConnectionSchema, - AzureOpenAIConnectionSchema, - CognitiveSearchConnectionSchema, - CustomConnectionSchema, - CustomStrongTypeConnectionSchema, - FormRecognizerConnectionSchema, - OpenAIConnectionSchema, - QdrantConnectionSchema, - SerpConnectionSchema, - ServerlessConnectionSchema, - WeaviateConnectionSchema, -) from promptflow._utils.logger_utils import LoggerFactory +from promptflow._utils.utils import in_jupyter_notebook from promptflow.contracts.types import Secret +from promptflow.core._errors import RequiredEnvironmentVariablesNotSetError from promptflow.exceptions import UserErrorException, ValidationException logger = LoggerFactory.get_logger(name=__name__) PROMPTFLOW_CONNECTIONS = "promptflow.connections" -class _Connection(YAMLTranslatableMixin): +class _Connection: """A connection entity that stores the connection information. :param name: Connection name @@ -73,7 +34,8 @@ class _Connection(YAMLTranslatableMixin): :type secrets: Dict[str, str] """ - TYPE = ConnectionType._NOT_SET + SUPPORTED_TYPES = {} + TYPE = ConnectionType._NOT_SET.value def __init__( self, @@ -85,7 +47,7 @@ def __init__( ): self.name = name self.type = self.TYPE - self.class_name = f"{self.TYPE.value}Connection" # The type in executor connection dict + self.class_name = f"{self.TYPE}Connection" # The type in executor connection dict self.configs = configs or {} self.module = module # Note the connection secrets value behaviors: @@ -106,17 +68,6 @@ def __init__( if print_as_yaml: self.print_as_yaml = True - @classmethod - def _casting_type(cls, typ): - type_dict = { - "azure_open_ai": ConnectionType.AZURE_OPEN_AI.value, - "open_ai": ConnectionType.OPEN_AI.value, - } - - if typ in type_dict: - return type_dict.get(typ) - return snake_to_camel(typ) - def keys(self) -> List: """Return keys of the connection properties.""" return list(self.configs.keys()) + list(self.secrets.keys()) @@ -131,137 +82,6 @@ def __getitem__(self, item): # Cant't raise UserErrorException due to the code exit(1) of promptflow._cli._utils.py line 368. raise KeyError(f"Key {item!r} not found in connection {self.name!r}.") - @classmethod - def _is_scrubbed_value(cls, value): - """For scrubbed value, cli will get original for update, and prompt user to input for create.""" - if value is None or not value: - return True - if all([v == "*" for v in value]): - return True - return value == SCRUBBED_VALUE_NO_CHANGE - - @classmethod - def _is_user_input_value(cls, value): - """The value will prompt user to input in cli for both create and update.""" - return value == SCRUBBED_VALUE_USER_INPUT - - def _validate_and_encrypt_secrets(self): - encrypt_secrets = {} - invalid_secrets = [] - for k, v in self.secrets.items(): - # In sdk experience, if v is not scrubbed, use it. - # If v is scrubbed, try to use the value in _secrets. - # If v is , raise error. - if self._is_scrubbed_value(v): - # Try to get the value not scrubbed. - v = self._secrets.get(k) - if self._is_scrubbed_value(v) or self._is_user_input_value(v): - # Can't find the original value or is , raise error. - invalid_secrets.append(k) - continue - encrypt_secrets[k] = encrypt_secret_value(v) - if invalid_secrets: - raise ValidationException( - f"Connection {self.name!r} secrets {invalid_secrets} value invalid, please fill them." - ) - return encrypt_secrets - - @classmethod - def _load_from_dict(cls, data: Dict, context: Dict, additional_message: str = None, **kwargs): - schema_cls = cls._get_schema_cls() - try: - loaded_data = schema_cls(context=context).load(data, **kwargs) - except Exception as e: - raise SDKError(f"Load connection failed with {str(e)}. f{(additional_message or '')}.") - return cls(base_path=context[BASE_PATH_CONTEXT_KEY], **loaded_data) - - def _to_dict(self) -> Dict: - schema_cls = self._get_schema_cls() - return schema_cls(context={BASE_PATH_CONTEXT_KEY: "./"}).dump(self) - - @classmethod - # pylint: disable=unused-argument - def _resolve_cls_and_type(cls, data, params_override=None): - type_in_override = find_type_in_override(params_override) - type_str = type_in_override or data.get("type") - if type_str is None: - raise ValidationException("type is required for connection.") - type_str = cls._casting_type(type_str) - type_cls = _supported_types.get(type_str) - if type_cls is None: - raise ValidationException( - f"connection_type {type_str!r} is not supported. Supported types are: {list(_supported_types.keys())}" - ) - return type_cls, type_str - - @abc.abstractmethod - def _to_orm_object(self) -> ORMConnection: - pass - - @classmethod - def _from_mt_rest_object(cls, mt_rest_obj) -> "_Connection": - type_cls, _ = cls._resolve_cls_and_type(data={"type": mt_rest_obj.connection_type}) - obj = type_cls._from_mt_rest_object(mt_rest_obj) - return obj - - @classmethod - def _from_orm_object_with_secrets(cls, orm_object: ORMConnection): - # !!! Attention !!!: Do not use this function to user facing api, use _from_orm_object to remove secrets. - type_cls, _ = cls._resolve_cls_and_type(data={"type": orm_object.connectionType}) - obj = type_cls._from_orm_object_with_secrets(orm_object) - return obj - - @classmethod - def _from_orm_object(cls, orm_object: ORMConnection): - """This function will create a connection object then scrub secrets.""" - type_cls, _ = cls._resolve_cls_and_type(data={"type": orm_object.connectionType}) - obj = type_cls._from_orm_object_with_secrets(orm_object) - # Note: we may can't get secret keys for custom connection from MT - obj.secrets = {k: SCRUBBED_VALUE for k in obj.secrets} - return obj - - @classmethod - def _load( - cls, - data: Dict = None, - yaml_path: Union[PathLike, str] = None, - params_override: list = None, - **kwargs, - ) -> "_Connection": - """Load a job object from a yaml file. - - :param cls: Indicates that this is a class method. - :type cls: class - :param data: Data Dictionary, defaults to None - :type data: Dict, optional - :param yaml_path: YAML Path, defaults to None - :type yaml_path: Union[PathLike, str], optional - :param params_override: Fields to overwrite on top of the yaml file. - Format is [{"field1": "value1"}, {"field2": "value2"}], defaults to None - :type params_override: List[Dict], optional - :param kwargs: A dictionary of additional configuration parameters. - :type kwargs: dict - :raises Exception: An exception - :return: Loaded job object. - :rtype: Job - """ - data = data or {} - params_override = params_override or [] - context = { - BASE_PATH_CONTEXT_KEY: Path(yaml_path).parent if yaml_path else Path("../../azure/_entities/"), - PARAMS_OVERRIDE_KEY: params_override, - } - connection_type, type_str = cls._resolve_cls_and_type(data, params_override) - connection = connection_type._load_from_dict( - data=data, - context=context, - unknown=INCLUDE, - additional_message=f"If you are trying to configure a job that is not of type {type_str}, please specify " - f"the correct connection type in the 'type' property.", - **kwargs, - ) - return connection - def _to_execution_connection_dict(self) -> dict: value = {**self.configs, **self.secrets} secret_keys = list(self.secrets.keys()) @@ -274,65 +94,36 @@ def _to_execution_connection_dict(self) -> dict: @classmethod def _from_execution_connection_dict(cls, name, data) -> "_Connection": - type_cls, _ = cls._resolve_cls_and_type(data={"type": data.get("type")[: -len("Connection")]}) + type_str = data.get("type")[: -len("Connection")] + type_cls = cls.SUPPORTED_TYPES.get(type_str) + if type_cls is None: + raise ValidationException( + f"Connection type {type_str!r} is not supported. " + f"Supported types are: {list(cls.SUPPORTED_TYPES.keys())}" + ) value_dict = data.get("value", {}) - if type_cls == CustomConnection: + # Use class name instead of class here, because the class may be _sdk entity. + if type_cls.__name__ == "CustomConnection": secrets = {k: v for k, v in value_dict.items() if k in data.get("secret_keys", [])} configs = {k: v for k, v in value_dict.items() if k not in secrets} - return CustomConnection(name=name, configs=configs, secrets=secrets) + return type_cls(name=name, configs=configs, secrets=secrets) return type_cls(name=name, **value_dict) + @classmethod + def _is_scrubbed_value(cls, value): + """For scrubbed value, cli will get original for update, and prompt user to input for create.""" + if value is None or not value: + return True + if all([v == "*" for v in value]): + return True + return value == CONNECTION_SCRUBBED_VALUE_NO_CHANGE + def _get_scrubbed_secrets(self): """Return the scrubbed secrets of connection.""" return {key: val for key, val in self.secrets.items() if self._is_scrubbed_value(val)} class _StrongTypeConnection(_Connection): - def _to_orm_object(self): - # Both keys & secrets will be stored in configs for strong type connection. - secrets = self._validate_and_encrypt_secrets() - return ORMConnection( - connectionName=self.name, - connectionType=self.type.value, - configs=json.dumps({**self.configs, **secrets}), - customConfigs="{}", - expiryTime=self.expiry_time, - createdDate=self.created_date, - lastModifiedDate=self.last_modified_date, - ) - - @classmethod - def _from_orm_object_with_secrets(cls, orm_object: ORMConnection): - # !!! Attention !!!: Do not use this function to user facing api, use _from_orm_object to remove secrets. - # Both keys & secrets will be stored in configs for strong type connection. - type_cls, _ = cls._resolve_cls_and_type(data={"type": orm_object.connectionType}) - obj = type_cls( - name=orm_object.connectionName, - expiry_time=orm_object.expiryTime, - created_date=orm_object.createdDate, - last_modified_date=orm_object.lastModifiedDate, - **json.loads(orm_object.configs), - ) - obj.secrets = {k: decrypt_secret_value(obj.name, v) for k, v in obj.secrets.items()} - obj._secrets = {**obj.secrets} - return obj - - @classmethod - def _from_mt_rest_object(cls, mt_rest_obj): - type_cls, _ = cls._resolve_cls_and_type(data={"type": mt_rest_obj.connection_type}) - configs = mt_rest_obj.configs or {} - # For not ARM strong type connection, e.g. OpenAI, api_key will not be returned, but is required argument. - # For ARM strong type connection, api_key will be None and missing when conn._to_dict(), so set a scrubbed one. - configs.update({"api_key": SCRUBBED_VALUE}) - obj = type_cls( - name=mt_rest_obj.connection_name, - expiry_time=mt_rest_obj.expiry_time, - created_date=mt_rest_obj.created_date, - last_modified_date=mt_rest_obj.last_modified_date, - **configs, - ) - return obj - @property def _has_api_key(self): """Return if the connection has api key.""" @@ -366,7 +157,7 @@ class AzureOpenAIConnection(_StrongTypeConnection): :type name: str """ - TYPE = ConnectionType.AZURE_OPEN_AI + TYPE = ConnectionType.AZURE_OPEN_AI.value def __init__( self, @@ -382,10 +173,6 @@ def __init__( self._token_provider = kwargs.get("token_provider") super().__init__(configs=configs, secrets=secrets, **kwargs) - @classmethod - def _get_schema_cls(cls): - return AzureOpenAIConnectionSchema - @property def api_base(self): """Return the connection api base.""" @@ -475,7 +262,7 @@ class OpenAIConnection(_StrongTypeConnection): :type name: str """ - TYPE = ConnectionType.OPEN_AI + TYPE = ConnectionType.OPEN_AI.value def __init__(self, api_key: str, organization: str = None, base_url=None, **kwargs): if base_url == "": @@ -485,10 +272,6 @@ def __init__(self, api_key: str, organization: str = None, base_url=None, **kwar secrets = {"api_key": api_key} super().__init__(configs=configs, secrets=secrets, **kwargs) - @classmethod - def _get_schema_cls(cls): - return OpenAIConnectionSchema - @property def organization(self): """Return the connection organization.""" @@ -539,17 +322,13 @@ class ServerlessConnection(_StrongTypeConnection): :type name: str """ - TYPE = ConnectionType.SERVERLESS + TYPE = ConnectionType.SERVERLESS.value def __init__(self, api_key: str, api_base: str, **kwargs): secrets = {"api_key": api_key} configs = {"api_base": api_base} super().__init__(secrets=secrets, configs=configs, **kwargs) - @classmethod - def _get_schema_cls(cls): - return ServerlessConnectionSchema - @property def api_base(self): """Return the connection api base.""" @@ -570,19 +349,15 @@ class SerpConnection(_StrongTypeConnection): :type name: str """ - TYPE = ConnectionType.SERP + TYPE = ConnectionType.SERP.value def __init__(self, api_key: str, **kwargs): secrets = {"api_key": api_key} super().__init__(secrets=secrets, **kwargs) - @classmethod - def _get_schema_cls(cls): - return SerpConnectionSchema - class _EmbeddingStoreConnection(_StrongTypeConnection): - TYPE = ConnectionType._NOT_SET + TYPE = ConnectionType._NOT_SET.value def __init__(self, api_key: str, api_base: str, **kwargs): configs = {"api_base": api_base} @@ -609,11 +384,7 @@ class QdrantConnection(_EmbeddingStoreConnection): :type name: str """ - TYPE = ConnectionType.QDRANT - - @classmethod - def _get_schema_cls(cls): - return QdrantConnectionSchema + TYPE = ConnectionType.QDRANT.value class WeaviateConnection(_EmbeddingStoreConnection): @@ -627,11 +398,7 @@ class WeaviateConnection(_EmbeddingStoreConnection): :type name: str """ - TYPE = ConnectionType.WEAVIATE - - @classmethod - def _get_schema_cls(cls): - return WeaviateConnectionSchema + TYPE = ConnectionType.WEAVIATE.value class CognitiveSearchConnection(_StrongTypeConnection): @@ -647,17 +414,13 @@ class CognitiveSearchConnection(_StrongTypeConnection): :type name: str """ - TYPE = ConnectionType.COGNITIVE_SEARCH + TYPE = ConnectionType.COGNITIVE_SEARCH.value def __init__(self, api_key: str, api_base: str, api_version: str = "2023-07-01-Preview", **kwargs): configs = {"api_base": api_base, "api_version": api_version} secrets = {"api_key": api_key} super().__init__(configs=configs, secrets=secrets, **kwargs) - @classmethod - def _get_schema_cls(cls): - return CognitiveSearchConnectionSchema - @property def api_base(self): """Return the connection api base.""" @@ -694,7 +457,7 @@ class AzureContentSafetyConnection(_StrongTypeConnection): :type name: str """ - TYPE = ConnectionType.AZURE_CONTENT_SAFETY + TYPE = ConnectionType.AZURE_CONTENT_SAFETY.value def __init__( self, @@ -708,10 +471,6 @@ def __init__( secrets = {"api_key": api_key} super().__init__(configs=configs, secrets=secrets, **kwargs) - @classmethod - def _get_schema_cls(cls): - return AzureContentSafetyConnectionSchema - @property def endpoint(self): """Return the connection endpoint.""" @@ -759,17 +518,13 @@ class FormRecognizerConnection(AzureContentSafetyConnection): """ # Note: FormRecognizer and ContentSafety are using CognitiveService type in ARM, so keys are the same. - TYPE = ConnectionType.FORM_RECOGNIZER + TYPE = ConnectionType.FORM_RECOGNIZER.value def __init__( self, api_key: str, endpoint: str, api_version: str = "2023-07-31", api_type: str = "Form Recognizer", **kwargs ): super().__init__(api_key=api_key, endpoint=endpoint, api_version=api_version, api_type=api_type, **kwargs) - @classmethod - def _get_schema_cls(cls): - return FormRecognizerConnectionSchema - class CustomStrongTypeConnection(_Connection): """Custom strong type connection. @@ -839,10 +594,6 @@ def __setattr__(self, key, value): self.configs[key] = value return super().__setattr__(key, value) - def _to_orm_object(self) -> ORMConnection: - custom_connection = self._convert_to_custom() - return custom_connection._to_orm_object() - def _convert_to_custom(self): # update configs self.configs.update({CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY: self.custom_type}) @@ -903,18 +654,6 @@ def _get_custom_keys(cls, data: Dict): return schema_configs, schema_secrets - @classmethod - def _get_schema_cls(cls): - return CustomStrongTypeConnectionSchema - - @classmethod - def _load_from_dict(cls, data: Dict, context: Dict, additional_message: str = None, **kwargs): - schema_config_keys, schema_secret_keys = cls._get_custom_keys(data) - context[SCHEMA_KEYS_CONTEXT_CONFIG_KEY] = schema_config_keys - context[SCHEMA_KEYS_CONTEXT_SECRET_KEY] = schema_secret_keys - - return (super()._load_from_dict(data, context, additional_message, **kwargs))._convert_to_custom() - class CustomConnection(_Connection): """Custom connection. @@ -927,7 +666,7 @@ class CustomConnection(_Connection): :type name: str """ - TYPE = ConnectionType.CUSTOM + TYPE = ConnectionType.CUSTOM.value def __init__( self, @@ -937,26 +676,6 @@ def __init__( ): super().__init__(secrets=secrets, configs=configs, **kwargs) - @classmethod - def _get_schema_cls(cls): - return CustomConnectionSchema - - @classmethod - def _load_from_dict(cls, data: Dict, context: Dict, additional_message: str = None, **kwargs): - # If context has params_override, it means the data would be updated by overridden values. - # Provide CustomStrongTypeConnectionSchema if 'custom_type' in params_override, else CustomConnectionSchema. - # For example: - # If a user updates an existing connection by re-upserting a connection file, - # the 'data' from DB is CustomConnection, - # but 'params_override' would actually contain custom strong type connection data. - is_custom_strong_type = data.get(CustomStrongTypeConnectionConfigs.TYPE) or any( - CustomStrongTypeConnectionConfigs.TYPE in d for d in context.get(PARAMS_OVERRIDE_KEY, []) - ) - if is_custom_strong_type: - return CustomStrongTypeConnection._load_from_dict(data, context, additional_message, **kwargs) - - return super()._load_from_dict(data, context, additional_message, **kwargs) - def __getattr__(self, item): # Note: This is added for compatibility with promptflow.connections custom connection usage. if item == "secrets": @@ -980,100 +699,6 @@ def is_secret(self, item): # Note: This is added for compatibility with promptflow.connections custom connection usage. return item in self.secrets - def _to_orm_object(self): - # Both keys & secrets will be set in custom configs with value type specified for custom connection. - if not self.secrets: - error = ValueError( - "Secrets is required for custom connection, " - "please use CustomConnection(configs={key1: val1}, secrets={key2: val2}) " - "to initialize custom connection." - ) - raise UserErrorException(message=str(error), error=error) - custom_configs = { - k: {"configValueType": ConfigValueType.STRING.value, "value": v} for k, v in self.configs.items() - } - encrypted_secrets = self._validate_and_encrypt_secrets() - custom_configs.update( - {k: {"configValueType": ConfigValueType.SECRET.value, "value": v} for k, v in encrypted_secrets.items()} - ) - - return ORMConnection( - connectionName=self.name, - connectionType=self.type.value, - configs="{}", - customConfigs=json.dumps(custom_configs), - expiryTime=self.expiry_time, - createdDate=self.created_date, - lastModifiedDate=self.last_modified_date, - ) - - @classmethod - def _from_orm_object_with_secrets(cls, orm_object: ORMConnection): - # !!! Attention !!!: Do not use this function to user facing api, use _from_orm_object to remove secrets. - # Both keys & secrets will be set in custom configs with value type specified for custom connection. - configs = { - k: v["value"] - for k, v in json.loads(orm_object.customConfigs).items() - if v["configValueType"] == ConfigValueType.STRING.value - } - - secrets = {} - unsecure_connection = False - custom_type = None - for k, v in json.loads(orm_object.customConfigs).items(): - if k == CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY: - custom_type = v["value"] - continue - if not v["configValueType"] == ConfigValueType.SECRET.value: - continue - try: - secrets[k] = decrypt_secret_value(orm_object.connectionName, v["value"]) - except UnsecureConnectionError: - # This is to workaround old custom secrets that are not encrypted with Fernet. - unsecure_connection = True - secrets[k] = v["value"] - if unsecure_connection: - print_yellow_warning( - f"Warning: Please delete and re-create connection {orm_object.connectionName} " - "due to a security issue in the old sdk version." - ) - - return cls( - name=orm_object.connectionName, - configs=configs, - secrets=secrets, - custom_type=custom_type, - expiry_time=orm_object.expiryTime, - created_date=orm_object.createdDate, - last_modified_date=orm_object.lastModifiedDate, - ) - - @classmethod - def _from_mt_rest_object(cls, mt_rest_obj): - type_cls, _ = cls._resolve_cls_and_type(data={"type": mt_rest_obj.connection_type}) - if not mt_rest_obj.custom_configs: - mt_rest_obj.custom_configs = {} - configs = { - k: v.value - for k, v in mt_rest_obj.custom_configs.items() - if v.config_value_type == ConfigValueType.STRING.value - } - - secrets = { - k: v.value - for k, v in mt_rest_obj.custom_configs.items() - if v.config_value_type == ConfigValueType.SECRET.value - } - - return cls( - name=mt_rest_obj.connection_name, - configs=configs, - secrets=secrets, - expiry_time=mt_rest_obj.expiry_time, - created_date=mt_rest_obj.created_date, - last_modified_date=mt_rest_obj.last_modified_date, - ) - def _is_custom_strong_type(self): return ( CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY in self.configs @@ -1119,8 +744,8 @@ def _convert_to_custom_strong_type(self, module=None, to_class=None) -> CustomSt return connection_instance -_supported_types = { - v.TYPE.value: v +_Connection.SUPPORTED_TYPES = { + v.TYPE: v for v in globals().values() if isinstance(v, type) and issubclass(v, _Connection) and not v.__name__.startswith("_") } diff --git a/src/promptflow/promptflow/_sdk/__init__.py b/src/promptflow-core/promptflow/core/_connection_provider/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/__init__.py rename to src/promptflow-core/promptflow/core/_connection_provider/__init__.py diff --git a/src/promptflow-core/promptflow/core/_connection_provider/_connection_provider.py b/src/promptflow-core/promptflow/core/_connection_provider/_connection_provider.py new file mode 100644 index 00000000000..de83927b789 --- /dev/null +++ b/src/promptflow-core/promptflow/core/_connection_provider/_connection_provider.py @@ -0,0 +1,49 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from abc import ABC, abstractmethod +from typing import Any + +from promptflow._constants import ConnectionProviderConfig +from promptflow.core._connection_provider._utils import extract_workspace +from promptflow.core._errors import MissingRequiredPackage, UnsupportedConnectionProviderConfig + + +class ConnectionProvider(ABC): + @abstractmethod + def get(self, name: str, **kwargs) -> Any: + """Get connection by name.""" + raise NotImplementedError + + @classmethod + def init_from_provider_config(cls, provider_config: str, credential=None): + """Initialize the connection provider from a provider config. + + Expected value: + - local + - azureml://subscriptions//resourceGroups// + providers/Microsoft.MachineLearningServices/workspaces/ + """ + if not provider_config or provider_config == ConnectionProviderConfig.LOCAL: + try: + from promptflow._sdk._connection_provider._local_connection_provider import LocalConnectionProvider + except ImportError as e: + raise MissingRequiredPackage( + message="Please install 'promptflow-devkit' to use local connection." + ) from e + return LocalConnectionProvider() + if provider_config.startswith(ConnectionProviderConfig.AZUREML): + from promptflow.core._connection_provider._workspace_connection_provider import WorkspaceConnectionProvider + + subscription_id, resource_group, workspace_name = extract_workspace(provider_config) + return WorkspaceConnectionProvider(subscription_id, resource_group, workspace_name, credential) + raise UnsupportedConnectionProviderConfig( + message=f"Unsupported connection provider config: {provider_config}, only 'local' and " + "'azureml://subscriptions//resourceGroups//" + "providers/Microsoft.MachineLearningServices/workspaces/' are expected as value." + ) + + @classmethod + def _init_from_env(cls): + """Initialize the connection provider from environment variables.""" + pass diff --git a/src/promptflow-core/promptflow/core/_connection_provider/_dict_connection_provider.py b/src/promptflow-core/promptflow/core/_connection_provider/_dict_connection_provider.py new file mode 100644 index 00000000000..2f344f03fa8 --- /dev/null +++ b/src/promptflow-core/promptflow/core/_connection_provider/_dict_connection_provider.py @@ -0,0 +1,82 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from dataclasses import fields, is_dataclass +from typing import Any, Dict + +from promptflow._constants import CONNECTION_NAME_PROPERTY, CONNECTION_SECRET_KEYS, CustomStrongTypeConnectionConfigs +from promptflow._utils.utils import try_import +from promptflow.contracts.types import Secret + +from ._connection_provider import ConnectionProvider + + +class DictConnectionProvider(ConnectionProvider): + """Connection provider based on dict, core scenario: cloud submission.""" + + def __init__(self, _dict: Dict[str, dict]): + self._connections_dict = _dict or {} + self._connections = self._build_connections(self._connections_dict) + + @classmethod + def _build_connections(cls, _dict: Dict[str, dict]): + """Build connection dict.""" + from promptflow._core.tools_manager import connections as cls_mapping + + cls.import_requisites(_dict) + connections = {} # key to connection object + for key, connection_dict in _dict.items(): + typ = connection_dict.get("type") + if typ not in cls_mapping: + supported = [key for key in cls_mapping.keys() if not key.startswith("_")] + raise ValueError(f"Unknown connection {key!r} type {typ!r}, supported are {supported}.") + value = connection_dict.get("value", {}) + connection_class = cls_mapping[typ] + + from promptflow.connections import CustomConnection + + if connection_class is CustomConnection: + # Note: CustomConnection definition can not be got, secret keys will be provided in connection dict. + secret_keys = connection_dict.get("secret_keys", []) + secrets = {k: v for k, v in value.items() if k in secret_keys} + configs = {k: v for k, v in value.items() if k not in secrets} + connection_value = connection_class(configs=configs, secrets=secrets, name=key) + if CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY in configs: + connection_value.custom_type = configs[CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY] + else: + """ + Note: Ignore non exists keys of connection class, + because there are some keys just used by UX like resource id, while not used by backend. + """ + if is_dataclass(connection_class): + # Do not delete this branch, as promptflow_vectordb.connections is dataclass type. + cls_fields = {f.name: f for f in fields(connection_class)} + connection_value = connection_class(**{k: v for k, v in value.items() if k in cls_fields}) + secret_keys = [f.name for f in cls_fields.values() if f.type == Secret] + else: + connection_value = connection_class(**{k: v for k, v in value.items()}) + if hasattr(connection_value, "name"): + connection_value.name = key + secrets = getattr(connection_value, "secrets", {}) + secret_keys = list(secrets.keys()) if isinstance(secrets, dict) else [] + # Set secret keys for log scrubbing + setattr(connection_value, CONNECTION_SECRET_KEYS, secret_keys) + # Use this hack to make sure serialization works + setattr(connection_value, CONNECTION_NAME_PROPERTY, key) + connections[key] = connection_value + return connections + + @classmethod + def import_requisites(cls, _dict: Dict[str, dict]): + """Import connection required modules.""" + modules = set() + for key, connection_dict in _dict.items(): + module = connection_dict.get("module") + if module: + modules.add(module) + for module in modules: + # Suppress import error, as we have legacy module promptflow.tools.connections. + try_import(module, f"Import connection module {module!r} failed.", raise_error=False) + + def get(self, name: str) -> Any: + return self._connections.get(name) diff --git a/src/promptflow/promptflow/azure/_models/__init__.py b/src/promptflow-core/promptflow/core/_connection_provider/_models/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_models/__init__.py rename to src/promptflow-core/promptflow/core/_connection_provider/_models/__init__.py diff --git a/src/promptflow/promptflow/azure/_models/_models.py b/src/promptflow-core/promptflow/core/_connection_provider/_models/_models.py similarity index 68% rename from src/promptflow/promptflow/azure/_models/_models.py rename to src/promptflow-core/promptflow/core/_connection_provider/_models/_models.py index 1db8299e122..d0376a0ed8f 100644 --- a/src/promptflow/promptflow/azure/_models/_models.py +++ b/src/promptflow-core/promptflow/core/_connection_provider/_models/_models.py @@ -8,8 +8,6 @@ import msrest.serialization -from azure.core.exceptions import HttpResponseError - class WorkspaceConnectionPropertiesV2(msrest.serialization.Model): """WorkspaceConnectionPropertiesV2. @@ -61,42 +59,41 @@ class WorkspaceConnectionPropertiesV2(msrest.serialization.Model): """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, } _subtype_map = { - 'auth_type': {'AAD': 'AADAuthTypeWorkspaceConnectionProperties', - 'AccessKey': 'AccessKeyAuthTypeWorkspaceConnectionProperties', - 'AccountKey': 'AccountKeyAuthTypeWorkspaceConnectionProperties', - 'ApiKey': 'ApiKeyAuthWorkspaceConnectionProperties', - 'CustomKeys': 'CustomKeysWorkspaceConnectionProperties', - 'ManagedIdentity': 'ManagedIdentityAuthTypeWorkspaceConnectionProperties', - 'None': 'NoneAuthTypeWorkspaceConnectionProperties', - 'OAuth2': 'OAuth2AuthTypeWorkspaceConnectionProperties', - 'PAT': 'PATAuthTypeWorkspaceConnectionProperties', - 'SAS': 'SASAuthTypeWorkspaceConnectionProperties', - 'ServicePrincipal': 'ServicePrincipalAuthTypeWorkspaceConnectionProperties', - 'UsernamePassword': 'UsernamePasswordAuthTypeWorkspaceConnectionProperties'} - } - - def __init__( - self, - **kwargs - ): + "auth_type": { + "AAD": "AADAuthTypeWorkspaceConnectionProperties", + "AccessKey": "AccessKeyAuthTypeWorkspaceConnectionProperties", + "AccountKey": "AccountKeyAuthTypeWorkspaceConnectionProperties", + "ApiKey": "ApiKeyAuthWorkspaceConnectionProperties", + "CustomKeys": "CustomKeysWorkspaceConnectionProperties", + "ManagedIdentity": "ManagedIdentityAuthTypeWorkspaceConnectionProperties", + "None": "NoneAuthTypeWorkspaceConnectionProperties", + "OAuth2": "OAuth2AuthTypeWorkspaceConnectionProperties", + "PAT": "PATAuthTypeWorkspaceConnectionProperties", + "SAS": "SASAuthTypeWorkspaceConnectionProperties", + "ServicePrincipal": "ServicePrincipalAuthTypeWorkspaceConnectionProperties", + "UsernamePassword": "UsernamePasswordAuthTypeWorkspaceConnectionProperties", + } + } + + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -129,14 +126,14 @@ def __init__( """ super(WorkspaceConnectionPropertiesV2, self).__init__(**kwargs) self.auth_type = None # type: Optional[str] - self.category = kwargs.get('category', None) + self.category = kwargs.get("category", None) self.created_by_workspace_arm_id = None - self.expiry_time = kwargs.get('expiry_time', None) + self.expiry_time = kwargs.get("expiry_time", None) self.group = None - self.is_shared_to_all = kwargs.get('is_shared_to_all', None) - self.metadata = kwargs.get('metadata', None) - self.shared_user_list = kwargs.get('shared_user_list', None) - self.target = kwargs.get('target', None) + self.is_shared_to_all = kwargs.get("is_shared_to_all", None) + self.metadata = kwargs.get("metadata", None) + self.shared_user_list = kwargs.get("shared_user_list", None) + self.target = kwargs.get("target", None) class AADAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): @@ -186,27 +183,24 @@ class AADAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -238,7 +232,7 @@ def __init__( :paramtype target: str """ super(AADAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'AAD' # type: str + self.auth_type = "AAD" # type: str class AccessKeyAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): @@ -290,28 +284,25 @@ class AccessKeyAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionProperti """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionAccessKey'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionAccessKey"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -345,8 +336,8 @@ def __init__( :paramtype credentials: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionAccessKey """ super(AccessKeyAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'AccessKey' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "AccessKey" # type: str + self.credentials = kwargs.get("credentials", None) class AccountApiKeys(msrest.serialization.Model): @@ -359,14 +350,11 @@ class AccountApiKeys(msrest.serialization.Model): """ _attribute_map = { - 'key1': {'key': 'key1', 'type': 'str'}, - 'key2': {'key': 'key2', 'type': 'str'}, + "key1": {"key": "key1", "type": "str"}, + "key2": {"key": "key2", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key1: :paramtype key1: str @@ -374,8 +362,8 @@ def __init__( :paramtype key2: str """ super(AccountApiKeys, self).__init__(**kwargs) - self.key1 = kwargs.get('key1', None) - self.key2 = kwargs.get('key2', None) + self.key1 = kwargs.get("key1", None) + self.key2 = kwargs.get("key2", None) class AccountKeyAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): @@ -428,28 +416,25 @@ class AccountKeyAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropert """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionSharedAccessSignature'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionSharedAccessSignature"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -484,8 +469,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionSharedAccessSignature """ super(AccountKeyAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'AccountKey' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "AccountKey" # type: str + self.credentials = kwargs.get("credentials", None) class DatastoreCredentials(msrest.serialization.Model): @@ -503,28 +488,27 @@ class DatastoreCredentials(msrest.serialization.Model): """ _validation = { - 'credentials_type': {'required': True}, + "credentials_type": {"required": True}, } _attribute_map = { - 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + "credentials_type": {"key": "credentialsType", "type": "str"}, } _subtype_map = { - 'credentials_type': {'AccountKey': 'AccountKeyDatastoreCredentials', - 'Certificate': 'CertificateDatastoreCredentials', - 'KerberosKeytab': 'KerberosKeytabCredentials', - 'KerberosPassword': 'KerberosPasswordCredentials', 'None': 'NoneDatastoreCredentials', - 'Sas': 'SasDatastoreCredentials', - 'ServicePrincipal': 'ServicePrincipalDatastoreCredentials'} - } - - def __init__( - self, - **kwargs - ): - """ - """ + "credentials_type": { + "AccountKey": "AccountKeyDatastoreCredentials", + "Certificate": "CertificateDatastoreCredentials", + "KerberosKeytab": "KerberosKeytabCredentials", + "KerberosPassword": "KerberosPasswordCredentials", + "None": "NoneDatastoreCredentials", + "Sas": "SasDatastoreCredentials", + "ServicePrincipal": "ServicePrincipalDatastoreCredentials", + } + } + + def __init__(self, **kwargs): + """ """ super(DatastoreCredentials, self).__init__(**kwargs) self.credentials_type = None # type: Optional[str] @@ -543,26 +527,23 @@ class AccountKeyDatastoreCredentials(DatastoreCredentials): """ _validation = { - 'credentials_type': {'required': True}, - 'secrets': {'required': True}, + "credentials_type": {"required": True}, + "secrets": {"required": True}, } _attribute_map = { - 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, - 'secrets': {'key': 'secrets', 'type': 'AccountKeyDatastoreSecrets'}, + "credentials_type": {"key": "credentialsType", "type": "str"}, + "secrets": {"key": "secrets", "type": "AccountKeyDatastoreSecrets"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword secrets: Required. [Required] Storage account secrets. :paramtype secrets: ~azure.mgmt.machinelearningservices.models.AccountKeyDatastoreSecrets """ super(AccountKeyDatastoreCredentials, self).__init__(**kwargs) - self.credentials_type = 'AccountKey' # type: str - self.secrets = kwargs['secrets'] + self.credentials_type = "AccountKey" # type: str + self.secrets = kwargs["secrets"] class DatastoreSecrets(msrest.serialization.Model): @@ -580,25 +561,26 @@ class DatastoreSecrets(msrest.serialization.Model): """ _validation = { - 'secrets_type': {'required': True}, + "secrets_type": {"required": True}, } _attribute_map = { - 'secrets_type': {'key': 'secretsType', 'type': 'str'}, + "secrets_type": {"key": "secretsType", "type": "str"}, } _subtype_map = { - 'secrets_type': {'AccountKey': 'AccountKeyDatastoreSecrets', 'Certificate': 'CertificateDatastoreSecrets', - 'KerberosKeytab': 'KerberosKeytabSecrets', 'KerberosPassword': 'KerberosPasswordSecrets', - 'Sas': 'SasDatastoreSecrets', 'ServicePrincipal': 'ServicePrincipalDatastoreSecrets'} - } - - def __init__( - self, - **kwargs - ): - """ - """ + "secrets_type": { + "AccountKey": "AccountKeyDatastoreSecrets", + "Certificate": "CertificateDatastoreSecrets", + "KerberosKeytab": "KerberosKeytabSecrets", + "KerberosPassword": "KerberosPasswordSecrets", + "Sas": "SasDatastoreSecrets", + "ServicePrincipal": "ServicePrincipalDatastoreSecrets", + } + } + + def __init__(self, **kwargs): + """ """ super(DatastoreSecrets, self).__init__(**kwargs) self.secrets_type = None # type: Optional[str] @@ -617,25 +599,22 @@ class AccountKeyDatastoreSecrets(DatastoreSecrets): """ _validation = { - 'secrets_type': {'required': True}, + "secrets_type": {"required": True}, } _attribute_map = { - 'secrets_type': {'key': 'secretsType', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, + "secrets_type": {"key": "secretsType", "type": "str"}, + "key": {"key": "key", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key: Storage account key. :paramtype key: str """ super(AccountKeyDatastoreSecrets, self).__init__(**kwargs) - self.secrets_type = 'AccountKey' # type: str - self.key = kwargs.get('key', None) + self.secrets_type = "AccountKey" # type: str + self.key = kwargs.get("key", None) class DeploymentModel(msrest.serialization.Model): @@ -659,21 +638,18 @@ class DeploymentModel(msrest.serialization.Model): """ _validation = { - 'call_rate_limit': {'readonly': True}, + "call_rate_limit": {"readonly": True}, } _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'call_rate_limit': {'key': 'callRateLimit', 'type': 'CallRateLimit'}, + "format": {"key": "format", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "version": {"key": "version", "type": "str"}, + "source": {"key": "source", "type": "str"}, + "call_rate_limit": {"key": "callRateLimit", "type": "CallRateLimit"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword format: Deployment model format. :paramtype format: str @@ -688,10 +664,10 @@ def __init__( :paramtype source: str """ super(DeploymentModel, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) - self.source = kwargs.get('source', None) + self.format = kwargs.get("format", None) + self.name = kwargs.get("name", None) + self.version = kwargs.get("version", None) + self.source = kwargs.get("source", None) self.call_rate_limit = None @@ -736,31 +712,28 @@ class AccountModel(DeploymentModel): """ _validation = { - 'call_rate_limit': {'readonly': True}, - 'system_data': {'readonly': True}, + "call_rate_limit": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'call_rate_limit': {'key': 'callRateLimit', 'type': 'CallRateLimit'}, - 'base_model': {'key': 'baseModel', 'type': 'DeploymentModel'}, - 'is_default_version': {'key': 'isDefaultVersion', 'type': 'bool'}, - 'skus': {'key': 'skus', 'type': '[ModelSku]'}, - 'max_capacity': {'key': 'maxCapacity', 'type': 'int'}, - 'capabilities': {'key': 'capabilities', 'type': '{str}'}, - 'finetune_capabilities': {'key': 'finetuneCapabilities', 'type': '{str}'}, - 'deprecation': {'key': 'deprecation', 'type': 'ModelDeprecationInfo'}, - 'lifecycle_status': {'key': 'lifecycleStatus', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "format": {"key": "format", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "version": {"key": "version", "type": "str"}, + "source": {"key": "source", "type": "str"}, + "call_rate_limit": {"key": "callRateLimit", "type": "CallRateLimit"}, + "base_model": {"key": "baseModel", "type": "DeploymentModel"}, + "is_default_version": {"key": "isDefaultVersion", "type": "bool"}, + "skus": {"key": "skus", "type": "[ModelSku]"}, + "max_capacity": {"key": "maxCapacity", "type": "int"}, + "capabilities": {"key": "capabilities", "type": "{str}"}, + "finetune_capabilities": {"key": "finetuneCapabilities", "type": "{str}"}, + "deprecation": {"key": "deprecation", "type": "ModelDeprecationInfo"}, + "lifecycle_status": {"key": "lifecycleStatus", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword format: Deployment model format. :paramtype format: str @@ -793,14 +766,14 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ModelLifecycleStatus """ super(AccountModel, self).__init__(**kwargs) - self.base_model = kwargs.get('base_model', None) - self.is_default_version = kwargs.get('is_default_version', None) - self.skus = kwargs.get('skus', None) - self.max_capacity = kwargs.get('max_capacity', None) - self.capabilities = kwargs.get('capabilities', None) - self.finetune_capabilities = kwargs.get('finetune_capabilities', None) - self.deprecation = kwargs.get('deprecation', None) - self.lifecycle_status = kwargs.get('lifecycle_status', None) + self.base_model = kwargs.get("base_model", None) + self.is_default_version = kwargs.get("is_default_version", None) + self.skus = kwargs.get("skus", None) + self.max_capacity = kwargs.get("max_capacity", None) + self.capabilities = kwargs.get("capabilities", None) + self.finetune_capabilities = kwargs.get("finetune_capabilities", None) + self.deprecation = kwargs.get("deprecation", None) + self.lifecycle_status = kwargs.get("lifecycle_status", None) self.system_data = None @@ -818,14 +791,11 @@ class AcrDetails(msrest.serialization.Model): """ _attribute_map = { - 'system_created_acr_account': {'key': 'systemCreatedAcrAccount', 'type': 'SystemCreatedAcrAccount'}, - 'user_created_acr_account': {'key': 'userCreatedAcrAccount', 'type': 'UserCreatedAcrAccount'}, + "system_created_acr_account": {"key": "systemCreatedAcrAccount", "type": "SystemCreatedAcrAccount"}, + "user_created_acr_account": {"key": "userCreatedAcrAccount", "type": "UserCreatedAcrAccount"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword system_created_acr_account: Details of system created ACR account to be used for the Registry. @@ -837,8 +807,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.UserCreatedAcrAccount """ super(AcrDetails, self).__init__(**kwargs) - self.system_created_acr_account = kwargs.get('system_created_acr_account', None) - self.user_created_acr_account = kwargs.get('user_created_acr_account', None) + self.system_created_acr_account = kwargs.get("system_created_acr_account", None) + self.user_created_acr_account = kwargs.get("user_created_acr_account", None) class ActualCapacityInfo(msrest.serialization.Model): @@ -855,15 +825,12 @@ class ActualCapacityInfo(msrest.serialization.Model): """ _attribute_map = { - 'allocated': {'key': 'allocated', 'type': 'int'}, - 'assignment_failed': {'key': 'assignmentFailed', 'type': 'int'}, - 'assignment_success': {'key': 'assignmentSuccess', 'type': 'int'}, + "allocated": {"key": "allocated", "type": "int"}, + "assignment_failed": {"key": "assignmentFailed", "type": "int"}, + "assignment_success": {"key": "assignmentSuccess", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword allocated: Gets or sets the total number of instances for the group. :paramtype allocated: int @@ -875,9 +842,9 @@ def __init__( :paramtype assignment_success: int """ super(ActualCapacityInfo, self).__init__(**kwargs) - self.allocated = kwargs.get('allocated', 0) - self.assignment_failed = kwargs.get('assignment_failed', 0) - self.assignment_success = kwargs.get('assignment_success', 0) + self.allocated = kwargs.get("allocated", 0) + self.assignment_failed = kwargs.get("assignment_failed", 0) + self.assignment_success = kwargs.get("assignment_success", 0) class AKSSchema(msrest.serialization.Model): @@ -888,19 +855,16 @@ class AKSSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'AKSSchemaProperties'}, + "properties": {"key": "properties", "type": "AKSSchemaProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: AKS properties. :paramtype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties """ super(AKSSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class Compute(msrest.serialization.Model): @@ -943,38 +907,43 @@ class Compute(msrest.serialization.Model): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } _subtype_map = { - 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', - 'DataFactory': 'DataFactory', 'DataLakeAnalytics': 'DataLakeAnalytics', - 'Databricks': 'Databricks', 'HDInsight': 'HDInsight', 'Kubernetes': 'Kubernetes', - 'SynapseSpark': 'SynapseSpark', 'VirtualMachine': 'VirtualMachine'} - } - - def __init__( - self, - **kwargs - ): + "compute_type": { + "AKS": "AKS", + "AmlCompute": "AmlCompute", + "ComputeInstance": "ComputeInstance", + "DataFactory": "DataFactory", + "DataLakeAnalytics": "DataLakeAnalytics", + "Databricks": "Databricks", + "HDInsight": "HDInsight", + "Kubernetes": "Kubernetes", + "SynapseSpark": "SynapseSpark", + "VirtualMachine": "VirtualMachine", + } + } + + def __init__(self, **kwargs): """ :keyword compute_location: Location for the underlying compute. :paramtype compute_location: str @@ -988,15 +957,15 @@ def __init__( """ super(Compute, self).__init__(**kwargs) self.compute_type = None # type: Optional[str] - self.compute_location = kwargs.get('compute_location', None) + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class AKS(Compute, AKSSchema): @@ -1038,32 +1007,29 @@ class AKS(Compute, AKSSchema): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'AKSSchemaProperties'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "properties": {"key": "properties", "type": "AKSSchemaProperties"}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: AKS properties. :paramtype properties: ~azure.mgmt.machinelearningservices.models.AKSSchemaProperties @@ -1078,17 +1044,17 @@ def __init__( :paramtype disable_local_auth: bool """ super(AKS, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'AKS' # type: str - self.compute_location = kwargs.get('compute_location', None) + self.properties = kwargs.get("properties", None) + self.compute_type = "AKS" # type: str + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class AksComputeSecretsProperties(msrest.serialization.Model): @@ -1105,15 +1071,12 @@ class AksComputeSecretsProperties(msrest.serialization.Model): """ _attribute_map = { - 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, - 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, - 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, + "user_kube_config": {"key": "userKubeConfig", "type": "str"}, + "admin_kube_config": {"key": "adminKubeConfig", "type": "str"}, + "image_pull_secret_name": {"key": "imagePullSecretName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword user_kube_config: Content of kubeconfig file that can be used to connect to the Kubernetes cluster. @@ -1125,9 +1088,9 @@ def __init__( :paramtype image_pull_secret_name: str """ super(AksComputeSecretsProperties, self).__init__(**kwargs) - self.user_kube_config = kwargs.get('user_kube_config', None) - self.admin_kube_config = kwargs.get('admin_kube_config', None) - self.image_pull_secret_name = kwargs.get('image_pull_secret_name', None) + self.user_kube_config = kwargs.get("user_kube_config", None) + self.admin_kube_config = kwargs.get("admin_kube_config", None) + self.image_pull_secret_name = kwargs.get("image_pull_secret_name", None) class ComputeSecrets(msrest.serialization.Model): @@ -1145,24 +1108,23 @@ class ComputeSecrets(msrest.serialization.Model): """ _validation = { - 'compute_type': {'required': True}, + "compute_type": {"required": True}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, + "compute_type": {"key": "computeType", "type": "str"}, } _subtype_map = { - 'compute_type': {'AKS': 'AksComputeSecrets', 'Databricks': 'DatabricksComputeSecrets', - 'VirtualMachine': 'VirtualMachineSecrets'} + "compute_type": { + "AKS": "AksComputeSecrets", + "Databricks": "DatabricksComputeSecrets", + "VirtualMachine": "VirtualMachineSecrets", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ComputeSecrets, self).__init__(**kwargs) self.compute_type = None # type: Optional[str] @@ -1187,20 +1149,17 @@ class AksComputeSecrets(ComputeSecrets, AksComputeSecretsProperties): """ _validation = { - 'compute_type': {'required': True}, + "compute_type": {"required": True}, } _attribute_map = { - 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, - 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, - 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, + "user_kube_config": {"key": "userKubeConfig", "type": "str"}, + "admin_kube_config": {"key": "adminKubeConfig", "type": "str"}, + "image_pull_secret_name": {"key": "imagePullSecretName", "type": "str"}, + "compute_type": {"key": "computeType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword user_kube_config: Content of kubeconfig file that can be used to connect to the Kubernetes cluster. @@ -1212,10 +1171,10 @@ def __init__( :paramtype image_pull_secret_name: str """ super(AksComputeSecrets, self).__init__(**kwargs) - self.user_kube_config = kwargs.get('user_kube_config', None) - self.admin_kube_config = kwargs.get('admin_kube_config', None) - self.image_pull_secret_name = kwargs.get('image_pull_secret_name', None) - self.compute_type = 'AKS' # type: str + self.user_kube_config = kwargs.get("user_kube_config", None) + self.admin_kube_config = kwargs.get("admin_kube_config", None) + self.image_pull_secret_name = kwargs.get("image_pull_secret_name", None) + self.compute_type = "AKS" # type: str class AksNetworkingConfiguration(msrest.serialization.Model): @@ -1235,23 +1194,21 @@ class AksNetworkingConfiguration(msrest.serialization.Model): """ _validation = { - 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, - 'dns_service_ip': { - 'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, - 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + "service_cidr": {"pattern": r"^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"}, + "dns_service_ip": { + "pattern": r"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" + }, + "docker_bridge_cidr": {"pattern": r"^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$"}, } _attribute_map = { - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, - 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, - 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + "subnet_id": {"key": "subnetId", "type": "str"}, + "service_cidr": {"key": "serviceCidr", "type": "str"}, + "dns_service_ip": {"key": "dnsServiceIP", "type": "str"}, + "docker_bridge_cidr": {"key": "dockerBridgeCidr", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword subnet_id: Virtual network subnet resource ID the compute nodes belong to. :paramtype subnet_id: str @@ -1266,10 +1223,10 @@ def __init__( :paramtype docker_bridge_cidr: str """ super(AksNetworkingConfiguration, self).__init__(**kwargs) - self.subnet_id = kwargs.get('subnet_id', None) - self.service_cidr = kwargs.get('service_cidr', None) - self.dns_service_ip = kwargs.get('dns_service_ip', None) - self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', None) + self.subnet_id = kwargs.get("subnet_id", None) + self.service_cidr = kwargs.get("service_cidr", None) + self.dns_service_ip = kwargs.get("dns_service_ip", None) + self.docker_bridge_cidr = kwargs.get("docker_bridge_cidr", None) class AKSSchemaProperties(msrest.serialization.Model): @@ -1301,26 +1258,23 @@ class AKSSchemaProperties(msrest.serialization.Model): """ _validation = { - 'system_services': {'readonly': True}, - 'agent_count': {'minimum': 0}, + "system_services": {"readonly": True}, + "agent_count": {"minimum": 0}, } _attribute_map = { - 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, - 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, - 'agent_count': {'key': 'agentCount', 'type': 'int'}, - 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, - 'cluster_purpose': {'key': 'clusterPurpose', 'type': 'str'}, - 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, - 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, - 'load_balancer_type': {'key': 'loadBalancerType', 'type': 'str'}, - 'load_balancer_subnet': {'key': 'loadBalancerSubnet', 'type': 'str'}, + "cluster_fqdn": {"key": "clusterFqdn", "type": "str"}, + "system_services": {"key": "systemServices", "type": "[SystemService]"}, + "agent_count": {"key": "agentCount", "type": "int"}, + "agent_vm_size": {"key": "agentVmSize", "type": "str"}, + "cluster_purpose": {"key": "clusterPurpose", "type": "str"}, + "ssl_configuration": {"key": "sslConfiguration", "type": "SslConfiguration"}, + "aks_networking_configuration": {"key": "aksNetworkingConfiguration", "type": "AksNetworkingConfiguration"}, + "load_balancer_type": {"key": "loadBalancerType", "type": "str"}, + "load_balancer_subnet": {"key": "loadBalancerSubnet", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword cluster_fqdn: Cluster full qualified domain name. :paramtype cluster_fqdn: str @@ -1344,15 +1298,15 @@ def __init__( :paramtype load_balancer_subnet: str """ super(AKSSchemaProperties, self).__init__(**kwargs) - self.cluster_fqdn = kwargs.get('cluster_fqdn', None) + self.cluster_fqdn = kwargs.get("cluster_fqdn", None) self.system_services = None - self.agent_count = kwargs.get('agent_count', None) - self.agent_vm_size = kwargs.get('agent_vm_size', None) - self.cluster_purpose = kwargs.get('cluster_purpose', "FastProd") - self.ssl_configuration = kwargs.get('ssl_configuration', None) - self.aks_networking_configuration = kwargs.get('aks_networking_configuration', None) - self.load_balancer_type = kwargs.get('load_balancer_type', "PublicIp") - self.load_balancer_subnet = kwargs.get('load_balancer_subnet', None) + self.agent_count = kwargs.get("agent_count", None) + self.agent_vm_size = kwargs.get("agent_vm_size", None) + self.cluster_purpose = kwargs.get("cluster_purpose", "FastProd") + self.ssl_configuration = kwargs.get("ssl_configuration", None) + self.aks_networking_configuration = kwargs.get("aks_networking_configuration", None) + self.load_balancer_type = kwargs.get("load_balancer_type", "PublicIp") + self.load_balancer_subnet = kwargs.get("load_balancer_subnet", None) class MonitoringFeatureFilterBase(msrest.serialization.Model): @@ -1371,24 +1325,23 @@ class MonitoringFeatureFilterBase(msrest.serialization.Model): """ _validation = { - 'filter_type': {'required': True}, + "filter_type": {"required": True}, } _attribute_map = { - 'filter_type': {'key': 'filterType', 'type': 'str'}, + "filter_type": {"key": "filterType", "type": "str"}, } _subtype_map = { - 'filter_type': {'AllFeatures': 'AllFeatures', 'FeatureSubset': 'FeatureSubset', - 'TopNByAttribution': 'TopNFeaturesByAttribution'} + "filter_type": { + "AllFeatures": "AllFeatures", + "FeatureSubset": "FeatureSubset", + "TopNByAttribution": "TopNFeaturesByAttribution", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(MonitoringFeatureFilterBase, self).__init__(**kwargs) self.filter_type = None # type: Optional[str] @@ -1406,21 +1359,17 @@ class AllFeatures(MonitoringFeatureFilterBase): """ _validation = { - 'filter_type': {'required': True}, + "filter_type": {"required": True}, } _attribute_map = { - 'filter_type': {'key': 'filterType', 'type': 'str'}, + "filter_type": {"key": "filterType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AllFeatures, self).__init__(**kwargs) - self.filter_type = 'AllFeatures' # type: str + self.filter_type = "AllFeatures" # type: str class Nodes(msrest.serialization.Model): @@ -1437,23 +1386,17 @@ class Nodes(msrest.serialization.Model): """ _validation = { - 'nodes_value_type': {'required': True}, + "nodes_value_type": {"required": True}, } _attribute_map = { - 'nodes_value_type': {'key': 'nodesValueType', 'type': 'str'}, + "nodes_value_type": {"key": "nodesValueType", "type": "str"}, } - _subtype_map = { - 'nodes_value_type': {'All': 'AllNodes'} - } + _subtype_map = {"nodes_value_type": {"All": "AllNodes"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(Nodes, self).__init__(**kwargs) self.nodes_value_type = None # type: Optional[str] @@ -1469,21 +1412,17 @@ class AllNodes(Nodes): """ _validation = { - 'nodes_value_type': {'required': True}, + "nodes_value_type": {"required": True}, } _attribute_map = { - 'nodes_value_type': {'key': 'nodesValueType', 'type': 'str'}, + "nodes_value_type": {"key": "nodesValueType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AllNodes, self).__init__(**kwargs) - self.nodes_value_type = 'All' # type: str + self.nodes_value_type = "All" # type: str class AmlComputeSchema(msrest.serialization.Model): @@ -1494,19 +1433,16 @@ class AmlComputeSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, + "properties": {"key": "properties", "type": "AmlComputeProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of AmlCompute. :paramtype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties """ super(AmlComputeSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class AmlCompute(Compute, AmlComputeSchema): @@ -1548,32 +1484,29 @@ class AmlCompute(Compute, AmlComputeSchema): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "properties": {"key": "properties", "type": "AmlComputeProperties"}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of AmlCompute. :paramtype properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties @@ -1588,17 +1521,17 @@ def __init__( :paramtype disable_local_auth: bool """ super(AmlCompute, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'AmlCompute' # type: str - self.compute_location = kwargs.get('compute_location', None) + self.properties = kwargs.get("properties", None) + self.compute_type = "AmlCompute" # type: str + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class AmlComputeNodeInformation(msrest.serialization.Model): @@ -1623,29 +1556,25 @@ class AmlComputeNodeInformation(msrest.serialization.Model): """ _validation = { - 'node_id': {'readonly': True}, - 'private_ip_address': {'readonly': True}, - 'public_ip_address': {'readonly': True}, - 'port': {'readonly': True}, - 'node_state': {'readonly': True}, - 'run_id': {'readonly': True}, + "node_id": {"readonly": True}, + "private_ip_address": {"readonly": True}, + "public_ip_address": {"readonly": True}, + "port": {"readonly": True}, + "node_state": {"readonly": True}, + "run_id": {"readonly": True}, } _attribute_map = { - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'node_state': {'key': 'nodeState', 'type': 'str'}, - 'run_id': {'key': 'runId', 'type': 'str'}, + "node_id": {"key": "nodeId", "type": "str"}, + "private_ip_address": {"key": "privateIpAddress", "type": "str"}, + "public_ip_address": {"key": "publicIpAddress", "type": "str"}, + "port": {"key": "port", "type": "int"}, + "node_state": {"key": "nodeState", "type": "str"}, + "run_id": {"key": "runId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AmlComputeNodeInformation, self).__init__(**kwargs) self.node_id = None self.private_ip_address = None @@ -1667,21 +1596,17 @@ class AmlComputeNodesInformation(msrest.serialization.Model): """ _validation = { - 'nodes': {'readonly': True}, - 'next_link': {'readonly': True}, + "nodes": {"readonly": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "nodes": {"key": "nodes", "type": "[AmlComputeNodeInformation]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AmlComputeNodesInformation, self).__init__(**kwargs) self.nodes = None self.next_link = None @@ -1752,38 +1677,35 @@ class AmlComputeProperties(msrest.serialization.Model): """ _validation = { - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'current_node_count': {'readonly': True}, - 'target_node_count': {'readonly': True}, - 'node_state_counts': {'readonly': True}, + "allocation_state": {"readonly": True}, + "allocation_state_transition_time": {"readonly": True}, + "errors": {"readonly": True}, + "current_node_count": {"readonly": True}, + "target_node_count": {"readonly": True}, + "node_state_counts": {"readonly": True}, } _attribute_map = { - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, - 'virtual_machine_image': {'key': 'virtualMachineImage', 'type': 'VirtualMachineImage'}, - 'isolated_network': {'key': 'isolatedNetwork', 'type': 'bool'}, - 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, - 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, - 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, - 'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'}, - 'allocation_state': {'key': 'allocationState', 'type': 'str'}, - 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, - 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, - 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, - 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, - 'property_bag': {'key': 'propertyBag', 'type': 'object'}, + "os_type": {"key": "osType", "type": "str"}, + "vm_size": {"key": "vmSize", "type": "str"}, + "vm_priority": {"key": "vmPriority", "type": "str"}, + "virtual_machine_image": {"key": "virtualMachineImage", "type": "VirtualMachineImage"}, + "isolated_network": {"key": "isolatedNetwork", "type": "bool"}, + "scale_settings": {"key": "scaleSettings", "type": "ScaleSettings"}, + "user_account_credentials": {"key": "userAccountCredentials", "type": "UserAccountCredentials"}, + "subnet": {"key": "subnet", "type": "ResourceId"}, + "remote_login_port_public_access": {"key": "remoteLoginPortPublicAccess", "type": "str"}, + "allocation_state": {"key": "allocationState", "type": "str"}, + "allocation_state_transition_time": {"key": "allocationStateTransitionTime", "type": "iso-8601"}, + "errors": {"key": "errors", "type": "[ErrorResponse]"}, + "current_node_count": {"key": "currentNodeCount", "type": "int"}, + "target_node_count": {"key": "targetNodeCount", "type": "int"}, + "node_state_counts": {"key": "nodeStateCounts", "type": "NodeStateCounts"}, + "enable_node_public_ip": {"key": "enableNodePublicIp", "type": "bool"}, + "property_bag": {"key": "propertyBag", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword os_type: Compute OS Type. Possible values include: "Linux", "Windows". Default value: "Linux". @@ -1824,23 +1746,23 @@ def __init__( :paramtype property_bag: any """ super(AmlComputeProperties, self).__init__(**kwargs) - self.os_type = kwargs.get('os_type', "Linux") - self.vm_size = kwargs.get('vm_size', None) - self.vm_priority = kwargs.get('vm_priority', None) - self.virtual_machine_image = kwargs.get('virtual_machine_image', None) - self.isolated_network = kwargs.get('isolated_network', None) - self.scale_settings = kwargs.get('scale_settings', None) - self.user_account_credentials = kwargs.get('user_account_credentials', None) - self.subnet = kwargs.get('subnet', None) - self.remote_login_port_public_access = kwargs.get('remote_login_port_public_access', "NotSpecified") + self.os_type = kwargs.get("os_type", "Linux") + self.vm_size = kwargs.get("vm_size", None) + self.vm_priority = kwargs.get("vm_priority", None) + self.virtual_machine_image = kwargs.get("virtual_machine_image", None) + self.isolated_network = kwargs.get("isolated_network", None) + self.scale_settings = kwargs.get("scale_settings", None) + self.user_account_credentials = kwargs.get("user_account_credentials", None) + self.subnet = kwargs.get("subnet", None) + self.remote_login_port_public_access = kwargs.get("remote_login_port_public_access", "NotSpecified") self.allocation_state = None self.allocation_state_transition_time = None self.errors = None self.current_node_count = None self.target_node_count = None self.node_state_counts = None - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', True) - self.property_bag = kwargs.get('property_bag', None) + self.enable_node_public_ip = kwargs.get("enable_node_public_ip", True) + self.property_bag = kwargs.get("property_bag", None) class IdentityConfiguration(msrest.serialization.Model): @@ -1858,23 +1780,19 @@ class IdentityConfiguration(msrest.serialization.Model): """ _validation = { - 'identity_type': {'required': True}, + "identity_type": {"required": True}, } _attribute_map = { - 'identity_type': {'key': 'identityType', 'type': 'str'}, + "identity_type": {"key": "identityType", "type": "str"}, } _subtype_map = { - 'identity_type': {'AMLToken': 'AmlToken', 'Managed': 'ManagedIdentity', 'UserIdentity': 'UserIdentity'} + "identity_type": {"AMLToken": "AmlToken", "Managed": "ManagedIdentity", "UserIdentity": "UserIdentity"} } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(IdentityConfiguration, self).__init__(**kwargs) self.identity_type = None # type: Optional[str] @@ -1891,21 +1809,17 @@ class AmlToken(IdentityConfiguration): """ _validation = { - 'identity_type': {'required': True}, + "identity_type": {"required": True}, } _attribute_map = { - 'identity_type': {'key': 'identityType', 'type': 'str'}, + "identity_type": {"key": "identityType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AmlToken, self).__init__(**kwargs) - self.identity_type = 'AMLToken' # type: str + self.identity_type = "AMLToken" # type: str class MonitorComputeIdentityBase(msrest.serialization.Model): @@ -1923,23 +1837,19 @@ class MonitorComputeIdentityBase(msrest.serialization.Model): """ _validation = { - 'compute_identity_type': {'required': True}, + "compute_identity_type": {"required": True}, } _attribute_map = { - 'compute_identity_type': {'key': 'computeIdentityType', 'type': 'str'}, + "compute_identity_type": {"key": "computeIdentityType", "type": "str"}, } _subtype_map = { - 'compute_identity_type': {'AmlToken': 'AmlTokenComputeIdentity', 'ManagedIdentity': 'ManagedComputeIdentity'} + "compute_identity_type": {"AmlToken": "AmlTokenComputeIdentity", "ManagedIdentity": "ManagedComputeIdentity"} } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(MonitorComputeIdentityBase, self).__init__(**kwargs) self.compute_identity_type = None # type: Optional[str] @@ -1956,21 +1866,17 @@ class AmlTokenComputeIdentity(MonitorComputeIdentityBase): """ _validation = { - 'compute_identity_type': {'required': True}, + "compute_identity_type": {"required": True}, } _attribute_map = { - 'compute_identity_type': {'key': 'computeIdentityType', 'type': 'str'}, + "compute_identity_type": {"key": "computeIdentityType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AmlTokenComputeIdentity, self).__init__(**kwargs) - self.compute_identity_type = 'AmlToken' # type: str + self.compute_identity_type = "AmlToken" # type: str class AmlUserFeature(msrest.serialization.Model): @@ -1985,15 +1891,12 @@ class AmlUserFeature(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "description": {"key": "description", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword id: Specifies the feature ID. :paramtype id: str @@ -2003,9 +1906,9 @@ def __init__( :paramtype description: str """ super(AmlUserFeature, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) + self.id = kwargs.get("id", None) + self.display_name = kwargs.get("display_name", None) + self.description = kwargs.get("description", None) class DataReferenceCredential(msrest.serialization.Model): @@ -2024,24 +1927,24 @@ class DataReferenceCredential(msrest.serialization.Model): """ _validation = { - 'credential_type': {'required': True}, + "credential_type": {"required": True}, } _attribute_map = { - 'credential_type': {'key': 'credentialType', 'type': 'str'}, + "credential_type": {"key": "credentialType", "type": "str"}, } _subtype_map = { - 'credential_type': {'DockerCredentials': 'DockerCredential', 'ManagedIdentity': 'ManagedIdentityCredential', - 'NoCredentials': 'AnonymousAccessCredential', 'SAS': 'SASCredential'} + "credential_type": { + "DockerCredentials": "DockerCredential", + "ManagedIdentity": "ManagedIdentityCredential", + "NoCredentials": "AnonymousAccessCredential", + "SAS": "SASCredential", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(DataReferenceCredential, self).__init__(**kwargs) self.credential_type = None # type: Optional[str] @@ -2059,113 +1962,106 @@ class AnonymousAccessCredential(DataReferenceCredential): """ _validation = { - 'credential_type': {'required': True}, + "credential_type": {"required": True}, } _attribute_map = { - 'credential_type': {'key': 'credentialType', 'type': 'str'}, + "credential_type": {"key": "credentialType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AnonymousAccessCredential, self).__init__(**kwargs) - self.credential_type = 'NoCredentials' # type: str + self.credential_type = "NoCredentials" # type: str class ApiKeyAuthWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): """This connection type covers the generic ApiKey auth connection categories, for examples: -AzureOpenAI: - Category:= AzureOpenAI - AuthType:= ApiKey (as type discriminator) - Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - Target:= {ApiBase} - -CognitiveService: - Category:= CognitiveService - AuthType:= ApiKey (as type discriminator) - Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - Target:= ServiceRegion={serviceRegion} - -CognitiveSearch: - Category:= CognitiveSearch - AuthType:= ApiKey (as type discriminator) - Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - Target:= {Endpoint} - -Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar auth_type: Required. Authentication type of the connection target.Constant filled by - server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS", - "AccountKey", "ServicePrincipal", "AccessKey", "ApiKey", "CustomKeys", "OAuth2", "AAD". - :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType - :ivar category: Category of the connection. Possible values include: "PythonFeed", - "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", - "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2", "Redis", "ApiKey", "AzureOpenAI", - "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureOneLake", "CosmosDb", - "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb", "AzureDatabricksDeltaLake", - "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle", "AmazonRdsForSqlServer", - "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum", "Hbase", "Hive", "Impala", - "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza", "Oracle", "Phoenix", - "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable", "Spark", "SqlServer", - "Sybase", "Teradata", "Vertica", "Cassandra", "Couchbase", "MongoDbV2", "MongoDbAtlas", - "AmazonS3Compatible", "FileServer", "FtpServer", "GoogleCloudStorage", "Hdfs", - "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc", "GenericRest", "AmazonMws", - "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm", "GoogleAdWords", "Hubspot", "Jira", - "Magento", "Marketo", "Office365", "Eloqua", "Responsys", "OracleServiceCloud", "PayPal", - "QuickBooks", "Salesforce", "SalesforceServiceCloud", "SalesforceMarketingCloud", - "SapCloudForCustomer", "SapEcc", "ServiceNow", "SharePointOnlineList", "Shopify", "Square", - "WebTable", "Xero", "Zoho", "GenericContainerRegistry". - :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory - :ivar created_by_workspace_arm_id: - :vartype created_by_workspace_arm_id: str - :ivar expiry_time: - :vartype expiry_time: ~datetime.datetime - :ivar group: Group based on connection category. Possible values include: "Azure", "AzureAI", - "Database", "NoSQL", "File", "GenericProtocol", "ServicesAndApps". - :vartype group: str or ~azure.mgmt.machinelearningservices.models.ConnectionGroup - :ivar is_shared_to_all: - :vartype is_shared_to_all: bool - :ivar metadata: Any object. - :vartype metadata: any - :ivar shared_user_list: - :vartype shared_user_list: list[str] - :ivar target: - :vartype target: str - :ivar credentials: Api key object for workspace connection credential. - :vartype credentials: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionApiKey - """ - - _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, - } - - _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionApiKey'}, - } - - def __init__( - self, - **kwargs - ): + AzureOpenAI: + Category:= AzureOpenAI + AuthType:= ApiKey (as type discriminator) + Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= {ApiBase} + + CognitiveService: + Category:= CognitiveService + AuthType:= ApiKey (as type discriminator) + Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= ServiceRegion={serviceRegion} + + CognitiveSearch: + Category:= CognitiveSearch + AuthType:= ApiKey (as type discriminator) + Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= {Endpoint} + + Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS", + "AccountKey", "ServicePrincipal", "AccessKey", "ApiKey", "CustomKeys", "OAuth2", "AAD". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", + "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2", "Redis", "ApiKey", "AzureOpenAI", + "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureOneLake", "CosmosDb", + "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb", "AzureDatabricksDeltaLake", + "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle", "AmazonRdsForSqlServer", + "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum", "Hbase", "Hive", "Impala", + "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza", "Oracle", "Phoenix", + "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable", "Spark", "SqlServer", + "Sybase", "Teradata", "Vertica", "Cassandra", "Couchbase", "MongoDbV2", "MongoDbAtlas", + "AmazonS3Compatible", "FileServer", "FtpServer", "GoogleCloudStorage", "Hdfs", + "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc", "GenericRest", "AmazonMws", + "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm", "GoogleAdWords", "Hubspot", "Jira", + "Magento", "Marketo", "Office365", "Eloqua", "Responsys", "OracleServiceCloud", "PayPal", + "QuickBooks", "Salesforce", "SalesforceServiceCloud", "SalesforceMarketingCloud", + "SapCloudForCustomer", "SapEcc", "ServiceNow", "SharePointOnlineList", "Shopify", "Square", + "WebTable", "Xero", "Zoho", "GenericContainerRegistry". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar created_by_workspace_arm_id: + :vartype created_by_workspace_arm_id: str + :ivar expiry_time: + :vartype expiry_time: ~datetime.datetime + :ivar group: Group based on connection category. Possible values include: "Azure", "AzureAI", + "Database", "NoSQL", "File", "GenericProtocol", "ServicesAndApps". + :vartype group: str or ~azure.mgmt.machinelearningservices.models.ConnectionGroup + :ivar is_shared_to_all: + :vartype is_shared_to_all: bool + :ivar metadata: Any object. + :vartype metadata: any + :ivar shared_user_list: + :vartype shared_user_list: list[str] + :ivar target: + :vartype target: str + :ivar credentials: Api key object for workspace connection credential. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionApiKey + """ + + _validation = { + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, + } + + _attribute_map = { + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionApiKey"}, + } + + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -2199,8 +2095,8 @@ def __init__( :paramtype credentials: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionApiKey """ super(ApiKeyAuthWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'ApiKey' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "ApiKey" # type: str + self.credentials = kwargs.get("credentials", None) class ArmResourceId(msrest.serialization.Model): @@ -2214,13 +2110,10 @@ class ArmResourceId(msrest.serialization.Model): """ _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, + "resource_id": {"key": "resourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_id: Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" @@ -2229,7 +2122,7 @@ def __init__( :paramtype resource_id: str """ super(ArmResourceId, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) class ResourceBase(msrest.serialization.Model): @@ -2244,15 +2137,12 @@ class ResourceBase(msrest.serialization.Model): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -2262,9 +2152,9 @@ def __init__( :paramtype tags: dict[str, str] """ super(ResourceBase, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.properties = kwargs.get('properties', None) - self.tags = kwargs.get('tags', None) + self.description = kwargs.get("description", None) + self.properties = kwargs.get("properties", None) + self.tags = kwargs.get("tags", None) class AssetBase(ResourceBase): @@ -2287,18 +2177,15 @@ class AssetBase(ResourceBase): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -2316,9 +2203,9 @@ def __init__( :paramtype is_archived: bool """ super(AssetBase, self).__init__(**kwargs) - self.auto_delete_setting = kwargs.get('auto_delete_setting', None) - self.is_anonymous = kwargs.get('is_anonymous', False) - self.is_archived = kwargs.get('is_archived', False) + self.auto_delete_setting = kwargs.get("auto_delete_setting", None) + self.is_anonymous = kwargs.get("is_anonymous", False) + self.is_archived = kwargs.get("is_archived", False) class AssetContainer(ResourceBase): @@ -2341,23 +2228,20 @@ class AssetContainer(ResourceBase): """ _validation = { - 'latest_version': {'readonly': True}, - 'next_version': {'readonly': True}, + "latest_version": {"readonly": True}, + "next_version": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'latest_version': {'key': 'latestVersion', 'type': 'str'}, - 'next_version': {'key': 'nextVersion', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "latest_version": {"key": "latestVersion", "type": "str"}, + "next_version": {"key": "nextVersion", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -2369,7 +2253,7 @@ def __init__( :paramtype is_archived: bool """ super(AssetContainer, self).__init__(**kwargs) - self.is_archived = kwargs.get('is_archived', False) + self.is_archived = kwargs.get("is_archived", False) self.latest_version = None self.next_version = None @@ -2389,19 +2273,16 @@ class AssetJobInput(msrest.serialization.Model): """ _validation = { - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". @@ -2412,9 +2293,9 @@ def __init__( :paramtype uri: str """ super(AssetJobInput, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs['uri'] + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs["uri"] class AssetJobOutput(msrest.serialization.Model): @@ -2436,18 +2317,15 @@ class AssetJobOutput(msrest.serialization.Model): """ _attribute_map = { - 'asset_name': {'key': 'assetName', 'type': 'str'}, - 'asset_version': {'key': 'assetVersion', 'type': 'str'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, + "asset_name": {"key": "assetName", "type": "str"}, + "asset_version": {"key": "assetVersion", "type": "str"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_name: Output Asset Name. :paramtype asset_name: str @@ -2464,12 +2342,12 @@ def __init__( :paramtype uri: str """ super(AssetJobOutput, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.asset_version = kwargs.get('asset_version', None) - self.auto_delete_setting = kwargs.get('auto_delete_setting', None) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs.get('uri', None) + self.asset_name = kwargs.get("asset_name", None) + self.asset_version = kwargs.get("asset_version", None) + self.auto_delete_setting = kwargs.get("auto_delete_setting", None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs.get("uri", None) class AssetReferenceBase(msrest.serialization.Model): @@ -2486,24 +2364,23 @@ class AssetReferenceBase(msrest.serialization.Model): """ _validation = { - 'reference_type': {'required': True}, + "reference_type": {"required": True}, } _attribute_map = { - 'reference_type': {'key': 'referenceType', 'type': 'str'}, + "reference_type": {"key": "referenceType", "type": "str"}, } _subtype_map = { - 'reference_type': {'DataPath': 'DataPathAssetReference', 'Id': 'IdAssetReference', - 'OutputPath': 'OutputPathAssetReference'} + "reference_type": { + "DataPath": "DataPathAssetReference", + "Id": "IdAssetReference", + "OutputPath": "OutputPathAssetReference", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AssetReferenceBase, self).__init__(**kwargs) self.reference_type = None # type: Optional[str] @@ -2520,19 +2397,16 @@ class AssignedUser(msrest.serialization.Model): """ _validation = { - 'object_id': {'required': True}, - 'tenant_id': {'required': True}, + "object_id": {"required": True}, + "tenant_id": {"required": True}, } _attribute_map = { - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + "object_id": {"key": "objectId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword object_id: Required. User’s AAD Object Id. :paramtype object_id: str @@ -2540,8 +2414,8 @@ def __init__( :paramtype tenant_id: str """ super(AssignedUser, self).__init__(**kwargs) - self.object_id = kwargs['object_id'] - self.tenant_id = kwargs['tenant_id'] + self.object_id = kwargs["object_id"] + self.tenant_id = kwargs["tenant_id"] class AutoDeleteSetting(msrest.serialization.Model): @@ -2555,14 +2429,11 @@ class AutoDeleteSetting(msrest.serialization.Model): """ _attribute_map = { - 'condition': {'key': 'condition', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "condition": {"key": "condition", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword condition: When to check if an asset is expired. Possible values include: "CreatedGreaterThan", "LastAccessedGreaterThan". @@ -2571,8 +2442,8 @@ def __init__( :paramtype value: str """ super(AutoDeleteSetting, self).__init__(**kwargs) - self.condition = kwargs.get('condition', None) - self.value = kwargs.get('value', None) + self.condition = kwargs.get("condition", None) + self.value = kwargs.get("value", None) class ForecastHorizon(msrest.serialization.Model): @@ -2589,23 +2460,17 @@ class ForecastHorizon(msrest.serialization.Model): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - _subtype_map = { - 'mode': {'Auto': 'AutoForecastHorizon', 'Custom': 'CustomForecastHorizon'} - } + _subtype_map = {"mode": {"Auto": "AutoForecastHorizon", "Custom": "CustomForecastHorizon"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ForecastHorizon, self).__init__(**kwargs) self.mode = None # type: Optional[str] @@ -2621,21 +2486,17 @@ class AutoForecastHorizon(ForecastHorizon): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AutoForecastHorizon, self).__init__(**kwargs) - self.mode = 'Auto' # type: str + self.mode = "Auto" # type: str class AutologgerSettings(msrest.serialization.Model): @@ -2650,17 +2511,14 @@ class AutologgerSettings(msrest.serialization.Model): """ _validation = { - 'mlflow_autologger': {'required': True}, + "mlflow_autologger": {"required": True}, } _attribute_map = { - 'mlflow_autologger': {'key': 'mlflowAutologger', 'type': 'str'}, + "mlflow_autologger": {"key": "mlflowAutologger", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mlflow_autologger: Required. [Required] Indicates whether mlflow autologger is enabled. Possible values include: "Enabled", "Disabled". @@ -2668,7 +2526,7 @@ def __init__( ~azure.mgmt.machinelearningservices.models.MLFlowAutologgerState """ super(AutologgerSettings, self).__init__(**kwargs) - self.mlflow_autologger = kwargs['mlflow_autologger'] + self.mlflow_autologger = kwargs["mlflow_autologger"] class JobBaseProperties(ResourceBase): @@ -2721,37 +2579,40 @@ class JobBaseProperties(ResourceBase): """ _validation = { - 'job_type': {'required': True}, - 'status': {'readonly': True}, + "job_type": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'compute_id': {'key': 'computeId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'experiment_name': {'key': 'experimentName', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'notification_setting': {'key': 'notificationSetting', 'type': 'NotificationSetting'}, - 'secrets_configuration': {'key': 'secretsConfiguration', 'type': '{SecretConfiguration}'}, - 'services': {'key': 'services', 'type': '{JobService}'}, - 'status': {'key': 'status', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "component_id": {"key": "componentId", "type": "str"}, + "compute_id": {"key": "computeId", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "experiment_name": {"key": "experimentName", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityConfiguration"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "job_type": {"key": "jobType", "type": "str"}, + "notification_setting": {"key": "notificationSetting", "type": "NotificationSetting"}, + "secrets_configuration": {"key": "secretsConfiguration", "type": "{SecretConfiguration}"}, + "services": {"key": "services", "type": "{JobService}"}, + "status": {"key": "status", "type": "str"}, } _subtype_map = { - 'job_type': {'AutoML': 'AutoMLJob', 'Command': 'CommandJob', 'FineTuning': 'FineTuningJob', - 'Labeling': 'LabelingJobProperties', 'Pipeline': 'PipelineJob', 'Spark': 'SparkJob', - 'Sweep': 'SweepJob'} + "job_type": { + "AutoML": "AutoMLJob", + "Command": "CommandJob", + "FineTuning": "FineTuningJob", + "Labeling": "LabelingJobProperties", + "Pipeline": "PipelineJob", + "Spark": "SparkJob", + "Sweep": "SweepJob", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -2784,115 +2645,112 @@ def __init__( :paramtype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] """ super(JobBaseProperties, self).__init__(**kwargs) - self.component_id = kwargs.get('component_id', None) - self.compute_id = kwargs.get('compute_id', None) - self.display_name = kwargs.get('display_name', None) - self.experiment_name = kwargs.get('experiment_name', "Default") - self.identity = kwargs.get('identity', None) - self.is_archived = kwargs.get('is_archived', False) - self.job_type = 'JobBaseProperties' # type: str - self.notification_setting = kwargs.get('notification_setting', None) - self.secrets_configuration = kwargs.get('secrets_configuration', None) - self.services = kwargs.get('services', None) + self.component_id = kwargs.get("component_id", None) + self.compute_id = kwargs.get("compute_id", None) + self.display_name = kwargs.get("display_name", None) + self.experiment_name = kwargs.get("experiment_name", "Default") + self.identity = kwargs.get("identity", None) + self.is_archived = kwargs.get("is_archived", False) + self.job_type = "JobBaseProperties" # type: str + self.notification_setting = kwargs.get("notification_setting", None) + self.secrets_configuration = kwargs.get("secrets_configuration", None) + self.services = kwargs.get("services", None) self.status = None class AutoMLJob(JobBaseProperties): """AutoMLJob class. -Use this class for executing AutoML tasks like Classification/Regression etc. -See TaskType enum for all the tasks supported. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar description: The asset description text. - :vartype description: str - :ivar properties: The asset property dictionary. - :vartype properties: dict[str, str] - :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - :ivar component_id: ARM resource ID of the component resource. - :vartype component_id: str - :ivar compute_id: ARM resource ID of the compute resource. - :vartype compute_id: str - :ivar display_name: Display name of job. - :vartype display_name: str - :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is - placed in the "Default" experiment. - :vartype experiment_name: str - :ivar identity: Identity configuration. If set, this should be one of AmlToken, - ManagedIdentity, UserIdentity or null. - Defaults to AmlToken if null. - :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration - :ivar is_archived: Is the asset archived?. - :vartype is_archived: bool - :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. - Possible values include: "AutoML", "Command", "Labeling", "Sweep", "Pipeline", "Spark", - "FineTuning". - :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType - :ivar notification_setting: Notification setting for the job. - :vartype notification_setting: ~azure.mgmt.machinelearningservices.models.NotificationSetting - :ivar secrets_configuration: Configuration for secrets to be made available during runtime. - :vartype secrets_configuration: dict[str, - ~azure.mgmt.machinelearningservices.models.SecretConfiguration] - :ivar services: List of JobEndpoints. - For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] - :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", - "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", - "Failed", "Canceled", "NotResponding", "Paused", "Unknown", "Scheduled". - :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus - :ivar environment_id: The ARM resource ID of the Environment specification for the job. - This is optional value to provide, if not provided, AutoML will default this to Production - AutoML curated environment version when running the job. - :vartype environment_id: str - :ivar environment_variables: Environment variables included in the job. - :vartype environment_variables: dict[str, str] - :ivar outputs: Mapping of output data bindings used in the job. - :vartype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] - :ivar queue_settings: Queue settings for the job. - :vartype queue_settings: ~azure.mgmt.machinelearningservices.models.QueueSettings - :ivar resources: Compute Resource configuration for the job. - :vartype resources: ~azure.mgmt.machinelearningservices.models.JobResourceConfiguration - :ivar task_details: Required. [Required] This represents scenario which can be one of - Tables/NLP/Image. - :vartype task_details: ~azure.mgmt.machinelearningservices.models.AutoMLVertical + Use this class for executing AutoML tasks like Classification/Regression etc. + See TaskType enum for all the tasks supported. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar component_id: ARM resource ID of the component resource. + :vartype component_id: str + :ivar compute_id: ARM resource ID of the compute resource. + :vartype compute_id: str + :ivar display_name: Display name of job. + :vartype display_name: str + :ivar experiment_name: The name of the experiment the job belongs to. If not set, the job is + placed in the "Default" experiment. + :vartype experiment_name: str + :ivar identity: Identity configuration. If set, this should be one of AmlToken, + ManagedIdentity, UserIdentity or null. + Defaults to AmlToken if null. + :vartype identity: ~azure.mgmt.machinelearningservices.models.IdentityConfiguration + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar job_type: Required. [Required] Specifies the type of job.Constant filled by server. + Possible values include: "AutoML", "Command", "Labeling", "Sweep", "Pipeline", "Spark", + "FineTuning". + :vartype job_type: str or ~azure.mgmt.machinelearningservices.models.JobType + :ivar notification_setting: Notification setting for the job. + :vartype notification_setting: ~azure.mgmt.machinelearningservices.models.NotificationSetting + :ivar secrets_configuration: Configuration for secrets to be made available during runtime. + :vartype secrets_configuration: dict[str, + ~azure.mgmt.machinelearningservices.models.SecretConfiguration] + :ivar services: List of JobEndpoints. + For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + :vartype services: dict[str, ~azure.mgmt.machinelearningservices.models.JobService] + :ivar status: Status of the job. Possible values include: "NotStarted", "Starting", + "Provisioning", "Preparing", "Queued", "Running", "Finalizing", "CancelRequested", "Completed", + "Failed", "Canceled", "NotResponding", "Paused", "Unknown", "Scheduled". + :vartype status: str or ~azure.mgmt.machinelearningservices.models.JobStatus + :ivar environment_id: The ARM resource ID of the Environment specification for the job. + This is optional value to provide, if not provided, AutoML will default this to Production + AutoML curated environment version when running the job. + :vartype environment_id: str + :ivar environment_variables: Environment variables included in the job. + :vartype environment_variables: dict[str, str] + :ivar outputs: Mapping of output data bindings used in the job. + :vartype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] + :ivar queue_settings: Queue settings for the job. + :vartype queue_settings: ~azure.mgmt.machinelearningservices.models.QueueSettings + :ivar resources: Compute Resource configuration for the job. + :vartype resources: ~azure.mgmt.machinelearningservices.models.JobResourceConfiguration + :ivar task_details: Required. [Required] This represents scenario which can be one of + Tables/NLP/Image. + :vartype task_details: ~azure.mgmt.machinelearningservices.models.AutoMLVertical """ _validation = { - 'job_type': {'required': True}, - 'status': {'readonly': True}, - 'task_details': {'required': True}, + "job_type": {"required": True}, + "status": {"readonly": True}, + "task_details": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'compute_id': {'key': 'computeId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'experiment_name': {'key': 'experimentName', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'notification_setting': {'key': 'notificationSetting', 'type': 'NotificationSetting'}, - 'secrets_configuration': {'key': 'secretsConfiguration', 'type': '{SecretConfiguration}'}, - 'services': {'key': 'services', 'type': '{JobService}'}, - 'status': {'key': 'status', 'type': 'str'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, - 'queue_settings': {'key': 'queueSettings', 'type': 'QueueSettings'}, - 'resources': {'key': 'resources', 'type': 'JobResourceConfiguration'}, - 'task_details': {'key': 'taskDetails', 'type': 'AutoMLVertical'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "component_id": {"key": "componentId", "type": "str"}, + "compute_id": {"key": "computeId", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "experiment_name": {"key": "experimentName", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityConfiguration"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "job_type": {"key": "jobType", "type": "str"}, + "notification_setting": {"key": "notificationSetting", "type": "NotificationSetting"}, + "secrets_configuration": {"key": "secretsConfiguration", "type": "{SecretConfiguration}"}, + "services": {"key": "services", "type": "{JobService}"}, + "status": {"key": "status", "type": "str"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "outputs": {"key": "outputs", "type": "{JobOutput}"}, + "queue_settings": {"key": "queueSettings", "type": "QueueSettings"}, + "resources": {"key": "resources", "type": "JobResourceConfiguration"}, + "task_details": {"key": "taskDetails", "type": "AutoMLVertical"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -2940,65 +2798,67 @@ def __init__( :paramtype task_details: ~azure.mgmt.machinelearningservices.models.AutoMLVertical """ super(AutoMLJob, self).__init__(**kwargs) - self.job_type = 'AutoML' # type: str - self.environment_id = kwargs.get('environment_id', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.outputs = kwargs.get('outputs', None) - self.queue_settings = kwargs.get('queue_settings', None) - self.resources = kwargs.get('resources', None) - self.task_details = kwargs['task_details'] + self.job_type = "AutoML" # type: str + self.environment_id = kwargs.get("environment_id", None) + self.environment_variables = kwargs.get("environment_variables", None) + self.outputs = kwargs.get("outputs", None) + self.queue_settings = kwargs.get("queue_settings", None) + self.resources = kwargs.get("resources", None) + self.task_details = kwargs["task_details"] class AutoMLVertical(msrest.serialization.Model): """AutoML vertical class. -Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical. + Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Classification, Forecasting, ImageClassification, ImageClassificationMultilabel, ImageInstanceSegmentation, ImageObjectDetection, Regression, TextClassification, TextClassificationMultilabel, TextNer. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Classification, Forecasting, ImageClassification, ImageClassificationMultilabel, ImageInstanceSegmentation, ImageObjectDetection, Regression, TextClassification, TextClassificationMultilabel, TextNer. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", - "Info", "Warning", "Error", "Critical". - :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity - :ivar target_column_name: Target column name: This is prediction values column. - Also known as label column name in context of classification tasks. - :vartype target_column_name: str - :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. - Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", - "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", - "TextClassification", "TextClassificationMultilabel", "TextNER". - :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType - :ivar training_data: Required. [Required] Training data input. - :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", + "Info", "Warning", "Error", "Critical". + :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity + :ivar target_column_name: Target column name: This is prediction values column. + Also known as label column name in context of classification tasks. + :vartype target_column_name: str + :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. + Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", + "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", + "TextClassification", "TextClassificationMultilabel", "TextNER". + :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType + :ivar training_data: Required. [Required] Training data input. + :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput """ _validation = { - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, } _subtype_map = { - 'task_type': {'Classification': 'Classification', 'Forecasting': 'Forecasting', - 'ImageClassification': 'ImageClassification', - 'ImageClassificationMultilabel': 'ImageClassificationMultilabel', - 'ImageInstanceSegmentation': 'ImageInstanceSegmentation', - 'ImageObjectDetection': 'ImageObjectDetection', 'Regression': 'Regression', - 'TextClassification': 'TextClassification', - 'TextClassificationMultilabel': 'TextClassificationMultilabel', 'TextNER': 'TextNer'} - } - - def __init__( - self, - **kwargs - ): + "task_type": { + "Classification": "Classification", + "Forecasting": "Forecasting", + "ImageClassification": "ImageClassification", + "ImageClassificationMultilabel": "ImageClassificationMultilabel", + "ImageInstanceSegmentation": "ImageInstanceSegmentation", + "ImageObjectDetection": "ImageObjectDetection", + "Regression": "Regression", + "TextClassification": "TextClassification", + "TextClassificationMultilabel": "TextClassificationMultilabel", + "TextNER": "TextNer", + } + } + + def __init__(self, **kwargs): """ :keyword log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", "Info", "Warning", "Error", "Critical". @@ -3010,10 +2870,10 @@ def __init__( :paramtype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput """ super(AutoMLVertical, self).__init__(**kwargs) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) self.task_type = None # type: Optional[str] - self.training_data = kwargs['training_data'] + self.training_data = kwargs["training_data"] class NCrossValidations(msrest.serialization.Model): @@ -3030,23 +2890,17 @@ class NCrossValidations(msrest.serialization.Model): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - _subtype_map = { - 'mode': {'Auto': 'AutoNCrossValidations', 'Custom': 'CustomNCrossValidations'} - } + _subtype_map = {"mode": {"Auto": "AutoNCrossValidations", "Custom": "CustomNCrossValidations"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(NCrossValidations, self).__init__(**kwargs) self.mode = None # type: Optional[str] @@ -3062,21 +2916,17 @@ class AutoNCrossValidations(NCrossValidations): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AutoNCrossValidations, self).__init__(**kwargs) - self.mode = 'Auto' # type: str + self.mode = "Auto" # type: str class AutoPauseProperties(msrest.serialization.Model): @@ -3089,14 +2939,11 @@ class AutoPauseProperties(msrest.serialization.Model): """ _attribute_map = { - 'delay_in_minutes': {'key': 'delayInMinutes', 'type': 'int'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, + "delay_in_minutes": {"key": "delayInMinutes", "type": "int"}, + "enabled": {"key": "enabled", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword delay_in_minutes: :paramtype delay_in_minutes: int @@ -3104,8 +2951,8 @@ def __init__( :paramtype enabled: bool """ super(AutoPauseProperties, self).__init__(**kwargs) - self.delay_in_minutes = kwargs.get('delay_in_minutes', None) - self.enabled = kwargs.get('enabled', None) + self.delay_in_minutes = kwargs.get("delay_in_minutes", None) + self.enabled = kwargs.get("enabled", None) class AutoScaleProperties(msrest.serialization.Model): @@ -3120,15 +2967,12 @@ class AutoScaleProperties(msrest.serialization.Model): """ _attribute_map = { - 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + "min_node_count": {"key": "minNodeCount", "type": "int"}, + "enabled": {"key": "enabled", "type": "bool"}, + "max_node_count": {"key": "maxNodeCount", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword min_node_count: :paramtype min_node_count: int @@ -3138,9 +2982,9 @@ def __init__( :paramtype max_node_count: int """ super(AutoScaleProperties, self).__init__(**kwargs) - self.min_node_count = kwargs.get('min_node_count', None) - self.enabled = kwargs.get('enabled', None) - self.max_node_count = kwargs.get('max_node_count', None) + self.min_node_count = kwargs.get("min_node_count", None) + self.enabled = kwargs.get("enabled", None) + self.max_node_count = kwargs.get("max_node_count", None) class Seasonality(msrest.serialization.Model): @@ -3157,23 +3001,17 @@ class Seasonality(msrest.serialization.Model): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - _subtype_map = { - 'mode': {'Auto': 'AutoSeasonality', 'Custom': 'CustomSeasonality'} - } + _subtype_map = {"mode": {"Auto": "AutoSeasonality", "Custom": "CustomSeasonality"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(Seasonality, self).__init__(**kwargs) self.mode = None # type: Optional[str] @@ -3189,21 +3027,17 @@ class AutoSeasonality(Seasonality): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AutoSeasonality, self).__init__(**kwargs) - self.mode = 'Auto' # type: str + self.mode = "Auto" # type: str class TargetLags(msrest.serialization.Model): @@ -3220,23 +3054,17 @@ class TargetLags(msrest.serialization.Model): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - _subtype_map = { - 'mode': {'Auto': 'AutoTargetLags', 'Custom': 'CustomTargetLags'} - } + _subtype_map = {"mode": {"Auto": "AutoTargetLags", "Custom": "CustomTargetLags"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(TargetLags, self).__init__(**kwargs) self.mode = None # type: Optional[str] @@ -3252,21 +3080,17 @@ class AutoTargetLags(TargetLags): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AutoTargetLags, self).__init__(**kwargs) - self.mode = 'Auto' # type: str + self.mode = "Auto" # type: str class TargetRollingWindowSize(msrest.serialization.Model): @@ -3283,23 +3107,17 @@ class TargetRollingWindowSize(msrest.serialization.Model): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - _subtype_map = { - 'mode': {'Auto': 'AutoTargetRollingWindowSize', 'Custom': 'CustomTargetRollingWindowSize'} - } + _subtype_map = {"mode": {"Auto": "AutoTargetRollingWindowSize", "Custom": "CustomTargetRollingWindowSize"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(TargetRollingWindowSize, self).__init__(**kwargs) self.mode = None # type: Optional[str] @@ -3315,21 +3133,17 @@ class AutoTargetRollingWindowSize(TargetRollingWindowSize): """ _validation = { - 'mode': {'required': True}, + "mode": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(AutoTargetRollingWindowSize, self).__init__(**kwargs) - self.mode = 'Auto' # type: str + self.mode = "Auto" # type: str class AzureDatastore(msrest.serialization.Model): @@ -3342,14 +3156,11 @@ class AzureDatastore(msrest.serialization.Model): """ _attribute_map = { - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + "resource_group": {"key": "resourceGroup", "type": "str"}, + "subscription_id": {"key": "subscriptionId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_group: Azure Resource Group name. :paramtype resource_group: str @@ -3357,8 +3168,8 @@ def __init__( :paramtype subscription_id: str """ super(AzureDatastore, self).__init__(**kwargs) - self.resource_group = kwargs.get('resource_group', None) - self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get("resource_group", None) + self.subscription_id = kwargs.get("subscription_id", None) class DatastoreProperties(ResourceBase): @@ -3391,31 +3202,33 @@ class DatastoreProperties(ResourceBase): """ _validation = { - 'credentials': {'required': True}, - 'datastore_type': {'required': True}, - 'is_default': {'readonly': True}, + "credentials": {"required": True}, + "datastore_type": {"required": True}, + "is_default": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, - 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'is_default': {'key': 'isDefault', 'type': 'bool'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "credentials": {"key": "credentials", "type": "DatastoreCredentials"}, + "datastore_type": {"key": "datastoreType", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "is_default": {"key": "isDefault", "type": "bool"}, } _subtype_map = { - 'datastore_type': {'AzureBlob': 'AzureBlobDatastore', 'AzureDataLakeGen1': 'AzureDataLakeGen1Datastore', - 'AzureDataLakeGen2': 'AzureDataLakeGen2Datastore', 'AzureFile': 'AzureFileDatastore', - 'Hdfs': 'HdfsDatastore', 'OneLake': 'OneLakeDatastore'} + "datastore_type": { + "AzureBlob": "AzureBlobDatastore", + "AzureDataLakeGen1": "AzureDataLakeGen1Datastore", + "AzureDataLakeGen2": "AzureDataLakeGen2Datastore", + "AzureFile": "AzureFileDatastore", + "Hdfs": "HdfsDatastore", + "OneLake": "OneLakeDatastore", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -3430,9 +3243,9 @@ def __init__( ~azure.mgmt.machinelearningservices.models.IntellectualProperty """ super(DatastoreProperties, self).__init__(**kwargs) - self.credentials = kwargs['credentials'] - self.datastore_type = 'DatastoreProperties' # type: str - self.intellectual_property = kwargs.get('intellectual_property', None) + self.credentials = kwargs["credentials"] + self.datastore_type = "DatastoreProperties" # type: str + self.intellectual_property = kwargs.get("intellectual_property", None) self.is_default = None @@ -3480,32 +3293,29 @@ class AzureBlobDatastore(DatastoreProperties, AzureDatastore): """ _validation = { - 'credentials': {'required': True}, - 'datastore_type': {'required': True}, - 'is_default': {'readonly': True}, + "credentials": {"required": True}, + "datastore_type": {"required": True}, + "is_default": {"readonly": True}, } _attribute_map = { - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, - 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'is_default': {'key': 'isDefault', 'type': 'bool'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + "resource_group": {"key": "resourceGroup", "type": "str"}, + "subscription_id": {"key": "subscriptionId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "credentials": {"key": "credentials", "type": "DatastoreCredentials"}, + "datastore_type": {"key": "datastoreType", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "is_default": {"key": "isDefault", "type": "bool"}, + "account_name": {"key": "accountName", "type": "str"}, + "container_name": {"key": "containerName", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "str"}, + "protocol": {"key": "protocol", "type": "str"}, + "service_data_access_auth_identity": {"key": "serviceDataAccessAuthIdentity", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_group: Azure Resource Group name. :paramtype resource_group: str @@ -3537,19 +3347,19 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity """ super(AzureBlobDatastore, self).__init__(**kwargs) - self.resource_group = kwargs.get('resource_group', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.datastore_type = 'AzureBlob' # type: str - self.account_name = kwargs.get('account_name', None) - self.container_name = kwargs.get('container_name', None) - self.endpoint = kwargs.get('endpoint', None) - self.protocol = kwargs.get('protocol', None) - self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) - self.description = kwargs.get('description', None) - self.properties = kwargs.get('properties', None) - self.tags = kwargs.get('tags', None) - self.credentials = kwargs['credentials'] - self.intellectual_property = kwargs.get('intellectual_property', None) + self.resource_group = kwargs.get("resource_group", None) + self.subscription_id = kwargs.get("subscription_id", None) + self.datastore_type = "AzureBlob" # type: str + self.account_name = kwargs.get("account_name", None) + self.container_name = kwargs.get("container_name", None) + self.endpoint = kwargs.get("endpoint", None) + self.protocol = kwargs.get("protocol", None) + self.service_data_access_auth_identity = kwargs.get("service_data_access_auth_identity", None) + self.description = kwargs.get("description", None) + self.properties = kwargs.get("properties", None) + self.tags = kwargs.get("tags", None) + self.credentials = kwargs["credentials"] + self.intellectual_property = kwargs.get("intellectual_property", None) self.is_default = None @@ -3591,30 +3401,27 @@ class AzureDataLakeGen1Datastore(DatastoreProperties, AzureDatastore): """ _validation = { - 'credentials': {'required': True}, - 'datastore_type': {'required': True}, - 'is_default': {'readonly': True}, - 'store_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "credentials": {"required": True}, + "datastore_type": {"required": True}, + "is_default": {"readonly": True}, + "store_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, - 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'is_default': {'key': 'isDefault', 'type': 'bool'}, - 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, - 'store_name': {'key': 'storeName', 'type': 'str'}, + "resource_group": {"key": "resourceGroup", "type": "str"}, + "subscription_id": {"key": "subscriptionId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "credentials": {"key": "credentials", "type": "DatastoreCredentials"}, + "datastore_type": {"key": "datastoreType", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "is_default": {"key": "isDefault", "type": "bool"}, + "service_data_access_auth_identity": {"key": "serviceDataAccessAuthIdentity", "type": "str"}, + "store_name": {"key": "storeName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_group: Azure Resource Group name. :paramtype resource_group: str @@ -3640,16 +3447,16 @@ def __init__( :paramtype store_name: str """ super(AzureDataLakeGen1Datastore, self).__init__(**kwargs) - self.resource_group = kwargs.get('resource_group', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.datastore_type = 'AzureDataLakeGen1' # type: str - self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) - self.store_name = kwargs['store_name'] - self.description = kwargs.get('description', None) - self.properties = kwargs.get('properties', None) - self.tags = kwargs.get('tags', None) - self.credentials = kwargs['credentials'] - self.intellectual_property = kwargs.get('intellectual_property', None) + self.resource_group = kwargs.get("resource_group", None) + self.subscription_id = kwargs.get("subscription_id", None) + self.datastore_type = "AzureDataLakeGen1" # type: str + self.service_data_access_auth_identity = kwargs.get("service_data_access_auth_identity", None) + self.store_name = kwargs["store_name"] + self.description = kwargs.get("description", None) + self.properties = kwargs.get("properties", None) + self.tags = kwargs.get("tags", None) + self.credentials = kwargs["credentials"] + self.intellectual_property = kwargs.get("intellectual_property", None) self.is_default = None @@ -3697,34 +3504,31 @@ class AzureDataLakeGen2Datastore(DatastoreProperties, AzureDatastore): """ _validation = { - 'credentials': {'required': True}, - 'datastore_type': {'required': True}, - 'is_default': {'readonly': True}, - 'account_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'filesystem': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "credentials": {"required": True}, + "datastore_type": {"required": True}, + "is_default": {"readonly": True}, + "account_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "filesystem": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, - 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'is_default': {'key': 'isDefault', 'type': 'bool'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - 'filesystem': {'key': 'filesystem', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + "resource_group": {"key": "resourceGroup", "type": "str"}, + "subscription_id": {"key": "subscriptionId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "credentials": {"key": "credentials", "type": "DatastoreCredentials"}, + "datastore_type": {"key": "datastoreType", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "is_default": {"key": "isDefault", "type": "bool"}, + "account_name": {"key": "accountName", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "str"}, + "filesystem": {"key": "filesystem", "type": "str"}, + "protocol": {"key": "protocol", "type": "str"}, + "service_data_access_auth_identity": {"key": "serviceDataAccessAuthIdentity", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_group: Azure Resource Group name. :paramtype resource_group: str @@ -3756,19 +3560,19 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity """ super(AzureDataLakeGen2Datastore, self).__init__(**kwargs) - self.resource_group = kwargs.get('resource_group', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.datastore_type = 'AzureDataLakeGen2' # type: str - self.account_name = kwargs['account_name'] - self.endpoint = kwargs.get('endpoint', None) - self.filesystem = kwargs['filesystem'] - self.protocol = kwargs.get('protocol', None) - self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) - self.description = kwargs.get('description', None) - self.properties = kwargs.get('properties', None) - self.tags = kwargs.get('tags', None) - self.credentials = kwargs['credentials'] - self.intellectual_property = kwargs.get('intellectual_property', None) + self.resource_group = kwargs.get("resource_group", None) + self.subscription_id = kwargs.get("subscription_id", None) + self.datastore_type = "AzureDataLakeGen2" # type: str + self.account_name = kwargs["account_name"] + self.endpoint = kwargs.get("endpoint", None) + self.filesystem = kwargs["filesystem"] + self.protocol = kwargs.get("protocol", None) + self.service_data_access_auth_identity = kwargs.get("service_data_access_auth_identity", None) + self.description = kwargs.get("description", None) + self.properties = kwargs.get("properties", None) + self.tags = kwargs.get("tags", None) + self.credentials = kwargs["credentials"] + self.intellectual_property = kwargs.get("intellectual_property", None) self.is_default = None @@ -3788,28 +3592,23 @@ class Webhook(msrest.serialization.Model): """ _validation = { - 'webhook_type': {'required': True}, + "webhook_type": {"required": True}, } _attribute_map = { - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'webhook_type': {'key': 'webhookType', 'type': 'str'}, + "event_type": {"key": "eventType", "type": "str"}, + "webhook_type": {"key": "webhookType", "type": "str"}, } - _subtype_map = { - 'webhook_type': {'AzureDevOps': 'AzureDevOpsWebhook'} - } + _subtype_map = {"webhook_type": {"AzureDevOps": "AzureDevOpsWebhook"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword event_type: Send callback on a specified notification event. :paramtype event_type: str """ super(Webhook, self).__init__(**kwargs) - self.event_type = kwargs.get('event_type', None) + self.event_type = kwargs.get("event_type", None) self.webhook_type = None # type: Optional[str] @@ -3826,24 +3625,21 @@ class AzureDevOpsWebhook(Webhook): """ _validation = { - 'webhook_type': {'required': True}, + "webhook_type": {"required": True}, } _attribute_map = { - 'event_type': {'key': 'eventType', 'type': 'str'}, - 'webhook_type': {'key': 'webhookType', 'type': 'str'}, + "event_type": {"key": "eventType", "type": "str"}, + "webhook_type": {"key": "webhookType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword event_type: Send callback on a specified notification event. :paramtype event_type: str """ super(AzureDevOpsWebhook, self).__init__(**kwargs) - self.webhook_type = 'AzureDevOps' # type: str + self.webhook_type = "AzureDevOps" # type: str class AzureFileDatastore(DatastoreProperties, AzureDatastore): @@ -3891,34 +3687,31 @@ class AzureFileDatastore(DatastoreProperties, AzureDatastore): """ _validation = { - 'credentials': {'required': True}, - 'datastore_type': {'required': True}, - 'is_default': {'readonly': True}, - 'account_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'file_share_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "credentials": {"required": True}, + "datastore_type": {"required": True}, + "is_default": {"readonly": True}, + "account_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "file_share_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, - 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'is_default': {'key': 'isDefault', 'type': 'bool'}, - 'account_name': {'key': 'accountName', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - 'file_share_name': {'key': 'fileShareName', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + "resource_group": {"key": "resourceGroup", "type": "str"}, + "subscription_id": {"key": "subscriptionId", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "credentials": {"key": "credentials", "type": "DatastoreCredentials"}, + "datastore_type": {"key": "datastoreType", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "is_default": {"key": "isDefault", "type": "bool"}, + "account_name": {"key": "accountName", "type": "str"}, + "endpoint": {"key": "endpoint", "type": "str"}, + "file_share_name": {"key": "fileShareName", "type": "str"}, + "protocol": {"key": "protocol", "type": "str"}, + "service_data_access_auth_identity": {"key": "serviceDataAccessAuthIdentity", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_group: Azure Resource Group name. :paramtype resource_group: str @@ -3951,19 +3744,19 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity """ super(AzureFileDatastore, self).__init__(**kwargs) - self.resource_group = kwargs.get('resource_group', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.datastore_type = 'AzureFile' # type: str - self.account_name = kwargs['account_name'] - self.endpoint = kwargs.get('endpoint', None) - self.file_share_name = kwargs['file_share_name'] - self.protocol = kwargs.get('protocol', None) - self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) - self.description = kwargs.get('description', None) - self.properties = kwargs.get('properties', None) - self.tags = kwargs.get('tags', None) - self.credentials = kwargs['credentials'] - self.intellectual_property = kwargs.get('intellectual_property', None) + self.resource_group = kwargs.get("resource_group", None) + self.subscription_id = kwargs.get("subscription_id", None) + self.datastore_type = "AzureFile" # type: str + self.account_name = kwargs["account_name"] + self.endpoint = kwargs.get("endpoint", None) + self.file_share_name = kwargs["file_share_name"] + self.protocol = kwargs.get("protocol", None) + self.service_data_access_auth_identity = kwargs.get("service_data_access_auth_identity", None) + self.description = kwargs.get("description", None) + self.properties = kwargs.get("properties", None) + self.tags = kwargs.get("tags", None) + self.credentials = kwargs["credentials"] + self.intellectual_property = kwargs.get("intellectual_property", None) self.is_default = None @@ -3981,25 +3774,24 @@ class InferencingServer(msrest.serialization.Model): """ _validation = { - 'server_type': {'required': True}, + "server_type": {"required": True}, } _attribute_map = { - 'server_type': {'key': 'serverType', 'type': 'str'}, + "server_type": {"key": "serverType", "type": "str"}, } _subtype_map = { - 'server_type': {'AzureMLBatch': 'AzureMLBatchInferencingServer', - 'AzureMLOnline': 'AzureMLOnlineInferencingServer', 'Custom': 'CustomInferencingServer', - 'Triton': 'TritonInferencingServer'} + "server_type": { + "AzureMLBatch": "AzureMLBatchInferencingServer", + "AzureMLOnline": "AzureMLOnlineInferencingServer", + "Custom": "CustomInferencingServer", + "Triton": "TritonInferencingServer", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(InferencingServer, self).__init__(**kwargs) self.server_type = None # type: Optional[str] @@ -4017,25 +3809,22 @@ class AzureMLBatchInferencingServer(InferencingServer): """ _validation = { - 'server_type': {'required': True}, + "server_type": {"required": True}, } _attribute_map = { - 'server_type': {'key': 'serverType', 'type': 'str'}, - 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + "server_type": {"key": "serverType", "type": "str"}, + "code_configuration": {"key": "codeConfiguration", "type": "CodeConfiguration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_configuration: Code configuration for AML batch inferencing server. :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration """ super(AzureMLBatchInferencingServer, self).__init__(**kwargs) - self.server_type = 'AzureMLBatch' # type: str - self.code_configuration = kwargs.get('code_configuration', None) + self.server_type = "AzureMLBatch" # type: str + self.code_configuration = kwargs.get("code_configuration", None) class AzureMLOnlineInferencingServer(InferencingServer): @@ -4051,25 +3840,22 @@ class AzureMLOnlineInferencingServer(InferencingServer): """ _validation = { - 'server_type': {'required': True}, + "server_type": {"required": True}, } _attribute_map = { - 'server_type': {'key': 'serverType', 'type': 'str'}, - 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, + "server_type": {"key": "serverType", "type": "str"}, + "code_configuration": {"key": "codeConfiguration", "type": "CodeConfiguration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_configuration: Code configuration for AML inferencing server. :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration """ super(AzureMLOnlineInferencingServer, self).__init__(**kwargs) - self.server_type = 'AzureMLOnline' # type: str - self.code_configuration = kwargs.get('code_configuration', None) + self.server_type = "AzureMLOnline" # type: str + self.code_configuration = kwargs.get("code_configuration", None) class FineTuningVertical(msrest.serialization.Model): @@ -4097,28 +3883,23 @@ class FineTuningVertical(msrest.serialization.Model): """ _validation = { - 'model': {'required': True}, - 'model_provider': {'required': True}, - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "model": {"required": True}, + "model_provider": {"required": True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'model': {'key': 'model', 'type': 'MLFlowModelJobInput'}, - 'model_provider': {'key': 'modelProvider', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'JobInput'}, - 'validation_data': {'key': 'validationData', 'type': 'JobInput'}, + "model": {"key": "model", "type": "MLFlowModelJobInput"}, + "model_provider": {"key": "modelProvider", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "JobInput"}, + "validation_data": {"key": "validationData", "type": "JobInput"}, } - _subtype_map = { - 'model_provider': {'AzureOpenAI': 'AzureOpenAiFineTuning', 'Custom': 'CustomModelFineTuning'} - } + _subtype_map = {"model_provider": {"AzureOpenAI": "AzureOpenAiFineTuning", "Custom": "CustomModelFineTuning"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model: Required. [Required] Input model for fine tuning. :paramtype model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput @@ -4133,11 +3914,11 @@ def __init__( :paramtype validation_data: ~azure.mgmt.machinelearningservices.models.JobInput """ super(FineTuningVertical, self).__init__(**kwargs) - self.model = kwargs['model'] + self.model = kwargs["model"] self.model_provider = None # type: Optional[str] - self.task_type = kwargs['task_type'] - self.training_data = kwargs['training_data'] - self.validation_data = kwargs.get('validation_data', None) + self.task_type = kwargs["task_type"] + self.training_data = kwargs["training_data"] + self.validation_data = kwargs.get("validation_data", None) class AzureOpenAiFineTuning(FineTuningVertical): @@ -4165,25 +3946,22 @@ class AzureOpenAiFineTuning(FineTuningVertical): """ _validation = { - 'model': {'required': True}, - 'model_provider': {'required': True}, - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "model": {"required": True}, + "model_provider": {"required": True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'model': {'key': 'model', 'type': 'MLFlowModelJobInput'}, - 'model_provider': {'key': 'modelProvider', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'JobInput'}, - 'validation_data': {'key': 'validationData', 'type': 'JobInput'}, - 'hyper_parameters': {'key': 'hyperParameters', 'type': 'AzureOpenAiHyperParameters'}, + "model": {"key": "model", "type": "MLFlowModelJobInput"}, + "model_provider": {"key": "modelProvider", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "JobInput"}, + "validation_data": {"key": "validationData", "type": "JobInput"}, + "hyper_parameters": {"key": "hyperParameters", "type": "AzureOpenAiHyperParameters"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model: Required. [Required] Input model for fine tuning. :paramtype model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput @@ -4201,8 +3979,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.AzureOpenAiHyperParameters """ super(AzureOpenAiFineTuning, self).__init__(**kwargs) - self.model_provider = 'AzureOpenAI' # type: str - self.hyper_parameters = kwargs.get('hyper_parameters', None) + self.model_provider = "AzureOpenAI" # type: str + self.hyper_parameters = kwargs.get("hyper_parameters", None) class AzureOpenAiHyperParameters(msrest.serialization.Model): @@ -4220,15 +3998,12 @@ class AzureOpenAiHyperParameters(msrest.serialization.Model): """ _attribute_map = { - 'batch_size': {'key': 'batchSize', 'type': 'int'}, - 'learning_rate_multiplier': {'key': 'learningRateMultiplier', 'type': 'float'}, - 'n_epochs': {'key': 'nEpochs', 'type': 'int'}, + "batch_size": {"key": "batchSize", "type": "int"}, + "learning_rate_multiplier": {"key": "learningRateMultiplier", "type": "float"}, + "n_epochs": {"key": "nEpochs", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword batch_size: Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance. @@ -4241,9 +4016,9 @@ def __init__( :paramtype n_epochs: int """ super(AzureOpenAiHyperParameters, self).__init__(**kwargs) - self.batch_size = kwargs.get('batch_size', None) - self.learning_rate_multiplier = kwargs.get('learning_rate_multiplier', None) - self.n_epochs = kwargs.get('n_epochs', None) + self.batch_size = kwargs.get("batch_size", None) + self.learning_rate_multiplier = kwargs.get("learning_rate_multiplier", None) + self.n_epochs = kwargs.get("n_epochs", None) class EarlyTerminationPolicy(msrest.serialization.Model): @@ -4265,24 +4040,24 @@ class EarlyTerminationPolicy(msrest.serialization.Model): """ _validation = { - 'policy_type': {'required': True}, + "policy_type": {"required": True}, } _attribute_map = { - 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, - 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, + "delay_evaluation": {"key": "delayEvaluation", "type": "int"}, + "evaluation_interval": {"key": "evaluationInterval", "type": "int"}, + "policy_type": {"key": "policyType", "type": "str"}, } _subtype_map = { - 'policy_type': {'Bandit': 'BanditPolicy', 'MedianStopping': 'MedianStoppingPolicy', - 'TruncationSelection': 'TruncationSelectionPolicy'} + "policy_type": { + "Bandit": "BanditPolicy", + "MedianStopping": "MedianStoppingPolicy", + "TruncationSelection": "TruncationSelectionPolicy", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. :paramtype delay_evaluation: int @@ -4290,8 +4065,8 @@ def __init__( :paramtype evaluation_interval: int """ super(EarlyTerminationPolicy, self).__init__(**kwargs) - self.delay_evaluation = kwargs.get('delay_evaluation', 0) - self.evaluation_interval = kwargs.get('evaluation_interval', 0) + self.delay_evaluation = kwargs.get("delay_evaluation", 0) + self.evaluation_interval = kwargs.get("evaluation_interval", 0) self.policy_type = None # type: Optional[str] @@ -4315,21 +4090,18 @@ class BanditPolicy(EarlyTerminationPolicy): """ _validation = { - 'policy_type': {'required': True}, + "policy_type": {"required": True}, } _attribute_map = { - 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, - 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'slack_amount': {'key': 'slackAmount', 'type': 'float'}, - 'slack_factor': {'key': 'slackFactor', 'type': 'float'}, + "delay_evaluation": {"key": "delayEvaluation", "type": "int"}, + "evaluation_interval": {"key": "evaluationInterval", "type": "int"}, + "policy_type": {"key": "policyType", "type": "str"}, + "slack_amount": {"key": "slackAmount", "type": "float"}, + "slack_factor": {"key": "slackFactor", "type": "float"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. :paramtype delay_evaluation: int @@ -4341,9 +4113,9 @@ def __init__( :paramtype slack_factor: float """ super(BanditPolicy, self).__init__(**kwargs) - self.policy_type = 'Bandit' # type: str - self.slack_amount = kwargs.get('slack_amount', 0) - self.slack_factor = kwargs.get('slack_factor', 0) + self.policy_type = "Bandit" # type: str + self.slack_amount = kwargs.get("slack_amount", 0) + self.slack_factor = kwargs.get("slack_factor", 0) class BaseEnvironmentSource(msrest.serialization.Model): @@ -4361,23 +4133,17 @@ class BaseEnvironmentSource(msrest.serialization.Model): """ _validation = { - 'base_environment_source_type': {'required': True}, + "base_environment_source_type": {"required": True}, } _attribute_map = { - 'base_environment_source_type': {'key': 'baseEnvironmentSourceType', 'type': 'str'}, + "base_environment_source_type": {"key": "baseEnvironmentSourceType", "type": "str"}, } - _subtype_map = { - 'base_environment_source_type': {'EnvironmentAsset': 'BaseEnvironmentId'} - } + _subtype_map = {"base_environment_source_type": {"EnvironmentAsset": "BaseEnvironmentId"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(BaseEnvironmentSource, self).__init__(**kwargs) self.base_environment_source_type = None # type: Optional[str] @@ -4396,26 +4162,23 @@ class BaseEnvironmentId(BaseEnvironmentSource): """ _validation = { - 'base_environment_source_type': {'required': True}, - 'resource_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "base_environment_source_type": {"required": True}, + "resource_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'base_environment_source_type': {'key': 'baseEnvironmentSourceType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, + "base_environment_source_type": {"key": "baseEnvironmentSourceType", "type": "str"}, + "resource_id": {"key": "resourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_id: Required. [Required] Resource id accepting ArmId or AzureMlId. :paramtype resource_id: str """ super(BaseEnvironmentId, self).__init__(**kwargs) - self.base_environment_source_type = 'EnvironmentAsset' # type: str - self.resource_id = kwargs['resource_id'] + self.base_environment_source_type = "EnvironmentAsset" # type: str + self.resource_id = kwargs["resource_id"] class Resource(msrest.serialization.Model): @@ -4437,25 +4200,21 @@ class Resource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -4488,26 +4247,23 @@ class TrackedResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -4515,8 +4271,8 @@ def __init__( :paramtype location: str """ super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs['location'] + self.tags = kwargs.get("tags", None) + self.location = kwargs["location"] class BatchDeployment(TrackedResource): @@ -4553,31 +4309,28 @@ class BatchDeployment(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BatchDeploymentProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "BatchDeploymentProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -4594,10 +4347,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(BatchDeployment, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class BatchDeploymentConfiguration(msrest.serialization.Model): @@ -4615,23 +4368,19 @@ class BatchDeploymentConfiguration(msrest.serialization.Model): """ _validation = { - 'deployment_configuration_type': {'required': True}, + "deployment_configuration_type": {"required": True}, } _attribute_map = { - 'deployment_configuration_type': {'key': 'deploymentConfigurationType', 'type': 'str'}, + "deployment_configuration_type": {"key": "deploymentConfigurationType", "type": "str"}, } _subtype_map = { - 'deployment_configuration_type': {'PipelineComponent': 'BatchPipelineComponentDeploymentConfiguration'} + "deployment_configuration_type": {"PipelineComponent": "BatchPipelineComponentDeploymentConfiguration"} } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(BatchDeploymentConfiguration, self).__init__(**kwargs) self.deployment_configuration_type = None # type: Optional[str] @@ -4653,17 +4402,14 @@ class EndpointDeploymentPropertiesBase(msrest.serialization.Model): """ _attribute_map = { - 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, - 'description': {'key': 'description', 'type': 'str'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': '{str}'}, + "code_configuration": {"key": "codeConfiguration", "type": "CodeConfiguration"}, + "description": {"key": "description", "type": "str"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "properties": {"key": "properties", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_configuration: Code configuration for the endpoint deployment. :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration @@ -4678,11 +4424,11 @@ def __init__( :paramtype properties: dict[str, str] """ super(EndpointDeploymentPropertiesBase, self).__init__(**kwargs) - self.code_configuration = kwargs.get('code_configuration', None) - self.description = kwargs.get('description', None) - self.environment_id = kwargs.get('environment_id', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.properties = kwargs.get('properties', None) + self.code_configuration = kwargs.get("code_configuration", None) + self.description = kwargs.get("description", None) + self.environment_id = kwargs.get("environment_id", None) + self.environment_variables = kwargs.get("environment_variables", None) + self.properties = kwargs.get("properties", None) class BatchDeploymentProperties(EndpointDeploymentPropertiesBase): @@ -4742,33 +4488,30 @@ class BatchDeploymentProperties(EndpointDeploymentPropertiesBase): """ _validation = { - 'provisioning_state': {'readonly': True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, - 'description': {'key': 'description', 'type': 'str'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'compute': {'key': 'compute', 'type': 'str'}, - 'deployment_configuration': {'key': 'deploymentConfiguration', 'type': 'BatchDeploymentConfiguration'}, - 'error_threshold': {'key': 'errorThreshold', 'type': 'int'}, - 'logging_level': {'key': 'loggingLevel', 'type': 'str'}, - 'max_concurrency_per_instance': {'key': 'maxConcurrencyPerInstance', 'type': 'int'}, - 'mini_batch_size': {'key': 'miniBatchSize', 'type': 'long'}, - 'model': {'key': 'model', 'type': 'AssetReferenceBase'}, - 'output_action': {'key': 'outputAction', 'type': 'str'}, - 'output_file_name': {'key': 'outputFileName', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': 'DeploymentResourceConfiguration'}, - 'retry_settings': {'key': 'retrySettings', 'type': 'BatchRetrySettings'}, + "code_configuration": {"key": "codeConfiguration", "type": "CodeConfiguration"}, + "description": {"key": "description", "type": "str"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "properties": {"key": "properties", "type": "{str}"}, + "compute": {"key": "compute", "type": "str"}, + "deployment_configuration": {"key": "deploymentConfiguration", "type": "BatchDeploymentConfiguration"}, + "error_threshold": {"key": "errorThreshold", "type": "int"}, + "logging_level": {"key": "loggingLevel", "type": "str"}, + "max_concurrency_per_instance": {"key": "maxConcurrencyPerInstance", "type": "int"}, + "mini_batch_size": {"key": "miniBatchSize", "type": "long"}, + "model": {"key": "model", "type": "AssetReferenceBase"}, + "output_action": {"key": "outputAction", "type": "str"}, + "output_file_name": {"key": "outputFileName", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "resources": {"key": "resources", "type": "DeploymentResourceConfiguration"}, + "retry_settings": {"key": "retrySettings", "type": "BatchRetrySettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_configuration: Code configuration for the endpoint deployment. :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration @@ -4818,18 +4561,18 @@ def __init__( :paramtype retry_settings: ~azure.mgmt.machinelearningservices.models.BatchRetrySettings """ super(BatchDeploymentProperties, self).__init__(**kwargs) - self.compute = kwargs.get('compute', None) - self.deployment_configuration = kwargs.get('deployment_configuration', None) - self.error_threshold = kwargs.get('error_threshold', -1) - self.logging_level = kwargs.get('logging_level', None) - self.max_concurrency_per_instance = kwargs.get('max_concurrency_per_instance', 1) - self.mini_batch_size = kwargs.get('mini_batch_size', 10) - self.model = kwargs.get('model', None) - self.output_action = kwargs.get('output_action', None) - self.output_file_name = kwargs.get('output_file_name', "predictions.csv") + self.compute = kwargs.get("compute", None) + self.deployment_configuration = kwargs.get("deployment_configuration", None) + self.error_threshold = kwargs.get("error_threshold", -1) + self.logging_level = kwargs.get("logging_level", None) + self.max_concurrency_per_instance = kwargs.get("max_concurrency_per_instance", 1) + self.mini_batch_size = kwargs.get("mini_batch_size", 10) + self.model = kwargs.get("model", None) + self.output_action = kwargs.get("output_action", None) + self.output_file_name = kwargs.get("output_file_name", "predictions.csv") self.provisioning_state = None - self.resources = kwargs.get('resources', None) - self.retry_settings = kwargs.get('retry_settings', None) + self.resources = kwargs.get("resources", None) + self.retry_settings = kwargs.get("retry_settings", None) class BatchDeploymentTrackedResourceArmPaginatedResult(msrest.serialization.Model): @@ -4843,14 +4586,11 @@ class BatchDeploymentTrackedResourceArmPaginatedResult(msrest.serialization.Mode """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[BatchDeployment]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[BatchDeployment]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of BatchDeployment objects. If null, there are no additional pages. @@ -4859,8 +4599,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.BatchDeployment] """ super(BatchDeploymentTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class BatchEndpoint(TrackedResource): @@ -4897,31 +4637,28 @@ class BatchEndpoint(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BatchEndpointProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "BatchEndpointProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -4938,10 +4675,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(BatchEndpoint, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class BatchEndpointDefaults(msrest.serialization.Model): @@ -4953,20 +4690,17 @@ class BatchEndpointDefaults(msrest.serialization.Model): """ _attribute_map = { - 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + "deployment_name": {"key": "deploymentName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword deployment_name: Name of the deployment that will be default for the endpoint. This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. :paramtype deployment_name: str """ super(BatchEndpointDefaults, self).__init__(**kwargs) - self.deployment_name = kwargs.get('deployment_name', None) + self.deployment_name = kwargs.get("deployment_name", None) class EndpointPropertiesBase(msrest.serialization.Model): @@ -4995,24 +4729,21 @@ class EndpointPropertiesBase(msrest.serialization.Model): """ _validation = { - 'auth_mode': {'required': True}, - 'scoring_uri': {'readonly': True}, - 'swagger_uri': {'readonly': True}, + "auth_mode": {"required": True}, + "scoring_uri": {"readonly": True}, + "swagger_uri": {"readonly": True}, } _attribute_map = { - 'auth_mode': {'key': 'authMode', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, - 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + "auth_mode": {"key": "authMode", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "keys": {"key": "keys", "type": "EndpointAuthKeys"}, + "properties": {"key": "properties", "type": "{str}"}, + "scoring_uri": {"key": "scoringUri", "type": "str"}, + "swagger_uri": {"key": "swaggerUri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' @@ -5028,10 +4759,10 @@ def __init__( :paramtype properties: dict[str, str] """ super(EndpointPropertiesBase, self).__init__(**kwargs) - self.auth_mode = kwargs['auth_mode'] - self.description = kwargs.get('description', None) - self.keys = kwargs.get('keys', None) - self.properties = kwargs.get('properties', None) + self.auth_mode = kwargs["auth_mode"] + self.description = kwargs.get("description", None) + self.keys = kwargs.get("keys", None) + self.properties = kwargs.get("properties", None) self.scoring_uri = None self.swagger_uri = None @@ -5068,27 +4799,24 @@ class BatchEndpointProperties(EndpointPropertiesBase): """ _validation = { - 'auth_mode': {'required': True}, - 'scoring_uri': {'readonly': True}, - 'swagger_uri': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "auth_mode": {"required": True}, + "scoring_uri": {"readonly": True}, + "swagger_uri": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'auth_mode': {'key': 'authMode', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, - 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, - 'defaults': {'key': 'defaults', 'type': 'BatchEndpointDefaults'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "auth_mode": {"key": "authMode", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "keys": {"key": "keys", "type": "EndpointAuthKeys"}, + "properties": {"key": "properties", "type": "{str}"}, + "scoring_uri": {"key": "scoringUri", "type": "str"}, + "swagger_uri": {"key": "swaggerUri", "type": "str"}, + "defaults": {"key": "defaults", "type": "BatchEndpointDefaults"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' @@ -5106,7 +4834,7 @@ def __init__( :paramtype defaults: ~azure.mgmt.machinelearningservices.models.BatchEndpointDefaults """ super(BatchEndpointProperties, self).__init__(**kwargs) - self.defaults = kwargs.get('defaults', None) + self.defaults = kwargs.get("defaults", None) self.provisioning_state = None @@ -5121,14 +4849,11 @@ class BatchEndpointTrackedResourceArmPaginatedResult(msrest.serialization.Model) """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[BatchEndpoint]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[BatchEndpoint]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of BatchEndpoint objects. If null, there are no additional pages. @@ -5137,8 +4862,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.BatchEndpoint] """ super(BatchEndpointTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class BatchPipelineComponentDeploymentConfiguration(BatchDeploymentConfiguration): @@ -5161,21 +4886,18 @@ class BatchPipelineComponentDeploymentConfiguration(BatchDeploymentConfiguration """ _validation = { - 'deployment_configuration_type': {'required': True}, + "deployment_configuration_type": {"required": True}, } _attribute_map = { - 'deployment_configuration_type': {'key': 'deploymentConfigurationType', 'type': 'str'}, - 'component_id': {'key': 'componentId', 'type': 'IdAssetReference'}, - 'description': {'key': 'description', 'type': 'str'}, - 'settings': {'key': 'settings', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "deployment_configuration_type": {"key": "deploymentConfigurationType", "type": "str"}, + "component_id": {"key": "componentId", "type": "IdAssetReference"}, + "description": {"key": "description", "type": "str"}, + "settings": {"key": "settings", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword component_id: The ARM id of the component to be run. :paramtype component_id: ~azure.mgmt.machinelearningservices.models.IdAssetReference @@ -5187,11 +4909,11 @@ def __init__( :paramtype tags: dict[str, str] """ super(BatchPipelineComponentDeploymentConfiguration, self).__init__(**kwargs) - self.deployment_configuration_type = 'PipelineComponent' # type: str - self.component_id = kwargs.get('component_id', None) - self.description = kwargs.get('description', None) - self.settings = kwargs.get('settings', None) - self.tags = kwargs.get('tags', None) + self.deployment_configuration_type = "PipelineComponent" # type: str + self.component_id = kwargs.get("component_id", None) + self.description = kwargs.get("description", None) + self.settings = kwargs.get("settings", None) + self.tags = kwargs.get("tags", None) class BatchRetrySettings(msrest.serialization.Model): @@ -5204,14 +4926,11 @@ class BatchRetrySettings(msrest.serialization.Model): """ _attribute_map = { - 'max_retries': {'key': 'maxRetries', 'type': 'int'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, + "max_retries": {"key": "maxRetries", "type": "int"}, + "timeout": {"key": "timeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword max_retries: Maximum retry count for a mini-batch. :paramtype max_retries: int @@ -5219,45 +4938,44 @@ def __init__( :paramtype timeout: ~datetime.timedelta """ super(BatchRetrySettings, self).__init__(**kwargs) - self.max_retries = kwargs.get('max_retries', 3) - self.timeout = kwargs.get('timeout', "PT30S") + self.max_retries = kwargs.get("max_retries", 3) + self.timeout = kwargs.get("timeout", "PT30S") class SamplingAlgorithm(msrest.serialization.Model): """The Sampling Algorithm used to generate hyperparameter values, along with properties to -configure the algorithm. + configure the algorithm. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BayesianSamplingAlgorithm, GridSamplingAlgorithm, RandomSamplingAlgorithm. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BayesianSamplingAlgorithm, GridSamplingAlgorithm, RandomSamplingAlgorithm. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating - hyperparameter values, along with configuration properties.Constant filled by server. Possible - values include: "Grid", "Random", "Bayesian". - :vartype sampling_algorithm_type: str or - ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType + :ivar sampling_algorithm_type: Required. [Required] The algorithm used for generating + hyperparameter values, along with configuration properties.Constant filled by server. Possible + values include: "Grid", "Random", "Bayesian". + :vartype sampling_algorithm_type: str or + ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType """ _validation = { - 'sampling_algorithm_type': {'required': True}, + "sampling_algorithm_type": {"required": True}, } _attribute_map = { - 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + "sampling_algorithm_type": {"key": "samplingAlgorithmType", "type": "str"}, } _subtype_map = { - 'sampling_algorithm_type': {'Bayesian': 'BayesianSamplingAlgorithm', 'Grid': 'GridSamplingAlgorithm', - 'Random': 'RandomSamplingAlgorithm'} + "sampling_algorithm_type": { + "Bayesian": "BayesianSamplingAlgorithm", + "Grid": "GridSamplingAlgorithm", + "Random": "RandomSamplingAlgorithm", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(SamplingAlgorithm, self).__init__(**kwargs) self.sampling_algorithm_type = None # type: Optional[str] @@ -5275,21 +4993,17 @@ class BayesianSamplingAlgorithm(SamplingAlgorithm): """ _validation = { - 'sampling_algorithm_type': {'required': True}, + "sampling_algorithm_type": {"required": True}, } _attribute_map = { - 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + "sampling_algorithm_type": {"key": "samplingAlgorithmType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(BayesianSamplingAlgorithm, self).__init__(**kwargs) - self.sampling_algorithm_type = 'Bayesian' # type: str + self.sampling_algorithm_type = "Bayesian" # type: str class BindOptions(msrest.serialization.Model): @@ -5304,15 +5018,12 @@ class BindOptions(msrest.serialization.Model): """ _attribute_map = { - 'propagation': {'key': 'propagation', 'type': 'str'}, - 'create_host_path': {'key': 'createHostPath', 'type': 'bool'}, - 'selinux': {'key': 'selinux', 'type': 'str'}, + "propagation": {"key": "propagation", "type": "str"}, + "create_host_path": {"key": "createHostPath", "type": "bool"}, + "selinux": {"key": "selinux", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword propagation: Type of Bind Option. :paramtype propagation: str @@ -5322,9 +5033,9 @@ def __init__( :paramtype selinux: str """ super(BindOptions, self).__init__(**kwargs) - self.propagation = kwargs.get('propagation', None) - self.create_host_path = kwargs.get('create_host_path', None) - self.selinux = kwargs.get('selinux', None) + self.propagation = kwargs.get("propagation", None) + self.create_host_path = kwargs.get("create_host_path", None) + self.selinux = kwargs.get("selinux", None) class BlobReferenceForConsumptionDto(msrest.serialization.Model): @@ -5340,15 +5051,12 @@ class BlobReferenceForConsumptionDto(msrest.serialization.Model): """ _attribute_map = { - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'PendingUploadCredentialDto'}, - 'storage_account_arm_id': {'key': 'storageAccountArmId', 'type': 'str'}, + "blob_uri": {"key": "blobUri", "type": "str"}, + "credential": {"key": "credential", "type": "PendingUploadCredentialDto"}, + "storage_account_arm_id": {"key": "storageAccountArmId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword blob_uri: Blob URI path for client to upload data. Example: https://blob.windows.core.net/Container/Path. @@ -5359,9 +5067,9 @@ def __init__( :paramtype storage_account_arm_id: str """ super(BlobReferenceForConsumptionDto, self).__init__(**kwargs) - self.blob_uri = kwargs.get('blob_uri', None) - self.credential = kwargs.get('credential', None) - self.storage_account_arm_id = kwargs.get('storage_account_arm_id', None) + self.blob_uri = kwargs.get("blob_uri", None) + self.credential = kwargs.get("credential", None) + self.storage_account_arm_id = kwargs.get("storage_account_arm_id", None) class BuildContext(msrest.serialization.Model): @@ -5388,18 +5096,15 @@ class BuildContext(msrest.serialization.Model): """ _validation = { - 'context_uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "context_uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'context_uri': {'key': 'contextUri', 'type': 'str'}, - 'dockerfile_path': {'key': 'dockerfilePath', 'type': 'str'}, + "context_uri": {"key": "contextUri", "type": "str"}, + "dockerfile_path": {"key": "dockerfilePath", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword context_uri: Required. [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. @@ -5419,8 +5124,8 @@ def __init__( :paramtype dockerfile_path: str """ super(BuildContext, self).__init__(**kwargs) - self.context_uri = kwargs['context_uri'] - self.dockerfile_path = kwargs.get('dockerfile_path', "Dockerfile") + self.context_uri = kwargs["context_uri"] + self.dockerfile_path = kwargs.get("dockerfile_path", "Dockerfile") class CallRateLimit(msrest.serialization.Model): @@ -5435,15 +5140,12 @@ class CallRateLimit(msrest.serialization.Model): """ _attribute_map = { - 'count': {'key': 'count', 'type': 'float'}, - 'renewal_period': {'key': 'renewalPeriod', 'type': 'float'}, - 'rules': {'key': 'rules', 'type': '[ThrottlingRule]'}, + "count": {"key": "count", "type": "float"}, + "renewal_period": {"key": "renewalPeriod", "type": "float"}, + "rules": {"key": "rules", "type": "[ThrottlingRule]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword count: The count value of Call Rate Limit. :paramtype count: float @@ -5453,9 +5155,9 @@ def __init__( :paramtype rules: list[~azure.mgmt.machinelearningservices.models.ThrottlingRule] """ super(CallRateLimit, self).__init__(**kwargs) - self.count = kwargs.get('count', None) - self.renewal_period = kwargs.get('renewal_period', None) - self.rules = kwargs.get('rules', None) + self.count = kwargs.get("count", None) + self.renewal_period = kwargs.get("renewal_period", None) + self.rules = kwargs.get("rules", None) class CapacityConfig(msrest.serialization.Model): @@ -5474,17 +5176,14 @@ class CapacityConfig(msrest.serialization.Model): """ _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'int'}, - 'maximum': {'key': 'maximum', 'type': 'int'}, - 'step': {'key': 'step', 'type': 'int'}, - 'default': {'key': 'default', 'type': 'int'}, - 'allowed_values': {'key': 'allowedValues', 'type': '[int]'}, + "minimum": {"key": "minimum", "type": "int"}, + "maximum": {"key": "maximum", "type": "int"}, + "step": {"key": "step", "type": "int"}, + "default": {"key": "default", "type": "int"}, + "allowed_values": {"key": "allowedValues", "type": "[int]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword minimum: The minimum capacity. :paramtype minimum: int @@ -5498,11 +5197,11 @@ def __init__( :paramtype allowed_values: list[int] """ super(CapacityConfig, self).__init__(**kwargs) - self.minimum = kwargs.get('minimum', None) - self.maximum = kwargs.get('maximum', None) - self.step = kwargs.get('step', None) - self.default = kwargs.get('default', None) - self.allowed_values = kwargs.get('allowed_values', None) + self.minimum = kwargs.get("minimum", None) + self.maximum = kwargs.get("maximum", None) + self.step = kwargs.get("step", None) + self.default = kwargs.get("default", None) + self.allowed_values = kwargs.get("allowed_values", None) class CapacityReservationGroup(TrackedResource): @@ -5540,31 +5239,28 @@ class CapacityReservationGroup(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'CapacityReservationGroupProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "CapacityReservationGroupProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -5582,10 +5278,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(CapacityReservationGroup, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class CapacityReservationGroupProperties(msrest.serialization.Model): @@ -5600,18 +5296,15 @@ class CapacityReservationGroupProperties(msrest.serialization.Model): """ _validation = { - 'reserved_capacity': {'required': True}, + "reserved_capacity": {"required": True}, } _attribute_map = { - 'offer': {'key': 'offer', 'type': 'ServerlessOffer'}, - 'reserved_capacity': {'key': 'reservedCapacity', 'type': 'int'}, + "offer": {"key": "offer", "type": "ServerlessOffer"}, + "reserved_capacity": {"key": "reservedCapacity", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword offer: Offer used by this capacity reservation group. :paramtype offer: ~azure.mgmt.machinelearningservices.models.ServerlessOffer @@ -5619,8 +5312,8 @@ def __init__( :paramtype reserved_capacity: int """ super(CapacityReservationGroupProperties, self).__init__(**kwargs) - self.offer = kwargs.get('offer', None) - self.reserved_capacity = kwargs['reserved_capacity'] + self.offer = kwargs.get("offer", None) + self.reserved_capacity = kwargs["reserved_capacity"] class CapacityReservationGroupTrackedResourceArmPaginatedResult(msrest.serialization.Model): @@ -5634,14 +5327,11 @@ class CapacityReservationGroupTrackedResourceArmPaginatedResult(msrest.serializa """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[CapacityReservationGroup]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[CapacityReservationGroup]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of CapacityReservationGroup objects. If null, there are no additional pages. @@ -5650,8 +5340,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.CapacityReservationGroup] """ super(CapacityReservationGroupTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class DataDriftMetricThresholdBase(msrest.serialization.Model): @@ -5671,23 +5361,22 @@ class DataDriftMetricThresholdBase(msrest.serialization.Model): """ _validation = { - 'data_type': {'required': True}, + "data_type": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, } _subtype_map = { - 'data_type': {'Categorical': 'CategoricalDataDriftMetricThreshold', - 'Numerical': 'NumericalDataDriftMetricThreshold'} + "data_type": { + "Categorical": "CategoricalDataDriftMetricThreshold", + "Numerical": "NumericalDataDriftMetricThreshold", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -5695,7 +5384,7 @@ def __init__( """ super(DataDriftMetricThresholdBase, self).__init__(**kwargs) self.data_type = None # type: Optional[str] - self.threshold = kwargs.get('threshold', None) + self.threshold = kwargs.get("threshold", None) class CategoricalDataDriftMetricThreshold(DataDriftMetricThresholdBase): @@ -5715,20 +5404,17 @@ class CategoricalDataDriftMetricThreshold(DataDriftMetricThresholdBase): """ _validation = { - 'data_type': {'required': True}, - 'metric': {'required': True}, + "data_type": {"required": True}, + "metric": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, - 'metric': {'key': 'metric', 'type': 'str'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, + "metric": {"key": "metric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -5738,8 +5424,8 @@ def __init__( :paramtype metric: str or ~azure.mgmt.machinelearningservices.models.CategoricalDataDriftMetric """ super(CategoricalDataDriftMetricThreshold, self).__init__(**kwargs) - self.data_type = 'Categorical' # type: str - self.metric = kwargs['metric'] + self.data_type = "Categorical" # type: str + self.metric = kwargs["metric"] class DataQualityMetricThresholdBase(msrest.serialization.Model): @@ -5759,23 +5445,22 @@ class DataQualityMetricThresholdBase(msrest.serialization.Model): """ _validation = { - 'data_type': {'required': True}, + "data_type": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, } _subtype_map = { - 'data_type': {'Categorical': 'CategoricalDataQualityMetricThreshold', - 'Numerical': 'NumericalDataQualityMetricThreshold'} + "data_type": { + "Categorical": "CategoricalDataQualityMetricThreshold", + "Numerical": "NumericalDataQualityMetricThreshold", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -5783,7 +5468,7 @@ def __init__( """ super(DataQualityMetricThresholdBase, self).__init__(**kwargs) self.data_type = None # type: Optional[str] - self.threshold = kwargs.get('threshold', None) + self.threshold = kwargs.get("threshold", None) class CategoricalDataQualityMetricThreshold(DataQualityMetricThresholdBase): @@ -5803,20 +5488,17 @@ class CategoricalDataQualityMetricThreshold(DataQualityMetricThresholdBase): """ _validation = { - 'data_type': {'required': True}, - 'metric': {'required': True}, + "data_type": {"required": True}, + "metric": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, - 'metric': {'key': 'metric', 'type': 'str'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, + "metric": {"key": "metric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -5827,8 +5509,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.CategoricalDataQualityMetric """ super(CategoricalDataQualityMetricThreshold, self).__init__(**kwargs) - self.data_type = 'Categorical' # type: str - self.metric = kwargs['metric'] + self.data_type = "Categorical" # type: str + self.metric = kwargs["metric"] class PredictionDriftMetricThresholdBase(msrest.serialization.Model): @@ -5848,23 +5530,22 @@ class PredictionDriftMetricThresholdBase(msrest.serialization.Model): """ _validation = { - 'data_type': {'required': True}, + "data_type": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, } _subtype_map = { - 'data_type': {'Categorical': 'CategoricalPredictionDriftMetricThreshold', - 'Numerical': 'NumericalPredictionDriftMetricThreshold'} + "data_type": { + "Categorical": "CategoricalPredictionDriftMetricThreshold", + "Numerical": "NumericalPredictionDriftMetricThreshold", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -5872,7 +5553,7 @@ def __init__( """ super(PredictionDriftMetricThresholdBase, self).__init__(**kwargs) self.data_type = None # type: Optional[str] - self.threshold = kwargs.get('threshold', None) + self.threshold = kwargs.get("threshold", None) class CategoricalPredictionDriftMetricThreshold(PredictionDriftMetricThresholdBase): @@ -5894,20 +5575,17 @@ class CategoricalPredictionDriftMetricThreshold(PredictionDriftMetricThresholdBa """ _validation = { - 'data_type': {'required': True}, - 'metric': {'required': True}, + "data_type": {"required": True}, + "metric": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, - 'metric': {'key': 'metric', 'type': 'str'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, + "metric": {"key": "metric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -5919,8 +5597,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.CategoricalPredictionDriftMetric """ super(CategoricalPredictionDriftMetricThreshold, self).__init__(**kwargs) - self.data_type = 'Categorical' # type: str - self.metric = kwargs['metric'] + self.data_type = "Categorical" # type: str + self.metric = kwargs["metric"] class CertificateDatastoreCredentials(DatastoreCredentials): @@ -5947,27 +5625,24 @@ class CertificateDatastoreCredentials(DatastoreCredentials): """ _validation = { - 'credentials_type': {'required': True}, - 'client_id': {'required': True}, - 'secrets': {'required': True}, - 'tenant_id': {'required': True}, - 'thumbprint': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "credentials_type": {"required": True}, + "client_id": {"required": True}, + "secrets": {"required": True}, + "tenant_id": {"required": True}, + "thumbprint": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, - 'authority_url': {'key': 'authorityUrl', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, - 'secrets': {'key': 'secrets', 'type': 'CertificateDatastoreSecrets'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + "credentials_type": {"key": "credentialsType", "type": "str"}, + "authority_url": {"key": "authorityUrl", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "resource_url": {"key": "resourceUrl", "type": "str"}, + "secrets": {"key": "secrets", "type": "CertificateDatastoreSecrets"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "thumbprint": {"key": "thumbprint", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword authority_url: Authority URL used for authentication. :paramtype authority_url: str @@ -5985,13 +5660,13 @@ def __init__( :paramtype thumbprint: str """ super(CertificateDatastoreCredentials, self).__init__(**kwargs) - self.credentials_type = 'Certificate' # type: str - self.authority_url = kwargs.get('authority_url', None) - self.client_id = kwargs['client_id'] - self.resource_url = kwargs.get('resource_url', None) - self.secrets = kwargs['secrets'] - self.tenant_id = kwargs['tenant_id'] - self.thumbprint = kwargs['thumbprint'] + self.credentials_type = "Certificate" # type: str + self.authority_url = kwargs.get("authority_url", None) + self.client_id = kwargs["client_id"] + self.resource_url = kwargs.get("resource_url", None) + self.secrets = kwargs["secrets"] + self.tenant_id = kwargs["tenant_id"] + self.thumbprint = kwargs["thumbprint"] class CertificateDatastoreSecrets(DatastoreSecrets): @@ -6008,25 +5683,22 @@ class CertificateDatastoreSecrets(DatastoreSecrets): """ _validation = { - 'secrets_type': {'required': True}, + "secrets_type": {"required": True}, } _attribute_map = { - 'secrets_type': {'key': 'secretsType', 'type': 'str'}, - 'certificate': {'key': 'certificate', 'type': 'str'}, + "secrets_type": {"key": "secretsType", "type": "str"}, + "certificate": {"key": "certificate", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword certificate: Service principal certificate. :paramtype certificate: str """ super(CertificateDatastoreSecrets, self).__init__(**kwargs) - self.secrets_type = 'Certificate' # type: str - self.certificate = kwargs.get('certificate', None) + self.secrets_type = "Certificate" # type: str + self.certificate = kwargs.get("certificate", None) class TableVertical(msrest.serialization.Model): @@ -6070,24 +5742,21 @@ class TableVertical(msrest.serialization.Model): """ _attribute_map = { - 'cv_split_column_names': {'key': 'cvSplitColumnNames', 'type': '[str]'}, - 'featurization_settings': {'key': 'featurizationSettings', 'type': 'TableVerticalFeaturizationSettings'}, - 'fixed_parameters': {'key': 'fixedParameters', 'type': 'TableFixedParameters'}, - 'limit_settings': {'key': 'limitSettings', 'type': 'TableVerticalLimitSettings'}, - 'n_cross_validations': {'key': 'nCrossValidations', 'type': 'NCrossValidations'}, - 'search_space': {'key': 'searchSpace', 'type': '[TableParameterSubspace]'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'TableSweepSettings'}, - 'test_data': {'key': 'testData', 'type': 'MLTableJobInput'}, - 'test_data_size': {'key': 'testDataSize', 'type': 'float'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'weight_column_name': {'key': 'weightColumnName', 'type': 'str'}, + "cv_split_column_names": {"key": "cvSplitColumnNames", "type": "[str]"}, + "featurization_settings": {"key": "featurizationSettings", "type": "TableVerticalFeaturizationSettings"}, + "fixed_parameters": {"key": "fixedParameters", "type": "TableFixedParameters"}, + "limit_settings": {"key": "limitSettings", "type": "TableVerticalLimitSettings"}, + "n_cross_validations": {"key": "nCrossValidations", "type": "NCrossValidations"}, + "search_space": {"key": "searchSpace", "type": "[TableParameterSubspace]"}, + "sweep_settings": {"key": "sweepSettings", "type": "TableSweepSettings"}, + "test_data": {"key": "testData", "type": "MLTableJobInput"}, + "test_data_size": {"key": "testDataSize", "type": "float"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "weight_column_name": {"key": "weightColumnName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword cv_split_column_names: Columns to use for CVSplit data. :paramtype cv_split_column_names: list[str] @@ -6129,18 +5798,18 @@ def __init__( :paramtype weight_column_name: str """ super(TableVertical, self).__init__(**kwargs) - self.cv_split_column_names = kwargs.get('cv_split_column_names', None) - self.featurization_settings = kwargs.get('featurization_settings', None) - self.fixed_parameters = kwargs.get('fixed_parameters', None) - self.limit_settings = kwargs.get('limit_settings', None) - self.n_cross_validations = kwargs.get('n_cross_validations', None) - self.search_space = kwargs.get('search_space', None) - self.sweep_settings = kwargs.get('sweep_settings', None) - self.test_data = kwargs.get('test_data', None) - self.test_data_size = kwargs.get('test_data_size', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) - self.weight_column_name = kwargs.get('weight_column_name', None) + self.cv_split_column_names = kwargs.get("cv_split_column_names", None) + self.featurization_settings = kwargs.get("featurization_settings", None) + self.fixed_parameters = kwargs.get("fixed_parameters", None) + self.limit_settings = kwargs.get("limit_settings", None) + self.n_cross_validations = kwargs.get("n_cross_validations", None) + self.search_space = kwargs.get("search_space", None) + self.sweep_settings = kwargs.get("sweep_settings", None) + self.test_data = kwargs.get("test_data", None) + self.test_data_size = kwargs.get("test_data_size", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) + self.weight_column_name = kwargs.get("weight_column_name", None) class Classification(AutoMLVertical, TableVertical): @@ -6208,36 +5877,33 @@ class Classification(AutoMLVertical, TableVertical): """ _validation = { - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'cv_split_column_names': {'key': 'cvSplitColumnNames', 'type': '[str]'}, - 'featurization_settings': {'key': 'featurizationSettings', 'type': 'TableVerticalFeaturizationSettings'}, - 'fixed_parameters': {'key': 'fixedParameters', 'type': 'TableFixedParameters'}, - 'limit_settings': {'key': 'limitSettings', 'type': 'TableVerticalLimitSettings'}, - 'n_cross_validations': {'key': 'nCrossValidations', 'type': 'NCrossValidations'}, - 'search_space': {'key': 'searchSpace', 'type': '[TableParameterSubspace]'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'TableSweepSettings'}, - 'test_data': {'key': 'testData', 'type': 'MLTableJobInput'}, - 'test_data_size': {'key': 'testDataSize', 'type': 'float'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'weight_column_name': {'key': 'weightColumnName', 'type': 'str'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'positive_label': {'key': 'positiveLabel', 'type': 'str'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, - 'training_settings': {'key': 'trainingSettings', 'type': 'ClassificationTrainingSettings'}, + "cv_split_column_names": {"key": "cvSplitColumnNames", "type": "[str]"}, + "featurization_settings": {"key": "featurizationSettings", "type": "TableVerticalFeaturizationSettings"}, + "fixed_parameters": {"key": "fixedParameters", "type": "TableFixedParameters"}, + "limit_settings": {"key": "limitSettings", "type": "TableVerticalLimitSettings"}, + "n_cross_validations": {"key": "nCrossValidations", "type": "NCrossValidations"}, + "search_space": {"key": "searchSpace", "type": "[TableParameterSubspace]"}, + "sweep_settings": {"key": "sweepSettings", "type": "TableSweepSettings"}, + "test_data": {"key": "testData", "type": "MLTableJobInput"}, + "test_data_size": {"key": "testDataSize", "type": "float"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "weight_column_name": {"key": "weightColumnName", "type": "str"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "positive_label": {"key": "positiveLabel", "type": "str"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, + "training_settings": {"key": "trainingSettings", "type": "ClassificationTrainingSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword cv_split_column_names: Columns to use for CVSplit data. :paramtype cv_split_column_names: list[str] @@ -6296,25 +5962,25 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ClassificationTrainingSettings """ super(Classification, self).__init__(**kwargs) - self.cv_split_column_names = kwargs.get('cv_split_column_names', None) - self.featurization_settings = kwargs.get('featurization_settings', None) - self.fixed_parameters = kwargs.get('fixed_parameters', None) - self.limit_settings = kwargs.get('limit_settings', None) - self.n_cross_validations = kwargs.get('n_cross_validations', None) - self.search_space = kwargs.get('search_space', None) - self.sweep_settings = kwargs.get('sweep_settings', None) - self.test_data = kwargs.get('test_data', None) - self.test_data_size = kwargs.get('test_data_size', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) - self.weight_column_name = kwargs.get('weight_column_name', None) - self.task_type = 'Classification' # type: str - self.positive_label = kwargs.get('positive_label', None) - self.primary_metric = kwargs.get('primary_metric', None) - self.training_settings = kwargs.get('training_settings', None) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.cv_split_column_names = kwargs.get("cv_split_column_names", None) + self.featurization_settings = kwargs.get("featurization_settings", None) + self.fixed_parameters = kwargs.get("fixed_parameters", None) + self.limit_settings = kwargs.get("limit_settings", None) + self.n_cross_validations = kwargs.get("n_cross_validations", None) + self.search_space = kwargs.get("search_space", None) + self.sweep_settings = kwargs.get("sweep_settings", None) + self.test_data = kwargs.get("test_data", None) + self.test_data_size = kwargs.get("test_data_size", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) + self.weight_column_name = kwargs.get("weight_column_name", None) + self.task_type = "Classification" # type: str + self.positive_label = kwargs.get("positive_label", None) + self.primary_metric = kwargs.get("primary_metric", None) + self.training_settings = kwargs.get("training_settings", None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class ModelPerformanceMetricThresholdBase(msrest.serialization.Model): @@ -6334,23 +6000,22 @@ class ModelPerformanceMetricThresholdBase(msrest.serialization.Model): """ _validation = { - 'model_type': {'required': True}, + "model_type": {"required": True}, } _attribute_map = { - 'model_type': {'key': 'modelType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, + "model_type": {"key": "modelType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, } _subtype_map = { - 'model_type': {'Classification': 'ClassificationModelPerformanceMetricThreshold', - 'Regression': 'RegressionModelPerformanceMetricThreshold'} + "model_type": { + "Classification": "ClassificationModelPerformanceMetricThreshold", + "Regression": "RegressionModelPerformanceMetricThreshold", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -6358,7 +6023,7 @@ def __init__( """ super(ModelPerformanceMetricThresholdBase, self).__init__(**kwargs) self.model_type = None # type: Optional[str] - self.threshold = kwargs.get('threshold', None) + self.threshold = kwargs.get("threshold", None) class ClassificationModelPerformanceMetricThreshold(ModelPerformanceMetricThresholdBase): @@ -6379,20 +6044,17 @@ class ClassificationModelPerformanceMetricThreshold(ModelPerformanceMetricThresh """ _validation = { - 'model_type': {'required': True}, - 'metric': {'required': True}, + "model_type": {"required": True}, + "metric": {"required": True}, } _attribute_map = { - 'model_type': {'key': 'modelType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, - 'metric': {'key': 'metric', 'type': 'str'}, + "model_type": {"key": "modelType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, + "metric": {"key": "metric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -6403,8 +6065,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ClassificationModelPerformanceMetric """ super(ClassificationModelPerformanceMetricThreshold, self).__init__(**kwargs) - self.model_type = 'Classification' # type: str - self.metric = kwargs['metric'] + self.model_type = "Classification" # type: str + self.metric = kwargs["metric"] class TrainingSettings(msrest.serialization.Model): @@ -6438,20 +6100,17 @@ class TrainingSettings(msrest.serialization.Model): """ _attribute_map = { - 'enable_dnn_training': {'key': 'enableDnnTraining', 'type': 'bool'}, - 'enable_model_explainability': {'key': 'enableModelExplainability', 'type': 'bool'}, - 'enable_onnx_compatible_models': {'key': 'enableOnnxCompatibleModels', 'type': 'bool'}, - 'enable_stack_ensemble': {'key': 'enableStackEnsemble', 'type': 'bool'}, - 'enable_vote_ensemble': {'key': 'enableVoteEnsemble', 'type': 'bool'}, - 'ensemble_model_download_timeout': {'key': 'ensembleModelDownloadTimeout', 'type': 'duration'}, - 'stack_ensemble_settings': {'key': 'stackEnsembleSettings', 'type': 'StackEnsembleSettings'}, - 'training_mode': {'key': 'trainingMode', 'type': 'str'}, + "enable_dnn_training": {"key": "enableDnnTraining", "type": "bool"}, + "enable_model_explainability": {"key": "enableModelExplainability", "type": "bool"}, + "enable_onnx_compatible_models": {"key": "enableOnnxCompatibleModels", "type": "bool"}, + "enable_stack_ensemble": {"key": "enableStackEnsemble", "type": "bool"}, + "enable_vote_ensemble": {"key": "enableVoteEnsemble", "type": "bool"}, + "ensemble_model_download_timeout": {"key": "ensembleModelDownloadTimeout", "type": "duration"}, + "stack_ensemble_settings": {"key": "stackEnsembleSettings", "type": "StackEnsembleSettings"}, + "training_mode": {"key": "trainingMode", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword enable_dnn_training: Enable recommendation of DNN models. :paramtype enable_dnn_training: bool @@ -6480,14 +6139,14 @@ def __init__( :paramtype training_mode: str or ~azure.mgmt.machinelearningservices.models.TrainingMode """ super(TrainingSettings, self).__init__(**kwargs) - self.enable_dnn_training = kwargs.get('enable_dnn_training', False) - self.enable_model_explainability = kwargs.get('enable_model_explainability', True) - self.enable_onnx_compatible_models = kwargs.get('enable_onnx_compatible_models', False) - self.enable_stack_ensemble = kwargs.get('enable_stack_ensemble', True) - self.enable_vote_ensemble = kwargs.get('enable_vote_ensemble', True) - self.ensemble_model_download_timeout = kwargs.get('ensemble_model_download_timeout', "PT5M") - self.stack_ensemble_settings = kwargs.get('stack_ensemble_settings', None) - self.training_mode = kwargs.get('training_mode', None) + self.enable_dnn_training = kwargs.get("enable_dnn_training", False) + self.enable_model_explainability = kwargs.get("enable_model_explainability", True) + self.enable_onnx_compatible_models = kwargs.get("enable_onnx_compatible_models", False) + self.enable_stack_ensemble = kwargs.get("enable_stack_ensemble", True) + self.enable_vote_ensemble = kwargs.get("enable_vote_ensemble", True) + self.ensemble_model_download_timeout = kwargs.get("ensemble_model_download_timeout", "PT5M") + self.stack_ensemble_settings = kwargs.get("stack_ensemble_settings", None) + self.training_mode = kwargs.get("training_mode", None) class ClassificationTrainingSettings(TrainingSettings): @@ -6527,22 +6186,19 @@ class ClassificationTrainingSettings(TrainingSettings): """ _attribute_map = { - 'enable_dnn_training': {'key': 'enableDnnTraining', 'type': 'bool'}, - 'enable_model_explainability': {'key': 'enableModelExplainability', 'type': 'bool'}, - 'enable_onnx_compatible_models': {'key': 'enableOnnxCompatibleModels', 'type': 'bool'}, - 'enable_stack_ensemble': {'key': 'enableStackEnsemble', 'type': 'bool'}, - 'enable_vote_ensemble': {'key': 'enableVoteEnsemble', 'type': 'bool'}, - 'ensemble_model_download_timeout': {'key': 'ensembleModelDownloadTimeout', 'type': 'duration'}, - 'stack_ensemble_settings': {'key': 'stackEnsembleSettings', 'type': 'StackEnsembleSettings'}, - 'training_mode': {'key': 'trainingMode', 'type': 'str'}, - 'allowed_training_algorithms': {'key': 'allowedTrainingAlgorithms', 'type': '[str]'}, - 'blocked_training_algorithms': {'key': 'blockedTrainingAlgorithms', 'type': '[str]'}, + "enable_dnn_training": {"key": "enableDnnTraining", "type": "bool"}, + "enable_model_explainability": {"key": "enableModelExplainability", "type": "bool"}, + "enable_onnx_compatible_models": {"key": "enableOnnxCompatibleModels", "type": "bool"}, + "enable_stack_ensemble": {"key": "enableStackEnsemble", "type": "bool"}, + "enable_vote_ensemble": {"key": "enableVoteEnsemble", "type": "bool"}, + "ensemble_model_download_timeout": {"key": "ensembleModelDownloadTimeout", "type": "duration"}, + "stack_ensemble_settings": {"key": "stackEnsembleSettings", "type": "StackEnsembleSettings"}, + "training_mode": {"key": "trainingMode", "type": "str"}, + "allowed_training_algorithms": {"key": "allowedTrainingAlgorithms", "type": "[str]"}, + "blocked_training_algorithms": {"key": "blockedTrainingAlgorithms", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword enable_dnn_training: Enable recommendation of DNN models. :paramtype enable_dnn_training: bool @@ -6577,8 +6233,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ClassificationModels] """ super(ClassificationTrainingSettings, self).__init__(**kwargs) - self.allowed_training_algorithms = kwargs.get('allowed_training_algorithms', None) - self.blocked_training_algorithms = kwargs.get('blocked_training_algorithms', None) + self.allowed_training_algorithms = kwargs.get("allowed_training_algorithms", None) + self.blocked_training_algorithms = kwargs.get("blocked_training_algorithms", None) class ClusterUpdateParameters(msrest.serialization.Model): @@ -6589,19 +6245,16 @@ class ClusterUpdateParameters(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties.properties', 'type': 'ScaleSettingsInformation'}, + "properties": {"key": "properties.properties", "type": "ScaleSettingsInformation"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of ClusterUpdate. :paramtype properties: ~azure.mgmt.machinelearningservices.models.ScaleSettingsInformation """ super(ClusterUpdateParameters, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class ExportSummary(msrest.serialization.Model): @@ -6628,31 +6281,27 @@ class ExportSummary(msrest.serialization.Model): """ _validation = { - 'end_date_time': {'readonly': True}, - 'exported_row_count': {'readonly': True}, - 'format': {'required': True}, - 'labeling_job_id': {'readonly': True}, - 'start_date_time': {'readonly': True}, + "end_date_time": {"readonly": True}, + "exported_row_count": {"readonly": True}, + "format": {"required": True}, + "labeling_job_id": {"readonly": True}, + "start_date_time": {"readonly": True}, } _attribute_map = { - 'end_date_time': {'key': 'endDateTime', 'type': 'iso-8601'}, - 'exported_row_count': {'key': 'exportedRowCount', 'type': 'long'}, - 'format': {'key': 'format', 'type': 'str'}, - 'labeling_job_id': {'key': 'labelingJobId', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, + "end_date_time": {"key": "endDateTime", "type": "iso-8601"}, + "exported_row_count": {"key": "exportedRowCount", "type": "long"}, + "format": {"key": "format", "type": "str"}, + "labeling_job_id": {"key": "labelingJobId", "type": "str"}, + "start_date_time": {"key": "startDateTime", "type": "iso-8601"}, } _subtype_map = { - 'format': {'CSV': 'CsvExportSummary', 'Coco': 'CocoExportSummary', 'Dataset': 'DatasetExportSummary'} + "format": {"CSV": "CsvExportSummary", "Coco": "CocoExportSummary", "Dataset": "DatasetExportSummary"} } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ExportSummary, self).__init__(**kwargs) self.end_date_time = None self.exported_row_count = None @@ -6686,33 +6335,29 @@ class CocoExportSummary(ExportSummary): """ _validation = { - 'end_date_time': {'readonly': True}, - 'exported_row_count': {'readonly': True}, - 'format': {'required': True}, - 'labeling_job_id': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'container_name': {'readonly': True}, - 'snapshot_path': {'readonly': True}, + "end_date_time": {"readonly": True}, + "exported_row_count": {"readonly": True}, + "format": {"required": True}, + "labeling_job_id": {"readonly": True}, + "start_date_time": {"readonly": True}, + "container_name": {"readonly": True}, + "snapshot_path": {"readonly": True}, } _attribute_map = { - 'end_date_time': {'key': 'endDateTime', 'type': 'iso-8601'}, - 'exported_row_count': {'key': 'exportedRowCount', 'type': 'long'}, - 'format': {'key': 'format', 'type': 'str'}, - 'labeling_job_id': {'key': 'labelingJobId', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'snapshot_path': {'key': 'snapshotPath', 'type': 'str'}, + "end_date_time": {"key": "endDateTime", "type": "iso-8601"}, + "exported_row_count": {"key": "exportedRowCount", "type": "long"}, + "format": {"key": "format", "type": "str"}, + "labeling_job_id": {"key": "labelingJobId", "type": "str"}, + "start_date_time": {"key": "startDateTime", "type": "iso-8601"}, + "container_name": {"key": "containerName", "type": "str"}, + "snapshot_path": {"key": "snapshotPath", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(CocoExportSummary, self).__init__(**kwargs) - self.format = 'Coco' # type: str + self.format = "Coco" # type: str self.container_name = None self.snapshot_path = None @@ -6729,18 +6374,15 @@ class CodeConfiguration(msrest.serialization.Model): """ _validation = { - 'scoring_script': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "scoring_script": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'code_id': {'key': 'codeId', 'type': 'str'}, - 'scoring_script': {'key': 'scoringScript', 'type': 'str'}, + "code_id": {"key": "codeId", "type": "str"}, + "scoring_script": {"key": "scoringScript", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_id: ARM resource ID of the code asset. :paramtype code_id: str @@ -6748,8 +6390,8 @@ def __init__( :paramtype scoring_script: str """ super(CodeConfiguration, self).__init__(**kwargs) - self.code_id = kwargs.get('code_id', None) - self.scoring_script = kwargs['scoring_script'] + self.code_id = kwargs.get("code_id", None) + self.scoring_script = kwargs["scoring_script"] class ProxyResource(Resource): @@ -6771,25 +6413,21 @@ class ProxyResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ProxyResource, self).__init__(**kwargs) @@ -6816,31 +6454,28 @@ class CodeContainer(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'CodeContainerProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "CodeContainerProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.CodeContainerProperties """ super(CodeContainer, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class CodeContainerProperties(AssetContainer): @@ -6867,25 +6502,22 @@ class CodeContainerProperties(AssetContainer): """ _validation = { - 'latest_version': {'readonly': True}, - 'next_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "latest_version": {"readonly": True}, + "next_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'latest_version': {'key': 'latestVersion', 'type': 'str'}, - 'next_version': {'key': 'nextVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "latest_version": {"key": "latestVersion", "type": "str"}, + "next_version": {"key": "nextVersion", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -6911,14 +6543,11 @@ class CodeContainerResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[CodeContainer]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[CodeContainer]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of CodeContainer objects. If null, there are no additional pages. @@ -6927,8 +6556,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.CodeContainer] """ super(CodeContainerResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class CodeVersion(ProxyResource): @@ -6954,31 +6583,28 @@ class CodeVersion(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'CodeVersionProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "CodeVersionProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.CodeVersionProperties """ super(CodeVersion, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class CodeVersionProperties(AssetBase): @@ -7009,24 +6635,21 @@ class CodeVersionProperties(AssetBase): """ _validation = { - 'provisioning_state': {'readonly': True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'code_uri': {'key': 'codeUri', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "code_uri": {"key": "codeUri", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -7046,7 +6669,7 @@ def __init__( :paramtype code_uri: str """ super(CodeVersionProperties, self).__init__(**kwargs) - self.code_uri = kwargs.get('code_uri', None) + self.code_uri = kwargs.get("code_uri", None) self.provisioning_state = None @@ -7061,14 +6684,11 @@ class CodeVersionResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[CodeVersion]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[CodeVersion]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of CodeVersion objects. If null, there are no additional pages. @@ -7077,8 +6697,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.CodeVersion] """ super(CodeVersionResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class CognitiveServiceEndpointDeploymentResourceProperties(msrest.serialization.Model): @@ -7099,20 +6719,17 @@ class CognitiveServiceEndpointDeploymentResourceProperties(msrest.serialization. """ _validation = { - 'model': {'required': True}, + "model": {"required": True}, } _attribute_map = { - 'model': {'key': 'model', 'type': 'EndpointDeploymentModel'}, - 'rai_policy_name': {'key': 'raiPolicyName', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'CognitiveServicesSku'}, - 'version_upgrade_option': {'key': 'versionUpgradeOption', 'type': 'str'}, + "model": {"key": "model", "type": "EndpointDeploymentModel"}, + "rai_policy_name": {"key": "raiPolicyName", "type": "str"}, + "sku": {"key": "sku", "type": "CognitiveServicesSku"}, + "version_upgrade_option": {"key": "versionUpgradeOption", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model: Required. Model used for the endpoint deployment. :paramtype model: ~azure.mgmt.machinelearningservices.models.EndpointDeploymentModel @@ -7126,10 +6743,10 @@ def __init__( ~azure.mgmt.machinelearningservices.models.DeploymentModelVersionUpgradeOption """ super(CognitiveServiceEndpointDeploymentResourceProperties, self).__init__(**kwargs) - self.model = kwargs['model'] - self.rai_policy_name = kwargs.get('rai_policy_name', None) - self.sku = kwargs.get('sku', None) - self.version_upgrade_option = kwargs.get('version_upgrade_option', None) + self.model = kwargs["model"] + self.rai_policy_name = kwargs.get("rai_policy_name", None) + self.sku = kwargs.get("sku", None) + self.version_upgrade_option = kwargs.get("version_upgrade_option", None) class CognitiveServicesSku(msrest.serialization.Model): @@ -7148,17 +6765,14 @@ class CognitiveServicesSku(msrest.serialization.Model): """ _attribute_map = { - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'family': {'key': 'family', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, + "capacity": {"key": "capacity", "type": "int"}, + "family": {"key": "family", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "size": {"key": "size", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword capacity: :paramtype capacity: int @@ -7172,11 +6786,11 @@ def __init__( :paramtype tier: str """ super(CognitiveServicesSku, self).__init__(**kwargs) - self.capacity = kwargs.get('capacity', None) - self.family = kwargs.get('family', None) - self.name = kwargs.get('name', None) - self.size = kwargs.get('size', None) - self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get("capacity", None) + self.family = kwargs.get("family", None) + self.name = kwargs.get("name", None) + self.size = kwargs.get("size", None) + self.tier = kwargs.get("tier", None) class Collection(msrest.serialization.Model): @@ -7198,16 +6812,13 @@ class Collection(msrest.serialization.Model): """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'data_collection_mode': {'key': 'dataCollectionMode', 'type': 'str'}, - 'data_id': {'key': 'dataId', 'type': 'str'}, - 'sampling_rate': {'key': 'samplingRate', 'type': 'float'}, + "client_id": {"key": "clientId", "type": "str"}, + "data_collection_mode": {"key": "dataCollectionMode", "type": "str"}, + "data_id": {"key": "dataId", "type": "str"}, + "sampling_rate": {"key": "samplingRate", "type": "float"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword client_id: The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. @@ -7224,10 +6835,10 @@ def __init__( :paramtype sampling_rate: float """ super(Collection, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.data_collection_mode = kwargs.get('data_collection_mode', None) - self.data_id = kwargs.get('data_id', None) - self.sampling_rate = kwargs.get('sampling_rate', 1) + self.client_id = kwargs.get("client_id", None) + self.data_collection_mode = kwargs.get("data_collection_mode", None) + self.data_id = kwargs.get("data_id", None) + self.sampling_rate = kwargs.get("sampling_rate", 1) class ColumnTransformer(msrest.serialization.Model): @@ -7241,14 +6852,11 @@ class ColumnTransformer(msrest.serialization.Model): """ _attribute_map = { - 'fields': {'key': 'fields', 'type': '[str]'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, + "fields": {"key": "fields", "type": "[str]"}, + "parameters": {"key": "parameters", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword fields: Fields to apply transformer logic on. :paramtype fields: list[str] @@ -7257,8 +6865,8 @@ def __init__( :paramtype parameters: any """ super(ColumnTransformer, self).__init__(**kwargs) - self.fields = kwargs.get('fields', None) - self.parameters = kwargs.get('parameters', None) + self.fields = kwargs.get("fields", None) + self.parameters = kwargs.get("parameters", None) class CommandJob(JobBaseProperties): @@ -7336,46 +6944,43 @@ class CommandJob(JobBaseProperties): """ _validation = { - 'job_type': {'required': True}, - 'status': {'readonly': True}, - 'command': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'environment_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'parameters': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'compute_id': {'key': 'computeId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'experiment_name': {'key': 'experimentName', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'notification_setting': {'key': 'notificationSetting', 'type': 'NotificationSetting'}, - 'secrets_configuration': {'key': 'secretsConfiguration', 'type': '{SecretConfiguration}'}, - 'services': {'key': 'services', 'type': '{JobService}'}, - 'status': {'key': 'status', 'type': 'str'}, - 'autologger_settings': {'key': 'autologgerSettings', 'type': 'AutologgerSettings'}, - 'code_id': {'key': 'codeId', 'type': 'str'}, - 'command': {'key': 'command', 'type': 'str'}, - 'distribution': {'key': 'distribution', 'type': 'DistributionConfiguration'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, - 'limits': {'key': 'limits', 'type': 'CommandJobLimits'}, - 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, - 'parameters': {'key': 'parameters', 'type': 'object'}, - 'queue_settings': {'key': 'queueSettings', 'type': 'QueueSettings'}, - 'resources': {'key': 'resources', 'type': 'JobResourceConfiguration'}, - } - - def __init__( - self, - **kwargs - ): + "job_type": {"required": True}, + "status": {"readonly": True}, + "command": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "environment_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "parameters": {"readonly": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "component_id": {"key": "componentId", "type": "str"}, + "compute_id": {"key": "computeId", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "experiment_name": {"key": "experimentName", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityConfiguration"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "job_type": {"key": "jobType", "type": "str"}, + "notification_setting": {"key": "notificationSetting", "type": "NotificationSetting"}, + "secrets_configuration": {"key": "secretsConfiguration", "type": "{SecretConfiguration}"}, + "services": {"key": "services", "type": "{JobService}"}, + "status": {"key": "status", "type": "str"}, + "autologger_settings": {"key": "autologgerSettings", "type": "AutologgerSettings"}, + "code_id": {"key": "codeId", "type": "str"}, + "command": {"key": "command", "type": "str"}, + "distribution": {"key": "distribution", "type": "DistributionConfiguration"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "inputs": {"key": "inputs", "type": "{JobInput}"}, + "limits": {"key": "limits", "type": "CommandJobLimits"}, + "outputs": {"key": "outputs", "type": "{JobOutput}"}, + "parameters": {"key": "parameters", "type": "object"}, + "queue_settings": {"key": "queueSettings", "type": "QueueSettings"}, + "resources": {"key": "resources", "type": "JobResourceConfiguration"}, + } + + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -7434,19 +7039,19 @@ def __init__( :paramtype resources: ~azure.mgmt.machinelearningservices.models.JobResourceConfiguration """ super(CommandJob, self).__init__(**kwargs) - self.job_type = 'Command' # type: str - self.autologger_settings = kwargs.get('autologger_settings', None) - self.code_id = kwargs.get('code_id', None) - self.command = kwargs['command'] - self.distribution = kwargs.get('distribution', None) - self.environment_id = kwargs['environment_id'] - self.environment_variables = kwargs.get('environment_variables', None) - self.inputs = kwargs.get('inputs', None) - self.limits = kwargs.get('limits', None) - self.outputs = kwargs.get('outputs', None) + self.job_type = "Command" # type: str + self.autologger_settings = kwargs.get("autologger_settings", None) + self.code_id = kwargs.get("code_id", None) + self.command = kwargs["command"] + self.distribution = kwargs.get("distribution", None) + self.environment_id = kwargs["environment_id"] + self.environment_variables = kwargs.get("environment_variables", None) + self.inputs = kwargs.get("inputs", None) + self.limits = kwargs.get("limits", None) + self.outputs = kwargs.get("outputs", None) self.parameters = None - self.queue_settings = kwargs.get('queue_settings', None) - self.resources = kwargs.get('resources', None) + self.queue_settings = kwargs.get("queue_settings", None) + self.resources = kwargs.get("resources", None) class JobLimits(msrest.serialization.Model): @@ -7466,22 +7071,17 @@ class JobLimits(msrest.serialization.Model): """ _validation = { - 'job_limits_type': {'required': True}, + "job_limits_type": {"required": True}, } _attribute_map = { - 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, + "job_limits_type": {"key": "jobLimitsType", "type": "str"}, + "timeout": {"key": "timeout", "type": "duration"}, } - _subtype_map = { - 'job_limits_type': {'Command': 'CommandJobLimits', 'Sweep': 'SweepJobLimits'} - } + _subtype_map = {"job_limits_type": {"Command": "CommandJobLimits", "Sweep": "SweepJobLimits"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. @@ -7489,7 +7089,7 @@ def __init__( """ super(JobLimits, self).__init__(**kwargs) self.job_limits_type = None # type: Optional[str] - self.timeout = kwargs.get('timeout', None) + self.timeout = kwargs.get("timeout", None) class CommandJobLimits(JobLimits): @@ -7506,25 +7106,22 @@ class CommandJobLimits(JobLimits): """ _validation = { - 'job_limits_type': {'required': True}, + "job_limits_type": {"required": True}, } _attribute_map = { - 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, + "job_limits_type": {"key": "jobLimitsType", "type": "str"}, + "timeout": {"key": "timeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. :paramtype timeout: ~datetime.timedelta """ super(CommandJobLimits, self).__init__(**kwargs) - self.job_limits_type = 'Command' # type: str + self.job_limits_type = "Command" # type: str class ComponentConfiguration(msrest.serialization.Model): @@ -7535,19 +7132,16 @@ class ComponentConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'pipeline_settings': {'key': 'pipelineSettings', 'type': 'object'}, + "pipeline_settings": {"key": "pipelineSettings", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword pipeline_settings: Pipeline settings, for things like ContinueRunOnStepFailure etc. :paramtype pipeline_settings: any """ super(ComponentConfiguration, self).__init__(**kwargs) - self.pipeline_settings = kwargs.get('pipeline_settings', None) + self.pipeline_settings = kwargs.get("pipeline_settings", None) class ComponentContainer(ProxyResource): @@ -7573,81 +7167,75 @@ class ComponentContainer(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'ComponentContainerProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ComponentContainerProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComponentContainerProperties """ super(ComponentContainer, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class ComponentContainerProperties(AssetContainer): """Component container definition. -.. raw:: html + .. raw:: html - . + . - Variables are only populated by the server, and will be ignored when sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar description: The asset description text. - :vartype description: str - :ivar properties: The asset property dictionary. - :vartype properties: dict[str, str] - :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. - :vartype tags: dict[str, str] - :ivar is_archived: Is the asset archived?. - :vartype is_archived: bool - :ivar latest_version: The latest version inside this container. - :vartype latest_version: str - :ivar next_version: The next auto incremental version. - :vartype next_version: str - :ivar provisioning_state: Provisioning state for the component container. Possible values - include: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting". - :vartype provisioning_state: str or - ~azure.mgmt.machinelearningservices.models.AssetProvisioningState + :ivar description: The asset description text. + :vartype description: str + :ivar properties: The asset property dictionary. + :vartype properties: dict[str, str] + :ivar tags: A set of tags. Tag dictionary. Tags can be added, removed, and updated. + :vartype tags: dict[str, str] + :ivar is_archived: Is the asset archived?. + :vartype is_archived: bool + :ivar latest_version: The latest version inside this container. + :vartype latest_version: str + :ivar next_version: The next auto incremental version. + :vartype next_version: str + :ivar provisioning_state: Provisioning state for the component container. Possible values + include: "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting". + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.AssetProvisioningState """ _validation = { - 'latest_version': {'readonly': True}, - 'next_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "latest_version": {"readonly": True}, + "next_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'latest_version': {'key': 'latestVersion', 'type': 'str'}, - 'next_version': {'key': 'nextVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "latest_version": {"key": "latestVersion", "type": "str"}, + "next_version": {"key": "nextVersion", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -7673,14 +7261,11 @@ class ComponentContainerResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ComponentContainer]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[ComponentContainer]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of ComponentContainer objects. If null, there are no additional pages. @@ -7689,8 +7274,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComponentContainer] """ super(ComponentContainerResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class ComponentVersion(ProxyResource): @@ -7716,31 +7301,28 @@ class ComponentVersion(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'ComponentVersionProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ComponentVersionProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComponentVersionProperties """ super(ComponentVersion, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class ComponentVersionProperties(AssetBase): @@ -7780,25 +7362,22 @@ class ComponentVersionProperties(AssetBase): """ _validation = { - 'provisioning_state': {'readonly': True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'component_spec': {'key': 'componentSpec', 'type': 'object'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'stage': {'key': 'stage', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "component_spec": {"key": "componentSpec", "type": "object"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "stage": {"key": "stage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -7827,9 +7406,9 @@ def __init__( :paramtype stage: str """ super(ComponentVersionProperties, self).__init__(**kwargs) - self.component_spec = kwargs.get('component_spec', None) + self.component_spec = kwargs.get("component_spec", None) self.provisioning_state = None - self.stage = kwargs.get('stage', None) + self.stage = kwargs.get("stage", None) class ComponentVersionResourceArmPaginatedResult(msrest.serialization.Model): @@ -7843,14 +7422,11 @@ class ComponentVersionResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ComponentVersion]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[ComponentVersion]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of ComponentVersion objects. If null, there are no additional pages. @@ -7859,8 +7435,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComponentVersion] """ super(ComponentVersionResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class ComputeInstanceSchema(msrest.serialization.Model): @@ -7871,19 +7447,16 @@ class ComputeInstanceSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, + "properties": {"key": "properties", "type": "ComputeInstanceProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of ComputeInstance. :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties """ super(ComputeInstanceSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class ComputeInstance(Compute, ComputeInstanceSchema): @@ -7925,32 +7498,29 @@ class ComputeInstance(Compute, ComputeInstanceSchema): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "properties": {"key": "properties", "type": "ComputeInstanceProperties"}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of ComputeInstance. :paramtype properties: ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties @@ -7965,17 +7535,17 @@ def __init__( :paramtype disable_local_auth: bool """ super(ComputeInstance, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'ComputeInstance' # type: str - self.compute_location = kwargs.get('compute_location', None) + self.properties = kwargs.get("properties", None) + self.compute_type = "ComputeInstance" # type: str + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class ComputeInstanceApplication(msrest.serialization.Model): @@ -7988,14 +7558,11 @@ class ComputeInstanceApplication(msrest.serialization.Model): """ _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, + "display_name": {"key": "displayName", "type": "str"}, + "endpoint_uri": {"key": "endpointUri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword display_name: Name of the ComputeInstance application. :paramtype display_name: str @@ -8003,8 +7570,8 @@ def __init__( :paramtype endpoint_uri: str """ super(ComputeInstanceApplication, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.endpoint_uri = kwargs.get('endpoint_uri', None) + self.display_name = kwargs.get("display_name", None) + self.endpoint_uri = kwargs.get("endpoint_uri", None) class ComputeInstanceAutologgerSettings(msrest.serialization.Model): @@ -8016,13 +7583,10 @@ class ComputeInstanceAutologgerSettings(msrest.serialization.Model): """ _attribute_map = { - 'mlflow_autologger': {'key': 'mlflowAutologger', 'type': 'str'}, + "mlflow_autologger": {"key": "mlflowAutologger", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mlflow_autologger: Indicates whether mlflow autologger is enabled for notebooks. Possible values include: "Enabled", "Disabled". @@ -8030,7 +7594,7 @@ def __init__( ~azure.mgmt.machinelearningservices.models.MlflowAutologger """ super(ComputeInstanceAutologgerSettings, self).__init__(**kwargs) - self.mlflow_autologger = kwargs.get('mlflow_autologger', None) + self.mlflow_autologger = kwargs.get("mlflow_autologger", None) class ComputeInstanceConnectivityEndpoints(msrest.serialization.Model): @@ -8046,21 +7610,17 @@ class ComputeInstanceConnectivityEndpoints(msrest.serialization.Model): """ _validation = { - 'public_ip_address': {'readonly': True}, - 'private_ip_address': {'readonly': True}, + "public_ip_address": {"readonly": True}, + "private_ip_address": {"readonly": True}, } _attribute_map = { - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + "public_ip_address": {"key": "publicIpAddress", "type": "str"}, + "private_ip_address": {"key": "privateIpAddress", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs) self.public_ip_address = None self.private_ip_address = None @@ -8086,22 +7646,19 @@ class ComputeInstanceContainer(msrest.serialization.Model): """ _validation = { - 'services': {'readonly': True}, + "services": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'autosave': {'key': 'autosave', 'type': 'str'}, - 'gpu': {'key': 'gpu', 'type': 'str'}, - 'network': {'key': 'network', 'type': 'str'}, - 'environment': {'key': 'environment', 'type': 'ComputeInstanceEnvironmentInfo'}, - 'services': {'key': 'services', 'type': '[object]'}, + "name": {"key": "name", "type": "str"}, + "autosave": {"key": "autosave", "type": "str"}, + "gpu": {"key": "gpu", "type": "str"}, + "network": {"key": "network", "type": "str"}, + "environment": {"key": "environment", "type": "ComputeInstanceEnvironmentInfo"}, + "services": {"key": "services", "type": "[object]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Name of the ComputeInstance container. :paramtype name: str @@ -8116,11 +7673,11 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ComputeInstanceEnvironmentInfo """ super(ComputeInstanceContainer, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.autosave = kwargs.get('autosave', None) - self.gpu = kwargs.get('gpu', None) - self.network = kwargs.get('network', None) - self.environment = kwargs.get('environment', None) + self.name = kwargs.get("name", None) + self.autosave = kwargs.get("autosave", None) + self.gpu = kwargs.get("gpu", None) + self.network = kwargs.get("network", None) + self.environment = kwargs.get("environment", None) self.services = None @@ -8138,23 +7695,19 @@ class ComputeInstanceCreatedBy(msrest.serialization.Model): """ _validation = { - 'user_name': {'readonly': True}, - 'user_org_id': {'readonly': True}, - 'user_id': {'readonly': True}, + "user_name": {"readonly": True}, + "user_org_id": {"readonly": True}, + "user_id": {"readonly": True}, } _attribute_map = { - 'user_name': {'key': 'userName', 'type': 'str'}, - 'user_org_id': {'key': 'userOrgId', 'type': 'str'}, - 'user_id': {'key': 'userId', 'type': 'str'}, + "user_name": {"key": "userName", "type": "str"}, + "user_org_id": {"key": "userOrgId", "type": "str"}, + "user_id": {"key": "userId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ComputeInstanceCreatedBy, self).__init__(**kwargs) self.user_name = None self.user_org_id = None @@ -8179,16 +7732,13 @@ class ComputeInstanceDataDisk(msrest.serialization.Model): """ _attribute_map = { - 'caching': {'key': 'caching', 'type': 'str'}, - 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, - 'lun': {'key': 'lun', 'type': 'int'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + "caching": {"key": "caching", "type": "str"}, + "disk_size_gb": {"key": "diskSizeGB", "type": "int"}, + "lun": {"key": "lun", "type": "int"}, + "storage_account_type": {"key": "storageAccountType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword caching: Caching type of Data Disk. Possible values include: "None", "ReadOnly", "ReadWrite". @@ -8204,10 +7754,10 @@ def __init__( ~azure.mgmt.machinelearningservices.models.StorageAccountType """ super(ComputeInstanceDataDisk, self).__init__(**kwargs) - self.caching = kwargs.get('caching', None) - self.disk_size_gb = kwargs.get('disk_size_gb', None) - self.lun = kwargs.get('lun', None) - self.storage_account_type = kwargs.get('storage_account_type', "Standard_LRS") + self.caching = kwargs.get("caching", None) + self.disk_size_gb = kwargs.get("disk_size_gb", None) + self.lun = kwargs.get("lun", None) + self.storage_account_type = kwargs.get("storage_account_type", "Standard_LRS") class ComputeInstanceDataMount(msrest.serialization.Model): @@ -8237,22 +7787,19 @@ class ComputeInstanceDataMount(msrest.serialization.Model): """ _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'source_type': {'key': 'sourceType', 'type': 'str'}, - 'mount_name': {'key': 'mountName', 'type': 'str'}, - 'mount_action': {'key': 'mountAction', 'type': 'str'}, - 'mount_mode': {'key': 'mountMode', 'type': 'str'}, - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'mount_path': {'key': 'mountPath', 'type': 'str'}, - 'mount_state': {'key': 'mountState', 'type': 'str'}, - 'mounted_on': {'key': 'mountedOn', 'type': 'iso-8601'}, - 'error': {'key': 'error', 'type': 'str'}, + "source": {"key": "source", "type": "str"}, + "source_type": {"key": "sourceType", "type": "str"}, + "mount_name": {"key": "mountName", "type": "str"}, + "mount_action": {"key": "mountAction", "type": "str"}, + "mount_mode": {"key": "mountMode", "type": "str"}, + "created_by": {"key": "createdBy", "type": "str"}, + "mount_path": {"key": "mountPath", "type": "str"}, + "mount_state": {"key": "mountState", "type": "str"}, + "mounted_on": {"key": "mountedOn", "type": "iso-8601"}, + "error": {"key": "error", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword source: Source of the ComputeInstance data mount. :paramtype source: str @@ -8277,16 +7824,16 @@ def __init__( :paramtype error: str """ super(ComputeInstanceDataMount, self).__init__(**kwargs) - self.source = kwargs.get('source', None) - self.source_type = kwargs.get('source_type', None) - self.mount_name = kwargs.get('mount_name', None) - self.mount_action = kwargs.get('mount_action', None) - self.mount_mode = kwargs.get('mount_mode', None) - self.created_by = kwargs.get('created_by', None) - self.mount_path = kwargs.get('mount_path', None) - self.mount_state = kwargs.get('mount_state', None) - self.mounted_on = kwargs.get('mounted_on', None) - self.error = kwargs.get('error', None) + self.source = kwargs.get("source", None) + self.source_type = kwargs.get("source_type", None) + self.mount_name = kwargs.get("mount_name", None) + self.mount_action = kwargs.get("mount_action", None) + self.mount_mode = kwargs.get("mount_mode", None) + self.created_by = kwargs.get("created_by", None) + self.mount_path = kwargs.get("mount_path", None) + self.mount_state = kwargs.get("mount_state", None) + self.mounted_on = kwargs.get("mounted_on", None) + self.error = kwargs.get("error", None) class ComputeInstanceEnvironmentInfo(msrest.serialization.Model): @@ -8299,14 +7846,11 @@ class ComputeInstanceEnvironmentInfo(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "version": {"key": "version", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: name of environment. :paramtype name: str @@ -8314,8 +7858,8 @@ def __init__( :paramtype version: str """ super(ComputeInstanceEnvironmentInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.version = kwargs.get('version', None) + self.name = kwargs.get("name", None) + self.version = kwargs.get("version", None) class ComputeInstanceLastOperation(msrest.serialization.Model): @@ -8336,16 +7880,13 @@ class ComputeInstanceLastOperation(msrest.serialization.Model): """ _attribute_map = { - 'operation_name': {'key': 'operationName', 'type': 'str'}, - 'operation_time': {'key': 'operationTime', 'type': 'iso-8601'}, - 'operation_status': {'key': 'operationStatus', 'type': 'str'}, - 'operation_trigger': {'key': 'operationTrigger', 'type': 'str'}, + "operation_name": {"key": "operationName", "type": "str"}, + "operation_time": {"key": "operationTime", "type": "iso-8601"}, + "operation_status": {"key": "operationStatus", "type": "str"}, + "operation_trigger": {"key": "operationTrigger", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword operation_name: Name of the last operation. Possible values include: "Create", "Start", "Stop", "Restart", "Resize", "Reimage", "Delete". @@ -8362,10 +7903,10 @@ def __init__( ~azure.mgmt.machinelearningservices.models.OperationTrigger """ super(ComputeInstanceLastOperation, self).__init__(**kwargs) - self.operation_name = kwargs.get('operation_name', None) - self.operation_time = kwargs.get('operation_time', None) - self.operation_status = kwargs.get('operation_status', None) - self.operation_trigger = kwargs.get('operation_trigger', None) + self.operation_name = kwargs.get("operation_name", None) + self.operation_time = kwargs.get("operation_time", None) + self.operation_status = kwargs.get("operation_status", None) + self.operation_trigger = kwargs.get("operation_trigger", None) class ComputeInstanceProperties(msrest.serialization.Model): @@ -8454,54 +7995,53 @@ class ComputeInstanceProperties(msrest.serialization.Model): """ _validation = { - 'os_image_metadata': {'readonly': True}, - 'connectivity_endpoints': {'readonly': True}, - 'applications': {'readonly': True}, - 'created_by': {'readonly': True}, - 'errors': {'readonly': True}, - 'state': {'readonly': True}, - 'last_operation': {'readonly': True}, - 'containers': {'readonly': True}, - 'data_disks': {'readonly': True}, - 'data_mounts': {'readonly': True}, - 'versions': {'readonly': True}, - } - - _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, - 'application_sharing_policy': {'key': 'applicationSharingPolicy', 'type': 'str'}, - 'autologger_settings': {'key': 'autologgerSettings', 'type': 'ComputeInstanceAutologgerSettings'}, - 'ssh_settings': {'key': 'sshSettings', 'type': 'ComputeInstanceSshSettings'}, - 'custom_services': {'key': 'customServices', 'type': '[CustomService]'}, - 'os_image_metadata': {'key': 'osImageMetadata', 'type': 'ImageMetadata'}, - 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': 'ComputeInstanceConnectivityEndpoints'}, - 'applications': {'key': 'applications', 'type': '[ComputeInstanceApplication]'}, - 'created_by': {'key': 'createdBy', 'type': 'ComputeInstanceCreatedBy'}, - 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, - 'state': {'key': 'state', 'type': 'str'}, - 'compute_instance_authorization_type': {'key': 'computeInstanceAuthorizationType', 'type': 'str'}, - 'enable_os_patching': {'key': 'enableOSPatching', 'type': 'bool'}, - 'enable_root_access': {'key': 'enableRootAccess', 'type': 'bool'}, - 'enable_sso': {'key': 'enableSSO', 'type': 'bool'}, - 'release_quota_on_stop': {'key': 'releaseQuotaOnStop', 'type': 'bool'}, - 'personal_compute_instance_settings': {'key': 'personalComputeInstanceSettings', - 'type': 'PersonalComputeInstanceSettings'}, - 'setup_scripts': {'key': 'setupScripts', 'type': 'SetupScripts'}, - 'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'}, - 'schedules': {'key': 'schedules', 'type': 'ComputeSchedules'}, - 'idle_time_before_shutdown': {'key': 'idleTimeBeforeShutdown', 'type': 'str'}, - 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, - 'containers': {'key': 'containers', 'type': '[ComputeInstanceContainer]'}, - 'data_disks': {'key': 'dataDisks', 'type': '[ComputeInstanceDataDisk]'}, - 'data_mounts': {'key': 'dataMounts', 'type': '[ComputeInstanceDataMount]'}, - 'versions': {'key': 'versions', 'type': 'ComputeInstanceVersion'}, - } - - def __init__( - self, - **kwargs - ): + "os_image_metadata": {"readonly": True}, + "connectivity_endpoints": {"readonly": True}, + "applications": {"readonly": True}, + "created_by": {"readonly": True}, + "errors": {"readonly": True}, + "state": {"readonly": True}, + "last_operation": {"readonly": True}, + "containers": {"readonly": True}, + "data_disks": {"readonly": True}, + "data_mounts": {"readonly": True}, + "versions": {"readonly": True}, + } + + _attribute_map = { + "vm_size": {"key": "vmSize", "type": "str"}, + "subnet": {"key": "subnet", "type": "ResourceId"}, + "application_sharing_policy": {"key": "applicationSharingPolicy", "type": "str"}, + "autologger_settings": {"key": "autologgerSettings", "type": "ComputeInstanceAutologgerSettings"}, + "ssh_settings": {"key": "sshSettings", "type": "ComputeInstanceSshSettings"}, + "custom_services": {"key": "customServices", "type": "[CustomService]"}, + "os_image_metadata": {"key": "osImageMetadata", "type": "ImageMetadata"}, + "connectivity_endpoints": {"key": "connectivityEndpoints", "type": "ComputeInstanceConnectivityEndpoints"}, + "applications": {"key": "applications", "type": "[ComputeInstanceApplication]"}, + "created_by": {"key": "createdBy", "type": "ComputeInstanceCreatedBy"}, + "errors": {"key": "errors", "type": "[ErrorResponse]"}, + "state": {"key": "state", "type": "str"}, + "compute_instance_authorization_type": {"key": "computeInstanceAuthorizationType", "type": "str"}, + "enable_os_patching": {"key": "enableOSPatching", "type": "bool"}, + "enable_root_access": {"key": "enableRootAccess", "type": "bool"}, + "enable_sso": {"key": "enableSSO", "type": "bool"}, + "release_quota_on_stop": {"key": "releaseQuotaOnStop", "type": "bool"}, + "personal_compute_instance_settings": { + "key": "personalComputeInstanceSettings", + "type": "PersonalComputeInstanceSettings", + }, + "setup_scripts": {"key": "setupScripts", "type": "SetupScripts"}, + "last_operation": {"key": "lastOperation", "type": "ComputeInstanceLastOperation"}, + "schedules": {"key": "schedules", "type": "ComputeSchedules"}, + "idle_time_before_shutdown": {"key": "idleTimeBeforeShutdown", "type": "str"}, + "enable_node_public_ip": {"key": "enableNodePublicIp", "type": "bool"}, + "containers": {"key": "containers", "type": "[ComputeInstanceContainer]"}, + "data_disks": {"key": "dataDisks", "type": "[ComputeInstanceDataDisk]"}, + "data_mounts": {"key": "dataMounts", "type": "[ComputeInstanceDataMount]"}, + "versions": {"key": "versions", "type": "ComputeInstanceVersion"}, + } + + def __init__(self, **kwargs): """ :keyword vm_size: Virtual Machine Size. :paramtype vm_size: str @@ -8553,29 +8093,29 @@ def __init__( :paramtype enable_node_public_ip: bool """ super(ComputeInstanceProperties, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) - self.subnet = kwargs.get('subnet', None) - self.application_sharing_policy = kwargs.get('application_sharing_policy', "Shared") - self.autologger_settings = kwargs.get('autologger_settings', None) - self.ssh_settings = kwargs.get('ssh_settings', None) - self.custom_services = kwargs.get('custom_services', None) + self.vm_size = kwargs.get("vm_size", None) + self.subnet = kwargs.get("subnet", None) + self.application_sharing_policy = kwargs.get("application_sharing_policy", "Shared") + self.autologger_settings = kwargs.get("autologger_settings", None) + self.ssh_settings = kwargs.get("ssh_settings", None) + self.custom_services = kwargs.get("custom_services", None) self.os_image_metadata = None self.connectivity_endpoints = None self.applications = None self.created_by = None self.errors = None self.state = None - self.compute_instance_authorization_type = kwargs.get('compute_instance_authorization_type', "personal") - self.enable_os_patching = kwargs.get('enable_os_patching', False) - self.enable_root_access = kwargs.get('enable_root_access', True) - self.enable_sso = kwargs.get('enable_sso', True) - self.release_quota_on_stop = kwargs.get('release_quota_on_stop', False) - self.personal_compute_instance_settings = kwargs.get('personal_compute_instance_settings', None) - self.setup_scripts = kwargs.get('setup_scripts', None) + self.compute_instance_authorization_type = kwargs.get("compute_instance_authorization_type", "personal") + self.enable_os_patching = kwargs.get("enable_os_patching", False) + self.enable_root_access = kwargs.get("enable_root_access", True) + self.enable_sso = kwargs.get("enable_sso", True) + self.release_quota_on_stop = kwargs.get("release_quota_on_stop", False) + self.personal_compute_instance_settings = kwargs.get("personal_compute_instance_settings", None) + self.setup_scripts = kwargs.get("setup_scripts", None) self.last_operation = None - self.schedules = kwargs.get('schedules', None) - self.idle_time_before_shutdown = kwargs.get('idle_time_before_shutdown', None) - self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) + self.schedules = kwargs.get("schedules", None) + self.idle_time_before_shutdown = kwargs.get("idle_time_before_shutdown", None) + self.enable_node_public_ip = kwargs.get("enable_node_public_ip", None) self.containers = None self.data_disks = None self.data_mounts = None @@ -8602,21 +8142,18 @@ class ComputeInstanceSshSettings(msrest.serialization.Model): """ _validation = { - 'admin_user_name': {'readonly': True}, - 'ssh_port': {'readonly': True}, + "admin_user_name": {"readonly": True}, + "ssh_port": {"readonly": True}, } _attribute_map = { - 'ssh_public_access': {'key': 'sshPublicAccess', 'type': 'str'}, - 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, - 'ssh_port': {'key': 'sshPort', 'type': 'int'}, - 'admin_public_key': {'key': 'adminPublicKey', 'type': 'str'}, + "ssh_public_access": {"key": "sshPublicAccess", "type": "str"}, + "admin_user_name": {"key": "adminUserName", "type": "str"}, + "ssh_port": {"key": "sshPort", "type": "int"}, + "admin_public_key": {"key": "adminPublicKey", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword ssh_public_access: State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the @@ -8628,10 +8165,10 @@ def __init__( :paramtype admin_public_key: str """ super(ComputeInstanceSshSettings, self).__init__(**kwargs) - self.ssh_public_access = kwargs.get('ssh_public_access', "Disabled") + self.ssh_public_access = kwargs.get("ssh_public_access", "Disabled") self.admin_user_name = None self.ssh_port = None - self.admin_public_key = kwargs.get('admin_public_key', None) + self.admin_public_key = kwargs.get("admin_public_key", None) class ComputeInstanceVersion(msrest.serialization.Model): @@ -8642,19 +8179,16 @@ class ComputeInstanceVersion(msrest.serialization.Model): """ _attribute_map = { - 'runtime': {'key': 'runtime', 'type': 'str'}, + "runtime": {"key": "runtime", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword runtime: Runtime of compute instance. :paramtype runtime: str """ super(ComputeInstanceVersion, self).__init__(**kwargs) - self.runtime = kwargs.get('runtime', None) + self.runtime = kwargs.get("runtime", None) class ComputeRecurrenceSchedule(msrest.serialization.Model): @@ -8673,21 +8207,18 @@ class ComputeRecurrenceSchedule(msrest.serialization.Model): """ _validation = { - 'hours': {'required': True}, - 'minutes': {'required': True}, + "hours": {"required": True}, + "minutes": {"required": True}, } _attribute_map = { - 'hours': {'key': 'hours', 'type': '[int]'}, - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[str]'}, + "hours": {"key": "hours", "type": "[int]"}, + "minutes": {"key": "minutes", "type": "[int]"}, + "month_days": {"key": "monthDays", "type": "[int]"}, + "week_days": {"key": "weekDays", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword hours: Required. [Required] List of hours for the schedule. :paramtype hours: list[int] @@ -8699,10 +8230,10 @@ def __init__( :paramtype week_days: list[str or ~azure.mgmt.machinelearningservices.models.ComputeWeekDay] """ super(ComputeRecurrenceSchedule, self).__init__(**kwargs) - self.hours = kwargs['hours'] - self.minutes = kwargs['minutes'] - self.month_days = kwargs.get('month_days', None) - self.week_days = kwargs.get('week_days', None) + self.hours = kwargs["hours"] + self.minutes = kwargs["minutes"] + self.month_days = kwargs.get("month_days", None) + self.week_days = kwargs.get("week_days", None) class ComputeResourceSchema(msrest.serialization.Model): @@ -8713,19 +8244,16 @@ class ComputeResourceSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'Compute'}, + "properties": {"key": "properties", "type": "Compute"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Compute properties. :paramtype properties: ~azure.mgmt.machinelearningservices.models.Compute """ super(ComputeResourceSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class ComputeResource(Resource, ComputeResourceSchema): @@ -8757,28 +8285,25 @@ class ComputeResource(Resource, ComputeResourceSchema): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'Compute'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "properties": {"key": "properties", "type": "Compute"}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "location": {"key": "location", "type": "str"}, + "tags": {"key": "tags", "type": "{str}"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Compute properties. :paramtype properties: ~azure.mgmt.machinelearningservices.models.Compute @@ -8792,11 +8317,11 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(ComputeResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.identity = kwargs.get('identity', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) + self.properties = kwargs.get("properties", None) + self.identity = kwargs.get("identity", None) + self.location = kwargs.get("location", None) + self.tags = kwargs.get("tags", None) + self.sku = kwargs.get("sku", None) self.id = None self.name = None self.type = None @@ -8811,19 +8336,16 @@ class ComputeRuntimeDto(msrest.serialization.Model): """ _attribute_map = { - 'spark_runtime_version': {'key': 'sparkRuntimeVersion', 'type': 'str'}, + "spark_runtime_version": {"key": "sparkRuntimeVersion", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword spark_runtime_version: :paramtype spark_runtime_version: str """ super(ComputeRuntimeDto, self).__init__(**kwargs) - self.spark_runtime_version = kwargs.get('spark_runtime_version', None) + self.spark_runtime_version = kwargs.get("spark_runtime_version", None) class ComputeSchedules(msrest.serialization.Model): @@ -8835,20 +8357,17 @@ class ComputeSchedules(msrest.serialization.Model): """ _attribute_map = { - 'compute_start_stop': {'key': 'computeStartStop', 'type': '[ComputeStartStopSchedule]'}, + "compute_start_stop": {"key": "computeStartStop", "type": "[ComputeStartStopSchedule]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword compute_start_stop: The list of compute start stop schedules to be applied. :paramtype compute_start_stop: list[~azure.mgmt.machinelearningservices.models.ComputeStartStopSchedule] """ super(ComputeSchedules, self).__init__(**kwargs) - self.compute_start_stop = kwargs.get('compute_start_stop', None) + self.compute_start_stop = kwargs.get("compute_start_stop", None) class ComputeStartStopSchedule(msrest.serialization.Model): @@ -8879,25 +8398,22 @@ class ComputeStartStopSchedule(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'provisioning_status': {'readonly': True}, + "id": {"readonly": True}, + "provisioning_status": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_status': {'key': 'provisioningStatus', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - 'trigger_type': {'key': 'triggerType', 'type': 'str'}, - 'recurrence': {'key': 'recurrence', 'type': 'Recurrence'}, - 'cron': {'key': 'cron', 'type': 'Cron'}, - 'schedule': {'key': 'schedule', 'type': 'ScheduleBase'}, + "id": {"key": "id", "type": "str"}, + "provisioning_status": {"key": "provisioningStatus", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "action": {"key": "action", "type": "str"}, + "trigger_type": {"key": "triggerType", "type": "str"}, + "recurrence": {"key": "recurrence", "type": "Recurrence"}, + "cron": {"key": "cron", "type": "Cron"}, + "schedule": {"key": "schedule", "type": "ScheduleBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword status: Is the schedule enabled or disabled?. Possible values include: "Enabled", "Disabled". @@ -8917,12 +8433,12 @@ def __init__( super(ComputeStartStopSchedule, self).__init__(**kwargs) self.id = None self.provisioning_status = None - self.status = kwargs.get('status', None) - self.action = kwargs.get('action', None) - self.trigger_type = kwargs.get('trigger_type', None) - self.recurrence = kwargs.get('recurrence', None) - self.cron = kwargs.get('cron', None) - self.schedule = kwargs.get('schedule', None) + self.status = kwargs.get("status", None) + self.action = kwargs.get("action", None) + self.trigger_type = kwargs.get("trigger_type", None) + self.recurrence = kwargs.get("recurrence", None) + self.cron = kwargs.get("cron", None) + self.schedule = kwargs.get("schedule", None) class ContainerResourceRequirements(msrest.serialization.Model): @@ -8937,14 +8453,11 @@ class ContainerResourceRequirements(msrest.serialization.Model): """ _attribute_map = { - 'container_resource_limits': {'key': 'containerResourceLimits', 'type': 'ContainerResourceSettings'}, - 'container_resource_requests': {'key': 'containerResourceRequests', 'type': 'ContainerResourceSettings'}, + "container_resource_limits": {"key": "containerResourceLimits", "type": "ContainerResourceSettings"}, + "container_resource_requests": {"key": "containerResourceRequests", "type": "ContainerResourceSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword container_resource_limits: Container resource limit info:. :paramtype container_resource_limits: @@ -8954,8 +8467,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ContainerResourceSettings """ super(ContainerResourceRequirements, self).__init__(**kwargs) - self.container_resource_limits = kwargs.get('container_resource_limits', None) - self.container_resource_requests = kwargs.get('container_resource_requests', None) + self.container_resource_limits = kwargs.get("container_resource_limits", None) + self.container_resource_requests = kwargs.get("container_resource_requests", None) class ContainerResourceSettings(msrest.serialization.Model): @@ -8973,15 +8486,12 @@ class ContainerResourceSettings(msrest.serialization.Model): """ _attribute_map = { - 'cpu': {'key': 'cpu', 'type': 'str'}, - 'gpu': {'key': 'gpu', 'type': 'str'}, - 'memory': {'key': 'memory', 'type': 'str'}, + "cpu": {"key": "cpu", "type": "str"}, + "gpu": {"key": "gpu", "type": "str"}, + "memory": {"key": "memory", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword cpu: Number of vCPUs request/limit for container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. @@ -8994,9 +8504,9 @@ def __init__( :paramtype memory: str """ super(ContainerResourceSettings, self).__init__(**kwargs) - self.cpu = kwargs.get('cpu', None) - self.gpu = kwargs.get('gpu', None) - self.memory = kwargs.get('memory', None) + self.cpu = kwargs.get("cpu", None) + self.gpu = kwargs.get("gpu", None) + self.memory = kwargs.get("memory", None) class EndpointDeploymentResourceProperties(msrest.serialization.Model): @@ -9020,39 +8530,39 @@ class EndpointDeploymentResourceProperties(msrest.serialization.Model): """ _validation = { - 'provisioning_state': {'readonly': True}, - 'type': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9._]'}, + "provisioning_state": {"readonly": True}, + "type": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9._]"}, } _attribute_map = { - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "type": {"key": "type", "type": "str"}, } _subtype_map = { - 'type': {'Azure.ContentSafety': 'ContentSafetyEndpointDeploymentResourceProperties', - 'Azure.OpenAI': 'OpenAIEndpointDeploymentResourceProperties', - 'Azure.Speech': 'SpeechEndpointDeploymentResourceProperties', - 'managedOnlineEndpoint': 'ManagedOnlineEndpointDeploymentResourceProperties'} + "type": { + "Azure.ContentSafety": "ContentSafetyEndpointDeploymentResourceProperties", + "Azure.OpenAI": "OpenAIEndpointDeploymentResourceProperties", + "Azure.Speech": "SpeechEndpointDeploymentResourceProperties", + "managedOnlineEndpoint": "ManagedOnlineEndpointDeploymentResourceProperties", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword failure_reason: The failure reason if the creation failed. :paramtype failure_reason: str """ super(EndpointDeploymentResourceProperties, self).__init__(**kwargs) - self.failure_reason = kwargs.get('failure_reason', None) + self.failure_reason = kwargs.get("failure_reason", None) self.provisioning_state = None self.type = None # type: Optional[str] -class ContentSafetyEndpointDeploymentResourceProperties(EndpointDeploymentResourceProperties, - CognitiveServiceEndpointDeploymentResourceProperties): +class ContentSafetyEndpointDeploymentResourceProperties( + EndpointDeploymentResourceProperties, CognitiveServiceEndpointDeploymentResourceProperties +): """ContentSafetyEndpointDeploymentResourceProperties. Variables are only populated by the server, and will be ignored when sending a request. @@ -9080,25 +8590,22 @@ class ContentSafetyEndpointDeploymentResourceProperties(EndpointDeploymentResour """ _validation = { - 'model': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'type': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9._]'}, + "model": {"required": True}, + "provisioning_state": {"readonly": True}, + "type": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9._]"}, } _attribute_map = { - 'model': {'key': 'model', 'type': 'EndpointDeploymentModel'}, - 'rai_policy_name': {'key': 'raiPolicyName', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'CognitiveServicesSku'}, - 'version_upgrade_option': {'key': 'versionUpgradeOption', 'type': 'str'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "model": {"key": "model", "type": "EndpointDeploymentModel"}, + "rai_policy_name": {"key": "raiPolicyName", "type": "str"}, + "sku": {"key": "sku", "type": "CognitiveServicesSku"}, + "version_upgrade_option": {"key": "versionUpgradeOption", "type": "str"}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model: Required. Model used for the endpoint deployment. :paramtype model: ~azure.mgmt.machinelearningservices.models.EndpointDeploymentModel @@ -9114,12 +8621,12 @@ def __init__( :paramtype failure_reason: str """ super(ContentSafetyEndpointDeploymentResourceProperties, self).__init__(**kwargs) - self.model = kwargs['model'] - self.rai_policy_name = kwargs.get('rai_policy_name', None) - self.sku = kwargs.get('sku', None) - self.version_upgrade_option = kwargs.get('version_upgrade_option', None) - self.type = 'Azure.ContentSafety' # type: str - self.failure_reason = kwargs.get('failure_reason', None) + self.model = kwargs["model"] + self.rai_policy_name = kwargs.get("rai_policy_name", None) + self.sku = kwargs.get("sku", None) + self.version_upgrade_option = kwargs.get("version_upgrade_option", None) + self.type = "Azure.ContentSafety" # type: str + self.failure_reason = kwargs.get("failure_reason", None) self.provisioning_state = None @@ -9153,30 +8660,29 @@ class EndpointResourceProperties(msrest.serialization.Model): """ _validation = { - 'endpoint_type': {'required': True}, - 'provisioning_state': {'readonly': True}, + "endpoint_type": {"required": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'associated_resource_id': {'key': 'associatedResourceId', 'type': 'str'}, - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "associated_resource_id": {"key": "associatedResourceId", "type": "str"}, + "endpoint_type": {"key": "endpointType", "type": "str"}, + "endpoint_uri": {"key": "endpointUri", "type": "str"}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } _subtype_map = { - 'endpoint_type': {'Azure.ContentSafety': 'ContentSafetyEndpointResourceProperties', - 'Azure.OpenAI': 'OpenAIEndpointResourceProperties', - 'Azure.Speech': 'SpeechEndpointResourceProperties', - 'managedOnlineEndpoint': 'ManagedOnlineEndpointResourceProperties'} + "endpoint_type": { + "Azure.ContentSafety": "ContentSafetyEndpointResourceProperties", + "Azure.OpenAI": "OpenAIEndpointResourceProperties", + "Azure.Speech": "SpeechEndpointResourceProperties", + "managedOnlineEndpoint": "ManagedOnlineEndpointResourceProperties", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword associated_resource_id: Byo resource id for creating the built-in model service endpoints. @@ -9189,11 +8695,11 @@ def __init__( :paramtype name: str """ super(EndpointResourceProperties, self).__init__(**kwargs) - self.associated_resource_id = kwargs.get('associated_resource_id', None) + self.associated_resource_id = kwargs.get("associated_resource_id", None) self.endpoint_type = None # type: Optional[str] - self.endpoint_uri = kwargs.get('endpoint_uri', None) - self.failure_reason = kwargs.get('failure_reason', None) - self.name = kwargs.get('name', None) + self.endpoint_uri = kwargs.get("endpoint_uri", None) + self.failure_reason = kwargs.get("failure_reason", None) + self.name = kwargs.get("name", None) self.provisioning_state = None @@ -9224,23 +8730,20 @@ class ContentSafetyEndpointResourceProperties(EndpointResourceProperties): """ _validation = { - 'endpoint_type': {'required': True}, - 'provisioning_state': {'readonly': True}, + "endpoint_type": {"required": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'associated_resource_id': {'key': 'associatedResourceId', 'type': 'str'}, - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "associated_resource_id": {"key": "associatedResourceId", "type": "str"}, + "endpoint_type": {"key": "endpointType", "type": "str"}, + "endpoint_uri": {"key": "endpointUri", "type": "str"}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword associated_resource_id: Byo resource id for creating the built-in model service endpoints. @@ -9253,7 +8756,7 @@ def __init__( :paramtype name: str """ super(ContentSafetyEndpointResourceProperties, self).__init__(**kwargs) - self.endpoint_type = 'Azure.ContentSafety' # type: str + self.endpoint_type = "Azure.ContentSafety" # type: str class CosmosDbSettings(msrest.serialization.Model): @@ -9264,19 +8767,16 @@ class CosmosDbSettings(msrest.serialization.Model): """ _attribute_map = { - 'collections_throughput': {'key': 'collectionsThroughput', 'type': 'int'}, + "collections_throughput": {"key": "collectionsThroughput", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword collections_throughput: :paramtype collections_throughput: int """ super(CosmosDbSettings, self).__init__(**kwargs) - self.collections_throughput = kwargs.get('collections_throughput', None) + self.collections_throughput = kwargs.get("collections_throughput", None) class ScheduleActionBase(msrest.serialization.Model): @@ -9294,24 +8794,24 @@ class ScheduleActionBase(msrest.serialization.Model): """ _validation = { - 'action_type': {'required': True}, + "action_type": {"required": True}, } _attribute_map = { - 'action_type': {'key': 'actionType', 'type': 'str'}, + "action_type": {"key": "actionType", "type": "str"}, } _subtype_map = { - 'action_type': {'CreateJob': 'JobScheduleAction', 'CreateMonitor': 'CreateMonitorAction', - 'ImportData': 'ImportDataAction', 'InvokeBatchEndpoint': 'EndpointScheduleAction'} + "action_type": { + "CreateJob": "JobScheduleAction", + "CreateMonitor": "CreateMonitorAction", + "ImportData": "ImportDataAction", + "InvokeBatchEndpoint": "EndpointScheduleAction", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ScheduleActionBase, self).__init__(**kwargs) self.action_type = None # type: Optional[str] @@ -9330,26 +8830,23 @@ class CreateMonitorAction(ScheduleActionBase): """ _validation = { - 'action_type': {'required': True}, - 'monitor_definition': {'required': True}, + "action_type": {"required": True}, + "monitor_definition": {"required": True}, } _attribute_map = { - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'monitor_definition': {'key': 'monitorDefinition', 'type': 'MonitorDefinition'}, + "action_type": {"key": "actionType", "type": "str"}, + "monitor_definition": {"key": "monitorDefinition", "type": "MonitorDefinition"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword monitor_definition: Required. [Required] Defines the monitor. :paramtype monitor_definition: ~azure.mgmt.machinelearningservices.models.MonitorDefinition """ super(CreateMonitorAction, self).__init__(**kwargs) - self.action_type = 'CreateMonitor' # type: str - self.monitor_definition = kwargs['monitor_definition'] + self.action_type = "CreateMonitor" # type: str + self.monitor_definition = kwargs["monitor_definition"] class Cron(msrest.serialization.Model): @@ -9367,15 +8864,12 @@ class Cron(msrest.serialization.Model): """ _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'expression': {'key': 'expression', 'type': 'str'}, + "start_time": {"key": "startTime", "type": "str"}, + "time_zone": {"key": "timeZone", "type": "str"}, + "expression": {"key": "expression", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword start_time: The start time in yyyy-MM-ddTHH:mm:ss format. :paramtype start_time: str @@ -9388,9 +8882,9 @@ def __init__( :paramtype expression: str """ super(Cron, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.time_zone = kwargs.get('time_zone', "UTC") - self.expression = kwargs.get('expression', None) + self.start_time = kwargs.get("start_time", None) + self.time_zone = kwargs.get("time_zone", "UTC") + self.expression = kwargs.get("expression", None) class TriggerBase(msrest.serialization.Model): @@ -9419,24 +8913,19 @@ class TriggerBase(msrest.serialization.Model): """ _validation = { - 'trigger_type': {'required': True}, + "trigger_type": {"required": True}, } _attribute_map = { - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'trigger_type': {'key': 'triggerType', 'type': 'str'}, + "end_time": {"key": "endTime", "type": "str"}, + "start_time": {"key": "startTime", "type": "str"}, + "time_zone": {"key": "timeZone", "type": "str"}, + "trigger_type": {"key": "triggerType", "type": "str"}, } - _subtype_map = { - 'trigger_type': {'Cron': 'CronTrigger', 'Recurrence': 'RecurrenceTrigger'} - } + _subtype_map = {"trigger_type": {"Cron": "CronTrigger", "Recurrence": "RecurrenceTrigger"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword end_time: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. @@ -9452,9 +8941,9 @@ def __init__( :paramtype time_zone: str """ super(TriggerBase, self).__init__(**kwargs) - self.end_time = kwargs.get('end_time', None) - self.start_time = kwargs.get('start_time', None) - self.time_zone = kwargs.get('time_zone', "UTC") + self.end_time = kwargs.get("end_time", None) + self.start_time = kwargs.get("start_time", None) + self.time_zone = kwargs.get("time_zone", "UTC") self.trigger_type = None # type: Optional[str] @@ -9484,22 +8973,19 @@ class CronTrigger(TriggerBase): """ _validation = { - 'trigger_type': {'required': True}, - 'expression': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "trigger_type": {"required": True}, + "expression": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'trigger_type': {'key': 'triggerType', 'type': 'str'}, - 'expression': {'key': 'expression', 'type': 'str'}, + "end_time": {"key": "endTime", "type": "str"}, + "start_time": {"key": "startTime", "type": "str"}, + "time_zone": {"key": "timeZone", "type": "str"}, + "trigger_type": {"key": "triggerType", "type": "str"}, + "expression": {"key": "expression", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword end_time: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. @@ -9518,8 +9004,8 @@ def __init__( :paramtype expression: str """ super(CronTrigger, self).__init__(**kwargs) - self.trigger_type = 'Cron' # type: str - self.expression = kwargs['expression'] + self.trigger_type = "Cron" # type: str + self.expression = kwargs["expression"] class CsvExportSummary(ExportSummary): @@ -9547,33 +9033,29 @@ class CsvExportSummary(ExportSummary): """ _validation = { - 'end_date_time': {'readonly': True}, - 'exported_row_count': {'readonly': True}, - 'format': {'required': True}, - 'labeling_job_id': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'container_name': {'readonly': True}, - 'snapshot_path': {'readonly': True}, + "end_date_time": {"readonly": True}, + "exported_row_count": {"readonly": True}, + "format": {"required": True}, + "labeling_job_id": {"readonly": True}, + "start_date_time": {"readonly": True}, + "container_name": {"readonly": True}, + "snapshot_path": {"readonly": True}, } _attribute_map = { - 'end_date_time': {'key': 'endDateTime', 'type': 'iso-8601'}, - 'exported_row_count': {'key': 'exportedRowCount', 'type': 'long'}, - 'format': {'key': 'format', 'type': 'str'}, - 'labeling_job_id': {'key': 'labelingJobId', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'container_name': {'key': 'containerName', 'type': 'str'}, - 'snapshot_path': {'key': 'snapshotPath', 'type': 'str'}, + "end_date_time": {"key": "endDateTime", "type": "iso-8601"}, + "exported_row_count": {"key": "exportedRowCount", "type": "long"}, + "format": {"key": "format", "type": "str"}, + "labeling_job_id": {"key": "labelingJobId", "type": "str"}, + "start_date_time": {"key": "startDateTime", "type": "iso-8601"}, + "container_name": {"key": "containerName", "type": "str"}, + "snapshot_path": {"key": "snapshotPath", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(CsvExportSummary, self).__init__(**kwargs) - self.format = 'CSV' # type: str + self.format = "CSV" # type: str self.container_name = None self.snapshot_path = None @@ -9591,26 +9073,23 @@ class CustomForecastHorizon(ForecastHorizon): """ _validation = { - 'mode': {'required': True}, - 'value': {'required': True}, + "mode": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, + "mode": {"key": "mode", "type": "str"}, + "value": {"key": "value", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: Required. [Required] Forecast horizon value. :paramtype value: int """ super(CustomForecastHorizon, self).__init__(**kwargs) - self.mode = 'Custom' # type: str - self.value = kwargs['value'] + self.mode = "Custom" # type: str + self.value = kwargs["value"] class CustomInferencingServer(InferencingServer): @@ -9627,26 +9106,23 @@ class CustomInferencingServer(InferencingServer): """ _validation = { - 'server_type': {'required': True}, + "server_type": {"required": True}, } _attribute_map = { - 'server_type': {'key': 'serverType', 'type': 'str'}, - 'inference_configuration': {'key': 'inferenceConfiguration', 'type': 'OnlineInferenceConfiguration'}, + "server_type": {"key": "serverType", "type": "str"}, + "inference_configuration": {"key": "inferenceConfiguration", "type": "OnlineInferenceConfiguration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword inference_configuration: Inference configuration for custom inferencing. :paramtype inference_configuration: ~azure.mgmt.machinelearningservices.models.OnlineInferenceConfiguration """ super(CustomInferencingServer, self).__init__(**kwargs) - self.server_type = 'Custom' # type: str - self.inference_configuration = kwargs.get('inference_configuration', None) + self.server_type = "Custom" # type: str + self.inference_configuration = kwargs.get("inference_configuration", None) class CustomKeys(msrest.serialization.Model): @@ -9657,96 +9133,90 @@ class CustomKeys(msrest.serialization.Model): """ _attribute_map = { - 'keys': {'key': 'keys', 'type': '{str}'}, + "keys": {"key": "keys", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword keys: Dictionary of :code:``. :paramtype keys: dict[str, str] """ super(CustomKeys, self).__init__(**kwargs) - self.keys = kwargs.get('keys', None) + self.keys = kwargs.get("keys", None) class CustomKeysWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): """Category:= CustomKeys -AuthType:= CustomKeys (as type discriminator) -Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys -Target:= {any value} -Use Metadata property bag for ApiVersion and other metadata fields. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar auth_type: Required. Authentication type of the connection target.Constant filled by - server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS", - "AccountKey", "ServicePrincipal", "AccessKey", "ApiKey", "CustomKeys", "OAuth2", "AAD". - :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType - :ivar category: Category of the connection. Possible values include: "PythonFeed", - "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", - "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2", "Redis", "ApiKey", "AzureOpenAI", - "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureOneLake", "CosmosDb", - "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb", "AzureDatabricksDeltaLake", - "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle", "AmazonRdsForSqlServer", - "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum", "Hbase", "Hive", "Impala", - "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza", "Oracle", "Phoenix", - "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable", "Spark", "SqlServer", - "Sybase", "Teradata", "Vertica", "Cassandra", "Couchbase", "MongoDbV2", "MongoDbAtlas", - "AmazonS3Compatible", "FileServer", "FtpServer", "GoogleCloudStorage", "Hdfs", - "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc", "GenericRest", "AmazonMws", - "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm", "GoogleAdWords", "Hubspot", "Jira", - "Magento", "Marketo", "Office365", "Eloqua", "Responsys", "OracleServiceCloud", "PayPal", - "QuickBooks", "Salesforce", "SalesforceServiceCloud", "SalesforceMarketingCloud", - "SapCloudForCustomer", "SapEcc", "ServiceNow", "SharePointOnlineList", "Shopify", "Square", - "WebTable", "Xero", "Zoho", "GenericContainerRegistry". - :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory - :ivar created_by_workspace_arm_id: - :vartype created_by_workspace_arm_id: str - :ivar expiry_time: - :vartype expiry_time: ~datetime.datetime - :ivar group: Group based on connection category. Possible values include: "Azure", "AzureAI", - "Database", "NoSQL", "File", "GenericProtocol", "ServicesAndApps". - :vartype group: str or ~azure.mgmt.machinelearningservices.models.ConnectionGroup - :ivar is_shared_to_all: - :vartype is_shared_to_all: bool - :ivar metadata: Any object. - :vartype metadata: any - :ivar shared_user_list: - :vartype shared_user_list: list[str] - :ivar target: - :vartype target: str - :ivar credentials: Custom Keys credential object. - :vartype credentials: ~azure.mgmt.machinelearningservices.models.CustomKeys - """ + AuthType:= CustomKeys (as type discriminator) + Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys + Target:= {any value} + Use Metadata property bag for ApiVersion and other metadata fields. - _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, - } + Variables are only populated by the server, and will be ignored when sending a request. - _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'CustomKeys'}, - } + All required parameters must be populated in order to send to Azure. - def __init__( - self, - **kwargs - ): + :ivar auth_type: Required. Authentication type of the connection target.Constant filled by + server. Possible values include: "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS", + "AccountKey", "ServicePrincipal", "AccessKey", "ApiKey", "CustomKeys", "OAuth2", "AAD". + :vartype auth_type: str or ~azure.mgmt.machinelearningservices.models.ConnectionAuthType + :ivar category: Category of the connection. Possible values include: "PythonFeed", + "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", + "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2", "Redis", "ApiKey", "AzureOpenAI", + "CognitiveSearch", "CognitiveService", "CustomKeys", "AzureBlob", "AzureOneLake", "CosmosDb", + "CosmosDbMongoDbApi", "AzureDataExplorer", "AzureMariaDb", "AzureDatabricksDeltaLake", + "AzureSqlMi", "AzureTableStorage", "AmazonRdsForOracle", "AmazonRdsForSqlServer", + "AmazonRedshift", "Db2", "Drill", "GoogleBigQuery", "Greenplum", "Hbase", "Hive", "Impala", + "Informix", "MariaDb", "MicrosoftAccess", "MySql", "Netezza", "Oracle", "Phoenix", + "PostgreSql", "Presto", "SapOpenHub", "SapBw", "SapHana", "SapTable", "Spark", "SqlServer", + "Sybase", "Teradata", "Vertica", "Cassandra", "Couchbase", "MongoDbV2", "MongoDbAtlas", + "AmazonS3Compatible", "FileServer", "FtpServer", "GoogleCloudStorage", "Hdfs", + "OracleCloudStorage", "Sftp", "GenericHttp", "ODataRest", "Odbc", "GenericRest", "AmazonMws", + "Concur", "Dynamics", "DynamicsAx", "DynamicsCrm", "GoogleAdWords", "Hubspot", "Jira", + "Magento", "Marketo", "Office365", "Eloqua", "Responsys", "OracleServiceCloud", "PayPal", + "QuickBooks", "Salesforce", "SalesforceServiceCloud", "SalesforceMarketingCloud", + "SapCloudForCustomer", "SapEcc", "ServiceNow", "SharePointOnlineList", "Shopify", "Square", + "WebTable", "Xero", "Zoho", "GenericContainerRegistry". + :vartype category: str or ~azure.mgmt.machinelearningservices.models.ConnectionCategory + :ivar created_by_workspace_arm_id: + :vartype created_by_workspace_arm_id: str + :ivar expiry_time: + :vartype expiry_time: ~datetime.datetime + :ivar group: Group based on connection category. Possible values include: "Azure", "AzureAI", + "Database", "NoSQL", "File", "GenericProtocol", "ServicesAndApps". + :vartype group: str or ~azure.mgmt.machinelearningservices.models.ConnectionGroup + :ivar is_shared_to_all: + :vartype is_shared_to_all: bool + :ivar metadata: Any object. + :vartype metadata: any + :ivar shared_user_list: + :vartype shared_user_list: list[str] + :ivar target: + :vartype target: str + :ivar credentials: Custom Keys credential object. + :vartype credentials: ~azure.mgmt.machinelearningservices.models.CustomKeys + """ + + _validation = { + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, + } + + _attribute_map = { + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "CustomKeys"}, + } + + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -9780,8 +9250,8 @@ def __init__( :paramtype credentials: ~azure.mgmt.machinelearningservices.models.CustomKeys """ super(CustomKeysWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'CustomKeys' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "CustomKeys" # type: str + self.credentials = kwargs.get("credentials", None) class CustomMetricThreshold(msrest.serialization.Model): @@ -9797,18 +9267,15 @@ class CustomMetricThreshold(msrest.serialization.Model): """ _validation = { - 'metric': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "metric": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'metric': {'key': 'metric', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, + "metric": {"key": "metric", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword metric: Required. [Required] The user-defined metric to calculate. :paramtype metric: str @@ -9817,8 +9284,8 @@ def __init__( :paramtype threshold: ~azure.mgmt.machinelearningservices.models.MonitoringThreshold """ super(CustomMetricThreshold, self).__init__(**kwargs) - self.metric = kwargs['metric'] - self.threshold = kwargs.get('threshold', None) + self.metric = kwargs["metric"] + self.threshold = kwargs.get("threshold", None) class CustomModelFineTuning(FineTuningVertical): @@ -9845,25 +9312,22 @@ class CustomModelFineTuning(FineTuningVertical): """ _validation = { - 'model': {'required': True}, - 'model_provider': {'required': True}, - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "model": {"required": True}, + "model_provider": {"required": True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'model': {'key': 'model', 'type': 'MLFlowModelJobInput'}, - 'model_provider': {'key': 'modelProvider', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'JobInput'}, - 'validation_data': {'key': 'validationData', 'type': 'JobInput'}, - 'hyper_parameters': {'key': 'hyperParameters', 'type': '{str}'}, + "model": {"key": "model", "type": "MLFlowModelJobInput"}, + "model_provider": {"key": "modelProvider", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "JobInput"}, + "validation_data": {"key": "validationData", "type": "JobInput"}, + "hyper_parameters": {"key": "hyperParameters", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model: Required. [Required] Input model for fine tuning. :paramtype model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput @@ -9880,8 +9344,8 @@ def __init__( :paramtype hyper_parameters: dict[str, str] """ super(CustomModelFineTuning, self).__init__(**kwargs) - self.model_provider = 'Custom' # type: str - self.hyper_parameters = kwargs.get('hyper_parameters', None) + self.model_provider = "Custom" # type: str + self.hyper_parameters = kwargs.get("hyper_parameters", None) class JobInput(msrest.serialization.Model): @@ -9901,31 +9365,33 @@ class JobInput(msrest.serialization.Model): """ _validation = { - 'job_input_type': {'required': True}, + "job_input_type": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, } _subtype_map = { - 'job_input_type': {'custom_model': 'CustomModelJobInput', 'literal': 'LiteralJobInput', - 'mlflow_model': 'MLFlowModelJobInput', 'mltable': 'MLTableJobInput', - 'triton_model': 'TritonModelJobInput', 'uri_file': 'UriFileJobInput', - 'uri_folder': 'UriFolderJobInput'} + "job_input_type": { + "custom_model": "CustomModelJobInput", + "literal": "LiteralJobInput", + "mlflow_model": "MLFlowModelJobInput", + "mltable": "MLTableJobInput", + "triton_model": "TritonModelJobInput", + "uri_file": "UriFileJobInput", + "uri_folder": "UriFolderJobInput", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: Description for the input. :paramtype description: str """ super(JobInput, self).__init__(**kwargs) - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.job_input_type = None # type: Optional[str] @@ -9950,22 +9416,19 @@ class CustomModelJobInput(JobInput, AssetJobInput): """ _validation = { - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'job_input_type': {'required': True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "job_input_type": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". @@ -9978,11 +9441,11 @@ def __init__( :paramtype description: str """ super(CustomModelJobInput, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs['uri'] - self.job_input_type = 'custom_model' # type: str - self.description = kwargs.get('description', None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs["uri"] + self.job_input_type = "custom_model" # type: str + self.description = kwargs.get("description", None) class JobOutput(msrest.serialization.Model): @@ -10002,30 +9465,32 @@ class JobOutput(msrest.serialization.Model): """ _validation = { - 'job_output_type': {'required': True}, + "job_output_type": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "job_output_type": {"key": "jobOutputType", "type": "str"}, } _subtype_map = { - 'job_output_type': {'custom_model': 'CustomModelJobOutput', 'mlflow_model': 'MLFlowModelJobOutput', - 'mltable': 'MLTableJobOutput', 'triton_model': 'TritonModelJobOutput', - 'uri_file': 'UriFileJobOutput', 'uri_folder': 'UriFolderJobOutput'} + "job_output_type": { + "custom_model": "CustomModelJobOutput", + "mlflow_model": "MLFlowModelJobOutput", + "mltable": "MLTableJobOutput", + "triton_model": "TritonModelJobOutput", + "uri_file": "UriFileJobOutput", + "uri_folder": "UriFolderJobOutput", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: Description for the output. :paramtype description: str """ super(JobOutput, self).__init__(**kwargs) - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.job_output_type = None # type: Optional[str] @@ -10056,24 +9521,21 @@ class CustomModelJobOutput(JobOutput, AssetJobOutput): """ _validation = { - 'job_output_type': {'required': True}, + "job_output_type": {"required": True}, } _attribute_map = { - 'asset_name': {'key': 'assetName', 'type': 'str'}, - 'asset_version': {'key': 'assetVersion', 'type': 'str'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + "asset_name": {"key": "assetName", "type": "str"}, + "asset_version": {"key": "assetVersion", "type": "str"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_output_type": {"key": "jobOutputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_name: Output Asset Name. :paramtype asset_name: str @@ -10092,14 +9554,14 @@ def __init__( :paramtype description: str """ super(CustomModelJobOutput, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.asset_version = kwargs.get('asset_version', None) - self.auto_delete_setting = kwargs.get('auto_delete_setting', None) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs.get('uri', None) - self.job_output_type = 'custom_model' # type: str - self.description = kwargs.get('description', None) + self.asset_name = kwargs.get("asset_name", None) + self.asset_version = kwargs.get("asset_version", None) + self.auto_delete_setting = kwargs.get("auto_delete_setting", None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs.get("uri", None) + self.job_output_type = "custom_model" # type: str + self.description = kwargs.get("description", None) class MonitoringSignalBase(msrest.serialization.Model): @@ -10123,29 +9585,29 @@ class MonitoringSignalBase(msrest.serialization.Model): """ _validation = { - 'signal_type': {'required': True}, + "signal_type": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, } _subtype_map = { - 'signal_type': {'Custom': 'CustomMonitoringSignal', 'DataDrift': 'DataDriftMonitoringSignal', - 'DataQuality': 'DataQualityMonitoringSignal', - 'FeatureAttributionDrift': 'FeatureAttributionDriftMonitoringSignal', - 'GenerationSafetyQuality': 'GenerationSafetyQualityMonitoringSignal', - 'GenerationTokenStatistics': 'GenerationTokenUsageSignal', - 'ModelPerformance': 'ModelPerformanceSignal', - 'PredictionDrift': 'PredictionDriftMonitoringSignal'} + "signal_type": { + "Custom": "CustomMonitoringSignal", + "DataDrift": "DataDriftMonitoringSignal", + "DataQuality": "DataQualityMonitoringSignal", + "FeatureAttributionDrift": "FeatureAttributionDriftMonitoringSignal", + "GenerationSafetyQuality": "GenerationSafetyQualityMonitoringSignal", + "GenerationTokenStatistics": "GenerationTokenUsageSignal", + "ModelPerformance": "ModelPerformanceSignal", + "PredictionDrift": "PredictionDriftMonitoringSignal", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -10154,8 +9616,8 @@ def __init__( :paramtype properties: dict[str, str] """ super(MonitoringSignalBase, self).__init__(**kwargs) - self.notification_types = kwargs.get('notification_types', None) - self.properties = kwargs.get('properties', None) + self.notification_types = kwargs.get("notification_types", None) + self.properties = kwargs.get("properties", None) self.signal_type = None # type: Optional[str] @@ -10194,26 +9656,23 @@ class CustomMonitoringSignal(MonitoringSignalBase): """ _validation = { - 'signal_type': {'required': True}, - 'component_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'metric_thresholds': {'required': True}, + "signal_type": {"required": True}, + "component_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "metric_thresholds": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'input_assets': {'key': 'inputAssets', 'type': '{MonitoringInputDataBase}'}, - 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, - 'metric_thresholds': {'key': 'metricThresholds', 'type': '[CustomMetricThreshold]'}, - 'workspace_connection': {'key': 'workspaceConnection', 'type': 'MonitoringWorkspaceConnection'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, + "component_id": {"key": "componentId", "type": "str"}, + "input_assets": {"key": "inputAssets", "type": "{MonitoringInputDataBase}"}, + "inputs": {"key": "inputs", "type": "{JobInput}"}, + "metric_thresholds": {"key": "metricThresholds", "type": "[CustomMetricThreshold]"}, + "workspace_connection": {"key": "workspaceConnection", "type": "MonitoringWorkspaceConnection"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -10239,12 +9698,12 @@ def __init__( ~azure.mgmt.machinelearningservices.models.MonitoringWorkspaceConnection """ super(CustomMonitoringSignal, self).__init__(**kwargs) - self.signal_type = 'Custom' # type: str - self.component_id = kwargs['component_id'] - self.input_assets = kwargs.get('input_assets', None) - self.inputs = kwargs.get('inputs', None) - self.metric_thresholds = kwargs['metric_thresholds'] - self.workspace_connection = kwargs.get('workspace_connection', None) + self.signal_type = "Custom" # type: str + self.component_id = kwargs["component_id"] + self.input_assets = kwargs.get("input_assets", None) + self.inputs = kwargs.get("inputs", None) + self.metric_thresholds = kwargs["metric_thresholds"] + self.workspace_connection = kwargs.get("workspace_connection", None) class CustomNCrossValidations(NCrossValidations): @@ -10260,26 +9719,23 @@ class CustomNCrossValidations(NCrossValidations): """ _validation = { - 'mode': {'required': True}, - 'value': {'required': True}, + "mode": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, + "mode": {"key": "mode", "type": "str"}, + "value": {"key": "value", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: Required. [Required] N-Cross validations value. :paramtype value: int """ super(CustomNCrossValidations, self).__init__(**kwargs) - self.mode = 'Custom' # type: str - self.value = kwargs['value'] + self.mode = "Custom" # type: str + self.value = kwargs["value"] class CustomSeasonality(Seasonality): @@ -10295,26 +9751,23 @@ class CustomSeasonality(Seasonality): """ _validation = { - 'mode': {'required': True}, - 'value': {'required': True}, + "mode": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, + "mode": {"key": "mode", "type": "str"}, + "value": {"key": "value", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: Required. [Required] Seasonality value. :paramtype value: int """ super(CustomSeasonality, self).__init__(**kwargs) - self.mode = 'Custom' # type: str - self.value = kwargs['value'] + self.mode = "Custom" # type: str + self.value = kwargs["value"] class CustomService(msrest.serialization.Model): @@ -10341,20 +9794,17 @@ class CustomService(msrest.serialization.Model): """ _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'name': {'key': 'name', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'Image'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{EnvironmentVariable}'}, - 'docker': {'key': 'docker', 'type': 'Docker'}, - 'endpoints': {'key': 'endpoints', 'type': '[Endpoint]'}, - 'volumes': {'key': 'volumes', 'type': '[VolumeDefinition]'}, - 'kernel': {'key': 'kernel', 'type': 'JupyterKernelConfig'}, + "additional_properties": {"key": "", "type": "{object}"}, + "name": {"key": "name", "type": "str"}, + "image": {"key": "image", "type": "Image"}, + "environment_variables": {"key": "environmentVariables", "type": "{EnvironmentVariable}"}, + "docker": {"key": "docker", "type": "Docker"}, + "endpoints": {"key": "endpoints", "type": "[Endpoint]"}, + "volumes": {"key": "volumes", "type": "[VolumeDefinition]"}, + "kernel": {"key": "kernel", "type": "JupyterKernelConfig"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. @@ -10377,14 +9827,14 @@ def __init__( :paramtype kernel: ~azure.mgmt.machinelearningservices.models.JupyterKernelConfig """ super(CustomService, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.name = kwargs.get('name', None) - self.image = kwargs.get('image', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.docker = kwargs.get('docker', None) - self.endpoints = kwargs.get('endpoints', None) - self.volumes = kwargs.get('volumes', None) - self.kernel = kwargs.get('kernel', None) + self.additional_properties = kwargs.get("additional_properties", None) + self.name = kwargs.get("name", None) + self.image = kwargs.get("image", None) + self.environment_variables = kwargs.get("environment_variables", None) + self.docker = kwargs.get("docker", None) + self.endpoints = kwargs.get("endpoints", None) + self.volumes = kwargs.get("volumes", None) + self.kernel = kwargs.get("kernel", None) class CustomTargetLags(TargetLags): @@ -10400,26 +9850,23 @@ class CustomTargetLags(TargetLags): """ _validation = { - 'mode': {'required': True}, - 'values': {'required': True}, + "mode": {"required": True}, + "values": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[int]'}, + "mode": {"key": "mode", "type": "str"}, + "values": {"key": "values", "type": "[int]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword values: Required. [Required] Set target lags values. :paramtype values: list[int] """ super(CustomTargetLags, self).__init__(**kwargs) - self.mode = 'Custom' # type: str - self.values = kwargs['values'] + self.mode = "Custom" # type: str + self.values = kwargs["values"] class CustomTargetRollingWindowSize(TargetRollingWindowSize): @@ -10435,26 +9882,23 @@ class CustomTargetRollingWindowSize(TargetRollingWindowSize): """ _validation = { - 'mode': {'required': True}, - 'value': {'required': True}, + "mode": {"required": True}, + "value": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'int'}, + "mode": {"key": "mode", "type": "str"}, + "value": {"key": "value", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: Required. [Required] TargetRollingWindowSize value. :paramtype value: int """ super(CustomTargetRollingWindowSize, self).__init__(**kwargs) - self.mode = 'Custom' # type: str - self.value = kwargs['value'] + self.mode = "Custom" # type: str + self.value = kwargs["value"] class DataImportSource(msrest.serialization.Model): @@ -10473,28 +9917,23 @@ class DataImportSource(msrest.serialization.Model): """ _validation = { - 'source_type': {'required': True}, + "source_type": {"required": True}, } _attribute_map = { - 'connection': {'key': 'connection', 'type': 'str'}, - 'source_type': {'key': 'sourceType', 'type': 'str'}, + "connection": {"key": "connection", "type": "str"}, + "source_type": {"key": "sourceType", "type": "str"}, } - _subtype_map = { - 'source_type': {'database': 'DatabaseSource', 'file_system': 'FileSystemSource'} - } + _subtype_map = {"source_type": {"database": "DatabaseSource", "file_system": "FileSystemSource"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword connection: Workspace connection for data import source storage. :paramtype connection: str """ super(DataImportSource, self).__init__(**kwargs) - self.connection = kwargs.get('connection', None) + self.connection = kwargs.get("connection", None) self.source_type = None # type: Optional[str] @@ -10519,22 +9958,19 @@ class DatabaseSource(DataImportSource): """ _validation = { - 'source_type': {'required': True}, + "source_type": {"required": True}, } _attribute_map = { - 'connection': {'key': 'connection', 'type': 'str'}, - 'source_type': {'key': 'sourceType', 'type': 'str'}, - 'query': {'key': 'query', 'type': 'str'}, - 'stored_procedure': {'key': 'storedProcedure', 'type': 'str'}, - 'stored_procedure_params': {'key': 'storedProcedureParams', 'type': '[{str}]'}, - 'table_name': {'key': 'tableName', 'type': 'str'}, + "connection": {"key": "connection", "type": "str"}, + "source_type": {"key": "sourceType", "type": "str"}, + "query": {"key": "query", "type": "str"}, + "stored_procedure": {"key": "storedProcedure", "type": "str"}, + "stored_procedure_params": {"key": "storedProcedureParams", "type": "[{str}]"}, + "table_name": {"key": "tableName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword connection: Workspace connection for data import source storage. :paramtype connection: str @@ -10548,11 +9984,11 @@ def __init__( :paramtype table_name: str """ super(DatabaseSource, self).__init__(**kwargs) - self.source_type = 'database' # type: str - self.query = kwargs.get('query', None) - self.stored_procedure = kwargs.get('stored_procedure', None) - self.stored_procedure_params = kwargs.get('stored_procedure_params', None) - self.table_name = kwargs.get('table_name', None) + self.source_type = "database" # type: str + self.query = kwargs.get("query", None) + self.stored_procedure = kwargs.get("stored_procedure", None) + self.stored_procedure_params = kwargs.get("stored_procedure_params", None) + self.table_name = kwargs.get("table_name", None) class DatabricksSchema(msrest.serialization.Model): @@ -10563,19 +9999,16 @@ class DatabricksSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + "properties": {"key": "properties", "type": "DatabricksProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of Databricks. :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties """ super(DatabricksSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class Databricks(Compute, DatabricksSchema): @@ -10617,32 +10050,29 @@ class Databricks(Compute, DatabricksSchema): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "properties": {"key": "properties", "type": "DatabricksProperties"}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of Databricks. :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatabricksProperties @@ -10657,17 +10087,17 @@ def __init__( :paramtype disable_local_auth: bool """ super(Databricks, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'Databricks' # type: str - self.compute_location = kwargs.get('compute_location', None) + self.properties = kwargs.get("properties", None) + self.compute_type = "Databricks" # type: str + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class DatabricksComputeSecretsProperties(msrest.serialization.Model): @@ -10678,19 +10108,16 @@ class DatabricksComputeSecretsProperties(msrest.serialization.Model): """ _attribute_map = { - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + "databricks_access_token": {"key": "databricksAccessToken", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword databricks_access_token: access token for databricks account. :paramtype databricks_access_token: str """ super(DatabricksComputeSecretsProperties, self).__init__(**kwargs) - self.databricks_access_token = kwargs.get('databricks_access_token', None) + self.databricks_access_token = kwargs.get("databricks_access_token", None) class DatabricksComputeSecrets(ComputeSecrets, DatabricksComputeSecretsProperties): @@ -10707,25 +10134,22 @@ class DatabricksComputeSecrets(ComputeSecrets, DatabricksComputeSecretsPropertie """ _validation = { - 'compute_type': {'required': True}, + "compute_type": {"required": True}, } _attribute_map = { - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, + "databricks_access_token": {"key": "databricksAccessToken", "type": "str"}, + "compute_type": {"key": "computeType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword databricks_access_token: access token for databricks account. :paramtype databricks_access_token: str """ super(DatabricksComputeSecrets, self).__init__(**kwargs) - self.databricks_access_token = kwargs.get('databricks_access_token', None) - self.compute_type = 'Databricks' # type: str + self.databricks_access_token = kwargs.get("databricks_access_token", None) + self.compute_type = "Databricks" # type: str class DatabricksProperties(msrest.serialization.Model): @@ -10738,14 +10162,11 @@ class DatabricksProperties(msrest.serialization.Model): """ _attribute_map = { - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, - 'workspace_url': {'key': 'workspaceUrl', 'type': 'str'}, + "databricks_access_token": {"key": "databricksAccessToken", "type": "str"}, + "workspace_url": {"key": "workspaceUrl", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword databricks_access_token: Databricks access token. :paramtype databricks_access_token: str @@ -10753,8 +10174,8 @@ def __init__( :paramtype workspace_url: str """ super(DatabricksProperties, self).__init__(**kwargs) - self.databricks_access_token = kwargs.get('databricks_access_token', None) - self.workspace_url = kwargs.get('workspace_url', None) + self.databricks_access_token = kwargs.get("databricks_access_token", None) + self.workspace_url = kwargs.get("workspace_url", None) class DataCollector(msrest.serialization.Model): @@ -10781,19 +10202,16 @@ class DataCollector(msrest.serialization.Model): """ _validation = { - 'collections': {'required': True}, + "collections": {"required": True}, } _attribute_map = { - 'collections': {'key': 'collections', 'type': '{Collection}'}, - 'request_logging': {'key': 'requestLogging', 'type': 'RequestLogging'}, - 'rolling_rate': {'key': 'rollingRate', 'type': 'str'}, + "collections": {"key": "collections", "type": "{Collection}"}, + "request_logging": {"key": "requestLogging", "type": "RequestLogging"}, + "rolling_rate": {"key": "rollingRate", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword collections: Required. [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. @@ -10813,9 +10231,9 @@ def __init__( :paramtype rolling_rate: str or ~azure.mgmt.machinelearningservices.models.RollingRateType """ super(DataCollector, self).__init__(**kwargs) - self.collections = kwargs['collections'] - self.request_logging = kwargs.get('request_logging', None) - self.rolling_rate = kwargs.get('rolling_rate', None) + self.collections = kwargs["collections"] + self.request_logging = kwargs.get("request_logging", None) + self.rolling_rate = kwargs.get("rolling_rate", None) class DataContainer(ProxyResource): @@ -10841,31 +10259,28 @@ class DataContainer(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'DataContainerProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "DataContainerProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.DataContainerProperties """ super(DataContainer, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class DataContainerProperties(AssetContainer): @@ -10893,25 +10308,22 @@ class DataContainerProperties(AssetContainer): """ _validation = { - 'latest_version': {'readonly': True}, - 'next_version': {'readonly': True}, - 'data_type': {'required': True}, + "latest_version": {"readonly": True}, + "next_version": {"readonly": True}, + "data_type": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'latest_version': {'key': 'latestVersion', 'type': 'str'}, - 'next_version': {'key': 'nextVersion', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "latest_version": {"key": "latestVersion", "type": "str"}, + "next_version": {"key": "nextVersion", "type": "str"}, + "data_type": {"key": "dataType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -10926,7 +10338,7 @@ def __init__( :paramtype data_type: str or ~azure.mgmt.machinelearningservices.models.DataType """ super(DataContainerProperties, self).__init__(**kwargs) - self.data_type = kwargs['data_type'] + self.data_type = kwargs["data_type"] class DataContainerResourceArmPaginatedResult(msrest.serialization.Model): @@ -10940,14 +10352,11 @@ class DataContainerResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[DataContainer]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[DataContainer]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of DataContainer objects. If null, there are no additional pages. @@ -10956,8 +10365,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.DataContainer] """ super(DataContainerResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class DataDriftMonitoringSignal(MonitoringSignalBase): @@ -10997,29 +10406,26 @@ class DataDriftMonitoringSignal(MonitoringSignalBase): """ _validation = { - 'signal_type': {'required': True}, - 'metric_thresholds': {'required': True}, - 'production_data': {'required': True}, - 'reference_data': {'required': True}, + "signal_type": {"required": True}, + "metric_thresholds": {"required": True}, + "production_data": {"required": True}, + "reference_data": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'data_segment': {'key': 'dataSegment', 'type': 'MonitoringDataSegment'}, - 'feature_data_type_override': {'key': 'featureDataTypeOverride', 'type': '{str}'}, - 'feature_importance_settings': {'key': 'featureImportanceSettings', 'type': 'FeatureImportanceSettings'}, - 'features': {'key': 'features', 'type': 'MonitoringFeatureFilterBase'}, - 'metric_thresholds': {'key': 'metricThresholds', 'type': '[DataDriftMetricThresholdBase]'}, - 'production_data': {'key': 'productionData', 'type': 'MonitoringInputDataBase'}, - 'reference_data': {'key': 'referenceData', 'type': 'MonitoringInputDataBase'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, + "data_segment": {"key": "dataSegment", "type": "MonitoringDataSegment"}, + "feature_data_type_override": {"key": "featureDataTypeOverride", "type": "{str}"}, + "feature_importance_settings": {"key": "featureImportanceSettings", "type": "FeatureImportanceSettings"}, + "features": {"key": "features", "type": "MonitoringFeatureFilterBase"}, + "metric_thresholds": {"key": "metricThresholds", "type": "[DataDriftMetricThresholdBase]"}, + "production_data": {"key": "productionData", "type": "MonitoringInputDataBase"}, + "reference_data": {"key": "referenceData", "type": "MonitoringInputDataBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -11047,14 +10453,14 @@ def __init__( :paramtype reference_data: ~azure.mgmt.machinelearningservices.models.MonitoringInputDataBase """ super(DataDriftMonitoringSignal, self).__init__(**kwargs) - self.signal_type = 'DataDrift' # type: str - self.data_segment = kwargs.get('data_segment', None) - self.feature_data_type_override = kwargs.get('feature_data_type_override', None) - self.feature_importance_settings = kwargs.get('feature_importance_settings', None) - self.features = kwargs.get('features', None) - self.metric_thresholds = kwargs['metric_thresholds'] - self.production_data = kwargs['production_data'] - self.reference_data = kwargs['reference_data'] + self.signal_type = "DataDrift" # type: str + self.data_segment = kwargs.get("data_segment", None) + self.feature_data_type_override = kwargs.get("feature_data_type_override", None) + self.feature_importance_settings = kwargs.get("feature_importance_settings", None) + self.features = kwargs.get("features", None) + self.metric_thresholds = kwargs["metric_thresholds"] + self.production_data = kwargs["production_data"] + self.reference_data = kwargs["reference_data"] class DataFactory(Compute): @@ -11094,31 +10500,28 @@ class DataFactory(Compute): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword compute_location: Location for the underlying compute. :paramtype compute_location: str @@ -11131,7 +10534,7 @@ def __init__( :paramtype disable_local_auth: bool """ super(DataFactory, self).__init__(**kwargs) - self.compute_type = 'DataFactory' # type: str + self.compute_type = "DataFactory" # type: str class DataVersionBaseProperties(AssetBase): @@ -11170,31 +10573,28 @@ class DataVersionBaseProperties(AssetBase): """ _validation = { - 'data_type': {'required': True}, - 'data_uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "data_type": {"required": True}, + "data_uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'data_uri': {'key': 'dataUri', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'stage': {'key': 'stage', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "data_type": {"key": "dataType", "type": "str"}, + "data_uri": {"key": "dataUri", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "stage": {"key": "stage", "type": "str"}, } _subtype_map = { - 'data_type': {'mltable': 'MLTableData', 'uri_file': 'UriFileDataVersion', 'uri_folder': 'UriFolderDataVersion'} + "data_type": {"mltable": "MLTableData", "uri_file": "UriFileDataVersion", "uri_folder": "UriFolderDataVersion"} } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -11221,10 +10621,10 @@ def __init__( :paramtype stage: str """ super(DataVersionBaseProperties, self).__init__(**kwargs) - self.data_type = 'DataVersionBaseProperties' # type: str - self.data_uri = kwargs['data_uri'] - self.intellectual_property = kwargs.get('intellectual_property', None) - self.stage = kwargs.get('stage', None) + self.data_type = "DataVersionBaseProperties" # type: str + self.data_uri = kwargs["data_uri"] + self.intellectual_property = kwargs.get("intellectual_property", None) + self.stage = kwargs.get("stage", None) class DataImport(DataVersionBaseProperties): @@ -11264,29 +10664,26 @@ class DataImport(DataVersionBaseProperties): """ _validation = { - 'data_type': {'required': True}, - 'data_uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "data_type": {"required": True}, + "data_uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'data_uri': {'key': 'dataUri', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'stage': {'key': 'stage', 'type': 'str'}, - 'asset_name': {'key': 'assetName', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'DataImportSource'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "data_type": {"key": "dataType", "type": "str"}, + "data_uri": {"key": "dataUri", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "stage": {"key": "stage", "type": "str"}, + "asset_name": {"key": "assetName", "type": "str"}, + "source": {"key": "source", "type": "DataImportSource"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -11317,9 +10714,9 @@ def __init__( :paramtype source: ~azure.mgmt.machinelearningservices.models.DataImportSource """ super(DataImport, self).__init__(**kwargs) - self.data_type = 'uri_folder' # type: str - self.asset_name = kwargs.get('asset_name', None) - self.source = kwargs.get('source', None) + self.data_type = "uri_folder" # type: str + self.asset_name = kwargs.get("asset_name", None) + self.source = kwargs.get("source", None) class DataLakeAnalyticsSchema(msrest.serialization.Model): @@ -11331,20 +10728,17 @@ class DataLakeAnalyticsSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsSchemaProperties'}, + "properties": {"key": "properties", "type": "DataLakeAnalyticsSchemaProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: :paramtype properties: ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsSchemaProperties """ super(DataLakeAnalyticsSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class DataLakeAnalytics(Compute, DataLakeAnalyticsSchema): @@ -11387,32 +10781,29 @@ class DataLakeAnalytics(Compute, DataLakeAnalyticsSchema): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsSchemaProperties'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "properties": {"key": "properties", "type": "DataLakeAnalyticsSchemaProperties"}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: :paramtype properties: @@ -11428,17 +10819,17 @@ def __init__( :paramtype disable_local_auth: bool """ super(DataLakeAnalytics, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'DataLakeAnalytics' # type: str - self.compute_location = kwargs.get('compute_location', None) + self.properties = kwargs.get("properties", None) + self.compute_type = "DataLakeAnalytics" # type: str + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class DataLakeAnalyticsSchemaProperties(msrest.serialization.Model): @@ -11449,19 +10840,16 @@ class DataLakeAnalyticsSchemaProperties(msrest.serialization.Model): """ _attribute_map = { - 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + "data_lake_store_account_name": {"key": "dataLakeStoreAccountName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword data_lake_store_account_name: DataLake Store Account Name. :paramtype data_lake_store_account_name: str """ super(DataLakeAnalyticsSchemaProperties, self).__init__(**kwargs) - self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None) + self.data_lake_store_account_name = kwargs.get("data_lake_store_account_name", None) class DataPathAssetReference(AssetReferenceBase): @@ -11479,19 +10867,16 @@ class DataPathAssetReference(AssetReferenceBase): """ _validation = { - 'reference_type': {'required': True}, + "reference_type": {"required": True}, } _attribute_map = { - 'reference_type': {'key': 'referenceType', 'type': 'str'}, - 'datastore_id': {'key': 'datastoreId', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, + "reference_type": {"key": "referenceType", "type": "str"}, + "datastore_id": {"key": "datastoreId", "type": "str"}, + "path": {"key": "path", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword datastore_id: ARM resource ID of the datastore where the asset is located. :paramtype datastore_id: str @@ -11499,9 +10884,9 @@ def __init__( :paramtype path: str """ super(DataPathAssetReference, self).__init__(**kwargs) - self.reference_type = 'DataPath' # type: str - self.datastore_id = kwargs.get('datastore_id', None) - self.path = kwargs.get('path', None) + self.reference_type = "DataPath" # type: str + self.datastore_id = kwargs.get("datastore_id", None) + self.path = kwargs.get("path", None) class DataQualityMonitoringSignal(MonitoringSignalBase): @@ -11540,28 +10925,25 @@ class DataQualityMonitoringSignal(MonitoringSignalBase): """ _validation = { - 'signal_type': {'required': True}, - 'metric_thresholds': {'required': True}, - 'production_data': {'required': True}, - 'reference_data': {'required': True}, + "signal_type": {"required": True}, + "metric_thresholds": {"required": True}, + "production_data": {"required": True}, + "reference_data": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'feature_data_type_override': {'key': 'featureDataTypeOverride', 'type': '{str}'}, - 'feature_importance_settings': {'key': 'featureImportanceSettings', 'type': 'FeatureImportanceSettings'}, - 'features': {'key': 'features', 'type': 'MonitoringFeatureFilterBase'}, - 'metric_thresholds': {'key': 'metricThresholds', 'type': '[DataQualityMetricThresholdBase]'}, - 'production_data': {'key': 'productionData', 'type': 'MonitoringInputDataBase'}, - 'reference_data': {'key': 'referenceData', 'type': 'MonitoringInputDataBase'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, + "feature_data_type_override": {"key": "featureDataTypeOverride", "type": "{str}"}, + "feature_importance_settings": {"key": "featureImportanceSettings", "type": "FeatureImportanceSettings"}, + "features": {"key": "features", "type": "MonitoringFeatureFilterBase"}, + "metric_thresholds": {"key": "metricThresholds", "type": "[DataQualityMetricThresholdBase]"}, + "production_data": {"key": "productionData", "type": "MonitoringInputDataBase"}, + "reference_data": {"key": "referenceData", "type": "MonitoringInputDataBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -11588,13 +10970,13 @@ def __init__( :paramtype reference_data: ~azure.mgmt.machinelearningservices.models.MonitoringInputDataBase """ super(DataQualityMonitoringSignal, self).__init__(**kwargs) - self.signal_type = 'DataQuality' # type: str - self.feature_data_type_override = kwargs.get('feature_data_type_override', None) - self.feature_importance_settings = kwargs.get('feature_importance_settings', None) - self.features = kwargs.get('features', None) - self.metric_thresholds = kwargs['metric_thresholds'] - self.production_data = kwargs['production_data'] - self.reference_data = kwargs['reference_data'] + self.signal_type = "DataQuality" # type: str + self.feature_data_type_override = kwargs.get("feature_data_type_override", None) + self.feature_importance_settings = kwargs.get("feature_importance_settings", None) + self.features = kwargs.get("features", None) + self.metric_thresholds = kwargs["metric_thresholds"] + self.production_data = kwargs["production_data"] + self.reference_data = kwargs["reference_data"] class DatasetExportSummary(ExportSummary): @@ -11620,31 +11002,27 @@ class DatasetExportSummary(ExportSummary): """ _validation = { - 'end_date_time': {'readonly': True}, - 'exported_row_count': {'readonly': True}, - 'format': {'required': True}, - 'labeling_job_id': {'readonly': True}, - 'start_date_time': {'readonly': True}, - 'labeled_asset_name': {'readonly': True}, + "end_date_time": {"readonly": True}, + "exported_row_count": {"readonly": True}, + "format": {"required": True}, + "labeling_job_id": {"readonly": True}, + "start_date_time": {"readonly": True}, + "labeled_asset_name": {"readonly": True}, } _attribute_map = { - 'end_date_time': {'key': 'endDateTime', 'type': 'iso-8601'}, - 'exported_row_count': {'key': 'exportedRowCount', 'type': 'long'}, - 'format': {'key': 'format', 'type': 'str'}, - 'labeling_job_id': {'key': 'labelingJobId', 'type': 'str'}, - 'start_date_time': {'key': 'startDateTime', 'type': 'iso-8601'}, - 'labeled_asset_name': {'key': 'labeledAssetName', 'type': 'str'}, + "end_date_time": {"key": "endDateTime", "type": "iso-8601"}, + "exported_row_count": {"key": "exportedRowCount", "type": "long"}, + "format": {"key": "format", "type": "str"}, + "labeling_job_id": {"key": "labelingJobId", "type": "str"}, + "start_date_time": {"key": "startDateTime", "type": "iso-8601"}, + "labeled_asset_name": {"key": "labeledAssetName", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(DatasetExportSummary, self).__init__(**kwargs) - self.format = 'Dataset' # type: str + self.format = "Dataset" # type: str self.labeled_asset_name = None @@ -11671,31 +11049,28 @@ class Datastore(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'DatastoreProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "DatastoreProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.DatastoreProperties """ super(Datastore, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class DatastoreResourceArmPaginatedResult(msrest.serialization.Model): @@ -11709,14 +11084,11 @@ class DatastoreResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[Datastore]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[Datastore]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of Datastore objects. If null, there are no additional pages. @@ -11725,8 +11097,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.Datastore] """ super(DatastoreResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class DataVersionBase(ProxyResource): @@ -11752,31 +11124,28 @@ class DataVersionBase(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'DataVersionBaseProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "DataVersionBaseProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.DataVersionBaseProperties """ super(DataVersionBase, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class DataVersionBaseResourceArmPaginatedResult(msrest.serialization.Model): @@ -11790,14 +11159,11 @@ class DataVersionBaseResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[DataVersionBase]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[DataVersionBase]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of DataVersionBase objects. If null, there are no additional pages. @@ -11806,8 +11172,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.DataVersionBase] """ super(DataVersionBaseResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class OnlineScaleSettings(msrest.serialization.Model): @@ -11824,23 +11190,19 @@ class OnlineScaleSettings(msrest.serialization.Model): """ _validation = { - 'scale_type': {'required': True}, + "scale_type": {"required": True}, } _attribute_map = { - 'scale_type': {'key': 'scaleType', 'type': 'str'}, + "scale_type": {"key": "scaleType", "type": "str"}, } _subtype_map = { - 'scale_type': {'Default': 'DefaultScaleSettings', 'TargetUtilization': 'TargetUtilizationScaleSettings'} + "scale_type": {"Default": "DefaultScaleSettings", "TargetUtilization": "TargetUtilizationScaleSettings"} } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(OnlineScaleSettings, self).__init__(**kwargs) self.scale_type = None # type: Optional[str] @@ -11856,21 +11218,17 @@ class DefaultScaleSettings(OnlineScaleSettings): """ _validation = { - 'scale_type': {'required': True}, + "scale_type": {"required": True}, } _attribute_map = { - 'scale_type': {'key': 'scaleType', 'type': 'str'}, + "scale_type": {"key": "scaleType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(DefaultScaleSettings, self).__init__(**kwargs) - self.scale_type = 'Default' # type: str + self.scale_type = "Default" # type: str class DeploymentLogs(msrest.serialization.Model): @@ -11881,19 +11239,16 @@ class DeploymentLogs(msrest.serialization.Model): """ _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, + "content": {"key": "content", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword content: The retrieved online deployment logs. :paramtype content: str """ super(DeploymentLogs, self).__init__(**kwargs) - self.content = kwargs.get('content', None) + self.content = kwargs.get("content", None) class DeploymentLogsRequest(msrest.serialization.Model): @@ -11907,14 +11262,11 @@ class DeploymentLogsRequest(msrest.serialization.Model): """ _attribute_map = { - 'container_type': {'key': 'containerType', 'type': 'str'}, - 'tail': {'key': 'tail', 'type': 'int'}, + "container_type": {"key": "containerType", "type": "str"}, + "tail": {"key": "tail", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword container_type: The type of container to retrieve logs from. Possible values include: "StorageInitializer", "InferenceServer", "ModelDataCollector". @@ -11923,8 +11275,8 @@ def __init__( :paramtype tail: int """ super(DeploymentLogsRequest, self).__init__(**kwargs) - self.container_type = kwargs.get('container_type', None) - self.tail = kwargs.get('tail', None) + self.container_type = kwargs.get("container_type", None) + self.tail = kwargs.get("tail", None) class ResourceConfiguration(msrest.serialization.Model): @@ -11945,17 +11297,14 @@ class ResourceConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, - 'properties': {'key': 'properties', 'type': '{object}'}, + "instance_count": {"key": "instanceCount", "type": "int"}, + "instance_type": {"key": "instanceType", "type": "str"}, + "locations": {"key": "locations", "type": "[str]"}, + "max_instance_count": {"key": "maxInstanceCount", "type": "int"}, + "properties": {"key": "properties", "type": "{object}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword instance_count: Optional number of instances or nodes used by the compute target. :paramtype instance_count: int @@ -11971,11 +11320,11 @@ def __init__( :paramtype properties: dict[str, any] """ super(ResourceConfiguration, self).__init__(**kwargs) - self.instance_count = kwargs.get('instance_count', 1) - self.instance_type = kwargs.get('instance_type', None) - self.locations = kwargs.get('locations', None) - self.max_instance_count = kwargs.get('max_instance_count', None) - self.properties = kwargs.get('properties', None) + self.instance_count = kwargs.get("instance_count", 1) + self.instance_type = kwargs.get("instance_type", None) + self.locations = kwargs.get("locations", None) + self.max_instance_count = kwargs.get("max_instance_count", None) + self.properties = kwargs.get("properties", None) class DeploymentResourceConfiguration(ResourceConfiguration): @@ -11996,17 +11345,14 @@ class DeploymentResourceConfiguration(ResourceConfiguration): """ _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, - 'properties': {'key': 'properties', 'type': '{object}'}, + "instance_count": {"key": "instanceCount", "type": "int"}, + "instance_type": {"key": "instanceType", "type": "str"}, + "locations": {"key": "locations", "type": "[str]"}, + "max_instance_count": {"key": "maxInstanceCount", "type": "int"}, + "properties": {"key": "properties", "type": "{object}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword instance_count: Optional number of instances or nodes used by the compute target. :paramtype instance_count: int @@ -12036,15 +11382,12 @@ class DestinationAsset(msrest.serialization.Model): """ _attribute_map = { - 'destination_name': {'key': 'destinationName', 'type': 'str'}, - 'destination_version': {'key': 'destinationVersion', 'type': 'str'}, - 'registry_name': {'key': 'registryName', 'type': 'str'}, + "destination_name": {"key": "destinationName", "type": "str"}, + "destination_version": {"key": "destinationVersion", "type": "str"}, + "registry_name": {"key": "registryName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword destination_name: Destination asset name. :paramtype destination_name: str @@ -12054,9 +11397,9 @@ def __init__( :paramtype registry_name: str """ super(DestinationAsset, self).__init__(**kwargs) - self.destination_name = kwargs.get('destination_name', None) - self.destination_version = kwargs.get('destination_version', None) - self.registry_name = kwargs.get('registry_name', None) + self.destination_name = kwargs.get("destination_name", None) + self.destination_version = kwargs.get("destination_version", None) + self.registry_name = kwargs.get("registry_name", None) class DiagnoseRequestProperties(msrest.serialization.Model): @@ -12086,22 +11429,19 @@ class DiagnoseRequestProperties(msrest.serialization.Model): """ _attribute_map = { - 'application_insights': {'key': 'applicationInsights', 'type': '{object}'}, - 'container_registry': {'key': 'containerRegistry', 'type': '{object}'}, - 'dns_resolution': {'key': 'dnsResolution', 'type': '{object}'}, - 'key_vault': {'key': 'keyVault', 'type': '{object}'}, - 'nsg': {'key': 'nsg', 'type': '{object}'}, - 'others': {'key': 'others', 'type': '{object}'}, - 'required_resource_providers': {'key': 'requiredResourceProviders', 'type': '{object}'}, - 'resource_lock': {'key': 'resourceLock', 'type': '{object}'}, - 'storage_account': {'key': 'storageAccount', 'type': '{object}'}, - 'udr': {'key': 'udr', 'type': '{object}'}, + "application_insights": {"key": "applicationInsights", "type": "{object}"}, + "container_registry": {"key": "containerRegistry", "type": "{object}"}, + "dns_resolution": {"key": "dnsResolution", "type": "{object}"}, + "key_vault": {"key": "keyVault", "type": "{object}"}, + "nsg": {"key": "nsg", "type": "{object}"}, + "others": {"key": "others", "type": "{object}"}, + "required_resource_providers": {"key": "requiredResourceProviders", "type": "{object}"}, + "resource_lock": {"key": "resourceLock", "type": "{object}"}, + "storage_account": {"key": "storageAccount", "type": "{object}"}, + "udr": {"key": "udr", "type": "{object}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword application_insights: Setting for diagnosing dependent application insights. :paramtype application_insights: dict[str, any] @@ -12126,16 +11466,16 @@ def __init__( :paramtype udr: dict[str, any] """ super(DiagnoseRequestProperties, self).__init__(**kwargs) - self.application_insights = kwargs.get('application_insights', None) - self.container_registry = kwargs.get('container_registry', None) - self.dns_resolution = kwargs.get('dns_resolution', None) - self.key_vault = kwargs.get('key_vault', None) - self.nsg = kwargs.get('nsg', None) - self.others = kwargs.get('others', None) - self.required_resource_providers = kwargs.get('required_resource_providers', None) - self.resource_lock = kwargs.get('resource_lock', None) - self.storage_account = kwargs.get('storage_account', None) - self.udr = kwargs.get('udr', None) + self.application_insights = kwargs.get("application_insights", None) + self.container_registry = kwargs.get("container_registry", None) + self.dns_resolution = kwargs.get("dns_resolution", None) + self.key_vault = kwargs.get("key_vault", None) + self.nsg = kwargs.get("nsg", None) + self.others = kwargs.get("others", None) + self.required_resource_providers = kwargs.get("required_resource_providers", None) + self.resource_lock = kwargs.get("resource_lock", None) + self.storage_account = kwargs.get("storage_account", None) + self.udr = kwargs.get("udr", None) class DiagnoseResponseResult(msrest.serialization.Model): @@ -12146,19 +11486,16 @@ class DiagnoseResponseResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': 'DiagnoseResponseResultValue'}, + "value": {"key": "value", "type": "DiagnoseResponseResultValue"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: :paramtype value: ~azure.mgmt.machinelearningservices.models.DiagnoseResponseResultValue """ super(DiagnoseResponseResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class DiagnoseResponseResultValue(msrest.serialization.Model): @@ -12191,21 +11528,18 @@ class DiagnoseResponseResultValue(msrest.serialization.Model): """ _attribute_map = { - 'user_defined_route_results': {'key': 'userDefinedRouteResults', 'type': '[DiagnoseResult]'}, - 'network_security_rule_results': {'key': 'networkSecurityRuleResults', 'type': '[DiagnoseResult]'}, - 'resource_lock_results': {'key': 'resourceLockResults', 'type': '[DiagnoseResult]'}, - 'dns_resolution_results': {'key': 'dnsResolutionResults', 'type': '[DiagnoseResult]'}, - 'storage_account_results': {'key': 'storageAccountResults', 'type': '[DiagnoseResult]'}, - 'key_vault_results': {'key': 'keyVaultResults', 'type': '[DiagnoseResult]'}, - 'container_registry_results': {'key': 'containerRegistryResults', 'type': '[DiagnoseResult]'}, - 'application_insights_results': {'key': 'applicationInsightsResults', 'type': '[DiagnoseResult]'}, - 'other_results': {'key': 'otherResults', 'type': '[DiagnoseResult]'}, + "user_defined_route_results": {"key": "userDefinedRouteResults", "type": "[DiagnoseResult]"}, + "network_security_rule_results": {"key": "networkSecurityRuleResults", "type": "[DiagnoseResult]"}, + "resource_lock_results": {"key": "resourceLockResults", "type": "[DiagnoseResult]"}, + "dns_resolution_results": {"key": "dnsResolutionResults", "type": "[DiagnoseResult]"}, + "storage_account_results": {"key": "storageAccountResults", "type": "[DiagnoseResult]"}, + "key_vault_results": {"key": "keyVaultResults", "type": "[DiagnoseResult]"}, + "container_registry_results": {"key": "containerRegistryResults", "type": "[DiagnoseResult]"}, + "application_insights_results": {"key": "applicationInsightsResults", "type": "[DiagnoseResult]"}, + "other_results": {"key": "otherResults", "type": "[DiagnoseResult]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword user_defined_route_results: :paramtype user_defined_route_results: @@ -12234,15 +11568,15 @@ def __init__( :paramtype other_results: list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] """ super(DiagnoseResponseResultValue, self).__init__(**kwargs) - self.user_defined_route_results = kwargs.get('user_defined_route_results', None) - self.network_security_rule_results = kwargs.get('network_security_rule_results', None) - self.resource_lock_results = kwargs.get('resource_lock_results', None) - self.dns_resolution_results = kwargs.get('dns_resolution_results', None) - self.storage_account_results = kwargs.get('storage_account_results', None) - self.key_vault_results = kwargs.get('key_vault_results', None) - self.container_registry_results = kwargs.get('container_registry_results', None) - self.application_insights_results = kwargs.get('application_insights_results', None) - self.other_results = kwargs.get('other_results', None) + self.user_defined_route_results = kwargs.get("user_defined_route_results", None) + self.network_security_rule_results = kwargs.get("network_security_rule_results", None) + self.resource_lock_results = kwargs.get("resource_lock_results", None) + self.dns_resolution_results = kwargs.get("dns_resolution_results", None) + self.storage_account_results = kwargs.get("storage_account_results", None) + self.key_vault_results = kwargs.get("key_vault_results", None) + self.container_registry_results = kwargs.get("container_registry_results", None) + self.application_insights_results = kwargs.get("application_insights_results", None) + self.other_results = kwargs.get("other_results", None) class DiagnoseResult(msrest.serialization.Model): @@ -12260,23 +11594,19 @@ class DiagnoseResult(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'level': {'readonly': True}, - 'message': {'readonly': True}, + "code": {"readonly": True}, + "level": {"readonly": True}, + "message": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "level": {"key": "level", "type": "str"}, + "message": {"key": "message", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(DiagnoseResult, self).__init__(**kwargs) self.code = None self.level = None @@ -12291,19 +11621,16 @@ class DiagnoseWorkspaceParameters(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': 'DiagnoseRequestProperties'}, + "value": {"key": "value", "type": "DiagnoseRequestProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: :paramtype value: ~azure.mgmt.machinelearningservices.models.DiagnoseRequestProperties """ super(DiagnoseWorkspaceParameters, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class DistributionConfiguration(msrest.serialization.Model): @@ -12321,23 +11648,17 @@ class DistributionConfiguration(msrest.serialization.Model): """ _validation = { - 'distribution_type': {'required': True}, + "distribution_type": {"required": True}, } _attribute_map = { - 'distribution_type': {'key': 'distributionType', 'type': 'str'}, + "distribution_type": {"key": "distributionType", "type": "str"}, } - _subtype_map = { - 'distribution_type': {'Mpi': 'Mpi', 'PyTorch': 'PyTorch', 'Ray': 'Ray', 'TensorFlow': 'TensorFlow'} - } + _subtype_map = {"distribution_type": {"Mpi": "Mpi", "PyTorch": "PyTorch", "Ray": "Ray", "TensorFlow": "TensorFlow"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(DistributionConfiguration, self).__init__(**kwargs) self.distribution_type = None # type: Optional[str] @@ -12353,14 +11674,11 @@ class Docker(msrest.serialization.Model): """ _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'privileged': {'key': 'privileged', 'type': 'bool'}, + "additional_properties": {"key": "", "type": "{object}"}, + "privileged": {"key": "privileged", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. @@ -12369,8 +11687,8 @@ def __init__( :paramtype privileged: bool """ super(Docker, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.privileged = kwargs.get('privileged', None) + self.additional_properties = kwargs.get("additional_properties", None) + self.privileged = kwargs.get("privileged", None) class DockerCredential(DataReferenceCredential): @@ -12390,19 +11708,16 @@ class DockerCredential(DataReferenceCredential): """ _validation = { - 'credential_type': {'required': True}, + "credential_type": {"required": True}, } _attribute_map = { - 'credential_type': {'key': 'credentialType', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'user_name': {'key': 'userName', 'type': 'str'}, + "credential_type": {"key": "credentialType", "type": "str"}, + "password": {"key": "password", "type": "str"}, + "user_name": {"key": "userName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword password: DockerCredential user password. :paramtype password: str @@ -12410,9 +11725,9 @@ def __init__( :paramtype user_name: str """ super(DockerCredential, self).__init__(**kwargs) - self.credential_type = 'DockerCredentials' # type: str - self.password = kwargs.get('password', None) - self.user_name = kwargs.get('user_name', None) + self.credential_type = "DockerCredentials" # type: str + self.password = kwargs.get("password", None) + self.user_name = kwargs.get("user_name", None) class EncryptionKeyVaultUpdateProperties(msrest.serialization.Model): @@ -12425,23 +11740,20 @@ class EncryptionKeyVaultUpdateProperties(msrest.serialization.Model): """ _validation = { - 'key_identifier': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "key_identifier": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + "key_identifier": {"key": "keyIdentifier", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key_identifier: Required. :paramtype key_identifier: str """ super(EncryptionKeyVaultUpdateProperties, self).__init__(**kwargs) - self.key_identifier = kwargs['key_identifier'] + self.key_identifier = kwargs["key_identifier"] class EncryptionProperty(msrest.serialization.Model): @@ -12471,23 +11783,20 @@ class EncryptionProperty(msrest.serialization.Model): """ _validation = { - 'key_vault_properties': {'required': True}, - 'status': {'required': True}, + "key_vault_properties": {"required": True}, + "status": {"required": True}, } _attribute_map = { - 'cosmos_db_resource_id': {'key': 'cosmosDbResourceId', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityForCmk'}, - 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, - 'search_account_resource_id': {'key': 'searchAccountResourceId', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'storage_account_resource_id': {'key': 'storageAccountResourceId', 'type': 'str'}, + "cosmos_db_resource_id": {"key": "cosmosDbResourceId", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityForCmk"}, + "key_vault_properties": {"key": "keyVaultProperties", "type": "KeyVaultProperties"}, + "search_account_resource_id": {"key": "searchAccountResourceId", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "storage_account_resource_id": {"key": "storageAccountResourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword cosmos_db_resource_id: The byok cosmosdb account that customer brings to store customer's data @@ -12510,12 +11819,12 @@ def __init__( :paramtype storage_account_resource_id: str """ super(EncryptionProperty, self).__init__(**kwargs) - self.cosmos_db_resource_id = kwargs.get('cosmos_db_resource_id', None) - self.identity = kwargs.get('identity', None) - self.key_vault_properties = kwargs['key_vault_properties'] - self.search_account_resource_id = kwargs.get('search_account_resource_id', None) - self.status = kwargs['status'] - self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) + self.cosmos_db_resource_id = kwargs.get("cosmos_db_resource_id", None) + self.identity = kwargs.get("identity", None) + self.key_vault_properties = kwargs["key_vault_properties"] + self.search_account_resource_id = kwargs.get("search_account_resource_id", None) + self.status = kwargs["status"] + self.storage_account_resource_id = kwargs.get("storage_account_resource_id", None) class EncryptionUpdateProperties(msrest.serialization.Model): @@ -12529,24 +11838,21 @@ class EncryptionUpdateProperties(msrest.serialization.Model): """ _validation = { - 'key_vault_properties': {'required': True}, + "key_vault_properties": {"required": True}, } _attribute_map = { - 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionKeyVaultUpdateProperties'}, + "key_vault_properties": {"key": "keyVaultProperties", "type": "EncryptionKeyVaultUpdateProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key_vault_properties: Required. :paramtype key_vault_properties: ~azure.mgmt.machinelearningservices.models.EncryptionKeyVaultUpdateProperties """ super(EncryptionUpdateProperties, self).__init__(**kwargs) - self.key_vault_properties = kwargs['key_vault_properties'] + self.key_vault_properties = kwargs["key_vault_properties"] class Endpoint(msrest.serialization.Model): @@ -12566,17 +11872,14 @@ class Endpoint(msrest.serialization.Model): """ _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'int'}, - 'published': {'key': 'published', 'type': 'int'}, - 'host_ip': {'key': 'hostIp', 'type': 'str'}, + "protocol": {"key": "protocol", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "target": {"key": "target", "type": "int"}, + "published": {"key": "published", "type": "int"}, + "host_ip": {"key": "hostIp", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword protocol: Protocol over which communication will happen over this endpoint. Possible values include: "tcp", "udp", "http". Default value: "tcp". @@ -12591,11 +11894,11 @@ def __init__( :paramtype host_ip: str """ super(Endpoint, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', "tcp") - self.name = kwargs.get('name', None) - self.target = kwargs.get('target', None) - self.published = kwargs.get('published', None) - self.host_ip = kwargs.get('host_ip', None) + self.protocol = kwargs.get("protocol", "tcp") + self.name = kwargs.get("name", None) + self.target = kwargs.get("target", None) + self.published = kwargs.get("published", None) + self.host_ip = kwargs.get("host_ip", None) class EndpointAuthKeys(msrest.serialization.Model): @@ -12608,14 +11911,11 @@ class EndpointAuthKeys(msrest.serialization.Model): """ _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + "primary_key": {"key": "primaryKey", "type": "str"}, + "secondary_key": {"key": "secondaryKey", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword primary_key: The primary key. :paramtype primary_key: str @@ -12623,8 +11923,8 @@ def __init__( :paramtype secondary_key: str """ super(EndpointAuthKeys, self).__init__(**kwargs) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) + self.primary_key = kwargs.get("primary_key", None) + self.secondary_key = kwargs.get("secondary_key", None) class EndpointAuthToken(msrest.serialization.Model): @@ -12641,16 +11941,13 @@ class EndpointAuthToken(msrest.serialization.Model): """ _attribute_map = { - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'expiry_time_utc': {'key': 'expiryTimeUtc', 'type': 'long'}, - 'refresh_after_time_utc': {'key': 'refreshAfterTimeUtc', 'type': 'long'}, - 'token_type': {'key': 'tokenType', 'type': 'str'}, + "access_token": {"key": "accessToken", "type": "str"}, + "expiry_time_utc": {"key": "expiryTimeUtc", "type": "long"}, + "refresh_after_time_utc": {"key": "refreshAfterTimeUtc", "type": "long"}, + "token_type": {"key": "tokenType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword access_token: Access token for endpoint authentication. :paramtype access_token: str @@ -12662,10 +11959,10 @@ def __init__( :paramtype token_type: str """ super(EndpointAuthToken, self).__init__(**kwargs) - self.access_token = kwargs.get('access_token', None) - self.expiry_time_utc = kwargs.get('expiry_time_utc', 0) - self.refresh_after_time_utc = kwargs.get('refresh_after_time_utc', 0) - self.token_type = kwargs.get('token_type', None) + self.access_token = kwargs.get("access_token", None) + self.expiry_time_utc = kwargs.get("expiry_time_utc", 0) + self.refresh_after_time_utc = kwargs.get("refresh_after_time_utc", 0) + self.token_type = kwargs.get("token_type", None) class EndpointDeploymentModel(msrest.serialization.Model): @@ -12682,16 +11979,13 @@ class EndpointDeploymentModel(msrest.serialization.Model): """ _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, + "format": {"key": "format", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "source": {"key": "source", "type": "str"}, + "version": {"key": "version", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword format: Model format. :paramtype format: str @@ -12703,10 +11997,10 @@ def __init__( :paramtype version: str """ super(EndpointDeploymentModel, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.name = kwargs.get('name', None) - self.source = kwargs.get('source', None) - self.version = kwargs.get('version', None) + self.format = kwargs.get("format", None) + self.name = kwargs.get("name", None) + self.source = kwargs.get("source", None) + self.version = kwargs.get("version", None) class EndpointDeploymentResourcePropertiesBasicResource(Resource): @@ -12733,32 +12027,29 @@ class EndpointDeploymentResourcePropertiesBasicResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'EndpointDeploymentResourceProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "EndpointDeploymentResourceProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. :paramtype properties: ~azure.mgmt.machinelearningservices.models.EndpointDeploymentResourceProperties """ super(EndpointDeploymentResourcePropertiesBasicResource, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(msrest.serialization.Model): @@ -12772,14 +12063,11 @@ class EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(msrest """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[EndpointDeploymentResourcePropertiesBasicResource]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[EndpointDeploymentResourcePropertiesBasicResource]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: :paramtype next_link: str @@ -12788,8 +12076,8 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.EndpointDeploymentResourcePropertiesBasicResource] """ super(EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class EndpointKeys(msrest.serialization.Model): @@ -12800,19 +12088,16 @@ class EndpointKeys(msrest.serialization.Model): """ _attribute_map = { - 'keys': {'key': 'keys', 'type': 'AccountApiKeys'}, + "keys": {"key": "keys", "type": "AccountApiKeys"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword keys: Dictionary of Keys for the endpoint. :paramtype keys: ~azure.mgmt.machinelearningservices.models.AccountApiKeys """ super(EndpointKeys, self).__init__(**kwargs) - self.keys = kwargs.get('keys', None) + self.keys = kwargs.get("keys", None) class EndpointModels(msrest.serialization.Model): @@ -12826,14 +12111,11 @@ class EndpointModels(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[AccountModel]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[AccountModel]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page constructed using the continuationToken. If null, there are no additional pages. @@ -12842,8 +12124,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.AccountModel] """ super(EndpointModels, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class EndpointResourcePropertiesBasicResource(Resource): @@ -12869,31 +12151,28 @@ class EndpointResourcePropertiesBasicResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'EndpointResourceProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "EndpointResourceProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. :paramtype properties: ~azure.mgmt.machinelearningservices.models.EndpointResourceProperties """ super(EndpointResourcePropertiesBasicResource, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class EndpointResourcePropertiesBasicResourceArmPaginatedResult(msrest.serialization.Model): @@ -12907,14 +12186,11 @@ class EndpointResourcePropertiesBasicResourceArmPaginatedResult(msrest.serializa """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[EndpointResourcePropertiesBasicResource]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[EndpointResourcePropertiesBasicResource]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: :paramtype next_link: str @@ -12923,8 +12199,8 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.EndpointResourcePropertiesBasicResource] """ super(EndpointResourcePropertiesBasicResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class EndpointScheduleAction(ScheduleActionBase): @@ -12947,19 +12223,16 @@ class EndpointScheduleAction(ScheduleActionBase): """ _validation = { - 'action_type': {'required': True}, - 'endpoint_invocation_definition': {'required': True}, + "action_type": {"required": True}, + "endpoint_invocation_definition": {"required": True}, } _attribute_map = { - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'endpoint_invocation_definition': {'key': 'endpointInvocationDefinition', 'type': 'object'}, + "action_type": {"key": "actionType", "type": "str"}, + "endpoint_invocation_definition": {"key": "endpointInvocationDefinition", "type": "object"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword endpoint_invocation_definition: Required. [Required] Defines Schedule action definition details. @@ -12971,8 +12244,8 @@ def __init__( :paramtype endpoint_invocation_definition: any """ super(EndpointScheduleAction, self).__init__(**kwargs) - self.action_type = 'InvokeBatchEndpoint' # type: str - self.endpoint_invocation_definition = kwargs['endpoint_invocation_definition'] + self.action_type = "InvokeBatchEndpoint" # type: str + self.endpoint_invocation_definition = kwargs["endpoint_invocation_definition"] class EnvironmentContainer(ProxyResource): @@ -12998,32 +12271,29 @@ class EnvironmentContainer(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'EnvironmentContainerProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "EnvironmentContainerProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentContainerProperties """ super(EnvironmentContainer, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class EnvironmentContainerProperties(AssetContainer): @@ -13050,25 +12320,22 @@ class EnvironmentContainerProperties(AssetContainer): """ _validation = { - 'latest_version': {'readonly': True}, - 'next_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "latest_version": {"readonly": True}, + "next_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'latest_version': {'key': 'latestVersion', 'type': 'str'}, - 'next_version': {'key': 'nextVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "latest_version": {"key": "latestVersion", "type": "str"}, + "next_version": {"key": "nextVersion", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -13094,14 +12361,11 @@ class EnvironmentContainerResourceArmPaginatedResult(msrest.serialization.Model) """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[EnvironmentContainer]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[EnvironmentContainer]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. @@ -13110,8 +12374,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentContainer] """ super(EnvironmentContainerResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class EnvironmentVariable(msrest.serialization.Model): @@ -13128,15 +12392,12 @@ class EnvironmentVariable(msrest.serialization.Model): """ _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "additional_properties": {"key": "", "type": "{object}"}, + "type": {"key": "type", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. @@ -13148,9 +12409,9 @@ def __init__( :paramtype value: str """ super(EnvironmentVariable, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = kwargs.get('type', "local") - self.value = kwargs.get('value', None) + self.additional_properties = kwargs.get("additional_properties", None) + self.type = kwargs.get("type", "local") + self.value = kwargs.get("value", None) class EnvironmentVersion(ProxyResource): @@ -13176,31 +12437,28 @@ class EnvironmentVersion(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'EnvironmentVersionProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "EnvironmentVersionProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.EnvironmentVersionProperties """ super(EnvironmentVersion, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class EnvironmentVersionProperties(AssetBase): @@ -13273,33 +12531,30 @@ class EnvironmentVersionProperties(AssetBase): """ _validation = { - 'environment_type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "environment_type": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'auto_rebuild': {'key': 'autoRebuild', 'type': 'str'}, - 'build': {'key': 'build', 'type': 'BuildContext'}, - 'conda_file': {'key': 'condaFile', 'type': 'str'}, - 'environment_type': {'key': 'environmentType', 'type': 'str'}, - 'image': {'key': 'image', 'type': 'str'}, - 'inference_config': {'key': 'inferenceConfig', 'type': 'InferenceContainerProperties'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'stage': {'key': 'stage', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "auto_rebuild": {"key": "autoRebuild", "type": "str"}, + "build": {"key": "build", "type": "BuildContext"}, + "conda_file": {"key": "condaFile", "type": "str"}, + "environment_type": {"key": "environmentType", "type": "str"}, + "image": {"key": "image", "type": "str"}, + "inference_config": {"key": "inferenceConfig", "type": "InferenceContainerProperties"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "os_type": {"key": "osType", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "stage": {"key": "stage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -13352,16 +12607,16 @@ def __init__( :paramtype stage: str """ super(EnvironmentVersionProperties, self).__init__(**kwargs) - self.auto_rebuild = kwargs.get('auto_rebuild', None) - self.build = kwargs.get('build', None) - self.conda_file = kwargs.get('conda_file', None) + self.auto_rebuild = kwargs.get("auto_rebuild", None) + self.build = kwargs.get("build", None) + self.conda_file = kwargs.get("conda_file", None) self.environment_type = None - self.image = kwargs.get('image', None) - self.inference_config = kwargs.get('inference_config', None) - self.intellectual_property = kwargs.get('intellectual_property', None) - self.os_type = kwargs.get('os_type', None) + self.image = kwargs.get("image", None) + self.inference_config = kwargs.get("inference_config", None) + self.intellectual_property = kwargs.get("intellectual_property", None) + self.os_type = kwargs.get("os_type", None) self.provisioning_state = None - self.stage = kwargs.get('stage', None) + self.stage = kwargs.get("stage", None) class EnvironmentVersionResourceArmPaginatedResult(msrest.serialization.Model): @@ -13375,14 +12630,11 @@ class EnvironmentVersionResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[EnvironmentVersion]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[EnvironmentVersion]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. @@ -13391,8 +12643,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.EnvironmentVersion] """ super(EnvironmentVersionResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class ErrorAdditionalInfo(msrest.serialization.Model): @@ -13407,21 +12659,17 @@ class ErrorAdditionalInfo(msrest.serialization.Model): """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + "type": {"readonly": True}, + "info": {"readonly": True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + "type": {"key": "type", "type": "str"}, + "info": {"key": "info", "type": "object"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -13445,27 +12693,23 @@ class ErrorDetail(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + "code": {"readonly": True}, + "message": {"readonly": True}, + "target": {"readonly": True}, + "details": {"readonly": True}, + "additional_info": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + "code": {"key": "code", "type": "str"}, + "message": {"key": "message", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "details": {"key": "details", "type": "[ErrorDetail]"}, + "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -13482,19 +12726,16 @@ class ErrorResponse(msrest.serialization.Model): """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword error: The error object. :paramtype error: ~azure.mgmt.machinelearningservices.models.ErrorDetail """ super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + self.error = kwargs.get("error", None) class EstimatedVMPrice(msrest.serialization.Model): @@ -13513,21 +12754,18 @@ class EstimatedVMPrice(msrest.serialization.Model): """ _validation = { - 'retail_price': {'required': True}, - 'os_type': {'required': True}, - 'vm_tier': {'required': True}, + "retail_price": {"required": True}, + "os_type": {"required": True}, + "vm_tier": {"required": True}, } _attribute_map = { - 'retail_price': {'key': 'retailPrice', 'type': 'float'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - 'vm_tier': {'key': 'vmTier', 'type': 'str'}, + "retail_price": {"key": "retailPrice", "type": "float"}, + "os_type": {"key": "osType", "type": "str"}, + "vm_tier": {"key": "vmTier", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword retail_price: Required. The price charged for using the VM. :paramtype retail_price: float @@ -13539,9 +12777,9 @@ def __init__( :paramtype vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier """ super(EstimatedVMPrice, self).__init__(**kwargs) - self.retail_price = kwargs['retail_price'] - self.os_type = kwargs['os_type'] - self.vm_tier = kwargs['vm_tier'] + self.retail_price = kwargs["retail_price"] + self.os_type = kwargs["os_type"] + self.vm_tier = kwargs["vm_tier"] class EstimatedVMPrices(msrest.serialization.Model): @@ -13561,21 +12799,18 @@ class EstimatedVMPrices(msrest.serialization.Model): """ _validation = { - 'billing_currency': {'required': True}, - 'unit_of_measure': {'required': True}, - 'values': {'required': True}, + "billing_currency": {"required": True}, + "unit_of_measure": {"required": True}, + "values": {"required": True}, } _attribute_map = { - 'billing_currency': {'key': 'billingCurrency', 'type': 'str'}, - 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[EstimatedVMPrice]'}, + "billing_currency": {"key": "billingCurrency", "type": "str"}, + "unit_of_measure": {"key": "unitOfMeasure", "type": "str"}, + "values": {"key": "values", "type": "[EstimatedVMPrice]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword billing_currency: Required. Three lettered code specifying the currency of the VM price. Example: USD. Possible values include: "USD". @@ -13588,9 +12823,9 @@ def __init__( :paramtype values: list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] """ super(EstimatedVMPrices, self).__init__(**kwargs) - self.billing_currency = kwargs['billing_currency'] - self.unit_of_measure = kwargs['unit_of_measure'] - self.values = kwargs['values'] + self.billing_currency = kwargs["billing_currency"] + self.unit_of_measure = kwargs["unit_of_measure"] + self.values = kwargs["values"] class ExternalFQDNResponse(msrest.serialization.Model): @@ -13601,19 +12836,16 @@ class ExternalFQDNResponse(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[FQDNEndpointsPropertyBag]'}, + "value": {"key": "value", "type": "[FQDNEndpointsPropertyBag]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: :paramtype value: list[~azure.mgmt.machinelearningservices.models.FQDNEndpointsPropertyBag] """ super(ExternalFQDNResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class Feature(ProxyResource): @@ -13639,31 +12871,28 @@ class Feature(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'FeatureProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "FeatureProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.FeatureProperties """ super(Feature, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class FeatureAttributionDriftMonitoringSignal(MonitoringSignalBase): @@ -13701,28 +12930,25 @@ class FeatureAttributionDriftMonitoringSignal(MonitoringSignalBase): """ _validation = { - 'signal_type': {'required': True}, - 'feature_importance_settings': {'required': True}, - 'metric_threshold': {'required': True}, - 'production_data': {'required': True}, - 'reference_data': {'required': True}, + "signal_type": {"required": True}, + "feature_importance_settings": {"required": True}, + "metric_threshold": {"required": True}, + "production_data": {"required": True}, + "reference_data": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'feature_data_type_override': {'key': 'featureDataTypeOverride', 'type': '{str}'}, - 'feature_importance_settings': {'key': 'featureImportanceSettings', 'type': 'FeatureImportanceSettings'}, - 'metric_threshold': {'key': 'metricThreshold', 'type': 'FeatureAttributionMetricThreshold'}, - 'production_data': {'key': 'productionData', 'type': '[MonitoringInputDataBase]'}, - 'reference_data': {'key': 'referenceData', 'type': 'MonitoringInputDataBase'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, + "feature_data_type_override": {"key": "featureDataTypeOverride", "type": "{str}"}, + "feature_importance_settings": {"key": "featureImportanceSettings", "type": "FeatureImportanceSettings"}, + "metric_threshold": {"key": "metricThreshold", "type": "FeatureAttributionMetricThreshold"}, + "production_data": {"key": "productionData", "type": "[MonitoringInputDataBase]"}, + "reference_data": {"key": "referenceData", "type": "MonitoringInputDataBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -13748,12 +12974,12 @@ def __init__( :paramtype reference_data: ~azure.mgmt.machinelearningservices.models.MonitoringInputDataBase """ super(FeatureAttributionDriftMonitoringSignal, self).__init__(**kwargs) - self.signal_type = 'FeatureAttributionDrift' # type: str - self.feature_data_type_override = kwargs.get('feature_data_type_override', None) - self.feature_importance_settings = kwargs['feature_importance_settings'] - self.metric_threshold = kwargs['metric_threshold'] - self.production_data = kwargs['production_data'] - self.reference_data = kwargs['reference_data'] + self.signal_type = "FeatureAttributionDrift" # type: str + self.feature_data_type_override = kwargs.get("feature_data_type_override", None) + self.feature_importance_settings = kwargs["feature_importance_settings"] + self.metric_threshold = kwargs["metric_threshold"] + self.production_data = kwargs["production_data"] + self.reference_data = kwargs["reference_data"] class FeatureAttributionMetricThreshold(msrest.serialization.Model): @@ -13770,18 +12996,15 @@ class FeatureAttributionMetricThreshold(msrest.serialization.Model): """ _validation = { - 'metric': {'required': True}, + "metric": {"required": True}, } _attribute_map = { - 'metric': {'key': 'metric', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, + "metric": {"key": "metric", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword metric: Required. [Required] The feature attribution metric to calculate. Possible values include: "NormalizedDiscountedCumulativeGain". @@ -13791,8 +13014,8 @@ def __init__( :paramtype threshold: ~azure.mgmt.machinelearningservices.models.MonitoringThreshold """ super(FeatureAttributionMetricThreshold, self).__init__(**kwargs) - self.metric = kwargs['metric'] - self.threshold = kwargs.get('threshold', None) + self.metric = kwargs["metric"] + self.threshold = kwargs.get("threshold", None) class FeatureImportanceSettings(msrest.serialization.Model): @@ -13806,14 +13029,11 @@ class FeatureImportanceSettings(msrest.serialization.Model): """ _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'target_column': {'key': 'targetColumn', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "target_column": {"key": "targetColumn", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: The mode of operation for computing feature importance. Possible values include: "Disabled", "Enabled". @@ -13822,8 +13042,8 @@ def __init__( :paramtype target_column: str """ super(FeatureImportanceSettings, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.target_column = kwargs.get('target_column', None) + self.mode = kwargs.get("mode", None) + self.target_column = kwargs.get("target_column", None) class FeatureProperties(ResourceBase): @@ -13843,17 +13063,14 @@ class FeatureProperties(ResourceBase): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'feature_name': {'key': 'featureName', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "data_type": {"key": "dataType", "type": "str"}, + "feature_name": {"key": "featureName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -13868,8 +13085,8 @@ def __init__( :paramtype feature_name: str """ super(FeatureProperties, self).__init__(**kwargs) - self.data_type = kwargs.get('data_type', None) - self.feature_name = kwargs.get('feature_name', None) + self.data_type = kwargs.get("data_type", None) + self.feature_name = kwargs.get("feature_name", None) class FeatureResourceArmPaginatedResult(msrest.serialization.Model): @@ -13883,14 +13100,11 @@ class FeatureResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[Feature]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[Feature]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of Feature objects. If null, there are no additional pages. @@ -13899,8 +13113,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.Feature] """ super(FeatureResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class FeaturesetContainer(ProxyResource): @@ -13926,31 +13140,28 @@ class FeaturesetContainer(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'FeaturesetContainerProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "FeaturesetContainerProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.FeaturesetContainerProperties """ super(FeaturesetContainer, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class FeaturesetContainerProperties(AssetContainer): @@ -13977,25 +13188,22 @@ class FeaturesetContainerProperties(AssetContainer): """ _validation = { - 'latest_version': {'readonly': True}, - 'next_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "latest_version": {"readonly": True}, + "next_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'latest_version': {'key': 'latestVersion', 'type': 'str'}, - 'next_version': {'key': 'nextVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "latest_version": {"key": "latestVersion", "type": "str"}, + "next_version": {"key": "nextVersion", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -14021,14 +13229,11 @@ class FeaturesetContainerResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[FeaturesetContainer]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[FeaturesetContainer]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. @@ -14037,8 +13242,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.FeaturesetContainer] """ super(FeaturesetContainerResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class FeaturesetSpecification(msrest.serialization.Model): @@ -14049,19 +13254,16 @@ class FeaturesetSpecification(msrest.serialization.Model): """ _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, + "path": {"key": "path", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword path: Specifies the spec path. :paramtype path: str """ super(FeaturesetSpecification, self).__init__(**kwargs) - self.path = kwargs.get('path', None) + self.path = kwargs.get("path", None) class FeaturesetVersion(ProxyResource): @@ -14087,31 +13289,28 @@ class FeaturesetVersion(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'FeaturesetVersionProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "FeaturesetVersionProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.FeaturesetVersionProperties """ super(FeaturesetVersion, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class FeaturesetVersionBackfillRequest(msrest.serialization.Model): @@ -14140,21 +13339,18 @@ class FeaturesetVersionBackfillRequest(msrest.serialization.Model): """ _attribute_map = { - 'data_availability_status': {'key': 'dataAvailabilityStatus', 'type': '[str]'}, - 'description': {'key': 'description', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'feature_window': {'key': 'featureWindow', 'type': 'FeatureWindow'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'resource': {'key': 'resource', 'type': 'MaterializationComputeResource'}, - 'spark_configuration': {'key': 'sparkConfiguration', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "data_availability_status": {"key": "dataAvailabilityStatus", "type": "[str]"}, + "description": {"key": "description", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "feature_window": {"key": "featureWindow", "type": "FeatureWindow"}, + "job_id": {"key": "jobId", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "resource": {"key": "resource", "type": "MaterializationComputeResource"}, + "spark_configuration": {"key": "sparkConfiguration", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword data_availability_status: Specified the data availability status that you want to backfill. @@ -14178,15 +13374,15 @@ def __init__( :paramtype tags: dict[str, str] """ super(FeaturesetVersionBackfillRequest, self).__init__(**kwargs) - self.data_availability_status = kwargs.get('data_availability_status', None) - self.description = kwargs.get('description', None) - self.display_name = kwargs.get('display_name', None) - self.feature_window = kwargs.get('feature_window', None) - self.job_id = kwargs.get('job_id', None) - self.properties = kwargs.get('properties', None) - self.resource = kwargs.get('resource', None) - self.spark_configuration = kwargs.get('spark_configuration', None) - self.tags = kwargs.get('tags', None) + self.data_availability_status = kwargs.get("data_availability_status", None) + self.description = kwargs.get("description", None) + self.display_name = kwargs.get("display_name", None) + self.feature_window = kwargs.get("feature_window", None) + self.job_id = kwargs.get("job_id", None) + self.properties = kwargs.get("properties", None) + self.resource = kwargs.get("resource", None) + self.spark_configuration = kwargs.get("spark_configuration", None) + self.tags = kwargs.get("tags", None) class FeaturesetVersionBackfillResponse(msrest.serialization.Model): @@ -14197,19 +13393,16 @@ class FeaturesetVersionBackfillResponse(msrest.serialization.Model): """ _attribute_map = { - 'job_ids': {'key': 'jobIds', 'type': '[str]'}, + "job_ids": {"key": "jobIds", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword job_ids: List of jobs submitted as part of the backfill request. :paramtype job_ids: list[str] """ super(FeaturesetVersionBackfillResponse, self).__init__(**kwargs) - self.job_ids = kwargs.get('job_ids', None) + self.job_ids = kwargs.get("job_ids", None) class FeaturesetVersionProperties(AssetBase): @@ -14247,27 +13440,24 @@ class FeaturesetVersionProperties(AssetBase): """ _validation = { - 'provisioning_state': {'readonly': True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'entities': {'key': 'entities', 'type': '[str]'}, - 'materialization_settings': {'key': 'materializationSettings', 'type': 'MaterializationSettings'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'specification': {'key': 'specification', 'type': 'FeaturesetSpecification'}, - 'stage': {'key': 'stage', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "entities": {"key": "entities", "type": "[str]"}, + "materialization_settings": {"key": "materializationSettings", "type": "MaterializationSettings"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "specification": {"key": "specification", "type": "FeaturesetSpecification"}, + "stage": {"key": "stage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -14294,11 +13484,11 @@ def __init__( :paramtype stage: str """ super(FeaturesetVersionProperties, self).__init__(**kwargs) - self.entities = kwargs.get('entities', None) - self.materialization_settings = kwargs.get('materialization_settings', None) + self.entities = kwargs.get("entities", None) + self.materialization_settings = kwargs.get("materialization_settings", None) self.provisioning_state = None - self.specification = kwargs.get('specification', None) - self.stage = kwargs.get('stage', None) + self.specification = kwargs.get("specification", None) + self.stage = kwargs.get("stage", None) class FeaturesetVersionResourceArmPaginatedResult(msrest.serialization.Model): @@ -14312,14 +13502,11 @@ class FeaturesetVersionResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[FeaturesetVersion]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[FeaturesetVersion]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. @@ -14328,8 +13515,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.FeaturesetVersion] """ super(FeaturesetVersionResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class FeaturestoreEntityContainer(ProxyResource): @@ -14356,32 +13543,29 @@ class FeaturestoreEntityContainer(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'FeaturestoreEntityContainerProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "FeaturestoreEntityContainerProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.FeaturestoreEntityContainerProperties """ super(FeaturestoreEntityContainer, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class FeaturestoreEntityContainerProperties(AssetContainer): @@ -14408,25 +13592,22 @@ class FeaturestoreEntityContainerProperties(AssetContainer): """ _validation = { - 'latest_version': {'readonly': True}, - 'next_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "latest_version": {"readonly": True}, + "next_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'latest_version': {'key': 'latestVersion', 'type': 'str'}, - 'next_version': {'key': 'nextVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "latest_version": {"key": "latestVersion", "type": "str"}, + "next_version": {"key": "nextVersion", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -14452,14 +13633,11 @@ class FeaturestoreEntityContainerResourceArmPaginatedResult(msrest.serialization """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[FeaturestoreEntityContainer]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[FeaturestoreEntityContainer]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. @@ -14468,8 +13646,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.FeaturestoreEntityContainer] """ super(FeaturestoreEntityContainerResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class FeaturestoreEntityVersion(ProxyResource): @@ -14496,32 +13674,29 @@ class FeaturestoreEntityVersion(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'FeaturestoreEntityVersionProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "FeaturestoreEntityVersionProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.FeaturestoreEntityVersionProperties """ super(FeaturestoreEntityVersion, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class FeaturestoreEntityVersionProperties(AssetBase): @@ -14554,25 +13729,22 @@ class FeaturestoreEntityVersionProperties(AssetBase): """ _validation = { - 'provisioning_state': {'readonly': True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'index_columns': {'key': 'indexColumns', 'type': '[IndexColumn]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'stage': {'key': 'stage', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "index_columns": {"key": "indexColumns", "type": "[IndexColumn]"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "stage": {"key": "stage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -14594,9 +13766,9 @@ def __init__( :paramtype stage: str """ super(FeaturestoreEntityVersionProperties, self).__init__(**kwargs) - self.index_columns = kwargs.get('index_columns', None) + self.index_columns = kwargs.get("index_columns", None) self.provisioning_state = None - self.stage = kwargs.get('stage', None) + self.stage = kwargs.get("stage", None) class FeaturestoreEntityVersionResourceArmPaginatedResult(msrest.serialization.Model): @@ -14610,14 +13782,11 @@ class FeaturestoreEntityVersionResourceArmPaginatedResult(msrest.serialization.M """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[FeaturestoreEntityVersion]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[FeaturestoreEntityVersion]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. @@ -14626,8 +13795,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.FeaturestoreEntityVersion] """ super(FeaturestoreEntityVersionResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class FeatureStoreSettings(msrest.serialization.Model): @@ -14642,15 +13811,12 @@ class FeatureStoreSettings(msrest.serialization.Model): """ _attribute_map = { - 'compute_runtime': {'key': 'computeRuntime', 'type': 'ComputeRuntimeDto'}, - 'offline_store_connection_name': {'key': 'offlineStoreConnectionName', 'type': 'str'}, - 'online_store_connection_name': {'key': 'onlineStoreConnectionName', 'type': 'str'}, + "compute_runtime": {"key": "computeRuntime", "type": "ComputeRuntimeDto"}, + "offline_store_connection_name": {"key": "offlineStoreConnectionName", "type": "str"}, + "online_store_connection_name": {"key": "onlineStoreConnectionName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword compute_runtime: :paramtype compute_runtime: ~azure.mgmt.machinelearningservices.models.ComputeRuntimeDto @@ -14660,9 +13826,9 @@ def __init__( :paramtype online_store_connection_name: str """ super(FeatureStoreSettings, self).__init__(**kwargs) - self.compute_runtime = kwargs.get('compute_runtime', None) - self.offline_store_connection_name = kwargs.get('offline_store_connection_name', None) - self.online_store_connection_name = kwargs.get('online_store_connection_name', None) + self.compute_runtime = kwargs.get("compute_runtime", None) + self.offline_store_connection_name = kwargs.get("offline_store_connection_name", None) + self.online_store_connection_name = kwargs.get("online_store_connection_name", None) class FeatureSubset(MonitoringFeatureFilterBase): @@ -14680,26 +13846,23 @@ class FeatureSubset(MonitoringFeatureFilterBase): """ _validation = { - 'filter_type': {'required': True}, - 'features': {'required': True}, + "filter_type": {"required": True}, + "features": {"required": True}, } _attribute_map = { - 'filter_type': {'key': 'filterType', 'type': 'str'}, - 'features': {'key': 'features', 'type': '[str]'}, + "filter_type": {"key": "filterType", "type": "str"}, + "features": {"key": "features", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword features: Required. [Required] The list of features to include. :paramtype features: list[str] """ super(FeatureSubset, self).__init__(**kwargs) - self.filter_type = 'FeatureSubset' # type: str - self.features = kwargs['features'] + self.filter_type = "FeatureSubset" # type: str + self.features = kwargs["features"] class FeatureWindow(msrest.serialization.Model): @@ -14712,14 +13875,11 @@ class FeatureWindow(msrest.serialization.Model): """ _attribute_map = { - 'feature_window_end': {'key': 'featureWindowEnd', 'type': 'iso-8601'}, - 'feature_window_start': {'key': 'featureWindowStart', 'type': 'iso-8601'}, + "feature_window_end": {"key": "featureWindowEnd", "type": "iso-8601"}, + "feature_window_start": {"key": "featureWindowStart", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword feature_window_end: Specifies the feature window end time. :paramtype feature_window_end: ~datetime.datetime @@ -14727,8 +13887,8 @@ def __init__( :paramtype feature_window_start: ~datetime.datetime """ super(FeatureWindow, self).__init__(**kwargs) - self.feature_window_end = kwargs.get('feature_window_end', None) - self.feature_window_start = kwargs.get('feature_window_start', None) + self.feature_window_end = kwargs.get("feature_window_end", None) + self.feature_window_start = kwargs.get("feature_window_start", None) class FeaturizationSettings(msrest.serialization.Model): @@ -14739,19 +13899,16 @@ class FeaturizationSettings(msrest.serialization.Model): """ _attribute_map = { - 'dataset_language': {'key': 'datasetLanguage', 'type': 'str'}, + "dataset_language": {"key": "datasetLanguage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword dataset_language: Dataset language, useful for the text data. :paramtype dataset_language: str """ super(FeaturizationSettings, self).__init__(**kwargs) - self.dataset_language = kwargs.get('dataset_language', None) + self.dataset_language = kwargs.get("dataset_language", None) class FileSystemSource(DataImportSource): @@ -14769,19 +13926,16 @@ class FileSystemSource(DataImportSource): """ _validation = { - 'source_type': {'required': True}, + "source_type": {"required": True}, } _attribute_map = { - 'connection': {'key': 'connection', 'type': 'str'}, - 'source_type': {'key': 'sourceType', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, + "connection": {"key": "connection", "type": "str"}, + "source_type": {"key": "sourceType", "type": "str"}, + "path": {"key": "path", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword connection: Workspace connection for data import source storage. :paramtype connection: str @@ -14789,8 +13943,8 @@ def __init__( :paramtype path: str """ super(FileSystemSource, self).__init__(**kwargs) - self.source_type = 'file_system' # type: str - self.path = kwargs.get('path', None) + self.source_type = "file_system" # type: str + self.path = kwargs.get("path", None) class FineTuningJob(JobBaseProperties): @@ -14844,35 +13998,32 @@ class FineTuningJob(JobBaseProperties): """ _validation = { - 'job_type': {'required': True}, - 'status': {'readonly': True}, - 'fine_tuning_details': {'required': True}, - 'outputs': {'required': True}, + "job_type": {"required": True}, + "status": {"readonly": True}, + "fine_tuning_details": {"required": True}, + "outputs": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'compute_id': {'key': 'computeId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'experiment_name': {'key': 'experimentName', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'notification_setting': {'key': 'notificationSetting', 'type': 'NotificationSetting'}, - 'secrets_configuration': {'key': 'secretsConfiguration', 'type': '{SecretConfiguration}'}, - 'services': {'key': 'services', 'type': '{JobService}'}, - 'status': {'key': 'status', 'type': 'str'}, - 'fine_tuning_details': {'key': 'fineTuningDetails', 'type': 'FineTuningVertical'}, - 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "component_id": {"key": "componentId", "type": "str"}, + "compute_id": {"key": "computeId", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "experiment_name": {"key": "experimentName", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityConfiguration"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "job_type": {"key": "jobType", "type": "str"}, + "notification_setting": {"key": "notificationSetting", "type": "NotificationSetting"}, + "secrets_configuration": {"key": "secretsConfiguration", "type": "{SecretConfiguration}"}, + "services": {"key": "services", "type": "{JobService}"}, + "status": {"key": "status", "type": "str"}, + "fine_tuning_details": {"key": "fineTuningDetails", "type": "FineTuningVertical"}, + "outputs": {"key": "outputs", "type": "{JobOutput}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -14909,9 +14060,9 @@ def __init__( :paramtype outputs: dict[str, ~azure.mgmt.machinelearningservices.models.JobOutput] """ super(FineTuningJob, self).__init__(**kwargs) - self.job_type = 'FineTuning' # type: str - self.fine_tuning_details = kwargs['fine_tuning_details'] - self.outputs = kwargs['outputs'] + self.job_type = "FineTuning" # type: str + self.fine_tuning_details = kwargs["fine_tuning_details"] + self.outputs = kwargs["outputs"] class MonitoringInputDataBase(msrest.serialization.Model): @@ -14938,27 +14089,24 @@ class MonitoringInputDataBase(msrest.serialization.Model): """ _validation = { - 'input_data_type': {'required': True}, - 'job_input_type': {'required': True}, - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "input_data_type": {"required": True}, + "job_input_type": {"required": True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'columns': {'key': 'columns', 'type': '{str}'}, - 'data_context': {'key': 'dataContext', 'type': 'str'}, - 'input_data_type': {'key': 'inputDataType', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, + "columns": {"key": "columns", "type": "{str}"}, + "data_context": {"key": "dataContext", "type": "str"}, + "input_data_type": {"key": "inputDataType", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, } _subtype_map = { - 'input_data_type': {'Fixed': 'FixedInputData', 'Rolling': 'RollingInputData', 'Static': 'StaticInputData'} + "input_data_type": {"Fixed": "FixedInputData", "Rolling": "RollingInputData", "Static": "StaticInputData"} } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword columns: Mapping of column names to special uses. :paramtype columns: dict[str, str] @@ -14972,11 +14120,11 @@ def __init__( :paramtype uri: str """ super(MonitoringInputDataBase, self).__init__(**kwargs) - self.columns = kwargs.get('columns', None) - self.data_context = kwargs.get('data_context', None) + self.columns = kwargs.get("columns", None) + self.data_context = kwargs.get("data_context", None) self.input_data_type = None # type: Optional[str] - self.job_input_type = kwargs['job_input_type'] - self.uri = kwargs['uri'] + self.job_input_type = kwargs["job_input_type"] + self.uri = kwargs["uri"] class FixedInputData(MonitoringInputDataBase): @@ -15000,23 +14148,20 @@ class FixedInputData(MonitoringInputDataBase): """ _validation = { - 'input_data_type': {'required': True}, - 'job_input_type': {'required': True}, - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "input_data_type": {"required": True}, + "job_input_type": {"required": True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'columns': {'key': 'columns', 'type': '{str}'}, - 'data_context': {'key': 'dataContext', 'type': 'str'}, - 'input_data_type': {'key': 'inputDataType', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, + "columns": {"key": "columns", "type": "{str}"}, + "data_context": {"key": "dataContext", "type": "str"}, + "input_data_type": {"key": "inputDataType", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword columns: Mapping of column names to special uses. :paramtype columns: dict[str, str] @@ -15030,7 +14175,7 @@ def __init__( :paramtype uri: str """ super(FixedInputData, self).__init__(**kwargs) - self.input_data_type = 'Fixed' # type: str + self.input_data_type = "Fixed" # type: str class FlavorData(msrest.serialization.Model): @@ -15041,19 +14186,16 @@ class FlavorData(msrest.serialization.Model): """ _attribute_map = { - 'data': {'key': 'data', 'type': '{str}'}, + "data": {"key": "data", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword data: Model flavor-specific data. :paramtype data: dict[str, str] """ super(FlavorData, self).__init__(**kwargs) - self.data = kwargs.get('data', None) + self.data = kwargs.get("data", None) class Forecasting(AutoMLVertical, TableVertical): @@ -15122,36 +14264,33 @@ class Forecasting(AutoMLVertical, TableVertical): """ _validation = { - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'cv_split_column_names': {'key': 'cvSplitColumnNames', 'type': '[str]'}, - 'featurization_settings': {'key': 'featurizationSettings', 'type': 'TableVerticalFeaturizationSettings'}, - 'fixed_parameters': {'key': 'fixedParameters', 'type': 'TableFixedParameters'}, - 'limit_settings': {'key': 'limitSettings', 'type': 'TableVerticalLimitSettings'}, - 'n_cross_validations': {'key': 'nCrossValidations', 'type': 'NCrossValidations'}, - 'search_space': {'key': 'searchSpace', 'type': '[TableParameterSubspace]'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'TableSweepSettings'}, - 'test_data': {'key': 'testData', 'type': 'MLTableJobInput'}, - 'test_data_size': {'key': 'testDataSize', 'type': 'float'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'weight_column_name': {'key': 'weightColumnName', 'type': 'str'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'forecasting_settings': {'key': 'forecastingSettings', 'type': 'ForecastingSettings'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, - 'training_settings': {'key': 'trainingSettings', 'type': 'ForecastingTrainingSettings'}, + "cv_split_column_names": {"key": "cvSplitColumnNames", "type": "[str]"}, + "featurization_settings": {"key": "featurizationSettings", "type": "TableVerticalFeaturizationSettings"}, + "fixed_parameters": {"key": "fixedParameters", "type": "TableFixedParameters"}, + "limit_settings": {"key": "limitSettings", "type": "TableVerticalLimitSettings"}, + "n_cross_validations": {"key": "nCrossValidations", "type": "NCrossValidations"}, + "search_space": {"key": "searchSpace", "type": "[TableParameterSubspace]"}, + "sweep_settings": {"key": "sweepSettings", "type": "TableSweepSettings"}, + "test_data": {"key": "testData", "type": "MLTableJobInput"}, + "test_data_size": {"key": "testDataSize", "type": "float"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "weight_column_name": {"key": "weightColumnName", "type": "str"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "forecasting_settings": {"key": "forecastingSettings", "type": "ForecastingSettings"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, + "training_settings": {"key": "trainingSettings", "type": "ForecastingTrainingSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword cv_split_column_names: Columns to use for CVSplit data. :paramtype cv_split_column_names: list[str] @@ -15211,25 +14350,25 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ForecastingTrainingSettings """ super(Forecasting, self).__init__(**kwargs) - self.cv_split_column_names = kwargs.get('cv_split_column_names', None) - self.featurization_settings = kwargs.get('featurization_settings', None) - self.fixed_parameters = kwargs.get('fixed_parameters', None) - self.limit_settings = kwargs.get('limit_settings', None) - self.n_cross_validations = kwargs.get('n_cross_validations', None) - self.search_space = kwargs.get('search_space', None) - self.sweep_settings = kwargs.get('sweep_settings', None) - self.test_data = kwargs.get('test_data', None) - self.test_data_size = kwargs.get('test_data_size', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) - self.weight_column_name = kwargs.get('weight_column_name', None) - self.task_type = 'Forecasting' # type: str - self.forecasting_settings = kwargs.get('forecasting_settings', None) - self.primary_metric = kwargs.get('primary_metric', None) - self.training_settings = kwargs.get('training_settings', None) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.cv_split_column_names = kwargs.get("cv_split_column_names", None) + self.featurization_settings = kwargs.get("featurization_settings", None) + self.fixed_parameters = kwargs.get("fixed_parameters", None) + self.limit_settings = kwargs.get("limit_settings", None) + self.n_cross_validations = kwargs.get("n_cross_validations", None) + self.search_space = kwargs.get("search_space", None) + self.sweep_settings = kwargs.get("sweep_settings", None) + self.test_data = kwargs.get("test_data", None) + self.test_data_size = kwargs.get("test_data_size", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) + self.weight_column_name = kwargs.get("weight_column_name", None) + self.task_type = "Forecasting" # type: str + self.forecasting_settings = kwargs.get("forecasting_settings", None) + self.primary_metric = kwargs.get("primary_metric", None) + self.training_settings = kwargs.get("training_settings", None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class ForecastingSettings(msrest.serialization.Model): @@ -15292,26 +14431,23 @@ class ForecastingSettings(msrest.serialization.Model): """ _attribute_map = { - 'country_or_region_for_holidays': {'key': 'countryOrRegionForHolidays', 'type': 'str'}, - 'cv_step_size': {'key': 'cvStepSize', 'type': 'int'}, - 'feature_lags': {'key': 'featureLags', 'type': 'str'}, - 'features_unknown_at_forecast_time': {'key': 'featuresUnknownAtForecastTime', 'type': '[str]'}, - 'forecast_horizon': {'key': 'forecastHorizon', 'type': 'ForecastHorizon'}, - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'seasonality': {'key': 'seasonality', 'type': 'Seasonality'}, - 'short_series_handling_config': {'key': 'shortSeriesHandlingConfig', 'type': 'str'}, - 'target_aggregate_function': {'key': 'targetAggregateFunction', 'type': 'str'}, - 'target_lags': {'key': 'targetLags', 'type': 'TargetLags'}, - 'target_rolling_window_size': {'key': 'targetRollingWindowSize', 'type': 'TargetRollingWindowSize'}, - 'time_column_name': {'key': 'timeColumnName', 'type': 'str'}, - 'time_series_id_column_names': {'key': 'timeSeriesIdColumnNames', 'type': '[str]'}, - 'use_stl': {'key': 'useStl', 'type': 'str'}, + "country_or_region_for_holidays": {"key": "countryOrRegionForHolidays", "type": "str"}, + "cv_step_size": {"key": "cvStepSize", "type": "int"}, + "feature_lags": {"key": "featureLags", "type": "str"}, + "features_unknown_at_forecast_time": {"key": "featuresUnknownAtForecastTime", "type": "[str]"}, + "forecast_horizon": {"key": "forecastHorizon", "type": "ForecastHorizon"}, + "frequency": {"key": "frequency", "type": "str"}, + "seasonality": {"key": "seasonality", "type": "Seasonality"}, + "short_series_handling_config": {"key": "shortSeriesHandlingConfig", "type": "str"}, + "target_aggregate_function": {"key": "targetAggregateFunction", "type": "str"}, + "target_lags": {"key": "targetLags", "type": "TargetLags"}, + "target_rolling_window_size": {"key": "targetRollingWindowSize", "type": "TargetRollingWindowSize"}, + "time_column_name": {"key": "timeColumnName", "type": "str"}, + "time_series_id_column_names": {"key": "timeSeriesIdColumnNames", "type": "[str]"}, + "use_stl": {"key": "useStl", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword country_or_region_for_holidays: Country or region for holidays for forecasting tasks. These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. @@ -15371,20 +14507,20 @@ def __init__( :paramtype use_stl: str or ~azure.mgmt.machinelearningservices.models.UseStl """ super(ForecastingSettings, self).__init__(**kwargs) - self.country_or_region_for_holidays = kwargs.get('country_or_region_for_holidays', None) - self.cv_step_size = kwargs.get('cv_step_size', None) - self.feature_lags = kwargs.get('feature_lags', None) - self.features_unknown_at_forecast_time = kwargs.get('features_unknown_at_forecast_time', None) - self.forecast_horizon = kwargs.get('forecast_horizon', None) - self.frequency = kwargs.get('frequency', None) - self.seasonality = kwargs.get('seasonality', None) - self.short_series_handling_config = kwargs.get('short_series_handling_config', None) - self.target_aggregate_function = kwargs.get('target_aggregate_function', None) - self.target_lags = kwargs.get('target_lags', None) - self.target_rolling_window_size = kwargs.get('target_rolling_window_size', None) - self.time_column_name = kwargs.get('time_column_name', None) - self.time_series_id_column_names = kwargs.get('time_series_id_column_names', None) - self.use_stl = kwargs.get('use_stl', None) + self.country_or_region_for_holidays = kwargs.get("country_or_region_for_holidays", None) + self.cv_step_size = kwargs.get("cv_step_size", None) + self.feature_lags = kwargs.get("feature_lags", None) + self.features_unknown_at_forecast_time = kwargs.get("features_unknown_at_forecast_time", None) + self.forecast_horizon = kwargs.get("forecast_horizon", None) + self.frequency = kwargs.get("frequency", None) + self.seasonality = kwargs.get("seasonality", None) + self.short_series_handling_config = kwargs.get("short_series_handling_config", None) + self.target_aggregate_function = kwargs.get("target_aggregate_function", None) + self.target_lags = kwargs.get("target_lags", None) + self.target_rolling_window_size = kwargs.get("target_rolling_window_size", None) + self.time_column_name = kwargs.get("time_column_name", None) + self.time_series_id_column_names = kwargs.get("time_series_id_column_names", None) + self.use_stl = kwargs.get("use_stl", None) class ForecastingTrainingSettings(TrainingSettings): @@ -15424,22 +14560,19 @@ class ForecastingTrainingSettings(TrainingSettings): """ _attribute_map = { - 'enable_dnn_training': {'key': 'enableDnnTraining', 'type': 'bool'}, - 'enable_model_explainability': {'key': 'enableModelExplainability', 'type': 'bool'}, - 'enable_onnx_compatible_models': {'key': 'enableOnnxCompatibleModels', 'type': 'bool'}, - 'enable_stack_ensemble': {'key': 'enableStackEnsemble', 'type': 'bool'}, - 'enable_vote_ensemble': {'key': 'enableVoteEnsemble', 'type': 'bool'}, - 'ensemble_model_download_timeout': {'key': 'ensembleModelDownloadTimeout', 'type': 'duration'}, - 'stack_ensemble_settings': {'key': 'stackEnsembleSettings', 'type': 'StackEnsembleSettings'}, - 'training_mode': {'key': 'trainingMode', 'type': 'str'}, - 'allowed_training_algorithms': {'key': 'allowedTrainingAlgorithms', 'type': '[str]'}, - 'blocked_training_algorithms': {'key': 'blockedTrainingAlgorithms', 'type': '[str]'}, + "enable_dnn_training": {"key": "enableDnnTraining", "type": "bool"}, + "enable_model_explainability": {"key": "enableModelExplainability", "type": "bool"}, + "enable_onnx_compatible_models": {"key": "enableOnnxCompatibleModels", "type": "bool"}, + "enable_stack_ensemble": {"key": "enableStackEnsemble", "type": "bool"}, + "enable_vote_ensemble": {"key": "enableVoteEnsemble", "type": "bool"}, + "ensemble_model_download_timeout": {"key": "ensembleModelDownloadTimeout", "type": "duration"}, + "stack_ensemble_settings": {"key": "stackEnsembleSettings", "type": "StackEnsembleSettings"}, + "training_mode": {"key": "trainingMode", "type": "str"}, + "allowed_training_algorithms": {"key": "allowedTrainingAlgorithms", "type": "[str]"}, + "blocked_training_algorithms": {"key": "blockedTrainingAlgorithms", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword enable_dnn_training: Enable recommendation of DNN models. :paramtype enable_dnn_training: bool @@ -15474,8 +14607,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ForecastingModels] """ super(ForecastingTrainingSettings, self).__init__(**kwargs) - self.allowed_training_algorithms = kwargs.get('allowed_training_algorithms', None) - self.blocked_training_algorithms = kwargs.get('blocked_training_algorithms', None) + self.allowed_training_algorithms = kwargs.get("allowed_training_algorithms", None) + self.blocked_training_algorithms = kwargs.get("blocked_training_algorithms", None) class FQDNEndpoint(msrest.serialization.Model): @@ -15488,14 +14621,11 @@ class FQDNEndpoint(msrest.serialization.Model): """ _attribute_map = { - 'domain_name': {'key': 'domainName', 'type': 'str'}, - 'endpoint_details': {'key': 'endpointDetails', 'type': '[FQDNEndpointDetail]'}, + "domain_name": {"key": "domainName", "type": "str"}, + "endpoint_details": {"key": "endpointDetails", "type": "[FQDNEndpointDetail]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword domain_name: :paramtype domain_name: str @@ -15504,8 +14634,8 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.FQDNEndpointDetail] """ super(FQDNEndpoint, self).__init__(**kwargs) - self.domain_name = kwargs.get('domain_name', None) - self.endpoint_details = kwargs.get('endpoint_details', None) + self.domain_name = kwargs.get("domain_name", None) + self.endpoint_details = kwargs.get("endpoint_details", None) class FQDNEndpointDetail(msrest.serialization.Model): @@ -15516,19 +14646,16 @@ class FQDNEndpointDetail(msrest.serialization.Model): """ _attribute_map = { - 'port': {'key': 'port', 'type': 'int'}, + "port": {"key": "port", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword port: :paramtype port: int """ super(FQDNEndpointDetail, self).__init__(**kwargs) - self.port = kwargs.get('port', None) + self.port = kwargs.get("port", None) class FQDNEndpoints(msrest.serialization.Model): @@ -15541,14 +14668,11 @@ class FQDNEndpoints(msrest.serialization.Model): """ _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'endpoints': {'key': 'endpoints', 'type': '[FQDNEndpoint]'}, + "category": {"key": "category", "type": "str"}, + "endpoints": {"key": "endpoints", "type": "[FQDNEndpoint]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: :paramtype category: str @@ -15556,8 +14680,8 @@ def __init__( :paramtype endpoints: list[~azure.mgmt.machinelearningservices.models.FQDNEndpoint] """ super(FQDNEndpoints, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.endpoints = kwargs.get('endpoints', None) + self.category = kwargs.get("category", None) + self.endpoints = kwargs.get("endpoints", None) class FQDNEndpointsPropertyBag(msrest.serialization.Model): @@ -15568,19 +14692,16 @@ class FQDNEndpointsPropertyBag(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'FQDNEndpoints'}, + "properties": {"key": "properties", "type": "FQDNEndpoints"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: :paramtype properties: ~azure.mgmt.machinelearningservices.models.FQDNEndpoints """ super(FQDNEndpointsPropertyBag, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class OutboundRule(msrest.serialization.Model): @@ -15604,24 +14725,24 @@ class OutboundRule(msrest.serialization.Model): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "category": {"key": "category", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "type": {"key": "type", "type": "str"}, } _subtype_map = { - 'type': {'FQDN': 'FqdnOutboundRule', 'PrivateEndpoint': 'PrivateEndpointOutboundRule', - 'ServiceTag': 'ServiceTagOutboundRule'} + "type": { + "FQDN": "FqdnOutboundRule", + "PrivateEndpoint": "PrivateEndpointOutboundRule", + "ServiceTag": "ServiceTagOutboundRule", + } } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of a managed network Outbound Rule of a machine learning workspace. Possible values include: "Required", "Recommended", "UserDefined". @@ -15631,8 +14752,8 @@ def __init__( :paramtype status: str or ~azure.mgmt.machinelearningservices.models.RuleStatus """ super(OutboundRule, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.status = kwargs.get('status', None) + self.category = kwargs.get("category", None) + self.status = kwargs.get("status", None) self.type = None # type: Optional[str] @@ -15656,20 +14777,17 @@ class FqdnOutboundRule(OutboundRule): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'destination': {'key': 'destination', 'type': 'str'}, + "category": {"key": "category", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "destination": {"key": "destination", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of a managed network Outbound Rule of a machine learning workspace. Possible values include: "Required", "Recommended", "UserDefined". @@ -15681,8 +14799,8 @@ def __init__( :paramtype destination: str """ super(FqdnOutboundRule, self).__init__(**kwargs) - self.type = 'FQDN' # type: str - self.destination = kwargs.get('destination', None) + self.type = "FQDN" # type: str + self.destination = kwargs.get("destination", None) class GenerationSafetyQualityMetricThreshold(msrest.serialization.Model): @@ -15705,18 +14823,15 @@ class GenerationSafetyQualityMetricThreshold(msrest.serialization.Model): """ _validation = { - 'metric': {'required': True}, + "metric": {"required": True}, } _attribute_map = { - 'metric': {'key': 'metric', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, + "metric": {"key": "metric", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword metric: Required. [Required] Gets or sets the feature attribution metric to calculate. Possible values include: "AcceptableGroundednessScorePerInstance", @@ -15732,8 +14847,8 @@ def __init__( :paramtype threshold: ~azure.mgmt.machinelearningservices.models.MonitoringThreshold """ super(GenerationSafetyQualityMetricThreshold, self).__init__(**kwargs) - self.metric = kwargs['metric'] - self.threshold = kwargs.get('threshold', None) + self.metric = kwargs["metric"] + self.threshold = kwargs.get("threshold", None) class GenerationSafetyQualityMonitoringSignal(MonitoringSignalBase): @@ -15767,25 +14882,22 @@ class GenerationSafetyQualityMonitoringSignal(MonitoringSignalBase): """ _validation = { - 'signal_type': {'required': True}, - 'metric_thresholds': {'required': True}, - 'sampling_rate': {'required': True}, + "signal_type": {"required": True}, + "metric_thresholds": {"required": True}, + "sampling_rate": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'metric_thresholds': {'key': 'metricThresholds', 'type': '[GenerationSafetyQualityMetricThreshold]'}, - 'production_data': {'key': 'productionData', 'type': '[MonitoringInputDataBase]'}, - 'sampling_rate': {'key': 'samplingRate', 'type': 'float'}, - 'workspace_connection_id': {'key': 'workspaceConnectionId', 'type': 'str'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, + "metric_thresholds": {"key": "metricThresholds", "type": "[GenerationSafetyQualityMetricThreshold]"}, + "production_data": {"key": "productionData", "type": "[MonitoringInputDataBase]"}, + "sampling_rate": {"key": "samplingRate", "type": "float"}, + "workspace_connection_id": {"key": "workspaceConnectionId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -15807,11 +14919,11 @@ def __init__( :paramtype workspace_connection_id: str """ super(GenerationSafetyQualityMonitoringSignal, self).__init__(**kwargs) - self.signal_type = 'GenerationSafetyQuality' # type: str - self.metric_thresholds = kwargs['metric_thresholds'] - self.production_data = kwargs.get('production_data', None) - self.sampling_rate = kwargs['sampling_rate'] - self.workspace_connection_id = kwargs.get('workspace_connection_id', None) + self.signal_type = "GenerationSafetyQuality" # type: str + self.metric_thresholds = kwargs["metric_thresholds"] + self.production_data = kwargs.get("production_data", None) + self.sampling_rate = kwargs["sampling_rate"] + self.workspace_connection_id = kwargs.get("workspace_connection_id", None) class GenerationTokenUsageMetricThreshold(msrest.serialization.Model): @@ -15828,18 +14940,15 @@ class GenerationTokenUsageMetricThreshold(msrest.serialization.Model): """ _validation = { - 'metric': {'required': True}, + "metric": {"required": True}, } _attribute_map = { - 'metric': {'key': 'metric', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, + "metric": {"key": "metric", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword metric: Required. [Required] Gets or sets the feature attribution metric to calculate. Possible values include: "TotalTokenCount", "TotalTokenCountPerGroup". @@ -15849,8 +14958,8 @@ def __init__( :paramtype threshold: ~azure.mgmt.machinelearningservices.models.MonitoringThreshold """ super(GenerationTokenUsageMetricThreshold, self).__init__(**kwargs) - self.metric = kwargs['metric'] - self.threshold = kwargs.get('threshold', None) + self.metric = kwargs["metric"] + self.threshold = kwargs.get("threshold", None) class GenerationTokenUsageSignal(MonitoringSignalBase): @@ -15881,24 +14990,21 @@ class GenerationTokenUsageSignal(MonitoringSignalBase): """ _validation = { - 'signal_type': {'required': True}, - 'metric_thresholds': {'required': True}, - 'sampling_rate': {'required': True}, + "signal_type": {"required": True}, + "metric_thresholds": {"required": True}, + "sampling_rate": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'metric_thresholds': {'key': 'metricThresholds', 'type': '[GenerationTokenUsageMetricThreshold]'}, - 'production_data': {'key': 'productionData', 'type': '[MonitoringInputDataBase]'}, - 'sampling_rate': {'key': 'samplingRate', 'type': 'float'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, + "metric_thresholds": {"key": "metricThresholds", "type": "[GenerationTokenUsageMetricThreshold]"}, + "production_data": {"key": "productionData", "type": "[MonitoringInputDataBase]"}, + "sampling_rate": {"key": "samplingRate", "type": "float"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -15917,10 +15023,10 @@ def __init__( :paramtype sampling_rate: float """ super(GenerationTokenUsageSignal, self).__init__(**kwargs) - self.signal_type = 'GenerationTokenStatistics' # type: str - self.metric_thresholds = kwargs['metric_thresholds'] - self.production_data = kwargs.get('production_data', None) - self.sampling_rate = kwargs['sampling_rate'] + self.signal_type = "GenerationTokenStatistics" # type: str + self.metric_thresholds = kwargs["metric_thresholds"] + self.production_data = kwargs.get("production_data", None) + self.sampling_rate = kwargs["sampling_rate"] class GetBlobReferenceForConsumptionDto(msrest.serialization.Model): @@ -15935,15 +15041,12 @@ class GetBlobReferenceForConsumptionDto(msrest.serialization.Model): """ _attribute_map = { - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, - 'credential': {'key': 'credential', 'type': 'DataReferenceCredential'}, - 'storage_account_arm_id': {'key': 'storageAccountArmId', 'type': 'str'}, + "blob_uri": {"key": "blobUri", "type": "str"}, + "credential": {"key": "credential", "type": "DataReferenceCredential"}, + "storage_account_arm_id": {"key": "storageAccountArmId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword blob_uri: Blob uri, example: https://blob.windows.core.net/Container/Path. :paramtype blob_uri: str @@ -15953,9 +15056,9 @@ def __init__( :paramtype storage_account_arm_id: str """ super(GetBlobReferenceForConsumptionDto, self).__init__(**kwargs) - self.blob_uri = kwargs.get('blob_uri', None) - self.credential = kwargs.get('credential', None) - self.storage_account_arm_id = kwargs.get('storage_account_arm_id', None) + self.blob_uri = kwargs.get("blob_uri", None) + self.credential = kwargs.get("credential", None) + self.storage_account_arm_id = kwargs.get("storage_account_arm_id", None) class GetBlobReferenceSASRequestDto(msrest.serialization.Model): @@ -15968,14 +15071,11 @@ class GetBlobReferenceSASRequestDto(msrest.serialization.Model): """ _attribute_map = { - 'asset_id': {'key': 'assetId', 'type': 'str'}, - 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + "asset_id": {"key": "assetId", "type": "str"}, + "blob_uri": {"key": "blobUri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_id: Id of the asset to be accessed. :paramtype asset_id: str @@ -15983,8 +15083,8 @@ def __init__( :paramtype blob_uri: str """ super(GetBlobReferenceSASRequestDto, self).__init__(**kwargs) - self.asset_id = kwargs.get('asset_id', None) - self.blob_uri = kwargs.get('blob_uri', None) + self.asset_id = kwargs.get("asset_id", None) + self.blob_uri = kwargs.get("blob_uri", None) class GetBlobReferenceSASResponseDto(msrest.serialization.Model): @@ -15996,21 +15096,20 @@ class GetBlobReferenceSASResponseDto(msrest.serialization.Model): """ _attribute_map = { - 'blob_reference_for_consumption': {'key': 'blobReferenceForConsumption', - 'type': 'GetBlobReferenceForConsumptionDto'}, + "blob_reference_for_consumption": { + "key": "blobReferenceForConsumption", + "type": "GetBlobReferenceForConsumptionDto", + }, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword blob_reference_for_consumption: Blob reference for consumption details. :paramtype blob_reference_for_consumption: ~azure.mgmt.machinelearningservices.models.GetBlobReferenceForConsumptionDto """ super(GetBlobReferenceSASResponseDto, self).__init__(**kwargs) - self.blob_reference_for_consumption = kwargs.get('blob_reference_for_consumption', None) + self.blob_reference_for_consumption = kwargs.get("blob_reference_for_consumption", None) class GridSamplingAlgorithm(SamplingAlgorithm): @@ -16026,21 +15125,17 @@ class GridSamplingAlgorithm(SamplingAlgorithm): """ _validation = { - 'sampling_algorithm_type': {'required': True}, + "sampling_algorithm_type": {"required": True}, } _attribute_map = { - 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, + "sampling_algorithm_type": {"key": "samplingAlgorithmType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(GridSamplingAlgorithm, self).__init__(**kwargs) - self.sampling_algorithm_type = 'Grid' # type: str + self.sampling_algorithm_type = "Grid" # type: str class GroupStatus(msrest.serialization.Model): @@ -16057,16 +15152,13 @@ class GroupStatus(msrest.serialization.Model): """ _attribute_map = { - 'actual_capacity_info': {'key': 'actualCapacityInfo', 'type': 'ActualCapacityInfo'}, - 'bonus_extra_capacity': {'key': 'bonusExtraCapacity', 'type': 'int'}, - 'endpoint_count': {'key': 'endpointCount', 'type': 'int'}, - 'requested_capacity': {'key': 'requestedCapacity', 'type': 'int'}, + "actual_capacity_info": {"key": "actualCapacityInfo", "type": "ActualCapacityInfo"}, + "bonus_extra_capacity": {"key": "bonusExtraCapacity", "type": "int"}, + "endpoint_count": {"key": "endpointCount", "type": "int"}, + "requested_capacity": {"key": "requestedCapacity", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword actual_capacity_info: Gets or sets the actual capacity info for the group. :paramtype actual_capacity_info: ~azure.mgmt.machinelearningservices.models.ActualCapacityInfo @@ -16078,10 +15170,10 @@ def __init__( :paramtype requested_capacity: int """ super(GroupStatus, self).__init__(**kwargs) - self.actual_capacity_info = kwargs.get('actual_capacity_info', None) - self.bonus_extra_capacity = kwargs.get('bonus_extra_capacity', 0) - self.endpoint_count = kwargs.get('endpoint_count', 0) - self.requested_capacity = kwargs.get('requested_capacity', 0) + self.actual_capacity_info = kwargs.get("actual_capacity_info", None) + self.bonus_extra_capacity = kwargs.get("bonus_extra_capacity", 0) + self.endpoint_count = kwargs.get("endpoint_count", 0) + self.requested_capacity = kwargs.get("requested_capacity", 0) class HdfsDatastore(DatastoreProperties): @@ -16118,29 +15210,26 @@ class HdfsDatastore(DatastoreProperties): """ _validation = { - 'credentials': {'required': True}, - 'datastore_type': {'required': True}, - 'is_default': {'readonly': True}, - 'name_node_address': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "credentials": {"required": True}, + "datastore_type": {"required": True}, + "is_default": {"readonly": True}, + "name_node_address": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, - 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'is_default': {'key': 'isDefault', 'type': 'bool'}, - 'hdfs_server_certificate': {'key': 'hdfsServerCertificate', 'type': 'str'}, - 'name_node_address': {'key': 'nameNodeAddress', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "credentials": {"key": "credentials", "type": "DatastoreCredentials"}, + "datastore_type": {"key": "datastoreType", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "is_default": {"key": "isDefault", "type": "bool"}, + "hdfs_server_certificate": {"key": "hdfsServerCertificate", "type": "str"}, + "name_node_address": {"key": "nameNodeAddress", "type": "str"}, + "protocol": {"key": "protocol", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -16162,10 +15251,10 @@ def __init__( :paramtype protocol: str """ super(HdfsDatastore, self).__init__(**kwargs) - self.datastore_type = 'Hdfs' # type: str - self.hdfs_server_certificate = kwargs.get('hdfs_server_certificate', None) - self.name_node_address = kwargs['name_node_address'] - self.protocol = kwargs.get('protocol', "http") + self.datastore_type = "Hdfs" # type: str + self.hdfs_server_certificate = kwargs.get("hdfs_server_certificate", None) + self.name_node_address = kwargs["name_node_address"] + self.protocol = kwargs.get("protocol", "http") class HDInsightSchema(msrest.serialization.Model): @@ -16176,19 +15265,16 @@ class HDInsightSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + "properties": {"key": "properties", "type": "HDInsightProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: HDInsight compute properties. :paramtype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties """ super(HDInsightSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class HDInsight(Compute, HDInsightSchema): @@ -16230,32 +15316,29 @@ class HDInsight(Compute, HDInsightSchema): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "properties": {"key": "properties", "type": "HDInsightProperties"}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: HDInsight compute properties. :paramtype properties: ~azure.mgmt.machinelearningservices.models.HDInsightProperties @@ -16270,17 +15353,17 @@ def __init__( :paramtype disable_local_auth: bool """ super(HDInsight, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'HDInsight' # type: str - self.compute_location = kwargs.get('compute_location', None) + self.properties = kwargs.get("properties", None) + self.compute_type = "HDInsight" # type: str + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class HDInsightProperties(msrest.serialization.Model): @@ -16296,15 +15379,12 @@ class HDInsightProperties(msrest.serialization.Model): """ _attribute_map = { - 'ssh_port': {'key': 'sshPort', 'type': 'int'}, - 'address': {'key': 'address', 'type': 'str'}, - 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + "ssh_port": {"key": "sshPort", "type": "int"}, + "address": {"key": "address", "type": "str"}, + "administrator_account": {"key": "administratorAccount", "type": "VirtualMachineSshCredentials"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword ssh_port: Port open for ssh connections on the master node of the cluster. :paramtype ssh_port: int @@ -16315,9 +15395,9 @@ def __init__( ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials """ super(HDInsightProperties, self).__init__(**kwargs) - self.ssh_port = kwargs.get('ssh_port', None) - self.address = kwargs.get('address', None) - self.administrator_account = kwargs.get('administrator_account', None) + self.ssh_port = kwargs.get("ssh_port", None) + self.address = kwargs.get("address", None) + self.administrator_account = kwargs.get("administrator_account", None) class IdAssetReference(AssetReferenceBase): @@ -16333,26 +15413,23 @@ class IdAssetReference(AssetReferenceBase): """ _validation = { - 'reference_type': {'required': True}, - 'asset_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "reference_type": {"required": True}, + "asset_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'reference_type': {'key': 'referenceType', 'type': 'str'}, - 'asset_id': {'key': 'assetId', 'type': 'str'}, + "reference_type": {"key": "referenceType", "type": "str"}, + "asset_id": {"key": "assetId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_id: Required. [Required] ARM resource ID of the asset. :paramtype asset_id: str """ super(IdAssetReference, self).__init__(**kwargs) - self.reference_type = 'Id' # type: str - self.asset_id = kwargs['asset_id'] + self.reference_type = "Id" # type: str + self.asset_id = kwargs["asset_id"] class IdentityForCmk(msrest.serialization.Model): @@ -16364,20 +15441,17 @@ class IdentityForCmk(msrest.serialization.Model): """ _attribute_map = { - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + "user_assigned_identity": {"key": "userAssignedIdentity", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword user_assigned_identity: UserAssignedIdentity to be used to fetch the encryption key from keyVault. :paramtype user_assigned_identity: str """ super(IdentityForCmk, self).__init__(**kwargs) - self.user_assigned_identity = kwargs.get('user_assigned_identity', None) + self.user_assigned_identity = kwargs.get("user_assigned_identity", None) class IdleShutdownSetting(msrest.serialization.Model): @@ -16389,20 +15463,17 @@ class IdleShutdownSetting(msrest.serialization.Model): """ _attribute_map = { - 'idle_time_before_shutdown': {'key': 'idleTimeBeforeShutdown', 'type': 'str'}, + "idle_time_before_shutdown": {"key": "idleTimeBeforeShutdown", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword idle_time_before_shutdown: Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. :paramtype idle_time_before_shutdown: str """ super(IdleShutdownSetting, self).__init__(**kwargs) - self.idle_time_before_shutdown = kwargs.get('idle_time_before_shutdown', None) + self.idle_time_before_shutdown = kwargs.get("idle_time_before_shutdown", None) class Image(msrest.serialization.Model): @@ -16422,16 +15493,13 @@ class Image(msrest.serialization.Model): """ _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'type': {'key': 'type', 'type': 'str'}, - 'reference': {'key': 'reference', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, + "additional_properties": {"key": "", "type": "{object}"}, + "type": {"key": "type", "type": "str"}, + "reference": {"key": "reference", "type": "str"}, + "version": {"key": "version", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword additional_properties: Unmatched properties from the message are deserialized to this collection. @@ -16446,46 +15514,43 @@ def __init__( :paramtype version: str """ super(Image, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.type = kwargs.get('type', "docker") - self.reference = kwargs.get('reference', None) - self.version = kwargs.get('version', None) + self.additional_properties = kwargs.get("additional_properties", None) + self.type = kwargs.get("type", "docker") + self.reference = kwargs.get("reference", None) + self.version = kwargs.get("version", None) class ImageVertical(msrest.serialization.Model): """Abstract class for AutoML tasks that train image (computer vision) models - -such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance Segmentation. + such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance Segmentation. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings - :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar validation_data_size: The fraction of training dataset that needs to be set aside for - validation purpose. - Values between (0.0 , 1.0) - Applied when validation dataset is not provided. - :vartype validation_data_size: float + :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings + :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar validation_data_size: The fraction of training dataset that needs to be set aside for + validation purpose. + Values between (0.0 , 1.0) + Applied when validation dataset is not provided. + :vartype validation_data_size: float """ _validation = { - 'limit_settings': {'required': True}, + "limit_settings": {"required": True}, } _attribute_map = { - 'limit_settings': {'key': 'limitSettings', 'type': 'ImageLimitSettings'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'ImageSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, + "limit_settings": {"key": "limitSettings", "type": "ImageLimitSettings"}, + "sweep_settings": {"key": "sweepSettings", "type": "ImageSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword limit_settings: Required. [Required] Limit settings for the AutoML job. :paramtype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings @@ -16500,10 +15565,10 @@ def __init__( :paramtype validation_data_size: float """ super(ImageVertical, self).__init__(**kwargs) - self.limit_settings = kwargs['limit_settings'] - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) + self.limit_settings = kwargs["limit_settings"] + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) class ImageClassificationBase(ImageVertical): @@ -16532,22 +15597,19 @@ class ImageClassificationBase(ImageVertical): """ _validation = { - 'limit_settings': {'required': True}, + "limit_settings": {"required": True}, } _attribute_map = { - 'limit_settings': {'key': 'limitSettings', 'type': 'ImageLimitSettings'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'ImageSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'model_settings': {'key': 'modelSettings', 'type': 'ImageModelSettingsClassification'}, - 'search_space': {'key': 'searchSpace', 'type': '[ImageModelDistributionSettingsClassification]'}, + "limit_settings": {"key": "limitSettings", "type": "ImageLimitSettings"}, + "sweep_settings": {"key": "sweepSettings", "type": "ImageSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "model_settings": {"key": "modelSettings", "type": "ImageModelSettingsClassification"}, + "search_space": {"key": "searchSpace", "type": "[ImageModelDistributionSettingsClassification]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword limit_settings: Required. [Required] Limit settings for the AutoML job. :paramtype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings @@ -16569,78 +15631,75 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsClassification] """ super(ImageClassificationBase, self).__init__(**kwargs) - self.model_settings = kwargs.get('model_settings', None) - self.search_space = kwargs.get('search_space', None) + self.model_settings = kwargs.get("model_settings", None) + self.search_space = kwargs.get("search_space", None) class ImageClassification(AutoMLVertical, ImageClassificationBase): """Image Classification. Multi-class image classification is used when an image is classified with only a single label -from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. + from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings - :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar validation_data_size: The fraction of training dataset that needs to be set aside for - validation purpose. - Values between (0.0 , 1.0) - Applied when validation dataset is not provided. - :vartype validation_data_size: float - :ivar model_settings: Settings used for training the model. - :vartype model_settings: - ~azure.mgmt.machinelearningservices.models.ImageModelSettingsClassification - :ivar search_space: Search space for sampling different combinations of models and their - hyperparameters. - :vartype search_space: - list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsClassification] - :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", - "Info", "Warning", "Error", "Critical". - :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity - :ivar target_column_name: Target column name: This is prediction values column. - Also known as label column name in context of classification tasks. - :vartype target_column_name: str - :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. - Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", - "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", - "TextClassification", "TextClassificationMultilabel", "TextNER". - :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType - :ivar training_data: Required. [Required] Training data input. - :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar primary_metric: Primary metric to optimize for this task. Possible values include: - "AUCWeighted", "Accuracy", "NormMacroRecall", "AveragePrecisionScoreWeighted", - "PrecisionScoreWeighted". - :vartype primary_metric: str or - ~azure.mgmt.machinelearningservices.models.ClassificationPrimaryMetrics + :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings + :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar validation_data_size: The fraction of training dataset that needs to be set aside for + validation purpose. + Values between (0.0 , 1.0) + Applied when validation dataset is not provided. + :vartype validation_data_size: float + :ivar model_settings: Settings used for training the model. + :vartype model_settings: + ~azure.mgmt.machinelearningservices.models.ImageModelSettingsClassification + :ivar search_space: Search space for sampling different combinations of models and their + hyperparameters. + :vartype search_space: + list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsClassification] + :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", + "Info", "Warning", "Error", "Critical". + :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity + :ivar target_column_name: Target column name: This is prediction values column. + Also known as label column name in context of classification tasks. + :vartype target_column_name: str + :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. + Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", + "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", + "TextClassification", "TextClassificationMultilabel", "TextNER". + :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType + :ivar training_data: Required. [Required] Training data input. + :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar primary_metric: Primary metric to optimize for this task. Possible values include: + "AUCWeighted", "Accuracy", "NormMacroRecall", "AveragePrecisionScoreWeighted", + "PrecisionScoreWeighted". + :vartype primary_metric: str or + ~azure.mgmt.machinelearningservices.models.ClassificationPrimaryMetrics """ _validation = { - 'limit_settings': {'required': True}, - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "limit_settings": {"required": True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'limit_settings': {'key': 'limitSettings', 'type': 'ImageLimitSettings'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'ImageSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'model_settings': {'key': 'modelSettings', 'type': 'ImageModelSettingsClassification'}, - 'search_space': {'key': 'searchSpace', 'type': '[ImageModelDistributionSettingsClassification]'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + "limit_settings": {"key": "limitSettings", "type": "ImageLimitSettings"}, + "sweep_settings": {"key": "sweepSettings", "type": "ImageSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "model_settings": {"key": "modelSettings", "type": "ImageModelSettingsClassification"}, + "search_space": {"key": "searchSpace", "type": "[ImageModelDistributionSettingsClassification]"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword limit_settings: Required. [Required] Limit settings for the AutoML job. :paramtype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings @@ -16675,87 +15734,84 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ClassificationPrimaryMetrics """ super(ImageClassification, self).__init__(**kwargs) - self.limit_settings = kwargs['limit_settings'] - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) - self.model_settings = kwargs.get('model_settings', None) - self.search_space = kwargs.get('search_space', None) - self.task_type = 'ImageClassification' # type: str - self.primary_metric = kwargs.get('primary_metric', None) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.limit_settings = kwargs["limit_settings"] + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) + self.model_settings = kwargs.get("model_settings", None) + self.search_space = kwargs.get("search_space", None) + self.task_type = "ImageClassification" # type: str + self.primary_metric = kwargs.get("primary_metric", None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class ImageClassificationMultilabel(AutoMLVertical, ImageClassificationBase): """Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels -from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. + from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings - :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar validation_data_size: The fraction of training dataset that needs to be set aside for - validation purpose. - Values between (0.0 , 1.0) - Applied when validation dataset is not provided. - :vartype validation_data_size: float - :ivar model_settings: Settings used for training the model. - :vartype model_settings: - ~azure.mgmt.machinelearningservices.models.ImageModelSettingsClassification - :ivar search_space: Search space for sampling different combinations of models and their - hyperparameters. - :vartype search_space: - list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsClassification] - :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", - "Info", "Warning", "Error", "Critical". - :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity - :ivar target_column_name: Target column name: This is prediction values column. - Also known as label column name in context of classification tasks. - :vartype target_column_name: str - :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. - Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", - "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", - "TextClassification", "TextClassificationMultilabel", "TextNER". - :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType - :ivar training_data: Required. [Required] Training data input. - :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar primary_metric: Primary metric to optimize for this task. Possible values include: - "AUCWeighted", "Accuracy", "NormMacroRecall", "AveragePrecisionScoreWeighted", - "PrecisionScoreWeighted", "IOU". - :vartype primary_metric: str or - ~azure.mgmt.machinelearningservices.models.ClassificationMultilabelPrimaryMetrics + :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings + :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar validation_data_size: The fraction of training dataset that needs to be set aside for + validation purpose. + Values between (0.0 , 1.0) + Applied when validation dataset is not provided. + :vartype validation_data_size: float + :ivar model_settings: Settings used for training the model. + :vartype model_settings: + ~azure.mgmt.machinelearningservices.models.ImageModelSettingsClassification + :ivar search_space: Search space for sampling different combinations of models and their + hyperparameters. + :vartype search_space: + list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsClassification] + :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", + "Info", "Warning", "Error", "Critical". + :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity + :ivar target_column_name: Target column name: This is prediction values column. + Also known as label column name in context of classification tasks. + :vartype target_column_name: str + :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. + Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", + "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", + "TextClassification", "TextClassificationMultilabel", "TextNER". + :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType + :ivar training_data: Required. [Required] Training data input. + :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar primary_metric: Primary metric to optimize for this task. Possible values include: + "AUCWeighted", "Accuracy", "NormMacroRecall", "AveragePrecisionScoreWeighted", + "PrecisionScoreWeighted", "IOU". + :vartype primary_metric: str or + ~azure.mgmt.machinelearningservices.models.ClassificationMultilabelPrimaryMetrics """ _validation = { - 'limit_settings': {'required': True}, - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "limit_settings": {"required": True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'limit_settings': {'key': 'limitSettings', 'type': 'ImageLimitSettings'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'ImageSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'model_settings': {'key': 'modelSettings', 'type': 'ImageModelSettingsClassification'}, - 'search_space': {'key': 'searchSpace', 'type': '[ImageModelDistributionSettingsClassification]'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + "limit_settings": {"key": "limitSettings", "type": "ImageLimitSettings"}, + "sweep_settings": {"key": "sweepSettings", "type": "ImageSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "model_settings": {"key": "modelSettings", "type": "ImageModelSettingsClassification"}, + "search_space": {"key": "searchSpace", "type": "[ImageModelDistributionSettingsClassification]"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword limit_settings: Required. [Required] Limit settings for the AutoML job. :paramtype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings @@ -16790,17 +15846,17 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ClassificationMultilabelPrimaryMetrics """ super(ImageClassificationMultilabel, self).__init__(**kwargs) - self.limit_settings = kwargs['limit_settings'] - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) - self.model_settings = kwargs.get('model_settings', None) - self.search_space = kwargs.get('search_space', None) - self.task_type = 'ImageClassificationMultilabel' # type: str - self.primary_metric = kwargs.get('primary_metric', None) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.limit_settings = kwargs["limit_settings"] + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) + self.model_settings = kwargs.get("model_settings", None) + self.search_space = kwargs.get("search_space", None) + self.task_type = "ImageClassificationMultilabel" # type: str + self.primary_metric = kwargs.get("primary_metric", None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class ImageObjectDetectionBase(ImageVertical): @@ -16829,22 +15885,19 @@ class ImageObjectDetectionBase(ImageVertical): """ _validation = { - 'limit_settings': {'required': True}, + "limit_settings": {"required": True}, } _attribute_map = { - 'limit_settings': {'key': 'limitSettings', 'type': 'ImageLimitSettings'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'ImageSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'model_settings': {'key': 'modelSettings', 'type': 'ImageModelSettingsObjectDetection'}, - 'search_space': {'key': 'searchSpace', 'type': '[ImageModelDistributionSettingsObjectDetection]'}, + "limit_settings": {"key": "limitSettings", "type": "ImageLimitSettings"}, + "sweep_settings": {"key": "sweepSettings", "type": "ImageSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "model_settings": {"key": "modelSettings", "type": "ImageModelSettingsObjectDetection"}, + "search_space": {"key": "searchSpace", "type": "[ImageModelDistributionSettingsObjectDetection]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword limit_settings: Required. [Required] Limit settings for the AutoML job. :paramtype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings @@ -16866,77 +15919,74 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsObjectDetection] """ super(ImageObjectDetectionBase, self).__init__(**kwargs) - self.model_settings = kwargs.get('model_settings', None) - self.search_space = kwargs.get('search_space', None) + self.model_settings = kwargs.get("model_settings", None) + self.search_space = kwargs.get("search_space", None) class ImageInstanceSegmentation(AutoMLVertical, ImageObjectDetectionBase): """Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, -drawing a polygon around each object in the image. + drawing a polygon around each object in the image. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings - :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar validation_data_size: The fraction of training dataset that needs to be set aside for - validation purpose. - Values between (0.0 , 1.0) - Applied when validation dataset is not provided. - :vartype validation_data_size: float - :ivar model_settings: Settings used for training the model. - :vartype model_settings: - ~azure.mgmt.machinelearningservices.models.ImageModelSettingsObjectDetection - :ivar search_space: Search space for sampling different combinations of models and their - hyperparameters. - :vartype search_space: - list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsObjectDetection] - :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", - "Info", "Warning", "Error", "Critical". - :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity - :ivar target_column_name: Target column name: This is prediction values column. - Also known as label column name in context of classification tasks. - :vartype target_column_name: str - :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. - Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", - "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", - "TextClassification", "TextClassificationMultilabel", "TextNER". - :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType - :ivar training_data: Required. [Required] Training data input. - :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar primary_metric: Primary metric to optimize for this task. Possible values include: - "MeanAveragePrecision". - :vartype primary_metric: str or - ~azure.mgmt.machinelearningservices.models.InstanceSegmentationPrimaryMetrics + :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings + :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar validation_data_size: The fraction of training dataset that needs to be set aside for + validation purpose. + Values between (0.0 , 1.0) + Applied when validation dataset is not provided. + :vartype validation_data_size: float + :ivar model_settings: Settings used for training the model. + :vartype model_settings: + ~azure.mgmt.machinelearningservices.models.ImageModelSettingsObjectDetection + :ivar search_space: Search space for sampling different combinations of models and their + hyperparameters. + :vartype search_space: + list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsObjectDetection] + :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", + "Info", "Warning", "Error", "Critical". + :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity + :ivar target_column_name: Target column name: This is prediction values column. + Also known as label column name in context of classification tasks. + :vartype target_column_name: str + :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. + Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", + "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", + "TextClassification", "TextClassificationMultilabel", "TextNER". + :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType + :ivar training_data: Required. [Required] Training data input. + :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar primary_metric: Primary metric to optimize for this task. Possible values include: + "MeanAveragePrecision". + :vartype primary_metric: str or + ~azure.mgmt.machinelearningservices.models.InstanceSegmentationPrimaryMetrics """ _validation = { - 'limit_settings': {'required': True}, - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "limit_settings": {"required": True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'limit_settings': {'key': 'limitSettings', 'type': 'ImageLimitSettings'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'ImageSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'model_settings': {'key': 'modelSettings', 'type': 'ImageModelSettingsObjectDetection'}, - 'search_space': {'key': 'searchSpace', 'type': '[ImageModelDistributionSettingsObjectDetection]'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + "limit_settings": {"key": "limitSettings", "type": "ImageLimitSettings"}, + "sweep_settings": {"key": "sweepSettings", "type": "ImageSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "model_settings": {"key": "modelSettings", "type": "ImageModelSettingsObjectDetection"}, + "search_space": {"key": "searchSpace", "type": "[ImageModelDistributionSettingsObjectDetection]"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword limit_settings: Required. [Required] Limit settings for the AutoML job. :paramtype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings @@ -16970,17 +16020,17 @@ def __init__( ~azure.mgmt.machinelearningservices.models.InstanceSegmentationPrimaryMetrics """ super(ImageInstanceSegmentation, self).__init__(**kwargs) - self.limit_settings = kwargs['limit_settings'] - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) - self.model_settings = kwargs.get('model_settings', None) - self.search_space = kwargs.get('search_space', None) - self.task_type = 'ImageInstanceSegmentation' # type: str - self.primary_metric = kwargs.get('primary_metric', None) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.limit_settings = kwargs["limit_settings"] + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) + self.model_settings = kwargs.get("model_settings", None) + self.search_space = kwargs.get("search_space", None) + self.task_type = "ImageInstanceSegmentation" # type: str + self.primary_metric = kwargs.get("primary_metric", None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class ImageLimitSettings(msrest.serialization.Model): @@ -16995,15 +16045,12 @@ class ImageLimitSettings(msrest.serialization.Model): """ _attribute_map = { - 'max_concurrent_trials': {'key': 'maxConcurrentTrials', 'type': 'int'}, - 'max_trials': {'key': 'maxTrials', 'type': 'int'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, + "max_concurrent_trials": {"key": "maxConcurrentTrials", "type": "int"}, + "max_trials": {"key": "maxTrials", "type": "int"}, + "timeout": {"key": "timeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword max_concurrent_trials: Maximum number of concurrent AutoML iterations. :paramtype max_concurrent_trials: int @@ -17013,9 +16060,9 @@ def __init__( :paramtype timeout: ~datetime.timedelta """ super(ImageLimitSettings, self).__init__(**kwargs) - self.max_concurrent_trials = kwargs.get('max_concurrent_trials', 1) - self.max_trials = kwargs.get('max_trials', 1) - self.timeout = kwargs.get('timeout', "P7D") + self.max_concurrent_trials = kwargs.get("max_concurrent_trials", 1) + self.max_trials = kwargs.get("max_trials", 1) + self.timeout = kwargs.get("timeout", "P7D") class ImageMetadata(msrest.serialization.Model): @@ -17036,20 +16083,17 @@ class ImageMetadata(msrest.serialization.Model): """ _validation = { - 'os_patching_status': {'readonly': True}, + "os_patching_status": {"readonly": True}, } _attribute_map = { - 'current_image_version': {'key': 'currentImageVersion', 'type': 'str'}, - 'latest_image_version': {'key': 'latestImageVersion', 'type': 'str'}, - 'is_latest_os_image_version': {'key': 'isLatestOsImageVersion', 'type': 'bool'}, - 'os_patching_status': {'key': 'osPatchingStatus', 'type': 'OsPatchingStatus'}, + "current_image_version": {"key": "currentImageVersion", "type": "str"}, + "latest_image_version": {"key": "latestImageVersion", "type": "str"}, + "is_latest_os_image_version": {"key": "isLatestOsImageVersion", "type": "bool"}, + "os_patching_status": {"key": "osPatchingStatus", "type": "OsPatchingStatus"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword current_image_version: Specifies the current operating system image version this compute instance is running on. @@ -17061,144 +16105,141 @@ def __init__( :paramtype is_latest_os_image_version: bool """ super(ImageMetadata, self).__init__(**kwargs) - self.current_image_version = kwargs.get('current_image_version', None) - self.latest_image_version = kwargs.get('latest_image_version', None) - self.is_latest_os_image_version = kwargs.get('is_latest_os_image_version', None) + self.current_image_version = kwargs.get("current_image_version", None) + self.latest_image_version = kwargs.get("latest_image_version", None) + self.is_latest_os_image_version = kwargs.get("is_latest_os_image_version", None) self.os_patching_status = None class ImageModelDistributionSettings(msrest.serialization.Model): """Distribution expressions to sweep over values of model settings. -:code:` -Some examples are: -``` -ModelName = "choice('seresnext', 'resnest50')"; -LearningRate = "uniform(0.001, 0.01)"; -LayersToFreeze = "choice(0, 2)"; -```` -All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) -where distribution name can be: uniform, quniform, loguniform, etc -For more details on how to compose distribution expressions please check the documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - - :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - :vartype ams_gradient: str - :ivar augmentations: Settings for using Augmentations. - :vartype augmentations: str - :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta1: str - :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta2: str - :ivar distributed: Whether to use distributer training. - :vartype distributed: str - :ivar early_stopping: Enable early stopping logic during training. - :vartype early_stopping: str - :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before - primary metric improvement - is tracked for early stopping. Must be a positive integer. - :vartype early_stopping_delay: str - :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no - primary metric improvement before - the run is stopped. Must be a positive integer. - :vartype early_stopping_patience: str - :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. - :vartype enable_onnx_normalization: str - :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must - be a positive integer. - :vartype evaluation_frequency: str - :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of - "GradAccumulationStep" steps without - updating the model weights while accumulating the gradients of those steps, and then using - the accumulated gradients to compute the weight updates. Must be a positive integer. - :vartype gradient_accumulation_step: str - :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. - For instance, passing 2 as value for 'seresnext' means - freezing layer0 and layer1. For a full list of models supported and details on layer freeze, - please - see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype layers_to_freeze: str - :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. - :vartype learning_rate: str - :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or - 'step'. - :vartype learning_rate_scheduler: str - :ivar model_name: Name of the model to use for training. - For more information on the available models please visit the official documentation: - https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype model_name: str - :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - :vartype momentum: str - :ivar nesterov: Enable nesterov when optimizer is 'sgd'. - :vartype nesterov: str - :ivar number_of_epochs: Number of training epochs. Must be a positive integer. - :vartype number_of_epochs: str - :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. - :vartype number_of_workers: str - :ivar optimizer: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - :vartype optimizer: str - :ivar random_seed: Random seed to be used when using deterministic training. - :vartype random_seed: str - :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in - the range [0, 1]. - :vartype step_lr_gamma: str - :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a - positive integer. - :vartype step_lr_step_size: str - :ivar training_batch_size: Training batch size. Must be a positive integer. - :vartype training_batch_size: str - :ivar validation_batch_size: Validation batch size. Must be a positive integer. - :vartype validation_batch_size: str - :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is - 'warmup_cosine'. Must be a float in the range [0, 1]. - :vartype warmup_cosine_lr_cycles: str - :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is - 'warmup_cosine'. Must be a positive integer. - :vartype warmup_cosine_lr_warmup_epochs: str - :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be - a float in the range[0, 1]. - :vartype weight_decay: str - """ - - _attribute_map = { - 'ams_gradient': {'key': 'amsGradient', 'type': 'str'}, - 'augmentations': {'key': 'augmentations', 'type': 'str'}, - 'beta1': {'key': 'beta1', 'type': 'str'}, - 'beta2': {'key': 'beta2', 'type': 'str'}, - 'distributed': {'key': 'distributed', 'type': 'str'}, - 'early_stopping': {'key': 'earlyStopping', 'type': 'str'}, - 'early_stopping_delay': {'key': 'earlyStoppingDelay', 'type': 'str'}, - 'early_stopping_patience': {'key': 'earlyStoppingPatience', 'type': 'str'}, - 'enable_onnx_normalization': {'key': 'enableOnnxNormalization', 'type': 'str'}, - 'evaluation_frequency': {'key': 'evaluationFrequency', 'type': 'str'}, - 'gradient_accumulation_step': {'key': 'gradientAccumulationStep', 'type': 'str'}, - 'layers_to_freeze': {'key': 'layersToFreeze', 'type': 'str'}, - 'learning_rate': {'key': 'learningRate', 'type': 'str'}, - 'learning_rate_scheduler': {'key': 'learningRateScheduler', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'momentum': {'key': 'momentum', 'type': 'str'}, - 'nesterov': {'key': 'nesterov', 'type': 'str'}, - 'number_of_epochs': {'key': 'numberOfEpochs', 'type': 'str'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'str'}, - 'optimizer': {'key': 'optimizer', 'type': 'str'}, - 'random_seed': {'key': 'randomSeed', 'type': 'str'}, - 'step_lr_gamma': {'key': 'stepLRGamma', 'type': 'str'}, - 'step_lr_step_size': {'key': 'stepLRStepSize', 'type': 'str'}, - 'training_batch_size': {'key': 'trainingBatchSize', 'type': 'str'}, - 'validation_batch_size': {'key': 'validationBatchSize', 'type': 'str'}, - 'warmup_cosine_lr_cycles': {'key': 'warmupCosineLRCycles', 'type': 'str'}, - 'warmup_cosine_lr_warmup_epochs': {'key': 'warmupCosineLRWarmupEpochs', 'type': 'str'}, - 'weight_decay': {'key': 'weightDecay', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): + :code:` + Some examples are: + ``` + ModelName = "choice('seresnext', 'resnest50')"; + LearningRate = "uniform(0.001, 0.01)"; + LayersToFreeze = "choice(0, 2)"; + ```` + All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) + where distribution name can be: uniform, quniform, loguniform, etc + For more details on how to compose distribution expressions please check the documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters + For more information on the available settings please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + + :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + :vartype ams_gradient: str + :ivar augmentations: Settings for using Augmentations. + :vartype augmentations: str + :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta1: str + :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta2: str + :ivar distributed: Whether to use distributer training. + :vartype distributed: str + :ivar early_stopping: Enable early stopping logic during training. + :vartype early_stopping: str + :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before + primary metric improvement + is tracked for early stopping. Must be a positive integer. + :vartype early_stopping_delay: str + :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no + primary metric improvement before + the run is stopped. Must be a positive integer. + :vartype early_stopping_patience: str + :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. + :vartype enable_onnx_normalization: str + :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must + be a positive integer. + :vartype evaluation_frequency: str + :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of + "GradAccumulationStep" steps without + updating the model weights while accumulating the gradients of those steps, and then using + the accumulated gradients to compute the weight updates. Must be a positive integer. + :vartype gradient_accumulation_step: str + :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. + For instance, passing 2 as value for 'seresnext' means + freezing layer0 and layer1. For a full list of models supported and details on layer freeze, + please + see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype layers_to_freeze: str + :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. + :vartype learning_rate: str + :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or + 'step'. + :vartype learning_rate_scheduler: str + :ivar model_name: Name of the model to use for training. + For more information on the available models please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype model_name: str + :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + :vartype momentum: str + :ivar nesterov: Enable nesterov when optimizer is 'sgd'. + :vartype nesterov: str + :ivar number_of_epochs: Number of training epochs. Must be a positive integer. + :vartype number_of_epochs: str + :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. + :vartype number_of_workers: str + :ivar optimizer: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + :vartype optimizer: str + :ivar random_seed: Random seed to be used when using deterministic training. + :vartype random_seed: str + :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in + the range [0, 1]. + :vartype step_lr_gamma: str + :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a + positive integer. + :vartype step_lr_step_size: str + :ivar training_batch_size: Training batch size. Must be a positive integer. + :vartype training_batch_size: str + :ivar validation_batch_size: Validation batch size. Must be a positive integer. + :vartype validation_batch_size: str + :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is + 'warmup_cosine'. Must be a float in the range [0, 1]. + :vartype warmup_cosine_lr_cycles: str + :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is + 'warmup_cosine'. Must be a positive integer. + :vartype warmup_cosine_lr_warmup_epochs: str + :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be + a float in the range[0, 1]. + :vartype weight_decay: str + """ + + _attribute_map = { + "ams_gradient": {"key": "amsGradient", "type": "str"}, + "augmentations": {"key": "augmentations", "type": "str"}, + "beta1": {"key": "beta1", "type": "str"}, + "beta2": {"key": "beta2", "type": "str"}, + "distributed": {"key": "distributed", "type": "str"}, + "early_stopping": {"key": "earlyStopping", "type": "str"}, + "early_stopping_delay": {"key": "earlyStoppingDelay", "type": "str"}, + "early_stopping_patience": {"key": "earlyStoppingPatience", "type": "str"}, + "enable_onnx_normalization": {"key": "enableOnnxNormalization", "type": "str"}, + "evaluation_frequency": {"key": "evaluationFrequency", "type": "str"}, + "gradient_accumulation_step": {"key": "gradientAccumulationStep", "type": "str"}, + "layers_to_freeze": {"key": "layersToFreeze", "type": "str"}, + "learning_rate": {"key": "learningRate", "type": "str"}, + "learning_rate_scheduler": {"key": "learningRateScheduler", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "momentum": {"key": "momentum", "type": "str"}, + "nesterov": {"key": "nesterov", "type": "str"}, + "number_of_epochs": {"key": "numberOfEpochs", "type": "str"}, + "number_of_workers": {"key": "numberOfWorkers", "type": "str"}, + "optimizer": {"key": "optimizer", "type": "str"}, + "random_seed": {"key": "randomSeed", "type": "str"}, + "step_lr_gamma": {"key": "stepLRGamma", "type": "str"}, + "step_lr_step_size": {"key": "stepLRStepSize", "type": "str"}, + "training_batch_size": {"key": "trainingBatchSize", "type": "str"}, + "validation_batch_size": {"key": "validationBatchSize", "type": "str"}, + "warmup_cosine_lr_cycles": {"key": "warmupCosineLRCycles", "type": "str"}, + "warmup_cosine_lr_warmup_epochs": {"key": "warmupCosineLRWarmupEpochs", "type": "str"}, + "weight_decay": {"key": "weightDecay", "type": "str"}, + } + + def __init__(self, **kwargs): """ :keyword ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. :paramtype ams_gradient: str @@ -17282,183 +16323,180 @@ def __init__( :paramtype weight_decay: str """ super(ImageModelDistributionSettings, self).__init__(**kwargs) - self.ams_gradient = kwargs.get('ams_gradient', None) - self.augmentations = kwargs.get('augmentations', None) - self.beta1 = kwargs.get('beta1', None) - self.beta2 = kwargs.get('beta2', None) - self.distributed = kwargs.get('distributed', None) - self.early_stopping = kwargs.get('early_stopping', None) - self.early_stopping_delay = kwargs.get('early_stopping_delay', None) - self.early_stopping_patience = kwargs.get('early_stopping_patience', None) - self.enable_onnx_normalization = kwargs.get('enable_onnx_normalization', None) - self.evaluation_frequency = kwargs.get('evaluation_frequency', None) - self.gradient_accumulation_step = kwargs.get('gradient_accumulation_step', None) - self.layers_to_freeze = kwargs.get('layers_to_freeze', None) - self.learning_rate = kwargs.get('learning_rate', None) - self.learning_rate_scheduler = kwargs.get('learning_rate_scheduler', None) - self.model_name = kwargs.get('model_name', None) - self.momentum = kwargs.get('momentum', None) - self.nesterov = kwargs.get('nesterov', None) - self.number_of_epochs = kwargs.get('number_of_epochs', None) - self.number_of_workers = kwargs.get('number_of_workers', None) - self.optimizer = kwargs.get('optimizer', None) - self.random_seed = kwargs.get('random_seed', None) - self.step_lr_gamma = kwargs.get('step_lr_gamma', None) - self.step_lr_step_size = kwargs.get('step_lr_step_size', None) - self.training_batch_size = kwargs.get('training_batch_size', None) - self.validation_batch_size = kwargs.get('validation_batch_size', None) - self.warmup_cosine_lr_cycles = kwargs.get('warmup_cosine_lr_cycles', None) - self.warmup_cosine_lr_warmup_epochs = kwargs.get('warmup_cosine_lr_warmup_epochs', None) - self.weight_decay = kwargs.get('weight_decay', None) + self.ams_gradient = kwargs.get("ams_gradient", None) + self.augmentations = kwargs.get("augmentations", None) + self.beta1 = kwargs.get("beta1", None) + self.beta2 = kwargs.get("beta2", None) + self.distributed = kwargs.get("distributed", None) + self.early_stopping = kwargs.get("early_stopping", None) + self.early_stopping_delay = kwargs.get("early_stopping_delay", None) + self.early_stopping_patience = kwargs.get("early_stopping_patience", None) + self.enable_onnx_normalization = kwargs.get("enable_onnx_normalization", None) + self.evaluation_frequency = kwargs.get("evaluation_frequency", None) + self.gradient_accumulation_step = kwargs.get("gradient_accumulation_step", None) + self.layers_to_freeze = kwargs.get("layers_to_freeze", None) + self.learning_rate = kwargs.get("learning_rate", None) + self.learning_rate_scheduler = kwargs.get("learning_rate_scheduler", None) + self.model_name = kwargs.get("model_name", None) + self.momentum = kwargs.get("momentum", None) + self.nesterov = kwargs.get("nesterov", None) + self.number_of_epochs = kwargs.get("number_of_epochs", None) + self.number_of_workers = kwargs.get("number_of_workers", None) + self.optimizer = kwargs.get("optimizer", None) + self.random_seed = kwargs.get("random_seed", None) + self.step_lr_gamma = kwargs.get("step_lr_gamma", None) + self.step_lr_step_size = kwargs.get("step_lr_step_size", None) + self.training_batch_size = kwargs.get("training_batch_size", None) + self.validation_batch_size = kwargs.get("validation_batch_size", None) + self.warmup_cosine_lr_cycles = kwargs.get("warmup_cosine_lr_cycles", None) + self.warmup_cosine_lr_warmup_epochs = kwargs.get("warmup_cosine_lr_warmup_epochs", None) + self.weight_decay = kwargs.get("weight_decay", None) class ImageModelDistributionSettingsClassification(ImageModelDistributionSettings): """Distribution expressions to sweep over values of model settings. -:code:` -Some examples are: -``` -ModelName = "choice('seresnext', 'resnest50')"; -LearningRate = "uniform(0.001, 0.01)"; -LayersToFreeze = "choice(0, 2)"; -```` -For more details on how to compose distribution expressions please check the documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - - :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - :vartype ams_gradient: str - :ivar augmentations: Settings for using Augmentations. - :vartype augmentations: str - :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta1: str - :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta2: str - :ivar distributed: Whether to use distributer training. - :vartype distributed: str - :ivar early_stopping: Enable early stopping logic during training. - :vartype early_stopping: str - :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before - primary metric improvement - is tracked for early stopping. Must be a positive integer. - :vartype early_stopping_delay: str - :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no - primary metric improvement before - the run is stopped. Must be a positive integer. - :vartype early_stopping_patience: str - :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. - :vartype enable_onnx_normalization: str - :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must - be a positive integer. - :vartype evaluation_frequency: str - :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of - "GradAccumulationStep" steps without - updating the model weights while accumulating the gradients of those steps, and then using - the accumulated gradients to compute the weight updates. Must be a positive integer. - :vartype gradient_accumulation_step: str - :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. - For instance, passing 2 as value for 'seresnext' means - freezing layer0 and layer1. For a full list of models supported and details on layer freeze, - please - see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype layers_to_freeze: str - :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. - :vartype learning_rate: str - :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or - 'step'. - :vartype learning_rate_scheduler: str - :ivar model_name: Name of the model to use for training. - For more information on the available models please visit the official documentation: - https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype model_name: str - :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - :vartype momentum: str - :ivar nesterov: Enable nesterov when optimizer is 'sgd'. - :vartype nesterov: str - :ivar number_of_epochs: Number of training epochs. Must be a positive integer. - :vartype number_of_epochs: str - :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. - :vartype number_of_workers: str - :ivar optimizer: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - :vartype optimizer: str - :ivar random_seed: Random seed to be used when using deterministic training. - :vartype random_seed: str - :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in - the range [0, 1]. - :vartype step_lr_gamma: str - :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a - positive integer. - :vartype step_lr_step_size: str - :ivar training_batch_size: Training batch size. Must be a positive integer. - :vartype training_batch_size: str - :ivar validation_batch_size: Validation batch size. Must be a positive integer. - :vartype validation_batch_size: str - :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is - 'warmup_cosine'. Must be a float in the range [0, 1]. - :vartype warmup_cosine_lr_cycles: str - :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is - 'warmup_cosine'. Must be a positive integer. - :vartype warmup_cosine_lr_warmup_epochs: str - :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be - a float in the range[0, 1]. - :vartype weight_decay: str - :ivar training_crop_size: Image crop size that is input to the neural network for the training - dataset. Must be a positive integer. - :vartype training_crop_size: str - :ivar validation_crop_size: Image crop size that is input to the neural network for the - validation dataset. Must be a positive integer. - :vartype validation_crop_size: str - :ivar validation_resize_size: Image size to which to resize before cropping for validation - dataset. Must be a positive integer. - :vartype validation_resize_size: str - :ivar weighted_loss: Weighted loss. The accepted values are 0 for no weighted loss. - 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be - 0 or 1 or 2. - :vartype weighted_loss: str - """ - - _attribute_map = { - 'ams_gradient': {'key': 'amsGradient', 'type': 'str'}, - 'augmentations': {'key': 'augmentations', 'type': 'str'}, - 'beta1': {'key': 'beta1', 'type': 'str'}, - 'beta2': {'key': 'beta2', 'type': 'str'}, - 'distributed': {'key': 'distributed', 'type': 'str'}, - 'early_stopping': {'key': 'earlyStopping', 'type': 'str'}, - 'early_stopping_delay': {'key': 'earlyStoppingDelay', 'type': 'str'}, - 'early_stopping_patience': {'key': 'earlyStoppingPatience', 'type': 'str'}, - 'enable_onnx_normalization': {'key': 'enableOnnxNormalization', 'type': 'str'}, - 'evaluation_frequency': {'key': 'evaluationFrequency', 'type': 'str'}, - 'gradient_accumulation_step': {'key': 'gradientAccumulationStep', 'type': 'str'}, - 'layers_to_freeze': {'key': 'layersToFreeze', 'type': 'str'}, - 'learning_rate': {'key': 'learningRate', 'type': 'str'}, - 'learning_rate_scheduler': {'key': 'learningRateScheduler', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'momentum': {'key': 'momentum', 'type': 'str'}, - 'nesterov': {'key': 'nesterov', 'type': 'str'}, - 'number_of_epochs': {'key': 'numberOfEpochs', 'type': 'str'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'str'}, - 'optimizer': {'key': 'optimizer', 'type': 'str'}, - 'random_seed': {'key': 'randomSeed', 'type': 'str'}, - 'step_lr_gamma': {'key': 'stepLRGamma', 'type': 'str'}, - 'step_lr_step_size': {'key': 'stepLRStepSize', 'type': 'str'}, - 'training_batch_size': {'key': 'trainingBatchSize', 'type': 'str'}, - 'validation_batch_size': {'key': 'validationBatchSize', 'type': 'str'}, - 'warmup_cosine_lr_cycles': {'key': 'warmupCosineLRCycles', 'type': 'str'}, - 'warmup_cosine_lr_warmup_epochs': {'key': 'warmupCosineLRWarmupEpochs', 'type': 'str'}, - 'weight_decay': {'key': 'weightDecay', 'type': 'str'}, - 'training_crop_size': {'key': 'trainingCropSize', 'type': 'str'}, - 'validation_crop_size': {'key': 'validationCropSize', 'type': 'str'}, - 'validation_resize_size': {'key': 'validationResizeSize', 'type': 'str'}, - 'weighted_loss': {'key': 'weightedLoss', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): + :code:` + Some examples are: + ``` + ModelName = "choice('seresnext', 'resnest50')"; + LearningRate = "uniform(0.001, 0.01)"; + LayersToFreeze = "choice(0, 2)"; + ```` + For more details on how to compose distribution expressions please check the documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters + For more information on the available settings please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + + :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + :vartype ams_gradient: str + :ivar augmentations: Settings for using Augmentations. + :vartype augmentations: str + :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta1: str + :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta2: str + :ivar distributed: Whether to use distributer training. + :vartype distributed: str + :ivar early_stopping: Enable early stopping logic during training. + :vartype early_stopping: str + :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before + primary metric improvement + is tracked for early stopping. Must be a positive integer. + :vartype early_stopping_delay: str + :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no + primary metric improvement before + the run is stopped. Must be a positive integer. + :vartype early_stopping_patience: str + :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. + :vartype enable_onnx_normalization: str + :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must + be a positive integer. + :vartype evaluation_frequency: str + :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of + "GradAccumulationStep" steps without + updating the model weights while accumulating the gradients of those steps, and then using + the accumulated gradients to compute the weight updates. Must be a positive integer. + :vartype gradient_accumulation_step: str + :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. + For instance, passing 2 as value for 'seresnext' means + freezing layer0 and layer1. For a full list of models supported and details on layer freeze, + please + see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype layers_to_freeze: str + :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. + :vartype learning_rate: str + :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or + 'step'. + :vartype learning_rate_scheduler: str + :ivar model_name: Name of the model to use for training. + For more information on the available models please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype model_name: str + :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + :vartype momentum: str + :ivar nesterov: Enable nesterov when optimizer is 'sgd'. + :vartype nesterov: str + :ivar number_of_epochs: Number of training epochs. Must be a positive integer. + :vartype number_of_epochs: str + :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. + :vartype number_of_workers: str + :ivar optimizer: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + :vartype optimizer: str + :ivar random_seed: Random seed to be used when using deterministic training. + :vartype random_seed: str + :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in + the range [0, 1]. + :vartype step_lr_gamma: str + :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a + positive integer. + :vartype step_lr_step_size: str + :ivar training_batch_size: Training batch size. Must be a positive integer. + :vartype training_batch_size: str + :ivar validation_batch_size: Validation batch size. Must be a positive integer. + :vartype validation_batch_size: str + :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is + 'warmup_cosine'. Must be a float in the range [0, 1]. + :vartype warmup_cosine_lr_cycles: str + :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is + 'warmup_cosine'. Must be a positive integer. + :vartype warmup_cosine_lr_warmup_epochs: str + :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be + a float in the range[0, 1]. + :vartype weight_decay: str + :ivar training_crop_size: Image crop size that is input to the neural network for the training + dataset. Must be a positive integer. + :vartype training_crop_size: str + :ivar validation_crop_size: Image crop size that is input to the neural network for the + validation dataset. Must be a positive integer. + :vartype validation_crop_size: str + :ivar validation_resize_size: Image size to which to resize before cropping for validation + dataset. Must be a positive integer. + :vartype validation_resize_size: str + :ivar weighted_loss: Weighted loss. The accepted values are 0 for no weighted loss. + 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be + 0 or 1 or 2. + :vartype weighted_loss: str + """ + + _attribute_map = { + "ams_gradient": {"key": "amsGradient", "type": "str"}, + "augmentations": {"key": "augmentations", "type": "str"}, + "beta1": {"key": "beta1", "type": "str"}, + "beta2": {"key": "beta2", "type": "str"}, + "distributed": {"key": "distributed", "type": "str"}, + "early_stopping": {"key": "earlyStopping", "type": "str"}, + "early_stopping_delay": {"key": "earlyStoppingDelay", "type": "str"}, + "early_stopping_patience": {"key": "earlyStoppingPatience", "type": "str"}, + "enable_onnx_normalization": {"key": "enableOnnxNormalization", "type": "str"}, + "evaluation_frequency": {"key": "evaluationFrequency", "type": "str"}, + "gradient_accumulation_step": {"key": "gradientAccumulationStep", "type": "str"}, + "layers_to_freeze": {"key": "layersToFreeze", "type": "str"}, + "learning_rate": {"key": "learningRate", "type": "str"}, + "learning_rate_scheduler": {"key": "learningRateScheduler", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "momentum": {"key": "momentum", "type": "str"}, + "nesterov": {"key": "nesterov", "type": "str"}, + "number_of_epochs": {"key": "numberOfEpochs", "type": "str"}, + "number_of_workers": {"key": "numberOfWorkers", "type": "str"}, + "optimizer": {"key": "optimizer", "type": "str"}, + "random_seed": {"key": "randomSeed", "type": "str"}, + "step_lr_gamma": {"key": "stepLRGamma", "type": "str"}, + "step_lr_step_size": {"key": "stepLRStepSize", "type": "str"}, + "training_batch_size": {"key": "trainingBatchSize", "type": "str"}, + "validation_batch_size": {"key": "validationBatchSize", "type": "str"}, + "warmup_cosine_lr_cycles": {"key": "warmupCosineLRCycles", "type": "str"}, + "warmup_cosine_lr_warmup_epochs": {"key": "warmupCosineLRWarmupEpochs", "type": "str"}, + "weight_decay": {"key": "weightDecay", "type": "str"}, + "training_crop_size": {"key": "trainingCropSize", "type": "str"}, + "validation_crop_size": {"key": "validationCropSize", "type": "str"}, + "validation_resize_size": {"key": "validationResizeSize", "type": "str"}, + "weighted_loss": {"key": "weightedLoss", "type": "str"}, + } + + def __init__(self, **kwargs): """ :keyword ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. :paramtype ams_gradient: str @@ -17555,207 +16593,204 @@ def __init__( :paramtype weighted_loss: str """ super(ImageModelDistributionSettingsClassification, self).__init__(**kwargs) - self.training_crop_size = kwargs.get('training_crop_size', None) - self.validation_crop_size = kwargs.get('validation_crop_size', None) - self.validation_resize_size = kwargs.get('validation_resize_size', None) - self.weighted_loss = kwargs.get('weighted_loss', None) + self.training_crop_size = kwargs.get("training_crop_size", None) + self.validation_crop_size = kwargs.get("validation_crop_size", None) + self.validation_resize_size = kwargs.get("validation_resize_size", None) + self.weighted_loss = kwargs.get("weighted_loss", None) class ImageModelDistributionSettingsObjectDetection(ImageModelDistributionSettings): """Distribution expressions to sweep over values of model settings. -:code:` -Some examples are: -``` -ModelName = "choice('seresnext', 'resnest50')"; -LearningRate = "uniform(0.001, 0.01)"; -LayersToFreeze = "choice(0, 2)"; -```` -For more details on how to compose distribution expressions please check the documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - - :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - :vartype ams_gradient: str - :ivar augmentations: Settings for using Augmentations. - :vartype augmentations: str - :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta1: str - :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta2: str - :ivar distributed: Whether to use distributer training. - :vartype distributed: str - :ivar early_stopping: Enable early stopping logic during training. - :vartype early_stopping: str - :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before - primary metric improvement - is tracked for early stopping. Must be a positive integer. - :vartype early_stopping_delay: str - :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no - primary metric improvement before - the run is stopped. Must be a positive integer. - :vartype early_stopping_patience: str - :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. - :vartype enable_onnx_normalization: str - :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must - be a positive integer. - :vartype evaluation_frequency: str - :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of - "GradAccumulationStep" steps without - updating the model weights while accumulating the gradients of those steps, and then using - the accumulated gradients to compute the weight updates. Must be a positive integer. - :vartype gradient_accumulation_step: str - :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. - For instance, passing 2 as value for 'seresnext' means - freezing layer0 and layer1. For a full list of models supported and details on layer freeze, - please - see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype layers_to_freeze: str - :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. - :vartype learning_rate: str - :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or - 'step'. - :vartype learning_rate_scheduler: str - :ivar model_name: Name of the model to use for training. - For more information on the available models please visit the official documentation: - https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype model_name: str - :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - :vartype momentum: str - :ivar nesterov: Enable nesterov when optimizer is 'sgd'. - :vartype nesterov: str - :ivar number_of_epochs: Number of training epochs. Must be a positive integer. - :vartype number_of_epochs: str - :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. - :vartype number_of_workers: str - :ivar optimizer: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - :vartype optimizer: str - :ivar random_seed: Random seed to be used when using deterministic training. - :vartype random_seed: str - :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in - the range [0, 1]. - :vartype step_lr_gamma: str - :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a - positive integer. - :vartype step_lr_step_size: str - :ivar training_batch_size: Training batch size. Must be a positive integer. - :vartype training_batch_size: str - :ivar validation_batch_size: Validation batch size. Must be a positive integer. - :vartype validation_batch_size: str - :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is - 'warmup_cosine'. Must be a float in the range [0, 1]. - :vartype warmup_cosine_lr_cycles: str - :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is - 'warmup_cosine'. Must be a positive integer. - :vartype warmup_cosine_lr_warmup_epochs: str - :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be - a float in the range[0, 1]. - :vartype weight_decay: str - :ivar box_detections_per_image: Maximum number of detections per image, for all classes. Must - be a positive integer. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype box_detections_per_image: str - :ivar box_score_threshold: During inference, only return proposals with a classification score - greater than - BoxScoreThreshold. Must be a float in the range[0, 1]. - :vartype box_score_threshold: str - :ivar image_size: Image size for train and validation. Must be a positive integer. - Note: The training run may get into CUDA OOM if the size is too big. - Note: This settings is only supported for the 'yolov5' algorithm. - :vartype image_size: str - :ivar max_size: Maximum size of the image to be rescaled before feeding it to the backbone. - Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype max_size: str - :ivar min_size: Minimum size of the image to be rescaled before feeding it to the backbone. - Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype min_size: str - :ivar model_size: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - Note: training run may get into CUDA OOM if the model size is too big. - Note: This settings is only supported for the 'yolov5' algorithm. - :vartype model_size: str - :ivar multi_scale: Enable multi-scale image by varying image size by +/- 50%. - Note: training run may get into CUDA OOM if no sufficient GPU memory. - Note: This settings is only supported for the 'yolov5' algorithm. - :vartype multi_scale: str - :ivar nms_iou_threshold: IOU threshold used during inference in NMS post processing. Must be - float in the range [0, 1]. - :vartype nms_iou_threshold: str - :ivar tile_grid_size: The grid size to use for tiling each image. Note: TileGridSize must not - be - None to enable small object detection logic. A string containing two integers in mxn format. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype tile_grid_size: str - :ivar tile_overlap_ratio: Overlap ratio between adjacent tiles in each dimension. Must be float - in the range [0, 1). - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype tile_overlap_ratio: str - :ivar tile_predictions_nms_threshold: The IOU threshold to use to perform NMS while merging - predictions from tiles and image. - Used in validation/ inference. Must be float in the range [0, 1]. - Note: This settings is not supported for the 'yolov5' algorithm. - NMS: Non-maximum suppression. - :vartype tile_predictions_nms_threshold: str - :ivar validation_iou_threshold: IOU threshold to use when computing validation metric. Must be - float in the range [0, 1]. - :vartype validation_iou_threshold: str - :ivar validation_metric_type: Metric computation method to use for validation metrics. Must be - 'none', 'coco', 'voc', or 'coco_voc'. - :vartype validation_metric_type: str - """ - - _attribute_map = { - 'ams_gradient': {'key': 'amsGradient', 'type': 'str'}, - 'augmentations': {'key': 'augmentations', 'type': 'str'}, - 'beta1': {'key': 'beta1', 'type': 'str'}, - 'beta2': {'key': 'beta2', 'type': 'str'}, - 'distributed': {'key': 'distributed', 'type': 'str'}, - 'early_stopping': {'key': 'earlyStopping', 'type': 'str'}, - 'early_stopping_delay': {'key': 'earlyStoppingDelay', 'type': 'str'}, - 'early_stopping_patience': {'key': 'earlyStoppingPatience', 'type': 'str'}, - 'enable_onnx_normalization': {'key': 'enableOnnxNormalization', 'type': 'str'}, - 'evaluation_frequency': {'key': 'evaluationFrequency', 'type': 'str'}, - 'gradient_accumulation_step': {'key': 'gradientAccumulationStep', 'type': 'str'}, - 'layers_to_freeze': {'key': 'layersToFreeze', 'type': 'str'}, - 'learning_rate': {'key': 'learningRate', 'type': 'str'}, - 'learning_rate_scheduler': {'key': 'learningRateScheduler', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'momentum': {'key': 'momentum', 'type': 'str'}, - 'nesterov': {'key': 'nesterov', 'type': 'str'}, - 'number_of_epochs': {'key': 'numberOfEpochs', 'type': 'str'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'str'}, - 'optimizer': {'key': 'optimizer', 'type': 'str'}, - 'random_seed': {'key': 'randomSeed', 'type': 'str'}, - 'step_lr_gamma': {'key': 'stepLRGamma', 'type': 'str'}, - 'step_lr_step_size': {'key': 'stepLRStepSize', 'type': 'str'}, - 'training_batch_size': {'key': 'trainingBatchSize', 'type': 'str'}, - 'validation_batch_size': {'key': 'validationBatchSize', 'type': 'str'}, - 'warmup_cosine_lr_cycles': {'key': 'warmupCosineLRCycles', 'type': 'str'}, - 'warmup_cosine_lr_warmup_epochs': {'key': 'warmupCosineLRWarmupEpochs', 'type': 'str'}, - 'weight_decay': {'key': 'weightDecay', 'type': 'str'}, - 'box_detections_per_image': {'key': 'boxDetectionsPerImage', 'type': 'str'}, - 'box_score_threshold': {'key': 'boxScoreThreshold', 'type': 'str'}, - 'image_size': {'key': 'imageSize', 'type': 'str'}, - 'max_size': {'key': 'maxSize', 'type': 'str'}, - 'min_size': {'key': 'minSize', 'type': 'str'}, - 'model_size': {'key': 'modelSize', 'type': 'str'}, - 'multi_scale': {'key': 'multiScale', 'type': 'str'}, - 'nms_iou_threshold': {'key': 'nmsIouThreshold', 'type': 'str'}, - 'tile_grid_size': {'key': 'tileGridSize', 'type': 'str'}, - 'tile_overlap_ratio': {'key': 'tileOverlapRatio', 'type': 'str'}, - 'tile_predictions_nms_threshold': {'key': 'tilePredictionsNmsThreshold', 'type': 'str'}, - 'validation_iou_threshold': {'key': 'validationIouThreshold', 'type': 'str'}, - 'validation_metric_type': {'key': 'validationMetricType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): + :code:` + Some examples are: + ``` + ModelName = "choice('seresnext', 'resnest50')"; + LearningRate = "uniform(0.001, 0.01)"; + LayersToFreeze = "choice(0, 2)"; + ```` + For more details on how to compose distribution expressions please check the documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters + For more information on the available settings please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + + :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + :vartype ams_gradient: str + :ivar augmentations: Settings for using Augmentations. + :vartype augmentations: str + :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta1: str + :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta2: str + :ivar distributed: Whether to use distributer training. + :vartype distributed: str + :ivar early_stopping: Enable early stopping logic during training. + :vartype early_stopping: str + :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before + primary metric improvement + is tracked for early stopping. Must be a positive integer. + :vartype early_stopping_delay: str + :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no + primary metric improvement before + the run is stopped. Must be a positive integer. + :vartype early_stopping_patience: str + :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. + :vartype enable_onnx_normalization: str + :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must + be a positive integer. + :vartype evaluation_frequency: str + :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of + "GradAccumulationStep" steps without + updating the model weights while accumulating the gradients of those steps, and then using + the accumulated gradients to compute the weight updates. Must be a positive integer. + :vartype gradient_accumulation_step: str + :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. + For instance, passing 2 as value for 'seresnext' means + freezing layer0 and layer1. For a full list of models supported and details on layer freeze, + please + see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype layers_to_freeze: str + :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. + :vartype learning_rate: str + :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or + 'step'. + :vartype learning_rate_scheduler: str + :ivar model_name: Name of the model to use for training. + For more information on the available models please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype model_name: str + :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + :vartype momentum: str + :ivar nesterov: Enable nesterov when optimizer is 'sgd'. + :vartype nesterov: str + :ivar number_of_epochs: Number of training epochs. Must be a positive integer. + :vartype number_of_epochs: str + :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. + :vartype number_of_workers: str + :ivar optimizer: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + :vartype optimizer: str + :ivar random_seed: Random seed to be used when using deterministic training. + :vartype random_seed: str + :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in + the range [0, 1]. + :vartype step_lr_gamma: str + :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a + positive integer. + :vartype step_lr_step_size: str + :ivar training_batch_size: Training batch size. Must be a positive integer. + :vartype training_batch_size: str + :ivar validation_batch_size: Validation batch size. Must be a positive integer. + :vartype validation_batch_size: str + :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is + 'warmup_cosine'. Must be a float in the range [0, 1]. + :vartype warmup_cosine_lr_cycles: str + :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is + 'warmup_cosine'. Must be a positive integer. + :vartype warmup_cosine_lr_warmup_epochs: str + :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be + a float in the range[0, 1]. + :vartype weight_decay: str + :ivar box_detections_per_image: Maximum number of detections per image, for all classes. Must + be a positive integer. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype box_detections_per_image: str + :ivar box_score_threshold: During inference, only return proposals with a classification score + greater than + BoxScoreThreshold. Must be a float in the range[0, 1]. + :vartype box_score_threshold: str + :ivar image_size: Image size for train and validation. Must be a positive integer. + Note: The training run may get into CUDA OOM if the size is too big. + Note: This settings is only supported for the 'yolov5' algorithm. + :vartype image_size: str + :ivar max_size: Maximum size of the image to be rescaled before feeding it to the backbone. + Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype max_size: str + :ivar min_size: Minimum size of the image to be rescaled before feeding it to the backbone. + Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype min_size: str + :ivar model_size: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. + Note: training run may get into CUDA OOM if the model size is too big. + Note: This settings is only supported for the 'yolov5' algorithm. + :vartype model_size: str + :ivar multi_scale: Enable multi-scale image by varying image size by +/- 50%. + Note: training run may get into CUDA OOM if no sufficient GPU memory. + Note: This settings is only supported for the 'yolov5' algorithm. + :vartype multi_scale: str + :ivar nms_iou_threshold: IOU threshold used during inference in NMS post processing. Must be + float in the range [0, 1]. + :vartype nms_iou_threshold: str + :ivar tile_grid_size: The grid size to use for tiling each image. Note: TileGridSize must not + be + None to enable small object detection logic. A string containing two integers in mxn format. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype tile_grid_size: str + :ivar tile_overlap_ratio: Overlap ratio between adjacent tiles in each dimension. Must be float + in the range [0, 1). + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype tile_overlap_ratio: str + :ivar tile_predictions_nms_threshold: The IOU threshold to use to perform NMS while merging + predictions from tiles and image. + Used in validation/ inference. Must be float in the range [0, 1]. + Note: This settings is not supported for the 'yolov5' algorithm. + NMS: Non-maximum suppression. + :vartype tile_predictions_nms_threshold: str + :ivar validation_iou_threshold: IOU threshold to use when computing validation metric. Must be + float in the range [0, 1]. + :vartype validation_iou_threshold: str + :ivar validation_metric_type: Metric computation method to use for validation metrics. Must be + 'none', 'coco', 'voc', or 'coco_voc'. + :vartype validation_metric_type: str + """ + + _attribute_map = { + "ams_gradient": {"key": "amsGradient", "type": "str"}, + "augmentations": {"key": "augmentations", "type": "str"}, + "beta1": {"key": "beta1", "type": "str"}, + "beta2": {"key": "beta2", "type": "str"}, + "distributed": {"key": "distributed", "type": "str"}, + "early_stopping": {"key": "earlyStopping", "type": "str"}, + "early_stopping_delay": {"key": "earlyStoppingDelay", "type": "str"}, + "early_stopping_patience": {"key": "earlyStoppingPatience", "type": "str"}, + "enable_onnx_normalization": {"key": "enableOnnxNormalization", "type": "str"}, + "evaluation_frequency": {"key": "evaluationFrequency", "type": "str"}, + "gradient_accumulation_step": {"key": "gradientAccumulationStep", "type": "str"}, + "layers_to_freeze": {"key": "layersToFreeze", "type": "str"}, + "learning_rate": {"key": "learningRate", "type": "str"}, + "learning_rate_scheduler": {"key": "learningRateScheduler", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "momentum": {"key": "momentum", "type": "str"}, + "nesterov": {"key": "nesterov", "type": "str"}, + "number_of_epochs": {"key": "numberOfEpochs", "type": "str"}, + "number_of_workers": {"key": "numberOfWorkers", "type": "str"}, + "optimizer": {"key": "optimizer", "type": "str"}, + "random_seed": {"key": "randomSeed", "type": "str"}, + "step_lr_gamma": {"key": "stepLRGamma", "type": "str"}, + "step_lr_step_size": {"key": "stepLRStepSize", "type": "str"}, + "training_batch_size": {"key": "trainingBatchSize", "type": "str"}, + "validation_batch_size": {"key": "validationBatchSize", "type": "str"}, + "warmup_cosine_lr_cycles": {"key": "warmupCosineLRCycles", "type": "str"}, + "warmup_cosine_lr_warmup_epochs": {"key": "warmupCosineLRWarmupEpochs", "type": "str"}, + "weight_decay": {"key": "weightDecay", "type": "str"}, + "box_detections_per_image": {"key": "boxDetectionsPerImage", "type": "str"}, + "box_score_threshold": {"key": "boxScoreThreshold", "type": "str"}, + "image_size": {"key": "imageSize", "type": "str"}, + "max_size": {"key": "maxSize", "type": "str"}, + "min_size": {"key": "minSize", "type": "str"}, + "model_size": {"key": "modelSize", "type": "str"}, + "multi_scale": {"key": "multiScale", "type": "str"}, + "nms_iou_threshold": {"key": "nmsIouThreshold", "type": "str"}, + "tile_grid_size": {"key": "tileGridSize", "type": "str"}, + "tile_overlap_ratio": {"key": "tileOverlapRatio", "type": "str"}, + "tile_predictions_nms_threshold": {"key": "tilePredictionsNmsThreshold", "type": "str"}, + "validation_iou_threshold": {"key": "validationIouThreshold", "type": "str"}, + "validation_metric_type": {"key": "validationMetricType", "type": "str"}, + } + + def __init__(self, **kwargs): """ :keyword ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. :paramtype ams_gradient: str @@ -17891,155 +16926,152 @@ def __init__( :paramtype validation_metric_type: str """ super(ImageModelDistributionSettingsObjectDetection, self).__init__(**kwargs) - self.box_detections_per_image = kwargs.get('box_detections_per_image', None) - self.box_score_threshold = kwargs.get('box_score_threshold', None) - self.image_size = kwargs.get('image_size', None) - self.max_size = kwargs.get('max_size', None) - self.min_size = kwargs.get('min_size', None) - self.model_size = kwargs.get('model_size', None) - self.multi_scale = kwargs.get('multi_scale', None) - self.nms_iou_threshold = kwargs.get('nms_iou_threshold', None) - self.tile_grid_size = kwargs.get('tile_grid_size', None) - self.tile_overlap_ratio = kwargs.get('tile_overlap_ratio', None) - self.tile_predictions_nms_threshold = kwargs.get('tile_predictions_nms_threshold', None) - self.validation_iou_threshold = kwargs.get('validation_iou_threshold', None) - self.validation_metric_type = kwargs.get('validation_metric_type', None) + self.box_detections_per_image = kwargs.get("box_detections_per_image", None) + self.box_score_threshold = kwargs.get("box_score_threshold", None) + self.image_size = kwargs.get("image_size", None) + self.max_size = kwargs.get("max_size", None) + self.min_size = kwargs.get("min_size", None) + self.model_size = kwargs.get("model_size", None) + self.multi_scale = kwargs.get("multi_scale", None) + self.nms_iou_threshold = kwargs.get("nms_iou_threshold", None) + self.tile_grid_size = kwargs.get("tile_grid_size", None) + self.tile_overlap_ratio = kwargs.get("tile_overlap_ratio", None) + self.tile_predictions_nms_threshold = kwargs.get("tile_predictions_nms_threshold", None) + self.validation_iou_threshold = kwargs.get("validation_iou_threshold", None) + self.validation_metric_type = kwargs.get("validation_metric_type", None) class ImageModelSettings(msrest.serialization.Model): """Settings used for training the model. -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - - :ivar advanced_settings: Settings for advanced scenarios. - :vartype advanced_settings: str - :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - :vartype ams_gradient: bool - :ivar augmentations: Settings for using Augmentations. - :vartype augmentations: str - :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta1: float - :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta2: float - :ivar checkpoint_frequency: Frequency to store model checkpoints. Must be a positive integer. - :vartype checkpoint_frequency: int - :ivar checkpoint_model: The pretrained checkpoint model for incremental training. - :vartype checkpoint_model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput - :ivar checkpoint_run_id: The id of a previous run that has a pretrained checkpoint for - incremental training. - :vartype checkpoint_run_id: str - :ivar distributed: Whether to use distributed training. - :vartype distributed: bool - :ivar early_stopping: Enable early stopping logic during training. - :vartype early_stopping: bool - :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before - primary metric improvement - is tracked for early stopping. Must be a positive integer. - :vartype early_stopping_delay: int - :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no - primary metric improvement before - the run is stopped. Must be a positive integer. - :vartype early_stopping_patience: int - :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. - :vartype enable_onnx_normalization: bool - :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must - be a positive integer. - :vartype evaluation_frequency: int - :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of - "GradAccumulationStep" steps without - updating the model weights while accumulating the gradients of those steps, and then using - the accumulated gradients to compute the weight updates. Must be a positive integer. - :vartype gradient_accumulation_step: int - :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. - For instance, passing 2 as value for 'seresnext' means - freezing layer0 and layer1. For a full list of models supported and details on layer freeze, - please - see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype layers_to_freeze: int - :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. - :vartype learning_rate: float - :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or - 'step'. Possible values include: "None", "WarmupCosine", "Step". - :vartype learning_rate_scheduler: str or - ~azure.mgmt.machinelearningservices.models.LearningRateScheduler - :ivar model_name: Name of the model to use for training. - For more information on the available models please visit the official documentation: - https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype model_name: str - :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - :vartype momentum: float - :ivar nesterov: Enable nesterov when optimizer is 'sgd'. - :vartype nesterov: bool - :ivar number_of_epochs: Number of training epochs. Must be a positive integer. - :vartype number_of_epochs: int - :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. - :vartype number_of_workers: int - :ivar optimizer: Type of optimizer. Possible values include: "None", "Sgd", "Adam", "Adamw". - :vartype optimizer: str or ~azure.mgmt.machinelearningservices.models.StochasticOptimizer - :ivar random_seed: Random seed to be used when using deterministic training. - :vartype random_seed: int - :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in - the range [0, 1]. - :vartype step_lr_gamma: float - :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a - positive integer. - :vartype step_lr_step_size: int - :ivar training_batch_size: Training batch size. Must be a positive integer. - :vartype training_batch_size: int - :ivar validation_batch_size: Validation batch size. Must be a positive integer. - :vartype validation_batch_size: int - :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is - 'warmup_cosine'. Must be a float in the range [0, 1]. - :vartype warmup_cosine_lr_cycles: float - :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is - 'warmup_cosine'. Must be a positive integer. - :vartype warmup_cosine_lr_warmup_epochs: int - :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be - a float in the range[0, 1]. - :vartype weight_decay: float - """ - - _attribute_map = { - 'advanced_settings': {'key': 'advancedSettings', 'type': 'str'}, - 'ams_gradient': {'key': 'amsGradient', 'type': 'bool'}, - 'augmentations': {'key': 'augmentations', 'type': 'str'}, - 'beta1': {'key': 'beta1', 'type': 'float'}, - 'beta2': {'key': 'beta2', 'type': 'float'}, - 'checkpoint_frequency': {'key': 'checkpointFrequency', 'type': 'int'}, - 'checkpoint_model': {'key': 'checkpointModel', 'type': 'MLFlowModelJobInput'}, - 'checkpoint_run_id': {'key': 'checkpointRunId', 'type': 'str'}, - 'distributed': {'key': 'distributed', 'type': 'bool'}, - 'early_stopping': {'key': 'earlyStopping', 'type': 'bool'}, - 'early_stopping_delay': {'key': 'earlyStoppingDelay', 'type': 'int'}, - 'early_stopping_patience': {'key': 'earlyStoppingPatience', 'type': 'int'}, - 'enable_onnx_normalization': {'key': 'enableOnnxNormalization', 'type': 'bool'}, - 'evaluation_frequency': {'key': 'evaluationFrequency', 'type': 'int'}, - 'gradient_accumulation_step': {'key': 'gradientAccumulationStep', 'type': 'int'}, - 'layers_to_freeze': {'key': 'layersToFreeze', 'type': 'int'}, - 'learning_rate': {'key': 'learningRate', 'type': 'float'}, - 'learning_rate_scheduler': {'key': 'learningRateScheduler', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'momentum': {'key': 'momentum', 'type': 'float'}, - 'nesterov': {'key': 'nesterov', 'type': 'bool'}, - 'number_of_epochs': {'key': 'numberOfEpochs', 'type': 'int'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, - 'optimizer': {'key': 'optimizer', 'type': 'str'}, - 'random_seed': {'key': 'randomSeed', 'type': 'int'}, - 'step_lr_gamma': {'key': 'stepLRGamma', 'type': 'float'}, - 'step_lr_step_size': {'key': 'stepLRStepSize', 'type': 'int'}, - 'training_batch_size': {'key': 'trainingBatchSize', 'type': 'int'}, - 'validation_batch_size': {'key': 'validationBatchSize', 'type': 'int'}, - 'warmup_cosine_lr_cycles': {'key': 'warmupCosineLRCycles', 'type': 'float'}, - 'warmup_cosine_lr_warmup_epochs': {'key': 'warmupCosineLRWarmupEpochs', 'type': 'int'}, - 'weight_decay': {'key': 'weightDecay', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): + For more information on the available settings please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + + :ivar advanced_settings: Settings for advanced scenarios. + :vartype advanced_settings: str + :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + :vartype ams_gradient: bool + :ivar augmentations: Settings for using Augmentations. + :vartype augmentations: str + :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta1: float + :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta2: float + :ivar checkpoint_frequency: Frequency to store model checkpoints. Must be a positive integer. + :vartype checkpoint_frequency: int + :ivar checkpoint_model: The pretrained checkpoint model for incremental training. + :vartype checkpoint_model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput + :ivar checkpoint_run_id: The id of a previous run that has a pretrained checkpoint for + incremental training. + :vartype checkpoint_run_id: str + :ivar distributed: Whether to use distributed training. + :vartype distributed: bool + :ivar early_stopping: Enable early stopping logic during training. + :vartype early_stopping: bool + :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before + primary metric improvement + is tracked for early stopping. Must be a positive integer. + :vartype early_stopping_delay: int + :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no + primary metric improvement before + the run is stopped. Must be a positive integer. + :vartype early_stopping_patience: int + :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. + :vartype enable_onnx_normalization: bool + :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must + be a positive integer. + :vartype evaluation_frequency: int + :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of + "GradAccumulationStep" steps without + updating the model weights while accumulating the gradients of those steps, and then using + the accumulated gradients to compute the weight updates. Must be a positive integer. + :vartype gradient_accumulation_step: int + :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. + For instance, passing 2 as value for 'seresnext' means + freezing layer0 and layer1. For a full list of models supported and details on layer freeze, + please + see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype layers_to_freeze: int + :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. + :vartype learning_rate: float + :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or + 'step'. Possible values include: "None", "WarmupCosine", "Step". + :vartype learning_rate_scheduler: str or + ~azure.mgmt.machinelearningservices.models.LearningRateScheduler + :ivar model_name: Name of the model to use for training. + For more information on the available models please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype model_name: str + :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + :vartype momentum: float + :ivar nesterov: Enable nesterov when optimizer is 'sgd'. + :vartype nesterov: bool + :ivar number_of_epochs: Number of training epochs. Must be a positive integer. + :vartype number_of_epochs: int + :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. + :vartype number_of_workers: int + :ivar optimizer: Type of optimizer. Possible values include: "None", "Sgd", "Adam", "Adamw". + :vartype optimizer: str or ~azure.mgmt.machinelearningservices.models.StochasticOptimizer + :ivar random_seed: Random seed to be used when using deterministic training. + :vartype random_seed: int + :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in + the range [0, 1]. + :vartype step_lr_gamma: float + :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a + positive integer. + :vartype step_lr_step_size: int + :ivar training_batch_size: Training batch size. Must be a positive integer. + :vartype training_batch_size: int + :ivar validation_batch_size: Validation batch size. Must be a positive integer. + :vartype validation_batch_size: int + :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is + 'warmup_cosine'. Must be a float in the range [0, 1]. + :vartype warmup_cosine_lr_cycles: float + :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is + 'warmup_cosine'. Must be a positive integer. + :vartype warmup_cosine_lr_warmup_epochs: int + :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be + a float in the range[0, 1]. + :vartype weight_decay: float + """ + + _attribute_map = { + "advanced_settings": {"key": "advancedSettings", "type": "str"}, + "ams_gradient": {"key": "amsGradient", "type": "bool"}, + "augmentations": {"key": "augmentations", "type": "str"}, + "beta1": {"key": "beta1", "type": "float"}, + "beta2": {"key": "beta2", "type": "float"}, + "checkpoint_frequency": {"key": "checkpointFrequency", "type": "int"}, + "checkpoint_model": {"key": "checkpointModel", "type": "MLFlowModelJobInput"}, + "checkpoint_run_id": {"key": "checkpointRunId", "type": "str"}, + "distributed": {"key": "distributed", "type": "bool"}, + "early_stopping": {"key": "earlyStopping", "type": "bool"}, + "early_stopping_delay": {"key": "earlyStoppingDelay", "type": "int"}, + "early_stopping_patience": {"key": "earlyStoppingPatience", "type": "int"}, + "enable_onnx_normalization": {"key": "enableOnnxNormalization", "type": "bool"}, + "evaluation_frequency": {"key": "evaluationFrequency", "type": "int"}, + "gradient_accumulation_step": {"key": "gradientAccumulationStep", "type": "int"}, + "layers_to_freeze": {"key": "layersToFreeze", "type": "int"}, + "learning_rate": {"key": "learningRate", "type": "float"}, + "learning_rate_scheduler": {"key": "learningRateScheduler", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "momentum": {"key": "momentum", "type": "float"}, + "nesterov": {"key": "nesterov", "type": "bool"}, + "number_of_epochs": {"key": "numberOfEpochs", "type": "int"}, + "number_of_workers": {"key": "numberOfWorkers", "type": "int"}, + "optimizer": {"key": "optimizer", "type": "str"}, + "random_seed": {"key": "randomSeed", "type": "int"}, + "step_lr_gamma": {"key": "stepLRGamma", "type": "float"}, + "step_lr_step_size": {"key": "stepLRStepSize", "type": "int"}, + "training_batch_size": {"key": "trainingBatchSize", "type": "int"}, + "validation_batch_size": {"key": "validationBatchSize", "type": "int"}, + "warmup_cosine_lr_cycles": {"key": "warmupCosineLRCycles", "type": "float"}, + "warmup_cosine_lr_warmup_epochs": {"key": "warmupCosineLRWarmupEpochs", "type": "int"}, + "weight_decay": {"key": "weightDecay", "type": "float"}, + } + + def __init__(self, **kwargs): """ :keyword advanced_settings: Settings for advanced scenarios. :paramtype advanced_settings: str @@ -18134,191 +17166,188 @@ def __init__( :paramtype weight_decay: float """ super(ImageModelSettings, self).__init__(**kwargs) - self.advanced_settings = kwargs.get('advanced_settings', None) - self.ams_gradient = kwargs.get('ams_gradient', None) - self.augmentations = kwargs.get('augmentations', None) - self.beta1 = kwargs.get('beta1', None) - self.beta2 = kwargs.get('beta2', None) - self.checkpoint_frequency = kwargs.get('checkpoint_frequency', None) - self.checkpoint_model = kwargs.get('checkpoint_model', None) - self.checkpoint_run_id = kwargs.get('checkpoint_run_id', None) - self.distributed = kwargs.get('distributed', None) - self.early_stopping = kwargs.get('early_stopping', None) - self.early_stopping_delay = kwargs.get('early_stopping_delay', None) - self.early_stopping_patience = kwargs.get('early_stopping_patience', None) - self.enable_onnx_normalization = kwargs.get('enable_onnx_normalization', None) - self.evaluation_frequency = kwargs.get('evaluation_frequency', None) - self.gradient_accumulation_step = kwargs.get('gradient_accumulation_step', None) - self.layers_to_freeze = kwargs.get('layers_to_freeze', None) - self.learning_rate = kwargs.get('learning_rate', None) - self.learning_rate_scheduler = kwargs.get('learning_rate_scheduler', None) - self.model_name = kwargs.get('model_name', None) - self.momentum = kwargs.get('momentum', None) - self.nesterov = kwargs.get('nesterov', None) - self.number_of_epochs = kwargs.get('number_of_epochs', None) - self.number_of_workers = kwargs.get('number_of_workers', None) - self.optimizer = kwargs.get('optimizer', None) - self.random_seed = kwargs.get('random_seed', None) - self.step_lr_gamma = kwargs.get('step_lr_gamma', None) - self.step_lr_step_size = kwargs.get('step_lr_step_size', None) - self.training_batch_size = kwargs.get('training_batch_size', None) - self.validation_batch_size = kwargs.get('validation_batch_size', None) - self.warmup_cosine_lr_cycles = kwargs.get('warmup_cosine_lr_cycles', None) - self.warmup_cosine_lr_warmup_epochs = kwargs.get('warmup_cosine_lr_warmup_epochs', None) - self.weight_decay = kwargs.get('weight_decay', None) + self.advanced_settings = kwargs.get("advanced_settings", None) + self.ams_gradient = kwargs.get("ams_gradient", None) + self.augmentations = kwargs.get("augmentations", None) + self.beta1 = kwargs.get("beta1", None) + self.beta2 = kwargs.get("beta2", None) + self.checkpoint_frequency = kwargs.get("checkpoint_frequency", None) + self.checkpoint_model = kwargs.get("checkpoint_model", None) + self.checkpoint_run_id = kwargs.get("checkpoint_run_id", None) + self.distributed = kwargs.get("distributed", None) + self.early_stopping = kwargs.get("early_stopping", None) + self.early_stopping_delay = kwargs.get("early_stopping_delay", None) + self.early_stopping_patience = kwargs.get("early_stopping_patience", None) + self.enable_onnx_normalization = kwargs.get("enable_onnx_normalization", None) + self.evaluation_frequency = kwargs.get("evaluation_frequency", None) + self.gradient_accumulation_step = kwargs.get("gradient_accumulation_step", None) + self.layers_to_freeze = kwargs.get("layers_to_freeze", None) + self.learning_rate = kwargs.get("learning_rate", None) + self.learning_rate_scheduler = kwargs.get("learning_rate_scheduler", None) + self.model_name = kwargs.get("model_name", None) + self.momentum = kwargs.get("momentum", None) + self.nesterov = kwargs.get("nesterov", None) + self.number_of_epochs = kwargs.get("number_of_epochs", None) + self.number_of_workers = kwargs.get("number_of_workers", None) + self.optimizer = kwargs.get("optimizer", None) + self.random_seed = kwargs.get("random_seed", None) + self.step_lr_gamma = kwargs.get("step_lr_gamma", None) + self.step_lr_step_size = kwargs.get("step_lr_step_size", None) + self.training_batch_size = kwargs.get("training_batch_size", None) + self.validation_batch_size = kwargs.get("validation_batch_size", None) + self.warmup_cosine_lr_cycles = kwargs.get("warmup_cosine_lr_cycles", None) + self.warmup_cosine_lr_warmup_epochs = kwargs.get("warmup_cosine_lr_warmup_epochs", None) + self.weight_decay = kwargs.get("weight_decay", None) class ImageModelSettingsClassification(ImageModelSettings): """Settings used for training the model. -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - - :ivar advanced_settings: Settings for advanced scenarios. - :vartype advanced_settings: str - :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - :vartype ams_gradient: bool - :ivar augmentations: Settings for using Augmentations. - :vartype augmentations: str - :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta1: float - :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta2: float - :ivar checkpoint_frequency: Frequency to store model checkpoints. Must be a positive integer. - :vartype checkpoint_frequency: int - :ivar checkpoint_model: The pretrained checkpoint model for incremental training. - :vartype checkpoint_model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput - :ivar checkpoint_run_id: The id of a previous run that has a pretrained checkpoint for - incremental training. - :vartype checkpoint_run_id: str - :ivar distributed: Whether to use distributed training. - :vartype distributed: bool - :ivar early_stopping: Enable early stopping logic during training. - :vartype early_stopping: bool - :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before - primary metric improvement - is tracked for early stopping. Must be a positive integer. - :vartype early_stopping_delay: int - :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no - primary metric improvement before - the run is stopped. Must be a positive integer. - :vartype early_stopping_patience: int - :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. - :vartype enable_onnx_normalization: bool - :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must - be a positive integer. - :vartype evaluation_frequency: int - :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of - "GradAccumulationStep" steps without - updating the model weights while accumulating the gradients of those steps, and then using - the accumulated gradients to compute the weight updates. Must be a positive integer. - :vartype gradient_accumulation_step: int - :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. - For instance, passing 2 as value for 'seresnext' means - freezing layer0 and layer1. For a full list of models supported and details on layer freeze, - please - see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype layers_to_freeze: int - :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. - :vartype learning_rate: float - :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or - 'step'. Possible values include: "None", "WarmupCosine", "Step". - :vartype learning_rate_scheduler: str or - ~azure.mgmt.machinelearningservices.models.LearningRateScheduler - :ivar model_name: Name of the model to use for training. - For more information on the available models please visit the official documentation: - https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype model_name: str - :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - :vartype momentum: float - :ivar nesterov: Enable nesterov when optimizer is 'sgd'. - :vartype nesterov: bool - :ivar number_of_epochs: Number of training epochs. Must be a positive integer. - :vartype number_of_epochs: int - :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. - :vartype number_of_workers: int - :ivar optimizer: Type of optimizer. Possible values include: "None", "Sgd", "Adam", "Adamw". - :vartype optimizer: str or ~azure.mgmt.machinelearningservices.models.StochasticOptimizer - :ivar random_seed: Random seed to be used when using deterministic training. - :vartype random_seed: int - :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in - the range [0, 1]. - :vartype step_lr_gamma: float - :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a - positive integer. - :vartype step_lr_step_size: int - :ivar training_batch_size: Training batch size. Must be a positive integer. - :vartype training_batch_size: int - :ivar validation_batch_size: Validation batch size. Must be a positive integer. - :vartype validation_batch_size: int - :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is - 'warmup_cosine'. Must be a float in the range [0, 1]. - :vartype warmup_cosine_lr_cycles: float - :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is - 'warmup_cosine'. Must be a positive integer. - :vartype warmup_cosine_lr_warmup_epochs: int - :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be - a float in the range[0, 1]. - :vartype weight_decay: float - :ivar training_crop_size: Image crop size that is input to the neural network for the training - dataset. Must be a positive integer. - :vartype training_crop_size: int - :ivar validation_crop_size: Image crop size that is input to the neural network for the - validation dataset. Must be a positive integer. - :vartype validation_crop_size: int - :ivar validation_resize_size: Image size to which to resize before cropping for validation - dataset. Must be a positive integer. - :vartype validation_resize_size: int - :ivar weighted_loss: Weighted loss. The accepted values are 0 for no weighted loss. - 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be - 0 or 1 or 2. - :vartype weighted_loss: int - """ - - _attribute_map = { - 'advanced_settings': {'key': 'advancedSettings', 'type': 'str'}, - 'ams_gradient': {'key': 'amsGradient', 'type': 'bool'}, - 'augmentations': {'key': 'augmentations', 'type': 'str'}, - 'beta1': {'key': 'beta1', 'type': 'float'}, - 'beta2': {'key': 'beta2', 'type': 'float'}, - 'checkpoint_frequency': {'key': 'checkpointFrequency', 'type': 'int'}, - 'checkpoint_model': {'key': 'checkpointModel', 'type': 'MLFlowModelJobInput'}, - 'checkpoint_run_id': {'key': 'checkpointRunId', 'type': 'str'}, - 'distributed': {'key': 'distributed', 'type': 'bool'}, - 'early_stopping': {'key': 'earlyStopping', 'type': 'bool'}, - 'early_stopping_delay': {'key': 'earlyStoppingDelay', 'type': 'int'}, - 'early_stopping_patience': {'key': 'earlyStoppingPatience', 'type': 'int'}, - 'enable_onnx_normalization': {'key': 'enableOnnxNormalization', 'type': 'bool'}, - 'evaluation_frequency': {'key': 'evaluationFrequency', 'type': 'int'}, - 'gradient_accumulation_step': {'key': 'gradientAccumulationStep', 'type': 'int'}, - 'layers_to_freeze': {'key': 'layersToFreeze', 'type': 'int'}, - 'learning_rate': {'key': 'learningRate', 'type': 'float'}, - 'learning_rate_scheduler': {'key': 'learningRateScheduler', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'momentum': {'key': 'momentum', 'type': 'float'}, - 'nesterov': {'key': 'nesterov', 'type': 'bool'}, - 'number_of_epochs': {'key': 'numberOfEpochs', 'type': 'int'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, - 'optimizer': {'key': 'optimizer', 'type': 'str'}, - 'random_seed': {'key': 'randomSeed', 'type': 'int'}, - 'step_lr_gamma': {'key': 'stepLRGamma', 'type': 'float'}, - 'step_lr_step_size': {'key': 'stepLRStepSize', 'type': 'int'}, - 'training_batch_size': {'key': 'trainingBatchSize', 'type': 'int'}, - 'validation_batch_size': {'key': 'validationBatchSize', 'type': 'int'}, - 'warmup_cosine_lr_cycles': {'key': 'warmupCosineLRCycles', 'type': 'float'}, - 'warmup_cosine_lr_warmup_epochs': {'key': 'warmupCosineLRWarmupEpochs', 'type': 'int'}, - 'weight_decay': {'key': 'weightDecay', 'type': 'float'}, - 'training_crop_size': {'key': 'trainingCropSize', 'type': 'int'}, - 'validation_crop_size': {'key': 'validationCropSize', 'type': 'int'}, - 'validation_resize_size': {'key': 'validationResizeSize', 'type': 'int'}, - 'weighted_loss': {'key': 'weightedLoss', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): + For more information on the available settings please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + + :ivar advanced_settings: Settings for advanced scenarios. + :vartype advanced_settings: str + :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + :vartype ams_gradient: bool + :ivar augmentations: Settings for using Augmentations. + :vartype augmentations: str + :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta1: float + :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta2: float + :ivar checkpoint_frequency: Frequency to store model checkpoints. Must be a positive integer. + :vartype checkpoint_frequency: int + :ivar checkpoint_model: The pretrained checkpoint model for incremental training. + :vartype checkpoint_model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput + :ivar checkpoint_run_id: The id of a previous run that has a pretrained checkpoint for + incremental training. + :vartype checkpoint_run_id: str + :ivar distributed: Whether to use distributed training. + :vartype distributed: bool + :ivar early_stopping: Enable early stopping logic during training. + :vartype early_stopping: bool + :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before + primary metric improvement + is tracked for early stopping. Must be a positive integer. + :vartype early_stopping_delay: int + :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no + primary metric improvement before + the run is stopped. Must be a positive integer. + :vartype early_stopping_patience: int + :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. + :vartype enable_onnx_normalization: bool + :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must + be a positive integer. + :vartype evaluation_frequency: int + :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of + "GradAccumulationStep" steps without + updating the model weights while accumulating the gradients of those steps, and then using + the accumulated gradients to compute the weight updates. Must be a positive integer. + :vartype gradient_accumulation_step: int + :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. + For instance, passing 2 as value for 'seresnext' means + freezing layer0 and layer1. For a full list of models supported and details on layer freeze, + please + see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype layers_to_freeze: int + :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. + :vartype learning_rate: float + :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or + 'step'. Possible values include: "None", "WarmupCosine", "Step". + :vartype learning_rate_scheduler: str or + ~azure.mgmt.machinelearningservices.models.LearningRateScheduler + :ivar model_name: Name of the model to use for training. + For more information on the available models please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype model_name: str + :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + :vartype momentum: float + :ivar nesterov: Enable nesterov when optimizer is 'sgd'. + :vartype nesterov: bool + :ivar number_of_epochs: Number of training epochs. Must be a positive integer. + :vartype number_of_epochs: int + :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. + :vartype number_of_workers: int + :ivar optimizer: Type of optimizer. Possible values include: "None", "Sgd", "Adam", "Adamw". + :vartype optimizer: str or ~azure.mgmt.machinelearningservices.models.StochasticOptimizer + :ivar random_seed: Random seed to be used when using deterministic training. + :vartype random_seed: int + :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in + the range [0, 1]. + :vartype step_lr_gamma: float + :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a + positive integer. + :vartype step_lr_step_size: int + :ivar training_batch_size: Training batch size. Must be a positive integer. + :vartype training_batch_size: int + :ivar validation_batch_size: Validation batch size. Must be a positive integer. + :vartype validation_batch_size: int + :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is + 'warmup_cosine'. Must be a float in the range [0, 1]. + :vartype warmup_cosine_lr_cycles: float + :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is + 'warmup_cosine'. Must be a positive integer. + :vartype warmup_cosine_lr_warmup_epochs: int + :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be + a float in the range[0, 1]. + :vartype weight_decay: float + :ivar training_crop_size: Image crop size that is input to the neural network for the training + dataset. Must be a positive integer. + :vartype training_crop_size: int + :ivar validation_crop_size: Image crop size that is input to the neural network for the + validation dataset. Must be a positive integer. + :vartype validation_crop_size: int + :ivar validation_resize_size: Image size to which to resize before cropping for validation + dataset. Must be a positive integer. + :vartype validation_resize_size: int + :ivar weighted_loss: Weighted loss. The accepted values are 0 for no weighted loss. + 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be + 0 or 1 or 2. + :vartype weighted_loss: int + """ + + _attribute_map = { + "advanced_settings": {"key": "advancedSettings", "type": "str"}, + "ams_gradient": {"key": "amsGradient", "type": "bool"}, + "augmentations": {"key": "augmentations", "type": "str"}, + "beta1": {"key": "beta1", "type": "float"}, + "beta2": {"key": "beta2", "type": "float"}, + "checkpoint_frequency": {"key": "checkpointFrequency", "type": "int"}, + "checkpoint_model": {"key": "checkpointModel", "type": "MLFlowModelJobInput"}, + "checkpoint_run_id": {"key": "checkpointRunId", "type": "str"}, + "distributed": {"key": "distributed", "type": "bool"}, + "early_stopping": {"key": "earlyStopping", "type": "bool"}, + "early_stopping_delay": {"key": "earlyStoppingDelay", "type": "int"}, + "early_stopping_patience": {"key": "earlyStoppingPatience", "type": "int"}, + "enable_onnx_normalization": {"key": "enableOnnxNormalization", "type": "bool"}, + "evaluation_frequency": {"key": "evaluationFrequency", "type": "int"}, + "gradient_accumulation_step": {"key": "gradientAccumulationStep", "type": "int"}, + "layers_to_freeze": {"key": "layersToFreeze", "type": "int"}, + "learning_rate": {"key": "learningRate", "type": "float"}, + "learning_rate_scheduler": {"key": "learningRateScheduler", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "momentum": {"key": "momentum", "type": "float"}, + "nesterov": {"key": "nesterov", "type": "bool"}, + "number_of_epochs": {"key": "numberOfEpochs", "type": "int"}, + "number_of_workers": {"key": "numberOfWorkers", "type": "int"}, + "optimizer": {"key": "optimizer", "type": "str"}, + "random_seed": {"key": "randomSeed", "type": "int"}, + "step_lr_gamma": {"key": "stepLRGamma", "type": "float"}, + "step_lr_step_size": {"key": "stepLRStepSize", "type": "int"}, + "training_batch_size": {"key": "trainingBatchSize", "type": "int"}, + "validation_batch_size": {"key": "validationBatchSize", "type": "int"}, + "warmup_cosine_lr_cycles": {"key": "warmupCosineLRCycles", "type": "float"}, + "warmup_cosine_lr_warmup_epochs": {"key": "warmupCosineLRWarmupEpochs", "type": "int"}, + "weight_decay": {"key": "weightDecay", "type": "float"}, + "training_crop_size": {"key": "trainingCropSize", "type": "int"}, + "validation_crop_size": {"key": "validationCropSize", "type": "int"}, + "validation_resize_size": {"key": "validationResizeSize", "type": "int"}, + "weighted_loss": {"key": "weightedLoss", "type": "int"}, + } + + def __init__(self, **kwargs): """ :keyword advanced_settings: Settings for advanced scenarios. :paramtype advanced_settings: str @@ -18426,222 +17455,219 @@ def __init__( :paramtype weighted_loss: int """ super(ImageModelSettingsClassification, self).__init__(**kwargs) - self.training_crop_size = kwargs.get('training_crop_size', None) - self.validation_crop_size = kwargs.get('validation_crop_size', None) - self.validation_resize_size = kwargs.get('validation_resize_size', None) - self.weighted_loss = kwargs.get('weighted_loss', None) + self.training_crop_size = kwargs.get("training_crop_size", None) + self.validation_crop_size = kwargs.get("validation_crop_size", None) + self.validation_resize_size = kwargs.get("validation_resize_size", None) + self.weighted_loss = kwargs.get("weighted_loss", None) -class ImageModelSettingsObjectDetection(ImageModelSettings): - """Settings used for training the model. -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - - :ivar advanced_settings: Settings for advanced scenarios. - :vartype advanced_settings: str - :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - :vartype ams_gradient: bool - :ivar augmentations: Settings for using Augmentations. - :vartype augmentations: str - :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta1: float - :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range - [0, 1]. - :vartype beta2: float - :ivar checkpoint_frequency: Frequency to store model checkpoints. Must be a positive integer. - :vartype checkpoint_frequency: int - :ivar checkpoint_model: The pretrained checkpoint model for incremental training. - :vartype checkpoint_model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput - :ivar checkpoint_run_id: The id of a previous run that has a pretrained checkpoint for - incremental training. - :vartype checkpoint_run_id: str - :ivar distributed: Whether to use distributed training. - :vartype distributed: bool - :ivar early_stopping: Enable early stopping logic during training. - :vartype early_stopping: bool - :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before - primary metric improvement - is tracked for early stopping. Must be a positive integer. - :vartype early_stopping_delay: int - :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no - primary metric improvement before - the run is stopped. Must be a positive integer. - :vartype early_stopping_patience: int - :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. - :vartype enable_onnx_normalization: bool - :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must - be a positive integer. - :vartype evaluation_frequency: int - :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of - "GradAccumulationStep" steps without - updating the model weights while accumulating the gradients of those steps, and then using - the accumulated gradients to compute the weight updates. Must be a positive integer. - :vartype gradient_accumulation_step: int - :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. - For instance, passing 2 as value for 'seresnext' means - freezing layer0 and layer1. For a full list of models supported and details on layer freeze, - please - see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype layers_to_freeze: int - :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. - :vartype learning_rate: float - :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or - 'step'. Possible values include: "None", "WarmupCosine", "Step". - :vartype learning_rate_scheduler: str or - ~azure.mgmt.machinelearningservices.models.LearningRateScheduler - :ivar model_name: Name of the model to use for training. - For more information on the available models please visit the official documentation: - https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - :vartype model_name: str - :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - :vartype momentum: float - :ivar nesterov: Enable nesterov when optimizer is 'sgd'. - :vartype nesterov: bool - :ivar number_of_epochs: Number of training epochs. Must be a positive integer. - :vartype number_of_epochs: int - :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. - :vartype number_of_workers: int - :ivar optimizer: Type of optimizer. Possible values include: "None", "Sgd", "Adam", "Adamw". - :vartype optimizer: str or ~azure.mgmt.machinelearningservices.models.StochasticOptimizer - :ivar random_seed: Random seed to be used when using deterministic training. - :vartype random_seed: int - :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in - the range [0, 1]. - :vartype step_lr_gamma: float - :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a - positive integer. - :vartype step_lr_step_size: int - :ivar training_batch_size: Training batch size. Must be a positive integer. - :vartype training_batch_size: int - :ivar validation_batch_size: Validation batch size. Must be a positive integer. - :vartype validation_batch_size: int - :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is - 'warmup_cosine'. Must be a float in the range [0, 1]. - :vartype warmup_cosine_lr_cycles: float - :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is - 'warmup_cosine'. Must be a positive integer. - :vartype warmup_cosine_lr_warmup_epochs: int - :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be - a float in the range[0, 1]. - :vartype weight_decay: float - :ivar box_detections_per_image: Maximum number of detections per image, for all classes. Must - be a positive integer. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype box_detections_per_image: int - :ivar box_score_threshold: During inference, only return proposals with a classification score - greater than - BoxScoreThreshold. Must be a float in the range[0, 1]. - :vartype box_score_threshold: float - :ivar image_size: Image size for train and validation. Must be a positive integer. - Note: The training run may get into CUDA OOM if the size is too big. - Note: This settings is only supported for the 'yolov5' algorithm. - :vartype image_size: int - :ivar log_training_metrics: Enable computing and logging training metrics. Possible values - include: "Enable", "Disable". - :vartype log_training_metrics: str or - ~azure.mgmt.machinelearningservices.models.LogTrainingMetrics - :ivar log_validation_loss: Enable computing and logging validation loss. Possible values - include: "Enable", "Disable". - :vartype log_validation_loss: str or - ~azure.mgmt.machinelearningservices.models.LogValidationLoss - :ivar max_size: Maximum size of the image to be rescaled before feeding it to the backbone. - Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype max_size: int - :ivar min_size: Minimum size of the image to be rescaled before feeding it to the backbone. - Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype min_size: int - :ivar model_size: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - Note: training run may get into CUDA OOM if the model size is too big. - Note: This settings is only supported for the 'yolov5' algorithm. Possible values include: - "None", "Small", "Medium", "Large", "ExtraLarge". - :vartype model_size: str or ~azure.mgmt.machinelearningservices.models.ModelSize - :ivar multi_scale: Enable multi-scale image by varying image size by +/- 50%. - Note: training run may get into CUDA OOM if no sufficient GPU memory. - Note: This settings is only supported for the 'yolov5' algorithm. - :vartype multi_scale: bool - :ivar nms_iou_threshold: IOU threshold used during inference in NMS post processing. Must be a - float in the range [0, 1]. - :vartype nms_iou_threshold: float - :ivar tile_grid_size: The grid size to use for tiling each image. Note: TileGridSize must not - be - None to enable small object detection logic. A string containing two integers in mxn format. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype tile_grid_size: str - :ivar tile_overlap_ratio: Overlap ratio between adjacent tiles in each dimension. Must be float - in the range [0, 1). - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype tile_overlap_ratio: float - :ivar tile_predictions_nms_threshold: The IOU threshold to use to perform NMS while merging - predictions from tiles and image. - Used in validation/ inference. Must be float in the range [0, 1]. - Note: This settings is not supported for the 'yolov5' algorithm. - :vartype tile_predictions_nms_threshold: float - :ivar validation_iou_threshold: IOU threshold to use when computing validation metric. Must be - float in the range [0, 1]. - :vartype validation_iou_threshold: float - :ivar validation_metric_type: Metric computation method to use for validation metrics. Possible - values include: "None", "Coco", "Voc", "CocoVoc". - :vartype validation_metric_type: str or - ~azure.mgmt.machinelearningservices.models.ValidationMetricType - """ - - _attribute_map = { - 'advanced_settings': {'key': 'advancedSettings', 'type': 'str'}, - 'ams_gradient': {'key': 'amsGradient', 'type': 'bool'}, - 'augmentations': {'key': 'augmentations', 'type': 'str'}, - 'beta1': {'key': 'beta1', 'type': 'float'}, - 'beta2': {'key': 'beta2', 'type': 'float'}, - 'checkpoint_frequency': {'key': 'checkpointFrequency', 'type': 'int'}, - 'checkpoint_model': {'key': 'checkpointModel', 'type': 'MLFlowModelJobInput'}, - 'checkpoint_run_id': {'key': 'checkpointRunId', 'type': 'str'}, - 'distributed': {'key': 'distributed', 'type': 'bool'}, - 'early_stopping': {'key': 'earlyStopping', 'type': 'bool'}, - 'early_stopping_delay': {'key': 'earlyStoppingDelay', 'type': 'int'}, - 'early_stopping_patience': {'key': 'earlyStoppingPatience', 'type': 'int'}, - 'enable_onnx_normalization': {'key': 'enableOnnxNormalization', 'type': 'bool'}, - 'evaluation_frequency': {'key': 'evaluationFrequency', 'type': 'int'}, - 'gradient_accumulation_step': {'key': 'gradientAccumulationStep', 'type': 'int'}, - 'layers_to_freeze': {'key': 'layersToFreeze', 'type': 'int'}, - 'learning_rate': {'key': 'learningRate', 'type': 'float'}, - 'learning_rate_scheduler': {'key': 'learningRateScheduler', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'momentum': {'key': 'momentum', 'type': 'float'}, - 'nesterov': {'key': 'nesterov', 'type': 'bool'}, - 'number_of_epochs': {'key': 'numberOfEpochs', 'type': 'int'}, - 'number_of_workers': {'key': 'numberOfWorkers', 'type': 'int'}, - 'optimizer': {'key': 'optimizer', 'type': 'str'}, - 'random_seed': {'key': 'randomSeed', 'type': 'int'}, - 'step_lr_gamma': {'key': 'stepLRGamma', 'type': 'float'}, - 'step_lr_step_size': {'key': 'stepLRStepSize', 'type': 'int'}, - 'training_batch_size': {'key': 'trainingBatchSize', 'type': 'int'}, - 'validation_batch_size': {'key': 'validationBatchSize', 'type': 'int'}, - 'warmup_cosine_lr_cycles': {'key': 'warmupCosineLRCycles', 'type': 'float'}, - 'warmup_cosine_lr_warmup_epochs': {'key': 'warmupCosineLRWarmupEpochs', 'type': 'int'}, - 'weight_decay': {'key': 'weightDecay', 'type': 'float'}, - 'box_detections_per_image': {'key': 'boxDetectionsPerImage', 'type': 'int'}, - 'box_score_threshold': {'key': 'boxScoreThreshold', 'type': 'float'}, - 'image_size': {'key': 'imageSize', 'type': 'int'}, - 'log_training_metrics': {'key': 'logTrainingMetrics', 'type': 'str'}, - 'log_validation_loss': {'key': 'logValidationLoss', 'type': 'str'}, - 'max_size': {'key': 'maxSize', 'type': 'int'}, - 'min_size': {'key': 'minSize', 'type': 'int'}, - 'model_size': {'key': 'modelSize', 'type': 'str'}, - 'multi_scale': {'key': 'multiScale', 'type': 'bool'}, - 'nms_iou_threshold': {'key': 'nmsIouThreshold', 'type': 'float'}, - 'tile_grid_size': {'key': 'tileGridSize', 'type': 'str'}, - 'tile_overlap_ratio': {'key': 'tileOverlapRatio', 'type': 'float'}, - 'tile_predictions_nms_threshold': {'key': 'tilePredictionsNmsThreshold', 'type': 'float'}, - 'validation_iou_threshold': {'key': 'validationIouThreshold', 'type': 'float'}, - 'validation_metric_type': {'key': 'validationMetricType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): +class ImageModelSettingsObjectDetection(ImageModelSettings): + """Settings used for training the model. + For more information on the available settings please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + + :ivar advanced_settings: Settings for advanced scenarios. + :vartype advanced_settings: str + :ivar ams_gradient: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + :vartype ams_gradient: bool + :ivar augmentations: Settings for using Augmentations. + :vartype augmentations: str + :ivar beta1: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta1: float + :ivar beta2: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range + [0, 1]. + :vartype beta2: float + :ivar checkpoint_frequency: Frequency to store model checkpoints. Must be a positive integer. + :vartype checkpoint_frequency: int + :ivar checkpoint_model: The pretrained checkpoint model for incremental training. + :vartype checkpoint_model: ~azure.mgmt.machinelearningservices.models.MLFlowModelJobInput + :ivar checkpoint_run_id: The id of a previous run that has a pretrained checkpoint for + incremental training. + :vartype checkpoint_run_id: str + :ivar distributed: Whether to use distributed training. + :vartype distributed: bool + :ivar early_stopping: Enable early stopping logic during training. + :vartype early_stopping: bool + :ivar early_stopping_delay: Minimum number of epochs or validation evaluations to wait before + primary metric improvement + is tracked for early stopping. Must be a positive integer. + :vartype early_stopping_delay: int + :ivar early_stopping_patience: Minimum number of epochs or validation evaluations with no + primary metric improvement before + the run is stopped. Must be a positive integer. + :vartype early_stopping_patience: int + :ivar enable_onnx_normalization: Enable normalization when exporting ONNX model. + :vartype enable_onnx_normalization: bool + :ivar evaluation_frequency: Frequency to evaluate validation dataset to get metric scores. Must + be a positive integer. + :vartype evaluation_frequency: int + :ivar gradient_accumulation_step: Gradient accumulation means running a configured number of + "GradAccumulationStep" steps without + updating the model weights while accumulating the gradients of those steps, and then using + the accumulated gradients to compute the weight updates. Must be a positive integer. + :vartype gradient_accumulation_step: int + :ivar layers_to_freeze: Number of layers to freeze for the model. Must be a positive integer. + For instance, passing 2 as value for 'seresnext' means + freezing layer0 and layer1. For a full list of models supported and details on layer freeze, + please + see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype layers_to_freeze: int + :ivar learning_rate: Initial learning rate. Must be a float in the range [0, 1]. + :vartype learning_rate: float + :ivar learning_rate_scheduler: Type of learning rate scheduler. Must be 'warmup_cosine' or + 'step'. Possible values include: "None", "WarmupCosine", "Step". + :vartype learning_rate_scheduler: str or + ~azure.mgmt.machinelearningservices.models.LearningRateScheduler + :ivar model_name: Name of the model to use for training. + For more information on the available models please visit the official documentation: + https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + :vartype model_name: str + :ivar momentum: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + :vartype momentum: float + :ivar nesterov: Enable nesterov when optimizer is 'sgd'. + :vartype nesterov: bool + :ivar number_of_epochs: Number of training epochs. Must be a positive integer. + :vartype number_of_epochs: int + :ivar number_of_workers: Number of data loader workers. Must be a non-negative integer. + :vartype number_of_workers: int + :ivar optimizer: Type of optimizer. Possible values include: "None", "Sgd", "Adam", "Adamw". + :vartype optimizer: str or ~azure.mgmt.machinelearningservices.models.StochasticOptimizer + :ivar random_seed: Random seed to be used when using deterministic training. + :vartype random_seed: int + :ivar step_lr_gamma: Value of gamma when learning rate scheduler is 'step'. Must be a float in + the range [0, 1]. + :vartype step_lr_gamma: float + :ivar step_lr_step_size: Value of step size when learning rate scheduler is 'step'. Must be a + positive integer. + :vartype step_lr_step_size: int + :ivar training_batch_size: Training batch size. Must be a positive integer. + :vartype training_batch_size: int + :ivar validation_batch_size: Validation batch size. Must be a positive integer. + :vartype validation_batch_size: int + :ivar warmup_cosine_lr_cycles: Value of cosine cycle when learning rate scheduler is + 'warmup_cosine'. Must be a float in the range [0, 1]. + :vartype warmup_cosine_lr_cycles: float + :ivar warmup_cosine_lr_warmup_epochs: Value of warmup epochs when learning rate scheduler is + 'warmup_cosine'. Must be a positive integer. + :vartype warmup_cosine_lr_warmup_epochs: int + :ivar weight_decay: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be + a float in the range[0, 1]. + :vartype weight_decay: float + :ivar box_detections_per_image: Maximum number of detections per image, for all classes. Must + be a positive integer. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype box_detections_per_image: int + :ivar box_score_threshold: During inference, only return proposals with a classification score + greater than + BoxScoreThreshold. Must be a float in the range[0, 1]. + :vartype box_score_threshold: float + :ivar image_size: Image size for train and validation. Must be a positive integer. + Note: The training run may get into CUDA OOM if the size is too big. + Note: This settings is only supported for the 'yolov5' algorithm. + :vartype image_size: int + :ivar log_training_metrics: Enable computing and logging training metrics. Possible values + include: "Enable", "Disable". + :vartype log_training_metrics: str or + ~azure.mgmt.machinelearningservices.models.LogTrainingMetrics + :ivar log_validation_loss: Enable computing and logging validation loss. Possible values + include: "Enable", "Disable". + :vartype log_validation_loss: str or + ~azure.mgmt.machinelearningservices.models.LogValidationLoss + :ivar max_size: Maximum size of the image to be rescaled before feeding it to the backbone. + Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype max_size: int + :ivar min_size: Minimum size of the image to be rescaled before feeding it to the backbone. + Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype min_size: int + :ivar model_size: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. + Note: training run may get into CUDA OOM if the model size is too big. + Note: This settings is only supported for the 'yolov5' algorithm. Possible values include: + "None", "Small", "Medium", "Large", "ExtraLarge". + :vartype model_size: str or ~azure.mgmt.machinelearningservices.models.ModelSize + :ivar multi_scale: Enable multi-scale image by varying image size by +/- 50%. + Note: training run may get into CUDA OOM if no sufficient GPU memory. + Note: This settings is only supported for the 'yolov5' algorithm. + :vartype multi_scale: bool + :ivar nms_iou_threshold: IOU threshold used during inference in NMS post processing. Must be a + float in the range [0, 1]. + :vartype nms_iou_threshold: float + :ivar tile_grid_size: The grid size to use for tiling each image. Note: TileGridSize must not + be + None to enable small object detection logic. A string containing two integers in mxn format. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype tile_grid_size: str + :ivar tile_overlap_ratio: Overlap ratio between adjacent tiles in each dimension. Must be float + in the range [0, 1). + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype tile_overlap_ratio: float + :ivar tile_predictions_nms_threshold: The IOU threshold to use to perform NMS while merging + predictions from tiles and image. + Used in validation/ inference. Must be float in the range [0, 1]. + Note: This settings is not supported for the 'yolov5' algorithm. + :vartype tile_predictions_nms_threshold: float + :ivar validation_iou_threshold: IOU threshold to use when computing validation metric. Must be + float in the range [0, 1]. + :vartype validation_iou_threshold: float + :ivar validation_metric_type: Metric computation method to use for validation metrics. Possible + values include: "None", "Coco", "Voc", "CocoVoc". + :vartype validation_metric_type: str or + ~azure.mgmt.machinelearningservices.models.ValidationMetricType + """ + + _attribute_map = { + "advanced_settings": {"key": "advancedSettings", "type": "str"}, + "ams_gradient": {"key": "amsGradient", "type": "bool"}, + "augmentations": {"key": "augmentations", "type": "str"}, + "beta1": {"key": "beta1", "type": "float"}, + "beta2": {"key": "beta2", "type": "float"}, + "checkpoint_frequency": {"key": "checkpointFrequency", "type": "int"}, + "checkpoint_model": {"key": "checkpointModel", "type": "MLFlowModelJobInput"}, + "checkpoint_run_id": {"key": "checkpointRunId", "type": "str"}, + "distributed": {"key": "distributed", "type": "bool"}, + "early_stopping": {"key": "earlyStopping", "type": "bool"}, + "early_stopping_delay": {"key": "earlyStoppingDelay", "type": "int"}, + "early_stopping_patience": {"key": "earlyStoppingPatience", "type": "int"}, + "enable_onnx_normalization": {"key": "enableOnnxNormalization", "type": "bool"}, + "evaluation_frequency": {"key": "evaluationFrequency", "type": "int"}, + "gradient_accumulation_step": {"key": "gradientAccumulationStep", "type": "int"}, + "layers_to_freeze": {"key": "layersToFreeze", "type": "int"}, + "learning_rate": {"key": "learningRate", "type": "float"}, + "learning_rate_scheduler": {"key": "learningRateScheduler", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "momentum": {"key": "momentum", "type": "float"}, + "nesterov": {"key": "nesterov", "type": "bool"}, + "number_of_epochs": {"key": "numberOfEpochs", "type": "int"}, + "number_of_workers": {"key": "numberOfWorkers", "type": "int"}, + "optimizer": {"key": "optimizer", "type": "str"}, + "random_seed": {"key": "randomSeed", "type": "int"}, + "step_lr_gamma": {"key": "stepLRGamma", "type": "float"}, + "step_lr_step_size": {"key": "stepLRStepSize", "type": "int"}, + "training_batch_size": {"key": "trainingBatchSize", "type": "int"}, + "validation_batch_size": {"key": "validationBatchSize", "type": "int"}, + "warmup_cosine_lr_cycles": {"key": "warmupCosineLRCycles", "type": "float"}, + "warmup_cosine_lr_warmup_epochs": {"key": "warmupCosineLRWarmupEpochs", "type": "int"}, + "weight_decay": {"key": "weightDecay", "type": "float"}, + "box_detections_per_image": {"key": "boxDetectionsPerImage", "type": "int"}, + "box_score_threshold": {"key": "boxScoreThreshold", "type": "float"}, + "image_size": {"key": "imageSize", "type": "int"}, + "log_training_metrics": {"key": "logTrainingMetrics", "type": "str"}, + "log_validation_loss": {"key": "logValidationLoss", "type": "str"}, + "max_size": {"key": "maxSize", "type": "int"}, + "min_size": {"key": "minSize", "type": "int"}, + "model_size": {"key": "modelSize", "type": "str"}, + "multi_scale": {"key": "multiScale", "type": "bool"}, + "nms_iou_threshold": {"key": "nmsIouThreshold", "type": "float"}, + "tile_grid_size": {"key": "tileGridSize", "type": "str"}, + "tile_overlap_ratio": {"key": "tileOverlapRatio", "type": "float"}, + "tile_predictions_nms_threshold": {"key": "tilePredictionsNmsThreshold", "type": "float"}, + "validation_iou_threshold": {"key": "validationIouThreshold", "type": "float"}, + "validation_metric_type": {"key": "validationMetricType", "type": "str"}, + } + + def __init__(self, **kwargs): """ :keyword advanced_settings: Settings for advanced scenarios. :paramtype advanced_settings: str @@ -18797,90 +17823,87 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ValidationMetricType """ super(ImageModelSettingsObjectDetection, self).__init__(**kwargs) - self.box_detections_per_image = kwargs.get('box_detections_per_image', None) - self.box_score_threshold = kwargs.get('box_score_threshold', None) - self.image_size = kwargs.get('image_size', None) - self.log_training_metrics = kwargs.get('log_training_metrics', None) - self.log_validation_loss = kwargs.get('log_validation_loss', None) - self.max_size = kwargs.get('max_size', None) - self.min_size = kwargs.get('min_size', None) - self.model_size = kwargs.get('model_size', None) - self.multi_scale = kwargs.get('multi_scale', None) - self.nms_iou_threshold = kwargs.get('nms_iou_threshold', None) - self.tile_grid_size = kwargs.get('tile_grid_size', None) - self.tile_overlap_ratio = kwargs.get('tile_overlap_ratio', None) - self.tile_predictions_nms_threshold = kwargs.get('tile_predictions_nms_threshold', None) - self.validation_iou_threshold = kwargs.get('validation_iou_threshold', None) - self.validation_metric_type = kwargs.get('validation_metric_type', None) + self.box_detections_per_image = kwargs.get("box_detections_per_image", None) + self.box_score_threshold = kwargs.get("box_score_threshold", None) + self.image_size = kwargs.get("image_size", None) + self.log_training_metrics = kwargs.get("log_training_metrics", None) + self.log_validation_loss = kwargs.get("log_validation_loss", None) + self.max_size = kwargs.get("max_size", None) + self.min_size = kwargs.get("min_size", None) + self.model_size = kwargs.get("model_size", None) + self.multi_scale = kwargs.get("multi_scale", None) + self.nms_iou_threshold = kwargs.get("nms_iou_threshold", None) + self.tile_grid_size = kwargs.get("tile_grid_size", None) + self.tile_overlap_ratio = kwargs.get("tile_overlap_ratio", None) + self.tile_predictions_nms_threshold = kwargs.get("tile_predictions_nms_threshold", None) + self.validation_iou_threshold = kwargs.get("validation_iou_threshold", None) + self.validation_metric_type = kwargs.get("validation_metric_type", None) class ImageObjectDetection(AutoMLVertical, ImageObjectDetectionBase): """Image Object Detection. Object detection is used to identify objects in an image and locate each object with a -bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. + bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings - :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar validation_data_size: The fraction of training dataset that needs to be set aside for - validation purpose. - Values between (0.0 , 1.0) - Applied when validation dataset is not provided. - :vartype validation_data_size: float - :ivar model_settings: Settings used for training the model. - :vartype model_settings: - ~azure.mgmt.machinelearningservices.models.ImageModelSettingsObjectDetection - :ivar search_space: Search space for sampling different combinations of models and their - hyperparameters. - :vartype search_space: - list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsObjectDetection] - :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", - "Info", "Warning", "Error", "Critical". - :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity - :ivar target_column_name: Target column name: This is prediction values column. - Also known as label column name in context of classification tasks. - :vartype target_column_name: str - :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. - Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", - "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", - "TextClassification", "TextClassificationMultilabel", "TextNER". - :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType - :ivar training_data: Required. [Required] Training data input. - :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar primary_metric: Primary metric to optimize for this task. Possible values include: - "MeanAveragePrecision". - :vartype primary_metric: str or - ~azure.mgmt.machinelearningservices.models.ObjectDetectionPrimaryMetrics + :ivar limit_settings: Required. [Required] Limit settings for the AutoML job. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings + :ivar sweep_settings: Model sweeping and hyperparameter sweeping related settings. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.ImageSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar validation_data_size: The fraction of training dataset that needs to be set aside for + validation purpose. + Values between (0.0 , 1.0) + Applied when validation dataset is not provided. + :vartype validation_data_size: float + :ivar model_settings: Settings used for training the model. + :vartype model_settings: + ~azure.mgmt.machinelearningservices.models.ImageModelSettingsObjectDetection + :ivar search_space: Search space for sampling different combinations of models and their + hyperparameters. + :vartype search_space: + list[~azure.mgmt.machinelearningservices.models.ImageModelDistributionSettingsObjectDetection] + :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", + "Info", "Warning", "Error", "Critical". + :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity + :ivar target_column_name: Target column name: This is prediction values column. + Also known as label column name in context of classification tasks. + :vartype target_column_name: str + :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. + Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", + "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", + "TextClassification", "TextClassificationMultilabel", "TextNER". + :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType + :ivar training_data: Required. [Required] Training data input. + :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar primary_metric: Primary metric to optimize for this task. Possible values include: + "MeanAveragePrecision". + :vartype primary_metric: str or + ~azure.mgmt.machinelearningservices.models.ObjectDetectionPrimaryMetrics """ _validation = { - 'limit_settings': {'required': True}, - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "limit_settings": {"required": True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'limit_settings': {'key': 'limitSettings', 'type': 'ImageLimitSettings'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'ImageSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'model_settings': {'key': 'modelSettings', 'type': 'ImageModelSettingsObjectDetection'}, - 'search_space': {'key': 'searchSpace', 'type': '[ImageModelDistributionSettingsObjectDetection]'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + "limit_settings": {"key": "limitSettings", "type": "ImageLimitSettings"}, + "sweep_settings": {"key": "sweepSettings", "type": "ImageSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "model_settings": {"key": "modelSettings", "type": "ImageModelSettingsObjectDetection"}, + "search_space": {"key": "searchSpace", "type": "[ImageModelDistributionSettingsObjectDetection]"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword limit_settings: Required. [Required] Limit settings for the AutoML job. :paramtype limit_settings: ~azure.mgmt.machinelearningservices.models.ImageLimitSettings @@ -18914,17 +17937,17 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ObjectDetectionPrimaryMetrics """ super(ImageObjectDetection, self).__init__(**kwargs) - self.limit_settings = kwargs['limit_settings'] - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) - self.model_settings = kwargs.get('model_settings', None) - self.search_space = kwargs.get('search_space', None) - self.task_type = 'ImageObjectDetection' # type: str - self.primary_metric = kwargs.get('primary_metric', None) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.limit_settings = kwargs["limit_settings"] + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) + self.model_settings = kwargs.get("model_settings", None) + self.search_space = kwargs.get("search_space", None) + self.task_type = "ImageObjectDetection" # type: str + self.primary_metric = kwargs.get("primary_metric", None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class ImageSweepSettings(msrest.serialization.Model): @@ -18941,18 +17964,15 @@ class ImageSweepSettings(msrest.serialization.Model): """ _validation = { - 'sampling_algorithm': {'required': True}, + "sampling_algorithm": {"required": True}, } _attribute_map = { - 'early_termination': {'key': 'earlyTermination', 'type': 'EarlyTerminationPolicy'}, - 'sampling_algorithm': {'key': 'samplingAlgorithm', 'type': 'str'}, + "early_termination": {"key": "earlyTermination", "type": "EarlyTerminationPolicy"}, + "sampling_algorithm": {"key": "samplingAlgorithm", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword early_termination: Type of early termination policy. :paramtype early_termination: ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicy @@ -18962,8 +17982,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType """ super(ImageSweepSettings, self).__init__(**kwargs) - self.early_termination = kwargs.get('early_termination', None) - self.sampling_algorithm = kwargs['sampling_algorithm'] + self.early_termination = kwargs.get("early_termination", None) + self.sampling_algorithm = kwargs["sampling_algorithm"] class ImportDataAction(ScheduleActionBase): @@ -18980,27 +18000,24 @@ class ImportDataAction(ScheduleActionBase): """ _validation = { - 'action_type': {'required': True}, - 'data_import_definition': {'required': True}, + "action_type": {"required": True}, + "data_import_definition": {"required": True}, } _attribute_map = { - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data_import_definition': {'key': 'dataImportDefinition', 'type': 'DataImport'}, + "action_type": {"key": "actionType", "type": "str"}, + "data_import_definition": {"key": "dataImportDefinition", "type": "DataImport"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword data_import_definition: Required. [Required] Defines Schedule action definition details. :paramtype data_import_definition: ~azure.mgmt.machinelearningservices.models.DataImport """ super(ImportDataAction, self).__init__(**kwargs) - self.action_type = 'ImportData' # type: str - self.data_import_definition = kwargs['data_import_definition'] + self.action_type = "ImportData" # type: str + self.data_import_definition = kwargs["data_import_definition"] class IndexColumn(msrest.serialization.Model): @@ -19014,14 +18031,11 @@ class IndexColumn(msrest.serialization.Model): """ _attribute_map = { - 'column_name': {'key': 'columnName', 'type': 'str'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, + "column_name": {"key": "columnName", "type": "str"}, + "data_type": {"key": "dataType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword column_name: Specifies the column name. :paramtype column_name: str @@ -19030,8 +18044,8 @@ def __init__( :paramtype data_type: str or ~azure.mgmt.machinelearningservices.models.FeatureDataType """ super(IndexColumn, self).__init__(**kwargs) - self.column_name = kwargs.get('column_name', None) - self.data_type = kwargs.get('data_type', None) + self.column_name = kwargs.get("column_name", None) + self.data_type = kwargs.get("data_type", None) class InferenceContainerProperties(msrest.serialization.Model): @@ -19047,15 +18061,12 @@ class InferenceContainerProperties(msrest.serialization.Model): """ _attribute_map = { - 'liveness_route': {'key': 'livenessRoute', 'type': 'Route'}, - 'readiness_route': {'key': 'readinessRoute', 'type': 'Route'}, - 'scoring_route': {'key': 'scoringRoute', 'type': 'Route'}, + "liveness_route": {"key": "livenessRoute", "type": "Route"}, + "readiness_route": {"key": "readinessRoute", "type": "Route"}, + "scoring_route": {"key": "scoringRoute", "type": "Route"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword liveness_route: The route to check the liveness of the inference server container. :paramtype liveness_route: ~azure.mgmt.machinelearningservices.models.Route @@ -19066,9 +18077,9 @@ def __init__( :paramtype scoring_route: ~azure.mgmt.machinelearningservices.models.Route """ super(InferenceContainerProperties, self).__init__(**kwargs) - self.liveness_route = kwargs.get('liveness_route', None) - self.readiness_route = kwargs.get('readiness_route', None) - self.scoring_route = kwargs.get('scoring_route', None) + self.liveness_route = kwargs.get("liveness_route", None) + self.readiness_route = kwargs.get("readiness_route", None) + self.scoring_route = kwargs.get("scoring_route", None) class InferenceEndpoint(TrackedResource): @@ -19105,31 +18116,28 @@ class InferenceEndpoint(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'InferenceEndpointProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "InferenceEndpointProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -19146,10 +18154,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(InferenceEndpoint, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class PropertiesBase(msrest.serialization.Model): @@ -19162,14 +18170,11 @@ class PropertiesBase(msrest.serialization.Model): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: Description of the resource. :paramtype description: str @@ -19177,8 +18182,8 @@ def __init__( :paramtype properties: dict[str, str] """ super(PropertiesBase, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.properties = kwargs.get('properties', None) + self.description = kwargs.get("description", None) + self.properties = kwargs.get("properties", None) class InferenceEndpointProperties(PropertiesBase): @@ -19207,25 +18212,22 @@ class InferenceEndpointProperties(PropertiesBase): """ _validation = { - 'auth_mode': {'required': True}, - 'endpoint_uri': {'readonly': True}, - 'group_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'provisioning_state': {'readonly': True}, + "auth_mode": {"required": True}, + "endpoint_uri": {"readonly": True}, + "group_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'auth_mode': {'key': 'authMode', 'type': 'str'}, - 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, - 'group_id': {'key': 'groupId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "auth_mode": {"key": "authMode", "type": "str"}, + "endpoint_uri": {"key": "endpointUri", "type": "str"}, + "group_id": {"key": "groupId", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: Description of the resource. :paramtype description: str @@ -19239,9 +18241,9 @@ def __init__( :paramtype group_id: str """ super(InferenceEndpointProperties, self).__init__(**kwargs) - self.auth_mode = kwargs['auth_mode'] + self.auth_mode = kwargs["auth_mode"] self.endpoint_uri = None - self.group_id = kwargs['group_id'] + self.group_id = kwargs["group_id"] self.provisioning_state = None @@ -19256,14 +18258,11 @@ class InferenceEndpointTrackedResourceArmPaginatedResult(msrest.serialization.Mo """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[InferenceEndpoint]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[InferenceEndpoint]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of InferenceEndpoint objects. If null, there are no additional pages. @@ -19272,8 +18271,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.InferenceEndpoint] """ super(InferenceEndpointTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class InferenceGroup(TrackedResource): @@ -19310,31 +18309,28 @@ class InferenceGroup(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'InferenceGroupProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "InferenceGroupProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -19351,10 +18347,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(InferenceGroup, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class InferenceGroupProperties(PropertiesBase): @@ -19381,22 +18377,19 @@ class InferenceGroupProperties(PropertiesBase): """ _validation = { - 'provisioning_state': {'readonly': True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'bonus_extra_capacity': {'key': 'bonusExtraCapacity', 'type': 'int'}, - 'metadata': {'key': 'metadata', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "bonus_extra_capacity": {"key": "bonusExtraCapacity", "type": "int"}, + "metadata": {"key": "metadata", "type": "str"}, + "priority": {"key": "priority", "type": "int"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: Description of the resource. :paramtype description: str @@ -19412,9 +18405,9 @@ def __init__( :paramtype priority: int """ super(InferenceGroupProperties, self).__init__(**kwargs) - self.bonus_extra_capacity = kwargs.get('bonus_extra_capacity', 0) - self.metadata = kwargs.get('metadata', None) - self.priority = kwargs.get('priority', 0) + self.bonus_extra_capacity = kwargs.get("bonus_extra_capacity", 0) + self.metadata = kwargs.get("metadata", None) + self.priority = kwargs.get("priority", 0) self.provisioning_state = None @@ -19429,14 +18422,11 @@ class InferenceGroupTrackedResourceArmPaginatedResult(msrest.serialization.Model """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[InferenceGroup]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[InferenceGroup]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of InferenceGroup objects. If null, there are no additional pages. @@ -19445,8 +18435,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.InferenceGroup] """ super(InferenceGroupTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class InferencePool(TrackedResource): @@ -19483,31 +18473,28 @@ class InferencePool(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'InferencePoolProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "InferencePoolProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -19524,10 +18511,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(InferencePool, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class InferencePoolProperties(PropertiesBase): @@ -19559,25 +18546,22 @@ class InferencePoolProperties(PropertiesBase): """ _validation = { - 'node_sku_type': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'provisioning_state': {'readonly': True}, + "node_sku_type": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, - 'environment_configuration': {'key': 'environmentConfiguration', 'type': 'PoolEnvironmentConfiguration'}, - 'model_configuration': {'key': 'modelConfiguration', 'type': 'PoolModelConfiguration'}, - 'node_sku_type': {'key': 'nodeSkuType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'request_configuration': {'key': 'requestConfiguration', 'type': 'RequestConfiguration'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "code_configuration": {"key": "codeConfiguration", "type": "CodeConfiguration"}, + "environment_configuration": {"key": "environmentConfiguration", "type": "PoolEnvironmentConfiguration"}, + "model_configuration": {"key": "modelConfiguration", "type": "PoolModelConfiguration"}, + "node_sku_type": {"key": "nodeSkuType", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "request_configuration": {"key": "requestConfiguration", "type": "RequestConfiguration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: Description of the resource. :paramtype description: str @@ -19598,12 +18582,12 @@ def __init__( ~azure.mgmt.machinelearningservices.models.RequestConfiguration """ super(InferencePoolProperties, self).__init__(**kwargs) - self.code_configuration = kwargs.get('code_configuration', None) - self.environment_configuration = kwargs.get('environment_configuration', None) - self.model_configuration = kwargs.get('model_configuration', None) - self.node_sku_type = kwargs['node_sku_type'] + self.code_configuration = kwargs.get("code_configuration", None) + self.environment_configuration = kwargs.get("environment_configuration", None) + self.model_configuration = kwargs.get("model_configuration", None) + self.node_sku_type = kwargs["node_sku_type"] self.provisioning_state = None - self.request_configuration = kwargs.get('request_configuration', None) + self.request_configuration = kwargs.get("request_configuration", None) class InferencePoolTrackedResourceArmPaginatedResult(msrest.serialization.Model): @@ -19617,14 +18601,11 @@ class InferencePoolTrackedResourceArmPaginatedResult(msrest.serialization.Model) """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[InferencePool]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[InferencePool]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of InferencePool objects. If null, there are no additional pages. @@ -19633,8 +18614,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.InferencePool] """ super(InferencePoolTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class InstanceTypeSchema(msrest.serialization.Model): @@ -19647,14 +18628,11 @@ class InstanceTypeSchema(msrest.serialization.Model): """ _attribute_map = { - 'node_selector': {'key': 'nodeSelector', 'type': '{str}'}, - 'resources': {'key': 'resources', 'type': 'InstanceTypeSchemaResources'}, + "node_selector": {"key": "nodeSelector", "type": "{str}"}, + "resources": {"key": "resources", "type": "InstanceTypeSchemaResources"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword node_selector: Node Selector. :paramtype node_selector: dict[str, str] @@ -19662,8 +18640,8 @@ def __init__( :paramtype resources: ~azure.mgmt.machinelearningservices.models.InstanceTypeSchemaResources """ super(InstanceTypeSchema, self).__init__(**kwargs) - self.node_selector = kwargs.get('node_selector', None) - self.resources = kwargs.get('resources', None) + self.node_selector = kwargs.get("node_selector", None) + self.resources = kwargs.get("resources", None) class InstanceTypeSchemaResources(msrest.serialization.Model): @@ -19676,14 +18654,11 @@ class InstanceTypeSchemaResources(msrest.serialization.Model): """ _attribute_map = { - 'requests': {'key': 'requests', 'type': '{str}'}, - 'limits': {'key': 'limits', 'type': '{str}'}, + "requests": {"key": "requests", "type": "{str}"}, + "limits": {"key": "limits", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword requests: Resource requests for this instance type. :paramtype requests: dict[str, str] @@ -19691,8 +18666,8 @@ def __init__( :paramtype limits: dict[str, str] """ super(InstanceTypeSchemaResources, self).__init__(**kwargs) - self.requests = kwargs.get('requests', None) - self.limits = kwargs.get('limits', None) + self.requests = kwargs.get("requests", None) + self.limits = kwargs.get("limits", None) class IntellectualProperty(msrest.serialization.Model): @@ -19709,18 +18684,15 @@ class IntellectualProperty(msrest.serialization.Model): """ _validation = { - 'publisher': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "publisher": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'protection_level': {'key': 'protectionLevel', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, + "protection_level": {"key": "protectionLevel", "type": "str"}, + "publisher": {"key": "publisher", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword protection_level: Protection level of the Intellectual Property. Possible values include: "All", "None". @@ -19730,8 +18702,8 @@ def __init__( :paramtype publisher: str """ super(IntellectualProperty, self).__init__(**kwargs) - self.protection_level = kwargs.get('protection_level', None) - self.publisher = kwargs['publisher'] + self.protection_level = kwargs.get("protection_level", None) + self.publisher = kwargs["publisher"] class JobBase(ProxyResource): @@ -19757,31 +18729,28 @@ class JobBase(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'JobBaseProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "JobBaseProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.JobBaseProperties """ super(JobBase, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class JobBaseResourceArmPaginatedResult(msrest.serialization.Model): @@ -19795,14 +18764,11 @@ class JobBaseResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[JobBase]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[JobBase]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of JobBase objects. If null, there are no additional pages. @@ -19811,8 +18777,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.JobBase] """ super(JobBaseResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class JobResourceConfiguration(ResourceConfiguration): @@ -19841,23 +18807,20 @@ class JobResourceConfiguration(ResourceConfiguration): """ _validation = { - 'shm_size': {'pattern': r'\d+[bBkKmMgG]'}, + "shm_size": {"pattern": r"\d+[bBkKmMgG]"}, } _attribute_map = { - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'}, - 'properties': {'key': 'properties', 'type': '{object}'}, - 'docker_args': {'key': 'dockerArgs', 'type': 'str'}, - 'shm_size': {'key': 'shmSize', 'type': 'str'}, + "instance_count": {"key": "instanceCount", "type": "int"}, + "instance_type": {"key": "instanceType", "type": "str"}, + "locations": {"key": "locations", "type": "[str]"}, + "max_instance_count": {"key": "maxInstanceCount", "type": "int"}, + "properties": {"key": "properties", "type": "{object}"}, + "docker_args": {"key": "dockerArgs", "type": "str"}, + "shm_size": {"key": "shmSize", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword instance_count: Optional number of instances or nodes used by the compute target. :paramtype instance_count: int @@ -19881,8 +18844,8 @@ def __init__( :paramtype shm_size: str """ super(JobResourceConfiguration, self).__init__(**kwargs) - self.docker_args = kwargs.get('docker_args', None) - self.shm_size = kwargs.get('shm_size', "2g") + self.docker_args = kwargs.get("docker_args", None) + self.shm_size = kwargs.get("shm_size", "2g") class JobScheduleAction(ScheduleActionBase): @@ -19899,26 +18862,23 @@ class JobScheduleAction(ScheduleActionBase): """ _validation = { - 'action_type': {'required': True}, - 'job_definition': {'required': True}, + "action_type": {"required": True}, + "job_definition": {"required": True}, } _attribute_map = { - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'job_definition': {'key': 'jobDefinition', 'type': 'JobBaseProperties'}, + "action_type": {"key": "actionType", "type": "str"}, + "job_definition": {"key": "jobDefinition", "type": "JobBaseProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword job_definition: Required. [Required] Defines Schedule action definition details. :paramtype job_definition: ~azure.mgmt.machinelearningservices.models.JobBaseProperties """ super(JobScheduleAction, self).__init__(**kwargs) - self.action_type = 'CreateJob' # type: str - self.job_definition = kwargs['job_definition'] + self.action_type = "CreateJob" # type: str + self.job_definition = kwargs["job_definition"] class JobService(msrest.serialization.Model): @@ -19944,24 +18904,21 @@ class JobService(msrest.serialization.Model): """ _validation = { - 'error_message': {'readonly': True}, - 'status': {'readonly': True}, + "error_message": {"readonly": True}, + "status": {"readonly": True}, } _attribute_map = { - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - 'job_service_type': {'key': 'jobServiceType', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': 'Nodes'}, - 'port': {'key': 'port', 'type': 'int'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'status': {'key': 'status', 'type': 'str'}, + "endpoint": {"key": "endpoint", "type": "str"}, + "error_message": {"key": "errorMessage", "type": "str"}, + "job_service_type": {"key": "jobServiceType", "type": "str"}, + "nodes": {"key": "nodes", "type": "Nodes"}, + "port": {"key": "port", "type": "int"}, + "properties": {"key": "properties", "type": "{str}"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword endpoint: Url for endpoint. :paramtype endpoint: str @@ -19976,12 +18933,12 @@ def __init__( :paramtype properties: dict[str, str] """ super(JobService, self).__init__(**kwargs) - self.endpoint = kwargs.get('endpoint', None) + self.endpoint = kwargs.get("endpoint", None) self.error_message = None - self.job_service_type = kwargs.get('job_service_type', None) - self.nodes = kwargs.get('nodes', None) - self.port = kwargs.get('port', None) - self.properties = kwargs.get('properties', None) + self.job_service_type = kwargs.get("job_service_type", None) + self.nodes = kwargs.get("nodes", None) + self.port = kwargs.get("port", None) + self.properties = kwargs.get("properties", None) self.status = None @@ -19997,15 +18954,12 @@ class JupyterKernelConfig(msrest.serialization.Model): """ _attribute_map = { - 'argv': {'key': 'argv', 'type': '[str]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'language': {'key': 'language', 'type': 'str'}, + "argv": {"key": "argv", "type": "[str]"}, + "display_name": {"key": "displayName", "type": "str"}, + "language": {"key": "language", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword argv: Argument to the the runtime. :paramtype argv: list[str] @@ -20015,9 +18969,9 @@ def __init__( :paramtype language: str """ super(JupyterKernelConfig, self).__init__(**kwargs) - self.argv = kwargs.get('argv', None) - self.display_name = kwargs.get('display_name', None) - self.language = kwargs.get('language', None) + self.argv = kwargs.get("argv", None) + self.display_name = kwargs.get("display_name", None) + self.language = kwargs.get("language", None) class KerberosCredentials(msrest.serialization.Model): @@ -20035,21 +18989,18 @@ class KerberosCredentials(msrest.serialization.Model): """ _validation = { - 'kerberos_kdc_address': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'kerberos_principal': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'kerberos_realm': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "kerberos_kdc_address": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "kerberos_principal": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "kerberos_realm": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'kerberos_kdc_address': {'key': 'kerberosKdcAddress', 'type': 'str'}, - 'kerberos_principal': {'key': 'kerberosPrincipal', 'type': 'str'}, - 'kerberos_realm': {'key': 'kerberosRealm', 'type': 'str'}, + "kerberos_kdc_address": {"key": "kerberosKdcAddress", "type": "str"}, + "kerberos_principal": {"key": "kerberosPrincipal", "type": "str"}, + "kerberos_realm": {"key": "kerberosRealm", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword kerberos_kdc_address: Required. [Required] IP Address or DNS HostName. :paramtype kerberos_kdc_address: str @@ -20060,9 +19011,9 @@ def __init__( :paramtype kerberos_realm: str """ super(KerberosCredentials, self).__init__(**kwargs) - self.kerberos_kdc_address = kwargs['kerberos_kdc_address'] - self.kerberos_principal = kwargs['kerberos_principal'] - self.kerberos_realm = kwargs['kerberos_realm'] + self.kerberos_kdc_address = kwargs["kerberos_kdc_address"] + self.kerberos_principal = kwargs["kerberos_principal"] + self.kerberos_realm = kwargs["kerberos_realm"] class KerberosKeytabCredentials(DatastoreCredentials, KerberosCredentials): @@ -20086,25 +19037,22 @@ class KerberosKeytabCredentials(DatastoreCredentials, KerberosCredentials): """ _validation = { - 'kerberos_kdc_address': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'kerberos_principal': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'kerberos_realm': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'credentials_type': {'required': True}, - 'secrets': {'required': True}, + "kerberos_kdc_address": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "kerberos_principal": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "kerberos_realm": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "credentials_type": {"required": True}, + "secrets": {"required": True}, } _attribute_map = { - 'kerberos_kdc_address': {'key': 'kerberosKdcAddress', 'type': 'str'}, - 'kerberos_principal': {'key': 'kerberosPrincipal', 'type': 'str'}, - 'kerberos_realm': {'key': 'kerberosRealm', 'type': 'str'}, - 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, - 'secrets': {'key': 'secrets', 'type': 'KerberosKeytabSecrets'}, + "kerberos_kdc_address": {"key": "kerberosKdcAddress", "type": "str"}, + "kerberos_principal": {"key": "kerberosPrincipal", "type": "str"}, + "kerberos_realm": {"key": "kerberosRealm", "type": "str"}, + "credentials_type": {"key": "credentialsType", "type": "str"}, + "secrets": {"key": "secrets", "type": "KerberosKeytabSecrets"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword kerberos_kdc_address: Required. [Required] IP Address or DNS HostName. :paramtype kerberos_kdc_address: str @@ -20117,11 +19065,11 @@ def __init__( :paramtype secrets: ~azure.mgmt.machinelearningservices.models.KerberosKeytabSecrets """ super(KerberosKeytabCredentials, self).__init__(**kwargs) - self.kerberos_kdc_address = kwargs['kerberos_kdc_address'] - self.kerberos_principal = kwargs['kerberos_principal'] - self.kerberos_realm = kwargs['kerberos_realm'] - self.credentials_type = 'KerberosKeytab' # type: str - self.secrets = kwargs['secrets'] + self.kerberos_kdc_address = kwargs["kerberos_kdc_address"] + self.kerberos_principal = kwargs["kerberos_principal"] + self.kerberos_realm = kwargs["kerberos_realm"] + self.credentials_type = "KerberosKeytab" # type: str + self.secrets = kwargs["secrets"] class KerberosKeytabSecrets(DatastoreSecrets): @@ -20138,25 +19086,22 @@ class KerberosKeytabSecrets(DatastoreSecrets): """ _validation = { - 'secrets_type': {'required': True}, + "secrets_type": {"required": True}, } _attribute_map = { - 'secrets_type': {'key': 'secretsType', 'type': 'str'}, - 'kerberos_keytab': {'key': 'kerberosKeytab', 'type': 'str'}, + "secrets_type": {"key": "secretsType", "type": "str"}, + "kerberos_keytab": {"key": "kerberosKeytab", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword kerberos_keytab: Kerberos keytab secret. :paramtype kerberos_keytab: str """ super(KerberosKeytabSecrets, self).__init__(**kwargs) - self.secrets_type = 'KerberosKeytab' # type: str - self.kerberos_keytab = kwargs.get('kerberos_keytab', None) + self.secrets_type = "KerberosKeytab" # type: str + self.kerberos_keytab = kwargs.get("kerberos_keytab", None) class KerberosPasswordCredentials(DatastoreCredentials, KerberosCredentials): @@ -20180,25 +19125,22 @@ class KerberosPasswordCredentials(DatastoreCredentials, KerberosCredentials): """ _validation = { - 'kerberos_kdc_address': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'kerberos_principal': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'kerberos_realm': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'credentials_type': {'required': True}, - 'secrets': {'required': True}, + "kerberos_kdc_address": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "kerberos_principal": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "kerberos_realm": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "credentials_type": {"required": True}, + "secrets": {"required": True}, } _attribute_map = { - 'kerberos_kdc_address': {'key': 'kerberosKdcAddress', 'type': 'str'}, - 'kerberos_principal': {'key': 'kerberosPrincipal', 'type': 'str'}, - 'kerberos_realm': {'key': 'kerberosRealm', 'type': 'str'}, - 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, - 'secrets': {'key': 'secrets', 'type': 'KerberosPasswordSecrets'}, + "kerberos_kdc_address": {"key": "kerberosKdcAddress", "type": "str"}, + "kerberos_principal": {"key": "kerberosPrincipal", "type": "str"}, + "kerberos_realm": {"key": "kerberosRealm", "type": "str"}, + "credentials_type": {"key": "credentialsType", "type": "str"}, + "secrets": {"key": "secrets", "type": "KerberosPasswordSecrets"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword kerberos_kdc_address: Required. [Required] IP Address or DNS HostName. :paramtype kerberos_kdc_address: str @@ -20211,11 +19153,11 @@ def __init__( :paramtype secrets: ~azure.mgmt.machinelearningservices.models.KerberosPasswordSecrets """ super(KerberosPasswordCredentials, self).__init__(**kwargs) - self.kerberos_kdc_address = kwargs['kerberos_kdc_address'] - self.kerberos_principal = kwargs['kerberos_principal'] - self.kerberos_realm = kwargs['kerberos_realm'] - self.credentials_type = 'KerberosPassword' # type: str - self.secrets = kwargs['secrets'] + self.kerberos_kdc_address = kwargs["kerberos_kdc_address"] + self.kerberos_principal = kwargs["kerberos_principal"] + self.kerberos_realm = kwargs["kerberos_realm"] + self.credentials_type = "KerberosPassword" # type: str + self.secrets = kwargs["secrets"] class KerberosPasswordSecrets(DatastoreSecrets): @@ -20232,25 +19174,22 @@ class KerberosPasswordSecrets(DatastoreSecrets): """ _validation = { - 'secrets_type': {'required': True}, + "secrets_type": {"required": True}, } _attribute_map = { - 'secrets_type': {'key': 'secretsType', 'type': 'str'}, - 'kerberos_password': {'key': 'kerberosPassword', 'type': 'str'}, + "secrets_type": {"key": "secretsType", "type": "str"}, + "kerberos_password": {"key": "kerberosPassword", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword kerberos_password: Kerberos password secret. :paramtype kerberos_password: str """ super(KerberosPasswordSecrets, self).__init__(**kwargs) - self.secrets_type = 'KerberosPassword' # type: str - self.kerberos_password = kwargs.get('kerberos_password', None) + self.secrets_type = "KerberosPassword" # type: str + self.kerberos_password = kwargs.get("kerberos_password", None) class KeyVaultProperties(msrest.serialization.Model): @@ -20268,20 +19207,17 @@ class KeyVaultProperties(msrest.serialization.Model): """ _validation = { - 'key_identifier': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'key_vault_arm_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "key_identifier": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "key_vault_arm_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, - 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, - 'key_vault_arm_id': {'key': 'keyVaultArmId', 'type': 'str'}, + "identity_client_id": {"key": "identityClientId", "type": "str"}, + "key_identifier": {"key": "keyIdentifier", "type": "str"}, + "key_vault_arm_id": {"key": "keyVaultArmId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword identity_client_id: Currently, we support only SystemAssigned MSI. We need this when we support UserAssignedIdentities. @@ -20292,9 +19228,9 @@ def __init__( :paramtype key_vault_arm_id: str """ super(KeyVaultProperties, self).__init__(**kwargs) - self.identity_client_id = kwargs.get('identity_client_id', None) - self.key_identifier = kwargs['key_identifier'] - self.key_vault_arm_id = kwargs['key_vault_arm_id'] + self.identity_client_id = kwargs.get("identity_client_id", None) + self.key_identifier = kwargs["key_identifier"] + self.key_vault_arm_id = kwargs["key_vault_arm_id"] class KubernetesSchema(msrest.serialization.Model): @@ -20305,19 +19241,16 @@ class KubernetesSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + "properties": {"key": "properties", "type": "KubernetesProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of Kubernetes. :paramtype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties """ super(KubernetesSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class Kubernetes(Compute, KubernetesSchema): @@ -20359,32 +19292,29 @@ class Kubernetes(Compute, KubernetesSchema): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "properties": {"key": "properties", "type": "KubernetesProperties"}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Properties of Kubernetes. :paramtype properties: ~azure.mgmt.machinelearningservices.models.KubernetesProperties @@ -20399,17 +19329,17 @@ def __init__( :paramtype disable_local_auth: bool """ super(Kubernetes, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'Kubernetes' # type: str - self.compute_location = kwargs.get('compute_location', None) + self.properties = kwargs.get("properties", None) + self.compute_type = "Kubernetes" # type: str + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class OnlineDeploymentProperties(EndpointDeploymentPropertiesBase): @@ -20471,38 +19401,35 @@ class OnlineDeploymentProperties(EndpointDeploymentPropertiesBase): """ _validation = { - 'endpoint_compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, + "endpoint_compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, - 'description': {'key': 'description', 'type': 'str'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, - 'data_collector': {'key': 'dataCollector', 'type': 'DataCollector'}, - 'egress_public_network_access': {'key': 'egressPublicNetworkAccess', 'type': 'str'}, - 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, - 'model': {'key': 'model', 'type': 'str'}, - 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, - 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, - 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, + "code_configuration": {"key": "codeConfiguration", "type": "CodeConfiguration"}, + "description": {"key": "description", "type": "str"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "properties": {"key": "properties", "type": "{str}"}, + "app_insights_enabled": {"key": "appInsightsEnabled", "type": "bool"}, + "data_collector": {"key": "dataCollector", "type": "DataCollector"}, + "egress_public_network_access": {"key": "egressPublicNetworkAccess", "type": "str"}, + "endpoint_compute_type": {"key": "endpointComputeType", "type": "str"}, + "instance_type": {"key": "instanceType", "type": "str"}, + "liveness_probe": {"key": "livenessProbe", "type": "ProbeSettings"}, + "model": {"key": "model", "type": "str"}, + "model_mount_path": {"key": "modelMountPath", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "readiness_probe": {"key": "readinessProbe", "type": "ProbeSettings"}, + "request_settings": {"key": "requestSettings", "type": "OnlineRequestSettings"}, + "scale_settings": {"key": "scaleSettings", "type": "OnlineScaleSettings"}, } _subtype_map = { - 'endpoint_compute_type': {'Kubernetes': 'KubernetesOnlineDeployment', 'Managed': 'ManagedOnlineDeployment'} + "endpoint_compute_type": {"Kubernetes": "KubernetesOnlineDeployment", "Managed": "ManagedOnlineDeployment"} } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_configuration: Code configuration for the endpoint deployment. :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration @@ -20544,18 +19471,18 @@ def __init__( :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings """ super(OnlineDeploymentProperties, self).__init__(**kwargs) - self.app_insights_enabled = kwargs.get('app_insights_enabled', False) - self.data_collector = kwargs.get('data_collector', None) - self.egress_public_network_access = kwargs.get('egress_public_network_access', None) - self.endpoint_compute_type = 'OnlineDeploymentProperties' # type: str - self.instance_type = kwargs.get('instance_type', None) - self.liveness_probe = kwargs.get('liveness_probe', None) - self.model = kwargs.get('model', None) - self.model_mount_path = kwargs.get('model_mount_path', None) + self.app_insights_enabled = kwargs.get("app_insights_enabled", False) + self.data_collector = kwargs.get("data_collector", None) + self.egress_public_network_access = kwargs.get("egress_public_network_access", None) + self.endpoint_compute_type = "OnlineDeploymentProperties" # type: str + self.instance_type = kwargs.get("instance_type", None) + self.liveness_probe = kwargs.get("liveness_probe", None) + self.model = kwargs.get("model", None) + self.model_mount_path = kwargs.get("model_mount_path", None) self.provisioning_state = None - self.readiness_probe = kwargs.get('readiness_probe', None) - self.request_settings = kwargs.get('request_settings', None) - self.scale_settings = kwargs.get('scale_settings', None) + self.readiness_probe = kwargs.get("readiness_probe", None) + self.request_settings = kwargs.get("request_settings", None) + self.scale_settings = kwargs.get("scale_settings", None) class KubernetesOnlineDeployment(OnlineDeploymentProperties): @@ -20618,36 +19545,35 @@ class KubernetesOnlineDeployment(OnlineDeploymentProperties): """ _validation = { - 'endpoint_compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, + "endpoint_compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, - 'description': {'key': 'description', 'type': 'str'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, - 'data_collector': {'key': 'dataCollector', 'type': 'DataCollector'}, - 'egress_public_network_access': {'key': 'egressPublicNetworkAccess', 'type': 'str'}, - 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, - 'model': {'key': 'model', 'type': 'str'}, - 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, - 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, - 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, - 'container_resource_requirements': {'key': 'containerResourceRequirements', - 'type': 'ContainerResourceRequirements'}, + "code_configuration": {"key": "codeConfiguration", "type": "CodeConfiguration"}, + "description": {"key": "description", "type": "str"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "properties": {"key": "properties", "type": "{str}"}, + "app_insights_enabled": {"key": "appInsightsEnabled", "type": "bool"}, + "data_collector": {"key": "dataCollector", "type": "DataCollector"}, + "egress_public_network_access": {"key": "egressPublicNetworkAccess", "type": "str"}, + "endpoint_compute_type": {"key": "endpointComputeType", "type": "str"}, + "instance_type": {"key": "instanceType", "type": "str"}, + "liveness_probe": {"key": "livenessProbe", "type": "ProbeSettings"}, + "model": {"key": "model", "type": "str"}, + "model_mount_path": {"key": "modelMountPath", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "readiness_probe": {"key": "readinessProbe", "type": "ProbeSettings"}, + "request_settings": {"key": "requestSettings", "type": "OnlineRequestSettings"}, + "scale_settings": {"key": "scaleSettings", "type": "OnlineScaleSettings"}, + "container_resource_requirements": { + "key": "containerResourceRequirements", + "type": "ContainerResourceRequirements", + }, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_configuration: Code configuration for the endpoint deployment. :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration @@ -20693,8 +19619,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements """ super(KubernetesOnlineDeployment, self).__init__(**kwargs) - self.endpoint_compute_type = 'Kubernetes' # type: str - self.container_resource_requirements = kwargs.get('container_resource_requirements', None) + self.endpoint_compute_type = "Kubernetes" # type: str + self.container_resource_requirements = kwargs.get("container_resource_requirements", None) class KubernetesProperties(msrest.serialization.Model): @@ -20720,20 +19646,17 @@ class KubernetesProperties(msrest.serialization.Model): """ _attribute_map = { - 'relay_connection_string': {'key': 'relayConnectionString', 'type': 'str'}, - 'service_bus_connection_string': {'key': 'serviceBusConnectionString', 'type': 'str'}, - 'extension_principal_id': {'key': 'extensionPrincipalId', 'type': 'str'}, - 'extension_instance_release_train': {'key': 'extensionInstanceReleaseTrain', 'type': 'str'}, - 'vc_name': {'key': 'vcName', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'default_instance_type': {'key': 'defaultInstanceType', 'type': 'str'}, - 'instance_types': {'key': 'instanceTypes', 'type': '{InstanceTypeSchema}'}, + "relay_connection_string": {"key": "relayConnectionString", "type": "str"}, + "service_bus_connection_string": {"key": "serviceBusConnectionString", "type": "str"}, + "extension_principal_id": {"key": "extensionPrincipalId", "type": "str"}, + "extension_instance_release_train": {"key": "extensionInstanceReleaseTrain", "type": "str"}, + "vc_name": {"key": "vcName", "type": "str"}, + "namespace": {"key": "namespace", "type": "str"}, + "default_instance_type": {"key": "defaultInstanceType", "type": "str"}, + "instance_types": {"key": "instanceTypes", "type": "{InstanceTypeSchema}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword relay_connection_string: Relay connection string. :paramtype relay_connection_string: str @@ -20754,14 +19677,14 @@ def __init__( ~azure.mgmt.machinelearningservices.models.InstanceTypeSchema] """ super(KubernetesProperties, self).__init__(**kwargs) - self.relay_connection_string = kwargs.get('relay_connection_string', None) - self.service_bus_connection_string = kwargs.get('service_bus_connection_string', None) - self.extension_principal_id = kwargs.get('extension_principal_id', None) - self.extension_instance_release_train = kwargs.get('extension_instance_release_train', None) - self.vc_name = kwargs.get('vc_name', None) - self.namespace = kwargs.get('namespace', "default") - self.default_instance_type = kwargs.get('default_instance_type', None) - self.instance_types = kwargs.get('instance_types', None) + self.relay_connection_string = kwargs.get("relay_connection_string", None) + self.service_bus_connection_string = kwargs.get("service_bus_connection_string", None) + self.extension_principal_id = kwargs.get("extension_principal_id", None) + self.extension_instance_release_train = kwargs.get("extension_instance_release_train", None) + self.vc_name = kwargs.get("vc_name", None) + self.namespace = kwargs.get("namespace", "default") + self.default_instance_type = kwargs.get("default_instance_type", None) + self.instance_types = kwargs.get("instance_types", None) class LabelCategory(msrest.serialization.Model): @@ -20777,15 +19700,12 @@ class LabelCategory(msrest.serialization.Model): """ _attribute_map = { - 'classes': {'key': 'classes', 'type': '{LabelClass}'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'multi_select': {'key': 'multiSelect', 'type': 'str'}, + "classes": {"key": "classes", "type": "{LabelClass}"}, + "display_name": {"key": "displayName", "type": "str"}, + "multi_select": {"key": "multiSelect", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword classes: Dictionary of label classes in this category. :paramtype classes: dict[str, ~azure.mgmt.machinelearningservices.models.LabelClass] @@ -20796,9 +19716,9 @@ def __init__( :paramtype multi_select: str or ~azure.mgmt.machinelearningservices.models.MultiSelect """ super(LabelCategory, self).__init__(**kwargs) - self.classes = kwargs.get('classes', None) - self.display_name = kwargs.get('display_name', None) - self.multi_select = kwargs.get('multi_select', None) + self.classes = kwargs.get("classes", None) + self.display_name = kwargs.get("display_name", None) + self.multi_select = kwargs.get("multi_select", None) class LabelClass(msrest.serialization.Model): @@ -20811,14 +19731,11 @@ class LabelClass(msrest.serialization.Model): """ _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'subclasses': {'key': 'subclasses', 'type': '{LabelClass}'}, + "display_name": {"key": "displayName", "type": "str"}, + "subclasses": {"key": "subclasses", "type": "{LabelClass}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword display_name: Display name of the label class. :paramtype display_name: str @@ -20826,8 +19743,8 @@ def __init__( :paramtype subclasses: dict[str, ~azure.mgmt.machinelearningservices.models.LabelClass] """ super(LabelClass, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.subclasses = kwargs.get('subclasses', None) + self.display_name = kwargs.get("display_name", None) + self.subclasses = kwargs.get("subclasses", None) class LabelingDataConfiguration(msrest.serialization.Model): @@ -20842,14 +19759,11 @@ class LabelingDataConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'data_id': {'key': 'dataId', 'type': 'str'}, - 'incremental_data_refresh': {'key': 'incrementalDataRefresh', 'type': 'str'}, + "data_id": {"key": "dataId", "type": "str"}, + "incremental_data_refresh": {"key": "incrementalDataRefresh", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword data_id: Resource Id of the data asset to perform labeling. :paramtype data_id: str @@ -20859,8 +19773,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.IncrementalDataRefresh """ super(LabelingDataConfiguration, self).__init__(**kwargs) - self.data_id = kwargs.get('data_id', None) - self.incremental_data_refresh = kwargs.get('incremental_data_refresh', None) + self.data_id = kwargs.get("data_id", None) + self.incremental_data_refresh = kwargs.get("incremental_data_refresh", None) class LabelingJob(ProxyResource): @@ -20886,31 +19800,28 @@ class LabelingJob(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'LabelingJobProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "LabelingJobProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.LabelingJobProperties """ super(LabelingJob, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class LabelingJobMediaProperties(msrest.serialization.Model): @@ -20927,23 +19838,17 @@ class LabelingJobMediaProperties(msrest.serialization.Model): """ _validation = { - 'media_type': {'required': True}, + "media_type": {"required": True}, } _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, + "media_type": {"key": "mediaType", "type": "str"}, } - _subtype_map = { - 'media_type': {'Image': 'LabelingJobImageProperties', 'Text': 'LabelingJobTextProperties'} - } + _subtype_map = {"media_type": {"Image": "LabelingJobImageProperties", "Text": "LabelingJobTextProperties"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(LabelingJobMediaProperties, self).__init__(**kwargs) self.media_type = None # type: Optional[str] @@ -20962,18 +19867,15 @@ class LabelingJobImageProperties(LabelingJobMediaProperties): """ _validation = { - 'media_type': {'required': True}, + "media_type": {"required": True}, } _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'annotation_type': {'key': 'annotationType', 'type': 'str'}, + "media_type": {"key": "mediaType", "type": "str"}, + "annotation_type": {"key": "annotationType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword annotation_type: Annotation type of image labeling job. Possible values include: "Classification", "BoundingBox", "InstanceSegmentation". @@ -20981,8 +19883,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ImageAnnotationType """ super(LabelingJobImageProperties, self).__init__(**kwargs) - self.media_type = 'Image' # type: str - self.annotation_type = kwargs.get('annotation_type', None) + self.media_type = "Image" # type: str + self.annotation_type = kwargs.get("annotation_type", None) class LabelingJobInstructions(msrest.serialization.Model): @@ -20993,19 +19895,16 @@ class LabelingJobInstructions(msrest.serialization.Model): """ _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, + "uri": {"key": "uri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword uri: The link to a page with detailed labeling instructions for labelers. :paramtype uri: str """ super(LabelingJobInstructions, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) + self.uri = kwargs.get("uri", None) class LabelingJobProperties(JobBaseProperties): @@ -21080,46 +19979,43 @@ class LabelingJobProperties(JobBaseProperties): """ _validation = { - 'job_type': {'required': True}, - 'status': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'progress_metrics': {'readonly': True}, - 'project_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'status_messages': {'readonly': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'compute_id': {'key': 'computeId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'experiment_name': {'key': 'experimentName', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'notification_setting': {'key': 'notificationSetting', 'type': 'NotificationSetting'}, - 'secrets_configuration': {'key': 'secretsConfiguration', 'type': '{SecretConfiguration}'}, - 'services': {'key': 'services', 'type': '{JobService}'}, - 'status': {'key': 'status', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'data_configuration': {'key': 'dataConfiguration', 'type': 'LabelingDataConfiguration'}, - 'job_instructions': {'key': 'jobInstructions', 'type': 'LabelingJobInstructions'}, - 'label_categories': {'key': 'labelCategories', 'type': '{LabelCategory}'}, - 'labeling_job_media_properties': {'key': 'labelingJobMediaProperties', 'type': 'LabelingJobMediaProperties'}, - 'ml_assist_configuration': {'key': 'mlAssistConfiguration', 'type': 'MLAssistConfiguration'}, - 'progress_metrics': {'key': 'progressMetrics', 'type': 'ProgressMetrics'}, - 'project_id': {'key': 'projectId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'status_messages': {'key': 'statusMessages', 'type': '[StatusMessage]'}, - } - - def __init__( - self, - **kwargs - ): + "job_type": {"required": True}, + "status": {"readonly": True}, + "created_date_time": {"readonly": True}, + "progress_metrics": {"readonly": True}, + "project_id": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "status_messages": {"readonly": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "component_id": {"key": "componentId", "type": "str"}, + "compute_id": {"key": "computeId", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "experiment_name": {"key": "experimentName", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityConfiguration"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "job_type": {"key": "jobType", "type": "str"}, + "notification_setting": {"key": "notificationSetting", "type": "NotificationSetting"}, + "secrets_configuration": {"key": "secretsConfiguration", "type": "{SecretConfiguration}"}, + "services": {"key": "services", "type": "{JobService}"}, + "status": {"key": "status", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "data_configuration": {"key": "dataConfiguration", "type": "LabelingDataConfiguration"}, + "job_instructions": {"key": "jobInstructions", "type": "LabelingJobInstructions"}, + "label_categories": {"key": "labelCategories", "type": "{LabelCategory}"}, + "labeling_job_media_properties": {"key": "labelingJobMediaProperties", "type": "LabelingJobMediaProperties"}, + "ml_assist_configuration": {"key": "mlAssistConfiguration", "type": "MLAssistConfiguration"}, + "progress_metrics": {"key": "progressMetrics", "type": "ProgressMetrics"}, + "project_id": {"key": "projectId", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "status_messages": {"key": "statusMessages", "type": "[StatusMessage]"}, + } + + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -21166,13 +20062,13 @@ def __init__( ~azure.mgmt.machinelearningservices.models.MLAssistConfiguration """ super(LabelingJobProperties, self).__init__(**kwargs) - self.job_type = 'Labeling' # type: str + self.job_type = "Labeling" # type: str self.created_date_time = None - self.data_configuration = kwargs.get('data_configuration', None) - self.job_instructions = kwargs.get('job_instructions', None) - self.label_categories = kwargs.get('label_categories', None) - self.labeling_job_media_properties = kwargs.get('labeling_job_media_properties', None) - self.ml_assist_configuration = kwargs.get('ml_assist_configuration', None) + self.data_configuration = kwargs.get("data_configuration", None) + self.job_instructions = kwargs.get("job_instructions", None) + self.label_categories = kwargs.get("label_categories", None) + self.labeling_job_media_properties = kwargs.get("labeling_job_media_properties", None) + self.ml_assist_configuration = kwargs.get("ml_assist_configuration", None) self.progress_metrics = None self.project_id = None self.provisioning_state = None @@ -21190,14 +20086,11 @@ class LabelingJobResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[LabelingJob]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[LabelingJob]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of LabelingJob objects. If null, there are no additional pages. @@ -21206,8 +20099,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.LabelingJob] """ super(LabelingJobResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class LabelingJobTextProperties(LabelingJobMediaProperties): @@ -21224,18 +20117,15 @@ class LabelingJobTextProperties(LabelingJobMediaProperties): """ _validation = { - 'media_type': {'required': True}, + "media_type": {"required": True}, } _attribute_map = { - 'media_type': {'key': 'mediaType', 'type': 'str'}, - 'annotation_type': {'key': 'annotationType', 'type': 'str'}, + "media_type": {"key": "mediaType", "type": "str"}, + "annotation_type": {"key": "annotationType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword annotation_type: Annotation type of text labeling job. Possible values include: "Classification", "NamedEntityRecognition". @@ -21243,8 +20133,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.TextAnnotationType """ super(LabelingJobTextProperties, self).__init__(**kwargs) - self.media_type = 'Text' # type: str - self.annotation_type = kwargs.get('annotation_type', None) + self.media_type = "Text" # type: str + self.annotation_type = kwargs.get("annotation_type", None) class OneLakeArtifact(msrest.serialization.Model): @@ -21263,29 +20153,24 @@ class OneLakeArtifact(msrest.serialization.Model): """ _validation = { - 'artifact_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'artifact_type': {'required': True}, + "artifact_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "artifact_type": {"required": True}, } _attribute_map = { - 'artifact_name': {'key': 'artifactName', 'type': 'str'}, - 'artifact_type': {'key': 'artifactType', 'type': 'str'}, + "artifact_name": {"key": "artifactName", "type": "str"}, + "artifact_type": {"key": "artifactType", "type": "str"}, } - _subtype_map = { - 'artifact_type': {'LakeHouse': 'LakeHouseArtifact'} - } + _subtype_map = {"artifact_type": {"LakeHouse": "LakeHouseArtifact"}} - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword artifact_name: Required. [Required] OneLake artifact name. :paramtype artifact_name: str """ super(OneLakeArtifact, self).__init__(**kwargs) - self.artifact_name = kwargs['artifact_name'] + self.artifact_name = kwargs["artifact_name"] self.artifact_type = None # type: Optional[str] @@ -21302,25 +20187,22 @@ class LakeHouseArtifact(OneLakeArtifact): """ _validation = { - 'artifact_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'artifact_type': {'required': True}, + "artifact_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "artifact_type": {"required": True}, } _attribute_map = { - 'artifact_name': {'key': 'artifactName', 'type': 'str'}, - 'artifact_type': {'key': 'artifactType', 'type': 'str'}, + "artifact_name": {"key": "artifactName", "type": "str"}, + "artifact_type": {"key": "artifactType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword artifact_name: Required. [Required] OneLake artifact name. :paramtype artifact_name: str """ super(LakeHouseArtifact, self).__init__(**kwargs) - self.artifact_type = 'LakeHouse' # type: str + self.artifact_type = "LakeHouse" # type: str class ListAmlUserFeatureResult(msrest.serialization.Model): @@ -21336,21 +20218,17 @@ class ListAmlUserFeatureResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, + "value": {"readonly": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[AmlUserFeature]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[AmlUserFeature]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ListAmlUserFeatureResult, self).__init__(**kwargs) self.value = None self.next_link = None @@ -21368,21 +20246,17 @@ class ListNotebookKeysResult(msrest.serialization.Model): """ _validation = { - 'primary_access_key': {'readonly': True}, - 'secondary_access_key': {'readonly': True}, + "primary_access_key": {"readonly": True}, + "secondary_access_key": {"readonly": True}, } _attribute_map = { - 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, - 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, + "primary_access_key": {"key": "primaryAccessKey", "type": "str"}, + "secondary_access_key": {"key": "secondaryAccessKey", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ListNotebookKeysResult, self).__init__(**kwargs) self.primary_access_key = None self.secondary_access_key = None @@ -21398,19 +20272,15 @@ class ListStorageAccountKeysResult(msrest.serialization.Model): """ _validation = { - 'user_storage_key': {'readonly': True}, + "user_storage_key": {"readonly": True}, } _attribute_map = { - 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + "user_storage_key": {"key": "userStorageKey", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ListStorageAccountKeysResult, self).__init__(**kwargs) self.user_storage_key = None @@ -21428,21 +20298,17 @@ class ListUsagesResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, + "value": {"readonly": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[Usage]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ListUsagesResult, self).__init__(**kwargs) self.value = None self.next_link = None @@ -21468,24 +20334,23 @@ class ListWorkspaceKeysResult(msrest.serialization.Model): """ _validation = { - 'app_insights_instrumentation_key': {'readonly': True}, - 'user_storage_arm_id': {'readonly': True}, - 'user_storage_key': {'readonly': True}, + "app_insights_instrumentation_key": {"readonly": True}, + "user_storage_arm_id": {"readonly": True}, + "user_storage_key": {"readonly": True}, } _attribute_map = { - 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, - 'container_registry_credentials': {'key': 'containerRegistryCredentials', - 'type': 'RegistryListCredentialsResult'}, - 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'ListNotebookKeysResult'}, - 'user_storage_arm_id': {'key': 'userStorageArmId', 'type': 'str'}, - 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + "app_insights_instrumentation_key": {"key": "appInsightsInstrumentationKey", "type": "str"}, + "container_registry_credentials": { + "key": "containerRegistryCredentials", + "type": "RegistryListCredentialsResult", + }, + "notebook_access_keys": {"key": "notebookAccessKeys", "type": "ListNotebookKeysResult"}, + "user_storage_arm_id": {"key": "userStorageArmId", "type": "str"}, + "user_storage_key": {"key": "userStorageKey", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword container_registry_credentials: :paramtype container_registry_credentials: @@ -21496,8 +20361,8 @@ def __init__( """ super(ListWorkspaceKeysResult, self).__init__(**kwargs) self.app_insights_instrumentation_key = None - self.container_registry_credentials = kwargs.get('container_registry_credentials', None) - self.notebook_access_keys = kwargs.get('notebook_access_keys', None) + self.container_registry_credentials = kwargs.get("container_registry_credentials", None) + self.notebook_access_keys = kwargs.get("notebook_access_keys", None) self.user_storage_arm_id = None self.user_storage_key = None @@ -21515,21 +20380,17 @@ class ListWorkspaceQuotas(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, + "value": {"readonly": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[ResourceQuota]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ResourceQuota]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ListWorkspaceQuotas, self).__init__(**kwargs) self.value = None self.next_link = None @@ -21551,20 +20412,17 @@ class LiteralJobInput(JobInput): """ _validation = { - 'job_input_type': {'required': True}, - 'value': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "job_input_type": {"required": True}, + "value": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: Description for the input. :paramtype description: str @@ -21572,8 +20430,8 @@ def __init__( :paramtype value: str """ super(LiteralJobInput, self).__init__(**kwargs) - self.job_input_type = 'literal' # type: str - self.value = kwargs['value'] + self.job_input_type = "literal" # type: str + self.value = kwargs["value"] class ManagedComputeIdentity(MonitorComputeIdentityBase): @@ -21590,25 +20448,22 @@ class ManagedComputeIdentity(MonitorComputeIdentityBase): """ _validation = { - 'compute_identity_type': {'required': True}, + "compute_identity_type": {"required": True}, } _attribute_map = { - 'compute_identity_type': {'key': 'computeIdentityType', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + "compute_identity_type": {"key": "computeIdentityType", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword identity: Managed service identity (system assigned and/or user assigned identities). :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity """ super(ManagedComputeIdentity, self).__init__(**kwargs) - self.compute_identity_type = 'ManagedIdentity' # type: str - self.identity = kwargs.get('identity', None) + self.compute_identity_type = "ManagedIdentity" # type: str + self.identity = kwargs.get("identity", None) class ManagedIdentity(IdentityConfiguration): @@ -21632,20 +20487,17 @@ class ManagedIdentity(IdentityConfiguration): """ _validation = { - 'identity_type': {'required': True}, + "identity_type": {"required": True}, } _attribute_map = { - 'identity_type': {'key': 'identityType', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'object_id': {'key': 'objectId', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, + "identity_type": {"key": "identityType", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "object_id": {"key": "objectId", "type": "str"}, + "resource_id": {"key": "resourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword client_id: Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. @@ -21658,10 +20510,10 @@ def __init__( :paramtype resource_id: str """ super(ManagedIdentity, self).__init__(**kwargs) - self.identity_type = 'Managed' # type: str - self.client_id = kwargs.get('client_id', None) - self.object_id = kwargs.get('object_id', None) - self.resource_id = kwargs.get('resource_id', None) + self.identity_type = "Managed" # type: str + self.client_id = kwargs.get("client_id", None) + self.object_id = kwargs.get("object_id", None) + self.resource_id = kwargs.get("resource_id", None) class ManagedIdentityAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): @@ -21714,28 +20566,25 @@ class ManagedIdentityAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPr """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionManagedIdentity'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionManagedIdentity"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -21770,8 +20619,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionManagedIdentity """ super(ManagedIdentityAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'ManagedIdentity' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "ManagedIdentity" # type: str + self.credentials = kwargs.get("credentials", None) class ManagedIdentityCredential(DataReferenceCredential): @@ -21801,22 +20650,19 @@ class ManagedIdentityCredential(DataReferenceCredential): """ _validation = { - 'credential_type': {'required': True}, + "credential_type": {"required": True}, } _attribute_map = { - 'credential_type': {'key': 'credentialType', 'type': 'str'}, - 'managed_identity_type': {'key': 'managedIdentityType', 'type': 'str'}, - 'user_managed_identity_client_id': {'key': 'userManagedIdentityClientId', 'type': 'str'}, - 'user_managed_identity_principal_id': {'key': 'userManagedIdentityPrincipalId', 'type': 'str'}, - 'user_managed_identity_resource_id': {'key': 'userManagedIdentityResourceId', 'type': 'str'}, - 'user_managed_identity_tenant_id': {'key': 'userManagedIdentityTenantId', 'type': 'str'}, + "credential_type": {"key": "credentialType", "type": "str"}, + "managed_identity_type": {"key": "managedIdentityType", "type": "str"}, + "user_managed_identity_client_id": {"key": "userManagedIdentityClientId", "type": "str"}, + "user_managed_identity_principal_id": {"key": "userManagedIdentityPrincipalId", "type": "str"}, + "user_managed_identity_resource_id": {"key": "userManagedIdentityResourceId", "type": "str"}, + "user_managed_identity_tenant_id": {"key": "userManagedIdentityTenantId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword managed_identity_type: ManagedIdentityCredential identity type. :paramtype managed_identity_type: str @@ -21834,12 +20680,12 @@ def __init__( :paramtype user_managed_identity_tenant_id: str """ super(ManagedIdentityCredential, self).__init__(**kwargs) - self.credential_type = 'ManagedIdentity' # type: str - self.managed_identity_type = kwargs.get('managed_identity_type', None) - self.user_managed_identity_client_id = kwargs.get('user_managed_identity_client_id', None) - self.user_managed_identity_principal_id = kwargs.get('user_managed_identity_principal_id', None) - self.user_managed_identity_resource_id = kwargs.get('user_managed_identity_resource_id', None) - self.user_managed_identity_tenant_id = kwargs.get('user_managed_identity_tenant_id', None) + self.credential_type = "ManagedIdentity" # type: str + self.managed_identity_type = kwargs.get("managed_identity_type", None) + self.user_managed_identity_client_id = kwargs.get("user_managed_identity_client_id", None) + self.user_managed_identity_principal_id = kwargs.get("user_managed_identity_principal_id", None) + self.user_managed_identity_resource_id = kwargs.get("user_managed_identity_resource_id", None) + self.user_managed_identity_tenant_id = kwargs.get("user_managed_identity_tenant_id", None) class ManagedNetworkProvisionOptions(msrest.serialization.Model): @@ -21850,19 +20696,16 @@ class ManagedNetworkProvisionOptions(msrest.serialization.Model): """ _attribute_map = { - 'include_spark': {'key': 'includeSpark', 'type': 'bool'}, + "include_spark": {"key": "includeSpark", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword include_spark: :paramtype include_spark: bool """ super(ManagedNetworkProvisionOptions, self).__init__(**kwargs) - self.include_spark = kwargs.get('include_spark', None) + self.include_spark = kwargs.get("include_spark", None) class ManagedNetworkProvisionStatus(msrest.serialization.Model): @@ -21876,14 +20719,11 @@ class ManagedNetworkProvisionStatus(msrest.serialization.Model): """ _attribute_map = { - 'spark_ready': {'key': 'sparkReady', 'type': 'bool'}, - 'status': {'key': 'status', 'type': 'str'}, + "spark_ready": {"key": "sparkReady", "type": "bool"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword spark_ready: :paramtype spark_ready: bool @@ -21892,8 +20732,8 @@ def __init__( :paramtype status: str or ~azure.mgmt.machinelearningservices.models.ManagedNetworkStatus """ super(ManagedNetworkProvisionStatus, self).__init__(**kwargs) - self.spark_ready = kwargs.get('spark_ready', None) - self.status = kwargs.get('status', None) + self.spark_ready = kwargs.get("spark_ready", None) + self.status = kwargs.get("status", None) class ManagedNetworkSettings(msrest.serialization.Model): @@ -21917,22 +20757,19 @@ class ManagedNetworkSettings(msrest.serialization.Model): """ _validation = { - 'network_id': {'readonly': True}, - 'changeable_isolation_modes': {'readonly': True}, + "network_id": {"readonly": True}, + "changeable_isolation_modes": {"readonly": True}, } _attribute_map = { - 'isolation_mode': {'key': 'isolationMode', 'type': 'str'}, - 'network_id': {'key': 'networkId', 'type': 'str'}, - 'outbound_rules': {'key': 'outboundRules', 'type': '{OutboundRule}'}, - 'status': {'key': 'status', 'type': 'ManagedNetworkProvisionStatus'}, - 'changeable_isolation_modes': {'key': 'changeableIsolationModes', 'type': '[str]'}, + "isolation_mode": {"key": "isolationMode", "type": "str"}, + "network_id": {"key": "networkId", "type": "str"}, + "outbound_rules": {"key": "outboundRules", "type": "{OutboundRule}"}, + "status": {"key": "status", "type": "ManagedNetworkProvisionStatus"}, + "changeable_isolation_modes": {"key": "changeableIsolationModes", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword isolation_mode: Isolation mode for the managed network of a machine learning workspace. Possible values include: "Disabled", "AllowInternetOutbound", @@ -21945,10 +20782,10 @@ def __init__( :paramtype status: ~azure.mgmt.machinelearningservices.models.ManagedNetworkProvisionStatus """ super(ManagedNetworkSettings, self).__init__(**kwargs) - self.isolation_mode = kwargs.get('isolation_mode', None) + self.isolation_mode = kwargs.get("isolation_mode", None) self.network_id = None - self.outbound_rules = kwargs.get('outbound_rules', None) - self.status = kwargs.get('status', None) + self.outbound_rules = kwargs.get("outbound_rules", None) + self.status = kwargs.get("status", None) self.changeable_isolation_modes = None @@ -22008,34 +20845,31 @@ class ManagedOnlineDeployment(OnlineDeploymentProperties): """ _validation = { - 'endpoint_compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, + "endpoint_compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'code_configuration': {'key': 'codeConfiguration', 'type': 'CodeConfiguration'}, - 'description': {'key': 'description', 'type': 'str'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, - 'data_collector': {'key': 'dataCollector', 'type': 'DataCollector'}, - 'egress_public_network_access': {'key': 'egressPublicNetworkAccess', 'type': 'str'}, - 'endpoint_compute_type': {'key': 'endpointComputeType', 'type': 'str'}, - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, - 'model': {'key': 'model', 'type': 'str'}, - 'model_mount_path': {'key': 'modelMountPath', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, - 'request_settings': {'key': 'requestSettings', 'type': 'OnlineRequestSettings'}, - 'scale_settings': {'key': 'scaleSettings', 'type': 'OnlineScaleSettings'}, + "code_configuration": {"key": "codeConfiguration", "type": "CodeConfiguration"}, + "description": {"key": "description", "type": "str"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "properties": {"key": "properties", "type": "{str}"}, + "app_insights_enabled": {"key": "appInsightsEnabled", "type": "bool"}, + "data_collector": {"key": "dataCollector", "type": "DataCollector"}, + "egress_public_network_access": {"key": "egressPublicNetworkAccess", "type": "str"}, + "endpoint_compute_type": {"key": "endpointComputeType", "type": "str"}, + "instance_type": {"key": "instanceType", "type": "str"}, + "liveness_probe": {"key": "livenessProbe", "type": "ProbeSettings"}, + "model": {"key": "model", "type": "str"}, + "model_mount_path": {"key": "modelMountPath", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "readiness_probe": {"key": "readinessProbe", "type": "ProbeSettings"}, + "request_settings": {"key": "requestSettings", "type": "OnlineRequestSettings"}, + "scale_settings": {"key": "scaleSettings", "type": "OnlineScaleSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_configuration: Code configuration for the endpoint deployment. :paramtype code_configuration: ~azure.mgmt.machinelearningservices.models.CodeConfiguration @@ -22077,7 +20911,7 @@ def __init__( :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.OnlineScaleSettings """ super(ManagedOnlineDeployment, self).__init__(**kwargs) - self.endpoint_compute_type = 'Managed' # type: str + self.endpoint_compute_type = "Managed" # type: str class ManagedOnlineEndpointDeploymentResourceProperties(EndpointDeploymentResourceProperties): @@ -22098,26 +20932,23 @@ class ManagedOnlineEndpointDeploymentResourceProperties(EndpointDeploymentResour """ _validation = { - 'provisioning_state': {'readonly': True}, - 'type': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9._]'}, + "provisioning_state": {"readonly": True}, + "type": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9._]"}, } _attribute_map = { - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword failure_reason: The failure reason if the creation failed. :paramtype failure_reason: str """ super(ManagedOnlineEndpointDeploymentResourceProperties, self).__init__(**kwargs) - self.type = 'managedOnlineEndpoint' # type: str + self.type = "managedOnlineEndpoint" # type: str class ManagedOnlineEndpointResourceProperties(EndpointResourceProperties): @@ -22147,23 +20978,20 @@ class ManagedOnlineEndpointResourceProperties(EndpointResourceProperties): """ _validation = { - 'endpoint_type': {'required': True}, - 'provisioning_state': {'readonly': True}, + "endpoint_type": {"required": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'associated_resource_id': {'key': 'associatedResourceId', 'type': 'str'}, - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "associated_resource_id": {"key": "associatedResourceId", "type": "str"}, + "endpoint_type": {"key": "endpointType", "type": "str"}, + "endpoint_uri": {"key": "endpointUri", "type": "str"}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword associated_resource_id: Byo resource id for creating the built-in model service endpoints. @@ -22176,7 +21004,7 @@ def __init__( :paramtype name: str """ super(ManagedOnlineEndpointResourceProperties, self).__init__(**kwargs) - self.endpoint_type = 'managedOnlineEndpoint' # type: str + self.endpoint_type = "managedOnlineEndpoint" # type: str class ManagedResourceGroupAssignedIdentities(msrest.serialization.Model): @@ -22187,19 +21015,16 @@ class ManagedResourceGroupAssignedIdentities(msrest.serialization.Model): """ _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, + "principal_id": {"key": "principalId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword principal_id: Identity principal Id. :paramtype principal_id: str """ super(ManagedResourceGroupAssignedIdentities, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) + self.principal_id = kwargs.get("principal_id", None) class ManagedResourceGroupSettings(msrest.serialization.Model): @@ -22211,20 +21036,17 @@ class ManagedResourceGroupSettings(msrest.serialization.Model): """ _attribute_map = { - 'assigned_identities': {'key': 'assignedIdentities', 'type': '[ManagedResourceGroupAssignedIdentities]'}, + "assigned_identities": {"key": "assignedIdentities", "type": "[ManagedResourceGroupAssignedIdentities]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword assigned_identities: List of assigned identities for the managed resource group. :paramtype assigned_identities: list[~azure.mgmt.machinelearningservices.models.ManagedResourceGroupAssignedIdentities] """ super(ManagedResourceGroupSettings, self).__init__(**kwargs) - self.assigned_identities = kwargs.get('assigned_identities', None) + self.assigned_identities = kwargs.get("assigned_identities", None) class ManagedServiceIdentity(msrest.serialization.Model): @@ -22253,22 +21075,19 @@ class ManagedServiceIdentity(msrest.serialization.Model): """ _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'required': True}, + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, + "type": {"required": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedIdentity}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword type: Required. Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", @@ -22284,8 +21103,8 @@ def __init__( super(ManagedServiceIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None - self.type = kwargs['type'] - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + self.type = kwargs["type"] + self.user_assigned_identities = kwargs.get("user_assigned_identities", None) class MarketplacePlan(msrest.serialization.Model): @@ -22302,23 +21121,19 @@ class MarketplacePlan(msrest.serialization.Model): """ _validation = { - 'offer_id': {'readonly': True}, - 'plan_id': {'readonly': True}, - 'publisher_id': {'readonly': True}, + "offer_id": {"readonly": True}, + "plan_id": {"readonly": True}, + "publisher_id": {"readonly": True}, } _attribute_map = { - 'offer_id': {'key': 'offerId', 'type': 'str'}, - 'plan_id': {'key': 'planId', 'type': 'str'}, - 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + "offer_id": {"key": "offerId", "type": "str"}, + "plan_id": {"key": "planId", "type": "str"}, + "publisher_id": {"key": "publisherId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(MarketplacePlan, self).__init__(**kwargs) self.offer_id = None self.plan_id = None @@ -22349,32 +21164,29 @@ class MarketplaceSubscription(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'MarketplaceSubscriptionProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "MarketplaceSubscriptionProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.MarketplaceSubscriptionProperties """ super(MarketplaceSubscription, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class MarketplaceSubscriptionProperties(msrest.serialization.Model): @@ -22400,23 +21212,20 @@ class MarketplaceSubscriptionProperties(msrest.serialization.Model): """ _validation = { - 'marketplace_plan': {'readonly': True}, - 'marketplace_subscription_status': {'readonly': True}, - 'model_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'provisioning_state': {'readonly': True}, + "marketplace_plan": {"readonly": True}, + "marketplace_subscription_status": {"readonly": True}, + "model_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'marketplace_plan': {'key': 'marketplacePlan', 'type': 'MarketplacePlan'}, - 'marketplace_subscription_status': {'key': 'marketplaceSubscriptionStatus', 'type': 'str'}, - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "marketplace_plan": {"key": "marketplacePlan", "type": "MarketplacePlan"}, + "marketplace_subscription_status": {"key": "marketplaceSubscriptionStatus", "type": "str"}, + "model_id": {"key": "modelId", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model_id: Required. [Required] Target Marketplace Model ID to create a Marketplace Subscription for. @@ -22425,7 +21234,7 @@ def __init__( super(MarketplaceSubscriptionProperties, self).__init__(**kwargs) self.marketplace_plan = None self.marketplace_subscription_status = None - self.model_id = kwargs['model_id'] + self.model_id = kwargs["model_id"] self.provisioning_state = None @@ -22440,14 +21249,11 @@ class MarketplaceSubscriptionResourceArmPaginatedResult(msrest.serialization.Mod """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[MarketplaceSubscription]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[MarketplaceSubscription]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. @@ -22456,8 +21262,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.MarketplaceSubscription] """ super(MarketplaceSubscriptionResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class MaterializationComputeResource(msrest.serialization.Model): @@ -22468,19 +21274,16 @@ class MaterializationComputeResource(msrest.serialization.Model): """ _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, + "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword instance_type: Specifies the instance type. :paramtype instance_type: str """ super(MaterializationComputeResource, self).__init__(**kwargs) - self.instance_type = kwargs.get('instance_type', None) + self.instance_type = kwargs.get("instance_type", None) class MaterializationSettings(msrest.serialization.Model): @@ -22500,17 +21303,14 @@ class MaterializationSettings(msrest.serialization.Model): """ _attribute_map = { - 'notification': {'key': 'notification', 'type': 'NotificationSetting'}, - 'resource': {'key': 'resource', 'type': 'MaterializationComputeResource'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceTrigger'}, - 'spark_configuration': {'key': 'sparkConfiguration', 'type': '{str}'}, - 'store_type': {'key': 'storeType', 'type': 'str'}, + "notification": {"key": "notification", "type": "NotificationSetting"}, + "resource": {"key": "resource", "type": "MaterializationComputeResource"}, + "schedule": {"key": "schedule", "type": "RecurrenceTrigger"}, + "spark_configuration": {"key": "sparkConfiguration", "type": "{str}"}, + "store_type": {"key": "storeType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification: Specifies the notification details. :paramtype notification: ~azure.mgmt.machinelearningservices.models.NotificationSetting @@ -22526,11 +21326,11 @@ def __init__( ~azure.mgmt.machinelearningservices.models.MaterializationStoreType """ super(MaterializationSettings, self).__init__(**kwargs) - self.notification = kwargs.get('notification', None) - self.resource = kwargs.get('resource', None) - self.schedule = kwargs.get('schedule', None) - self.spark_configuration = kwargs.get('spark_configuration', None) - self.store_type = kwargs.get('store_type', None) + self.notification = kwargs.get("notification", None) + self.resource = kwargs.get("resource", None) + self.schedule = kwargs.get("schedule", None) + self.spark_configuration = kwargs.get("spark_configuration", None) + self.store_type = kwargs.get("store_type", None) class MedianStoppingPolicy(EarlyTerminationPolicy): @@ -22549,19 +21349,16 @@ class MedianStoppingPolicy(EarlyTerminationPolicy): """ _validation = { - 'policy_type': {'required': True}, + "policy_type": {"required": True}, } _attribute_map = { - 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, - 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, + "delay_evaluation": {"key": "delayEvaluation", "type": "int"}, + "evaluation_interval": {"key": "evaluationInterval", "type": "int"}, + "policy_type": {"key": "policyType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. :paramtype delay_evaluation: int @@ -22569,7 +21366,7 @@ def __init__( :paramtype evaluation_interval: int """ super(MedianStoppingPolicy, self).__init__(**kwargs) - self.policy_type = 'MedianStopping' # type: str + self.policy_type = "MedianStopping" # type: str class MLAssistConfiguration(msrest.serialization.Model): @@ -22586,23 +21383,19 @@ class MLAssistConfiguration(msrest.serialization.Model): """ _validation = { - 'ml_assist': {'required': True}, + "ml_assist": {"required": True}, } _attribute_map = { - 'ml_assist': {'key': 'mlAssist', 'type': 'str'}, + "ml_assist": {"key": "mlAssist", "type": "str"}, } _subtype_map = { - 'ml_assist': {'Disabled': 'MLAssistConfigurationDisabled', 'Enabled': 'MLAssistConfigurationEnabled'} + "ml_assist": {"Disabled": "MLAssistConfigurationDisabled", "Enabled": "MLAssistConfigurationEnabled"} } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(MLAssistConfiguration, self).__init__(**kwargs) self.ml_assist = None # type: Optional[str] @@ -22618,21 +21411,17 @@ class MLAssistConfigurationDisabled(MLAssistConfiguration): """ _validation = { - 'ml_assist': {'required': True}, + "ml_assist": {"required": True}, } _attribute_map = { - 'ml_assist': {'key': 'mlAssist', 'type': 'str'}, + "ml_assist": {"key": "mlAssist", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(MLAssistConfigurationDisabled, self).__init__(**kwargs) - self.ml_assist = 'Disabled' # type: str + self.ml_assist = "Disabled" # type: str class MLAssistConfigurationEnabled(MLAssistConfiguration): @@ -22651,21 +21440,18 @@ class MLAssistConfigurationEnabled(MLAssistConfiguration): """ _validation = { - 'ml_assist': {'required': True}, - 'inferencing_compute_binding': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'training_compute_binding': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "ml_assist": {"required": True}, + "inferencing_compute_binding": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "training_compute_binding": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'ml_assist': {'key': 'mlAssist', 'type': 'str'}, - 'inferencing_compute_binding': {'key': 'inferencingComputeBinding', 'type': 'str'}, - 'training_compute_binding': {'key': 'trainingComputeBinding', 'type': 'str'}, + "ml_assist": {"key": "mlAssist", "type": "str"}, + "inferencing_compute_binding": {"key": "inferencingComputeBinding", "type": "str"}, + "training_compute_binding": {"key": "trainingComputeBinding", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword inferencing_compute_binding: Required. [Required] AML compute binding used in inferencing. @@ -22674,9 +21460,9 @@ def __init__( :paramtype training_compute_binding: str """ super(MLAssistConfigurationEnabled, self).__init__(**kwargs) - self.ml_assist = 'Enabled' # type: str - self.inferencing_compute_binding = kwargs['inferencing_compute_binding'] - self.training_compute_binding = kwargs['training_compute_binding'] + self.ml_assist = "Enabled" # type: str + self.inferencing_compute_binding = kwargs["inferencing_compute_binding"] + self.training_compute_binding = kwargs["training_compute_binding"] class MLFlowModelJobInput(JobInput, AssetJobInput): @@ -22700,22 +21486,19 @@ class MLFlowModelJobInput(JobInput, AssetJobInput): """ _validation = { - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'job_input_type': {'required': True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "job_input_type": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". @@ -22728,11 +21511,11 @@ def __init__( :paramtype description: str """ super(MLFlowModelJobInput, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs['uri'] - self.job_input_type = 'mlflow_model' # type: str - self.description = kwargs.get('description', None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs["uri"] + self.job_input_type = "mlflow_model" # type: str + self.description = kwargs.get("description", None) class MLFlowModelJobOutput(JobOutput, AssetJobOutput): @@ -22762,24 +21545,21 @@ class MLFlowModelJobOutput(JobOutput, AssetJobOutput): """ _validation = { - 'job_output_type': {'required': True}, + "job_output_type": {"required": True}, } _attribute_map = { - 'asset_name': {'key': 'assetName', 'type': 'str'}, - 'asset_version': {'key': 'assetVersion', 'type': 'str'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + "asset_name": {"key": "assetName", "type": "str"}, + "asset_version": {"key": "assetVersion", "type": "str"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_output_type": {"key": "jobOutputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_name: Output Asset Name. :paramtype asset_name: str @@ -22798,14 +21578,14 @@ def __init__( :paramtype description: str """ super(MLFlowModelJobOutput, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.asset_version = kwargs.get('asset_version', None) - self.auto_delete_setting = kwargs.get('auto_delete_setting', None) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs.get('uri', None) - self.job_output_type = 'mlflow_model' # type: str - self.description = kwargs.get('description', None) + self.asset_name = kwargs.get("asset_name", None) + self.asset_version = kwargs.get("asset_version", None) + self.auto_delete_setting = kwargs.get("auto_delete_setting", None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs.get("uri", None) + self.job_output_type = "mlflow_model" # type: str + self.description = kwargs.get("description", None) class MLTableData(DataVersionBaseProperties): @@ -22843,28 +21623,25 @@ class MLTableData(DataVersionBaseProperties): """ _validation = { - 'data_type': {'required': True}, - 'data_uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "data_type": {"required": True}, + "data_uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'data_uri': {'key': 'dataUri', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'stage': {'key': 'stage', 'type': 'str'}, - 'referenced_uris': {'key': 'referencedUris', 'type': '[str]'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "data_type": {"key": "dataType", "type": "str"}, + "data_uri": {"key": "dataUri", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "stage": {"key": "stage", "type": "str"}, + "referenced_uris": {"key": "referencedUris", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -22893,8 +21670,8 @@ def __init__( :paramtype referenced_uris: list[str] """ super(MLTableData, self).__init__(**kwargs) - self.data_type = 'mltable' # type: str - self.referenced_uris = kwargs.get('referenced_uris', None) + self.data_type = "mltable" # type: str + self.referenced_uris = kwargs.get("referenced_uris", None) class MLTableJobInput(JobInput, AssetJobInput): @@ -22918,22 +21695,19 @@ class MLTableJobInput(JobInput, AssetJobInput): """ _validation = { - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'job_input_type': {'required': True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "job_input_type": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". @@ -22946,11 +21720,11 @@ def __init__( :paramtype description: str """ super(MLTableJobInput, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs['uri'] - self.job_input_type = 'mltable' # type: str - self.description = kwargs.get('description', None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs["uri"] + self.job_input_type = "mltable" # type: str + self.description = kwargs.get("description", None) class MLTableJobOutput(JobOutput, AssetJobOutput): @@ -22980,24 +21754,21 @@ class MLTableJobOutput(JobOutput, AssetJobOutput): """ _validation = { - 'job_output_type': {'required': True}, + "job_output_type": {"required": True}, } _attribute_map = { - 'asset_name': {'key': 'assetName', 'type': 'str'}, - 'asset_version': {'key': 'assetVersion', 'type': 'str'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + "asset_name": {"key": "assetName", "type": "str"}, + "asset_version": {"key": "assetVersion", "type": "str"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_output_type": {"key": "jobOutputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_name: Output Asset Name. :paramtype asset_name: str @@ -23016,14 +21787,14 @@ def __init__( :paramtype description: str """ super(MLTableJobOutput, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.asset_version = kwargs.get('asset_version', None) - self.auto_delete_setting = kwargs.get('auto_delete_setting', None) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs.get('uri', None) - self.job_output_type = 'mltable' # type: str - self.description = kwargs.get('description', None) + self.asset_name = kwargs.get("asset_name", None) + self.asset_version = kwargs.get("asset_version", None) + self.auto_delete_setting = kwargs.get("auto_delete_setting", None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs.get("uri", None) + self.job_output_type = "mltable" # type: str + self.description = kwargs.get("description", None) class ModelConfiguration(msrest.serialization.Model): @@ -23036,14 +21807,11 @@ class ModelConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'mount_path': {'key': 'mountPath', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "mount_path": {"key": "mountPath", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Input delivery mode for the model. Possible values include: "Copy", "Download". :paramtype mode: str or ~azure.mgmt.machinelearningservices.models.PackageInputDeliveryMode @@ -23051,8 +21819,8 @@ def __init__( :paramtype mount_path: str """ super(ModelConfiguration, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.mount_path = kwargs.get('mount_path', None) + self.mode = kwargs.get("mode", None) + self.mount_path = kwargs.get("mount_path", None) class ModelContainer(ProxyResource): @@ -23078,31 +21846,28 @@ class ModelContainer(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'ModelContainerProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ModelContainerProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.ModelContainerProperties """ super(ModelContainer, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class ModelContainerProperties(AssetContainer): @@ -23129,25 +21894,22 @@ class ModelContainerProperties(AssetContainer): """ _validation = { - 'latest_version': {'readonly': True}, - 'next_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "latest_version": {"readonly": True}, + "next_version": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'latest_version': {'key': 'latestVersion', 'type': 'str'}, - 'next_version': {'key': 'nextVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "latest_version": {"key": "latestVersion", "type": "str"}, + "next_version": {"key": "nextVersion", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -23173,14 +21935,11 @@ class ModelContainerResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ModelContainer]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[ModelContainer]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of ModelContainer objects. If null, there are no additional pages. @@ -23189,8 +21948,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.ModelContainer] """ super(ModelContainerResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class ModelDeprecationInfo(msrest.serialization.Model): @@ -23203,14 +21962,11 @@ class ModelDeprecationInfo(msrest.serialization.Model): """ _attribute_map = { - 'fine_tune': {'key': 'fineTune', 'type': 'str'}, - 'inference': {'key': 'inference', 'type': 'str'}, + "fine_tune": {"key": "fineTune", "type": "str"}, + "inference": {"key": "inference", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword fine_tune: The datetime of deprecation of the fineTune Model. :paramtype fine_tune: str @@ -23218,8 +21974,8 @@ def __init__( :paramtype inference: str """ super(ModelDeprecationInfo, self).__init__(**kwargs) - self.fine_tune = kwargs.get('fine_tune', None) - self.inference = kwargs.get('inference', None) + self.fine_tune = kwargs.get("fine_tune", None) + self.inference = kwargs.get("inference", None) class ModelPackageInput(msrest.serialization.Model): @@ -23239,21 +21995,18 @@ class ModelPackageInput(msrest.serialization.Model): """ _validation = { - 'input_type': {'required': True}, - 'path': {'required': True}, + "input_type": {"required": True}, + "path": {"required": True}, } _attribute_map = { - 'input_type': {'key': 'inputType', 'type': 'str'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'mount_path': {'key': 'mountPath', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'PackageInputPathBase'}, + "input_type": {"key": "inputType", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, + "mount_path": {"key": "mountPath", "type": "str"}, + "path": {"key": "path", "type": "PackageInputPathBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword input_type: Required. [Required] Type of the input included in the target image. Possible values include: "UriFile", "UriFolder". @@ -23266,10 +22019,10 @@ def __init__( :paramtype path: ~azure.mgmt.machinelearningservices.models.PackageInputPathBase """ super(ModelPackageInput, self).__init__(**kwargs) - self.input_type = kwargs['input_type'] - self.mode = kwargs.get('mode', None) - self.mount_path = kwargs.get('mount_path', None) - self.path = kwargs['path'] + self.input_type = kwargs["input_type"] + self.mode = kwargs.get("mode", None) + self.mount_path = kwargs.get("mount_path", None) + self.path = kwargs["path"] class ModelPerformanceSignal(MonitoringSignalBase): @@ -23303,26 +22056,23 @@ class ModelPerformanceSignal(MonitoringSignalBase): """ _validation = { - 'signal_type': {'required': True}, - 'metric_threshold': {'required': True}, - 'production_data': {'required': True}, - 'reference_data': {'required': True}, + "signal_type": {"required": True}, + "metric_threshold": {"required": True}, + "production_data": {"required": True}, + "reference_data": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'data_segment': {'key': 'dataSegment', 'type': 'MonitoringDataSegment'}, - 'metric_threshold': {'key': 'metricThreshold', 'type': 'ModelPerformanceMetricThresholdBase'}, - 'production_data': {'key': 'productionData', 'type': '[MonitoringInputDataBase]'}, - 'reference_data': {'key': 'referenceData', 'type': 'MonitoringInputDataBase'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, + "data_segment": {"key": "dataSegment", "type": "MonitoringDataSegment"}, + "metric_threshold": {"key": "metricThreshold", "type": "ModelPerformanceMetricThresholdBase"}, + "production_data": {"key": "productionData", "type": "[MonitoringInputDataBase]"}, + "reference_data": {"key": "referenceData", "type": "MonitoringInputDataBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -23344,11 +22094,11 @@ def __init__( :paramtype reference_data: ~azure.mgmt.machinelearningservices.models.MonitoringInputDataBase """ super(ModelPerformanceSignal, self).__init__(**kwargs) - self.signal_type = 'ModelPerformance' # type: str - self.data_segment = kwargs.get('data_segment', None) - self.metric_threshold = kwargs['metric_threshold'] - self.production_data = kwargs['production_data'] - self.reference_data = kwargs['reference_data'] + self.signal_type = "ModelPerformance" # type: str + self.data_segment = kwargs.get("data_segment", None) + self.metric_threshold = kwargs["metric_threshold"] + self.production_data = kwargs["production_data"] + self.reference_data = kwargs["reference_data"] class ModelSettings(msrest.serialization.Model): @@ -23361,23 +22111,20 @@ class ModelSettings(msrest.serialization.Model): """ _validation = { - 'model_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "model_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, + "model_id": {"key": "modelId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model_id: Required. [Required]. :paramtype model_id: str """ super(ModelSettings, self).__init__(**kwargs) - self.model_id = kwargs['model_id'] + self.model_id = kwargs["model_id"] class ModelSku(msrest.serialization.Model): @@ -23396,17 +22143,14 @@ class ModelSku(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'usage_name': {'key': 'usageName', 'type': 'str'}, - 'deprecation_date': {'key': 'deprecationDate', 'type': 'iso-8601'}, - 'capacity': {'key': 'capacity', 'type': 'CapacityConfig'}, - 'rate_limits': {'key': 'rateLimits', 'type': '[CallRateLimit]'}, + "name": {"key": "name", "type": "str"}, + "usage_name": {"key": "usageName", "type": "str"}, + "deprecation_date": {"key": "deprecationDate", "type": "iso-8601"}, + "capacity": {"key": "capacity", "type": "CapacityConfig"}, + "rate_limits": {"key": "rateLimits", "type": "[CallRateLimit]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: The name of the model SKU. :paramtype name: str @@ -23420,11 +22164,11 @@ def __init__( :paramtype rate_limits: list[~azure.mgmt.machinelearningservices.models.CallRateLimit] """ super(ModelSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.usage_name = kwargs.get('usage_name', None) - self.deprecation_date = kwargs.get('deprecation_date', None) - self.capacity = kwargs.get('capacity', None) - self.rate_limits = kwargs.get('rate_limits', None) + self.name = kwargs.get("name", None) + self.usage_name = kwargs.get("usage_name", None) + self.deprecation_date = kwargs.get("deprecation_date", None) + self.capacity = kwargs.get("capacity", None) + self.rate_limits = kwargs.get("rate_limits", None) class ModelVersion(ProxyResource): @@ -23450,31 +22194,28 @@ class ModelVersion(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'ModelVersionProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ModelVersionProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.ModelVersionProperties """ super(ModelVersion, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class ModelVersionProperties(AssetBase): @@ -23516,29 +22257,26 @@ class ModelVersionProperties(AssetBase): """ _validation = { - 'provisioning_state': {'readonly': True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'flavors': {'key': 'flavors', 'type': '{FlavorData}'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'job_name': {'key': 'jobName', 'type': 'str'}, - 'model_type': {'key': 'modelType', 'type': 'str'}, - 'model_uri': {'key': 'modelUri', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'stage': {'key': 'stage', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "flavors": {"key": "flavors", "type": "{FlavorData}"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "job_name": {"key": "jobName", "type": "str"}, + "model_type": {"key": "modelType", "type": "str"}, + "model_uri": {"key": "modelUri", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "stage": {"key": "stage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -23570,13 +22308,13 @@ def __init__( :paramtype stage: str """ super(ModelVersionProperties, self).__init__(**kwargs) - self.flavors = kwargs.get('flavors', None) - self.intellectual_property = kwargs.get('intellectual_property', None) - self.job_name = kwargs.get('job_name', None) - self.model_type = kwargs.get('model_type', None) - self.model_uri = kwargs.get('model_uri', None) + self.flavors = kwargs.get("flavors", None) + self.intellectual_property = kwargs.get("intellectual_property", None) + self.job_name = kwargs.get("job_name", None) + self.model_type = kwargs.get("model_type", None) + self.model_uri = kwargs.get("model_uri", None) self.provisioning_state = None - self.stage = kwargs.get('stage', None) + self.stage = kwargs.get("stage", None) class ModelVersionResourceArmPaginatedResult(msrest.serialization.Model): @@ -23590,14 +22328,11 @@ class ModelVersionResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ModelVersion]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[ModelVersion]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of ModelVersion objects. If null, there are no additional pages. @@ -23606,8 +22341,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.ModelVersion] """ super(ModelVersionResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class MonitorComputeConfigurationBase(msrest.serialization.Model): @@ -23624,23 +22359,17 @@ class MonitorComputeConfigurationBase(msrest.serialization.Model): """ _validation = { - 'compute_type': {'required': True}, + "compute_type": {"required": True}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, + "compute_type": {"key": "computeType", "type": "str"}, } - _subtype_map = { - 'compute_type': {'ServerlessSpark': 'MonitorServerlessSparkCompute'} - } + _subtype_map = {"compute_type": {"ServerlessSpark": "MonitorServerlessSparkCompute"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(MonitorComputeConfigurationBase, self).__init__(**kwargs) self.compute_type = None # type: Optional[str] @@ -23665,21 +22394,18 @@ class MonitorDefinition(msrest.serialization.Model): """ _validation = { - 'compute_configuration': {'required': True}, - 'signals': {'required': True}, + "compute_configuration": {"required": True}, + "signals": {"required": True}, } _attribute_map = { - 'alert_notification_settings': {'key': 'alertNotificationSettings', 'type': 'MonitorNotificationSettings'}, - 'compute_configuration': {'key': 'computeConfiguration', 'type': 'MonitorComputeConfigurationBase'}, - 'monitoring_target': {'key': 'monitoringTarget', 'type': 'MonitoringTarget'}, - 'signals': {'key': 'signals', 'type': '{MonitoringSignalBase}'}, + "alert_notification_settings": {"key": "alertNotificationSettings", "type": "MonitorNotificationSettings"}, + "compute_configuration": {"key": "computeConfiguration", "type": "MonitorComputeConfigurationBase"}, + "monitoring_target": {"key": "monitoringTarget", "type": "MonitoringTarget"}, + "signals": {"key": "signals", "type": "{MonitoringSignalBase}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword alert_notification_settings: The monitor's notification settings. :paramtype alert_notification_settings: @@ -23695,10 +22421,10 @@ def __init__( :paramtype signals: dict[str, ~azure.mgmt.machinelearningservices.models.MonitoringSignalBase] """ super(MonitorDefinition, self).__init__(**kwargs) - self.alert_notification_settings = kwargs.get('alert_notification_settings', None) - self.compute_configuration = kwargs['compute_configuration'] - self.monitoring_target = kwargs.get('monitoring_target', None) - self.signals = kwargs['signals'] + self.alert_notification_settings = kwargs.get("alert_notification_settings", None) + self.compute_configuration = kwargs["compute_configuration"] + self.monitoring_target = kwargs.get("monitoring_target", None) + self.signals = kwargs["signals"] class MonitorEmailNotificationSettings(msrest.serialization.Model): @@ -23710,20 +22436,17 @@ class MonitorEmailNotificationSettings(msrest.serialization.Model): """ _attribute_map = { - 'emails': {'key': 'emails', 'type': '[str]'}, + "emails": {"key": "emails", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword emails: This is the email recipient list which has a limitation of 499 characters in total. :paramtype emails: list[str] """ super(MonitorEmailNotificationSettings, self).__init__(**kwargs) - self.emails = kwargs.get('emails', None) + self.emails = kwargs.get("emails", None) class MonitoringDataSegment(msrest.serialization.Model): @@ -23736,14 +22459,11 @@ class MonitoringDataSegment(msrest.serialization.Model): """ _attribute_map = { - 'feature': {'key': 'feature', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, + "feature": {"key": "feature", "type": "str"}, + "values": {"key": "values", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword feature: The feature to segment the data on. :paramtype feature: str @@ -23751,8 +22471,8 @@ def __init__( :paramtype values: list[str] """ super(MonitoringDataSegment, self).__init__(**kwargs) - self.feature = kwargs.get('feature', None) - self.values = kwargs.get('values', None) + self.feature = kwargs.get("feature", None) + self.values = kwargs.get("values", None) class MonitoringTarget(msrest.serialization.Model): @@ -23770,19 +22490,16 @@ class MonitoringTarget(msrest.serialization.Model): """ _validation = { - 'task_type': {'required': True}, + "task_type": {"required": True}, } _attribute_map = { - 'deployment_id': {'key': 'deploymentId', 'type': 'str'}, - 'model_id': {'key': 'modelId', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, + "deployment_id": {"key": "deploymentId", "type": "str"}, + "model_id": {"key": "modelId", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword deployment_id: The ARM resource ID of either the deployment targeted by this monitor. :paramtype deployment_id: str @@ -23793,9 +22510,9 @@ def __init__( :paramtype task_type: str or ~azure.mgmt.machinelearningservices.models.ModelTaskType """ super(MonitoringTarget, self).__init__(**kwargs) - self.deployment_id = kwargs.get('deployment_id', None) - self.model_id = kwargs.get('model_id', None) - self.task_type = kwargs['task_type'] + self.deployment_id = kwargs.get("deployment_id", None) + self.model_id = kwargs.get("model_id", None) + self.task_type = kwargs["task_type"] class MonitoringThreshold(msrest.serialization.Model): @@ -23806,19 +22523,16 @@ class MonitoringThreshold(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, + "value": {"key": "value", "type": "float"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: The threshold value. If null, the set default is dependent on the metric type. :paramtype value: float """ super(MonitoringThreshold, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class MonitoringWorkspaceConnection(msrest.serialization.Model): @@ -23835,14 +22549,11 @@ class MonitoringWorkspaceConnection(msrest.serialization.Model): """ _attribute_map = { - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'secrets': {'key': 'secrets', 'type': '{str}'}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "secrets": {"key": "secrets", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword environment_variables: The properties of a workspace service connection to store as environment variables in the submitted jobs. @@ -23854,8 +22565,8 @@ def __init__( :paramtype secrets: dict[str, str] """ super(MonitoringWorkspaceConnection, self).__init__(**kwargs) - self.environment_variables = kwargs.get('environment_variables', None) - self.secrets = kwargs.get('secrets', None) + self.environment_variables = kwargs.get("environment_variables", None) + self.secrets = kwargs.get("secrets", None) class MonitorNotificationSettings(msrest.serialization.Model): @@ -23867,20 +22578,17 @@ class MonitorNotificationSettings(msrest.serialization.Model): """ _attribute_map = { - 'email_notification_settings': {'key': 'emailNotificationSettings', 'type': 'MonitorEmailNotificationSettings'}, + "email_notification_settings": {"key": "emailNotificationSettings", "type": "MonitorEmailNotificationSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword email_notification_settings: The AML notification email settings. :paramtype email_notification_settings: ~azure.mgmt.machinelearningservices.models.MonitorEmailNotificationSettings """ super(MonitorNotificationSettings, self).__init__(**kwargs) - self.email_notification_settings = kwargs.get('email_notification_settings', None) + self.email_notification_settings = kwargs.get("email_notification_settings", None) class MonitorServerlessSparkCompute(MonitorComputeConfigurationBase): @@ -23902,23 +22610,20 @@ class MonitorServerlessSparkCompute(MonitorComputeConfigurationBase): """ _validation = { - 'compute_type': {'required': True}, - 'compute_identity': {'required': True}, - 'instance_type': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'runtime_version': {'required': True, 'min_length': 1, 'pattern': r'^[0-9]+\.[0-9]+$'}, + "compute_type": {"required": True}, + "compute_identity": {"required": True}, + "instance_type": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "runtime_version": {"required": True, "min_length": 1, "pattern": r"^[0-9]+\.[0-9]+$"}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_identity': {'key': 'computeIdentity', 'type': 'MonitorComputeIdentityBase'}, - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_identity": {"key": "computeIdentity", "type": "MonitorComputeIdentityBase"}, + "instance_type": {"key": "instanceType", "type": "str"}, + "runtime_version": {"key": "runtimeVersion", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword compute_identity: Required. [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. @@ -23930,10 +22635,10 @@ def __init__( :paramtype runtime_version: str """ super(MonitorServerlessSparkCompute, self).__init__(**kwargs) - self.compute_type = 'ServerlessSpark' # type: str - self.compute_identity = kwargs['compute_identity'] - self.instance_type = kwargs['instance_type'] - self.runtime_version = kwargs['runtime_version'] + self.compute_type = "ServerlessSpark" # type: str + self.compute_identity = kwargs["compute_identity"] + self.instance_type = kwargs["instance_type"] + self.runtime_version = kwargs["runtime_version"] class Mpi(DistributionConfiguration): @@ -23950,25 +22655,22 @@ class Mpi(DistributionConfiguration): """ _validation = { - 'distribution_type': {'required': True}, + "distribution_type": {"required": True}, } _attribute_map = { - 'distribution_type': {'key': 'distributionType', 'type': 'str'}, - 'process_count_per_instance': {'key': 'processCountPerInstance', 'type': 'int'}, + "distribution_type": {"key": "distributionType", "type": "str"}, + "process_count_per_instance": {"key": "processCountPerInstance", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword process_count_per_instance: Number of processes per MPI node. :paramtype process_count_per_instance: int """ super(Mpi, self).__init__(**kwargs) - self.distribution_type = 'Mpi' # type: str - self.process_count_per_instance = kwargs.get('process_count_per_instance', None) + self.distribution_type = "Mpi" # type: str + self.process_count_per_instance = kwargs.get("process_count_per_instance", None) class NlpFixedParameters(msrest.serialization.Model): @@ -23999,21 +22701,18 @@ class NlpFixedParameters(msrest.serialization.Model): """ _attribute_map = { - 'gradient_accumulation_steps': {'key': 'gradientAccumulationSteps', 'type': 'int'}, - 'learning_rate': {'key': 'learningRate', 'type': 'float'}, - 'learning_rate_scheduler': {'key': 'learningRateScheduler', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'number_of_epochs': {'key': 'numberOfEpochs', 'type': 'int'}, - 'training_batch_size': {'key': 'trainingBatchSize', 'type': 'int'}, - 'validation_batch_size': {'key': 'validationBatchSize', 'type': 'int'}, - 'warmup_ratio': {'key': 'warmupRatio', 'type': 'float'}, - 'weight_decay': {'key': 'weightDecay', 'type': 'float'}, + "gradient_accumulation_steps": {"key": "gradientAccumulationSteps", "type": "int"}, + "learning_rate": {"key": "learningRate", "type": "float"}, + "learning_rate_scheduler": {"key": "learningRateScheduler", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "number_of_epochs": {"key": "numberOfEpochs", "type": "int"}, + "training_batch_size": {"key": "trainingBatchSize", "type": "int"}, + "validation_batch_size": {"key": "validationBatchSize", "type": "int"}, + "warmup_ratio": {"key": "warmupRatio", "type": "float"}, + "weight_decay": {"key": "weightDecay", "type": "float"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword gradient_accumulation_steps: Number of steps to accumulate gradients over before running a backward pass. @@ -24039,15 +22738,15 @@ def __init__( :paramtype weight_decay: float """ super(NlpFixedParameters, self).__init__(**kwargs) - self.gradient_accumulation_steps = kwargs.get('gradient_accumulation_steps', None) - self.learning_rate = kwargs.get('learning_rate', None) - self.learning_rate_scheduler = kwargs.get('learning_rate_scheduler', None) - self.model_name = kwargs.get('model_name', None) - self.number_of_epochs = kwargs.get('number_of_epochs', None) - self.training_batch_size = kwargs.get('training_batch_size', None) - self.validation_batch_size = kwargs.get('validation_batch_size', None) - self.warmup_ratio = kwargs.get('warmup_ratio', None) - self.weight_decay = kwargs.get('weight_decay', None) + self.gradient_accumulation_steps = kwargs.get("gradient_accumulation_steps", None) + self.learning_rate = kwargs.get("learning_rate", None) + self.learning_rate_scheduler = kwargs.get("learning_rate_scheduler", None) + self.model_name = kwargs.get("model_name", None) + self.number_of_epochs = kwargs.get("number_of_epochs", None) + self.training_batch_size = kwargs.get("training_batch_size", None) + self.validation_batch_size = kwargs.get("validation_batch_size", None) + self.warmup_ratio = kwargs.get("warmup_ratio", None) + self.weight_decay = kwargs.get("weight_decay", None) class NlpParameterSubspace(msrest.serialization.Model): @@ -24076,21 +22775,18 @@ class NlpParameterSubspace(msrest.serialization.Model): """ _attribute_map = { - 'gradient_accumulation_steps': {'key': 'gradientAccumulationSteps', 'type': 'str'}, - 'learning_rate': {'key': 'learningRate', 'type': 'str'}, - 'learning_rate_scheduler': {'key': 'learningRateScheduler', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'number_of_epochs': {'key': 'numberOfEpochs', 'type': 'str'}, - 'training_batch_size': {'key': 'trainingBatchSize', 'type': 'str'}, - 'validation_batch_size': {'key': 'validationBatchSize', 'type': 'str'}, - 'warmup_ratio': {'key': 'warmupRatio', 'type': 'str'}, - 'weight_decay': {'key': 'weightDecay', 'type': 'str'}, + "gradient_accumulation_steps": {"key": "gradientAccumulationSteps", "type": "str"}, + "learning_rate": {"key": "learningRate", "type": "str"}, + "learning_rate_scheduler": {"key": "learningRateScheduler", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "number_of_epochs": {"key": "numberOfEpochs", "type": "str"}, + "training_batch_size": {"key": "trainingBatchSize", "type": "str"}, + "validation_batch_size": {"key": "validationBatchSize", "type": "str"}, + "warmup_ratio": {"key": "warmupRatio", "type": "str"}, + "weight_decay": {"key": "weightDecay", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword gradient_accumulation_steps: Number of steps to accumulate gradients over before running a backward pass. @@ -24114,15 +22810,15 @@ def __init__( :paramtype weight_decay: str """ super(NlpParameterSubspace, self).__init__(**kwargs) - self.gradient_accumulation_steps = kwargs.get('gradient_accumulation_steps', None) - self.learning_rate = kwargs.get('learning_rate', None) - self.learning_rate_scheduler = kwargs.get('learning_rate_scheduler', None) - self.model_name = kwargs.get('model_name', None) - self.number_of_epochs = kwargs.get('number_of_epochs', None) - self.training_batch_size = kwargs.get('training_batch_size', None) - self.validation_batch_size = kwargs.get('validation_batch_size', None) - self.warmup_ratio = kwargs.get('warmup_ratio', None) - self.weight_decay = kwargs.get('weight_decay', None) + self.gradient_accumulation_steps = kwargs.get("gradient_accumulation_steps", None) + self.learning_rate = kwargs.get("learning_rate", None) + self.learning_rate_scheduler = kwargs.get("learning_rate_scheduler", None) + self.model_name = kwargs.get("model_name", None) + self.number_of_epochs = kwargs.get("number_of_epochs", None) + self.training_batch_size = kwargs.get("training_batch_size", None) + self.validation_batch_size = kwargs.get("validation_batch_size", None) + self.warmup_ratio = kwargs.get("warmup_ratio", None) + self.weight_decay = kwargs.get("weight_decay", None) class NlpSweepSettings(msrest.serialization.Model): @@ -24139,18 +22835,15 @@ class NlpSweepSettings(msrest.serialization.Model): """ _validation = { - 'sampling_algorithm': {'required': True}, + "sampling_algorithm": {"required": True}, } _attribute_map = { - 'early_termination': {'key': 'earlyTermination', 'type': 'EarlyTerminationPolicy'}, - 'sampling_algorithm': {'key': 'samplingAlgorithm', 'type': 'str'}, + "early_termination": {"key": "earlyTermination", "type": "EarlyTerminationPolicy"}, + "sampling_algorithm": {"key": "samplingAlgorithm", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword early_termination: Type of early termination policy for the sweeping job. :paramtype early_termination: ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicy @@ -24160,44 +22853,41 @@ def __init__( ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType """ super(NlpSweepSettings, self).__init__(**kwargs) - self.early_termination = kwargs.get('early_termination', None) - self.sampling_algorithm = kwargs['sampling_algorithm'] + self.early_termination = kwargs.get("early_termination", None) + self.sampling_algorithm = kwargs["sampling_algorithm"] class NlpVertical(msrest.serialization.Model): """Abstract class for NLP related AutoML tasks. -NLP - Natural Language Processing. + NLP - Natural Language Processing. - :ivar featurization_settings: Featurization inputs needed for AutoML job. - :vartype featurization_settings: - ~azure.mgmt.machinelearningservices.models.NlpVerticalFeaturizationSettings - :ivar fixed_parameters: Model/training parameters that will remain constant throughout - training. - :vartype fixed_parameters: ~azure.mgmt.machinelearningservices.models.NlpFixedParameters - :ivar limit_settings: Execution constraints for AutoMLJob. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.NlpVerticalLimitSettings - :ivar search_space: Search space for sampling different combinations of models and their - hyperparameters. - :vartype search_space: list[~azure.mgmt.machinelearningservices.models.NlpParameterSubspace] - :ivar sweep_settings: Settings for model sweeping and hyperparameter tuning. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.NlpSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar featurization_settings: Featurization inputs needed for AutoML job. + :vartype featurization_settings: + ~azure.mgmt.machinelearningservices.models.NlpVerticalFeaturizationSettings + :ivar fixed_parameters: Model/training parameters that will remain constant throughout + training. + :vartype fixed_parameters: ~azure.mgmt.machinelearningservices.models.NlpFixedParameters + :ivar limit_settings: Execution constraints for AutoMLJob. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.NlpVerticalLimitSettings + :ivar search_space: Search space for sampling different combinations of models and their + hyperparameters. + :vartype search_space: list[~azure.mgmt.machinelearningservices.models.NlpParameterSubspace] + :ivar sweep_settings: Settings for model sweeping and hyperparameter tuning. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.NlpSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput """ _attribute_map = { - 'featurization_settings': {'key': 'featurizationSettings', 'type': 'NlpVerticalFeaturizationSettings'}, - 'fixed_parameters': {'key': 'fixedParameters', 'type': 'NlpFixedParameters'}, - 'limit_settings': {'key': 'limitSettings', 'type': 'NlpVerticalLimitSettings'}, - 'search_space': {'key': 'searchSpace', 'type': '[NlpParameterSubspace]'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'NlpSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, + "featurization_settings": {"key": "featurizationSettings", "type": "NlpVerticalFeaturizationSettings"}, + "fixed_parameters": {"key": "fixedParameters", "type": "NlpFixedParameters"}, + "limit_settings": {"key": "limitSettings", "type": "NlpVerticalLimitSettings"}, + "search_space": {"key": "searchSpace", "type": "[NlpParameterSubspace]"}, + "sweep_settings": {"key": "sweepSettings", "type": "NlpSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword featurization_settings: Featurization inputs needed for AutoML job. :paramtype featurization_settings: @@ -24216,12 +22906,12 @@ def __init__( :paramtype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput """ super(NlpVertical, self).__init__(**kwargs) - self.featurization_settings = kwargs.get('featurization_settings', None) - self.fixed_parameters = kwargs.get('fixed_parameters', None) - self.limit_settings = kwargs.get('limit_settings', None) - self.search_space = kwargs.get('search_space', None) - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) + self.featurization_settings = kwargs.get("featurization_settings", None) + self.fixed_parameters = kwargs.get("fixed_parameters", None) + self.limit_settings = kwargs.get("limit_settings", None) + self.search_space = kwargs.get("search_space", None) + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) class NlpVerticalFeaturizationSettings(FeaturizationSettings): @@ -24232,13 +22922,10 @@ class NlpVerticalFeaturizationSettings(FeaturizationSettings): """ _attribute_map = { - 'dataset_language': {'key': 'datasetLanguage', 'type': 'str'}, + "dataset_language": {"key": "datasetLanguage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword dataset_language: Dataset language, useful for the text data. :paramtype dataset_language: str @@ -24262,17 +22949,14 @@ class NlpVerticalLimitSettings(msrest.serialization.Model): """ _attribute_map = { - 'max_concurrent_trials': {'key': 'maxConcurrentTrials', 'type': 'int'}, - 'max_nodes': {'key': 'maxNodes', 'type': 'int'}, - 'max_trials': {'key': 'maxTrials', 'type': 'int'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, - 'trial_timeout': {'key': 'trialTimeout', 'type': 'duration'}, + "max_concurrent_trials": {"key": "maxConcurrentTrials", "type": "int"}, + "max_nodes": {"key": "maxNodes", "type": "int"}, + "max_trials": {"key": "maxTrials", "type": "int"}, + "timeout": {"key": "timeout", "type": "duration"}, + "trial_timeout": {"key": "trialTimeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword max_concurrent_trials: Maximum Concurrent AutoML iterations. :paramtype max_concurrent_trials: int @@ -24286,11 +22970,11 @@ def __init__( :paramtype trial_timeout: ~datetime.timedelta """ super(NlpVerticalLimitSettings, self).__init__(**kwargs) - self.max_concurrent_trials = kwargs.get('max_concurrent_trials', 1) - self.max_nodes = kwargs.get('max_nodes', 1) - self.max_trials = kwargs.get('max_trials', 1) - self.timeout = kwargs.get('timeout', "P7D") - self.trial_timeout = kwargs.get('trial_timeout', None) + self.max_concurrent_trials = kwargs.get("max_concurrent_trials", 1) + self.max_nodes = kwargs.get("max_nodes", 1) + self.max_trials = kwargs.get("max_trials", 1) + self.timeout = kwargs.get("timeout", "P7D") + self.trial_timeout = kwargs.get("trial_timeout", None) class NodeStateCounts(msrest.serialization.Model): @@ -24313,29 +22997,25 @@ class NodeStateCounts(msrest.serialization.Model): """ _validation = { - 'idle_node_count': {'readonly': True}, - 'running_node_count': {'readonly': True}, - 'preparing_node_count': {'readonly': True}, - 'unusable_node_count': {'readonly': True}, - 'leaving_node_count': {'readonly': True}, - 'preempted_node_count': {'readonly': True}, + "idle_node_count": {"readonly": True}, + "running_node_count": {"readonly": True}, + "preparing_node_count": {"readonly": True}, + "unusable_node_count": {"readonly": True}, + "leaving_node_count": {"readonly": True}, + "preempted_node_count": {"readonly": True}, } _attribute_map = { - 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, - 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, - 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, - 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, - 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, - 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + "idle_node_count": {"key": "idleNodeCount", "type": "int"}, + "running_node_count": {"key": "runningNodeCount", "type": "int"}, + "preparing_node_count": {"key": "preparingNodeCount", "type": "int"}, + "unusable_node_count": {"key": "unusableNodeCount", "type": "int"}, + "leaving_node_count": {"key": "leavingNodeCount", "type": "int"}, + "preempted_node_count": {"key": "preemptedNodeCount", "type": "int"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(NodeStateCounts, self).__init__(**kwargs) self.idle_node_count = None self.running_node_count = None @@ -24392,27 +23072,24 @@ class NoneAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2) """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -24444,7 +23121,7 @@ def __init__( :paramtype target: str """ super(NoneAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'None' # type: str + self.auth_type = "None" # type: str class NoneDatastoreCredentials(DatastoreCredentials): @@ -24459,21 +23136,17 @@ class NoneDatastoreCredentials(DatastoreCredentials): """ _validation = { - 'credentials_type': {'required': True}, + "credentials_type": {"required": True}, } _attribute_map = { - 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, + "credentials_type": {"key": "credentialsType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(NoneDatastoreCredentials, self).__init__(**kwargs) - self.credentials_type = 'None' # type: str + self.credentials_type = "None" # type: str class NotebookAccessTokenResult(msrest.serialization.Model): @@ -24500,33 +23173,29 @@ class NotebookAccessTokenResult(msrest.serialization.Model): """ _validation = { - 'access_token': {'readonly': True}, - 'expires_in': {'readonly': True}, - 'host_name': {'readonly': True}, - 'notebook_resource_id': {'readonly': True}, - 'public_dns': {'readonly': True}, - 'refresh_token': {'readonly': True}, - 'scope': {'readonly': True}, - 'token_type': {'readonly': True}, + "access_token": {"readonly": True}, + "expires_in": {"readonly": True}, + "host_name": {"readonly": True}, + "notebook_resource_id": {"readonly": True}, + "public_dns": {"readonly": True}, + "refresh_token": {"readonly": True}, + "scope": {"readonly": True}, + "token_type": {"readonly": True}, } _attribute_map = { - 'access_token': {'key': 'accessToken', 'type': 'str'}, - 'expires_in': {'key': 'expiresIn', 'type': 'int'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'notebook_resource_id': {'key': 'notebookResourceId', 'type': 'str'}, - 'public_dns': {'key': 'publicDns', 'type': 'str'}, - 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, - 'scope': {'key': 'scope', 'type': 'str'}, - 'token_type': {'key': 'tokenType', 'type': 'str'}, + "access_token": {"key": "accessToken", "type": "str"}, + "expires_in": {"key": "expiresIn", "type": "int"}, + "host_name": {"key": "hostName", "type": "str"}, + "notebook_resource_id": {"key": "notebookResourceId", "type": "str"}, + "public_dns": {"key": "publicDns", "type": "str"}, + "refresh_token": {"key": "refreshToken", "type": "str"}, + "scope": {"key": "scope", "type": "str"}, + "token_type": {"key": "tokenType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(NotebookAccessTokenResult, self).__init__(**kwargs) self.access_token = None self.expires_in = None @@ -24548,14 +23217,11 @@ class NotebookPreparationError(msrest.serialization.Model): """ _attribute_map = { - 'error_message': {'key': 'errorMessage', 'type': 'str'}, - 'status_code': {'key': 'statusCode', 'type': 'int'}, + "error_message": {"key": "errorMessage", "type": "str"}, + "status_code": {"key": "statusCode", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword error_message: :paramtype error_message: str @@ -24563,8 +23229,8 @@ def __init__( :paramtype status_code: int """ super(NotebookPreparationError, self).__init__(**kwargs) - self.error_message = kwargs.get('error_message', None) - self.status_code = kwargs.get('status_code', None) + self.error_message = kwargs.get("error_message", None) + self.status_code = kwargs.get("status_code", None) class NotebookResourceInfo(msrest.serialization.Model): @@ -24582,16 +23248,13 @@ class NotebookResourceInfo(msrest.serialization.Model): """ _attribute_map = { - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'is_private_link_enabled': {'key': 'isPrivateLinkEnabled', 'type': 'bool'}, - 'notebook_preparation_error': {'key': 'notebookPreparationError', 'type': 'NotebookPreparationError'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, + "fqdn": {"key": "fqdn", "type": "str"}, + "is_private_link_enabled": {"key": "isPrivateLinkEnabled", "type": "bool"}, + "notebook_preparation_error": {"key": "notebookPreparationError", "type": "NotebookPreparationError"}, + "resource_id": {"key": "resourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword fqdn: :paramtype fqdn: str @@ -24604,10 +23267,10 @@ def __init__( :paramtype resource_id: str """ super(NotebookResourceInfo, self).__init__(**kwargs) - self.fqdn = kwargs.get('fqdn', None) - self.is_private_link_enabled = kwargs.get('is_private_link_enabled', None) - self.notebook_preparation_error = kwargs.get('notebook_preparation_error', None) - self.resource_id = kwargs.get('resource_id', None) + self.fqdn = kwargs.get("fqdn", None) + self.is_private_link_enabled = kwargs.get("is_private_link_enabled", None) + self.notebook_preparation_error = kwargs.get("notebook_preparation_error", None) + self.resource_id = kwargs.get("resource_id", None) class NotificationSetting(msrest.serialization.Model): @@ -24625,15 +23288,12 @@ class NotificationSetting(msrest.serialization.Model): """ _attribute_map = { - 'email_on': {'key': 'emailOn', 'type': '[str]'}, - 'emails': {'key': 'emails', 'type': '[str]'}, - 'webhooks': {'key': 'webhooks', 'type': '{Webhook}'}, + "email_on": {"key": "emailOn", "type": "[str]"}, + "emails": {"key": "emails", "type": "[str]"}, + "webhooks": {"key": "webhooks", "type": "{Webhook}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword email_on: Send email notification to user on specified notification type. :paramtype email_on: list[str or @@ -24646,9 +23306,9 @@ def __init__( :paramtype webhooks: dict[str, ~azure.mgmt.machinelearningservices.models.Webhook] """ super(NotificationSetting, self).__init__(**kwargs) - self.email_on = kwargs.get('email_on', None) - self.emails = kwargs.get('emails', None) - self.webhooks = kwargs.get('webhooks', None) + self.email_on = kwargs.get("email_on", None) + self.emails = kwargs.get("emails", None) + self.webhooks = kwargs.get("webhooks", None) class NumericalDataDriftMetricThreshold(DataDriftMetricThresholdBase): @@ -24669,20 +23329,17 @@ class NumericalDataDriftMetricThreshold(DataDriftMetricThresholdBase): """ _validation = { - 'data_type': {'required': True}, - 'metric': {'required': True}, + "data_type": {"required": True}, + "metric": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, - 'metric': {'key': 'metric', 'type': 'str'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, + "metric": {"key": "metric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -24693,8 +23350,8 @@ def __init__( :paramtype metric: str or ~azure.mgmt.machinelearningservices.models.NumericalDataDriftMetric """ super(NumericalDataDriftMetricThreshold, self).__init__(**kwargs) - self.data_type = 'Numerical' # type: str - self.metric = kwargs['metric'] + self.data_type = "Numerical" # type: str + self.metric = kwargs["metric"] class NumericalDataQualityMetricThreshold(DataQualityMetricThresholdBase): @@ -24714,20 +23371,17 @@ class NumericalDataQualityMetricThreshold(DataQualityMetricThresholdBase): """ _validation = { - 'data_type': {'required': True}, - 'metric': {'required': True}, + "data_type": {"required": True}, + "metric": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, - 'metric': {'key': 'metric', 'type': 'str'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, + "metric": {"key": "metric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -24737,8 +23391,8 @@ def __init__( :paramtype metric: str or ~azure.mgmt.machinelearningservices.models.NumericalDataQualityMetric """ super(NumericalDataQualityMetricThreshold, self).__init__(**kwargs) - self.data_type = 'Numerical' # type: str - self.metric = kwargs['metric'] + self.data_type = "Numerical" # type: str + self.metric = kwargs["metric"] class NumericalPredictionDriftMetricThreshold(PredictionDriftMetricThresholdBase): @@ -24760,20 +23414,17 @@ class NumericalPredictionDriftMetricThreshold(PredictionDriftMetricThresholdBase """ _validation = { - 'data_type': {'required': True}, - 'metric': {'required': True}, + "data_type": {"required": True}, + "metric": {"required": True}, } _attribute_map = { - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, - 'metric': {'key': 'metric', 'type': 'str'}, + "data_type": {"key": "dataType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, + "metric": {"key": "metric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -24785,8 +23436,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.NumericalPredictionDriftMetric """ super(NumericalPredictionDriftMetricThreshold, self).__init__(**kwargs) - self.data_type = 'Numerical' # type: str - self.metric = kwargs['metric'] + self.data_type = "Numerical" # type: str + self.metric = kwargs["metric"] class OAuth2AuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): @@ -24839,28 +23490,25 @@ class OAuth2AuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionOAuth2'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionOAuth2"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -24895,8 +23543,8 @@ def __init__( :paramtype credentials: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionOAuth2 """ super(OAuth2AuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'OAuth2' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "OAuth2" # type: str + self.credentials = kwargs.get("credentials", None) class Objective(msrest.serialization.Model): @@ -24912,19 +23560,16 @@ class Objective(msrest.serialization.Model): """ _validation = { - 'goal': {'required': True}, - 'primary_metric': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "goal": {"required": True}, + "primary_metric": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'goal': {'key': 'goal', 'type': 'str'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + "goal": {"key": "goal", "type": "str"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword goal: Required. [Required] Defines supported metric goals for hyperparameter tuning. Possible values include: "Minimize", "Maximize". @@ -24933,8 +23578,8 @@ def __init__( :paramtype primary_metric: str """ super(Objective, self).__init__(**kwargs) - self.goal = kwargs['goal'] - self.primary_metric = kwargs['primary_metric'] + self.goal = kwargs["goal"] + self.primary_metric = kwargs["primary_metric"] class OneLakeDatastore(DatastoreProperties): @@ -24975,31 +23620,28 @@ class OneLakeDatastore(DatastoreProperties): """ _validation = { - 'credentials': {'required': True}, - 'datastore_type': {'required': True}, - 'is_default': {'readonly': True}, - 'artifact': {'required': True}, - 'one_lake_workspace_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "credentials": {"required": True}, + "datastore_type": {"required": True}, + "is_default": {"readonly": True}, + "artifact": {"required": True}, + "one_lake_workspace_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'credentials': {'key': 'credentials', 'type': 'DatastoreCredentials'}, - 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'is_default': {'key': 'isDefault', 'type': 'bool'}, - 'artifact': {'key': 'artifact', 'type': 'OneLakeArtifact'}, - 'endpoint': {'key': 'endpoint', 'type': 'str'}, - 'one_lake_workspace_name': {'key': 'oneLakeWorkspaceName', 'type': 'str'}, - 'service_data_access_auth_identity': {'key': 'serviceDataAccessAuthIdentity', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "credentials": {"key": "credentials", "type": "DatastoreCredentials"}, + "datastore_type": {"key": "datastoreType", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "is_default": {"key": "isDefault", "type": "bool"}, + "artifact": {"key": "artifact", "type": "OneLakeArtifact"}, + "endpoint": {"key": "endpoint", "type": "str"}, + "one_lake_workspace_name": {"key": "oneLakeWorkspaceName", "type": "str"}, + "service_data_access_auth_identity": {"key": "serviceDataAccessAuthIdentity", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -25025,11 +23667,11 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ServiceDataAccessAuthIdentity """ super(OneLakeDatastore, self).__init__(**kwargs) - self.datastore_type = 'OneLake' # type: str - self.artifact = kwargs['artifact'] - self.endpoint = kwargs.get('endpoint', None) - self.one_lake_workspace_name = kwargs['one_lake_workspace_name'] - self.service_data_access_auth_identity = kwargs.get('service_data_access_auth_identity', None) + self.datastore_type = "OneLake" # type: str + self.artifact = kwargs["artifact"] + self.endpoint = kwargs.get("endpoint", None) + self.one_lake_workspace_name = kwargs["one_lake_workspace_name"] + self.service_data_access_auth_identity = kwargs.get("service_data_access_auth_identity", None) class OnlineDeployment(TrackedResource): @@ -25066,31 +23708,28 @@ class OnlineDeployment(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OnlineDeploymentProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "OnlineDeploymentProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -25107,10 +23746,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(OnlineDeployment, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class OnlineDeploymentTrackedResourceArmPaginatedResult(msrest.serialization.Model): @@ -25124,14 +23763,11 @@ class OnlineDeploymentTrackedResourceArmPaginatedResult(msrest.serialization.Mod """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[OnlineDeployment]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[OnlineDeployment]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of OnlineDeployment objects. If null, there are no additional pages. @@ -25140,8 +23776,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.OnlineDeployment] """ super(OnlineDeploymentTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class OnlineEndpoint(TrackedResource): @@ -25178,31 +23814,28 @@ class OnlineEndpoint(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OnlineEndpointProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "OnlineEndpointProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -25219,10 +23852,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(OnlineEndpoint, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class OnlineEndpointProperties(EndpointPropertiesBase): @@ -25268,30 +23901,27 @@ class OnlineEndpointProperties(EndpointPropertiesBase): """ _validation = { - 'auth_mode': {'required': True}, - 'scoring_uri': {'readonly': True}, - 'swagger_uri': {'readonly': True}, - 'provisioning_state': {'readonly': True}, + "auth_mode": {"required": True}, + "scoring_uri": {"readonly": True}, + "swagger_uri": {"readonly": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'auth_mode': {'key': 'authMode', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'keys': {'key': 'keys', 'type': 'EndpointAuthKeys'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, - 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, - 'compute': {'key': 'compute', 'type': 'str'}, - 'mirror_traffic': {'key': 'mirrorTraffic', 'type': '{int}'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'traffic': {'key': 'traffic', 'type': '{int}'}, + "auth_mode": {"key": "authMode", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "keys": {"key": "keys", "type": "EndpointAuthKeys"}, + "properties": {"key": "properties", "type": "{str}"}, + "scoring_uri": {"key": "scoringUri", "type": "str"}, + "swagger_uri": {"key": "swaggerUri", "type": "str"}, + "compute": {"key": "compute", "type": "str"}, + "mirror_traffic": {"key": "mirrorTraffic", "type": "{int}"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "public_network_access": {"key": "publicNetworkAccess", "type": "str"}, + "traffic": {"key": "traffic", "type": "{int}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword auth_mode: Required. [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' @@ -25320,11 +23950,11 @@ def __init__( :paramtype traffic: dict[str, int] """ super(OnlineEndpointProperties, self).__init__(**kwargs) - self.compute = kwargs.get('compute', None) - self.mirror_traffic = kwargs.get('mirror_traffic', None) + self.compute = kwargs.get("compute", None) + self.mirror_traffic = kwargs.get("mirror_traffic", None) self.provisioning_state = None - self.public_network_access = kwargs.get('public_network_access', None) - self.traffic = kwargs.get('traffic', None) + self.public_network_access = kwargs.get("public_network_access", None) + self.traffic = kwargs.get("traffic", None) class OnlineEndpointTrackedResourceArmPaginatedResult(msrest.serialization.Model): @@ -25338,14 +23968,11 @@ class OnlineEndpointTrackedResourceArmPaginatedResult(msrest.serialization.Model """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[OnlineEndpoint]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[OnlineEndpoint]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. @@ -25354,8 +23981,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.OnlineEndpoint] """ super(OnlineEndpointTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class OnlineInferenceConfiguration(msrest.serialization.Model): @@ -25375,17 +24002,14 @@ class OnlineInferenceConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'configurations': {'key': 'configurations', 'type': '{str}'}, - 'entry_script': {'key': 'entryScript', 'type': 'str'}, - 'liveness_route': {'key': 'livenessRoute', 'type': 'Route'}, - 'readiness_route': {'key': 'readinessRoute', 'type': 'Route'}, - 'scoring_route': {'key': 'scoringRoute', 'type': 'Route'}, + "configurations": {"key": "configurations", "type": "{str}"}, + "entry_script": {"key": "entryScript", "type": "str"}, + "liveness_route": {"key": "livenessRoute", "type": "Route"}, + "readiness_route": {"key": "readinessRoute", "type": "Route"}, + "scoring_route": {"key": "scoringRoute", "type": "Route"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword configurations: Additional configurations. :paramtype configurations: dict[str, str] @@ -25400,11 +24024,11 @@ def __init__( :paramtype scoring_route: ~azure.mgmt.machinelearningservices.models.Route """ super(OnlineInferenceConfiguration, self).__init__(**kwargs) - self.configurations = kwargs.get('configurations', None) - self.entry_script = kwargs.get('entry_script', None) - self.liveness_route = kwargs.get('liveness_route', None) - self.readiness_route = kwargs.get('readiness_route', None) - self.scoring_route = kwargs.get('scoring_route', None) + self.configurations = kwargs.get("configurations", None) + self.entry_script = kwargs.get("entry_script", None) + self.liveness_route = kwargs.get("liveness_route", None) + self.readiness_route = kwargs.get("readiness_route", None) + self.scoring_route = kwargs.get("scoring_route", None) class OnlineRequestSettings(msrest.serialization.Model): @@ -25423,15 +24047,12 @@ class OnlineRequestSettings(msrest.serialization.Model): """ _attribute_map = { - 'max_concurrent_requests_per_instance': {'key': 'maxConcurrentRequestsPerInstance', 'type': 'int'}, - 'max_queue_wait': {'key': 'maxQueueWait', 'type': 'duration'}, - 'request_timeout': {'key': 'requestTimeout', 'type': 'duration'}, + "max_concurrent_requests_per_instance": {"key": "maxConcurrentRequestsPerInstance", "type": "int"}, + "max_queue_wait": {"key": "maxQueueWait", "type": "duration"}, + "request_timeout": {"key": "requestTimeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword max_concurrent_requests_per_instance: The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. @@ -25445,13 +24066,14 @@ def __init__( :paramtype request_timeout: ~datetime.timedelta """ super(OnlineRequestSettings, self).__init__(**kwargs) - self.max_concurrent_requests_per_instance = kwargs.get('max_concurrent_requests_per_instance', 1) - self.max_queue_wait = kwargs.get('max_queue_wait', "PT0.5S") - self.request_timeout = kwargs.get('request_timeout', "PT5S") + self.max_concurrent_requests_per_instance = kwargs.get("max_concurrent_requests_per_instance", 1) + self.max_queue_wait = kwargs.get("max_queue_wait", "PT0.5S") + self.request_timeout = kwargs.get("request_timeout", "PT5S") -class OpenAIEndpointDeploymentResourceProperties(EndpointDeploymentResourceProperties, - CognitiveServiceEndpointDeploymentResourceProperties): +class OpenAIEndpointDeploymentResourceProperties( + EndpointDeploymentResourceProperties, CognitiveServiceEndpointDeploymentResourceProperties +): """OpenAIEndpointDeploymentResourceProperties. Variables are only populated by the server, and will be ignored when sending a request. @@ -25479,25 +24101,22 @@ class OpenAIEndpointDeploymentResourceProperties(EndpointDeploymentResourcePrope """ _validation = { - 'model': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'type': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9._]'}, + "model": {"required": True}, + "provisioning_state": {"readonly": True}, + "type": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9._]"}, } _attribute_map = { - 'model': {'key': 'model', 'type': 'EndpointDeploymentModel'}, - 'rai_policy_name': {'key': 'raiPolicyName', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'CognitiveServicesSku'}, - 'version_upgrade_option': {'key': 'versionUpgradeOption', 'type': 'str'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "model": {"key": "model", "type": "EndpointDeploymentModel"}, + "rai_policy_name": {"key": "raiPolicyName", "type": "str"}, + "sku": {"key": "sku", "type": "CognitiveServicesSku"}, + "version_upgrade_option": {"key": "versionUpgradeOption", "type": "str"}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model: Required. Model used for the endpoint deployment. :paramtype model: ~azure.mgmt.machinelearningservices.models.EndpointDeploymentModel @@ -25513,12 +24132,12 @@ def __init__( :paramtype failure_reason: str """ super(OpenAIEndpointDeploymentResourceProperties, self).__init__(**kwargs) - self.model = kwargs['model'] - self.rai_policy_name = kwargs.get('rai_policy_name', None) - self.sku = kwargs.get('sku', None) - self.version_upgrade_option = kwargs.get('version_upgrade_option', None) - self.type = 'Azure.OpenAI' # type: str - self.failure_reason = kwargs.get('failure_reason', None) + self.model = kwargs["model"] + self.rai_policy_name = kwargs.get("rai_policy_name", None) + self.sku = kwargs.get("sku", None) + self.version_upgrade_option = kwargs.get("version_upgrade_option", None) + self.type = "Azure.OpenAI" # type: str + self.failure_reason = kwargs.get("failure_reason", None) self.provisioning_state = None @@ -25549,23 +24168,20 @@ class OpenAIEndpointResourceProperties(EndpointResourceProperties): """ _validation = { - 'endpoint_type': {'required': True}, - 'provisioning_state': {'readonly': True}, + "endpoint_type": {"required": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'associated_resource_id': {'key': 'associatedResourceId', 'type': 'str'}, - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "associated_resource_id": {"key": "associatedResourceId", "type": "str"}, + "endpoint_type": {"key": "endpointType", "type": "str"}, + "endpoint_uri": {"key": "endpointUri", "type": "str"}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword associated_resource_id: Byo resource id for creating the built-in model service endpoints. @@ -25578,7 +24194,7 @@ def __init__( :paramtype name: str """ super(OpenAIEndpointResourceProperties, self).__init__(**kwargs) - self.endpoint_type = 'Azure.OpenAI' # type: str + self.endpoint_type = "Azure.OpenAI" # type: str class Operation(msrest.serialization.Model): @@ -25604,24 +24220,21 @@ class Operation(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'is_data_action': {'readonly': True}, - 'origin': {'readonly': True}, - 'action_type': {'readonly': True}, + "name": {"readonly": True}, + "is_data_action": {"readonly": True}, + "origin": {"readonly": True}, + "action_type": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, + "display": {"key": "display", "type": "OperationDisplay"}, + "origin": {"key": "origin", "type": "str"}, + "action_type": {"key": "actionType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword display: Localized display information for this particular operation. :paramtype display: ~azure.mgmt.machinelearningservices.models.OperationDisplay @@ -25629,7 +24242,7 @@ def __init__( super(Operation, self).__init__(**kwargs) self.name = None self.is_data_action = None - self.display = kwargs.get('display', None) + self.display = kwargs.get("display", None) self.origin = None self.action_type = None @@ -25654,25 +24267,21 @@ class OperationDisplay(msrest.serialization.Model): """ _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, + "provider": {"readonly": True}, + "resource": {"readonly": True}, + "operation": {"readonly": True}, + "description": {"readonly": True}, } _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None @@ -25692,21 +24301,17 @@ class OperationListResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, + "value": {"readonly": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[Operation]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(OperationListResult, self).__init__(**kwargs) self.value = None self.next_link = None @@ -25728,16 +24333,13 @@ class OsPatchingStatus(msrest.serialization.Model): """ _attribute_map = { - 'patch_status': {'key': 'patchStatus', 'type': 'str'}, - 'latest_patch_time': {'key': 'latestPatchTime', 'type': 'str'}, - 'reboot_pending': {'key': 'rebootPending', 'type': 'bool'}, - 'scheduled_reboot_time': {'key': 'scheduledRebootTime', 'type': 'str'}, + "patch_status": {"key": "patchStatus", "type": "str"}, + "latest_patch_time": {"key": "latestPatchTime", "type": "str"}, + "reboot_pending": {"key": "rebootPending", "type": "bool"}, + "scheduled_reboot_time": {"key": "scheduledRebootTime", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword patch_status: The os patching status. Possible values include: "CompletedWithWarnings", "Failed", "InProgress", "Succeeded", "Unknown". @@ -25751,10 +24353,10 @@ def __init__( :paramtype scheduled_reboot_time: str """ super(OsPatchingStatus, self).__init__(**kwargs) - self.patch_status = kwargs.get('patch_status', None) - self.latest_patch_time = kwargs.get('latest_patch_time', None) - self.reboot_pending = kwargs.get('reboot_pending', None) - self.scheduled_reboot_time = kwargs.get('scheduled_reboot_time', None) + self.patch_status = kwargs.get("patch_status", None) + self.latest_patch_time = kwargs.get("latest_patch_time", None) + self.reboot_pending = kwargs.get("reboot_pending", None) + self.scheduled_reboot_time = kwargs.get("scheduled_reboot_time", None) class OutboundRuleBasicResource(Resource): @@ -25781,32 +24383,29 @@ class OutboundRuleBasicResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'OutboundRule'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "OutboundRule"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. Outbound Rule for the managed network of a machine learning workspace. :paramtype properties: ~azure.mgmt.machinelearningservices.models.OutboundRule """ super(OutboundRuleBasicResource, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class OutboundRuleListResult(msrest.serialization.Model): @@ -25821,14 +24420,11 @@ class OutboundRuleListResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[OutboundRuleBasicResource]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[OutboundRuleBasicResource]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page constructed using the continuationToken. If null, there are no additional pages. @@ -25838,8 +24434,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.OutboundRuleBasicResource] """ super(OutboundRuleListResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class OutputPathAssetReference(AssetReferenceBase): @@ -25857,19 +24453,16 @@ class OutputPathAssetReference(AssetReferenceBase): """ _validation = { - 'reference_type': {'required': True}, + "reference_type": {"required": True}, } _attribute_map = { - 'reference_type': {'key': 'referenceType', 'type': 'str'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'path': {'key': 'path', 'type': 'str'}, + "reference_type": {"key": "referenceType", "type": "str"}, + "job_id": {"key": "jobId", "type": "str"}, + "path": {"key": "path", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword job_id: ARM resource ID of the job. :paramtype job_id: str @@ -25877,9 +24470,9 @@ def __init__( :paramtype path: str """ super(OutputPathAssetReference, self).__init__(**kwargs) - self.reference_type = 'OutputPath' # type: str - self.job_id = kwargs.get('job_id', None) - self.path = kwargs.get('path', None) + self.reference_type = "OutputPath" # type: str + self.job_id = kwargs.get("job_id", None) + self.path = kwargs.get("path", None) class PackageInputPathBase(msrest.serialization.Model): @@ -25896,24 +24489,23 @@ class PackageInputPathBase(msrest.serialization.Model): """ _validation = { - 'input_path_type': {'required': True}, + "input_path_type": {"required": True}, } _attribute_map = { - 'input_path_type': {'key': 'inputPathType', 'type': 'str'}, + "input_path_type": {"key": "inputPathType", "type": "str"}, } _subtype_map = { - 'input_path_type': {'PathId': 'PackageInputPathId', 'PathVersion': 'PackageInputPathVersion', - 'Url': 'PackageInputPathUrl'} + "input_path_type": { + "PathId": "PackageInputPathId", + "PathVersion": "PackageInputPathVersion", + "Url": "PackageInputPathUrl", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(PackageInputPathBase, self).__init__(**kwargs) self.input_path_type = None # type: Optional[str] @@ -25931,25 +24523,22 @@ class PackageInputPathId(PackageInputPathBase): """ _validation = { - 'input_path_type': {'required': True}, + "input_path_type": {"required": True}, } _attribute_map = { - 'input_path_type': {'key': 'inputPathType', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, + "input_path_type": {"key": "inputPathType", "type": "str"}, + "resource_id": {"key": "resourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_id: Input resource id. :paramtype resource_id: str """ super(PackageInputPathId, self).__init__(**kwargs) - self.input_path_type = 'PathId' # type: str - self.resource_id = kwargs.get('resource_id', None) + self.input_path_type = "PathId" # type: str + self.resource_id = kwargs.get("resource_id", None) class PackageInputPathUrl(PackageInputPathBase): @@ -25965,25 +24554,22 @@ class PackageInputPathUrl(PackageInputPathBase): """ _validation = { - 'input_path_type': {'required': True}, + "input_path_type": {"required": True}, } _attribute_map = { - 'input_path_type': {'key': 'inputPathType', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, + "input_path_type": {"key": "inputPathType", "type": "str"}, + "url": {"key": "url", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword url: Input path url. :paramtype url: str """ super(PackageInputPathUrl, self).__init__(**kwargs) - self.input_path_type = 'Url' # type: str - self.url = kwargs.get('url', None) + self.input_path_type = "Url" # type: str + self.url = kwargs.get("url", None) class PackageInputPathVersion(PackageInputPathBase): @@ -26001,19 +24587,16 @@ class PackageInputPathVersion(PackageInputPathBase): """ _validation = { - 'input_path_type': {'required': True}, + "input_path_type": {"required": True}, } _attribute_map = { - 'input_path_type': {'key': 'inputPathType', 'type': 'str'}, - 'resource_name': {'key': 'resourceName', 'type': 'str'}, - 'resource_version': {'key': 'resourceVersion', 'type': 'str'}, + "input_path_type": {"key": "inputPathType", "type": "str"}, + "resource_name": {"key": "resourceName", "type": "str"}, + "resource_version": {"key": "resourceVersion", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword resource_name: Input resource name. :paramtype resource_name: str @@ -26021,9 +24604,9 @@ def __init__( :paramtype resource_version: str """ super(PackageInputPathVersion, self).__init__(**kwargs) - self.input_path_type = 'PathVersion' # type: str - self.resource_name = kwargs.get('resource_name', None) - self.resource_version = kwargs.get('resource_version', None) + self.input_path_type = "PathVersion" # type: str + self.resource_name = kwargs.get("resource_name", None) + self.resource_version = kwargs.get("resource_version", None) class PackageRequest(msrest.serialization.Model): @@ -26052,25 +24635,22 @@ class PackageRequest(msrest.serialization.Model): """ _validation = { - 'inferencing_server': {'required': True}, - 'target_environment_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "inferencing_server": {"required": True}, + "target_environment_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'base_environment_source': {'key': 'baseEnvironmentSource', 'type': 'BaseEnvironmentSource'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'inferencing_server': {'key': 'inferencingServer', 'type': 'InferencingServer'}, - 'inputs': {'key': 'inputs', 'type': '[ModelPackageInput]'}, - 'model_configuration': {'key': 'modelConfiguration', 'type': 'ModelConfiguration'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_environment_id': {'key': 'targetEnvironmentId', 'type': 'str'}, + "base_environment_source": {"key": "baseEnvironmentSource", "type": "BaseEnvironmentSource"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "inferencing_server": {"key": "inferencingServer", "type": "InferencingServer"}, + "inputs": {"key": "inputs", "type": "[ModelPackageInput]"}, + "model_configuration": {"key": "modelConfiguration", "type": "ModelConfiguration"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "target_environment_id": {"key": "targetEnvironmentId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword base_environment_source: Base environment to start with. :paramtype base_environment_source: @@ -26092,14 +24672,14 @@ def __init__( :paramtype target_environment_id: str """ super(PackageRequest, self).__init__(**kwargs) - self.base_environment_source = kwargs.get('base_environment_source', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.inferencing_server = kwargs['inferencing_server'] - self.inputs = kwargs.get('inputs', None) - self.model_configuration = kwargs.get('model_configuration', None) - self.properties = kwargs.get('properties', None) - self.tags = kwargs.get('tags', None) - self.target_environment_id = kwargs['target_environment_id'] + self.base_environment_source = kwargs.get("base_environment_source", None) + self.environment_variables = kwargs.get("environment_variables", None) + self.inferencing_server = kwargs["inferencing_server"] + self.inputs = kwargs.get("inputs", None) + self.model_configuration = kwargs.get("model_configuration", None) + self.properties = kwargs.get("properties", None) + self.tags = kwargs.get("tags", None) + self.target_environment_id = kwargs["target_environment_id"] class PackageResponse(msrest.serialization.Model): @@ -26134,39 +24714,35 @@ class PackageResponse(msrest.serialization.Model): """ _validation = { - 'base_environment_source': {'readonly': True}, - 'build_id': {'readonly': True}, - 'build_state': {'readonly': True}, - 'environment_variables': {'readonly': True}, - 'inferencing_server': {'readonly': True}, - 'inputs': {'readonly': True}, - 'log_url': {'readonly': True}, - 'model_configuration': {'readonly': True}, - 'properties': {'readonly': True}, - 'tags': {'readonly': True}, - 'target_environment_id': {'readonly': True}, + "base_environment_source": {"readonly": True}, + "build_id": {"readonly": True}, + "build_state": {"readonly": True}, + "environment_variables": {"readonly": True}, + "inferencing_server": {"readonly": True}, + "inputs": {"readonly": True}, + "log_url": {"readonly": True}, + "model_configuration": {"readonly": True}, + "properties": {"readonly": True}, + "tags": {"readonly": True}, + "target_environment_id": {"readonly": True}, } _attribute_map = { - 'base_environment_source': {'key': 'baseEnvironmentSource', 'type': 'BaseEnvironmentSource'}, - 'build_id': {'key': 'buildId', 'type': 'str'}, - 'build_state': {'key': 'buildState', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'inferencing_server': {'key': 'inferencingServer', 'type': 'InferencingServer'}, - 'inputs': {'key': 'inputs', 'type': '[ModelPackageInput]'}, - 'log_url': {'key': 'logUrl', 'type': 'str'}, - 'model_configuration': {'key': 'modelConfiguration', 'type': 'ModelConfiguration'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'target_environment_id': {'key': 'targetEnvironmentId', 'type': 'str'}, + "base_environment_source": {"key": "baseEnvironmentSource", "type": "BaseEnvironmentSource"}, + "build_id": {"key": "buildId", "type": "str"}, + "build_state": {"key": "buildState", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "inferencing_server": {"key": "inferencingServer", "type": "InferencingServer"}, + "inputs": {"key": "inputs", "type": "[ModelPackageInput]"}, + "log_url": {"key": "logUrl", "type": "str"}, + "model_configuration": {"key": "modelConfiguration", "type": "ModelConfiguration"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "target_environment_id": {"key": "targetEnvironmentId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(PackageResponse, self).__init__(**kwargs) self.base_environment_source = None self.build_id = None @@ -26191,14 +24767,11 @@ class PaginatedComputeResourcesList(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[ComputeResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[ComputeResource]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: An array of Machine Learning compute objects wrapped in ARM resource envelope. :paramtype value: list[~azure.mgmt.machinelearningservices.models.ComputeResource] @@ -26206,8 +24779,8 @@ def __init__( :paramtype next_link: str """ super(PaginatedComputeResourcesList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get("value", None) + self.next_link = kwargs.get("next_link", None) class PartialBatchDeployment(msrest.serialization.Model): @@ -26218,19 +24791,16 @@ class PartialBatchDeployment(msrest.serialization.Model): """ _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: Description of the endpoint deployment. :paramtype description: str """ super(PartialBatchDeployment, self).__init__(**kwargs) - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) class PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties(msrest.serialization.Model): @@ -26243,14 +24813,11 @@ class PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties(msrest.s """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'PartialBatchDeployment'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "properties": {"key": "properties", "type": "PartialBatchDeployment"}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.PartialBatchDeployment @@ -26258,8 +24825,8 @@ def __init__( :paramtype tags: dict[str, str] """ super(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.tags = kwargs.get('tags', None) + self.properties = kwargs.get("properties", None) + self.tags = kwargs.get("tags", None) class PartialJobBase(msrest.serialization.Model): @@ -26271,20 +24838,17 @@ class PartialJobBase(msrest.serialization.Model): """ _attribute_map = { - 'notification_setting': {'key': 'notificationSetting', 'type': 'PartialNotificationSetting'}, + "notification_setting": {"key": "notificationSetting", "type": "PartialNotificationSetting"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_setting: Mutable notification setting for the job. :paramtype notification_setting: ~azure.mgmt.machinelearningservices.models.PartialNotificationSetting """ super(PartialJobBase, self).__init__(**kwargs) - self.notification_setting = kwargs.get('notification_setting', None) + self.notification_setting = kwargs.get("notification_setting", None) class PartialJobBasePartialResource(msrest.serialization.Model): @@ -26295,19 +24859,16 @@ class PartialJobBasePartialResource(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'PartialJobBase'}, + "properties": {"key": "properties", "type": "PartialJobBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.PartialJobBase """ super(PartialJobBasePartialResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class PartialManagedServiceIdentity(msrest.serialization.Model): @@ -26325,14 +24886,11 @@ class PartialManagedServiceIdentity(msrest.serialization.Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{object}'}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{object}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword type: Managed service identity (system assigned and/or user assigned identities). Possible values include: "None", "SystemAssigned", "UserAssigned", @@ -26345,8 +24903,8 @@ def __init__( :paramtype user_assigned_identities: dict[str, any] """ super(PartialManagedServiceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + self.type = kwargs.get("type", None) + self.user_assigned_identities = kwargs.get("user_assigned_identities", None) class PartialMinimalTrackedResource(msrest.serialization.Model): @@ -26357,19 +24915,16 @@ class PartialMinimalTrackedResource(msrest.serialization.Model): """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] """ super(PartialMinimalTrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) + self.tags = kwargs.get("tags", None) class PartialMinimalTrackedResourceWithIdentity(PartialMinimalTrackedResource): @@ -26382,14 +24937,11 @@ class PartialMinimalTrackedResourceWithIdentity(PartialMinimalTrackedResource): """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "PartialManagedServiceIdentity"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -26397,7 +24949,7 @@ def __init__( :paramtype identity: ~azure.mgmt.machinelearningservices.models.PartialManagedServiceIdentity """ super(PartialMinimalTrackedResourceWithIdentity, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) + self.identity = kwargs.get("identity", None) class PartialMinimalTrackedResourceWithSku(PartialMinimalTrackedResource): @@ -26410,14 +24962,11 @@ class PartialMinimalTrackedResourceWithSku(PartialMinimalTrackedResource): """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'PartialSku'}, + "tags": {"key": "tags", "type": "{str}"}, + "sku": {"key": "sku", "type": "PartialSku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -26425,7 +24974,7 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku """ super(PartialMinimalTrackedResourceWithSku, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) + self.sku = kwargs.get("sku", None) class PartialMinimalTrackedResourceWithSkuAndIdentity(PartialMinimalTrackedResource): @@ -26440,15 +24989,12 @@ class PartialMinimalTrackedResourceWithSkuAndIdentity(PartialMinimalTrackedResou """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'PartialManagedServiceIdentity'}, - 'sku': {'key': 'sku', 'type': 'PartialSku'}, + "tags": {"key": "tags", "type": "{str}"}, + "identity": {"key": "identity", "type": "PartialManagedServiceIdentity"}, + "sku": {"key": "sku", "type": "PartialSku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -26458,8 +25004,8 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.PartialSku """ super(PartialMinimalTrackedResourceWithSkuAndIdentity, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.sku = kwargs.get("sku", None) class PartialNotificationSetting(msrest.serialization.Model): @@ -26471,20 +25017,17 @@ class PartialNotificationSetting(msrest.serialization.Model): """ _attribute_map = { - 'webhooks': {'key': 'webhooks', 'type': '{Webhook}'}, + "webhooks": {"key": "webhooks", "type": "{Webhook}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword webhooks: Send webhook callback to a service. Key is a user-provided name for the webhook. :paramtype webhooks: dict[str, ~azure.mgmt.machinelearningservices.models.Webhook] """ super(PartialNotificationSetting, self).__init__(**kwargs) - self.webhooks = kwargs.get('webhooks', None) + self.webhooks = kwargs.get("webhooks", None) class PartialRegistryPartialTrackedResource(msrest.serialization.Model): @@ -26500,15 +25043,12 @@ class PartialRegistryPartialTrackedResource(msrest.serialization.Model): """ _attribute_map = { - 'identity': {'key': 'identity', 'type': 'RegistryPartialManagedServiceIdentity'}, - 'sku': {'key': 'sku', 'type': 'PartialSku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + "identity": {"key": "identity", "type": "RegistryPartialManagedServiceIdentity"}, + "sku": {"key": "sku", "type": "PartialSku"}, + "tags": {"key": "tags", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword identity: Managed service identity (system assigned and/or user assigned identities). :paramtype identity: @@ -26519,9 +25059,9 @@ def __init__( :paramtype tags: dict[str, str] """ super(PartialRegistryPartialTrackedResource, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.tags = kwargs.get('tags', None) + self.identity = kwargs.get("identity", None) + self.sku = kwargs.get("sku", None) + self.tags = kwargs.get("tags", None) class PartialSku(msrest.serialization.Model): @@ -26545,17 +25085,14 @@ class PartialSku(msrest.serialization.Model): """ _attribute_map = { - 'capacity': {'key': 'capacity', 'type': 'int'}, - 'family': {'key': 'family', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, + "capacity": {"key": "capacity", "type": "int"}, + "family": {"key": "family", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "size": {"key": "size", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword capacity: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. @@ -26574,11 +25111,11 @@ def __init__( :paramtype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier """ super(PartialSku, self).__init__(**kwargs) - self.capacity = kwargs.get('capacity', None) - self.family = kwargs.get('family', None) - self.name = kwargs.get('name', None) - self.size = kwargs.get('size', None) - self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get("capacity", None) + self.family = kwargs.get("family", None) + self.name = kwargs.get("name", None) + self.size = kwargs.get("size", None) + self.tier = kwargs.get("tier", None) class Password(msrest.serialization.Model): @@ -26593,21 +25130,17 @@ class Password(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, + "name": {"readonly": True}, + "value": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "value": {"key": "value", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(Password, self).__init__(**kwargs) self.name = None self.value = None @@ -26663,28 +25196,25 @@ class PATAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionPersonalAccessToken'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionPersonalAccessToken"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -26719,8 +25249,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPersonalAccessToken """ super(PATAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'PAT' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "PAT" # type: str + self.credentials = kwargs.get("credentials", None) class PendingUploadCredentialDto(msrest.serialization.Model): @@ -26738,23 +25268,17 @@ class PendingUploadCredentialDto(msrest.serialization.Model): """ _validation = { - 'credential_type': {'required': True}, + "credential_type": {"required": True}, } _attribute_map = { - 'credential_type': {'key': 'credentialType', 'type': 'str'}, + "credential_type": {"key": "credentialType", "type": "str"}, } - _subtype_map = { - 'credential_type': {'SAS': 'SASCredentialDto'} - } + _subtype_map = {"credential_type": {"SAS": "SASCredentialDto"}} - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(PendingUploadCredentialDto, self).__init__(**kwargs) self.credential_type = None # type: Optional[str] @@ -26771,14 +25295,11 @@ class PendingUploadRequestDto(msrest.serialization.Model): """ _attribute_map = { - 'pending_upload_id': {'key': 'pendingUploadId', 'type': 'str'}, - 'pending_upload_type': {'key': 'pendingUploadType', 'type': 'str'}, + "pending_upload_id": {"key": "pendingUploadId", "type": "str"}, + "pending_upload_type": {"key": "pendingUploadType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword pending_upload_id: If PendingUploadId = null then random guid will be used. :paramtype pending_upload_id: str @@ -26788,8 +25309,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.PendingUploadType """ super(PendingUploadRequestDto, self).__init__(**kwargs) - self.pending_upload_id = kwargs.get('pending_upload_id', None) - self.pending_upload_type = kwargs.get('pending_upload_type', None) + self.pending_upload_id = kwargs.get("pending_upload_id", None) + self.pending_upload_type = kwargs.get("pending_upload_type", None) class PendingUploadResponseDto(msrest.serialization.Model): @@ -26807,16 +25328,15 @@ class PendingUploadResponseDto(msrest.serialization.Model): """ _attribute_map = { - 'blob_reference_for_consumption': {'key': 'blobReferenceForConsumption', - 'type': 'BlobReferenceForConsumptionDto'}, - 'pending_upload_id': {'key': 'pendingUploadId', 'type': 'str'}, - 'pending_upload_type': {'key': 'pendingUploadType', 'type': 'str'}, + "blob_reference_for_consumption": { + "key": "blobReferenceForConsumption", + "type": "BlobReferenceForConsumptionDto", + }, + "pending_upload_id": {"key": "pendingUploadId", "type": "str"}, + "pending_upload_type": {"key": "pendingUploadType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword blob_reference_for_consumption: Container level read, write, list SAS. :paramtype blob_reference_for_consumption: @@ -26829,9 +25349,9 @@ def __init__( ~azure.mgmt.machinelearningservices.models.PendingUploadType """ super(PendingUploadResponseDto, self).__init__(**kwargs) - self.blob_reference_for_consumption = kwargs.get('blob_reference_for_consumption', None) - self.pending_upload_id = kwargs.get('pending_upload_id', None) - self.pending_upload_type = kwargs.get('pending_upload_type', None) + self.blob_reference_for_consumption = kwargs.get("blob_reference_for_consumption", None) + self.pending_upload_id = kwargs.get("pending_upload_id", None) + self.pending_upload_type = kwargs.get("pending_upload_type", None) class PersonalComputeInstanceSettings(msrest.serialization.Model): @@ -26842,19 +25362,16 @@ class PersonalComputeInstanceSettings(msrest.serialization.Model): """ _attribute_map = { - 'assigned_user': {'key': 'assignedUser', 'type': 'AssignedUser'}, + "assigned_user": {"key": "assignedUser", "type": "AssignedUser"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword assigned_user: A user explicitly assigned to a personal compute instance. :paramtype assigned_user: ~azure.mgmt.machinelearningservices.models.AssignedUser """ super(PersonalComputeInstanceSettings, self).__init__(**kwargs) - self.assigned_user = kwargs.get('assigned_user', None) + self.assigned_user = kwargs.get("assigned_user", None) class PipelineJob(JobBaseProperties): @@ -26914,36 +25431,33 @@ class PipelineJob(JobBaseProperties): """ _validation = { - 'job_type': {'required': True}, - 'status': {'readonly': True}, + "job_type": {"required": True}, + "status": {"readonly": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'compute_id': {'key': 'computeId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'experiment_name': {'key': 'experimentName', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'notification_setting': {'key': 'notificationSetting', 'type': 'NotificationSetting'}, - 'secrets_configuration': {'key': 'secretsConfiguration', 'type': '{SecretConfiguration}'}, - 'services': {'key': 'services', 'type': '{JobService}'}, - 'status': {'key': 'status', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, - 'jobs': {'key': 'jobs', 'type': '{object}'}, - 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, - 'settings': {'key': 'settings', 'type': 'object'}, - 'source_job_id': {'key': 'sourceJobId', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "component_id": {"key": "componentId", "type": "str"}, + "compute_id": {"key": "computeId", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "experiment_name": {"key": "experimentName", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityConfiguration"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "job_type": {"key": "jobType", "type": "str"}, + "notification_setting": {"key": "notificationSetting", "type": "NotificationSetting"}, + "secrets_configuration": {"key": "secretsConfiguration", "type": "{SecretConfiguration}"}, + "services": {"key": "services", "type": "{JobService}"}, + "status": {"key": "status", "type": "str"}, + "inputs": {"key": "inputs", "type": "{JobInput}"}, + "jobs": {"key": "jobs", "type": "{object}"}, + "outputs": {"key": "outputs", "type": "{JobOutput}"}, + "settings": {"key": "settings", "type": "object"}, + "source_job_id": {"key": "sourceJobId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -26986,12 +25500,12 @@ def __init__( :paramtype source_job_id: str """ super(PipelineJob, self).__init__(**kwargs) - self.job_type = 'Pipeline' # type: str - self.inputs = kwargs.get('inputs', None) - self.jobs = kwargs.get('jobs', None) - self.outputs = kwargs.get('outputs', None) - self.settings = kwargs.get('settings', None) - self.source_job_id = kwargs.get('source_job_id', None) + self.job_type = "Pipeline" # type: str + self.inputs = kwargs.get("inputs", None) + self.jobs = kwargs.get("jobs", None) + self.outputs = kwargs.get("outputs", None) + self.settings = kwargs.get("settings", None) + self.source_job_id = kwargs.get("source_job_id", None) class PoolEnvironmentConfiguration(msrest.serialization.Model): @@ -27013,17 +25527,14 @@ class PoolEnvironmentConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'liveness_probe': {'key': 'livenessProbe', 'type': 'ProbeSettings'}, - 'readiness_probe': {'key': 'readinessProbe', 'type': 'ProbeSettings'}, - 'startup_probe': {'key': 'startupProbe', 'type': 'ProbeSettings'}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "liveness_probe": {"key": "livenessProbe", "type": "ProbeSettings"}, + "readiness_probe": {"key": "readinessProbe", "type": "ProbeSettings"}, + "startup_probe": {"key": "startupProbe", "type": "ProbeSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword environment_id: ARM resource ID of the environment specification for the inference pool. @@ -27041,11 +25552,11 @@ def __init__( :paramtype startup_probe: ~azure.mgmt.machinelearningservices.models.ProbeSettings """ super(PoolEnvironmentConfiguration, self).__init__(**kwargs) - self.environment_id = kwargs.get('environment_id', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.liveness_probe = kwargs.get('liveness_probe', None) - self.readiness_probe = kwargs.get('readiness_probe', None) - self.startup_probe = kwargs.get('startup_probe', None) + self.environment_id = kwargs.get("environment_id", None) + self.environment_variables = kwargs.get("environment_variables", None) + self.liveness_probe = kwargs.get("liveness_probe", None) + self.readiness_probe = kwargs.get("readiness_probe", None) + self.startup_probe = kwargs.get("startup_probe", None) class PoolModelConfiguration(msrest.serialization.Model): @@ -27056,19 +25567,16 @@ class PoolModelConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'model_id': {'key': 'modelId', 'type': 'str'}, + "model_id": {"key": "modelId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model_id: The URI path to the model. :paramtype model_id: str """ super(PoolModelConfiguration, self).__init__(**kwargs) - self.model_id = kwargs.get('model_id', None) + self.model_id = kwargs.get("model_id", None) class PoolStatus(msrest.serialization.Model): @@ -27086,16 +25594,13 @@ class PoolStatus(msrest.serialization.Model): """ _attribute_map = { - 'actual_capacity': {'key': 'actualCapacity', 'type': 'int'}, - 'group_count': {'key': 'groupCount', 'type': 'int'}, - 'requested_capacity': {'key': 'requestedCapacity', 'type': 'int'}, - 'reserved_capacity': {'key': 'reservedCapacity', 'type': 'int'}, + "actual_capacity": {"key": "actualCapacity", "type": "int"}, + "group_count": {"key": "groupCount", "type": "int"}, + "requested_capacity": {"key": "requestedCapacity", "type": "int"}, + "reserved_capacity": {"key": "reservedCapacity", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword actual_capacity: Gets or sets the actual number of instances in the pool. :paramtype actual_capacity: int @@ -27108,10 +25613,10 @@ def __init__( :paramtype reserved_capacity: int """ super(PoolStatus, self).__init__(**kwargs) - self.actual_capacity = kwargs.get('actual_capacity', 0) - self.group_count = kwargs.get('group_count', 0) - self.requested_capacity = kwargs.get('requested_capacity', 0) - self.reserved_capacity = kwargs.get('reserved_capacity', 0) + self.actual_capacity = kwargs.get("actual_capacity", 0) + self.group_count = kwargs.get("group_count", 0) + self.requested_capacity = kwargs.get("requested_capacity", 0) + self.reserved_capacity = kwargs.get("reserved_capacity", 0) class PredictionDriftMonitoringSignal(MonitoringSignalBase): @@ -27144,26 +25649,23 @@ class PredictionDriftMonitoringSignal(MonitoringSignalBase): """ _validation = { - 'signal_type': {'required': True}, - 'metric_thresholds': {'required': True}, - 'production_data': {'required': True}, - 'reference_data': {'required': True}, + "signal_type": {"required": True}, + "metric_thresholds": {"required": True}, + "production_data": {"required": True}, + "reference_data": {"required": True}, } _attribute_map = { - 'notification_types': {'key': 'notificationTypes', 'type': '[str]'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'signal_type': {'key': 'signalType', 'type': 'str'}, - 'feature_data_type_override': {'key': 'featureDataTypeOverride', 'type': '{str}'}, - 'metric_thresholds': {'key': 'metricThresholds', 'type': '[PredictionDriftMetricThresholdBase]'}, - 'production_data': {'key': 'productionData', 'type': 'MonitoringInputDataBase'}, - 'reference_data': {'key': 'referenceData', 'type': 'MonitoringInputDataBase'}, + "notification_types": {"key": "notificationTypes", "type": "[str]"}, + "properties": {"key": "properties", "type": "{str}"}, + "signal_type": {"key": "signalType", "type": "str"}, + "feature_data_type_override": {"key": "featureDataTypeOverride", "type": "{str}"}, + "metric_thresholds": {"key": "metricThresholds", "type": "[PredictionDriftMetricThresholdBase]"}, + "production_data": {"key": "productionData", "type": "MonitoringInputDataBase"}, + "reference_data": {"key": "referenceData", "type": "MonitoringInputDataBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword notification_types: The current notification mode for this signal. :paramtype notification_types: list[str or @@ -27184,11 +25686,11 @@ def __init__( :paramtype reference_data: ~azure.mgmt.machinelearningservices.models.MonitoringInputDataBase """ super(PredictionDriftMonitoringSignal, self).__init__(**kwargs) - self.signal_type = 'PredictionDrift' # type: str - self.feature_data_type_override = kwargs.get('feature_data_type_override', None) - self.metric_thresholds = kwargs['metric_thresholds'] - self.production_data = kwargs['production_data'] - self.reference_data = kwargs['reference_data'] + self.signal_type = "PredictionDrift" # type: str + self.feature_data_type_override = kwargs.get("feature_data_type_override", None) + self.metric_thresholds = kwargs["metric_thresholds"] + self.production_data = kwargs["production_data"] + self.reference_data = kwargs["reference_data"] class PrivateEndpoint(msrest.serialization.Model): @@ -27201,19 +25703,15 @@ class PrivateEndpoint(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, + "id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(PrivateEndpoint, self).__init__(**kwargs) self.id = None @@ -27256,31 +25754,30 @@ class PrivateEndpointConnection(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'WorkspacePrivateEndpointResource'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', - 'type': 'PrivateLinkServiceConnectionState'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "location": {"key": "location", "type": "str"}, + "sku": {"key": "sku", "type": "Sku"}, + "tags": {"key": "tags", "type": "{str}"}, + "private_endpoint": {"key": "properties.privateEndpoint", "type": "WorkspacePrivateEndpointResource"}, + "private_link_service_connection_state": { + "key": "properties.privateLinkServiceConnectionState", + "type": "PrivateLinkServiceConnectionState", + }, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword identity: Managed service identity (system assigned and/or user assigned identities). :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity @@ -27303,13 +25800,13 @@ def __init__( ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionProvisioningState """ super(PrivateEndpointConnection, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.location = kwargs.get('location', None) - self.sku = kwargs.get('sku', None) - self.tags = kwargs.get('tags', None) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = kwargs.get('provisioning_state', None) + self.identity = kwargs.get("identity", None) + self.location = kwargs.get("location", None) + self.sku = kwargs.get("sku", None) + self.tags = kwargs.get("tags", None) + self.private_endpoint = kwargs.get("private_endpoint", None) + self.private_link_service_connection_state = kwargs.get("private_link_service_connection_state", None) + self.provisioning_state = kwargs.get("provisioning_state", None) class PrivateEndpointConnectionListResult(msrest.serialization.Model): @@ -27320,19 +25817,16 @@ class PrivateEndpointConnectionListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: Array of private endpoint connections. :paramtype value: list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] """ super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class PrivateEndpointDestination(msrest.serialization.Model): @@ -27350,16 +25844,13 @@ class PrivateEndpointDestination(msrest.serialization.Model): """ _attribute_map = { - 'service_resource_id': {'key': 'serviceResourceId', 'type': 'str'}, - 'spark_enabled': {'key': 'sparkEnabled', 'type': 'bool'}, - 'spark_status': {'key': 'sparkStatus', 'type': 'str'}, - 'subresource_target': {'key': 'subresourceTarget', 'type': 'str'}, + "service_resource_id": {"key": "serviceResourceId", "type": "str"}, + "spark_enabled": {"key": "sparkEnabled", "type": "bool"}, + "spark_status": {"key": "sparkStatus", "type": "str"}, + "subresource_target": {"key": "subresourceTarget", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword service_resource_id: :paramtype service_resource_id: str @@ -27372,10 +25863,10 @@ def __init__( :paramtype subresource_target: str """ super(PrivateEndpointDestination, self).__init__(**kwargs) - self.service_resource_id = kwargs.get('service_resource_id', None) - self.spark_enabled = kwargs.get('spark_enabled', None) - self.spark_status = kwargs.get('spark_status', None) - self.subresource_target = kwargs.get('subresource_target', None) + self.service_resource_id = kwargs.get("service_resource_id", None) + self.spark_enabled = kwargs.get("spark_enabled", None) + self.spark_status = kwargs.get("spark_status", None) + self.subresource_target = kwargs.get("subresource_target", None) class PrivateEndpointOutboundRule(OutboundRule): @@ -27399,20 +25890,17 @@ class PrivateEndpointOutboundRule(OutboundRule): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'destination': {'key': 'destination', 'type': 'PrivateEndpointDestination'}, + "category": {"key": "category", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "destination": {"key": "destination", "type": "PrivateEndpointDestination"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of a managed network Outbound Rule of a machine learning workspace. Possible values include: "Required", "Recommended", "UserDefined". @@ -27425,8 +25913,8 @@ def __init__( :paramtype destination: ~azure.mgmt.machinelearningservices.models.PrivateEndpointDestination """ super(PrivateEndpointOutboundRule, self).__init__(**kwargs) - self.type = 'PrivateEndpoint' # type: str - self.destination = kwargs.get('destination', None) + self.type = "PrivateEndpoint" # type: str + self.destination = kwargs.get("destination", None) class PrivateEndpointResource(PrivateEndpoint): @@ -27441,24 +25929,21 @@ class PrivateEndpointResource(PrivateEndpoint): """ _validation = { - 'id': {'readonly': True}, + "id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "subnet_arm_id": {"key": "subnetArmId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword subnet_arm_id: The subnetId that the private endpoint is connected to. :paramtype subnet_arm_id: str """ super(PrivateEndpointResource, self).__init__(**kwargs) - self.subnet_arm_id = kwargs.get('subnet_arm_id', None) + self.subnet_arm_id = kwargs.get("subnet_arm_id", None) class PrivateLinkResource(Resource): @@ -27495,30 +25980,27 @@ class PrivateLinkResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "location": {"key": "location", "type": "str"}, + "sku": {"key": "sku", "type": "Sku"}, + "tags": {"key": "tags", "type": "{str}"}, + "group_id": {"key": "properties.groupId", "type": "str"}, + "required_members": {"key": "properties.requiredMembers", "type": "[str]"}, + "required_zone_names": {"key": "properties.requiredZoneNames", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword identity: Managed service identity (system assigned and/or user assigned identities). :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity @@ -27537,13 +26019,13 @@ def __init__( :paramtype required_zone_names: list[str] """ super(PrivateLinkResource, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.location = kwargs.get('location', None) - self.sku = kwargs.get('sku', None) - self.tags = kwargs.get('tags', None) - self.group_id = kwargs.get('group_id', None) - self.required_members = kwargs.get('required_members', None) - self.required_zone_names = kwargs.get('required_zone_names', None) + self.identity = kwargs.get("identity", None) + self.location = kwargs.get("location", None) + self.sku = kwargs.get("sku", None) + self.tags = kwargs.get("tags", None) + self.group_id = kwargs.get("group_id", None) + self.required_members = kwargs.get("required_members", None) + self.required_zone_names = kwargs.get("required_zone_names", None) class PrivateLinkResourceListResult(msrest.serialization.Model): @@ -27554,19 +26036,16 @@ class PrivateLinkResourceListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: :paramtype value: list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource] """ super(PrivateLinkResourceListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class PrivateLinkServiceConnectionState(msrest.serialization.Model): @@ -27584,15 +26063,12 @@ class PrivateLinkServiceConnectionState(msrest.serialization.Model): """ _attribute_map = { - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + "actions_required": {"key": "actionsRequired", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword actions_required: Some RP chose "None". Other RPs use this for region expansion. :paramtype actions_required: str @@ -27605,9 +26081,9 @@ def __init__( ~azure.mgmt.machinelearningservices.models.EndpointServiceConnectionStatus """ super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.actions_required = kwargs.get('actions_required', None) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) + self.actions_required = kwargs.get("actions_required", None) + self.description = kwargs.get("description", None) + self.status = kwargs.get("status", None) class ProbeSettings(msrest.serialization.Model): @@ -27626,17 +26102,14 @@ class ProbeSettings(msrest.serialization.Model): """ _attribute_map = { - 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, - 'initial_delay': {'key': 'initialDelay', 'type': 'duration'}, - 'period': {'key': 'period', 'type': 'duration'}, - 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, + "failure_threshold": {"key": "failureThreshold", "type": "int"}, + "initial_delay": {"key": "initialDelay", "type": "duration"}, + "period": {"key": "period", "type": "duration"}, + "success_threshold": {"key": "successThreshold", "type": "int"}, + "timeout": {"key": "timeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword failure_threshold: The number of failures to allow before returning an unhealthy status. @@ -27651,11 +26124,11 @@ def __init__( :paramtype timeout: ~datetime.timedelta """ super(ProbeSettings, self).__init__(**kwargs) - self.failure_threshold = kwargs.get('failure_threshold', 30) - self.initial_delay = kwargs.get('initial_delay', None) - self.period = kwargs.get('period', "PT10S") - self.success_threshold = kwargs.get('success_threshold', 1) - self.timeout = kwargs.get('timeout', "PT2S") + self.failure_threshold = kwargs.get("failure_threshold", 30) + self.initial_delay = kwargs.get("initial_delay", None) + self.period = kwargs.get("period", "PT10S") + self.success_threshold = kwargs.get("success_threshold", 1) + self.timeout = kwargs.get("timeout", "PT2S") class ProgressMetrics(msrest.serialization.Model): @@ -27675,25 +26148,21 @@ class ProgressMetrics(msrest.serialization.Model): """ _validation = { - 'completed_datapoint_count': {'readonly': True}, - 'incremental_data_last_refresh_date_time': {'readonly': True}, - 'skipped_datapoint_count': {'readonly': True}, - 'total_datapoint_count': {'readonly': True}, + "completed_datapoint_count": {"readonly": True}, + "incremental_data_last_refresh_date_time": {"readonly": True}, + "skipped_datapoint_count": {"readonly": True}, + "total_datapoint_count": {"readonly": True}, } _attribute_map = { - 'completed_datapoint_count': {'key': 'completedDatapointCount', 'type': 'long'}, - 'incremental_data_last_refresh_date_time': {'key': 'incrementalDataLastRefreshDateTime', 'type': 'iso-8601'}, - 'skipped_datapoint_count': {'key': 'skippedDatapointCount', 'type': 'long'}, - 'total_datapoint_count': {'key': 'totalDatapointCount', 'type': 'long'}, + "completed_datapoint_count": {"key": "completedDatapointCount", "type": "long"}, + "incremental_data_last_refresh_date_time": {"key": "incrementalDataLastRefreshDateTime", "type": "iso-8601"}, + "skipped_datapoint_count": {"key": "skippedDatapointCount", "type": "long"}, + "total_datapoint_count": {"key": "totalDatapointCount", "type": "long"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ProgressMetrics, self).__init__(**kwargs) self.completed_datapoint_count = None self.incremental_data_last_refresh_date_time = None @@ -27715,25 +26184,22 @@ class PyTorch(DistributionConfiguration): """ _validation = { - 'distribution_type': {'required': True}, + "distribution_type": {"required": True}, } _attribute_map = { - 'distribution_type': {'key': 'distributionType', 'type': 'str'}, - 'process_count_per_instance': {'key': 'processCountPerInstance', 'type': 'int'}, + "distribution_type": {"key": "distributionType", "type": "str"}, + "process_count_per_instance": {"key": "processCountPerInstance", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword process_count_per_instance: Number of processes per node. :paramtype process_count_per_instance: int """ super(PyTorch, self).__init__(**kwargs) - self.distribution_type = 'PyTorch' # type: str - self.process_count_per_instance = kwargs.get('process_count_per_instance', None) + self.distribution_type = "PyTorch" # type: str + self.process_count_per_instance = kwargs.get("process_count_per_instance", None) class QueueSettings(msrest.serialization.Model): @@ -27747,14 +26213,11 @@ class QueueSettings(msrest.serialization.Model): """ _attribute_map = { - 'job_tier': {'key': 'jobTier', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'int'}, + "job_tier": {"key": "jobTier", "type": "str"}, + "priority": {"key": "priority", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword job_tier: Controls the compute job tier. Possible values include: "Null", "Spot", "Basic", "Standard", "Premium". @@ -27763,8 +26226,8 @@ def __init__( :paramtype priority: int """ super(QueueSettings, self).__init__(**kwargs) - self.job_tier = kwargs.get('job_tier', None) - self.priority = kwargs.get('priority', None) + self.job_tier = kwargs.get("job_tier", None) + self.priority = kwargs.get("priority", None) class QuotaBaseProperties(msrest.serialization.Model): @@ -27781,16 +26244,13 @@ class QuotaBaseProperties(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'unit': {'key': 'unit', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "limit": {"key": "limit", "type": "long"}, + "unit": {"key": "unit", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword id: Specifies the resource ID. :paramtype id: str @@ -27803,10 +26263,10 @@ def __init__( :paramtype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit """ super(QuotaBaseProperties, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.type = kwargs.get('type', None) - self.limit = kwargs.get('limit', None) - self.unit = kwargs.get('unit', None) + self.id = kwargs.get("id", None) + self.type = kwargs.get("type", None) + self.limit = kwargs.get("limit", None) + self.unit = kwargs.get("unit", None) class QuotaUpdateParameters(msrest.serialization.Model): @@ -27819,14 +26279,11 @@ class QuotaUpdateParameters(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, - 'location': {'key': 'location', 'type': 'str'}, + "value": {"key": "value", "type": "[QuotaBaseProperties]"}, + "location": {"key": "location", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: The list for update quota. :paramtype value: list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] @@ -27834,8 +26291,8 @@ def __init__( :paramtype location: str """ super(QuotaUpdateParameters, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.location = kwargs.get('location', None) + self.value = kwargs.get("value", None) + self.location = kwargs.get("location", None) class RandomSamplingAlgorithm(SamplingAlgorithm): @@ -27858,20 +26315,17 @@ class RandomSamplingAlgorithm(SamplingAlgorithm): """ _validation = { - 'sampling_algorithm_type': {'required': True}, + "sampling_algorithm_type": {"required": True}, } _attribute_map = { - 'sampling_algorithm_type': {'key': 'samplingAlgorithmType', 'type': 'str'}, - 'logbase': {'key': 'logbase', 'type': 'str'}, - 'rule': {'key': 'rule', 'type': 'str'}, - 'seed': {'key': 'seed', 'type': 'int'}, + "sampling_algorithm_type": {"key": "samplingAlgorithmType", "type": "str"}, + "logbase": {"key": "logbase", "type": "str"}, + "rule": {"key": "rule", "type": "str"}, + "seed": {"key": "seed", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword logbase: An optional positive number or e in string format to be used as base for log based random sampling. @@ -27883,10 +26337,10 @@ def __init__( :paramtype seed: int """ super(RandomSamplingAlgorithm, self).__init__(**kwargs) - self.sampling_algorithm_type = 'Random' # type: str - self.logbase = kwargs.get('logbase', None) - self.rule = kwargs.get('rule', None) - self.seed = kwargs.get('seed', None) + self.sampling_algorithm_type = "Random" # type: str + self.logbase = kwargs.get("logbase", None) + self.rule = kwargs.get("rule", None) + self.seed = kwargs.get("seed", None) class Ray(DistributionConfiguration): @@ -27913,23 +26367,20 @@ class Ray(DistributionConfiguration): """ _validation = { - 'distribution_type': {'required': True}, + "distribution_type": {"required": True}, } _attribute_map = { - 'distribution_type': {'key': 'distributionType', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'dashboard_port': {'key': 'dashboardPort', 'type': 'int'}, - 'head_node_additional_args': {'key': 'headNodeAdditionalArgs', 'type': 'str'}, - 'include_dashboard': {'key': 'includeDashboard', 'type': 'bool'}, - 'port': {'key': 'port', 'type': 'int'}, - 'worker_node_additional_args': {'key': 'workerNodeAdditionalArgs', 'type': 'str'}, + "distribution_type": {"key": "distributionType", "type": "str"}, + "address": {"key": "address", "type": "str"}, + "dashboard_port": {"key": "dashboardPort", "type": "int"}, + "head_node_additional_args": {"key": "headNodeAdditionalArgs", "type": "str"}, + "include_dashboard": {"key": "includeDashboard", "type": "bool"}, + "port": {"key": "port", "type": "int"}, + "worker_node_additional_args": {"key": "workerNodeAdditionalArgs", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword address: The address of Ray head node. :paramtype address: str @@ -27945,13 +26396,13 @@ def __init__( :paramtype worker_node_additional_args: str """ super(Ray, self).__init__(**kwargs) - self.distribution_type = 'Ray' # type: str - self.address = kwargs.get('address', None) - self.dashboard_port = kwargs.get('dashboard_port', None) - self.head_node_additional_args = kwargs.get('head_node_additional_args', None) - self.include_dashboard = kwargs.get('include_dashboard', None) - self.port = kwargs.get('port', None) - self.worker_node_additional_args = kwargs.get('worker_node_additional_args', None) + self.distribution_type = "Ray" # type: str + self.address = kwargs.get("address", None) + self.dashboard_port = kwargs.get("dashboard_port", None) + self.head_node_additional_args = kwargs.get("head_node_additional_args", None) + self.include_dashboard = kwargs.get("include_dashboard", None) + self.port = kwargs.get("port", None) + self.worker_node_additional_args = kwargs.get("worker_node_additional_args", None) class Recurrence(msrest.serialization.Model): @@ -27974,17 +26425,14 @@ class Recurrence(msrest.serialization.Model): """ _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'ComputeRecurrenceSchedule'}, + "frequency": {"key": "frequency", "type": "str"}, + "interval": {"key": "interval", "type": "int"}, + "start_time": {"key": "startTime", "type": "str"}, + "time_zone": {"key": "timeZone", "type": "str"}, + "schedule": {"key": "schedule", "type": "ComputeRecurrenceSchedule"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword frequency: [Required] The frequency to trigger schedule. Possible values include: "Minute", "Hour", "Day", "Week", "Month". @@ -28002,11 +26450,11 @@ def __init__( :paramtype schedule: ~azure.mgmt.machinelearningservices.models.ComputeRecurrenceSchedule """ super(Recurrence, self).__init__(**kwargs) - self.frequency = kwargs.get('frequency', None) - self.interval = kwargs.get('interval', None) - self.start_time = kwargs.get('start_time', None) - self.time_zone = kwargs.get('time_zone', "UTC") - self.schedule = kwargs.get('schedule', None) + self.frequency = kwargs.get("frequency", None) + self.interval = kwargs.get("interval", None) + self.start_time = kwargs.get("start_time", None) + self.time_zone = kwargs.get("time_zone", "UTC") + self.schedule = kwargs.get("schedule", None) class RecurrenceSchedule(msrest.serialization.Model): @@ -28025,21 +26473,18 @@ class RecurrenceSchedule(msrest.serialization.Model): """ _validation = { - 'hours': {'required': True}, - 'minutes': {'required': True}, + "hours": {"required": True}, + "minutes": {"required": True}, } _attribute_map = { - 'hours': {'key': 'hours', 'type': '[int]'}, - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[str]'}, + "hours": {"key": "hours", "type": "[int]"}, + "minutes": {"key": "minutes", "type": "[int]"}, + "month_days": {"key": "monthDays", "type": "[int]"}, + "week_days": {"key": "weekDays", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword hours: Required. [Required] List of hours for the schedule. :paramtype hours: list[int] @@ -28051,10 +26496,10 @@ def __init__( :paramtype week_days: list[str or ~azure.mgmt.machinelearningservices.models.WeekDay] """ super(RecurrenceSchedule, self).__init__(**kwargs) - self.hours = kwargs['hours'] - self.minutes = kwargs['minutes'] - self.month_days = kwargs.get('month_days', None) - self.week_days = kwargs.get('week_days', None) + self.hours = kwargs["hours"] + self.minutes = kwargs["minutes"] + self.month_days = kwargs.get("month_days", None) + self.week_days = kwargs.get("week_days", None) class RecurrenceTrigger(TriggerBase): @@ -28087,25 +26532,22 @@ class RecurrenceTrigger(TriggerBase): """ _validation = { - 'trigger_type': {'required': True}, - 'frequency': {'required': True}, - 'interval': {'required': True}, + "trigger_type": {"required": True}, + "frequency": {"required": True}, + "interval": {"required": True}, } _attribute_map = { - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'trigger_type': {'key': 'triggerType', 'type': 'str'}, - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, + "end_time": {"key": "endTime", "type": "str"}, + "start_time": {"key": "startTime", "type": "str"}, + "time_zone": {"key": "timeZone", "type": "str"}, + "trigger_type": {"key": "triggerType", "type": "str"}, + "frequency": {"key": "frequency", "type": "str"}, + "interval": {"key": "interval", "type": "int"}, + "schedule": {"key": "schedule", "type": "RecurrenceSchedule"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword end_time: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. @@ -28129,10 +26571,10 @@ def __init__( :paramtype schedule: ~azure.mgmt.machinelearningservices.models.RecurrenceSchedule """ super(RecurrenceTrigger, self).__init__(**kwargs) - self.trigger_type = 'Recurrence' # type: str - self.frequency = kwargs['frequency'] - self.interval = kwargs['interval'] - self.schedule = kwargs.get('schedule', None) + self.trigger_type = "Recurrence" # type: str + self.frequency = kwargs["frequency"] + self.interval = kwargs["interval"] + self.schedule = kwargs.get("schedule", None) class RegenerateEndpointKeysRequest(msrest.serialization.Model): @@ -28148,18 +26590,15 @@ class RegenerateEndpointKeysRequest(msrest.serialization.Model): """ _validation = { - 'key_type': {'required': True}, + "key_type": {"required": True}, } _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - 'key_value': {'key': 'keyValue', 'type': 'str'}, + "key_type": {"key": "keyType", "type": "str"}, + "key_value": {"key": "keyValue", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key_type: Required. [Required] Specification for which type of key to generate. Primary or Secondary. Possible values include: "Primary", "Secondary". @@ -28168,8 +26607,8 @@ def __init__( :paramtype key_value: str """ super(RegenerateEndpointKeysRequest, self).__init__(**kwargs) - self.key_type = kwargs['key_type'] - self.key_value = kwargs.get('key_value', None) + self.key_type = kwargs["key_type"] + self.key_value = kwargs.get("key_value", None) class RegenerateServiceAccountKeyContent(msrest.serialization.Model): @@ -28180,19 +26619,16 @@ class RegenerateServiceAccountKeyContent(msrest.serialization.Model): """ _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, + "key_name": {"key": "keyName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key_name: Possible values include: "Key1", "Key2". :paramtype key_name: str or ~azure.mgmt.machinelearningservices.models.ServiceAccountKeyName """ super(RegenerateServiceAccountKeyContent, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) + self.key_name = kwargs.get("key_name", None) class Registry(TrackedResource): @@ -28249,39 +26685,40 @@ class Registry(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, - 'intellectual_property_publisher': {'key': 'properties.intellectualPropertyPublisher', 'type': 'str'}, - 'managed_resource_group': {'key': 'properties.managedResourceGroup', 'type': 'ArmResourceId'}, - 'managed_resource_group_settings': {'key': 'properties.managedResourceGroupSettings', - 'type': 'ManagedResourceGroupSettings'}, - 'ml_flow_registry_uri': {'key': 'properties.mlFlowRegistryUri', 'type': 'str'}, - 'registry_private_endpoint_connections': {'key': 'properties.registryPrivateEndpointConnections', - 'type': '[RegistryPrivateEndpointConnection]'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'region_details': {'key': 'properties.regionDetails', 'type': '[RegistryRegionArmDetails]'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "sku": {"key": "sku", "type": "Sku"}, + "discovery_url": {"key": "properties.discoveryUrl", "type": "str"}, + "intellectual_property_publisher": {"key": "properties.intellectualPropertyPublisher", "type": "str"}, + "managed_resource_group": {"key": "properties.managedResourceGroup", "type": "ArmResourceId"}, + "managed_resource_group_settings": { + "key": "properties.managedResourceGroupSettings", + "type": "ManagedResourceGroupSettings", + }, + "ml_flow_registry_uri": {"key": "properties.mlFlowRegistryUri", "type": "str"}, + "registry_private_endpoint_connections": { + "key": "properties.registryPrivateEndpointConnections", + "type": "[RegistryPrivateEndpointConnection]", + }, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "region_details": {"key": "properties.regionDetails", "type": "[RegistryRegionArmDetails]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -28318,17 +26755,17 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.RegistryRegionArmDetails] """ super(Registry, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.sku = kwargs.get('sku', None) - self.discovery_url = kwargs.get('discovery_url', None) - self.intellectual_property_publisher = kwargs.get('intellectual_property_publisher', None) - self.managed_resource_group = kwargs.get('managed_resource_group', None) - self.managed_resource_group_settings = kwargs.get('managed_resource_group_settings', None) - self.ml_flow_registry_uri = kwargs.get('ml_flow_registry_uri', None) - self.registry_private_endpoint_connections = kwargs.get('registry_private_endpoint_connections', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.region_details = kwargs.get('region_details', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.sku = kwargs.get("sku", None) + self.discovery_url = kwargs.get("discovery_url", None) + self.intellectual_property_publisher = kwargs.get("intellectual_property_publisher", None) + self.managed_resource_group = kwargs.get("managed_resource_group", None) + self.managed_resource_group_settings = kwargs.get("managed_resource_group_settings", None) + self.ml_flow_registry_uri = kwargs.get("ml_flow_registry_uri", None) + self.registry_private_endpoint_connections = kwargs.get("registry_private_endpoint_connections", None) + self.public_network_access = kwargs.get("public_network_access", None) + self.region_details = kwargs.get("region_details", None) class RegistryListCredentialsResult(msrest.serialization.Model): @@ -28345,27 +26782,24 @@ class RegistryListCredentialsResult(msrest.serialization.Model): """ _validation = { - 'location': {'readonly': True}, - 'username': {'readonly': True}, + "location": {"readonly": True}, + "username": {"readonly": True}, } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'passwords': {'key': 'passwords', 'type': '[Password]'}, - 'username': {'key': 'username', 'type': 'str'}, + "location": {"key": "location", "type": "str"}, + "passwords": {"key": "passwords", "type": "[Password]"}, + "username": {"key": "username", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword passwords: :paramtype passwords: list[~azure.mgmt.machinelearningservices.models.Password] """ super(RegistryListCredentialsResult, self).__init__(**kwargs) self.location = None - self.passwords = kwargs.get('passwords', None) + self.passwords = kwargs.get("passwords", None) self.username = None @@ -28395,22 +26829,19 @@ class RegistryPartialManagedServiceIdentity(ManagedServiceIdentity): """ _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'required': True}, + "principal_id": {"readonly": True}, + "tenant_id": {"readonly": True}, + "type": {"required": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + "principal_id": {"key": "principalId", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedIdentity}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword type: Required. Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", @@ -28448,20 +26879,18 @@ class RegistryPrivateEndpointConnection(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointResource'}, - 'registry_private_link_service_connection_state': { - 'key': 'properties.registryPrivateLinkServiceConnectionState', - 'type': 'RegistryPrivateLinkServiceConnectionState'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "group_ids": {"key": "properties.groupIds", "type": "[str]"}, + "private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpointResource"}, + "registry_private_link_service_connection_state": { + "key": "properties.registryPrivateLinkServiceConnectionState", + "type": "RegistryPrivateLinkServiceConnectionState", + }, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword id: This is the private endpoint connection name created on SRP Full resource id: @@ -28481,13 +26910,14 @@ def __init__( :paramtype provisioning_state: str """ super(RegistryPrivateEndpointConnection, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.location = kwargs.get('location', None) - self.group_ids = kwargs.get('group_ids', None) - self.private_endpoint = kwargs.get('private_endpoint', None) + self.id = kwargs.get("id", None) + self.location = kwargs.get("location", None) + self.group_ids = kwargs.get("group_ids", None) + self.private_endpoint = kwargs.get("private_endpoint", None) self.registry_private_link_service_connection_state = kwargs.get( - 'registry_private_link_service_connection_state', None) - self.provisioning_state = kwargs.get('provisioning_state', None) + "registry_private_link_service_connection_state", None + ) + self.provisioning_state = kwargs.get("provisioning_state", None) class RegistryPrivateLinkServiceConnectionState(msrest.serialization.Model): @@ -28505,15 +26935,12 @@ class RegistryPrivateLinkServiceConnectionState(msrest.serialization.Model): """ _attribute_map = { - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + "actions_required": {"key": "actionsRequired", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword actions_required: Some RP chose "None". Other RPs use this for region expansion. :paramtype actions_required: str @@ -28526,9 +26953,9 @@ def __init__( ~azure.mgmt.machinelearningservices.models.EndpointServiceConnectionStatus """ super(RegistryPrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.actions_required = kwargs.get('actions_required', None) - self.description = kwargs.get('description', None) - self.status = kwargs.get('status', None) + self.actions_required = kwargs.get("actions_required", None) + self.description = kwargs.get("description", None) + self.status = kwargs.get("status", None) class RegistryRegionArmDetails(msrest.serialization.Model): @@ -28544,15 +26971,12 @@ class RegistryRegionArmDetails(msrest.serialization.Model): """ _attribute_map = { - 'acr_details': {'key': 'acrDetails', 'type': '[AcrDetails]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'storage_account_details': {'key': 'storageAccountDetails', 'type': '[StorageAccountDetails]'}, + "acr_details": {"key": "acrDetails", "type": "[AcrDetails]"}, + "location": {"key": "location", "type": "str"}, + "storage_account_details": {"key": "storageAccountDetails", "type": "[StorageAccountDetails]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword acr_details: List of ACR accounts. :paramtype acr_details: list[~azure.mgmt.machinelearningservices.models.AcrDetails] @@ -28563,9 +26987,9 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.StorageAccountDetails] """ super(RegistryRegionArmDetails, self).__init__(**kwargs) - self.acr_details = kwargs.get('acr_details', None) - self.location = kwargs.get('location', None) - self.storage_account_details = kwargs.get('storage_account_details', None) + self.acr_details = kwargs.get("acr_details", None) + self.location = kwargs.get("location", None) + self.storage_account_details = kwargs.get("storage_account_details", None) class RegistryTrackedResourceArmPaginatedResult(msrest.serialization.Model): @@ -28579,14 +27003,11 @@ class RegistryTrackedResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[Registry]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[Registry]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of Registry objects. If null, there are no additional pages. @@ -28595,8 +27016,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.Registry] """ super(RegistryTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class Regression(AutoMLVertical, TableVertical): @@ -28663,35 +27084,32 @@ class Regression(AutoMLVertical, TableVertical): """ _validation = { - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'cv_split_column_names': {'key': 'cvSplitColumnNames', 'type': '[str]'}, - 'featurization_settings': {'key': 'featurizationSettings', 'type': 'TableVerticalFeaturizationSettings'}, - 'fixed_parameters': {'key': 'fixedParameters', 'type': 'TableFixedParameters'}, - 'limit_settings': {'key': 'limitSettings', 'type': 'TableVerticalLimitSettings'}, - 'n_cross_validations': {'key': 'nCrossValidations', 'type': 'NCrossValidations'}, - 'search_space': {'key': 'searchSpace', 'type': '[TableParameterSubspace]'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'TableSweepSettings'}, - 'test_data': {'key': 'testData', 'type': 'MLTableJobInput'}, - 'test_data_size': {'key': 'testDataSize', 'type': 'float'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'validation_data_size': {'key': 'validationDataSize', 'type': 'float'}, - 'weight_column_name': {'key': 'weightColumnName', 'type': 'str'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, - 'training_settings': {'key': 'trainingSettings', 'type': 'RegressionTrainingSettings'}, + "cv_split_column_names": {"key": "cvSplitColumnNames", "type": "[str]"}, + "featurization_settings": {"key": "featurizationSettings", "type": "TableVerticalFeaturizationSettings"}, + "fixed_parameters": {"key": "fixedParameters", "type": "TableFixedParameters"}, + "limit_settings": {"key": "limitSettings", "type": "TableVerticalLimitSettings"}, + "n_cross_validations": {"key": "nCrossValidations", "type": "NCrossValidations"}, + "search_space": {"key": "searchSpace", "type": "[TableParameterSubspace]"}, + "sweep_settings": {"key": "sweepSettings", "type": "TableSweepSettings"}, + "test_data": {"key": "testData", "type": "MLTableJobInput"}, + "test_data_size": {"key": "testDataSize", "type": "float"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "validation_data_size": {"key": "validationDataSize", "type": "float"}, + "weight_column_name": {"key": "weightColumnName", "type": "str"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, + "training_settings": {"key": "trainingSettings", "type": "RegressionTrainingSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword cv_split_column_names: Columns to use for CVSplit data. :paramtype cv_split_column_names: list[str] @@ -28749,24 +27167,24 @@ def __init__( ~azure.mgmt.machinelearningservices.models.RegressionTrainingSettings """ super(Regression, self).__init__(**kwargs) - self.cv_split_column_names = kwargs.get('cv_split_column_names', None) - self.featurization_settings = kwargs.get('featurization_settings', None) - self.fixed_parameters = kwargs.get('fixed_parameters', None) - self.limit_settings = kwargs.get('limit_settings', None) - self.n_cross_validations = kwargs.get('n_cross_validations', None) - self.search_space = kwargs.get('search_space', None) - self.sweep_settings = kwargs.get('sweep_settings', None) - self.test_data = kwargs.get('test_data', None) - self.test_data_size = kwargs.get('test_data_size', None) - self.validation_data = kwargs.get('validation_data', None) - self.validation_data_size = kwargs.get('validation_data_size', None) - self.weight_column_name = kwargs.get('weight_column_name', None) - self.task_type = 'Regression' # type: str - self.primary_metric = kwargs.get('primary_metric', None) - self.training_settings = kwargs.get('training_settings', None) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.cv_split_column_names = kwargs.get("cv_split_column_names", None) + self.featurization_settings = kwargs.get("featurization_settings", None) + self.fixed_parameters = kwargs.get("fixed_parameters", None) + self.limit_settings = kwargs.get("limit_settings", None) + self.n_cross_validations = kwargs.get("n_cross_validations", None) + self.search_space = kwargs.get("search_space", None) + self.sweep_settings = kwargs.get("sweep_settings", None) + self.test_data = kwargs.get("test_data", None) + self.test_data_size = kwargs.get("test_data_size", None) + self.validation_data = kwargs.get("validation_data", None) + self.validation_data_size = kwargs.get("validation_data_size", None) + self.weight_column_name = kwargs.get("weight_column_name", None) + self.task_type = "Regression" # type: str + self.primary_metric = kwargs.get("primary_metric", None) + self.training_settings = kwargs.get("training_settings", None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class RegressionModelPerformanceMetricThreshold(ModelPerformanceMetricThresholdBase): @@ -28787,20 +27205,17 @@ class RegressionModelPerformanceMetricThreshold(ModelPerformanceMetricThresholdB """ _validation = { - 'model_type': {'required': True}, - 'metric': {'required': True}, + "model_type": {"required": True}, + "metric": {"required": True}, } _attribute_map = { - 'model_type': {'key': 'modelType', 'type': 'str'}, - 'threshold': {'key': 'threshold', 'type': 'MonitoringThreshold'}, - 'metric': {'key': 'metric', 'type': 'str'}, + "model_type": {"key": "modelType", "type": "str"}, + "threshold": {"key": "threshold", "type": "MonitoringThreshold"}, + "metric": {"key": "metric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword threshold: The threshold value. If null, a default value will be set depending on the selected metric. @@ -28811,8 +27226,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.RegressionModelPerformanceMetric """ super(RegressionModelPerformanceMetricThreshold, self).__init__(**kwargs) - self.model_type = 'Regression' # type: str - self.metric = kwargs['metric'] + self.model_type = "Regression" # type: str + self.metric = kwargs["metric"] class RegressionTrainingSettings(TrainingSettings): @@ -28852,22 +27267,19 @@ class RegressionTrainingSettings(TrainingSettings): """ _attribute_map = { - 'enable_dnn_training': {'key': 'enableDnnTraining', 'type': 'bool'}, - 'enable_model_explainability': {'key': 'enableModelExplainability', 'type': 'bool'}, - 'enable_onnx_compatible_models': {'key': 'enableOnnxCompatibleModels', 'type': 'bool'}, - 'enable_stack_ensemble': {'key': 'enableStackEnsemble', 'type': 'bool'}, - 'enable_vote_ensemble': {'key': 'enableVoteEnsemble', 'type': 'bool'}, - 'ensemble_model_download_timeout': {'key': 'ensembleModelDownloadTimeout', 'type': 'duration'}, - 'stack_ensemble_settings': {'key': 'stackEnsembleSettings', 'type': 'StackEnsembleSettings'}, - 'training_mode': {'key': 'trainingMode', 'type': 'str'}, - 'allowed_training_algorithms': {'key': 'allowedTrainingAlgorithms', 'type': '[str]'}, - 'blocked_training_algorithms': {'key': 'blockedTrainingAlgorithms', 'type': '[str]'}, + "enable_dnn_training": {"key": "enableDnnTraining", "type": "bool"}, + "enable_model_explainability": {"key": "enableModelExplainability", "type": "bool"}, + "enable_onnx_compatible_models": {"key": "enableOnnxCompatibleModels", "type": "bool"}, + "enable_stack_ensemble": {"key": "enableStackEnsemble", "type": "bool"}, + "enable_vote_ensemble": {"key": "enableVoteEnsemble", "type": "bool"}, + "ensemble_model_download_timeout": {"key": "ensembleModelDownloadTimeout", "type": "duration"}, + "stack_ensemble_settings": {"key": "stackEnsembleSettings", "type": "StackEnsembleSettings"}, + "training_mode": {"key": "trainingMode", "type": "str"}, + "allowed_training_algorithms": {"key": "allowedTrainingAlgorithms", "type": "[str]"}, + "blocked_training_algorithms": {"key": "blockedTrainingAlgorithms", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword enable_dnn_training: Enable recommendation of DNN models. :paramtype enable_dnn_training: bool @@ -28902,8 +27314,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.RegressionModels] """ super(RegressionTrainingSettings, self).__init__(**kwargs) - self.allowed_training_algorithms = kwargs.get('allowed_training_algorithms', None) - self.blocked_training_algorithms = kwargs.get('blocked_training_algorithms', None) + self.allowed_training_algorithms = kwargs.get("allowed_training_algorithms", None) + self.blocked_training_algorithms = kwargs.get("blocked_training_algorithms", None) class RequestConfiguration(msrest.serialization.Model): @@ -28918,14 +27330,11 @@ class RequestConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'max_concurrent_requests_per_instance': {'key': 'maxConcurrentRequestsPerInstance', 'type': 'int'}, - 'request_timeout': {'key': 'requestTimeout', 'type': 'duration'}, + "max_concurrent_requests_per_instance": {"key": "maxConcurrentRequestsPerInstance", "type": "int"}, + "request_timeout": {"key": "requestTimeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword max_concurrent_requests_per_instance: The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. @@ -28935,8 +27344,8 @@ def __init__( :paramtype request_timeout: ~datetime.timedelta """ super(RequestConfiguration, self).__init__(**kwargs) - self.max_concurrent_requests_per_instance = kwargs.get('max_concurrent_requests_per_instance', 1) - self.request_timeout = kwargs.get('request_timeout', "PT5S") + self.max_concurrent_requests_per_instance = kwargs.get("max_concurrent_requests_per_instance", 1) + self.request_timeout = kwargs.get("request_timeout", "PT5S") class RequestLogging(msrest.serialization.Model): @@ -28949,13 +27358,10 @@ class RequestLogging(msrest.serialization.Model): """ _attribute_map = { - 'capture_headers': {'key': 'captureHeaders', 'type': '[str]'}, + "capture_headers": {"key": "captureHeaders", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword capture_headers: For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend @@ -28963,7 +27369,7 @@ def __init__( :paramtype capture_headers: list[str] """ super(RequestLogging, self).__init__(**kwargs) - self.capture_headers = kwargs.get('capture_headers', None) + self.capture_headers = kwargs.get("capture_headers", None) class RequestMatchPattern(msrest.serialization.Model): @@ -28976,14 +27382,11 @@ class RequestMatchPattern(msrest.serialization.Model): """ _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, + "path": {"key": "path", "type": "str"}, + "method": {"key": "method", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword path: :paramtype path: str @@ -28991,8 +27394,8 @@ def __init__( :paramtype method: str """ super(RequestMatchPattern, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.method = kwargs.get('method', None) + self.path = kwargs.get("path", None) + self.method = kwargs.get("method", None) class ResizeSchema(msrest.serialization.Model): @@ -29003,19 +27406,16 @@ class ResizeSchema(msrest.serialization.Model): """ _attribute_map = { - 'target_vm_size': {'key': 'targetVMSize', 'type': 'str'}, + "target_vm_size": {"key": "targetVMSize", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword target_vm_size: The name of the virtual machine size. :paramtype target_vm_size: str """ super(ResizeSchema, self).__init__(**kwargs) - self.target_vm_size = kwargs.get('target_vm_size', None) + self.target_vm_size = kwargs.get("target_vm_size", None) class ResourceId(msrest.serialization.Model): @@ -29028,23 +27428,20 @@ class ResourceId(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword id: Required. The ID of the resource. :paramtype id: str """ super(ResourceId, self).__init__(**kwargs) - self.id = kwargs['id'] + self.id = kwargs["id"] class ResourceName(msrest.serialization.Model): @@ -29059,21 +27456,17 @@ class ResourceName(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, + "value": {"readonly": True}, + "localized_value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, + "localized_value": {"key": "localizedValue", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ResourceName, self).__init__(**kwargs) self.value = None self.localized_value = None @@ -29099,29 +27492,25 @@ class ResourceQuota(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'aml_workspace_location': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'limit': {'readonly': True}, - 'unit': {'readonly': True}, + "id": {"readonly": True}, + "aml_workspace_location": {"readonly": True}, + "type": {"readonly": True}, + "name": {"readonly": True}, + "limit": {"readonly": True}, + "unit": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'ResourceName'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'unit': {'key': 'unit', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "aml_workspace_location": {"key": "amlWorkspaceLocation", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "name": {"key": "name", "type": "ResourceName"}, + "limit": {"key": "limit", "type": "long"}, + "unit": {"key": "unit", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ResourceQuota, self).__init__(**kwargs) self.id = None self.aml_workspace_location = None @@ -29160,28 +27549,25 @@ class RollingInputData(MonitoringInputDataBase): """ _validation = { - 'input_data_type': {'required': True}, - 'job_input_type': {'required': True}, - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'window_offset': {'required': True}, - 'window_size': {'required': True}, + "input_data_type": {"required": True}, + "job_input_type": {"required": True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "window_offset": {"required": True}, + "window_size": {"required": True}, } _attribute_map = { - 'columns': {'key': 'columns', 'type': '{str}'}, - 'data_context': {'key': 'dataContext', 'type': 'str'}, - 'input_data_type': {'key': 'inputDataType', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'preprocessing_component_id': {'key': 'preprocessingComponentId', 'type': 'str'}, - 'window_offset': {'key': 'windowOffset', 'type': 'duration'}, - 'window_size': {'key': 'windowSize', 'type': 'duration'}, + "columns": {"key": "columns", "type": "{str}"}, + "data_context": {"key": "dataContext", "type": "str"}, + "input_data_type": {"key": "inputDataType", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "preprocessing_component_id": {"key": "preprocessingComponentId", "type": "str"}, + "window_offset": {"key": "windowOffset", "type": "duration"}, + "window_size": {"key": "windowSize", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword columns: Mapping of column names to special uses. :paramtype columns: dict[str, str] @@ -29203,10 +27589,10 @@ def __init__( :paramtype window_size: ~datetime.timedelta """ super(RollingInputData, self).__init__(**kwargs) - self.input_data_type = 'Rolling' # type: str - self.preprocessing_component_id = kwargs.get('preprocessing_component_id', None) - self.window_offset = kwargs['window_offset'] - self.window_size = kwargs['window_size'] + self.input_data_type = "Rolling" # type: str + self.preprocessing_component_id = kwargs.get("preprocessing_component_id", None) + self.window_offset = kwargs["window_offset"] + self.window_size = kwargs["window_size"] class Route(msrest.serialization.Model): @@ -29221,19 +27607,16 @@ class Route(msrest.serialization.Model): """ _validation = { - 'path': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'port': {'required': True}, + "path": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "port": {"required": True}, } _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, + "path": {"key": "path", "type": "str"}, + "port": {"key": "port", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword path: Required. [Required] The path for the route. :paramtype path: str @@ -29241,8 +27624,8 @@ def __init__( :paramtype port: int """ super(Route, self).__init__(**kwargs) - self.path = kwargs['path'] - self.port = kwargs['port'] + self.path = kwargs["path"] + self.port = kwargs["port"] class SASAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): @@ -29295,28 +27678,25 @@ class SASAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionSharedAccessSignature'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionSharedAccessSignature"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -29351,8 +27731,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionSharedAccessSignature """ super(SASAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'SAS' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "SAS" # type: str + self.credentials = kwargs.get("credentials", None) class SASCredential(DataReferenceCredential): @@ -29370,25 +27750,22 @@ class SASCredential(DataReferenceCredential): """ _validation = { - 'credential_type': {'required': True}, + "credential_type": {"required": True}, } _attribute_map = { - 'credential_type': {'key': 'credentialType', 'type': 'str'}, - 'sas_uri': {'key': 'sasUri', 'type': 'str'}, + "credential_type": {"key": "credentialType", "type": "str"}, + "sas_uri": {"key": "sasUri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword sas_uri: Full SAS Uri, including the storage, container/blob path and SAS token. :paramtype sas_uri: str """ super(SASCredential, self).__init__(**kwargs) - self.credential_type = 'SAS' # type: str - self.sas_uri = kwargs.get('sas_uri', None) + self.credential_type = "SAS" # type: str + self.sas_uri = kwargs.get("sas_uri", None) class SASCredentialDto(PendingUploadCredentialDto): @@ -29405,25 +27782,22 @@ class SASCredentialDto(PendingUploadCredentialDto): """ _validation = { - 'credential_type': {'required': True}, + "credential_type": {"required": True}, } _attribute_map = { - 'credential_type': {'key': 'credentialType', 'type': 'str'}, - 'sas_uri': {'key': 'sasUri', 'type': 'str'}, + "credential_type": {"key": "credentialType", "type": "str"}, + "sas_uri": {"key": "sasUri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword sas_uri: Full SAS Uri, including the storage, container/blob path and SAS token. :paramtype sas_uri: str """ super(SASCredentialDto, self).__init__(**kwargs) - self.credential_type = 'SAS' # type: str - self.sas_uri = kwargs.get('sas_uri', None) + self.credential_type = "SAS" # type: str + self.sas_uri = kwargs.get("sas_uri", None) class SasDatastoreCredentials(DatastoreCredentials): @@ -29440,26 +27814,23 @@ class SasDatastoreCredentials(DatastoreCredentials): """ _validation = { - 'credentials_type': {'required': True}, - 'secrets': {'required': True}, + "credentials_type": {"required": True}, + "secrets": {"required": True}, } _attribute_map = { - 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, - 'secrets': {'key': 'secrets', 'type': 'SasDatastoreSecrets'}, + "credentials_type": {"key": "credentialsType", "type": "str"}, + "secrets": {"key": "secrets", "type": "SasDatastoreSecrets"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword secrets: Required. [Required] Storage container secrets. :paramtype secrets: ~azure.mgmt.machinelearningservices.models.SasDatastoreSecrets """ super(SasDatastoreCredentials, self).__init__(**kwargs) - self.credentials_type = 'Sas' # type: str - self.secrets = kwargs['secrets'] + self.credentials_type = "Sas" # type: str + self.secrets = kwargs["secrets"] class SasDatastoreSecrets(DatastoreSecrets): @@ -29476,25 +27847,22 @@ class SasDatastoreSecrets(DatastoreSecrets): """ _validation = { - 'secrets_type': {'required': True}, + "secrets_type": {"required": True}, } _attribute_map = { - 'secrets_type': {'key': 'secretsType', 'type': 'str'}, - 'sas_token': {'key': 'sasToken', 'type': 'str'}, + "secrets_type": {"key": "secretsType", "type": "str"}, + "sas_token": {"key": "sasToken", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword sas_token: Storage container SAS token. :paramtype sas_token: str """ super(SasDatastoreSecrets, self).__init__(**kwargs) - self.secrets_type = 'Sas' # type: str - self.sas_token = kwargs.get('sas_token', None) + self.secrets_type = "Sas" # type: str + self.sas_token = kwargs.get("sas_token", None) class ScaleSettings(msrest.serialization.Model): @@ -29512,19 +27880,16 @@ class ScaleSettings(msrest.serialization.Model): """ _validation = { - 'max_node_count': {'required': True}, + "max_node_count": {"required": True}, } _attribute_map = { - 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, - 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, - 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + "max_node_count": {"key": "maxNodeCount", "type": "int"}, + "min_node_count": {"key": "minNodeCount", "type": "int"}, + "node_idle_time_before_scale_down": {"key": "nodeIdleTimeBeforeScaleDown", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword max_node_count: Required. Max number of nodes to use. :paramtype max_node_count: int @@ -29535,9 +27900,9 @@ def __init__( :paramtype node_idle_time_before_scale_down: ~datetime.timedelta """ super(ScaleSettings, self).__init__(**kwargs) - self.max_node_count = kwargs['max_node_count'] - self.min_node_count = kwargs.get('min_node_count', 0) - self.node_idle_time_before_scale_down = kwargs.get('node_idle_time_before_scale_down', None) + self.max_node_count = kwargs["max_node_count"] + self.min_node_count = kwargs.get("min_node_count", 0) + self.node_idle_time_before_scale_down = kwargs.get("node_idle_time_before_scale_down", None) class ScaleSettingsInformation(msrest.serialization.Model): @@ -29548,19 +27913,16 @@ class ScaleSettingsInformation(msrest.serialization.Model): """ _attribute_map = { - 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + "scale_settings": {"key": "scaleSettings", "type": "ScaleSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword scale_settings: scale settings for AML Compute. :paramtype scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings """ super(ScaleSettingsInformation, self).__init__(**kwargs) - self.scale_settings = kwargs.get('scale_settings', None) + self.scale_settings = kwargs.get("scale_settings", None) class Schedule(ProxyResource): @@ -29586,31 +27948,28 @@ class Schedule(ProxyResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'ScheduleProperties'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "ScheduleProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. [Required] Additional attributes of the entity. :paramtype properties: ~azure.mgmt.machinelearningservices.models.ScheduleProperties """ super(Schedule, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class ScheduleBase(msrest.serialization.Model): @@ -29628,15 +27987,12 @@ class ScheduleBase(msrest.serialization.Model): """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'provisioning_status': {'key': 'provisioningStatus', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "provisioning_status": {"key": "provisioningStatus", "type": "str"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword id: A system assigned id for the schedule. :paramtype id: str @@ -29649,9 +28005,9 @@ def __init__( :paramtype status: str or ~azure.mgmt.machinelearningservices.models.ScheduleStatus """ super(ScheduleBase, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.provisioning_status = kwargs.get('provisioning_status', None) - self.status = kwargs.get('status', None) + self.id = kwargs.get("id", None) + self.provisioning_status = kwargs.get("provisioning_status", None) + self.status = kwargs.get("status", None) class ScheduleProperties(ResourceBase): @@ -29682,26 +28038,23 @@ class ScheduleProperties(ResourceBase): """ _validation = { - 'action': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'trigger': {'required': True}, + "action": {"required": True}, + "provisioning_state": {"readonly": True}, + "trigger": {"required": True}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'action': {'key': 'action', 'type': 'ScheduleActionBase'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'TriggerBase'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "action": {"key": "action", "type": "ScheduleActionBase"}, + "display_name": {"key": "displayName", "type": "str"}, + "is_enabled": {"key": "isEnabled", "type": "bool"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "trigger": {"key": "trigger", "type": "TriggerBase"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -29719,11 +28072,11 @@ def __init__( :paramtype trigger: ~azure.mgmt.machinelearningservices.models.TriggerBase """ super(ScheduleProperties, self).__init__(**kwargs) - self.action = kwargs['action'] - self.display_name = kwargs.get('display_name', None) - self.is_enabled = kwargs.get('is_enabled', True) + self.action = kwargs["action"] + self.display_name = kwargs.get("display_name", None) + self.is_enabled = kwargs.get("is_enabled", True) self.provisioning_state = None - self.trigger = kwargs['trigger'] + self.trigger = kwargs["trigger"] class ScheduleResourceArmPaginatedResult(msrest.serialization.Model): @@ -29737,14 +28090,11 @@ class ScheduleResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[Schedule]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[Schedule]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of Schedule objects. If null, there are no additional pages. @@ -29753,8 +28103,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.Schedule] """ super(ScheduleResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class ScriptReference(msrest.serialization.Model): @@ -29771,16 +28121,13 @@ class ScriptReference(msrest.serialization.Model): """ _attribute_map = { - 'script_source': {'key': 'scriptSource', 'type': 'str'}, - 'script_data': {'key': 'scriptData', 'type': 'str'}, - 'script_arguments': {'key': 'scriptArguments', 'type': 'str'}, - 'timeout': {'key': 'timeout', 'type': 'str'}, + "script_source": {"key": "scriptSource", "type": "str"}, + "script_data": {"key": "scriptData", "type": "str"}, + "script_arguments": {"key": "scriptArguments", "type": "str"}, + "timeout": {"key": "timeout", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword script_source: The storage source of the script: inline, workspace. :paramtype script_source: str @@ -29792,10 +28139,10 @@ def __init__( :paramtype timeout: str """ super(ScriptReference, self).__init__(**kwargs) - self.script_source = kwargs.get('script_source', None) - self.script_data = kwargs.get('script_data', None) - self.script_arguments = kwargs.get('script_arguments', None) - self.timeout = kwargs.get('timeout', None) + self.script_source = kwargs.get("script_source", None) + self.script_data = kwargs.get("script_data", None) + self.script_arguments = kwargs.get("script_arguments", None) + self.timeout = kwargs.get("timeout", None) class ScriptsToExecute(msrest.serialization.Model): @@ -29808,14 +28155,11 @@ class ScriptsToExecute(msrest.serialization.Model): """ _attribute_map = { - 'startup_script': {'key': 'startupScript', 'type': 'ScriptReference'}, - 'creation_script': {'key': 'creationScript', 'type': 'ScriptReference'}, + "startup_script": {"key": "startupScript", "type": "ScriptReference"}, + "creation_script": {"key": "creationScript", "type": "ScriptReference"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword startup_script: Script that's run every time the machine starts. :paramtype startup_script: ~azure.mgmt.machinelearningservices.models.ScriptReference @@ -29823,8 +28167,8 @@ def __init__( :paramtype creation_script: ~azure.mgmt.machinelearningservices.models.ScriptReference """ super(ScriptsToExecute, self).__init__(**kwargs) - self.startup_script = kwargs.get('startup_script', None) - self.creation_script = kwargs.get('creation_script', None) + self.startup_script = kwargs.get("startup_script", None) + self.creation_script = kwargs.get("creation_script", None) class SecretConfiguration(msrest.serialization.Model): @@ -29838,14 +28182,11 @@ class SecretConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - 'workspace_secret_name': {'key': 'workspaceSecretName', 'type': 'str'}, + "uri": {"key": "uri", "type": "str"}, + "workspace_secret_name": {"key": "workspaceSecretName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword uri: Secret Uri. Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion. @@ -29854,8 +28195,8 @@ def __init__( :paramtype workspace_secret_name: str """ super(SecretConfiguration, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) - self.workspace_secret_name = kwargs.get('workspace_secret_name', None) + self.uri = kwargs.get("uri", None) + self.workspace_secret_name = kwargs.get("workspace_secret_name", None) class ServerlessComputeSettings(msrest.serialization.Model): @@ -29870,14 +28211,11 @@ class ServerlessComputeSettings(msrest.serialization.Model): """ _attribute_map = { - 'serverless_compute_custom_subnet': {'key': 'serverlessComputeCustomSubnet', 'type': 'str'}, - 'serverless_compute_no_public_ip': {'key': 'serverlessComputeNoPublicIP', 'type': 'bool'}, + "serverless_compute_custom_subnet": {"key": "serverlessComputeCustomSubnet", "type": "str"}, + "serverless_compute_no_public_ip": {"key": "serverlessComputeNoPublicIP", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword serverless_compute_custom_subnet: The resource ID of an existing virtual network subnet in which serverless compute nodes should be deployed. @@ -29888,8 +28226,8 @@ def __init__( :paramtype serverless_compute_no_public_ip: bool """ super(ServerlessComputeSettings, self).__init__(**kwargs) - self.serverless_compute_custom_subnet = kwargs.get('serverless_compute_custom_subnet', None) - self.serverless_compute_no_public_ip = kwargs.get('serverless_compute_no_public_ip', None) + self.serverless_compute_custom_subnet = kwargs.get("serverless_compute_custom_subnet", None) + self.serverless_compute_no_public_ip = kwargs.get("serverless_compute_no_public_ip", None) class ServerlessEndpoint(TrackedResource): @@ -29926,31 +28264,28 @@ class ServerlessEndpoint(TrackedResource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "location": {"required": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServerlessEndpointProperties'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "tags": {"key": "tags", "type": "{str}"}, + "location": {"key": "location", "type": "str"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "properties": {"key": "properties", "type": "ServerlessEndpointProperties"}, + "sku": {"key": "sku", "type": "Sku"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword tags: A set of tags. Resource tags. :paramtype tags: dict[str, str] @@ -29967,10 +28302,10 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.Sku """ super(ServerlessEndpoint, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.properties = kwargs['properties'] - self.sku = kwargs.get('sku', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.properties = kwargs["properties"] + self.sku = kwargs.get("sku", None) class ServerlessEndpointCapacityReservation(msrest.serialization.Model): @@ -29987,18 +28322,15 @@ class ServerlessEndpointCapacityReservation(msrest.serialization.Model): """ _validation = { - 'capacity_reservation_group_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "capacity_reservation_group_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'capacity_reservation_group_id': {'key': 'capacityReservationGroupId', 'type': 'str'}, - 'endpoint_reserved_capacity': {'key': 'endpointReservedCapacity', 'type': 'int'}, + "capacity_reservation_group_id": {"key": "capacityReservationGroupId", "type": "str"}, + "endpoint_reserved_capacity": {"key": "endpointReservedCapacity", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword capacity_reservation_group_id: Required. [Required] Specifies a capacity reservation group ID to allocate capacity from. @@ -30008,8 +28340,8 @@ def __init__( :paramtype endpoint_reserved_capacity: int """ super(ServerlessEndpointCapacityReservation, self).__init__(**kwargs) - self.capacity_reservation_group_id = kwargs['capacity_reservation_group_id'] - self.endpoint_reserved_capacity = kwargs.get('endpoint_reserved_capacity', None) + self.capacity_reservation_group_id = kwargs["capacity_reservation_group_id"] + self.endpoint_reserved_capacity = kwargs.get("endpoint_reserved_capacity", None) class ServerlessEndpointProperties(msrest.serialization.Model): @@ -30050,27 +28382,24 @@ class ServerlessEndpointProperties(msrest.serialization.Model): """ _validation = { - 'inference_endpoint': {'readonly': True}, - 'marketplace_subscription_id': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'endpoint_state': {'readonly': True}, + "inference_endpoint": {"readonly": True}, + "marketplace_subscription_id": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "endpoint_state": {"readonly": True}, } _attribute_map = { - 'auth_mode': {'key': 'authMode', 'type': 'str'}, - 'capacity_reservation': {'key': 'capacityReservation', 'type': 'ServerlessEndpointCapacityReservation'}, - 'inference_endpoint': {'key': 'inferenceEndpoint', 'type': 'ServerlessInferenceEndpoint'}, - 'marketplace_subscription_id': {'key': 'marketplaceSubscriptionId', 'type': 'str'}, - 'model_settings': {'key': 'modelSettings', 'type': 'ModelSettings'}, - 'offer': {'key': 'offer', 'type': 'ServerlessOffer'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'endpoint_state': {'key': 'endpointState', 'type': 'str'}, + "auth_mode": {"key": "authMode", "type": "str"}, + "capacity_reservation": {"key": "capacityReservation", "type": "ServerlessEndpointCapacityReservation"}, + "inference_endpoint": {"key": "inferenceEndpoint", "type": "ServerlessInferenceEndpoint"}, + "marketplace_subscription_id": {"key": "marketplaceSubscriptionId", "type": "str"}, + "model_settings": {"key": "modelSettings", "type": "ModelSettings"}, + "offer": {"key": "offer", "type": "ServerlessOffer"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "endpoint_state": {"key": "endpointState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword auth_mode: Specifies the authentication mode for the Serverless endpoint. Possible values include: "Key", "AAD". @@ -30088,12 +28417,12 @@ def __init__( :paramtype offer: ~azure.mgmt.machinelearningservices.models.ServerlessOffer """ super(ServerlessEndpointProperties, self).__init__(**kwargs) - self.auth_mode = kwargs.get('auth_mode', None) - self.capacity_reservation = kwargs.get('capacity_reservation', None) + self.auth_mode = kwargs.get("auth_mode", None) + self.capacity_reservation = kwargs.get("capacity_reservation", None) self.inference_endpoint = None self.marketplace_subscription_id = None - self.model_settings = kwargs.get('model_settings', None) - self.offer = kwargs.get('offer', None) + self.model_settings = kwargs.get("model_settings", None) + self.offer = kwargs.get("offer", None) self.provisioning_state = None self.endpoint_state = None @@ -30108,19 +28437,15 @@ class ServerlessEndpointStatus(msrest.serialization.Model): """ _validation = { - 'metrics': {'readonly': True}, + "metrics": {"readonly": True}, } _attribute_map = { - 'metrics': {'key': 'metrics', 'type': '{str}'}, + "metrics": {"key": "metrics", "type": "{str}"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(ServerlessEndpointStatus, self).__init__(**kwargs) self.metrics = None @@ -30136,14 +28461,11 @@ class ServerlessEndpointTrackedResourceArmPaginatedResult(msrest.serialization.M """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[ServerlessEndpoint]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[ServerlessEndpoint]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. @@ -30152,8 +28474,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.ServerlessEndpoint] """ super(ServerlessEndpointTrackedResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class ServerlessInferenceEndpoint(msrest.serialization.Model): @@ -30171,19 +28493,16 @@ class ServerlessInferenceEndpoint(msrest.serialization.Model): """ _validation = { - 'headers': {'readonly': True}, - 'uri': {'required': True}, + "headers": {"readonly": True}, + "uri": {"required": True}, } _attribute_map = { - 'headers': {'key': 'headers', 'type': '{str}'}, - 'uri': {'key': 'uri', 'type': 'str'}, + "headers": {"key": "headers", "type": "{str}"}, + "uri": {"key": "uri", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword uri: Required. [Required] The inference uri to target when making requests against the Serverless Endpoint. @@ -30191,7 +28510,7 @@ def __init__( """ super(ServerlessInferenceEndpoint, self).__init__(**kwargs) self.headers = None - self.uri = kwargs['uri'] + self.uri = kwargs["uri"] class ServerlessOffer(msrest.serialization.Model): @@ -30206,19 +28525,16 @@ class ServerlessOffer(msrest.serialization.Model): """ _validation = { - 'offer_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'publisher': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "offer_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "publisher": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'offer_name': {'key': 'offerName', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, + "offer_name": {"key": "offerName", "type": "str"}, + "publisher": {"key": "publisher", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword offer_name: Required. [Required] The name of the Serverless Offer. :paramtype offer_name: str @@ -30226,8 +28542,8 @@ def __init__( :paramtype publisher: str """ super(ServerlessOffer, self).__init__(**kwargs) - self.offer_name = kwargs['offer_name'] - self.publisher = kwargs['publisher'] + self.offer_name = kwargs["offer_name"] + self.publisher = kwargs["publisher"] class ServiceManagedResourcesSettings(msrest.serialization.Model): @@ -30238,19 +28554,16 @@ class ServiceManagedResourcesSettings(msrest.serialization.Model): """ _attribute_map = { - 'cosmos_db': {'key': 'cosmosDb', 'type': 'CosmosDbSettings'}, + "cosmos_db": {"key": "cosmosDb", "type": "CosmosDbSettings"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword cosmos_db: :paramtype cosmos_db: ~azure.mgmt.machinelearningservices.models.CosmosDbSettings """ super(ServiceManagedResourcesSettings, self).__init__(**kwargs) - self.cosmos_db = kwargs.get('cosmos_db', None) + self.cosmos_db = kwargs.get("cosmos_db", None) class ServicePrincipalAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): @@ -30303,28 +28616,25 @@ class ServicePrincipalAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionP """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionServicePrincipal'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionServicePrincipal"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -30359,8 +28669,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionServicePrincipal """ super(ServicePrincipalAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'ServicePrincipal' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "ServicePrincipal" # type: str + self.credentials = kwargs.get("credentials", None) class ServicePrincipalDatastoreCredentials(DatastoreCredentials): @@ -30385,25 +28695,22 @@ class ServicePrincipalDatastoreCredentials(DatastoreCredentials): """ _validation = { - 'credentials_type': {'required': True}, - 'client_id': {'required': True}, - 'secrets': {'required': True}, - 'tenant_id': {'required': True}, + "credentials_type": {"required": True}, + "client_id": {"required": True}, + "secrets": {"required": True}, + "tenant_id": {"required": True}, } _attribute_map = { - 'credentials_type': {'key': 'credentialsType', 'type': 'str'}, - 'authority_url': {'key': 'authorityUrl', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, - 'secrets': {'key': 'secrets', 'type': 'ServicePrincipalDatastoreSecrets'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + "credentials_type": {"key": "credentialsType", "type": "str"}, + "authority_url": {"key": "authorityUrl", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "resource_url": {"key": "resourceUrl", "type": "str"}, + "secrets": {"key": "secrets", "type": "ServicePrincipalDatastoreSecrets"}, + "tenant_id": {"key": "tenantId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword authority_url: Authority URL used for authentication. :paramtype authority_url: str @@ -30418,12 +28725,12 @@ def __init__( :paramtype tenant_id: str """ super(ServicePrincipalDatastoreCredentials, self).__init__(**kwargs) - self.credentials_type = 'ServicePrincipal' # type: str - self.authority_url = kwargs.get('authority_url', None) - self.client_id = kwargs['client_id'] - self.resource_url = kwargs.get('resource_url', None) - self.secrets = kwargs['secrets'] - self.tenant_id = kwargs['tenant_id'] + self.credentials_type = "ServicePrincipal" # type: str + self.authority_url = kwargs.get("authority_url", None) + self.client_id = kwargs["client_id"] + self.resource_url = kwargs.get("resource_url", None) + self.secrets = kwargs["secrets"] + self.tenant_id = kwargs["tenant_id"] class ServicePrincipalDatastoreSecrets(DatastoreSecrets): @@ -30440,25 +28747,22 @@ class ServicePrincipalDatastoreSecrets(DatastoreSecrets): """ _validation = { - 'secrets_type': {'required': True}, + "secrets_type": {"required": True}, } _attribute_map = { - 'secrets_type': {'key': 'secretsType', 'type': 'str'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + "secrets_type": {"key": "secretsType", "type": "str"}, + "client_secret": {"key": "clientSecret", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword client_secret: Service principal secret. :paramtype client_secret: str """ super(ServicePrincipalDatastoreSecrets, self).__init__(**kwargs) - self.secrets_type = 'ServicePrincipal' # type: str - self.client_secret = kwargs.get('client_secret', None) + self.secrets_type = "ServicePrincipal" # type: str + self.client_secret = kwargs.get("client_secret", None) class ServiceTagDestination(msrest.serialization.Model): @@ -30479,21 +28783,18 @@ class ServiceTagDestination(msrest.serialization.Model): """ _validation = { - 'address_prefixes': {'readonly': True}, + "address_prefixes": {"readonly": True}, } _attribute_map = { - 'action': {'key': 'action', 'type': 'str'}, - 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, - 'port_ranges': {'key': 'portRanges', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'service_tag': {'key': 'serviceTag', 'type': 'str'}, + "action": {"key": "action", "type": "str"}, + "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + "port_ranges": {"key": "portRanges", "type": "str"}, + "protocol": {"key": "protocol", "type": "str"}, + "service_tag": {"key": "serviceTag", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword action: The action enum for networking rule. Possible values include: "Allow", "Deny". :paramtype action: str or ~azure.mgmt.machinelearningservices.models.RuleAction @@ -30505,11 +28806,11 @@ def __init__( :paramtype service_tag: str """ super(ServiceTagDestination, self).__init__(**kwargs) - self.action = kwargs.get('action', None) + self.action = kwargs.get("action", None) self.address_prefixes = None - self.port_ranges = kwargs.get('port_ranges', None) - self.protocol = kwargs.get('protocol', None) - self.service_tag = kwargs.get('service_tag', None) + self.port_ranges = kwargs.get("port_ranges", None) + self.protocol = kwargs.get("protocol", None) + self.service_tag = kwargs.get("service_tag", None) class ServiceTagOutboundRule(OutboundRule): @@ -30533,20 +28834,17 @@ class ServiceTagOutboundRule(OutboundRule): """ _validation = { - 'type': {'required': True}, + "type": {"required": True}, } _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'destination': {'key': 'destination', 'type': 'ServiceTagDestination'}, + "category": {"key": "category", "type": "str"}, + "status": {"key": "status", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "destination": {"key": "destination", "type": "ServiceTagDestination"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of a managed network Outbound Rule of a machine learning workspace. Possible values include: "Required", "Recommended", "UserDefined". @@ -30559,8 +28857,8 @@ def __init__( :paramtype destination: ~azure.mgmt.machinelearningservices.models.ServiceTagDestination """ super(ServiceTagOutboundRule, self).__init__(**kwargs) - self.type = 'ServiceTag' # type: str - self.destination = kwargs.get('destination', None) + self.type = "ServiceTag" # type: str + self.destination = kwargs.get("destination", None) class SetupScripts(msrest.serialization.Model): @@ -30571,19 +28869,16 @@ class SetupScripts(msrest.serialization.Model): """ _attribute_map = { - 'scripts': {'key': 'scripts', 'type': 'ScriptsToExecute'}, + "scripts": {"key": "scripts", "type": "ScriptsToExecute"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword scripts: Customized setup scripts. :paramtype scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute """ super(SetupScripts, self).__init__(**kwargs) - self.scripts = kwargs.get('scripts', None) + self.scripts = kwargs.get("scripts", None) class SharedPrivateLinkResource(msrest.serialization.Model): @@ -30604,17 +28899,14 @@ class SharedPrivateLinkResource(msrest.serialization.Model): """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'}, - 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "group_id": {"key": "properties.groupId", "type": "str"}, + "private_link_resource_id": {"key": "properties.privateLinkResourceId", "type": "str"}, + "request_message": {"key": "properties.requestMessage", "type": "str"}, + "status": {"key": "properties.status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Unique name of the private link. :paramtype name: str @@ -30630,11 +28922,11 @@ def __init__( ~azure.mgmt.machinelearningservices.models.EndpointServiceConnectionStatus """ super(SharedPrivateLinkResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.group_id = kwargs.get('group_id', None) - self.private_link_resource_id = kwargs.get('private_link_resource_id', None) - self.request_message = kwargs.get('request_message', None) - self.status = kwargs.get('status', None) + self.name = kwargs.get("name", None) + self.group_id = kwargs.get("group_id", None) + self.private_link_resource_id = kwargs.get("private_link_resource_id", None) + self.request_message = kwargs.get("request_message", None) + self.status = kwargs.get("status", None) class Sku(msrest.serialization.Model): @@ -30660,21 +28952,18 @@ class Sku(msrest.serialization.Model): """ _validation = { - 'name': {'required': True}, + "name": {"required": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, + "size": {"key": "size", "type": "str"}, + "family": {"key": "family", "type": "str"}, + "capacity": {"key": "capacity", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. :paramtype name: str @@ -30693,11 +28982,11 @@ def __init__( :paramtype capacity: int """ super(Sku, self).__init__(**kwargs) - self.name = kwargs['name'] - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) + self.name = kwargs["name"] + self.tier = kwargs.get("tier", None) + self.size = kwargs.get("size", None) + self.family = kwargs.get("family", None) + self.capacity = kwargs.get("capacity", None) class SkuCapacity(msrest.serialization.Model): @@ -30715,16 +29004,13 @@ class SkuCapacity(msrest.serialization.Model): """ _attribute_map = { - 'default': {'key': 'default', 'type': 'int'}, - 'maximum': {'key': 'maximum', 'type': 'int'}, - 'minimum': {'key': 'minimum', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, + "default": {"key": "default", "type": "int"}, + "maximum": {"key": "maximum", "type": "int"}, + "minimum": {"key": "minimum", "type": "int"}, + "scale_type": {"key": "scaleType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword default: Gets or sets the default capacity. :paramtype default: int @@ -30737,10 +29023,10 @@ def __init__( :paramtype scale_type: str or ~azure.mgmt.machinelearningservices.models.SkuScaleType """ super(SkuCapacity, self).__init__(**kwargs) - self.default = kwargs.get('default', 0) - self.maximum = kwargs.get('maximum', 0) - self.minimum = kwargs.get('minimum', 0) - self.scale_type = kwargs.get('scale_type', None) + self.default = kwargs.get("default", 0) + self.maximum = kwargs.get("maximum", 0) + self.minimum = kwargs.get("minimum", 0) + self.scale_type = kwargs.get("scale_type", None) class SkuResource(msrest.serialization.Model): @@ -30757,19 +29043,16 @@ class SkuResource(msrest.serialization.Model): """ _validation = { - 'resource_type': {'readonly': True}, + "resource_type": {"readonly": True}, } _attribute_map = { - 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'SkuSetting'}, + "capacity": {"key": "capacity", "type": "SkuCapacity"}, + "resource_type": {"key": "resourceType", "type": "str"}, + "sku": {"key": "sku", "type": "SkuSetting"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword capacity: Gets or sets the Sku Capacity. :paramtype capacity: ~azure.mgmt.machinelearningservices.models.SkuCapacity @@ -30777,9 +29060,9 @@ def __init__( :paramtype sku: ~azure.mgmt.machinelearningservices.models.SkuSetting """ super(SkuResource, self).__init__(**kwargs) - self.capacity = kwargs.get('capacity', None) + self.capacity = kwargs.get("capacity", None) self.resource_type = None - self.sku = kwargs.get('sku', None) + self.sku = kwargs.get("sku", None) class SkuResourceArmPaginatedResult(msrest.serialization.Model): @@ -30793,14 +29076,11 @@ class SkuResourceArmPaginatedResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[SkuResource]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[SkuResource]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page of SkuResource objects. If null, there are no additional pages. @@ -30809,8 +29089,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.SkuResource] """ super(SkuResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class SkuSetting(msrest.serialization.Model): @@ -30828,18 +29108,15 @@ class SkuSetting(msrest.serialization.Model): """ _validation = { - 'name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, + "name": {"key": "name", "type": "str"}, + "tier": {"key": "tier", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword name: Required. [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. @@ -30850,8 +29127,8 @@ def __init__( :paramtype tier: str or ~azure.mgmt.machinelearningservices.models.SkuTier """ super(SkuSetting, self).__init__(**kwargs) - self.name = kwargs['name'] - self.tier = kwargs.get('tier', None) + self.name = kwargs["name"] + self.tier = kwargs.get("tier", None) class SparkJob(JobBaseProperties): @@ -30929,47 +29206,44 @@ class SparkJob(JobBaseProperties): """ _validation = { - 'job_type': {'required': True}, - 'status': {'readonly': True}, - 'code_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'entry': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'compute_id': {'key': 'computeId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'experiment_name': {'key': 'experimentName', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'notification_setting': {'key': 'notificationSetting', 'type': 'NotificationSetting'}, - 'secrets_configuration': {'key': 'secretsConfiguration', 'type': '{SecretConfiguration}'}, - 'services': {'key': 'services', 'type': '{JobService}'}, - 'status': {'key': 'status', 'type': 'str'}, - 'archives': {'key': 'archives', 'type': '[str]'}, - 'args': {'key': 'args', 'type': 'str'}, - 'code_id': {'key': 'codeId', 'type': 'str'}, - 'conf': {'key': 'conf', 'type': '{str}'}, - 'entry': {'key': 'entry', 'type': 'SparkJobEntry'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'files': {'key': 'files', 'type': '[str]'}, - 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, - 'jars': {'key': 'jars', 'type': '[str]'}, - 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, - 'py_files': {'key': 'pyFiles', 'type': '[str]'}, - 'queue_settings': {'key': 'queueSettings', 'type': 'QueueSettings'}, - 'resources': {'key': 'resources', 'type': 'SparkResourceConfiguration'}, - } - - def __init__( - self, - **kwargs - ): + "job_type": {"required": True}, + "status": {"readonly": True}, + "code_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "entry": {"required": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "component_id": {"key": "componentId", "type": "str"}, + "compute_id": {"key": "computeId", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "experiment_name": {"key": "experimentName", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityConfiguration"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "job_type": {"key": "jobType", "type": "str"}, + "notification_setting": {"key": "notificationSetting", "type": "NotificationSetting"}, + "secrets_configuration": {"key": "secretsConfiguration", "type": "{SecretConfiguration}"}, + "services": {"key": "services", "type": "{JobService}"}, + "status": {"key": "status", "type": "str"}, + "archives": {"key": "archives", "type": "[str]"}, + "args": {"key": "args", "type": "str"}, + "code_id": {"key": "codeId", "type": "str"}, + "conf": {"key": "conf", "type": "{str}"}, + "entry": {"key": "entry", "type": "SparkJobEntry"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "files": {"key": "files", "type": "[str]"}, + "inputs": {"key": "inputs", "type": "{JobInput}"}, + "jars": {"key": "jars", "type": "[str]"}, + "outputs": {"key": "outputs", "type": "{JobOutput}"}, + "py_files": {"key": "pyFiles", "type": "[str]"}, + "queue_settings": {"key": "queueSettings", "type": "QueueSettings"}, + "resources": {"key": "resources", "type": "SparkResourceConfiguration"}, + } + + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -31030,21 +29304,21 @@ def __init__( :paramtype resources: ~azure.mgmt.machinelearningservices.models.SparkResourceConfiguration """ super(SparkJob, self).__init__(**kwargs) - self.job_type = 'Spark' # type: str - self.archives = kwargs.get('archives', None) - self.args = kwargs.get('args', None) - self.code_id = kwargs['code_id'] - self.conf = kwargs.get('conf', None) - self.entry = kwargs['entry'] - self.environment_id = kwargs.get('environment_id', None) - self.environment_variables = kwargs.get('environment_variables', None) - self.files = kwargs.get('files', None) - self.inputs = kwargs.get('inputs', None) - self.jars = kwargs.get('jars', None) - self.outputs = kwargs.get('outputs', None) - self.py_files = kwargs.get('py_files', None) - self.queue_settings = kwargs.get('queue_settings', None) - self.resources = kwargs.get('resources', None) + self.job_type = "Spark" # type: str + self.archives = kwargs.get("archives", None) + self.args = kwargs.get("args", None) + self.code_id = kwargs["code_id"] + self.conf = kwargs.get("conf", None) + self.entry = kwargs["entry"] + self.environment_id = kwargs.get("environment_id", None) + self.environment_variables = kwargs.get("environment_variables", None) + self.files = kwargs.get("files", None) + self.inputs = kwargs.get("inputs", None) + self.jars = kwargs.get("jars", None) + self.outputs = kwargs.get("outputs", None) + self.py_files = kwargs.get("py_files", None) + self.queue_settings = kwargs.get("queue_settings", None) + self.resources = kwargs.get("resources", None) class SparkJobEntry(msrest.serialization.Model): @@ -31062,24 +29336,22 @@ class SparkJobEntry(msrest.serialization.Model): """ _validation = { - 'spark_job_entry_type': {'required': True}, + "spark_job_entry_type": {"required": True}, } _attribute_map = { - 'spark_job_entry_type': {'key': 'sparkJobEntryType', 'type': 'str'}, + "spark_job_entry_type": {"key": "sparkJobEntryType", "type": "str"}, } _subtype_map = { - 'spark_job_entry_type': {'SparkJobPythonEntry': 'SparkJobPythonEntry', - 'SparkJobScalaEntry': 'SparkJobScalaEntry'} + "spark_job_entry_type": { + "SparkJobPythonEntry": "SparkJobPythonEntry", + "SparkJobScalaEntry": "SparkJobScalaEntry", + } } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(SparkJobEntry, self).__init__(**kwargs) self.spark_job_entry_type = None # type: Optional[str] @@ -31098,26 +29370,23 @@ class SparkJobPythonEntry(SparkJobEntry): """ _validation = { - 'spark_job_entry_type': {'required': True}, - 'file': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "spark_job_entry_type": {"required": True}, + "file": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'spark_job_entry_type': {'key': 'sparkJobEntryType', 'type': 'str'}, - 'file': {'key': 'file', 'type': 'str'}, + "spark_job_entry_type": {"key": "sparkJobEntryType", "type": "str"}, + "file": {"key": "file", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword file: Required. [Required] Relative python file path for job entry point. :paramtype file: str """ super(SparkJobPythonEntry, self).__init__(**kwargs) - self.spark_job_entry_type = 'SparkJobPythonEntry' # type: str - self.file = kwargs['file'] + self.spark_job_entry_type = "SparkJobPythonEntry" # type: str + self.file = kwargs["file"] class SparkJobScalaEntry(SparkJobEntry): @@ -31134,26 +29403,23 @@ class SparkJobScalaEntry(SparkJobEntry): """ _validation = { - 'spark_job_entry_type': {'required': True}, - 'class_name': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "spark_job_entry_type": {"required": True}, + "class_name": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'spark_job_entry_type': {'key': 'sparkJobEntryType', 'type': 'str'}, - 'class_name': {'key': 'className', 'type': 'str'}, + "spark_job_entry_type": {"key": "sparkJobEntryType", "type": "str"}, + "class_name": {"key": "className", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword class_name: Required. [Required] Scala class name used as entry point. :paramtype class_name: str """ super(SparkJobScalaEntry, self).__init__(**kwargs) - self.spark_job_entry_type = 'SparkJobScalaEntry' # type: str - self.class_name = kwargs['class_name'] + self.spark_job_entry_type = "SparkJobScalaEntry" # type: str + self.class_name = kwargs["class_name"] class SparkResourceConfiguration(msrest.serialization.Model): @@ -31166,14 +29432,11 @@ class SparkResourceConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'instance_type': {'key': 'instanceType', 'type': 'str'}, - 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, + "instance_type": {"key": "instanceType", "type": "str"}, + "runtime_version": {"key": "runtimeVersion", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword instance_type: Optional type of VM used as supported by the compute target. :paramtype instance_type: str @@ -31181,12 +29444,13 @@ def __init__( :paramtype runtime_version: str """ super(SparkResourceConfiguration, self).__init__(**kwargs) - self.instance_type = kwargs.get('instance_type', None) - self.runtime_version = kwargs.get('runtime_version', "3.1") + self.instance_type = kwargs.get("instance_type", None) + self.runtime_version = kwargs.get("runtime_version", "3.1") -class SpeechEndpointDeploymentResourceProperties(EndpointDeploymentResourceProperties, - CognitiveServiceEndpointDeploymentResourceProperties): +class SpeechEndpointDeploymentResourceProperties( + EndpointDeploymentResourceProperties, CognitiveServiceEndpointDeploymentResourceProperties +): """SpeechEndpointDeploymentResourceProperties. Variables are only populated by the server, and will be ignored when sending a request. @@ -31214,25 +29478,22 @@ class SpeechEndpointDeploymentResourceProperties(EndpointDeploymentResourcePrope """ _validation = { - 'model': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'type': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9._]'}, + "model": {"required": True}, + "provisioning_state": {"readonly": True}, + "type": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9._]"}, } _attribute_map = { - 'model': {'key': 'model', 'type': 'EndpointDeploymentModel'}, - 'rai_policy_name': {'key': 'raiPolicyName', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'CognitiveServicesSku'}, - 'version_upgrade_option': {'key': 'versionUpgradeOption', 'type': 'str'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + "model": {"key": "model", "type": "EndpointDeploymentModel"}, + "rai_policy_name": {"key": "raiPolicyName", "type": "str"}, + "sku": {"key": "sku", "type": "CognitiveServicesSku"}, + "version_upgrade_option": {"key": "versionUpgradeOption", "type": "str"}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "type": {"key": "type", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword model: Required. Model used for the endpoint deployment. :paramtype model: ~azure.mgmt.machinelearningservices.models.EndpointDeploymentModel @@ -31248,12 +29509,12 @@ def __init__( :paramtype failure_reason: str """ super(SpeechEndpointDeploymentResourceProperties, self).__init__(**kwargs) - self.model = kwargs['model'] - self.rai_policy_name = kwargs.get('rai_policy_name', None) - self.sku = kwargs.get('sku', None) - self.version_upgrade_option = kwargs.get('version_upgrade_option', None) - self.type = 'Azure.Speech' # type: str - self.failure_reason = kwargs.get('failure_reason', None) + self.model = kwargs["model"] + self.rai_policy_name = kwargs.get("rai_policy_name", None) + self.sku = kwargs.get("sku", None) + self.version_upgrade_option = kwargs.get("version_upgrade_option", None) + self.type = "Azure.Speech" # type: str + self.failure_reason = kwargs.get("failure_reason", None) self.provisioning_state = None @@ -31284,23 +29545,20 @@ class SpeechEndpointResourceProperties(EndpointResourceProperties): """ _validation = { - 'endpoint_type': {'required': True}, - 'provisioning_state': {'readonly': True}, + "endpoint_type": {"required": True}, + "provisioning_state": {"readonly": True}, } _attribute_map = { - 'associated_resource_id': {'key': 'associatedResourceId', 'type': 'str'}, - 'endpoint_type': {'key': 'endpointType', 'type': 'str'}, - 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, - 'failure_reason': {'key': 'failureReason', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + "associated_resource_id": {"key": "associatedResourceId", "type": "str"}, + "endpoint_type": {"key": "endpointType", "type": "str"}, + "endpoint_uri": {"key": "endpointUri", "type": "str"}, + "failure_reason": {"key": "failureReason", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword associated_resource_id: Byo resource id for creating the built-in model service endpoints. @@ -31313,7 +29571,7 @@ def __init__( :paramtype name: str """ super(SpeechEndpointResourceProperties, self).__init__(**kwargs) - self.endpoint_type = 'Azure.Speech' # type: str + self.endpoint_type = "Azure.Speech" # type: str class SslConfiguration(msrest.serialization.Model): @@ -31335,18 +29593,15 @@ class SslConfiguration(msrest.serialization.Model): """ _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'cert': {'key': 'cert', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'cname': {'key': 'cname', 'type': 'str'}, - 'leaf_domain_label': {'key': 'leafDomainLabel', 'type': 'str'}, - 'overwrite_existing_domain': {'key': 'overwriteExistingDomain', 'type': 'bool'}, + "status": {"key": "status", "type": "str"}, + "cert": {"key": "cert", "type": "str"}, + "key": {"key": "key", "type": "str"}, + "cname": {"key": "cname", "type": "str"}, + "leaf_domain_label": {"key": "leafDomainLabel", "type": "str"}, + "overwrite_existing_domain": {"key": "overwriteExistingDomain", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword status: Enable or disable ssl for scoring. Possible values include: "Disabled", "Enabled", "Auto". @@ -31363,12 +29618,12 @@ def __init__( :paramtype overwrite_existing_domain: bool """ super(SslConfiguration, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.cert = kwargs.get('cert', None) - self.key = kwargs.get('key', None) - self.cname = kwargs.get('cname', None) - self.leaf_domain_label = kwargs.get('leaf_domain_label', None) - self.overwrite_existing_domain = kwargs.get('overwrite_existing_domain', None) + self.status = kwargs.get("status", None) + self.cert = kwargs.get("cert", None) + self.key = kwargs.get("key", None) + self.cname = kwargs.get("cname", None) + self.leaf_domain_label = kwargs.get("leaf_domain_label", None) + self.overwrite_existing_domain = kwargs.get("overwrite_existing_domain", None) class StackEnsembleSettings(msrest.serialization.Model): @@ -31390,15 +29645,12 @@ class StackEnsembleSettings(msrest.serialization.Model): """ _attribute_map = { - 'stack_meta_learner_k_wargs': {'key': 'stackMetaLearnerKWargs', 'type': 'object'}, - 'stack_meta_learner_train_percentage': {'key': 'stackMetaLearnerTrainPercentage', 'type': 'float'}, - 'stack_meta_learner_type': {'key': 'stackMetaLearnerType', 'type': 'str'}, + "stack_meta_learner_k_wargs": {"key": "stackMetaLearnerKWargs", "type": "object"}, + "stack_meta_learner_train_percentage": {"key": "stackMetaLearnerTrainPercentage", "type": "float"}, + "stack_meta_learner_type": {"key": "stackMetaLearnerType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword stack_meta_learner_k_wargs: Optional parameters to pass to the initializer of the meta-learner. @@ -31415,9 +29667,9 @@ def __init__( ~azure.mgmt.machinelearningservices.models.StackMetaLearnerType """ super(StackEnsembleSettings, self).__init__(**kwargs) - self.stack_meta_learner_k_wargs = kwargs.get('stack_meta_learner_k_wargs', None) - self.stack_meta_learner_train_percentage = kwargs.get('stack_meta_learner_train_percentage', 0.2) - self.stack_meta_learner_type = kwargs.get('stack_meta_learner_type', None) + self.stack_meta_learner_k_wargs = kwargs.get("stack_meta_learner_k_wargs", None) + self.stack_meta_learner_train_percentage = kwargs.get("stack_meta_learner_train_percentage", 0.2) + self.stack_meta_learner_type = kwargs.get("stack_meta_learner_type", None) class StaticInputData(MonitoringInputDataBase): @@ -31448,28 +29700,25 @@ class StaticInputData(MonitoringInputDataBase): """ _validation = { - 'input_data_type': {'required': True}, - 'job_input_type': {'required': True}, - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'window_end': {'required': True}, - 'window_start': {'required': True}, + "input_data_type": {"required": True}, + "job_input_type": {"required": True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "window_end": {"required": True}, + "window_start": {"required": True}, } _attribute_map = { - 'columns': {'key': 'columns', 'type': '{str}'}, - 'data_context': {'key': 'dataContext', 'type': 'str'}, - 'input_data_type': {'key': 'inputDataType', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'preprocessing_component_id': {'key': 'preprocessingComponentId', 'type': 'str'}, - 'window_end': {'key': 'windowEnd', 'type': 'iso-8601'}, - 'window_start': {'key': 'windowStart', 'type': 'iso-8601'}, + "columns": {"key": "columns", "type": "{str}"}, + "data_context": {"key": "dataContext", "type": "str"}, + "input_data_type": {"key": "inputDataType", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "preprocessing_component_id": {"key": "preprocessingComponentId", "type": "str"}, + "window_end": {"key": "windowEnd", "type": "iso-8601"}, + "window_start": {"key": "windowStart", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword columns: Mapping of column names to special uses. :paramtype columns: dict[str, str] @@ -31490,10 +29739,10 @@ def __init__( :paramtype window_start: ~datetime.datetime """ super(StaticInputData, self).__init__(**kwargs) - self.input_data_type = 'Static' # type: str - self.preprocessing_component_id = kwargs.get('preprocessing_component_id', None) - self.window_end = kwargs['window_end'] - self.window_start = kwargs['window_start'] + self.input_data_type = "Static" # type: str + self.preprocessing_component_id = kwargs.get("preprocessing_component_id", None) + self.window_end = kwargs["window_end"] + self.window_start = kwargs["window_start"] class StatusMessage(msrest.serialization.Model): @@ -31513,25 +29762,21 @@ class StatusMessage(msrest.serialization.Model): """ _validation = { - 'code': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'level': {'readonly': True}, - 'message': {'readonly': True}, + "code": {"readonly": True}, + "created_date_time": {"readonly": True}, + "level": {"readonly": True}, + "message": {"readonly": True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'level': {'key': 'level', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + "code": {"key": "code", "type": "str"}, + "created_date_time": {"key": "createdDateTime", "type": "iso-8601"}, + "level": {"key": "level", "type": "str"}, + "message": {"key": "message", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(StatusMessage, self).__init__(**kwargs) self.code = None self.created_date_time = None @@ -31553,14 +29798,11 @@ class StorageAccountDetails(msrest.serialization.Model): """ _attribute_map = { - 'system_created_storage_account': {'key': 'systemCreatedStorageAccount', 'type': 'SystemCreatedStorageAccount'}, - 'user_created_storage_account': {'key': 'userCreatedStorageAccount', 'type': 'UserCreatedStorageAccount'}, + "system_created_storage_account": {"key": "systemCreatedStorageAccount", "type": "SystemCreatedStorageAccount"}, + "user_created_storage_account": {"key": "userCreatedStorageAccount", "type": "UserCreatedStorageAccount"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword system_created_storage_account: Details of system created storage account to be used for the registry. @@ -31572,8 +29814,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.UserCreatedStorageAccount """ super(StorageAccountDetails, self).__init__(**kwargs) - self.system_created_storage_account = kwargs.get('system_created_storage_account', None) - self.user_created_storage_account = kwargs.get('user_created_storage_account', None) + self.system_created_storage_account = kwargs.get("system_created_storage_account", None) + self.user_created_storage_account = kwargs.get("user_created_storage_account", None) class SweepJob(JobBaseProperties): @@ -31648,46 +29890,43 @@ class SweepJob(JobBaseProperties): """ _validation = { - 'job_type': {'required': True}, - 'status': {'readonly': True}, - 'objective': {'required': True}, - 'sampling_algorithm': {'required': True}, - 'search_space': {'required': True}, - 'trial': {'required': True}, - } - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'component_id': {'key': 'componentId', 'type': 'str'}, - 'compute_id': {'key': 'computeId', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'experiment_name': {'key': 'experimentName', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'IdentityConfiguration'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'job_type': {'key': 'jobType', 'type': 'str'}, - 'notification_setting': {'key': 'notificationSetting', 'type': 'NotificationSetting'}, - 'secrets_configuration': {'key': 'secretsConfiguration', 'type': '{SecretConfiguration}'}, - 'services': {'key': 'services', 'type': '{JobService}'}, - 'status': {'key': 'status', 'type': 'str'}, - 'component_configuration': {'key': 'componentConfiguration', 'type': 'ComponentConfiguration'}, - 'early_termination': {'key': 'earlyTermination', 'type': 'EarlyTerminationPolicy'}, - 'inputs': {'key': 'inputs', 'type': '{JobInput}'}, - 'limits': {'key': 'limits', 'type': 'SweepJobLimits'}, - 'objective': {'key': 'objective', 'type': 'Objective'}, - 'outputs': {'key': 'outputs', 'type': '{JobOutput}'}, - 'queue_settings': {'key': 'queueSettings', 'type': 'QueueSettings'}, - 'resources': {'key': 'resources', 'type': 'JobResourceConfiguration'}, - 'sampling_algorithm': {'key': 'samplingAlgorithm', 'type': 'SamplingAlgorithm'}, - 'search_space': {'key': 'searchSpace', 'type': 'object'}, - 'trial': {'key': 'trial', 'type': 'TrialComponent'}, - } - - def __init__( - self, - **kwargs - ): + "job_type": {"required": True}, + "status": {"readonly": True}, + "objective": {"required": True}, + "sampling_algorithm": {"required": True}, + "search_space": {"required": True}, + "trial": {"required": True}, + } + + _attribute_map = { + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "component_id": {"key": "componentId", "type": "str"}, + "compute_id": {"key": "computeId", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "experiment_name": {"key": "experimentName", "type": "str"}, + "identity": {"key": "identity", "type": "IdentityConfiguration"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "job_type": {"key": "jobType", "type": "str"}, + "notification_setting": {"key": "notificationSetting", "type": "NotificationSetting"}, + "secrets_configuration": {"key": "secretsConfiguration", "type": "{SecretConfiguration}"}, + "services": {"key": "services", "type": "{JobService}"}, + "status": {"key": "status", "type": "str"}, + "component_configuration": {"key": "componentConfiguration", "type": "ComponentConfiguration"}, + "early_termination": {"key": "earlyTermination", "type": "EarlyTerminationPolicy"}, + "inputs": {"key": "inputs", "type": "{JobInput}"}, + "limits": {"key": "limits", "type": "SweepJobLimits"}, + "objective": {"key": "objective", "type": "Objective"}, + "outputs": {"key": "outputs", "type": "{JobOutput}"}, + "queue_settings": {"key": "queueSettings", "type": "QueueSettings"}, + "resources": {"key": "resources", "type": "JobResourceConfiguration"}, + "sampling_algorithm": {"key": "samplingAlgorithm", "type": "SamplingAlgorithm"}, + "search_space": {"key": "searchSpace", "type": "object"}, + "trial": {"key": "trial", "type": "TrialComponent"}, + } + + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -31745,18 +29984,18 @@ def __init__( :paramtype trial: ~azure.mgmt.machinelearningservices.models.TrialComponent """ super(SweepJob, self).__init__(**kwargs) - self.job_type = 'Sweep' # type: str - self.component_configuration = kwargs.get('component_configuration', None) - self.early_termination = kwargs.get('early_termination', None) - self.inputs = kwargs.get('inputs', None) - self.limits = kwargs.get('limits', None) - self.objective = kwargs['objective'] - self.outputs = kwargs.get('outputs', None) - self.queue_settings = kwargs.get('queue_settings', None) - self.resources = kwargs.get('resources', None) - self.sampling_algorithm = kwargs['sampling_algorithm'] - self.search_space = kwargs['search_space'] - self.trial = kwargs['trial'] + self.job_type = "Sweep" # type: str + self.component_configuration = kwargs.get("component_configuration", None) + self.early_termination = kwargs.get("early_termination", None) + self.inputs = kwargs.get("inputs", None) + self.limits = kwargs.get("limits", None) + self.objective = kwargs["objective"] + self.outputs = kwargs.get("outputs", None) + self.queue_settings = kwargs.get("queue_settings", None) + self.resources = kwargs.get("resources", None) + self.sampling_algorithm = kwargs["sampling_algorithm"] + self.search_space = kwargs["search_space"] + self.trial = kwargs["trial"] class SweepJobLimits(JobLimits): @@ -31779,21 +30018,18 @@ class SweepJobLimits(JobLimits): """ _validation = { - 'job_limits_type': {'required': True}, + "job_limits_type": {"required": True}, } _attribute_map = { - 'job_limits_type': {'key': 'jobLimitsType', 'type': 'str'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, - 'max_concurrent_trials': {'key': 'maxConcurrentTrials', 'type': 'int'}, - 'max_total_trials': {'key': 'maxTotalTrials', 'type': 'int'}, - 'trial_timeout': {'key': 'trialTimeout', 'type': 'duration'}, + "job_limits_type": {"key": "jobLimitsType", "type": "str"}, + "timeout": {"key": "timeout", "type": "duration"}, + "max_concurrent_trials": {"key": "maxConcurrentTrials", "type": "int"}, + "max_total_trials": {"key": "maxTotalTrials", "type": "int"}, + "trial_timeout": {"key": "trialTimeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword timeout: The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. @@ -31806,10 +30042,10 @@ def __init__( :paramtype trial_timeout: ~datetime.timedelta """ super(SweepJobLimits, self).__init__(**kwargs) - self.job_limits_type = 'Sweep' # type: str - self.max_concurrent_trials = kwargs.get('max_concurrent_trials', None) - self.max_total_trials = kwargs.get('max_total_trials', None) - self.trial_timeout = kwargs.get('trial_timeout', None) + self.job_limits_type = "Sweep" # type: str + self.max_concurrent_trials = kwargs.get("max_concurrent_trials", None) + self.max_total_trials = kwargs.get("max_total_trials", None) + self.trial_timeout = kwargs.get("trial_timeout", None) class SynapseSpark(Compute): @@ -31851,32 +30087,29 @@ class SynapseSpark(Compute): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, + "properties": {"key": "properties", "type": "SynapseSparkProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword compute_location: Location for the underlying compute. :paramtype compute_location: str @@ -31891,8 +30124,8 @@ def __init__( :paramtype properties: ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties """ super(SynapseSpark, self).__init__(**kwargs) - self.compute_type = 'SynapseSpark' # type: str - self.properties = kwargs.get('properties', None) + self.compute_type = "SynapseSpark" # type: str + self.properties = kwargs.get("properties", None) class SynapseSparkProperties(msrest.serialization.Model): @@ -31921,22 +30154,19 @@ class SynapseSparkProperties(msrest.serialization.Model): """ _attribute_map = { - 'auto_scale_properties': {'key': 'autoScaleProperties', 'type': 'AutoScaleProperties'}, - 'auto_pause_properties': {'key': 'autoPauseProperties', 'type': 'AutoPauseProperties'}, - 'spark_version': {'key': 'sparkVersion', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'node_size': {'key': 'nodeSize', 'type': 'str'}, - 'node_size_family': {'key': 'nodeSizeFamily', 'type': 'str'}, - 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, - 'pool_name': {'key': 'poolName', 'type': 'str'}, + "auto_scale_properties": {"key": "autoScaleProperties", "type": "AutoScaleProperties"}, + "auto_pause_properties": {"key": "autoPauseProperties", "type": "AutoPauseProperties"}, + "spark_version": {"key": "sparkVersion", "type": "str"}, + "node_count": {"key": "nodeCount", "type": "int"}, + "node_size": {"key": "nodeSize", "type": "str"}, + "node_size_family": {"key": "nodeSizeFamily", "type": "str"}, + "subscription_id": {"key": "subscriptionId", "type": "str"}, + "resource_group": {"key": "resourceGroup", "type": "str"}, + "workspace_name": {"key": "workspaceName", "type": "str"}, + "pool_name": {"key": "poolName", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword auto_scale_properties: Auto scale properties. :paramtype auto_scale_properties: @@ -31962,16 +30192,16 @@ def __init__( :paramtype pool_name: str """ super(SynapseSparkProperties, self).__init__(**kwargs) - self.auto_scale_properties = kwargs.get('auto_scale_properties', None) - self.auto_pause_properties = kwargs.get('auto_pause_properties', None) - self.spark_version = kwargs.get('spark_version', None) - self.node_count = kwargs.get('node_count', None) - self.node_size = kwargs.get('node_size', None) - self.node_size_family = kwargs.get('node_size_family', None) - self.subscription_id = kwargs.get('subscription_id', None) - self.resource_group = kwargs.get('resource_group', None) - self.workspace_name = kwargs.get('workspace_name', None) - self.pool_name = kwargs.get('pool_name', None) + self.auto_scale_properties = kwargs.get("auto_scale_properties", None) + self.auto_pause_properties = kwargs.get("auto_pause_properties", None) + self.spark_version = kwargs.get("spark_version", None) + self.node_count = kwargs.get("node_count", None) + self.node_size = kwargs.get("node_size", None) + self.node_size_family = kwargs.get("node_size_family", None) + self.subscription_id = kwargs.get("subscription_id", None) + self.resource_group = kwargs.get("resource_group", None) + self.workspace_name = kwargs.get("workspace_name", None) + self.pool_name = kwargs.get("pool_name", None) class SystemCreatedAcrAccount(msrest.serialization.Model): @@ -31986,15 +30216,12 @@ class SystemCreatedAcrAccount(msrest.serialization.Model): """ _attribute_map = { - 'acr_account_name': {'key': 'acrAccountName', 'type': 'str'}, - 'acr_account_sku': {'key': 'acrAccountSku', 'type': 'str'}, - 'arm_resource_id': {'key': 'armResourceId', 'type': 'ArmResourceId'}, + "acr_account_name": {"key": "acrAccountName", "type": "str"}, + "acr_account_sku": {"key": "acrAccountSku", "type": "str"}, + "arm_resource_id": {"key": "armResourceId", "type": "ArmResourceId"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword acr_account_name: Name of the ACR account. :paramtype acr_account_name: str @@ -32004,9 +30231,9 @@ def __init__( :paramtype arm_resource_id: ~azure.mgmt.machinelearningservices.models.ArmResourceId """ super(SystemCreatedAcrAccount, self).__init__(**kwargs) - self.acr_account_name = kwargs.get('acr_account_name', None) - self.acr_account_sku = kwargs.get('acr_account_sku', None) - self.arm_resource_id = kwargs.get('arm_resource_id', None) + self.acr_account_name = kwargs.get("acr_account_name", None) + self.acr_account_sku = kwargs.get("acr_account_sku", None) + self.arm_resource_id = kwargs.get("arm_resource_id", None) class SystemCreatedStorageAccount(msrest.serialization.Model): @@ -32033,17 +30260,14 @@ class SystemCreatedStorageAccount(msrest.serialization.Model): """ _attribute_map = { - 'allow_blob_public_access': {'key': 'allowBlobPublicAccess', 'type': 'bool'}, - 'arm_resource_id': {'key': 'armResourceId', 'type': 'ArmResourceId'}, - 'storage_account_hns_enabled': {'key': 'storageAccountHnsEnabled', 'type': 'bool'}, - 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, - 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + "allow_blob_public_access": {"key": "allowBlobPublicAccess", "type": "bool"}, + "arm_resource_id": {"key": "armResourceId", "type": "ArmResourceId"}, + "storage_account_hns_enabled": {"key": "storageAccountHnsEnabled", "type": "bool"}, + "storage_account_name": {"key": "storageAccountName", "type": "str"}, + "storage_account_type": {"key": "storageAccountType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword allow_blob_public_access: Public blob access allowed. :paramtype allow_blob_public_access: bool @@ -32065,11 +30289,11 @@ def __init__( :paramtype storage_account_type: str """ super(SystemCreatedStorageAccount, self).__init__(**kwargs) - self.allow_blob_public_access = kwargs.get('allow_blob_public_access', None) - self.arm_resource_id = kwargs.get('arm_resource_id', None) - self.storage_account_hns_enabled = kwargs.get('storage_account_hns_enabled', None) - self.storage_account_name = kwargs.get('storage_account_name', None) - self.storage_account_type = kwargs.get('storage_account_type', None) + self.allow_blob_public_access = kwargs.get("allow_blob_public_access", None) + self.arm_resource_id = kwargs.get("arm_resource_id", None) + self.storage_account_hns_enabled = kwargs.get("storage_account_hns_enabled", None) + self.storage_account_name = kwargs.get("storage_account_name", None) + self.storage_account_type = kwargs.get("storage_account_type", None) class SystemData(msrest.serialization.Model): @@ -32092,18 +30316,15 @@ class SystemData(msrest.serialization.Model): """ _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + "created_by": {"key": "createdBy", "type": "str"}, + "created_by_type": {"key": "createdByType", "type": "str"}, + "created_at": {"key": "createdAt", "type": "iso-8601"}, + "last_modified_by": {"key": "lastModifiedBy", "type": "str"}, + "last_modified_by_type": {"key": "lastModifiedByType", "type": "str"}, + "last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -32122,12 +30343,12 @@ def __init__( :paramtype last_modified_at: ~datetime.datetime """ super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) + self.created_by = kwargs.get("created_by", None) + self.created_by_type = kwargs.get("created_by_type", None) + self.created_at = kwargs.get("created_at", None) + self.last_modified_by = kwargs.get("last_modified_by", None) + self.last_modified_by_type = kwargs.get("last_modified_by_type", None) + self.last_modified_at = kwargs.get("last_modified_at", None) class SystemService(msrest.serialization.Model): @@ -32144,23 +30365,19 @@ class SystemService(msrest.serialization.Model): """ _validation = { - 'system_service_type': {'readonly': True}, - 'public_ip_address': {'readonly': True}, - 'version': {'readonly': True}, + "system_service_type": {"readonly": True}, + "public_ip_address": {"readonly": True}, + "version": {"readonly": True}, } _attribute_map = { - 'system_service_type': {'key': 'systemServiceType', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, + "system_service_type": {"key": "systemServiceType", "type": "str"}, + "public_ip_address": {"key": "publicIpAddress", "type": "str"}, + "version": {"key": "version", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(SystemService, self).__init__(**kwargs) self.system_service_type = None self.public_ip_address = None @@ -32215,32 +30432,29 @@ class TableFixedParameters(msrest.serialization.Model): """ _attribute_map = { - 'booster': {'key': 'booster', 'type': 'str'}, - 'boosting_type': {'key': 'boostingType', 'type': 'str'}, - 'grow_policy': {'key': 'growPolicy', 'type': 'str'}, - 'learning_rate': {'key': 'learningRate', 'type': 'float'}, - 'max_bin': {'key': 'maxBin', 'type': 'int'}, - 'max_depth': {'key': 'maxDepth', 'type': 'int'}, - 'max_leaves': {'key': 'maxLeaves', 'type': 'int'}, - 'min_data_in_leaf': {'key': 'minDataInLeaf', 'type': 'int'}, - 'min_split_gain': {'key': 'minSplitGain', 'type': 'float'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'n_estimators': {'key': 'nEstimators', 'type': 'int'}, - 'num_leaves': {'key': 'numLeaves', 'type': 'int'}, - 'preprocessor_name': {'key': 'preprocessorName', 'type': 'str'}, - 'reg_alpha': {'key': 'regAlpha', 'type': 'float'}, - 'reg_lambda': {'key': 'regLambda', 'type': 'float'}, - 'subsample': {'key': 'subsample', 'type': 'float'}, - 'subsample_freq': {'key': 'subsampleFreq', 'type': 'float'}, - 'tree_method': {'key': 'treeMethod', 'type': 'str'}, - 'with_mean': {'key': 'withMean', 'type': 'bool'}, - 'with_std': {'key': 'withStd', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): + "booster": {"key": "booster", "type": "str"}, + "boosting_type": {"key": "boostingType", "type": "str"}, + "grow_policy": {"key": "growPolicy", "type": "str"}, + "learning_rate": {"key": "learningRate", "type": "float"}, + "max_bin": {"key": "maxBin", "type": "int"}, + "max_depth": {"key": "maxDepth", "type": "int"}, + "max_leaves": {"key": "maxLeaves", "type": "int"}, + "min_data_in_leaf": {"key": "minDataInLeaf", "type": "int"}, + "min_split_gain": {"key": "minSplitGain", "type": "float"}, + "model_name": {"key": "modelName", "type": "str"}, + "n_estimators": {"key": "nEstimators", "type": "int"}, + "num_leaves": {"key": "numLeaves", "type": "int"}, + "preprocessor_name": {"key": "preprocessorName", "type": "str"}, + "reg_alpha": {"key": "regAlpha", "type": "float"}, + "reg_lambda": {"key": "regLambda", "type": "float"}, + "subsample": {"key": "subsample", "type": "float"}, + "subsample_freq": {"key": "subsampleFreq", "type": "float"}, + "tree_method": {"key": "treeMethod", "type": "str"}, + "with_mean": {"key": "withMean", "type": "bool"}, + "with_std": {"key": "withStd", "type": "bool"}, + } + + def __init__(self, **kwargs): """ :keyword booster: Specify the boosting type, e.g gbdt for XGBoost. :paramtype booster: str @@ -32286,26 +30500,26 @@ def __init__( :paramtype with_std: bool """ super(TableFixedParameters, self).__init__(**kwargs) - self.booster = kwargs.get('booster', None) - self.boosting_type = kwargs.get('boosting_type', None) - self.grow_policy = kwargs.get('grow_policy', None) - self.learning_rate = kwargs.get('learning_rate', None) - self.max_bin = kwargs.get('max_bin', None) - self.max_depth = kwargs.get('max_depth', None) - self.max_leaves = kwargs.get('max_leaves', None) - self.min_data_in_leaf = kwargs.get('min_data_in_leaf', None) - self.min_split_gain = kwargs.get('min_split_gain', None) - self.model_name = kwargs.get('model_name', None) - self.n_estimators = kwargs.get('n_estimators', None) - self.num_leaves = kwargs.get('num_leaves', None) - self.preprocessor_name = kwargs.get('preprocessor_name', None) - self.reg_alpha = kwargs.get('reg_alpha', None) - self.reg_lambda = kwargs.get('reg_lambda', None) - self.subsample = kwargs.get('subsample', None) - self.subsample_freq = kwargs.get('subsample_freq', None) - self.tree_method = kwargs.get('tree_method', None) - self.with_mean = kwargs.get('with_mean', False) - self.with_std = kwargs.get('with_std', False) + self.booster = kwargs.get("booster", None) + self.boosting_type = kwargs.get("boosting_type", None) + self.grow_policy = kwargs.get("grow_policy", None) + self.learning_rate = kwargs.get("learning_rate", None) + self.max_bin = kwargs.get("max_bin", None) + self.max_depth = kwargs.get("max_depth", None) + self.max_leaves = kwargs.get("max_leaves", None) + self.min_data_in_leaf = kwargs.get("min_data_in_leaf", None) + self.min_split_gain = kwargs.get("min_split_gain", None) + self.model_name = kwargs.get("model_name", None) + self.n_estimators = kwargs.get("n_estimators", None) + self.num_leaves = kwargs.get("num_leaves", None) + self.preprocessor_name = kwargs.get("preprocessor_name", None) + self.reg_alpha = kwargs.get("reg_alpha", None) + self.reg_lambda = kwargs.get("reg_lambda", None) + self.subsample = kwargs.get("subsample", None) + self.subsample_freq = kwargs.get("subsample_freq", None) + self.tree_method = kwargs.get("tree_method", None) + self.with_mean = kwargs.get("with_mean", False) + self.with_std = kwargs.get("with_std", False) class TableParameterSubspace(msrest.serialization.Model): @@ -32356,32 +30570,29 @@ class TableParameterSubspace(msrest.serialization.Model): """ _attribute_map = { - 'booster': {'key': 'booster', 'type': 'str'}, - 'boosting_type': {'key': 'boostingType', 'type': 'str'}, - 'grow_policy': {'key': 'growPolicy', 'type': 'str'}, - 'learning_rate': {'key': 'learningRate', 'type': 'str'}, - 'max_bin': {'key': 'maxBin', 'type': 'str'}, - 'max_depth': {'key': 'maxDepth', 'type': 'str'}, - 'max_leaves': {'key': 'maxLeaves', 'type': 'str'}, - 'min_data_in_leaf': {'key': 'minDataInLeaf', 'type': 'str'}, - 'min_split_gain': {'key': 'minSplitGain', 'type': 'str'}, - 'model_name': {'key': 'modelName', 'type': 'str'}, - 'n_estimators': {'key': 'nEstimators', 'type': 'str'}, - 'num_leaves': {'key': 'numLeaves', 'type': 'str'}, - 'preprocessor_name': {'key': 'preprocessorName', 'type': 'str'}, - 'reg_alpha': {'key': 'regAlpha', 'type': 'str'}, - 'reg_lambda': {'key': 'regLambda', 'type': 'str'}, - 'subsample': {'key': 'subsample', 'type': 'str'}, - 'subsample_freq': {'key': 'subsampleFreq', 'type': 'str'}, - 'tree_method': {'key': 'treeMethod', 'type': 'str'}, - 'with_mean': {'key': 'withMean', 'type': 'str'}, - 'with_std': {'key': 'withStd', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): + "booster": {"key": "booster", "type": "str"}, + "boosting_type": {"key": "boostingType", "type": "str"}, + "grow_policy": {"key": "growPolicy", "type": "str"}, + "learning_rate": {"key": "learningRate", "type": "str"}, + "max_bin": {"key": "maxBin", "type": "str"}, + "max_depth": {"key": "maxDepth", "type": "str"}, + "max_leaves": {"key": "maxLeaves", "type": "str"}, + "min_data_in_leaf": {"key": "minDataInLeaf", "type": "str"}, + "min_split_gain": {"key": "minSplitGain", "type": "str"}, + "model_name": {"key": "modelName", "type": "str"}, + "n_estimators": {"key": "nEstimators", "type": "str"}, + "num_leaves": {"key": "numLeaves", "type": "str"}, + "preprocessor_name": {"key": "preprocessorName", "type": "str"}, + "reg_alpha": {"key": "regAlpha", "type": "str"}, + "reg_lambda": {"key": "regLambda", "type": "str"}, + "subsample": {"key": "subsample", "type": "str"}, + "subsample_freq": {"key": "subsampleFreq", "type": "str"}, + "tree_method": {"key": "treeMethod", "type": "str"}, + "with_mean": {"key": "withMean", "type": "str"}, + "with_std": {"key": "withStd", "type": "str"}, + } + + def __init__(self, **kwargs): """ :keyword booster: Specify the boosting type, e.g gbdt for XGBoost. :paramtype booster: str @@ -32427,26 +30638,26 @@ def __init__( :paramtype with_std: str """ super(TableParameterSubspace, self).__init__(**kwargs) - self.booster = kwargs.get('booster', None) - self.boosting_type = kwargs.get('boosting_type', None) - self.grow_policy = kwargs.get('grow_policy', None) - self.learning_rate = kwargs.get('learning_rate', None) - self.max_bin = kwargs.get('max_bin', None) - self.max_depth = kwargs.get('max_depth', None) - self.max_leaves = kwargs.get('max_leaves', None) - self.min_data_in_leaf = kwargs.get('min_data_in_leaf', None) - self.min_split_gain = kwargs.get('min_split_gain', None) - self.model_name = kwargs.get('model_name', None) - self.n_estimators = kwargs.get('n_estimators', None) - self.num_leaves = kwargs.get('num_leaves', None) - self.preprocessor_name = kwargs.get('preprocessor_name', None) - self.reg_alpha = kwargs.get('reg_alpha', None) - self.reg_lambda = kwargs.get('reg_lambda', None) - self.subsample = kwargs.get('subsample', None) - self.subsample_freq = kwargs.get('subsample_freq', None) - self.tree_method = kwargs.get('tree_method', None) - self.with_mean = kwargs.get('with_mean', None) - self.with_std = kwargs.get('with_std', None) + self.booster = kwargs.get("booster", None) + self.boosting_type = kwargs.get("boosting_type", None) + self.grow_policy = kwargs.get("grow_policy", None) + self.learning_rate = kwargs.get("learning_rate", None) + self.max_bin = kwargs.get("max_bin", None) + self.max_depth = kwargs.get("max_depth", None) + self.max_leaves = kwargs.get("max_leaves", None) + self.min_data_in_leaf = kwargs.get("min_data_in_leaf", None) + self.min_split_gain = kwargs.get("min_split_gain", None) + self.model_name = kwargs.get("model_name", None) + self.n_estimators = kwargs.get("n_estimators", None) + self.num_leaves = kwargs.get("num_leaves", None) + self.preprocessor_name = kwargs.get("preprocessor_name", None) + self.reg_alpha = kwargs.get("reg_alpha", None) + self.reg_lambda = kwargs.get("reg_lambda", None) + self.subsample = kwargs.get("subsample", None) + self.subsample_freq = kwargs.get("subsample_freq", None) + self.tree_method = kwargs.get("tree_method", None) + self.with_mean = kwargs.get("with_mean", None) + self.with_std = kwargs.get("with_std", None) class TableSweepSettings(msrest.serialization.Model): @@ -32463,18 +30674,15 @@ class TableSweepSettings(msrest.serialization.Model): """ _validation = { - 'sampling_algorithm': {'required': True}, + "sampling_algorithm": {"required": True}, } _attribute_map = { - 'early_termination': {'key': 'earlyTermination', 'type': 'EarlyTerminationPolicy'}, - 'sampling_algorithm': {'key': 'samplingAlgorithm', 'type': 'str'}, + "early_termination": {"key": "earlyTermination", "type": "EarlyTerminationPolicy"}, + "sampling_algorithm": {"key": "samplingAlgorithm", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword early_termination: Type of early termination policy for the sweeping job. :paramtype early_termination: ~azure.mgmt.machinelearningservices.models.EarlyTerminationPolicy @@ -32484,8 +30692,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.SamplingAlgorithmType """ super(TableSweepSettings, self).__init__(**kwargs) - self.early_termination = kwargs.get('early_termination', None) - self.sampling_algorithm = kwargs['sampling_algorithm'] + self.early_termination = kwargs.get("early_termination", None) + self.sampling_algorithm = kwargs["sampling_algorithm"] class TableVerticalFeaturizationSettings(FeaturizationSettings): @@ -32515,18 +30723,15 @@ class TableVerticalFeaturizationSettings(FeaturizationSettings): """ _attribute_map = { - 'dataset_language': {'key': 'datasetLanguage', 'type': 'str'}, - 'blocked_transformers': {'key': 'blockedTransformers', 'type': '[str]'}, - 'column_name_and_types': {'key': 'columnNameAndTypes', 'type': '{str}'}, - 'enable_dnn_featurization': {'key': 'enableDnnFeaturization', 'type': 'bool'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'transformer_params': {'key': 'transformerParams', 'type': '{[ColumnTransformer]}'}, + "dataset_language": {"key": "datasetLanguage", "type": "str"}, + "blocked_transformers": {"key": "blockedTransformers", "type": "[str]"}, + "column_name_and_types": {"key": "columnNameAndTypes", "type": "{str}"}, + "enable_dnn_featurization": {"key": "enableDnnFeaturization", "type": "bool"}, + "mode": {"key": "mode", "type": "str"}, + "transformer_params": {"key": "transformerParams", "type": "{[ColumnTransformer]}"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword dataset_language: Dataset language, useful for the text data. :paramtype dataset_language: str @@ -32551,11 +30756,11 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.ColumnTransformer]] """ super(TableVerticalFeaturizationSettings, self).__init__(**kwargs) - self.blocked_transformers = kwargs.get('blocked_transformers', None) - self.column_name_and_types = kwargs.get('column_name_and_types', None) - self.enable_dnn_featurization = kwargs.get('enable_dnn_featurization', False) - self.mode = kwargs.get('mode', None) - self.transformer_params = kwargs.get('transformer_params', None) + self.blocked_transformers = kwargs.get("blocked_transformers", None) + self.column_name_and_types = kwargs.get("column_name_and_types", None) + self.enable_dnn_featurization = kwargs.get("enable_dnn_featurization", False) + self.mode = kwargs.get("mode", None) + self.transformer_params = kwargs.get("transformer_params", None) class TableVerticalLimitSettings(msrest.serialization.Model): @@ -32585,22 +30790,19 @@ class TableVerticalLimitSettings(msrest.serialization.Model): """ _attribute_map = { - 'enable_early_termination': {'key': 'enableEarlyTermination', 'type': 'bool'}, - 'exit_score': {'key': 'exitScore', 'type': 'float'}, - 'max_concurrent_trials': {'key': 'maxConcurrentTrials', 'type': 'int'}, - 'max_cores_per_trial': {'key': 'maxCoresPerTrial', 'type': 'int'}, - 'max_nodes': {'key': 'maxNodes', 'type': 'int'}, - 'max_trials': {'key': 'maxTrials', 'type': 'int'}, - 'sweep_concurrent_trials': {'key': 'sweepConcurrentTrials', 'type': 'int'}, - 'sweep_trials': {'key': 'sweepTrials', 'type': 'int'}, - 'timeout': {'key': 'timeout', 'type': 'duration'}, - 'trial_timeout': {'key': 'trialTimeout', 'type': 'duration'}, + "enable_early_termination": {"key": "enableEarlyTermination", "type": "bool"}, + "exit_score": {"key": "exitScore", "type": "float"}, + "max_concurrent_trials": {"key": "maxConcurrentTrials", "type": "int"}, + "max_cores_per_trial": {"key": "maxCoresPerTrial", "type": "int"}, + "max_nodes": {"key": "maxNodes", "type": "int"}, + "max_trials": {"key": "maxTrials", "type": "int"}, + "sweep_concurrent_trials": {"key": "sweepConcurrentTrials", "type": "int"}, + "sweep_trials": {"key": "sweepTrials", "type": "int"}, + "timeout": {"key": "timeout", "type": "duration"}, + "trial_timeout": {"key": "trialTimeout", "type": "duration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword enable_early_termination: Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. @@ -32626,16 +30828,16 @@ def __init__( :paramtype trial_timeout: ~datetime.timedelta """ super(TableVerticalLimitSettings, self).__init__(**kwargs) - self.enable_early_termination = kwargs.get('enable_early_termination', True) - self.exit_score = kwargs.get('exit_score', None) - self.max_concurrent_trials = kwargs.get('max_concurrent_trials', 1) - self.max_cores_per_trial = kwargs.get('max_cores_per_trial', -1) - self.max_nodes = kwargs.get('max_nodes', 1) - self.max_trials = kwargs.get('max_trials', 1000) - self.sweep_concurrent_trials = kwargs.get('sweep_concurrent_trials', 0) - self.sweep_trials = kwargs.get('sweep_trials', 0) - self.timeout = kwargs.get('timeout', "PT6H") - self.trial_timeout = kwargs.get('trial_timeout', "PT30M") + self.enable_early_termination = kwargs.get("enable_early_termination", True) + self.exit_score = kwargs.get("exit_score", None) + self.max_concurrent_trials = kwargs.get("max_concurrent_trials", 1) + self.max_cores_per_trial = kwargs.get("max_cores_per_trial", -1) + self.max_nodes = kwargs.get("max_nodes", 1) + self.max_trials = kwargs.get("max_trials", 1000) + self.sweep_concurrent_trials = kwargs.get("sweep_concurrent_trials", 0) + self.sweep_trials = kwargs.get("sweep_trials", 0) + self.timeout = kwargs.get("timeout", "PT6H") + self.trial_timeout = kwargs.get("trial_timeout", "PT30M") class TargetUtilizationScaleSettings(OnlineScaleSettings): @@ -32659,21 +30861,18 @@ class TargetUtilizationScaleSettings(OnlineScaleSettings): """ _validation = { - 'scale_type': {'required': True}, + "scale_type": {"required": True}, } _attribute_map = { - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - 'max_instances': {'key': 'maxInstances', 'type': 'int'}, - 'min_instances': {'key': 'minInstances', 'type': 'int'}, - 'polling_interval': {'key': 'pollingInterval', 'type': 'duration'}, - 'target_utilization_percentage': {'key': 'targetUtilizationPercentage', 'type': 'int'}, + "scale_type": {"key": "scaleType", "type": "str"}, + "max_instances": {"key": "maxInstances", "type": "int"}, + "min_instances": {"key": "minInstances", "type": "int"}, + "polling_interval": {"key": "pollingInterval", "type": "duration"}, + "target_utilization_percentage": {"key": "targetUtilizationPercentage", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword max_instances: The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. @@ -32687,11 +30886,11 @@ def __init__( :paramtype target_utilization_percentage: int """ super(TargetUtilizationScaleSettings, self).__init__(**kwargs) - self.scale_type = 'TargetUtilization' # type: str - self.max_instances = kwargs.get('max_instances', 1) - self.min_instances = kwargs.get('min_instances', 1) - self.polling_interval = kwargs.get('polling_interval', "PT1S") - self.target_utilization_percentage = kwargs.get('target_utilization_percentage', 70) + self.scale_type = "TargetUtilization" # type: str + self.max_instances = kwargs.get("max_instances", 1) + self.min_instances = kwargs.get("min_instances", 1) + self.polling_interval = kwargs.get("polling_interval", "PT1S") + self.target_utilization_percentage = kwargs.get("target_utilization_percentage", 70) class TensorFlow(DistributionConfiguration): @@ -32710,19 +30909,16 @@ class TensorFlow(DistributionConfiguration): """ _validation = { - 'distribution_type': {'required': True}, + "distribution_type": {"required": True}, } _attribute_map = { - 'distribution_type': {'key': 'distributionType', 'type': 'str'}, - 'parameter_server_count': {'key': 'parameterServerCount', 'type': 'int'}, - 'worker_count': {'key': 'workerCount', 'type': 'int'}, + "distribution_type": {"key": "distributionType", "type": "str"}, + "parameter_server_count": {"key": "parameterServerCount", "type": "int"}, + "worker_count": {"key": "workerCount", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword parameter_server_count: Number of parameter server tasks. :paramtype parameter_server_count: int @@ -32730,75 +30926,72 @@ def __init__( :paramtype worker_count: int """ super(TensorFlow, self).__init__(**kwargs) - self.distribution_type = 'TensorFlow' # type: str - self.parameter_server_count = kwargs.get('parameter_server_count', 0) - self.worker_count = kwargs.get('worker_count', None) + self.distribution_type = "TensorFlow" # type: str + self.parameter_server_count = kwargs.get("parameter_server_count", 0) + self.worker_count = kwargs.get("worker_count", None) class TextClassification(AutoMLVertical, NlpVertical): """Text Classification task in AutoML NLP vertical. -NLP - Natural Language Processing. + NLP - Natural Language Processing. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar featurization_settings: Featurization inputs needed for AutoML job. - :vartype featurization_settings: - ~azure.mgmt.machinelearningservices.models.NlpVerticalFeaturizationSettings - :ivar fixed_parameters: Model/training parameters that will remain constant throughout - training. - :vartype fixed_parameters: ~azure.mgmt.machinelearningservices.models.NlpFixedParameters - :ivar limit_settings: Execution constraints for AutoMLJob. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.NlpVerticalLimitSettings - :ivar search_space: Search space for sampling different combinations of models and their - hyperparameters. - :vartype search_space: list[~azure.mgmt.machinelearningservices.models.NlpParameterSubspace] - :ivar sweep_settings: Settings for model sweeping and hyperparameter tuning. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.NlpSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", - "Info", "Warning", "Error", "Critical". - :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity - :ivar target_column_name: Target column name: This is prediction values column. - Also known as label column name in context of classification tasks. - :vartype target_column_name: str - :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. - Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", - "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", - "TextClassification", "TextClassificationMultilabel", "TextNER". - :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType - :ivar training_data: Required. [Required] Training data input. - :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar primary_metric: Primary metric for Text-Classification task. Possible values include: - "AUCWeighted", "Accuracy", "NormMacroRecall", "AveragePrecisionScoreWeighted", - "PrecisionScoreWeighted". - :vartype primary_metric: str or - ~azure.mgmt.machinelearningservices.models.ClassificationPrimaryMetrics + :ivar featurization_settings: Featurization inputs needed for AutoML job. + :vartype featurization_settings: + ~azure.mgmt.machinelearningservices.models.NlpVerticalFeaturizationSettings + :ivar fixed_parameters: Model/training parameters that will remain constant throughout + training. + :vartype fixed_parameters: ~azure.mgmt.machinelearningservices.models.NlpFixedParameters + :ivar limit_settings: Execution constraints for AutoMLJob. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.NlpVerticalLimitSettings + :ivar search_space: Search space for sampling different combinations of models and their + hyperparameters. + :vartype search_space: list[~azure.mgmt.machinelearningservices.models.NlpParameterSubspace] + :ivar sweep_settings: Settings for model sweeping and hyperparameter tuning. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.NlpSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", + "Info", "Warning", "Error", "Critical". + :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity + :ivar target_column_name: Target column name: This is prediction values column. + Also known as label column name in context of classification tasks. + :vartype target_column_name: str + :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. + Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", + "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", + "TextClassification", "TextClassificationMultilabel", "TextNER". + :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType + :ivar training_data: Required. [Required] Training data input. + :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar primary_metric: Primary metric for Text-Classification task. Possible values include: + "AUCWeighted", "Accuracy", "NormMacroRecall", "AveragePrecisionScoreWeighted", + "PrecisionScoreWeighted". + :vartype primary_metric: str or + ~azure.mgmt.machinelearningservices.models.ClassificationPrimaryMetrics """ _validation = { - 'task_type': {'required': True}, - 'training_data': {'required': True}, + "task_type": {"required": True}, + "training_data": {"required": True}, } _attribute_map = { - 'featurization_settings': {'key': 'featurizationSettings', 'type': 'NlpVerticalFeaturizationSettings'}, - 'fixed_parameters': {'key': 'fixedParameters', 'type': 'NlpFixedParameters'}, - 'limit_settings': {'key': 'limitSettings', 'type': 'NlpVerticalLimitSettings'}, - 'search_space': {'key': 'searchSpace', 'type': '[NlpParameterSubspace]'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'NlpSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + "featurization_settings": {"key": "featurizationSettings", "type": "NlpVerticalFeaturizationSettings"}, + "fixed_parameters": {"key": "fixedParameters", "type": "NlpFixedParameters"}, + "limit_settings": {"key": "limitSettings", "type": "NlpVerticalLimitSettings"}, + "search_space": {"key": "searchSpace", "type": "[NlpParameterSubspace]"}, + "sweep_settings": {"key": "sweepSettings", "type": "NlpSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword featurization_settings: Featurization inputs needed for AutoML job. :paramtype featurization_settings: @@ -32830,87 +31023,84 @@ def __init__( ~azure.mgmt.machinelearningservices.models.ClassificationPrimaryMetrics """ super(TextClassification, self).__init__(**kwargs) - self.featurization_settings = kwargs.get('featurization_settings', None) - self.fixed_parameters = kwargs.get('fixed_parameters', None) - self.limit_settings = kwargs.get('limit_settings', None) - self.search_space = kwargs.get('search_space', None) - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) - self.task_type = 'TextClassification' # type: str - self.primary_metric = kwargs.get('primary_metric', None) - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.featurization_settings = kwargs.get("featurization_settings", None) + self.fixed_parameters = kwargs.get("fixed_parameters", None) + self.limit_settings = kwargs.get("limit_settings", None) + self.search_space = kwargs.get("search_space", None) + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) + self.task_type = "TextClassification" # type: str + self.primary_metric = kwargs.get("primary_metric", None) + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class TextClassificationMultilabel(AutoMLVertical, NlpVertical): """Text Classification Multilabel task in AutoML NLP vertical. -NLP - Natural Language Processing. + NLP - Natural Language Processing. - Variables are only populated by the server, and will be ignored when sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar featurization_settings: Featurization inputs needed for AutoML job. - :vartype featurization_settings: - ~azure.mgmt.machinelearningservices.models.NlpVerticalFeaturizationSettings - :ivar fixed_parameters: Model/training parameters that will remain constant throughout - training. - :vartype fixed_parameters: ~azure.mgmt.machinelearningservices.models.NlpFixedParameters - :ivar limit_settings: Execution constraints for AutoMLJob. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.NlpVerticalLimitSettings - :ivar search_space: Search space for sampling different combinations of models and their - hyperparameters. - :vartype search_space: list[~azure.mgmt.machinelearningservices.models.NlpParameterSubspace] - :ivar sweep_settings: Settings for model sweeping and hyperparameter tuning. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.NlpSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", - "Info", "Warning", "Error", "Critical". - :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity - :ivar target_column_name: Target column name: This is prediction values column. - Also known as label column name in context of classification tasks. - :vartype target_column_name: str - :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. - Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", - "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", - "TextClassification", "TextClassificationMultilabel", "TextNER". - :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType - :ivar training_data: Required. [Required] Training data input. - :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar primary_metric: Primary metric for Text-Classification-Multilabel task. - Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. - Possible values include: "AUCWeighted", "Accuracy", "NormMacroRecall", - "AveragePrecisionScoreWeighted", "PrecisionScoreWeighted", "IOU". - :vartype primary_metric: str or - ~azure.mgmt.machinelearningservices.models.ClassificationMultilabelPrimaryMetrics + :ivar featurization_settings: Featurization inputs needed for AutoML job. + :vartype featurization_settings: + ~azure.mgmt.machinelearningservices.models.NlpVerticalFeaturizationSettings + :ivar fixed_parameters: Model/training parameters that will remain constant throughout + training. + :vartype fixed_parameters: ~azure.mgmt.machinelearningservices.models.NlpFixedParameters + :ivar limit_settings: Execution constraints for AutoMLJob. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.NlpVerticalLimitSettings + :ivar search_space: Search space for sampling different combinations of models and their + hyperparameters. + :vartype search_space: list[~azure.mgmt.machinelearningservices.models.NlpParameterSubspace] + :ivar sweep_settings: Settings for model sweeping and hyperparameter tuning. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.NlpSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", + "Info", "Warning", "Error", "Critical". + :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity + :ivar target_column_name: Target column name: This is prediction values column. + Also known as label column name in context of classification tasks. + :vartype target_column_name: str + :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. + Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", + "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", + "TextClassification", "TextClassificationMultilabel", "TextNER". + :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType + :ivar training_data: Required. [Required] Training data input. + :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar primary_metric: Primary metric for Text-Classification-Multilabel task. + Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + Possible values include: "AUCWeighted", "Accuracy", "NormMacroRecall", + "AveragePrecisionScoreWeighted", "PrecisionScoreWeighted", "IOU". + :vartype primary_metric: str or + ~azure.mgmt.machinelearningservices.models.ClassificationMultilabelPrimaryMetrics """ _validation = { - 'task_type': {'required': True}, - 'training_data': {'required': True}, - 'primary_metric': {'readonly': True}, + "task_type": {"required": True}, + "training_data": {"required": True}, + "primary_metric": {"readonly": True}, } _attribute_map = { - 'featurization_settings': {'key': 'featurizationSettings', 'type': 'NlpVerticalFeaturizationSettings'}, - 'fixed_parameters': {'key': 'fixedParameters', 'type': 'NlpFixedParameters'}, - 'limit_settings': {'key': 'limitSettings', 'type': 'NlpVerticalLimitSettings'}, - 'search_space': {'key': 'searchSpace', 'type': '[NlpParameterSubspace]'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'NlpSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + "featurization_settings": {"key": "featurizationSettings", "type": "NlpVerticalFeaturizationSettings"}, + "fixed_parameters": {"key": "fixedParameters", "type": "NlpFixedParameters"}, + "limit_settings": {"key": "limitSettings", "type": "NlpVerticalLimitSettings"}, + "search_space": {"key": "searchSpace", "type": "[NlpParameterSubspace]"}, + "sweep_settings": {"key": "sweepSettings", "type": "NlpSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword featurization_settings: Featurization inputs needed for AutoML job. :paramtype featurization_settings: @@ -32937,88 +31127,85 @@ def __init__( :paramtype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput """ super(TextClassificationMultilabel, self).__init__(**kwargs) - self.featurization_settings = kwargs.get('featurization_settings', None) - self.fixed_parameters = kwargs.get('fixed_parameters', None) - self.limit_settings = kwargs.get('limit_settings', None) - self.search_space = kwargs.get('search_space', None) - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) - self.task_type = 'TextClassificationMultilabel' # type: str + self.featurization_settings = kwargs.get("featurization_settings", None) + self.fixed_parameters = kwargs.get("fixed_parameters", None) + self.limit_settings = kwargs.get("limit_settings", None) + self.search_space = kwargs.get("search_space", None) + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) + self.task_type = "TextClassificationMultilabel" # type: str self.primary_metric = None - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class TextNer(AutoMLVertical, NlpVertical): """Text-NER task in AutoML NLP vertical. -NER - Named Entity Recognition. -NLP - Natural Language Processing. + NER - Named Entity Recognition. + NLP - Natural Language Processing. - Variables are only populated by the server, and will be ignored when sending a request. + Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. + All required parameters must be populated in order to send to Azure. - :ivar featurization_settings: Featurization inputs needed for AutoML job. - :vartype featurization_settings: - ~azure.mgmt.machinelearningservices.models.NlpVerticalFeaturizationSettings - :ivar fixed_parameters: Model/training parameters that will remain constant throughout - training. - :vartype fixed_parameters: ~azure.mgmt.machinelearningservices.models.NlpFixedParameters - :ivar limit_settings: Execution constraints for AutoMLJob. - :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.NlpVerticalLimitSettings - :ivar search_space: Search space for sampling different combinations of models and their - hyperparameters. - :vartype search_space: list[~azure.mgmt.machinelearningservices.models.NlpParameterSubspace] - :ivar sweep_settings: Settings for model sweeping and hyperparameter tuning. - :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.NlpSweepSettings - :ivar validation_data: Validation data inputs. - :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", - "Info", "Warning", "Error", "Critical". - :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity - :ivar target_column_name: Target column name: This is prediction values column. - Also known as label column name in context of classification tasks. - :vartype target_column_name: str - :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. - Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", - "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", - "TextClassification", "TextClassificationMultilabel", "TextNER". - :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType - :ivar training_data: Required. [Required] Training data input. - :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput - :ivar primary_metric: Primary metric for Text-NER task. - Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. Possible - values include: "AUCWeighted", "Accuracy", "NormMacroRecall", "AveragePrecisionScoreWeighted", - "PrecisionScoreWeighted". - :vartype primary_metric: str or - ~azure.mgmt.machinelearningservices.models.ClassificationPrimaryMetrics + :ivar featurization_settings: Featurization inputs needed for AutoML job. + :vartype featurization_settings: + ~azure.mgmt.machinelearningservices.models.NlpVerticalFeaturizationSettings + :ivar fixed_parameters: Model/training parameters that will remain constant throughout + training. + :vartype fixed_parameters: ~azure.mgmt.machinelearningservices.models.NlpFixedParameters + :ivar limit_settings: Execution constraints for AutoMLJob. + :vartype limit_settings: ~azure.mgmt.machinelearningservices.models.NlpVerticalLimitSettings + :ivar search_space: Search space for sampling different combinations of models and their + hyperparameters. + :vartype search_space: list[~azure.mgmt.machinelearningservices.models.NlpParameterSubspace] + :ivar sweep_settings: Settings for model sweeping and hyperparameter tuning. + :vartype sweep_settings: ~azure.mgmt.machinelearningservices.models.NlpSweepSettings + :ivar validation_data: Validation data inputs. + :vartype validation_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar log_verbosity: Log verbosity for the job. Possible values include: "NotSet", "Debug", + "Info", "Warning", "Error", "Critical". + :vartype log_verbosity: str or ~azure.mgmt.machinelearningservices.models.LogVerbosity + :ivar target_column_name: Target column name: This is prediction values column. + Also known as label column name in context of classification tasks. + :vartype target_column_name: str + :ivar task_type: Required. [Required] Task type for AutoMLJob.Constant filled by server. + Possible values include: "Classification", "Regression", "Forecasting", "ImageClassification", + "ImageClassificationMultilabel", "ImageObjectDetection", "ImageInstanceSegmentation", + "TextClassification", "TextClassificationMultilabel", "TextNER". + :vartype task_type: str or ~azure.mgmt.machinelearningservices.models.TaskType + :ivar training_data: Required. [Required] Training data input. + :vartype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput + :ivar primary_metric: Primary metric for Text-NER task. + Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. Possible + values include: "AUCWeighted", "Accuracy", "NormMacroRecall", "AveragePrecisionScoreWeighted", + "PrecisionScoreWeighted". + :vartype primary_metric: str or + ~azure.mgmt.machinelearningservices.models.ClassificationPrimaryMetrics """ _validation = { - 'task_type': {'required': True}, - 'training_data': {'required': True}, - 'primary_metric': {'readonly': True}, + "task_type": {"required": True}, + "training_data": {"required": True}, + "primary_metric": {"readonly": True}, } _attribute_map = { - 'featurization_settings': {'key': 'featurizationSettings', 'type': 'NlpVerticalFeaturizationSettings'}, - 'fixed_parameters': {'key': 'fixedParameters', 'type': 'NlpFixedParameters'}, - 'limit_settings': {'key': 'limitSettings', 'type': 'NlpVerticalLimitSettings'}, - 'search_space': {'key': 'searchSpace', 'type': '[NlpParameterSubspace]'}, - 'sweep_settings': {'key': 'sweepSettings', 'type': 'NlpSweepSettings'}, - 'validation_data': {'key': 'validationData', 'type': 'MLTableJobInput'}, - 'log_verbosity': {'key': 'logVerbosity', 'type': 'str'}, - 'target_column_name': {'key': 'targetColumnName', 'type': 'str'}, - 'task_type': {'key': 'taskType', 'type': 'str'}, - 'training_data': {'key': 'trainingData', 'type': 'MLTableJobInput'}, - 'primary_metric': {'key': 'primaryMetric', 'type': 'str'}, + "featurization_settings": {"key": "featurizationSettings", "type": "NlpVerticalFeaturizationSettings"}, + "fixed_parameters": {"key": "fixedParameters", "type": "NlpFixedParameters"}, + "limit_settings": {"key": "limitSettings", "type": "NlpVerticalLimitSettings"}, + "search_space": {"key": "searchSpace", "type": "[NlpParameterSubspace]"}, + "sweep_settings": {"key": "sweepSettings", "type": "NlpSweepSettings"}, + "validation_data": {"key": "validationData", "type": "MLTableJobInput"}, + "log_verbosity": {"key": "logVerbosity", "type": "str"}, + "target_column_name": {"key": "targetColumnName", "type": "str"}, + "task_type": {"key": "taskType", "type": "str"}, + "training_data": {"key": "trainingData", "type": "MLTableJobInput"}, + "primary_metric": {"key": "primaryMetric", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword featurization_settings: Featurization inputs needed for AutoML job. :paramtype featurization_settings: @@ -33045,17 +31232,17 @@ def __init__( :paramtype training_data: ~azure.mgmt.machinelearningservices.models.MLTableJobInput """ super(TextNer, self).__init__(**kwargs) - self.featurization_settings = kwargs.get('featurization_settings', None) - self.fixed_parameters = kwargs.get('fixed_parameters', None) - self.limit_settings = kwargs.get('limit_settings', None) - self.search_space = kwargs.get('search_space', None) - self.sweep_settings = kwargs.get('sweep_settings', None) - self.validation_data = kwargs.get('validation_data', None) - self.task_type = 'TextNER' # type: str + self.featurization_settings = kwargs.get("featurization_settings", None) + self.fixed_parameters = kwargs.get("fixed_parameters", None) + self.limit_settings = kwargs.get("limit_settings", None) + self.search_space = kwargs.get("search_space", None) + self.sweep_settings = kwargs.get("sweep_settings", None) + self.validation_data = kwargs.get("validation_data", None) + self.task_type = "TextNER" # type: str self.primary_metric = None - self.log_verbosity = kwargs.get('log_verbosity', None) - self.target_column_name = kwargs.get('target_column_name', None) - self.training_data = kwargs['training_data'] + self.log_verbosity = kwargs.get("log_verbosity", None) + self.target_column_name = kwargs.get("target_column_name", None) + self.training_data = kwargs["training_data"] class ThrottlingRule(msrest.serialization.Model): @@ -33076,18 +31263,15 @@ class ThrottlingRule(msrest.serialization.Model): """ _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, - 'renewal_period': {'key': 'renewalPeriod', 'type': 'float'}, - 'count': {'key': 'count', 'type': 'float'}, - 'min_count': {'key': 'minCount', 'type': 'float'}, - 'dynamic_throttling_enabled': {'key': 'dynamicThrottlingEnabled', 'type': 'bool'}, - 'match_patterns': {'key': 'matchPatterns', 'type': '[RequestMatchPattern]'}, + "key": {"key": "key", "type": "str"}, + "renewal_period": {"key": "renewalPeriod", "type": "float"}, + "count": {"key": "count", "type": "float"}, + "min_count": {"key": "minCount", "type": "float"}, + "dynamic_throttling_enabled": {"key": "dynamicThrottlingEnabled", "type": "bool"}, + "match_patterns": {"key": "matchPatterns", "type": "[RequestMatchPattern]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key: :paramtype key: str @@ -33103,12 +31287,12 @@ def __init__( :paramtype match_patterns: list[~azure.mgmt.machinelearningservices.models.RequestMatchPattern] """ super(ThrottlingRule, self).__init__(**kwargs) - self.key = kwargs.get('key', None) - self.renewal_period = kwargs.get('renewal_period', None) - self.count = kwargs.get('count', None) - self.min_count = kwargs.get('min_count', None) - self.dynamic_throttling_enabled = kwargs.get('dynamic_throttling_enabled', None) - self.match_patterns = kwargs.get('match_patterns', None) + self.key = kwargs.get("key", None) + self.renewal_period = kwargs.get("renewal_period", None) + self.count = kwargs.get("count", None) + self.min_count = kwargs.get("min_count", None) + self.dynamic_throttling_enabled = kwargs.get("dynamic_throttling_enabled", None) + self.match_patterns = kwargs.get("match_patterns", None) class TmpfsOptions(msrest.serialization.Model): @@ -33119,19 +31303,16 @@ class TmpfsOptions(msrest.serialization.Model): """ _attribute_map = { - 'size': {'key': 'size', 'type': 'int'}, + "size": {"key": "size", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword size: Mention the Tmpfs size. :paramtype size: int """ super(TmpfsOptions, self).__init__(**kwargs) - self.size = kwargs.get('size', None) + self.size = kwargs.get("size", None) class TopNFeaturesByAttribution(MonitoringFeatureFilterBase): @@ -33149,25 +31330,22 @@ class TopNFeaturesByAttribution(MonitoringFeatureFilterBase): """ _validation = { - 'filter_type': {'required': True}, + "filter_type": {"required": True}, } _attribute_map = { - 'filter_type': {'key': 'filterType', 'type': 'str'}, - 'top': {'key': 'top', 'type': 'int'}, + "filter_type": {"key": "filterType", "type": "str"}, + "top": {"key": "top", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword top: The number of top features to include. :paramtype top: int """ super(TopNFeaturesByAttribution, self).__init__(**kwargs) - self.filter_type = 'TopNByAttribution' # type: str - self.top = kwargs.get('top', 10) + self.filter_type = "TopNByAttribution" # type: str + self.top = kwargs.get("top", 10) class TrialComponent(msrest.serialization.Model): @@ -33193,23 +31371,20 @@ class TrialComponent(msrest.serialization.Model): """ _validation = { - 'command': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'environment_id': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "command": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "environment_id": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'code_id': {'key': 'codeId', 'type': 'str'}, - 'command': {'key': 'command', 'type': 'str'}, - 'distribution': {'key': 'distribution', 'type': 'DistributionConfiguration'}, - 'environment_id': {'key': 'environmentId', 'type': 'str'}, - 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, - 'resources': {'key': 'resources', 'type': 'JobResourceConfiguration'}, + "code_id": {"key": "codeId", "type": "str"}, + "command": {"key": "command", "type": "str"}, + "distribution": {"key": "distribution", "type": "DistributionConfiguration"}, + "environment_id": {"key": "environmentId", "type": "str"}, + "environment_variables": {"key": "environmentVariables", "type": "{str}"}, + "resources": {"key": "resources", "type": "JobResourceConfiguration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword code_id: ARM resource ID of the code asset. :paramtype code_id: str @@ -33228,12 +31403,12 @@ def __init__( :paramtype resources: ~azure.mgmt.machinelearningservices.models.JobResourceConfiguration """ super(TrialComponent, self).__init__(**kwargs) - self.code_id = kwargs.get('code_id', None) - self.command = kwargs['command'] - self.distribution = kwargs.get('distribution', None) - self.environment_id = kwargs['environment_id'] - self.environment_variables = kwargs.get('environment_variables', None) - self.resources = kwargs.get('resources', None) + self.code_id = kwargs.get("code_id", None) + self.command = kwargs["command"] + self.distribution = kwargs.get("distribution", None) + self.environment_id = kwargs["environment_id"] + self.environment_variables = kwargs.get("environment_variables", None) + self.resources = kwargs.get("resources", None) class TriggerOnceRequest(msrest.serialization.Model): @@ -33246,23 +31421,20 @@ class TriggerOnceRequest(msrest.serialization.Model): """ _validation = { - 'schedule_time': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "schedule_time": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'schedule_time': {'key': 'scheduleTime', 'type': 'str'}, + "schedule_time": {"key": "scheduleTime", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword schedule_time: Required. [Required] Specify the schedule time for trigger once. :paramtype schedule_time: str """ super(TriggerOnceRequest, self).__init__(**kwargs) - self.schedule_time = kwargs['schedule_time'] + self.schedule_time = kwargs["schedule_time"] class TriggerRunSubmissionDto(msrest.serialization.Model): @@ -33276,14 +31448,11 @@ class TriggerRunSubmissionDto(msrest.serialization.Model): """ _attribute_map = { - 'schedule_action_type': {'key': 'scheduleActionType', 'type': 'str'}, - 'submission_id': {'key': 'submissionId', 'type': 'str'}, + "schedule_action_type": {"key": "scheduleActionType", "type": "str"}, + "submission_id": {"key": "submissionId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword schedule_action_type: Possible values include: "ComputeStartStop", "CreateJob", "InvokeBatchEndpoint", "ImportData", "CreateMonitor", "FeatureStoreMaterialization". @@ -33292,8 +31461,8 @@ def __init__( :paramtype submission_id: str """ super(TriggerRunSubmissionDto, self).__init__(**kwargs) - self.schedule_action_type = kwargs.get('schedule_action_type', None) - self.submission_id = kwargs.get('submission_id', None) + self.schedule_action_type = kwargs.get("schedule_action_type", None) + self.submission_id = kwargs.get("submission_id", None) class TritonInferencingServer(InferencingServer): @@ -33310,26 +31479,23 @@ class TritonInferencingServer(InferencingServer): """ _validation = { - 'server_type': {'required': True}, + "server_type": {"required": True}, } _attribute_map = { - 'server_type': {'key': 'serverType', 'type': 'str'}, - 'inference_configuration': {'key': 'inferenceConfiguration', 'type': 'OnlineInferenceConfiguration'}, + "server_type": {"key": "serverType", "type": "str"}, + "inference_configuration": {"key": "inferenceConfiguration", "type": "OnlineInferenceConfiguration"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword inference_configuration: Inference configuration for Triton. :paramtype inference_configuration: ~azure.mgmt.machinelearningservices.models.OnlineInferenceConfiguration """ super(TritonInferencingServer, self).__init__(**kwargs) - self.server_type = 'Triton' # type: str - self.inference_configuration = kwargs.get('inference_configuration', None) + self.server_type = "Triton" # type: str + self.inference_configuration = kwargs.get("inference_configuration", None) class TritonModelJobInput(JobInput, AssetJobInput): @@ -33353,22 +31519,19 @@ class TritonModelJobInput(JobInput, AssetJobInput): """ _validation = { - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'job_input_type': {'required': True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "job_input_type": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". @@ -33381,11 +31544,11 @@ def __init__( :paramtype description: str """ super(TritonModelJobInput, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs['uri'] - self.job_input_type = 'triton_model' # type: str - self.description = kwargs.get('description', None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs["uri"] + self.job_input_type = "triton_model" # type: str + self.description = kwargs.get("description", None) class TritonModelJobOutput(JobOutput, AssetJobOutput): @@ -33415,24 +31578,21 @@ class TritonModelJobOutput(JobOutput, AssetJobOutput): """ _validation = { - 'job_output_type': {'required': True}, + "job_output_type": {"required": True}, } _attribute_map = { - 'asset_name': {'key': 'assetName', 'type': 'str'}, - 'asset_version': {'key': 'assetVersion', 'type': 'str'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + "asset_name": {"key": "assetName", "type": "str"}, + "asset_version": {"key": "assetVersion", "type": "str"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_output_type": {"key": "jobOutputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_name: Output Asset Name. :paramtype asset_name: str @@ -33451,14 +31611,14 @@ def __init__( :paramtype description: str """ super(TritonModelJobOutput, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.asset_version = kwargs.get('asset_version', None) - self.auto_delete_setting = kwargs.get('auto_delete_setting', None) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs.get('uri', None) - self.job_output_type = 'triton_model' # type: str - self.description = kwargs.get('description', None) + self.asset_name = kwargs.get("asset_name", None) + self.asset_version = kwargs.get("asset_version", None) + self.auto_delete_setting = kwargs.get("auto_delete_setting", None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs.get("uri", None) + self.job_output_type = "triton_model" # type: str + self.description = kwargs.get("description", None) class TruncationSelectionPolicy(EarlyTerminationPolicy): @@ -33479,20 +31639,17 @@ class TruncationSelectionPolicy(EarlyTerminationPolicy): """ _validation = { - 'policy_type': {'required': True}, + "policy_type": {"required": True}, } _attribute_map = { - 'delay_evaluation': {'key': 'delayEvaluation', 'type': 'int'}, - 'evaluation_interval': {'key': 'evaluationInterval', 'type': 'int'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'truncation_percentage': {'key': 'truncationPercentage', 'type': 'int'}, + "delay_evaluation": {"key": "delayEvaluation", "type": "int"}, + "evaluation_interval": {"key": "evaluationInterval", "type": "int"}, + "policy_type": {"key": "policyType", "type": "str"}, + "truncation_percentage": {"key": "truncationPercentage", "type": "int"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword delay_evaluation: Number of intervals by which to delay the first evaluation. :paramtype delay_evaluation: int @@ -33502,8 +31659,8 @@ def __init__( :paramtype truncation_percentage: int """ super(TruncationSelectionPolicy, self).__init__(**kwargs) - self.policy_type = 'TruncationSelection' # type: str - self.truncation_percentage = kwargs.get('truncation_percentage', 0) + self.policy_type = "TruncationSelection" # type: str + self.truncation_percentage = kwargs.get("truncation_percentage", 0) class UpdateWorkspaceQuotas(msrest.serialization.Model): @@ -33527,23 +31684,20 @@ class UpdateWorkspaceQuotas(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'unit': {'readonly': True}, + "id": {"readonly": True}, + "type": {"readonly": True}, + "unit": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "limit": {"key": "limit", "type": "long"}, + "unit": {"key": "unit", "type": "str"}, + "status": {"key": "status", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword limit: The maximum permitted quota of the resource. :paramtype limit: long @@ -33556,9 +31710,9 @@ def __init__( super(UpdateWorkspaceQuotas, self).__init__(**kwargs) self.id = None self.type = None - self.limit = kwargs.get('limit', None) + self.limit = kwargs.get("limit", None) self.unit = None - self.status = kwargs.get('status', None) + self.status = kwargs.get("status", None) class UpdateWorkspaceQuotasResult(msrest.serialization.Model): @@ -33574,21 +31728,17 @@ class UpdateWorkspaceQuotasResult(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, + "value": {"readonly": True}, + "next_link": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[UpdateWorkspaceQuotas]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, + "value": {"key": "value", "type": "[UpdateWorkspaceQuotas]"}, + "next_link": {"key": "nextLink", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs) self.value = None self.next_link = None @@ -33627,27 +31777,24 @@ class UriFileDataVersion(DataVersionBaseProperties): """ _validation = { - 'data_type': {'required': True}, - 'data_uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "data_type": {"required": True}, + "data_uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'data_uri': {'key': 'dataUri', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'stage': {'key': 'stage', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "data_type": {"key": "dataType", "type": "str"}, + "data_uri": {"key": "dataUri", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "stage": {"key": "stage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -33674,7 +31821,7 @@ def __init__( :paramtype stage: str """ super(UriFileDataVersion, self).__init__(**kwargs) - self.data_type = 'uri_file' # type: str + self.data_type = "uri_file" # type: str class UriFileJobInput(JobInput, AssetJobInput): @@ -33698,22 +31845,19 @@ class UriFileJobInput(JobInput, AssetJobInput): """ _validation = { - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'job_input_type': {'required': True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "job_input_type": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". @@ -33726,11 +31870,11 @@ def __init__( :paramtype description: str """ super(UriFileJobInput, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs['uri'] - self.job_input_type = 'uri_file' # type: str - self.description = kwargs.get('description', None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs["uri"] + self.job_input_type = "uri_file" # type: str + self.description = kwargs.get("description", None) class UriFileJobOutput(JobOutput, AssetJobOutput): @@ -33760,24 +31904,21 @@ class UriFileJobOutput(JobOutput, AssetJobOutput): """ _validation = { - 'job_output_type': {'required': True}, + "job_output_type": {"required": True}, } _attribute_map = { - 'asset_name': {'key': 'assetName', 'type': 'str'}, - 'asset_version': {'key': 'assetVersion', 'type': 'str'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + "asset_name": {"key": "assetName", "type": "str"}, + "asset_version": {"key": "assetVersion", "type": "str"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_output_type": {"key": "jobOutputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_name: Output Asset Name. :paramtype asset_name: str @@ -33796,14 +31937,14 @@ def __init__( :paramtype description: str """ super(UriFileJobOutput, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.asset_version = kwargs.get('asset_version', None) - self.auto_delete_setting = kwargs.get('auto_delete_setting', None) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs.get('uri', None) - self.job_output_type = 'uri_file' # type: str - self.description = kwargs.get('description', None) + self.asset_name = kwargs.get("asset_name", None) + self.asset_version = kwargs.get("asset_version", None) + self.auto_delete_setting = kwargs.get("auto_delete_setting", None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs.get("uri", None) + self.job_output_type = "uri_file" # type: str + self.description = kwargs.get("description", None) class UriFolderDataVersion(DataVersionBaseProperties): @@ -33839,27 +31980,24 @@ class UriFolderDataVersion(DataVersionBaseProperties): """ _validation = { - 'data_type': {'required': True}, - 'data_uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, + "data_type": {"required": True}, + "data_uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, } _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'is_anonymous': {'key': 'isAnonymous', 'type': 'bool'}, - 'is_archived': {'key': 'isArchived', 'type': 'bool'}, - 'data_type': {'key': 'dataType', 'type': 'str'}, - 'data_uri': {'key': 'dataUri', 'type': 'str'}, - 'intellectual_property': {'key': 'intellectualProperty', 'type': 'IntellectualProperty'}, - 'stage': {'key': 'stage', 'type': 'str'}, + "description": {"key": "description", "type": "str"}, + "properties": {"key": "properties", "type": "{str}"}, + "tags": {"key": "tags", "type": "{str}"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "is_anonymous": {"key": "isAnonymous", "type": "bool"}, + "is_archived": {"key": "isArchived", "type": "bool"}, + "data_type": {"key": "dataType", "type": "str"}, + "data_uri": {"key": "dataUri", "type": "str"}, + "intellectual_property": {"key": "intellectualProperty", "type": "IntellectualProperty"}, + "stage": {"key": "stage", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword description: The asset description text. :paramtype description: str @@ -33886,7 +32024,7 @@ def __init__( :paramtype stage: str """ super(UriFolderDataVersion, self).__init__(**kwargs) - self.data_type = 'uri_folder' # type: str + self.data_type = "uri_folder" # type: str class UriFolderJobInput(JobInput, AssetJobInput): @@ -33910,22 +32048,19 @@ class UriFolderJobInput(JobInput, AssetJobInput): """ _validation = { - 'uri': {'required': True, 'min_length': 1, 'pattern': r'[a-zA-Z0-9_]'}, - 'job_input_type': {'required': True}, + "uri": {"required": True, "min_length": 1, "pattern": r"[a-zA-Z0-9_]"}, + "job_input_type": {"required": True}, } _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_input_type': {'key': 'jobInputType', 'type': 'str'}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_input_type": {"key": "jobInputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword mode: Input Asset Delivery Mode. Possible values include: "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload". @@ -33938,11 +32073,11 @@ def __init__( :paramtype description: str """ super(UriFolderJobInput, self).__init__(**kwargs) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs['uri'] - self.job_input_type = 'uri_folder' # type: str - self.description = kwargs.get('description', None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs["uri"] + self.job_input_type = "uri_folder" # type: str + self.description = kwargs.get("description", None) class UriFolderJobOutput(JobOutput, AssetJobOutput): @@ -33972,24 +32107,21 @@ class UriFolderJobOutput(JobOutput, AssetJobOutput): """ _validation = { - 'job_output_type': {'required': True}, + "job_output_type": {"required": True}, } _attribute_map = { - 'asset_name': {'key': 'assetName', 'type': 'str'}, - 'asset_version': {'key': 'assetVersion', 'type': 'str'}, - 'auto_delete_setting': {'key': 'autoDeleteSetting', 'type': 'AutoDeleteSetting'}, - 'mode': {'key': 'mode', 'type': 'str'}, - 'path_on_compute': {'key': 'pathOnCompute', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'job_output_type': {'key': 'jobOutputType', 'type': 'str'}, + "asset_name": {"key": "assetName", "type": "str"}, + "asset_version": {"key": "assetVersion", "type": "str"}, + "auto_delete_setting": {"key": "autoDeleteSetting", "type": "AutoDeleteSetting"}, + "mode": {"key": "mode", "type": "str"}, + "path_on_compute": {"key": "pathOnCompute", "type": "str"}, + "uri": {"key": "uri", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "job_output_type": {"key": "jobOutputType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword asset_name: Output Asset Name. :paramtype asset_name: str @@ -34008,14 +32140,14 @@ def __init__( :paramtype description: str """ super(UriFolderJobOutput, self).__init__(**kwargs) - self.asset_name = kwargs.get('asset_name', None) - self.asset_version = kwargs.get('asset_version', None) - self.auto_delete_setting = kwargs.get('auto_delete_setting', None) - self.mode = kwargs.get('mode', None) - self.path_on_compute = kwargs.get('path_on_compute', None) - self.uri = kwargs.get('uri', None) - self.job_output_type = 'uri_folder' # type: str - self.description = kwargs.get('description', None) + self.asset_name = kwargs.get("asset_name", None) + self.asset_version = kwargs.get("asset_version", None) + self.auto_delete_setting = kwargs.get("auto_delete_setting", None) + self.mode = kwargs.get("mode", None) + self.path_on_compute = kwargs.get("path_on_compute", None) + self.uri = kwargs.get("uri", None) + self.job_output_type = "uri_folder" # type: str + self.description = kwargs.get("description", None) class Usage(msrest.serialization.Model): @@ -34040,31 +32172,27 @@ class Usage(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'aml_workspace_location': {'readonly': True}, - 'type': {'readonly': True}, - 'unit': {'readonly': True}, - 'current_value': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, + "id": {"readonly": True}, + "aml_workspace_location": {"readonly": True}, + "type": {"readonly": True}, + "unit": {"readonly": True}, + "current_value": {"readonly": True}, + "limit": {"readonly": True}, + "name": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, + "id": {"key": "id", "type": "str"}, + "aml_workspace_location": {"key": "amlWorkspaceLocation", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "current_value": {"key": "currentValue", "type": "long"}, + "limit": {"key": "limit", "type": "long"}, + "name": {"key": "name", "type": "UsageName"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(Usage, self).__init__(**kwargs) self.id = None self.aml_workspace_location = None @@ -34087,21 +32215,17 @@ class UsageName(msrest.serialization.Model): """ _validation = { - 'value': {'readonly': True}, - 'localized_value': {'readonly': True}, + "value": {"readonly": True}, + "localized_value": {"readonly": True}, } _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + "value": {"key": "value", "type": "str"}, + "localized_value": {"key": "localizedValue", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(UsageName, self).__init__(**kwargs) self.value = None self.localized_value = None @@ -34122,19 +32246,16 @@ class UserAccountCredentials(msrest.serialization.Model): """ _validation = { - 'admin_user_name': {'required': True}, + "admin_user_name": {"required": True}, } _attribute_map = { - 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, - 'admin_user_ssh_public_key': {'key': 'adminUserSshPublicKey', 'type': 'str'}, - 'admin_user_password': {'key': 'adminUserPassword', 'type': 'str'}, + "admin_user_name": {"key": "adminUserName", "type": "str"}, + "admin_user_ssh_public_key": {"key": "adminUserSshPublicKey", "type": "str"}, + "admin_user_password": {"key": "adminUserPassword", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword admin_user_name: Required. Name of the administrator user account which can be used to SSH to nodes. @@ -34145,9 +32266,9 @@ def __init__( :paramtype admin_user_password: str """ super(UserAccountCredentials, self).__init__(**kwargs) - self.admin_user_name = kwargs['admin_user_name'] - self.admin_user_ssh_public_key = kwargs.get('admin_user_ssh_public_key', None) - self.admin_user_password = kwargs.get('admin_user_password', None) + self.admin_user_name = kwargs["admin_user_name"] + self.admin_user_ssh_public_key = kwargs.get("admin_user_ssh_public_key", None) + self.admin_user_password = kwargs.get("admin_user_password", None) class UserAssignedIdentity(msrest.serialization.Model): @@ -34162,21 +32283,17 @@ class UserAssignedIdentity(msrest.serialization.Model): """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + "principal_id": {"readonly": True}, + "client_id": {"readonly": True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(UserAssignedIdentity, self).__init__(**kwargs) self.principal_id = None self.client_id = None @@ -34190,19 +32307,16 @@ class UserCreatedAcrAccount(msrest.serialization.Model): """ _attribute_map = { - 'arm_resource_id': {'key': 'armResourceId', 'type': 'ArmResourceId'}, + "arm_resource_id": {"key": "armResourceId", "type": "ArmResourceId"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword arm_resource_id: ARM ResourceId of a resource. :paramtype arm_resource_id: ~azure.mgmt.machinelearningservices.models.ArmResourceId """ super(UserCreatedAcrAccount, self).__init__(**kwargs) - self.arm_resource_id = kwargs.get('arm_resource_id', None) + self.arm_resource_id = kwargs.get("arm_resource_id", None) class UserCreatedStorageAccount(msrest.serialization.Model): @@ -34213,19 +32327,16 @@ class UserCreatedStorageAccount(msrest.serialization.Model): """ _attribute_map = { - 'arm_resource_id': {'key': 'armResourceId', 'type': 'ArmResourceId'}, + "arm_resource_id": {"key": "armResourceId", "type": "ArmResourceId"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword arm_resource_id: ARM ResourceId of a resource. :paramtype arm_resource_id: ~azure.mgmt.machinelearningservices.models.ArmResourceId """ super(UserCreatedStorageAccount, self).__init__(**kwargs) - self.arm_resource_id = kwargs.get('arm_resource_id', None) + self.arm_resource_id = kwargs.get("arm_resource_id", None) class UserIdentity(IdentityConfiguration): @@ -34240,21 +32351,17 @@ class UserIdentity(IdentityConfiguration): """ _validation = { - 'identity_type': {'required': True}, + "identity_type": {"required": True}, } _attribute_map = { - 'identity_type': {'key': 'identityType', 'type': 'str'}, + "identity_type": {"key": "identityType", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(UserIdentity, self).__init__(**kwargs) - self.identity_type = 'UserIdentity' # type: str + self.identity_type = "UserIdentity" # type: str class UsernamePasswordAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionPropertiesV2): @@ -34307,28 +32414,25 @@ class UsernamePasswordAuthTypeWorkspaceConnectionProperties(WorkspaceConnectionP """ _validation = { - 'auth_type': {'required': True}, - 'created_by_workspace_arm_id': {'readonly': True}, - 'group': {'readonly': True}, + "auth_type": {"required": True}, + "created_by_workspace_arm_id": {"readonly": True}, + "group": {"readonly": True}, } _attribute_map = { - 'auth_type': {'key': 'authType', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'created_by_workspace_arm_id': {'key': 'createdByWorkspaceArmId', 'type': 'str'}, - 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, - 'group': {'key': 'group', 'type': 'str'}, - 'is_shared_to_all': {'key': 'isSharedToAll', 'type': 'bool'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'shared_user_list': {'key': 'sharedUserList', 'type': '[str]'}, - 'target': {'key': 'target', 'type': 'str'}, - 'credentials': {'key': 'credentials', 'type': 'WorkspaceConnectionUsernamePassword'}, + "auth_type": {"key": "authType", "type": "str"}, + "category": {"key": "category", "type": "str"}, + "created_by_workspace_arm_id": {"key": "createdByWorkspaceArmId", "type": "str"}, + "expiry_time": {"key": "expiryTime", "type": "iso-8601"}, + "group": {"key": "group", "type": "str"}, + "is_shared_to_all": {"key": "isSharedToAll", "type": "bool"}, + "metadata": {"key": "metadata", "type": "object"}, + "shared_user_list": {"key": "sharedUserList", "type": "[str]"}, + "target": {"key": "target", "type": "str"}, + "credentials": {"key": "credentials", "type": "WorkspaceConnectionUsernamePassword"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword category: Category of the connection. Possible values include: "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", @@ -34363,8 +32467,8 @@ def __init__( ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionUsernamePassword """ super(UsernamePasswordAuthTypeWorkspaceConnectionProperties, self).__init__(**kwargs) - self.auth_type = 'UsernamePassword' # type: str - self.credentials = kwargs.get('credentials', None) + self.auth_type = "UsernamePassword" # type: str + self.credentials = kwargs.get("credentials", None) class VirtualMachineSchema(msrest.serialization.Model): @@ -34375,20 +32479,17 @@ class VirtualMachineSchema(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'VirtualMachineSchemaProperties'}, + "properties": {"key": "properties", "type": "VirtualMachineSchemaProperties"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: :paramtype properties: ~azure.mgmt.machinelearningservices.models.VirtualMachineSchemaProperties """ super(VirtualMachineSchema, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class VirtualMachine(Compute, VirtualMachineSchema): @@ -34430,32 +32531,29 @@ class VirtualMachine(Compute, VirtualMachineSchema): """ _validation = { - 'compute_type': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + "compute_type": {"required": True}, + "provisioning_state": {"readonly": True}, + "created_on": {"readonly": True}, + "modified_on": {"readonly": True}, + "provisioning_errors": {"readonly": True}, + "is_attached_compute": {"readonly": True}, } _attribute_map = { - 'properties': {'key': 'properties', 'type': 'VirtualMachineSchemaProperties'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + "properties": {"key": "properties", "type": "VirtualMachineSchemaProperties"}, + "compute_type": {"key": "computeType", "type": "str"}, + "compute_location": {"key": "computeLocation", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "created_on": {"key": "createdOn", "type": "iso-8601"}, + "modified_on": {"key": "modifiedOn", "type": "iso-8601"}, + "resource_id": {"key": "resourceId", "type": "str"}, + "provisioning_errors": {"key": "provisioningErrors", "type": "[ErrorResponse]"}, + "is_attached_compute": {"key": "isAttachedCompute", "type": "bool"}, + "disable_local_auth": {"key": "disableLocalAuth", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: :paramtype properties: @@ -34471,17 +32569,17 @@ def __init__( :paramtype disable_local_auth: bool """ super(VirtualMachine, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'VirtualMachine' # type: str - self.compute_location = kwargs.get('compute_location', None) + self.properties = kwargs.get("properties", None) + self.compute_type = "VirtualMachine" # type: str + self.compute_location = kwargs.get("compute_location", None) self.provisioning_state = None - self.description = kwargs.get('description', None) + self.description = kwargs.get("description", None) self.created_on = None self.modified_on = None - self.resource_id = kwargs.get('resource_id', None) + self.resource_id = kwargs.get("resource_id", None) self.provisioning_errors = None self.is_attached_compute = None - self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.disable_local_auth = kwargs.get("disable_local_auth", None) class VirtualMachineImage(msrest.serialization.Model): @@ -34494,23 +32592,20 @@ class VirtualMachineImage(msrest.serialization.Model): """ _validation = { - 'id': {'required': True}, + "id": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword id: Required. Virtual Machine image path. :paramtype id: str """ super(VirtualMachineImage, self).__init__(**kwargs) - self.id = kwargs['id'] + self.id = kwargs["id"] class VirtualMachineSchemaProperties(msrest.serialization.Model): @@ -34533,18 +32628,15 @@ class VirtualMachineSchemaProperties(msrest.serialization.Model): """ _attribute_map = { - 'virtual_machine_size': {'key': 'virtualMachineSize', 'type': 'str'}, - 'ssh_port': {'key': 'sshPort', 'type': 'int'}, - 'notebook_server_port': {'key': 'notebookServerPort', 'type': 'int'}, - 'address': {'key': 'address', 'type': 'str'}, - 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, - 'is_notebook_instance_compute': {'key': 'isNotebookInstanceCompute', 'type': 'bool'}, + "virtual_machine_size": {"key": "virtualMachineSize", "type": "str"}, + "ssh_port": {"key": "sshPort", "type": "int"}, + "notebook_server_port": {"key": "notebookServerPort", "type": "int"}, + "address": {"key": "address", "type": "str"}, + "administrator_account": {"key": "administratorAccount", "type": "VirtualMachineSshCredentials"}, + "is_notebook_instance_compute": {"key": "isNotebookInstanceCompute", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword virtual_machine_size: Virtual Machine size. :paramtype virtual_machine_size: str @@ -34562,12 +32654,12 @@ def __init__( :paramtype is_notebook_instance_compute: bool """ super(VirtualMachineSchemaProperties, self).__init__(**kwargs) - self.virtual_machine_size = kwargs.get('virtual_machine_size', None) - self.ssh_port = kwargs.get('ssh_port', None) - self.notebook_server_port = kwargs.get('notebook_server_port', None) - self.address = kwargs.get('address', None) - self.administrator_account = kwargs.get('administrator_account', None) - self.is_notebook_instance_compute = kwargs.get('is_notebook_instance_compute', None) + self.virtual_machine_size = kwargs.get("virtual_machine_size", None) + self.ssh_port = kwargs.get("ssh_port", None) + self.notebook_server_port = kwargs.get("notebook_server_port", None) + self.address = kwargs.get("address", None) + self.administrator_account = kwargs.get("administrator_account", None) + self.is_notebook_instance_compute = kwargs.get("is_notebook_instance_compute", None) class VirtualMachineSecretsSchema(msrest.serialization.Model): @@ -34579,20 +32671,17 @@ class VirtualMachineSecretsSchema(msrest.serialization.Model): """ _attribute_map = { - 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + "administrator_account": {"key": "administratorAccount", "type": "VirtualMachineSshCredentials"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword administrator_account: Admin credentials for virtual machine. :paramtype administrator_account: ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials """ super(VirtualMachineSecretsSchema, self).__init__(**kwargs) - self.administrator_account = kwargs.get('administrator_account', None) + self.administrator_account = kwargs.get("administrator_account", None) class VirtualMachineSecrets(ComputeSecrets, VirtualMachineSecretsSchema): @@ -34610,26 +32699,23 @@ class VirtualMachineSecrets(ComputeSecrets, VirtualMachineSecretsSchema): """ _validation = { - 'compute_type': {'required': True}, + "compute_type": {"required": True}, } _attribute_map = { - 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, + "administrator_account": {"key": "administratorAccount", "type": "VirtualMachineSshCredentials"}, + "compute_type": {"key": "computeType", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword administrator_account: Admin credentials for virtual machine. :paramtype administrator_account: ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials """ super(VirtualMachineSecrets, self).__init__(**kwargs) - self.administrator_account = kwargs.get('administrator_account', None) - self.compute_type = 'VirtualMachine' # type: str + self.administrator_account = kwargs.get("administrator_account", None) + self.compute_type = "VirtualMachine" # type: str class VirtualMachineSize(msrest.serialization.Model): @@ -34664,35 +32750,32 @@ class VirtualMachineSize(msrest.serialization.Model): """ _validation = { - 'name': {'readonly': True}, - 'family': {'readonly': True}, - 'v_cp_us': {'readonly': True}, - 'gpus': {'readonly': True}, - 'os_vhd_size_mb': {'readonly': True}, - 'max_resource_volume_mb': {'readonly': True}, - 'memory_gb': {'readonly': True}, - 'low_priority_capable': {'readonly': True}, - 'premium_io': {'readonly': True}, + "name": {"readonly": True}, + "family": {"readonly": True}, + "v_cp_us": {"readonly": True}, + "gpus": {"readonly": True}, + "os_vhd_size_mb": {"readonly": True}, + "max_resource_volume_mb": {"readonly": True}, + "memory_gb": {"readonly": True}, + "low_priority_capable": {"readonly": True}, + "premium_io": {"readonly": True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, - 'gpus': {'key': 'gpus', 'type': 'int'}, - 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, - 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, - 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, - 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, - 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, - 'estimated_vm_prices': {'key': 'estimatedVMPrices', 'type': 'EstimatedVMPrices'}, - 'supported_compute_types': {'key': 'supportedComputeTypes', 'type': '[str]'}, + "name": {"key": "name", "type": "str"}, + "family": {"key": "family", "type": "str"}, + "v_cp_us": {"key": "vCPUs", "type": "int"}, + "gpus": {"key": "gpus", "type": "int"}, + "os_vhd_size_mb": {"key": "osVhdSizeMB", "type": "int"}, + "max_resource_volume_mb": {"key": "maxResourceVolumeMB", "type": "int"}, + "memory_gb": {"key": "memoryGB", "type": "float"}, + "low_priority_capable": {"key": "lowPriorityCapable", "type": "bool"}, + "premium_io": {"key": "premiumIO", "type": "bool"}, + "estimated_vm_prices": {"key": "estimatedVMPrices", "type": "EstimatedVMPrices"}, + "supported_compute_types": {"key": "supportedComputeTypes", "type": "[str]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword estimated_vm_prices: The estimated price information for using a VM. :paramtype estimated_vm_prices: ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices @@ -34710,8 +32793,8 @@ def __init__( self.memory_gb = None self.low_priority_capable = None self.premium_io = None - self.estimated_vm_prices = kwargs.get('estimated_vm_prices', None) - self.supported_compute_types = kwargs.get('supported_compute_types', None) + self.estimated_vm_prices = kwargs.get("estimated_vm_prices", None) + self.supported_compute_types = kwargs.get("supported_compute_types", None) class VirtualMachineSizeListResult(msrest.serialization.Model): @@ -34722,19 +32805,16 @@ class VirtualMachineSizeListResult(msrest.serialization.Model): """ _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualMachineSize]'}, + "value": {"key": "value", "type": "[VirtualMachineSize]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword value: The list of virtual machine sizes supported by AmlCompute. :paramtype value: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] """ super(VirtualMachineSizeListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + self.value = kwargs.get("value", None) class VirtualMachineSshCredentials(msrest.serialization.Model): @@ -34751,16 +32831,13 @@ class VirtualMachineSshCredentials(msrest.serialization.Model): """ _attribute_map = { - 'username': {'key': 'username', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'public_key_data': {'key': 'publicKeyData', 'type': 'str'}, - 'private_key_data': {'key': 'privateKeyData', 'type': 'str'}, + "username": {"key": "username", "type": "str"}, + "password": {"key": "password", "type": "str"}, + "public_key_data": {"key": "publicKeyData", "type": "str"}, + "private_key_data": {"key": "privateKeyData", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword username: Username of admin account. :paramtype username: str @@ -34772,10 +32849,10 @@ def __init__( :paramtype private_key_data: str """ super(VirtualMachineSshCredentials, self).__init__(**kwargs) - self.username = kwargs.get('username', None) - self.password = kwargs.get('password', None) - self.public_key_data = kwargs.get('public_key_data', None) - self.private_key_data = kwargs.get('private_key_data', None) + self.username = kwargs.get("username", None) + self.password = kwargs.get("password", None) + self.public_key_data = kwargs.get("public_key_data", None) + self.private_key_data = kwargs.get("private_key_data", None) class VolumeDefinition(msrest.serialization.Model): @@ -34801,20 +32878,17 @@ class VolumeDefinition(msrest.serialization.Model): """ _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'source': {'key': 'source', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'consistency': {'key': 'consistency', 'type': 'str'}, - 'bind': {'key': 'bind', 'type': 'BindOptions'}, - 'volume': {'key': 'volume', 'type': 'VolumeOptions'}, - 'tmpfs': {'key': 'tmpfs', 'type': 'TmpfsOptions'}, + "type": {"key": "type", "type": "str"}, + "read_only": {"key": "readOnly", "type": "bool"}, + "source": {"key": "source", "type": "str"}, + "target": {"key": "target", "type": "str"}, + "consistency": {"key": "consistency", "type": "str"}, + "bind": {"key": "bind", "type": "BindOptions"}, + "volume": {"key": "volume", "type": "VolumeOptions"}, + "tmpfs": {"key": "tmpfs", "type": "TmpfsOptions"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword type: Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. Possible values include: "bind", "volume", "tmpfs", "npipe". Default value: "bind". @@ -34836,14 +32910,14 @@ def __init__( :paramtype tmpfs: ~azure.mgmt.machinelearningservices.models.TmpfsOptions """ super(VolumeDefinition, self).__init__(**kwargs) - self.type = kwargs.get('type', "bind") - self.read_only = kwargs.get('read_only', None) - self.source = kwargs.get('source', None) - self.target = kwargs.get('target', None) - self.consistency = kwargs.get('consistency', None) - self.bind = kwargs.get('bind', None) - self.volume = kwargs.get('volume', None) - self.tmpfs = kwargs.get('tmpfs', None) + self.type = kwargs.get("type", "bind") + self.read_only = kwargs.get("read_only", None) + self.source = kwargs.get("source", None) + self.target = kwargs.get("target", None) + self.consistency = kwargs.get("consistency", None) + self.bind = kwargs.get("bind", None) + self.volume = kwargs.get("volume", None) + self.tmpfs = kwargs.get("tmpfs", None) class VolumeOptions(msrest.serialization.Model): @@ -34854,19 +32928,16 @@ class VolumeOptions(msrest.serialization.Model): """ _attribute_map = { - 'nocopy': {'key': 'nocopy', 'type': 'bool'}, + "nocopy": {"key": "nocopy", "type": "bool"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword nocopy: Indicate whether volume is nocopy. :paramtype nocopy: bool """ super(VolumeOptions, self).__init__(**kwargs) - self.nocopy = kwargs.get('nocopy', None) + self.nocopy = kwargs.get("nocopy", None) class Workspace(Resource): @@ -35002,81 +33073,86 @@ class Workspace(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'ml_flow_tracking_uri': {'readonly': True}, - 'notebook_info': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'private_link_count': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'service_provisioned_resource_group': {'readonly': True}, - 'storage_hns_enabled': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'workspace_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'}, - 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, - 'associated_workspaces': {'key': 'properties.associatedWorkspaces', 'type': '[str]'}, - 'container_registries': {'key': 'properties.containerRegistries', 'type': '[str]'}, - 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, - 'enable_data_isolation': {'key': 'properties.enableDataIsolation', 'type': 'bool'}, - 'enable_software_bill_of_materials': {'key': 'properties.enableSoftwareBillOfMaterials', 'type': 'bool'}, - 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, - 'existing_workspaces': {'key': 'properties.existingWorkspaces', 'type': '[str]'}, - 'feature_store_settings': {'key': 'properties.featureStoreSettings', 'type': 'FeatureStoreSettings'}, - 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'hbi_workspace': {'key': 'properties.hbiWorkspace', 'type': 'bool'}, - 'hub_resource_id': {'key': 'properties.hubResourceId', 'type': 'str'}, - 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, - 'ip_allowlist': {'key': 'properties.ipAllowlist', 'type': '[str]'}, - 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, - 'key_vaults': {'key': 'properties.keyVaults', 'type': '[str]'}, - 'managed_network': {'key': 'properties.managedNetwork', 'type': 'ManagedNetworkSettings'}, - 'ml_flow_tracking_uri': {'key': 'properties.mlFlowTrackingUri', 'type': 'str'}, - 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, - 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', - 'type': '[PrivateEndpointConnection]'}, - 'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'serverless_compute_settings': {'key': 'properties.serverlessComputeSettings', - 'type': 'ServerlessComputeSettings'}, - 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', - 'type': 'ServiceManagedResourcesSettings'}, - 'service_provisioned_resource_group': {'key': 'properties.serviceProvisionedResourceGroup', 'type': 'str'}, - 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', - 'type': '[SharedPrivateLinkResource]'}, - 'soft_delete_retention_in_days': {'key': 'properties.softDeleteRetentionInDays', 'type': 'int'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, - 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[str]'}, - 'storage_hns_enabled': {'key': 'properties.storageHnsEnabled', 'type': 'bool'}, - 'system_datastores_auth_mode': {'key': 'properties.systemDatastoresAuthMode', 'type': 'str'}, - 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, - 'v1_legacy_mode': {'key': 'properties.v1LegacyMode', 'type': 'bool'}, - 'workspace_hub_config': {'key': 'properties.workspaceHubConfig', 'type': 'WorkspaceHubConfig'}, - 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "ml_flow_tracking_uri": {"readonly": True}, + "notebook_info": {"readonly": True}, + "private_endpoint_connections": {"readonly": True}, + "private_link_count": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "service_provisioned_resource_group": {"readonly": True}, + "storage_hns_enabled": {"readonly": True}, + "tenant_id": {"readonly": True}, + "workspace_id": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "kind": {"key": "kind", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "sku": {"key": "sku", "type": "Sku"}, + "tags": {"key": "tags", "type": "{str}"}, + "allow_public_access_when_behind_vnet": {"key": "properties.allowPublicAccessWhenBehindVnet", "type": "bool"}, + "application_insights": {"key": "properties.applicationInsights", "type": "str"}, + "associated_workspaces": {"key": "properties.associatedWorkspaces", "type": "[str]"}, + "container_registries": {"key": "properties.containerRegistries", "type": "[str]"}, + "container_registry": {"key": "properties.containerRegistry", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "discovery_url": {"key": "properties.discoveryUrl", "type": "str"}, + "enable_data_isolation": {"key": "properties.enableDataIsolation", "type": "bool"}, + "enable_software_bill_of_materials": {"key": "properties.enableSoftwareBillOfMaterials", "type": "bool"}, + "encryption": {"key": "properties.encryption", "type": "EncryptionProperty"}, + "existing_workspaces": {"key": "properties.existingWorkspaces", "type": "[str]"}, + "feature_store_settings": {"key": "properties.featureStoreSettings", "type": "FeatureStoreSettings"}, + "friendly_name": {"key": "properties.friendlyName", "type": "str"}, + "hbi_workspace": {"key": "properties.hbiWorkspace", "type": "bool"}, + "hub_resource_id": {"key": "properties.hubResourceId", "type": "str"}, + "image_build_compute": {"key": "properties.imageBuildCompute", "type": "str"}, + "ip_allowlist": {"key": "properties.ipAllowlist", "type": "[str]"}, + "key_vault": {"key": "properties.keyVault", "type": "str"}, + "key_vaults": {"key": "properties.keyVaults", "type": "[str]"}, + "managed_network": {"key": "properties.managedNetwork", "type": "ManagedNetworkSettings"}, + "ml_flow_tracking_uri": {"key": "properties.mlFlowTrackingUri", "type": "str"}, + "notebook_info": {"key": "properties.notebookInfo", "type": "NotebookResourceInfo"}, + "primary_user_assigned_identity": {"key": "properties.primaryUserAssignedIdentity", "type": "str"}, + "private_endpoint_connections": { + "key": "properties.privateEndpointConnections", + "type": "[PrivateEndpointConnection]", + }, + "private_link_count": {"key": "properties.privateLinkCount", "type": "int"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "serverless_compute_settings": { + "key": "properties.serverlessComputeSettings", + "type": "ServerlessComputeSettings", + }, + "service_managed_resources_settings": { + "key": "properties.serviceManagedResourcesSettings", + "type": "ServiceManagedResourcesSettings", + }, + "service_provisioned_resource_group": {"key": "properties.serviceProvisionedResourceGroup", "type": "str"}, + "shared_private_link_resources": { + "key": "properties.sharedPrivateLinkResources", + "type": "[SharedPrivateLinkResource]", + }, + "soft_delete_retention_in_days": {"key": "properties.softDeleteRetentionInDays", "type": "int"}, + "storage_account": {"key": "properties.storageAccount", "type": "str"}, + "storage_accounts": {"key": "properties.storageAccounts", "type": "[str]"}, + "storage_hns_enabled": {"key": "properties.storageHnsEnabled", "type": "bool"}, + "system_datastores_auth_mode": {"key": "properties.systemDatastoresAuthMode", "type": "str"}, + "tenant_id": {"key": "properties.tenantId", "type": "str"}, + "v1_legacy_mode": {"key": "properties.v1LegacyMode", "type": "bool"}, + "workspace_hub_config": {"key": "properties.workspaceHubConfig", "type": "WorkspaceHubConfig"}, + "workspace_id": {"key": "properties.workspaceId", "type": "str"}, + } + + def __init__(self, **kwargs): """ :keyword identity: Managed service identity (system assigned and/or user assigned identities). :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity @@ -35171,50 +33247,50 @@ def __init__( :paramtype workspace_hub_config: ~azure.mgmt.machinelearningservices.models.WorkspaceHubConfig """ super(Workspace, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.kind = kwargs.get('kind', None) - self.location = kwargs.get('location', None) - self.sku = kwargs.get('sku', None) - self.tags = kwargs.get('tags', None) - self.allow_public_access_when_behind_vnet = kwargs.get('allow_public_access_when_behind_vnet', None) - self.application_insights = kwargs.get('application_insights', None) - self.associated_workspaces = kwargs.get('associated_workspaces', None) - self.container_registries = kwargs.get('container_registries', None) - self.container_registry = kwargs.get('container_registry', None) - self.description = kwargs.get('description', None) - self.discovery_url = kwargs.get('discovery_url', None) - self.enable_data_isolation = kwargs.get('enable_data_isolation', None) - self.enable_software_bill_of_materials = kwargs.get('enable_software_bill_of_materials', None) - self.encryption = kwargs.get('encryption', None) - self.existing_workspaces = kwargs.get('existing_workspaces', None) - self.feature_store_settings = kwargs.get('feature_store_settings', None) - self.friendly_name = kwargs.get('friendly_name', None) - self.hbi_workspace = kwargs.get('hbi_workspace', None) - self.hub_resource_id = kwargs.get('hub_resource_id', None) - self.image_build_compute = kwargs.get('image_build_compute', None) - self.ip_allowlist = kwargs.get('ip_allowlist', None) - self.key_vault = kwargs.get('key_vault', None) - self.key_vaults = kwargs.get('key_vaults', None) - self.managed_network = kwargs.get('managed_network', None) + self.identity = kwargs.get("identity", None) + self.kind = kwargs.get("kind", None) + self.location = kwargs.get("location", None) + self.sku = kwargs.get("sku", None) + self.tags = kwargs.get("tags", None) + self.allow_public_access_when_behind_vnet = kwargs.get("allow_public_access_when_behind_vnet", None) + self.application_insights = kwargs.get("application_insights", None) + self.associated_workspaces = kwargs.get("associated_workspaces", None) + self.container_registries = kwargs.get("container_registries", None) + self.container_registry = kwargs.get("container_registry", None) + self.description = kwargs.get("description", None) + self.discovery_url = kwargs.get("discovery_url", None) + self.enable_data_isolation = kwargs.get("enable_data_isolation", None) + self.enable_software_bill_of_materials = kwargs.get("enable_software_bill_of_materials", None) + self.encryption = kwargs.get("encryption", None) + self.existing_workspaces = kwargs.get("existing_workspaces", None) + self.feature_store_settings = kwargs.get("feature_store_settings", None) + self.friendly_name = kwargs.get("friendly_name", None) + self.hbi_workspace = kwargs.get("hbi_workspace", None) + self.hub_resource_id = kwargs.get("hub_resource_id", None) + self.image_build_compute = kwargs.get("image_build_compute", None) + self.ip_allowlist = kwargs.get("ip_allowlist", None) + self.key_vault = kwargs.get("key_vault", None) + self.key_vaults = kwargs.get("key_vaults", None) + self.managed_network = kwargs.get("managed_network", None) self.ml_flow_tracking_uri = None self.notebook_info = None - self.primary_user_assigned_identity = kwargs.get('primary_user_assigned_identity', None) + self.primary_user_assigned_identity = kwargs.get("primary_user_assigned_identity", None) self.private_endpoint_connections = None self.private_link_count = None self.provisioning_state = None - self.public_network_access = kwargs.get('public_network_access', None) - self.serverless_compute_settings = kwargs.get('serverless_compute_settings', None) - self.service_managed_resources_settings = kwargs.get('service_managed_resources_settings', None) + self.public_network_access = kwargs.get("public_network_access", None) + self.serverless_compute_settings = kwargs.get("serverless_compute_settings", None) + self.service_managed_resources_settings = kwargs.get("service_managed_resources_settings", None) self.service_provisioned_resource_group = None - self.shared_private_link_resources = kwargs.get('shared_private_link_resources', None) - self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', None) - self.storage_account = kwargs.get('storage_account', None) - self.storage_accounts = kwargs.get('storage_accounts', None) + self.shared_private_link_resources = kwargs.get("shared_private_link_resources", None) + self.soft_delete_retention_in_days = kwargs.get("soft_delete_retention_in_days", None) + self.storage_account = kwargs.get("storage_account", None) + self.storage_accounts = kwargs.get("storage_accounts", None) self.storage_hns_enabled = None - self.system_datastores_auth_mode = kwargs.get('system_datastores_auth_mode', None) + self.system_datastores_auth_mode = kwargs.get("system_datastores_auth_mode", None) self.tenant_id = None - self.v1_legacy_mode = kwargs.get('v1_legacy_mode', None) - self.workspace_hub_config = kwargs.get('workspace_hub_config', None) + self.v1_legacy_mode = kwargs.get("v1_legacy_mode", None) + self.workspace_hub_config = kwargs.get("workspace_hub_config", None) self.workspace_id = None @@ -35228,14 +33304,11 @@ class WorkspaceConnectionAccessKey(msrest.serialization.Model): """ _attribute_map = { - 'access_key_id': {'key': 'accessKeyId', 'type': 'str'}, - 'secret_access_key': {'key': 'secretAccessKey', 'type': 'str'}, + "access_key_id": {"key": "accessKeyId", "type": "str"}, + "secret_access_key": {"key": "secretAccessKey", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword access_key_id: :paramtype access_key_id: str @@ -35243,8 +33316,8 @@ def __init__( :paramtype secret_access_key: str """ super(WorkspaceConnectionAccessKey, self).__init__(**kwargs) - self.access_key_id = kwargs.get('access_key_id', None) - self.secret_access_key = kwargs.get('secret_access_key', None) + self.access_key_id = kwargs.get("access_key_id", None) + self.secret_access_key = kwargs.get("secret_access_key", None) class WorkspaceConnectionApiKey(msrest.serialization.Model): @@ -35255,19 +33328,16 @@ class WorkspaceConnectionApiKey(msrest.serialization.Model): """ _attribute_map = { - 'key': {'key': 'key', 'type': 'str'}, + "key": {"key": "key", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword key: :paramtype key: str """ super(WorkspaceConnectionApiKey, self).__init__(**kwargs) - self.key = kwargs.get('key', None) + self.key = kwargs.get("key", None) class WorkspaceConnectionManagedIdentity(msrest.serialization.Model): @@ -35280,14 +33350,11 @@ class WorkspaceConnectionManagedIdentity(msrest.serialization.Model): """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, + "client_id": {"key": "clientId", "type": "str"}, + "resource_id": {"key": "resourceId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword client_id: :paramtype client_id: str @@ -35295,50 +33362,47 @@ def __init__( :paramtype resource_id: str """ super(WorkspaceConnectionManagedIdentity, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.resource_id = kwargs.get('resource_id', None) + self.client_id = kwargs.get("client_id", None) + self.resource_id = kwargs.get("resource_id", None) class WorkspaceConnectionOAuth2(msrest.serialization.Model): """ClientId and ClientSecret are required. Other properties are optional -depending on each OAuth2 provider's implementation. - - :ivar auth_url: Required by Concur connection category. - :vartype auth_url: str - :ivar client_id: Client id in the format of UUID. - :vartype client_id: str - :ivar client_secret: - :vartype client_secret: str - :ivar developer_token: Required by GoogleAdWords connection category. - :vartype developer_token: str - :ivar password: - :vartype password: str - :ivar refresh_token: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, - Xero, Zoho - where user needs to get RefreshToken offline. - :vartype refresh_token: str - :ivar tenant_id: Required by QuickBooks and Xero connection categories. - :vartype tenant_id: str - :ivar username: Concur, ServiceNow auth server AccessToken grant type is 'Password' - which requires UsernamePassword. - :vartype username: str + depending on each OAuth2 provider's implementation. + + :ivar auth_url: Required by Concur connection category. + :vartype auth_url: str + :ivar client_id: Client id in the format of UUID. + :vartype client_id: str + :ivar client_secret: + :vartype client_secret: str + :ivar developer_token: Required by GoogleAdWords connection category. + :vartype developer_token: str + :ivar password: + :vartype password: str + :ivar refresh_token: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, + Xero, Zoho + where user needs to get RefreshToken offline. + :vartype refresh_token: str + :ivar tenant_id: Required by QuickBooks and Xero connection categories. + :vartype tenant_id: str + :ivar username: Concur, ServiceNow auth server AccessToken grant type is 'Password' + which requires UsernamePassword. + :vartype username: str """ _attribute_map = { - 'auth_url': {'key': 'authUrl', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, - 'developer_token': {'key': 'developerToken', 'type': 'str'}, - 'password': {'key': 'password', 'type': 'str'}, - 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, + "auth_url": {"key": "authUrl", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + "client_secret": {"key": "clientSecret", "type": "str"}, + "developer_token": {"key": "developerToken", "type": "str"}, + "password": {"key": "password", "type": "str"}, + "refresh_token": {"key": "refreshToken", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, + "username": {"key": "username", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword auth_url: Required by Concur connection category. :paramtype auth_url: str @@ -35361,14 +33425,14 @@ def __init__( :paramtype username: str """ super(WorkspaceConnectionOAuth2, self).__init__(**kwargs) - self.auth_url = kwargs.get('auth_url', None) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.developer_token = kwargs.get('developer_token', None) - self.password = kwargs.get('password', None) - self.refresh_token = kwargs.get('refresh_token', None) - self.tenant_id = kwargs.get('tenant_id', None) - self.username = kwargs.get('username', None) + self.auth_url = kwargs.get("auth_url", None) + self.client_id = kwargs.get("client_id", None) + self.client_secret = kwargs.get("client_secret", None) + self.developer_token = kwargs.get("developer_token", None) + self.password = kwargs.get("password", None) + self.refresh_token = kwargs.get("refresh_token", None) + self.tenant_id = kwargs.get("tenant_id", None) + self.username = kwargs.get("username", None) class WorkspaceConnectionPersonalAccessToken(msrest.serialization.Model): @@ -35379,19 +33443,16 @@ class WorkspaceConnectionPersonalAccessToken(msrest.serialization.Model): """ _attribute_map = { - 'pat': {'key': 'pat', 'type': 'str'}, + "pat": {"key": "pat", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword pat: :paramtype pat: str """ super(WorkspaceConnectionPersonalAccessToken, self).__init__(**kwargs) - self.pat = kwargs.get('pat', None) + self.pat = kwargs.get("pat", None) class WorkspaceConnectionPropertiesV2BasicResource(Resource): @@ -35417,32 +33478,29 @@ class WorkspaceConnectionPropertiesV2BasicResource(Resource): """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'properties': {'required': True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + "properties": {"required": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'properties': {'key': 'properties', 'type': 'WorkspaceConnectionPropertiesV2'}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "WorkspaceConnectionPropertiesV2"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: Required. :paramtype properties: ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2 """ super(WorkspaceConnectionPropertiesV2BasicResource, self).__init__(**kwargs) - self.properties = kwargs['properties'] + self.properties = kwargs["properties"] class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(msrest.serialization.Model): @@ -35456,14 +33514,11 @@ class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(msrest.seri """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[WorkspaceConnectionPropertiesV2BasicResource]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[WorkspaceConnectionPropertiesV2BasicResource]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: :paramtype next_link: str @@ -35472,8 +33527,8 @@ def __init__( list[~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2BasicResource] """ super(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class WorkspaceConnectionServicePrincipal(msrest.serialization.Model): @@ -35488,15 +33543,12 @@ class WorkspaceConnectionServicePrincipal(msrest.serialization.Model): """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + "client_id": {"key": "clientId", "type": "str"}, + "client_secret": {"key": "clientSecret", "type": "str"}, + "tenant_id": {"key": "tenantId", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword client_id: :paramtype client_id: str @@ -35506,9 +33558,9 @@ def __init__( :paramtype tenant_id: str """ super(WorkspaceConnectionServicePrincipal, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - self.tenant_id = kwargs.get('tenant_id', None) + self.client_id = kwargs.get("client_id", None) + self.client_secret = kwargs.get("client_secret", None) + self.tenant_id = kwargs.get("tenant_id", None) class WorkspaceConnectionSharedAccessSignature(msrest.serialization.Model): @@ -35519,19 +33571,16 @@ class WorkspaceConnectionSharedAccessSignature(msrest.serialization.Model): """ _attribute_map = { - 'sas': {'key': 'sas', 'type': 'str'}, + "sas": {"key": "sas", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword sas: :paramtype sas: str """ super(WorkspaceConnectionSharedAccessSignature, self).__init__(**kwargs) - self.sas = kwargs.get('sas', None) + self.sas = kwargs.get("sas", None) class WorkspaceConnectionUpdateParameter(msrest.serialization.Model): @@ -35543,13 +33592,10 @@ class WorkspaceConnectionUpdateParameter(msrest.serialization.Model): """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'WorkspaceConnectionPropertiesV2'}, + "properties": {"key": "properties", "type": "WorkspaceConnectionPropertiesV2"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword properties: The properties that the machine learning workspace connection will be updated with. @@ -35557,7 +33603,7 @@ def __init__( ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPropertiesV2 """ super(WorkspaceConnectionUpdateParameter, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + self.properties = kwargs.get("properties", None) class WorkspaceConnectionUsernamePassword(msrest.serialization.Model): @@ -35573,15 +33619,12 @@ class WorkspaceConnectionUsernamePassword(msrest.serialization.Model): """ _attribute_map = { - 'password': {'key': 'password', 'type': 'str'}, - 'security_token': {'key': 'securityToken', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, + "password": {"key": "password", "type": "str"}, + "security_token": {"key": "securityToken", "type": "str"}, + "username": {"key": "username", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword password: :paramtype password: str @@ -35592,9 +33635,9 @@ def __init__( :paramtype username: str """ super(WorkspaceConnectionUsernamePassword, self).__init__(**kwargs) - self.password = kwargs.get('password', None) - self.security_token = kwargs.get('security_token', None) - self.username = kwargs.get('username', None) + self.password = kwargs.get("password", None) + self.security_token = kwargs.get("security_token", None) + self.username = kwargs.get("username", None) class WorkspaceHubConfig(msrest.serialization.Model): @@ -35607,14 +33650,11 @@ class WorkspaceHubConfig(msrest.serialization.Model): """ _attribute_map = { - 'additional_workspace_storage_accounts': {'key': 'additionalWorkspaceStorageAccounts', 'type': '[str]'}, - 'default_workspace_resource_group': {'key': 'defaultWorkspaceResourceGroup', 'type': 'str'}, + "additional_workspace_storage_accounts": {"key": "additionalWorkspaceStorageAccounts", "type": "[str]"}, + "default_workspace_resource_group": {"key": "defaultWorkspaceResourceGroup", "type": "str"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword additional_workspace_storage_accounts: :paramtype additional_workspace_storage_accounts: list[str] @@ -35622,8 +33662,8 @@ def __init__( :paramtype default_workspace_resource_group: str """ super(WorkspaceHubConfig, self).__init__(**kwargs) - self.additional_workspace_storage_accounts = kwargs.get('additional_workspace_storage_accounts', None) - self.default_workspace_resource_group = kwargs.get('default_workspace_resource_group', None) + self.additional_workspace_storage_accounts = kwargs.get("additional_workspace_storage_accounts", None) + self.default_workspace_resource_group = kwargs.get("default_workspace_resource_group", None) class WorkspaceListResult(msrest.serialization.Model): @@ -35638,14 +33678,11 @@ class WorkspaceListResult(msrest.serialization.Model): """ _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[Workspace]'}, + "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[Workspace]"}, } - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): """ :keyword next_link: The link to the next page constructed using the continuationToken. If null, there are no additional pages. @@ -35655,8 +33692,8 @@ def __init__( :paramtype value: list[~azure.mgmt.machinelearningservices.models.Workspace] """ super(WorkspaceListResult, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) + self.next_link = kwargs.get("next_link", None) + self.value = kwargs.get("value", None) class WorkspacePrivateEndpointResource(msrest.serialization.Model): @@ -35672,21 +33709,17 @@ class WorkspacePrivateEndpointResource(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'subnet_arm_id': {'readonly': True}, + "id": {"readonly": True}, + "subnet_arm_id": {"readonly": True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'}, + "id": {"key": "id", "type": "str"}, + "subnet_arm_id": {"key": "subnetArmId", "type": "str"}, } - def __init__( - self, - **kwargs - ): - """ - """ + def __init__(self, **kwargs): + """ """ super(WorkspacePrivateEndpointResource, self).__init__(**kwargs) self.id = None self.subnet_arm_id = None @@ -35747,34 +33780,35 @@ class WorkspaceUpdateParameters(msrest.serialization.Model): """ _attribute_map = { - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, - 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'enable_data_isolation': {'key': 'properties.enableDataIsolation', 'type': 'bool'}, - 'enable_software_bill_of_materials': {'key': 'properties.enableSoftwareBillOfMaterials', 'type': 'bool'}, - 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionUpdateProperties'}, - 'feature_store_settings': {'key': 'properties.featureStoreSettings', 'type': 'FeatureStoreSettings'}, - 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, - 'ip_allowlist': {'key': 'properties.ipAllowlist', 'type': '[str]'}, - 'managed_network': {'key': 'properties.managedNetwork', 'type': 'ManagedNetworkSettings'}, - 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'serverless_compute_settings': {'key': 'properties.serverlessComputeSettings', - 'type': 'ServerlessComputeSettings'}, - 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', - 'type': 'ServiceManagedResourcesSettings'}, - 'soft_delete_retention_in_days': {'key': 'properties.softDeleteRetentionInDays', 'type': 'int'}, - 'v1_legacy_mode': {'key': 'properties.v1LegacyMode', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): + "identity": {"key": "identity", "type": "ManagedServiceIdentity"}, + "sku": {"key": "sku", "type": "Sku"}, + "tags": {"key": "tags", "type": "{str}"}, + "application_insights": {"key": "properties.applicationInsights", "type": "str"}, + "container_registry": {"key": "properties.containerRegistry", "type": "str"}, + "description": {"key": "properties.description", "type": "str"}, + "enable_data_isolation": {"key": "properties.enableDataIsolation", "type": "bool"}, + "enable_software_bill_of_materials": {"key": "properties.enableSoftwareBillOfMaterials", "type": "bool"}, + "encryption": {"key": "properties.encryption", "type": "EncryptionUpdateProperties"}, + "feature_store_settings": {"key": "properties.featureStoreSettings", "type": "FeatureStoreSettings"}, + "friendly_name": {"key": "properties.friendlyName", "type": "str"}, + "image_build_compute": {"key": "properties.imageBuildCompute", "type": "str"}, + "ip_allowlist": {"key": "properties.ipAllowlist", "type": "[str]"}, + "managed_network": {"key": "properties.managedNetwork", "type": "ManagedNetworkSettings"}, + "primary_user_assigned_identity": {"key": "properties.primaryUserAssignedIdentity", "type": "str"}, + "public_network_access": {"key": "properties.publicNetworkAccess", "type": "str"}, + "serverless_compute_settings": { + "key": "properties.serverlessComputeSettings", + "type": "ServerlessComputeSettings", + }, + "service_managed_resources_settings": { + "key": "properties.serviceManagedResourcesSettings", + "type": "ServiceManagedResourcesSettings", + }, + "soft_delete_retention_in_days": {"key": "properties.softDeleteRetentionInDays", "type": "int"}, + "v1_legacy_mode": {"key": "properties.v1LegacyMode", "type": "bool"}, + } + + def __init__(self, **kwargs): """ :keyword identity: Managed service identity (system assigned and/or user assigned identities). :paramtype identity: ~azure.mgmt.machinelearningservices.models.ManagedServiceIdentity @@ -35829,23 +33863,23 @@ def __init__( :paramtype v1_legacy_mode: bool """ super(WorkspaceUpdateParameters, self).__init__(**kwargs) - self.identity = kwargs.get('identity', None) - self.sku = kwargs.get('sku', None) - self.tags = kwargs.get('tags', None) - self.application_insights = kwargs.get('application_insights', None) - self.container_registry = kwargs.get('container_registry', None) - self.description = kwargs.get('description', None) - self.enable_data_isolation = kwargs.get('enable_data_isolation', None) - self.enable_software_bill_of_materials = kwargs.get('enable_software_bill_of_materials', None) - self.encryption = kwargs.get('encryption', None) - self.feature_store_settings = kwargs.get('feature_store_settings', None) - self.friendly_name = kwargs.get('friendly_name', None) - self.image_build_compute = kwargs.get('image_build_compute', None) - self.ip_allowlist = kwargs.get('ip_allowlist', None) - self.managed_network = kwargs.get('managed_network', None) - self.primary_user_assigned_identity = kwargs.get('primary_user_assigned_identity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.serverless_compute_settings = kwargs.get('serverless_compute_settings', None) - self.service_managed_resources_settings = kwargs.get('service_managed_resources_settings', None) - self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', None) - self.v1_legacy_mode = kwargs.get('v1_legacy_mode', None) + self.identity = kwargs.get("identity", None) + self.sku = kwargs.get("sku", None) + self.tags = kwargs.get("tags", None) + self.application_insights = kwargs.get("application_insights", None) + self.container_registry = kwargs.get("container_registry", None) + self.description = kwargs.get("description", None) + self.enable_data_isolation = kwargs.get("enable_data_isolation", None) + self.enable_software_bill_of_materials = kwargs.get("enable_software_bill_of_materials", None) + self.encryption = kwargs.get("encryption", None) + self.feature_store_settings = kwargs.get("feature_store_settings", None) + self.friendly_name = kwargs.get("friendly_name", None) + self.image_build_compute = kwargs.get("image_build_compute", None) + self.ip_allowlist = kwargs.get("ip_allowlist", None) + self.managed_network = kwargs.get("managed_network", None) + self.primary_user_assigned_identity = kwargs.get("primary_user_assigned_identity", None) + self.public_network_access = kwargs.get("public_network_access", None) + self.serverless_compute_settings = kwargs.get("serverless_compute_settings", None) + self.service_managed_resources_settings = kwargs.get("service_managed_resources_settings", None) + self.soft_delete_retention_in_days = kwargs.get("soft_delete_retention_in_days", None) + self.v1_legacy_mode = kwargs.get("v1_legacy_mode", None) diff --git a/src/promptflow/promptflow/azure/_models/_version.py b/src/promptflow-core/promptflow/core/_connection_provider/_models/_version.py similarity index 100% rename from src/promptflow/promptflow/azure/_models/_version.py rename to src/promptflow-core/promptflow/core/_connection_provider/_models/_version.py diff --git a/src/promptflow-core/promptflow/core/_connection_provider/_utils.py b/src/promptflow-core/promptflow/core/_connection_provider/_utils.py new file mode 100644 index 00000000000..372a3a2e975 --- /dev/null +++ b/src/promptflow-core/promptflow/core/_connection_provider/_utils.py @@ -0,0 +1,81 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import os +import re + +from promptflow._constants import PF_NO_INTERACTIVE_LOGIN +from promptflow._sdk._constants import AZURE_WORKSPACE_REGEX_FORMAT +from promptflow._utils.user_agent_utils import ClientUserAgentUtil +from promptflow.core._errors import MalformedConnectionProviderConfig, MissingRequiredPackage +from promptflow.exceptions import ValidationException + + +def check_required_packages(): + try: + import azure.ai.ml # noqa: F401 + import azure.identity # noqa: F401 + except ImportError as e: + raise MissingRequiredPackage( + message="Please install 'promptflow-core[azureml-serving]' to use workspace connection." + ) from e + + +def get_arm_token(credential) -> str: + check_required_packages() + from azure.ai.ml._azure_environments import _get_base_url_from_metadata + + resource = _get_base_url_from_metadata() + return get_token(credential, resource) + + +def get_token(credential, resource) -> str: + check_required_packages() + from azure.ai.ml._azure_environments import _resource_to_scopes + + azure_ml_scopes = _resource_to_scopes(resource) + token = credential.get_token(*azure_ml_scopes).token + # validate token has aml audience + import jwt # Included by azure-identity + + decoded_token = jwt.decode( + token, + options={"verify_signature": False, "verify_aud": False}, + ) + if decoded_token.get("aud") != resource: + msg = """AAD token with aml scope could not be fetched using the credentials being used. + Please validate if token with {0} scope can be fetched using credentials provided to PFClient. + Token with {0} scope can be fetched using credentials.get_token({0}) + """ + raise ValidationException( + message=msg.format(*azure_ml_scopes), + ) + + return token + + +def extract_workspace(provider_config) -> tuple: + match = re.match(AZURE_WORKSPACE_REGEX_FORMAT, provider_config) + if not match or len(match.groups()) != 5: + raise MalformedConnectionProviderConfig(provider_config=provider_config) + subscription_id = match.group(1) + resource_group = match.group(3) + workspace_name = match.group(5) + return subscription_id, resource_group, workspace_name + + +def is_github_codespaces(): + """Check if the current environment is GitHub Codespaces.""" + # Ref: + # https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace + return os.environ.get("CODESPACES", None) == "true" + + +def interactive_credential_disabled(): + """Check if interactive login is disabled.""" + return os.environ.get(PF_NO_INTERACTIVE_LOGIN, "false").lower() == "true" + + +def is_from_cli(): + """Check if the current execution is from promptflow-cli.""" + return "promptflow-cli" in ClientUserAgentUtil.get_user_agent() diff --git a/src/promptflow/promptflow/azure/operations/_arm_connection_operations.py b/src/promptflow-core/promptflow/core/_connection_provider/_workspace_connection_provider.py similarity index 74% rename from src/promptflow/promptflow/azure/operations/_arm_connection_operations.py rename to src/promptflow-core/promptflow/core/_connection_provider/_workspace_connection_provider.py index e2872397498..e04f3cf5c9c 100644 --- a/src/promptflow/promptflow/azure/operations/_arm_connection_operations.py +++ b/src/promptflow-core/promptflow/core/_connection_provider/_workspace_connection_provider.py @@ -1,25 +1,30 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from typing import Any, Dict, Union +from typing import Any, Optional, Union import requests -from azure.ai.ml._scope_dependent_operations import ( - OperationConfig, - OperationsContainer, - OperationScope, - _ScopeDependentOperations, -) -from azure.core.exceptions import ClientAuthenticationError -from promptflow._sdk._constants import ConnectionAuthMode -from promptflow._sdk.entities._connection import CustomConnection, _Connection +from promptflow._constants import ConnectionAuthMode from promptflow._utils.retry_utils import http_retry_wrapper -from promptflow.azure._models._models import WorkspaceConnectionPropertiesV2BasicResource -from promptflow.azure._restclient.flow_service_caller import FlowServiceCaller -from promptflow.azure._utils.general import get_arm_token +from promptflow.core._connection import CustomConnection, _Connection +from promptflow.core._errors import ( + AccessDeniedError, + AccountNotSetUp, + BuildConnectionError, + MissingRequiredPackage, + OpenURLFailed, + OpenURLFailedUserError, + OpenURLUserAuthenticationError, + UnknownConnectionType, + UnsupportedConnectionAuthType, +) from promptflow.exceptions import ErrorTarget, SystemErrorException, UserErrorException +from ..._utils.credential_utils import get_default_azure_credential +from ._connection_provider import ConnectionProvider +from ._utils import interactive_credential_disabled, is_from_cli, is_github_codespaces + GET_CONNECTION_URL = ( "/subscriptions/{sub}/resourcegroups/{rg}/providers/Microsoft.MachineLearningServices" "/workspaces/{ws}/connections/{name}/listsecrets?api-version=2023-04-01-preview" @@ -56,42 +61,56 @@ def get_case_insensitive_key(d, key, default=None): return default -class ArmConnectionOperations(_ScopeDependentOperations): - """ArmConnectionOperations. - - Get connections from arm api. You should not instantiate this class directly. Instead, you should - create an PFClient instance that instantiates it for you and - attaches it as an attribute. - """ - +class WorkspaceConnectionProvider(ConnectionProvider): def __init__( self, - operation_scope: OperationScope, - operation_config: OperationConfig, - all_operations: OperationsContainer, - credential, - service_caller: FlowServiceCaller, - **kwargs: Dict, + subscription_id: Optional[str] = None, + resource_group_name: Optional[str] = None, + workspace_name: Optional[str] = None, + credential=None, ): - super(ArmConnectionOperations, self).__init__(operation_scope, operation_config) - self._all_operations = all_operations - self._service_caller = service_caller self._credential = credential - - def get(self, name, **kwargs): - connection_dict = self.build_connection_dict(name) - return _Connection._from_execution_connection_dict(name=name, data=connection_dict) + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.workspace_name = workspace_name + + @property + def credential(self): + """Get the credential.""" + # Note: Add this to postpone credential requirement until calling get() + if not self._credential: + self._credential = self._get_credential() + return self._credential @classmethod - def _direct_get(cls, name, subscription_id, resource_group_name, workspace_name, credential): - """ - This method is added for local pf_client with workspace provider to ensure we only require limited - permission(workspace/list secrets). As create azure pf_client requires workspace read permission. - """ - connection_dict = cls._build_connection_dict( - name, subscription_id, resource_group_name, workspace_name, credential - ) - return _Connection._from_execution_connection_dict(name=name, data=connection_dict) + def _get_credential(cls): + + # Note: There is a try-catch in get arm token. It requires azure-ai-ml. + # TODO: Remove the azure-ai-ml dependency. + from ._utils import get_arm_token + + try: + from azure.identity import DefaultAzureCredential, DeviceCodeCredential + except ImportError as e: + raise MissingRequiredPackage( + message="Please install 'promptflow-core[azureml-serving]' to use workspace connection." + ) from e + + if is_from_cli(): + try: + # Try getting token for cli without interactive login + credential = get_default_azure_credential() + get_arm_token(credential=credential) + except Exception: + raise AccountNotSetUp() + if interactive_credential_disabled(): + return DefaultAzureCredential(exclude_interactive_browser_credential=True) + if is_github_codespaces(): + # For code spaces, append device code credential as the fallback option. + credential = DefaultAzureCredential() + credential.credentials = (*credential.credentials, DeviceCodeCredential()) + return credential + return DefaultAzureCredential(exclude_interactive_browser_credential=False) @classmethod def open_url(cls, token, url, action, host="management.azure.com", method="GET", model=None) -> Union[Any, dict]: @@ -247,35 +266,10 @@ def get_auth_config(props): # Note: Filter empty values out to ensure default values can be picked when init class object. return {**meta, "value": {k: v for k, v in value.items() if v}} - def build_connection_dict(self, name): - return self._build_connection_dict( - name, - self._operation_scope.subscription_id, - self._operation_scope.resource_group_name, - self._operation_scope.workspace_name, - self._credential, - ) - - @classmethod - def _convert_to_connection_dict(cls, conn_name, conn_data): - try: - rest_obj = WorkspaceConnectionPropertiesV2BasicResource.deserialize(conn_data) - conn_dict = cls.build_connection_dict_from_rest_object(conn_name, rest_obj) - return conn_dict - except Exception as e: - raise BuildConnectionError( - message_format=f"Build connection dict for connection {{name}} failed with {e}.", - name=conn_name, - ) - @classmethod def _build_connection_dict(cls, name, subscription_id, resource_group_name, workspace_name, credential) -> dict: """ :type name: str - :type subscription_id: str - :type resource_group_name: str - :type workspace_name: str - :type credential: azure.identity.TokenCredential """ url = GET_CONNECTION_URL.format( sub=subscription_id, @@ -283,6 +277,18 @@ def _build_connection_dict(cls, name, subscription_id, resource_group_name, work ws=workspace_name, name=name, ) + # Note: There is a try-catch in get arm token. It requires azure-ai-ml. + # TODO: Remove the azure-ai-ml dependency. + from ._utils import get_arm_token + + try: + from azure.core.exceptions import ClientAuthenticationError + + from ._models import WorkspaceConnectionPropertiesV2BasicResource + except ImportError as e: + raise MissingRequiredPackage( + message="Please install 'promptflow-core[azureml-serving]' to use workspace connection." + ) from e try: rest_obj: WorkspaceConnectionPropertiesV2BasicResource = cls.open_url( get_arm_token(credential=credential), @@ -299,9 +305,9 @@ def _build_connection_dict(cls, name, subscription_id, resource_group_name, work ) raise OpenURLUserAuthenticationError(message=auth_error_message) except ClientAuthenticationError as e: - raise UserErrorException(target=ErrorTarget.CONTROL_PLANE_SDK, message=str(e), error=e) + raise UserErrorException(target=ErrorTarget.CORE, message=str(e), error=e) except Exception as e: - raise SystemErrorException(target=ErrorTarget.CONTROL_PLANE_SDK, message=str(e), error=e) + raise SystemErrorException(target=ErrorTarget.CORE, message=str(e), error=e) try: return cls.build_connection_dict_from_rest_object(name, rest_obj) @@ -311,45 +317,28 @@ def _build_connection_dict(cls, name, subscription_id, resource_group_name, work name=name, ) + @classmethod + def _convert_to_connection_dict(cls, conn_name, conn_data): + try: + from ._models import WorkspaceConnectionPropertiesV2BasicResource + except ImportError as e: + raise MissingRequiredPackage(message="Please install 'msrest' to use workspace connection.") from e + try: + rest_obj = WorkspaceConnectionPropertiesV2BasicResource.deserialize(conn_data) + conn_dict = cls.build_connection_dict_from_rest_object(conn_name, rest_obj) + return conn_dict + except Exception as e: + raise BuildConnectionError( + message_format=f"Build connection dict for connection {{name}} failed with {e}.", + name=conn_name, + ) -class AccessDeniedError(UserErrorException): - """Exception raised when run info can not be found in storage""" - - def __init__(self, operation: str, target: ErrorTarget): - super().__init__(message=f"Access is denied to perform operation {operation!r}", target=target) - - -class OpenURLFailed(SystemErrorException): - def __init__(self, **kwargs): - super().__init__(target=ErrorTarget.CONTROL_PLANE_SDK, **kwargs) - - -class BuildConnectionError(SystemErrorException): - def __init__(self, **kwargs): - super().__init__(target=ErrorTarget.CONTROL_PLANE_SDK, **kwargs) - - -class UserAuthenticationError(UserErrorException): - """Exception raised when user authentication failed""" - - pass - - -class OpenURLUserAuthenticationError(UserAuthenticationError): - def __init__(self, **kwargs): - super().__init__(target=ErrorTarget.CONTROL_PLANE_SDK, **kwargs) - - -class OpenURLFailedUserError(UserErrorException): - def __init__(self, **kwargs): - super().__init__(target=ErrorTarget.CONTROL_PLANE_SDK, **kwargs) - - -class UnknownConnectionType(UserErrorException): - def __init__(self, **kwargs): - super().__init__(target=ErrorTarget.CONTROL_PLANE_SDK, **kwargs) - - -class UnsupportedConnectionAuthType(UserErrorException): - def __init__(self, **kwargs): - super().__init__(target=ErrorTarget.CONTROL_PLANE_SDK, **kwargs) + def get(self, name: str, **kwargs) -> _Connection: + connection_dict = self._build_connection_dict( + name, + subscription_id=self.subscription_id, + resource_group_name=self.resource_group_name, + workspace_name=self.workspace_name, + credential=self.credential, + ) + return _Connection._from_execution_connection_dict(name=name, data=connection_dict) diff --git a/src/promptflow-core/promptflow/core/_errors.py b/src/promptflow-core/promptflow/core/_errors.py new file mode 100644 index 00000000000..508b3602a8e --- /dev/null +++ b/src/promptflow-core/promptflow/core/_errors.py @@ -0,0 +1,121 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from promptflow.exceptions import ErrorTarget, SystemErrorException, UserErrorException + + +class CoreError(UserErrorException): + """Core base class, target default is CORE.""" + + def __init__( + self, + message="", + message_format="", + target: ErrorTarget = ErrorTarget.CORE, + module=None, + **kwargs, + ): + super().__init__(message=message, message_format=message_format, target=target, module=module, **kwargs) + + +class CoreInternalError(SystemErrorException): + """Core internal error.""" + + def __init__( + self, + message="", + message_format="", + target: ErrorTarget = ErrorTarget.CORE, + module=None, + **kwargs, + ): + super().__init__(message=message, message_format=message_format, target=target, module=module, **kwargs) + + +class GenerateFlowMetaJsonError(CoreError): + """Exception raised if flow json generation failed.""" + + pass + + +class RequiredEnvironmentVariablesNotSetError(CoreError): + """Exception raised if connection from_env required env vars not found.""" + + def __init__(self, env_vars: list, cls_name: str): + super().__init__(f"Required environment variables {env_vars} to build {cls_name} not set.") + + +class OpenURLFailed(SystemErrorException): + def __init__(self, **kwargs): + super().__init__(target=ErrorTarget.CORE, **kwargs) + + +class BuildConnectionError(SystemErrorException): + def __init__(self, **kwargs): + super().__init__(target=ErrorTarget.CORE, **kwargs) + + +class MissingRequiredPackage(UserErrorException): + def __init__(self, **kwargs): + super().__init__(target=ErrorTarget.CORE, **kwargs) + + +class UserAuthenticationError(UserErrorException): + """Exception raised when user authentication failed""" + + pass + + +class OpenURLUserAuthenticationError(UserAuthenticationError): + def __init__(self, **kwargs): + super().__init__(target=ErrorTarget.CORE, **kwargs) + + +class OpenURLFailedUserError(UserErrorException): + def __init__(self, **kwargs): + super().__init__(target=ErrorTarget.CORE, **kwargs) + + +class UnknownConnectionType(UserErrorException): + def __init__(self, **kwargs): + super().__init__(target=ErrorTarget.CORE, **kwargs) + + +class UnsupportedConnectionAuthType(UserErrorException): + def __init__(self, **kwargs): + super().__init__(target=ErrorTarget.CORE, **kwargs) + + +class UnsupportedConnectionProviderConfig(UserErrorException): + def __init__(self, **kwargs): + super().__init__(target=ErrorTarget.CORE, **kwargs) + + +class MalformedConnectionProviderConfig(UserErrorException): + """Exception raised when connection provider config is malformed.""" + + def __init__(self, provider_config, **kwargs): + message = "Malformed connection provider config, expected azureml://subscriptions//" + "resourceGroups//providers/Microsoft.MachineLearningServices/" + f"workspaces/, got {provider_config}" + super().__init__(target=ErrorTarget.CORE, message=message, **kwargs) + + +class AccessDeniedError(UserErrorException): + """Exception raised when run info can not be found in storage""" + + def __init__(self, operation: str, target: ErrorTarget): + super().__init__(message=f"Access is denied to perform operation {operation!r}", target=target) + + +class AccountNotSetUp(UserErrorException): + """Exception raised when account is not setup""" + + def __init__(self): + super().__init__( + message=( + "Please run 'az login' or 'az login --use-device-code' to set up account. " + "See https://docs.microsoft.com/cli/azure/authenticate-azure-cli for more details." + ), + target=ErrorTarget.CORE, + ) diff --git a/src/promptflow-core/promptflow/core/_flow.py b/src/promptflow-core/promptflow/core/_flow.py new file mode 100644 index 00000000000..be0b5d62a35 --- /dev/null +++ b/src/promptflow-core/promptflow/core/_flow.py @@ -0,0 +1,182 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import abc +from os import PathLike +from pathlib import Path +from typing import Any, Mapping, Union + +from promptflow._constants import DEFAULT_ENCODING, LANGUAGE_KEY, FlowLanguage +from promptflow._utils.flow_utils import is_flex_flow, resolve_flow_path +from promptflow._utils.yaml_utils import load_yaml_string +from promptflow.exceptions import UserErrorException + + +class AbstractFlowBase(abc.ABC): + """Abstract class for all Flow entities in both core and devkit.""" + + def __init__(self, *, data: dict, code: Path, path: Path, **kwargs): + # yaml content if provided + self._data = data + # working directory of the flow + self._code = Path(code).resolve() + # flow file path, can be script file or flow definition YAML file + self._path = Path(path).resolve() + + +class FlowBase(AbstractFlowBase): + def __init__(self, *, data: dict, code: Path, path: Path, **kwargs): + super().__init__(data=data, code=code, path=path, **kwargs) + + @property + def code(self) -> Path: + """Working directory of the flow.""" + return self._code + + @property + def path(self) -> Path: + """Flow file path. Can be script file or flow definition YAML file.""" + return self._path + + @classmethod + def load( + cls, + source: Union[str, PathLike], + **kwargs, + ) -> "Flow": + """ + Load flow from YAML file. + + :param source: The local yaml source of a flow. Must be a path to a local file. + If the source is a path, it will be open and read. + An exception is raised if the file does not exist. + :type source: Union[PathLike, str] + :return: A Flow object + :rtype: Flow + """ + flow_dir, flow_filename = resolve_flow_path(source) + flow_path = flow_dir / flow_filename + with open(flow_path, "r", encoding=DEFAULT_ENCODING) as f: + flow_content = f.read() + data = load_yaml_string(flow_content) + flow_language = data.get(LANGUAGE_KEY, FlowLanguage.Python) + if flow_language != FlowLanguage.Python: + raise UserErrorException( + message_format="Only python flows are allowed to be loaded with " + "promptflow-core but got a {language} flow", + language=flow_language, + ) + + return cls._create(code=flow_dir, path=flow_path, data=data) + + @classmethod + def _create(cls, data, code, path, **kwargs): + raise NotImplementedError() + + +class Flow(FlowBase): + """A Flow in the context of PromptFlow is a sequence of steps that define a task. + Each step in the flow could be a prompt that is sent to a language model, or simply a function task, + and the output of one step can be used as the input to the next. + Flows can be used to build complex applications with language models. + + Example: + + .. code-block:: python + + from promptflow.core import Flow + flow = Flow.load(source="path/to/flow.yaml") + result = flow(input_a=1, input_b=2) + + """ + + def __call__(self, *args, **kwargs) -> Mapping[str, Any]: + """Calling flow as a function, the inputs should be provided with key word arguments. + Returns the output of the flow. + The function call throws UserErrorException: if the flow is not valid or the inputs are not valid. + SystemErrorException: if the flow execution failed due to unexpected executor error. + + :param args: positional arguments are not supported. + :param kwargs: flow inputs with key word arguments. + :return: + """ + + if args: + raise UserErrorException("Flow can only be called with keyword arguments.") + + result = self.invoke(inputs=kwargs) + return result.output + + def invoke(self, inputs: dict, connections: dict = None, **kwargs) -> "LineResult": + """Invoke a flow and get a LineResult object.""" + # candidate parameters: connections, variant, overrides, streaming + from promptflow.core._serving.flow_invoker import FlowInvoker + + if is_flex_flow(yaml_dict=self._data, working_dir=self.code): + raise UserErrorException("Please call entry directly for flex flow.") + + invoker = FlowInvoker( + flow=self, + connections=connections, + streaming=True, + ) + result = invoker._invoke( + data=inputs, + ) + return result + + @classmethod + def _create(cls, data, code, path, **kwargs): + return cls(code=code, path=path, data=data, **kwargs) + + +class AsyncFlow(FlowBase): + """Async flow is based on Flow, which is used to invoke flow in async mode. + + Example: + + .. code-block:: python + + from promptflow.core import class AsyncFlow + flow = AsyncFlow.load(source="path/to/flow.yaml") + result = await flow(input_a=1, input_b=2) + + """ + + async def __call__(self, *args, **kwargs) -> Mapping[str, Any]: + """Calling flow as a function in async, the inputs should be provided with key word arguments. + Returns the output of the flow. + The function call throws UserErrorException: if the flow is not valid or the inputs are not valid. + SystemErrorException: if the flow execution failed due to unexpected executor error. + + :param args: positional arguments are not supported. + :param kwargs: flow inputs with key word arguments. + :return: + """ + if args: + raise UserErrorException("Flow can only be called with keyword arguments.") + + result = await self.invoke(inputs=kwargs) + return result.output + + async def invoke(self, inputs: dict, *, connections: dict = None, **kwargs) -> "LineResult": + """Invoke a flow and get a LineResult object.""" + + from promptflow.core._serving.flow_invoker import AsyncFlowInvoker + + invoker = AsyncFlowInvoker( + flow=self, + connections=connections, + streaming=True, + flow_path=self.path, + working_dir=self.code, + ) + result = await invoker._invoke_async( + data=inputs, + ) + return result + + @classmethod + def _create(cls, data, code, path, **kwargs): + return cls(code=code, path=path, data=data, **kwargs) diff --git a/src/promptflow/promptflow/_sdk/_service/apis/__init__.py b/src/promptflow-core/promptflow/core/_serving/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_service/apis/__init__.py rename to src/promptflow-core/promptflow/core/_serving/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_serving/_errors.py b/src/promptflow-core/promptflow/core/_serving/_errors.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_serving/_errors.py rename to src/promptflow-core/promptflow/core/_serving/_errors.py diff --git a/src/promptflow/promptflow/_sdk/_serving/app.py b/src/promptflow-core/promptflow/core/_serving/app.py similarity index 64% rename from src/promptflow/promptflow/_sdk/_serving/app.py rename to src/promptflow-core/promptflow/core/_serving/app.py index f1f7be24071..316f449c658 100644 --- a/src/promptflow/promptflow/_sdk/_serving/app.py +++ b/src/promptflow-core/promptflow/core/_serving/app.py @@ -10,32 +10,38 @@ from typing import Dict from flask import Flask, g, jsonify, request +from opentelemetry import baggage, context, trace +from opentelemetry.trace.span import INVALID_SPAN -from promptflow._sdk._load_functions import load_flow -from promptflow._sdk._serving.extension.extension_factory import ExtensionFactory -from promptflow._sdk._serving.flow_invoker import FlowInvoker -from promptflow._sdk._serving.response_creator import ResponseCreator -from promptflow._sdk._serving.utils import ( +from promptflow._utils.exception_utils import ErrorResponse +from promptflow._utils.logger_utils import LoggerFactory +from promptflow._utils.user_agent_utils import setup_user_agent_to_operation_context +from promptflow.contracts.run_info import Status +from promptflow.core import Flow +from promptflow.core._serving.constants import FEEDBACK_TRACE_FIELD_NAME, FEEDBACK_TRACE_SPAN_NAME +from promptflow.core._serving.extension.extension_factory import ExtensionFactory +from promptflow.core._serving.flow_invoker import FlowInvoker +from promptflow.core._serving.response_creator import ResponseCreator +from promptflow.core._serving.utils import ( enable_monitoring, get_output_fields_to_remove, get_sample_json, handle_error_to_response, + load_feedback_swagger, load_request_data, + serialize_attribute_value, streaming_response_required, + try_extract_trace_context, ) -from promptflow._sdk._utils import setup_user_agent_to_operation_context -from promptflow._utils.exception_utils import ErrorResponse -from promptflow._utils.logger_utils import LoggerFactory -from promptflow._version import VERSION -from promptflow.contracts.run_info import Status +from promptflow.core._utils import init_executable +from promptflow.core._version import __version__ from promptflow.exceptions import SystemErrorException from promptflow.storage._run_storage import DummyRunStorage +from promptflow.tracing._operation_context import OperationContext from .swagger import generate_swagger logger = LoggerFactory.get_logger("pfserving-app", target_stdout=True) -DEFAULT_STATIC_PATH = Path(__file__).parent / "static" -USER_AGENT = f"promptflow-local-serving/{VERSION}" class PromptflowServingApp(Flask): @@ -48,34 +54,15 @@ def init(self, **kwargs): # parse promptflow project path self.project_path = self.extension.get_flow_project_path() logger.info(f"Project path: {self.project_path}") - self.flow_entity = load_flow(self.project_path) - self.flow = self.flow_entity._init_executable() + self.flow = init_executable(flow_path=Path(self.project_path)) # enable environment_variables environment_variables = kwargs.get("environment_variables", {}) + logger.debug(f"Environment variables: {environment_variables}") os.environ.update(environment_variables) default_environment_variables = self.flow.get_environment_variables_with_overrides() self.set_default_environment_variables(default_environment_variables) - # load trace exporters - trace_exporters = self.extension.get_trace_exporters(self.project_path) - if trace_exporters: - logger.info(f"Enable {len(trace_exporters)} trace exporters.") - from opentelemetry import trace - from opentelemetry.sdk.resources import SERVICE_NAME, Resource - from opentelemetry.sdk.trace import TracerProvider - from opentelemetry.sdk.trace.export import BatchSpanProcessor - - resource = Resource( - attributes={ - SERVICE_NAME: "promptflow", - } - ) - trace.set_tracer_provider(TracerProvider(resource=resource)) - provider = trace.get_tracer_provider() - for exporter in trace_exporters: - provider.add_span_processor(BatchSpanProcessor(exporter)) - self.flow_name = self.extension.get_flow_name() self.flow.name = self.flow_name conn_data_override, conn_name_override = self.extension.get_override_connections(self.flow) @@ -87,6 +74,10 @@ def init(self, **kwargs): self.connection_provider = self.extension.get_connection_provider() self.credential = self.extension.get_credential() self.sample = get_sample_json(self.project_path, logger) + + self.init = kwargs.get("init", {}) + logger.info("Init params: " + str(self.init)) + self.init_swagger() # try to initialize the flow invoker try: @@ -110,7 +101,7 @@ def init_invoker_if_not_exist(self): return logger.info("Promptflow executor starts initializing...") self.flow_invoker = FlowInvoker( - self.project_path, + flow=Flow.load(source=self.project_path), connection_provider=self.connection_provider, streaming=streaming_response_required, raise_ex=False, @@ -119,7 +110,9 @@ def init_invoker_if_not_exist(self): # for serving, we don't need to persist intermediate result, this is to avoid memory leak. storage=DummyRunStorage(), credential=self.credential, + init_kwargs=self.init, ) + # why we need to update bonded executable flow? self.flow = self.flow_invoker.flow # Set the flow name as folder name self.flow.name = self.flow_name @@ -129,6 +122,8 @@ def init_invoker_if_not_exist(self): def init_swagger(self): self.response_fields_to_remove = get_output_fields_to_remove(self.flow, logger) self.swagger = generate_swagger(self.flow, self.sample, self.response_fields_to_remove) + data = load_feedback_swagger() + self.swagger["paths"]["/feedback"] = data def set_default_environment_variables(self, default_environment_variables: Dict[str, str] = None): if default_environment_variables is None: @@ -164,8 +159,25 @@ def score(): run_id = g.get("req_id", None) # TODO: refine this once we can directly set the input/output log level to DEBUG in flow_invoker. disable_data_logging = logger.level >= logging.INFO - flow_result = app.flow_invoker.invoke(data, run_id=run_id, disable_input_output_logging=disable_data_logging) - g.flow_result = flow_result + span = trace.get_current_span() + if span == INVALID_SPAN: + # no parent span, try to extract trace context from request + ctx = try_extract_trace_context(logger) + else: + ctx = None + token = context.attach(ctx) if ctx else None + try: + req_id = g.get("req_id", None) + if req_id: + OperationContext.get_instance()._add_otel_attributes("request_id", req_id) + flow_result = app.flow_invoker.invoke( + data, run_id=run_id, disable_input_output_logging=disable_data_logging + ) # noqa + g.flow_result = flow_result + finally: + # detach trace context if exist + if token: + context.detach(token) # check flow result, if failed, return error response if flow_result.run_info.status != Status.Completed: @@ -198,7 +210,7 @@ def swagger(): @app.route("/health", methods=["GET"]) def health(): """Check if the runtime is alive.""" - return {"status": "Healthy", "version": VERSION} + return {"status": "Healthy", "version": __version__} @app.route("/version", methods=["GET"]) def version(): @@ -208,12 +220,58 @@ def version(): build_info_dict = json.loads(build_info) version = build_info_dict["build_number"] except Exception: - version = VERSION + version = __version__ return {"status": "Healthy", "build_info": build_info, "version": version} + @app.route("/feedback", methods=["POST"]) + def feedback(): + ctx = try_extract_trace_context(logger) + from opentelemetry import trace + + open_telemetry_tracer = trace.get_tracer_provider().get_tracer("promptflow") + token = context.attach(ctx) if ctx else None + try: + with open_telemetry_tracer.start_as_current_span(FEEDBACK_TRACE_SPAN_NAME) as span: + data = request.get_data(as_text=True) + should_flatten = request.args.get("flatten", "false").lower() == "true" + if should_flatten: + try: + # try flatten the data to avoid data too big issue (especially for app insights scenario) + data = json.loads(data) + for k in data: + span.set_attribute(k, serialize_attribute_value(data[k])) + except Exception as e: + logger.warning(f"Failed to flatten the feedback, fall back to non-flattern mode. Error: {e}.") + span.set_attribute(FEEDBACK_TRACE_FIELD_NAME, data) + else: + span.set_attribute(FEEDBACK_TRACE_FIELD_NAME, data) + # add baggage data if exist + data = baggage.get_all() + if data: + for k, v in data.items(): + span.set_attribute(k, v) + finally: + if token: + context.detach(token) + return {"status": "Feedback received."} + def create_app(**kwargs): app = PromptflowServingApp(__name__) + # enable CORS + try: + from flask_cors import CORS + + CORS(app) + except ImportError: + logger.warning("flask-cors is not installed, CORS is not enabled.") + # enable auto-instrumentation if customer installed opentelemetry-instrumentation-flask + try: + from opentelemetry.instrumentation.flask import FlaskInstrumentor + + FlaskInstrumentor().instrument_app(app, excluded_urls="/swagger.json,/health,/version") + except ImportError: + logger.info("opentelemetry-instrumentation-flask is not installed, auto-instrumentation is not enabled.") if __name__ != "__main__": app.logger.handlers = logger.handlers app.logger.setLevel(logger.level) diff --git a/src/promptflow/promptflow/_sdk/_service/utils/__init__.py b/src/promptflow-core/promptflow/core/_serving/blueprint/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_service/utils/__init__.py rename to src/promptflow-core/promptflow/core/_serving/blueprint/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_serving/blueprint/monitor_blueprint.py b/src/promptflow-core/promptflow/core/_serving/blueprint/monitor_blueprint.py similarity index 86% rename from src/promptflow/promptflow/_sdk/_serving/blueprint/monitor_blueprint.py rename to src/promptflow-core/promptflow/core/_serving/blueprint/monitor_blueprint.py index aea4408dbb9..a086ac01bcb 100644 --- a/src/promptflow/promptflow/_sdk/_serving/blueprint/monitor_blueprint.py +++ b/src/promptflow-core/promptflow/core/_serving/blueprint/monitor_blueprint.py @@ -2,8 +2,11 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from flask import Blueprint, current_app as app, request -from promptflow._sdk._serving.monitor.flow_monitor import FlowMonitor +from flask import Blueprint +from flask import current_app as app +from flask import request + +from promptflow.core._serving.monitor.flow_monitor import FlowMonitor def is_monitoring_enabled() -> bool: diff --git a/src/promptflow/promptflow/_sdk/_serving/blueprint/static_web_blueprint.py b/src/promptflow-core/promptflow/core/_serving/blueprint/static_web_blueprint.py similarity index 93% rename from src/promptflow/promptflow/_sdk/_serving/blueprint/static_web_blueprint.py rename to src/promptflow-core/promptflow/core/_serving/blueprint/static_web_blueprint.py index 7507c8292b6..ef4be2e2967 100644 --- a/src/promptflow/promptflow/_sdk/_serving/blueprint/static_web_blueprint.py +++ b/src/promptflow-core/promptflow/core/_serving/blueprint/static_web_blueprint.py @@ -2,10 +2,13 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +from pathlib import Path + import flask +from flask import Blueprint +from flask import current_app as app +from flask import request, url_for from jinja2 import Template -from pathlib import Path -from flask import Blueprint, request, url_for, current_app as app def construct_staticweb_blueprint(static_folder): diff --git a/src/promptflow-core/promptflow/core/_serving/constants.py b/src/promptflow-core/promptflow/core/_serving/constants.py new file mode 100644 index 00000000000..296239f0e77 --- /dev/null +++ b/src/promptflow-core/promptflow/core/_serving/constants.py @@ -0,0 +1,6 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +FEEDBACK_TRACE_FIELD_NAME = "feedback" +FEEDBACK_TRACE_SPAN_NAME = "promptflow-feedback" diff --git a/src/promptflow/promptflow/_sdk/_serving/__init__.py b/src/promptflow-core/promptflow/core/_serving/extension/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_serving/__init__.py rename to src/promptflow-core/promptflow/core/_serving/extension/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_serving/extension/azureml_extension.py b/src/promptflow-core/promptflow/core/_serving/extension/azureml_extension.py similarity index 70% rename from src/promptflow/promptflow/_sdk/_serving/extension/azureml_extension.py rename to src/promptflow-core/promptflow/core/_serving/extension/azureml_extension.py index e5aee077805..c5ab797d0b9 100644 --- a/src/promptflow/promptflow/_sdk/_serving/extension/azureml_extension.py +++ b/src/promptflow-core/promptflow/core/_serving/extension/azureml_extension.py @@ -7,28 +7,27 @@ import re from typing import Any, Tuple -from promptflow._sdk._serving._errors import InvalidConnectionData, MissingConnectionProvider -from promptflow._sdk._serving.extension.default_extension import AppExtension -from promptflow._sdk._serving.monitor.data_collector import FlowDataCollector -from promptflow._sdk._serving.monitor.flow_monitor import FlowMonitor -from promptflow._sdk._serving.monitor.metrics import MetricsRecorder -from promptflow._sdk._serving.monitor.mdc_exporter import MdcExporter -from promptflow._sdk._serving.utils import decode_dict, get_pf_serving_env, normalize_connection_name from promptflow._utils.retry_utils import retry -from promptflow._version import VERSION from promptflow.contracts.flow import Flow - -USER_AGENT = f"promptflow-cloud-serving/{VERSION}" +from promptflow.core._serving._errors import InvalidConnectionData, MissingConnectionProvider +from promptflow.core._serving.extension.default_extension import AppExtension +from promptflow.core._serving.extension.extension_type import ExtensionType +from promptflow.core._serving.monitor.data_collector import FlowDataCollector +from promptflow.core._serving.utils import decode_dict, get_pf_serving_env, normalize_connection_name +from promptflow.core._version import __version__ + +USER_AGENT = f"promptflow-cloud-serving/{__version__}" AML_DEPLOYMENT_RESOURCE_ID_REGEX = "/subscriptions/(.*)/resourceGroups/(.*)/providers/Microsoft.MachineLearningServices/workspaces/(.*)/onlineEndpoints/(.*)/deployments/(.*)" # noqa: E501 -AML_CONNECTION_PROVIDER_TEMPLATE = "azureml:/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearningServices/workspaces/{}" # noqa: E501 +AML_CONNECTION_PROVIDER_TEMPLATE = "azureml://subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearningServices/workspaces/{}" # noqa: E501 class AzureMLExtension(AppExtension): """AzureMLExtension is used to create extension for azureml serving.""" def __init__(self, logger, **kwargs): - super().__init__(logger=logger, **kwargs) - self.logger = logger + super().__init__( + logger=logger, extension_type=ExtensionType.AZUREML, collector=FlowDataCollector(logger), **kwargs + ) # noqa: E501 # parse promptflow project path project_path: str = get_pf_serving_env("PROMPTFLOW_PROJECT_PATH") if not project_path: @@ -56,18 +55,6 @@ def __init__(self, logger, **kwargs): self.common_dimensions["deployment"] = self.deployment_name env_dimensions = self._get_common_dimensions_from_env() self.common_dimensions.update(env_dimensions) - # initialize flow monitor - data_collector = FlowDataCollector(self.logger) - metrics_recorder = self._get_metrics_recorder() - self.flow_monitor = FlowMonitor( - self.logger, self.get_flow_name(), data_collector, metrics_recorder=metrics_recorder - ) - # initialize MDC trace exporter by default for azureml-serving - mdc_exporter = MdcExporter(self.logger) - self.trace_exporters = [mdc_exporter] - customized_exporters = super().get_trace_exporters(self.project_path) - if customized_exporters: - self.trace_exporters.extend(customized_exporters) def get_flow_project_path(self) -> str: return self.project_path @@ -81,12 +68,6 @@ def get_connection_provider(self) -> str: def get_blueprints(self): return self._get_default_blueprints() - def get_flow_monitor(self) -> FlowMonitor: - return self.flow_monitor - - def get_trace_exporters(self, flow_dir: str): - return self.trace_exporters - def get_override_connections(self, flow: Flow) -> Tuple[dict, dict]: connection_names = flow.get_connection_names() connections = {} @@ -109,9 +90,11 @@ def get_override_connections(self, flow: Flow) -> Tuple[dict, dict]: if data_override: try: # try best to convert to connection, this is only for azureml deployment. - from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations + from promptflow.core._connection_provider._workspace_connection_provider import ( + WorkspaceConnectionProvider, + ) - conn = ArmConnectionOperations._convert_to_connection_dict(connection_name, conn_data) + conn = WorkspaceConnectionProvider._convert_to_connection_dict(connection_name, conn_data) connections[connection_name] = conn except Exception as e: self.logger.warn(f"Failed to convert connection data to connection: {e}") @@ -124,7 +107,7 @@ def get_override_connections(self, flow: Flow) -> Tuple[dict, dict]: return self.connections, connections_name_overrides def raise_ex_on_invoker_initialization_failure(self, ex: Exception): - from promptflow.azure.operations._arm_connection_operations import UserAuthenticationError + from promptflow.core._errors import UserAuthenticationError # allow lazy authentication for UserAuthenticationError return not isinstance(ex, UserAuthenticationError) @@ -146,27 +129,6 @@ def _get_env_connections_if_exist(self): connections = decode_dict(env_connections) return connections - def _get_metrics_recorder(self): - # currently only support exporting it to azure monitor(application insights) - # TODO: add support for dynamic loading thus user can customize their own exporter. - custom_dimensions = self.get_metrics_common_dimensions() - try: - from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter - from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader - - # check whether azure monitor instrumentation key is set - instrumentation_key = os.getenv("AML_APP_INSIGHTS_KEY") or os.getenv("APPINSIGHTS_INSTRUMENTATIONKEY") - if instrumentation_key: - self.logger.info("Initialize metrics recorder with azure monitor metrics exporter...") - exporter = AzureMonitorMetricExporter(connection_string=f"InstrumentationKey={instrumentation_key}") - reader = PeriodicExportingMetricReader(exporter=exporter, export_interval_millis=60000) - return MetricsRecorder(self.logger, reader=reader, common_dimensions=custom_dimensions) - else: - self.logger.info("Azure monitor metrics exporter is not enabled, metrics will not be collected.") - except ImportError: - self.logger.warning("No metrics exporter module found, metrics will not be collected.") - return None - def _initialize_connection_provider(self): # parse connection provider self.connection_provider = get_pf_serving_env("PROMPTFLOW_CONNECTION_PROVIDER") diff --git a/src/promptflow/promptflow/_sdk/_serving/extension/default_extension.py b/src/promptflow-core/promptflow/core/_serving/extension/default_extension.py similarity index 75% rename from src/promptflow/promptflow/_sdk/_serving/extension/default_extension.py rename to src/promptflow-core/promptflow/core/_serving/extension/default_extension.py index 1bb258628cf..6992710905c 100644 --- a/src/promptflow/promptflow/_sdk/_serving/extension/default_extension.py +++ b/src/promptflow-core/promptflow/core/_serving/extension/default_extension.py @@ -9,21 +9,25 @@ from typing import Tuple from promptflow._constants import DEFAULT_ENCODING -from promptflow._sdk._configuration import Configuration -from promptflow._sdk._serving.blueprint.monitor_blueprint import construct_monitor_blueprint -from promptflow._sdk._serving.blueprint.static_web_blueprint import construct_staticweb_blueprint -from promptflow._sdk._serving.monitor.flow_monitor import FlowMonitor from promptflow._utils.yaml_utils import load_yaml -from promptflow._version import VERSION from promptflow.contracts.flow import Flow - -USER_AGENT = f"promptflow-local-serving/{VERSION}" +from promptflow.core._serving.blueprint.monitor_blueprint import construct_monitor_blueprint +from promptflow.core._serving.blueprint.static_web_blueprint import construct_staticweb_blueprint +from promptflow.core._serving.extension.extension_type import ExtensionType +from promptflow.core._serving.extension.otel_exporter_provider_factory import OTelExporterProviderFactory +from promptflow.core._serving.monitor.flow_monitor import FlowMonitor +from promptflow.core._version import __version__ + +USER_AGENT = f"promptflow-local-serving/{__version__}" DEFAULT_STATIC_PATH = Path(__file__).parent.parent / "static" class AppExtension(ABC): - def __init__(self, logger, **kwargs): + def __init__(self, logger, extension_type: ExtensionType, collector=None, **kwargs): self.logger = logger + self.extension_type = extension_type + self.data_collector = collector + self.flow_monitor = None @abstractmethod def get_flow_project_path(self) -> str: @@ -45,16 +49,12 @@ def get_blueprints(self): """Get blueprints for current extension.""" pass - def get_trace_exporters(self, flow_dir: str): - """Get customized trace exporters for current extension.""" - return None - def get_override_connections(self, flow: Flow) -> Tuple[dict, dict]: """ Get override connections for current extension. :param flow: The flow to execute. - :type flow: ~promptflow._sdk.entities._flow.Flow + :type flow: ~promptflow.contracts.flow.Flow :return: The override connections, first dict is for connection data override, second dict is for connection name override. # noqa: E501 :rtype: (dict, dict) """ @@ -84,8 +84,15 @@ def get_metrics_common_dimensions(self): def get_flow_monitor(self) -> FlowMonitor: """Get flow monitor for current extension.""" - # default no data collector, no app insights metric exporter - return FlowMonitor(self.logger, self.get_flow_name(), None, metrics_recorder=None) + if self.flow_monitor: + return self.flow_monitor + custom_dimensions = self.get_metrics_common_dimensions() + metric_exporters = OTelExporterProviderFactory.get_metrics_exporters(self.logger, self.extension_type) + trace_exporters = OTelExporterProviderFactory.get_trace_exporters(self.logger, self.extension_type) + self.flow_monitor = FlowMonitor( + self.logger, self.get_flow_name(), self.data_collector, custom_dimensions, metric_exporters, trace_exporters + ) # noqa: E501 + return self.flow_monitor def _get_mlflow_project_path(self, project_path: str): # check whether it's mlflow model @@ -119,14 +126,11 @@ class DefaultAppExtension(AppExtension): """default app extension for local serve.""" def __init__(self, logger, **kwargs): - self.logger = logger + super().__init__(logger=logger, extension_type=ExtensionType.DEFAULT, **kwargs) static_folder = kwargs.get("static_folder", None) self.static_folder = static_folder if static_folder else DEFAULT_STATIC_PATH logger.info(f"Static_folder: {self.static_folder}") - app_config = kwargs.get("config", None) or {} - pf_config = Configuration(overrides=app_config) - logger.info(f"Promptflow config: {pf_config}") - self.connection_provider = pf_config.get_connection_provider() + self.connection_provider = kwargs.get("connection_provider", None) or None def get_flow_project_path(self) -> str: return os.getenv("PROMPTFLOW_PROJECT_PATH", ".") diff --git a/src/promptflow/promptflow/_sdk/_serving/extension/extension_factory.py b/src/promptflow-core/promptflow/core/_serving/extension/extension_factory.py similarity index 58% rename from src/promptflow/promptflow/_sdk/_serving/extension/extension_factory.py rename to src/promptflow-core/promptflow/core/_serving/extension/extension_factory.py index 69f8a5f3511..6725c820d5e 100644 --- a/src/promptflow/promptflow/_sdk/_serving/extension/extension_factory.py +++ b/src/promptflow-core/promptflow/core/_serving/extension/extension_factory.py @@ -2,15 +2,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from enum import Enum -from promptflow._sdk._serving.extension.default_extension import AppExtension - - -class ExtensionType(Enum): - """Extension type used to identify which extension to load in serving app.""" - - Default = "local" - AzureML = "azureml" +from promptflow.core._serving.extension.default_extension import AppExtension +from promptflow.core._serving.extension.extension_type import ExtensionType class ExtensionFactory: @@ -19,17 +12,17 @@ class ExtensionFactory: @staticmethod def create_extension(logger, **kwargs) -> AppExtension: """Create extension based on extension type.""" - extension_type_str = kwargs.get("extension_type", ExtensionType.Default.value) + extension_type_str = kwargs.pop("extension_type", ExtensionType.DEFAULT.value) if not extension_type_str: - extension_type_str = ExtensionType.Default.value + extension_type_str = ExtensionType.DEFAULT.value extension_type = ExtensionType(extension_type_str.lower()) - if extension_type == ExtensionType.AzureML: + if extension_type == ExtensionType.AZUREML: logger.info("Enable AzureML extension.") - from promptflow._sdk._serving.extension.azureml_extension import AzureMLExtension + from promptflow.core._serving.extension.azureml_extension import AzureMLExtension return AzureMLExtension(logger=logger, **kwargs) else: - from promptflow._sdk._serving.extension.default_extension import DefaultAppExtension + from promptflow.core._serving.extension.default_extension import DefaultAppExtension return DefaultAppExtension(logger=logger, **kwargs) diff --git a/src/promptflow-core/promptflow/core/_serving/extension/extension_type.py b/src/promptflow-core/promptflow/core/_serving/extension/extension_type.py new file mode 100644 index 00000000000..c16e76c41af --- /dev/null +++ b/src/promptflow-core/promptflow/core/_serving/extension/extension_type.py @@ -0,0 +1,12 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from enum import Enum + + +class ExtensionType(Enum): + """Extension type used to identify which extension to load in serving app.""" + + DEFAULT = "local" + AZUREML = "azureml" diff --git a/src/promptflow-core/promptflow/core/_serving/extension/otel_exporter_provider_factory.py b/src/promptflow-core/promptflow/core/_serving/extension/otel_exporter_provider_factory.py new file mode 100644 index 00000000000..779499f2ff3 --- /dev/null +++ b/src/promptflow-core/promptflow/core/_serving/extension/otel_exporter_provider_factory.py @@ -0,0 +1,123 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import os +from abc import abstractmethod +from enum import Enum + +from promptflow.core._serving.extension.extension_type import ExtensionType +from promptflow.core._serving.monitor.mdc_exporter import MdcExporter + + +class ExporterType(Enum): + METRIC = "metric" + TRACE = "trace" + + +class OTelExporterProvider: + def __init__(self, logger, exporter_type: ExporterType) -> None: + self.logger = logger + self._exporter_type = exporter_type + + @abstractmethod + def is_enabled(self, extension: ExtensionType): + """check whether the exporter is enabled for given extension.""" + pass + + @abstractmethod + def get_exporter(self, **kwargs): + """get exporter instance.""" + pass + + @property + def exporter_type(self) -> ExporterType: + return self._exporter_type + + +class AppInsightExporterProvider(OTelExporterProvider): + def __init__(self, logger, exporter_type: ExporterType) -> None: + super().__init__(logger, exporter_type) + self.app_insight_connection_string = try_get_app_insight_connection_string() + if not self.app_insight_connection_string: + self.logger.info(f"No connection string detected, app insight {exporter_type.value} exporter is disabled.") + + def is_enabled(self, extension: ExtensionType): + return self.app_insight_connection_string is not None + + +class AppInsightTraceExporterProvider(AppInsightExporterProvider): + def __init__(self, logger) -> None: + super().__init__(logger, ExporterType.TRACE) + + def get_exporter(self, **kwargs): + try: + from azure.monitor.opentelemetry.exporter import AzureMonitorTraceExporter + + return AzureMonitorTraceExporter.from_connection_string(self.app_insight_connection_string) + except ImportError: + return None + + +class MdcTraceExporterProvider(OTelExporterProvider): + def __init__(self, logger) -> None: + super().__init__(logger, ExporterType.TRACE) + + def is_enabled(self, extension: ExtensionType): + return extension == ExtensionType.AZUREML + + def get_exporter(self, **kwargs): + return MdcExporter(self.logger) + + +class AppInsightMetricsExporterProvider(AppInsightExporterProvider): + def __init__(self, logger) -> None: + super().__init__(logger, ExporterType.METRIC) + + def get_exporter(self, **kwargs): + try: + from azure.monitor.opentelemetry.exporter import AzureMonitorMetricExporter + + return AzureMonitorMetricExporter.from_connection_string(self.app_insight_connection_string) + except ImportError: + return None + + +class OTelExporterProviderFactory: + """Factory to create OTel trace and metric exporters based on extension type.""" + + @staticmethod + def get_trace_exporters(logger, extension: ExtensionType, **kwargs): + trace_providers = [AppInsightTraceExporterProvider(logger), MdcTraceExporterProvider(logger)] + exporters = [] + for provider in trace_providers: + if provider.is_enabled(extension): + exporter = provider.get_exporter(**kwargs) + if exporter: + exporters.append(exporter) + return exporters + + @staticmethod + def get_metrics_exporters(logger, extension: ExtensionType, **kwargs): + metric_providers = [AppInsightMetricsExporterProvider(logger)] + exporters = [] + for provider in metric_providers: + if provider.is_enabled(extension): + exporter = provider.get_exporter(**kwargs) + if exporter: + exporters.append(exporter) + return exporters + + +def try_get_app_insight_connection_string(): + """ + Try to get application insight connection string from environment variable. + app insight base exporter support these environment variables: + - "APPINSIGHTS_INSTRUMENTATIONKEY" + - "APPLICATIONINSIGHTS_CONNECTION_STRING" + """ + instrumentation_key = os.getenv("AML_APP_INSIGHTS_KEY") or os.getenv("APPINSIGHTS_INSTRUMENTATIONKEY") + if instrumentation_key: + return f"InstrumentationKey={instrumentation_key}" + connection_str = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING") + return connection_str diff --git a/src/promptflow/promptflow/_sdk/_serving/flow_invoker.py b/src/promptflow-core/promptflow/core/_serving/flow_invoker.py similarity index 73% rename from src/promptflow/promptflow/_sdk/_serving/flow_invoker.py rename to src/promptflow-core/promptflow/core/_serving/flow_invoker.py index 22d855c7b66..09a0c6ce659 100644 --- a/src/promptflow/promptflow/_sdk/_serving/flow_invoker.py +++ b/src/promptflow-core/promptflow/core/_serving/flow_invoker.py @@ -2,27 +2,26 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import dataclasses +import os from pathlib import Path from typing import Callable, Union -from promptflow import PFClient -from promptflow._sdk._load_functions import load_flow -from promptflow._sdk._serving._errors import UnexpectedConnectionProviderReturn, UnsupportedConnectionProvider -from promptflow._sdk._serving.flow_result import FlowResult -from promptflow._sdk._serving.utils import validate_request_data -from promptflow._sdk._utils import ( - dump_flow_result, - get_local_connections_from_executable, +from promptflow._utils.dataclass_serializer import convert_eager_flow_output_to_dict +from promptflow._utils.flow_utils import dump_flow_result, is_executable_chat_flow +from promptflow._utils.logger_utils import LoggerFactory +from promptflow._utils.multimedia_utils import MultimediaProcessor +from promptflow.core._connection import _Connection +from promptflow.core._connection_provider._connection_provider import ConnectionProvider +from promptflow.core._flow import AbstractFlowBase +from promptflow.core._serving._errors import UnexpectedConnectionProviderReturn, UnsupportedConnectionProvider +from promptflow.core._serving.flow_result import FlowResult +from promptflow.core._serving.utils import validate_request_data +from promptflow.core._utils import ( + init_executable, override_connection_config_with_environment_variable, resolve_connections_environment_variable_reference, update_environment_variables_with_connections, ) -from promptflow._sdk.entities._connection import _Connection -from promptflow._sdk.entities._flow import Flow -from promptflow._sdk.operations._flow_operations import FlowOperations -from promptflow._utils.dataclass_serializer import convert_eager_flow_output_to_dict -from promptflow._utils.logger_utils import LoggerFactory -from promptflow._utils.multimedia_utils import convert_multimedia_data_to_base64, persist_multimedia_data from promptflow.executor import FlowExecutor from promptflow.storage._run_storage import DefaultRunStorage @@ -31,8 +30,8 @@ class FlowInvoker: """ The invoker of a flow. - :param flow: The path of the flow, or the flow loaded by load_flow(). - :type flow: [str, ~promptflow._sdk.entities._flow.Flow] + :param flow: A loaded Flow object. + :type flow: Flow :param connection_provider: The connection provider, defaults to None :type connection_provider: [str, Callable], optional :param streaming: The function or bool to determine enable streaming or not, defaults to lambda: False @@ -45,21 +44,26 @@ class FlowInvoker: :type connections_name_overrides: dict, optional :param raise_ex: Whether to raise exception when executing flow, defaults to True :type raise_ex: bool, optional + :param init_kwargs: Class init arguments for callable class, only supported for flex flow. + :type init_kwargs: dict, optional """ def __init__( self, - flow: [str, Flow], + flow: AbstractFlowBase, connection_provider: [str, Callable] = None, streaming: Union[Callable[[], bool], bool] = False, connections: dict = None, connections_name_overrides: dict = None, raise_ex: bool = True, + init_kwargs: dict = None, **kwargs, ): self.logger = kwargs.get("logger", LoggerFactory.get_logger("flowinvoker")) - self.flow_entity = flow if isinstance(flow, Flow) else load_flow(source=flow) - self.flow = self.flow_entity._init_executable() + self._init_kwargs = init_kwargs or {} + self.logger.debug(f"Init flow invoker with init kwargs: {self._init_kwargs}") + # TODO: avoid to use private attribute after we finalize the inheritance + self.flow = init_executable(working_dir=flow._code, flow_path=flow._path) self.connections = connections or {} self.connections_name_overrides = connections_name_overrides or {} self.raise_ex = raise_ex @@ -72,23 +76,58 @@ def __init__( self._credential = kwargs.get("credential", None) self._init_connections(connection_provider) - self._init_executor() + # TODO: avoid to use private attribute after we finalize the inheritance + self._init_executor(flow._path, flow._code) self._dump_file_prefix = "chat" if self._is_chat_flow else "flow" + self._multimedia_processor = MultimediaProcessor.create(self.flow.message_format) + + def resolve_connections( + self, + connection_names, + provider, + *, + raise_error=False, + connections_to_ignore=None, + connections_to_add=None, + ): + """Resolve connections required by flow, get connections from provider.""" + connection_names = set(connection_names) + if connections_to_add: + connection_names.update(connections_to_add) + result = {} + for name in connection_names: + if connections_to_ignore and name in connections_to_ignore: + continue + try: + conn = provider.get(name=name) + result[name] = conn._to_execution_connection_dict() + except Exception as e: + if raise_error: + raise e + return result def _init_connections(self, connection_provider): - self._is_chat_flow, _, _ = FlowOperations._is_chat_flow(self.flow) - connection_provider = "local" if connection_provider is None else connection_provider - if isinstance(connection_provider, str): - self.logger.info(f"Getting connections from pf client with provider {connection_provider}...") + self._is_chat_flow, _, _ = is_executable_chat_flow(self.flow) + + if connection_provider is None or isinstance(connection_provider, str): + self.logger.info(f"Getting connections from pf client with provider from args: {connection_provider}...") connections_to_ignore = list(self.connections.keys()) + self.logger.debug(f"Flow invoker connections: {self.connections.keys()}") connections_to_ignore.extend(self.connections_name_overrides.keys()) + self.logger.debug(f"Flow invoker connections name overrides: {self.connections_name_overrides.keys()}") + self.logger.debug(f"Ignoring connections: {connections_to_ignore}") # Note: The connection here could be local or workspace, depends on the connection.provider in pf.yaml. - connections = get_local_connections_from_executable( - executable=self.flow, - client=PFClient(config={"connection.provider": connection_provider}, credential=self._credential), + connections = self.resolve_connections( + # use os.environ to override flow definition's connection since + # os.environ is resolved to user's setting now + connection_names=self.flow.get_connection_names( + environment_variables_overrides=os.environ, + ), + provider=ConnectionProvider.init_from_provider_config(connection_provider, credential=self._credential), connections_to_ignore=connections_to_ignore, # fetch connections with name override connections_to_add=list(self.connections_name_overrides.values()), + raise_error=True, ) # use original name for connection with name override override_name_to_original_name_mapping = {v: k for k, v in self.connections_name_overrides.items()} @@ -119,7 +158,7 @@ def _init_connections(self, connection_provider): update_environment_variables_with_connections(self.connections) self.logger.info(f"Promptflow get connections successfully. keys: {self.connections.keys()}") - def _init_executor(self): + def _init_executor(self, flow_path, working_dir): self.logger.info("Promptflow executor starts initializing...") storage = None if self._dump_to: @@ -127,11 +166,12 @@ def _init_executor(self): else: storage = self.storage self.executor = FlowExecutor.create( - flow_file=self.flow_entity.path, - working_dir=self.flow_entity.code, + flow_file=flow_path, + working_dir=working_dir, connections=self.connections, raise_ex=self.raise_ex, storage=storage, + init_kwargs=self._init_kwargs, ) self.executor.enable_streaming_for_llm_flow(self.streaming) self.logger.info("Promptflow executor initiated successfully.") @@ -189,15 +229,16 @@ def invoke(self, data: dict, run_id=None, disable_input_output_logging=False): def _convert_multimedia_data_to_base64(self, output_dict): resolved_outputs = { - k: convert_multimedia_data_to_base64(v, with_type=True, dict_type=True) for k, v in output_dict.items() + k: self._multimedia_processor.convert_multimedia_data_to_base64_dict(v) for k, v in output_dict.items() } return resolved_outputs def _dump_invoke_result(self, invoke_result): if self._dump_to: - invoke_result.output = persist_multimedia_data( + invoke_result.output = self._multimedia_processor.persist_multimedia_data( invoke_result.output, base_dir=self._dump_to, sub_dir=Path(".promptflow/output") ) + dump_flow_result(flow_folder=self._dump_to, flow_result=invoke_result, prefix=self._dump_file_prefix) diff --git a/src/promptflow/promptflow/_sdk/_serving/flow_result.py b/src/promptflow-core/promptflow/core/_serving/flow_result.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_serving/flow_result.py rename to src/promptflow-core/promptflow/core/_serving/flow_result.py diff --git a/src/promptflow/promptflow/_sdk/_serving/blueprint/__init__.py b/src/promptflow-core/promptflow/core/_serving/monitor/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_serving/blueprint/__init__.py rename to src/promptflow-core/promptflow/core/_serving/monitor/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_serving/monitor/data_collector.py b/src/promptflow-core/promptflow/core/_serving/monitor/data_collector.py similarity index 87% rename from src/promptflow/promptflow/_sdk/_serving/monitor/data_collector.py rename to src/promptflow-core/promptflow/core/_serving/monitor/data_collector.py index 654e5444206..7bb6f8df520 100644 --- a/src/promptflow/promptflow/_sdk/_serving/monitor/data_collector.py +++ b/src/promptflow-core/promptflow/core/_serving/monitor/data_collector.py @@ -21,10 +21,10 @@ def _init_data_collector(self) -> bool: self.outputs_collector = Collector(name="model_outputs") return True except ImportError as e: - self.logger.warn(f"Load mdc related module failed: {e}") + self.logger.warning(f"Load mdc related module failed: {e}") return False except Exception as e: - self.logger.warn(f"Init mdc failed: {e}") + self.logger.warning(f"Init mdc failed: {e}") return False def collect_flow_data(self, input: dict, output: dict, req_id: str = None, client_req_id: str = None): @@ -47,6 +47,6 @@ def collect_flow_data(self, input: dict, output: dict, req_id: str = None, clien # collect outputs data, pass in correlation_context so inputs and outputs data can be correlated later self.outputs_collector.collect(output_df, ctx) except ImportError as e: - self.logger.warn(f"Load mdc related module failed: {e}") + self.logger.warning(f"Load mdc related module failed: {e}") except Exception as e: - self.logger.warn(f"Collect flow data failed: {e}") + self.logger.warning(f"Collect flow data failed: {e}") diff --git a/src/promptflow/promptflow/_sdk/_serving/monitor/flow_monitor.py b/src/promptflow-core/promptflow/core/_serving/monitor/flow_monitor.py similarity index 61% rename from src/promptflow/promptflow/_sdk/_serving/monitor/flow_monitor.py rename to src/promptflow-core/promptflow/core/_serving/monitor/flow_monitor.py index 1617cc6fe86..b5facc02748 100644 --- a/src/promptflow/promptflow/_sdk/_serving/monitor/flow_monitor.py +++ b/src/promptflow-core/promptflow/core/_serving/monitor/flow_monitor.py @@ -3,23 +3,74 @@ # --------------------------------------------------------- import time -from promptflow._sdk._serving.monitor.data_collector import FlowDataCollector -from promptflow._sdk._serving.monitor.streaming_monitor import StreamingMonitor -from promptflow._sdk._serving.monitor.metrics import MetricsRecorder, ResponseType -from promptflow._sdk._serving.utils import streaming_response_required, get_cost_up_to_now -from promptflow._sdk._serving.flow_result import FlowResult +from typing import Dict + +from flask import g, request + from promptflow._utils.exception_utils import ErrorResponse -from flask import request, g +from promptflow.core._serving.flow_result import FlowResult +from promptflow.core._serving.monitor.data_collector import FlowDataCollector +from promptflow.core._serving.monitor.metrics import MetricsRecorder, ResponseType +from promptflow.core._serving.monitor.streaming_monitor import StreamingMonitor +from promptflow.core._serving.utils import get_cost_up_to_now, streaming_response_required class FlowMonitor: """FlowMonitor is used to collect metrics & data for promptflow serving.""" - def __init__(self, logger, default_flow_name, data_collector: FlowDataCollector, metrics_recorder: MetricsRecorder): + def __init__( + self, + logger, + default_flow_name, + data_collector: FlowDataCollector, + custom_dimensions: Dict[str, str], + metric_exporters=None, + trace_exporters=None, + ): self.data_collector = data_collector - self.metrics_recorder = metrics_recorder self.logger = logger + self.metrics_recorder = self.setup_metrics_recorder(custom_dimensions, metric_exporters) self.flow_name = default_flow_name + self.setup_trace_exporters(trace_exporters) + + def setup_metrics_recorder(self, custom_dimensions, metric_exporters): + if metric_exporters: + from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader + + exporter_names = [n.__class__.__name__ for n in metric_exporters] + self.logger.info(f"Enable {len(metric_exporters)} metric exporters: {exporter_names}.") + readers = [] + for exporter in metric_exporters: + reader = PeriodicExportingMetricReader(exporter=exporter, export_interval_millis=60000) + readers.append(reader) + return MetricsRecorder(self.logger, readers=readers, common_dimensions=custom_dimensions) + else: + self.logger.warning("No metric exporter enabled.") + return None + + def setup_trace_exporters(self, trace_exporters): + if not trace_exporters: + self.logger.warning("No trace exporter enabled.") + return + try: + exporter_names = [n.__class__.__name__ for n in trace_exporters] + self.logger.info(f"Enable {len(trace_exporters)} trace exporters: {exporter_names}.") + from opentelemetry import trace + from opentelemetry.sdk.resources import SERVICE_NAME, Resource + from opentelemetry.sdk.trace import TracerProvider + from opentelemetry.sdk.trace.export import BatchSpanProcessor + + resource = Resource( + attributes={ + SERVICE_NAME: "promptflow", + } + ) + trace.set_tracer_provider(TracerProvider(resource=resource)) + provider = trace.get_tracer_provider() + for exporter in trace_exporters: + provider.add_span_processor(BatchSpanProcessor(exporter)) + except Exception as e: + self.logger.error(f"Setup trace exporters failed: {e}") def setup_streaming_monitor_if_needed(self, response_creator, data, output): g.streaming = response_creator.has_stream_field and response_creator.text_stream_specified_explicitly diff --git a/src/promptflow/promptflow/_sdk/_serving/monitor/mdc_exporter.py b/src/promptflow-core/promptflow/core/_serving/monitor/mdc_exporter.py similarity index 84% rename from src/promptflow/promptflow/_sdk/_serving/monitor/mdc_exporter.py rename to src/promptflow-core/promptflow/core/_serving/monitor/mdc_exporter.py index 38fb4f25160..2f7c0b22cec 100644 --- a/src/promptflow/promptflow/_sdk/_serving/monitor/mdc_exporter.py +++ b/src/promptflow-core/promptflow/core/_serving/monitor/mdc_exporter.py @@ -25,10 +25,10 @@ def _init_data_collector(self) -> bool: self.span_collector = Collector(name="app_traces") return True except ImportError as e: - self.logger.warn(f"Load mdc related module failed: {e}") + self.logger.warning(f"Load mdc related module failed: {e}") return False except Exception as e: - self.logger.warn(f"Init mdc for app_traces failed: {e}") + self.logger.warning(f"Init mdc for app_traces failed: {e}") return False def export(self, spans: Sequence[ReadableSpan]): @@ -45,6 +45,6 @@ def export(self, spans: Sequence[ReadableSpan]): self.span_collector.collect(span_df) except ImportError as e: - self.logger.warn(f"Load mdc related module failed: {e}") + self.logger.warning(f"Load mdc related module failed: {e}") except Exception as e: - self.logger.warn(f"Collect tracing spans failed: {e}") + self.logger.warning(f"Collect tracing spans failed: {e}") diff --git a/src/promptflow/promptflow/_sdk/_serving/monitor/metrics.py b/src/promptflow-core/promptflow/core/_serving/monitor/metrics.py similarity index 96% rename from src/promptflow/promptflow/_sdk/_serving/monitor/metrics.py rename to src/promptflow-core/promptflow/core/_serving/monitor/metrics.py index 00b82948e72..39deea9ae5d 100644 --- a/src/promptflow/promptflow/_sdk/_serving/monitor/metrics.py +++ b/src/promptflow-core/promptflow/core/_serving/monitor/metrics.py @@ -3,12 +3,11 @@ # --------------------------------------------------------- from enum import Enum -from typing import Dict, Sequence, Set, List, Any +from typing import Any, Dict, List, Sequence, Set from promptflow._utils.exception_utils import ErrorResponse from promptflow.contracts.run_info import FlowRunInfo, RunInfo, Status - # define metrics dimension keys FLOW_KEY = "flow" RUN_STATUS_KEY = "run_status" @@ -140,13 +139,13 @@ class LLMTokenType(Enum): class MetricsRecorder(object): """OpenTelemetry Metrics Recorder""" - def __init__(self, logger, reader=None, common_dimensions: Dict[str, str] = None) -> None: + def __init__(self, logger, readers=None, common_dimensions: Dict[str, str] = None) -> None: """initialize metrics recorder :param logger: logger :type logger: Logger - :param reader: metric reader - :type reader: opentelemetry.sdk.metrics.export.MetricReader + :param readers: metric reader list + :type readers: List[opentelemetry.sdk.metrics.export.MetricReader] :param common_dimensions: common dimensions for all metrics :type common_dimensions: Dict[str, str] """ @@ -159,9 +158,9 @@ def __init__(self, logger, reader=None, common_dimensions: Dict[str, str] = None ) return self.common_dimensions = common_dimensions or {} - self.reader = reader + self.readers = readers dimension_keys = {key for key in common_dimensions} - self._config_common_monitor(dimension_keys, reader) + self._config_common_monitor(dimension_keys, readers) logger.info("OpenTelemetry metric is enabled, metrics will be recorded.") def record_flow_request(self, flow_id: str, response_code: int, exception: str, streaming: bool): @@ -318,7 +317,7 @@ def _get_exact_error(self, err: Dict): return error_response.innermost_error_code # configure monitor, by default only expose prometheus metrics - def _config_common_monitor(self, common_keys: Set[str] = {}, reader=None): + def _config_common_monitor(self, common_keys: Set[str] = {}, readers=[]): metrics_views = [ token_view, flow_latency_view, @@ -330,10 +329,6 @@ def _config_common_monitor(self, common_keys: Set[str] = {}, reader=None): for view in metrics_views: view._attribute_keys.update(common_keys) - readers = [] - if reader: - readers.append(reader) - meter_provider = MeterProvider( metric_readers=readers, views=metrics_views, diff --git a/src/promptflow/promptflow/_sdk/_serving/monitor/streaming_monitor.py b/src/promptflow-core/promptflow/core/_serving/monitor/streaming_monitor.py similarity index 94% rename from src/promptflow/promptflow/_sdk/_serving/monitor/streaming_monitor.py rename to src/promptflow-core/promptflow/core/_serving/monitor/streaming_monitor.py index cca9b46cdb8..a559e435278 100644 --- a/src/promptflow/promptflow/_sdk/_serving/monitor/streaming_monitor.py +++ b/src/promptflow-core/promptflow/core/_serving/monitor/streaming_monitor.py @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from promptflow._sdk._serving.utils import get_cost_up_to_now -from promptflow._sdk._serving.monitor.metrics import ResponseType +from promptflow.core._serving.monitor.metrics import ResponseType +from promptflow.core._serving.utils import get_cost_up_to_now class StreamingMonitor: diff --git a/src/promptflow-core/promptflow/core/_serving/resources/feedback_swagger.json b/src/promptflow-core/promptflow/core/_serving/resources/feedback_swagger.json new file mode 100644 index 00000000000..04cc096158a --- /dev/null +++ b/src/promptflow-core/promptflow/core/_serving/resources/feedback_swagger.json @@ -0,0 +1,47 @@ +{ + "post": { + "summary": "collect promptflow feedback", + "requestBody": { + "description": "promptflow feedback data", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + } + }, + "responses": { + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + } + }, + "400": { + "description": "Invalid input" + }, + "default": { + "description": "unexpected error" + } + } + }, + "parameters": [ + { + "name": "flatten", + "in": "query", + "description": "flatten the feedback data into traced data", + "required": false, + "schema": { + "type": "boolean" + } + } + ] +} diff --git a/src/promptflow/promptflow/_sdk/_serving/response_creator.py b/src/promptflow-core/promptflow/core/_serving/response_creator.py similarity index 98% rename from src/promptflow/promptflow/_sdk/_serving/response_creator.py rename to src/promptflow-core/promptflow/core/_serving/response_creator.py index fc9c745e437..5405aa9e9b8 100644 --- a/src/promptflow/promptflow/_sdk/_serving/response_creator.py +++ b/src/promptflow-core/promptflow/core/_serving/response_creator.py @@ -10,7 +10,7 @@ from werkzeug.datastructures import MIMEAccept from promptflow._constants import DEFAULT_OUTPUT_NAME -from promptflow._sdk._serving._errors import MultipleStreamOutputFieldsNotSupported, NotAcceptable +from promptflow.core._serving._errors import MultipleStreamOutputFieldsNotSupported, NotAcceptable class ResponseCreator: diff --git a/src/promptflow/promptflow/_sdk/_serving/static/index.html b/src/promptflow-core/promptflow/core/_serving/static/index.html similarity index 100% rename from src/promptflow/promptflow/_sdk/_serving/static/index.html rename to src/promptflow-core/promptflow/core/_serving/static/index.html diff --git a/src/promptflow/promptflow/_sdk/_serving/static/index.js b/src/promptflow-core/promptflow/core/_serving/static/index.js similarity index 99% rename from src/promptflow/promptflow/_sdk/_serving/static/index.js rename to src/promptflow-core/promptflow/core/_serving/static/index.js index 67d8e0adb2d..8a1430886fe 100644 --- a/src/promptflow/promptflow/_sdk/_serving/static/index.js +++ b/src/promptflow-core/promptflow/core/_serving/static/index.js @@ -29,7 +29,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var mE=function(e,t){return mE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},mE(e,t)};function yi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");mE(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var oe=function(){return oe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function Yi(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r"u"?j1.none:j1.insertNode,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},t),this._classNameToArgs=(r=n==null?void 0:n.classNameToArgs)!==null&&r!==void 0?r:this._classNameToArgs,this._counter=(o=n==null?void 0:n.counter)!==null&&o!==void 0?o:this._counter,this._keyToClassName=(a=(i=this._config.classNameCache)!==null&&i!==void 0?i:n==null?void 0:n.keyToClassName)!==null&&a!==void 0?a:this._keyToClassName,this._preservedRules=(s=n==null?void 0:n.preservedRules)!==null&&s!==void 0?s:this._preservedRules,this._rules=(l=n==null?void 0:n.rules)!==null&&l!==void 0?l:this._rules}return e.getInstance=function(){if(vf=Lf[V8],!vf||vf._lastStyleElement&&vf._lastStyleElement.ownerDocument!==document){var t=(Lf==null?void 0:Lf.FabricConfig)||{},n=new e(t.mergeStyles,t.serializedStylesheet);vf=n,Lf[V8]=n}return vf},e.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},e.prototype.setConfig=function(t){this._config=oe(oe({},this._config),t)},e.prototype.onReset=function(t){var n=this;return this._onResetCallbacks.push(t),function(){n._onResetCallbacks=n._onResetCallbacks.filter(function(r){return r!==t})}},e.prototype.onInsertRule=function(t){var n=this;return this._onInsertRuleCallbacks.push(t),function(){n._onInsertRuleCallbacks=n._onInsertRuleCallbacks.filter(function(r){return r!==t})}},e.prototype.getClassName=function(t){var n=this._config.namespace,r=t||this._config.defaultPrefix;return(n?n+"-":"")+r+"-"+this._counter++},e.prototype.cacheClassName=function(t,n,r,o){this._keyToClassName[n]=t,this._classNameToArgs[t]={args:r,rules:o}},e.prototype.classNameFromKey=function(t){return this._keyToClassName[t]},e.prototype.getClassNameCache=function(){return this._keyToClassName},e.prototype.argsFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.args},e.prototype.insertedRulesFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.rules},e.prototype.insertRule=function(t,n){var r=this._config.injectionMode,o=r!==j1.none?this._getStyleElement():void 0;if(n&&this._preservedRules.push(t),o)switch(r){case j1.insertNode:var i=o.sheet;try{i.insertRule(t,i.cssRules.length)}catch{}break;case j1.appendChild:o.appendChild(document.createTextNode(t));break}else this._rules.push(t);this._config.onInsertRule&&this._config.onInsertRule(t),this._onInsertRuleCallbacks.forEach(function(a){return a()})},e.prototype.getRules=function(t){return(t?this._preservedRules.join(""):"")+this._rules.join("")},e.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach(function(t){return t()})},e.prototype.resetKeys=function(){this._keyToClassName={}},e.prototype._getStyleElement=function(){var t=this;return!this._styleElement&&typeof document<"u"&&(this._styleElement=this._createStyleElement(),bG||window.requestAnimationFrame(function(){t._styleElement=void 0})),this._styleElement},e.prototype._createStyleElement=function(){var t=document.head,n=document.createElement("style"),r=null;n.setAttribute("data-merge-styles","true");var o=this._config.cspSettings;if(o&&o.nonce&&n.setAttribute("nonce",o.nonce),this._lastStyleElement)r=this._lastStyleElement.nextElementSibling;else{var i=this._findPlaceholderStyleTag();i?r=i.nextElementSibling:r=t.childNodes[0]}return t.insertBefore(n,t.contains(r)?r:null),this._lastStyleElement=n,n},e.prototype._findPlaceholderStyleTag=function(){var t=document.head;return t?t.querySelector("style[data-merge-styles]"):null},e}();function mF(){for(var e=[],t=0;t=0)i(u.split(" "));else{var d=o.argsFromClassName(u);d?i(d):n.indexOf(u)===-1&&n.push(u)}else Array.isArray(u)?i(u):typeof u=="object"&&r.push(u)}}return i(e),{classes:n,objects:r}}function gF(e){cd!==e&&(cd=e)}function vF(){return cd===void 0&&(cd=typeof document<"u"&&!!document.documentElement&&document.documentElement.getAttribute("dir")==="rtl"),cd}var cd;cd=vF();function Eb(){return{rtl:vF()}}var Y8={};function yG(e,t){var n=e[t];n.charAt(0)!=="-"&&(e[t]=Y8[n]=Y8[n]||n.replace(/([A-Z])/g,"-$1").toLowerCase())}var vm;function EG(){var e;if(!vm){var t=typeof document<"u"?document:void 0,n=typeof navigator<"u"?navigator:void 0,r=(e=n==null?void 0:n.userAgent)===null||e===void 0?void 0:e.toLowerCase();t?vm={isWebkit:!!(t&&"WebkitAppearance"in t.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!!(n&&(/rv:11.0/i.test(n.userAgent)||/Edge\/\d./i.test(navigator.userAgent)))}:vm={isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return vm}var Q8={"user-select":1};function _G(e,t){var n=EG(),r=e[t];if(Q8[r]){var o=e[t+1];Q8[r]&&(n.isWebkit&&e.push("-webkit-"+r,o),n.isMoz&&e.push("-moz-"+r,o),n.isMs&&e.push("-ms-"+r,o),n.isOpera&&e.push("-o-"+r,o))}}var TG=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function wG(e,t){var n=e[t],r=e[t+1];if(typeof r=="number"){var o=TG.indexOf(n)>-1,i=n.indexOf("--")>-1,a=o||i?"":"px";e[t+1]=""+r+a}}var bm,Wl="left",Gl="right",kG="@noflip",X8=(bm={},bm[Wl]=Gl,bm[Gl]=Wl,bm),Z8={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function SG(e,t,n){if(e.rtl){var r=t[n];if(!r)return;var o=t[n+1];if(typeof o=="string"&&o.indexOf(kG)>=0)t[n+1]=o.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf(Wl)>=0)t[n]=r.replace(Wl,Gl);else if(r.indexOf(Gl)>=0)t[n]=r.replace(Gl,Wl);else if(String(o).indexOf(Wl)>=0)t[n+1]=o.replace(Wl,Gl);else if(String(o).indexOf(Gl)>=0)t[n+1]=o.replace(Gl,Wl);else if(X8[r])t[n]=X8[r];else if(Z8[o])t[n+1]=Z8[o];else switch(r){case"margin":case"padding":t[n+1]=CG(o);break;case"box-shadow":t[n+1]=xG(o,0);break}}}function xG(e,t){var n=e.split(" "),r=parseInt(n[t],10);return n[0]=n[0].replace(String(r),String(r*-1)),n.join(" ")}function CG(e){if(typeof e=="string"){var t=e.split(" ");if(t.length===4)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}function AG(e){for(var t=[],n=0,r=0,o=0;on&&t.push(e.substring(n,o)),n=o+1);break}return n-1&&t.push([r.index,r.index+r[0].length,r[1].split(",").map(function(o){return":global("+o.trim()+")"}).join(", ")]);return t.reverse().reduce(function(o,i){var a=i[0],s=i[1],l=i[2],u=o.slice(0,a),d=o.slice(s);return u+l+d},e)}function J8(e,t){return e.indexOf(":global(")>=0?e.replace(bF,"$1"):e.indexOf(":")===0?t+e:e.indexOf("&")<0?t+" "+e:e}function ex(e,t,n,r){t===void 0&&(t={__order:[]}),n.indexOf("@")===0?(n=n+"{"+e,fd([r],t,n)):n.indexOf(",")>-1?IG(n).split(",").map(function(o){return o.trim()}).forEach(function(o){return fd([r],t,J8(o,e))}):fd([r],t,J8(n,e))}function fd(e,t,n){t===void 0&&(t={__order:[]}),n===void 0&&(n="&");var r=Qi.getInstance(),o=t[n];o||(o={},t[n]=o,t.__order.push(n));for(var i=0,a=e;i0){n.subComponentStyles={};var p=n.subComponentStyles,m=function(v){if(r.hasOwnProperty(v)){var _=r[v];p[v]=function(b){return jc.apply(void 0,_.map(function(E){return typeof E=="function"?E(b):E}))}}};for(var u in r)m(u)}return n}function q0(){for(var e=[],t=0;t"u")){var t=e;return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:gE}}var _b=function(){function e(t,n){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=t||null,this._onErrorHandler=n,this._noop=function(){}}return e.prototype.dispose=function(){var t;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(t in this._timeoutIds)this._timeoutIds.hasOwnProperty(t)&&this.clearTimeout(parseInt(t,10));this._timeoutIds=null}if(this._immediateIds){for(t in this._immediateIds)this._immediateIds.hasOwnProperty(t)&&this.clearImmediate(parseInt(t,10));this._immediateIds=null}if(this._intervalIds){for(t in this._intervalIds)this._intervalIds.hasOwnProperty(t)&&this.clearInterval(parseInt(t,10));this._intervalIds=null}if(this._animationFrameIds){for(t in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(t)&&this.cancelAnimationFrame(parseInt(t,10));this._animationFrameIds=null}},e.prototype.setTimeout=function(t,n){var r=this,o=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),o=setTimeout(function(){try{r._timeoutIds&&delete r._timeoutIds[o],t.apply(r._parent)}catch(i){r._logError(i)}},n),this._timeoutIds[o]=!0),o},e.prototype.clearTimeout=function(t){this._timeoutIds&&this._timeoutIds[t]&&(clearTimeout(t),delete this._timeoutIds[t])},e.prototype.setImmediate=function(t,n){var r=this,o=0,i=ur(n);if(!this._isDisposed){this._immediateIds||(this._immediateIds={});var a=function(){try{r._immediateIds&&delete r._immediateIds[o],t.apply(r._parent)}catch(s){r._logError(s)}};o=i.setTimeout(a,0),this._immediateIds[o]=!0}return o},e.prototype.clearImmediate=function(t,n){var r=ur(n);this._immediateIds&&this._immediateIds[t]&&(r.clearTimeout(t),delete this._immediateIds[t])},e.prototype.setInterval=function(t,n){var r=this,o=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),o=setInterval(function(){try{t.apply(r._parent)}catch(i){r._logError(i)}},n),this._intervalIds[o]=!0),o},e.prototype.clearInterval=function(t){this._intervalIds&&this._intervalIds[t]&&(clearInterval(t),delete this._intervalIds[t])},e.prototype.throttle=function(t,n,r){var o=this;if(this._isDisposed)return this._noop;var i=n||0,a=!0,s=!0,l=0,u,d,h=null;r&&typeof r.leading=="boolean"&&(a=r.leading),r&&typeof r.trailing=="boolean"&&(s=r.trailing);var p=function(v){var _=Date.now(),b=_-l,E=a?i-b:i;return b>=i&&(!v||a)?(l=_,h&&(o.clearTimeout(h),h=null),u=t.apply(o._parent,d)):h===null&&s&&(h=o.setTimeout(p,E)),u},m=function(){for(var v=[],_=0;_=a&&(P=!0),d=A);var I=A-d,j=a-I,H=A-h,K=!1;return u!==null&&(H>=u&&v?K=!0:j=Math.min(j,u-H)),I>=a||K||P?b(A):(v===null||!C)&&l&&(v=o.setTimeout(E,j)),p},w=function(){return!!v},k=function(){w()&&_(Date.now())},y=function(){return w()&&b(Date.now()),p},F=function(){for(var C=[],A=0;A-1)for(var a=n.split(/[ ,]+/),s=0;s"u")){var t=e;return t&&t.ownerDocument?t.ownerDocument:document}}var Z5;Fo({overflow:"hidden !important"});function MG(){if(Z5===void 0){var e=document.createElement("div");e.style.setProperty("width","100px"),e.style.setProperty("height","100px"),e.style.setProperty("overflow","scroll"),e.style.setProperty("position","absolute"),e.style.setProperty("top","-9999px"),document.body.appendChild(e),Z5=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Z5}var LG=void 0;function xF(e){console&&console.warn&&console.warn(e)}function CF(e,t,n,r,o){if(o===!0&&!1)for(var i,a;i1?r[1]:""}return this.__className},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_disposables",{get:function(){return this.__disposables||(this.__disposables=[]),this.__disposables},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_async",{get:function(){return this.__async||(this.__async=new _b(this),this._disposables.push(this.__async)),this.__async},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_events",{get:function(){return this.__events||(this.__events=new Ws(this),this._disposables.push(this.__events)),this.__events},enumerable:!1,configurable:!0}),t.prototype._resolveRef=function(n){var r=this;return this.__resolves||(this.__resolves={}),this.__resolves[n]||(this.__resolves[n]=function(o){return r[n]=o}),this.__resolves[n]},t.prototype._updateComponentRef=function(n,r){r===void 0&&(r={}),n&&r&&n.componentRef!==r.componentRef&&(this._setComponentRef(n.componentRef,null),this._setComponentRef(r.componentRef,this))},t.prototype._warnDeprecations=function(n){this.className,this.props},t.prototype._warnMutuallyExclusive=function(n){this.className,this.props},t.prototype._warnConditionallyRequiredProps=function(n,r,o){CF(this.className,this.props,n,r,o)},t.prototype._setComponentRef=function(n,r){!this._skipComponentRefResolution&&n&&(typeof n=="function"&&n(r),typeof n=="object"&&(n.current=r))},t})(T.Component);function jG(e,t,n){for(var r=0,o=n.length;r-1&&o._virtual.children.splice(i,1)}n._virtual.parent=r||void 0,r&&(r._virtual||(r._virtual={children:[]}),r._virtual.children.push(n))}var JG="data-is-focusable",eK="data-is-visible",tK="data-focuszone-id",nK="data-is-sub-focuszone";function rK(e,t,n){return xh(e,t,!0,!1,!1,n)}function oK(e,t,n){return jf(e,t,!0,!1,!0,n)}function iK(e){var t=xh(e,e,!0,!1,!1,!0);return t?(lK(t),!0):!1}function jf(e,t,n,r,o,i,a,s){if(!t||!a&&t===e)return null;var l=RF(t);if(o&&l&&(i||!(OF(t)||DF(t)))){var u=jf(e,t.lastElementChild,!0,!0,!0,i,a,s);if(u){if(s&&EE(u,!0)||!s)return u;var d=jf(e,u.previousElementSibling,!0,!0,!0,i,a,s);if(d)return d;for(var h=u.parentElement;h&&h!==t;){var p=jf(e,h.previousElementSibling,!0,!0,!0,i,a,s);if(p)return p;h=h.parentElement}}}if(n&&l&&EE(t,s))return t;var m=jf(e,t.previousElementSibling,!0,!0,!0,i,a,s);return m||(r?null:jf(e,t.parentElement,!0,!1,!1,i,a,s))}function xh(e,t,n,r,o,i,a,s){if(!t||t===e&&o&&!a)return null;var l=RF(t);if(n&&l&&EE(t,s))return t;if(!o&&l&&(i||!(OF(t)||DF(t)))){var u=xh(e,t.firstElementChild,!0,!0,!1,i,a,s);if(u)return u}if(t===e)return null;var d=xh(e,t.nextElementSibling,!0,!0,!1,i,a,s);return d||(r?null:xh(e,t.parentElement,!1,!1,!0,i,a,s))}function RF(e){if(!e||!e.getAttribute)return!1;var t=e.getAttribute(eK);return t!=null?t==="true":e.offsetHeight!==0||e.offsetParent!==null||e.isVisible===!0}function EE(e,t){if(!e||e.disabled)return!1;var n=0,r=null;e&&e.getAttribute&&(r=e.getAttribute("tabIndex"),r&&(n=parseInt(r,10)));var o=e.getAttribute?e.getAttribute(JG):null,i=r!==null&&n>=0,a=!!e&&o!=="false"&&(e.tagName==="A"||e.tagName==="BUTTON"||e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT"||o==="true"||i);return t?n!==-1&&a:a}function OF(e){return!!(e&&e.getAttribute&&e.getAttribute(tK))}function DF(e){return!!(e&&e.getAttribute&&e.getAttribute(nK)==="true")}function aK(e){var t=ss(e),n=t&&t.activeElement;return!!(n&&bE(e,n))}function sK(e,t){return YG(e,t)!=="true"}var bf=void 0;function lK(e){if(e){if(bf){bf=e;return}bf=e;var t=ur(e);t&&t.requestAnimationFrame(function(){bf&&bf.focus(),bf=void 0})}}function zf(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}var uK=50,cK=5,yg=0,e2=Qi.getInstance();e2&&e2.onReset&&e2.onReset(function(){return yg++});var ym="__retval__";function ml(e){e===void 0&&(e={});var t=new Map,n=0,r=0,o=yg,i=function(a,s){var l;if(s===void 0&&(s={}),e.useStaticStyles&&typeof a=="function"&&a.__noStyleOverride__)return a(s);r++;var u=t,d=s.theme,h=d&&d.rtl!==void 0?d.rtl:ls(),p=e.disableCaching;if(o!==yg&&(o=yg,t=new Map,n=0),e.disableCaching||(u=nx(t,a),u=nx(u,s)),(p||!u[ym])&&(a===void 0?u[ym]={}:u[ym]=wF([typeof a=="function"?a(s):a],{rtl:!!h,specificityMultiplier:e.useStaticStyles?cK:void 0}),p||n++),n>(e.cacheSize||uK)){var m=ur();!((l=m==null?void 0:m.FabricConfig)===null||l===void 0)&&l.enableClassNameCacheFullWarning&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is "+n+"/"+r+"."),console.trace()),t.clear(),n=0,e.disableCaching=!0}return u[ym]};return i}function t2(e,t){return t=fK(t),e.has(t)||e.set(t,new Map),e.get(t)}function nx(e,t){if(typeof t=="function"){var n=t.__cachedInputs__;if(n)for(var r=0,o=t.__cachedInputs__;r"u"?null:WeakMap;function hK(){Eg++}function Cr(e,t,n){if(t===void 0&&(t=100),n===void 0&&(n=!1),!r0)return e;if(!rx){var r=Qi.getInstance();r&&r.onReset&&Qi.getInstance().onReset(hK),rx=!0}var o,i=0,a=Eg;return function(){for(var l=[],u=0;u0&&i>t)&&(o=ox(),i=0,a=Eg),d=o;for(var h=0;h=0||l.indexOf("data-")===0||l.indexOf("aria-")===0;u&&(!n||(n==null?void 0:n.indexOf(l))===-1)&&(o[l]=e[l])}return o}function Tb(e){NK(e,{componentDidMount:PK,componentDidUpdate:MK,componentWillUnmount:LK})}function PK(){av(this.props.componentRef,this)}function MK(e){e.componentRef!==this.props.componentRef&&(av(e.componentRef,null),av(this.props.componentRef,this))}function LK(){av(this.props.componentRef,null)}function av(e,t){e&&(typeof e=="object"?e.current=t:typeof e=="function"&&e(t))}var ca,jK=(ca={},ca[qt.up]=1,ca[qt.down]=1,ca[qt.left]=1,ca[qt.right]=1,ca[qt.home]=1,ca[qt.end]=1,ca[qt.tab]=1,ca[qt.pageUp]=1,ca[qt.pageDown]=1,ca);function zK(e){return!!jK[e]}var Go="ms-Fabric--isFocusVisible",ax="ms-Fabric--isFocusHidden";function dd(e,t){var n=t?ur(t):ur();if(n){var r=n.document.body.classList;r.add(e?Go:ax),r.remove(e?ax:Go)}}var sx=new WeakMap;function lx(e,t){var n,r=sx.get(e);return r?n=r+t:n=1,sx.set(e,n),n}function jF(e){T.useEffect(function(){var t,n=ur(e==null?void 0:e.current);if(!(!n||((t=n.FabricConfig)===null||t===void 0?void 0:t.disableFocusRects)===!0)){var r=lx(n,1);return r<=1&&(n.addEventListener("mousedown",ux,!0),n.addEventListener("pointerdown",cx,!0),n.addEventListener("keydown",fx,!0)),function(){var o;!n||((o=n.FabricConfig)===null||o===void 0?void 0:o.disableFocusRects)===!0||(r=lx(n,-1),r===0&&(n.removeEventListener("mousedown",ux,!0),n.removeEventListener("pointerdown",cx,!0),n.removeEventListener("keydown",fx,!0)))}}},[e])}var HK=function(e){return jF(e.rootRef),null};function ux(e){dd(!1,e.target)}function cx(e){e.pointerType!=="mouse"&&dd(!1,e.target)}function fx(e){zK(e.which)&&dd(!0,e.target)}function UK(e){var t=null;try{var n=ur();t=n?n.localStorage.getItem(e):null}catch{}return t}var tc,dx="language";function qK(e){if(e===void 0&&(e="sessionStorage"),tc===void 0){var t=ss(),n=e==="localStorage"?UK(dx):e==="sessionStorage"?FF(dx):void 0;n&&(tc=n),tc===void 0&&t&&(tc=t.documentElement.getAttribute("lang")),tc===void 0&&(tc="en")}return tc}function hx(e){for(var t=[],n=1;n-1;e[r]=i?o:zF(e[r]||{},o,n)}else e[r]=o}return n.pop(),e}var px=function(){return!window||!window.navigator||!window.navigator.userAgent?!1:/iPad|iPhone|iPod/i.test(window.navigator.userAgent)},$K=["TEMPLATE","STYLE","SCRIPT"];function WK(e){var t=ss(e);if(!t)return function(){};for(var n=[];e!==t.body&&e.parentElement;){for(var r=0,o=e.parentElement.children;r"u"||e){var n=ur(),r=(t=n==null?void 0:n.navigator)===null||t===void 0?void 0:t.userAgent;r2=!!r&&r.indexOf("Macintosh")!==-1}return!!r2}function KK(e){var t=Od(function(n){var r=Od(function(o){return function(i){return n(i,o)}});return function(o,i){return e(o,i?r(i):n)}});return t}var VK=Od(KK);function HF(e,t){return VK(e)(t)}var YK=["theme","styles"];function gl(e,t,n,r,o){r=r||{scope:"",fields:void 0};var i=r.scope,a=r.fields,s=a===void 0?YK:a,l=T.forwardRef(function(d,h){var p=T.useRef(),m=CK(s,i),v=m.styles;m.dir;var _=pl(m,["styles","dir"]),b=n?n(d):void 0,E=p.current&&p.current.__cachedInputs__||[],w=d.styles;if(!p.current||v!==E[1]||w!==E[2]){var k=function(y){return kF(y,t,v,w)};k.__cachedInputs__=[t,v,w],k.__noStyleOverride__=!v&&!w,p.current=k}return T.createElement(e,oe({ref:h},_,b,d,{styles:p.current}))});l.displayName="Styled"+(e.displayName||e.name);var u=o?T.memo(l):l;return l.displayName&&(u.displayName=l.displayName),u}function S4(e,t){for(var n=oe({},t),r=0,o=Object.keys(e);r=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function Yi(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r"u"?j1.none:j1.insertNode,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},t),this._classNameToArgs=(r=n==null?void 0:n.classNameToArgs)!==null&&r!==void 0?r:this._classNameToArgs,this._counter=(o=n==null?void 0:n.counter)!==null&&o!==void 0?o:this._counter,this._keyToClassName=(a=(i=this._config.classNameCache)!==null&&i!==void 0?i:n==null?void 0:n.keyToClassName)!==null&&a!==void 0?a:this._keyToClassName,this._preservedRules=(s=n==null?void 0:n.preservedRules)!==null&&s!==void 0?s:this._preservedRules,this._rules=(l=n==null?void 0:n.rules)!==null&&l!==void 0?l:this._rules}return e.getInstance=function(){if(vf=Lf[V8],!vf||vf._lastStyleElement&&vf._lastStyleElement.ownerDocument!==document){var t=(Lf==null?void 0:Lf.FabricConfig)||{},n=new e(t.mergeStyles,t.serializedStylesheet);vf=n,Lf[V8]=n}return vf},e.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},e.prototype.setConfig=function(t){this._config=oe(oe({},this._config),t)},e.prototype.onReset=function(t){var n=this;return this._onResetCallbacks.push(t),function(){n._onResetCallbacks=n._onResetCallbacks.filter(function(r){return r!==t})}},e.prototype.onInsertRule=function(t){var n=this;return this._onInsertRuleCallbacks.push(t),function(){n._onInsertRuleCallbacks=n._onInsertRuleCallbacks.filter(function(r){return r!==t})}},e.prototype.getClassName=function(t){var n=this._config.namespace,r=t||this._config.defaultPrefix;return(n?n+"-":"")+r+"-"+this._counter++},e.prototype.cacheClassName=function(t,n,r,o){this._keyToClassName[n]=t,this._classNameToArgs[t]={args:r,rules:o}},e.prototype.classNameFromKey=function(t){return this._keyToClassName[t]},e.prototype.getClassNameCache=function(){return this._keyToClassName},e.prototype.argsFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.args},e.prototype.insertedRulesFromClassName=function(t){var n=this._classNameToArgs[t];return n&&n.rules},e.prototype.insertRule=function(t,n){var r=this._config.injectionMode,o=r!==j1.none?this._getStyleElement():void 0;if(n&&this._preservedRules.push(t),o)switch(r){case j1.insertNode:var i=o.sheet;try{i.insertRule(t,i.cssRules.length)}catch{}break;case j1.appendChild:o.appendChild(document.createTextNode(t));break}else this._rules.push(t);this._config.onInsertRule&&this._config.onInsertRule(t),this._onInsertRuleCallbacks.forEach(function(a){return a()})},e.prototype.getRules=function(t){return(t?this._preservedRules.join(""):"")+this._rules.join("")},e.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach(function(t){return t()})},e.prototype.resetKeys=function(){this._keyToClassName={}},e.prototype._getStyleElement=function(){var t=this;return!this._styleElement&&typeof document<"u"&&(this._styleElement=this._createStyleElement(),bG||window.requestAnimationFrame(function(){t._styleElement=void 0})),this._styleElement},e.prototype._createStyleElement=function(){var t=document.head,n=document.createElement("style"),r=null;n.setAttribute("data-merge-styles","true");var o=this._config.cspSettings;if(o&&o.nonce&&n.setAttribute("nonce",o.nonce),this._lastStyleElement)r=this._lastStyleElement.nextElementSibling;else{var i=this._findPlaceholderStyleTag();i?r=i.nextElementSibling:r=t.childNodes[0]}return t.insertBefore(n,t.contains(r)?r:null),this._lastStyleElement=n,n},e.prototype._findPlaceholderStyleTag=function(){var t=document.head;return t?t.querySelector("style[data-merge-styles]"):null},e}();function mF(){for(var e=[],t=0;t=0)i(u.split(" "));else{var d=o.argsFromClassName(u);d?i(d):n.indexOf(u)===-1&&n.push(u)}else Array.isArray(u)?i(u):typeof u=="object"&&r.push(u)}}return i(e),{classes:n,objects:r}}function gF(e){cd!==e&&(cd=e)}function vF(){return cd===void 0&&(cd=typeof document<"u"&&!!document.documentElement&&document.documentElement.getAttribute("dir")==="rtl"),cd}var cd;cd=vF();function Eb(){return{rtl:vF()}}var Y8={};function yG(e,t){var n=e[t];n.charAt(0)!=="-"&&(e[t]=Y8[n]=Y8[n]||n.replace(/([A-Z])/g,"-$1").toLowerCase())}var vm;function EG(){var e;if(!vm){var t=typeof document<"u"?document:void 0,n=typeof navigator<"u"?navigator:void 0,r=(e=n==null?void 0:n.userAgent)===null||e===void 0?void 0:e.toLowerCase();t?vm={isWebkit:!!(t&&"WebkitAppearance"in t.documentElement.style),isMoz:!!(r&&r.indexOf("firefox")>-1),isOpera:!!(r&&r.indexOf("opera")>-1),isMs:!!(n&&(/rv:11.0/i.test(n.userAgent)||/Edge\/\d./i.test(navigator.userAgent)))}:vm={isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return vm}var Q8={"user-select":1};function _G(e,t){var n=EG(),r=e[t];if(Q8[r]){var o=e[t+1];Q8[r]&&(n.isWebkit&&e.push("-webkit-"+r,o),n.isMoz&&e.push("-moz-"+r,o),n.isMs&&e.push("-ms-"+r,o),n.isOpera&&e.push("-o-"+r,o))}}var TG=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function wG(e,t){var n=e[t],r=e[t+1];if(typeof r=="number"){var o=TG.indexOf(n)>-1,i=n.indexOf("--")>-1,a=o||i?"":"px";e[t+1]=""+r+a}}var bm,Wl="left",Gl="right",kG="@noflip",X8=(bm={},bm[Wl]=Gl,bm[Gl]=Wl,bm),Z8={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function SG(e,t,n){if(e.rtl){var r=t[n];if(!r)return;var o=t[n+1];if(typeof o=="string"&&o.indexOf(kG)>=0)t[n+1]=o.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(r.indexOf(Wl)>=0)t[n]=r.replace(Wl,Gl);else if(r.indexOf(Gl)>=0)t[n]=r.replace(Gl,Wl);else if(String(o).indexOf(Wl)>=0)t[n+1]=o.replace(Wl,Gl);else if(String(o).indexOf(Gl)>=0)t[n+1]=o.replace(Gl,Wl);else if(X8[r])t[n]=X8[r];else if(Z8[o])t[n+1]=Z8[o];else switch(r){case"margin":case"padding":t[n+1]=CG(o);break;case"box-shadow":t[n+1]=xG(o,0);break}}}function xG(e,t){var n=e.split(" "),r=parseInt(n[t],10);return n[0]=n[0].replace(String(r),String(r*-1)),n.join(" ")}function CG(e){if(typeof e=="string"){var t=e.split(" ");if(t.length===4)return t[0]+" "+t[3]+" "+t[2]+" "+t[1]}return e}function AG(e){for(var t=[],n=0,r=0,o=0;on&&t.push(e.substring(n,o)),n=o+1);break}return n-1&&t.push([r.index,r.index+r[0].length,r[1].split(",").map(function(o){return":global("+o.trim()+")"}).join(", ")]);return t.reverse().reduce(function(o,i){var a=i[0],s=i[1],l=i[2],u=o.slice(0,a),d=o.slice(s);return u+l+d},e)}function J8(e,t){return e.indexOf(":global(")>=0?e.replace(bF,"$1"):e.indexOf(":")===0?t+e:e.indexOf("&")<0?t+" "+e:e}function ex(e,t,n,r){t===void 0&&(t={__order:[]}),n.indexOf("@")===0?(n=n+"{"+e,fd([r],t,n)):n.indexOf(",")>-1?IG(n).split(",").map(function(o){return o.trim()}).forEach(function(o){return fd([r],t,J8(o,e))}):fd([r],t,J8(n,e))}function fd(e,t,n){t===void 0&&(t={__order:[]}),n===void 0&&(n="&");var r=Qi.getInstance(),o=t[n];o||(o={},t[n]=o,t.__order.push(n));for(var i=0,a=e;i0){n.subComponentStyles={};var p=n.subComponentStyles,m=function(v){if(r.hasOwnProperty(v)){var _=r[v];p[v]=function(b){return jc.apply(void 0,_.map(function(E){return typeof E=="function"?E(b):E}))}}};for(var u in r)m(u)}return n}function q0(){for(var e=[],t=0;t"u")){var t=e;return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:gE}}var _b=function(){function e(t,n){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=t||null,this._onErrorHandler=n,this._noop=function(){}}return e.prototype.dispose=function(){var t;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(t in this._timeoutIds)this._timeoutIds.hasOwnProperty(t)&&this.clearTimeout(parseInt(t,10));this._timeoutIds=null}if(this._immediateIds){for(t in this._immediateIds)this._immediateIds.hasOwnProperty(t)&&this.clearImmediate(parseInt(t,10));this._immediateIds=null}if(this._intervalIds){for(t in this._intervalIds)this._intervalIds.hasOwnProperty(t)&&this.clearInterval(parseInt(t,10));this._intervalIds=null}if(this._animationFrameIds){for(t in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(t)&&this.cancelAnimationFrame(parseInt(t,10));this._animationFrameIds=null}},e.prototype.setTimeout=function(t,n){var r=this,o=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),o=setTimeout(function(){try{r._timeoutIds&&delete r._timeoutIds[o],t.apply(r._parent)}catch(i){r._logError(i)}},n),this._timeoutIds[o]=!0),o},e.prototype.clearTimeout=function(t){this._timeoutIds&&this._timeoutIds[t]&&(clearTimeout(t),delete this._timeoutIds[t])},e.prototype.setImmediate=function(t,n){var r=this,o=0,i=ur(n);if(!this._isDisposed){this._immediateIds||(this._immediateIds={});var a=function(){try{r._immediateIds&&delete r._immediateIds[o],t.apply(r._parent)}catch(s){r._logError(s)}};o=i.setTimeout(a,0),this._immediateIds[o]=!0}return o},e.prototype.clearImmediate=function(t,n){var r=ur(n);this._immediateIds&&this._immediateIds[t]&&(r.clearTimeout(t),delete this._immediateIds[t])},e.prototype.setInterval=function(t,n){var r=this,o=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),o=setInterval(function(){try{t.apply(r._parent)}catch(i){r._logError(i)}},n),this._intervalIds[o]=!0),o},e.prototype.clearInterval=function(t){this._intervalIds&&this._intervalIds[t]&&(clearInterval(t),delete this._intervalIds[t])},e.prototype.throttle=function(t,n,r){var o=this;if(this._isDisposed)return this._noop;var i=n||0,a=!0,s=!0,l=0,u,d,h=null;r&&typeof r.leading=="boolean"&&(a=r.leading),r&&typeof r.trailing=="boolean"&&(s=r.trailing);var p=function(v){var _=Date.now(),b=_-l,E=a?i-b:i;return b>=i&&(!v||a)?(l=_,h&&(o.clearTimeout(h),h=null),u=t.apply(o._parent,d)):h===null&&s&&(h=o.setTimeout(p,E)),u},m=function(){for(var v=[],_=0;_=a&&(P=!0),d=A);var I=A-d,j=a-I,H=A-h,K=!1;return u!==null&&(H>=u&&v?K=!0:j=Math.min(j,u-H)),I>=a||K||P?b(A):(v===null||!C)&&l&&(v=o.setTimeout(E,j)),p},w=function(){return!!v},k=function(){w()&&_(Date.now())},y=function(){return w()&&b(Date.now()),p},F=function(){for(var C=[],A=0;A-1)for(var a=n.split(/[ ,]+/),s=0;s"u")){var t=e;return t&&t.ownerDocument?t.ownerDocument:document}}var Z5;Fo({overflow:"hidden !important"});function MG(){if(Z5===void 0){var e=document.createElement("div");e.style.setProperty("width","100px"),e.style.setProperty("height","100px"),e.style.setProperty("overflow","scroll"),e.style.setProperty("position","absolute"),e.style.setProperty("top","-9999px"),document.body.appendChild(e),Z5=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Z5}var LG=void 0;function xF(e){console&&console.warn&&console.warn(e)}function CF(e,t,n,r,o){if(o===!0&&!1)for(var i,a;i1?r[1]:""}return this.__className},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_disposables",{get:function(){return this.__disposables||(this.__disposables=[]),this.__disposables},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_async",{get:function(){return this.__async||(this.__async=new _b(this),this._disposables.push(this.__async)),this.__async},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_events",{get:function(){return this.__events||(this.__events=new Ws(this),this._disposables.push(this.__events)),this.__events},enumerable:!1,configurable:!0}),t.prototype._resolveRef=function(n){var r=this;return this.__resolves||(this.__resolves={}),this.__resolves[n]||(this.__resolves[n]=function(o){return r[n]=o}),this.__resolves[n]},t.prototype._updateComponentRef=function(n,r){r===void 0&&(r={}),n&&r&&n.componentRef!==r.componentRef&&(this._setComponentRef(n.componentRef,null),this._setComponentRef(r.componentRef,this))},t.prototype._warnDeprecations=function(n){this.className,this.props},t.prototype._warnMutuallyExclusive=function(n){this.className,this.props},t.prototype._warnConditionallyRequiredProps=function(n,r,o){CF(this.className,this.props,n,r,o)},t.prototype._setComponentRef=function(n,r){!this._skipComponentRefResolution&&n&&(typeof n=="function"&&n(r),typeof n=="object"&&(n.current=r))},t})(T.Component);function jG(e,t,n){for(var r=0,o=n.length;r-1&&o._virtual.children.splice(i,1)}n._virtual.parent=r||void 0,r&&(r._virtual||(r._virtual={children:[]}),r._virtual.children.push(n))}var JG="data-is-focusable",eK="data-is-visible",tK="data-focuszone-id",nK="data-is-sub-focuszone";function rK(e,t,n){return xh(e,t,!0,!1,!1,n)}function oK(e,t,n){return jf(e,t,!0,!1,!0,n)}function iK(e){var t=xh(e,e,!0,!1,!1,!0);return t?(lK(t),!0):!1}function jf(e,t,n,r,o,i,a,s){if(!t||!a&&t===e)return null;var l=RF(t);if(o&&l&&(i||!(OF(t)||DF(t)))){var u=jf(e,t.lastElementChild,!0,!0,!0,i,a,s);if(u){if(s&&EE(u,!0)||!s)return u;var d=jf(e,u.previousElementSibling,!0,!0,!0,i,a,s);if(d)return d;for(var h=u.parentElement;h&&h!==t;){var p=jf(e,h.previousElementSibling,!0,!0,!0,i,a,s);if(p)return p;h=h.parentElement}}}if(n&&l&&EE(t,s))return t;var m=jf(e,t.previousElementSibling,!0,!0,!0,i,a,s);return m||(r?null:jf(e,t.parentElement,!0,!1,!1,i,a,s))}function xh(e,t,n,r,o,i,a,s){if(!t||t===e&&o&&!a)return null;var l=RF(t);if(n&&l&&EE(t,s))return t;if(!o&&l&&(i||!(OF(t)||DF(t)))){var u=xh(e,t.firstElementChild,!0,!0,!1,i,a,s);if(u)return u}if(t===e)return null;var d=xh(e,t.nextElementSibling,!0,!0,!1,i,a,s);return d||(r?null:xh(e,t.parentElement,!1,!1,!0,i,a,s))}function RF(e){if(!e||!e.getAttribute)return!1;var t=e.getAttribute(eK);return t!=null?t==="true":e.offsetHeight!==0||e.offsetParent!==null||e.isVisible===!0}function EE(e,t){if(!e||e.disabled)return!1;var n=0,r=null;e&&e.getAttribute&&(r=e.getAttribute("tabIndex"),r&&(n=parseInt(r,10)));var o=e.getAttribute?e.getAttribute(JG):null,i=r!==null&&n>=0,a=!!e&&o!=="false"&&(e.tagName==="A"||e.tagName==="BUTTON"||e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.tagName==="SELECT"||o==="true"||i);return t?n!==-1&&a:a}function OF(e){return!!(e&&e.getAttribute&&e.getAttribute(tK))}function DF(e){return!!(e&&e.getAttribute&&e.getAttribute(nK)==="true")}function aK(e){var t=ss(e),n=t&&t.activeElement;return!!(n&&bE(e,n))}function sK(e,t){return YG(e,t)!=="true"}var bf=void 0;function lK(e){if(e){if(bf){bf=e;return}bf=e;var t=ur(e);t&&t.requestAnimationFrame(function(){bf&&bf.focus(),bf=void 0})}}function zf(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}var uK=50,cK=5,yg=0,e2=Qi.getInstance();e2&&e2.onReset&&e2.onReset(function(){return yg++});var ym="__retval__";function ml(e){e===void 0&&(e={});var t=new Map,n=0,r=0,o=yg,i=function(a,s){var l;if(s===void 0&&(s={}),e.useStaticStyles&&typeof a=="function"&&a.__noStyleOverride__)return a(s);r++;var u=t,d=s.theme,h=d&&d.rtl!==void 0?d.rtl:ls(),p=e.disableCaching;if(o!==yg&&(o=yg,t=new Map,n=0),e.disableCaching||(u=nx(t,a),u=nx(u,s)),(p||!u[ym])&&(a===void 0?u[ym]={}:u[ym]=wF([typeof a=="function"?a(s):a],{rtl:!!h,specificityMultiplier:e.useStaticStyles?cK:void 0}),p||n++),n>(e.cacheSize||uK)){var m=ur();!((l=m==null?void 0:m.FabricConfig)===null||l===void 0)&&l.enableClassNameCacheFullWarning&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is "+n+"/"+r+"."),console.trace()),t.clear(),n=0,e.disableCaching=!0}return u[ym]};return i}function t2(e,t){return t=fK(t),e.has(t)||e.set(t,new Map),e.get(t)}function nx(e,t){if(typeof t=="function"){var n=t.__cachedInputs__;if(n)for(var r=0,o=t.__cachedInputs__;r"u"?null:WeakMap;function hK(){Eg++}function Cr(e,t,n){if(t===void 0&&(t=100),n===void 0&&(n=!1),!r0)return e;if(!rx){var r=Qi.getInstance();r&&r.onReset&&Qi.getInstance().onReset(hK),rx=!0}var o,i=0,a=Eg;return function(){for(var l=[],u=0;u0&&i>t)&&(o=ox(),i=0,a=Eg),d=o;for(var h=0;h=0||l.indexOf("data-")===0||l.indexOf("aria-")===0;u&&(!n||(n==null?void 0:n.indexOf(l))===-1)&&(o[l]=e[l])}return o}function Tb(e){NK(e,{componentDidMount:PK,componentDidUpdate:MK,componentWillUnmount:LK})}function PK(){av(this.props.componentRef,this)}function MK(e){e.componentRef!==this.props.componentRef&&(av(e.componentRef,null),av(this.props.componentRef,this))}function LK(){av(this.props.componentRef,null)}function av(e,t){e&&(typeof e=="object"?e.current=t:typeof e=="function"&&e(t))}var ca,jK=(ca={},ca[qt.up]=1,ca[qt.down]=1,ca[qt.left]=1,ca[qt.right]=1,ca[qt.home]=1,ca[qt.end]=1,ca[qt.tab]=1,ca[qt.pageUp]=1,ca[qt.pageDown]=1,ca);function zK(e){return!!jK[e]}var Go="ms-Fabric--isFocusVisible",ax="ms-Fabric--isFocusHidden";function dd(e,t){var n=t?ur(t):ur();if(n){var r=n.document.body.classList;r.add(e?Go:ax),r.remove(e?ax:Go)}}var sx=new WeakMap;function lx(e,t){var n,r=sx.get(e);return r?n=r+t:n=1,sx.set(e,n),n}function jF(e){T.useEffect(function(){var t,n=ur(e==null?void 0:e.current);if(!(!n||((t=n.FabricConfig)===null||t===void 0?void 0:t.disableFocusRects)===!0)){var r=lx(n,1);return r<=1&&(n.addEventListener("mousedown",ux,!0),n.addEventListener("pointerdown",cx,!0),n.addEventListener("keydown",fx,!0)),function(){var o;!n||((o=n.FabricConfig)===null||o===void 0?void 0:o.disableFocusRects)===!0||(r=lx(n,-1),r===0&&(n.removeEventListener("mousedown",ux,!0),n.removeEventListener("pointerdown",cx,!0),n.removeEventListener("keydown",fx,!0)))}}},[e])}var HK=function(e){return jF(e.rootRef),null};function ux(e){dd(!1,e.target)}function cx(e){e.pointerType!=="mouse"&&dd(!1,e.target)}function fx(e){zK(e.which)&&dd(!0,e.target)}function UK(e){var t=null;try{var n=ur();t=n?n.localStorage.getItem(e):null}catch{}return t}var tc,dx="language";function qK(e){if(e===void 0&&(e="sessionStorage"),tc===void 0){var t=ss(),n=e==="localStorage"?UK(dx):e==="sessionStorage"?FF(dx):void 0;n&&(tc=n),tc===void 0&&t&&(tc=t.documentElement.getAttribute("lang")),tc===void 0&&(tc="en")}return tc}function hx(e){for(var t=[],n=1;n-1;e[r]=i?o:zF(e[r]||{},o,n)}else e[r]=o}return n.pop(),e}var px=function(){return!window||!window.navigator||!window.navigator.userAgent?!1:/iPad|iPhone|iPod/i.test(window.navigator.userAgent)},$K=["TEMPLATE","STYLE","SCRIPT"];function WK(e){var t=ss(e);if(!t)return function(){};for(var n=[];e!==t.body&&e.parentElement;){for(var r=0,o=e.parentElement.children;r"u"||e){var n=ur(),r=(t=n==null?void 0:n.navigator)===null||t===void 0?void 0:t.userAgent;r2=!!r&&r.indexOf("Macintosh")!==-1}return!!r2}function KK(e){var t=Od(function(n){var r=Od(function(o){return function(i){return n(i,o)}});return function(o,i){return e(o,i?r(i):n)}});return t}var VK=Od(KK);function HF(e,t){return VK(e)(t)}var YK=["theme","styles"];function gl(e,t,n,r,o){r=r||{scope:"",fields:void 0};var i=r.scope,a=r.fields,s=a===void 0?YK:a,l=T.forwardRef(function(d,h){var p=T.useRef(),m=CK(s,i),v=m.styles;m.dir;var _=pl(m,["styles","dir"]),b=n?n(d):void 0,E=p.current&&p.current.__cachedInputs__||[],w=d.styles;if(!p.current||v!==E[1]||w!==E[2]){var k=function(y){return kF(y,t,v,w)};k.__cachedInputs__=[t,v,w],k.__noStyleOverride__=!v&&!w,p.current=k}return T.createElement(e,oe({ref:h},_,b,d,{styles:p.current}))});l.displayName="Styled"+(e.displayName||e.name);var u=o?T.memo(l):l;return l.displayName&&(u.displayName=l.displayName),u}function S4(e,t){for(var n=oe({},t),r=0,o=Object.keys(e);rr?" (+ "+(z1.length-r)+" more)":"")),i2=void 0,z1=[]},n)))}function tV(e,t,n,r,o){o===void 0&&(o=!1);var i=oe({primaryButtonBorder:"transparent",errorText:r?"#F1707B":"#a4262c",messageText:r?"#F3F2F1":"#323130",messageLink:r?"#6CB8F6":"#005A9E",messageLinkHovered:r?"#82C7FF":"#004578",infoIcon:r?"#C8C6C4":"#605e5c",errorIcon:r?"#F1707B":"#A80000",blockingIcon:r?"#442726":"#FDE7E9",warningIcon:r?"#C8C6C4":"#797775",severeWarningIcon:r?"#FCE100":"#D83B01",successIcon:r?"#92C353":"#107C10",infoBackground:r?"#323130":"#f3f2f1",errorBackground:r?"#442726":"#FDE7E9",blockingBackground:r?"#442726":"#FDE7E9",warningBackground:r?"#433519":"#FFF4CE",severeWarningBackground:r?"#4F2A0F":"#FED9CC",successBackground:r?"#393D1B":"#DFF6DD",warningHighlight:r?"#fff100":"#ffb900",successText:r?"#92c353":"#107C10"},n),a=UF(e,t,i,r);return nV(a,o)}function UF(e,t,n,r,o){var i={},a=e||{},s=a.white,l=a.black,u=a.themePrimary,d=a.themeDark,h=a.themeDarker,p=a.themeDarkAlt,m=a.themeLighter,v=a.neutralLight,_=a.neutralLighter,b=a.neutralDark,E=a.neutralQuaternary,w=a.neutralQuaternaryAlt,k=a.neutralPrimary,y=a.neutralSecondary,F=a.neutralSecondaryAlt,C=a.neutralTertiary,A=a.neutralTertiaryAlt,P=a.neutralLighterAlt,I=a.accent;return s&&(i.bodyBackground=s,i.bodyFrameBackground=s,i.accentButtonText=s,i.buttonBackground=s,i.primaryButtonText=s,i.primaryButtonTextHovered=s,i.primaryButtonTextPressed=s,i.inputBackground=s,i.inputForegroundChecked=s,i.listBackground=s,i.menuBackground=s,i.cardStandoutBackground=s),l&&(i.bodyTextChecked=l,i.buttonTextCheckedHovered=l),u&&(i.link=u,i.primaryButtonBackground=u,i.inputBackgroundChecked=u,i.inputIcon=u,i.inputFocusBorderAlt=u,i.menuIcon=u,i.menuHeader=u,i.accentButtonBackground=u),d&&(i.primaryButtonBackgroundPressed=d,i.inputBackgroundCheckedHovered=d,i.inputIconHovered=d),h&&(i.linkHovered=h),p&&(i.primaryButtonBackgroundHovered=p),m&&(i.inputPlaceholderBackgroundChecked=m),v&&(i.bodyBackgroundChecked=v,i.bodyFrameDivider=v,i.bodyDivider=v,i.variantBorder=v,i.buttonBackgroundCheckedHovered=v,i.buttonBackgroundPressed=v,i.listItemBackgroundChecked=v,i.listHeaderBackgroundPressed=v,i.menuItemBackgroundPressed=v,i.menuItemBackgroundChecked=v),_&&(i.bodyBackgroundHovered=_,i.buttonBackgroundHovered=_,i.buttonBackgroundDisabled=_,i.buttonBorderDisabled=_,i.primaryButtonBackgroundDisabled=_,i.disabledBackground=_,i.listItemBackgroundHovered=_,i.listHeaderBackgroundHovered=_,i.menuItemBackgroundHovered=_),E&&(i.primaryButtonTextDisabled=E,i.disabledSubtext=E),w&&(i.listItemBackgroundCheckedHovered=w),C&&(i.disabledBodyText=C,i.variantBorderHovered=(n==null?void 0:n.variantBorderHovered)||C,i.buttonTextDisabled=C,i.inputIconDisabled=C,i.disabledText=C),k&&(i.bodyText=k,i.actionLink=k,i.buttonText=k,i.inputBorderHovered=k,i.inputText=k,i.listText=k,i.menuItemText=k),P&&(i.bodyStandoutBackground=P,i.defaultStateBackground=P),b&&(i.actionLinkHovered=b,i.buttonTextHovered=b,i.buttonTextChecked=b,i.buttonTextPressed=b,i.inputTextHovered=b,i.menuItemTextHovered=b),y&&(i.bodySubtext=y,i.focusBorder=y,i.inputBorder=y,i.smallInputBorder=y,i.inputPlaceholderText=y),F&&(i.buttonBorder=F),A&&(i.disabledBodySubtext=A,i.disabledBorder=A,i.buttonBackgroundChecked=A,i.menuDivider=A),I&&(i.accentButtonBackground=I),t!=null&&t.elevation4&&(i.cardShadow=t.elevation4),!r&&(t!=null&&t.elevation8)?i.cardShadowHovered=t.elevation8:i.variantBorderHovered&&(i.cardShadowHovered="0 0 1px "+i.variantBorderHovered),i=oe(oe({},i),n),i}function nV(e,t){var n="";return t===!0&&(n=" /* @deprecated */"),e.listTextColor=e.listText+n,e.menuItemBackgroundChecked+=n,e.warningHighlight+=n,e.warningText=e.messageText+n,e.successText+=n,e}function rV(e,t){var n,r,o;t===void 0&&(t={});var i=hx({},e,t,{semanticColors:UF(t.palette,t.effects,t.semanticColors,t.isInverted===void 0?e.isInverted:t.isInverted)});if(!((n=t.palette)===null||n===void 0)&&n.themePrimary&&!(!((r=t.palette)===null||r===void 0)&&r.accent)&&(i.palette.accent=t.palette.themePrimary),t.defaultFontStyle)for(var a=0,s=Object.keys(i.fonts);a"u"?global:window,_x=Ch&&Ch.CSPSettings&&Ch.CSPSettings.nonce,gi=VV();function VV(){var e=Ch.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]};return e.runState||(e=lv({},e,{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),e.registeredThemableStyles||(e=lv({},e,{registeredThemableStyles:[]})),Ch.__themeState__=e,e}function YV(e,t){gi.loadStyles?gi.loadStyles(VF(e).styleString,e):ZV(e)}function KF(e){gi.theme=e,XV()}function QV(e){e===void 0&&(e=3),(e===3||e===2)&&(Tx(gi.registeredStyles),gi.registeredStyles=[]),(e===3||e===1)&&(Tx(gi.registeredThemableStyles),gi.registeredThemableStyles=[])}function Tx(e){e.forEach(function(t){var n=t&&t.styleElement;n&&n.parentElement&&n.parentElement.removeChild(n)})}function XV(){if(gi.theme){for(var e=[],t=0,n=gi.registeredThemableStyles;t0&&(QV(1),YV([].concat.apply([],e)))}}function VF(e){var t=gi.theme,n=!1,r=(e||[]).map(function(o){var i=o.theme;if(i){n=!0;var a=t?t[i]:void 0,s=o.defaultValue||"inherit";return t&&!a&&console&&!(i in t)&&typeof DEBUG<"u"&&DEBUG&&console.warn('Theming value not provided for "'+i+'". Falling back to "'+s+'".'),a||s}else return o.rawString});return{styleString:r.join(""),themable:n}}function ZV(e){if(!(typeof document>"u")){var t=document.getElementsByTagName("head")[0],n=document.createElement("style"),r=VF(e),o=r.styleString,i=r.themable;n.setAttribute("data-load-themed-styles","true"),_x&&n.setAttribute("nonce",_x),n.appendChild(document.createTextNode(o)),gi.perf.count++,t.appendChild(n);var a=document.createEvent("HTMLEvents");a.initEvent("styleinsert",!0,!1),a.args={newStyle:n},document.dispatchEvent(a);var s={styleElement:n,themableStyle:e};i?gi.registeredThemableStyles.push(s):gi.registeredStyles.push(s)}}var La=Sb({}),JV=[],_E="theme";function YF(){var e,t,n,r=ur();!((t=r==null?void 0:r.FabricConfig)===null||t===void 0)&&t.legacyTheme?eY(r.FabricConfig.legacyTheme):$i.getSettings([_E]).theme||(!((n=r==null?void 0:r.FabricConfig)===null||n===void 0)&&n.theme&&(La=Sb(r.FabricConfig.theme)),$i.applySettings((e={},e[_E]=La,e)))}YF();function eY(e,t){var n;return t===void 0&&(t=!1),La=Sb(e,t),KF(oe(oe(oe(oe({},La.palette),La.semanticColors),La.effects),tY(La))),$i.applySettings((n={},n[_E]=La,n)),JV.forEach(function(r){try{r(La)}catch{}}),La}function tY(e){for(var t={},n=0,r=Object.keys(e.fonts);nt.bottom||e.leftt.right)}function uv(e,t){var n=[];return e.topt.bottom&&n.push(Je.bottom),e.leftt.right&&n.push(Je.right),n}function po(e,t){return e[Je[t]]}function Sx(e,t,n){return e[Je[t]]=n,e}function a0(e,t){var n=Xd(t);return(po(e,n.positiveEdge)+po(e,n.negativeEdge))/2}function xb(e,t){return e>0?t:t*-1}function TE(e,t){return xb(e,po(t,e))}function Qs(e,t,n){var r=po(e,n)-po(t,n);return xb(n,r)}function Md(e,t,n,r){r===void 0&&(r=!0);var o=po(e,t)-n,i=Sx(e,t,n);return r&&(i=Sx(e,t*-1,po(e,t*-1)-o)),i}function s0(e,t,n,r){return r===void 0&&(r=0),Md(e,n,po(t,n)+xb(n,r))}function nY(e,t,n,r){r===void 0&&(r=0);var o=n*-1,i=xb(o,r);return Md(e,n*-1,po(t,n)+i)}function cv(e,t,n){var r=TE(n,e);return r>TE(n,t)}function rY(e,t){for(var n=uv(e,t),r=0,o=0,i=n;o0&&(i.indexOf(s*-1)>-1?s=s*-1:(l=s,s=i.slice(-1)[0]),a=fv(e,t,{targetEdge:s,alignmentEdge:l},o))}return a=fv(e,t,{targetEdge:d,alignmentEdge:h},o),{elementRectangle:a,targetEdge:d,alignmentEdge:h}}function iY(e,t,n,r){var o=e.alignmentEdge,i=e.targetEdge,a=e.elementRectangle,s=o*-1,l=fv(a,t,{targetEdge:i,alignmentEdge:s},n,r);return{elementRectangle:l,targetEdge:i,alignmentEdge:s}}function aY(e,t,n,r,o,i,a){o===void 0&&(o=0);var s=r.alignmentEdge,l=r.alignTargetEdge,u={elementRectangle:e,targetEdge:r.targetEdge,alignmentEdge:s};!i&&!a&&(u=oY(e,t,n,r,o));var d=uv(u.elementRectangle,n),h=i?-u.targetEdge:void 0;if(d.length>0)if(l)if(u.alignmentEdge&&d.indexOf(u.alignmentEdge*-1)>-1){var p=iY(u,t,o,a);if(x4(p.elementRectangle,n))return p;u=s2(uv(p.elementRectangle,n),u,n,h)}else u=s2(d,u,n,h);else u=s2(d,u,n,h);return u}function s2(e,t,n,r){for(var o=0,i=e;oMath.abs(Qs(e,n,t*-1))?t*-1:t}function sY(e,t,n){return n!==void 0&&po(e,t)===po(n,t)}function lY(e,t,n,r,o,i,a,s){var l={},u=C4(t),d=i?n:n*-1,h=o||Xd(n).positiveEdge;return(!a||sY(e,TY(h),r))&&(h=XF(e,h,r)),l[Je[d]]=Qs(e,u,d),l[Je[h]]=Qs(e,u,h),s&&(l[Je[d*-1]]=Qs(e,u,d*-1),l[Je[h*-1]]=Qs(e,u,h*-1)),l}function uY(e){return Math.sqrt(e*e*2)}function cY(e,t,n){if(e===void 0&&(e=hr.bottomAutoEdge),n)return{alignmentEdge:n.alignmentEdge,isAuto:n.isAuto,targetEdge:n.targetEdge};var r=oe({},kx[e]);return ls()?(r.alignmentEdge&&r.alignmentEdge%2===0&&(r.alignmentEdge=r.alignmentEdge*-1),t!==void 0?kx[t]:r):r}function fY(e,t,n,r,o){return e.isAuto&&(e.alignmentEdge=ZF(e.targetEdge,t,n)),e.alignTargetEdge=o,e}function ZF(e,t,n){var r=a0(t,e),o=a0(n,e),i=Xd(e),a=i.positiveEdge,s=i.negativeEdge;return r<=o?a:s}function dY(e,t,n,r,o,i,a){var s=fv(e,t,r,o,a);return x4(s,n)?{elementRectangle:s,targetEdge:r.targetEdge,alignmentEdge:r.alignmentEdge}:aY(s,t,n,r,o,i,a)}function hY(e,t,n){var r=e.targetEdge*-1,o=new ts(0,e.elementRectangle.width,0,e.elementRectangle.height),i={},a=XF(e.elementRectangle,e.alignmentEdge?e.alignmentEdge:Xd(r).positiveEdge,n),s=Qs(e.elementRectangle,e.targetRectangle,r),l=s>Math.abs(po(t,r));return i[Je[r]]=po(t,r),i[Je[a]]=Qs(t,o,a),{elementPosition:oe({},i),closestEdge:ZF(e.targetEdge,t,o),targetEdge:r,hideBeak:!l}}function pY(e,t){var n=t.targetRectangle,r=Xd(t.targetEdge),o=r.positiveEdge,i=r.negativeEdge,a=a0(n,t.targetEdge),s=new ts(e/2,t.elementRectangle.width-e/2,e/2,t.elementRectangle.height-e/2),l=new ts(0,e,0,e);return l=Md(l,t.targetEdge*-1,-e/2),l=QF(l,t.targetEdge*-1,a-TE(o,t.elementRectangle)),cv(l,s,o)?cv(l,s,i)||(l=s0(l,s,i)):l=s0(l,s,o),l}function C4(e){var t=e.getBoundingClientRect();return new ts(t.left,t.right,t.top,t.bottom)}function mY(e){return new ts(e.left,e.right,e.top,e.bottom)}function gY(e,t){var n;if(t){if(t.preventDefault){var r=t;n=new ts(r.clientX,r.clientX,r.clientY,r.clientY)}else if(t.getBoundingClientRect)n=C4(t);else{var o=t,i=o.left||o.x,a=o.top||o.y,s=o.right||i,l=o.bottom||a;n=new ts(i,s,a,l)}if(!x4(n,e))for(var u=uv(n,e),d=0,h=u;d=r&&o&&u.top<=o&&u.bottom>=o&&(a={top:u.top,left:u.left,right:u.right,bottom:u.bottom,width:u.width,height:u.height})}return a}function kY(e,t){return wY(e,t)}function A4(e){var t=T.useRef();return t.current===void 0&&(t.current={value:typeof e=="function"?e():e}),t.current.value}function Zd(){var e=A4(function(){return new _b});return T.useEffect(function(){return function(){return e.dispose()}},[e]),e}function eI(e,t){var n=T.useRef(t);return n.current||(n.current=cu(e)),n.current}function G0(){for(var e=[],t=0;t0&&u>l&&(s=u-l>1)}o!==s&&i(s)}}),function(){return n.dispose()}}),o}function CY(e){var t=e.originalElement,n=e.containsFocus;t&&n&&t!==ur()&&setTimeout(function(){var r;(r=t.focus)===null||r===void 0||r.call(t)},0)}function AY(e,t){var n=e.onRestoreFocus,r=n===void 0?CY:n,o=T.useRef(),i=T.useRef(!1);T.useEffect(function(){return o.current=ss().activeElement,aK(t.current)&&(i.current=!0),function(){var a;r==null||r({originalElement:o.current,containsFocus:i.current,documentContainsFocus:((a=ss())===null||a===void 0?void 0:a.hasFocus())||!1}),o.current=void 0}},[]),l0(t,"focus",T.useCallback(function(){i.current=!0},[]),!0),l0(t,"blur",T.useCallback(function(a){t.current&&a.relatedTarget&&!t.current.contains(a.relatedTarget)&&(i.current=!1)},[]),!0)}function NY(e,t){var n=String(e["aria-modal"]).toLowerCase()==="true"&&e.enableAriaHiddenSiblings;T.useEffect(function(){if(n&&t.current){var r=WK(t.current);return r}},[t,n])}var oI=T.forwardRef(function(e,t){var n=S4({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},e),r=T.useRef(),o=G0(r,t);NY(n,r),AY(n,r);var i=n.role,a=n.className,s=n.ariaLabel,l=n.ariaLabelledBy,u=n.ariaDescribedBy,d=n.style,h=n.children,p=n.onDismiss,m=xY(n,r),v=T.useCallback(function(b){switch(b.which){case qt.escape:p&&(p(b),b.preventDefault(),b.stopPropagation());break}},[p]),_=N4();return l0(_,"keydown",v),T.createElement("div",oe({ref:o},Zr(n,W0),{className:a,role:i,"aria-label":s,"aria-labelledby":l,"aria-describedby":u,onKeyDown:v,style:oe({overflowY:m?"scroll":void 0,outline:"none"},d)}),h)});oI.displayName="Popup";var yf,FY="CalloutContentBase",IY=(yf={},yf[Je.top]=bc.slideUpIn10,yf[Je.bottom]=bc.slideDownIn10,yf[Je.left]=bc.slideLeftIn10,yf[Je.right]=bc.slideRightIn10,yf),xx={top:0,left:0},BY={opacity:0,filter:"opacity(0)",pointerEvents:"none"},RY=["role","aria-roledescription"],iI={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:hr.bottomAutoEdge},OY=ml({disableCaching:!0});function DY(e,t,n){var r=e.bounds,o=e.minPagePadding,i=o===void 0?iI.minPagePadding:o,a=e.target,s=T.useState(!1),l=s[0],u=s[1],d=T.useRef(),h=T.useCallback(function(){if(!d.current||l){var m=typeof r=="function"?n?r(a,n):void 0:r;!m&&n&&(m=kY(t.current,n),m={top:m.top+i,left:m.left+i,right:m.right-i,bottom:m.bottom-i,width:m.width-i*2,height:m.height-i*2}),d.current=m,l&&u(!1)}return d.current},[r,i,a,t,n,l]),p=Zd();return l0(n,"resize",p.debounce(function(){u(!0)},500,{leading:!0})),h}function PY(e,t,n){var r,o=e.calloutMaxHeight,i=e.finalHeight,a=e.directionalHint,s=e.directionalHintFixed,l=e.hidden,u=T.useState(),d=u[0],h=u[1],p=(r=n==null?void 0:n.elementPosition)!==null&&r!==void 0?r:{},m=p.top,v=p.bottom;return T.useEffect(function(){var _,b=(_=t())!==null&&_!==void 0?_:{},E=b.top,w=b.bottom;!o&&!l?typeof m=="number"&&w?h(w-m):typeof v=="number"&&typeof E=="number"&&w&&h(w-E-v):h(o||void 0)},[v,o,i,a,s,t,l,n,m]),d}function MY(e,t,n,r,o){var i=T.useState(),a=i[0],s=i[1],l=T.useRef(0),u=T.useRef(),d=Zd(),h=e.hidden,p=e.target,m=e.finalHeight,v=e.calloutMaxHeight,_=e.onPositioned,b=e.directionalHint;return T.useEffect(function(){if(h)s(void 0),l.current=0;else{var E=d.requestAnimationFrame(function(){var w,k;if(t.current&&n){var y=oe(oe({},e),{target:r.current,bounds:o()}),F=n.cloneNode(!0);F.style.maxHeight=v?""+v:"",F.style.visibility="hidden",(w=n.parentElement)===null||w===void 0||w.appendChild(F);var C=u.current===p?a:void 0,A=m?_Y(y,t.current,F,C):EY(y,t.current,F,C);(k=n.parentElement)===null||k===void 0||k.removeChild(F),!a&&A||a&&A&&!HY(a,A)&&l.current<5?(l.current++,s(A)):l.current>0&&(l.current=0,_==null||_(a))}},n);return u.current=p,function(){d.cancelAnimationFrame(E),u.current=void 0}}},[h,b,d,n,v,t,r,m,o,_,a,e,p]),a}function LY(e,t,n){var r=e.hidden,o=e.setInitialFocus,i=Zd(),a=!!t;T.useEffect(function(){if(!r&&o&&a&&n){var s=i.requestAnimationFrame(function(){return iK(n)},n);return function(){return i.cancelAnimationFrame(s)}}},[r,a,i,n,o])}function jY(e,t,n,r,o){var i=e.hidden,a=e.onDismiss,s=e.preventDismissOnScroll,l=e.preventDismissOnResize,u=e.preventDismissOnLostFocus,d=e.dismissOnTargetClick,h=e.shouldDismissOnWindowFocus,p=e.preventDismissOnEvent,m=T.useRef(!1),v=Zd(),_=A4([function(){m.current=!0},function(){m.current=!1}]),b=!!t;return T.useEffect(function(){var E=function(A){b&&!s&&y(A)},w=function(A){!l&&!(p&&p(A))&&(a==null||a(A))},k=function(A){u||y(A)},y=function(A){var P=A.composedPath?A.composedPath():[],I=P.length>0?P[0]:A.target,j=n.current&&!bE(n.current,I);if(j&&m.current){m.current=!1;return}if(!r.current&&j||A.target!==o&&j&&(!r.current||"stopPropagation"in r.current||d||I!==r.current&&!bE(r.current,I))){if(p&&p(A))return;a==null||a(A)}},F=function(A){h&&(p&&!p(A)||!p&&!u)&&!(o!=null&&o.document.hasFocus())&&A.relatedTarget===null&&(a==null||a(A))},C=new Promise(function(A){v.setTimeout(function(){if(!i&&o){var P=[zf(o,"scroll",E,!0),zf(o,"resize",w,!0),zf(o.document.documentElement,"focus",k,!0),zf(o.document.documentElement,"click",k,!0),zf(o,"blur",F,!0)];A(function(){P.forEach(function(I){return I()})})}},0)});return function(){C.then(function(A){return A()})}},[i,v,n,r,o,a,h,d,u,l,s,b,p]),_}var aI=T.memo(T.forwardRef(function(e,t){var n=S4(iI,e),r=n.styles,o=n.style,i=n.ariaLabel,a=n.ariaDescribedBy,s=n.ariaLabelledBy,l=n.className,u=n.isBeakVisible,d=n.children,h=n.beakWidth,p=n.calloutWidth,m=n.calloutMaxWidth,v=n.calloutMinWidth,_=n.doNotLayer,b=n.finalHeight,E=n.hideOverflow,w=E===void 0?!!b:E,k=n.backgroundColor,y=n.calloutMaxHeight,F=n.onScroll,C=n.shouldRestoreFocus,A=C===void 0?!0:C,P=n.target,I=n.hidden,j=n.onLayerMounted,H=T.useRef(null),K=T.useState(null),U=K[0],pe=K[1],se=T.useCallback(function(tr){pe(tr)},[]),J=G0(H,t),$=rI(n.target,{current:U}),_e=$[0],ve=$[1],fe=DY(n,_e,ve),R=MY(n,H,U,_e,fe),L=PY(n,fe,R),Ae=jY(n,R,H,_e,ve),Ue=Ae[0],Ve=Ae[1],Le=(R==null?void 0:R.elementPosition.top)&&(R==null?void 0:R.elementPosition.bottom),st=oe(oe({},R==null?void 0:R.elementPosition),{maxHeight:L});if(Le&&(st.bottom=void 0),LY(n,R,U),T.useEffect(function(){I||j==null||j()},[I]),!ve)return null;var We=w,rt=u&&!!P,Zt=OY(r,{theme:n.theme,className:l,overflowYHidden:We,calloutWidth:p,positions:R,beakWidth:h,backgroundColor:k,calloutMaxWidth:m,calloutMinWidth:v,doNotLayer:_}),qn=oe(oe({maxHeight:y||"100%"},o),We&&{overflowY:"hidden"}),er=n.hidden?{visibility:"hidden"}:void 0;return T.createElement("div",{ref:J,className:Zt.container,style:er},T.createElement("div",oe({},Zr(n,W0,RY),{className:Ys(Zt.root,R&&R.targetEdge&&IY[R.targetEdge]),style:R?oe({},st):BY,tabIndex:-1,ref:se}),rt&&T.createElement("div",{className:Zt.beak,style:zY(R)}),rt&&T.createElement("div",{className:Zt.beakCurtain}),T.createElement(oI,{role:n.role,"aria-roledescription":n["aria-roledescription"],ariaDescribedBy:a,ariaLabel:i,ariaLabelledBy:s,className:Zt.calloutMain,onDismiss:n.onDismiss,onMouseDown:Ue,onMouseUp:Ve,onRestoreFocus:n.onRestoreFocus,onScroll:F,shouldRestoreFocus:A,style:qn},d)))}),function(e,t){return!t.shouldUpdateWhenHidden&&e.hidden&&t.hidden?!0:T4(e,t)});function zY(e){var t,n,r=oe(oe({},(t=e==null?void 0:e.beakPosition)===null||t===void 0?void 0:t.elementPosition),{display:!((n=e==null?void 0:e.beakPosition)===null||n===void 0)&&n.hideBeak?"none":void 0});return!r.top&&!r.bottom&&!r.left&&!r.right&&(r.left=xx.left,r.top=xx.top),r}function HY(e,t){return Cx(e.elementPosition,t.elementPosition)&&Cx(e.beakPosition.elementPosition,t.beakPosition.elementPosition)}function Cx(e,t){for(var n in t)if(t.hasOwnProperty(n)){var r=e[n],o=t[n];if(r!==void 0&&o!==void 0){if(r.toFixed(2)!==o.toFixed(2))return!1}else return!1}return!0}aI.displayName=FY;function UY(e){return{height:e,width:e}}var qY={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},$Y=function(e){var t,n=e.theme,r=e.className,o=e.overflowYHidden,i=e.calloutWidth,a=e.beakWidth,s=e.backgroundColor,l=e.calloutMaxWidth,u=e.calloutMinWidth,d=e.doNotLayer,h=hs(qY,n),p=n.semanticColors,m=n.effects;return{container:[h.container,{position:"relative"}],root:[h.root,n.fonts.medium,{position:"absolute",display:"flex",zIndex:d?Dd.Layer:void 0,boxSizing:"border-box",borderRadius:m.roundedCorner2,boxShadow:m.elevation16,selectors:(t={},t[Ao]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},t)},GV(),r,!!i&&{width:i},!!l&&{maxWidth:l},!!u&&{minWidth:u}],beak:[h.beak,{position:"absolute",backgroundColor:p.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},UY(a),s&&{backgroundColor:s}],beakCurtain:[h.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:p.menuBackground,borderRadius:m.roundedCorner2}],calloutMain:[h.calloutMain,{backgroundColor:p.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:m.roundedCorner2},o&&{overflowY:"hidden"},s&&{backgroundColor:s}]}},WY=gl(aI,$Y,void 0,{scope:"CalloutContent"}),sI={exports:{}},ea={},lI={exports:{}},uI={};/** @license React v0.20.2 * scheduler.production.min.js * diff --git a/src/promptflow/promptflow/_sdk/_serving/swagger.py b/src/promptflow-core/promptflow/core/_serving/swagger.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_serving/swagger.py rename to src/promptflow-core/promptflow/core/_serving/swagger.py diff --git a/src/promptflow/promptflow/_sdk/_serving/utils.py b/src/promptflow-core/promptflow/core/_serving/utils.py similarity index 77% rename from src/promptflow/promptflow/_sdk/_serving/utils.py rename to src/promptflow-core/promptflow/core/_serving/utils.py index 91d681e6c4a..616f412a2ae 100644 --- a/src/promptflow/promptflow/_sdk/_serving/utils.py +++ b/src/promptflow-core/promptflow/core/_serving/utils.py @@ -1,23 +1,33 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +import base64 import json import os import time -import base64 import zlib +from pathlib import Path from flask import jsonify, request +from opentelemetry.baggage.propagation import W3CBaggagePropagator +from opentelemetry.context import Context +from opentelemetry.propagate import extract, set_global_textmap +from opentelemetry.propagators.composite import CompositePropagator +from opentelemetry.trace.propagation.tracecontext import TraceContextTextMapPropagator -from promptflow._sdk._serving._errors import ( +from promptflow._utils.exception_utils import ErrorResponse, ExceptionPresenter +from promptflow.contracts.flow import Flow as FlowContract +from promptflow.core._serving._errors import ( JsonPayloadRequiredForMultipleInputFields, MissingRequiredFlowInput, NotAcceptable, ) -from promptflow._utils.exception_utils import ErrorResponse, ExceptionPresenter -from promptflow.contracts.flow import Flow as FlowContract from promptflow.exceptions import ErrorTarget +DEFAULT_RESOURCE_PATH = Path(__file__).parent / "resources" +# configure global propagator +set_global_textmap(CompositePropagator([TraceContextTextMapPropagator(), W3CBaggagePropagator()])) + def load_request_data(flow, raw_data, logger): try: @@ -137,3 +147,34 @@ def encode_dict(data: dict) -> str: b64_data = base64.b64encode(zipped_data) # bytes -> str return b64_data.decode() + + +def try_extract_trace_context(logger) -> Context: + """Try to extract trace context from request headers.""" + # reference: https://www.w3.org/TR/trace-context/ + context = extract(request.headers) + if context: + logger.info(f"Received trace context: {context}") + return context + + +def serialize_attribute_value(v): + if isinstance(v, (str, int, float, bool)): + return v + elif isinstance(v, list): + return [serialize_attribute_value(x) for x in v] + else: + try: + v_str = json.dumps(v) + except Exception: + v_str = str(v) + return v_str + + +def load_feedback_swagger(): + feedback_swagger_path = DEFAULT_RESOURCE_PATH / "feedback_swagger.json" + # Open the JSON file + with open(feedback_swagger_path, "r") as file: + # Load JSON data from the file + data = json.load(file) + return data diff --git a/src/promptflow-core/promptflow/core/_utils.py b/src/promptflow-core/promptflow/core/_utils.py new file mode 100644 index 00000000000..7966229e736 --- /dev/null +++ b/src/promptflow-core/promptflow/core/_utils.py @@ -0,0 +1,237 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import json +import multiprocessing +import os +import re +from pathlib import Path +from typing import Dict, Union + +from promptflow._constants import DEFAULT_ENCODING, FLOW_META_JSON, FLOW_META_JSON_GEN_TIMEOUT, PROMPT_FLOW_DIR_NAME +from promptflow._utils.context_utils import _change_working_dir, inject_sys_path +from promptflow._utils.flow_utils import is_flex_flow, resolve_entry_file, resolve_flow_path +from promptflow._utils.logger_utils import LoggerFactory +from promptflow._utils.utils import _match_reference +from promptflow._utils.yaml_utils import load_yaml +from promptflow.core._errors import GenerateFlowMetaJsonError +from promptflow.exceptions import UserErrorException + +logger = LoggerFactory.get_logger(name=__name__) + + +def _generate_meta_from_file(working_dir, source_path, data, meta_dict, exception_list): + from promptflow._core.tool_meta_generator import generate_flow_meta_dict_by_file + + with _change_working_dir(working_dir), inject_sys_path(working_dir): + try: + result = generate_flow_meta_dict_by_file( + path=source_path, + data=data, + ) + meta_dict.update(result) + except Exception as e: + exception_list.append(str(e)) + + +def _generate_flow_meta( + flow_directory: Path, + source_path: str, + data: dict, + timeout: int, + *, + load_in_subprocess: bool = True, +) -> Dict[str, dict]: + """Generate tool meta from files. + + :param flow_directory: flow directory + :param tools: tool list + :param raise_error: whether raise error when generate meta failed + :param timeout: timeout for generate meta + :param include_errors_in_output: whether include errors in output + :param load_in_subprocess: whether load tool meta with subprocess to prevent system path disturb. Default is True. + If set to False, will load tool meta in sync mode and timeout need to be handled outside current process. + :return: tool meta dict + """ + if load_in_subprocess: + # use multiprocess generate to avoid system path disturb + manager = multiprocessing.Manager() + meta_dict = manager.dict() + exception_list = manager.list() + p = multiprocessing.Process( + target=_generate_meta_from_file, args=(flow_directory, source_path, data, meta_dict, exception_list) + ) + p.start() + p.join(timeout=timeout) + if p.is_alive(): + logger.warning(f"Generate meta timeout after {timeout} seconds, terminate the process.") + p.terminate() + p.join() + else: + meta_dict, exception_list = {}, [] + + # There is no built-in method to forcefully stop a running thread/coroutine in Python + # because abruptly stopping a thread can cause issues like resource leaks, + # deadlocks, or inconsistent states. + # Caller needs to handle the timeout outside current process. + logger.warning( + "Generate meta in current process and timeout won't take effect. " + "Please handle timeout manually outside current process." + ) + _generate_meta_from_file(flow_directory, source_path, data, meta_dict, exception_list) + # directly raise error if failed to generate meta + if len(exception_list) > 0: + error_message = "Generate meta failed, detail error:\n" + str(exception_list) + raise GenerateFlowMetaJsonError(error_message) + return dict(meta_dict) + + +def generate_flow_meta( + flow_directory: Union[str, Path], + source_path: str, + data: dict, + dump: bool = True, + timeout: int = FLOW_META_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, +) -> dict: + """Generate flow.json for a flow directory.""" + + flow_meta = _generate_flow_meta( + flow_directory=flow_directory, + source_path=source_path, + data=data, + timeout=timeout, + load_in_subprocess=load_in_subprocess, + ) + + if dump: + # dump as flow.tools.json + promptflow_folder = flow_directory / PROMPT_FLOW_DIR_NAME + promptflow_folder.mkdir(exist_ok=True) + with open(promptflow_folder / FLOW_META_JSON, mode="w", encoding=DEFAULT_ENCODING) as f: + json.dump(flow_meta, f, indent=4) + + return flow_meta + + +def init_executable(*, flow_dag: dict = None, flow_path: Path = None, working_dir: Path = None): + if flow_dag and flow_path: + raise ValueError("flow_dag and flow_path cannot be both provided.") + if not flow_dag and not flow_path: + raise ValueError("flow_dag or flow_path must be provided.") + if flow_dag and not working_dir: + raise ValueError("working_dir must be provided when flow_dag is provided.") + + if flow_path: + flow_dir, flow_filename = resolve_flow_path(flow_path) + flow_dag = load_yaml(flow_dir / flow_filename) + if not working_dir: + working_dir = flow_dir + + from promptflow.contracts.flow import EagerFlow as ExecutableEagerFlow + from promptflow.contracts.flow import Flow as ExecutableFlow + + if is_flex_flow(yaml_dict=flow_dag): + + entry = flow_dag.get("entry") + entry_file = resolve_entry_file(entry=entry, working_dir=working_dir) + + meta_dict = generate_flow_meta( + flow_directory=working_dir, + source_path=entry_file, + data=flow_dag, + dump=False, + ) + return ExecutableEagerFlow.deserialize(meta_dict) + + # for DAG flow, use data to init executable to improve performance + return ExecutableFlow._from_dict(flow_dag=flow_dag, working_dir=working_dir) + + +# !!! Attention!!!: Please make sure you have contact with PRS team before changing the interface. +# They are using FlowExecutor.update_environment_variables_with_connections(connections) +def update_environment_variables_with_connections(built_connections): + """The function will result env var value ${my_connection.key} to the real connection keys.""" + return update_dict_value_with_connections(built_connections, os.environ) + + +def override_connection_config_with_environment_variable(connections: Dict[str, dict]): + """ + The function will use relevant environment variable to override connection configurations. For instance, if there + is a custom connection named 'custom_connection' with a configuration key called 'chat_deployment_name,' the + function will attempt to retrieve 'chat_deployment_name' from the environment variable + 'CUSTOM_CONNECTION_CHAT_DEPLOYMENT_NAME' by default. If the environment variable is not set, it will use the + original value as a fallback. + """ + for connection_name, connection in connections.items(): + values = connection.get("value", {}) + for key, val in values.items(): + connection_name = connection_name.replace(" ", "_") + env_name = f"{connection_name}_{key}".upper() + if env_name not in os.environ: + continue + values[key] = os.environ[env_name] + logger.info(f"Connection {connection_name}'s {key} is overridden with environment variable {env_name}") + return connections + + +def resolve_connections_environment_variable_reference(connections: Dict[str, dict]): + """The function will resolve connection secrets env var reference like api_key: ${env:KEY}""" + for connection in connections.values(): + values = connection.get("value", {}) + for key, val in values.items(): + if not _match_env_reference(val): + continue + env_name = _match_env_reference(val) + if env_name not in os.environ: + raise UserErrorException(f"Environment variable {env_name} is not found.") + values[key] = os.environ[env_name] + return connections + + +def _match_env_reference(val: str): + try: + val = val.strip() + m = re.match(r"^\$\{env:(.+)}$", val) + if not m: + return None + name = m.groups()[0] + return name + except Exception: + # for exceptions when val is not a string, return + return None + + +def get_used_connection_names_from_environment_variables(): + """The function will get all potential related connection names from current environment variables. + for example, if part of env var is + { + "ENV_VAR_1": "${my_connection.key}", + "ENV_VAR_2": "${my_connection.key2}", + "ENV_VAR_3": "${my_connection2.key}", + } + The function will return {"my_connection", "my_connection2"}. + """ + return get_used_connection_names_from_dict(os.environ) + + +def update_dict_value_with_connections(built_connections, connection_dict: dict): + for key, val in connection_dict.items(): + connection_name, connection_key = _match_reference(val) + if connection_name is None: + continue + if connection_name not in built_connections: + continue + if connection_key not in built_connections[connection_name]["value"]: + continue + connection_dict[key] = built_connections[connection_name]["value"][connection_key] + + +def get_used_connection_names_from_dict(connection_dict: dict): + connection_names = set() + for key, val in connection_dict.items(): + connection_name, _ = _match_reference(val) + if connection_name: + connection_names.add(connection_name) + + return connection_names diff --git a/src/promptflow-core/promptflow/core/_version.py b/src/promptflow-core/promptflow/core/_version.py new file mode 100644 index 00000000000..f8cedcc6bd9 --- /dev/null +++ b/src/promptflow-core/promptflow/core/_version.py @@ -0,0 +1,7 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import importlib.metadata + +__version__ = importlib.metadata.version("promptflow-core") diff --git a/src/promptflow/promptflow/exceptions.py b/src/promptflow-core/promptflow/exceptions.py similarity index 92% rename from src/promptflow/promptflow/exceptions.py rename to src/promptflow-core/promptflow/exceptions.py index 33330a95d6f..cd473e48b67 100644 --- a/src/promptflow/promptflow/exceptions.py +++ b/src/promptflow-core/promptflow/exceptions.py @@ -6,9 +6,7 @@ import traceback from enum import Enum from functools import cached_property -from typing import Dict - -from azure.core.exceptions import HttpResponseError +from typing import Dict, List class ErrorCategory(str, Enum): @@ -22,6 +20,7 @@ class ErrorTarget(str, Enum): EXECUTOR = "Executor" BATCH = "Batch" + CORE = "Core" FLOW_EXECUTOR = "FlowExecutor" NODE_EXECUTOR = "NodeExecutor" TOOL = "Tool" @@ -45,6 +44,11 @@ class PromptflowException(Exception): :type target: ~promptflow.exceptions.ErrorTarget :param error: The original exception if any. :type error: Exception + :param privacy_info: To record messages to telemetry, it is necessary to mask private information. + If set to None, messages will not be recorded to telemetry. + Otherwise, it will replace the content string in messages + that contain privacy_info with '{privacy_info}'. + :type privacy_info: List[str] """ def __init__( @@ -53,12 +57,14 @@ def __init__( message_format="", target: ErrorTarget = ErrorTarget.UNKNOWN, module=None, + privacy_info: List[str] = None, **kwargs, ): self._inner_exception = kwargs.get("error") self._target = target self._module = module self._message_format = message_format + self._privacy_info = privacy_info self._kwargs = kwargs if message: self._message = str(message) @@ -251,6 +257,10 @@ def get_error_info(cls, e: BaseException): def _is_system_error(cls, e: BaseException): if isinstance(e, SystemErrorException): return True + try: + from azure.core.exceptions import HttpResponseError + except ImportError: + return True if isinstance(e, HttpResponseError): status_code = str(e.status_code) # Except for 429, 400-499 are all client errors. @@ -263,6 +273,8 @@ def _is_system_error(cls, e: BaseException): def _is_user_error(cls, e: BaseException): if isinstance(e, UserErrorException): return True + if isinstance(e, (KeyboardInterrupt,)): + return True return False @@ -320,7 +332,15 @@ def _module_target_map(cls) -> Dict[str, ErrorTarget]: @classmethod def _error_message(cls, e: BaseException): - return getattr(e, "message_format", "") + privacy_info = e._privacy_info if isinstance(e, PromptflowException) else None + if privacy_info is None: + return getattr(e, "message_format", "") + message = e.message + for info in privacy_info: + info = str(info) + message = message.replace(info, "{privacy_info}") + + return message @classmethod def _error_detail(cls, e: BaseException): diff --git a/src/promptflow/promptflow/executor/__init__.py b/src/promptflow-core/promptflow/executor/__init__.py similarity index 100% rename from src/promptflow/promptflow/executor/__init__.py rename to src/promptflow-core/promptflow/executor/__init__.py diff --git a/src/promptflow-core/promptflow/executor/_assistant_tool_invoker.py b/src/promptflow-core/promptflow/executor/_assistant_tool_invoker.py new file mode 100644 index 00000000000..6615c49dca4 --- /dev/null +++ b/src/promptflow-core/promptflow/executor/_assistant_tool_invoker.py @@ -0,0 +1,147 @@ +from dataclasses import dataclass +from typing import Callable, Dict, Optional + +from promptflow.contracts.flow import ToolSource, ToolSourceType +from promptflow.contracts.tool import ToolType +from promptflow.exceptions import ErrorTarget +from promptflow.executor._errors import InvalidAssistantTool + + +@dataclass +class AssistantTool: + """Assistant tool definition. + + This is internal contract for tool resolving. + """ + + type: str # Openai assistant tool type ['function', 'retrieval', 'code_interpreter'] + tool_type: ToolType # promptflow tool type + source: ToolSource # Tool sourcing definition + predefined_inputs: Optional[Dict[str, str]] = None # Predefined inputs for the tool, optional + + +class AssistantToolResolver: + @classmethod + def from_dict(cls, data: dict, node_name: str = None) -> AssistantTool: + + type = data.get("type", None) + if type not in ["code_interpreter", "function", "retrieval"]: + raise InvalidAssistantTool( + message_format=( + "Unsupported assistant tool's type in node {node_name} : {type}. " + "Please make sure the type is restricted within " + "['code_interpreter', 'function', 'retrieval']." + ), + type=type, + target=ErrorTarget.EXECUTOR, + ) + + try: + tool_type = ToolType(data.get("tool_type")) + except ValueError: + raise InvalidAssistantTool( + message_format=( + "The 'tool_type' property is missing or invalid in assistant node '{node_name}'. " + "Please make sure the assistant definition is correct." + ), + node_name=node_name, + target=ErrorTarget.EXECUTOR, + ) + + if tool_type not in [ToolType.PYTHON]: + raise InvalidAssistantTool( + message_format=( + "Tool type '{tool_type}' is not supported in assistant node '{node_name}'. " + "Please make sure the assistant definition is correct." + ), + tool_type=tool_type.value, + node_name=node_name, + target=ErrorTarget.EXECUTOR, + ) + + if "source" not in data: + raise InvalidAssistantTool( + message_format=( + "The 'source' property is missing in the assistant node '{node_name}'. " + "Please make sure the assistant definition is correct." + ), + node_name=node_name, + target=ErrorTarget.EXECUTOR, + ) + + try: + tool_source = ToolSource.deserialize(data.get("source")) + except ValueError: + raise InvalidAssistantTool( + message_format=( + "The 'source' definition is not valid in the assistant node '{node_name}'. " + "Please make sure the assistant definition is correct and deserializable." + ), + node_name=node_name, + target=ErrorTarget.EXECUTOR, + ) + + if tool_source.type == ToolSourceType.Package: + if not tool_source.tool: + raise InvalidAssistantTool( + message_format=( + "The 'tool' property is missing in 'source' of the assistant package tool " + "in node '{node_name}'. Please make sure the assistant definition is correct." + ), + node_name=node_name, + target=ErrorTarget.EXECUTOR, + ) + elif tool_source.type == ToolSourceType.Code: + if not tool_source.path: + raise InvalidAssistantTool( + message_format=( + "The 'path' property is missing in 'source' of the assistant python tool " + "in node '{node_name}'. Please make sure the assistant definition is correct." + ), + node_name=node_name, + target=ErrorTarget.EXECUTOR, + ) + + else: + raise InvalidAssistantTool( + message_format=( + "Tool source type '{source_type}' is not supported in assistant node '{node_name}'. " + "Please make sure the assistant definition is correct." + ), + node_name=node_name, + source_type=tool_source.type, + target=ErrorTarget.EXECUTOR, + ) + + return AssistantTool( + type=type, + tool_type=tool_type, + source=tool_source, + predefined_inputs=data.get("predefined_inputs", None), + ) + + +@dataclass +class ResolvedAssistantTool: + """Resolved assistant tool structure. + + The contract is used to stored resolved assistant tool, including + connection, + openai tool json definition, + callable function, etc + """ + + name: str + openai_definition: dict + func: Callable + + +class AssistantToolInvoker: + def __init__(self, tools: Dict[str, ResolvedAssistantTool]): + self._assistant_tools = tools + + def invoke_tool(self, func_name, kwargs): + return self._assistant_tools[func_name].func(**kwargs) + + def to_openai_tools(self): + return [tool.openai_definition for tool in self._assistant_tools.values()] diff --git a/src/promptflow/promptflow/executor/_async_nodes_scheduler.py b/src/promptflow-core/promptflow/executor/_async_nodes_scheduler.py similarity index 93% rename from src/promptflow/promptflow/executor/_async_nodes_scheduler.py rename to src/promptflow-core/promptflow/executor/_async_nodes_scheduler.py index 664016a698c..01b2e926f34 100644 --- a/src/promptflow/promptflow/executor/_async_nodes_scheduler.py +++ b/src/promptflow-core/promptflow/executor/_async_nodes_scheduler.py @@ -18,7 +18,7 @@ from promptflow._core.tools_manager import ToolsManager from promptflow._utils.logger_utils import flow_logger from promptflow._utils.thread_utils import ThreadWithContextVars -from promptflow._utils.utils import extract_user_frame_summaries, set_context +from promptflow._utils.utils import extract_user_frame_summaries, set_context, try_get_long_running_logging_interval from promptflow.contracts.flow import Node from promptflow.executor._dag_manager import DAGManager from promptflow.executor._errors import NoNodeExecutedError @@ -58,12 +58,15 @@ async def execute( # Semaphore should be created in the loop, otherwise it will not work. loop = asyncio.get_running_loop() self._semaphore = asyncio.Semaphore(self._node_concurrency) - monitor = ThreadWithContextVars( - target=monitor_long_running_coroutine, - args=(loop, self._task_start_time, self._task_last_log_time, self._dag_manager_completed_event), - daemon=True, - ) - monitor.start() + if (interval := try_get_long_running_logging_interval(flow_logger, DEFAULT_TASK_LOGGING_INTERVAL)) is not None: + monitor = ThreadWithContextVars( + target=monitor_long_running_coroutine, + args=( + interval, loop, self._task_start_time, self._task_last_log_time, self._dag_manager_completed_event + ), + daemon=True, + ) + monitor.start() # Set the name of scheduler tasks to avoid monitoring its duration task = asyncio.current_task() @@ -223,6 +226,7 @@ def log_stack_recursively(task: asyncio.Task, elapse_time: float): def monitor_long_running_coroutine( + logging_interval: int, loop: asyncio.AbstractEventLoop, task_start_time: dict, task_last_log_time: dict, @@ -230,24 +234,6 @@ def monitor_long_running_coroutine( ): flow_logger.info("monitor_long_running_coroutine started") - logging_interval = DEFAULT_TASK_LOGGING_INTERVAL - logging_interval_in_env = os.environ.get("PF_TASK_PEEKING_INTERVAL") - if logging_interval_in_env: - try: - value = int(logging_interval_in_env) - if value <= 0: - raise ValueError - logging_interval = value - flow_logger.info( - f"Using value of PF_TASK_PEEKING_INTERVAL in environment variable as " - f"logging interval: {logging_interval_in_env}" - ) - except ValueError: - flow_logger.warning( - f"Value of PF_TASK_PEEKING_INTERVAL in environment variable ('{logging_interval_in_env}') " - f"is invalid, use default value {DEFAULT_TASK_LOGGING_INTERVAL}" - ) - while not dag_manager_completed_event.is_set(): running_tasks = [task for task in asyncio.all_tasks(loop) if not task.done()] # get duration of running tasks diff --git a/src/promptflow/promptflow/executor/_dag_manager.py b/src/promptflow-core/promptflow/executor/_dag_manager.py similarity index 100% rename from src/promptflow/promptflow/executor/_dag_manager.py rename to src/promptflow-core/promptflow/executor/_dag_manager.py diff --git a/src/promptflow/promptflow/executor/_docstring_parser.py b/src/promptflow-core/promptflow/executor/_docstring_parser.py similarity index 100% rename from src/promptflow/promptflow/executor/_docstring_parser.py rename to src/promptflow-core/promptflow/executor/_docstring_parser.py diff --git a/src/promptflow/promptflow/executor/_errors.py b/src/promptflow-core/promptflow/executor/_errors.py similarity index 89% rename from src/promptflow/promptflow/executor/_errors.py rename to src/promptflow-core/promptflow/executor/_errors.py index 86fc44ed100..2606ecf560c 100644 --- a/src/promptflow/promptflow/executor/_errors.py +++ b/src/promptflow-core/promptflow/executor/_errors.py @@ -20,6 +20,12 @@ class InvalidCustomLLMTool(ValidationException): pass +class InvalidAssistantTool(ValidationException): + """Exception raised when assistant tool definition is wrong.""" + + pass + + class ValueTypeUnresolved(ValidationException): pass @@ -162,6 +168,17 @@ class SingleNodeValidationError(UserErrorException): pass +class AggregationNodeExecutionTimeoutError(UserErrorException): + """Exception raised when aggregation node execution timeout""" + + def __init__(self, timeout): + super().__init__( + message_format="Aggregation node execution timeout for exceeding {timeout} seconds", + timeout=timeout, + target=ErrorTarget.EXECUTOR, + ) + + class LineExecutionTimeoutError(UserErrorException): """Exception raised when single line execution timeout""" @@ -189,6 +206,12 @@ def __init__(self, line_number, timeout): ) +class ThreadCrashError(SystemErrorException): + """Exception raised when thread crashed.""" + + pass + + class ProcessCrashError(UserErrorException): """Exception raised when process crashed.""" @@ -281,10 +304,6 @@ def error_codes(self): return [infer_error_code_from_class(SystemErrorException), self.__class__.__name__] -class UnsupportedAssistantToolType(ValidationException): - pass - - class FailedToParseAssistantTool(UserErrorException): """Exception raised when failed to parse assistant tool from docstring.""" @@ -293,3 +312,13 @@ def __init__(self, func_name): message_format="Failed to get assistant tool by parsing the docstring of function '{func_name}'.", func_name=func_name, ) + + +class FlowEntryInitializationError(UserErrorException): + """Exception raised when failed to initialize flow entry.""" + + def __init__(self, init_kwargs): + super().__init__( + message_format="Failed to initialize flow entry with '{init_kwargs}'.", + init_kwargs=init_kwargs, + ) diff --git a/src/promptflow/promptflow/executor/_flow_nodes_scheduler.py b/src/promptflow-core/promptflow/executor/_flow_nodes_scheduler.py similarity index 100% rename from src/promptflow/promptflow/executor/_flow_nodes_scheduler.py rename to src/promptflow-core/promptflow/executor/_flow_nodes_scheduler.py diff --git a/src/promptflow/promptflow/executor/_input_assignment_parser.py b/src/promptflow-core/promptflow/executor/_input_assignment_parser.py similarity index 100% rename from src/promptflow/promptflow/executor/_input_assignment_parser.py rename to src/promptflow-core/promptflow/executor/_input_assignment_parser.py diff --git a/src/promptflow-core/promptflow/executor/_line_execution_process_pool.py b/src/promptflow-core/promptflow/executor/_line_execution_process_pool.py new file mode 100644 index 00000000000..14721c05c2b --- /dev/null +++ b/src/promptflow-core/promptflow/executor/_line_execution_process_pool.py @@ -0,0 +1,841 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import asyncio +import contextvars +import multiprocessing +import os +import queue +import shutil +import signal +import sys +import threading +from contextlib import nullcontext +from datetime import datetime +from functools import partial +from logging import INFO +from multiprocessing import Manager, Queue +from multiprocessing.pool import ThreadPool +from pathlib import Path +from tempfile import mkdtemp +from typing import Callable, Dict, List, Optional, Union + +import psutil + +from promptflow._constants import LINE_NUMBER_KEY, LINE_TIMEOUT_SEC +from promptflow._core._errors import ProcessPoolError, UnexpectedError +from promptflow._core.run_tracker import RunTracker +from promptflow._utils.dataclass_serializer import convert_eager_flow_output_to_dict +from promptflow._utils.exception_utils import ExceptionPresenter +from promptflow._utils.logger_utils import bulk_logger +from promptflow._utils.process_utils import ( + get_available_max_worker_count, + get_manager_process_log_path, + get_subprocess_log_path, + log_errors_from_file, +) +from promptflow._utils.thread_utils import RepeatLogTimer +from promptflow._utils.utils import log_progress, set_context +from promptflow.contracts.run_info import FlowRunInfo +from promptflow.contracts.run_info import RunInfo as NodeRunInfo +from promptflow.contracts.run_info import Status +from promptflow.exceptions import ErrorTarget, PromptflowException +from promptflow.executor._errors import ( + BatchExecutionTimeoutError, + LineExecutionTimeoutError, + ProcessCrashError, + ThreadCrashError, +) +from promptflow.executor._process_manager import ( + ForkProcessManager, + ProcessControlSignal, + ProcessInfo, + ProcessPoolConstants, + SpawnProcessManager, +) +from promptflow.executor._result import LineResult +from promptflow.executor._script_executor import ScriptExecutor +from promptflow.executor.flow_executor import DEFAULT_CONCURRENCY_BULK, FlowExecutor +from promptflow.storage._queue_run_storage import QueueRunStorage, ServiceQueueRunStorage +from promptflow.tracing._operation_context import OperationContext + + +class LineExecutionProcessPool: + """A process pool for executing lines in batch mode. + + :param output_dir: The output directory for the batch run. + :param flow_executor: The flow executor used to provide flow_create_kwargs to execute the lines. + :param worker_count: The number of worker processes in the pool. + :param line_timeout_sec: The timeout for each line execution in seconds. + :param batch_timeout_sec: The timeout for the entire batch run in seconds. + :param run_id: The run id of the batch run. + :param nlines: The number of lines in the batch run. + :param serialize_multimedia_during_execution: Whether to serialize multimedia data during line execution. + """ + + _DEFAULT_WORKER_COUNT = 4 + _THREAD_TERMINATED_TIMEOUT = 10 + _PROCESS_TERMINATED_TIMEOUT = 60 + _PROCESS_INFO_OBTAINED_TIMEOUT = 60 + + def __init__( + self, + output_dir: Path, + flow_executor: FlowExecutor, + worker_count: Optional[int] = None, + line_timeout_sec: Optional[int] = None, + batch_timeout_sec: Optional[int] = None, + run_id: Optional[str] = None, + nlines: Optional[int] = None, + serialize_multimedia_during_execution: bool = False, + ): + # Determine whether to use fork to create process. + multiprocessing_start_method = os.environ.get("PF_BATCH_METHOD", multiprocessing.get_start_method()) + sys_start_methods = multiprocessing.get_all_start_methods() + if multiprocessing_start_method not in sys_start_methods: + bulk_logger.warning( + f"Failed to set start method to '{multiprocessing_start_method}', " + f"start method {multiprocessing_start_method} is not in: {sys_start_methods}." + ) + bulk_logger.info(f"Set start method to default {multiprocessing.get_start_method()}.") + multiprocessing_start_method = multiprocessing.get_start_method() + self._use_fork = multiprocessing_start_method in ["fork", "forkserver"] + + # Initialize some fields from the init parameters. + self._nlines = nlines + self._run_id = run_id + self._output_dir = output_dir + self._batch_timeout_sec = batch_timeout_sec + self._line_timeout_sec = line_timeout_sec or LINE_TIMEOUT_SEC + self._worker_count = self._determine_worker_count(worker_count) + + # - If it is False, we will use QueueRunStorage as the storage during execution. + # It will only put the original run info into the output queue to wait for processing. + # - If it is True, we will use ServiceQueueRunStorage as the storage during execution. + # It will persist multimedia data in the run infos and aggregation_inputs to output_dir + # and convert Image object to path dict. + self._serialize_multimedia_during_execution = serialize_multimedia_during_execution + + # Initialize the results dictionary that stores line results. + self._result_dict: Dict[int, LineResult] = {} + + # Initialize some fields from flow_executor and construct flow_create_kwargs + self._flow_id = flow_executor._flow_id + self._log_interval = flow_executor._log_interval + if isinstance(flow_executor, ScriptExecutor): + self._storage = flow_executor._storage + else: + self._storage = flow_executor._run_tracker._storage + self._flow_create_kwargs = { + "flow_file": flow_executor._flow_file, + "connections": flow_executor._connections, + "working_dir": flow_executor._working_dir, + "line_timeout_sec": self._line_timeout_sec, + "raise_ex": False, + # only script executor has init + "init_kwargs": getattr(flow_executor, "_init_kwargs", None), + } + # Will set to True if the batch run is timeouted. + self._is_timeout = False + self._multimedia_processor = flow_executor._multimedia_processor + + def __enter__(self): + self.start() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.close() + + @property + def is_timeout(self): + return self._is_timeout + + def start(self): + """Start the process pool and create a thread pool monitoring process status""" + manager = Manager() + self._processing_idx = manager.dict() + self._completed_idx = manager.dict() + + self._task_queue = Queue() + self._n_process = self._worker_count + + # When using fork, we first spawn a sub process, the SemLock created in fork context (multiprocessing.Queue()) + # can't used in a spawn context. Since spawn does not share memory, synchronization primitives created by + # fork cannot be used directly. It will cause an error: "A SemLock created in a fork context is being + # shared with a process in a spawn context. This is not supported". + + # So use multiprocessing.Manager().Queue() instead of multiprocessing.Queue(). + # Manager().Queue() operates through a manager server process, which passes messages between different + # processes without directly sharing memory state, which makes it safe to use in a spawn context. + self._input_queues = [manager.Queue() for _ in range(self._n_process)] + self._output_queues = [manager.Queue() for _ in range(self._n_process)] + self._control_signal_queue = manager.Queue() + process_info: Dict[int, ProcessInfo] = manager.dict() + + # when using fork, we first create a process with spawn method to establish a clean environment + # Then fork the subprocess in this environment to avoid some deadlock problems + common_kwargs = { + "input_queues": self._input_queues, + "output_queues": self._output_queues, + "process_info": process_info, + "process_target_func": _process_wrapper, + "output_dir": self._output_dir, + "serialize_multimedia": self._serialize_multimedia_during_execution, + } + if self._use_fork: + # 1. Create input_queue, output_queue, control_signal_queue and _process_info in the main process. + # 2. Pass the above queue/dict as parameters to spawn and fork processes to transfer information + # between processes. + self._processes_manager = ForkProcessManager( + self._control_signal_queue, + self._flow_create_kwargs, + **common_kwargs, + ) + else: + executor_creation_func = partial(FlowExecutor.create, **self._flow_create_kwargs) + # 1. Create input_queue, output_queue, and _process_info in the main process. + # 2. Spawn _n_process sub-process and pass the above queue/dict to these sub-process to transfer information + # between main process and sub process. + self._processes_manager = SpawnProcessManager(executor_creation_func, **common_kwargs) + + self._processes_manager.start_processes() + self._processes_manager.ensure_healthy() + + # Start a thread pool to monitor the processes. + self._monitor_pool = ThreadPool( + self._n_process, initializer=set_context, initargs=(contextvars.copy_context(),) + ) + # The variable '_async_tasks' here is a list of AsyncResult object + # that can be used to check if the execution are finished. + # The actual line results of the batch run are stored in 'result_dict'. + + # Create _n_process monitoring threads, mainly used to assign tasks and receive line result. + # When receiving terminate signal, end the process. + # When line execution timeout or process crash, restart the process. + self._async_tasks = [ + self._monitor_pool.apply_async( + func=self._monitor_workers_and_process_tasks_in_thread, + args=( + self._task_queue, # Shared task queue for all sub processes to read the input data. + self._result_dict, # Line result dict of the batch run. + i, # Index of the sub process. + self._input_queues[i], # Specific input queue for sub process, used to send input data to it. + self._output_queues[i], # Specific output queue for sub process, used to receive results from it. + ), + ) + for i in range(self._n_process) + ] + + def close(self): + """End the process pool and close the thread pool.""" + # Terminate the task of monitor threads. + self._terminate_tasks() + # Close the thread pool and wait for all threads to complete. + if self._monitor_pool is not None: + self._monitor_pool.close() + self._monitor_pool.join() + # If a thread crashed for some reason, the processes it monitors might not be able to exit because + # they do not receive a terminate signal. So we need to terminate these unmonitored processes. + self._processes_manager.ensure_all_processes_terminated() + # In fork mode, send the 'spawned_manager_end' signal to exit the spawned process manager. + if self._use_fork: + self._control_signal_queue.put((ProcessControlSignal.SPAWNED_MANAGER_END, self._use_fork)) + # Clear the result dict. + self._result_dict.clear() + # Delete log files to prevent interference from the current run on the next execution. + self._delete_log_files() + + async def submit(self, run_id: str, line_number: int, inputs: dict): + """Submit a line execution request to the process pool and return the line result.""" + self._task_queue.put((run_id, line_number, inputs)) + start_time = datetime.utcnow() + line_result = None + while not self._line_timeout_expired(start_time, buffer_sec=20) and not line_result: + line_result = self._result_dict.get(line_number, None) + # Check monitor status every 1 second + self._monitor_thread_pool_status() + await asyncio.sleep(1) + return line_result + + async def run(self, batch_inputs) -> List[LineResult]: + """Submit all batch inputs to the process pool and return the line results.""" + with RepeatLogTimer( + interval_seconds=self._log_interval, + logger=bulk_logger, + level=INFO, + log_message_function=self._generate_thread_status_messages, + args=( + self._monitor_pool, + self._nlines, + ), + ): + try: + self._batch_start_time = datetime.utcnow() + # After starting time, put the input in self._task_queue, because the monitor thread will + # use self._batch_start_time to calculate the remain execution time after get the input data. + for index, inputs in batch_inputs: + self._task_queue.put( + ( + self._run_id, + index, + inputs, + ) + ) + # Wait for batch run to complete or timeout + last_log_count = 0 + while not self._batch_timeout_expired(self._batch_start_time): + # Print the progress logs of the batch run. + last_log_count = log_progress( + run_start_time=self._batch_start_time, + total_count=self._nlines, + current_count=len(self._result_dict), + last_log_count=last_log_count, + ) + # If the batch run is completed, break the loop. + if self._is_batch_run_completed(): + break + # Check monitor status every 1 second + self._monitor_thread_pool_status() + await asyncio.sleep(1) + except PromptflowException: + raise + except Exception as e: + bulk_logger.error(f"ProcessPool failed with exception: {e}") + raise ProcessPoolError( + message_format=f"ProcessPool failed with exception: {e}", + target=ErrorTarget.EXECUTOR, + ) from e + + if self._batch_timeout_expired(self._batch_start_time): + # Send terminate signal to all threads and wait for them to exit. + self._terminate_tasks() + # Wait for up to 10s for thread termination, aiming to ensure that + # the line results in the result dict are as complete as possible. + start_time = datetime.utcnow() + while not self._timeout_expired(start_time, self._THREAD_TERMINATED_TIMEOUT): + if self._all_tasks_ready(): + break + await asyncio.sleep(1) + # Set the timeout flag to True and log the warning. + self._is_timeout = True + bulk_logger.warning(f"The batch run timed out, with {len(self._result_dict)} line results processed.") + return [self._result_dict[key] for key in sorted(self._result_dict)] + + # region monitor thread target function + + def _monitor_workers_and_process_tasks_in_thread( + self, + task_queue: Queue, + result_dict: Dict[int, LineResult], + index: int, + input_queue: Queue, + output_queue: Queue, + ): + # Get the process info of the thread monitoring from the manager. + index, process_id, process_name = self._processes_manager.get_process_info(index) + + # The main loop of the thread, responsible for getting tasks from the task queue and + # processing them through the input queue, while also monitoring for terminate signals. + # Currently, it exits this loop only upon receiving a terminate signal or the batch run timeout. + terminated = False + while not terminated: + self._processes_manager.ensure_healthy() + # Get task from task_queue + data = self._get_task_from_queue(task_queue) + # Calculate the line timeout for the current line. + # If the line_timeout_sec is None, it means the batch run is timeouted. + line_timeout_sec = self._calculate_line_timeout_sec() + # If the task is a terminate signal or the batch run is timeouted, exit the loop. + if data == ProcessPoolConstants.TERMINATE_SIGNAL or line_timeout_sec is None: + bulk_logger.info(f"The thread monitoring the process [{process_id}-{process_name}] will be terminated.") + # Put the terminate signal into the input queue to notify the sub process to exit. + input_queue.put(ProcessPoolConstants.TERMINATE_SIGNAL) + # End the process if found the terminate signal. + self._processes_manager.end_process(index) + # In fork mode, the main process and the sub spawn process communicate through _process_info. + # We need to ensure the process has been killed before returning. Otherwise, it may cause + # the main process have exited but the spawn process is still alive. + # At this time, a connection error will be reported. + self._processes_manager.ensure_process_terminated_within_timeout(process_id) + # Set terminated to True to exit the main loop. + terminated = True + else: + # If the task is a line execution request, put the request into the input queue. + run_id, line_number, inputs = data + args = (run_id, line_number, inputs, line_timeout_sec) + input_queue.put(args) + + if terminated: + break + + start_time = datetime.utcnow() + completed = False + crashed = False + returned_node_run_infos = {} + + self._processing_idx[line_number] = format_current_process_info(process_name, process_id, line_number) + log_process_status(process_name, process_id, line_number) + # Responsible for checking the output queue messages and processing them within a specified timeout period. + while not self._line_timeout_expired(start_time, line_timeout_sec=line_timeout_sec): + # Monitor process aliveness. + crashed = not self._processes_manager.is_process_alive(process_id) + if crashed: + break + + # Handle output queue message. + message = self._handle_output_queue_messages(output_queue) + if isinstance(message, LineResult): + result_dict[line_number] = message + completed = True + break + if isinstance(message, NodeRunInfo): + returned_node_run_infos[message.node] = message + + # Handle line execution completed. + if completed: + self._completed_idx[line_number] = format_current_process_info(process_name, process_id, line_number) + log_process_status(process_name, process_id, line_number, is_completed=True) + # Handle line execution is not completed. + else: + ex = None + # Handle process crashed. + if crashed: + bulk_logger.warning(f"Process crashed while executing line {line_number}.") + log_path = get_subprocess_log_path(index) + # In fork mode, if the child process fails to start, its error information + # will be written to the parent process log file. + # So if 'log_errors_form_path' return 'false', it means the child process fails to start. + # Attempt read the parent process log file. + if not log_errors_from_file(log_path) and self._use_fork: + log_path = get_manager_process_log_path() + log_errors_from_file(log_path) + ex = ProcessCrashError(line_number) + elif self._line_timeout_expired(start_time, line_timeout_sec=line_timeout_sec): + # Handle line execution timeout. + bulk_logger.warning(f"Line {line_number} timeout after {line_timeout_sec} seconds.") + if line_timeout_sec < self._line_timeout_sec: + # If execution times out with a timeout lower than the default (self._line_timeout_sec), + # it indicates the _batch_timeout_sec has been reached. + # We should use the exception of BatchExecutionTimeoutError. + ex = BatchExecutionTimeoutError(line_number, self._batch_timeout_sec) + else: + ex = LineExecutionTimeoutError(line_number, line_timeout_sec) + else: + # This branch should not be reached, add this warning for the case. + msg = f"Unexpected error occurred while monitoring line execution at line {line_number}." + bulk_logger.warning(msg) + ex = UnexpectedError(msg) + + result = self._generate_line_result_for_exception( + inputs, + run_id, + line_number, + self._flow_id, + start_time, + ex, + returned_node_run_infos, + ) + result_dict[line_number] = result + + self._completed_idx[line_number] = format_current_process_info(process_name, process_id, line_number) + log_process_status(process_name, process_id, line_number, is_failed=True) + + self._processes_manager.restart_process(index) + # We need to ensure the process has been killed before continuing to execute. + # Otherwise the process will receive new task, and during the execution, the process + # is killed, which will result in the 'ProcessCrashError'. + self._processes_manager.ensure_process_terminated_within_timeout(process_id) + index, process_id, process_name = self._processes_manager.get_process_info(index) + + self._processing_idx.pop(line_number) + + # endregion + + # region private methods + def _delete_log_files(self): + try: + shutil.rmtree(ProcessPoolConstants.PROCESS_LOG_PATH) + except Exception as e: + bulk_logger.warning(f"Failed to delete the folder, exception: {e}") + + def _get_task_from_queue(self, task_queue: Queue): + """Get task from the task queue. Ignore the queue being empty and only exit the loop when getting data.""" + while True: + try: + return task_queue.get(timeout=1) + except queue.Empty: + pass + + def _all_tasks_ready(self): + return all(async_task.ready() for async_task in self._async_tasks) + + def _terminate_tasks(self): + if self._all_tasks_ready(): + return + # Put n (equal to processes number) terminate signals to the task queue to ensure each thread receives one. + for _ in range(self._n_process): + self._task_queue.put(ProcessPoolConstants.TERMINATE_SIGNAL) + + def _determine_worker_count(self, worker_count): + # Starting a new process in non-fork mode requires to allocate memory. + # Calculate the maximum number of processes based on available memory to avoid memory bursting. + estimated_available_worker_count = get_available_max_worker_count() if not self._use_fork else None + + # If the environment variable PF_WORKER_COUNT exists and valid, use the value as the worker_count. + if worker_count is not None and worker_count > 0: + bulk_logger.info(f"Set process count to {worker_count}.") + if estimated_available_worker_count is not None and estimated_available_worker_count < worker_count: + bulk_logger.warning( + f"The current process count ({worker_count}) is larger than recommended process count " + f"({estimated_available_worker_count}) that estimated by system available memory. This may " + f"cause memory exhaustion" + ) + return worker_count + + # If the environment variable PF_WORKER_COUNT is not set or invalid, take the minimum value among the + # factors: default_worker_count, row_count and estimated_worker_count_based_on_memory_usage + factors = { + "default_worker_count": self._DEFAULT_WORKER_COUNT, + "row_count": self._nlines, + "estimated_worker_count_based_on_memory_usage": estimated_available_worker_count, + } + + valid_factors = {k: v for k, v in factors.items() if v is not None and v > 0} + + # Take the minimum value as the result + worker_count = min(valid_factors.values()) + bulk_logger.info( + f"Set process count to {worker_count} by taking the minimum value among the factors of {valid_factors}." + ) + return worker_count + + def _calculate_line_timeout_sec(self): + """Calculate the line timeout for the current line.""" + line_timeout_sec = self._line_timeout_sec + if self._batch_timeout_sec: + remaining_execution_time = int( + round(self._batch_timeout_sec - (datetime.utcnow() - self._batch_start_time).total_seconds()) + ) + if remaining_execution_time <= 0: + self._is_timeout = True + return None + line_timeout_sec = min(line_timeout_sec, remaining_execution_time) + return line_timeout_sec + + def _monitor_thread_pool_status(self): + try: + for async_task in self._async_tasks: + if not async_task.ready(): + continue + # To ensure exceptions in thread-pool calls are propagated to the main process for proper handling + # The exceptions raised will be re-raised by the get() method. + # Related link: + # https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.AsyncResult + async_task.get() + except PromptflowException: + raise + except Exception as e: + raise ThreadCrashError( + target=ErrorTarget.BATCH, + message_format="The monitor thread in the process pool crashed. Error: {error_type_and_message}.", + error_type_and_message=f"({e.__class__.__name__}) {e}", + ) from e + + def _generate_thread_status_messages(self, pool: ThreadPool, total_count: int): + msgs = [] + active_threads = sum(thread.is_alive() for thread in pool._pool) + msgs.append(f"[Process Pool] [Active processes: {active_threads} / {len(pool._pool)}]") + processing_lines_copy = self._processing_idx.copy() + completed_lines_copy = self._completed_idx.copy() + msgs.append( + f"[Lines] [Finished: {len(completed_lines_copy)}] [Processing: {len(processing_lines_copy)}] " + f"[Pending: {total_count - len(processing_lines_copy) - len(completed_lines_copy)}]" + ) + lines = [] + for idx, thread_name in sorted(processing_lines_copy.items()): + lines.append(f"line {idx} ({thread_name})") + if len(lines) > 0: + msgs.append("Processing Lines: " + ", ".join(lines) + ".") + return msgs + + def _is_batch_run_completed(self): + return len(self._result_dict) == self._nlines + + def _batch_timeout_expired(self, start_time: datetime) -> bool: + if self._batch_timeout_sec is None: + return False + return self._timeout_expired(start_time, self._batch_timeout_sec + 10) + + def _line_timeout_expired(self, start_time: datetime, line_timeout_sec: int = None, buffer_sec: int = 10) -> bool: + # Here we add more seconds (buffer_sec) because of the following reasons: + # 1. At the last second, there would be several timeout message from exec_line. + # 2. It may take time to create worker so actual timeout time may be longer. + # 3. When using submit function to submit one line, the buffer_sec should be + # larger than the monitor thread's internal buffer time. + line_timeout_sec = line_timeout_sec or self._line_timeout_sec + return self._timeout_expired(start_time, line_timeout_sec + buffer_sec) + + def _timeout_expired(self, start_time: datetime, timeout_sec: int) -> bool: + return (datetime.utcnow() - start_time).total_seconds() > timeout_sec + + def _handle_output_queue_messages(self, output_queue: Queue): + try: + message = output_queue.get(timeout=1) + if isinstance(message, LineResult): + message = self._process_multimedia(message) + return message + elif isinstance(message, FlowRunInfo): + self._storage.persist_flow_run(message) + return message + elif isinstance(message, NodeRunInfo): + self._storage.persist_node_run(message) + return message + except queue.Empty: + pass + return None + + def _process_multimedia(self, result: LineResult) -> LineResult: + """Replace multimedia data in line result with string place holder to + prevent OOM and persist multimedia data in output when batch running.""" + if not self._output_dir: + return result + # Serialize multimedia data in flow run info to string + self._serialize_multimedia(result.run_info) + # Serialize multimedia data in node run infos to string + for node_run_info in result.node_run_infos.values(): + self._serialize_multimedia(node_run_info) + # Persist multimedia data in the aggregation_inputs of line result to output_dir + # if _serialize_multimedia_during_execution is True. + if self._serialize_multimedia_during_execution: + result.aggregation_inputs = self._multimedia_processor.persist_multimedia_data( + result.aggregation_inputs, Path(mkdtemp()), use_absolute_path=True + ) + # Persist multimedia data in the outputs of line result to output_dir + result.output = self._multimedia_processor.persist_multimedia_data(result.output, self._output_dir) + return result + + def _serialize_multimedia(self, run_info: Union[FlowRunInfo, NodeRunInfo]): + if run_info.inputs: + run_info.inputs = self._multimedia_processor.convert_multimedia_data_to_string(run_info.inputs) + + if run_info.output: + serialized_output = self._multimedia_processor.convert_multimedia_data_to_string(run_info.output) + run_info.output = serialized_output + run_info.result = None + + # The `inplace=True` parameter is used here to ensure that the original list structure holding generator outputs + # is maintained. This allows us to keep tracking the list as it dynamically changes when the generator is + # consumed. It is crucial to process the api_calls list in place to avoid losing the reference to the list that + # holds the generator items, which is essential for tracing generator execution. + if run_info.api_calls: + run_info.api_calls = self._multimedia_processor.convert_multimedia_data_to_string( + run_info.api_calls, inplace=True + ) + + def _generate_line_result_for_exception( + self, + inputs, + run_id, + line_number, + flow_id, + start_time, + ex, + node_run_infos={}, + ) -> LineResult: + bulk_logger.error(f"Line {line_number}, Process {os.getpid()} failed with exception: {ex}") + run_info = FlowRunInfo( + run_id=f"{run_id}_{line_number}", + status=Status.Failed, + error=ExceptionPresenter.create(ex).to_dict(include_debug_info=True), + inputs=inputs, + output=None, + metrics=None, + request=None, + parent_run_id=run_id, + root_run_id=run_id, + source_run_id=None, + flow_id=flow_id, + start_time=start_time, + end_time=datetime.utcnow(), + index=line_number, + ) + result = LineResult( + output={}, + aggregation_inputs={}, + run_info=run_info, + node_run_infos=node_run_infos, + ) + # TODO: There is a corner case that the run info is persisted in the subprocess when timeouted, + # while we also persist the run info here. This may cause duplicate run info in the storage. + # We need to find a way to avoid this. + self._storage.persist_flow_run(result.run_info) + return result + + # endregion + + +# region process target functions + + +def _process_wrapper( + executor_creation_func, + output_dir: Path, + serialize_multimedia: bool, + input_queue: Queue, + output_queue: Queue, + log_context_initialization_func, + operation_contexts_dict: dict, + i: int, +): + ProcessPoolConstants.PROCESS_LOG_PATH.mkdir(parents=True, exist_ok=True) + log_path = get_subprocess_log_path(i) + sys.stderr = open(log_path, "w") + + if threading.current_thread() is threading.main_thread(): + signal.signal(signal.SIGINT, signal_handler) + else: + bulk_logger.info("Current thread is not main thread, skip signal handler registration in batch process pool.") + OperationContext.get_instance().update(operation_contexts_dict) # Update the operation context for the new process. + + _exec_line_for_queue( + executor_creation_func, + output_dir, + serialize_multimedia, + input_queue, + output_queue, + log_context_initialization_func, + ) + + +def signal_handler(signum, frame): + signame = signal.Signals(signum).name + bulk_logger.info("Execution stopping. Handling signal %s (%s)", signame, signum) + try: + process = psutil.Process(os.getpid()) + bulk_logger.info("Successfully terminated process with pid %s", process.pid) + process.terminate() + except Exception: + bulk_logger.warning("Error when handling execution stop signal", exc_info=True) + finally: + sys.exit(1) + + +def _exec_line_for_queue( + executor_creation_func, + output_dir: Path, + serialize_multimedia: bool, + input_queue: Queue, + output_queue: Queue, + log_context_initialization_func: Optional[Callable] = None, +): + run_storage = ( + ServiceQueueRunStorage(output_queue, output_dir) if serialize_multimedia else QueueRunStorage(output_queue) + ) + executor: FlowExecutor = executor_creation_func(storage=run_storage) + + while True: + try: + data = input_queue.get(timeout=1) + if data == ProcessPoolConstants.TERMINATE_SIGNAL: + # Set logger context for terminate signal without line_number. + with log_context_initialization_func() if log_context_initialization_func else nullcontext(): + bulk_logger.info(f"The process [{os.getpid()}] has received a terminate signal.") + # Add try catch in case of shutdown method is not implemented in the tracer provider. + try: + import opentelemetry.trace as otel_trace + + # Meet span missing issue when end process normally (even add wait() when end it). + # Shutdown the tracer provider to flush the remaining spans. + # The tracer provider is created for each process, so it's ok to shutdown it here. + otel_trace.get_tracer_provider().shutdown() + except Exception as e: + bulk_logger.warning(f"Error occurred while shutting down tracer provider: {e}") + + # If found the terminate signal, exit the process. + break + run_id, line_number, inputs, line_timeout_sec = data + # Set logger context for each line execution. Because we also need to record line logs in batch run. + with log_context_initialization_func( + line_number=line_number + ) if log_context_initialization_func else nullcontext(): + result = _exec_line( + executor=executor, + output_queue=output_queue, + inputs=inputs, + run_id=run_id, + index=line_number, + line_timeout_sec=line_timeout_sec, + ) + output_queue.put(result) + except queue.Empty: + # Do nothing until the input_queue have content or process is killed + # TODO: Exit the process more gracefully. + pass + + +def _exec_line( + executor: FlowExecutor, output_queue: Queue, *, inputs: dict, run_id: str, index: int, line_timeout_sec: int +): + try: + line_result = executor.exec_line( + inputs=inputs, + run_id=run_id, + index=index, + node_concurrency=DEFAULT_CONCURRENCY_BULK, + line_timeout_sec=line_timeout_sec, + ) + if line_result is not None: + # For eager flow, the output may be a dataclass which is not picklable, we need to convert it to dict. + if not isinstance(line_result.output, dict): + line_result.output = convert_eager_flow_output_to_dict(line_result.output) + line_result.output.pop(LINE_NUMBER_KEY, None) + # TODO: Put serialized line result into queue to catch serialization error beforehand. + # Otherwise it might cause the process to hang, e.g, line failed because output is not seralizable. + if line_result is not None and line_result.run_info.status == Status.Failed: + line_result.output = {} + return line_result + except Exception as e: + bulk_logger.error(f"Line {index}, Process {os.getpid()} failed with exception: {e}") + flow_id = executor._flow_id + line_run_id = run_id if index is None else f"{run_id}_{index}" + message_format = executor._message_format + # If line execution failed before start, there is no flow information in the run_tracker. + # So we call start_flow_run before handling exception to make sure the run_tracker has flow info. + if isinstance(executor, ScriptExecutor): + run_tracker = RunTracker(executor._storage) + else: + run_tracker = executor._run_tracker + run_tracker.start_flow_run(flow_id, run_id, line_run_id, run_id, index=index, message_format=message_format) + run_info = run_tracker.end_run(f"{run_id}_{index}", ex=e) + output_queue.put(run_info) + result = LineResult( + output={}, + aggregation_inputs={}, + run_info=run_info, + node_run_infos={}, + ) + return result + + +# endregion + + +# region utils function + + +def log_process_status(process_name, pid, line_number: int, is_completed=False, is_failed=False): + process_info = format_current_process_info(process_name, pid, line_number) + if is_completed: + bulk_logger.info(f"{process_info} completed.") + elif is_failed: + bulk_logger.info(f"{process_info} failed.") + else: + bulk_logger.info(f"{process_info} start execution.") + + +def format_current_process_info(process_name, pid, line_number: int): + return f"Process name({process_name})-Process id({pid})-Line number({line_number})" + + +# endregion diff --git a/src/promptflow/promptflow/executor/_process_manager.py b/src/promptflow-core/promptflow/executor/_process_manager.py similarity index 72% rename from src/promptflow/promptflow/executor/_process_manager.py rename to src/promptflow-core/promptflow/executor/_process_manager.py index 1e8d31d3cad..ef2c1e550f3 100644 --- a/src/promptflow/promptflow/executor/_process_manager.py +++ b/src/promptflow-core/promptflow/executor/_process_manager.py @@ -1,18 +1,29 @@ import multiprocessing import queue import signal +import sys +import time from dataclasses import dataclass from enum import Enum from functools import partial -from multiprocessing import Queue -from typing import List +from multiprocessing import Process, Queue +from pathlib import Path +from typing import Dict, List import psutil -from promptflow._core.operation_context import OperationContext +from promptflow._core.run_tracker import RunTracker from promptflow._utils.logger_utils import LogContext, bulk_logger -from promptflow.executor._errors import SpawnedForkProcessManagerStartFailure +from promptflow._utils.process_utils import get_manager_process_log_path, get_subprocess_log_path, log_errors_from_file +from promptflow.executor._errors import ( + ProcessInfoObtainedTimeout, + ProcessTerminatedTimeout, + SpawnedForkProcessManagerStartFailure, +) +from promptflow.executor._script_executor import ScriptExecutor from promptflow.executor.flow_executor import FlowExecutor +from promptflow.storage import AbstractRunStorage +from promptflow.tracing._operation_context import OperationContext @dataclass @@ -22,10 +33,18 @@ class ProcessInfo: process_name: str +class ProcessPoolConstants: + PROCESS_LOG_PATH = Path("process_log") + PROCESS_LOG_NAME = "process_stderr" + MANAGER_PROCESS_LOG_NAME = "manager_process_stderr.log" + TERMINATE_SIGNAL = "terminate" + + class ProcessControlSignal(str, Enum): START = "start" RESTART = "restart" END = "end" + SPAWNED_MANAGER_END = "spawned_manager_end" class AbstractProcessManager: @@ -47,22 +66,29 @@ class AbstractProcessManager: :type raise_ex: bool """ + _PROCESS_TERMINATED_TIMEOUT = 60 + _PROCESS_INFO_OBTAINED_TIMEOUT = 60 + def __init__( self, input_queues: List[Queue], output_queues: List[Queue], process_info: dict, process_target_func, + output_dir: Path = None, + serialize_multimedia: bool = False, *args, **kwargs, ) -> None: self._input_queues = input_queues self._output_queues = output_queues - self._process_info = process_info + self._process_info: Dict[int, ProcessInfo] = process_info self._process_target_func = process_target_func current_log_context = LogContext.get_current() self._log_context_initialization_func = current_log_context.get_initializer() if current_log_context else None self._current_operation_context = OperationContext.get_instance().get_context_dict() + self._output_dir = output_dir + self._serialize_multimedia = serialize_multimedia def new_process(self, i): """ @@ -80,7 +106,8 @@ def restart_process(self, i): :param i: Index of the process to restart. :type i: int """ - raise NotImplementedError("AbstractProcessManager is an abstract class, no implementation for restart_process.") + self.end_process(i) + self.new_process(i) def end_process(self, i): """ @@ -89,7 +116,11 @@ def end_process(self, i): :param i: Index of the process to terminate. :type i: int """ - raise NotImplementedError("AbstractProcessManager is an abstract class, no implementation for end_process.") + try: + pid = self._process_info[i].process_id + self._terminate_process(i, pid) + finally: + self._process_info.pop(i) def ensure_healthy(self): """ @@ -99,6 +130,64 @@ def ensure_healthy(self): """ raise NotImplementedError("AbstractProcessManager is an abstract class, no implementation for end_process.") + def get_process_info(self, index): + start_time = time.time() + while True: + self.ensure_healthy() + try: + if time.time() - start_time > self._PROCESS_INFO_OBTAINED_TIMEOUT: + log_path = get_subprocess_log_path(index) + if not log_errors_from_file(log_path): + log_path = get_manager_process_log_path() + log_errors_from_file(log_path) + raise ProcessInfoObtainedTimeout(self._PROCESS_INFO_OBTAINED_TIMEOUT) + # Try to get process id and name from the process_info + process_id = self._process_info[index].process_id + process_name = self._process_info[index].process_name + return (index, process_id, process_name) + except KeyError: + # If the process_info does not exist for the given index, it means the process have not ready yet, + # try again. + time.sleep(1) + continue + except Exception as e: + raise Exception(f"Unexpected error occurred while get process info. Exception: {e}") + + def ensure_process_terminated_within_timeout(self, process_id): + start_time = time.time() + while psutil.pid_exists(process_id): + if time.time() - start_time > self._PROCESS_TERMINATED_TIMEOUT: + raise ProcessTerminatedTimeout(self._PROCESS_TERMINATED_TIMEOUT) + time.sleep(1) + + def ensure_all_processes_terminated(self): + for i, info in self._process_info.items(): + self._terminate_process(i, info.process_id) + + def is_process_alive(self, process_id): + return psutil.pid_exists(process_id) + + def _terminate_process(self, i, pid): + warning_msg = "Unexpected error occurred while end process for index {i} and process id {pid}. Exception: {e}" + try: + process = psutil.Process(pid) + # The subprocess will get terminate signal from input queue, so we need to wait for the process to exit. + # If the process is still running after 10 seconds, it will raise psutil.TimeoutExpired exception. + process.wait(timeout=10) + bulk_logger.info(f"Process {pid} terminated.") + except psutil.NoSuchProcess: + bulk_logger.warning(f"Process {pid} had been terminated.") + except psutil.TimeoutExpired: + try: + # If the process is still running after waiting 10 seconds, terminate it. + process.terminate() + process.wait() + bulk_logger.info(f"Process {pid} terminated.") + except Exception as e: + bulk_logger.warning(warning_msg.format(i=i, pid=pid, e=e)) + except Exception as e: + bulk_logger.warning(warning_msg.format(i=i, pid=pid, e=e)) + class SpawnProcessManager(AbstractProcessManager): """ @@ -133,10 +222,13 @@ def new_process(self, i): target=self._process_target_func, args=( self._executor_creation_func, + self._output_dir, + self._serialize_multimedia, self._input_queues[i], self._output_queues[i], self._log_context_initialization_func, self._current_operation_context, + i, ), # Set the process as a daemon process to automatically terminated and release system resources # when the main process exits. @@ -157,47 +249,6 @@ def new_process(self, i): ) return process - def restart_process(self, i): - """ - Restarts a specified process by first terminating it then creating a new one. - - :param i: Index of the process to restart. - :type i: int - """ - self.end_process(i) - self.new_process(i) - - def end_process(self, i): - """ - Terminates a specified process. - - :param i: Index of the process to terminate. - :type i: int - """ - warning_msg = ( - "Unexpected error occurred while end process for index {i} and process id {pid}. " - "Exception: {e}" - ) - try: - pid = self._process_info[i].process_id - process = psutil.Process(pid) - # The subprocess will get terminate signal from input queue, so we need to wait for the process to exit. - # If the process is still running after 10 seconds, it will raise psutil.TimeoutExpired exception. - process.wait(timeout=10) - except psutil.NoSuchProcess: - bulk_logger.warning(f"Process {pid} had been terminated.") - except psutil.TimeoutExpired: - try: - # If the process is still running after waiting 10 seconds, terminate it. - process.terminate() - process.wait() - except Exception as e: - bulk_logger.warning(warning_msg.format(i=i, pid=pid, e=e)) - except Exception as e: - bulk_logger.warning(warning_msg.format(i=i, pid=pid, e=e)) - finally: - self._process_info.pop(i) - def ensure_healthy(self): """ Checks the health of the managed processes. @@ -235,6 +286,8 @@ def __init__(self, control_signal_queue: Queue, flow_create_kwargs, *args, **kwa super().__init__(*args, **kwargs) self._control_signal_queue = control_signal_queue self._flow_create_kwargs = flow_create_kwargs + # Use _kwargs to temporarily store all common kwargs and pass them to SpawnedForkProcessManager + self._kwargs = kwargs def start_processes(self): """ @@ -246,13 +299,10 @@ def start_processes(self): args=( self._log_context_initialization_func, self._current_operation_context, - self._input_queues, - self._output_queues, self._control_signal_queue, self._flow_create_kwargs, - self._process_info, - self._process_target_func, ), + kwargs=self._kwargs, ) process.start() self._spawned_fork_process_manager_pid = process.pid @@ -290,6 +340,13 @@ def ensure_healthy(self): # The normal state of the spawned process is 'running'. If the process does not start successfully # or exit unexpectedly, its state will be 'zombie'. if psutil.Process(self._spawned_fork_process_manager_pid).status() == "zombie": + log_path = get_manager_process_log_path() + try: + with open(log_path, "r") as f: + error_logs = "".join(f.readlines()) + bulk_logger.error(error_logs) + except FileNotFoundError: + pass bulk_logger.error("The spawned fork process manager failed to start.") ex = SpawnedForkProcessManagerStartFailure() raise ex @@ -334,14 +391,17 @@ def new_process(self, i): :param i: Index of the input and output queue for the new process. :type i: int """ - process = self.context.Process( + process: Process = self.context.Process( target=self._process_target_func, args=( self._executor_creation_func, + self._output_dir, + self._serialize_multimedia, self._input_queues[i], self._output_queues[i], self._log_context_initialization_func, self._current_operation_context, + i, ), daemon=True, ) @@ -359,47 +419,6 @@ def new_process(self, i): ) return process - def end_process(self, i): - """ - Terminates a specified process. - - :param i: Index of the process to terminate. - :type i: int - """ - warning_msg = ( - "Unexpected error occurred while end process for index {i} and process id {pid}. " - "Exception: {e}" - ) - try: - pid = self._process_info[i].process_id - process = psutil.Process(pid) - # The subprocess will get terminate signal from input queue, so we need to wait for the process to exit. - # If the process is still running after 10 seconds, it will raise psutil.TimeoutExpired exception. - process.wait(timeout=10) - except psutil.NoSuchProcess: - bulk_logger.warning(f"Process {pid} had been terminated.") - except psutil.TimeoutExpired: - try: - # If the process is still running after waiting 10 seconds, terminate it. - process.terminate() - process.wait() - except Exception as e: - bulk_logger.warning(warning_msg.format(i=i, pid=pid, e=e)) - except Exception as e: - bulk_logger.warning(warning_msg.format(i=i, pid=pid, e=e)) - finally: - self._process_info.pop(i) - - def restart_process(self, i): - """ - Restarts a specified process by first terminating it then creating a new one. - - :param i: Index of the process to restart. - :type i: int - """ - self.end_process(i) - self.new_process(i) - def handle_signals(self, control_signal, i): """ Handles control signals for processes, performing actions such as starting, ending, @@ -422,19 +441,20 @@ def handle_signals(self, control_signal, i): def create_spawned_fork_process_manager( log_context_initialization_func, current_operation_context, - input_queues, - output_queues, control_signal_queue, flow_create_kwargs, - process_info, - process_target_func, + **kwargs, ): + ProcessPoolConstants.PROCESS_LOG_PATH.mkdir(parents=True, exist_ok=True) + log_path = get_manager_process_log_path() + sys.stderr = open(log_path, "w") + """ Manages the creation, termination, and signaling of processes using the 'fork' context. """ # Set up signal handling for process interruption. - from promptflow.executor._line_execution_process_pool import create_executor_fork, signal_handler + from promptflow.executor._line_execution_process_pool import signal_handler signal.signal(signal.SIGINT, signal_handler) @@ -443,29 +463,24 @@ def create_spawned_fork_process_manager( # When using fork, we use this method to create the executor to avoid reloading the flow # which will introduce a lot more memory. - executor_creation_func = partial(create_executor_fork, flow_executor=executor) + executor_creation_func = partial(_create_executor_fork, flow_executor=executor) manager = SpawnedForkProcessManager( log_context_initialization_func, current_operation_context, control_signal_queue, executor_creation_func, - input_queues, - output_queues, - process_info, - process_target_func, + **kwargs, ) # Initialize processes. - for i in range(len(input_queues)): + for i in range(len(manager._input_queues)): manager.new_process(i) # Main loop to handle control signals and manage process lifecycle. while True: - all_processes_stopped = True - try: - process_info_list = process_info.items() + process_info_list = manager._process_info.items() except Exception as e: bulk_logger.warning(f"Unexpected error occurred while get process info list. Exception: {e}") break @@ -475,20 +490,41 @@ def create_spawned_fork_process_manager( # Check if at least one process is alive. if psutil.pid_exists(pid): process = psutil.Process(pid) - if process.status() != "zombie": - all_processes_stopped = False - else: + if process.status() == "zombie": # If do not call wait(), the child process may become a zombie process, # and psutil.pid_exists(pid) is always true, which will cause spawn proces # never exit. process.wait() - # If all fork child processes exit, exit the loop. - if all_processes_stopped: - break try: control_signal, i = control_signal_queue.get(timeout=1) - manager.handle_signals(control_signal, i) + # Exit the spawned process manager. + if control_signal == ProcessControlSignal.SPAWNED_MANAGER_END and i is True: + break + else: + manager.handle_signals(control_signal, i) except queue.Empty: # Do nothing until the process_queue have not content or process is killed pass + + +def _create_executor_fork(*, flow_executor: FlowExecutor, storage: AbstractRunStorage): + if isinstance(flow_executor, ScriptExecutor): + return ScriptExecutor( + flow_file=flow_executor._flow_file, + connections=flow_executor._connections, + working_dir=flow_executor._working_dir, + storage=storage, + init_kwargs=flow_executor._init_kwargs, + ) + else: + run_tracker = RunTracker(run_storage=storage) + return FlowExecutor( + flow=flow_executor._flow, + connections=flow_executor._connections, + run_tracker=run_tracker, + cache_manager=flow_executor._cache_manager, + loaded_tools=flow_executor._loaded_tools, + raise_ex=False, + line_timeout_sec=flow_executor._line_timeout_sec, + ) diff --git a/src/promptflow/promptflow/executor/_result.py b/src/promptflow-core/promptflow/executor/_result.py similarity index 100% rename from src/promptflow/promptflow/executor/_result.py rename to src/promptflow-core/promptflow/executor/_result.py diff --git a/src/promptflow/promptflow/executor/_script_executor.py b/src/promptflow-core/promptflow/executor/_script_executor.py similarity index 60% rename from src/promptflow/promptflow/executor/_script_executor.py rename to src/promptflow-core/promptflow/executor/_script_executor.py index 191ceac995b..e84c88fb3f5 100644 --- a/src/promptflow/promptflow/executor/_script_executor.py +++ b/src/promptflow-core/promptflow/executor/_script_executor.py @@ -1,15 +1,19 @@ import asyncio +import dataclasses import importlib import inspect import uuid +from dataclasses import is_dataclass from pathlib import Path -from typing import Any, Callable, Mapping, Optional +from types import GeneratorType +from typing import Any, Callable, Dict, Mapping, Optional -from promptflow._constants import LINE_NUMBER_KEY +from promptflow._constants import LINE_NUMBER_KEY, MessageFormatType from promptflow._core.run_tracker import RunTracker from promptflow._core.tool_meta_generator import PythonLoadError from promptflow._utils.dataclass_serializer import convert_eager_flow_output_to_dict from promptflow._utils.logger_utils import logger +from promptflow._utils.multimedia_utils import BasicMultimediaProcessor from promptflow._utils.tool_utils import function_to_interface from promptflow._utils.yaml_utils import load_yaml from promptflow.contracts.flow import Flow @@ -19,6 +23,7 @@ from promptflow.tracing._trace import _traced from promptflow.tracing._tracer import Tracer +from ._errors import FlowEntryInitializationError from .flow_executor import FlowExecutor @@ -30,10 +35,13 @@ def __init__( working_dir: Optional[Path] = None, *, storage: Optional[AbstractRunStorage] = None, + init_kwargs: Optional[Dict[str, Any]] = None, ): logger.debug(f"Start initializing the executor with {flow_file}.") + logger.debug(f"Init params for script executor: {init_kwargs}") self._flow_file = flow_file + self._init_kwargs = init_kwargs or {} self._working_dir = Flow._resolve_working_dir(flow_file, working_dir) self._initialize_function() self._connections = connections @@ -41,23 +49,31 @@ def __init__( self._flow_id = "default_flow_id" self._log_interval = 60 self._line_timeout_sec = 600 + self._message_format = MessageFormatType.BASIC + self._multimedia_processor = BasicMultimediaProcessor() def exec_line( self, inputs: Mapping[str, Any], index: Optional[int] = None, run_id: Optional[str] = None, + allow_generator_output: bool = False, **kwargs, ) -> LineResult: run_id = run_id or str(uuid.uuid4()) with self._update_operation_context(run_id, index): - return self._exec_line(inputs, index, run_id) + return self._exec_line(inputs, index, run_id, allow_generator_output=allow_generator_output) def _exec_line( - self, inputs: Mapping[str, Any], index: Optional[int] = None, run_id: Optional[str] = None + self, + inputs: Mapping[str, Any], + index: Optional[int] = None, + run_id: Optional[str] = None, + allow_generator_output: bool = False, ) -> LineResult: line_run_id = run_id if index is None else f"{run_id}_{index}" run_tracker = RunTracker(self._storage) + run_tracker.allow_generator_types = allow_generator_output run_info = run_tracker.start_flow_run( flow_id=self._flow_id, root_run_id=run_id, @@ -65,6 +81,7 @@ def _exec_line( parent_run_id=run_id, inputs=inputs, index=index, + message_format=self._message_format, ) # Executor will add line_number to batch inputs if there is no line_number in the original inputs, # which should be removed, so, we only preserve the inputs that are contained in self._inputs. @@ -77,6 +94,7 @@ def _exec_line( output = asyncio.run(self._func(**inputs)) else: output = self._func(**inputs) + output = self._stringify_generator_output(output) if not allow_generator_output else output traces = Tracer.end_tracing(line_run_id) # Should convert output to dict before storing it to run info, since we will add key 'line_number' to it, # so it must be a dict. @@ -94,18 +112,55 @@ def _exec_line( line_result.output[LINE_NUMBER_KEY] = index return line_result + def _stringify_generator_output(self, output): + if isinstance(output, dict): + return super()._stringify_generator_output(output) + elif is_dataclass(output): + fields = dataclasses.fields(output) + for field in fields: + if isinstance(getattr(output, field.name), GeneratorType): + consumed_values = "".join(str(chuck) for chuck in getattr(output, field.name)) + setattr(output, field.name, consumed_values) + else: + if isinstance(output, GeneratorType): + output = "".join(str(chuck) for chuck in output) + return output + def enable_streaming_for_llm_flow(self, stream_required: Callable[[], bool]): - # TODO(2901157): check if eager mode should have streaming + # no need to inject streaming here, user can directly pass the param to the function return def get_inputs_definition(self): return self._inputs def _initialize_function(self): - module_name, func_name = self._parse_flow_file() - module = importlib.import_module(module_name) + try: + module_name, func_name = self._parse_flow_file() + module = importlib.import_module(module_name) + except Exception as e: + raise PythonLoadError( + message_format="Failed to load python module for {entry_file}", + entry_file=self._flow_file, + ) from e func = getattr(module, func_name, None) - if func is None or not inspect.isfunction(func): + # check if func is a callable class + if inspect.isclass(func): + if hasattr(func, "__call__"): + logger.debug( + f"Python class entry '{func_name}' has __call__ method, initializing it with {self._init_kwargs}" + ) + try: + obj = func(**self._init_kwargs) + except Exception as e: + raise FlowEntryInitializationError(init_kwargs=self._init_kwargs) from e + func = getattr(obj, "__call__") + else: + raise PythonLoadError( + message_format="Python class entry '{func_name}' does not have __call__ method.", + func_name=func_name, + module_name=module_name, + ) + elif func is None or not inspect.isfunction(func): raise PythonLoadError( message_format="Failed to load python function '{func_name}' from file '{module_name}'.", func_name=func_name, diff --git a/src/promptflow/promptflow/executor/_service/apis/__init__.py b/src/promptflow-core/promptflow/executor/_service/__init__.py similarity index 100% rename from src/promptflow/promptflow/executor/_service/apis/__init__.py rename to src/promptflow-core/promptflow/executor/_service/__init__.py diff --git a/src/promptflow/promptflow/executor/_service/_errors.py b/src/promptflow-core/promptflow/executor/_service/_errors.py similarity index 74% rename from src/promptflow/promptflow/executor/_service/_errors.py rename to src/promptflow-core/promptflow/executor/_service/_errors.py index 0703e1a6d1a..38466487b75 100644 --- a/src/promptflow/promptflow/executor/_service/_errors.py +++ b/src/promptflow-core/promptflow/executor/_service/_errors.py @@ -2,10 +2,12 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from promptflow.exceptions import ErrorTarget, UserErrorException +from promptflow.exceptions import ErrorTarget, SystemErrorException, UserErrorException class FlowFilePathInvalid(UserErrorException): + """Exception raise when the flow file path is not an absolute path.""" + pass @@ -29,3 +31,9 @@ def __init__(self, run_id): run_id=run_id, target=ErrorTarget.EXECUTOR, ) + + +class UninitializedError(SystemErrorException): + """Exception raised when batch coordinator is not initialize.""" + + pass diff --git a/src/promptflow/promptflow/executor/_service/contracts/__init__.py b/src/promptflow-core/promptflow/executor/_service/apis/__init__.py similarity index 100% rename from src/promptflow/promptflow/executor/_service/contracts/__init__.py rename to src/promptflow-core/promptflow/executor/_service/apis/__init__.py diff --git a/src/promptflow-core/promptflow/executor/_service/apis/batch.py b/src/promptflow-core/promptflow/executor/_service/apis/batch.py new file mode 100644 index 00000000000..3ee3227bbfc --- /dev/null +++ b/src/promptflow-core/promptflow/executor/_service/apis/batch.py @@ -0,0 +1,62 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + + +from fastapi import APIRouter + +from promptflow._utils.logger_utils import service_logger +from promptflow.executor._service.contracts.batch_request import ( + AggregationRequest, + InitializationRequest, + LineExecutionRequest, +) +from promptflow.executor._service.utils.batch_coordinator import BatchCoordinator +from promptflow.executor._service.utils.service_utils import ( + get_log_context, + set_environment_variables, + update_and_get_operation_context, +) + +router = APIRouter() + + +@router.post("/initialize") +def initialize(request: InitializationRequest): + with get_log_context(request, enable_service_logger=True): + # validate request and get operation context + request.validate_request() + operation_context = update_and_get_operation_context(request.operation_context) + service_logger.info(f"Received batch init request, executor version: {operation_context.get_user_agent()}.") + # resolve environment variables + set_environment_variables(request) + # init batch coordinator to validate flow and create process pool + batch_coordinator = BatchCoordinator( + request.working_dir, + request.flow_file, + request.output_dir, + request.connections, + worker_count=request.worker_count, + line_timeout_sec=request.line_timeout_sec, + ) + batch_coordinator.start() + # return json response + return {"status": "initialized"} + + +@router.post("/execution") +async def execution(request: LineExecutionRequest): + return await BatchCoordinator.get_instance().exec_line(request) + + +@router.post("/aggregation") +def aggregation(request: AggregationRequest): + return BatchCoordinator.get_instance().exec_aggregation(request) + + +@router.post("/finalize") +def finalize(): + with BatchCoordinator.get_instance().get_log_context(): + service_logger.info("Received the finalize request.") + BatchCoordinator.get_instance().close() + return {"status": "finalized"} diff --git a/src/promptflow/promptflow/executor/_service/apis/common.py b/src/promptflow-core/promptflow/executor/_service/apis/common.py similarity index 82% rename from src/promptflow/promptflow/executor/_service/apis/common.py rename to src/promptflow-core/promptflow/executor/_service/apis/common.py index da8f99c3a93..c99129e3d84 100644 --- a/src/promptflow/promptflow/executor/_service/apis/common.py +++ b/src/promptflow-core/promptflow/executor/_service/apis/common.py @@ -6,7 +6,8 @@ from fastapi.responses import PlainTextResponse from promptflow._utils.feature_utils import get_feature_list -from promptflow.executor._service.utils.service_utils import get_executor_version +from promptflow.core._version import __version__ +from promptflow.executor._service.utils.service_utils import get_commit_id router = APIRouter() @@ -20,6 +21,7 @@ def health_check(): def version(): return { "status": "healthy", - "version": get_executor_version(), + "version": __version__, + "commit_id": get_commit_id(), "feature_list": get_feature_list(), } diff --git a/src/promptflow/promptflow/executor/_service/apis/execution.py b/src/promptflow-core/promptflow/executor/_service/apis/execution.py similarity index 98% rename from src/promptflow/promptflow/executor/_service/apis/execution.py rename to src/promptflow-core/promptflow/executor/_service/apis/execution.py index 995fe48609c..778dcdd55a4 100644 --- a/src/promptflow/promptflow/executor/_service/apis/execution.py +++ b/src/promptflow-core/promptflow/executor/_service/apis/execution.py @@ -15,6 +15,7 @@ from promptflow.executor._service.utils.process_manager import ProcessManager from promptflow.executor._service.utils.process_utils import invoke_sync_function_in_process from promptflow.executor._service.utils.service_utils import ( + enable_async_execution, get_log_context, set_environment_variables, update_and_get_operation_context, @@ -81,6 +82,7 @@ def flow_test(request: FlowExecutionRequest): request.validate_request() # resolve environment variables set_environment_variables(request) + enable_async_execution() # execute flow storage = DefaultRunStorage(base_dir=request.working_dir, sub_dir=request.output_dir) with get_log_context(request): diff --git a/src/promptflow/promptflow/executor/_service/apis/tool.py b/src/promptflow-core/promptflow/executor/_service/apis/tool.py similarity index 100% rename from src/promptflow/promptflow/executor/_service/apis/tool.py rename to src/promptflow-core/promptflow/executor/_service/apis/tool.py diff --git a/src/promptflow/promptflow/executor/_service/app.py b/src/promptflow-core/promptflow/executor/_service/app.py similarity index 89% rename from src/promptflow/promptflow/executor/_service/app.py rename to src/promptflow-core/promptflow/executor/_service/app.py index 1ff45e8f514..011266d3e76 100644 --- a/src/promptflow/promptflow/executor/_service/app.py +++ b/src/promptflow-core/promptflow/executor/_service/app.py @@ -5,6 +5,7 @@ from fastapi import FastAPI from fastapi.responses import JSONResponse +from promptflow.executor._service.apis.batch import router as batch_router from promptflow.executor._service.apis.common import router as common_router from promptflow.executor._service.apis.execution import router as execution_router from promptflow.executor._service.apis.tool import router as tool_router @@ -15,6 +16,7 @@ app.include_router(common_router) app.include_router(execution_router) app.include_router(tool_router) +app.include_router(batch_router) @app.exception_handler(Exception) diff --git a/src/promptflow/promptflow/executor/_service/utils/__init__.py b/src/promptflow-core/promptflow/executor/_service/contracts/__init__.py similarity index 100% rename from src/promptflow/promptflow/executor/_service/utils/__init__.py rename to src/promptflow-core/promptflow/executor/_service/contracts/__init__.py diff --git a/src/promptflow/promptflow/executor/_service/contracts/base_request.py b/src/promptflow-core/promptflow/executor/_service/contracts/base_request.py similarity index 100% rename from src/promptflow/promptflow/executor/_service/contracts/base_request.py rename to src/promptflow-core/promptflow/executor/_service/contracts/base_request.py diff --git a/src/promptflow-core/promptflow/executor/_service/contracts/batch_request.py b/src/promptflow-core/promptflow/executor/_service/contracts/batch_request.py new file mode 100644 index 00000000000..602e9eb6e47 --- /dev/null +++ b/src/promptflow-core/promptflow/executor/_service/contracts/batch_request.py @@ -0,0 +1,36 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from typing import Any, Mapping, Optional + +from promptflow._constants import LINE_TIMEOUT_SEC +from promptflow.contracts.run_mode import RunMode +from promptflow.executor._service.contracts.base_request import BaseRequest +from promptflow.executor._service.contracts.execution_request import BaseExecutionRequest + + +class InitializationRequest(BaseExecutionRequest): + """Request model for teh batch run initialization.""" + + worker_count: Optional[int] = None + line_timeout_sec: Optional[int] = LINE_TIMEOUT_SEC + + def get_run_mode(self): + return RunMode.Batch + + +class LineExecutionRequest(BaseRequest): + """Request model for line execution in the batch run.""" + + run_id: str + line_number: int + inputs: Mapping[str, Any] + + +class AggregationRequest(BaseRequest): + """Request model for executing aggregation nodes in the batch run.""" + + run_id: str + batch_inputs: Mapping[str, Any] + aggregation_inputs: Mapping[str, Any] diff --git a/src/promptflow/promptflow/executor/_service/contracts/execution_request.py b/src/promptflow-core/promptflow/executor/_service/contracts/execution_request.py similarity index 62% rename from src/promptflow/promptflow/executor/_service/contracts/execution_request.py rename to src/promptflow-core/promptflow/executor/_service/contracts/execution_request.py index d7fa6889ca4..fc7f286694a 100644 --- a/src/promptflow/promptflow/executor/_service/contracts/execution_request.py +++ b/src/promptflow-core/promptflow/executor/_service/contracts/execution_request.py @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +import os from pathlib import Path from typing import Any, Mapping, Optional @@ -13,7 +14,6 @@ class BaseExecutionRequest(BaseRequest): """Base request model for execution.""" - run_id: str working_dir: Path flow_file: Path output_dir: Path @@ -25,18 +25,35 @@ def get_run_mode(self): raise NotImplementedError(f"Request type {self.__class__.__name__} is not implemented.") def validate_request(self): - if self.flow_file.is_absolute(): + if not self.working_dir.is_absolute() or self.flow_file.is_absolute(): + raise FlowFilePathInvalid( + message_format=( + "The working directory path ({working_dir}) or flow file path ({flow_file}) is invalid. " + "The working directory should be a absolute path and the flow file path should be " + "relative to the working directory." + ), + working_dir=self.working_dir.as_posix(), + flow_file=self.flow_file.as_posix(), + ) + # Ensure that the flow file path is within the working directory + working_dir = os.path.normpath(self.working_dir) + flow_file = os.path.normpath(self.flow_file) + full_path = os.path.normpath(os.path.join(working_dir, flow_file)) + if not full_path.startswith(working_dir): raise FlowFilePathInvalid( message_format=( - "The flow file path ({flow_file}) is invalid. The path should be relative to the working directory." + "The flow file path ({flow_file}) is invalid. The path should be in the working directory." ), flow_file=self.flow_file.as_posix(), ) + self.working_dir = Path(working_dir) + self.flow_file = Path(flow_file) class FlowExecutionRequest(BaseExecutionRequest): """Request model for flow execution.""" + run_id: str inputs: Optional[Mapping[str, Any]] = None def get_run_mode(self): @@ -46,6 +63,7 @@ def get_run_mode(self): class NodeExecutionRequest(BaseExecutionRequest): """Request model for node execution.""" + run_id: str node_name: str flow_inputs: Mapping[str, Any] = None dependency_nodes_outputs: Mapping[str, Any] = None diff --git a/src/promptflow/promptflow/executor/_service/contracts/tool_request.py b/src/promptflow-core/promptflow/executor/_service/contracts/tool_request.py similarity index 100% rename from src/promptflow/promptflow/executor/_service/contracts/tool_request.py rename to src/promptflow-core/promptflow/executor/_service/contracts/tool_request.py diff --git a/src/promptflow-core/promptflow/executor/_service/utils/__init__.py b/src/promptflow-core/promptflow/executor/_service/utils/__init__.py new file mode 100644 index 00000000000..d540fd20468 --- /dev/null +++ b/src/promptflow-core/promptflow/executor/_service/utils/__init__.py @@ -0,0 +1,3 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- diff --git a/src/promptflow-core/promptflow/executor/_service/utils/batch_coordinator.py b/src/promptflow-core/promptflow/executor/_service/utils/batch_coordinator.py new file mode 100644 index 00000000000..dd112bb70d2 --- /dev/null +++ b/src/promptflow-core/promptflow/executor/_service/utils/batch_coordinator.py @@ -0,0 +1,98 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from pathlib import Path +from typing import Any, Mapping, Optional + +from promptflow._constants import OutputsFolderName +from promptflow._utils.logger_utils import LogContext +from promptflow.executor import FlowExecutor +from promptflow.executor._line_execution_process_pool import LineExecutionProcessPool +from promptflow.executor._service._errors import UninitializedError +from promptflow.executor._service.contracts.batch_request import AggregationRequest, LineExecutionRequest +from promptflow.storage._run_storage import DummyRunStorage + + +class BatchCoordinator: + _instance = None + _init = False + + def __new__(cls, *args, **kwargs): + if cls._instance is None: + cls._instance = super(BatchCoordinator, cls).__new__(cls) + return cls._instance + + def __init__( + self, + working_dir: Path, + flow_file: Path, + output_dir: Path, + connections: Optional[Mapping[str, Any]] = None, + worker_count: Optional[int] = None, + line_timeout_sec: Optional[int] = None, + ): + if self._init: + return + # Save log context for close method + self._log_context = LogContext.get_current() + + # Init flow executor and validate flow + self._output_dir = output_dir + + # The storage of FlowExecutor will be passed to LineExecutionProcessPool + # and responsible for persisting the run info during line execution. + + # So we pass DummyRunStorage to FlowExecutor because we don't need to + # persist the run infos during execution in server mode. + self._flow_executor = FlowExecutor.create( + flow_file, connections, working_dir, storage=DummyRunStorage(), raise_ex=False + ) + + # Init line execution process pool and set serialize_multimedia_during_execution to True + # to ensure that images are converted to paths during line execution. + self._process_pool = LineExecutionProcessPool( + output_dir, + self._flow_executor, + worker_count=worker_count, + line_timeout_sec=line_timeout_sec, + serialize_multimedia_during_execution=True, + ) + self._init = True + + @classmethod + def get_instance(cls): + if cls._instance is None: + raise UninitializedError( + "Please initialize the executor service with the '/initialize' api before sending execution requests." + ) + return cls._instance + + def get_log_context(self): + return self._log_context + + def start(self): + """Start the process pool.""" + self._process_pool.start() + + async def exec_line(self, request: LineExecutionRequest): + """Execute a line in the process pool.""" + return await self._process_pool.submit(request.run_id, request.line_number, request.inputs) + + def exec_aggregation(self, request: AggregationRequest): + """Execute aggregation nodes for the batch run.""" + with self._flow_executor._run_tracker.node_log_manager: + aggregation_result = self._flow_executor._exec_aggregation( + request.batch_inputs, request.aggregation_inputs, request.run_id + ) + # Serialize the multimedia data of the node run infos under the mode artifacts folder. + for node_run_info in aggregation_result.node_run_infos.values(): + base_dir = self._output_dir / OutputsFolderName.NODE_ARTIFACTS / node_run_info.node + self._flow_executor._multimedia_processor.process_multimedia_in_run_info(node_run_info, base_dir) + return aggregation_result + + def close(self): + """Close the process pool.""" + self._process_pool.close() + self._init = False + self._instance = None diff --git a/src/promptflow-core/promptflow/executor/_service/utils/process_manager.py b/src/promptflow-core/promptflow/executor/_service/utils/process_manager.py new file mode 100644 index 00000000000..803aa2b83aa --- /dev/null +++ b/src/promptflow-core/promptflow/executor/_service/utils/process_manager.py @@ -0,0 +1,51 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import os +import signal +from multiprocessing import Process +from typing import Dict + +from promptflow._utils.logger_utils import service_logger + + +class ProcessManager: + _instance = None + _processes_mapping: Dict[str, Process] + + def __new__(cls, *args, **kwargs): + if cls._instance is None: + cls._instance = super(ProcessManager, cls).__new__(cls) + cls._instance._processes_mapping = {} + return cls._instance + + def start_process(self, run_id: str, process: Process): + self._processes_mapping[run_id] = process + + def get_process(self, run_id: str) -> Process: + return self._processes_mapping.get(run_id, None) + + def remove_process(self, run_id: str) -> Process: + return self._processes_mapping.pop(run_id, None) + + def end_process(self, run_id: str): + process = self.remove_process(run_id) + if process and process.is_alive(): + try: + # Executor will handle SIGINT. + os.kill(process.pid, signal.SIGINT) + service_logger.info(f"Kill process[{process.pid}] for run[{run_id}] with SIGINT.") + # Wait for 30s for executor process to gracefully shutdown + process.join(timeout=30) + if process.is_alive(): + # Force kill if still alive + os.kill(process.pid, signal.SIGKILL) + service_logger.info(f"Kill process[{process.pid}] for run[{run_id}] with SIGKILL.") + service_logger.info(f"Successfully terminated process[{process.pid}] for run[{run_id}].") + except ProcessLookupError: + service_logger.info( + f"Process[{process.pid}] for run[{run_id}] not found, it might have already terminated." + ) + else: + service_logger.info(f"Process for run[{run_id}] not found in mapping, it may have already been removed.") diff --git a/src/promptflow/promptflow/executor/_service/utils/process_utils.py b/src/promptflow-core/promptflow/executor/_service/utils/process_utils.py similarity index 86% rename from src/promptflow/promptflow/executor/_service/utils/process_utils.py rename to src/promptflow-core/promptflow/executor/_service/utils/process_utils.py index a49c9039810..aa20a5852c4 100644 --- a/src/promptflow/promptflow/executor/_service/utils/process_utils.py +++ b/src/promptflow-core/promptflow/executor/_service/utils/process_utils.py @@ -10,16 +10,14 @@ from datetime import datetime, timedelta from typing import Callable -import psutil - from promptflow._core._errors import UnexpectedError -from promptflow._core.operation_context import OperationContext from promptflow._utils.exception_utils import ExceptionPresenter, JsonSerializedPromptflowException from promptflow._utils.logger_utils import service_logger from promptflow._utils.process_utils import block_terminate_signal_to_parent from promptflow.exceptions import ErrorTarget from promptflow.executor._service._errors import ExecutionCanceledError, ExecutionTimeoutError from promptflow.executor._service.utils.process_manager import ProcessManager +from promptflow.tracing._operation_context import OperationContext LONG_WAIT_TIMEOUT = timedelta(days=1).total_seconds() SHORT_WAIT_TIMEOUT = 10 @@ -45,18 +43,14 @@ async def invoke_sync_function_in_process( p.start() service_logger.info(f"[{os.getpid()}--{p.pid}] Start process to execute the request.") if run_id: - ProcessManager().start_process(run_id, p.pid) + ProcessManager().start_process(run_id, p) try: # Wait for the process to finish or timeout asynchronously start_time = datetime.utcnow() - while (datetime.utcnow() - start_time).total_seconds() < wait_timeout and _is_process_alive(p): + while (datetime.utcnow() - start_time).total_seconds() < wait_timeout and p.is_alive(): await asyncio.sleep(1) - # If process_id is None, it indicates that the process has been terminated by cancel request. - if run_id and not ProcessManager().get_process(run_id): - raise ExecutionCanceledError(run_id) - # Terminate the process if it is still alive after timeout if p.is_alive(): service_logger.error(f"[{p.pid}] Stop process for exceeding {wait_timeout} seconds.") @@ -66,8 +60,12 @@ async def invoke_sync_function_in_process( # Raise exception if the process exit code is not 0 if p.exitcode != 0: + # If process is not None, it indicates that the process has been terminated by other errors. exception = error_dict.get("error", None) if exception is None: + # If process is None, it indicates that the process has been terminated by cancel request. + if run_id and not ProcessManager().get_process(run_id): + raise ExecutionCanceledError(run_id) raise UnexpectedError( message="Unexpected error occurred while executing the request", target=ErrorTarget.EXECUTOR, @@ -83,15 +81,6 @@ async def invoke_sync_function_in_process( ProcessManager().remove_process(run_id) -def _is_process_alive(p: multiprocessing.Process): - if psutil.pid_exists(p.pid): - if psutil.Process(p.pid).status() != psutil.STATUS_ZOMBIE: - return True - # Call p.join() to clear the zombie process correctly. - p.join() - return False - - def _execute_target_function( target_function: Callable, args: tuple, diff --git a/src/promptflow/promptflow/executor/_service/utils/service_utils.py b/src/promptflow-core/promptflow/executor/_service/utils/service_utils.py similarity index 71% rename from src/promptflow/promptflow/executor/_service/utils/service_utils.py rename to src/promptflow-core/promptflow/executor/_service/utils/service_utils.py index 6f49033681e..6ab5861ee93 100644 --- a/src/promptflow/promptflow/executor/_service/utils/service_utils.py +++ b/src/promptflow-core/promptflow/executor/_service/utils/service_utils.py @@ -7,11 +7,11 @@ from typing import Any, Mapping, Union from promptflow._core.connection_manager import ConnectionManager -from promptflow._core.operation_context import OperationContext from promptflow._utils.exception_utils import ErrorResponse, ExceptionPresenter, JsonSerializedPromptflowException from promptflow._utils.logger_utils import LogContext, service_logger -from promptflow._version import VERSION +from promptflow._utils.user_agent_utils import append_promptflow_package_ua from promptflow.executor._service.contracts.execution_request import BaseExecutionRequest +from promptflow.tracing._operation_context import OperationContext def get_log_context(request: BaseExecutionRequest, enable_service_logger: bool = False) -> LogContext: @@ -29,19 +29,28 @@ def update_and_get_operation_context(context_dict: Mapping[str, Any]) -> Operati return operation_context # update operation context with context_dict operation_context.update(context_dict) - # update user agent to operation context - executor_user_agent = get_executor_version() - operation_context.append_user_agent(executor_user_agent) + # update promptflow version to operation context + append_promptflow_package_ua(operation_context) return operation_context -def get_executor_version(): +def get_commit_id(): + """Get commit id from BUILD_INFO environment variable. + + BUILD_INFO is a json string in the promptflow-python image, like + '{ + "build_number": "20240326.v2", + "date": "2024-03-27 05:12:33", + "commit_id": "...", + "branch": "main" + }' + """ build_info = os.environ.get("BUILD_INFO", "") try: build_info_dict = json.loads(build_info) - return "promptflow-executor/" + build_info_dict["build_number"] + return build_info_dict["commit_id"] except Exception: - return "promptflow-executor/" + VERSION + return "unknown" def generate_error_response(ex: Union[dict, Exception]): @@ -57,3 +66,9 @@ def generate_error_response(ex: Union[dict, Exception]): def set_environment_variables(request: BaseExecutionRequest): if isinstance(request.environment_variables, dict) and request.environment_variables: os.environ.update(request.environment_variables) + + +def enable_async_execution(): + """Set env PF_USE_ASYNC to true to enable async execution""" + # TODO: Will remove when AsyncNodesScheduler is used by default + os.environ["PF_USE_ASYNC"] = "true" diff --git a/src/promptflow/promptflow/executor/_tool_invoker.py b/src/promptflow-core/promptflow/executor/_tool_invoker.py similarity index 100% rename from src/promptflow/promptflow/executor/_tool_invoker.py rename to src/promptflow-core/promptflow/executor/_tool_invoker.py diff --git a/src/promptflow/promptflow/executor/_tool_resolver.py b/src/promptflow-core/promptflow/executor/_tool_resolver.py similarity index 73% rename from src/promptflow/promptflow/executor/_tool_resolver.py rename to src/promptflow-core/promptflow/executor/_tool_resolver.py index d9f7a4ba25e..0f96cea03c4 100644 --- a/src/promptflow/promptflow/executor/_tool_resolver.py +++ b/src/promptflow-core/promptflow/executor/_tool_resolver.py @@ -10,28 +10,34 @@ from pathlib import Path from typing import Callable, List, Optional +from promptflow._constants import MessageFormatType from promptflow._core._errors import InvalidSource from promptflow._core.connection_manager import ConnectionManager from promptflow._core.tool import STREAMING_OPTION_PARAMETER_ATTR from promptflow._core.tools_manager import BuiltinsManager, ToolLoader, connection_type_to_api_mapping -from promptflow._utils.multimedia_utils import create_image, load_multimedia_data_recursively +from promptflow._utils.multimedia_utils import MultimediaProcessor from promptflow._utils.tool_utils import get_inputs_for_prompt_template, get_prompt_param_name_from_func from promptflow._utils.yaml_utils import load_yaml from promptflow.contracts.flow import InputAssignment, InputValueType, Node, ToolSource, ToolSourceType from promptflow.contracts.tool import ConnectionType, Tool, ToolType, ValueType from promptflow.contracts.types import AssistantDefinition, PromptTemplate from promptflow.exceptions import ErrorTarget, PromptflowException, UserErrorException -from promptflow.executor._assistant_tool_invoker import AssistantTool, AssistantToolInvoker +from promptflow.executor._assistant_tool_invoker import ( + AssistantTool, + AssistantToolInvoker, + AssistantToolResolver, + ResolvedAssistantTool, +) from promptflow.executor._docstring_parser import DocstringParser from promptflow.executor._errors import ( ConnectionNotFound, EmptyLLMApiMapping, FailedToParseAssistantTool, + InvalidAssistantTool, InvalidConnectionType, InvalidCustomLLMTool, NodeInputValidationError, ResolveToolError, - UnsupportedAssistantToolType, ValueTypeUnresolved, ) @@ -50,6 +56,7 @@ def __init__( working_dir: Path, connections: Optional[dict] = None, package_tool_keys: Optional[List[str]] = None, + message_format: str = MessageFormatType.BASIC, ): try: # Import openai and aoai for llm tool @@ -59,6 +66,7 @@ def __init__( self._tool_loader = ToolLoader(working_dir, package_tool_keys=package_tool_keys) self._working_dir = working_dir self._connection_manager = ConnectionManager(connections) + self._multimedia_processor = MultimediaProcessor.create(message_format) @classmethod def start_resolver( @@ -68,31 +76,39 @@ def start_resolver( resolver._activate_in_context(force=True) return resolver - def _convert_to_connection_value(self, k: str, v: InputAssignment, node: Node, conn_types: List[ValueType]): + def _convert_to_connection_value(self, k: str, v: InputAssignment, node_name: str, conn_types: List[ValueType]): connection_value = self._connection_manager.get(v.value) if not connection_value: - raise ConnectionNotFound(f"Connection {v.value} not found for node {node.name!r} input {k!r}.") + raise ConnectionNotFound(f"Connection {v.value} not found for node {node_name!r} input {k!r}.") # Check if type matched if not any(type(connection_value).__name__ == typ for typ in conn_types): msg = ( - f"Input '{k}' for node '{node.name}' of type {type(connection_value).__name__!r}" + f"Input '{k}' for node '{node_name}' of type {type(connection_value).__name__!r}" f" is not supported, valid types {conn_types}." ) raise NodeInputValidationError(message=msg) return connection_value def _convert_to_custom_strong_type_connection_value( - self, k: str, v: InputAssignment, node: Node, tool: Tool, conn_types: List[str], module: types.ModuleType + self, + k: str, + v: InputAssignment, + node_name: str, + source: ToolSource, + tool: Tool, + conn_types: List[str], + module: types.ModuleType, ): if not conn_types: - msg = f"Input '{k}' for node '{node.name}' has invalid types: {conn_types}." + msg = f"Input '{k}' for node '{node_name}' has invalid types: {conn_types}." raise NodeInputValidationError(message=msg) connection_value = self._connection_manager.get(v.value) if not connection_value: - raise ConnectionNotFound(f"Connection {v.value} not found for node {node.name!r} input {k!r}.") + raise ConnectionNotFound(f"Connection {v.value} not found for node {node_name!r} input {k!r}.") custom_defined_connection_class_name = conn_types[0] - if node.source.type == ToolSourceType.Package: + source_type = getattr(source, "type", None) + if source_type == ToolSourceType.Package: module = tool.module return connection_value._convert_to_custom_strong_type( module=module, to_class=custom_defined_connection_class_name @@ -112,52 +128,102 @@ def _convert_to_assistant_definition(self, assistant_definition_path: str, input with open(file, "r", encoding="utf-8") as file: assistant_definition = load_yaml(file) assistant_def = AssistantDefinition.deserialize(assistant_definition) - self._resolve_assistant_tool(assistant_def) + self._resolve_assistant_tools(node_name, assistant_def) return assistant_def - def _resolve_assistant_tool(self, assistant_definition: AssistantDefinition): + def _resolve_assistant_tools(self, node_name: str, assistant_definition: AssistantDefinition): + """ + Resolves AssistantTool from the raw assistant definition. + + The assistant definition is initialized with a path or package to source file. + This method loads scripts/module, parses the structure into AssistantTool instances for future invoking. + It supports tools of types 'code_interpreter' and 'retrieval' directly and loads 'function' type tools + as callable functions. Unsupported tool types raise an exception. + """ resolved_tools = {} for tool in assistant_definition.tools: if tool["type"] in ("code_interpreter", "retrieval"): - resolved_tools[tool["type"]] = AssistantTool(name=tool["type"], openai_definition=tool, func=None) + resolved_tools[tool["type"]] = ResolvedAssistantTool( + name=tool["type"], openai_definition=tool, func=None + ) elif tool["type"] == "function": - function_tool = self._load_tool_as_function(tool) + assistant_tool = AssistantToolResolver.from_dict(tool, node_name) + function_tool = self.resolve_function_by_definition(node_name, assistant_tool) resolved_tools[function_tool.name] = function_tool else: - raise UnsupportedAssistantToolType( - message_format="Unsupported assistant tool type: {tool_type}", - tool_type=tool["type"], + raise InvalidAssistantTool( + message_format=( + "Unsupported assistant tool's type in node {node_name} : {type}. " + "Please make sure the type is restricted within " + "['code_interpreter', 'function', 'retrieval']." + ), + type=type, target=ErrorTarget.EXECUTOR, ) + # Inject the resolved tools into the assistant definition assistant_definition._tool_invoker = AssistantToolInvoker(resolved_tools) - def _load_tool_as_function(self, tool: dict): - # Temporary implementation for resolving inner functions or tools within the assistant framework. - # Plans are underway to establish dedicated methods for inner function resolution. - # It will replace the current approach of creating node to reuse existing node resolution logic. - node, predefined_inputs = self._create_node_for_assistant_tool(tool) - resolved_tool = self.resolve_tool_by_node(node, convert_input_types=True) - func_name = resolved_tool.definition.function - definition = self._generate_tool_definition(func_name, resolved_tool.definition.description, predefined_inputs) - if resolved_tool.node.inputs: - inputs = {name: value.value for name, value in resolved_tool.node.inputs.items()} - func = partial(resolved_tool.callable, **inputs) + def _resolve_predefined_inputs_type(self, node_name: str, assistant_tool: AssistantTool, tool: Tool): + predefined_inputs = {} + if assistant_tool.predefined_inputs: + for input_name, value in assistant_tool.predefined_inputs.items(): + predefined_inputs[input_name] = InputAssignment.deserialize(value) + + source = assistant_tool.source + updated_predefined_inputs = self._convert_literal_input_types(node_name, source, predefined_inputs, tool) + return updated_predefined_inputs + + def _construct_assistant_tool( + self, tool: Tool, callable: Callable, predefined_inputs: dict + ) -> ResolvedAssistantTool: + func_name = tool.function + definition = self._generate_tool_definition(func_name, tool.description, predefined_inputs) + if predefined_inputs: + inputs = {name: value.value for name, value in predefined_inputs.items()} + func = partial(callable, **inputs) else: - func = resolved_tool.callable - return AssistantTool(name=func_name, openai_definition=definition, func=func) + func = callable + return ResolvedAssistantTool(name=func_name, openai_definition=definition, func=func) - def _create_node_for_assistant_tool(self, tool: dict): - predefined_inputs = {} - for input_name, value in tool.get("predefined_inputs", {}).items(): - predefined_inputs[input_name] = InputAssignment.deserialize(value) - node = Node( - name="assistant_node", - tool="assistant_tool", - inputs=predefined_inputs, - source=ToolSource.deserialize(tool["source"]) if "source" in tool else None, - type=ToolType.PYTHON if "tool_type" in tool and tool["tool_type"] == "python" else None, + def _load_package_tool_as_function(self, node_name: str, assistant_tool: AssistantTool) -> ResolvedAssistantTool: + """Get assistant function from package tool definition.""" + + # Step I: construct promptflow Tool object from the source:tool specification + source_tool = assistant_tool.source.tool + function_package_tool_keys = [source_tool] + tool_loader = ToolLoader(self._working_dir, function_package_tool_keys) + tool: Tool = tool_loader.load_package_tool(source_tool) + + # Step II: resolve the predefined_inputs if necessary + updated_predefined_inputs = self._resolve_predefined_inputs_type(node_name, assistant_tool, tool) + + # Step III: import the package tool and return the callable & init_args + callable, init_args = BuiltinsManager._load_package_tool( + tool.name, tool.module, tool.class_name, tool.function, updated_predefined_inputs + ) + self._remove_init_args(updated_predefined_inputs, init_args) + + # Step IV: construct the AssistantTool object from the updated predefined_inputs + Tool object + return self._construct_assistant_tool(tool, callable, updated_predefined_inputs) + + def _load_script_tool_as_function(self, node_name: str, assistant_tool: AssistantTool) -> ResolvedAssistantTool: + """Get assistant function from script tool definition.""" + + # Step I: construct promptflow Tool object from the source:path specification + source_path = assistant_tool.source.path + m, tool = self._tool_loader.load_script_tool(source_path, node_name) + + # Step II: resolve the predefined_inputs if necessary + updated_predefined_inputs = self._resolve_predefined_inputs_type(node_name, assistant_tool, tool) + + # Step III: import the python tool and return the callable & init_args + callable, init_args = BuiltinsManager._load_tool_from_module( + m, tool.name, tool.module, tool.class_name, tool.function, updated_predefined_inputs ) - return node, list(predefined_inputs.keys()) + self._remove_init_args(updated_predefined_inputs, init_args) + + # Step IV: construct the AssistantTool object from the updated predefined_inputs + Tool object + return self._construct_assistant_tool(tool, callable, updated_predefined_inputs) def _generate_tool_definition(self, func_name: str, description: str, predefined_inputs: list) -> dict: try: @@ -187,10 +253,12 @@ def _generate_tool_definition(self, func_name: str, description: str, predefined except Exception as e: raise FailedToParseAssistantTool(func_name=func_name) from e - def _convert_node_literal_input_types(self, node: Node, tool: Tool, module: types.ModuleType = None): + def _convert_literal_input_types( + self, node_name: str, source: ToolSource, inputs: dict, tool: Tool, module: types.ModuleType = None + ): updated_inputs = { k: v - for k, v in node.inputs.items() + for k, v in inputs.items() if (v.value is not None and v.value != "") or v.value_type != InputValueType.LITERAL } for k, v in updated_inputs.items(): @@ -204,13 +272,13 @@ def _convert_node_literal_input_types(self, node: Node, tool: Tool, module: type if ConnectionType.is_connection_class_name(value_type): if tool_input.custom_type: updated_inputs[k].value = self._convert_to_custom_strong_type_connection_value( - k, v, node, tool, tool_input.custom_type, module=module + k, v, node_name, source, tool, tool_input.custom_type, module=module ) else: - updated_inputs[k].value = self._convert_to_connection_value(k, v, node, tool_input.type) + updated_inputs[k].value = self._convert_to_connection_value(k, v, node_name, tool_input.type) elif value_type == ValueType.IMAGE: try: - updated_inputs[k].value = create_image(v.value) + updated_inputs[k].value = self._multimedia_processor.create_image(v.value) except Exception as e: error_type_and_message = f"({e.__class__.__name__}) {e}" raise NodeInputValidationError( @@ -221,7 +289,7 @@ def _convert_node_literal_input_types(self, node: Node, tool: Tool, module: type ) from e elif value_type == ValueType.ASSISTANT_DEFINITION: try: - updated_inputs[k].value = self._convert_to_assistant_definition(v.value, k, node.name) + updated_inputs[k].value = self._convert_to_assistant_definition(v.value, k, node_name) except Exception as e: error_type_and_message = f"({e.__class__.__name__}) {e}" raise NodeInputValidationError( @@ -239,13 +307,15 @@ def _convert_node_literal_input_types(self, node: Node, tool: Tool, module: type message_format="Input '{key}' for node '{node_name}' of value '{value}' is not " "type {value_type}.", key=k, - node_name=node.name, + node_name=node_name, value=v.value, value_type=value_type.value, target=ErrorTarget.EXECUTOR, ) from e try: - updated_inputs[k].value = load_multimedia_data_recursively(updated_inputs[k].value) + updated_inputs[k].value = self._multimedia_processor.load_multimedia_data_recursively( + updated_inputs[k].value + ) except Exception as e: error_type_and_message = f"({e.__class__.__name__}) {e}" raise NodeInputValidationError( @@ -260,8 +330,11 @@ def _convert_node_literal_input_types(self, node: Node, tool: Tool, module: type f"Unresolved input type {value_type!r}, please check if it is supported in current version.", target=ErrorTarget.EXECUTOR, ) + return updated_inputs + + def _convert_node_literal_input_types(self, node: Node, tool: Tool, module: types.ModuleType = None): updated_node = copy.deepcopy(node) - updated_node.inputs = updated_inputs + updated_node.inputs = self._convert_literal_input_types(node.name, node.source, node.inputs, tool, module) return updated_node def resolve_tool_by_node(self, node: Node, convert_input_types=True) -> ResolvedTool: @@ -293,6 +366,27 @@ def resolve_tool_by_node(self, node: Node, convert_input_types=True) -> Resolved raise ResolveToolError(node_name=node.name, target=e.target, module=e.module) from e raise ResolveToolError(node_name=node.name) from e + def resolve_function_by_definition(self, node_name: str, tool: AssistantTool) -> ResolvedAssistantTool: + try: + source_type = tool.source.type + if source_type == ToolSourceType.Package: + return self._load_package_tool_as_function(node_name, tool) + elif source_type == ToolSourceType.Code: + return self._load_script_tool_as_function(node_name, tool) + raise InvalidAssistantTool( + message_format=( + "Tool source type {source_type} is not supported in assistant node '{node_name}'. " + "Please make sure the assistant definition is correct." + ), + node_name=node_name, + source_type=source_type.value, + target=ErrorTarget.EXECUTOR, + ) + except Exception as e: + if isinstance(e, PromptflowException) and e.target != ErrorTarget.UNKNOWN: + raise ResolveToolError(node_name=node_name, target=e.target, module=e.module) from e + raise ResolveToolError(node_name=node_name) from e + def _load_source_content(self, node: Node) -> str: source = node.source # If is_file returns True, the path points to a existing file, so we don't need to check if exists. @@ -318,7 +412,9 @@ def _load_images_for_prompt_tpl(self, prompt_tpl_inputs_mapping: dict, node_inpu for input_name, input in prompt_tpl_inputs_mapping.items(): if ValueType.IMAGE in input.type and input_name in node_inputs: if node_inputs[input_name].value_type == InputValueType.LITERAL: - node_inputs[input_name].value = create_image(node_inputs[input_name].value) + node_inputs[input_name].value = self._multimedia_processor.create_image( + node_inputs[input_name].value + ) return node_inputs def _resolve_prompt_node(self, node: Node) -> ResolvedTool: @@ -347,7 +443,8 @@ def _get_llm_node_connection(self, node: Node): connection = self._connection_manager.get(node.connection) if connection is None: raise ConnectionNotFound( - message_format="Connection of LLM node '{node_name}' is not found.", + message_format="Connection '{connection}' of LLM node '{node_name}' is not found.", + connection=node.connection, node_name=node.name, target=ErrorTarget.EXECUTOR, ) @@ -360,7 +457,8 @@ def _resolve_llm_connection_with_provider(connection): # If provider is not specified, try to resolve it from connection type connection_type = type(connection).__name__ if connection_type not in connection_type_to_api_mapping: - from promptflow.connections import ServerlessConnection, OpenAIConnection + from promptflow.connections import OpenAIConnection, ServerlessConnection + # This is a fallback for the case that ServerlessConnection related tool is not ready # in legacy versions, then we can directly use OpenAIConnection. if isinstance(connection, ServerlessConnection): diff --git a/src/promptflow/promptflow/executor/flow_executor.py b/src/promptflow-core/promptflow/executor/flow_executor.py similarity index 89% rename from src/promptflow/promptflow/executor/flow_executor.py rename to src/promptflow-core/promptflow/executor/flow_executor.py index 7ee57faaf33..bf61e1d9f8f 100644 --- a/src/promptflow/promptflow/executor/flow_executor.py +++ b/src/promptflow-core/promptflow/executor/flow_executor.py @@ -8,6 +8,8 @@ import functools import inspect import os +import signal +import threading import uuid from pathlib import Path from threading import current_thread @@ -21,7 +23,6 @@ from promptflow._core.cache_manager import AbstractCacheManager from promptflow._core.flow_execution_context import FlowExecutionContext from promptflow._core.metric_logger import add_metric_logger, remove_metric_logger -from promptflow._core.operation_context import OperationContext from promptflow._core.run_tracker import RunTracker from promptflow._core.tool import STREAMING_OPTION_PARAMETER_ATTR from promptflow._core.tools_manager import ToolsManager @@ -32,12 +33,10 @@ extract_aggregation_inputs, get_aggregation_inputs_properties, ) +from promptflow._utils.flow_utils import is_flex_flow from promptflow._utils.logger_utils import flow_logger, logger -from promptflow._utils.multimedia_utils import ( - load_multimedia_data, - load_multimedia_data_recursively, - persist_multimedia_data, -) +from promptflow._utils.multimedia_utils import MultimediaProcessor +from promptflow._utils.user_agent_utils import append_promptflow_package_ua from promptflow._utils.utils import get_int_env_var, transpose from promptflow._utils.yaml_utils import load_yaml from promptflow.contracts.flow import Flow, FlowInputDefinition, InputAssignment, InputValueType, Node @@ -57,7 +56,9 @@ from promptflow.executor.flow_validator import FlowValidator from promptflow.storage import AbstractRunStorage from promptflow.storage._run_storage import DefaultRunStorage -from promptflow.tracing._openai_injector import inject_openai_api +from promptflow.tracing._integrations._openai_injector import inject_openai_api +from promptflow.tracing._operation_context import OperationContext +from promptflow.tracing._start_trace import setup_exporter_from_environ from promptflow.tracing._trace import ( enrich_span_with_context, enrich_span_with_input, @@ -126,10 +127,6 @@ def __init__( :param flow_file: The path to the file containing the Flow definition. :type flow_file: str or None """ - # Inject OpenAI API to make sure traces and headers injection works and - # update OpenAI API configs from environment variables. - inject_openai_api() - self._flow = flow self._flow_id = flow.id or str(uuid.uuid4()) self._connections = connections @@ -164,6 +161,8 @@ def __init__( self._completed_idx = None # TODO: Improve the experience about configuring node concurrency. self._node_concurrency = DEFAULT_CONCURRENCY_BULK + self._message_format = flow.message_format + self._multimedia_processor = MultimediaProcessor.create(flow.message_format) @classmethod def create( @@ -177,6 +176,7 @@ def create( raise_ex: bool = True, node_override: Optional[Dict[str, Dict[str, Any]]] = None, line_timeout_sec: Optional[int] = None, + init_kwargs: Optional[Dict[str, Any]] = None, ) -> "FlowExecutor": """Create a new instance of FlowExecutor. @@ -196,18 +196,21 @@ def create( :type node_override: Optional[Dict[str, Dict[str, Any]]] :param line_timeout_sec: The line timeout in seconds to be used for the flow. Default is LINE_TIMEOUT_SEC. :type line_timeout_sec: Optional[int] + :param init_kwargs: Class init arguments for callable class, only supported for flex flow. + :type init_kwargs: Optional[Dict[str, Any]] :return: A new instance of FlowExecutor. :rtype: ~promptflow.executor.flow_executor.FlowExecutor """ - if cls._is_eager_flow_yaml(flow_file, working_dir): + setup_exporter_from_environ() + if is_flex_flow(file_path=flow_file, working_dir=working_dir): from ._script_executor import ScriptExecutor return ScriptExecutor( - flow_file=Path(flow_file), - working_dir=working_dir, - storage=storage, + flow_file=Path(flow_file), working_dir=working_dir, storage=storage, init_kwargs=init_kwargs ) else: + if init_kwargs: + logger.warning(f"Got unexpected init args {init_kwargs} for non-script flow. Ignoring them.") flow = Flow.from_yaml(flow_file, working_dir=working_dir) return cls._create_from_flow( flow_file=flow_file, @@ -238,8 +241,9 @@ def _create_from_flow( if node_override: flow = flow._apply_node_overrides(node_override) flow = flow._apply_default_node_variants() + package_tool_keys = [node.source.tool for node in flow.nodes if node.source and node.source.tool] - tool_resolver = ToolResolver(working_dir, connections, package_tool_keys) + tool_resolver = ToolResolver(working_dir, connections, package_tool_keys, message_format=flow.message_format) with _change_working_dir(working_dir): resolved_tools = [tool_resolver.resolve_tool_by_node(node) for node in flow.nodes] @@ -250,6 +254,7 @@ def _create_from_flow( inputs=flow.inputs, outputs=flow.outputs, tools=[], + message_format=flow.message_format, ) # ensure_flow_valid including validation + resolve # Todo: 1) split pure validation + resolve from below method 2) provide completed validation() @@ -276,16 +281,6 @@ def _create_from_flow( logger.debug("The flow executor is initialized successfully.") return executor - @classmethod - def _is_eager_flow_yaml(cls, flow_file: Path, working_dir: Optional[Path] = None): - if Path(flow_file).suffix.lower() in [".yaml", ".yml"]: - flow_file = working_dir / flow_file if working_dir else flow_file - with open(flow_file, "r", encoding="utf-8") as fin: - flow_dag = load_yaml(fin) - if "entry" in flow_dag: - return True - return False - @classmethod def load_and_exec_node( cls, @@ -321,13 +316,28 @@ def load_and_exec_node( :param raise_ex: Whether to raise exceptions or not. Default is False. :type raise_ex: Optional[bool] """ - # Inject OpenAI API to make sure traces and headers injection works and - # update OpenAI API configs from environment variables. - inject_openai_api() - OperationContext.get_instance().run_mode = RunMode.SingleNode.name - dependency_nodes_outputs = dependency_nodes_outputs or {} + @contextlib.contextmanager + def update_operation_context(): + operation_context = OperationContext.get_instance() + original_context = operation_context.copy() + try: + append_promptflow_package_ua(operation_context) + operation_context.set_default_tracing_keys({"run_mode", "root_run_id", "flow_id", "batch_input_source"}) + operation_context["run_mode"] = RunMode.SingleNode.name + # Inject OpenAI API to make sure traces and headers injection works and + # update OpenAI API configs from environment variables. + inject_openai_api() + yield + finally: + OperationContext.set_instance(original_context) + + # Register signal handler for SIGINT and SIGTERM to cancel the single node run. + if threading.current_thread() is threading.main_thread(): + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + dependency_nodes_outputs = dependency_nodes_outputs or {} # Load the node from the flow file working_dir = Flow._resolve_working_dir(flow_file, working_dir) with open(working_dir / flow_file, "r") as fin: @@ -359,10 +369,12 @@ def load_and_exec_node( converted_flow_inputs_for_node = FlowValidator.convert_flow_inputs_for_node( flow, node, inputs_with_default_value ) - inputs = load_multimedia_data(node_referenced_flow_inputs, converted_flow_inputs_for_node) - dependency_nodes_outputs = load_multimedia_data_recursively(dependency_nodes_outputs) + + multimedia_processor = MultimediaProcessor.create(flow.message_format) + inputs = multimedia_processor.load_multimedia_data(node_referenced_flow_inputs, converted_flow_inputs_for_node) + dependency_nodes_outputs = multimedia_processor.load_multimedia_data_recursively(dependency_nodes_outputs) package_tool_keys = [node.source.tool] if node.source and node.source.tool else [] - tool_resolver = ToolResolver(working_dir, connections, package_tool_keys) + tool_resolver = ToolResolver(working_dir, connections, package_tool_keys, message_format=flow.message_format) resolved_node = tool_resolver.resolve_tool_by_node(node) # Prepare callable and real inputs here @@ -387,13 +399,15 @@ def load_and_exec_node( if storage is None: sub_dir = "." if output_sub_dir is None else output_sub_dir storage = DefaultRunStorage(base_dir=working_dir, sub_dir=Path(sub_dir)) + run_tracker = RunTracker(storage) - with run_tracker.node_log_manager: + with run_tracker.node_log_manager, update_operation_context(): # Will generate node run in context context = FlowExecutionContext( name=flow.name, run_tracker=run_tracker, cache_manager=AbstractCacheManager.init_from_env(), + message_format=flow.message_format, ) try: @@ -403,6 +417,8 @@ def load_and_exec_node( ) else: context.invoke_tool(resolved_node.node, resolved_node.callable, kwargs=resolved_inputs) + except KeyboardInterrupt: + run_tracker.cancel_node_runs() except Exception: if raise_ex: # Only raise exception when raise_ex is True raise @@ -428,7 +444,7 @@ def update_environment_variables_with_connections(connections: dict): :return: A dictionary containing updated environment variables. :rtype: dict """ - from promptflow._sdk._utils import update_environment_variables_with_connections + from promptflow.core._utils import update_environment_variables_with_connections return update_environment_variables_with_connections(connections) @@ -600,13 +616,15 @@ def _exec_aggregation( return AggregationResult({}, {}, {}) run_id = run_id or str(uuid.uuid4()) nodes = [copy.deepcopy(node) for node in self._flow.nodes if node.aggregation] + # Load multimedia data from aggregation_inputs + aggregation_inputs = self._multimedia_processor.load_multimedia_data_recursively(aggregation_inputs) # Update the inputs of the aggregation nodes with the aggregation inputs. for node in nodes: node.inputs = { k: FlowExecutor._try_get_aggregation_input(v, aggregation_inputs) for k, v in node.inputs.items() } # Load multimedia data for the flow inputs of aggregation nodes. - inputs = load_multimedia_data(self._flow.inputs, inputs) + inputs = self._multimedia_processor.load_multimedia_data(self._flow.inputs, inputs) # TODO: Use a new run tracker to avoid memory increase infinitely. run_tracker = self._run_tracker @@ -616,6 +634,7 @@ def _exec_aggregation( cache_manager=self._cache_manager, run_id=run_id, flow_id=self._flow_id, + message_format=self._message_format, ) metrics = {} @@ -625,16 +644,17 @@ def _log_metric(key, value): add_metric_logger(_log_metric) try: self._submit_to_scheduler(context, inputs, nodes) - node_run_infos = run_tracker.collect_child_node_runs(run_id) - # Output is set as an empty dict, because the aggregation outputs story is not finalized. - return AggregationResult({}, metrics, {run.node: run for run in node_run_infos}) + except KeyboardInterrupt: + # Cancel all the running node runs if receiving KeyboardInterrupt. + run_tracker.cancel_node_runs(run_id) except Exception: if self._raise_ex: raise - node_run_infos = run_tracker.collect_child_node_runs(run_id) - return AggregationResult({}, metrics, {run.node: run for run in node_run_infos}) finally: remove_metric_logger(_log_metric) + node_run_infos = run_tracker.collect_child_node_runs(run_id) + # Output is set as an empty dict, because the aggregation outputs story is not finalized. + return AggregationResult({}, metrics, {run.node: run for run in node_run_infos}) def exec(self, inputs: dict, node_concurrency=DEFAULT_CONCURRENCY_FLOW) -> dict: """Executes the flow with the given inputs and returns the output. @@ -654,13 +674,11 @@ def exec(self, inputs: dict, node_concurrency=DEFAULT_CONCURRENCY_FLOW) -> dict: return result.output or {} def _exec_in_thread(self, args) -> LineResult: - inputs, run_id, line_number, variant_id, validate_inputs = args + inputs, run_id, line_number, validate_inputs = args thread_name = current_thread().name self._processing_idx[line_number] = thread_name self._run_tracker._activate_in_context() - results = self._exec( - inputs, run_id=run_id, line_number=line_number, variant_id=variant_id, validate_inputs=validate_inputs - ) + results = self._exec(inputs, run_id=run_id, line_number=line_number, validate_inputs=validate_inputs) self._run_tracker._deactivate_in_context() self._processing_idx.pop(line_number) self._completed_idx[line_number] = thread_name @@ -671,7 +689,6 @@ def exec_line( inputs: Mapping[str, Any], index: Optional[int] = None, run_id: Optional[str] = None, - variant_id: str = "", validate_inputs: bool = True, node_concurrency=DEFAULT_CONCURRENCY_FLOW, allow_generator_output: bool = False, @@ -685,8 +702,6 @@ def exec_line( :type index: Optional[int] :param run_id: The ID of the flow run. :type run_id: Optional[str] - :param variant_id: The ID of the variant to execute. - :type variant_id: str :param validate_inputs: Whether to validate the input values. :type validate_inputs: bool :param node_concurrency: The maximum number of nodes that can be executed concurrently. @@ -713,7 +728,6 @@ def exec_line( inputs, run_id=run_id, line_number=index, - variant_id=variant_id, validate_inputs=validate_inputs, allow_generator_output=allow_generator_output, ) @@ -727,7 +741,6 @@ async def exec_line_async( inputs: Mapping[str, Any], index: Optional[int] = None, run_id: Optional[str] = None, - variant_id: str = "", validate_inputs: bool = True, node_concurrency=DEFAULT_CONCURRENCY_FLOW, allow_generator_output: bool = False, @@ -740,8 +753,6 @@ async def exec_line_async( :type index: Optional[int] :param run_id: The ID of the flow run. :type run_id: Optional[str] - :param variant_id: The ID of the variant to execute. - :type variant_id: str :param validate_inputs: Whether to validate the input values. :type validate_inputs: bool :param node_concurrency: The maximum number of nodes that can be executed concurrently. @@ -763,7 +774,6 @@ async def exec_line_async( inputs, run_id=run_id, line_number=index, - variant_id=variant_id, validate_inputs=validate_inputs, allow_generator_output=allow_generator_output, ) @@ -775,6 +785,7 @@ async def exec_line_async( @contextlib.contextmanager def _update_operation_context(self, run_id: str, line_number: int): operation_context = OperationContext.get_instance() + original_context = operation_context.copy() original_mode = operation_context.get("run_mode", None) values_for_context = {"flow_id": self._flow_id, "root_run_id": run_id} if original_mode == RunMode.Batch.name: @@ -785,19 +796,18 @@ def _update_operation_context(self, run_id: str, line_number: int): else: values_for_otel = {"line_run_id": run_id} try: + append_promptflow_package_ua(operation_context) + operation_context.set_default_tracing_keys({"run_mode", "root_run_id", "flow_id", "batch_input_source"}) operation_context.run_mode = original_mode or RunMode.Test.name operation_context.update(values_for_context) for k, v in values_for_otel.items(): operation_context._add_otel_attributes(k, v) + # Inject OpenAI API to make sure traces and headers injection works and + # update OpenAI API configs from environment variables. + inject_openai_api() yield finally: - for k in values_for_context: - operation_context.pop(k) - operation_context._remove_otel_attributes(values_for_otel.keys()) - if original_mode is None: - operation_context.pop("run_mode") - else: - operation_context.run_mode = original_mode + OperationContext.set_instance(original_context) def _add_line_results(self, line_results: List[LineResult], run_tracker: Optional[RunTracker] = None): run_tracker = run_tracker or self._run_tracker @@ -832,6 +842,8 @@ def _exec_inner_with_trace( allow_generator_output=False, ): with open_telemetry_tracer.start_as_current_span(self._flow.name) as span: + # Store otel trace id in context for correlation + OperationContext.get_instance()["otel_trace_id"] = f"{span.get_span_context().trace_id:032x}" # initialize span span.set_attributes( { @@ -868,7 +880,7 @@ def _exec_inner( ): if validate_inputs: inputs = FlowValidator.ensure_flow_inputs_type(flow=self._flow, inputs=inputs, idx=run_info.index) - inputs = load_multimedia_data(self._flow.inputs, inputs) + inputs = self._multimedia_processor.load_multimedia_data(self._flow.inputs, inputs) # Inputs are assigned after validation and multimedia data loading, instead of at the start of the flow run. # This way, if validation or multimedia data loading fails, we avoid persisting invalid inputs. run_info.inputs = inputs @@ -889,7 +901,6 @@ def _exec( inputs: Mapping[str, Any], run_id: Optional[str] = None, line_number: Optional[int] = None, - variant_id: str = "", validate_inputs: bool = False, allow_generator_output: bool = False, ) -> LineResult: @@ -922,7 +933,7 @@ def _exec( run_id=line_run_id, parent_run_id=run_id, index=line_number, - variant_id=variant_id, + message_format=self._message_format, ) context = FlowExecutionContext( name=self._flow.name, @@ -931,7 +942,7 @@ def _exec( run_id=run_id, flow_id=self._flow_id, line_number=line_number, - variant_id=variant_id, + message_format=self._message_format, ) output = {} aggregation_inputs = {} @@ -949,10 +960,14 @@ def _exec( # KeyboardInterrupt will be raised after asyncio finishes its signal handling # End run with the KeyboardInterrupt exception, so that its status will be Canceled flow_logger.info("Received KeyboardInterrupt, cancel the run.") + # Update the run info of those running nodes to a canceled status. + run_tracker.cancel_node_runs(run_id) + run_tracker.end_run(line_run_id, ex=ex) + # If async execution is enabled, ignore this exception and return the partial line results. + if not self._should_use_async(): + raise + except Exception as ex: run_tracker.end_run(line_run_id, ex=ex) - raise - except Exception as e: - run_tracker.end_run(line_run_id, ex=e) if self._raise_ex: raise finally: @@ -967,7 +982,6 @@ async def _exec_async( inputs: Mapping[str, Any], run_id: Optional[str] = None, line_number: Optional[int] = None, - variant_id: str = "", validate_inputs: bool = False, allow_generator_output: bool = False, ) -> LineResult: @@ -1002,7 +1016,7 @@ async def _exec_async( parent_run_id=run_id, inputs={k: inputs[k] for k in self._flow.inputs if k in inputs}, index=line_number, - variant_id=variant_id, + message_format=self._message_format, ) context = FlowExecutionContext( name=self._flow.name, @@ -1011,7 +1025,7 @@ async def _exec_async( run_id=run_id, flow_id=self._flow_id, line_number=line_number, - variant_id=variant_id, + message_format=self._message_format, ) output = {} aggregation_inputs = {} @@ -1019,7 +1033,7 @@ async def _exec_async( if validate_inputs: inputs = FlowValidator.ensure_flow_inputs_type(flow=self._flow, inputs=inputs, idx=line_number) # TODO: Consider async implementation for load_multimedia_data - inputs = load_multimedia_data(self._flow.inputs, inputs) + inputs = self._multimedia_processor.load_multimedia_data(self._flow.inputs, inputs) # Make sure the run_info with converted inputs results rather than original inputs run_info.inputs = inputs output, nodes_outputs = await self._traverse_nodes_async(inputs, context) @@ -1040,6 +1054,8 @@ async def _exec_async( # KeyboardInterrupt will be raised after asyncio finishes its signal handling # End run with the KeyboardInterrupt exception, so that its status will be Canceled flow_logger.info("Received KeyboardInterrupt, cancel the run.") + # Update the run info of those running nodes to a canceled status. + run_tracker.cancel_node_runs(run_id) run_tracker.end_run(line_run_id, ex=ex) raise except Exception as e: @@ -1117,13 +1133,7 @@ def _traverse_nodes(self, inputs, context: FlowExecutionContext) -> Tuple[dict, batch_nodes = [node for node in self._flow.nodes if not node.aggregation] outputs = {} # TODO: Use a mixed scheduler to support both async and thread pool mode. - if self._should_use_async(): - flow_logger.info("Start executing nodes in async mode.") - scheduler = AsyncNodesScheduler(self._tools_manager, self._node_concurrency) - nodes_outputs, bypassed_nodes = asyncio.run(scheduler.execute(batch_nodes, inputs, context)) - else: - flow_logger.info("Start executing nodes in thread pool mode.") - nodes_outputs, bypassed_nodes = self._submit_to_scheduler(context, inputs, batch_nodes) + nodes_outputs, bypassed_nodes = self._submit_to_scheduler(context, inputs, batch_nodes) outputs = self._extract_outputs(nodes_outputs, bypassed_nodes, inputs) return outputs, nodes_outputs @@ -1153,13 +1163,14 @@ def _submit_to_scheduler(self, context: FlowExecutionContext, inputs, nodes: Lis ), current_value=self._node_concurrency, ) - return FlowNodesScheduler( - self._tools_manager, - inputs, - nodes, - self._node_concurrency, - context, - ).execute(self._line_timeout_sec) + if self._should_use_async(): + flow_logger.info("Start executing nodes in async mode.") + scheduler = AsyncNodesScheduler(self._tools_manager, self._node_concurrency) + return asyncio.run(scheduler.execute(nodes, inputs, context)) + else: + flow_logger.info("Start executing nodes in thread pool mode.") + scheduler = FlowNodesScheduler(self._tools_manager, inputs, nodes, self._node_concurrency, context) + return scheduler.execute(self._line_timeout_sec) @staticmethod def apply_inputs_mapping( @@ -1325,16 +1336,18 @@ def execute_flow( flow_executor = FlowExecutor.create(flow_file, connections, working_dir, raise_ex=False, **kwargs) flow_executor.enable_streaming_for_llm_flow(lambda: enable_stream_output) with _change_working_dir(working_dir): - # execute nodes in the flow except the aggregation nodes + # Execute nodes in the flow except the aggregation nodes # TODO: remove index=0 after UX no longer requires a run id similar to batch runs # (run_id_index, eg. xxx_0) for displaying the interface line_result = flow_executor.exec_line( inputs, index=0, allow_generator_output=allow_generator_output, run_id=run_id ) # persist the output to the output directory - line_result.output = persist_multimedia_data(line_result.output, base_dir=working_dir, sub_dir=output_dir) + line_result.output = flow_executor._multimedia_processor.persist_multimedia_data( + line_result.output, base_dir=working_dir, sub_dir=output_dir + ) if run_aggregation and line_result.aggregation_inputs: - # convert inputs of aggregation to list type + # Convert inputs of aggregation to list type flow_inputs = {k: [v] for k, v in inputs.items()} aggregation_inputs = {k: [v] for k, v in line_result.aggregation_inputs.items()} aggregation_results = flow_executor.exec_aggregation( @@ -1342,7 +1355,19 @@ def execute_flow( ) line_result.node_run_infos = {**line_result.node_run_infos, **aggregation_results.node_run_infos} line_result.run_info.metrics = aggregation_results.metrics + # The aggregation inputs of line results is not utilized in the flow test. So we set it into None. + line_result.aggregation_inputs = None if isinstance(line_result.output, dict): # remove line_number from output line_result.output.pop(LINE_NUMBER_KEY, None) return line_result + + +def signal_handler(sig, frame): + """Handle the terminate signal received by the process. + + Currently, only the single node run use this handler. We print the log and raise a + KeyboardInterrupt so that external code can catch this exception and cancel the running node." + """ + logger.info(f"Received signal {sig}({signal.Signals(sig).name}), will terminate the current process.") + raise KeyboardInterrupt diff --git a/src/promptflow/promptflow/executor/flow_validator.py b/src/promptflow-core/promptflow/executor/flow_validator.py similarity index 100% rename from src/promptflow/promptflow/executor/flow_validator.py rename to src/promptflow-core/promptflow/executor/flow_validator.py diff --git a/src/promptflow/promptflow/integrations/__init__.py b/src/promptflow-core/promptflow/integrations/__init__.py similarity index 100% rename from src/promptflow/promptflow/integrations/__init__.py rename to src/promptflow-core/promptflow/integrations/__init__.py diff --git a/src/promptflow/promptflow/integrations/langchain.py b/src/promptflow-core/promptflow/integrations/langchain.py similarity index 100% rename from src/promptflow/promptflow/integrations/langchain.py rename to src/promptflow-core/promptflow/integrations/langchain.py diff --git a/src/promptflow/promptflow/storage/__init__.py b/src/promptflow-core/promptflow/storage/__init__.py similarity index 100% rename from src/promptflow/promptflow/storage/__init__.py rename to src/promptflow-core/promptflow/storage/__init__.py diff --git a/src/promptflow/promptflow/storage/_cache_storage.py b/src/promptflow-core/promptflow/storage/_cache_storage.py similarity index 100% rename from src/promptflow/promptflow/storage/_cache_storage.py rename to src/promptflow-core/promptflow/storage/_cache_storage.py diff --git a/src/promptflow/promptflow/storage/_errors.py b/src/promptflow-core/promptflow/storage/_errors.py similarity index 100% rename from src/promptflow/promptflow/storage/_errors.py rename to src/promptflow-core/promptflow/storage/_errors.py diff --git a/src/promptflow-core/promptflow/storage/_queue_run_storage.py b/src/promptflow-core/promptflow/storage/_queue_run_storage.py new file mode 100644 index 00000000000..8f636fed072 --- /dev/null +++ b/src/promptflow-core/promptflow/storage/_queue_run_storage.py @@ -0,0 +1,49 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from multiprocessing import Queue +from pathlib import Path + +from promptflow._constants import OutputsFolderName +from promptflow._utils.multimedia_utils import MultimediaProcessor +from promptflow.contracts.run_info import FlowRunInfo +from promptflow.contracts.run_info import RunInfo as NodeRunInfo +from promptflow.storage import AbstractRunStorage + + +class QueueRunStorage(AbstractRunStorage): + """This storage is used in line_execution_process_pool, where the run infos are put into the + output queue when the flow is executed, and waiting for the monitoring thread to process it. + """ + + def __init__(self, queue: Queue): + self.queue = queue + + def persist_node_run(self, run_info: NodeRunInfo): + self.queue.put(run_info) + + def persist_flow_run(self, run_info: FlowRunInfo): + self.queue.put(run_info) + + +class ServiceQueueRunStorage(QueueRunStorage): + """This storage persist multimedia data after run info is put into the output queue.""" + + def __init__(self, queue: Queue, output_dir: Path): + super().__init__(queue) + self._flow_outputs_path = output_dir / OutputsFolderName.FLOW_OUTPUTS + self._flow_artifacts_path = output_dir / OutputsFolderName.FLOW_ARTIFACTS + self._node_artifacts_path = output_dir / OutputsFolderName.NODE_ARTIFACTS + + def persist_node_run(self, run_info: NodeRunInfo): + super().persist_node_run(run_info) + node_folder = self._node_artifacts_path / str(run_info.index) / run_info.node + multimedia_processor = MultimediaProcessor.create(run_info.message_format) + multimedia_processor.process_multimedia_in_run_info(run_info, node_folder) + + def persist_flow_run(self, run_info: FlowRunInfo): + super().persist_flow_run(run_info) + flow_folder = self._flow_artifacts_path / str(run_info.index) + multimedia_processor = MultimediaProcessor.create(run_info.message_format) + multimedia_processor.process_multimedia_in_run_info(run_info, flow_folder) diff --git a/src/promptflow/promptflow/storage/_run_storage.py b/src/promptflow-core/promptflow/storage/_run_storage.py similarity index 88% rename from src/promptflow/promptflow/storage/_run_storage.py rename to src/promptflow-core/promptflow/storage/_run_storage.py index 5a1dcf85cca..c81e942b9d8 100644 --- a/src/promptflow/promptflow/storage/_run_storage.py +++ b/src/promptflow-core/promptflow/storage/_run_storage.py @@ -2,12 +2,10 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from functools import partial from pathlib import Path from typing import Union -from promptflow._utils.multimedia_utils import _process_recursively, get_file_reference_encoder -from promptflow.contracts.multimedia import Image +from promptflow._utils.multimedia_utils import MultimediaProcessor from promptflow.contracts.run_info import FlowRunInfo from promptflow.contracts.run_info import RunInfo as NodeRunInfo @@ -78,15 +76,16 @@ def persist_run_info(self, run_info: Union[FlowRunInfo, NodeRunInfo]): :param run_info: The run info of the node or flow. :type run_info: ~promptflow.contracts.run_info.RunInfo or ~promptflow.contracts.run_info.FlowRunInfo """ + multimedia_processor = MultimediaProcessor.create(run_info.message_format) # Persist and convert images in inputs to path dictionaries. # This replaces any image objects with their corresponding file path dictionaries. if run_info.inputs: - run_info.inputs = self._persist_and_convert_images_to_path_dicts(run_info.inputs) + run_info.inputs = self._persist_and_convert_images_to_path_dicts(multimedia_processor, run_info.inputs) # Persist and convert images in output to path dictionaries. # This replaces any image objects with their corresponding file path dictionaries. if run_info.output: - serialized_output = self._persist_and_convert_images_to_path_dicts(run_info.output) + serialized_output = self._persist_and_convert_images_to_path_dicts(multimedia_processor, run_info.output) run_info.output = serialized_output run_info.result = serialized_output @@ -96,7 +95,9 @@ def persist_run_info(self, run_info: Union[FlowRunInfo, NodeRunInfo]): # consumed. It is crucial to process the api_calls list in place to avoid losing the reference to the list that # holds the generator items, which is essential for tracing generator execution. if run_info.api_calls: - run_info.api_calls = self._persist_and_convert_images_to_path_dicts(run_info.api_calls, inplace=True) + run_info.api_calls = self._persist_and_convert_images_to_path_dicts( + multimedia_processor, run_info.api_calls, inplace=True + ) def persist_node_run(self, run_info: NodeRunInfo): """Persist the multimedia data in node run info after the node is executed. @@ -116,7 +117,9 @@ def persist_flow_run(self, run_info: FlowRunInfo): """ self.persist_run_info(run_info) - def _persist_and_convert_images_to_path_dicts(self, value, inplace=False): + def _persist_and_convert_images_to_path_dicts( + self, multimedia_processor: MultimediaProcessor, value, inplace=False + ): """Persist image objects within a Python object to disk and convert them to path dictionaries. This function recursively processes a given Python object, which can be a list, a dictionary, or a nested @@ -138,12 +141,6 @@ def _persist_and_convert_images_to_path_dicts(self, value, inplace=False): the conversions. :rtype: Any """ - if self._base_dir: - pfbytes_file_reference_encoder = get_file_reference_encoder( - folder_path=self._base_dir, - relative_path=self._sub_dir, - ) - else: - pfbytes_file_reference_encoder = None - serialization_funcs = {Image: partial(Image.serialize, **{"encoder": pfbytes_file_reference_encoder})} - return _process_recursively(value, process_funcs=serialization_funcs, inplace=inplace) + return multimedia_processor.persist_multimedia_data( + value, base_dir=self._base_dir, sub_dir=self._sub_dir, inplace=inplace + ) diff --git a/src/promptflow/promptflow/storage/run_records.py b/src/promptflow-core/promptflow/storage/run_records.py similarity index 98% rename from src/promptflow/promptflow/storage/run_records.py rename to src/promptflow-core/promptflow/storage/run_records.py index da33e4eb4cd..b794854eb85 100644 --- a/src/promptflow/promptflow/storage/run_records.py +++ b/src/promptflow-core/promptflow/storage/run_records.py @@ -6,8 +6,8 @@ from dataclasses import asdict, dataclass from datetime import datetime -from promptflow._utils.dataclass_serializer import serialize from promptflow.contracts.run_info import FlowRunInfo, RunInfo +from promptflow.tracing._utils import serialize @dataclass diff --git a/src/promptflow-core/pyproject.toml b/src/promptflow-core/pyproject.toml new file mode 100644 index 00000000000..e6535cb5c32 --- /dev/null +++ b/src/promptflow-core/pyproject.toml @@ -0,0 +1,135 @@ +[tool.poetry] +name = "promptflow-core" +version = "1.1.0.dev0" +description = "Prompt flow core" +include = [ + "promptflow/core/_serving/static/*", + "promptflow/core/_serving/resources/*", + "promptflow/_core/data/tool.schema.json", +] + +license = "MIT" + +authors = [ + "Microsoft Corporation " +] + +repository = "https://github.com/microsoft/promptflow" +homepage = "https://microsoft.github.io/promptflow/" + +readme = ["README.md"] +keywords = ["core"] + +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +packages = [ + { include = "promptflow" } +] + +[tool.poetry.urls] +"Bug Reports" = "https://github.com/microsoft/promptflow/issues" + +[tool.poetry.dependencies] +python = "<4.0,>=3.8" +promptflow-tracing = ">=1.0.0,<2.0.0" +"ruamel.yaml" = ">=0.17.10,<1.0.0" # used to generate connection templates with preserved comments +docutils = "*" # used to generate description for tools +psutil = "*" # promptflow/_utils/process_utils.py +jsonschema = ">=4.0.0,<5.0.0" # used to validate tool +filetype = ">=1.2.0" # used to detect the mime type for multi-media input +flask = ">=2.2.3,<4.0.0" # Serving endpoint requirements +python-dateutil = ">=2.1.0,<3.0.0" # Contracts RunInfo +# ========executor-service dependencies======== +fastapi = ">=0.109.0,<1.0.0" # used to build web executor server +# ========azureml-serving dependencies======== +# AzureML connection dependencies +azure-identity = ">=1.12.0,<2.0.0" +azure-ai-ml = ">=1.14.0,<2.0.0" +# MDC dependencies for monitoring +azureml-ai-monitoring = ">=0.1.0b3,<1.0.0" + +[tool.poetry.extras] +executor-service = ["fastapi"] +azureml-serving = ["azure-identity", "azure-ai-ml", "azureml-ai-monitoring"] + +[tool.poetry.group.dev.dependencies] +pre-commit = "*" +import-linter = "*" + +[tool.poetry.group.test.dependencies] +pytest = "*" +pytest-cov = "*" +pytest-xdist = "*" + +[build-system] +requires = [ + "poetry-core>=1.5.0", +] +build-backend = "poetry.core.masonry.api" + +[tool.pytest.ini_options] +markers = [ + "unittest", + "e2etest", +] +# junit - analyse and publish test results (https://github.com/EnricoMi/publish-unit-test-result-action) +# durations - list the slowest test durations +addopts = """ +--junit-xml=test-results.xml \ +--dist loadfile \ +--log-level=info \ +--log-format="%(asctime)s %(levelname)s %(message)s" \ +--log-date-format="[%Y-%m-%d %H:%M:%S]" \ +--durations=5 \ +-ra \ +-vv +""" +testpaths = ["tests"] + +[tool.coverage.run] +concurrency = ["multiprocessing"] +source = ["promptflow"] +omit = [ + "__init__.py", +] + +[tool.black] +line-length = 120 + +[tool.importlinter] +root_package = "promptflow" +include_external_packages = "True" + +[[tool.importlinter.contracts]] +name = "Contract forbidden modules" +type = "forbidden" +source_modules = [ + "promptflow.core", + "promptflow._core", + "promptflow._utils", + "promptflow.connections", + "promptflow.contracts", + "promptflow.executor", + "promptflow.integrations", + "promptflow.storage"] +forbidden_modules = [ + "promptflow._cli", + "promptflow._internal", + "promptflow._proxy", + "promptflow._sdk", + "promptflow.batch", + "promptflow.client", + "promptflow.entities", + "promptflow.operations", + "promptflow.azure" +] diff --git a/src/promptflow/tests/executor/unittests/processpool/__init__.py b/src/promptflow-core/tests/__init__.py similarity index 100% rename from src/promptflow/tests/executor/unittests/processpool/__init__.py rename to src/promptflow-core/tests/__init__.py diff --git a/src/promptflow-core/tests/conftest.py b/src/promptflow-core/tests/conftest.py new file mode 100644 index 00000000000..be65f32bf19 --- /dev/null +++ b/src/promptflow-core/tests/conftest.py @@ -0,0 +1,15 @@ +from pathlib import Path + +TEST_CONFIG_ROOT = Path(__file__).parent.parent.parent / "promptflow" / "tests" / "test_configs" +FLOW_ROOT = TEST_CONFIG_ROOT / "flows" +EAGER_FLOW_ROOT = TEST_CONFIG_ROOT / "eager_flows" + + +def get_flow_folder(folder_name, root: str = FLOW_ROOT) -> Path: + flow_folder_path = Path(root) / folder_name + return flow_folder_path + + +def get_yaml_file(folder_name, root: str = FLOW_ROOT, file_name: str = "flow.dag.yaml") -> Path: + yaml_file = get_flow_folder(folder_name, root) / file_name + return yaml_file diff --git a/src/promptflow-core/tests/core/__init__.py b/src/promptflow-core/tests/core/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/promptflow-core/tests/core/e2etests/__init__.py b/src/promptflow-core/tests/core/e2etests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/promptflow-core/tests/core/e2etests/test_eager_flow.py b/src/promptflow-core/tests/core/e2etests/test_eager_flow.py new file mode 100644 index 00000000000..a6f0aebd3a0 --- /dev/null +++ b/src/promptflow-core/tests/core/e2etests/test_eager_flow.py @@ -0,0 +1,99 @@ +from dataclasses import is_dataclass + +import pytest + +from promptflow._core.tool_meta_generator import PythonLoadError +from promptflow.contracts.run_info import Status +from promptflow.executor._errors import FlowEntryInitializationError +from promptflow.executor._result import LineResult +from promptflow.executor._script_executor import ScriptExecutor +from promptflow.executor.flow_executor import FlowExecutor + +from ...conftest import EAGER_FLOW_ROOT, get_yaml_file + +SAMPLE_FLOW = "web_classification_no_variants" +SAMPLE_EVAL_FLOW = "classification_accuracy_evaluation" +SAMPLE_FLOW_WITH_PARTIAL_FAILURE = "python_tool_partial_failure" + + +@pytest.mark.e2etest +class TestEagerFlow: + @pytest.mark.parametrize( + "flow_folder, inputs, ensure_output, init_kwargs", + [ + ("dummy_flow_with_trace", {"text": "text", "models": ["model"]}, lambda x: x == "dummy_output", None), + ( + "flow_with_dataclass_output", + {"text": "text", "models": ["model"]}, + lambda x: is_dataclass(x) and x.text == "text" and x.models == ["model"], + None, + ), + ( + "basic_callable_class", + {"func_input": "func_input"}, + lambda x: x["func_input"] == "func_input", + {"obj_input": "obj_input"}, + ), + ], + ) + def test_flow_run(self, flow_folder, inputs, ensure_output, init_kwargs): + flow_file = get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT) + + # Test submitting eager flow to script executor + executor = ScriptExecutor(flow_file=flow_file, init_kwargs=init_kwargs) + line_result = executor.exec_line(inputs=inputs, index=0) + assert isinstance(line_result, LineResult) + assert ensure_output(line_result.output) + + # Test submitting eager flow to flow executor + executor = FlowExecutor.create(flow_file=flow_file, connections={}, init_kwargs=init_kwargs) + line_result1 = executor.exec_line(inputs=inputs, index=0) + assert isinstance(line_result1, LineResult) + assert ensure_output(line_result1.output) + + # run the same line again will get same output + line_result2 = executor.exec_line(inputs=inputs, index=0) + assert line_result1.output == line_result2.output + + def test_flow_run_with_invalid_case(self): + flow_folder = "dummy_flow_with_exception" + flow_file = get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT) + executor = ScriptExecutor(flow_file=flow_file) + line_result = executor.exec_line(inputs={"text": "text"}, index=0) + + assert isinstance(line_result, LineResult) + assert line_result.output is None + assert line_result.run_info.status == Status.Failed + assert "dummy exception" in line_result.run_info.error["message"] + + def test_flow_with_operation_context(self): + flow_folder = "flow_with_operation_context" + flow_file = get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT) + executor = FlowExecutor.create(flow_file=flow_file, connections={}) + line_result = executor.exec_line(inputs={}, index=0) + + assert isinstance(line_result, LineResult) + assert line_result.run_info.status == Status.Completed + assert line_result.output["flow-id"] == line_result.run_info.flow_id + assert line_result.output["root-run-id"] == line_result.run_info.root_run_id + + def test_execute_init_func_with_user_error(self): + flow_folder = "callable_flow_with_init_exception" + flow_file = get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT) + with pytest.raises(FlowEntryInitializationError) as e: + ScriptExecutor(flow_file=flow_file, init_kwargs={}) + assert "Failed to initialize flow entry with" in str(e.value) + + @pytest.mark.parametrize( + "flow_folder, expected_exception, expected_error_msg", + [ + ("callable_flow_with_init_exception", FlowEntryInitializationError, "Failed to initialize flow entry with"), + ("invalid_illegal_entry", PythonLoadError, "Failed to load python module for"), + ("incorrect_entry", PythonLoadError, "Failed to load python module for"), + ], + ) + def test_execute_func_with_user_error(self, flow_folder, expected_exception, expected_error_msg): + flow_file = get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT) + with pytest.raises(expected_exception) as e: + ScriptExecutor(flow_file=flow_file) + assert expected_error_msg in str(e.value) diff --git a/src/promptflow-core/tests/core/unittests/__init__.py b/src/promptflow-core/tests/core/unittests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/promptflow-core/tests/core/unittests/test_basic.py b/src/promptflow-core/tests/core/unittests/test_basic.py new file mode 100644 index 00000000000..d5a9af51443 --- /dev/null +++ b/src/promptflow-core/tests/core/unittests/test_basic.py @@ -0,0 +1,19 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import pytest + +from promptflow._utils.user_agent_utils import append_promptflow_package_ua +from promptflow.tracing._operation_context import OperationContext + + +@pytest.mark.unittest +class TestBasic: + def test_import(self): + assert True + + def test_package_ua(self): + opc = OperationContext() + append_promptflow_package_ua(opc) + assert "promptflow-core" in opc.user_agent diff --git a/src/promptflow-devkit/README.md b/src/promptflow-devkit/README.md new file mode 100644 index 00000000000..b6f918fd93e --- /dev/null +++ b/src/promptflow-devkit/README.md @@ -0,0 +1,43 @@ +# Prompt flow devkit + +[![Python package](https://img.shields.io/pypi/v/promptflow-devkit)](https://pypi.org/project/promptflow-devkit/) +[![Python](https://img.shields.io/pypi/pyversions/promptflow.svg?maxAge=2592000)](https://pypi.python.org/pypi/promptflow-devkit/) +[![PyPI - Downloads](https://img.shields.io/pypi/dm/promptflow-devkit)](https://pypi.org/project/promptflow-devkit/) +[![CLI](https://img.shields.io/badge/CLI-reference-blue)](https://microsoft.github.io/promptflow/reference/pf-command-reference.html) +[![SDK](https://img.shields.io/badge/SDK-reference-blue)](https://microsoft.github.io/promptflow/reference/python-library-reference/promptflow-devkit/promptflow.client.html) +[![vsc extension](https://img.shields.io/visual-studio-marketplace/i/prompt-flow.prompt-flow?logo=Visual%20Studio&label=Extension%20)](https://marketplace.visualstudio.com/items?itemName=prompt-flow.prompt-flow) + +[![Doc](https://img.shields.io/badge/Doc-online-green)](https://microsoft.github.io/promptflow/index.html) +[![Issue](https://img.shields.io/github/issues/microsoft/promptflow)](https://github.com/microsoft/promptflow/issues/new/choose) +[![Discussions](https://img.shields.io/github/discussions/microsoft/promptflow)](https://github.com/microsoft/promptflow/issues/new/choose) +[![CONTRIBUTING](https://img.shields.io/badge/Contributing-8A2BE2)](https://github.com/microsoft/promptflow/blob/main/CONTRIBUTING.md) +[![License: MIT](https://img.shields.io/github/license/microsoft/promptflow)](https://github.com/microsoft/promptflow/blob/main/LICENSE) + +> Welcome to join us to make prompt flow better by +> participating [discussions](https://github.com/microsoft/promptflow/discussions), +> opening [issues](https://github.com/microsoft/promptflow/issues/new/choose), +> submitting [PRs](https://github.com/microsoft/promptflow/pulls). + +## Introduction + +The `promptflow-devkit` is a subpackage of [`promptflow`](https://pypi.org/project/promptflow). It contains features like : + +- **Create and iteratively develop flow** + - Debug and iterate your flows, especially the [interaction with LLMs](https://microsoft.github.io/promptflow/concepts/concept-connections.html) with ease. + - Provide Tracing collector and UI to help user achieve comprehensive observability of their LLM applications. +- **Evaluate flow quality and performance** + - Evaluate your flow's quality and performance with larger datasets. + - Integrate the testing and evaluation into your CI/CD system to ensure quality of your flow. +- **Streamlined development cycle for production** + - Deploy your flow to the serving platform you choose or integrate into your app's code base easily. + + +NOTE: +- For users seeking a **minimal** dependency to execute a flow in serving or cloud run scenarios, consider installing the `promptflow-core` package. This package equips you with the fundamental features necessary for executing a `flow` in prompt flow. +- For users need to leverage the cloud version of [prompt flow in Azure AI](https://learn.microsoft.com/en-us/azure/machine-learning/prompt-flow/overview-what-is-prompt-flow?view=azureml-api-2), please install the `promptflow-azure` package. + +# Release History + +## 0.1.0b1 (Upcoming) + +- Stub version in PyPI. diff --git a/src/promptflow/promptflow/_sdk/_serving/extension/__init__.py b/src/promptflow-devkit/promptflow/_cli/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_serving/extension/__init__.py rename to src/promptflow-devkit/promptflow/_cli/__init__.py diff --git a/src/promptflow/promptflow/_cli/_params.py b/src/promptflow-devkit/promptflow/_cli/_params.py similarity index 96% rename from src/promptflow/promptflow/_cli/_params.py rename to src/promptflow-devkit/promptflow/_cli/_params.py index 47fdad9ec2f..b72434fa778 100644 --- a/src/promptflow/promptflow/_cli/_params.py +++ b/src/promptflow-devkit/promptflow/_cli/_params.py @@ -16,7 +16,7 @@ def __call__(self, parser, namespace, values, option_string=None): super(AppendToDictAction, self).__call__(parser, namespace, action, option_string) def get_action(self, values, option_string): # pylint: disable=no-self-use - from promptflow._sdk._utils import strip_quotation + from promptflow._utils.utils import strip_quotation kwargs = {} for item in values: @@ -334,3 +334,14 @@ def add_param_flow_name(parser): required=True, help="The name of the flow.", ) + + +def add_param_init(parser): + parser.add_argument( + "--init", + action=FlowTestInputAction, + help="Callable class initialization params. " + "Only valid when provided flow is a flex flow with callable class entry. " + "Example: --init param1=val1 param2=val2", + nargs="+", + ) diff --git a/src/promptflow/promptflow/_sdk/_serving/monitor/__init__.py b/src/promptflow-devkit/promptflow/_cli/_pf/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_serving/monitor/__init__.py rename to src/promptflow-devkit/promptflow/_cli/_pf/__init__.py diff --git a/src/promptflow/promptflow/_cli/_pf/_config.py b/src/promptflow-devkit/promptflow/_cli/_pf/_config.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf/_config.py rename to src/promptflow-devkit/promptflow/_cli/_pf/_config.py diff --git a/src/promptflow/promptflow/_cli/_pf/_connection.py b/src/promptflow-devkit/promptflow/_cli/_pf/_connection.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf/_connection.py rename to src/promptflow-devkit/promptflow/_cli/_pf/_connection.py diff --git a/src/promptflow/promptflow/_cli/_pf/_experiment.py b/src/promptflow-devkit/promptflow/_cli/_pf/_experiment.py similarity index 92% rename from src/promptflow/promptflow/_cli/_pf/_experiment.py rename to src/promptflow-devkit/promptflow/_cli/_pf/_experiment.py index 38a72c2a534..f617c6cc10e 100644 --- a/src/promptflow/promptflow/_cli/_pf/_experiment.py +++ b/src/promptflow-devkit/promptflow/_cli/_pf/_experiment.py @@ -30,10 +30,14 @@ def _get_pf_client(): return _client -def add_param_template(parser): +def add_param_template_required(parser): parser.add_argument("--template", type=str, required=True, help="The experiment template path.") +def add_param_template(parser): + parser.add_argument("--template", type=str, help="The experiment template path.") + + def add_param_name(parser): parser.add_argument("--name", "-n", type=str, help="The experiment name.") @@ -68,7 +72,7 @@ def add_experiment_create(subparsers): # Create an experiment from a template: pf experiment create --template flow.exp.yaml """ - add_params = [add_param_template, add_param_name] + base_params + add_params = [add_param_template_required, add_param_name] + base_params create_parser = activate_action( name="create", @@ -131,13 +135,13 @@ def add_experiment_start(subparsers): # Start a named experiment: pf experiment start -n my_experiment --inputs data1=data1_val data2=data2_val # Run an experiment by yaml file: - pf experiment start --file path/to/my_experiment.exp.yaml --inputs data1=data1_val data2=data2_val + pf experiment start --template path/to/my_experiment.exp.yaml --inputs data1=data1_val data2=data2_val """ activate_action( name="start", description="Start an experiment.", epilog=epilog, - add_params=[add_param_name, add_param_file, add_param_input, add_param_stream] + base_params, + add_params=[add_param_name, add_param_template, add_param_input, add_param_stream] + base_params, subparsers=subparsers, help_message="Start an experiment.", action_param_name="sub_action", @@ -235,20 +239,18 @@ def start_experiment(args: argparse.Namespace): if args.name: logger.debug(f"Starting a named experiment {args.name}.") inputs = list_of_dict_to_dict(args.inputs) - if inputs: - logger.warning("The inputs of named experiment cannot be modified.") client = _get_pf_client() experiment = client._experiments.get(args.name) - result = client._experiments.start(experiment=experiment, stream=args.stream) - elif args.file: + result = client._experiments.start(experiment=experiment, inputs=inputs, stream=args.stream) + elif args.template: from promptflow._sdk._load_functions import _load_experiment - logger.debug(f"Starting an anonymous experiment {args.file}.") - experiment = _load_experiment(source=args.file) + logger.debug(f"Starting an anonymous experiment {args.template}.") + experiment = _load_experiment(source=args.template) inputs = list_of_dict_to_dict(args.inputs) result = _get_pf_client()._experiments.start(experiment=experiment, inputs=inputs, stream=args.stream) else: - raise UserErrorException("To start an experiment, one of [name, file] must be specified.") + raise UserErrorException("To start an experiment, one of [name, template] must be specified.") print(json.dumps(result._to_dict(), indent=4)) diff --git a/src/promptflow/promptflow/_cli/_pf/_flow.py b/src/promptflow-devkit/promptflow/_cli/_pf/_flow.py similarity index 93% rename from src/promptflow/promptflow/_cli/_pf/_flow.py rename to src/promptflow-devkit/promptflow/_cli/_pf/_flow.py index 915b7d07af1..fc2282607c6 100644 --- a/src/promptflow/promptflow/_cli/_pf/_flow.py +++ b/src/promptflow-devkit/promptflow/_cli/_pf/_flow.py @@ -12,6 +12,7 @@ import tempfile import webbrowser from pathlib import Path +from urllib.parse import urlencode, urlunparse from promptflow._cli._params import ( add_param_config, @@ -19,6 +20,7 @@ add_param_environment_variables, add_param_flow_display_name, add_param_function, + add_param_init, add_param_inputs, add_param_prompt_template, add_param_source, @@ -31,16 +33,16 @@ ChatFlowDAGGenerator, FlowDAGGenerator, OpenAIConnectionGenerator, - StreamlitFileReplicator, ToolMetaGenerator, ToolPyGenerator, copy_extra_files, ) from promptflow._cli._utils import _copy_to_flow, activate_action, confirm, inject_sys_path, list_of_dict_to_dict -from promptflow._constants import FlowLanguage +from promptflow._constants import ConnectionProviderConfig, FlowLanguage from promptflow._sdk._configuration import Configuration -from promptflow._sdk._constants import PROMPT_FLOW_DIR_NAME, ConnectionProvider +from promptflow._sdk._constants import PROMPT_FLOW_DIR_NAME from promptflow._sdk._pf_client import PFClient +from promptflow._sdk._service.utils.utils import encrypt_flow_path from promptflow._sdk.operations._flow_operations import FlowOperations from promptflow._utils.logger_utils import get_cli_sdk_logger from promptflow.exceptions import ErrorTarget, UserErrorException @@ -162,6 +164,7 @@ def add_parser_serve_flow(subparsers): add_param_environment_variables, add_param_config, add_param_skip_browser, + add_param_init, ] + base_params, subparsers=subparsers, @@ -328,7 +331,7 @@ def _init_chat_flow(flow_name, flow_path, connection=None, deployment=None): deployment = deployment or DEFAULT_DEPLOYMENT ChatFlowDAGGenerator(connection=connection, deployment=deployment).generate_to_file(flow_path / "flow.dag.yaml") # When customer not configure the remote connection provider, create connection yaml to chat flow. - is_local_connection = Configuration.get_instance().get_connection_provider() == ConnectionProvider.LOCAL + is_local_connection = Configuration.get_instance().get_connection_provider() == ConnectionProviderConfig.LOCAL if is_local_connection: OpenAIConnectionGenerator(connection=connection).generate_to_file(flow_path / "openai.yaml") AzureOpenAIConnectionGenerator(connection=connection).generate_to_file(flow_path / "azure_openai.yaml") @@ -393,7 +396,7 @@ def test_flow(args): _test_flow_experiment(args, pf_client, inputs, environment_variables) return if args.multi_modal or args.ui: - _test_flow_multi_modal(args, pf_client) + _test_flow_multi_modal(args) return if args.interactive: _test_flow_interactive(args, pf_client, inputs, environment_variables) @@ -420,26 +423,24 @@ def _build_inputs_for_flow_test(args): return inputs -def _test_flow_multi_modal(args, pf_client): +def _test_flow_multi_modal(args): """Test flow with multi modality mode.""" from promptflow._sdk._load_functions import load_flow - - with tempfile.TemporaryDirectory() as temp_dir: - flow = load_flow(args.flow) - - script_path = [ - os.path.join(temp_dir, "main.py"), - os.path.join(temp_dir, "utils.py"), - os.path.join(temp_dir, "logo.png"), - ] - for script in script_path: - StreamlitFileReplicator( - flow_name=flow.display_name if flow.display_name else flow.name, - flow_dag_path=flow.flow_dag_path, - ).generate_to_file(script) - main_script_path = os.path.join(temp_dir, "main.py") - logger.info("Start streamlit with main script generated at: %s", main_script_path) - pf_client.flows._chat_with_ui(script=main_script_path, skip_open_browser=args.skip_open_browser) + from promptflow._sdk._tracing import _invoke_pf_svc + + # Todo: use base64 encode for now, will consider whether need use encryption or use db to store flow path info + def generate_url(flow_path, port): + encrypted_flow_path = encrypt_flow_path(flow_path) + query_params = urlencode({"flow": encrypted_flow_path}) + return urlunparse(("http", f"127.0.0.1:{port}", "/v1.0/ui/chat", "", query_params, "")) + + pfs_port = _invoke_pf_svc() + flow = load_flow(args.flow) + flow_dir = os.path.abspath(flow.code) + chat_page_url = generate_url(flow_dir, pfs_port) + print(f"You can begin chat flow on {chat_page_url}") + if not args.skip_open_browser: + webbrowser.open(chat_page_url) def _test_flow_interactive(args, pf_client, inputs, environment_variables): @@ -512,7 +513,7 @@ def serve_flow(args): def serve_flow_csharp(args, source): - from promptflow.batch._csharp_executor_proxy import EXECUTOR_SERVICE_DLL + from promptflow._proxy._csharp_executor_proxy import EXECUTOR_SERVICE_DLL try: # Change working directory to model dir @@ -540,7 +541,7 @@ def serve_flow_csharp(args, source): def _resolve_python_flow_additional_includes(source) -> Path: # Resolve flow additional includes - from promptflow import load_flow + from promptflow.client import load_flow flow = load_flow(source) with FlowOperations._resolve_additional_includes(flow.path) as resolved_flow_path: @@ -556,12 +557,16 @@ def _resolve_python_flow_additional_includes(source) -> Path: def serve_flow_python(args, source): - from promptflow._sdk._serving.app import create_app + from promptflow._sdk._configuration import Configuration + from promptflow.core._serving.app import create_app static_folder = args.static_folder if static_folder: static_folder = Path(static_folder).absolute().as_posix() config = list_of_dict_to_dict(args.config) + pf_config = Configuration(overrides=config) + logger.info(f"Promptflow config: {pf_config}") + connection_provider = pf_config.get_connection_provider() source = _resolve_python_flow_additional_includes(source) os.environ["PROMPTFLOW_PROJECT_PATH"] = source.absolute().as_posix() logger.info(f"Change working directory to model dir {source}") @@ -569,7 +574,8 @@ def serve_flow_python(args, source): app = create_app( static_folder=static_folder, environment_variables=list_of_dict_to_dict(args.environment_variables), - config=config, + connection_provider=connection_provider, + inits=list_of_dict_to_dict(args.inits), ) if not args.skip_open_browser: target = f"http://{args.host}:{args.port}" diff --git a/src/promptflow/promptflow/_cli/_pf/_init_entry_generators.py b/src/promptflow-devkit/promptflow/_cli/_pf/_init_entry_generators.py similarity index 99% rename from src/promptflow/promptflow/_cli/_pf/_init_entry_generators.py rename to src/promptflow-devkit/promptflow/_cli/_pf/_init_entry_generators.py index 615c096e25e..4068a7dee31 100644 --- a/src/promptflow/promptflow/_cli/_pf/_init_entry_generators.py +++ b/src/promptflow-devkit/promptflow/_cli/_pf/_init_entry_generators.py @@ -13,7 +13,7 @@ from jinja2 import Environment, Template, meta from promptflow._sdk._constants import DEFAULT_ENCODING -from promptflow._sdk.operations._flow_operations import FlowOperations +from promptflow._utils.flow_utils import is_executable_chat_flow from promptflow._utils.logger_utils import get_cli_sdk_logger from promptflow.contracts.flow import Flow as ExecutableFlow from promptflow.exceptions import UserErrorException @@ -231,7 +231,7 @@ def __init__(self, flow_name, flow_dag_path): self.executable = ExecutableFlow.from_yaml( flow_file=Path(self.flow_dag_path.name), working_dir=self.flow_dag_path.parent ) - self.is_chat_flow, self.chat_history_input_name, error_msg = FlowOperations._is_chat_flow(self.executable) + self.is_chat_flow, self.chat_history_input_name, error_msg = is_executable_chat_flow(self.executable) @property def flow_inputs(self): diff --git a/src/promptflow/promptflow/_cli/_pf/_run.py b/src/promptflow-devkit/promptflow/_cli/_pf/_run.py similarity index 98% rename from src/promptflow/promptflow/_cli/_pf/_run.py rename to src/promptflow-devkit/promptflow/_cli/_pf/_run.py index a40dace2681..4c68dca3c09 100644 --- a/src/promptflow/promptflow/_cli/_pf/_run.py +++ b/src/promptflow-devkit/promptflow/_cli/_pf/_run.py @@ -13,6 +13,7 @@ add_param_connections, add_param_environment_variables, add_param_include_archived, + add_param_init, add_param_max_results, add_param_output_format, add_param_run_name, @@ -111,6 +112,7 @@ def add_run_create_common(subparsers, add_param_list, epilog: Optional[str] = No add_param_connections, add_param_set, add_param_resume_from, + add_param_init, ] + base_params add_params.extend(add_param_list) @@ -142,6 +144,8 @@ def add_run_create(subparsers): pf run create --resume-from # Create a run resume from an existing run, set the name, display_name, description and tags: pf run create --resume-from --name --set display_name='A new run' description='my run description' tags.Type=Test +# Create a run with init kwargs: +pf run create -f --init key1=value1 key2=value2 """ # data for pf has different help doc than pfazure @@ -583,6 +587,7 @@ def create_run(create_func: Callable, resume_func: Callable, args): environment_variables = args.environment_variables connections = args.connections resume_from = args.resume_from + init = args.init params_override = args.params_override or [] if environment_variables: @@ -591,6 +596,8 @@ def create_run(create_func: Callable, resume_func: Callable, args): connections = list_of_dict_to_nested_dict(connections) if column_mapping: column_mapping = list_of_dict_to_dict(column_mapping) + if init: + init = list_of_dict_to_dict(init) run_params = { "name": name, @@ -602,6 +609,7 @@ def create_run(create_func: Callable, resume_func: Callable, args): "environment_variables": environment_variables, "connections": connections, "resume_from": resume_from, + "init": init, } # remove empty fields run_params = {k: v for k, v in run_params.items() if v is not None} @@ -635,7 +643,7 @@ def _build_run_obj(): logger.debug(f"resume_from specified, append params override {params_override} to run params.") run_params.update(list_of_dict_to_nested_dict(params_override)) logger.debug(f"Run params: {run_params}") - run = resume_func(**run_params) + run = resume_func(**run_params, stream=stream) else: run = create_func(run=_build_run_obj(), stream=stream) if stream: diff --git a/src/promptflow-devkit/promptflow/_cli/_pf/_service.py b/src/promptflow-devkit/promptflow/_cli/_pf/_service.py new file mode 100644 index 00000000000..f543beecf95 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_cli/_pf/_service.py @@ -0,0 +1,286 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import argparse +import logging +import os +import platform +import subprocess +import sys + +import waitress + +from promptflow._cli._params import base_params +from promptflow._cli._utils import activate_action +from promptflow._constants import PF_NO_INTERACTIVE_LOGIN +from promptflow._sdk._constants import ( + HOME_PROMPT_FLOW_DIR, + PF_SERVICE_DEBUG, + PF_SERVICE_LOG_FILE, + PF_SERVICE_WORKER_NUM, +) +from promptflow._sdk._service.app import create_app +from promptflow._sdk._service.utils.utils import ( + check_pfs_service_status, + dump_port_to_config, + get_current_env_pfs_file, + get_port_from_config, + get_started_service_info, + is_port_in_use, + is_run_from_built_binary, + kill_exist_service, +) +from promptflow._sdk._utils import get_promptflow_sdk_version +from promptflow._utils.logger_utils import get_cli_sdk_logger # noqa: E402 +from promptflow.exceptions import UserErrorException + +logger = get_cli_sdk_logger() + + +app = None + + +def get_app(environ, start_response): + global app + if app is None: + app, _ = create_app() + if os.environ.get(PF_SERVICE_DEBUG) == "true": + app.logger.setLevel(logging.DEBUG) + else: + app.logger.setLevel(logging.INFO) + return app.wsgi_app(environ, start_response) + + +def add_service_parser(subparsers): + """Add service parser to the pf subparsers.""" + service_parser = subparsers.add_parser( + "service", + description="Manage the PromptFlow service, which offers chat and trace UI functionalities.", + help="pf service", + ) + service_subparsers = service_parser.add_subparsers() + add_parser_start_service(service_subparsers) + add_parser_stop_service(service_subparsers) + add_parser_show_service(service_subparsers) + service_parser.set_defaults(action="service") + + +def dispatch_service_commands(args: argparse.Namespace): + if args.sub_action == "start": + start_service(args) + elif args.sub_action == "stop": + stop_service() + elif args.sub_action == "show-status": + show_service() + + +def add_parser_start_service(subparsers): + """Add service start parser to the pf service subparsers.""" + epilog = """ + Examples: + + # Start promptflow service: + pf service start + # Force restart promptflow service: + pf service start --force + # Start promptflow service with specific port: + pf service start --port 65553 + """ # noqa: E501 + add_param_port = lambda parser: parser.add_argument( # noqa: E731 + "-p", "--port", type=int, help="port of the promptflow service" + ) + add_param_force = lambda parser: parser.add_argument( # noqa: E731 + "--force", + action="store_true", + help="If the port is used, the existing service will be terminated and restart a new service.", + ) + activate_action( + name="start", + description="Start promptflow service.", + epilog=epilog, + add_params=[ + add_param_port, + add_param_force, + ] + + base_params, + subparsers=subparsers, + help_message="pf service start", + action_param_name="sub_action", + ) + + +def add_parser_stop_service(subparsers): + """Add service stop parser to the pf service subparsers.""" + epilog = """ + Examples: + + # Stop promptflow service: + pf service stop + """ # noqa: E501 + activate_action( + name="stop", + description="Stop promptflow service.", + epilog=epilog, + add_params=base_params, + subparsers=subparsers, + help_message="pf service stop", + action_param_name="sub_action", + ) + + +def add_parser_show_service(subparsers): + """Add service show parser to the pf service subparsers.""" + epilog = """ + Examples: + + # Display the started promptflow service info.: + pf service show-status + """ # noqa: E501 + activate_action( + name="show-status", + description="Display the started promptflow service info.", + epilog=epilog, + add_params=base_params, + subparsers=subparsers, + help_message="pf service show-status", + action_param_name="sub_action", + ) + + +def start_service(args): + # User Agent will be set based on header in request, so not set globally here. + os.environ[PF_NO_INTERACTIVE_LOGIN] = "true" + port = args.port + if args.debug: + os.environ[PF_SERVICE_DEBUG] = "true" + + def validate_port(port, force_start): + if is_port_in_use(port): + if force_start: + message = f"Force restart the service on the port {port}." + print(message) + logger.warning(message) + kill_exist_service(port) + else: + logger.warning(f"Service port {port} is used.") + raise UserErrorException(f"Service port {port} is used.") + + if is_run_from_built_binary(): + # For msi installer, use vbs to start pfs in a hidden window. But it doesn't support redirect output in the + # hidden window to terminal. So we redirect output to a file. And then print the file content to terminal in + # pfs.bat. + old_stdout = sys.stdout + old_stderr = sys.stderr + parent_dir = os.path.dirname(sys.executable) + sys.stdout = open(os.path.join(parent_dir, "output.txt"), "w") + sys.stderr = sys.stdout + if port: + dump_port_to_config(port) + validate_port(port, args.force) + else: + port = get_port_from_config(create_if_not_exists=True) + validate_port(port, args.force) + + if is_run_from_built_binary(): + # For msi installer, use sdk api to start pfs since it's not supported to invoke waitress by cli directly + # after packaged by Pyinstaller. + try: + global app + if app is None: + app, _ = create_app() + if os.environ.get(PF_SERVICE_DEBUG) == "true": + app.logger.setLevel(logging.DEBUG) + else: + app.logger.setLevel(logging.INFO) + message = f"Start Prompt Flow Service on {port}, version: {get_promptflow_sdk_version()}." + app.logger.info(message) + print(message) + sys.stdout.flush() + waitress.serve(app, host="127.0.0.1", port=port, threads=PF_SERVICE_WORKER_NUM) + finally: + sys.stdout = old_stdout + sys.stderr = old_stderr + else: + # Start a pfs process using detach mode. It will start a new process and create a new app. So we use environment + # variable to pass the debug mode, since it will inherit parent process environment variable. + if platform.system() == "Windows": + try: + import win32api + import win32con + import win32process + except ImportError as ex: + raise UserErrorException( + f"Please install pywin32 by 'pip install pywin32' and retry. prompt flow " + f"service start depends on pywin32.. {ex}" + ) + command = ( + f"waitress-serve --listen=127.0.0.1:{port} --threads={PF_SERVICE_WORKER_NUM} " + "promptflow._cli._pf._service:get_app" + ) + startupinfo = win32process.STARTUPINFO() + startupinfo.dwFlags |= win32process.STARTF_USESHOWWINDOW + startupinfo.wShowWindow = win32con.SW_HIDE + process_attributes = None + thread_attributes = None + inherit_handles = False + creation_flags = win32con.CREATE_NEW_PROCESS_GROUP | win32con.DETACHED_PROCESS + environment = None + current_directory = None + process_handle, thread_handle, process_id, thread_id = win32process.CreateProcess( + None, + command, + process_attributes, + thread_attributes, + inherit_handles, + creation_flags, + environment, + current_directory, + startupinfo, + ) + + win32api.CloseHandle(process_handle) + win32api.CloseHandle(thread_handle) + else: + # Set host to localhost, only allow request from localhost. + cmd = [ + "waitress-serve", + f"--listen=127.0.0.1:{port}", + f"--threads={PF_SERVICE_WORKER_NUM}", + "promptflow._cli._pf._service:get_app", + ] + subprocess.Popen(cmd, stdout=subprocess.DEVNULL, start_new_session=True) + is_healthy = check_pfs_service_status(port) + if is_healthy: + message = f"Start Prompt Flow Service on port {port}, version: {get_promptflow_sdk_version()}." + print(message) + logger.info(message) + else: + logger.warning(f"Pfs service start failed in {port}.") + + +def stop_service(): + port = get_port_from_config() + if port is not None and is_port_in_use(port): + kill_exist_service(port) + message = f"Pfs service stop in {port}." + else: + message = "Pfs service is not started." + logger.debug(message) + print(message) + + +def show_service(): + port = get_port_from_config() + status = get_started_service_info(port) + if is_run_from_built_binary(): + log_file = HOME_PROMPT_FLOW_DIR / PF_SERVICE_LOG_FILE + else: + log_file = get_current_env_pfs_file(PF_SERVICE_LOG_FILE) + if status: + status.update({"log_file": log_file.as_posix()}) + print(status) + return + else: + logger.warning(f"Promptflow service is not started. log_file: {log_file.as_posix()}") + sys.exit(1) diff --git a/src/promptflow/promptflow/_cli/_pf/_tool.py b/src/promptflow-devkit/promptflow/_cli/_pf/_tool.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf/_tool.py rename to src/promptflow-devkit/promptflow/_cli/_pf/_tool.py diff --git a/src/promptflow-devkit/promptflow/_cli/_pf/_trace.py b/src/promptflow-devkit/promptflow/_cli/_pf/_trace.py new file mode 100644 index 00000000000..8e30925ed33 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_cli/_pf/_trace.py @@ -0,0 +1,83 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import argparse +import typing + +from promptflow._cli._params import base_params +from promptflow._cli._utils import activate_action +from promptflow._sdk._pf_client import PFClient + +_client: typing.Optional[PFClient] = None + + +def _get_pf_client() -> PFClient: + global _client + if _client is None: + _client = PFClient() + return _client + + +def add_trace_parser(subparsers: argparse._SubParsersAction): + trace_parser: argparse.ArgumentParser = subparsers.add_parser( + "trace", + description="[Experimental] A CLI tool to manage traces for prompt flow.", + help="[Experimental] pf trace. This is an experimental feature, and may change at any time.", + ) + subparsers = trace_parser.add_subparsers() + add_delete_trace_params(subparsers) + trace_parser.set_defaults(action="trace") + + +def dispatch_trace_cmds(args: argparse.Namespace): + if args.sub_action == "delete": + delete_trace(args) + + +def _add_param_run(parser): + parser.add_argument("--run", type=str, help="Name of the run.") + + +def _add_param_collection(parser): + parser.add_argument("--collection", type=str, help="Name of the collection.") + + +def _add_param_started_before(parser): + parser.add_argument("--started-before", type=str, help="Date and time in ISO 8601 format.") + + +def add_delete_trace_params(subparsers): + # we can provide more syntax sugar here, e.g., 1 day ago + # but with limited time, we only support ISO 8601 format for now, and look forward to feedback + epilog = """ +Examples: + +# Delete traces +pf trace delete --run +pf trace delete --collection +# `started_before` should be in ISO 8601 format +pf trace delete --collection --started-before '2024-03-19T15:17:23.807563' +""" + add_params = [ + _add_param_run, + _add_param_collection, + _add_param_started_before, + ] + base_params + activate_action( + name="delete", + description=None, + epilog=epilog, + add_params=add_params, + subparsers=subparsers, + help_message="Delete traces comes from run, collection or by time.", + action_param_name="sub_action", + ) + + +def delete_trace(args: argparse.Namespace) -> None: + _get_pf_client().traces.delete( + run=args.run, + collection=args.collection, + started_before=args.started_before, + ) diff --git a/src/promptflow/promptflow/_cli/_pf/_upgrade.py b/src/promptflow-devkit/promptflow/_cli/_pf/_upgrade.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf/_upgrade.py rename to src/promptflow-devkit/promptflow/_cli/_pf/_upgrade.py diff --git a/src/promptflow/promptflow/_cli/_pf/entry.py b/src/promptflow-devkit/promptflow/_cli/_pf/entry.py similarity index 90% rename from src/promptflow/promptflow/_cli/_pf/entry.py rename to src/promptflow-devkit/promptflow/_cli/_pf/entry.py index 93169ca09d6..923e5e71d7e 100644 --- a/src/promptflow/promptflow/_cli/_pf/entry.py +++ b/src/promptflow-devkit/promptflow/_cli/_pf/entry.py @@ -22,16 +22,15 @@ from promptflow._cli._pf._connection import add_connection_parser, dispatch_connection_commands # noqa: E402 from promptflow._cli._pf._flow import add_flow_parser, dispatch_flow_commands # noqa: E402 from promptflow._cli._pf._run import add_run_parser, dispatch_run_commands # noqa: E402 +from promptflow._cli._pf._service import add_service_parser, dispatch_service_commands # noqa: E402 from promptflow._cli._pf._tool import add_tool_parser, dispatch_tool_commands # noqa: E402 -from promptflow._cli._pf.help import show_privacy_statement, show_welcome_message # noqa: E402 +from promptflow._cli._pf._trace import add_trace_parser, dispatch_trace_cmds # noqa: E402 from promptflow._cli._pf._upgrade import add_upgrade_parser, upgrade_version # noqa: E402 +from promptflow._cli._pf.help import show_privacy_statement, show_welcome_message # noqa: E402 from promptflow._cli._user_agent import USER_AGENT # noqa: E402 -from promptflow._sdk._utils import ( # noqa: E402 - get_promptflow_sdk_version, - print_pf_version, - setup_user_agent_to_operation_context, -) +from promptflow._sdk._utils import get_promptflow_sdk_version, print_pf_version # noqa: E402 from promptflow._utils.logger_utils import get_cli_sdk_logger # noqa: E402 +from promptflow._utils.user_agent_utils import setup_user_agent_to_operation_context # noqa: E402 # get logger for CLI logger = get_cli_sdk_logger() @@ -66,6 +65,10 @@ def run_command(args): upgrade_version(args) elif args.action == "experiment": dispatch_experiment_commands(args) + elif args.action == "service": + dispatch_service_commands(args) + elif args.action == "trace": + dispatch_trace_cmds(args) except KeyboardInterrupt as ex: logger.debug("Keyboard interrupt is captured.") raise ex @@ -103,6 +106,8 @@ def get_parser_args(argv): add_run_parser(subparsers) add_config_parser(subparsers) add_tool_parser(subparsers) + add_service_parser(subparsers) + add_trace_parser(subparsers) if Configuration.get_instance().is_internal_features_enabled(): add_experiment_parser(subparsers) diff --git a/src/promptflow/promptflow/_cli/_pf/help.py b/src/promptflow-devkit/promptflow/_cli/_pf/help.py similarity index 100% rename from src/promptflow/promptflow/_cli/_pf/help.py rename to src/promptflow-devkit/promptflow/_cli/_pf/help.py diff --git a/src/promptflow/promptflow/_cli/_user_agent.py b/src/promptflow-devkit/promptflow/_cli/_user_agent.py similarity index 100% rename from src/promptflow/promptflow/_cli/_user_agent.py rename to src/promptflow-devkit/promptflow/_cli/_user_agent.py diff --git a/src/promptflow/promptflow/_cli/_utils.py b/src/promptflow-devkit/promptflow/_cli/_utils.py similarity index 97% rename from src/promptflow/promptflow/_cli/_utils.py rename to src/promptflow-devkit/promptflow/_cli/_utils.py index 81b50cf1835..c45df603a5c 100644 --- a/src/promptflow/promptflow/_cli/_utils.py +++ b/src/promptflow-devkit/promptflow/_cli/_utils.py @@ -389,11 +389,14 @@ def get_secret_input(prompt, mask="*"): - Ignore control characters and print warning message. """ if not isinstance(prompt, str): - raise TypeError(f"prompt must be a str, not ${type(prompt).__name__}") + e = TypeError(f"prompt must be a str, not ${type(prompt).__name__}") + raise UserErrorException(message_format=str(e)) from e if not isinstance(mask, str): - raise TypeError(f"mask argument must be a one-character str, not ${type(mask).__name__}") + e = TypeError(f"mask argument must be a one-character str, not ${type(mask).__name__}") + raise UserErrorException(message_format=str(e)) from e if len(mask) != 1: - raise ValueError("mask argument must be a one-character str") + e = ValueError("mask argument must be a one-character str") + raise UserErrorException(message_format=str(e)) from e if sys.platform == "win32": # For some reason, mypy reports that msvcrt doesn't have getch, ignore this warning: diff --git a/src/promptflow/promptflow/_cli/data/chat_flow/flow_files/.promptflow/flow.tools.json b/src/promptflow-devkit/promptflow/_cli/data/chat_flow/flow_files/.promptflow/flow.tools.json similarity index 100% rename from src/promptflow/promptflow/_cli/data/chat_flow/flow_files/.promptflow/flow.tools.json rename to src/promptflow-devkit/promptflow/_cli/data/chat_flow/flow_files/.promptflow/flow.tools.json diff --git a/src/promptflow/promptflow/_cli/data/chat_flow/flow_files/README.md b/src/promptflow-devkit/promptflow/_cli/data/chat_flow/flow_files/README.md similarity index 100% rename from src/promptflow/promptflow/_cli/data/chat_flow/flow_files/README.md rename to src/promptflow-devkit/promptflow/_cli/data/chat_flow/flow_files/README.md diff --git a/src/promptflow/promptflow/_cli/data/chat_flow/flow_files/chat.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/chat_flow/flow_files/chat.jinja2 similarity index 100% rename from src/promptflow/promptflow/_cli/data/chat_flow/flow_files/chat.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/chat_flow/flow_files/chat.jinja2 diff --git a/src/promptflow/promptflow/_cli/data/chat_flow/template/azure_openai.yaml.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/chat_flow/template/azure_openai.yaml.jinja2 similarity index 100% rename from src/promptflow/promptflow/_cli/data/chat_flow/template/azure_openai.yaml.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/chat_flow/template/azure_openai.yaml.jinja2 diff --git a/src/promptflow/promptflow/_cli/data/chat_flow/template/flow.dag.yaml.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/chat_flow/template/flow.dag.yaml.jinja2 similarity index 100% rename from src/promptflow/promptflow/_cli/data/chat_flow/template/flow.dag.yaml.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/chat_flow/template/flow.dag.yaml.jinja2 diff --git a/src/promptflow/promptflow/_cli/data/chat_flow/template/openai.yaml.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/chat_flow/template/openai.yaml.jinja2 similarity index 100% rename from src/promptflow/promptflow/_cli/data/chat_flow/template/openai.yaml.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/chat_flow/template/openai.yaml.jinja2 diff --git a/src/promptflow/promptflow/_cli/data/entry_flow/flow.dag.yaml.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/entry_flow/flow.dag.yaml.jinja2 similarity index 100% rename from src/promptflow/promptflow/_cli/data/entry_flow/flow.dag.yaml.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/entry_flow/flow.dag.yaml.jinja2 diff --git a/src/promptflow/promptflow/_cli/data/entry_flow/flow.tools.json.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/entry_flow/flow.tools.json.jinja2 similarity index 100% rename from src/promptflow/promptflow/_cli/data/entry_flow/flow.tools.json.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/entry_flow/flow.tools.json.jinja2 diff --git a/src/promptflow/promptflow/_cli/data/entry_flow/gitignore b/src/promptflow-devkit/promptflow/_cli/data/entry_flow/gitignore similarity index 100% rename from src/promptflow/promptflow/_cli/data/entry_flow/gitignore rename to src/promptflow-devkit/promptflow/_cli/data/entry_flow/gitignore diff --git a/src/promptflow-devkit/promptflow/_cli/data/entry_flow/requirements_txt b/src/promptflow-devkit/promptflow/_cli/data/entry_flow/requirements_txt new file mode 100644 index 00000000000..7a54870cad1 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_cli/data/entry_flow/requirements_txt @@ -0,0 +1 @@ +promptflow diff --git a/src/promptflow/promptflow/_cli/data/entry_flow/tool.py.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/entry_flow/tool.py.jinja2 similarity index 93% rename from src/promptflow/promptflow/_cli/data/entry_flow/tool.py.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/entry_flow/tool.py.jinja2 index 5a549efcb5f..e5ae94aa565 100644 --- a/src/promptflow/promptflow/_cli/data/entry_flow/tool.py.jinja2 +++ b/src/promptflow-devkit/promptflow/_cli/data/entry_flow/tool.py.jinja2 @@ -1,6 +1,6 @@ import os -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomConnection {{ function_import }} diff --git a/src/promptflow/promptflow/_cli/data/evaluation_flow/.promptflow/flow.tools.json b/src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/.promptflow/flow.tools.json similarity index 100% rename from src/promptflow/promptflow/_cli/data/evaluation_flow/.promptflow/flow.tools.json rename to src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/.promptflow/flow.tools.json diff --git a/src/promptflow/promptflow/_cli/data/evaluation_flow/aggregate.py b/src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/aggregate.py similarity index 94% rename from src/promptflow/promptflow/_cli/data/evaluation_flow/aggregate.py rename to src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/aggregate.py index 34344bbb5e0..0836484a20c 100644 --- a/src/promptflow/promptflow/_cli/data/evaluation_flow/aggregate.py +++ b/src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/aggregate.py @@ -4,7 +4,7 @@ from typing import List -from promptflow import log_metric, tool +from promptflow.core import log_metric, tool @tool diff --git a/src/promptflow/promptflow/_cli/data/evaluation_flow/data.jsonl b/src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/data.jsonl similarity index 100% rename from src/promptflow/promptflow/_cli/data/evaluation_flow/data.jsonl rename to src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/data.jsonl diff --git a/src/promptflow/promptflow/_cli/data/evaluation_flow/flow.dag.yaml b/src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/flow.dag.yaml similarity index 100% rename from src/promptflow/promptflow/_cli/data/evaluation_flow/flow.dag.yaml rename to src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/flow.dag.yaml diff --git a/src/promptflow/promptflow/_cli/data/evaluation_flow/line_process.py b/src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/line_process.py similarity index 95% rename from src/promptflow/promptflow/_cli/data/evaluation_flow/line_process.py rename to src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/line_process.py index c5abf52da35..39404bc9730 100644 --- a/src/promptflow/promptflow/_cli/data/evaluation_flow/line_process.py +++ b/src/promptflow-devkit/promptflow/_cli/data/evaluation_flow/line_process.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from promptflow import tool +from promptflow.core import tool @tool diff --git a/src/promptflow/promptflow/_cli/data/package_tool/README.md.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/package_tool/README.md.jinja2 similarity index 97% rename from src/promptflow/promptflow/_cli/data/package_tool/README.md.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/package_tool/README.md.jinja2 index ede780b4f0b..4dbb81b2b2b 100644 --- a/src/promptflow/promptflow/_cli/data/package_tool/README.md.jinja2 +++ b/src/promptflow-devkit/promptflow/_cli/data/package_tool/README.md.jinja2 @@ -11,4 +11,4 @@ The directory structure in the package tool is as follows: __init__.py ``` -Please refer to [tool doc](https://microsoft.github.io/promptflow/how-to-guides/develop-a-tool/index.html) for more details about how to develop a tool. \ No newline at end of file +Please refer to [tool doc](https://microsoft.github.io/promptflow/how-to-guides/develop-a-tool/index.html) for more details about how to develop a tool. diff --git a/src/promptflow/promptflow/_cli/data/package_tool/init.py b/src/promptflow-devkit/promptflow/_cli/data/package_tool/init.py similarity index 100% rename from src/promptflow/promptflow/_cli/data/package_tool/init.py rename to src/promptflow-devkit/promptflow/_cli/data/package_tool/init.py diff --git a/src/promptflow/promptflow/_cli/data/package_tool/setup.py.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/package_tool/setup.py.jinja2 similarity index 96% rename from src/promptflow/promptflow/_cli/data/package_tool/setup.py.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/package_tool/setup.py.jinja2 index a7e71f02e83..2c55f99bf31 100644 --- a/src/promptflow/promptflow/_cli/data/package_tool/setup.py.jinja2 +++ b/src/promptflow-devkit/promptflow/_cli/data/package_tool/setup.py.jinja2 @@ -9,7 +9,7 @@ PACKAGE_NAME = "{{ package_name }}" class ToolMetaCacheBuild(build): def run(self): - from promptflow import PFClient + from promptflow.client import PFClient pf_client = PFClient() tools = pf_client.tools._list_tools_in_package(PACKAGE_NAME, raise_error=False) diff --git a/src/promptflow/promptflow/_cli/data/package_tool/tool.py.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/package_tool/tool.py.jinja2 similarity index 95% rename from src/promptflow/promptflow/_cli/data/package_tool/tool.py.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/package_tool/tool.py.jinja2 index 1c26ddb03c7..5ade7c4af56 100644 --- a/src/promptflow/promptflow/_cli/data/package_tool/tool.py.jinja2 +++ b/src/promptflow-devkit/promptflow/_cli/data/package_tool/tool.py.jinja2 @@ -2,7 +2,7 @@ from pathlib import Path {% endif %} -from promptflow import tool +from promptflow.core import tool from promptflow.connections import CustomConnection diff --git a/src/promptflow/promptflow/_cli/data/package_tool/utils.py.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/package_tool/utils.py.jinja2 similarity index 95% rename from src/promptflow/promptflow/_cli/data/package_tool/utils.py.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/package_tool/utils.py.jinja2 index bf5df05135b..1367c3c5593 100644 --- a/src/promptflow/promptflow/_cli/data/package_tool/utils.py.jinja2 +++ b/src/promptflow-devkit/promptflow/_cli/data/package_tool/utils.py.jinja2 @@ -23,7 +23,7 @@ def list_package_tools(raise_error=False): with open(meta_cache_file, "r") as f: tools = yaml.safe_load(f) else: - from promptflow import PFClient + from promptflow.client import PFClient pf_client = PFClient() tools = pf_client.tools._list_tools_in_package(package_name, raise_error=raise_error) diff --git a/src/promptflow/promptflow/_cli/data/standard_flow/.promptflow/flow.tools.json b/src/promptflow-devkit/promptflow/_cli/data/standard_flow/.promptflow/flow.tools.json similarity index 100% rename from src/promptflow/promptflow/_cli/data/standard_flow/.promptflow/flow.tools.json rename to src/promptflow-devkit/promptflow/_cli/data/standard_flow/.promptflow/flow.tools.json diff --git a/src/promptflow/promptflow/_cli/data/standard_flow/data.jsonl b/src/promptflow-devkit/promptflow/_cli/data/standard_flow/data.jsonl similarity index 100% rename from src/promptflow/promptflow/_cli/data/standard_flow/data.jsonl rename to src/promptflow-devkit/promptflow/_cli/data/standard_flow/data.jsonl diff --git a/src/promptflow/promptflow/_cli/data/standard_flow/flow.dag.yaml b/src/promptflow-devkit/promptflow/_cli/data/standard_flow/flow.dag.yaml similarity index 100% rename from src/promptflow/promptflow/_cli/data/standard_flow/flow.dag.yaml rename to src/promptflow-devkit/promptflow/_cli/data/standard_flow/flow.dag.yaml diff --git a/src/promptflow/promptflow/_cli/data/standard_flow/hello.jinja2 b/src/promptflow-devkit/promptflow/_cli/data/standard_flow/hello.jinja2 similarity index 100% rename from src/promptflow/promptflow/_cli/data/standard_flow/hello.jinja2 rename to src/promptflow-devkit/promptflow/_cli/data/standard_flow/hello.jinja2 diff --git a/src/promptflow/promptflow/_cli/data/standard_flow/hello.py b/src/promptflow-devkit/promptflow/_cli/data/standard_flow/hello.py similarity index 93% rename from src/promptflow/promptflow/_cli/data/standard_flow/hello.py rename to src/promptflow-devkit/promptflow/_cli/data/standard_flow/hello.py index 37e2e59e87c..f533b2721cd 100644 --- a/src/promptflow/promptflow/_cli/data/standard_flow/hello.py +++ b/src/promptflow-devkit/promptflow/_cli/data/standard_flow/hello.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from promptflow import tool +from promptflow.core import tool # The inputs section will change based on the arguments of the tool function, after you save the code # Adding type to arguments and return value will help the system show the types properly diff --git a/src/promptflow/promptflow/_cli/pf.py b/src/promptflow-devkit/promptflow/_cli/pf.py similarity index 59% rename from src/promptflow/promptflow/_cli/pf.py rename to src/promptflow-devkit/promptflow/_cli/pf.py index ba3191e5edf..fd2c8b2a272 100644 --- a/src/promptflow/promptflow/_cli/pf.py +++ b/src/promptflow-devkit/promptflow/_cli/pf.py @@ -1,8 +1,18 @@ +#!/usr/bin/env python # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +import os + + +def main(): + if os.environ.get("PF_INSTALLER") is None: + os.environ["PF_INSTALLER"] = "PIP" + + from promptflow._cli._pf.entry import main as _main + + _main() -from promptflow._cli._pf.entry import main # this is a compatibility layer for the old CLI which is used for vscode extension if __name__ == "__main__": diff --git a/src/promptflow/promptflow/_internal/__init__.py b/src/promptflow-devkit/promptflow/_internal/__init__.py similarity index 75% rename from src/promptflow/promptflow/_internal/__init__.py rename to src/promptflow-devkit/promptflow/_internal/__init__.py index 3ce0b60d170..1e67a783601 100644 --- a/src/promptflow/promptflow/_internal/__init__.py +++ b/src/promptflow-devkit/promptflow/_internal/__init__.py @@ -6,14 +6,13 @@ # flake8: noqa """Put some imports here for internal packages to minimize the effort of refactoring.""" -from promptflow._constants import PROMPTFLOW_CONNECTIONS +from promptflow._constants import PROMPTFLOW_CONNECTIONS, SpanAttributeFieldName, TraceEnvironmentVariableName from promptflow._core._errors import GenerateMetaUserError, PackageToolNotFoundError, ToolExecutionError from promptflow._core.cache_manager import AbstractCacheManager, CacheManager, enable_cache from promptflow._core.connection_manager import ConnectionManager from promptflow._core.flow_execution_context import FlowExecutionContext from promptflow._core.log_manager import NodeLogManager, NodeLogWriter from promptflow._core.metric_logger import add_metric_logger -from promptflow._core.operation_context import OperationContext from promptflow._core.run_tracker import RunRecordNotFound, RunTracker from promptflow._core.tool import ToolInvoker, ToolProvider, tool from promptflow._core.tool_meta_generator import ( @@ -41,25 +40,14 @@ register_connections, retrieve_tool_func_result, ) -from promptflow._sdk._constants import LOCAL_MGMT_DB_PATH -from promptflow._sdk._serving.response_creator import ResponseCreator -from promptflow._sdk._serving.swagger import generate_swagger -from promptflow._sdk._serving.utils import ( - get_output_fields_to_remove, - get_sample_json, - handle_error_to_response, - load_request_data, - streaming_response_required, - validate_request_data, -) -from promptflow._sdk._utils import ( - get_used_connection_names_from_environment_variables, - setup_user_agent_to_operation_context, - update_environment_variables_with_connections, -) +from promptflow._proxy import ProxyFactory +from promptflow._proxy._base_executor_proxy import APIBasedExecutorProxy +from promptflow._proxy._csharp_executor_proxy import CSharpBaseExecutorProxy +from promptflow._sdk._constants import LOCAL_MGMT_DB_PATH, CreatedByFieldName +from promptflow._sdk._service.apis.collector import trace_collector from promptflow._utils.context_utils import _change_working_dir, inject_sys_path from promptflow._utils.credential_scrubber import CredentialScrubber -from promptflow._utils.dataclass_serializer import deserialize_dataclass, serialize +from promptflow._utils.dataclass_serializer import deserialize_dataclass from promptflow._utils.exception_utils import ( ErrorResponse, ExceptionPresenter, @@ -90,12 +78,12 @@ ResourceType, ) from promptflow._utils.multimedia_utils import ( - _create_image_from_file, - convert_multimedia_data_to_base64, - is_multimedia_dict, + MultimediaProcessor, + load_multimedia_data_recursively, persist_multimedia_data, resolve_multimedia_data_recursively, ) +from promptflow._utils.user_agent_utils import setup_user_agent_to_operation_context from promptflow._utils.utils import ( AttrDict, camel_to_snake, @@ -106,9 +94,26 @@ transpose, ) from promptflow._version import VERSION -from promptflow.batch._csharp_base_executor_proxy import CSharpBaseExecutorProxy +from promptflow.core._serving.response_creator import ResponseCreator +from promptflow.core._serving.swagger import generate_swagger +from promptflow.core._serving.utils import ( + get_output_fields_to_remove, + get_sample_json, + handle_error_to_response, + load_request_data, + streaming_response_required, + validate_request_data, +) +from promptflow.core._utils import ( + get_used_connection_names_from_environment_variables, + update_environment_variables_with_connections, +) from promptflow.executor._errors import InputNotFound from promptflow.executor._tool_invoker import DefaultToolInvoker from promptflow.storage._run_storage import DefaultRunStorage -from promptflow.tracing._openai_injector import inject_openai_api +from promptflow.tracing._constants import PF_TRACING_SKIP_LOCAL_SETUP_ENVIRON +from promptflow.tracing._integrations._openai_injector import inject_openai_api +from promptflow.tracing._operation_context import OperationContext +from promptflow.tracing._start_trace import setup_exporter_from_environ from promptflow.tracing._tracer import Tracer +from promptflow.tracing._utils import serialize diff --git a/src/promptflow-devkit/promptflow/_proxy/__init__.py b/src/promptflow-devkit/promptflow/_proxy/__init__.py new file mode 100644 index 00000000000..d285b4bfd63 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_proxy/__init__.py @@ -0,0 +1,9 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from ._base_executor_proxy import AbstractExecutorProxy +from ._base_inspector_proxy import AbstractInspectorProxy +from ._proxy_factory import ProxyFactory + +__all__ = ["ProxyFactory", "AbstractInspectorProxy", "AbstractExecutorProxy"] diff --git a/src/promptflow/promptflow/batch/_base_executor_proxy.py b/src/promptflow-devkit/promptflow/_proxy/_base_executor_proxy.py similarity index 57% rename from src/promptflow/promptflow/batch/_base_executor_proxy.py rename to src/promptflow-devkit/promptflow/_proxy/_base_executor_proxy.py index 2ddef43823a..1daf4a0330e 100644 --- a/src/promptflow/promptflow/batch/_base_executor_proxy.py +++ b/src/promptflow-devkit/promptflow/_proxy/_base_executor_proxy.py @@ -7,20 +7,29 @@ from datetime import datetime from json import JSONDecodeError from pathlib import Path -from typing import Any, Mapping, Optional +from typing import Any, Dict, List, Mapping, NoReturn, Optional import httpx from promptflow._constants import DEFAULT_ENCODING, LINE_TIMEOUT_SEC -from promptflow._core._errors import MetaFileNotFound, MetaFileReadError, NotSupported, UnexpectedError -from promptflow._sdk._constants import FLOW_META_JSON, FLOW_TOOLS_JSON, PROMPT_FLOW_DIR_NAME +from promptflow._core._errors import NotSupported, UnexpectedError +from promptflow._sdk._constants import ( + DAG_FILE_NAME, + FLOW_META_JSON, + FLOW_META_JSON_GEN_TIMEOUT, + FLOW_TOOLS_JSON, + FLOW_TOOLS_JSON_GEN_TIMEOUT, + PROMPT_FLOW_DIR_NAME, +) from promptflow._utils.async_utils import async_run_allowing_running_loop from promptflow._utils.exception_utils import ErrorResponse, ExceptionPresenter +from promptflow._utils.flow_utils import is_flex_flow, read_json_content from promptflow._utils.logger_utils import bulk_logger from promptflow._utils.utils import load_json from promptflow.batch._errors import ExecutorServiceUnhealthy from promptflow.contracts.run_info import FlowRunInfo from promptflow.exceptions import ErrorTarget, ValidationException +from promptflow.executor._errors import AggregationNodeExecutionTimeoutError, LineExecutionTimeoutError from promptflow.executor._result import AggregationResult, LineResult from promptflow.storage._run_storage import AbstractRunStorage @@ -29,31 +38,85 @@ class AbstractExecutorProxy: @classmethod - def get_tool_metadata(cls, flow_file: Path, working_dir: Optional[Path] = None) -> dict: - """Generate tool metadata file for the specified flow.""" - return cls._get_tool_metadata(flow_file, working_dir or flow_file.parent) + def dump_metadata(cls, flow_file: Path, working_dir: Path) -> NoReturn: + """Generate metadata for a specific flow.""" + cls.generate_flow_tools_json(flow_file, working_dir, dump=True) + cls.generate_flow_json(flow_file, working_dir, dump=True) - def _get_flow_meta(self) -> dict: - """Get the flow metadata from""" + @classmethod + def generate_flow_tools_json( + cls, + flow_file: Path, + working_dir: Path, + dump: bool = True, + timeout: int = FLOW_TOOLS_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, + ) -> dict: + """Generate flow.tools.json for the specified flow.""" + if is_flex_flow(file_path=flow_file, working_dir=working_dir): + return {} + else: + return cls._generate_flow_tools_json(flow_file, working_dir, dump, timeout, load_in_subprocess) + + @classmethod + def _generate_flow_tools_json( + cls, + flow_file: Path, + working_dir: Path, + dump: bool = True, + timeout: int = FLOW_TOOLS_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, + ) -> dict: raise NotImplementedError() - def get_inputs_definition(self) -> Mapping[str, Any]: - """Get the inputs definition of an eager flow""" - from promptflow.contracts.flow import FlowInputDefinition + @classmethod + def generate_flow_json( + cls, + flow_file: Path, + working_dir: Path, + dump: bool = True, + timeout: int = FLOW_META_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, + ) -> Dict[str, Any]: + """Generate metadata for a specific flow. + + :param flow_file: The path of the flow file. + :type flow_file: Path + :param working_dir: The working directory to generate the flow metadata. It will impact the packages to load + and the location of generated flow.json file when dump is True. + :type working_dir: Path + :param dump: Whether to dump the metadata to .promptflow/flow.json. + :type dump: bool + :param timeout: The timeout for the flow execution. Default timeout is 60 seconds. + :type timeout: int + :param load_in_subprocess: Whether to load the flow in a subprocess. This parameter works for Python flow only. + :type load_in_subprocess: bool + :return: The metadata of the flow. + :rtype: Dict[str, Any] + """ + if is_flex_flow(file_path=flow_file, working_dir=working_dir): + return cls._generate_flow_json(flow_file, working_dir, dump, timeout, load_in_subprocess) + else: + return {} - flow_meta = self._get_flow_meta() - inputs = {} - for key, value in flow_meta.get("inputs", {}).items(): - # TODO: update this after we determine whether to accept list here or now - _type = value.get("type") - if isinstance(_type, list): - _type = _type[0] - value["type"] = _type - inputs[key] = FlowInputDefinition.deserialize(value) - return inputs + @classmethod + def _generate_flow_json( + cls, + flow_file: Path, + working_dir: Path, + dump: bool = True, + timeout: int = FLOW_META_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, + ) -> Dict[str, Any]: + raise NotImplementedError() @classmethod - def _get_tool_metadata(cls, flow_file: Path, working_dir: Path) -> dict: + def get_used_connection_names(cls, flow_file: Path, working_dir: Path) -> List[str]: + """Get the used connection names in the flow.""" + raise NotImplementedError() + + def get_inputs_definition(self): + """Get the inputs definition of an eager flow""" raise NotImplementedError() @classmethod @@ -64,6 +127,7 @@ async def create( *, connections: Optional[dict] = None, storage: Optional[AbstractRunStorage] = None, + init_kwargs: Optional[Dict[str, Any]] = None, **kwargs, ) -> "AbstractExecutorProxy": """Create a new executor""" @@ -95,6 +159,11 @@ async def ensure_executor_health(self): """Ensure the executor service is healthy before execution""" pass + @classmethod + def is_flex_flow_entry(cls, entry: str): + """Returns True if entry is flex flow's entry.""" + raise NotImplementedError() + class APIBasedExecutorProxy(AbstractExecutorProxy): def __init__( @@ -147,63 +216,68 @@ async def _deactivate_generator(self): self._active_generator_count -= 1 async def _all_generators_exhausted(self): - """For streaming output, we will return a generator for the output, and the execution service - should keep alive until the generator is exhausted. + """For streaming output in api-based executor proxy, we will return a generator for the output, + and the execution service should keep alive until the generator is exhausted. This method is to check if all generators are exhausted. """ # the count should never be negative, but still check it here for safety return self._active_generator_count <= 0 - async def destroy_if_all_generators_exhausted(self): - """ - client.stream api in exec_line function won't pass all response one time. - For API-based streaming chat flow, if executor proxy is destroyed, it will kill service process - and connection will close. this will result in subsequent getting generator content failed. + # endregion - Besides, external caller usually wait for the destruction of executor proxy before it can continue and iterate - the generator content, so we can't keep waiting here. + @classmethod + def dump_metadata(cls, flow_file: Path, working_dir: Path) -> NoReturn: + # In abstract class, dump_metadata may redirect to generate_tools_json and generate_flow_json + # However, for APIBasedExecutorProxy, we can't get the meta in current process, so generate_tools_json + # and generate_flow_json should rely on the metadata file dumped by dump_metadata instead. - On the other hand, the subprocess for execution service is not started in detach mode; - it wll exit when parent process exit. So we simply skip the destruction here. - """ - if await self._all_generators_exhausted(): - await self.destroy() + # for local, they should override this method and dump metadata, like via a subprocess command + # for cloud, they will assume that metadata has already been dumped into the flow directory so do nothing here + return - # endregion - - def _get_flow_meta(self) -> dict: - flow_meta_json_path = self.working_dir / PROMPT_FLOW_DIR_NAME / FLOW_META_JSON - if not flow_meta_json_path.is_file(): - raise MetaFileNotFound( - message_format=( - # TODO: pf flow validate should be able to generate flow.json - "Failed to fetch meta of inputs: cannot find {file_path}, please retry." - ), - file_path=flow_meta_json_path.absolute().as_posix(), - ) + def get_inputs_definition(self): + """Get the inputs definition of an eager flow""" + from promptflow.contracts.flow import FlowInputDefinition - with open(flow_meta_json_path, mode="r", encoding=DEFAULT_ENCODING) as flow_meta_json_path: - return json.load(flow_meta_json_path) + flow_meta = self.generate_flow_json( + flow_file=self.working_dir / DAG_FILE_NAME, + working_dir=self.working_dir, + dump=False, + ) + inputs = {} + for key, value in flow_meta.get("inputs", {}).items(): + # TODO: update this after we determine whether to accept list here or now + _type = value.get("type") + if isinstance(_type, list): + _type = _type[0] + value["type"] = _type + inputs[key] = FlowInputDefinition.deserialize(value) + return inputs @classmethod - def _get_tool_metadata(cls, flow_file: Path, working_dir: Path) -> dict: + def _generate_flow_tools_json( + cls, + flow_file: Path, + working_dir: Path, + dump: bool = True, + timeout: int = FLOW_TOOLS_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, + ) -> dict: flow_tools_json_path = working_dir / PROMPT_FLOW_DIR_NAME / FLOW_TOOLS_JSON - if flow_tools_json_path.is_file(): - with open(flow_tools_json_path, mode="r", encoding=DEFAULT_ENCODING) as f: - try: - return json.load(f) - except json.JSONDecodeError: - raise MetaFileReadError( - message_format="Failed to fetch meta of tools: {file_path} is not a valid json file.", - file_path=flow_tools_json_path.absolute().as_posix(), - ) - raise MetaFileNotFound( - message_format=( - "Failed to fetch meta of tools: cannot find {file_path}, please build the flow project first." - ), - file_path=flow_tools_json_path.absolute().as_posix(), - ) + return read_json_content(flow_tools_json_path, "meta of tools") + + @classmethod + def _generate_flow_json( + cls, + flow_file: Path, + working_dir: Path, + dump: bool = True, + timeout: int = FLOW_META_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, + ) -> Dict[str, Any]: + flow_json_path = working_dir / PROMPT_FLOW_DIR_NAME / FLOW_META_JSON + return read_json_content(flow_json_path, "meta of tools") @property def api_endpoint(self) -> str: @@ -217,7 +291,7 @@ def api_endpoint(self) -> str: @property def chat_output_name(self) -> Optional[str]: """The name of the chat output in the line result. Return None if the bonded flow is not a chat flow.""" - # TODO: implement this based on _get_flow_meta + # TODO: implement this based on _generate_flow_json return None def exec_line( @@ -238,8 +312,6 @@ def exec_line( :type index: Optional[int] :param run_id: The id of the run. :type run_id: Optional[str] - :param enable_stream_output: Whether to enable the stream output. - :type enable_stream_output: bool :return: The line result. :rtype: LineResult """ @@ -261,7 +333,7 @@ def generator(): with httpx.Client() as client: with client.stream("POST", url, json=payload, timeout=LINE_TIMEOUT_SEC, headers=headers) as response: if response.status_code != 200: - result = self._process_http_response(response) + result = self._process_error_response(response) run_info = FlowRunInfo.create_with_error(start_time, inputs, index, run_id, result) yield LineResult(output={}, aggregation_inputs={}, run_info=run_info, node_run_infos={}) for line in response.iter_lines(): @@ -296,22 +368,38 @@ async def exec_line_async( run_id: Optional[str] = None, ) -> LineResult: if self.enable_stream_output: - # Todo: update to async, will get no result in "async for" of final_generator function in async mode + # TODO: update to async, will get no result in "async for" of final_generator function in async mode raise NotSupported("Stream output is not supported in async mode for now") + response = None start_time = datetime.utcnow() - # call execution api to get line results - url = self.api_endpoint + "/execution" - payload = {"run_id": run_id, "line_number": index, "inputs": inputs} - - async with httpx.AsyncClient() as client: - response = await client.post(url, json=payload, timeout=LINE_TIMEOUT_SEC) - # process the response - result = self._process_http_response(response) - if response.status_code != 200: - run_info = FlowRunInfo.create_with_error(start_time, inputs, index, run_id, result) - return LineResult(output={}, aggregation_inputs={}, run_info=run_info, node_run_infos={}) - return LineResult.deserialize(result) + try: + # Call execution api to get line results + url = self.api_endpoint + "/execution" + payload = {"run_id": run_id, "line_number": index, "inputs": inputs} + async with httpx.AsyncClient() as client: + response = await client.post(url, json=payload, timeout=LINE_TIMEOUT_SEC) + # This will raise an HTTPError for 4xx/5xx responses + response.raise_for_status() + return LineResult.deserialize(response.json()) + except httpx.ReadTimeout: + ex = LineExecutionTimeoutError(line_number=index, timeout=LINE_TIMEOUT_SEC) + except httpx.HTTPStatusError: + # For 4xx and 5xx status codes + ex = self._process_error_response(response) + except Exception as e: + ex = UnexpectedError( + target=ErrorTarget.BATCH, + message_format=( + "Unexpected error occurred while executing one line in the batch run. " + "Error: {error_type_and_message}." + ), + error_type_and_message=f"({e.__class__.__name__}) {e}", + ) + # If any exception occurs, format and return a line result with error + error = ExceptionPresenter.create(ex).to_dict() if isinstance(ex, Exception) else ex + run_info = FlowRunInfo.create_with_error(start_time, inputs, index, run_id, error) + return LineResult(output={}, aggregation_inputs={}, run_info=run_info, node_run_infos={}) async def exec_aggregation_async( self, @@ -319,13 +407,30 @@ async def exec_aggregation_async( aggregation_inputs: Mapping[str, Any], run_id: Optional[str] = None, ) -> AggregationResult: - # call aggregation api to get aggregation result - async with httpx.AsyncClient() as client: + response = None + try: + # Call aggregation api to get aggregation result url = self.api_endpoint + "/aggregation" payload = {"run_id": run_id, "batch_inputs": batch_inputs, "aggregation_inputs": aggregation_inputs} - response = await client.post(url, json=payload, timeout=LINE_TIMEOUT_SEC) - result = self._process_http_response(response) - return AggregationResult.deserialize(result) + async with httpx.AsyncClient() as client: + response = await client.post(url, json=payload, timeout=LINE_TIMEOUT_SEC) + # This will raise an HTTPError for 4xx/5xx responses + response.raise_for_status() + return AggregationResult.deserialize(response.json()) + except httpx.ReadTimeout: + raise AggregationNodeExecutionTimeoutError(timeout=LINE_TIMEOUT_SEC) + except Exception as e: + ex_msg = f"({e.__class__.__name__}) {e}" + if isinstance(e, httpx.HTTPStatusError): + error_dict = self._process_error_response(e.response) + ex_msg = error_dict["message"] + raise UnexpectedError( + target=ErrorTarget.BATCH, + message_format=( + "Unexpected error occurred while executing aggregation nodes in the batch run. Error: {ex_msg}" + ), + ex_msg=ex_msg, + ) async def ensure_executor_startup(self, error_file): """Ensure the executor service is initialized before calling the API to get the results""" @@ -388,23 +493,19 @@ def _check_startup_error_from_file(self, error_file) -> Exception: return ValidationException(error_response.message, target=ErrorTarget.BATCH) return None - def _process_http_response(self, response: httpx.Response): - if response.status_code == 200: - # if the status code is 200, the response is the json dict of a line result - return response.json() - else: - # use this instead of response.text to handle streaming response - response_text = response.read().decode(DEFAULT_ENCODING) - # if the status code is not 200, log the error - message_format = "Unexpected error when executing a line, status code: {status_code}, error: {error}" - bulk_logger.error(message_format.format(status_code=response.status_code, error=response_text)) - # if response can be parsed as json, return the error dict - # otherwise, wrap the error in an UnexpectedError and return the error dict - try: - error_dict = json.loads(response_text) - return error_dict["error"] - except (JSONDecodeError, KeyError): - unexpected_error = UnexpectedError( - message_format=message_format, status_code=response.status_code, error=response_text - ) - return ExceptionPresenter.create(unexpected_error).to_dict() + def _process_error_response(self, response: httpx.Response): + # use this instead of response.text to handle streaming response + response_text = response.read().decode(DEFAULT_ENCODING) + # if the status code is not 200, log the error + message_format = "Unexpected error when executing a line, status code: {status_code}, error: {error}" + bulk_logger.error(message_format.format(status_code=response.status_code, error=response_text)) + # if response can be parsed as json, return the error dict + # otherwise, wrap the error in an UnexpectedError and return the error dict + try: + error_dict = json.loads(response_text) + return error_dict["error"] + except (JSONDecodeError, KeyError): + unexpected_error = UnexpectedError( + message_format=message_format, status_code=response.status_code, error=response_text + ) + return ExceptionPresenter.create(unexpected_error).to_dict() diff --git a/src/promptflow-devkit/promptflow/_proxy/_base_inspector_proxy.py b/src/promptflow-devkit/promptflow/_proxy/_base_inspector_proxy.py new file mode 100644 index 00000000000..8d41ec93a10 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_proxy/_base_inspector_proxy.py @@ -0,0 +1,34 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from pathlib import Path +from typing import Dict, List + + +class AbstractInspectorProxy: + """Inspector proxies may provide language specific ability to inspect definition of a Flow. + Definition may include: + - Used connection names + - Used tools + - Available tools under current environment + - Input and output ports of the flow + - etc. + + Such information need to be extracted with reflection in language specific runtime environment, so each language + may have its own inspector proxy; on the other hand, different from executor proxy, whose instance will be bonded + to a specific flow, inspector proxy is stateless and can be used on a flow before its initialization. + """ + + def __init__(self): + pass + + def get_used_connection_names( + self, flow_file: Path, working_dir: Path, environment_variables_overrides: Dict[str, str] = None + ) -> List[str]: + """Check the type of each node input/attribute and return the connection names used in the flow.""" + raise NotImplementedError() + + @classmethod + def is_flex_flow_entry(self, entry: str) -> bool: + """Check if the flow is a flex flow entry.""" + raise NotImplementedError() diff --git a/src/promptflow/promptflow/batch/_csharp_base_executor_proxy.py b/src/promptflow-devkit/promptflow/_proxy/_csharp_base_executor_proxy.py similarity index 95% rename from src/promptflow/promptflow/batch/_csharp_base_executor_proxy.py rename to src/promptflow-devkit/promptflow/_proxy/_csharp_base_executor_proxy.py index 1d88a00f6d6..84741968d94 100644 --- a/src/promptflow/promptflow/batch/_csharp_base_executor_proxy.py +++ b/src/promptflow-devkit/promptflow/_proxy/_csharp_base_executor_proxy.py @@ -4,7 +4,7 @@ from pathlib import Path from typing import Any, List, Mapping, Optional -from promptflow.batch._base_executor_proxy import APIBasedExecutorProxy +from promptflow._proxy._base_executor_proxy import APIBasedExecutorProxy from promptflow.executor._result import AggregationResult EXECUTOR_SERVICE_DLL = "Promptflow.dll" diff --git a/src/promptflow/promptflow/batch/_csharp_executor_proxy.py b/src/promptflow-devkit/promptflow/_proxy/_csharp_executor_proxy.py similarity index 68% rename from src/promptflow/promptflow/batch/_csharp_executor_proxy.py rename to src/promptflow-devkit/promptflow/_proxy/_csharp_executor_proxy.py index fe8bd299d55..e98c415445b 100644 --- a/src/promptflow/promptflow/batch/_csharp_executor_proxy.py +++ b/src/promptflow-devkit/promptflow/_proxy/_csharp_executor_proxy.py @@ -1,16 +1,21 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +import platform +import signal import socket import subprocess import uuid from pathlib import Path -from typing import Optional +from typing import NoReturn, Optional from promptflow._core._errors import UnexpectedError -from promptflow.batch._csharp_base_executor_proxy import CSharpBaseExecutorProxy +from promptflow._sdk._constants import OSType +from promptflow._utils.flow_utils import is_flex_flow from promptflow.storage._run_storage import AbstractRunStorage +from ._csharp_base_executor_proxy import CSharpBaseExecutorProxy + EXECUTOR_SERVICE_DOMAIN = "http://localhost:" EXECUTOR_SERVICE_DLL = "Promptflow.dll" @@ -46,9 +51,9 @@ def chat_output_name(self) -> Optional[str]: return self._chat_output_name @classmethod - def generate_metadata(cls, flow_file: Path, assembly_folder: Path): - """Generate metadata for the flow and save them to files under .promptflow folder. - including flow.json and flow.tools.json. + def dump_metadata(cls, flow_file: Path, working_dir: Path) -> NoReturn: + """In csharp, we need to generate metadata based on a dotnet command for now and the metadata will + always be dumped. """ command = [ "dotnet", @@ -62,24 +67,25 @@ def generate_metadata(cls, flow_file: Path, assembly_folder: Path): try: subprocess.check_output( command, - cwd=assembly_folder, + cwd=working_dir, ) except subprocess.CalledProcessError as e: raise UnexpectedError( - message_format=f"Failed to generate flow meta for csharp flow.\n" - f"Command: {' '.join(command)}\n" - f"Working directory: {assembly_folder.as_posix()}\n" - f"Return code: {e.returncode}\n" - f"Output: {e.output}", + message_format="Failed to generate flow meta for csharp flow.\n" + "Command: {command}\n" + "Working directory: {working_directory}\n" + "Return code: {return_code}\n" + "Output: {output}", + command=" ".join(command), + working_directory=working_dir.as_posix(), + return_code=e.returncode, + output=e.output, ) @classmethod def get_outputs_definition(cls, flow_file: Path, working_dir: Path) -> dict: - from promptflow._utils.yaml_utils import load_yaml - - flow_data = load_yaml(flow_file) # TODO: no outputs definition for eager flow for now - if flow_data.get("entry", None) is not None: + if is_flex_flow(file_path=flow_file, working_dir=working_dir): return {} # TODO: get this from self._get_flow_meta for both eager flow and non-eager flow then remove @@ -97,9 +103,11 @@ async def create( *, connections: Optional[dict] = None, storage: Optional[AbstractRunStorage] = None, + init_kwargs: Optional[dict] = None, **kwargs, ) -> "CSharpExecutorProxy": """Create a new executor""" + # TODO: support init_kwargs in csharp executor port = kwargs.get("port", None) log_path = kwargs.get("log_path", "") init_error_file = Path(working_dir) / f"init_error_{str(uuid.uuid4())}.json" @@ -144,11 +152,35 @@ async def create( return executor_proxy async def destroy(self): - """Destroy the executor""" + """Destroy the executor service. + + client.stream api in exec_line function won't pass all response one time. + For API-based streaming chat flow, if executor proxy is destroyed, it will kill service process + and connection will close. this will result in subsequent getting generator content failed. + + Besides, external caller usually wait for the destruction of executor proxy before it can continue and iterate + the generator content, so we can't keep waiting here. + + On the other hand, the subprocess for execution service is not started in detach mode; + it wll exit when parent process exit. So we simply skip the destruction here. + """ + + # TODO 3033484: update this after executor service support graceful shutdown + if not await self._all_generators_exhausted(): + raise UnexpectedError( + message_format="The executor service is still handling a stream request " + "whose response is not fully consumed yet." + ) + # process is not None, it means the executor service is started by the current executor proxy # and should be terminated when the executor proxy is destroyed if the service is still active if self._process and self._is_executor_active(): - self._process.terminate() + if platform.system() == OSType.WINDOWS: + # send CTRL_C_EVENT to the process to gracefully terminate the service + self._process.send_signal(signal.CTRL_C_EVENT) + else: + # for Linux and MacOS, Popen.terminate() will send SIGTERM to the process + self._process.terminate() try: self._process.wait(timeout=5) except subprocess.TimeoutExpired: diff --git a/src/promptflow-devkit/promptflow/_proxy/_csharp_inspector_proxy.py b/src/promptflow-devkit/promptflow/_proxy/_csharp_inspector_proxy.py new file mode 100644 index 00000000000..bba34e26e04 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_proxy/_csharp_inspector_proxy.py @@ -0,0 +1,44 @@ +import re +from collections import defaultdict +from pathlib import Path +from typing import Dict, List + +import pydash + +from promptflow._sdk._constants import ALL_CONNECTION_TYPES, FLOW_TOOLS_JSON, PROMPT_FLOW_DIR_NAME +from promptflow._utils.flow_utils import read_json_content +from promptflow._utils.yaml_utils import load_yaml + +from ._base_inspector_proxy import AbstractInspectorProxy + + +class CSharpInspectorProxy(AbstractInspectorProxy): + def __init__(self): + super().__init__() + + def get_used_connection_names( + self, flow_file: Path, working_dir: Path, environment_variables_overrides: Dict[str, str] = None + ) -> List[str]: + # TODO: support environment_variables_overrides + flow_tools_json_path = working_dir / PROMPT_FLOW_DIR_NAME / FLOW_TOOLS_JSON + tools_meta = read_json_content(flow_tools_json_path, "meta of tools") + flow_dag = load_yaml(flow_file) + + connection_inputs = defaultdict(set) + for package_id, package_meta in tools_meta.get("package", {}).items(): + for tool_input_key, tool_input_meta in package_meta.get("inputs", {}).items(): + if ALL_CONNECTION_TYPES.intersection(set(tool_input_meta.get("type"))): + connection_inputs[package_id].add(tool_input_key) + + connection_names = set() + # TODO: we assume that all variants are resolved here + # TODO: only literal connection inputs are supported + # TODO: check whether we should ask for a specific function in csharp-core + for node in flow_dag.get("nodes", []): + package_id = pydash.get(node, "source.tool") + if package_id in connection_inputs: + for connection_input in connection_inputs[package_id]: + connection_name = pydash.get(node, f"inputs.{connection_input}") + if connection_name and not re.match(r"\${.*}", connection_name): + connection_names.add(connection_name) + return list(connection_names) diff --git a/src/promptflow-devkit/promptflow/_proxy/_proxy_factory.py b/src/promptflow-devkit/promptflow/_proxy/_proxy_factory.py new file mode 100644 index 00000000000..aa06a8b7809 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_proxy/_proxy_factory.py @@ -0,0 +1,65 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from typing import Dict, Type + +from promptflow._constants import FlowLanguage +from promptflow._proxy._base_executor_proxy import AbstractExecutorProxy +from promptflow._proxy._base_inspector_proxy import AbstractInspectorProxy +from promptflow._proxy._csharp_executor_proxy import CSharpExecutorProxy +from promptflow._proxy._python_executor_proxy import PythonExecutorProxy +from promptflow._utils.async_utils import async_run_allowing_running_loop + + +class ProxyFactory: + executor_proxy_classes: Dict[str, Type[AbstractExecutorProxy]] = { + FlowLanguage.Python: PythonExecutorProxy, + FlowLanguage.CSharp: CSharpExecutorProxy, + } + + def __init__(self): + pass + + def get_executor_proxy_cls(self, language: str) -> Type[AbstractExecutorProxy]: + return self.executor_proxy_classes[language] + + @classmethod + def register_executor(cls, language: str, executor_proxy_cls: Type[AbstractExecutorProxy]): + """Register a executor proxy class for a specific program language. + + This method allows users to register a executor proxy class for a particular + programming language. The executor proxy class will be used when creating an instance + of the BatchEngine for flows written in the specified language. + + :param language: The flow program language of the executor proxy, + :type language: str + :param executor_proxy_cls: The executor proxy class to be registered. + :type executor_proxy_cls: ~promptflow.batch.AbstractExecutorProxy + """ + cls.executor_proxy_classes[language] = executor_proxy_cls + + def create_executor_proxy( + self, flow_file, working_dir, connections, storage, language: str, init_kwargs: dict = None, **kwargs + ) -> AbstractExecutorProxy: + executor_proxy_cls = self.get_executor_proxy_cls(language) + return async_run_allowing_running_loop( + executor_proxy_cls.create, + flow_file, + working_dir, + connections=connections, + storage=storage, + init_kwargs=init_kwargs, + **kwargs, + ) + + def create_inspector_proxy(self, language: str, **kwargs) -> AbstractInspectorProxy: + if language == FlowLanguage.Python: + from promptflow._proxy._python_inspector_proxy import PythonInspectorProxy + + return PythonInspectorProxy() + elif language == FlowLanguage.CSharp: + from promptflow._proxy._csharp_inspector_proxy import CSharpInspectorProxy + + return CSharpInspectorProxy() + raise ValueError(f"Unsupported language: {language}") diff --git a/src/promptflow/promptflow/batch/_python_executor_proxy.py b/src/promptflow-devkit/promptflow/_proxy/_python_executor_proxy.py similarity index 63% rename from src/promptflow/promptflow/batch/_python_executor_proxy.py rename to src/promptflow-devkit/promptflow/_proxy/_python_executor_proxy.py index 1f22fd69add..5c0d58ac1b3 100644 --- a/src/promptflow/promptflow/batch/_python_executor_proxy.py +++ b/src/promptflow-devkit/promptflow/_proxy/_python_executor_proxy.py @@ -1,27 +1,53 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- - +import re from pathlib import Path -from typing import Any, List, Mapping, Optional, Tuple +from typing import Any, Dict, List, Mapping, Optional, Tuple +from promptflow._constants import FlowEntryRegex from promptflow._core._errors import UnexpectedError -from promptflow._core.operation_context import OperationContext from promptflow._core.run_tracker import RunTracker +from promptflow._sdk._constants import FLOW_META_JSON_GEN_TIMEOUT, FLOW_TOOLS_JSON_GEN_TIMEOUT +from promptflow._utils.flow_utils import resolve_entry_file from promptflow._utils.logger_utils import bulk_logger -from promptflow.batch._base_executor_proxy import AbstractExecutorProxy +from promptflow._utils.yaml_utils import load_yaml from promptflow.contracts.run_mode import RunMode +from promptflow.core._utils import generate_flow_meta from promptflow.executor import FlowExecutor from promptflow.executor._line_execution_process_pool import LineExecutionProcessPool from promptflow.executor._result import AggregationResult, LineResult from promptflow.executor._script_executor import ScriptExecutor from promptflow.storage._run_storage import AbstractRunStorage +from promptflow.tracing._operation_context import OperationContext + +from ._base_executor_proxy import AbstractExecutorProxy class PythonExecutorProxy(AbstractExecutorProxy): def __init__(self, flow_executor: FlowExecutor): self._flow_executor = flow_executor + @classmethod + def _generate_flow_json( + cls, + flow_file: Path, + working_dir: Path, + dump: bool = True, + timeout: int = FLOW_META_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, + ) -> Dict[str, Any]: + flow_dag = load_yaml(flow_file) + # generate flow.json only for eager flow for now + return generate_flow_meta( + flow_directory=working_dir, + source_path=resolve_entry_file(entry=flow_dag.get("entry"), working_dir=working_dir), + data=flow_dag, + dump=dump, + timeout=timeout, + load_in_subprocess=load_in_subprocess, + ) + @classmethod async def create( cls, @@ -30,9 +56,12 @@ async def create( *, connections: Optional[dict] = None, storage: Optional[AbstractRunStorage] = None, + init_kwargs: Optional[Dict[str, Any]] = None, **kwargs, ) -> "PythonExecutorProxy": - flow_executor = FlowExecutor.create(flow_file, connections, working_dir, storage=storage, raise_ex=False) + flow_executor = FlowExecutor.create( + flow_file, connections, working_dir, storage=storage, raise_ex=False, init_kwargs=init_kwargs + ) return cls(flow_executor) async def exec_aggregation_async( @@ -44,7 +73,7 @@ async def exec_aggregation_async( with self._flow_executor._run_tracker.node_log_manager: return self._flow_executor._exec_aggregation(batch_inputs, aggregation_inputs, run_id=run_id) - def _exec_batch( + async def _exec_batch( self, batch_inputs: List[Mapping[str, Any]], output_dir: Path, @@ -70,16 +99,16 @@ def _exec_batch( bulk_logger.info(f"The timeout for the batch run is {batch_timeout_sec} seconds.") with LineExecutionProcessPool( - self._flow_executor, - len(batch_inputs), - run_id, output_dir, - batch_timeout_sec=batch_timeout_sec, - line_timeout_sec=line_timeout_sec, + self._flow_executor, worker_count=worker_count, + line_timeout_sec=line_timeout_sec, + batch_timeout_sec=batch_timeout_sec, + run_id=run_id, + nlines=len(batch_inputs), ) as pool: line_number = [batch_input["line_number"] for batch_input in batch_inputs] - line_results = pool.run(zip(line_number, batch_inputs)) + line_results = await pool.run(zip(line_number, batch_inputs)) # For bulk run, currently we need to add line results to run_tracker self._flow_executor._add_line_results(line_results, run_tracker) @@ -89,11 +118,24 @@ def get_inputs_definition(self): return self._flow_executor.get_inputs_definition() @classmethod - def _get_tool_metadata(cls, flow_file: Path, working_dir: Path) -> dict: + def _generate_flow_tools_json( + cls, + flow_file: Path, + working_dir: Path, + dump: bool = True, + timeout: int = FLOW_TOOLS_JSON_GEN_TIMEOUT, + load_in_subprocess: bool = True, + ) -> dict: from promptflow._sdk._utils import generate_flow_tools_json return generate_flow_tools_json( flow_directory=working_dir, - dump=False, + dump=dump, + timeout=timeout, used_packages_only=True, ) + + @classmethod + def is_flex_flow_entry(cls, entry: str): + """Returns True if entry is flex flow's entry (in python).""" + return bool(isinstance(entry, str) and re.match(FlowEntryRegex.Python, entry)) diff --git a/src/promptflow-devkit/promptflow/_proxy/_python_inspector_proxy.py b/src/promptflow-devkit/promptflow/_proxy/_python_inspector_proxy.py new file mode 100644 index 00000000000..136c268c8a8 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_proxy/_python_inspector_proxy.py @@ -0,0 +1,26 @@ +import re +from pathlib import Path +from typing import Dict, List + +from .._constants import FlowEntryRegex +from ._base_inspector_proxy import AbstractInspectorProxy + + +class PythonInspectorProxy(AbstractInspectorProxy): + def __init__(self): + super().__init__() + + def get_used_connection_names( + self, flow_file: Path, working_dir: Path, environment_variables_overrides: Dict[str, str] = None + ) -> List[str]: + from promptflow._utils.context_utils import _change_working_dir + from promptflow.contracts.flow import Flow as ExecutableFlow + + with _change_working_dir(working_dir): + executable = ExecutableFlow.from_yaml(flow_file=flow_file, working_dir=working_dir) + return executable.get_connection_names(environment_variables_overrides=environment_variables_overrides) + + @classmethod + def is_flex_flow_entry(self, entry: str) -> bool: + """Check if the flow is a flex flow entry.""" + return isinstance(entry, str) and re.match(FlowEntryRegex.Python, entry) diff --git a/src/promptflow/promptflow/_sdk/schemas/__init__.py b/src/promptflow-devkit/promptflow/_sdk/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/schemas/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_configuration.py b/src/promptflow-devkit/promptflow/_sdk/_configuration.py similarity index 90% rename from src/promptflow/promptflow/_sdk/_configuration.py rename to src/promptflow-devkit/promptflow/_sdk/_configuration.py index 77c8361231a..d2136116904 100644 --- a/src/promptflow/promptflow/_sdk/_configuration.py +++ b/src/promptflow-devkit/promptflow/_sdk/_configuration.py @@ -10,17 +10,17 @@ import pydash +from promptflow._constants import ConnectionProviderConfig from promptflow._sdk._constants import ( DEFAULT_ENCODING, FLOW_DIRECTORY_MACRO_IN_CONFIG, HOME_PROMPT_FLOW_DIR, SERVICE_CONFIG_FILE, - ConnectionProvider, ) from promptflow._sdk._utils import call_from_extension, gen_uuid_by_compute_info, read_write_by_user from promptflow._utils.logger_utils import get_cli_sdk_logger from promptflow._utils.yaml_utils import dump_yaml, load_yaml -from promptflow.exceptions import ErrorTarget, ValidationException +from promptflow.exceptions import ErrorTarget, UserErrorException, ValidationException logger = get_cli_sdk_logger() @@ -173,8 +173,8 @@ def get_trace_provider(self) -> Optional[str]: @classmethod def resolve_connection_provider(cls, provider, path=None) -> Optional[str]: if provider is None: - return ConnectionProvider.LOCAL - if provider == ConnectionProvider.AZUREML.value: + return ConnectionProviderConfig.LOCAL + if provider == ConnectionProviderConfig.AZUREML: # Note: The below function has azure-ai-ml dependency. return "azureml:" + cls._get_workspace_from_config(path=path) # If provider not None and not Azure, return it directly. @@ -217,6 +217,21 @@ def _validate(key: str, value: str) -> None: "if you want to specify run output path under flow directory, " "please use its child folder, e.g. '${flow_directory}/.runs'." ) + elif key == Configuration.TRACE_PROVIDER: + try: + from promptflow.azure._utils._tracing import validate_trace_provider + + validate_trace_provider(value) + except ImportError: + msg = ( + '"promptflow[azure]" is required to validate trace provider, ' + 'please install it by running "pip install promptflow[azure]" with your version.' + ) + raise UserErrorException( + message=msg, + target=ErrorTarget.CONTROL_PLANE_SDK, + no_personal_data_message=msg, + ) return def get_user_agent(self) -> Optional[str]: diff --git a/src/promptflow/promptflow/azure/_entities/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_connection_provider/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_entities/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/_connection_provider/__init__.py diff --git a/src/promptflow-devkit/promptflow/_sdk/_connection_provider/_local_connection_provider.py b/src/promptflow-devkit/promptflow/_sdk/_connection_provider/_local_connection_provider.py new file mode 100644 index 00000000000..0f3036674c0 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_connection_provider/_local_connection_provider.py @@ -0,0 +1,18 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from promptflow.core._connection_provider._connection_provider import ConnectionProvider + + +class LocalConnectionProvider(ConnectionProvider): + """Local connection provider.""" + + def __init__(self): + from promptflow._sdk.operations._connection_operations import ConnectionOperations + + self._operations = ConnectionOperations() + + def get(self, name: str, **kwargs): + # Connection provider here target for execution, so we always get with secrets. + with_secrets = kwargs.pop("with_secrets", True) + return self._operations.get(name, with_secrets=with_secrets, **kwargs) diff --git a/src/promptflow/promptflow/_sdk/_constants.py b/src/promptflow-devkit/promptflow/_sdk/_constants.py similarity index 88% rename from src/promptflow/promptflow/_sdk/_constants.py rename to src/promptflow-devkit/promptflow/_sdk/_constants.py index 192f485381c..825fc3f2bae 100644 --- a/src/promptflow/promptflow/_sdk/_constants.py +++ b/src/promptflow-devkit/promptflow/_sdk/_constants.py @@ -7,12 +7,21 @@ from enum import Enum from pathlib import Path +from promptflow._constants import ( + CONNECTION_SCRUBBED_VALUE, + CONNECTION_SCRUBBED_VALUE_NO_CHANGE, + PROMPT_FLOW_DIR_NAME, + ConnectionAuthMode, + ConnectionType, + CustomStrongTypeConnectionConfigs, +) + LOGGER_NAME = "promptflow" PROMPT_FLOW_HOME_DIR_ENV_VAR = "PF_HOME_DIRECTORY" # Please avoid using PROMPT_FLOW_DIR_NAME directly for home directory, "Path.home() / PROMPT_FLOW_DIR_NAME" e.g. # Use HOME_PROMPT_FLOW_DIR instead -PROMPT_FLOW_DIR_NAME = ".promptflow" +PROMPT_FLOW_DIR_NAME = PROMPT_FLOW_DIR_NAME def _prepare_home_dir() -> Path: @@ -81,6 +90,7 @@ def _prepare_home_dir() -> Path: PF_SERVICE_MONITOR_SECOND = 60 PF_SERVICE_WORKER_NUM = 16 PF_TRACE_CONTEXT = "PF_TRACE_CONTEXT" +PF_TRACE_CONTEXT_ATTR = "attributes" PF_SERVICE_DEBUG = "PF_SERVICE_DEBUG" LOCAL_MGMT_DB_PATH = (HOME_PROMPT_FLOW_DIR / "pf.sqlite").resolve() @@ -103,10 +113,9 @@ def _prepare_home_dir() -> Path: KEYRING_ENCRYPTION_LOCK_PATH = (HOME_PROMPT_FLOW_DIR / "encryption_key.lock").resolve() REFRESH_CONNECTIONS_DIR_LOCK_PATH = (HOME_PROMPT_FLOW_DIR / "refresh_connections_dir.lock").resolve() # Note: Use this only for show. Reading input should regard all '*' string as scrubbed, no matter the length. -SCRUBBED_VALUE = "******" -SCRUBBED_VALUE_NO_CHANGE = "" +SCRUBBED_VALUE = CONNECTION_SCRUBBED_VALUE +SCRUBBED_VALUE_NO_CHANGE = CONNECTION_SCRUBBED_VALUE_NO_CHANGE SCRUBBED_VALUE_USER_INPUT = "" -CHAT_HISTORY = "chat_history" WORKSPACE_LINKED_DATASTORE_NAME = "workspaceblobstore" LINE_NUMBER = "line_number" AZUREML_PF_RUN_PROPERTIES_LINEAGE = "azureml.promptflow.input_run_id" @@ -135,33 +144,25 @@ def _prepare_home_dir() -> Path: FLOW_DIRECTORY_MACRO_IN_CONFIG = "${flow_directory}" # trace +TRACE_DEFAULT_SESSION_ID = "default" +TRACE_DEFAULT_COLLECTION = "default" TRACE_MGMT_DB_PATH = (HOME_PROMPT_FLOW_DIR / "trace.sqlite").resolve() TRACE_MGMT_DB_SESSION_ACQUIRE_LOCK_PATH = (HOME_PROMPT_FLOW_DIR / "trace.sqlite.lock").resolve() -SPAN_TABLENAME = "span" +EVENT_TABLENAME = "events" +SPAN_TABLENAME = "spans" +LINE_RUN_TABLENAME = "line_runs" PFS_MODEL_DATETIME_FORMAT = "iso8601" +SPAN_EVENTS_NAME_PF_INPUTS = "promptflow.function.inputs" +SPAN_EVENTS_NAME_PF_OUTPUT = "promptflow.function.output" +SPAN_EVENTS_ATTRIBUTE_PAYLOAD = "payload" +UX_INPUTS_JSON = "ux.inputs.json" AzureMLWorkspaceTriad = namedtuple("AzureMLWorkspace", ["subscription_id", "resource_group_name", "workspace_name"]) - -class CustomStrongTypeConnectionConfigs: - PREFIX = "promptflow.connection." - TYPE = "custom_type" - MODULE = "module" - PACKAGE = "package" - PACKAGE_VERSION = "package_version" - PROMPTFLOW_TYPE_KEY = PREFIX + TYPE - PROMPTFLOW_MODULE_KEY = PREFIX + MODULE - PROMPTFLOW_PACKAGE_KEY = PREFIX + PACKAGE - PROMPTFLOW_PACKAGE_VERSION_KEY = PREFIX + PACKAGE_VERSION - - @staticmethod - def is_custom_key(key): - return key not in [ - CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY, - CustomStrongTypeConnectionConfigs.PROMPTFLOW_MODULE_KEY, - CustomStrongTypeConnectionConfigs.PROMPTFLOW_PACKAGE_KEY, - CustomStrongTypeConnectionConfigs.PROMPTFLOW_PACKAGE_VERSION_KEY, - ] +# chat group +STOP_SIGNAL = "[STOP]" +CHAT_GROUP_REFERENCE_NAME = "parent" +CONVERSATION_HISTORY = "conversation_history" class RunTypes: @@ -169,6 +170,7 @@ class RunTypes: EVALUATION = "evaluation" PAIRWISE_EVALUATE = "pairwise_evaluate" COMMAND = "command" + CHAT_GROUP = "chat_group" class AzureRunTypes: @@ -260,6 +262,7 @@ class FlowRunProperties: OUTPUTS = "outputs" RESUME_FROM = "resume_from" COLUMN_MAPPING = "column_mapping" + INIT_KWARGS = "init_kwargs" class CommonYamlFields: @@ -296,6 +299,7 @@ class LocalStorageFilenames: DETAIL = "detail.json" METRICS = "metrics.json" LOG = "logs.txt" + FLOW_LOGS_FOLDER = "flow_logs" EXCEPTION = "error.json" META = "meta.json" @@ -332,25 +336,6 @@ class ConfigValueType(str, Enum): SECRET = "Secret" -class ConnectionType(str, Enum): - _NOT_SET = "NotSet" - AZURE_OPEN_AI = "AzureOpenAI" - OPEN_AI = "OpenAI" - QDRANT = "Qdrant" - COGNITIVE_SEARCH = "CognitiveSearch" - SERP = "Serp" - AZURE_CONTENT_SAFETY = "AzureContentSafety" - FORM_RECOGNIZER = "FormRecognizer" - WEAVIATE = "Weaviate" - SERVERLESS = "Serverless" - CUSTOM = "Custom" - - -class ConnectionAuthMode: - KEY = "key" - MEID_TOKEN = "meid_token" # Microsoft Entra ID - - ALL_CONNECTION_TYPES = set( map(lambda x: f"{x.value}Connection", filter(lambda x: x != ConnectionType._NOT_SET, ConnectionType)) ) @@ -381,11 +366,6 @@ class RunHistoryKeys: HIDDEN = "hidden" -class ConnectionProvider(str, Enum): - LOCAL = "local" - AZUREML = "azureml" - - class FlowType: STANDARD = "standard" EVALUATION = "evaluation" @@ -425,6 +405,13 @@ class ExperimentNodeType(object): COMMAND = "command" +EXP_NODE_TYPE_2_RUN_TYPE = { + ExperimentNodeType.FLOW: RunTypes.BATCH, + ExperimentNodeType.CHAT_GROUP: RunTypes.CHAT_GROUP, + ExperimentNodeType.COMMAND: RunTypes.COMMAND, +} + + class ExperimentStatus(object): NOT_STARTED = "NotStarted" QUEUING = "Queuing" @@ -476,6 +463,17 @@ class LineRunFieldName: EVALUATIONS = "evaluations" +class CreatedByFieldName: + OBJECT_ID = "object_id" + TENANT_ID = "tenant_id" + NAME = "name" + + +class ChatGroupSpeakOrder(str, Enum): + SEQUENTIAL = "sequential" + LLM = "llm" + + TRACE_LIST_DEFAULT_LIMIT = 1000 @@ -486,3 +484,14 @@ class IdentityKeys(str, Enum): USER_IDENTITY = "user_identity" RESOURCE_ID = "resource_id" CLIENT_ID = "client_id" + + +class OSType: + WINDOWS = "Windows" + LINUX = "Linux" + + +# Note: Keep these for backward compatibility +CustomStrongTypeConnectionConfigs = CustomStrongTypeConnectionConfigs +ConnectionType = ConnectionType +ConnectionAuthMode = ConnectionAuthMode diff --git a/src/promptflow/promptflow/_sdk/_errors.py b/src/promptflow-devkit/promptflow/_sdk/_errors.py similarity index 89% rename from src/promptflow/promptflow/_sdk/_errors.py rename to src/promptflow-devkit/promptflow/_sdk/_errors.py index 573f883ede0..35617bad3cf 100644 --- a/src/promptflow/promptflow/_sdk/_errors.py +++ b/src/promptflow-devkit/promptflow/_sdk/_errors.py @@ -81,15 +81,14 @@ class ConnectionNotFoundError(SDKError): pass -class RequiredEnvironmentVariablesNotSetError(SDKError): - """Exception raised if connection from_env required env vars not found.""" +class ConnectionNameNotSetError(SDKError): + """Exception raised if connection not set when create or update.""" - def __init__(self, env_vars: list, cls_name: str): - super().__init__(f"Required environment variables {env_vars} to build {cls_name} not set.") + pass -class ConnectionNameNotSetError(SDKError): - """Exception raised if connection not set when create or update.""" +class ConnectionClassNotFoundError(SDKError): + """Exception raised if relative sdk connection class not found.""" pass @@ -216,3 +215,27 @@ class ExperimentCommandRunError(SDKError): """Exception raised if experiment validation failed.""" pass + + +class ChatGroupError(SDKError): + """Exception raised if chat group operation failed.""" + + pass + + +class ChatRoleError(SDKError): + """Exception raised if chat agent operation failed.""" + + pass + + +class UnexpectedAttributeError(SDKError): + """Exception raised if unexpected attribute is found.""" + + pass + + +class LineRunNotFoundError(SDKError): + """Exception raised if line run cannot be found.""" + + pass diff --git a/src/promptflow/promptflow/_sdk/_load_functions.py b/src/promptflow-devkit/promptflow/_sdk/_load_functions.py similarity index 86% rename from src/promptflow/promptflow/_sdk/_load_functions.py rename to src/promptflow-devkit/promptflow/_sdk/_load_functions.py index 6df42545ef4..1eedf1fb1d0 100644 --- a/src/promptflow/promptflow/_sdk/_load_functions.py +++ b/src/promptflow-devkit/promptflow/_sdk/_load_functions.py @@ -1,17 +1,17 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -import hashlib from os import PathLike from pathlib import Path from typing import IO, AnyStr, Optional, Union from dotenv import dotenv_values -from .._utils.logger_utils import get_cli_sdk_logger -from .._utils.yaml_utils import load_yaml +from promptflow._utils.logger_utils import get_cli_sdk_logger +from promptflow._utils.yaml_utils import load_yaml +from promptflow.exceptions import UserErrorException + from ._errors import MultipleExperimentTemplateError, NoExperimentTemplateError -from ._utils import _sanitize_python_variable_name from .entities import Run from .entities._connection import CustomConnection, _Connection from .entities._experiment import Experiment, ExperimentTemplate @@ -65,12 +65,11 @@ def load_common( **kwargs, ) except Exception as e: - raise Exception(f"Load entity error: {e}") from e + raise UserErrorException(f"Load entity error: {e}", privacy_info=[str(e)]) from e def load_flow( source: Union[str, PathLike, IO[AnyStr]], - is_async_call: Optional[bool] = None, **kwargs, ) -> Flow: """Load flow from YAML file. @@ -79,13 +78,10 @@ def load_flow( If the source is a path, it will be open and read. An exception is raised if the file does not exist. :type source: Union[PathLike, str] - :param is_async_call: Optional argument to indicate the return value is an async function. - If True, the return value is an async function, otherwise, it is a sync function. - :type is_async_call: bool :return: A Flow object - :rtype: Flow + :rtype: ~promptflow._sdk.entities._flow.Flow """ - return Flow.load(source, is_async_call=is_async_call, **kwargs) + return Flow.load(source, **kwargs) def load_run( @@ -135,20 +131,22 @@ def _load_env_to_connection( source = Path(source) name = next((_dct["name"] for _dct in params_override if "name" in _dct), None) if not name: - raise Exception("Please specify --name when creating connection from .env.") + raise UserErrorException(message_format="Please specify --name when creating connection from .env.") if not source.exists(): - raise FileNotFoundError(f"File {source.absolute().as_posix()!r} not found.") + e = FileNotFoundError(f"File {source.absolute().as_posix()!r} not found.") + raise UserErrorException(str(e), privacy_info=[source.absolute().as_posix()]) from e try: data = dict(dotenv_values(source)) if not data: # Handle some special case dotenv returns empty with no exception raised. - raise ValueError( + e = ValueError( f"Load nothing from dotenv file {source.absolute().as_posix()!r}, " "please make sure the file is not empty and readable." ) + raise UserErrorException(str(e), privacy_info=[source.absolute().as_posix()]) from e return CustomConnection(name=name, secrets=data) except Exception as e: - raise Exception(f"Load entity error: {e}") from e + raise UserErrorException(f"Load entity error: {e}", privacy_info=[str(e)]) from e def _load_experiment_template( @@ -205,8 +203,5 @@ def _load_experiment( absolute_path = source.resolve().absolute().as_posix() if not source.exists(): raise NoExperimentTemplateError(f"Experiment file {absolute_path} not found.") - anonymous_exp_name = _sanitize_python_variable_name( - f"{source.stem}_{hashlib.sha1(absolute_path.encode('utf-8')).hexdigest()}" - ) - experiment = load_common(Experiment, source, params_override=[{"name": anonymous_exp_name}], **kwargs) + experiment = load_common(Experiment, source, **kwargs) return experiment diff --git a/src/promptflow/promptflow/_sdk/_mlflow.py b/src/promptflow-devkit/promptflow/_sdk/_mlflow.py similarity index 69% rename from src/promptflow/promptflow/_sdk/_mlflow.py rename to src/promptflow-devkit/promptflow/_sdk/_mlflow.py index 771d0e699d8..d30ff3afbcd 100644 --- a/src/promptflow/promptflow/_sdk/_mlflow.py +++ b/src/promptflow-devkit/promptflow/_sdk/_mlflow.py @@ -3,13 +3,13 @@ """Put some imports here for mlflow promptflow flavor usage. DO NOT change the module names in "all" list. If the interface has changed in source code, wrap it here and keep -original function/module names the same as before, otherwise mldesigner will be broken by this change. +original function/module names the same as before, otherwise mlflow will be broken by this change. """ from promptflow._sdk._constants import DAG_FILE_NAME -from promptflow._sdk._serving.flow_invoker import FlowInvoker -from promptflow._sdk._submitter import remove_additional_includes +from promptflow._sdk._orchestrator import remove_additional_includes from promptflow._sdk._utils import _merge_local_code_and_additional_includes from promptflow._sdk.entities._flow import Flow +from promptflow.core._serving.flow_invoker import FlowInvoker __all__ = [ "Flow", diff --git a/src/promptflow/promptflow/_sdk/_submitter/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_submitter/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/_orchestrator/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_submitter/experiment_orchestrator.py b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/experiment_orchestrator.py similarity index 91% rename from src/promptflow/promptflow/_sdk/_submitter/experiment_orchestrator.py rename to src/promptflow-devkit/promptflow/_sdk/_orchestrator/experiment_orchestrator.py index 52d07ac2f10..408c51ddb38 100644 --- a/src/promptflow/promptflow/_sdk/_submitter/experiment_orchestrator.py +++ b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/experiment_orchestrator.py @@ -16,19 +16,22 @@ from dataclasses import is_dataclass from datetime import datetime from pathlib import Path -from typing import Union +from typing import Any, Dict, Union import psutil from promptflow._sdk._constants import ( + CHAT_GROUP_REFERENCE_NAME, + CONVERSATION_HISTORY, + EXP_NODE_TYPE_2_RUN_TYPE, PF_TRACE_CONTEXT, + PF_TRACE_CONTEXT_ATTR, PROMPT_FLOW_DIR_NAME, ContextAttributeKey, ExperimentNodeRunStatus, ExperimentNodeType, ExperimentStatus, FlowRunProperties, - RunTypes, ) from promptflow._sdk._errors import ( ExperimentCommandRunError, @@ -37,12 +40,8 @@ ExperimentNotFoundError, ExperimentValueError, ) -from promptflow._sdk._orm.experiment import Experiment as ORMExperiment -from promptflow._sdk._orm.experiment_node_run import ExperimentNodeRun as ORMExperimentNodeRun -from promptflow._sdk._orm.orchestrator import Orchestrator as ORMOrchestrator -from promptflow._sdk._orm.run_info import RunInfo as ORMRunInfo -from promptflow._sdk._submitter import RunSubmitter -from promptflow._sdk._submitter.utils import ( +from promptflow._sdk._orchestrator import RunSubmitter +from promptflow._sdk._orchestrator.utils import ( SubmitterHelper, _calculate_snapshot, _set_up_experiment_log_handler, @@ -50,12 +49,16 @@ _stop_orchestrator_process, _windows_stop_handler, ) +from promptflow._sdk._orm.experiment import Experiment as ORMExperiment +from promptflow._sdk._orm.experiment_node_run import ExperimentNodeRun as ORMExperimentNodeRun +from promptflow._sdk._orm.orchestrator import Orchestrator as ORMOrchestrator +from promptflow._sdk._orm.run_info import RunInfo as ORMRunInfo from promptflow._sdk._utils import overwrite_null_std_logger from promptflow._sdk.entities import Run from promptflow._sdk.entities._experiment import Experiment, ExperimentTemplate -from promptflow._sdk.entities._flow import ProtectedFlow from promptflow._sdk.operations import RunOperations from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations +from promptflow._utils.flow_utils import resolve_flow_path from promptflow._utils.inputs_mapping_utils import apply_inputs_mapping from promptflow._utils.load_data import load_data from promptflow._utils.logger_utils import get_cli_sdk_logger @@ -100,8 +103,7 @@ def test( start_nodes = [ node for node in template.nodes - if node.type == ExperimentNodeType.FLOW - and ProtectedFlow._get_flow_definition(node.path) == ProtectedFlow._get_flow_definition(flow_path) + if node.type == ExperimentNodeType.FLOW and resolve_flow_path(node.path) == resolve_flow_path(flow_path) ] if not start_nodes: raise ExperimentValueError(f"Flow {flow_path.as_posix()} not found in experiment {template.dir_name!r}.") @@ -128,18 +130,20 @@ def test( logger.info("Testing completed. See full logs at %s.", test_context.output_path.as_posix()) return test_context.node_results - def _test_node(self, node, test_context) -> Run: + def _test_node(self, node, test_context): if node.type == ExperimentNodeType.FLOW: return self._test_flow_node(node, test_context) elif node.type == ExperimentNodeType.COMMAND: return self._test_command_node(node, test_context) + elif node.type == ExperimentNodeType.CHAT_GROUP: + return self._test_chat_group_node(node, test_context) raise ExperimentValueError(f"Unknown experiment node {node.name!r} type {node.type!r}") def _test_flow_node(self, node, test_context): # Resolve experiment related inputs inputs_mapping = ExperimentHelper.resolve_column_mapping(node.name, node.inputs, test_context.test_inputs) data, runs = ExperimentHelper.get_referenced_data_and_run( - node.name, node.inputs, test_context.test_data, test_context.node_results + node.name, node.type, node.inputs, test_context.test_data, test_context.node_results ) # Add data, run inputs/outputs to binding context for inputs mapping resolve. binding_context = {**{f"data.{k}": v for k, v in data.items()}, **{f"{k}.outputs": v for k, v in runs.items()}} @@ -164,6 +168,14 @@ def _test_flow_node(self, node, test_context): def _test_command_node(self, *args, **kwargs): raise NotImplementedError + def _test_chat_group_node(self, node, test_context): + from promptflow._sdk.entities._chat_group._chat_group import ChatGroup + + chat_group = ChatGroup._from_node(node, test_context) + logger.debug(f"Invoking chat group node {node.name!r}.") + chat_group.invoke() + return chat_group.conversation_history + def start(self, nodes=None, from_nodes=None, attempt=None, **kwargs): """Start an execution of nodes. @@ -258,24 +270,17 @@ def _start_orchestrator(self, context, nodes=None, from_nodes=None): Determine node execution order through topological sorting. :param context: Experiment context. - :type context: ~promptflow._sdk._submitter.ExperimentTemplateContext + :type context: ~promptflow._sdk._orchestrator.ExperimentTemplateContext :param nodes: Nodes to be executed. :type nodes: list :param from_nodes: The branches in experiment to be executed. :type from_nodes: list """ - def prepare_edges(node): - """Get all in-degree nodes of this node.""" - node_names = set() - for input_value in node.inputs.values(): - if ExperimentHelper._is_node_reference(input_value): - referenced_node_name = input_value.split(".")[0].replace("${", "") - node_names.add(referenced_node_name) - return node_names - def generate_node_mapping_by_nodes(from_nodes): - all_node_edges_mapping = {node.name: prepare_edges(node) for node in self.experiment.nodes} + all_node_edges_mapping = { + node.name: ExperimentHelper._prepare_single_node_edges(node) for node in self.experiment.nodes + } node_edges_mapping, next_nodes = {node: all_node_edges_mapping[node] for node in from_nodes}, from_nodes while next_nodes: linked_nodes = set() @@ -389,14 +394,16 @@ def stop_handler(signum, frame): pre_nodes = set() node_mapping = {node.name: node for node in self.experiment.nodes} for node_name in nodes: - pre_nodes.update(prepare_edges(node_mapping[node_name])) + pre_nodes.update(ExperimentHelper._prepare_single_node_edges(node_mapping[node_name])) if not check_in_degree_node_outputs(pre_nodes): raise UserErrorException(f"The output(s) of in-degree of nodes {nodes} do not exist.") node_edges_mapping = {} next_execute_nodes = [self._nodes[name] for name in nodes] else: # Execute all nodes in experiment. - node_edges_mapping = {node.name: prepare_edges(node) for node in self.experiment.nodes} + node_edges_mapping = { + node.name: ExperimentHelper._prepare_single_node_edges(node) for node in self.experiment.nodes + } logger.debug(f"Experiment nodes edges: {node_edges_mapping!r}") next_execute_nodes = get_next_executable_nodes() @@ -516,16 +523,16 @@ def __init__(self, node, experiment, context, node_runs, client, **kwargs): run_output_path = (Path(experiment._output_dir) / "runs" / node.name).resolve().absolute().as_posix() super().__init__( # Use node name as prefix for run name? - type=RunTypes.COMMAND if node.type == ExperimentNodeType.COMMAND else RunTypes.BATCH, + type=EXP_NODE_TYPE_2_RUN_TYPE[node.type], name=self.context.node_name_to_id[node.name], - display_name=node.display_name or node.name, - column_mapping=node.inputs, + display_name=getattr(node, "display_name", None) or node.name, + column_mapping=getattr(node, "inputs", None), variant=getattr(node, "variant", None), flow=self._get_node_path(), outputs=getattr(node, "outputs", None), connections=getattr(node, "connections", None), command=getattr(node, "command", None), - environment_variables=node.environment_variables, + environment_variables=getattr(node, "environment_variables", None), config=Configuration(overrides={Configuration.RUN_OUTPUT_PATH: run_output_path}), **kwargs, ) @@ -537,24 +544,41 @@ def _resolve_column_mapping(self): """Resolve column mapping with experiment inputs to constant values.""" logger.info(f"Start resolve node {self.node.name!r} column mapping.") resolved_mapping = {} - for name, value in self.column_mapping.items(): + if self.node.type in [ExperimentNodeType.FLOW, ExperimentNodeType.COMMAND]: + resolved_mapping = self._resolve_single_column_mapping(self.column_mapping) + elif self.node.type == ExperimentNodeType.CHAT_GROUP: + # for chat group node, resolve column mapping for each role + for role in self.node.roles: + if "inputs" in role: + resolved_mapping[role["role"]] = self._resolve_single_column_mapping(role["inputs"]) + logger.debug(f"Resolved node {self.node.name!r} column mapping {resolved_mapping}.") + self.column_mapping = resolved_mapping + + def _resolve_single_column_mapping(self, column_mapping: Dict[str, Any]): + """Resolve single column mapping with given column mapping dict""" + if column_mapping is None: + return None + + resolved_mapping = {} + for name, value in column_mapping.items(): if not isinstance(value, str) or not value.startswith("${inputs."): resolved_mapping[name] = value continue input_name = value.split(".")[1].replace("}", "") if input_name not in self.experiment_inputs: raise ExperimentValueError( - f"Node {self.node.name!r} inputs {value!r} related experiment input {input_name!r} not found." + f"Input value {value!r} is specified in node {self.node.name!r}, but the related experiment input " + f"{input_name!r} is not found. Allowed inputs are {list(self.experiment_inputs.keys())}." ) resolved_mapping[name] = self.experiment_inputs[input_name].default - logger.debug(f"Resolved node {self.node.name!r} column mapping {resolved_mapping}.") - self.column_mapping = resolved_mapping + return resolved_mapping def _resolve_input_dirs(self): logger.info("Start resolve node %s input dirs.", self.node.name) # Get the node referenced data and run referenced_data, referenced_run = ExperimentHelper.get_referenced_data_and_run( node_name=self.node.name, + node_type=self.node.type, column_mapping=self.column_mapping, experiment_data=self.experiment_data, experiment_runs=self.node_runs, @@ -588,7 +612,7 @@ def _get_node_path(self): elif self.node.type == ExperimentNodeType.COMMAND: return self.node.code elif self.node.type == ExperimentNodeType.CHAT_GROUP: - raise NotImplementedError("Chat group node in experiment is not supported yet.") + return self.node.code raise ExperimentValueError(f"Unknown experiment node {self.node.name!r} type {self.node.type!r}") def _run_node(self) -> Run: @@ -714,9 +738,9 @@ def get_node_context(self, node_name, is_flow, test=False): return node_context # Return the full json context for test global_context = os.environ.get(PF_TRACE_CONTEXT) - # Expected global context: {"endpoint": "..", "attributes": {..}} - global_context = json.loads(global_context) if global_context else {"endpoint": "", "attributes": {}} - global_context["attributes"].update(node_context) + # Expected global context: {"endpoint": "..", PF_TRACE_CONTEXT_ATTR: {..}} + global_context = json.loads(global_context) if global_context else {"endpoint": "", PF_TRACE_CONTEXT_ATTR: {}} + global_context[PF_TRACE_CONTEXT_ATTR].update(node_context) return {PF_TRACE_CONTEXT: json.dumps(global_context)} @@ -780,14 +804,38 @@ def prepare_test_data(inputs, template: ExperimentTemplate) -> dict: @staticmethod def get_referenced_data_and_run( - node_name: str, column_mapping: dict, experiment_data: dict, experiment_runs: dict + node_name: str, node_type: str, column_mapping: dict, experiment_data: dict, experiment_runs: dict ) -> tuple: + """Get the node referenced data and runs from dict.""" + if node_type in [ExperimentNodeType.FLOW, ExperimentNodeType.COMMAND]: + return ExperimentHelper.get_data_and_run_from_single_column_mapping( + node_name, column_mapping, experiment_data, experiment_runs + ) + # for chat group node, get data and run from all roles column mapping + elif node_type == ExperimentNodeType.CHAT_GROUP: + data, run = {}, {} + for role, role_column_mapping in column_mapping.items(): + role_data, role_run = ExperimentHelper.get_data_and_run_from_single_column_mapping( + node_name, role_column_mapping, experiment_data, experiment_runs + ) + data.update(role_data) + run.update(role_run) + return data, run + raise ExperimentValueError(f"Unknown experiment node type {node_type!r} from node {node_name!r}.") + + @staticmethod + def get_data_and_run_from_single_column_mapping( + node_name: str, column_mapping: dict, experiment_data: dict, experiment_runs: dict + ): """Get the node referenced data and runs from dict.""" data, run = {}, {} for value in column_mapping.values(): if not isinstance(value, str): continue - if value.startswith("${data."): + # ${parent.conversation_history} is a special binding for chat group node + if value == f"${{{CHAT_GROUP_REFERENCE_NAME}.{CONVERSATION_HISTORY}}}": + continue + elif value.startswith("${data."): name = value.split(".")[1].replace("}", "") if name not in experiment_data: raise ExperimentValueError( @@ -837,7 +885,18 @@ def _is_node_reference(value): def _prepare_single_node_edges(node): """Prepare single node name to referenced node name edges mapping.""" node_names = set() - for input_value in node.inputs.values(): + + # if node is chat group, then get all inputs from roles + node_input_values = [] + if node.type == ExperimentNodeType.CHAT_GROUP: + for role in node.roles: + role_inputs = role.get("inputs", {}).values() + node_input_values.append(list(role_inputs)) + else: + node_input_values = list(node.inputs.values()) + + # Get all in-degree nodes of this node + for input_value in node_input_values: if not isinstance(input_value, str): continue if ExperimentHelper._is_node_reference(input_value): diff --git a/src/promptflow/promptflow/_sdk/_submitter/run_submitter.py b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/run_submitter.py similarity index 87% rename from src/promptflow/promptflow/_sdk/_submitter/run_submitter.py rename to src/promptflow-devkit/promptflow/_sdk/_orchestrator/run_submitter.py index 6be4a5c85a0..7e2f76e828c 100644 --- a/src/promptflow/promptflow/_sdk/_submitter/run_submitter.py +++ b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/run_submitter.py @@ -8,22 +8,22 @@ from typing import Union from promptflow._constants import FlowLanguage -from promptflow._core.operation_context import OperationContext from promptflow._sdk._constants import ContextAttributeKey, FlowRunProperties -from promptflow._sdk._utils import parse_variant -from promptflow._sdk.entities._flow import ProtectedFlow +from promptflow._sdk.entities._flow import Flow from promptflow._sdk.entities._run import Run from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations from promptflow._utils.context_utils import _change_working_dir +from promptflow._utils.flow_utils import parse_variant +from promptflow._utils.logger_utils import LoggerFactory from promptflow.batch import BatchEngine from promptflow.contracts.run_info import Status from promptflow.contracts.run_mode import RunMode from promptflow.exceptions import UserErrorException, ValidationException +from promptflow.tracing._operation_context import OperationContext -from ..._utils.logger_utils import LoggerFactory from .._configuration import Configuration from .._load_functions import load_flow -from ..entities._eager_flow import EagerFlow +from ..entities._flow import FlexFlow from .utils import SubmitterHelper, variant_overwrite_context logger = LoggerFactory.get_logger(name=__name__) @@ -102,21 +102,26 @@ def _validate_inputs(cls, run: Run): error = ValidationException("Either run or data or resume from run must be specified for flow run.") raise UserErrorException(message=str(error), error=error) - def _submit_bulk_run( - self, flow: Union[ProtectedFlow, EagerFlow], run: Run, local_storage: LocalStorageOperations - ) -> dict: + def _submit_bulk_run(self, flow: Union[Flow, FlexFlow], run: Run, local_storage: LocalStorageOperations) -> dict: logger.info(f"Submitting run {run.name}, log path: {local_storage.logger.file_path}") run_id = run.name - if flow.language == FlowLanguage.CSharp: - # TODO: consider moving this to Operations - from promptflow.batch import CSharpExecutorProxy + # for python, we can get metadata in-memory, so no need to dump them first + if flow.language != FlowLanguage.Python: + from promptflow._proxy import ProxyFactory - CSharpExecutorProxy.generate_metadata(flow_file=Path(flow.path), assembly_folder=Path(flow.code)) - # TODO: shall we resolve connections here? - connections = [] - else: - with _change_working_dir(flow.code): - connections = SubmitterHelper.resolve_connections(flow=flow) + # variants are resolved in the context, so we can't move this logic to Operations for now + ProxyFactory().get_executor_proxy_cls(flow.language).dump_metadata( + flow_file=Path(flow.path), working_dir=Path(flow.code) + ) + + with _change_working_dir(flow.code): + # resolve connections with environment variables overrides to avoid getting unused connections + logger.debug( + f"Resolving connections for flow {flow.path} with environment variables {run.environment_variables}." + ) + connections = SubmitterHelper.resolve_connections( + flow=flow, environment_variables_overrides=run.environment_variables + ) column_mapping = run.column_mapping # resolve environment variables run.environment_variables = SubmitterHelper.load_and_resolve_environment_variables( @@ -141,17 +146,18 @@ def _submit_bulk_run( flow.path, flow.code, connections=connections, - entry=flow.entry if isinstance(flow, EagerFlow) else None, + entry=flow.entry if isinstance(flow, FlexFlow) else None, storage=local_storage, log_path=local_storage.logger.file_path, - resume_from_run_storage=resume_from_run_storage, - resume_from_run_output_dir=resume_from_run_storage.outputs_folder if resume_from_run_storage else None, + init_kwargs=run.init, ) batch_result = batch_engine.run( input_dirs=input_dirs, inputs_mapping=column_mapping, output_dir=local_storage.outputs_folder, run_id=run_id, + resume_from_run_storage=resume_from_run_storage, + resume_from_run_output_dir=resume_from_run_storage.outputs_folder if resume_from_run_storage else None, ) error_logs = [] if batch_result.failed_lines > 0: diff --git a/src/promptflow/promptflow/_sdk/_submitter/test_submitter.py b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/test_submitter.py similarity index 87% rename from src/promptflow/promptflow/_sdk/_submitter/test_submitter.py rename to src/promptflow-devkit/promptflow/_sdk/_orchestrator/test_submitter.py index 375b0787eeb..5eb589bf175 100644 --- a/src/promptflow/promptflow/_sdk/_submitter/test_submitter.py +++ b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/test_submitter.py @@ -10,26 +10,27 @@ from colorama import Fore, init +from promptflow._constants import LINE_NUMBER_KEY, FlowLanguage +from promptflow._core._errors import NotSupported from promptflow._internal import ConnectionManager +from promptflow._proxy import ProxyFactory from promptflow._sdk._constants import PROMPT_FLOW_DIR_NAME -from promptflow._sdk._utils import dump_flow_result, parse_variant -from promptflow._sdk.entities._flow import FlowBase, FlowContext, ProtectedFlow +from promptflow._sdk.entities._flow import Flow, FlowContext from promptflow._sdk.operations._local_storage_operations import LoggerOperations +from promptflow._utils.async_utils import async_run_allowing_running_loop from promptflow._utils.context_utils import _change_working_dir +from promptflow._utils.dataclass_serializer import convert_eager_flow_output_to_dict from promptflow._utils.exception_utils import ErrorResponse +from promptflow._utils.flow_utils import dump_flow_result, parse_variant +from promptflow._utils.logger_utils import get_cli_sdk_logger from promptflow.contracts.flow import Flow as ExecutableFlow from promptflow.contracts.run_info import RunInfo, Status from promptflow.exceptions import UserErrorException from promptflow.executor._result import LineResult from promptflow.storage._run_storage import DefaultRunStorage -from ..._constants import LINE_NUMBER_KEY, FlowLanguage -from ..._core._errors import NotSupported -from ..._utils.async_utils import async_run_allowing_running_loop -from ..._utils.logger_utils import get_cli_sdk_logger -from ...batch import APIBasedExecutorProxy, CSharpExecutorProxy from .._configuration import Configuration -from ..entities._eager_flow import EagerFlow +from ..entities._flow import FlexFlow from .utils import ( SubmitterHelper, print_chat_output, @@ -61,12 +62,12 @@ class TestSubmitter: def __init__( self, - flow: Union[ProtectedFlow, EagerFlow], + flow: Union[Flow, FlexFlow], flow_context: FlowContext, client=None, ): self._flow = flow - self.entry = flow.entry if isinstance(flow, EagerFlow) else None + self.entry = flow.entry if isinstance(flow, FlexFlow) else None self._origin_flow = flow self._dataplane_flow = None self.flow_context = flow_context @@ -84,11 +85,11 @@ def __init__( self._target_node = None self._storage = None self._enable_stream_output = None - self._executor_proxy: Optional[APIBasedExecutorProxy] = None + self._executor_proxy = None self._within_init_context = False @property - def executor_proxy(self) -> APIBasedExecutorProxy: + def executor_proxy(self): self._raise_if_not_within_init_context() return self._executor_proxy @@ -158,31 +159,7 @@ def _resolve_variant(self): self._node_variant = None @classmethod - def _resolve_connections(cls, flow: FlowBase, client): - if flow.language == FlowLanguage.CSharp: - # TODO: check if this is a shared logic - if isinstance(flow, EagerFlow): - # connection overrides are not supported for eager flow for now - return {} - - # TODO: is it possible that we resolve connections after executor proxy is created? - from promptflow.batch import CSharpExecutorProxy - - return SubmitterHelper.resolve_used_connections( - flow=flow, - tools_meta=CSharpExecutorProxy.get_tool_metadata( - flow_file=flow.flow_dag_path, - working_dir=flow.code, - ), - client=client, - ) - if flow.language == FlowLanguage.Python: - # TODO: test submitter should not interact with dataplane flow directly - return SubmitterHelper.resolve_connections(flow=flow, client=client) - raise UserErrorException(f"Unsupported flow language {flow.language}") - - @classmethod - def _resolve_environment_variables(cls, environment_variable_overrides, flow: ProtectedFlow, client): + def _resolve_environment_variables(cls, environment_variable_overrides, flow: Flow, client): return SubmitterHelper.load_and_resolve_environment_variables( flow=flow, environment_variable_overrides=environment_variable_overrides, client=client ) @@ -240,9 +217,13 @@ def init( # temp flow is generated, will use self.flow instead of self._origin_flow in the following context self._within_init_context = True - if self.flow.language == FlowLanguage.CSharp: - # TODO: consider move this to Operations - CSharpExecutorProxy.generate_metadata(self.flow.path, self.flow.code) + # Python flow may get metadata in-memory, so no need to dump them first + if self.flow.language != FlowLanguage.Python: + # variant is resolve in the context, so we can't move this to Operations for now + ProxyFactory().get_executor_proxy_cls(self.flow.language).dump_metadata( + flow_file=self.flow.path, + working_dir=self.flow.code, + ) self._target_node = target_node self._enable_stream_output = stream_output @@ -256,7 +237,8 @@ def init( or {}, ) - if Configuration(overrides=self._client._config).is_internal_features_enabled(): + # do not enable trace when test single node, as we have not determined this behavior + if target_node is None and Configuration(overrides=self._client._config).is_internal_features_enabled(): logger.debug("Starting trace for flow test...") start_trace(session=session) @@ -268,7 +250,7 @@ def init( self._relative_flow_output_path = output_sub / "output" # use flow instead of origin_flow here, as flow can be incomplete before resolving additional includes - self._connections = connections or self._resolve_connections( + self._connections = connections or SubmitterHelper.resolve_connections( self.flow, self._client, ) @@ -285,23 +267,21 @@ def init( sub_dir=output_sub / "intermediate", ) - # TODO: set up executor proxy for all languages - if self.flow.language == FlowLanguage.CSharp: - self._executor_proxy = async_run_allowing_running_loop( - CSharpExecutorProxy.create, - self.flow.path, - self.flow.code, - connections=self._connections, - storage=self._storage, - log_path=log_path, - enable_stream_output=stream_output, - ) + self._executor_proxy = ProxyFactory().create_executor_proxy( + self.flow.path, + self.flow.code, + connections=self._connections, + storage=self._storage, + log_path=log_path, + enable_stream_output=stream_output, + language=self.flow.language, + ) try: yield self finally: if self.executor_proxy: - async_run_allowing_running_loop(self.executor_proxy.destroy_if_all_generators_exhausted) + async_run_allowing_running_loop(self.executor_proxy.destroy) self._within_init_context = False @@ -448,12 +428,13 @@ def flow_test( run_id=run_id, ) else: - from promptflow._utils.multimedia_utils import persist_multimedia_data + from promptflow._utils.multimedia_utils import BasicMultimediaProcessor # TODO: support run_id for non-python # TODO: most of below code is duplicate to flow_executor.execute_flow line_result: LineResult = self.executor_proxy.exec_line(inputs, index=0) - line_result.output = persist_multimedia_data( + # csharp flow does not support multimedia contract currently, just use the default multimedia processor + line_result.output = BasicMultimediaProcessor().persist_multimedia_data( line_result.output, base_dir=self.output_base, sub_dir=self.relative_flow_output_path ) if line_result.aggregation_inputs: @@ -471,10 +452,7 @@ def flow_test( # remove line_number from output line_result.output.pop(LINE_NUMBER_KEY, None) - if isinstance(line_result.output, dict): - generator_outputs = self._get_generator_outputs(line_result.output) - if generator_outputs: - logger.info(f"Some streaming outputs in the result, {generator_outputs.keys()}") + self._get_generator_outputs(line_result.output) return line_result def node_test( @@ -584,5 +562,9 @@ def _raise_error_when_test_failed(test_result, show_trace=False): @staticmethod def _get_generator_outputs(outputs): - outputs = outputs or {} - return {key: outputs for key, output in outputs.items() if isinstance(output, GeneratorType)} + # covert output to dict to unify the log + outputs = convert_eager_flow_output_to_dict(outputs) + if isinstance(outputs, dict): + generator_outputs = {key: output for key, output in outputs.items() if isinstance(output, GeneratorType)} + if generator_outputs: + logger.info(f"Some streaming outputs in the result, {generator_outputs.keys()}") diff --git a/src/promptflow/promptflow/_sdk/_submitter/utils.py b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/utils.py similarity index 76% rename from src/promptflow/promptflow/_sdk/_submitter/utils.py rename to src/promptflow-devkit/promptflow/_sdk/_orchestrator/utils.py index 4aa84604e16..0b4ff379fed 100644 --- a/src/promptflow/promptflow/_sdk/_submitter/utils.py +++ b/src/promptflow-devkit/promptflow/_sdk/_orchestrator/utils.py @@ -25,6 +25,7 @@ from pydash import objects from promptflow._constants import STREAMING_ANIMATION_TIME +from promptflow._proxy import ProxyFactory from promptflow._sdk._constants import ( ALL_CONNECTION_TYPES, DEFAULT_VAR_ID, @@ -39,18 +40,13 @@ ) from promptflow._sdk._errors import InvalidFlowError, RunOperationError from promptflow._sdk._load_functions import load_flow -from promptflow._sdk._utils import ( - _merge_local_code_and_additional_includes, - get_local_connections_from_executable, - get_used_connection_names_from_dict, - update_dict_value_with_connections, -) -from promptflow._sdk.entities._eager_flow import EagerFlow -from promptflow._sdk.entities._flow import Flow, ProtectedFlow -from promptflow._utils.context_utils import _change_working_dir +from promptflow._sdk._utils import _merge_local_code_and_additional_includes +from promptflow._sdk.entities._flow import FlexFlow, Flow from promptflow._utils.flow_utils import dump_flow_dag, load_flow_dag from promptflow._utils.logger_utils import FileHandler, get_cli_sdk_logger from promptflow.contracts.flow import Flow as ExecutableFlow +from promptflow.core._utils import get_used_connection_names_from_dict, update_dict_value_with_connections +from promptflow.exceptions import UserErrorException logger = get_cli_sdk_logger() @@ -102,6 +98,9 @@ def overwrite_connections(flow_dag: dict, connections: dict, working_dir: PathLi # Load executable flow to check if connection is LLM connection executable_flow = ExecutableFlow._from_dict(flow_dag=flow_dag, working_dir=Path(working_dir)) + # generate tool meta for deployment name, model override + # tools_meta = generate_flow_tools_json(flow_directory=working_dir, dump=False, used_packages_only=True) + node_name_2_node = {node["name"]: node for node in flow_dag[NODES]} for node_name, connection_dict in connections.items(): @@ -111,30 +110,73 @@ def overwrite_connections(flow_dag: dict, connections: dict, working_dir: PathLi raise InvalidFlowError(f"Invalid connection overwrite format: {connection_dict}, only dict is supported.") node = node_name_2_node[node_name] executable_node = executable_flow.get_node(node_name=node_name) + + # override connections if executable_flow.is_llm_node(executable_node): - unsupported_keys = connection_dict.keys() - SUPPORTED_CONNECTION_FIELDS - if unsupported_keys: - raise InvalidFlowError( - f"Unsupported llm connection overwrite keys: {unsupported_keys}," - f" only {SUPPORTED_CONNECTION_FIELDS} are supported." - ) - try: - connection = connection_dict.get(ConnectionFields.CONNECTION) - if connection: - node[ConnectionFields.CONNECTION] = connection - deploy_name = connection_dict.get(ConnectionFields.DEPLOYMENT_NAME) - if deploy_name: - node[INPUTS][ConnectionFields.DEPLOYMENT_NAME] = deploy_name - except KeyError as e: - raise InvalidFlowError( - f"Failed to overwrite llm node {node_name} with connections {connections}" - ) from e + override_llm_connections( + node=node, + connection_dict=connection_dict, + node_name=node_name, + ) else: - connection_inputs = executable_flow.get_connection_input_names_for_node(node_name=node_name) - for c, v in connection_dict.items(): - if c not in connection_inputs: - raise InvalidFlowError(f"Connection with name {c} not found in node {node_name}'s inputs") - node[INPUTS][c] = v + override_python_connections( + node=node, + connection_dict=connection_dict, + tools_meta={}, + executable_flow=executable_flow, + node_name=node_name, + ) + + +def override_llm_connections(node: dict, connection_dict: dict, node_name: str): + """apply connection override on llm node.""" + try: + # override connection + connection = connection_dict.get(ConnectionFields.CONNECTION.value) + if connection: + logger.debug(f"Overwriting connection for node {node_name} with {connection}") + node[ConnectionFields.CONNECTION] = connection + connection_dict.pop(ConnectionFields.CONNECTION.value) + # override deployment_name and model + for field in [ConnectionFields.DEPLOYMENT_NAME.value, ConnectionFields.MODEL.value]: + if field in connection_dict: + logger.debug(f"Overwriting {field} for node {node_name} with {connection_dict[field]}") + node[INPUTS][field] = connection_dict[field] + connection_dict.pop(field) + except KeyError as e: + raise InvalidFlowError(f"Failed to overwrite llm node {node_name} with connections {connection_dict}") from e + if connection_dict: + raise InvalidFlowError( + f"Unsupported llm connection overwrite keys: {connection_dict.keys()}," + f" only {SUPPORTED_CONNECTION_FIELDS} are supported." + ) + + +def override_python_connections( + node: dict, connection_dict: dict, tools_meta: dict, executable_flow: ExecutableFlow, node_name: str +): + """apply connection override on python node.""" + connection_inputs = executable_flow.get_connection_input_names_for_node(node_name=node_name) + consumed_connections = set() + for c, v in connection_dict.items(): + if c in connection_inputs: + logger.debug(f"Overwriting connection for node {node_name} with {c}:{v}") + node[INPUTS][c] = v + consumed_connections.add(c) + else: + # TODO(3021931): check if input c is enabled by connection instead of hard code + logger.debug(f"Overwriting enabled by connection input for node {node_name} with {c}:{v}") + for field in [ConnectionFields.DEPLOYMENT_NAME.value, ConnectionFields.MODEL.value]: + if field in connection_dict: + logger.debug(f"Overwriting {field} for node {node_name} with {connection_dict[field]}") + node[INPUTS][field] = connection_dict[field] + consumed_connections.add(field) + unused_connections = connection_dict.keys() - consumed_connections + if unused_connections: + raise InvalidFlowError( + f"Unsupported llm connection overwrite keys: {unused_connections}," + f" only {SUPPORTED_CONNECTION_FIELDS} are supported." + ) def overwrite_flow(flow_dag: dict, params_overrides: dict): @@ -172,7 +214,7 @@ def variant_overwrite_context( if flow.additional_includes: # Merge the flow folder and additional includes to temp folder for both eager flow & dag flow. with _merge_local_code_and_additional_includes(code_path=flow_dir_path) as temp_dir: - if not isinstance(flow, EagerFlow): + if not isinstance(flow, FlexFlow): # always overwrite variant since we need to overwrite default variant if not specified. overwrite_variant(flow_dag, tuning_node, variant, drop_node_variants=drop_node_variants) overwrite_connections(flow_dag, connections, working_dir=flow_dir_path) @@ -181,7 +223,7 @@ def variant_overwrite_context( dump_flow_dag(flow_dag, Path(temp_dir)) flow = load_flow(temp_dir) yield flow - elif isinstance(flow, EagerFlow): + elif isinstance(flow, FlexFlow): # eager flow don't support overwrite variant yield flow else: @@ -192,7 +234,7 @@ def variant_overwrite_context( overwrite_connections(flow_dag, connections, working_dir=flow_dir_path) overwrite_flow(flow_dag, overrides) flow_path = dump_flow_dag(flow_dag, Path(temp_dir)) - flow = ProtectedFlow(code=flow_dir_path, path=flow_path, dag=flow_dag) + flow = Flow(code=flow_dir_path, path=flow_path, dag=flow_dag) yield flow @@ -206,38 +248,35 @@ def init_env(cls, environment_variables): load_dotenv(environment_variables) @staticmethod - def resolve_connections(flow: Flow, client=None, connections_to_ignore=None) -> dict: - # TODO 2856400: use resolve_used_connections instead of this function to avoid using executable in control-plane - from promptflow._sdk.entities._eager_flow import EagerFlow - + def resolve_connections( + flow: Flow, + client=None, + *, + connections_to_ignore=None, + connections_to_add: List[str] = None, + environment_variables_overrides: Dict[str, str] = None, + ) -> dict: from .._pf_client import PFClient - if isinstance(flow, EagerFlow): - # TODO(2898247): support prompt flow management connection for eager flow - return {} - client = client or PFClient() - with _change_working_dir(flow.code): - executable = ExecutableFlow.from_yaml(flow_file=flow.path, working_dir=flow.code) - executable.name = str(Path(flow.code).stem) - return get_local_connections_from_executable( - executable=executable, client=client, connections_to_ignore=connections_to_ignore + connection_names = ( + ProxyFactory() + .create_inspector_proxy(flow.language) + .get_used_connection_names( + flow_file=flow.path, + working_dir=flow.code, + environment_variables_overrides=environment_variables_overrides, + ) ) - @staticmethod - def resolve_used_connections(flow: ProtectedFlow, tools_meta: dict, client, connections_to_ignore=None) -> dict: - from .._pf_client import PFClient - - client = client or PFClient() - connection_names = SubmitterHelper.get_used_connection_names(tools_meta=tools_meta, flow_dag=flow._data) - connections_to_ignore = connections_to_ignore or [] - result = {} - for n in connection_names: - if n not in connections_to_ignore: - conn = client.connections.get(name=n, with_secrets=True) - result[n] = conn._to_execution_connection_dict() - return result + return SubmitterHelper.resolve_connection_names( + connection_names=connection_names, + client=client, + connections_to_ignore=connections_to_ignore, + raise_error=True, + connections_to_add=connections_to_add, + ) @staticmethod def get_used_connection_names(tools_meta: dict, flow_dag: dict): @@ -283,9 +322,21 @@ def resolve_environment_variables(cls, environment_variables: dict, client=None) update_dict_value_with_connections(built_connections=connections, connection_dict=environment_variables) @staticmethod - def resolve_connection_names(connection_names, client, raise_error=False): + def resolve_connection_names( + connection_names, + client, + *, + raise_error=False, + connections_to_ignore=None, + connections_to_add=None, + ): + connection_names = set(connection_names) + if connections_to_add: + connection_names.update(connections_to_add) result = {} for n in connection_names: + if connections_to_ignore and n in connections_to_ignore: + continue try: conn = client.connections.get(name=n, with_secrets=True) result[n] = conn._to_execution_connection_dict() @@ -313,7 +364,7 @@ def show_node_log_and_output(node_run_infos, show_node_output, generator_record) # TODO executor return a type string of generator node_output = node_result.output if isinstance(node_result.output, GeneratorType): - node_output = "".join( + node_output = _safe_join( resolve_generator_output_with_cache( node_output, generator_record, generator_key=f"nodes.{node_name}.output" ) @@ -358,19 +409,33 @@ def resolve_generator_output_with_cache( output = iter(generator_record[generator_key]) else: if hasattr(output.gi_frame.f_locals, "proxy"): - proxy = output.gi_frame.f_locals["proxy"] - generator_record[generator_key] = proxy + generator_record[generator_key] = output.gi_frame.f_locals["proxy"] else: generator_record[generator_key] = list(output) output = generator_record[generator_key] return output +def _safe_join(generator_output): + items = [] + for item in generator_output: + if isinstance(item, str): + items.append(item) + else: + try: + items.append(str(item)) + except Exception as e: + raise UserErrorException( + message=f"Failed to convert generator output to string: {e}", + ) + return "".join(items) + + def resolve_generator(flow_result, generator_record): # resolve generator in flow result for k, v in flow_result.run_info.output.items(): if isinstance(v, GeneratorType): - flow_output = "".join( + flow_output = _safe_join( resolve_generator_output_with_cache(v, generator_record, generator_key=f"run.outputs.{k}") ) flow_result.run_info.output[k] = flow_output @@ -380,7 +445,7 @@ def resolve_generator(flow_result, generator_record): # resolve generator in node outputs for node_name, node in flow_result.node_run_infos.items(): if isinstance(node.output, GeneratorType): - node_output = "".join( + node_output = _safe_join( resolve_generator_output_with_cache( node.output, generator_record, generator_key=f"nodes.{node_name}.output" ) @@ -434,7 +499,7 @@ def calculate_files_content_hash(file_path): if ignore_item in dirs: dirs.remove(ignore_item) for file in files: - with open(os.path.join(root, file), "r") as f: + with open(os.path.join(root, file), "r", encoding="utf-8") as f: relative_path = (Path(root) / file).relative_to(Path(file_path)).as_posix() try: file_content[relative_path] = hashlib.md5(f.read().encode("utf8")).hexdigest() diff --git a/src/promptflow/promptflow/_sdk/_orm/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_orm/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_orm/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/_orm/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_orm/connection.py b/src/promptflow-devkit/promptflow/_sdk/_orm/connection.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_orm/connection.py rename to src/promptflow-devkit/promptflow/_sdk/_orm/connection.py diff --git a/src/promptflow/promptflow/_sdk/_orm/experiment.py b/src/promptflow-devkit/promptflow/_sdk/_orm/experiment.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_orm/experiment.py rename to src/promptflow-devkit/promptflow/_sdk/_orm/experiment.py diff --git a/src/promptflow/promptflow/_sdk/_orm/experiment_node_run.py b/src/promptflow-devkit/promptflow/_sdk/_orm/experiment_node_run.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_orm/experiment_node_run.py rename to src/promptflow-devkit/promptflow/_sdk/_orm/experiment_node_run.py diff --git a/src/promptflow/promptflow/_sdk/_orm/orchestrator.py b/src/promptflow-devkit/promptflow/_sdk/_orm/orchestrator.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_orm/orchestrator.py rename to src/promptflow-devkit/promptflow/_sdk/_orm/orchestrator.py diff --git a/src/promptflow/promptflow/_sdk/_orm/retry.py b/src/promptflow-devkit/promptflow/_sdk/_orm/retry.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_orm/retry.py rename to src/promptflow-devkit/promptflow/_sdk/_orm/retry.py diff --git a/src/promptflow/promptflow/_sdk/_orm/run_info.py b/src/promptflow-devkit/promptflow/_sdk/_orm/run_info.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_orm/run_info.py rename to src/promptflow-devkit/promptflow/_sdk/_orm/run_info.py diff --git a/src/promptflow/promptflow/_sdk/_orm/session.py b/src/promptflow-devkit/promptflow/_sdk/_orm/session.py similarity index 96% rename from src/promptflow/promptflow/_sdk/_orm/session.py rename to src/promptflow-devkit/promptflow/_sdk/_orm/session.py index b1d7129c65e..eed9ef2dfed 100644 --- a/src/promptflow/promptflow/_sdk/_orm/session.py +++ b/src/promptflow-devkit/promptflow/_sdk/_orm/session.py @@ -17,9 +17,11 @@ from promptflow._sdk._configuration import Configuration from promptflow._sdk._constants import ( CONNECTION_TABLE_NAME, + EVENT_TABLENAME, EXP_NODE_RUN_TABLE_NAME, EXPERIMENT_CREATED_ON_INDEX_NAME, EXPERIMENT_TABLE_NAME, + LINE_RUN_TABLENAME, LOCAL_MGMT_DB_PATH, LOCAL_MGMT_DB_SESSION_ACQUIRE_LOCK_PATH, ORCHESTRATOR_TABLE_NAME, @@ -272,10 +274,16 @@ def trace_mgmt_db_session() -> Session: engine = create_engine(f"sqlite:///{str(TRACE_MGMT_DB_PATH)}", future=True) engine = support_transaction(engine) - if not inspect(engine).has_table(SPAN_TABLENAME): - from promptflow._sdk._orm.trace import Span + if any( + [ + not inspect(engine).has_table(EVENT_TABLENAME), + not inspect(engine).has_table(SPAN_TABLENAME), + not inspect(engine).has_table(LINE_RUN_TABLENAME), + ] + ): + from .trace import Base - Span.metadata.create_all(engine) + Base.metadata.create_all(engine) trace_session_maker = sessionmaker(bind=engine) except Exception as e: # pylint: disable=broad-except diff --git a/src/promptflow-devkit/promptflow/_sdk/_orm/trace.py b/src/promptflow-devkit/promptflow/_sdk/_orm/trace.py new file mode 100644 index 00000000000..0f89c5d0938 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_orm/trace.py @@ -0,0 +1,230 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import datetime +import typing + +from sqlalchemy import INTEGER, JSON, REAL, TEXT, TIMESTAMP, Column, Index +from sqlalchemy.orm import Mapped, declarative_base + +from promptflow._sdk._constants import EVENT_TABLENAME, LINE_RUN_TABLENAME, SPAN_TABLENAME, TRACE_LIST_DEFAULT_LIMIT +from promptflow._sdk._errors import LineRunNotFoundError + +from .retry import sqlite_retry +from .session import trace_mgmt_db_session + + +class EventIndexName: + TRACE_ID_SPAN_ID = "idx_events_trace_id_span_id" + + +class SpanIndexName: + TRACE_ID = "idx_spans_trace_id" + TRACE_ID_SPAN_ID = "idx_spans_trace_id_span_id" + + +class LineRunIndexName: + RUN_LINE_NUMBER = "idx_line_runs_run_line_number" # query parent line run + PARENT_ID = "idx_line_runs_parent_id" + COLLECTION = "idx_line_runs_collection" + RUN = "idx_line_runs_run" + EXPERIMENT = "idx_line_runs_experiment" + TRACE_ID = "idx_line_runs_trace_id" + SESSION_ID = "idx_line_runs_session_id" + + +Base = declarative_base() + + +class Event(Base): + __tablename__ = EVENT_TABLENAME + + event_id: Mapped[str] = Column(TEXT, primary_key=True) + trace_id: Mapped[str] = Column(TEXT) + span_id: Mapped[str] = Column(TEXT) + data: Mapped[str] = Column(TEXT) + + __table_args__ = (Index(EventIndexName.TRACE_ID_SPAN_ID, "trace_id", "span_id"),) + + @sqlite_retry + def persist(self) -> None: + with trace_mgmt_db_session() as session: + session.add(self) + session.commit() + + @staticmethod + @sqlite_retry + def get(event_id: str) -> "Event": + with trace_mgmt_db_session() as session: + event = session.query(Event).filter(Event.event_id == event_id).first() + # TODO: validate event is None + return event + + @staticmethod + @sqlite_retry + def list(trace_id: str, span_id: str) -> typing.List["Event"]: + with trace_mgmt_db_session() as session: + events = session.query(Event).filter(Event.trace_id == trace_id, Event.span_id == span_id).all() + return events + + +class Span(Base): + __tablename__ = SPAN_TABLENAME + + trace_id: Mapped[str] = Column(TEXT) + span_id: Mapped[str] = Column(TEXT, primary_key=True) + name: Mapped[str] = Column(TEXT) + context: Mapped[typing.Dict] = Column(JSON) + kind: Mapped[str] = Column(TEXT) + parent_id: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + start_time: Mapped[datetime.datetime] = Column(TIMESTAMP) + end_time: Mapped[datetime.datetime] = Column(TIMESTAMP) + status: Mapped[typing.Dict] = Column(JSON) + attributes: Mapped[typing.Optional[typing.Dict]] = Column(JSON, nullable=True) + links: Mapped[typing.Optional[typing.List]] = Column(JSON, nullable=True) + events: Mapped[typing.Optional[typing.List]] = Column(JSON, nullable=True) + resource: Mapped[typing.Dict] = Column(JSON) + + __table_args__ = ( + Index(SpanIndexName.TRACE_ID, "trace_id"), + Index(SpanIndexName.TRACE_ID_SPAN_ID, "trace_id", "span_id"), + ) + + @sqlite_retry + def persist(self) -> None: + with trace_mgmt_db_session() as session: + session.add(self) + session.commit() + + @staticmethod + @sqlite_retry + def get(span_id: str, trace_id: typing.Optional[str] = None) -> "Span": + with trace_mgmt_db_session() as session: + query = session.query(Span) + if trace_id is not None: + query = query.filter(Span.trace_id == trace_id, Span.span_id == span_id) + else: + query = query.filter(Span.span_id == span_id) + span = query.first() + # TODO: validate span is None + return span + + @staticmethod + @sqlite_retry + def list(trace_ids: typing.Union[str, typing.List[str]]) -> typing.List["Span"]: + if isinstance(trace_ids, str): + trace_ids = [trace_ids] + with trace_mgmt_db_session() as session: + spans = session.query(Span).filter(Span.trace_id.in_(trace_ids)).all() + return spans + + +class LineRun(Base): + __tablename__ = LINE_RUN_TABLENAME + + line_run_id: Mapped[str] = Column(TEXT, primary_key=True) + trace_id: Mapped[str] = Column(TEXT) + root_span_id: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + inputs: Mapped[typing.Optional[typing.Dict]] = Column(JSON, nullable=True) + outputs: Mapped[typing.Optional[typing.Dict]] = Column(JSON, nullable=True) + start_time: Mapped[datetime.datetime] = Column(TIMESTAMP) + end_time: Mapped[typing.Optional[datetime.datetime]] = Column(TIMESTAMP, nullable=True) + status: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + duration: Mapped[typing.Optional[float]] = Column(REAL, nullable=True) + name: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + kind: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + cumulative_token_count: Mapped[typing.Optional[typing.Dict]] = Column(JSON, nullable=True) + parent_id: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + run: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + line_number: Mapped[typing.Optional[int]] = Column(INTEGER, nullable=True) + experiment: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + session_id: Mapped[typing.Optional[str]] = Column(TEXT, nullable=True) + collection: Mapped[str] = Column(TEXT) + + __table_args__ = ( + Index(LineRunIndexName.RUN_LINE_NUMBER, "run", "line_number"), + Index(LineRunIndexName.PARENT_ID, "parent_id"), + Index(LineRunIndexName.COLLECTION, "collection"), + Index(LineRunIndexName.RUN, "run"), + Index(LineRunIndexName.EXPERIMENT, "experiment"), + Index(LineRunIndexName.TRACE_ID, "trace_id"), + Index(LineRunIndexName.SESSION_ID, "session_id"), + ) + + @sqlite_retry + def persist(self) -> None: + with trace_mgmt_db_session() as session: + session.add(self) + session.commit() + + @staticmethod + @sqlite_retry + def get(line_run_id: str) -> "LineRun": + with trace_mgmt_db_session() as session: + line_run = session.query(LineRun).filter(LineRun.line_run_id == line_run_id).first() + if line_run is None: + raise LineRunNotFoundError(f"Line run {line_run_id!r} cannot found.") + return line_run + + @staticmethod + @sqlite_retry + def _get_with_run_and_line_number(run: str, line_number: int) -> typing.Optional["LineRun"]: + # this function is currently exclusively used to query parent line run + with trace_mgmt_db_session() as session: + line_run = ( + session.query(LineRun) + .filter( + LineRun.run == run, + LineRun.line_number == line_number, + ) + .first() + ) + return line_run + + @staticmethod + @sqlite_retry + def list( + collection: typing.Optional[str] = None, + runs: typing.Optional[typing.List[str]] = None, + experiments: typing.Optional[typing.List[str]] = None, + trace_ids: typing.Optional[typing.List[str]] = None, + ) -> typing.List["LineRun"]: + with trace_mgmt_db_session() as session: + query = session.query(LineRun) + if collection is not None: + query = query.filter(LineRun.collection == collection) + elif runs is not None: + query = query.filter(LineRun.run.in_(runs)) + elif experiments is not None: + query = query.filter(LineRun.experiment.in_(experiments)) + elif trace_ids is not None: + query = query.filter(LineRun.trace_id.in_(trace_ids)) + query = query.order_by(LineRun.start_time.desc()) + if collection is not None: + query = query.limit(TRACE_LIST_DEFAULT_LIMIT) + return query.all() + + @sqlite_retry + def _update(self) -> None: + update_dict = { + "root_span_id": self.root_span_id, + "inputs": self.inputs, + "outputs": self.outputs, + "end_time": self.end_time, + "status": self.status, + "duration": self.duration, + "name": self.name, + "kind": self.kind, + "cumulative_token_count": self.cumulative_token_count, + } + with trace_mgmt_db_session() as session: + session.query(LineRun).filter(LineRun.line_run_id == self.line_run_id).update(update_dict) + session.commit() + + @staticmethod + @sqlite_retry + def _get_children(line_run_id: str) -> typing.List["LineRun"]: + with trace_mgmt_db_session() as session: + line_runs = session.query(LineRun).filter(LineRun.parent_id == line_run_id).all() + return line_runs diff --git a/src/promptflow/promptflow/_sdk/_pf_client.py b/src/promptflow-devkit/promptflow/_sdk/_pf_client.py similarity index 68% rename from src/promptflow/promptflow/_sdk/_pf_client.py rename to src/promptflow-devkit/promptflow/_sdk/_pf_client.py index c6f99a0ef6e..2ecb3db70a9 100644 --- a/src/promptflow/promptflow/_sdk/_pf_client.py +++ b/src/promptflow-devkit/promptflow/_sdk/_pf_client.py @@ -4,16 +4,20 @@ import os from os import PathLike from pathlib import Path -from typing import Any, Dict, List, Union +from typing import Any, Callable, Dict, List, Optional, Union + +from promptflow._constants import USER_AGENT_OVERRIDE_KEY, ConnectionProviderConfig, FlowLanguage +from promptflow._utils.logger_utils import get_cli_sdk_logger +from promptflow._utils.user_agent_utils import ClientUserAgentUtil, setup_user_agent_to_operation_context +from promptflow.exceptions import ErrorTarget, UserErrorException -from .._utils.logger_utils import get_cli_sdk_logger from ._configuration import Configuration from ._constants import MAX_SHOW_DETAILS_RESULTS from ._load_functions import load_flow from ._user_agent import USER_AGENT -from ._utils import ClientUserAgentUtil, get_connection_operation, setup_user_agent_to_operation_context +from ._utils import generate_yaml_entry from .entities import Run -from .entities._eager_flow import EagerFlow +from .entities._flow import FlexFlow from .operations import RunOperations from .operations._connection_operations import ConnectionOperations from .operations._experiment_operations import ExperimentOperations @@ -34,26 +38,31 @@ class PFClient: def __init__(self, **kwargs): logger.debug("PFClient init with kwargs: %s", kwargs) - self._runs = RunOperations(self) + # when this is set, telemetry from this client will use this user agent and ignore the one from OperationContext + self._user_agent_override = kwargs.pop(USER_AGENT_OVERRIDE_KEY, None) self._connection_provider = kwargs.pop("connection_provider", None) self._config = kwargs.get("config", None) or {} # The credential is used as an option to override # DefaultAzureCredential when using workspace connection provider self._credential = kwargs.get("credential", None) + + # user_agent_override will be applied to all TelemetryMixin operations + self._runs = RunOperations(self, user_agent_override=self._user_agent_override) + self._flows = FlowOperations(client=self, user_agent_override=self._user_agent_override) + self._experiments = ExperimentOperations(self, user_agent_override=self._user_agent_override) # Lazy init to avoid azure credential requires too early self._connections = None - self._flows = FlowOperations(client=self) + self._tools = ToolOperations() # add user agent from kwargs if any if isinstance(kwargs.get("user_agent"), str): ClientUserAgentUtil.append_user_agent(kwargs["user_agent"]) - self._experiments = ExperimentOperations(self) self._traces = TraceOperations() setup_user_agent_to_operation_context(USER_AGENT) def run( self, - flow: Union[str, PathLike] = None, + flow: Union[str, PathLike, Callable] = None, *, data: Union[str, PathLike] = None, run: Union[str, Run] = None, @@ -65,6 +74,8 @@ def run( display_name: str = None, tags: Dict[str, str] = None, resume_from: Union[str, Run] = None, + code: Union[str, PathLike] = None, + init: Optional[dict] = None, **kwargs, ) -> Run: """Run flow against provided data or run. @@ -115,9 +126,15 @@ def run( :type tags: Dict[str, str] :param resume_from: Create run resume from an existing run. :type resume_from: str + :param code: Path to the code directory to run. + :type code: Union[str, PathLike] + :param init: Initialization parameters for flex flow, only supported when flow is callable class. + :type init: dict :return: Flow run info. :rtype: ~promptflow.entities.Run """ + from promptflow._proxy import ProxyFactory + if resume_from: unsupported = { k: v @@ -142,33 +159,41 @@ def run( ) if not flow: raise ValueError("'flow' is required to create a run.") - if not os.path.exists(flow): - raise FileNotFoundError(f"flow path {flow} does not exist") + if callable(flow): + logger.debug(f"flow entry {flow} is a callable.") + elif ProxyFactory().get_executor_proxy_cls(FlowLanguage.Python).is_flex_flow_entry(entry=flow): + logger.debug(f"flow entry {flow} is a python flex flow.") + elif os.path.exists(flow): + logger.debug(f"flow entry {flow} is a local path.") + else: + raise UserErrorException(f"Flow path {flow} does not exist and it's not a valid entry point.") if data and not os.path.exists(data): raise FileNotFoundError(f"data path {data} does not exist") if not run and not data: raise ValueError("at least one of data or run must be provided") - # load flow object for validation and early failure - flow_obj = load_flow(source=flow) - # validate param conflicts - if isinstance(flow_obj, EagerFlow): - if variant or connections: - logger.warning("variant and connections are not supported for eager flow, will be ignored") - variant, connections = None, None - run = Run( - name=name, - display_name=display_name, - tags=tags, - data=data, - column_mapping=column_mapping, - run=run, - variant=variant, - flow=Path(flow), - connections=connections, - environment_variables=environment_variables, - config=Configuration(overrides=self._config), - ) - return self.runs.create_or_update(run=run, **kwargs) + with generate_yaml_entry(entry=flow, code=code) as flow: + # load flow object for validation and early failure + flow_obj = load_flow(source=flow) + # validate param conflicts + if isinstance(flow_obj, FlexFlow): + if variant or connections: + logger.warning("variant and connections are not supported for eager flow, will be ignored") + variant, connections = None, None + run = Run( + name=name, + display_name=display_name, + tags=tags, + data=data, + column_mapping=column_mapping, + run=run, + variant=variant, + flow=Path(flow), + connections=connections, + environment_variables=environment_variables, + config=Configuration(overrides=self._config), + init=init, + ) + return self.runs.create_or_update(run=run, **kwargs) def stream(self, run: Union[str, Run], raise_on_error: bool = True) -> Run: """Stream run logs to the console. @@ -243,9 +268,41 @@ def connections(self) -> ConnectionOperations: """Connection operations that can manage connections.""" if not self._connections: self._ensure_connection_provider() - self._connections = get_connection_operation(self._connection_provider, self._credential) + self._connections = PFClient._build_connection_operation( + self._connection_provider, + self._credential, + user_agent_override=self._user_agent_override, + ) return self._connections + @staticmethod + def _build_connection_operation(connection_provider: str, credential=None, **kwargs): + """ + Build a ConnectionOperation object based on connection provider. + + :param connection_provider: Connection provider, e.g. local, azureml, azureml://subscriptions..., etc. + :type connection_provider: str + :param credential: Credential when remote provider, default to chained credential DefaultAzureCredential. + :type credential: object + """ + if connection_provider == ConnectionProviderConfig.LOCAL: + from promptflow._sdk.operations._connection_operations import ConnectionOperations + + logger.debug("PFClient using local connection operations.") + connection_operation = ConnectionOperations(**kwargs) + elif connection_provider.startswith(ConnectionProviderConfig.AZUREML): + from promptflow._sdk.operations._local_azure_connection_operations import LocalAzureConnectionOperations + + logger.debug(f"PFClient using local azure connection operations with credential {credential}.") + connection_operation = LocalAzureConnectionOperations(connection_provider, credential=credential, **kwargs) + else: + raise UserErrorException( + target=ErrorTarget.CONTROL_PLANE_SDK, + message_format="Unsupported connection provider: {connection_provider}", + connection_provider=connection_provider, + ) + return connection_operation + @property def flows(self) -> FlowOperations: """Operations on the flow that can manage flows.""" @@ -282,3 +339,8 @@ def test( return self.flows.test( flow=flow, inputs=inputs, variant=variant, environment_variables=environment_variables, node=node ) + + @property + def traces(self) -> TraceOperations: + """Operations on the trace that can manage traces.""" + return self._traces diff --git a/src/promptflow/promptflow/_sdk/_run_functions.py b/src/promptflow-devkit/promptflow/_sdk/_run_functions.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_run_functions.py rename to src/promptflow-devkit/promptflow/_sdk/_run_functions.py diff --git a/src/promptflow/promptflow/_sdk/_service/.gitignore b/src/promptflow-devkit/promptflow/_sdk/_service/.gitignore similarity index 100% rename from src/promptflow/promptflow/_sdk/_service/.gitignore rename to src/promptflow-devkit/promptflow/_sdk/_service/.gitignore diff --git a/src/promptflow/promptflow/_sdk/_service/README.md b/src/promptflow-devkit/promptflow/_sdk/_service/README.md similarity index 100% rename from src/promptflow/promptflow/_sdk/_service/README.md rename to src/promptflow-devkit/promptflow/_sdk/_service/README.md diff --git a/src/promptflow/promptflow/_sdk/_service/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_service/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_service/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/_service/__init__.py diff --git a/src/promptflow/promptflow/azure/_schemas/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/__init__.py similarity index 100% rename from src/promptflow/promptflow/azure/_schemas/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/_service/apis/__init__.py diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/apis/collector.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/collector.py new file mode 100644 index 00000000000..664d8ad73b0 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/apis/collector.py @@ -0,0 +1,202 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +# this file is different from other files in this folder +# functions (APIs) defined in this file follows OTLP 1.1.0 +# https://opentelemetry.io/docs/specs/otlp/#otlphttp-request +# to provide OTLP/HTTP endpoint as OTEL collector + +import copy +import json +import logging +import traceback +from datetime import datetime +from typing import Callable, List, Optional + +from flask import request +from google.protobuf.json_format import MessageToJson +from opentelemetry.proto.collector.trace.v1.trace_service_pb2 import ExportTraceServiceRequest + +from promptflow._constants import CosmosDBContainerName, SpanResourceAttributesFieldName, SpanResourceFieldName +from promptflow._sdk._constants import TRACE_DEFAULT_COLLECTION +from promptflow._sdk._utils import parse_kv_from_pb_attribute +from promptflow._sdk.entities._trace import Span +from promptflow._utils.thread_utils import ThreadWithContextVars + + +def trace_collector( + get_created_by_info_with_cache: Callable, + logger: logging.Logger, + cloud_trace_only: bool = False, + credential: Optional[object] = None, +): + """Collect traces from OTLP/HTTP endpoint and write to local/remote storage. + + This function is target to be reused in other places, so pass in get_created_by_info_with_cache and logger to avoid + app related dependencies. + + :param get_created_by_info_with_cache: A function that retrieves information about the creator of the trace. + :type get_created_by_info_with_cache: Callable + :param logger: The logger object used for logging. + :type logger: logging.Logger + :param cloud_trace_only: If True, only write trace to cosmosdb and skip local trace. Default is False. + :type cloud_trace_only: bool + :param credential: The credential object used to authenticate with cosmosdb. Default is None. + :type credential: Optional[object] + """ + content_type = request.headers.get("Content-Type") + # binary protobuf encoding + if "application/x-protobuf" in content_type: + traces_request = ExportTraceServiceRequest() + traces_request.ParseFromString(request.data) + all_spans = [] + for resource_span in traces_request.resource_spans: + resource_attributes = dict() + for attribute in resource_span.resource.attributes: + attribute_dict = json.loads(MessageToJson(attribute)) + attr_key, attr_value = parse_kv_from_pb_attribute(attribute_dict) + resource_attributes[attr_key] = attr_value + if SpanResourceAttributesFieldName.COLLECTION not in resource_attributes: + resource_attributes[SpanResourceAttributesFieldName.COLLECTION] = TRACE_DEFAULT_COLLECTION + resource = { + SpanResourceFieldName.ATTRIBUTES: resource_attributes, + SpanResourceFieldName.SCHEMA_URL: resource_span.schema_url, + } + for scope_span in resource_span.scope_spans: + for span in scope_span.spans: + # TODO: persist with batch + span = Span._from_protobuf_object(span, resource=resource, logger=logger) + if not cloud_trace_only: + all_spans.append(copy.deepcopy(span)) + span._persist() + else: + all_spans.append(span) + + if cloud_trace_only: + # If we only trace to cloud, we should make sure the data writing is success before return. + _try_write_trace_to_cosmosdb( + all_spans, get_created_by_info_with_cache, logger, credential, is_cloud_trace=True + ) + else: + # Create a new thread to write trace to cosmosdb to avoid blocking the main thread + ThreadWithContextVars( + target=_try_write_trace_to_cosmosdb, + args=(all_spans, get_created_by_info_with_cache, logger, credential, False), + ).start() + return "Traces received", 200 + + # JSON protobuf encoding + elif "application/json" in content_type: + raise NotImplementedError + + +def _try_write_trace_to_cosmosdb( + all_spans: List[Span], + get_created_by_info_with_cache: Callable, + logger: logging.Logger, + credential: Optional[object] = None, + is_cloud_trace: bool = False, +): + if not all_spans: + return + try: + first_span = all_spans[0] + span_resource = first_span.resource + resource_attributes = span_resource.get(SpanResourceFieldName.ATTRIBUTES, {}) + subscription_id = resource_attributes.get(SpanResourceAttributesFieldName.SUBSCRIPTION_ID, None) + resource_group_name = resource_attributes.get(SpanResourceAttributesFieldName.RESOURCE_GROUP_NAME, None) + workspace_name = resource_attributes.get(SpanResourceAttributesFieldName.WORKSPACE_NAME, None) + if subscription_id is None or resource_group_name is None or workspace_name is None: + logger.debug("Cannot find workspace info in span resource, skip writing trace to cosmosdb.") + return + + logger.info(f"Start writing trace to cosmosdb, total spans count: {len(all_spans)}.") + start_time = datetime.now() + + from promptflow.azure._storage.cosmosdb.client import get_client + from promptflow.azure._storage.cosmosdb.collection import CollectionCosmosDB + from promptflow.azure._storage.cosmosdb.span import Span as SpanCosmosDB + from promptflow.azure._storage.cosmosdb.summary import Summary + + # Load span, collection and summary clients first time may slow. + # So, we load clients in parallel for warm up. + span_client_thread = ThreadWithContextVars( + target=get_client, + args=(CosmosDBContainerName.SPAN, subscription_id, resource_group_name, workspace_name, credential), + ) + span_client_thread.start() + + collection_client_thread = ThreadWithContextVars( + target=get_client, + args=(CosmosDBContainerName.COLLECTION, subscription_id, resource_group_name, workspace_name, credential), + ) + collection_client_thread.start() + + line_summary_client_thread = ThreadWithContextVars( + target=get_client, + args=(CosmosDBContainerName.LINE_SUMMARY, subscription_id, resource_group_name, workspace_name, credential), + ) + line_summary_client_thread.start() + + # Load created_by info first time may slow. So, we load it in parallel for warm up. + created_by_thread = ThreadWithContextVars(target=get_created_by_info_with_cache) + created_by_thread.start() + + # Get default blob may be slow. So, we have a cache for default datastore. + from promptflow.azure._storage.blob.client import get_datastore_container_client + + blob_container_client, blob_base_uri = get_datastore_container_client( + logger=logger, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + credential=credential, + ) + + span_client_thread.join() + collection_client_thread.join() + line_summary_client_thread.join() + created_by_thread.join() + + created_by = get_created_by_info_with_cache() + collection_client = get_client( + CosmosDBContainerName.COLLECTION, subscription_id, resource_group_name, workspace_name, credential + ) + + collection_db = CollectionCosmosDB(first_span, is_cloud_trace, created_by) + collection_db.create_collection_if_not_exist(collection_client) + # For runtime, collection id is flow id for test, batch run id for batch run. + # For local, collection id is collection name + user id for non batch run, batch run id for batch run. + # We assign it to LineSummary and Span and use it as partition key. + collection_id = collection_db.collection_id + + for span in all_spans: + span_client = get_client( + CosmosDBContainerName.SPAN, subscription_id, resource_group_name, workspace_name, credential + ) + result = SpanCosmosDB(span, collection_id, created_by).persist( + span_client, blob_container_client, blob_base_uri + ) + # None means the span already exists, then we don't need to persist the summary also. + if result is not None: + line_summary_client = get_client( + CosmosDBContainerName.LINE_SUMMARY, + subscription_id, + resource_group_name, + workspace_name, + credential, + ) + Summary(span, collection_id, created_by, logger).persist(line_summary_client) + collection_db.update_collection_updated_at_info(collection_client) + logger.info( + ( + f"Finish writing trace to cosmosdb, total spans count: {len(all_spans)}." + f" Duration {datetime.now() - start_time}." + ) + ) + + except Exception as e: + stack_trace = traceback.format_exc() + logger.error(f"Failed to write trace to cosmosdb: {e}, stack trace is {stack_trace}") + return diff --git a/src/promptflow/promptflow/_sdk/_service/apis/connection.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/connection.py similarity index 96% rename from src/promptflow/promptflow/_sdk/_service/apis/connection.py rename to src/promptflow-devkit/promptflow/_sdk/_service/apis/connection.py index 831930d9b67..1d670237523 100644 --- a/src/promptflow/promptflow/_sdk/_service/apis/connection.py +++ b/src/promptflow-devkit/promptflow/_sdk/_service/apis/connection.py @@ -10,7 +10,7 @@ import promptflow._sdk.schemas._connection as connection from promptflow._sdk._configuration import Configuration from promptflow._sdk._service import Namespace, Resource, fields -from promptflow._sdk._service.utils.utils import build_pfs_user_agent, local_user_only, make_response_no_content +from promptflow._sdk._service.utils.utils import get_client_from_request, local_user_only, make_response_no_content from promptflow._sdk.entities._connection import _Connection api = Namespace("Connections", description="Connections Management") @@ -66,14 +66,10 @@ def validate_working_directory(value): def _get_connection_operation(working_directory=None): - from promptflow._sdk._pf_client import PFClient - connection_provider = Configuration().get_connection_provider(path=working_directory) # get_connection_operation is a shared function, so we build user agent based on request first and # then pass it to the function - connection_operation = PFClient( - connection_provider=connection_provider, user_agent=build_pfs_user_agent() - ).connections + connection_operation = get_client_from_request(connection_provider=connection_provider).connections return connection_operation diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/apis/experiment.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/experiment.py new file mode 100644 index 00000000000..2a2d8e4eeae --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/apis/experiment.py @@ -0,0 +1,32 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from flask import jsonify, request + +from promptflow._sdk._constants import get_list_view_type +from promptflow._sdk._service import Namespace, Resource +from promptflow._sdk._service.utils.utils import get_client_from_request + +api = Namespace("Experiments", description="Experiments Management") + +# Response model of experiment operation +dict_field = api.schema_model("ExperimentDict", {"additionalProperties": True, "type": "object"}) +list_field = api.schema_model("ExperimentList", {"type": "array", "items": {"$ref": "#/definitions/ExperimentDict"}}) + + +@api.route("/") +class ExperimentList(Resource): + @api.response(code=200, description="Experiments", model=list_field) + @api.doc(description="List all experiments") + def get(self): + # parse query parameters + max_results = request.args.get("max_results", default=50, type=int) + archived_only = request.args.get("archived_only", default=False, type=bool) + include_archived = request.args.get("include_archived", default=False, type=bool) + list_view_type = get_list_view_type(archived_only=archived_only, include_archived=include_archived) + + experiments = get_client_from_request()._experiments.list( + max_results=max_results, list_view_type=list_view_type + ) + experiments_dict = [experiment._to_dict() for experiment in experiments] + return jsonify(experiments_dict) diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/apis/flow.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/flow.py new file mode 100644 index 00000000000..b6a14b616b0 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/apis/flow.py @@ -0,0 +1,147 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import json +import os +import shutil +import uuid +from pathlib import Path + +from flask import make_response +from flask_restx import reqparse + +from promptflow._sdk._constants import DEFAULT_ENCODING, PROMPT_FLOW_DIR_NAME, UX_INPUTS_JSON +from promptflow._sdk._service import Namespace, Resource, fields +from promptflow._sdk._service.utils.utils import decrypt_flow_path, get_client_from_request +from promptflow._sdk._utils import json_load, read_write_by_user +from promptflow._utils.flow_utils import resolve_flow_path +from promptflow._utils.yaml_utils import load_yaml +from promptflow.exceptions import UserErrorException + +api = Namespace("Flows", description="Flows Management") + + +dict_field = api.schema_model("FlowDict", {"additionalProperties": True, "type": "object"}) + +flow_test_model = api.model( + "FlowTest", + { + "node": fields.String( + required=False, description="If specified it will only test this node, else it will " "test the flow." + ), + "variant": fields.String( + required=False, + description="Node & variant name in format of ${" + "node_name.variant_name}, will use default variant if " + "not specified.", + ), + "output_path": fields.String(required=False, description="Output path of flow"), + "experiment": fields.String(required=False, description="Path of experiment template"), + "inputs": fields.Nested(dict_field, required=False), + "environment_variables": fields.Nested(dict_field, required=False), + }, +) + +flow_ux_input_model = api.model( + "FlowUxInput", + { + "flow": fields.String(required=True, description="Path to flow directory."), + "ux_inputs": fields.Nested(dict_field, required=True, description="Flow ux inputs"), + }, +) + +flow_path_parser = reqparse.RequestParser() +flow_path_parser.add_argument("flow", type=str, required=True, location="args", help="Path to flow directory.") + + +@api.route("/test") +class FlowTest(Resource): + @api.response(code=200, description="Flow test", model=dict_field) + @api.doc(description="Flow test") + @api.expect(flow_test_model) + def post(self): + args = flow_path_parser.parse_args() + flow = args.flow + flow = decrypt_flow_path(flow) + inputs = api.payload.get("inputs", None) + environment_variables = api.payload.get("environment_variables", None) + variant = api.payload.get("variant", None) + node = api.payload.get("node", None) + experiment = api.payload.get("experiment", None) + output_path = api.payload.get("output_path", None) + remove_dir = False + + if output_path is None: + filename = str(uuid.uuid4()) + if os.path.isdir(flow): + output_path = Path(flow) / PROMPT_FLOW_DIR_NAME / filename + else: + output_path = Path(os.path.dirname(flow)) / PROMPT_FLOW_DIR_NAME / filename + os.makedirs(output_path, exist_ok=True) + remove_dir = True + output_path = Path(output_path).resolve() + try: + result = get_client_from_request().flows._test_with_ui( + flow=flow, + inputs=inputs, + environment_variables=environment_variables, + variant=variant, + node=node, + experiment=experiment, + output_path=output_path, + allow_generator_output=False, + stream_output=False, + ) + finally: + if remove_dir: + shutil.rmtree(output_path) + return result + + +@api.route("/get") +class FlowGet(Resource): + @api.response(code=200, description="Return flow yaml as json", model=dict_field) + @api.doc(description="Return flow yaml as json") + def get(self): + args = flow_path_parser.parse_args() + flow_path = args.flow + flow_path = decrypt_flow_path(flow_path) + if not os.path.exists(flow_path): + raise UserErrorException(f"The flow doesn't exist: {flow_path}") + flow_path_dir, flow_path_file = resolve_flow_path(Path(flow_path)) + flow_info = load_yaml(flow_path_dir / flow_path_file) + return flow_info + + +@api.route("/ux_inputs") +class FlowUxInputs(Resource): + @api.response(code=200, description="Get the file content of file UX_INPUTS_JSON", model=dict_field) + @api.doc(description="Get the file content of file UX_INPUTS_JSON") + def get(self): + args = flow_path_parser.parse_args() + flow_path = args.flow + flow_path = decrypt_flow_path(flow_path) + if not os.path.exists(flow_path): + raise UserErrorException(f"The flow doesn't exist: {flow_path}") + flow_ux_inputs_path = Path(flow_path) / PROMPT_FLOW_DIR_NAME / UX_INPUTS_JSON + if not flow_ux_inputs_path.exists(): + flow_ux_inputs_path.touch(mode=read_write_by_user(), exist_ok=True) + try: + ux_inputs = json_load(flow_ux_inputs_path) + except json.decoder.JSONDecodeError: + ux_inputs = {} + return ux_inputs + + @api.response(code=200, description="Set the file content of file UX_INPUTS_JSON", model=dict_field) + @api.doc(description="Set the file content of file UX_INPUTS_JSON") + @api.expect(flow_ux_input_model) + def post(self): + content = api.payload["ux_inputs"] + args = flow_path_parser.parse_args() + flow_path = args.flow + flow_path = decrypt_flow_path(flow_path) + flow_ux_inputs_path = Path(flow_path) / PROMPT_FLOW_DIR_NAME / UX_INPUTS_JSON + flow_ux_inputs_path.touch(mode=read_write_by_user(), exist_ok=True) + with open(flow_ux_inputs_path, mode="w", encoding=DEFAULT_ENCODING) as f: + json.dump(content, f, ensure_ascii=False, indent=2) + return make_response("UX_INPUTS_JSON content updated successfully", 200) diff --git a/src/promptflow/promptflow/_sdk/_service/apis/line_run.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/line_run.py similarity index 80% rename from src/promptflow/promptflow/_sdk/_service/apis/line_run.py rename to src/promptflow-devkit/promptflow/_sdk/_service/apis/line_run.py index 97b4c0a3466..38362a62b75 100644 --- a/src/promptflow/promptflow/_sdk/_service/apis/line_run.py +++ b/src/promptflow-devkit/promptflow/_sdk/_service/apis/line_run.py @@ -3,30 +3,34 @@ # --------------------------------------------------------- import typing -from dataclasses import asdict, dataclass +from dataclasses import dataclass from flask_restx import fields from promptflow._sdk._constants import PFS_MODEL_DATETIME_FORMAT, CumulativeTokenCountFieldName, LineRunFieldName +from promptflow._sdk._pf_client import PFClient from promptflow._sdk._service import Namespace, Resource from promptflow._sdk._service.utils.utils import get_client_from_request -from promptflow._sdk.entities._trace import LineRun +from promptflow._sdk.entities._trace import LineRun as LineRunEntity api = Namespace("LineRuns", description="Line runs management") # parsers for query parameters list_line_run_parser = api.parser() list_line_run_parser.add_argument("session", type=str, required=False) +list_line_run_parser.add_argument("collection", type=str, required=False) list_line_run_parser.add_argument("run", type=str, required=False) list_line_run_parser.add_argument("experiment", type=str, required=False) +list_line_run_parser.add_argument("trace_ids", type=str, required=False) # use @dataclass for strong type @dataclass class ListLineRunParser: - session_id: typing.Optional[str] = None + collection: typing.Optional[str] = None runs: typing.Optional[typing.List[str]] = None experiments: typing.Optional[typing.List[str]] = None + trace_ids: typing.Optional[typing.List[str]] = None @staticmethod def _parse_string_list(value: typing.Optional[str]) -> typing.Optional[typing.List[str]]: @@ -38,9 +42,10 @@ def _parse_string_list(value: typing.Optional[str]) -> typing.Optional[typing.Li def from_request() -> "ListLineRunParser": args = list_line_run_parser.parse_args() return ListLineRunParser( - session_id=args.session, + collection=args.collection or args.session, runs=ListLineRunParser._parse_string_list(args.run), experiments=ListLineRunParser._parse_string_list(args.experiment), + trace_ids=ListLineRunParser._parse_string_list(args.trace_ids), ) @@ -79,15 +84,12 @@ class LineRuns(Resource): @api.marshal_list_with(line_run_model) @api.response(code=200, description="Line runs") def get(self): - from promptflow import PFClient - client: PFClient = get_client_from_request() args = ListLineRunParser.from_request() - line_runs: typing.List[LineRun] = client._traces.list_line_runs( - session_id=args.session_id, + line_runs: typing.List[LineRunEntity] = client.traces.list_line_runs( + collection=args.collection, runs=args.runs, experiments=args.experiments, + trace_ids=args.trace_ids, ) - # order by start_time desc - line_runs.sort(key=lambda x: x.start_time, reverse=True) - return [asdict(line_run) for line_run in line_runs] + return [line_run._to_rest_object() for line_run in line_runs] diff --git a/src/promptflow/promptflow/_sdk/_service/apis/run.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/run.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_service/apis/run.py rename to src/promptflow-devkit/promptflow/_sdk/_service/apis/run.py diff --git a/src/promptflow/promptflow/_sdk/_service/apis/span.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/span.py similarity index 82% rename from src/promptflow/promptflow/_sdk/_service/apis/span.py rename to src/promptflow-devkit/promptflow/_sdk/_service/apis/span.py index deda79024b1..353138c4269 100644 --- a/src/promptflow/promptflow/_sdk/_service/apis/span.py +++ b/src/promptflow-devkit/promptflow/_sdk/_service/apis/span.py @@ -18,27 +18,28 @@ from promptflow._sdk._constants import PFS_MODEL_DATETIME_FORMAT from promptflow._sdk._service import Namespace, Resource from promptflow._sdk._service.utils.utils import get_client_from_request +from promptflow.client import PFClient api = Namespace("Spans", description="Spans Management") # parsers for query parameters list_span_parser = api.parser() -list_span_parser.add_argument("session", type=str, required=False) list_span_parser.add_argument("trace_ids", type=str, required=False) +list_span_parser.add_argument("lazy_load", type=str, required=False) # use @dataclass for strong type @dataclass class ListSpanParser: - session_id: typing.Optional[str] = None - trace_ids: typing.Optional[typing.List[str]] = None + trace_ids: typing.List[str] + lazy_load: bool @staticmethod def from_request() -> "ListSpanParser": args = list_span_parser.parse_args() return ListSpanParser( - session_id=args.session, trace_ids=args.trace_ids.split(",") if args.trace_ids is not None else args.trace_ids, + lazy_load=False if str(args.lazy_load).lower() == "false" else True, ) @@ -96,6 +97,7 @@ def from_request() -> "ListSpanParser": SpanFieldName.EVENTS: fields.List(fields.Nested(event_model)), SpanFieldName.LINKS: fields.List(fields.Nested(link_model)), SpanFieldName.RESOURCE: fields.Nested(resource_model, required=True, skip_none=True), + SpanFieldName.EXTERNAL_EVENT_DATA_URIS: fields.List(fields.String), }, ) @@ -106,12 +108,19 @@ class Spans(Resource): @api.marshal_list_with(span_model) @api.response(code=200, description="Spans") def get(self): - from promptflow import PFClient - client: PFClient = get_client_from_request() args = ListSpanParser.from_request() - spans = client._traces.list_spans( - session_id=args.session_id, + spans = client.traces.list_spans( trace_ids=args.trace_ids, + lazy_load=args.lazy_load, ) - return [span._content for span in spans] + return [span._to_rest_object() for span in spans] + + +@api.route("/Event/") +class Event(Resource): + @api.doc(description="Get span event with event id") + @api.response(code=200, description="Event") + def get(self, event_id: str): + client: PFClient = get_client_from_request() + return client.traces.get_event(event_id=event_id) diff --git a/src/promptflow/promptflow/_sdk/_service/apis/telemetry.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/telemetry.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_service/apis/telemetry.py rename to src/promptflow-devkit/promptflow/_sdk/_service/apis/telemetry.py diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/apis/ui.py b/src/promptflow-devkit/promptflow/_sdk/_service/apis/ui.py new file mode 100644 index 00000000000..075f9dc749a --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/apis/ui.py @@ -0,0 +1,101 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import base64 +import hashlib +import os +from pathlib import Path + +from flask import Response, current_app, render_template, send_from_directory, url_for +from flask_restx import reqparse +from werkzeug.utils import safe_join + +from promptflow._sdk._constants import PROMPT_FLOW_DIR_NAME +from promptflow._sdk._service import Namespace, Resource, fields +from promptflow._sdk._service.utils.utils import decrypt_flow_path +from promptflow.exceptions import UserErrorException + +api = Namespace("ui", description="UI") + + +media_save_model = api.model( + "MediaSave", + { + "base64_data": fields.String(required=True, description="Image base64 encoded data."), + "extension": fields.String(required=True, description="Image file extension."), + }, +) + +flow_path_parser = reqparse.RequestParser() +flow_path_parser.add_argument("flow", type=str, required=True, location="args", help="Path to flow directory.") + +image_path_parser = reqparse.RequestParser() +image_path_parser.add_argument("image_path", type=str, required=True, location="args", help="Path of image.") + + +@api.route("/chat") +class ChatUI(Resource): + def get(self): + return Response( + render_template("chat_index.html", url_for=url_for), + mimetype="text/html", + ) + + +def save_image(directory, base64_data, extension): + image_data = base64.b64decode(base64_data) + hash_object = hashlib.sha256(image_data) + filename = hash_object.hexdigest() + file_path = Path(directory) / f"{filename}.{extension}" + with open(file_path, "wb") as f: + f.write(image_data) + return file_path + + +@api.route("/media_save") +class MediaSave(Resource): + @api.response(code=200, description="Save image", model=fields.String) + @api.doc(description="Save image") + @api.expect(media_save_model) + def post(self): + args = flow_path_parser.parse_args() + flow = args.flow + flow = decrypt_flow_path(flow) + base64_data = api.payload["base64_data"] + extension = api.payload["extension"] + safe_path = safe_join(flow, PROMPT_FLOW_DIR_NAME) + if safe_path is None: + message = f"The untrusted path {PROMPT_FLOW_DIR_NAME} relative to the base directory {flow} detected!" + raise UserErrorException(message) + file_path = save_image(safe_path, base64_data, extension) + path = Path(file_path).relative_to(flow) + return str(path) + + +@api.route("/media") +class MediaView(Resource): + @api.response(code=200, description="Get image url", model=fields.String) + @api.doc(description="Get image url") + def get(self): + args = flow_path_parser.parse_args() + flow = args.flow + flow = decrypt_flow_path(flow) + + args = image_path_parser.parse_args() + image_path = args.image_path + safe_path = safe_join(flow, image_path) + if safe_path is None: + message = f"The untrusted path {image_path} relative to the base directory {flow} detected!" + raise UserErrorException(message) + safe_path = Path(safe_path).resolve().as_posix() + if not os.path.exists(safe_path): + raise UserErrorException("The image doesn't exist") + + directory, filename = os.path.split(safe_path) + return send_from_directory(directory, filename) + + +def serve_trace_ui(path): + if path != "" and os.path.exists(os.path.join(current_app.static_folder, path)): + return send_from_directory(current_app.static_folder, path) + return send_from_directory(current_app.static_folder, "index.html") diff --git a/src/promptflow/promptflow/_sdk/_service/app.py b/src/promptflow-devkit/promptflow/_sdk/_service/app.py similarity index 58% rename from src/promptflow/promptflow/_sdk/_service/app.py rename to src/promptflow-devkit/promptflow/_sdk/_service/app.py index f2f2484efa7..efa65a6da6f 100644 --- a/src/promptflow/promptflow/_sdk/_service/app.py +++ b/src/promptflow-devkit/promptflow/_sdk/_service/app.py @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import logging -import sys +import threading import time from datetime import datetime, timedelta from logging.handlers import RotatingFileHandler @@ -16,19 +16,24 @@ PF_SERVICE_HOUR_TIMEOUT, PF_SERVICE_LOG_FILE, PF_SERVICE_MONITOR_SECOND, + CreatedByFieldName, ) from promptflow._sdk._service import Api from promptflow._sdk._service.apis.collector import trace_collector from promptflow._sdk._service.apis.connection import api as connection_api +from promptflow._sdk._service.apis.experiment import api as experiment_api +from promptflow._sdk._service.apis.flow import api as flow_api from promptflow._sdk._service.apis.line_run import api as line_run_api from promptflow._sdk._service.apis.run import api as run_api from promptflow._sdk._service.apis.span import api as span_api from promptflow._sdk._service.apis.telemetry import api as telemetry_api from promptflow._sdk._service.apis.ui import api as ui_api +from promptflow._sdk._service.apis.ui import serve_trace_ui from promptflow._sdk._service.utils.utils import ( FormattedException, get_current_env_pfs_file, get_port_from_config, + is_run_from_built_binary, kill_exist_service, ) from promptflow._sdk._utils import get_promptflow_sdk_version, overwrite_null_std_logger, read_write_by_user @@ -42,9 +47,6 @@ def heartbeat(): return jsonify(response) -CREATED_BY_FOR_LOCAL_TO_CLOUD_TRACE = {} - - def create_app(): app = Flask(__name__) @@ -54,9 +56,13 @@ def create_app(): CORS(app) app.add_url_rule("/heartbeat", view_func=heartbeat) - app.add_url_rule("/v1/traces", view_func=trace_collector, methods=["POST"]) + app.add_url_rule( + "/v1/traces", view_func=lambda: trace_collector(get_created_by_info_with_cache, app.logger), methods=["POST"] + ) + app.add_url_rule("/v1.0/ui/traces/", defaults={"path": ""}, view_func=serve_trace_ui, methods=["GET"]) + app.add_url_rule("/v1.0/ui/traces/", view_func=serve_trace_ui, methods=["GET"]) with app.app_context(): - api_v1 = Blueprint("Prompt Flow Service", __name__, url_prefix="/v1.0") + api_v1 = Blueprint("Prompt Flow Service", __name__, url_prefix="/v1.0", template_folder="static") # Registers resources from namespace for current instance of api api = Api(api_v1, title="Prompt Flow Service", version="1.0") @@ -66,6 +72,8 @@ def create_app(): api.add_namespace(span_api) api.add_namespace(line_run_api) api.add_namespace(ui_api) + api.add_namespace(flow_api) + api.add_namespace(experiment_api) app.register_blueprint(api_v1) # Disable flask-restx set X-Fields in header. https://flask-restx.readthedocs.io/en/latest/mask.html#usage @@ -74,7 +82,7 @@ def create_app(): # Enable log app.logger.setLevel(logging.INFO) # each env will have its own log file - if sys.executable.endswith("pfcli.exe"): + if is_run_from_built_binary(): log_file = HOME_PROMPT_FLOW_DIR / PF_SERVICE_LOG_FILE log_file.touch(mode=read_write_by_user(), exist_ok=True) else: @@ -86,33 +94,6 @@ def create_app(): # Set app logger to the only one RotatingFileHandler to avoid duplicate logs app.logger.handlers = [handler] - def initialize_created_by_info(): - from promptflow._sdk._configuration import Configuration - from promptflow._sdk._utils import extract_workspace_triad_from_trace_provider - - trace_provider = Configuration.get_instance().get_trace_provider() - if trace_provider is None or extract_workspace_triad_from_trace_provider(trace_provider) is None: - return - try: - import jwt - from azure.identity import DefaultAzureCredential - - from promptflow.azure._utils.general import get_arm_token - - default_credential = DefaultAzureCredential() - - token = get_arm_token(credential=default_credential) - decoded_token = jwt.decode(token, options={"verify_signature": False}) - user_object_id, user_tenant_id = decoded_token["oid"], decoded_token["tid"] - CREATED_BY_FOR_LOCAL_TO_CLOUD_TRACE.update( - { - "object_id": user_object_id, - "tenant_id": user_tenant_id, - } - ) - except Exception as e: - current_app.logger.error(f"Failed to get created_by info, ignore it: {e}") - # Basic error handler @api.errorhandler(Exception) def handle_exception(e): @@ -137,9 +118,9 @@ def log_before_request_info(): else: request_body = request.get_data() + app.logger.info("Request coming in: %s", request.url) app.logger.debug( - "Last request time: %s, Headers: %s, Body: %s", - app.config["last_request_time"], + "Headers: %s, Body: %s", request.headers, request_body, ) @@ -155,20 +136,63 @@ def log_after_request_info(response): # Start a monitor process using detach mode. It will stop pfs service if no request to pfs service in 1h in # python scenario. For C# scenario, pfs will live until the process is killed manually. def monitor_request(): - while True: - time.sleep(PF_SERVICE_MONITOR_SECOND) - if "last_request_time" in app.config and datetime.now() - app.config["last_request_time"] > timedelta( - hours=PF_SERVICE_HOUR_TIMEOUT - ): - # Todo: check if we have any not complete work? like persist all traces. - port = get_port_from_config() - if port: - app.logger.info(f"Try auto stop pfs service in port {port} since no request to app within 1h") - kill_exist_service(port) - break - - initialize_created_by_info() - if not sys.executable.endswith("pfcli.exe"): + with app.app_context(): + while True: + time.sleep(PF_SERVICE_MONITOR_SECOND) + if "last_request_time" in app.config and datetime.now() - app.config[ + "last_request_time" + ] > timedelta(hours=PF_SERVICE_HOUR_TIMEOUT): + # Todo: check if we have any not complete work? like persist all traces. + app.logger.warning( + f"Last http request time: {app.config['last_request_time']} was made " + f"{PF_SERVICE_HOUR_TIMEOUT}h ago" + ) + port = get_port_from_config() + if port: + app.logger.info( + f"Try auto stop promptflow service in port {port} since no request to app within " + f"{PF_SERVICE_HOUR_TIMEOUT}h" + ) + kill_exist_service(port) + break + + if not is_run_from_built_binary(): monitor_thread = ThreadWithContextVars(target=monitor_request, daemon=True) monitor_thread.start() return app, api + + +created_by_for_local_to_cloud_trace = {} +created_by_for_local_to_cloud_trace_lock = threading.Lock() + + +def get_created_by_info_with_cache(): + if len(created_by_for_local_to_cloud_trace) > 0: + return created_by_for_local_to_cloud_trace + with created_by_for_local_to_cloud_trace_lock: + if len(created_by_for_local_to_cloud_trace) > 0: + return created_by_for_local_to_cloud_trace + try: + # The total time of collecting info is about 3s. + import jwt + from azure.identity import DefaultAzureCredential + + from promptflow.azure._utils.general import get_arm_token + + default_credential = DefaultAzureCredential() + + token = get_arm_token(credential=default_credential) + decoded_token = jwt.decode(token, options={"verify_signature": False}) + created_by_for_local_to_cloud_trace.update( + { + CreatedByFieldName.OBJECT_ID: decoded_token["oid"], + CreatedByFieldName.TENANT_ID: decoded_token["tid"], + # Use appid as fallback for service principal scenario. + CreatedByFieldName.NAME: decoded_token.get("name", decoded_token.get("appid", "")), + } + ) + except Exception as e: + # This function is only target to be used in Flask app. + current_app.logger.error(f"Failed to get created_by info, stop writing span. Exception: {e}") + raise e # Created_by info is critical for local trace, so we should stop writing span if failed to get it. + return created_by_for_local_to_cloud_trace diff --git a/src/promptflow/promptflow/_sdk/_service/generator_configs/csharp.yaml b/src/promptflow-devkit/promptflow/_sdk/_service/generator_configs/csharp.yaml similarity index 100% rename from src/promptflow/promptflow/_sdk/_service/generator_configs/csharp.yaml rename to src/promptflow-devkit/promptflow/_sdk/_service/generator_configs/csharp.yaml diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/icon-IVYk8x5p.svg b/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/icon-IVYk8x5p.svg new file mode 100644 index 00000000000..301152ac3b7 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/icon-IVYk8x5p.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/icon_for_dark-3C8HbOu4.svg b/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/icon_for_dark-3C8HbOu4.svg new file mode 100644 index 00000000000..8bb74184d75 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/icon_for_dark-3C8HbOu4.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/index-IZERNmqw.js b/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/index-IZERNmqw.js new file mode 100644 index 00000000000..0acf8cffc10 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/static/assets/index-IZERNmqw.js @@ -0,0 +1,1882 @@ +(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('@layer rdg.MeasuringCell{.m1l09lto7-0-0-beta-39{contain:strict;grid-row:1;visibility:hidden}}@layer rdg.Cell{.c1wupbe7-0-0-beta-39{position:relative;padding-block:0;padding-inline:8px;border-inline-end:1px solid var(--rdg-border-color);border-block-end:1px solid var(--rdg-border-color);grid-row-start:var(--rdg-grid-row-start);background-color:inherit;white-space:nowrap;overflow:clip;text-overflow:ellipsis;outline:none}.c1wupbe7-0-0-beta-39[aria-selected=true]{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}}@layer rdg.Cell{.cd0kgiy7-0-0-beta-39{position:sticky;z-index:1}}@layer rdg.Cell{.c1730fa47-0-0-beta-39{box-shadow:calc(2px * var(--rdg-sign)) 0 5px -2px #8888884d}}@layer rdg.CheckboxLabel{.c1hs68w07-0-0-beta-39{cursor:pointer;display:flex;align-items:center;justify-content:center;position:absolute;top:0;right:0;bottom:0;left:0;margin-inline-end:1px}}@layer rdg.CheckboxInput{.cojpd0n7-0-0-beta-39{all:unset}}@layer rdg.CheckboxIcon{.cwsfieb7-0-0-beta-39{content:"";inline-size:20px;block-size:20px;border:2px solid var(--rdg-border-color);background-color:var(--rdg-background-color)}.cojpd0n7-0-0-beta-39:checked+.cwsfieb7-0-0-beta-39{background-color:var(--rdg-checkbox-color);outline:4px solid var(--rdg-background-color);outline-offset:-6px}.cojpd0n7-0-0-beta-39:focus+.cwsfieb7-0-0-beta-39{border-color:var(--rdg-checkbox-focus-color)}}@layer rdg.CheckboxLabel{.c1fgadbl7-0-0-beta-39{cursor:default}.c1fgadbl7-0-0-beta-39 .cwsfieb7-0-0-beta-39{border-color:var(--rdg-checkbox-disabled-border-color);background-color:var(--rdg-checkbox-disabled-background-color)}}@layer rdg.GroupCellContent{.g1w3c5217-0-0-beta-39{outline:none}}@layer rdg.GroupCellCaret{.cm5tyhw7-0-0-beta-39{margin-inline-start:4px;stroke:currentColor;stroke-width:1.5px;fill:transparent;vertical-align:middle}.cm5tyhw7-0-0-beta-39>path{transition:d .1s}}@layer rdg.DragHandle{.cadd3bp7-0-0-beta-39{--rdg-drag-handle-size: 8px;z-index:0;cursor:move;inline-size:var(--rdg-drag-handle-size);block-size:var(--rdg-drag-handle-size);background-color:var(--rdg-selection-color);place-self:end}.cadd3bp7-0-0-beta-39:hover{--rdg-drag-handle-size: 16px;border:2px solid var(--rdg-selection-color);background-color:var(--rdg-background-color)}}@layer rdg.DragHandle{.ccmuez27-0-0-beta-39{z-index:1;position:sticky}}@layer rdg.EditCell{.c1tngyp17-0-0-beta-39{padding:0}}@layer rdg.SortableHeaderCell{.hizp7y17-0-0-beta-39{display:flex}}@layer rdg.SortableHeaderCellName{.h14cojrm7-0-0-beta-39{flex-grow:1;overflow:clip;text-overflow:ellipsis}}@layer rdg.HeaderCell{.celq7o97-0-0-beta-39{cursor:pointer}}@layer rdg.HeaderCell{.ceqw94e7-0-0-beta-39{touch-action:none}}@layer rdg.HeaderCell{.r12jy2ca7-0-0-beta-39{cursor:col-resize;position:absolute;inset-block-start:0;inset-inline-end:0;inset-block-end:0;inline-size:10px}}.c1j3os1p7-0-0-beta-39{opacity:.5}.c1ui3nad7-0-0-beta-39{background-color:var(--rdg-header-draggable-background-color)}@layer rdg.Row{.r1otpg647-0-0-beta-39{display:contents;line-height:var(--rdg-row-height);background-color:var(--rdg-background-color)}.r1otpg647-0-0-beta-39:hover{background-color:var(--rdg-row-hover-background-color)}.r1otpg647-0-0-beta-39[aria-selected=true]{background-color:var(--rdg-row-selected-background-color)}.r1otpg647-0-0-beta-39[aria-selected=true]:hover{background-color:var(--rdg-row-selected-hover-background-color)}}@layer rdg.FocusSink{.rel5gk27-0-0-beta-39{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}}@layer rdg.FocusSink{.r1qymf1z7-0-0-beta-39:before{content:"";display:inline-block;height:100%;position:sticky;inset-inline-start:0;border-inline-start:2px solid var(--rdg-selection-color)}}@layer rdg.HeaderRow{.h197vzie7-0-0-beta-39{display:contents;line-height:var(--rdg-header-row-height);background-color:var(--rdg-header-background-color);font-weight:700}.h197vzie7-0-0-beta-39>.c1wupbe7-0-0-beta-39{z-index:2;position:sticky}.h197vzie7-0-0-beta-39>.cd0kgiy7-0-0-beta-39{z-index:3}}@layer rdg.Cell{.ccpfvsn7-0-0-beta-39{background-color:#ccf}}@layer rdg.Cell{.c1bmg16t7-0-0-beta-39{background-color:#ccf}.c1bmg16t7-0-0-beta-39.ccpfvsn7-0-0-beta-39{background-color:#99f}}@layer rdg.SortIcon{.a1mygwml7-0-0-beta-39{fill:currentColor}.a1mygwml7-0-0-beta-39>path{transition:d .1s}}@layer rdg{@layer Defaults,FocusSink,CheckboxInput,CheckboxIcon,CheckboxLabel,Cell,HeaderCell,SummaryCell,EditCell,Row,HeaderRow,SummaryRow,GroupedRow,Root;@layer Defaults{.r104f42s7-0-0-beta-39 *,.r104f42s7-0-0-beta-39 *:before,.r104f42s7-0-0-beta-39 *:after{box-sizing:inherit}}@layer Root{.r104f42s7-0-0-beta-39{--rdg-color: #000;--rdg-border-color: #ddd;--rdg-summary-border-color: #aaa;--rdg-background-color: hsl(0deg 0% 100%);--rdg-header-background-color: hsl(0deg 0% 97.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 90.5%);--rdg-row-hover-background-color: hsl(0deg 0% 96%);--rdg-row-selected-background-color: hsl(207deg 76% 92%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 88%);--rdg-checkbox-color: hsl(207deg 100% 29%);--rdg-checkbox-focus-color: hsl(207deg 100% 69%);--rdg-checkbox-disabled-border-color: #ccc;--rdg-checkbox-disabled-background-color: #ddd;--rdg-selection-color: #66afe9;--rdg-font-size: 14px;display:grid;color-scheme:var(--rdg-color-scheme, light dark);contain:content;content-visibility:auto;block-size:350px;border:1px solid var(--rdg-border-color);box-sizing:border-box;overflow:auto;background-color:var(--rdg-background-color);color:var(--rdg-color);font-size:var(--rdg-font-size)}.r104f42s7-0-0-beta-39:before{content:"";grid-column:1/-1;grid-row:1/-1}.r104f42s7-0-0-beta-39.rdg-dark{--rdg-color-scheme: dark;--rdg-color: #ddd;--rdg-border-color: #444;--rdg-summary-border-color: #555;--rdg-background-color: hsl(0deg 0% 13%);--rdg-header-background-color: hsl(0deg 0% 10.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);--rdg-row-hover-background-color: hsl(0deg 0% 9%);--rdg-row-selected-background-color: hsl(207deg 76% 42%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);--rdg-checkbox-color: hsl(207deg 100% 79%);--rdg-checkbox-focus-color: hsl(207deg 100% 89%);--rdg-checkbox-disabled-border-color: #000;--rdg-checkbox-disabled-background-color: #333}.r104f42s7-0-0-beta-39.rdg-light{--rdg-color-scheme: light}@media (prefers-color-scheme: dark){.r104f42s7-0-0-beta-39:not(.rdg-light){--rdg-color: #ddd;--rdg-border-color: #444;--rdg-summary-border-color: #555;--rdg-background-color: hsl(0deg 0% 13%);--rdg-header-background-color: hsl(0deg 0% 10.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);--rdg-row-hover-background-color: hsl(0deg 0% 9%);--rdg-row-selected-background-color: hsl(207deg 76% 42%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);--rdg-checkbox-color: hsl(207deg 100% 79%);--rdg-checkbox-focus-color: hsl(207deg 100% 89%);--rdg-checkbox-disabled-border-color: #000;--rdg-checkbox-disabled-background-color: #333}}}}@layer rdg.Root{.v7ly7s7-0-0-beta-39{-webkit-user-select:none;user-select:none}.v7ly7s7-0-0-beta-39 .r1otpg647-0-0-beta-39{cursor:move}}@layer rdg.FocusSink{.fc4f4zb7-0-0-beta-39{grid-column:1/-1;pointer-events:none;z-index:1}}@layer rdg.FocusSink{.fq51q037-0-0-beta-39{z-index:3}}@layer rdg.SummaryCell{.s1n3hxke7-0-0-beta-39{inset-block-start:var(--rdg-summary-row-top);inset-block-end:var(--rdg-summary-row-bottom)}}@layer rdg.SummaryRow{.snfqesz7-0-0-beta-39{line-height:var(--rdg-summary-row-height)}.snfqesz7-0-0-beta-39>.c1wupbe7-0-0-beta-39{position:sticky}}@layer rdg.SummaryRow{.t1jijrjz7-0-0-beta-39>.c1wupbe7-0-0-beta-39{z-index:2}.t1jijrjz7-0-0-beta-39>.cd0kgiy7-0-0-beta-39{z-index:3}}@layer rdg.SummaryRow{.t14bmecc7-0-0-beta-39>.c1wupbe7-0-0-beta-39{border-block-end:2px solid var(--rdg-summary-border-color)}}@layer rdg.SummaryRow{.b1odhhml7-0-0-beta-39>.c1wupbe7-0-0-beta-39{border-block-start:2px solid var(--rdg-summary-border-color)}}@layer rdg.GroupedRow{.gyxx7e97-0-0-beta-39:not([aria-selected=true]){background-color:var(--rdg-header-background-color)}.gyxx7e97-0-0-beta-39>.c1wupbe7-0-0-beta-39:not(:last-child):not(.c1730fa47-0-0-beta-39){border-inline-end:none}}@layer rdg.TextEditor{.tlmcuo07-0-0-beta-39{-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;inline-size:100%;block-size:100%;padding-block:0;padding-inline:6px;border:2px solid #ccc;vertical-align:top;color:var(--rdg-color);background-color:var(--rdg-background-color);font-family:inherit;font-size:var(--rdg-font-size)}.tlmcuo07-0-0-beta-39:focus{border-color:var(--rdg-selection-color);outline:none}.tlmcuo07-0-0-beta-39::placeholder{color:#999;opacity:1}}.json-view{display:block;color:#4d4d4d;text-align:left;--json-property: #009033;--json-index: #676dff;--json-number: #676dff;--json-string: #b2762e;--json-boolean: #dc155e;--json-null: #dc155e}.json-view .json-view--property{color:var(--json-property)}.json-view .json-view--index{color:var(--json-index)}.json-view .json-view--number{color:var(--json-number)}.json-view .json-view--string{color:var(--json-string)}.json-view .json-view--boolean{color:var(--json-boolean)}.json-view .json-view--null{color:var(--json-null)}.json-view .jv-indent{padding-left:1em}.json-view .jv-chevron{display:inline-block;vertical-align:-20%;cursor:pointer;opacity:.4;width:1em;height:1em}:is(.json-view .jv-chevron:hover,.json-view .jv-size:hover+.jv-chevron){opacity:.8}.json-view .jv-size{cursor:pointer;opacity:.4;font-size:.875em;font-style:italic;margin-left:.5em;vertical-align:-5%;line-height:1}.json-view :is(.json-view--copy,.json-view--edit),.json-view .json-view--link svg{display:none;width:1em;height:1em;margin-left:.25em;cursor:pointer}.json-view .json-view--input{width:120px;margin-left:.25em;border-radius:4px;border:1px solid currentColor;padding:0 4px;font-size:87.5%;line-height:1.25;background:transparent}.json-view .json-view--deleting{outline:1px solid #da0000;background-color:#da000011;text-decoration-line:line-through}:is(.json-view:hover,.json-view--pair:hover)>:is(.json-view--copy,.json-view--edit),:is(.json-view:hover,.json-view--pair:hover)>.json-view--link svg{display:inline-block}.json-view .jv-button{background:transparent;outline:none;border:none;cursor:pointer;color:inherit}.json-view .cursor-pointer{cursor:pointer}.json-view svg{vertical-align:-10%}.jv-size-chevron~svg{vertical-align:-16%}.json-view_a11y{color:#545454;--json-property: #aa5d00;--json-index: #007299;--json-number: #007299;--json-string: #008000;--json-boolean: #d91e18;--json-null: #d91e18}.json-view_github{color:#005cc5;--json-property: #005cc5;--json-index: #005cc5;--json-number: #005cc5;--json-string: #032f62;--json-boolean: #005cc5;--json-null: #005cc5}.json-view_vscode{color:#005cc5;--json-property: #0451a5;--json-index: #0000ff;--json-number: #0000ff;--json-string: #a31515;--json-boolean: #0000ff;--json-null: #0000ff}.json-view_atom{color:#383a42;--json-property: #e45649;--json-index: #986801;--json-number: #986801;--json-string: #50a14f;--json-boolean: #0184bc;--json-null: #0184bc}.json-view_winter-is-coming{color:#0431fa;--json-property: #3a9685;--json-index: #ae408b;--json-number: #ae408b;--json-string: #8123a9;--json-boolean: #0184bc;--json-null: #0184bc}:is(.dark .json-view,.dark.json-view){color:#d1d1d1;--json-property: #009033;--json-index: #5d75f2;--json-number: #5d75f2;--json-string: #c57e29;--json-boolean: #e4407b;--json-null: #e4407b}:is(.dark .json-view_a11y,.dark.json-view_a11y){color:#d1d1d1;--json-property: #ffd700;--json-index: #00e0e0;--json-number: #00e0e0;--json-string: #abe338;--json-boolean: #ffa07a;--json-null: #ffa07a}:is(.dark .json-view_github,.dark.json-view_github){color:#79b8ff;--json-property: #79b8ff;--json-index: #79b8ff;--json-number: #79b8ff;--json-string: #9ecbff;--json-boolean: #79b8ff;--json-null: #79b8ff}:is(.dark .json-view_vscode,.dark.json-view_vscode){color:orchid;--json-property: #9cdcfe;--json-index: #b5cea8;--json-number: #b5cea8;--json-string: #ce9178;--json-boolean: #569cd6;--json-null: #569cd6}:is(.dark .json-view_atom,.dark.json-view_atom){color:#abb2bf;--json-property: #e06c75;--json-index: #d19a66;--json-number: #d19a66;--json-string: #98c379;--json-boolean: #56b6c2;--json-null: #56b6c2}:is(.dark .json-view_winter-is-coming,.dark.json-view_winter-is-coming){color:#a7dbf7;--json-property: #91dacd;--json-index: #8dec95;--json-number: #8dec95;--json-string: #e0aff5;--json-boolean: #f29fd8;--json-null: #f29fd8}.json-view .json-view--string{word-break:break-all}.llm-variable-highlight{color:var(--colorPaletteGreenForeground1)!important}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); +var Kw=Object.defineProperty;var Uw=(eo,to,ro)=>to in eo?Kw(eo,to,{enumerable:!0,configurable:!0,writable:!0,value:ro}):eo[to]=ro;var Qw=(eo,to)=>()=>(to||eo((to={exports:{}}).exports,to),to.exports);var Ws=(eo,to,ro)=>(Uw(eo,typeof to!="symbol"?to+"":to,ro),ro);var Yw=Qw((exports,module)=>{function _mergeNamespaces(eo,to){for(var ro=0;rono[oo]})}}}return Object.freeze(Object.defineProperty(eo,Symbol.toStringTag,{value:"Module"}))}(function(){const to=document.createElement("link").relList;if(to&&to.supports&&to.supports("modulepreload"))return;for(const oo of document.querySelectorAll('link[rel="modulepreload"]'))no(oo);new MutationObserver(oo=>{for(const io of oo)if(io.type==="childList")for(const so of io.addedNodes)so.tagName==="LINK"&&so.rel==="modulepreload"&&no(so)}).observe(document,{childList:!0,subtree:!0});function ro(oo){const io={};return oo.integrity&&(io.integrity=oo.integrity),oo.referrerPolicy&&(io.referrerPolicy=oo.referrerPolicy),oo.crossOrigin==="use-credentials"?io.credentials="include":oo.crossOrigin==="anonymous"?io.credentials="omit":io.credentials="same-origin",io}function no(oo){if(oo.ep)return;oo.ep=!0;const io=ro(oo);fetch(oo.href,io)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(eo){return eo&&eo.__esModule&&Object.prototype.hasOwnProperty.call(eo,"default")?eo.default:eo}var jsxRuntime$1={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var l$9=Symbol.for("react.element"),n$8=Symbol.for("react.portal"),p$b=Symbol.for("react.fragment"),q$5=Symbol.for("react.strict_mode"),r$6=Symbol.for("react.profiler"),t$9=Symbol.for("react.provider"),u$7=Symbol.for("react.context"),v$8=Symbol.for("react.forward_ref"),w$6=Symbol.for("react.suspense"),x$8=Symbol.for("react.memo"),y$7=Symbol.for("react.lazy"),z$5=Symbol.iterator;function A$7(eo){return eo===null||typeof eo!="object"?null:(eo=z$5&&eo[z$5]||eo["@@iterator"],typeof eo=="function"?eo:null)}var B$4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$7=Object.assign,D$5={};function E$6(eo,to,ro){this.props=eo,this.context=to,this.refs=D$5,this.updater=ro||B$4}E$6.prototype.isReactComponent={};E$6.prototype.setState=function(eo,to){if(typeof eo!="object"&&typeof eo!="function"&&eo!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,eo,to,"setState")};E$6.prototype.forceUpdate=function(eo){this.updater.enqueueForceUpdate(this,eo,"forceUpdate")};function F$2(){}F$2.prototype=E$6.prototype;function G$2(eo,to,ro){this.props=eo,this.context=to,this.refs=D$5,this.updater=ro||B$4}var H$4=G$2.prototype=new F$2;H$4.constructor=G$2;C$7(H$4,E$6.prototype);H$4.isPureReactComponent=!0;var I$3=Array.isArray,J$1=Object.prototype.hasOwnProperty,K$4={current:null},L$4={key:!0,ref:!0,__self:!0,__source:!0};function M$5(eo,to,ro){var no,oo={},io=null,so=null;if(to!=null)for(no in to.ref!==void 0&&(so=to.ref),to.key!==void 0&&(io=""+to.key),to)J$1.call(to,no)&&!L$4.hasOwnProperty(no)&&(oo[no]=to[no]);var ao=arguments.length-2;if(ao===1)oo.children=ro;else if(1>>1,Zo=Ho[Yo];if(0>>1;Yo<_s;){var Ss=2*(Yo+1)-1,As=Ho[Ss],Ns=Ss+1,ws=Ho[Ns];if(0>oo(As,Uo))Nsoo(ws,As)?(Ho[Yo]=ws,Ho[Ns]=Uo,Yo=Ns):(Ho[Yo]=As,Ho[Ss]=Uo,Yo=Ss);else if(Nsoo(ws,Uo))Ho[Yo]=ws,Ho[Ns]=Uo,Yo=Ns;else break e}}return qo}function oo(Ho,qo){var Uo=Ho.sortIndex-qo.sortIndex;return Uo!==0?Uo:Ho.id-qo.id}if(typeof performance=="object"&&typeof performance.now=="function"){var io=performance;eo.unstable_now=function(){return io.now()}}else{var so=Date,ao=so.now();eo.unstable_now=function(){return so.now()-ao}}var lo=[],uo=[],co=1,fo=null,ho=3,po=!1,go=!1,vo=!1,bo=typeof setTimeout=="function"?setTimeout:null,xo=typeof clearTimeout=="function"?clearTimeout:null,_o=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Eo(Ho){for(var qo=ro(uo);qo!==null;){if(qo.callback===null)no(uo);else if(qo.startTime<=Ho)no(uo),qo.sortIndex=qo.expirationTime,to(lo,qo);else break;qo=ro(uo)}}function So(Ho){if(vo=!1,Eo(Ho),!go)if(ro(lo)!==null)go=!0,$o(To);else{var qo=ro(uo);qo!==null&&Lo(So,qo.startTime-Ho)}}function To(Ho,qo){go=!1,vo&&(vo=!1,xo(Oo),Oo=-1),po=!0;var Uo=ho;try{for(Eo(qo),fo=ro(lo);fo!==null&&(!(fo.expirationTime>qo)||Ho&&!No());){var Yo=fo.callback;if(typeof Yo=="function"){fo.callback=null,ho=fo.priorityLevel;var Zo=Yo(fo.expirationTime<=qo);qo=eo.unstable_now(),typeof Zo=="function"?fo.callback=Zo:fo===ro(lo)&&no(lo),Eo(qo)}else no(lo);fo=ro(lo)}if(fo!==null)var _s=!0;else{var Ss=ro(uo);Ss!==null&&Lo(So,Ss.startTime-qo),_s=!1}return _s}finally{fo=null,ho=Uo,po=!1}}var wo=!1,Co=null,Oo=-1,Ao=5,Ro=-1;function No(){return!(eo.unstable_now()-RoHo||125Yo?(Ho.sortIndex=Uo,to(uo,Ho),ro(lo)===null&&Ho===ro(uo)&&(vo?(xo(Oo),Oo=-1):vo=!0,Lo(So,Uo-Yo))):(Ho.sortIndex=Zo,to(lo,Ho),go||po||(go=!0,$o(To))),Ho},eo.unstable_shouldYield=No,eo.unstable_wrapCallback=function(Ho){var qo=ho;return function(){var Uo=ho;ho=qo;try{return Ho.apply(this,arguments)}finally{ho=Uo}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var aa=reactExports,ca=schedulerExports;function p$9(eo){for(var to="https://reactjs.org/docs/error-decoder.html?invariant="+eo,ro=1;ro"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja=Object.prototype.hasOwnProperty,ka=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la={},ma={};function oa(eo){return ja.call(ma,eo)?!0:ja.call(la,eo)?!1:ka.test(eo)?ma[eo]=!0:(la[eo]=!0,!1)}function pa(eo,to,ro,no){if(ro!==null&&ro.type===0)return!1;switch(typeof to){case"function":case"symbol":return!0;case"boolean":return no?!1:ro!==null?!ro.acceptsBooleans:(eo=eo.toLowerCase().slice(0,5),eo!=="data-"&&eo!=="aria-");default:return!1}}function qa(eo,to,ro,no){if(to===null||typeof to>"u"||pa(eo,to,ro,no))return!0;if(no)return!1;if(ro!==null)switch(ro.type){case 3:return!to;case 4:return to===!1;case 5:return isNaN(to);case 6:return isNaN(to)||1>to}return!1}function v$7(eo,to,ro,no,oo,io,so){this.acceptsBooleans=to===2||to===3||to===4,this.attributeName=no,this.attributeNamespace=oo,this.mustUseProperty=ro,this.propertyName=eo,this.type=to,this.sanitizeURL=io,this.removeEmptyString=so}var z$4={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(eo){z$4[eo]=new v$7(eo,0,!1,eo,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(eo){var to=eo[0];z$4[to]=new v$7(to,1,!1,eo[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(eo){z$4[eo]=new v$7(eo,2,!1,eo.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(eo){z$4[eo]=new v$7(eo,2,!1,eo,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(eo){z$4[eo]=new v$7(eo,3,!1,eo.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(eo){z$4[eo]=new v$7(eo,3,!0,eo,null,!1,!1)});["capture","download"].forEach(function(eo){z$4[eo]=new v$7(eo,4,!1,eo,null,!1,!1)});["cols","rows","size","span"].forEach(function(eo){z$4[eo]=new v$7(eo,6,!1,eo,null,!1,!1)});["rowSpan","start"].forEach(function(eo){z$4[eo]=new v$7(eo,5,!1,eo.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(eo){return eo[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(eo){var to=eo.replace(ra,sa);z$4[to]=new v$7(to,1,!1,eo,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(eo){var to=eo.replace(ra,sa);z$4[to]=new v$7(to,1,!1,eo,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(eo){var to=eo.replace(ra,sa);z$4[to]=new v$7(to,1,!1,eo,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(eo){z$4[eo]=new v$7(eo,1,!1,eo.toLowerCase(),null,!1,!1)});z$4.xlinkHref=new v$7("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(eo){z$4[eo]=new v$7(eo,1,!1,eo.toLowerCase(),null,!0,!0)});function ta(eo,to,ro,no){var oo=z$4.hasOwnProperty(to)?z$4[to]:null;(oo!==null?oo.type!==0:no||!(2ao||oo[so]!==io[ao]){var lo=` +`+oo[so].replace(" at new "," at ");return eo.displayName&&lo.includes("")&&(lo=lo.replace("",eo.displayName)),lo}while(1<=so&&0<=ao);break}}}finally{Na=!1,Error.prepareStackTrace=ro}return(eo=eo?eo.displayName||eo.name:"")?Ma(eo):""}function Pa(eo){switch(eo.tag){case 5:return Ma(eo.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return eo=Oa(eo.type,!1),eo;case 11:return eo=Oa(eo.type.render,!1),eo;case 1:return eo=Oa(eo.type,!0),eo;default:return""}}function Qa(eo){if(eo==null)return null;if(typeof eo=="function")return eo.displayName||eo.name||null;if(typeof eo=="string")return eo;switch(eo){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if(typeof eo=="object")switch(eo.$$typeof){case Ca:return(eo.displayName||"Context")+".Consumer";case Ba:return(eo._context.displayName||"Context")+".Provider";case Da:var to=eo.render;return eo=eo.displayName,eo||(eo=to.displayName||to.name||"",eo=eo!==""?"ForwardRef("+eo+")":"ForwardRef"),eo;case Ga:return to=eo.displayName||null,to!==null?to:Qa(eo.type)||"Memo";case Ha:to=eo._payload,eo=eo._init;try{return Qa(eo(to))}catch{}}return null}function Ra(eo){var to=eo.type;switch(eo.tag){case 24:return"Cache";case 9:return(to.displayName||"Context")+".Consumer";case 10:return(to._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return eo=to.render,eo=eo.displayName||eo.name||"",to.displayName||(eo!==""?"ForwardRef("+eo+")":"ForwardRef");case 7:return"Fragment";case 5:return to;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(to);case 8:return to===za?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof to=="function")return to.displayName||to.name||null;if(typeof to=="string")return to}return null}function Sa(eo){switch(typeof eo){case"boolean":case"number":case"string":case"undefined":return eo;case"object":return eo;default:return""}}function Ta(eo){var to=eo.type;return(eo=eo.nodeName)&&eo.toLowerCase()==="input"&&(to==="checkbox"||to==="radio")}function Ua(eo){var to=Ta(eo)?"checked":"value",ro=Object.getOwnPropertyDescriptor(eo.constructor.prototype,to),no=""+eo[to];if(!eo.hasOwnProperty(to)&&typeof ro<"u"&&typeof ro.get=="function"&&typeof ro.set=="function"){var oo=ro.get,io=ro.set;return Object.defineProperty(eo,to,{configurable:!0,get:function(){return oo.call(this)},set:function(so){no=""+so,io.call(this,so)}}),Object.defineProperty(eo,to,{enumerable:ro.enumerable}),{getValue:function(){return no},setValue:function(so){no=""+so},stopTracking:function(){eo._valueTracker=null,delete eo[to]}}}}function Va(eo){eo._valueTracker||(eo._valueTracker=Ua(eo))}function Wa(eo){if(!eo)return!1;var to=eo._valueTracker;if(!to)return!0;var ro=to.getValue(),no="";return eo&&(no=Ta(eo)?eo.checked?"true":"false":eo.value),eo=no,eo!==ro?(to.setValue(eo),!0):!1}function Xa(eo){if(eo=eo||(typeof document<"u"?document:void 0),typeof eo>"u")return null;try{return eo.activeElement||eo.body}catch{return eo.body}}function Ya(eo,to){var ro=to.checked;return A$6({},to,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:ro??eo._wrapperState.initialChecked})}function Za(eo,to){var ro=to.defaultValue==null?"":to.defaultValue,no=to.checked!=null?to.checked:to.defaultChecked;ro=Sa(to.value!=null?to.value:ro),eo._wrapperState={initialChecked:no,initialValue:ro,controlled:to.type==="checkbox"||to.type==="radio"?to.checked!=null:to.value!=null}}function ab(eo,to){to=to.checked,to!=null&&ta(eo,"checked",to,!1)}function bb(eo,to){ab(eo,to);var ro=Sa(to.value),no=to.type;if(ro!=null)no==="number"?(ro===0&&eo.value===""||eo.value!=ro)&&(eo.value=""+ro):eo.value!==""+ro&&(eo.value=""+ro);else if(no==="submit"||no==="reset"){eo.removeAttribute("value");return}to.hasOwnProperty("value")?cb(eo,to.type,ro):to.hasOwnProperty("defaultValue")&&cb(eo,to.type,Sa(to.defaultValue)),to.checked==null&&to.defaultChecked!=null&&(eo.defaultChecked=!!to.defaultChecked)}function db(eo,to,ro){if(to.hasOwnProperty("value")||to.hasOwnProperty("defaultValue")){var no=to.type;if(!(no!=="submit"&&no!=="reset"||to.value!==void 0&&to.value!==null))return;to=""+eo._wrapperState.initialValue,ro||to===eo.value||(eo.value=to),eo.defaultValue=to}ro=eo.name,ro!==""&&(eo.name=""),eo.defaultChecked=!!eo._wrapperState.initialChecked,ro!==""&&(eo.name=ro)}function cb(eo,to,ro){(to!=="number"||Xa(eo.ownerDocument)!==eo)&&(ro==null?eo.defaultValue=""+eo._wrapperState.initialValue:eo.defaultValue!==""+ro&&(eo.defaultValue=""+ro))}var eb=Array.isArray;function fb(eo,to,ro,no){if(eo=eo.options,to){to={};for(var oo=0;oo"+to.valueOf().toString()+"",to=mb.firstChild;eo.firstChild;)eo.removeChild(eo.firstChild);for(;to.firstChild;)eo.appendChild(to.firstChild)}});function ob(eo,to){if(to){var ro=eo.firstChild;if(ro&&ro===eo.lastChild&&ro.nodeType===3){ro.nodeValue=to;return}}eo.textContent=to}var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(eo){qb.forEach(function(to){to=to+eo.charAt(0).toUpperCase()+eo.substring(1),pb[to]=pb[eo]})});function rb(eo,to,ro){return to==null||typeof to=="boolean"||to===""?"":ro||typeof to!="number"||to===0||pb.hasOwnProperty(eo)&&pb[eo]?(""+to).trim():to+"px"}function sb(eo,to){eo=eo.style;for(var ro in to)if(to.hasOwnProperty(ro)){var no=ro.indexOf("--")===0,oo=rb(ro,to[ro],no);ro==="float"&&(ro="cssFloat"),no?eo.setProperty(ro,oo):eo[ro]=oo}}var tb=A$6({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(eo,to){if(to){if(tb[eo]&&(to.children!=null||to.dangerouslySetInnerHTML!=null))throw Error(p$9(137,eo));if(to.dangerouslySetInnerHTML!=null){if(to.children!=null)throw Error(p$9(60));if(typeof to.dangerouslySetInnerHTML!="object"||!("__html"in to.dangerouslySetInnerHTML))throw Error(p$9(61))}if(to.style!=null&&typeof to.style!="object")throw Error(p$9(62))}}function vb(eo,to){if(eo.indexOf("-")===-1)return typeof to.is=="string";switch(eo){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wb=null;function xb(eo){return eo=eo.target||eo.srcElement||window,eo.correspondingUseElement&&(eo=eo.correspondingUseElement),eo.nodeType===3?eo.parentNode:eo}var yb=null,zb=null,Ab=null;function Bb(eo){if(eo=Cb(eo)){if(typeof yb!="function")throw Error(p$9(280));var to=eo.stateNode;to&&(to=Db(to),yb(eo.stateNode,eo.type,to))}}function Eb(eo){zb?Ab?Ab.push(eo):Ab=[eo]:zb=eo}function Fb(){if(zb){var eo=zb,to=Ab;if(Ab=zb=null,Bb(eo),to)for(eo=0;eo>>=0,eo===0?32:31-(pc(eo)/qc|0)|0}var rc=64,sc=4194304;function tc(eo){switch(eo&-eo){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return eo&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return eo&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return eo}}function uc(eo,to){var ro=eo.pendingLanes;if(ro===0)return 0;var no=0,oo=eo.suspendedLanes,io=eo.pingedLanes,so=ro&268435455;if(so!==0){var ao=so&~oo;ao!==0?no=tc(ao):(io&=so,io!==0&&(no=tc(io)))}else so=ro&~oo,so!==0?no=tc(so):io!==0&&(no=tc(io));if(no===0)return 0;if(to!==0&&to!==no&&!(to&oo)&&(oo=no&-no,io=to&-to,oo>=io||oo===16&&(io&4194240)!==0))return to;if(no&4&&(no|=ro&16),to=eo.entangledLanes,to!==0)for(eo=eo.entanglements,to&=no;0ro;ro++)to.push(eo);return to}function Ac(eo,to,ro){eo.pendingLanes|=to,to!==536870912&&(eo.suspendedLanes=0,eo.pingedLanes=0),eo=eo.eventTimes,to=31-oc(to),eo[to]=ro}function Bc(eo,to){var ro=eo.pendingLanes&~to;eo.pendingLanes=to,eo.suspendedLanes=0,eo.pingedLanes=0,eo.expiredLanes&=to,eo.mutableReadLanes&=to,eo.entangledLanes&=to,to=eo.entanglements;var no=eo.eventTimes;for(eo=eo.expirationTimes;0=be$2),ee$2=" ",fe$2=!1;function ge$1(eo,to){switch(eo){case"keyup":return $d.indexOf(to.keyCode)!==-1;case"keydown":return to.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he$2(eo){return eo=eo.detail,typeof eo=="object"&&"data"in eo?eo.data:null}var ie$4=!1;function je$1(eo,to){switch(eo){case"compositionend":return he$2(to);case"keypress":return to.which!==32?null:(fe$2=!0,ee$2);case"textInput":return eo=to.data,eo===ee$2&&fe$2?null:eo;default:return null}}function ke$1(eo,to){if(ie$4)return eo==="compositionend"||!ae$2&&ge$1(eo,to)?(eo=nd(),md=ld=kd=null,ie$4=!1,eo):null;switch(eo){case"paste":return null;case"keypress":if(!(to.ctrlKey||to.altKey||to.metaKey)||to.ctrlKey&&to.altKey){if(to.char&&1=to)return{node:ro,offset:to-eo};eo=no}e:{for(;ro;){if(ro.nextSibling){ro=ro.nextSibling;break e}ro=ro.parentNode}ro=void 0}ro=Je$1(ro)}}function Le$1(eo,to){return eo&&to?eo===to?!0:eo&&eo.nodeType===3?!1:to&&to.nodeType===3?Le$1(eo,to.parentNode):"contains"in eo?eo.contains(to):eo.compareDocumentPosition?!!(eo.compareDocumentPosition(to)&16):!1:!1}function Me$2(){for(var eo=window,to=Xa();to instanceof eo.HTMLIFrameElement;){try{var ro=typeof to.contentWindow.location.href=="string"}catch{ro=!1}if(ro)eo=to.contentWindow;else break;to=Xa(eo.document)}return to}function Ne$1(eo){var to=eo&&eo.nodeName&&eo.nodeName.toLowerCase();return to&&(to==="input"&&(eo.type==="text"||eo.type==="search"||eo.type==="tel"||eo.type==="url"||eo.type==="password")||to==="textarea"||eo.contentEditable==="true")}function Oe$2(eo){var to=Me$2(),ro=eo.focusedElem,no=eo.selectionRange;if(to!==ro&&ro&&ro.ownerDocument&&Le$1(ro.ownerDocument.documentElement,ro)){if(no!==null&&Ne$1(ro)){if(to=no.start,eo=no.end,eo===void 0&&(eo=to),"selectionStart"in ro)ro.selectionStart=to,ro.selectionEnd=Math.min(eo,ro.value.length);else if(eo=(to=ro.ownerDocument||document)&&to.defaultView||window,eo.getSelection){eo=eo.getSelection();var oo=ro.textContent.length,io=Math.min(no.start,oo);no=no.end===void 0?io:Math.min(no.end,oo),!eo.extend&&io>no&&(oo=no,no=io,io=oo),oo=Ke$1(ro,io);var so=Ke$1(ro,no);oo&&so&&(eo.rangeCount!==1||eo.anchorNode!==oo.node||eo.anchorOffset!==oo.offset||eo.focusNode!==so.node||eo.focusOffset!==so.offset)&&(to=to.createRange(),to.setStart(oo.node,oo.offset),eo.removeAllRanges(),io>no?(eo.addRange(to),eo.extend(so.node,so.offset)):(to.setEnd(so.node,so.offset),eo.addRange(to)))}}for(to=[],eo=ro;eo=eo.parentNode;)eo.nodeType===1&&to.push({element:eo,left:eo.scrollLeft,top:eo.scrollTop});for(typeof ro.focus=="function"&&ro.focus(),ro=0;ro=document.documentMode,Qe$1=null,Re$1=null,Se$1=null,Te$1=!1;function Ue$1(eo,to,ro){var no=ro.window===ro?ro.document:ro.nodeType===9?ro:ro.ownerDocument;Te$1||Qe$1==null||Qe$1!==Xa(no)||(no=Qe$1,"selectionStart"in no&&Ne$1(no)?no={start:no.selectionStart,end:no.selectionEnd}:(no=(no.ownerDocument&&no.ownerDocument.defaultView||window).getSelection(),no={anchorNode:no.anchorNode,anchorOffset:no.anchorOffset,focusNode:no.focusNode,focusOffset:no.focusOffset}),Se$1&&Ie$1(Se$1,no)||(Se$1=no,no=oe$1(Re$1,"onSelect"),0Tf||(eo.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G$1(eo,to){Tf++,Sf[Tf]=eo.current,eo.current=to}var Vf={},H$3=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(eo,to){var ro=eo.type.contextTypes;if(!ro)return Vf;var no=eo.stateNode;if(no&&no.__reactInternalMemoizedUnmaskedChildContext===to)return no.__reactInternalMemoizedMaskedChildContext;var oo={},io;for(io in ro)oo[io]=to[io];return no&&(eo=eo.stateNode,eo.__reactInternalMemoizedUnmaskedChildContext=to,eo.__reactInternalMemoizedMaskedChildContext=oo),oo}function Zf(eo){return eo=eo.childContextTypes,eo!=null}function $f(){E$5(Wf),E$5(H$3)}function ag(eo,to,ro){if(H$3.current!==Vf)throw Error(p$9(168));G$1(H$3,to),G$1(Wf,ro)}function bg(eo,to,ro){var no=eo.stateNode;if(to=to.childContextTypes,typeof no.getChildContext!="function")return ro;no=no.getChildContext();for(var oo in no)if(!(oo in to))throw Error(p$9(108,Ra(eo)||"Unknown",oo));return A$6({},ro,no)}function cg(eo){return eo=(eo=eo.stateNode)&&eo.__reactInternalMemoizedMergedChildContext||Vf,Xf=H$3.current,G$1(H$3,eo),G$1(Wf,Wf.current),!0}function dg(eo,to,ro){var no=eo.stateNode;if(!no)throw Error(p$9(169));ro?(eo=bg(eo,to,Xf),no.__reactInternalMemoizedMergedChildContext=eo,E$5(Wf),E$5(H$3),G$1(H$3,eo)):E$5(Wf),G$1(Wf,ro)}var eg=null,fg=!1,gg=!1;function hg(eo){eg===null?eg=[eo]:eg.push(eo)}function ig(eo){fg=!0,hg(eo)}function jg(){if(!gg&&eg!==null){gg=!0;var eo=0,to=C$6;try{var ro=eg;for(C$6=1;eo>=so,oo-=so,rg=1<<32-oc(to)+oo|ro<Oo?(Ao=Co,Co=null):Ao=Co.sibling;var Ro=ho(xo,Co,Eo[Oo],So);if(Ro===null){Co===null&&(Co=Ao);break}eo&&Co&&Ro.alternate===null&&to(xo,Co),_o=io(Ro,_o,Oo),wo===null?To=Ro:wo.sibling=Ro,wo=Ro,Co=Ao}if(Oo===Eo.length)return ro(xo,Co),I$2&&tg(xo,Oo),To;if(Co===null){for(;OoOo?(Ao=Co,Co=null):Ao=Co.sibling;var No=ho(xo,Co,Ro.value,So);if(No===null){Co===null&&(Co=Ao);break}eo&&Co&&No.alternate===null&&to(xo,Co),_o=io(No,_o,Oo),wo===null?To=No:wo.sibling=No,wo=No,Co=Ao}if(Ro.done)return ro(xo,Co),I$2&&tg(xo,Oo),To;if(Co===null){for(;!Ro.done;Oo++,Ro=Eo.next())Ro=fo(xo,Ro.value,So),Ro!==null&&(_o=io(Ro,_o,Oo),wo===null?To=Ro:wo.sibling=Ro,wo=Ro);return I$2&&tg(xo,Oo),To}for(Co=no(xo,Co);!Ro.done;Oo++,Ro=Eo.next())Ro=po(Co,xo,Oo,Ro.value,So),Ro!==null&&(eo&&Ro.alternate!==null&&Co.delete(Ro.key===null?Oo:Ro.key),_o=io(Ro,_o,Oo),wo===null?To=Ro:wo.sibling=Ro,wo=Ro);return eo&&Co.forEach(function(Mo){return to(xo,Mo)}),I$2&&tg(xo,Oo),To}function bo(xo,_o,Eo,So){if(typeof Eo=="object"&&Eo!==null&&Eo.type===ya&&Eo.key===null&&(Eo=Eo.props.children),typeof Eo=="object"&&Eo!==null){switch(Eo.$$typeof){case va:e:{for(var To=Eo.key,wo=_o;wo!==null;){if(wo.key===To){if(To=Eo.type,To===ya){if(wo.tag===7){ro(xo,wo.sibling),_o=oo(wo,Eo.props.children),_o.return=xo,xo=_o;break e}}else if(wo.elementType===To||typeof To=="object"&&To!==null&&To.$$typeof===Ha&&uh(To)===wo.type){ro(xo,wo.sibling),_o=oo(wo,Eo.props),_o.ref=sh(xo,wo,Eo),_o.return=xo,xo=_o;break e}ro(xo,wo);break}else to(xo,wo);wo=wo.sibling}Eo.type===ya?(_o=Ah(Eo.props.children,xo.mode,So,Eo.key),_o.return=xo,xo=_o):(So=yh(Eo.type,Eo.key,Eo.props,null,xo.mode,So),So.ref=sh(xo,_o,Eo),So.return=xo,xo=So)}return so(xo);case wa:e:{for(wo=Eo.key;_o!==null;){if(_o.key===wo)if(_o.tag===4&&_o.stateNode.containerInfo===Eo.containerInfo&&_o.stateNode.implementation===Eo.implementation){ro(xo,_o.sibling),_o=oo(_o,Eo.children||[]),_o.return=xo,xo=_o;break e}else{ro(xo,_o);break}else to(xo,_o);_o=_o.sibling}_o=zh(Eo,xo.mode,So),_o.return=xo,xo=_o}return so(xo);case Ha:return wo=Eo._init,bo(xo,_o,wo(Eo._payload),So)}if(eb(Eo))return go(xo,_o,Eo,So);if(Ka(Eo))return vo(xo,_o,Eo,So);th(xo,Eo)}return typeof Eo=="string"&&Eo!==""||typeof Eo=="number"?(Eo=""+Eo,_o!==null&&_o.tag===6?(ro(xo,_o.sibling),_o=oo(_o,Eo),_o.return=xo,xo=_o):(ro(xo,_o),_o=xh(Eo,xo.mode,So),_o.return=xo,xo=_o),so(xo)):ro(xo,_o)}return bo}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(eo){if(eo===Dh)throw Error(p$9(174));return eo}function Ih(eo,to){switch(G$1(Gh,to),G$1(Fh,eo),G$1(Eh,Dh),eo=to.nodeType,eo){case 9:case 11:to=(to=to.documentElement)?to.namespaceURI:lb(null,"");break;default:eo=eo===8?to.parentNode:to,to=eo.namespaceURI||null,eo=eo.tagName,to=lb(to,eo)}E$5(Eh),G$1(Eh,to)}function Jh(){E$5(Eh),E$5(Fh),E$5(Gh)}function Kh(eo){Hh(Gh.current);var to=Hh(Eh.current),ro=lb(to,eo.type);to!==ro&&(G$1(Fh,eo),G$1(Eh,ro))}function Lh(eo){Fh.current===eo&&(E$5(Eh),E$5(Fh))}var M$4=Uf(0);function Mh(eo){for(var to=eo;to!==null;){if(to.tag===13){var ro=to.memoizedState;if(ro!==null&&(ro=ro.dehydrated,ro===null||ro.data==="$?"||ro.data==="$!"))return to}else if(to.tag===19&&to.memoizedProps.revealOrder!==void 0){if(to.flags&128)return to}else if(to.child!==null){to.child.return=to,to=to.child;continue}if(to===eo)break;for(;to.sibling===null;){if(to.return===null||to.return===eo)return null;to=to.return}to.sibling.return=to.return,to=to.sibling}return null}var Nh=[];function Oh(){for(var eo=0;eoro?ro:4,eo(!0);var no=Qh.transition;Qh.transition={};try{eo(!1),to()}finally{C$6=ro,Qh.transition=no}}function Fi$1(){return di$1().memoizedState}function Gi$1(eo,to,ro){var no=lh(eo);if(ro={lane:no,action:ro,hasEagerState:!1,eagerState:null,next:null},Hi$1(eo))Ii$1(to,ro);else if(ro=Yg(eo,to,ro,no),ro!==null){var oo=L$3();mh(ro,eo,no,oo),Ji$1(ro,to,no)}}function ri$1(eo,to,ro){var no=lh(eo),oo={lane:no,action:ro,hasEagerState:!1,eagerState:null,next:null};if(Hi$1(eo))Ii$1(to,oo);else{var io=eo.alternate;if(eo.lanes===0&&(io===null||io.lanes===0)&&(io=to.lastRenderedReducer,io!==null))try{var so=to.lastRenderedState,ao=io(so,ro);if(oo.hasEagerState=!0,oo.eagerState=ao,He$2(ao,so)){var lo=to.interleaved;lo===null?(oo.next=oo,Xg(to)):(oo.next=lo.next,lo.next=oo),to.interleaved=oo;return}}catch{}finally{}ro=Yg(eo,to,oo,no),ro!==null&&(oo=L$3(),mh(ro,eo,no,oo),Ji$1(ro,to,no))}}function Hi$1(eo){var to=eo.alternate;return eo===N$4||to!==null&&to===N$4}function Ii$1(eo,to){Th$1=Sh=!0;var ro=eo.pending;ro===null?to.next=to:(to.next=ro.next,ro.next=to),eo.pending=to}function Ji$1(eo,to,ro){if(ro&4194240){var no=to.lanes;no&=eo.pendingLanes,ro|=no,to.lanes=ro,Cc(eo,ro)}}var ai$1={readContext:Vg,useCallback:Q$1,useContext:Q$1,useEffect:Q$1,useImperativeHandle:Q$1,useInsertionEffect:Q$1,useLayoutEffect:Q$1,useMemo:Q$1,useReducer:Q$1,useRef:Q$1,useState:Q$1,useDebugValue:Q$1,useDeferredValue:Q$1,useTransition:Q$1,useMutableSource:Q$1,useSyncExternalStore:Q$1,useId:Q$1,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(eo,to){return ci$1().memoizedState=[eo,to===void 0?null:to],eo},useContext:Vg,useEffect:vi$1,useImperativeHandle:function(eo,to,ro){return ro=ro!=null?ro.concat([eo]):null,ti$1(4194308,4,yi$1.bind(null,to,eo),ro)},useLayoutEffect:function(eo,to){return ti$1(4194308,4,eo,to)},useInsertionEffect:function(eo,to){return ti$1(4,2,eo,to)},useMemo:function(eo,to){var ro=ci$1();return to=to===void 0?null:to,eo=eo(),ro.memoizedState=[eo,to],eo},useReducer:function(eo,to,ro){var no=ci$1();return to=ro!==void 0?ro(to):to,no.memoizedState=no.baseState=to,eo={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:to},no.queue=eo,eo=eo.dispatch=Gi$1.bind(null,N$4,eo),[no.memoizedState,eo]},useRef:function(eo){var to=ci$1();return eo={current:eo},to.memoizedState=eo},useState:qi$1,useDebugValue:Ai$1,useDeferredValue:function(eo){return ci$1().memoizedState=eo},useTransition:function(){var eo=qi$1(!1),to=eo[0];return eo=Ei$1.bind(null,eo[1]),ci$1().memoizedState=eo,[to,eo]},useMutableSource:function(){},useSyncExternalStore:function(eo,to,ro){var no=N$4,oo=ci$1();if(I$2){if(ro===void 0)throw Error(p$9(407));ro=ro()}else{if(ro=to(),R$3===null)throw Error(p$9(349));Rh&30||ni$1(no,to,ro)}oo.memoizedState=ro;var io={value:ro,getSnapshot:to};return oo.queue=io,vi$1(ki$1.bind(null,no,io,eo),[eo]),no.flags|=2048,li$1(9,mi$1.bind(null,no,io,ro,to),void 0,null),ro},useId:function(){var eo=ci$1(),to=R$3.identifierPrefix;if(I$2){var ro=sg,no=rg;ro=(no&~(1<<32-oc(no)-1)).toString(32)+ro,to=":"+to+"R"+ro,ro=Uh++,0<\/script>",eo=eo.removeChild(eo.firstChild)):typeof no.is=="string"?eo=so.createElement(ro,{is:no.is}):(eo=so.createElement(ro),ro==="select"&&(so=eo,no.multiple?so.multiple=!0:no.size&&(so.size=no.size))):eo=so.createElementNS(eo,ro),eo[Of]=to,eo[Pf]=no,Aj(eo,to,!1,!1),to.stateNode=eo;e:{switch(so=vb(ro,no),ro){case"dialog":D$4("cancel",eo),D$4("close",eo),oo=no;break;case"iframe":case"object":case"embed":D$4("load",eo),oo=no;break;case"video":case"audio":for(oo=0;ooHj&&(to.flags|=128,no=!0,Ej(io,!1),to.lanes=4194304)}else{if(!no)if(eo=Mh(so),eo!==null){if(to.flags|=128,no=!0,ro=eo.updateQueue,ro!==null&&(to.updateQueue=ro,to.flags|=4),Ej(io,!0),io.tail===null&&io.tailMode==="hidden"&&!so.alternate&&!I$2)return S$5(to),null}else 2*B$3()-io.renderingStartTime>Hj&&ro!==1073741824&&(to.flags|=128,no=!0,Ej(io,!1),to.lanes=4194304);io.isBackwards?(so.sibling=to.child,to.child=so):(ro=io.last,ro!==null?ro.sibling=so:to.child=so,io.last=so)}return io.tail!==null?(to=io.tail,io.rendering=to,io.tail=to.sibling,io.renderingStartTime=B$3(),to.sibling=null,ro=M$4.current,G$1(M$4,no?ro&1|2:ro&1),to):(S$5(to),null);case 22:case 23:return Ij(),no=to.memoizedState!==null,eo!==null&&eo.memoizedState!==null!==no&&(to.flags|=8192),no&&to.mode&1?gj&1073741824&&(S$5(to),to.subtreeFlags&6&&(to.flags|=8192)):S$5(to),null;case 24:return null;case 25:return null}throw Error(p$9(156,to.tag))}function Jj(eo,to){switch(wg(to),to.tag){case 1:return Zf(to.type)&&$f(),eo=to.flags,eo&65536?(to.flags=eo&-65537|128,to):null;case 3:return Jh(),E$5(Wf),E$5(H$3),Oh(),eo=to.flags,eo&65536&&!(eo&128)?(to.flags=eo&-65537|128,to):null;case 5:return Lh(to),null;case 13:if(E$5(M$4),eo=to.memoizedState,eo!==null&&eo.dehydrated!==null){if(to.alternate===null)throw Error(p$9(340));Ig()}return eo=to.flags,eo&65536?(to.flags=eo&-65537|128,to):null;case 19:return E$5(M$4),null;case 4:return Jh(),null;case 10:return Rg(to.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Kj=!1,U$1=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,V$1=null;function Mj(eo,to){var ro=eo.ref;if(ro!==null)if(typeof ro=="function")try{ro(null)}catch(no){W$1(eo,to,no)}else ro.current=null}function Nj(eo,to,ro){try{ro()}catch(no){W$1(eo,to,no)}}var Oj=!1;function Pj(eo,to){if(Cf=dd,eo=Me$2(),Ne$1(eo)){if("selectionStart"in eo)var ro={start:eo.selectionStart,end:eo.selectionEnd};else e:{ro=(ro=eo.ownerDocument)&&ro.defaultView||window;var no=ro.getSelection&&ro.getSelection();if(no&&no.rangeCount!==0){ro=no.anchorNode;var oo=no.anchorOffset,io=no.focusNode;no=no.focusOffset;try{ro.nodeType,io.nodeType}catch{ro=null;break e}var so=0,ao=-1,lo=-1,uo=0,co=0,fo=eo,ho=null;t:for(;;){for(var po;fo!==ro||oo!==0&&fo.nodeType!==3||(ao=so+oo),fo!==io||no!==0&&fo.nodeType!==3||(lo=so+no),fo.nodeType===3&&(so+=fo.nodeValue.length),(po=fo.firstChild)!==null;)ho=fo,fo=po;for(;;){if(fo===eo)break t;if(ho===ro&&++uo===oo&&(ao=so),ho===io&&++co===no&&(lo=so),(po=fo.nextSibling)!==null)break;fo=ho,ho=fo.parentNode}fo=po}ro=ao===-1||lo===-1?null:{start:ao,end:lo}}else ro=null}ro=ro||{start:0,end:0}}else ro=null;for(Df={focusedElem:eo,selectionRange:ro},dd=!1,V$1=to;V$1!==null;)if(to=V$1,eo=to.child,(to.subtreeFlags&1028)!==0&&eo!==null)eo.return=to,V$1=eo;else for(;V$1!==null;){to=V$1;try{var go=to.alternate;if(to.flags&1024)switch(to.tag){case 0:case 11:case 15:break;case 1:if(go!==null){var vo=go.memoizedProps,bo=go.memoizedState,xo=to.stateNode,_o=xo.getSnapshotBeforeUpdate(to.elementType===to.type?vo:Lg(to.type,vo),bo);xo.__reactInternalSnapshotBeforeUpdate=_o}break;case 3:var Eo=to.stateNode.containerInfo;Eo.nodeType===1?Eo.textContent="":Eo.nodeType===9&&Eo.documentElement&&Eo.removeChild(Eo.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$9(163))}}catch(So){W$1(to,to.return,So)}if(eo=to.sibling,eo!==null){eo.return=to.return,V$1=eo;break}V$1=to.return}return go=Oj,Oj=!1,go}function Qj(eo,to,ro){var no=to.updateQueue;if(no=no!==null?no.lastEffect:null,no!==null){var oo=no=no.next;do{if((oo.tag&eo)===eo){var io=oo.destroy;oo.destroy=void 0,io!==void 0&&Nj(to,ro,io)}oo=oo.next}while(oo!==no)}}function Rj(eo,to){if(to=to.updateQueue,to=to!==null?to.lastEffect:null,to!==null){var ro=to=to.next;do{if((ro.tag&eo)===eo){var no=ro.create;ro.destroy=no()}ro=ro.next}while(ro!==to)}}function Sj(eo){var to=eo.ref;if(to!==null){var ro=eo.stateNode;switch(eo.tag){case 5:eo=ro;break;default:eo=ro}typeof to=="function"?to(eo):to.current=eo}}function Tj(eo){var to=eo.alternate;to!==null&&(eo.alternate=null,Tj(to)),eo.child=null,eo.deletions=null,eo.sibling=null,eo.tag===5&&(to=eo.stateNode,to!==null&&(delete to[Of],delete to[Pf],delete to[of$1],delete to[Qf],delete to[Rf])),eo.stateNode=null,eo.return=null,eo.dependencies=null,eo.memoizedProps=null,eo.memoizedState=null,eo.pendingProps=null,eo.stateNode=null,eo.updateQueue=null}function Uj(eo){return eo.tag===5||eo.tag===3||eo.tag===4}function Vj(eo){e:for(;;){for(;eo.sibling===null;){if(eo.return===null||Uj(eo.return))return null;eo=eo.return}for(eo.sibling.return=eo.return,eo=eo.sibling;eo.tag!==5&&eo.tag!==6&&eo.tag!==18;){if(eo.flags&2||eo.child===null||eo.tag===4)continue e;eo.child.return=eo,eo=eo.child}if(!(eo.flags&2))return eo.stateNode}}function Wj(eo,to,ro){var no=eo.tag;if(no===5||no===6)eo=eo.stateNode,to?ro.nodeType===8?ro.parentNode.insertBefore(eo,to):ro.insertBefore(eo,to):(ro.nodeType===8?(to=ro.parentNode,to.insertBefore(eo,ro)):(to=ro,to.appendChild(eo)),ro=ro._reactRootContainer,ro!=null||to.onclick!==null||(to.onclick=Bf));else if(no!==4&&(eo=eo.child,eo!==null))for(Wj(eo,to,ro),eo=eo.sibling;eo!==null;)Wj(eo,to,ro),eo=eo.sibling}function Xj(eo,to,ro){var no=eo.tag;if(no===5||no===6)eo=eo.stateNode,to?ro.insertBefore(eo,to):ro.appendChild(eo);else if(no!==4&&(eo=eo.child,eo!==null))for(Xj(eo,to,ro),eo=eo.sibling;eo!==null;)Xj(eo,to,ro),eo=eo.sibling}var X$1=null,Yj=!1;function Zj(eo,to,ro){for(ro=ro.child;ro!==null;)ak(eo,to,ro),ro=ro.sibling}function ak(eo,to,ro){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,ro)}catch{}switch(ro.tag){case 5:U$1||Mj(ro,to);case 6:var no=X$1,oo=Yj;X$1=null,Zj(eo,to,ro),X$1=no,Yj=oo,X$1!==null&&(Yj?(eo=X$1,ro=ro.stateNode,eo.nodeType===8?eo.parentNode.removeChild(ro):eo.removeChild(ro)):X$1.removeChild(ro.stateNode));break;case 18:X$1!==null&&(Yj?(eo=X$1,ro=ro.stateNode,eo.nodeType===8?Kf(eo.parentNode,ro):eo.nodeType===1&&Kf(eo,ro),bd(eo)):Kf(X$1,ro.stateNode));break;case 4:no=X$1,oo=Yj,X$1=ro.stateNode.containerInfo,Yj=!0,Zj(eo,to,ro),X$1=no,Yj=oo;break;case 0:case 11:case 14:case 15:if(!U$1&&(no=ro.updateQueue,no!==null&&(no=no.lastEffect,no!==null))){oo=no=no.next;do{var io=oo,so=io.destroy;io=io.tag,so!==void 0&&(io&2||io&4)&&Nj(ro,to,so),oo=oo.next}while(oo!==no)}Zj(eo,to,ro);break;case 1:if(!U$1&&(Mj(ro,to),no=ro.stateNode,typeof no.componentWillUnmount=="function"))try{no.props=ro.memoizedProps,no.state=ro.memoizedState,no.componentWillUnmount()}catch(ao){W$1(ro,to,ao)}Zj(eo,to,ro);break;case 21:Zj(eo,to,ro);break;case 22:ro.mode&1?(U$1=(no=U$1)||ro.memoizedState!==null,Zj(eo,to,ro),U$1=no):Zj(eo,to,ro);break;default:Zj(eo,to,ro)}}function bk$1(eo){var to=eo.updateQueue;if(to!==null){eo.updateQueue=null;var ro=eo.stateNode;ro===null&&(ro=eo.stateNode=new Lj),to.forEach(function(no){var oo=ck.bind(null,eo,no);ro.has(no)||(ro.add(no),no.then(oo,oo))})}}function dk(eo,to){var ro=to.deletions;if(ro!==null)for(var no=0;nooo&&(oo=so),no&=~io}if(no=oo,no=B$3()-no,no=(120>no?120:480>no?480:1080>no?1080:1920>no?1920:3e3>no?3e3:4320>no?4320:1960*mk(no/1960))-no,10eo?16:eo,xk===null)var no=!1;else{if(eo=xk,xk=null,yk=0,K$3&6)throw Error(p$9(331));var oo=K$3;for(K$3|=4,V$1=eo.current;V$1!==null;){var io=V$1,so=io.child;if(V$1.flags&16){var ao=io.deletions;if(ao!==null){for(var lo=0;loB$3()-gk?Lk(eo,0):sk|=ro),Ek(eo,to)}function Zk(eo,to){to===0&&(eo.mode&1?(to=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):to=1);var ro=L$3();eo=Zg(eo,to),eo!==null&&(Ac(eo,to,ro),Ek(eo,ro))}function vj(eo){var to=eo.memoizedState,ro=0;to!==null&&(ro=to.retryLane),Zk(eo,ro)}function ck(eo,to){var ro=0;switch(eo.tag){case 13:var no=eo.stateNode,oo=eo.memoizedState;oo!==null&&(ro=oo.retryLane);break;case 19:no=eo.stateNode;break;default:throw Error(p$9(314))}no!==null&&no.delete(to),Zk(eo,ro)}var Wk;Wk=function(eo,to,ro){if(eo!==null)if(eo.memoizedProps!==to.pendingProps||Wf.current)Ug=!0;else{if(!(eo.lanes&ro)&&!(to.flags&128))return Ug=!1,zj(eo,to,ro);Ug=!!(eo.flags&131072)}else Ug=!1,I$2&&to.flags&1048576&&ug(to,ng,to.index);switch(to.lanes=0,to.tag){case 2:var no=to.type;jj(eo,to),eo=to.pendingProps;var oo=Yf(to,H$3.current);Tg(to,ro),oo=Xh(null,to,no,eo,oo,ro);var io=bi$1();return to.flags|=1,typeof oo=="object"&&oo!==null&&typeof oo.render=="function"&&oo.$$typeof===void 0?(to.tag=1,to.memoizedState=null,to.updateQueue=null,Zf(no)?(io=!0,cg(to)):io=!1,to.memoizedState=oo.state!==null&&oo.state!==void 0?oo.state:null,ah(to),oo.updater=nh,to.stateNode=oo,oo._reactInternals=to,rh(to,no,eo,ro),to=kj(null,to,no,!0,io,ro)):(to.tag=0,I$2&&io&&vg(to),Yi$1(null,to,oo,ro),to=to.child),to;case 16:no=to.elementType;e:{switch(jj(eo,to),eo=to.pendingProps,oo=no._init,no=oo(no._payload),to.type=no,oo=to.tag=$k(no),eo=Lg(no,eo),oo){case 0:to=dj(null,to,no,eo,ro);break e;case 1:to=ij(null,to,no,eo,ro);break e;case 11:to=Zi$1(null,to,no,eo,ro);break e;case 14:to=aj(null,to,no,Lg(no.type,eo),ro);break e}throw Error(p$9(306,no,""))}return to;case 0:return no=to.type,oo=to.pendingProps,oo=to.elementType===no?oo:Lg(no,oo),dj(eo,to,no,oo,ro);case 1:return no=to.type,oo=to.pendingProps,oo=to.elementType===no?oo:Lg(no,oo),ij(eo,to,no,oo,ro);case 3:e:{if(lj(to),eo===null)throw Error(p$9(387));no=to.pendingProps,io=to.memoizedState,oo=io.element,bh(eo,to),gh(to,no,null,ro);var so=to.memoizedState;if(no=so.element,io.isDehydrated)if(io={element:no,isDehydrated:!1,cache:so.cache,pendingSuspenseBoundaries:so.pendingSuspenseBoundaries,transitions:so.transitions},to.updateQueue.baseState=io,to.memoizedState=io,to.flags&256){oo=Ki$1(Error(p$9(423)),to),to=mj(eo,to,no,ro,oo);break e}else if(no!==oo){oo=Ki$1(Error(p$9(424)),to),to=mj(eo,to,no,ro,oo);break e}else for(yg=Lf(to.stateNode.containerInfo.firstChild),xg=to,I$2=!0,zg=null,ro=Ch(to,null,no,ro),to.child=ro;ro;)ro.flags=ro.flags&-3|4096,ro=ro.sibling;else{if(Ig(),no===oo){to=$i$1(eo,to,ro);break e}Yi$1(eo,to,no,ro)}to=to.child}return to;case 5:return Kh(to),eo===null&&Eg(to),no=to.type,oo=to.pendingProps,io=eo!==null?eo.memoizedProps:null,so=oo.children,Ef(no,oo)?so=null:io!==null&&Ef(no,io)&&(to.flags|=32),hj(eo,to),Yi$1(eo,to,so,ro),to.child;case 6:return eo===null&&Eg(to),null;case 13:return pj(eo,to,ro);case 4:return Ih(to,to.stateNode.containerInfo),no=to.pendingProps,eo===null?to.child=Bh(to,null,no,ro):Yi$1(eo,to,no,ro),to.child;case 11:return no=to.type,oo=to.pendingProps,oo=to.elementType===no?oo:Lg(no,oo),Zi$1(eo,to,no,oo,ro);case 7:return Yi$1(eo,to,to.pendingProps,ro),to.child;case 8:return Yi$1(eo,to,to.pendingProps.children,ro),to.child;case 12:return Yi$1(eo,to,to.pendingProps.children,ro),to.child;case 10:e:{if(no=to.type._context,oo=to.pendingProps,io=to.memoizedProps,so=oo.value,G$1(Mg,no._currentValue),no._currentValue=so,io!==null)if(He$2(io.value,so)){if(io.children===oo.children&&!Wf.current){to=$i$1(eo,to,ro);break e}}else for(io=to.child,io!==null&&(io.return=to);io!==null;){var ao=io.dependencies;if(ao!==null){so=io.child;for(var lo=ao.firstContext;lo!==null;){if(lo.context===no){if(io.tag===1){lo=ch(-1,ro&-ro),lo.tag=2;var uo=io.updateQueue;if(uo!==null){uo=uo.shared;var co=uo.pending;co===null?lo.next=lo:(lo.next=co.next,co.next=lo),uo.pending=lo}}io.lanes|=ro,lo=io.alternate,lo!==null&&(lo.lanes|=ro),Sg(io.return,ro,to),ao.lanes|=ro;break}lo=lo.next}}else if(io.tag===10)so=io.type===to.type?null:io.child;else if(io.tag===18){if(so=io.return,so===null)throw Error(p$9(341));so.lanes|=ro,ao=so.alternate,ao!==null&&(ao.lanes|=ro),Sg(so,ro,to),so=io.sibling}else so=io.child;if(so!==null)so.return=io;else for(so=io;so!==null;){if(so===to){so=null;break}if(io=so.sibling,io!==null){io.return=so.return,so=io;break}so=so.return}io=so}Yi$1(eo,to,oo.children,ro),to=to.child}return to;case 9:return oo=to.type,no=to.pendingProps.children,Tg(to,ro),oo=Vg(oo),no=no(oo),to.flags|=1,Yi$1(eo,to,no,ro),to.child;case 14:return no=to.type,oo=Lg(no,to.pendingProps),oo=Lg(no.type,oo),aj(eo,to,no,oo,ro);case 15:return cj(eo,to,to.type,to.pendingProps,ro);case 17:return no=to.type,oo=to.pendingProps,oo=to.elementType===no?oo:Lg(no,oo),jj(eo,to),to.tag=1,Zf(no)?(eo=!0,cg(to)):eo=!1,Tg(to,ro),ph(to,no,oo),rh(to,no,oo,ro),kj(null,to,no,!0,eo,ro);case 19:return yj(eo,to,ro);case 22:return ej(eo,to,ro)}throw Error(p$9(156,to.tag))};function Gk(eo,to){return ac(eo,to)}function al(eo,to,ro,no){this.tag=eo,this.key=ro,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=to,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=no,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(eo,to,ro,no){return new al(eo,to,ro,no)}function bj(eo){return eo=eo.prototype,!(!eo||!eo.isReactComponent)}function $k(eo){if(typeof eo=="function")return bj(eo)?1:0;if(eo!=null){if(eo=eo.$$typeof,eo===Da)return 11;if(eo===Ga)return 14}return 2}function wh(eo,to){var ro=eo.alternate;return ro===null?(ro=Bg(eo.tag,to,eo.key,eo.mode),ro.elementType=eo.elementType,ro.type=eo.type,ro.stateNode=eo.stateNode,ro.alternate=eo,eo.alternate=ro):(ro.pendingProps=to,ro.type=eo.type,ro.flags=0,ro.subtreeFlags=0,ro.deletions=null),ro.flags=eo.flags&14680064,ro.childLanes=eo.childLanes,ro.lanes=eo.lanes,ro.child=eo.child,ro.memoizedProps=eo.memoizedProps,ro.memoizedState=eo.memoizedState,ro.updateQueue=eo.updateQueue,to=eo.dependencies,ro.dependencies=to===null?null:{lanes:to.lanes,firstContext:to.firstContext},ro.sibling=eo.sibling,ro.index=eo.index,ro.ref=eo.ref,ro}function yh(eo,to,ro,no,oo,io){var so=2;if(no=eo,typeof eo=="function")bj(eo)&&(so=1);else if(typeof eo=="string")so=5;else e:switch(eo){case ya:return Ah(ro.children,oo,io,to);case za:so=8,oo|=8;break;case Aa:return eo=Bg(12,ro,to,oo|2),eo.elementType=Aa,eo.lanes=io,eo;case Ea:return eo=Bg(13,ro,to,oo),eo.elementType=Ea,eo.lanes=io,eo;case Fa:return eo=Bg(19,ro,to,oo),eo.elementType=Fa,eo.lanes=io,eo;case Ia:return qj(ro,oo,io,to);default:if(typeof eo=="object"&&eo!==null)switch(eo.$$typeof){case Ba:so=10;break e;case Ca:so=9;break e;case Da:so=11;break e;case Ga:so=14;break e;case Ha:so=16,no=null;break e}throw Error(p$9(130,eo==null?eo:typeof eo,""))}return to=Bg(so,ro,to,oo),to.elementType=eo,to.type=no,to.lanes=io,to}function Ah(eo,to,ro,no){return eo=Bg(7,eo,no,to),eo.lanes=ro,eo}function qj(eo,to,ro,no){return eo=Bg(22,eo,no,to),eo.elementType=Ia,eo.lanes=ro,eo.stateNode={isHidden:!1},eo}function xh(eo,to,ro){return eo=Bg(6,eo,null,to),eo.lanes=ro,eo}function zh(eo,to,ro){return to=Bg(4,eo.children!==null?eo.children:[],eo.key,to),to.lanes=ro,to.stateNode={containerInfo:eo.containerInfo,pendingChildren:null,implementation:eo.implementation},to}function bl(eo,to,ro,no,oo){this.tag=to,this.containerInfo=eo,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=no,this.onRecoverableError=oo,this.mutableSourceEagerHydrationData=null}function cl(eo,to,ro,no,oo,io,so,ao,lo){return eo=new bl(eo,to,ro,ao,lo),to===1?(to=1,io===!0&&(to|=8)):to=0,io=Bg(3,null,null,to),eo.current=io,io.stateNode=eo,io.memoizedState={element:no,isDehydrated:ro,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(io),eo}function dl(eo,to,ro){var no=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(eo){console.error(eo)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs(reactDomExports);var m$9=reactDomExports;client.createRoot=m$9.createRoot,client.hydrateRoot=m$9.hydrateRoot;const positionMap=["Top","Right","Bottom","Left"];function generateStyles(eo,to,...ro){const[no,oo=no,io=no,so=oo]=ro,ao=[no,oo,io,so],lo={};for(let uo=0;uotypeof eo=="string"&&/(\d+(\w+|%))/.test(eo),isUnitless=eo=>typeof eo=="number"&&!Number.isNaN(eo),isInitial=eo=>eo==="initial",isAuto=eo=>eo==="auto",isNone=eo=>eo==="none",widthReservedKeys=["content","fit-content","max-content","min-content"],isWidth=eo=>widthReservedKeys.some(to=>eo===to)||isUnit(eo);function flex(...eo){const to=eo.length===1,ro=eo.length===2,no=eo.length===3;if(to){const[oo]=eo;if(isInitial(oo))return{flexGrow:0,flexShrink:1,flexBasis:"auto"};if(isAuto(oo))return{flexGrow:1,flexShrink:1,flexBasis:"auto"};if(isNone(oo))return{flexGrow:0,flexShrink:0,flexBasis:"auto"};if(isUnitless(oo))return{flexGrow:oo,flexShrink:1,flexBasis:0};if(isWidth(oo))return{flexGrow:1,flexShrink:1,flexBasis:oo}}if(ro){const[oo,io]=eo;if(isUnitless(io))return{flexGrow:oo,flexShrink:io,flexBasis:0};if(isWidth(io))return{flexGrow:oo,flexShrink:1,flexBasis:io}}if(no){const[oo,io,so]=eo;if(isUnitless(oo)&&isUnitless(io)&&(isAuto(so)||isWidth(so)))return{flexGrow:oo,flexShrink:io,flexBasis:so}}return{}}function gap(eo,to=eo){return{columnGap:eo,rowGap:to}}const cssVarRegEx=/var\(.*\)/gi;function isValidGridAreaInput(eo){return eo===void 0||typeof eo=="number"||typeof eo=="string"&&!cssVarRegEx.test(eo)}const customIdentRegEx=/^[a-zA-Z0-9\-_\\#;]+$/,nonCustomIdentRegEx=/^-moz-initial$|^auto$|^initial$|^inherit$|^revert$|^unset$|^span \d+$|^\d.*/;function isCustomIdent(eo){return eo!==void 0&&typeof eo=="string"&&customIdentRegEx.test(eo)&&!nonCustomIdentRegEx.test(eo)}function gridArea(...eo){if(eo.some(io=>!isValidGridAreaInput(io)))return{};const to=eo[0]!==void 0?eo[0]:"auto",ro=eo[1]!==void 0?eo[1]:isCustomIdent(to)?to:"auto",no=eo[2]!==void 0?eo[2]:isCustomIdent(to)?to:"auto",oo=eo[3]!==void 0?eo[3]:isCustomIdent(ro)?ro:"auto";return{gridRowStart:to,gridColumnStart:ro,gridRowEnd:no,gridColumnEnd:oo}}function margin(...eo){return generateStyles("margin","",...eo)}function marginBlock(eo,to=eo){return{marginBlockStart:eo,marginBlockEnd:to}}function marginInline(eo,to=eo){return{marginInlineStart:eo,marginInlineEnd:to}}function padding(...eo){return generateStyles("padding","",...eo)}function paddingBlock(eo,to=eo){return{paddingBlockStart:eo,paddingBlockEnd:to}}function paddingInline(eo,to=eo){return{paddingInlineStart:eo,paddingInlineEnd:to}}function overflow(eo,to=eo){return{overflowX:eo,overflowY:to}}function inset(...eo){const[to,ro=to,no=to,oo=ro]=eo;return{top:to,right:ro,bottom:no,left:oo}}function outline(eo,to,ro){return{outlineWidth:eo,...to&&{outlineStyle:to},...ro&&{outlineColor:ro}}}function transition$1(...eo){return isTransitionGlobalInputs(eo)?{transitionDelay:eo[0],transitionDuration:eo[0],transitionProperty:eo[0],transitionTimingFunction:eo[0]}:normalizeTransitionInputs(eo).reduce((ro,[no,oo="0s",io="0s",so="ease"],ao)=>(ao===0?(ro.transitionProperty=no,ro.transitionDuration=oo,ro.transitionDelay=io,ro.transitionTimingFunction=so):(ro.transitionProperty+=`, ${no}`,ro.transitionDuration+=`, ${oo}`,ro.transitionDelay+=`, ${io}`,ro.transitionTimingFunction+=`, ${so}`),ro),{})}const transitionGlobalInputs=["-moz-initial","inherit","initial","revert","unset"];function isTransitionGlobalInputs(eo){return eo.length===1&&transitionGlobalInputs.includes(eo[0])}function normalizeTransitionInputs(eo){return eo.length===1&&Array.isArray(eo[0])?eo[0]:[eo]}function textDecoration(eo,...to){if(to.length===0)return isTextDecorationStyleInput(eo)?{textDecorationStyle:eo}:{textDecorationLine:eo};const[ro,no,oo]=to;return{textDecorationLine:eo,...ro&&{textDecorationStyle:ro},...no&&{textDecorationColor:no},...oo&&{textDecorationThickness:oo}}}const textDecorationStyleInputs=["dashed","dotted","double","solid","wavy"];function isTextDecorationStyleInput(eo){return textDecorationStyleInputs.includes(eo)}const __GLOBAL__=typeof window>"u"?global:window,__NAMESPACE_PREFIX__="@griffel/";function getGlobalVar(eo,to){return __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__+eo)]||(__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__+eo)]=to),__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__+eo)]}const DEFINITION_LOOKUP_TABLE=getGlobalVar("DEFINITION_LOOKUP_TABLE",{}),DATA_BUCKET_ATTR="data-make-styles-bucket",HASH_PREFIX="f",SEQUENCE_HASH_LENGTH=7,SEQUENCE_PREFIX="___",SEQUENCE_SIZE=SEQUENCE_PREFIX.length+SEQUENCE_HASH_LENGTH,LOOKUP_DEFINITIONS_INDEX=0,LOOKUP_DIR_INDEX=1,UNSUPPORTED_CSS_PROPERTIES={all:1,animation:1,background:1,backgroundPosition:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockStart:1,borderBottom:1,borderColor:1,borderImage:1,borderInline:1,borderInlineEnd:1,borderInlineStart:1,borderLeft:1,borderRadius:1,borderRight:1,borderStyle:1,borderTop:1,borderWidth:1,caret:1,columns:1,columnRule:1,containIntrinsicSize:1,container:1,flex:1,flexFlow:1,font:1,gap:1,grid:1,gridArea:1,gridColumn:1,gridRow:1,gridTemplate:1,inset:1,insetBlock:1,insetInline:1,lineClamp:1,listStyle:1,margin:1,marginBlock:1,marginInline:1,mask:1,maskBorder:1,motion:1,offset:1,outline:1,overflow:1,overscrollBehavior:1,padding:1,paddingBlock:1,paddingInline:1,placeItems:1,placeContent:1,placeSelf:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginInline:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingInline:1,scrollSnapMargin:1,scrollTimeline:1,textDecoration:1,textEmphasis:1,transition:1};function murmur2(eo){for(var to=0,ro,no=0,oo=eo.length;oo>=4;++no,oo-=4)ro=eo.charCodeAt(no)&255|(eo.charCodeAt(++no)&255)<<8|(eo.charCodeAt(++no)&255)<<16|(eo.charCodeAt(++no)&255)<<24,ro=(ro&65535)*1540483477+((ro>>>16)*59797<<16),ro^=ro>>>24,to=(ro&65535)*1540483477+((ro>>>16)*59797<<16)^(to&65535)*1540483477+((to>>>16)*59797<<16);switch(oo){case 3:to^=(eo.charCodeAt(no+2)&255)<<16;case 2:to^=(eo.charCodeAt(no+1)&255)<<8;case 1:to^=eo.charCodeAt(no)&255,to=(to&65535)*1540483477+((to>>>16)*59797<<16)}return to^=to>>>13,to=(to&65535)*1540483477+((to>>>16)*59797<<16),((to^to>>>15)>>>0).toString(36)}function padEndHash(eo){const to=eo.length;if(to===SEQUENCE_HASH_LENGTH)return eo;for(let ro=to;ro0&&(to+=co.slice(0,fo)),ro+=ho,no[uo]=ho}}}if(ro==="")return to.slice(0,-1);const oo=mergeClassesCachedResults[ro];if(oo!==void 0)return to+oo;const io=[];for(let uo=0;uo{const to=Object.keys(mergeClassesCachedResults).find(ro=>mergeClassesCachedResults[ro].startsWith(eo));return to?to.split(SEQUENCE_PREFIX).filter(ro=>ro.length).map(ro=>SEQUENCE_PREFIX+ro):[]},addCSSRule:eo=>{cssRules.add(eo)},addSequenceDetails:(eo,to)=>{Object.entries(eo).forEach(([ro,no])=>{sequenceDetails[no.substring(0,SEQUENCE_SIZE)]={slotName:ro,sourceURL:to}})},getCSSRules:()=>Array.from(cssRules),getSequenceDetails:eo=>sequenceDetails[eo]};function getDirectionalClassName(eo,to){return Array.isArray(eo)?to==="rtl"?eo[1]:eo[0]:eo}function getDebugClassNames(eo,to,ro,no){const oo=eo[0],io=eo[1];return Object.entries(oo).map(([so,ao])=>{const lo=getDirectionalClassName(ao,io);let uo;if(ro&&to){const co=ro.find(({className:fo})=>fo===lo);!co&&to[0][so]?uo=getDirectionalClassName(to[0][so],to[1]):co&&to[0][so]?uo=(no?no.filter(({debugClassNames:ho})=>ho.filter(({className:po})=>po===lo).length>0).length>0:!1)?co.className:co.overriddenBy:(!co&&!to[0][so]||co&&!to[0][so])&&(uo=void 0)}return{className:lo,overriddenBy:uo}})}function getDebugTree(eo,to){const ro=DEFINITION_LOOKUP_TABLE[eo];if(ro===void 0)return;const no=to?DEFINITION_LOOKUP_TABLE[to.sequenceHash]:void 0,oo=getDebugClassNames(ro,no,to==null?void 0:to.debugClassNames,to==null?void 0:to.children),io={sequenceHash:eo,direction:ro[1],children:[],debugClassNames:oo};return debugData.getChildrenSequences(io.sequenceHash).reverse().forEach(ao=>{const lo=getDebugTree(ao,io);lo&&io.children.push(lo)}),io.children.length||(io.rules={},io.debugClassNames.forEach(({className:ao})=>{const lo=debugData.getSequenceDetails(eo);lo&&(io.slot=lo.slotName,io.sourceURL=lo.sourceURL);const uo=debugData.getCSSRules().find(co=>co.includes(ao));io.rules[ao]=uo})),io}function injectDevTools(eo){const to=eo.defaultView;if(!to||to.__GRIFFEL_DEVTOOLS__)return;const ro={getInfo:no=>{const oo=Array.from(no.classList).find(io=>io.startsWith(SEQUENCE_PREFIX));if(oo!==void 0)return getDebugTree(oo)}};Object.defineProperty(to,"__GRIFFEL_DEVTOOLS__",{configurable:!1,enumerable:!1,get(){return ro}})}function normalizeCSSBucketEntry(eo){return Array.isArray(eo)?eo:[eo]}function createIsomorphicStyleSheet(eo,to,ro){const no=[];if(ro[DATA_BUCKET_ATTR]=to,eo)for(const io in ro)eo.setAttribute(io,ro[io]);function oo(io){return eo!=null&&eo.sheet?eo.sheet.insertRule(io,eo.sheet.cssRules.length):no.push(io)}return{elementAttributes:ro,insertRule:oo,element:eo,bucketName:to,cssRules(){return eo!=null&&eo.sheet?Array.from(eo.sheet.cssRules).map(io=>io.cssText):no}}}const styleBucketOrdering=["r","d","l","v","w","f","i","h","a","s","k","t","m","c"],styleBucketOrderingMap=styleBucketOrdering.reduce((eo,to,ro)=>(eo[to]=ro,eo),{});function getStyleSheetForBucket(eo,to,ro,no,oo={}){const io=eo==="m",so=io?eo+oo.m:eo;if(!no.stylesheets[so]){const ao=to&&to.createElement("style"),lo=createIsomorphicStyleSheet(ao,eo,{...no.styleElementAttributes,...io&&{media:oo.m}});no.stylesheets[so]=lo,to&&ao&&to.head.insertBefore(ao,findInsertionPoint(to,ro,eo,no,oo))}return no.stylesheets[so]}function findInsertionPoint(eo,to,ro,no,oo){const io=styleBucketOrderingMap[ro];let so=co=>io-styleBucketOrderingMap[co.getAttribute(DATA_BUCKET_ATTR)],ao=eo.head.querySelectorAll(`[${DATA_BUCKET_ATTR}]`);if(ro==="m"&&oo){const co=eo.head.querySelectorAll(`[${DATA_BUCKET_ATTR}="${ro}"]`);co.length&&(ao=co,so=fo=>no.compareMediaQueries(oo.m,fo.media))}const lo=ao.length;let uo=lo-1;for(;uo>=0;){const co=ao.item(uo);if(so(co)>0)return co.nextSibling;uo--}return lo>0?ao.item(0):to?to.nextSibling:null}function safeInsertRule(eo,to){try{eo.insertRule(to)}catch{}}let lastIndex=0;const defaultCompareMediaQueries=(eo,to)=>eoto?1:0;function createDOMRenderer(eo=typeof document>"u"?void 0:document,to={}){const{unstable_filterCSSRule:ro,insertionPoint:no,styleElementAttributes:oo,compareMediaQueries:io=defaultCompareMediaQueries}=to,so={insertionCache:{},stylesheets:{},styleElementAttributes:Object.freeze(oo),compareMediaQueries:io,id:`d${lastIndex++}`,insertCSSRules(ao){for(const lo in ao){const uo=ao[lo];for(let co=0,fo=uo.length;co{const eo={};return function(ro,no){eo[ro.id]===void 0&&(ro.insertCSSRules(no),eo[ro.id]=!0)}};function arrayToObject(eo){return eo.reduce(function(to,ro){var no=ro[0],oo=ro[1];return to[no]=oo,to[oo]=no,to},{})}function isBoolean(eo){return typeof eo=="boolean"}function isFunction$7(eo){return typeof eo=="function"}function isNumber$2(eo){return typeof eo=="number"}function isNullOrUndefined$1(eo){return eo===null||typeof eo>"u"}function isObject$i(eo){return eo&&typeof eo=="object"}function isString$2(eo){return typeof eo=="string"}function includes(eo,to){return eo.indexOf(to)!==-1}function flipSign(eo){return parseFloat(eo)===0?eo:eo[0]==="-"?eo.slice(1):"-"+eo}function flipTransformSign(eo,to,ro,no){return to+flipSign(ro)+no}function calculateNewBackgroundPosition(eo){var to=eo.indexOf(".");if(to===-1)eo=100-parseFloat(eo)+"%";else{var ro=eo.length-to-2;eo=100-parseFloat(eo),eo=eo.toFixed(ro)+"%"}return eo}function getValuesAsList(eo){return eo.replace(/ +/g," ").split(" ").map(function(to){return to.trim()}).filter(Boolean).reduce(function(to,ro){var no=to.list,oo=to.state,io=(ro.match(/\(/g)||[]).length,so=(ro.match(/\)/g)||[]).length;return oo.parensDepth>0?no[no.length-1]=no[no.length-1]+" "+ro:no.push(ro),oo.parensDepth+=io-so,{list:no,state:oo}},{list:[],state:{parensDepth:0}}).list}function handleQuartetValues(eo){var to=getValuesAsList(eo);if(to.length<=3||to.length>4)return eo;var ro=to[0],no=to[1],oo=to[2],io=to[3];return[ro,io,oo,no].join(" ")}function canConvertValue(eo){return!isBoolean(eo)&&!isNullOrUndefined$1(eo)}function splitShadow(eo){for(var to=[],ro=0,no=0,oo=!1;no0?charat$1(characters$1,--position$3):0,column$1--,character$1===10&&(column$1=1,line$2--),character$1}function next$1(){return character$1=position$32||token$2(character$1)>3?"":" "}function tokenizer(eo){for(;next$1();)switch(token$2(character$1)){case 0:append$1(identifier$1(position$3-1),eo);break;case 2:append$1(delimit$1(character$1),eo);break;default:append$1(from$2(character$1),eo)}return eo}function escaping$1(eo,to){for(;--to&&next$1()&&!(character$1<48||character$1>102||character$1>57&&character$1<65||character$1>70&&character$1<97););return slice$1(eo,caret$1()+(to<6&&peek$1()==32&&next$1()==32))}function delimiter$1(eo){for(;next$1();)switch(character$1){case eo:return position$3;case 34:case 39:eo!==34&&eo!==39&&delimiter$1(character$1);break;case 40:eo===41&&delimiter$1(eo);break;case 92:next$1();break}return position$3}function commenter$1(eo,to){for(;next$1()&&eo+character$1!==57;)if(eo+character$1===84&&peek$1()===47)break;return"/*"+slice$1(to,position$3-1)+"*"+from$2(eo===47?eo:next$1())}function identifier$1(eo){for(;!token$2(peek$1());)next$1();return slice$1(eo,position$3)}function compile$1(eo){return dealloc$1(parse$n("",null,null,null,[""],eo=alloc$1(eo),0,[0],eo))}function parse$n(eo,to,ro,no,oo,io,so,ao,lo){for(var uo=0,co=0,fo=so,ho=0,po=0,go=0,vo=1,bo=1,xo=1,_o=0,Eo="",So=oo,To=io,wo=no,Co=Eo;bo;)switch(go=_o,_o=next$1()){case 40:if(go!=108&&charat$1(Co,fo-1)==58){indexof$1(Co+=replace$2(delimit$1(_o),"&","&\f"),"&\f")!=-1&&(xo=-1);break}case 34:case 39:case 91:Co+=delimit$1(_o);break;case 9:case 10:case 13:case 32:Co+=whitespace$1(go);break;case 92:Co+=escaping$1(caret$1()-1,7);continue;case 47:switch(peek$1()){case 42:case 47:append$1(comment$2(commenter$1(next$1(),caret$1()),to,ro,lo),lo);break;default:Co+="/"}break;case 123*vo:ao[uo++]=strlen$1(Co)*xo;case 125*vo:case 59:case 0:switch(_o){case 0:case 125:bo=0;case 59+co:xo==-1&&(Co=replace$2(Co,/\f/g,"")),po>0&&strlen$1(Co)-fo&&append$1(po>32?declaration$1(Co+";",no,ro,fo-1,lo):declaration$1(replace$2(Co," ","")+";",no,ro,fo-2,lo),lo);break;case 59:Co+=";";default:if(append$1(wo=ruleset$1(Co,to,ro,uo,co,oo,ao,Eo,So=[],To=[],fo,io),io),_o===123)if(co===0)parse$n(Co,to,wo,wo,So,io,fo,ao,To);else switch(ho===99&&charat$1(Co,3)===110?100:ho){case 100:case 108:case 109:case 115:parse$n(eo,wo,wo,no&&append$1(ruleset$1(eo,wo,wo,0,0,oo,ao,Eo,oo,So=[],fo,To),To),oo,To,fo,ao,no?So:To);break;default:parse$n(Co,wo,wo,wo,[""],To,0,ao,To)}}uo=co=po=0,vo=xo=1,Eo=Co="",fo=so;break;case 58:fo=1+strlen$1(Co),po=go;default:if(vo<1){if(_o==123)--vo;else if(_o==125&&vo++==0&&prev$1()==125)continue}switch(Co+=from$2(_o),_o*vo){case 38:xo=co>0?1:(Co+="\f",-1);break;case 44:ao[uo++]=(strlen$1(Co)-1)*xo,xo=1;break;case 64:peek$1()===45&&(Co+=delimit$1(next$1())),ho=peek$1(),co=fo=strlen$1(Eo=Co+=identifier$1(caret$1())),_o++;break;case 45:go===45&&strlen$1(Co)==2&&(vo=0)}}return io}function ruleset$1(eo,to,ro,no,oo,io,so,ao,lo,uo,co,fo){for(var ho=oo-1,po=oo===0?io:[""],go=sizeof$1(po),vo=0,bo=0,xo=0;vo0?po[_o]+" "+Eo:replace$2(Eo,/&\f/g,po[_o])))&&(lo[xo++]=So);return node$1(eo,to,ro,oo===0?RULESET$1:ao,lo,uo,co,fo)}function comment$2(eo,to,ro,no){return node$1(eo,to,ro,COMMENT$1,from$2(char$1()),substr$1(eo,2,-2),0,no)}function declaration$1(eo,to,ro,no,oo){return node$1(eo,to,ro,DECLARATION$1,substr$1(eo,0,no),substr$1(eo,no+1,-1),no,oo)}function serialize$1(eo,to){for(var ro="",no=0;no{switch(eo.type){case RULESET$1:if(typeof eo.props=="string")return;eo.props=eo.props.map(to=>to.indexOf(":global(")===-1?to:tokenize(to).reduce((ro,no,oo,io)=>{if(no==="")return ro;if(no===":"&&io[oo+1]==="global"){const so=io[oo+2].slice(1,-1)+" ";return ro.unshift(so),io[oo+1]="",io[oo+2]="",ro}return ro.push(no),ro},[]).join(""))}};function prefix$3(eo,to,ro){switch(hash$3(eo,to)){case 5103:return WEBKIT$1+"print-"+eo+eo;case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:return WEBKIT$1+eo+eo;case 4215:if(charat$1(eo,9)===102||charat$1(eo,to+1)===116)return WEBKIT$1+eo+eo;break;case 4789:return MOZ$1+eo+eo;case 5349:case 4246:case 6968:return WEBKIT$1+eo+MOZ$1+eo+eo;case 6187:if(!match$m(eo,/grab/))return replace$2(replace$2(replace$2(eo,/(zoom-|grab)/,WEBKIT$1+"$1"),/(image-set)/,WEBKIT$1+"$1"),eo,"")+eo;case 5495:case 3959:return replace$2(eo,/(image-set\([^]*)/,WEBKIT$1+"$1$`$1");case 4095:case 3583:case 4068:case 2532:return replace$2(eo,/(.+)-inline(.+)/,WEBKIT$1+"$1$2")+eo;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen$1(eo)-1-to>6)switch(charat$1(eo,to+1)){case 102:if(charat$1(eo,to+3)===108)return replace$2(eo,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT$1+"$2-$3$1"+MOZ$1+(charat$1(eo,to+3)==108?"$3":"$2-$3"))+eo;case 115:return~indexof$1(eo,"stretch")?prefix$3(replace$2(eo,"stretch","fill-available"),to)+eo:eo}break}return eo}function prefixerPlugin(eo,to,ro,no){if(eo.length>-1&&!eo.return)switch(eo.type){case DECLARATION$1:eo.return=prefix$3(eo.value,eo.length);return;case RULESET$1:if(eo.length)return combine$1(eo.props,function(oo){switch(match$m(oo,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize$1([copy$3(eo,{props:[replace$2(oo,/:(read-\w+)/,":"+MOZ$1+"$1")]})],no);case"::placeholder":return serialize$1([copy$3(eo,{props:[replace$2(oo,/:(plac\w+)/,":"+WEBKIT$1+"input-$1")]}),copy$3(eo,{props:[replace$2(oo,/:(plac\w+)/,":"+MOZ$1+"$1")]})],no)}return""})}}function isAtRuleElement(eo){switch(eo.type){case"@container":case MEDIA:case SUPPORTS:case LAYER$1:return!0}return!1}const sortClassesInAtRulesPlugin=eo=>{isAtRuleElement(eo)&&Array.isArray(eo.children)&&eo.children.sort((to,ro)=>to.props[0]>ro.props[0]?1:-1)};function noop$7(){}function compileCSSRules(eo,to){const ro=[];return serialize$1(compile$1(eo),middleware$1([globalPlugin,to?sortClassesInAtRulesPlugin:noop$7,prefixerPlugin,stringify$2,rulesheet$1(no=>ro.push(no))])),ro}const PSEUDO_SELECTOR_REGEX=/,( *[^ &])/g;function normalizePseudoSelector(eo){return"&"+normalizeNestedProperty(eo.replace(PSEUDO_SELECTOR_REGEX,",&$1"))}function createCSSRule(eo,to,ro){let no=to;return ro.length>0&&(no=ro.reduceRight((oo,io)=>`${normalizePseudoSelector(io)} { ${oo} }`,to)),`${eo}{${no}}`}function compileAtomicCSSRule(eo){const{className:to,media:ro,layer:no,selectors:oo,support:io,property:so,rtlClassName:ao,rtlProperty:lo,rtlValue:uo,value:co,container:fo}=eo,ho=`.${to}`,po=Array.isArray(co)?`${co.map(vo=>`${hyphenateProperty(so)}: ${vo}`).join(";")};`:`${hyphenateProperty(so)}: ${co};`;let go=createCSSRule(ho,po,oo);if(lo&&ao){const vo=`.${ao}`,bo=Array.isArray(uo)?`${uo.map(xo=>`${hyphenateProperty(lo)}: ${xo}`).join(";")};`:`${hyphenateProperty(lo)}: ${uo};`;go+=createCSSRule(vo,bo,oo)}return ro&&(go=`@media ${ro} { ${go} }`),no&&(go=`@layer ${no} { ${go} }`),io&&(go=`@supports ${io} { ${go} }`),fo&&(go=`@container ${fo} { ${go} }`),compileCSSRules(go,!0)}function cssifyObject(eo){let to="";for(const ro in eo){const no=eo[ro];typeof no!="string"&&typeof no!="number"||(to+=hyphenateProperty(ro)+":"+no+";")}return to}function compileKeyframeRule(eo){let to="";for(const ro in eo)to+=`${ro}{${cssifyObject(eo[ro])}}`;return to}function compileKeyframesCSS(eo,to){const ro=`@keyframes ${eo} {${to}}`,no=[];return serialize$1(compile$1(ro),middleware$1([stringify$2,prefixerPlugin,rulesheet$1(oo=>no.push(oo))])),no}function generateCombinedQuery(eo,to){return eo.length===0?to:`${eo} and ${to}`}function isMediaQuerySelector(eo){return eo.substr(0,6)==="@media"}function isLayerSelector(eo){return eo.substr(0,6)==="@layer"}const regex=/^(:|\[|>|&)/;function isNestedSelector(eo){return regex.test(eo)}function isSupportQuerySelector(eo){return eo.substr(0,9)==="@supports"}function isContainerQuerySelector(eo){return eo.substring(0,10)==="@container"}function isObject$h(eo){return eo!=null&&typeof eo=="object"&&Array.isArray(eo)===!1}const pseudosMap={"us-w":"w","us-v":"i",nk:"l",si:"v",cu:"f",ve:"h",ti:"a"};function getStyleBucketName(eo,to,ro,no,oo){if(ro)return"m";if(to||no)return"t";if(oo)return"c";if(eo.length>0){const io=eo[0].trim();if(io.charCodeAt(0)===58)return pseudosMap[io.slice(4,8)]||pseudosMap[io.slice(3,5)]||"d"}return"d"}function hashClassName({container:eo,media:to,layer:ro,property:no,selector:oo,support:io,value:so}){const ao=murmur2(oo+eo+to+ro+io+no+so.trim());return HASH_PREFIX+ao}function hashPropertyKey(eo,to,ro,no,oo){const io=eo+to+ro+no+oo,so=murmur2(io),ao=so.charCodeAt(0);return ao>=48&&ao<=57?String.fromCharCode(ao+17)+so.slice(1):so}function trimSelector(eo){return eo.replace(/>\s+/g,">")}function warnAboutUnresolvedRule(eo,to){const ro=JSON.stringify(to,null,2);" ".repeat(2)+""," ".repeat(4)+""," ".repeat(6)+`"${eo}": ${ro.split(` +`).map((no,oo)=>" ".repeat(oo===0?0:6)+no).join(` +`)}`," ".repeat(4)+""," ".repeat(2)+"",eo.indexOf("&")}function warnAboutUnsupportedProperties(eo,to){}function pushToClassesMap(eo,to,ro,no){eo[to]=no?[ro,no]:ro}function createBucketEntry(eo,to){return to?[eo,to]:eo}function pushToCSSRules(eo,to,ro,no,oo){var io;let so;to==="m"&&oo&&(so={m:oo}),(io=eo[to])!==null&&io!==void 0||(eo[to]=[]),ro&&eo[to].push(createBucketEntry(ro,so)),no&&eo[to].push(createBucketEntry(no,so))}function resolveStyleRules(eo,to=[],ro="",no="",oo="",io="",so={},ao={},lo){for(const uo in eo){if(UNSUPPORTED_CSS_PROPERTIES.hasOwnProperty(uo)){eo[uo];continue}const co=eo[uo];if(co!=null){if(typeof co=="string"||typeof co=="number"){const fo=trimSelector(to.join("")),ho=hashPropertyKey(fo,io,ro,oo,uo),po=hashClassName({container:io,media:ro,layer:no,value:co.toString(),support:oo,selector:fo,property:uo}),go=lo&&{key:uo,value:lo}||convertProperty(uo,co),vo=go.key!==uo||go.value!==co,bo=vo?hashClassName({container:io,value:go.value.toString(),property:go.key,selector:fo,media:ro,layer:no,support:oo}):void 0,xo=vo?{rtlClassName:bo,rtlProperty:go.key,rtlValue:go.value}:void 0,_o=getStyleBucketName(to,no,ro,oo,io),[Eo,So]=compileAtomicCSSRule({className:po,media:ro,layer:no,selectors:to,property:uo,support:oo,container:io,value:co,...xo});pushToClassesMap(so,ho,po,bo),pushToCSSRules(ao,_o,Eo,So,ro)}else if(uo==="animationName"){const fo=Array.isArray(co)?co:[co],ho=[],po=[];for(const go of fo){const vo=compileKeyframeRule(go),bo=compileKeyframeRule(convert(go)),xo=HASH_PREFIX+murmur2(vo);let _o;const Eo=compileKeyframesCSS(xo,vo);let So=[];vo===bo?_o=xo:(_o=HASH_PREFIX+murmur2(bo),So=compileKeyframesCSS(_o,bo));for(let To=0;To(wo??"").toString()).join(";"),support:oo,selector:fo,property:uo}),go=co.map(wo=>convertProperty(uo,wo));if(!!go.some(wo=>wo.key!==go[0].key))continue;const bo=go[0].key!==uo||go.some((wo,Co)=>wo.value!==co[Co]),xo=bo?hashClassName({container:io,value:go.map(wo=>{var Co;return((Co=wo==null?void 0:wo.value)!==null&&Co!==void 0?Co:"").toString()}).join(";"),property:go[0].key,selector:fo,layer:no,media:ro,support:oo}):void 0,_o=bo?{rtlClassName:xo,rtlProperty:go[0].key,rtlValue:go.map(wo=>wo.value)}:void 0,Eo=getStyleBucketName(to,no,ro,oo,io),[So,To]=compileAtomicCSSRule({className:po,media:ro,layer:no,selectors:to,property:uo,support:oo,container:io,value:co,..._o});pushToClassesMap(so,ho,po,xo),pushToCSSRules(ao,Eo,So,To,ro)}else if(isObject$h(co))if(isNestedSelector(uo))resolveStyleRules(co,to.concat(normalizeNestedProperty(uo)),ro,no,oo,io,so,ao);else if(isMediaQuerySelector(uo)){const fo=generateCombinedQuery(ro,uo.slice(6).trim());resolveStyleRules(co,to,fo,no,oo,io,so,ao)}else if(isLayerSelector(uo)){const fo=(no?`${no}.`:"")+uo.slice(6).trim();resolveStyleRules(co,to,ro,fo,oo,io,so,ao)}else if(isSupportQuerySelector(uo)){const fo=generateCombinedQuery(oo,uo.slice(9).trim());resolveStyleRules(co,to,ro,no,fo,io,so,ao)}else if(isContainerQuerySelector(uo)){const fo=uo.slice(10).trim();resolveStyleRules(co,to,ro,no,oo,fo,so,ao)}else warnAboutUnresolvedRule(uo,co)}}return[so,ao]}function resolveStyleRulesForSlots(eo){const to={},ro={};for(const no in eo){const oo=eo[no],[io,so]=resolveStyleRules(oo);to[no]=io,Object.keys(so).forEach(ao=>{ro[ao]=(ro[ao]||[]).concat(so[ao])})}return[to,ro]}function makeStyles$1(eo,to=insertionFactory$1){const ro=to();let no=null,oo=null,io=null,so=null;function ao(lo){const{dir:uo,renderer:co}=lo;no===null&&([no,oo]=resolveStyleRulesForSlots(eo));const fo=uo==="ltr";return fo?io===null&&(io=reduceToClassNameForSlots(no,uo)):so===null&&(so=reduceToClassNameForSlots(no,uo)),ro(co,oo),fo?io:so}return ao}function __styles$1(eo,to,ro=insertionFactory$1){const no=ro();let oo=null,io=null;function so(ao){const{dir:lo,renderer:uo}=ao,co=lo==="ltr";return co?oo===null&&(oo=reduceToClassNameForSlots(eo,lo)):io===null&&(io=reduceToClassNameForSlots(eo,lo)),no(uo,to),co?oo:io}return so}function __resetStyles$1(eo,to,ro,no=insertionFactory$1){const oo=no();function io(so){const{dir:ao,renderer:lo}=so,uo=ao==="ltr"?eo:to||eo;return oo(lo,Array.isArray(ro)?{r:ro}:ro),uo}return io}const shorthands={border,borderLeft,borderBottom,borderRight,borderTop,borderColor,borderStyle,borderRadius:borderRadius$1,borderWidth:borderWidth$1,flex,gap,gridArea,margin,marginBlock,marginInline,padding,paddingBlock,paddingInline,overflow,inset,outline,transition:transition$1,textDecoration};function canUseDOM$4(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}const useInsertionEffect$2=React$1.useInsertionEffect?React$1.useInsertionEffect:void 0,insertionFactory=()=>{const eo={};return function(ro,no){if(useInsertionEffect$2&&canUseDOM$4()){useInsertionEffect$2(()=>{ro.insertCSSRules(no)},[ro,no]);return}eo[ro.id]===void 0&&(ro.insertCSSRules(no),eo[ro.id]=!0)}},RendererContext=reactExports.createContext(createDOMRenderer());function useRenderer(){return reactExports.useContext(RendererContext)}const TextDirectionContext=reactExports.createContext("ltr"),TextDirectionProvider=({children:eo,dir:to})=>reactExports.createElement(TextDirectionContext.Provider,{value:to},eo);function useTextDirection(){return reactExports.useContext(TextDirectionContext)}function makeStyles(eo){const to=makeStyles$1(eo,insertionFactory);return function(){const no=useTextDirection(),oo=useRenderer();return to({dir:no,renderer:oo})}}function __styles(eo,to){const ro=__styles$1(eo,to,insertionFactory);return function(){const oo=useTextDirection(),io=useRenderer();return ro({dir:oo,renderer:io})}}function __resetStyles(eo,to,ro){const no=__resetStyles$1(eo,to,ro,insertionFactory);return function(){const io=useTextDirection(),so=useRenderer();return no({dir:io,renderer:so})}}function createCSSRuleFromTheme(eo,to){if(to){const ro=Object.keys(to).reduce((no,oo)=>`${no}--${oo}: ${to[oo]}; `,"");return`${eo} { ${ro} }`}return`${eo} {}`}const SLOT_RENDER_FUNCTION_SYMBOL=Symbol("fui.slotRenderFunction"),SLOT_ELEMENT_TYPE_SYMBOL=Symbol("fui.slotElementType");function always(eo,to){const{defaultProps:ro,elementType:no}=to,oo=resolveShorthand(eo),io={...ro,...oo,[SLOT_ELEMENT_TYPE_SYMBOL]:no};return oo&&typeof oo.children=="function"&&(io[SLOT_RENDER_FUNCTION_SYMBOL]=oo.children,io.children=ro==null?void 0:ro.children),io}function optional(eo,to){if(!(eo===null||eo===void 0&&!to.renderByDefault))return always(eo,to)}function resolveShorthand(eo){return typeof eo=="string"||typeof eo=="number"||Array.isArray(eo)||reactExports.isValidElement(eo)?{children:eo}:eo}function isSlot(eo){return!!(eo!=null&&eo.hasOwnProperty(SLOT_ELEMENT_TYPE_SYMBOL))}function isResolvedShorthand(eo){return eo!==null&&typeof eo=="object"&&!Array.isArray(eo)&&!reactExports.isValidElement(eo)}const toObjectMap$1=(...eo)=>{const to={};for(const ro of eo){const no=Array.isArray(ro)?ro:Object.keys(ro);for(const oo of no)to[oo]=1}return to},baseElementEvents$1=toObjectMap$1(["onAuxClick","onAnimationEnd","onAnimationStart","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),baseElementProperties$1=toObjectMap$1(["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","ref","role","style","tabIndex","title","translate","spellCheck","name"]),microdataProperties=toObjectMap$1(["itemID","itemProp","itemRef","itemScope","itemType"]),htmlElementProperties$1=toObjectMap$1(baseElementProperties$1,baseElementEvents$1,microdataProperties),labelProperties=toObjectMap$1(htmlElementProperties$1,["form"]),audioProperties$1=toObjectMap$1(htmlElementProperties$1,["height","loop","muted","preload","src","width"]),videoProperties=toObjectMap$1(audioProperties$1,["poster"]),olProperties=toObjectMap$1(htmlElementProperties$1,["start"]),liProperties=toObjectMap$1(htmlElementProperties$1,["value"]),anchorProperties$1=toObjectMap$1(htmlElementProperties$1,["download","href","hrefLang","media","rel","target","type"]),timeProperties=toObjectMap$1(htmlElementProperties$1,["dateTime"]),buttonProperties$1=toObjectMap$1(htmlElementProperties$1,["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"]),inputProperties=toObjectMap$1(buttonProperties$1,["accept","alt","autoCapitalize","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),textAreaProperties=toObjectMap$1(buttonProperties$1,["autoCapitalize","cols","dirname","form","maxLength","placeholder","readOnly","required","rows","wrap"]),selectProperties=toObjectMap$1(buttonProperties$1,["form","multiple","required"]),optionProperties=toObjectMap$1(htmlElementProperties$1,["selected","value"]),tableProperties=toObjectMap$1(htmlElementProperties$1,["cellPadding","cellSpacing"]),trProperties=htmlElementProperties$1,thProperties=toObjectMap$1(htmlElementProperties$1,["colSpan","rowSpan","scope"]),tdProperties=toObjectMap$1(htmlElementProperties$1,["colSpan","headers","rowSpan","scope"]),colGroupProperties=toObjectMap$1(htmlElementProperties$1,["span"]),colProperties=toObjectMap$1(htmlElementProperties$1,["span"]),fieldsetProperties=toObjectMap$1(htmlElementProperties$1,["disabled","form"]),formProperties=toObjectMap$1(htmlElementProperties$1,["acceptCharset","action","encType","encType","method","noValidate","target"]),iframeProperties=toObjectMap$1(htmlElementProperties$1,["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),imgProperties$1=toObjectMap$1(htmlElementProperties$1,["alt","crossOrigin","height","src","srcSet","useMap","width"]),dialogProperties=toObjectMap$1(htmlElementProperties$1,["open","onCancel","onClose"]);function getNativeProps$1(eo,to,ro){const no=Array.isArray(to),oo={},io=Object.keys(eo);for(const so of io)(!no&&to[so]||no&&to.indexOf(so)>=0||so.indexOf("data-")===0||so.indexOf("aria-")===0)&&(!ro||(ro==null?void 0:ro.indexOf(so))===-1)&&(oo[so]=eo[so]);return oo}const nativeElementMap={label:labelProperties,audio:audioProperties$1,video:videoProperties,ol:olProperties,li:liProperties,a:anchorProperties$1,button:buttonProperties$1,input:inputProperties,textarea:textAreaProperties,select:selectProperties,option:optionProperties,table:tableProperties,tr:trProperties,th:thProperties,td:tdProperties,colGroup:colGroupProperties,col:colProperties,fieldset:fieldsetProperties,form:formProperties,iframe:iframeProperties,img:imgProperties$1,time:timeProperties,dialog:dialogProperties};function getNativeElementProps(eo,to,ro){const no=eo&&nativeElementMap[eo]||htmlElementProperties$1;return no.as=1,getNativeProps$1(to,no,ro)}const getPartitionedNativeProps=({primarySlotTagName:eo,props:to,excludedPropNames:ro})=>({root:{style:to.style,className:to.className},primary:getNativeElementProps(eo,to,[...ro||[],"style","className"])}),getIntrinsicElementProps=(eo,to,ro)=>{var no;return getNativeElementProps((no=to.as)!==null&&no!==void 0?no:eo,to,ro)};function canUseDOM$3(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}function useBrowserTimer(eo,to){const ro=reactExports.useRef(void 0),no=reactExports.useCallback((io,so)=>(ro.current!==void 0&&to(ro.current),ro.current=eo(io,so),ro.current),[to,eo]),oo=reactExports.useCallback(()=>{ro.current!==void 0&&(to(ro.current),ro.current=void 0)},[to]);return reactExports.useEffect(()=>oo,[oo]),[no,oo]}const setAnimationFrameNoop=eo=>(eo(0),0),cancelAnimationFrameNoop=eo=>eo;function useAnimationFrame(){const eo=canUseDOM$3();return useBrowserTimer(eo?requestAnimationFrame:setAnimationFrameNoop,eo?cancelAnimationFrame:cancelAnimationFrameNoop)}function isFactoryDispatch(eo){return typeof eo=="function"}const useControllableState=eo=>{const[to,ro]=reactExports.useState(()=>eo.defaultState===void 0?eo.initialState:isInitializer(eo.defaultState)?eo.defaultState():eo.defaultState),no=reactExports.useRef(eo.state);reactExports.useEffect(()=>{no.current=eo.state},[eo.state]);const oo=reactExports.useCallback(io=>{isFactoryDispatch(io)&&io(no.current)},[]);return useIsControlled(eo.state)?[eo.state,oo]:[to,ro]};function isInitializer(eo){return typeof eo=="function"}const useIsControlled=eo=>{const[to]=reactExports.useState(()=>eo!==void 0);return to},defaultSSRContextValue={current:0},SSRContext=reactExports.createContext(void 0);function useSSRContext(){var eo;return(eo=reactExports.useContext(SSRContext))!==null&&eo!==void 0?eo:defaultSSRContextValue}function useIsSSR(){const eo=useSSRContext()!==defaultSSRContextValue,[to,ro]=reactExports.useState(eo);return canUseDOM$3()&&eo&&reactExports.useLayoutEffect(()=>{ro(!1)},[]),to}const useIsomorphicLayoutEffect$1=canUseDOM$3()?reactExports.useLayoutEffect:reactExports.useEffect,useEventCallback$3=eo=>{const to=reactExports.useRef(()=>{throw new Error("Cannot call an event handler while rendering")});return useIsomorphicLayoutEffect$1(()=>{to.current=eo},[eo]),reactExports.useCallback((...ro)=>{const no=to.current;return no(...ro)},[to])};function useFirstMount(){const eo=reactExports.useRef(!0);return eo.current?(eo.current=!1,!0):eo.current}const IdPrefixContext=reactExports.createContext(void 0);IdPrefixContext.Provider;function useIdPrefix(){return reactExports.useContext(IdPrefixContext)||""}function useId$1(eo="fui-",to){const ro=useSSRContext(),no=useIdPrefix(),oo=React$1.useId;if(oo){const io=oo(),so=reactExports.useMemo(()=>io.replace(/:/g,""),[io]);return to||`${no}${eo}${so}`}return reactExports.useMemo(()=>to||`${no}${eo}${++ro.current}`,[no,eo,to,ro])}function useMergedRefs$1(...eo){const to=reactExports.useCallback(ro=>{to.current=ro;for(const no of eo)typeof no=="function"?no(ro):no&&(no.current=ro)},[...eo]);return to}const ThemeContext$2=reactExports.createContext(void 0),ThemeProvider=ThemeContext$2.Provider,ThemeClassNameContext=reactExports.createContext(void 0),themeClassNameContextDefaultVaue="",ThemeClassNameProvider=ThemeClassNameContext.Provider;function useThemeClassName(){var eo;return(eo=reactExports.useContext(ThemeClassNameContext))!==null&&eo!==void 0?eo:themeClassNameContextDefaultVaue}const TooltipVisibilityContext=reactExports.createContext(void 0),tooltipVisibilityContextDefaultValue={},TooltipVisibilityProvider=TooltipVisibilityContext.Provider;function useTooltipVisibility(){var eo;return(eo=reactExports.useContext(TooltipVisibilityContext))!==null&&eo!==void 0?eo:tooltipVisibilityContextDefaultValue}const ProviderContext=reactExports.createContext(void 0),providerContextDefaultValue={targetDocument:typeof document=="object"?document:void 0,dir:"ltr"},Provider$1=ProviderContext.Provider;function useFluent(){var eo;return(eo=reactExports.useContext(ProviderContext))!==null&&eo!==void 0?eo:providerContextDefaultValue}const OverridesContext=reactExports.createContext(void 0),OverridesProvider=OverridesContext.Provider;function useOverrides(){var eo;return(eo=reactExports.useContext(OverridesContext))!==null&&eo!==void 0?eo:{}}const CustomStyleHooksContext=reactExports.createContext(void 0),noop$6=()=>{},CustomStyleHooksProvider=CustomStyleHooksContext.Provider,useCustomStyleHook=eo=>{var to,ro;return(ro=(to=reactExports.useContext(CustomStyleHooksContext))===null||to===void 0?void 0:to[eo])!==null&&ro!==void 0?ro:noop$6},BackgroundAppearanceContext=reactExports.createContext(void 0);BackgroundAppearanceContext.Provider;function useBackgroundAppearance(){return reactExports.useContext(BackgroundAppearanceContext)}const PortalMountNodeContext=reactExports.createContext(void 0);PortalMountNodeContext.Provider;function usePortalMountNode$1(){return reactExports.useContext(PortalMountNodeContext)}const AnnounceContext=reactExports.createContext(void 0);AnnounceContext.Provider;function useAnnounce(){var eo;return(eo=reactExports.useContext(AnnounceContext))!==null&&eo!==void 0?eo:{announce:()=>{}}}const DEFAULT_CONTAINS=(eo,to)=>!!(eo!=null&&eo.contains(to)),useOnClickOutside=eo=>{const{targetDocument:to}=useFluent(),ro=to==null?void 0:to.defaultView,{refs:no,callback:oo,element:io,disabled:so,disabledFocusOnIframe:ao,contains:lo=DEFAULT_CONTAINS}=eo,uo=reactExports.useRef(void 0);useIFrameFocus({element:io,disabled:ao||so,callback:oo,refs:no,contains:lo});const co=reactExports.useRef(!1),fo=useEventCallback$3(po=>{if(co.current){co.current=!1;return}const go=po.composedPath()[0];no.every(bo=>!lo(bo.current||null,go))&&!so&&oo(po)}),ho=useEventCallback$3(po=>{co.current=no.some(go=>lo(go.current||null,po.target))});reactExports.useEffect(()=>{if(so)return;let po=getWindowEvent(ro);const go=vo=>{if(vo===po){po=void 0;return}fo(vo)};return io==null||io.addEventListener("click",go,!0),io==null||io.addEventListener("touchstart",go,!0),io==null||io.addEventListener("contextmenu",go,!0),io==null||io.addEventListener("mousedown",ho,!0),uo.current=ro==null?void 0:ro.setTimeout(()=>{po=void 0},1),()=>{io==null||io.removeEventListener("click",go,!0),io==null||io.removeEventListener("touchstart",go,!0),io==null||io.removeEventListener("contextmenu",go,!0),io==null||io.removeEventListener("mousedown",ho,!0),ro==null||ro.clearTimeout(uo.current),po=void 0}},[fo,io,so,ho,ro])},getWindowEvent=eo=>{if(eo){var to,ro;if(typeof eo.window=="object"&&eo.window===eo)return eo.event;var no;return(no=(ro=eo.ownerDocument)===null||ro===void 0||(to=ro.defaultView)===null||to===void 0?void 0:to.event)!==null&&no!==void 0?no:void 0}},FUI_FRAME_EVENT="fuiframefocus",useIFrameFocus=eo=>{const{disabled:to,element:ro,callback:no,contains:oo=DEFAULT_CONTAINS,pollDuration:io=1e3,refs:so}=eo,ao=reactExports.useRef(),lo=useEventCallback$3(uo=>{so.every(fo=>!oo(fo.current||null,uo.target))&&!to&&no(uo)});reactExports.useEffect(()=>{if(!to)return ro==null||ro.addEventListener(FUI_FRAME_EVENT,lo,!0),()=>{ro==null||ro.removeEventListener(FUI_FRAME_EVENT,lo,!0)}},[ro,to,lo]),reactExports.useEffect(()=>{var uo;if(!to)return ao.current=ro==null||(uo=ro.defaultView)===null||uo===void 0?void 0:uo.setInterval(()=>{const co=ro==null?void 0:ro.activeElement;if((co==null?void 0:co.tagName)==="IFRAME"||(co==null?void 0:co.tagName)==="WEBVIEW"){const fo=new CustomEvent(FUI_FRAME_EVENT,{bubbles:!0});co.dispatchEvent(fo)}},io),()=>{var co;ro==null||(co=ro.defaultView)===null||co===void 0||co.clearTimeout(ao.current)}},[ro,to,io])},useOnScrollOutside=eo=>{const{refs:to,callback:ro,element:no,disabled:oo,contains:io}=eo,so=useEventCallback$3(ao=>{const lo=io||((fo,ho)=>!!(fo!=null&&fo.contains(ho))),uo=ao.composedPath()[0];to.every(fo=>!lo(fo.current||null,uo))&&!oo&&ro(ao)});reactExports.useEffect(()=>{if(!oo)return no==null||no.addEventListener("wheel",so),no==null||no.addEventListener("touchmove",so),()=>{no==null||no.removeEventListener("wheel",so),no==null||no.removeEventListener("touchmove",so)}},[so,no,oo])};function useTimeout(){return useBrowserTimer(setTimeout,clearTimeout)}function mergeCallbacks(eo,to){return(...ro)=>{eo==null||eo(...ro),to==null||to(...ro)}}function isHTMLElement$6(eo,to){var ro;const no=eo;var oo;return!!(!(no==null||(ro=no.ownerDocument)===null||ro===void 0)&&ro.defaultView&&no instanceof no.ownerDocument.defaultView[(oo=to==null?void 0:to.constructorName)!==null&&oo!==void 0?oo:"HTMLElement"])}function isFluentTrigger(eo){return!!eo.type.isFluentTriggerComponent}function applyTriggerPropsToChildren(eo,to){return typeof eo=="function"?eo(to):eo?cloneTriggerTree(eo,to):eo||null}function cloneTriggerTree(eo,to){if(!reactExports.isValidElement(eo)||eo.type===reactExports.Fragment)throw new Error("A trigger element must be a single element for this component. Please ensure that you're not using React Fragments.");if(isFluentTrigger(eo)){const ro=cloneTriggerTree(eo.props.children,to);return reactExports.cloneElement(eo,void 0,ro)}else return reactExports.cloneElement(eo,to)}function getTriggerChild(eo){return reactExports.isValidElement(eo)?isFluentTrigger(eo)?getTriggerChild(eo.props.children):eo:null}function isVirtualElement$1(eo){return eo&&!!eo._virtual}function getVirtualParent$1(eo){return isVirtualElement$1(eo)&&eo._virtual.parent||null}function getParent$1(eo,to={}){if(!eo)return null;if(!to.skipVirtual){const ro=getVirtualParent$1(eo);if(ro)return ro}return(eo==null?void 0:eo.parentNode)||null}function elementContains$1(eo,to){if(!eo||!to)return!1;if(eo===to)return!0;{const ro=new WeakSet;for(;to;){const no=getParent$1(to,{skipVirtual:ro.has(to)});if(ro.add(to),no===eo)return!0;to=no}}return!1}function setVirtualParent$1(eo,to){if(!eo)return;const ro=eo;ro._virtual||(ro._virtual={}),ro._virtual.parent=to}function createCompatSlotComponent(eo,to){return{...to,[SLOT_ELEMENT_TYPE_SYMBOL]:eo}}function createJSX(eo,to){return function(no,oo,io,so,ao){return isSlot(oo)?to(createCompatSlotComponent(no,oo),null,io,so,ao):isSlot(no)?to(no,oo,io,so,ao):eo(no,oo,io,so,ao)}}function getMetadataFromSlotComponent(eo){const{as:to,[SLOT_ELEMENT_TYPE_SYMBOL]:ro,[SLOT_RENDER_FUNCTION_SYMBOL]:no,...oo}=eo,io=oo,so=typeof ro=="string"?to??ro:ro;return typeof so!="string"&&to&&(io.as=to),{elementType:so,props:io,renderFunction:no}}const Runtime=ReactRuntime,jsxSlot=(eo,to,ro)=>{const{elementType:no,renderFunction:oo,props:io}=getMetadataFromSlotComponent(eo),so={...io,...to};return oo?Runtime.jsx(reactExports.Fragment,{children:oo(no,so)},ro):Runtime.jsx(no,so,ro)},jsxsSlot=(eo,to,ro)=>{const{elementType:no,renderFunction:oo,props:io}=getMetadataFromSlotComponent(eo),so={...io,...to};return oo?Runtime.jsx(reactExports.Fragment,{children:oo(no,{...so,children:Runtime.jsxs(reactExports.Fragment,{children:so.children},void 0)})},ro):Runtime.jsxs(no,so,ro)},jsx$1=createJSX(Runtime.jsx,jsxSlot),jsxs=createJSX(Runtime.jsxs,jsxsSlot),IconDirectionContext=reactExports.createContext(void 0),IconDirectionContextDefaultValue={},IconDirectionContextProvider=IconDirectionContext.Provider,useIconContext=()=>reactExports.useContext(IconDirectionContext)?reactExports.useContext(IconDirectionContext):IconDirectionContextDefaultValue,useRootStyles$7=__styles({root:{mc9l5x:"f1w7gpdv",Bg96gwp:"fez10in",ycbfsm:"fg4l7m0"},rtl:{Bz10aip:"f13rod7r"}},{d:[".f1w7gpdv{display:inline;}",".fez10in{line-height:0;}",".f13rod7r{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1);}"],t:["@media (forced-colors: active){.fg4l7m0{forced-color-adjust:auto;}}"]}),useIconState=(eo,to)=>{const{title:ro,primaryFill:no="currentColor",...oo}=eo,io={...oo,title:void 0,fill:no},so=useRootStyles$7(),ao=useIconContext();return io.className=mergeClasses(so.root,(to==null?void 0:to.flipInRtl)&&(ao==null?void 0:ao.textDirection)==="rtl"&&so.rtl,io.className),ro&&(io["aria-label"]=ro),!io["aria-label"]&&!io["aria-labelledby"]?io["aria-hidden"]=!0:io.role="img",io},createFluentIcon=(eo,to,ro,no)=>{const oo=to==="1em"?"20":to,io=reactExports.forwardRef((so,ao)=>{const lo={...useIconState(so,{flipInRtl:no==null?void 0:no.flipInRtl}),ref:ao,width:to,height:to,viewBox:`0 0 ${oo} ${oo}`,xmlns:"http://www.w3.org/2000/svg"};return reactExports.createElement("svg",lo,...ro.map(uo=>reactExports.createElement("path",{d:uo,fill:lo.fill})))});return io.displayName=eo,io},CheckmarkFilled=createFluentIcon("CheckmarkFilled","1em",["M7.03 13.9 3.56 10a.75.75 0 0 0-1.12 1l4 4.5c.29.32.79.34 1.09.03l10.5-10.5a.75.75 0 0 0-1.06-1.06l-9.94 9.94Z"]),CheckmarkCircleFilled=createFluentIcon("CheckmarkCircleFilled","1em",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm3.36 5.65a.5.5 0 0 0-.64-.06l-.07.06L9 11.3 7.35 9.65l-.07-.06a.5.5 0 0 0-.7.7l.07.07 2 2 .07.06c.17.11.4.11.56 0l.07-.06 4-4 .07-.08a.5.5 0 0 0-.06-.63Z"]),ChevronDownRegular=createFluentIcon("ChevronDownRegular","1em",["M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z"]),ChevronRightRegular=createFluentIcon("ChevronRightRegular","1em",["M7.65 4.15c.2-.2.5-.2.7 0l5.49 5.46c.21.22.21.57 0 .78l-5.49 5.46a.5.5 0 0 1-.7-.7L12.8 10 7.65 4.85a.5.5 0 0 1 0-.7Z"]),CircleFilled=createFluentIcon("CircleFilled","1em",["M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z"]),ErrorCircleFilled=createFluentIcon("ErrorCircleFilled","1em",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10 6a.5.5 0 0 0-.5.41v4.68a.5.5 0 0 0 1 0V6.41A.5.5 0 0 0 10 6Z"]),FlowchartRegular=createFluentIcon("FlowchartRegular","1em",["M4.5 3C3.67 3 3 3.67 3 4.5v2C3 7.33 3.67 8 4.5 8H5v3.84a1 1 0 0 0-.2.16L3 13.8a1 1 0 0 0 0 1.4L4.8 17a1 1 0 0 0 1.4 0L8 15.2a1 1 0 0 0 .16-.2H12v.5c0 .83.67 1.5 1.5 1.5h2c.83 0 1.5-.67 1.5-1.5v-2c0-.83-.67-1.5-1.5-1.5h-2c-.83 0-1.5.67-1.5 1.5v.5H8.16a1 1 0 0 0-.16-.2L6.2 12a1 1 0 0 0-.2-.16V8h.5C7.33 8 8 7.33 8 6.5v-2C8 3.67 7.33 3 6.5 3h-2ZM4 4.5c0-.28.22-.5.5-.5h2c.28 0 .5.22.5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2Zm-.3 10 1.8-1.8 1.8 1.8-1.8 1.8-1.8-1.8Zm9.8-1.5h2c.28 0 .5.22.5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2c0-.28.22-.5.5-.5Z"]),InfoFilled=createFluentIcon("InfoFilled","1em",["M18 10a8 8 0 1 0-16 0 8 8 0 0 0 16 0ZM9.5 8.91a.5.5 0 0 1 1 0V13.6a.5.5 0 0 1-1 0V8.9Zm-.25-2.16a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0Z"]),WarningFilled=createFluentIcon("WarningFilled","1em",["M8.68 2.79a1.5 1.5 0 0 1 2.64 0l6.5 12A1.5 1.5 0 0 1 16.5 17h-13a1.5 1.5 0 0 1-1.32-2.21l6.5-12ZM10.5 7.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4Zm.25 6.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"]),AddCircle20Regular=createFluentIcon("AddCircle20Regular","20",["M6 10c0-.28.22-.5.5-.5h3v-3a.5.5 0 0 1 1 0v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3A.5.5 0 0 1 6 10Zm4 8a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm0-1a7 7 0 1 1 0-14 7 7 0 0 1 0 14Z"]),Alert24Regular=createFluentIcon("Alert24Regular","24",["M12 2a7.5 7.5 0 0 1 7.5 7.25v4.35l1.38 3.15a1.25 1.25 0 0 1-1.15 1.75H15a3 3 0 0 1-6 .18v-.18H4.27a1.25 1.25 0 0 1-1.14-1.75L4.5 13.6V9.5C4.5 5.35 7.85 2 12 2Zm1.5 16.5h-3a1.5 1.5 0 0 0 3 .15v-.15ZM12 3.5c-3.32 0-6 2.67-6 6v4.4L4.66 17h14.7L18 13.9V9.29a5.99 5.99 0 0 0-6-5.78Z"]),ArrowClockwise16Regular=createFluentIcon("ArrowClockwise16Regular","16",["M3 8a5 5 0 0 1 9-3H9.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-1 0v1.03A6 6 0 1 0 14 8a.5.5 0 0 0-1 0A5 5 0 0 1 3 8Z"]),ArrowClockwiseDashes20Filled=createFluentIcon("ArrowClockwiseDashes20Filled","20",["M8.44 2.15a8.03 8.03 0 0 1 3.12 0 .75.75 0 0 1-.3 1.47 6.54 6.54 0 0 0-2.53 0 .75.75 0 0 1-.29-1.47Zm4.96 1.4a.75.75 0 0 1 1.05-.2c.57.38 1.1.84 1.55 1.36V2.75a.75.75 0 0 1 1.5 0v4c0 .41-.34.75-.75.75h-4a.75.75 0 0 1 0-1.5h2.37a6.54 6.54 0 0 0-1.5-1.4.75.75 0 0 1-.21-1.05ZM6.4 4.6a.75.75 0 0 0-.84-1.24 8.04 8.04 0 0 0-2.2 2.2.75.75 0 0 0 1.24.84 6.54 6.54 0 0 1 1.8-1.8ZM3.03 7.85c.41.08.67.47.6.88a6.54 6.54 0 0 0 0 2.54.75.75 0 0 1-1.48.29 8.04 8.04 0 0 1 0-3.12c.08-.4.48-.67.88-.6ZM18 10v-.25a.75.75 0 0 0-1.5 0V10c0 .44-.04.86-.12 1.27a.75.75 0 1 0 1.47.29c.1-.5.15-1.03.15-1.56ZM3.55 13.4a.75.75 0 0 1 1.04.21c.48.71 1.09 1.32 1.8 1.8a.75.75 0 0 1-.84 1.24 8.04 8.04 0 0 1-2.2-2.2.75.75 0 0 1 .2-1.04Zm13.1 1.05a.75.75 0 0 0-1.24-.84 6.54 6.54 0 0 1-1.8 1.8.75.75 0 0 0 .84 1.24 8.04 8.04 0 0 0 2.2-2.2Zm-8.8 2.52c.08-.41.47-.67.88-.6a6.54 6.54 0 0 0 2.54 0 .75.75 0 1 1 .29 1.48 8.03 8.03 0 0 1-3.12 0 .75.75 0 0 1-.6-.88Z"]),ArrowDown20Regular=createFluentIcon("ArrowDown20Regular","20",["M16.87 10.84a.5.5 0 1 0-.74-.68l-5.63 6.17V2.5a.5.5 0 0 0-1 0v13.83l-5.63-6.17a.5.5 0 0 0-.74.68l6.31 6.91a.75.75 0 0 0 1.11 0l6.32-6.91Z"]),ArrowUp20Regular=createFluentIcon("ArrowUp20Regular","20",["M3.13 9.16a.5.5 0 1 0 .74.68L9.5 3.67V17.5a.5.5 0 1 0 1 0V3.67l5.63 6.17a.5.5 0 0 0 .74-.68l-6.32-6.92a.75.75 0 0 0-1.1 0L3.13 9.16Z"]),ArrowUpload24Regular=createFluentIcon("ArrowUpload24Regular","24",["M18.25 3.51a.75.75 0 1 0 0-1.5h-13a.75.75 0 1 0 0 1.5h13ZM11.65 22h.1c.38 0 .7-.28.74-.64l.01-.1V7.56l3.72 3.72c.27.27.68.29.98.07l.08-.07a.75.75 0 0 0 .07-.98l-.07-.08-5-5a.75.75 0 0 0-.97-.07l-.09.07-5 5a.75.75 0 0 0 .98 1.13l.08-.07L11 7.58v13.67c0 .38.28.7.65.75Z"]),Attach16Regular=createFluentIcon("Attach16Regular","16",["M2.28 7.97a.5.5 0 0 0 .86.36l4.6-4.6A2.5 2.5 0 0 1 12 5.5a2.5 2.5 0 0 1-.73 1.77l-5.3 5.3a1 1 0 0 1-1.71-.7 1 1 0 0 1 .3-.71l5.3-5.3a.5.5 0 0 0-.7-.7l-5.32 5.29a2 2 0 1 0 2.83 2.83l5.3-5.3A3.49 3.49 0 0 0 9.5 2c-.9 0-1.8.34-2.48 1.02l-4.6 4.6a.5.5 0 0 0-.14.35Z"]),BranchRequest16Regular=createFluentIcon("BranchRequest16Regular","16",["M13 10.05V5.5A2.5 2.5 0 0 0 10.5 3H8.71l1.14-1.15c.2-.19.2-.51 0-.7a.48.48 0 0 0-.7 0l-2 2c-.2.19-.2.51 0 .7l2 2c.19.2.51.2.7 0 .2-.19.2-.51 0-.7L8.71 4h1.79c.83 0 1.5.67 1.5 1.5v4.55a2.5 2.5 0 1 0 1 0ZM12.5 14a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3ZM6 3.5a2.5 2.5 0 1 0-3 2.45v4.1a2.5 2.5 0 1 0 1 0v-4.1A2.5 2.5 0 0 0 6 3.5Zm-4 0a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm3 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"]),Checkmark12Filled=createFluentIcon("Checkmark12Filled","12",["M9.76 3.2c.3.29.32.76.04 1.06l-4.25 4.5a.75.75 0 0 1-1.08.02L2.22 6.53a.75.75 0 0 1 1.06-1.06l1.7 1.7L8.7 3.24a.75.75 0 0 1 1.06-.04Z"]),CheckmarkCircle20Filled=createFluentIcon("CheckmarkCircle20Filled","20",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm3.36 5.65a.5.5 0 0 0-.64-.06l-.07.06L9 11.3 7.35 9.65l-.07-.06a.5.5 0 0 0-.7.7l.07.07 2 2 .07.06c.17.11.4.11.56 0l.07-.06 4-4 .07-.08a.5.5 0 0 0-.06-.63Z"]),ChevronDown16Filled=createFluentIcon("ChevronDown16Filled","16",["M3.2 5.74a.75.75 0 0 1 1.06-.04L8 9.23l3.74-3.53a.75.75 0 1 1 1.02 1.1l-4.25 4a.75.75 0 0 1-1.02 0l-4.25-4a.75.75 0 0 1-.04-1.06Z"]),ChevronDown16Regular=createFluentIcon("ChevronDown16Regular","16",["M3.15 5.65c.2-.2.5-.2.7 0L8 9.79l4.15-4.14a.5.5 0 0 1 .7.7l-4.5 4.5a.5.5 0 0 1-.7 0l-4.5-4.5a.5.5 0 0 1 0-.7Z"]),ChevronDown20Regular=createFluentIcon("ChevronDown20Regular","20",["M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z"]),ChevronLeft12Regular=createFluentIcon("ChevronLeft12Regular","12",["M7.35 2.15c.2.2.2.5 0 .7L4.21 6l3.14 3.15a.5.5 0 1 1-.7.7l-3.5-3.5a.5.5 0 0 1 0-.7l3.5-3.5c.2-.2.5-.2.7 0Z"]),ChevronLeft16Regular=createFluentIcon("ChevronLeft16Regular","16",["M10.35 3.15c.2.2.2.5 0 .7L6.21 8l4.14 4.15a.5.5 0 0 1-.7.7l-4.5-4.5a.5.5 0 0 1 0-.7l4.5-4.5c.2-.2.5-.2.7 0Z"]),ChevronLeft20Regular=createFluentIcon("ChevronLeft20Regular","20",["M12.35 15.85a.5.5 0 0 1-.7 0L6.16 10.4a.55.55 0 0 1 0-.78l5.49-5.46a.5.5 0 1 1 .7.7L7.2 10l5.16 5.15c.2.2.2.5 0 .7Z"]),ChevronRight12Regular=createFluentIcon("ChevronRight12Regular","12",["M4.65 2.15a.5.5 0 0 0 0 .7L7.79 6 4.65 9.15a.5.5 0 1 0 .7.7l3.5-3.5a.5.5 0 0 0 0-.7l-3.5-3.5a.5.5 0 0 0-.7 0Z"]),ChevronRight16Filled=createFluentIcon("ChevronRight16Filled","16",["M5.74 3.2a.75.75 0 0 0-.04 1.06L9.23 8 5.7 11.74a.75.75 0 1 0 1.1 1.02l4-4.25a.75.75 0 0 0 0-1.02l-4-4.25a.75.75 0 0 0-1.06-.04Z"]),ChevronRight16Regular=createFluentIcon("ChevronRight16Regular","16",["M5.65 3.15a.5.5 0 0 0 0 .7L9.79 8l-4.14 4.15a.5.5 0 0 0 .7.7l4.5-4.5a.5.5 0 0 0 0-.7l-4.5-4.5a.5.5 0 0 0-.7 0Z"]),ChevronRight20Regular=createFluentIcon("ChevronRight20Regular","20",["M7.65 4.15c.2-.2.5-.2.7 0l5.49 5.46c.21.22.21.57 0 .78l-5.49 5.46a.5.5 0 0 1-.7-.7L12.8 10 7.65 4.85a.5.5 0 0 1 0-.7Z"]),Clock20Regular=createFluentIcon("Clock20Regular","20",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm-.5 2a.5.5 0 0 1 .5.41V10h2.5a.5.5 0 0 1 .09 1H9.5a.5.5 0 0 1-.5-.41V5.5c0-.28.22-.5.5-.5Z"]),Copy20Regular=createFluentIcon("Copy20Regular","20",["M8 2a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8ZM7 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4ZM4 6a2 2 0 0 1 1-1.73V14.5A2.5 2.5 0 0 0 7.5 17h6.23A2 2 0 0 1 12 18H7.5A3.5 3.5 0 0 1 4 14.5V6Z"]),CopyArrowRight20Regular=createFluentIcon("CopyArrowRight20Regular","20",["M8 2a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h1.2c-.08-.32-.15-.66-.18-1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v5.02c.34.03.68.1 1 .19V4a2 2 0 0 0-2-2H8Zm-.5 15h2.1c.18.36.4.7.66 1H7.5A3.5 3.5 0 0 1 4 14.5V6a2 2 0 0 1 1-1.73V14.5A2.5 2.5 0 0 0 7.5 17Zm7-7a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Zm2.35 4.85a.5.5 0 0 0 .15-.35.5.5 0 0 0-.15-.35l-2-2a.5.5 0 0 0-.7.7L15.29 14H12.5a.5.5 0 0 0 0 1h2.8l-1.15 1.15a.5.5 0 0 0 .7.7l2-2Z"]),Dismiss20Regular=createFluentIcon("Dismiss20Regular","20",["m4.09 4.22.06-.07a.5.5 0 0 1 .63-.06l.07.06L10 9.29l5.15-5.14a.5.5 0 0 1 .63-.06l.07.06c.18.17.2.44.06.63l-.06.07L10.71 10l5.14 5.15c.18.17.2.44.06.63l-.06.07a.5.5 0 0 1-.63.06l-.07-.06L10 10.71l-5.15 5.14a.5.5 0 0 1-.63.06l-.07-.06a.5.5 0 0 1-.06-.63l.06-.07L9.29 10 4.15 4.85a.5.5 0 0 1-.06-.63l.06-.07-.06.07Z"]),Dismiss24Regular=createFluentIcon("Dismiss24Regular","24",["m4.4 4.55.07-.08a.75.75 0 0 1 .98-.07l.08.07L12 10.94l6.47-6.47a.75.75 0 1 1 1.06 1.06L13.06 12l6.47 6.47c.27.27.3.68.07.98l-.07.08a.75.75 0 0 1-.98.07l-.08-.07L12 13.06l-6.47 6.47a.75.75 0 0 1-1.06-1.06L10.94 12 4.47 5.53a.75.75 0 0 1-.07-.98l.07-.08-.07.08Z"]),DismissCircle20Filled=createFluentIcon("DismissCircle20Filled","20",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16ZM7.8 7.11a.5.5 0 0 0-.63.06l-.06.07a.5.5 0 0 0 .06.64L9.3 10l-2.12 2.12-.06.07a.5.5 0 0 0 .06.64l.07.06c.2.13.47.11.64-.06L10 10.7l2.12 2.12.07.06c.2.13.46.11.64-.06l.06-.07a.5.5 0 0 0-.06-.64L10.7 10l2.12-2.12.06-.07a.5.5 0 0 0-.06-.64l-.07-.06a.5.5 0 0 0-.64.06L10 9.3 7.88 7.17l-.07-.06Z"]),DismissCircle20Regular=createFluentIcon("DismissCircle20Regular","20",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14ZM7.8 7.11l.08.06L10 9.3l2.12-2.12a.5.5 0 0 1 .64-.06l.07.06c.17.18.2.44.06.64l-.06.07L10.7 10l2.12 2.12c.17.17.2.44.06.64l-.06.07a.5.5 0 0 1-.64.06l-.07-.06L10 10.7l-2.12 2.12a.5.5 0 0 1-.64.06l-.07-.06a.5.5 0 0 1-.06-.64l.06-.07L9.3 10 7.17 7.88a.5.5 0 0 1-.06-.64l.06-.07a.5.5 0 0 1 .64-.06Z"]),Document16Regular=createFluentIcon("Document16Regular","16",["M5 1a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h6a2 2 0 0 0 2-2V5.41c0-.4-.16-.78-.44-1.06L9.65 1.44A1.5 1.5 0 0 0 8.59 1H5ZM4 3a1 1 0 0 1 1-1h3v2.5C8 5.33 8.67 6 9.5 6H12v7a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V3Zm7.8 2H9.5a.5.5 0 0 1-.5-.5V2.2L11.8 5Z"]),ErrorCircle16Filled=createFluentIcon("ErrorCircle16Filled","16",["M8 2a6 6 0 1 1 0 12A6 6 0 0 1 8 2Zm0 8a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0-5.5a.5.5 0 0 0-.5.41V8.59a.5.5 0 0 0 1 0V4.91A.5.5 0 0 0 8 4.5Z"]),ErrorCircle20Filled=createFluentIcon("ErrorCircle20Filled","20",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10 6a.5.5 0 0 0-.5.41v4.68a.5.5 0 0 0 1 0V6.41A.5.5 0 0 0 10 6Z"]),Flow16Regular=createFluentIcon("Flow16Regular","16",["M12.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm-2.45 2a2.5 2.5 0 1 0 0-1H9.5a2 2 0 0 0-2 2v2a1 1 0 0 1-1 1h-.55a2.5 2.5 0 1 0 0 1h.55a2 2 0 0 0 2-2V7a1 1 0 0 1 1-1h.55ZM5 10.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"]),GanttChart20Regular=createFluentIcon("GanttChart20Regular","20",["M4.5 7a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4ZM9 9.5c0-.28.22-.5.5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5Zm3.5 1.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3Zm-8-7A2.5 2.5 0 0 0 2 6.5v7A2.5 2.5 0 0 0 4.5 16h11a2.5 2.5 0 0 0 2.5-2.5v-7A2.5 2.5 0 0 0 15.5 4h-11ZM3 6.5C3 5.67 3.67 5 4.5 5H7v1h1V5h4v3h1V5h2.5c.83 0 1.5.67 1.5 1.5v7c0 .83-.67 1.5-1.5 1.5H13v-2h-1v2H8V9H7v6H4.5A1.5 1.5 0 0 1 3 13.5v-7Z"]),HexagonThree16Regular=createFluentIcon("HexagonThree16Regular","16",["M3.47 2a1 1 0 0 1 .87-.5h2.32a1 1 0 0 1 .87.5l1.16 2a1 1 0 0 1 0 1L7.53 7a1 1 0 0 1-.87.5H4.34a1 1 0 0 1-.87-.5L2.31 5a1 1 0 0 1 0-1l1.16-2Zm3.2.5H4.33l-1.16 2 1.16 2h2.32l1.16-2-1.16-2ZM3.46 9a1 1 0 0 1 .87-.5h2.32a1 1 0 0 1 .87.5l1.16 2a1 1 0 0 1 0 1l-1.16 2a1 1 0 0 1-.87.5H4.34a1 1 0 0 1-.87-.5l-1.16-2a1 1 0 0 1 0-1l1.16-2Zm3.2.5H4.33l-1.16 2 1.16 2h2.32l1.16-2-1.16-2ZM10.33 5a1 1 0 0 0-.87.5l-1.16 2a1 1 0 0 0 0 1l1.16 2c.18.31.51.5.87.5h2.32a1 1 0 0 0 .87-.5l1.16-2a1 1 0 0 0 0-1l-1.16-2a1 1 0 0 0-.87-.5h-2.32Zm0 1h2.32l1.16 2-1.16 2h-2.32L9.18 8l1.16-2Z"]),Link16Regular=createFluentIcon("Link16Regular","16",["M9.5 4h1a3.5 3.5 0 0 1 .2 7H9.5a.5.5 0 0 1-.1-.99h.1l1-.01a2.5 2.5 0 0 0 .16-5H9.5a.5.5 0 0 1-.09-1h1.09-1Zm-4 0h1a.5.5 0 0 1 .09 1H5.5a2.5 2.5 0 0 0-.16 5H6.5a.5.5 0 0 1 .09 1H5.5a3.5 3.5 0 0 1-.2-7h1.2-1Zm0 3h5a.5.5 0 0 1 .09 1H5.5a.5.5 0 0 1-.09-1h.09Z"]),NumberCircle020Regular=createFluentIcon("NumberCircle020Regular","20",["M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-7 8a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm-2-8c0-1.07.15-1.97.49-2.6.16-.3.36-.51.6-.66.23-.15.52-.24.91-.24s.68.1.92.24c.23.15.43.37.6.67.33.62.48 1.52.48 2.59 0 1.07-.15 1.97-.49 2.6-.16.3-.36.51-.6.66-.23.15-.52.24-.91.24s-.68-.1-.92-.24a1.74 1.74 0 0 1-.6-.67A5.65 5.65 0 0 1 8 10Zm2-4.5c-.55 0-1.04.13-1.45.4-.4.25-.72.61-.94 1.03A6.6 6.6 0 0 0 7 10c0 1.14.16 2.23.6 3.07.23.42.54.78.95 1.04.41.26.9.39 1.45.39.55 0 1.04-.13 1.45-.4.4-.25.72-.61.94-1.03.45-.84.61-1.93.61-3.07a6.6 6.6 0 0 0-.6-3.07 2.74 2.74 0 0 0-.95-1.04c-.41-.26-.9-.39-1.45-.39Z"]),Person24Regular=createFluentIcon("Person24Regular","24",["M17.75 14C19 14 20 15 20 16.25v.57c0 .9-.32 1.76-.9 2.44C17.53 21.1 15.15 22 12 22c-3.15 0-5.53-.9-7.1-2.74a3.75 3.75 0 0 1-.9-2.43v-.58C4 15 5.01 14 6.25 14h11.5Zm0 1.5H6.25a.75.75 0 0 0-.75.75v.58c0 .53.2 1.05.54 1.46C7.3 19.76 9.26 20.5 12 20.5c2.74 0 4.7-.74 5.96-2.21.35-.41.54-.93.54-1.47v-.57a.75.75 0 0 0-.75-.75ZM12 2a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 1.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Z"]),QuestionCircle16Regular=createFluentIcon("QuestionCircle16Regular","16",["M8 2a6 6 0 1 1 0 12A6 6 0 0 1 8 2Zm0 1a5 5 0 1 0 0 10A5 5 0 0 0 8 3Zm0 7.5A.75.75 0 1 1 8 12a.75.75 0 0 1 0-1.5Zm0-6a2 2 0 0 1 2 2c0 .73-.21 1.14-.75 1.7l-.27.28c-.38.4-.48.6-.48 1.02a.5.5 0 0 1-1 0c0-.73.21-1.14.75-1.7l.27-.28c.38-.4.48-.6.48-1.02a1 1 0 0 0-2 0 .5.5 0 0 1-1 0c0-1.1.9-2 2-2Z"]),QuestionCircle20Filled=createFluentIcon("QuestionCircle20Filled","20",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 11.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0-8A2.5 2.5 0 0 0 7.5 8a.5.5 0 0 0 1 0 1.5 1.5 0 1 1 2.63.98l-.1.11-.12.1-.25.19A3.2 3.2 0 0 0 9.5 12a.5.5 0 0 0 1 0c0-.76.2-1.25.53-1.61l.08-.08.08-.07.09-.07.22-.17.15-.12A2.5 2.5 0 0 0 10 5.5Z"]),Search20Regular=createFluentIcon("Search20Regular","20",["M8.5 3a5.5 5.5 0 0 1 4.23 9.02l4.12 4.13a.5.5 0 0 1-.63.76l-.07-.06-4.13-4.12A5.5 5.5 0 1 1 8.5 3Zm0 1a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z"]),SendCopy20Regular=createFluentIcon("SendCopy20Regular","20",["M8.65 2.15c.2-.2.5-.2.7 0l3 3a.5.5 0 0 1-.7.7L9.5 3.71v7.79a.5.5 0 0 1-1 0V3.7L6.35 5.86a.5.5 0 1 1-.7-.7l3-3ZM5.27 17c.34.6.99 1 1.73 1h6a4 4 0 0 0 4-4v-3.5a.5.5 0 1 0-1 0V14a3 3 0 0 1-3 3H5.27ZM4 8.5a.5.5 0 0 0-1 0V14c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-1 0V14a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8.5Z"]),ShieldCheckmark24Regular=createFluentIcon("ShieldCheckmark24Regular","24",["M3 5.75c0-.41.34-.75.75-.75 2.66 0 5.26-.94 7.8-2.85.27-.2.63-.2.9 0C14.99 4.05 17.59 5 20.25 5c.41 0 .75.34.75.75V11c0 .34-.01.67-.04 1a6.47 6.47 0 0 0-1.46-.69V6.48a14.36 14.36 0 0 1-7.5-2.8 14.36 14.36 0 0 1-7.5 2.8V11c0 4.15 2.33 7.22 7.13 9.28.26.56.6 1.07 1 1.52l-.36.15a.75.75 0 0 1-.54 0C5.96 19.68 3 16 3 11V5.75ZM23 17.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Zm-2.15-2.35a.5.5 0 0 0-.7 0l-3.65 3.64-1.65-1.64a.5.5 0 0 0-.7.7l2 2c.2.2.5.2.7 0l4-4a.5.5 0 0 0 0-.7Z"]),TextBulletListSquareWarning24Regular=createFluentIcon("TextBulletListSquareWarning24Regular","24",["M7.75 9.25a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm3.5-1.75a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5h-5.5Zm0 3.75a.75.75 0 1 0 0 1.5h3.83l.19-.37c.26-.53.67-.9 1.13-1.13h-5.15Zm0 3.75h2.7l-.74 1.5h-1.96a.75.75 0 1 1 0-1.5Zm-5 4.5h5.46l-.44.88c-.1.2-.17.41-.22.62h-4.8A3.25 3.25 0 0 1 3 17.75V6.25C3 4.45 4.46 3 6.25 3h11.5C19.55 3 21 4.46 21 6.25v8.65l-1.26-2.52a2.6 2.6 0 0 0-.24-.39V6.25c0-.97-.78-1.75-1.75-1.75H6.25c-.97 0-1.75.78-1.75 1.75v11.5c0 .97.78 1.75 1.75 1.75Zm2.5-7.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-1 4.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm8.41-3.92a1.5 1.5 0 0 1 2.69 0l4 8c.5 1-.23 2.17-1.35 2.17h-8a1.5 1.5 0 0 1-1.34-2.17l4-8ZM18 15.5a.5.5 0 0 0-1 0v3a.5.5 0 0 0 1 0v-3Zm-.5 5.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z"]),TextWrap16Regular=createFluentIcon("TextWrap16Regular","16",["M2 3.5c0-.28.22-.5.5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5Zm0 4c0-.28.22-.5.5-.5h10a2.5 2.5 0 0 1 0 5H9.7l.65.65a.5.5 0 0 1-.7.7l-1.5-1.5a.5.5 0 0 1 0-.7l1.5-1.5a.5.5 0 0 1 .7.7l-.64.65h2.79a1.5 1.5 0 0 0 0-3h-10a.5.5 0 0 1-.5-.5ZM6 11a.5.5 0 0 1 0 1H2.5a.5.5 0 0 1 0-1H6Z"]),TextWrapOff16Regular=createFluentIcon("TextWrapOff16Regular","16",["M14.15 14.85 11.29 12H9.71l.64.65a.5.5 0 0 1-.7.7l-1.5-1.5a.5.5 0 0 1 0-.7L9.29 10l-2-2H2.5a.5.5 0 0 1 0-1h3.8l-3-3h-.8a.5.5 0 0 1-.18-.97L1.15 1.85a.5.5 0 1 1 .7-.7l13 13a.5.5 0 0 1-.7.7ZM10.12 8l-1-1h3.38a2.5 2.5 0 0 1 1.27 4.65l-.74-.74A1.5 1.5 0 0 0 12.5 8h-2.38Zm-4-4-1-1h8.38a.5.5 0 0 1 0 1H6.12ZM6 11a.5.5 0 0 1 0 1H2.5a.5.5 0 0 1 0-1H6Z"]),ZoomIn20Regular=createFluentIcon("ZoomIn20Regular","20",["M11.5 8.5A.5.5 0 0 0 11 8H9V6a.5.5 0 0 0-1 0v2H6a.5.5 0 0 0 0 1h2v2a.5.5 0 0 0 1 0V9h2a.5.5 0 0 0 .5-.5ZM8.5 3a5.5 5.5 0 0 1 4.23 9.02l4.12 4.13a.5.5 0 0 1-.63.76l-.07-.06-4.13-4.12A5.5 5.5 0 1 1 8.5 3Zm0 1a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z"]),renderFluentProvider_unstable=(eo,to)=>jsx$1(Provider$1,{value:to.provider,children:jsx$1(ThemeProvider,{value:to.theme,children:jsx$1(ThemeClassNameProvider,{value:to.themeClassName,children:jsx$1(CustomStyleHooksProvider,{value:to.customStyleHooks_unstable,children:jsx$1(TooltipVisibilityProvider,{value:to.tooltip,children:jsx$1(TextDirectionProvider,{dir:to.textDirection,children:jsx$1(IconDirectionContextProvider,{value:to.iconDirection,children:jsx$1(OverridesProvider,{value:to.overrides_unstable,children:jsxs(eo.root,{children:[canUseDOM$3()?null:jsx$1("style",{dangerouslySetInnerHTML:{__html:eo.serverStyleProps.cssRule},...eo.serverStyleProps.attributes}),eo.root.children]})})})})})})})})});/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */const _canUseWeakRef=typeof WeakRef<"u";class WeakRefInstance{constructor(to){_canUseWeakRef&&typeof to=="object"?this._weakRef=new WeakRef(to):this._instance=to}deref(){var to,ro,no;let oo;return this._weakRef?(oo=(to=this._weakRef)===null||to===void 0?void 0:to.deref(),oo||delete this._weakRef):(oo=this._instance,!((no=(ro=oo)===null||ro===void 0?void 0:ro.isDisposed)===null||no===void 0)&&no.call(ro)&&delete this._instance),oo}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */const KEYBORG_FOCUSIN="keyborg:focusin";function canOverrideNativeFocus(eo){const to=eo.HTMLElement,ro=to.prototype.focus;let no=!1;return to.prototype.focus=function(){no=!0},eo.document.createElement("button").focus(),to.prototype.focus=ro,no}let _canOverrideNativeFocus=!1;function nativeFocus(eo){const to=eo.focus;to.__keyborgNativeFocus?to.__keyborgNativeFocus.call(eo):eo.focus()}function setupFocusEvent(eo){const to=eo;_canOverrideNativeFocus||(_canOverrideNativeFocus=canOverrideNativeFocus(to));const ro=to.HTMLElement.prototype.focus;if(ro.__keyborgNativeFocus)return;to.HTMLElement.prototype.focus=so;const no=ao=>{const lo=ao.relatedTarget,uo=ao.currentTarget;uo.contains(lo)||(uo.removeEventListener("focusin",oo),uo.removeEventListener("focusout",no))},oo=ao=>{var lo;let uo=ao.target;if(!uo)return;uo.shadowRoot&&(uo.shadowRoot.addEventListener("focusin",oo),uo.shadowRoot.addEventListener("focusout",no),uo=ao.composedPath()[0]);const co={relatedTarget:ao.relatedTarget||void 0},fo=new CustomEvent(KEYBORG_FOCUSIN,{cancelable:!0,bubbles:!0,composed:!0,detail:co});fo.details=co,(_canOverrideNativeFocus||io.lastFocusedProgrammatically)&&(co.isFocusedProgrammatically=uo===((lo=io.lastFocusedProgrammatically)===null||lo===void 0?void 0:lo.deref()),io.lastFocusedProgrammatically=void 0),uo.dispatchEvent(fo)},io=to.__keyborgData={focusInHandler:oo};to.document.addEventListener("focusin",to.__keyborgData.focusInHandler,!0);function so(){const ao=to.__keyborgData;return ao&&(ao.lastFocusedProgrammatically=new WeakRefInstance(this)),ro.apply(this,arguments)}so.__keyborgNativeFocus=ro}function disposeFocusEvent(eo){const to=eo,ro=to.HTMLElement.prototype,no=ro.focus.__keyborgNativeFocus,oo=to.__keyborgData;oo&&(to.document.removeEventListener("focusin",oo.focusInHandler,!0),delete to.__keyborgData),no&&(ro.focus=no)}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */const _dismissTimeout=500;let _lastId=0;class KeyborgState{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(to){const ro=to.id;ro in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[ro]=new WeakRefInstance(to))}remove(to){delete this.__keyborgCoreRefs[to],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(to){if(this._isNavigatingWithKeyboard!==to){this._isNavigatingWithKeyboard=to;for(const ro of Object.keys(this.__keyborgCoreRefs)){const oo=this.__keyborgCoreRefs[ro].deref();oo?oo.update(to):this.remove(ro)}}}getVal(){return this._isNavigatingWithKeyboard}}const _state=new KeyborgState;class KeyborgCore{constructor(to,ro){this._onFocusIn=oo=>{if(this._isMouseUsedTimer||_state.getVal())return;const io=oo.detail;io.relatedTarget&&(io.isFocusedProgrammatically||io.isFocusedProgrammatically===void 0||_state.setVal(!0))},this._onMouseDown=oo=>{if(oo.buttons===0||oo.clientX===0&&oo.clientY===0&&oo.screenX===0&&oo.screenY===0)return;const io=this._win;io&&(this._isMouseUsedTimer&&io.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=io.setTimeout(()=>{delete this._isMouseUsedTimer},1e3)),_state.setVal(!1)},this._onKeyDown=oo=>{var io,so;const ao=_state.getVal(),lo=oo.keyCode,uo=this._triggerKeys;if(!ao&&(!uo||uo.has(lo))){const co=(io=this._win)===null||io===void 0?void 0:io.document.activeElement;if(co&&(co.tagName==="INPUT"||co.tagName==="TEXTAREA"||co.contentEditable==="true"))return;_state.setVal(!0)}else ao&&(!((so=this._dismissKeys)===null||so===void 0)&&so.has(lo))&&this._scheduleDismiss()},this.id="c"+ ++_lastId,this._win=to;const no=to.document;if(ro){const oo=ro.triggerKeys,io=ro.dismissKeys;oo!=null&&oo.length&&(this._triggerKeys=new Set(oo)),io!=null&&io.length&&(this._dismissKeys=new Set(io))}no.addEventListener(KEYBORG_FOCUSIN,this._onFocusIn,!0),no.addEventListener("mousedown",this._onMouseDown,!0),to.addEventListener("keydown",this._onKeyDown,!0),setupFocusEvent(to),_state.add(this)}dispose(){const to=this._win;if(to){this._isMouseUsedTimer&&(to.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=void 0),this._dismissTimer&&(to.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),disposeFocusEvent(to);const ro=to.document;ro.removeEventListener(KEYBORG_FOCUSIN,this._onFocusIn,!0),ro.removeEventListener("mousedown",this._onMouseDown,!0),to.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,_state.remove(this.id)}}isDisposed(){return!!this._win}update(to){var ro,no;const oo=(no=(ro=this._win)===null||ro===void 0?void 0:ro.__keyborg)===null||no===void 0?void 0:no.refs;if(oo)for(const io of Object.keys(oo))Keyborg.update(oo[io],to)}_scheduleDismiss(){const to=this._win;if(to){this._dismissTimer&&(to.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const ro=to.document.activeElement;this._dismissTimer=to.setTimeout(()=>{this._dismissTimer=void 0;const no=to.document.activeElement;ro&&no&&ro===no&&_state.setVal(!1)},_dismissTimeout)}}}class Keyborg{constructor(to,ro){this._cb=[],this._id="k"+ ++_lastId,this._win=to;const no=to.__keyborg;no?(this._core=no.core,no.refs[this._id]=this):(this._core=new KeyborgCore(to,ro),to.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(to,ro){return new Keyborg(to,ro)}static dispose(to){to.dispose()}static update(to,ro){to._cb.forEach(no=>no(ro))}dispose(){var to;const ro=(to=this._win)===null||to===void 0?void 0:to.__keyborg;ro!=null&&ro.refs[this._id]&&(delete ro.refs[this._id],Object.keys(ro.refs).length===0&&(ro.core.dispose(),delete this._win.__keyborg)),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return _state.getVal()}subscribe(to){this._cb.push(to)}unsubscribe(to){const ro=this._cb.indexOf(to);ro>=0&&this._cb.splice(ro,1)}setVal(to){_state.setVal(to)}}function createKeyborg(eo,to){return Keyborg.create(eo,to)}function disposeKeyborg(eo){Keyborg.dispose(eo)}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */const TabsterAttributeName="data-tabster",TabsterDummyInputAttributeName="data-tabster-dummy",DeloserEventName="tabster:deloser",ModalizerActiveEventName="tabster:modalizer:active",ModalizerInactiveEventName="tabster:modalizer:inactive",ModalizerFocusInEventName="tabster:modalizer:focusin",ModalizerFocusOutEventName="tabster:modalizer:focusout",ModalizerBeforeFocusOutEventName="tabster:modalizer:beforefocusout",MoverEventName="tabster:mover",FocusInEventName="tabster:focusin",FocusOutEventName="tabster:focusout",MoveFocusEventName="tabster:movefocus",FocusableSelector=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"].join(", "),ObservedElementAccesibilities={Any:0,Accessible:1,Focusable:2},RestoreFocusOrders={History:0,DeloserDefault:1,RootDefault:2,DeloserFirst:3,RootFirst:4},Visibilities={Invisible:0,PartiallyVisible:1,Visible:2},RestorerTypes={Source:0,Target:1},MoverDirections={Both:0,Vertical:1,Horizontal:2,Grid:3,GridLinear:4},GroupperTabbabilities={Unlimited:0,Limited:1,LimitedTrapFocus:2},SysDummyInputsPositions={Auto:0,Inside:1,Outside:2};var Types=Object.freeze({__proto__:null,TabsterAttributeName,TabsterDummyInputAttributeName,DeloserEventName,ModalizerActiveEventName,ModalizerInactiveEventName,ModalizerFocusInEventName,ModalizerFocusOutEventName,ModalizerBeforeFocusOutEventName,MoverEventName,FocusInEventName,FocusOutEventName,MoveFocusEventName,FocusableSelector,ObservedElementAccesibilities,RestoreFocusOrders,Visibilities,RestorerTypes,MoverDirections,GroupperTabbabilities,SysDummyInputsPositions});/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */function getTabsterOnElement(eo,to){var ro;return(ro=eo.storageEntry(to))===null||ro===void 0?void 0:ro.tabster}function updateTabsterByAttribute(eo,to,ro){var no,oo;const io=ro||eo._noop?void 0:to.getAttribute(TabsterAttributeName);let so=eo.storageEntry(to),ao;if(io)if(io!==((no=so==null?void 0:so.attr)===null||no===void 0?void 0:no.string))try{const fo=JSON.parse(io);if(typeof fo!="object")throw new Error(`Value is not a JSON object, got '${io}'.`);ao={string:io,object:fo}}catch{}else return;else if(!so)return;so||(so=eo.storageEntry(to,!0)),so.tabster||(so.tabster={});const lo=so.tabster||{},uo=((oo=so.attr)===null||oo===void 0?void 0:oo.object)||{},co=(ao==null?void 0:ao.object)||{};for(const fo of Object.keys(uo))if(!co[fo]){if(fo==="root"){const ho=lo[fo];ho&&eo.root.onRoot(ho,!0)}switch(fo){case"deloser":case"root":case"groupper":case"modalizer":case"restorer":case"mover":const ho=lo[fo];ho&&(ho.dispose(),delete lo[fo]);break;case"observed":delete lo[fo],eo.observedElement&&eo.observedElement.onObservedElementUpdate(to);break;case"focusable":case"outline":case"uncontrolled":case"sys":delete lo[fo];break}}for(const fo of Object.keys(co)){const ho=co.sys;switch(fo){case"deloser":lo.deloser?lo.deloser.setProps(co.deloser):eo.deloser&&(lo.deloser=eo.deloser.createDeloser(to,co.deloser));break;case"root":lo.root?lo.root.setProps(co.root):lo.root=eo.root.createRoot(to,co.root,ho),eo.root.onRoot(lo.root);break;case"modalizer":lo.modalizer?lo.modalizer.setProps(co.modalizer):eo.modalizer&&(lo.modalizer=eo.modalizer.createModalizer(to,co.modalizer,ho));break;case"restorer":lo.restorer?lo.restorer.setProps(co.restorer):eo.restorer&&co.restorer&&(lo.restorer=eo.restorer.createRestorer(to,co.restorer));break;case"focusable":lo.focusable=co.focusable;break;case"groupper":lo.groupper?lo.groupper.setProps(co.groupper):eo.groupper&&(lo.groupper=eo.groupper.createGroupper(to,co.groupper,ho));break;case"mover":lo.mover?lo.mover.setProps(co.mover):eo.mover&&(lo.mover=eo.mover.createMover(to,co.mover,ho));break;case"observed":eo.observedElement&&(lo.observed=co.observed,eo.observedElement.onObservedElementUpdate(to));break;case"uncontrolled":lo.uncontrolled=co.uncontrolled;break;case"outline":eo.outline&&(lo.outline=co.outline);break;case"sys":lo.sys=co.sys;break;default:console.error(`Unknown key '${fo}' in data-tabster attribute value.`)}}ao?so.attr=ao:(Object.keys(lo).length===0&&(delete so.tabster,delete so.attr),eo.storageEntry(to,!1))}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */function createEventTarget(eo){const to=eo();try{if(to.EventTarget)return new to.EventTarget}catch(ro){if(!(ro instanceof TypeError))throw ro}return to.document.createElement("div")}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */let _isBrokenIE11;const _DOMRect=typeof DOMRect<"u"?DOMRect:class{constructor(eo,to,ro,no){this.left=eo||0,this.top=to||0,this.right=(eo||0)+(ro||0),this.bottom=(to||0)+(no||0)}};let _uidCounter=0;try{document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),_isBrokenIE11=!1}catch{_isBrokenIE11=!0}const _updateDummyInputsTimeout=100;function getInstanceContext(eo){const to=eo();let ro=to.__tabsterInstanceContext;return ro||(ro={elementByUId:{},basics:{Promise:to.Promise||void 0,WeakRef:to.WeakRef||void 0},containerBoundingRectCache:{},lastContainerBoundingRectCacheId:0,fakeWeakRefs:[],fakeWeakRefsStarted:!1},to.__tabsterInstanceContext=ro),ro}function disposeInstanceContext(eo){const to=eo.__tabsterInstanceContext;to&&(to.elementByUId={},delete to.WeakRef,to.containerBoundingRectCache={},to.containerBoundingRectCacheTimer&&eo.clearTimeout(to.containerBoundingRectCacheTimer),to.fakeWeakRefsTimer&&eo.clearTimeout(to.fakeWeakRefsTimer),to.fakeWeakRefs=[],delete eo.__tabsterInstanceContext)}function createWeakMap(eo){const to=eo.__tabsterInstanceContext;return new((to==null?void 0:to.basics.WeakMap)||WeakMap)}function hasSubFocusable(eo){return!!eo.querySelector(FocusableSelector)}class FakeWeakRef{constructor(to){this._target=to}deref(){return this._target}static cleanup(to,ro){return to._target?ro||!documentContains(to._target.ownerDocument,to._target)?(delete to._target,!0):!1:!0}}class WeakHTMLElement{constructor(to,ro,no){const oo=getInstanceContext(to);let io;oo.WeakRef?io=new oo.WeakRef(ro):(io=new FakeWeakRef(ro),oo.fakeWeakRefs.push(io)),this._ref=io,this._data=no}get(){const to=this._ref;let ro;return to&&(ro=to.deref(),ro||delete this._ref),ro}getData(){return this._data}}function cleanupFakeWeakRefs(eo,to){const ro=getInstanceContext(eo);ro.fakeWeakRefs=ro.fakeWeakRefs.filter(no=>!FakeWeakRef.cleanup(no,to))}function startFakeWeakRefsCleanup(eo){const to=getInstanceContext(eo);to.fakeWeakRefsStarted||(to.fakeWeakRefsStarted=!0,to.WeakRef=getWeakRef(to)),to.fakeWeakRefsTimer||(to.fakeWeakRefsTimer=eo().setTimeout(()=>{to.fakeWeakRefsTimer=void 0,cleanupFakeWeakRefs(eo),startFakeWeakRefsCleanup(eo)},2*60*1e3))}function stopFakeWeakRefsCleanupAndClearStorage(eo){const to=getInstanceContext(eo);to.fakeWeakRefsStarted=!1,to.fakeWeakRefsTimer&&(eo().clearTimeout(to.fakeWeakRefsTimer),to.fakeWeakRefsTimer=void 0,to.fakeWeakRefs=[])}function createElementTreeWalker(eo,to,ro){if(to.nodeType!==Node.ELEMENT_NODE)return;const no=_isBrokenIE11?ro:{acceptNode:ro};return eo.createTreeWalker(to,NodeFilter.SHOW_ELEMENT,no,!1)}function getBoundingRect(eo,to){let ro=to.__tabsterCacheId;const no=getInstanceContext(eo),oo=ro?no.containerBoundingRectCache[ro]:void 0;if(oo)return oo.rect;const io=to.ownerDocument&&to.ownerDocument.documentElement;if(!io)return new _DOMRect;let so=0,ao=0,lo=io.clientWidth,uo=io.clientHeight;if(to!==io){const fo=to.getBoundingClientRect();so=Math.max(so,fo.left),ao=Math.max(ao,fo.top),lo=Math.min(lo,fo.right),uo=Math.min(uo,fo.bottom)}const co=new _DOMRect(so{no.containerBoundingRectCacheTimer=void 0;for(const fo of Object.keys(no.containerBoundingRectCache))delete no.containerBoundingRectCache[fo].element.__tabsterCacheId;no.containerBoundingRectCache={}},50)),co}function isElementVerticallyVisibleInContainer(eo,to,ro){const no=getScrollableContainer(to);if(!no)return!1;const oo=getBoundingRect(eo,no),io=to.getBoundingClientRect(),so=io.height*(1-ro),ao=Math.max(0,oo.top-io.top),lo=Math.max(0,io.bottom-oo.bottom),uo=ao+lo;return uo===0||uo<=so}function scrollIntoView$4(eo,to,ro){const no=getScrollableContainer(to);if(no){const oo=getBoundingRect(eo,no),io=to.getBoundingClientRect();ro?no.scrollTop+=io.top-oo.top:no.scrollTop+=io.bottom-oo.bottom}}function getScrollableContainer(eo){const to=eo.ownerDocument;if(to){for(let ro=eo.parentElement;ro;ro=ro.parentElement)if(ro.scrollWidth>ro.clientWidth||ro.scrollHeight>ro.clientHeight)return ro;return to.documentElement}return null}function makeFocusIgnored(eo){eo.__shouldIgnoreFocus=!0}function shouldIgnoreFocus(eo){return!!eo.__shouldIgnoreFocus}function getUId(eo){const to=new Uint32Array(4);if(eo.crypto&&eo.crypto.getRandomValues)eo.crypto.getRandomValues(to);else if(eo.msCrypto&&eo.msCrypto.getRandomValues)eo.msCrypto.getRandomValues(to);else for(let no=0;no{if(this._fixedTarget){const ho=this._fixedTarget.get();ho&&nativeFocus(ho);return}const fo=this.input;if(this.onFocusIn&&fo){const ho=co.relatedTarget;this.onFocusIn(this,this._isBackward(!0,fo,ho),ho)}},this._focusOut=co=>{if(this._fixedTarget)return;this.useDefaultAction=!1;const fo=this.input;if(this.onFocusOut&&fo){const ho=co.relatedTarget;this.onFocusOut(this,this._isBackward(!1,fo,ho),ho)}};const ao=to(),lo=ao.document.createElement("i");lo.tabIndex=0,lo.setAttribute("role","none"),lo.setAttribute(TabsterDummyInputAttributeName,""),lo.setAttribute("aria-hidden","true");const uo=lo.style;uo.position="fixed",uo.width=uo.height="1px",uo.opacity="0.001",uo.zIndex="-1",uo.setProperty("content-visibility","hidden"),makeFocusIgnored(lo),this.input=lo,this.isFirst=no.isFirst,this.isOutside=ro,this._isPhantom=(so=no.isPhantom)!==null&&so!==void 0?so:!1,this._fixedTarget=io,lo.addEventListener("focusin",this._focusIn),lo.addEventListener("focusout",this._focusOut),lo.__tabsterDummyContainer=oo,this._isPhantom&&(this._disposeTimer=ao.setTimeout(()=>{delete this._disposeTimer,this.dispose()},0),this._clearDisposeTimeout=()=>{this._disposeTimer&&(ao.clearTimeout(this._disposeTimer),delete this._disposeTimer),delete this._clearDisposeTimeout})}dispose(){var to;this._clearDisposeTimeout&&this._clearDisposeTimeout();const ro=this.input;ro&&(delete this._fixedTarget,delete this.onFocusIn,delete this.onFocusOut,delete this.input,ro.removeEventListener("focusin",this._focusIn),ro.removeEventListener("focusout",this._focusOut),delete ro.__tabsterDummyContainer,(to=ro.parentElement)===null||to===void 0||to.removeChild(ro))}setTopLeft(to,ro){var no;const oo=(no=this.input)===null||no===void 0?void 0:no.style;oo&&(oo.top=`${to}px`,oo.left=`${ro}px`)}_isBackward(to,ro,no){return to&&!no?!this.isFirst:!!(no&&ro.compareDocumentPosition(no)&Node.DOCUMENT_POSITION_FOLLOWING)}}const DummyInputManagerPriorities={Root:1,Modalizer:2,Mover:3,Groupper:4};class DummyInputManager{constructor(to,ro,no,oo,io,so){this._element=ro,this._instance=new DummyInputManagerCore(to,ro,this,no,oo,io,so)}_setHandlers(to,ro){this._onFocusIn=to,this._onFocusOut=ro}moveOut(to){var ro;(ro=this._instance)===null||ro===void 0||ro.moveOut(to)}moveOutWithDefaultAction(to,ro){var no;(no=this._instance)===null||no===void 0||no.moveOutWithDefaultAction(to,ro)}getHandler(to){return to?this._onFocusIn:this._onFocusOut}setTabbable(to){var ro;(ro=this._instance)===null||ro===void 0||ro.setTabbable(this,to)}dispose(){this._instance&&(this._instance.dispose(this),delete this._instance),delete this._onFocusIn,delete this._onFocusOut}static moveWithPhantomDummy(to,ro,no,oo,io){var so;const lo=new DummyInput(to.getWindow,!0,{isPhantom:!0,isFirst:!0}).input;if(lo){let uo,co;if(ro.tagName==="BODY")uo=ro,co=no&&oo||!no&&!oo?ro.firstElementChild:null;else{no&&(!oo||oo&&!to.focusable.isFocusable(ro,!1,!0,!0))?(uo=ro,co=oo?ro.firstElementChild:null):(uo=ro.parentElement,co=no&&oo||!no&&!oo?ro:ro.nextElementSibling);let fo,ho;do fo=no&&oo||!no&&!oo?co==null?void 0:co.previousElementSibling:co,ho=(so=fo==null?void 0:fo.__tabsterDummyContainer)===null||so===void 0?void 0:so.get(),ho===ro?co=no&&oo||!no&&!oo?fo:fo==null?void 0:fo.nextElementSibling:ho=void 0;while(ho)}uo&&triggerMoveFocusEvent({by:"root",owner:uo,next:null,relatedEvent:io})&&(uo.insertBefore(lo,co),nativeFocus(lo))}}static addPhantomDummyWithTarget(to,ro,no,oo){const so=new DummyInput(to.getWindow,!0,{isPhantom:!0,isFirst:!0},void 0,new WeakHTMLElement(to.getWindow,oo)).input;if(so){let ao,lo;hasSubFocusable(ro)&&!no?(ao=ro,lo=ro.firstElementChild):(ao=ro.parentElement,lo=no?ro:ro.nextElementSibling),ao==null||ao.insertBefore(so,lo)}}}class DummyInputObserver{constructor(to){this._updateQueue=new Set,this._lastUpdateQueueTime=0,this._changedParents=new WeakSet,this._dummyElements=[],this._dummyCallbacks=new WeakMap,this._domChanged=ro=>{var no;this._changedParents.has(ro)||(this._changedParents.add(ro),!this._updateDummyInputsTimer&&(this._updateDummyInputsTimer=(no=this._win)===null||no===void 0?void 0:no.call(this).setTimeout(()=>{delete this._updateDummyInputsTimer;for(const oo of this._dummyElements){const io=oo.get();if(io){const so=this._dummyCallbacks.get(io);if(so){const ao=io.parentElement;(!ao||this._changedParents.has(ao))&&so()}}}this._changedParents=new WeakSet},_updateDummyInputsTimeout)))},this._win=to}add(to,ro){!this._dummyCallbacks.has(to)&&this._win&&(this._dummyElements.push(new WeakHTMLElement(this._win,to)),this._dummyCallbacks.set(to,ro),this.domChanged=this._domChanged)}remove(to){this._dummyElements=this._dummyElements.filter(ro=>{const no=ro.get();return no&&no!==to}),this._dummyCallbacks.delete(to),this._dummyElements.length===0&&delete this.domChanged}dispose(){var to;const ro=(to=this._win)===null||to===void 0?void 0:to.call(this);this._updateTimer&&(ro==null||ro.clearTimeout(this._updateTimer),delete this._updateTimer),this._updateDummyInputsTimer&&(ro==null||ro.clearTimeout(this._updateDummyInputsTimer),delete this._updateDummyInputsTimer),this._changedParents=new WeakSet,this._dummyCallbacks=new WeakMap,this._dummyElements=[],this._updateQueue.clear(),delete this.domChanged,delete this._win}updatePositions(to){this._win&&(this._updateQueue.add(to),this._lastUpdateQueueTime=Date.now(),this._scheduledUpdatePositions())}_scheduledUpdatePositions(){var to;this._updateTimer||(this._updateTimer=(to=this._win)===null||to===void 0?void 0:to.call(this).setTimeout(()=>{if(delete this._updateTimer,this._lastUpdateQueueTime+_updateDummyInputsTimeout<=Date.now()){const ro=new Map,no=[];for(const oo of this._updateQueue)no.push(oo(ro));this._updateQueue.clear();for(const oo of no)oo();ro.clear()}else this._scheduledUpdatePositions()},_updateDummyInputsTimeout))}}class DummyInputManagerCore{constructor(to,ro,no,oo,io,so,ao){this._wrappers=[],this._isOutside=!1,this._transformElements=new Set,this._onFocusIn=(po,go,vo)=>{this._onFocus(!0,po,go,vo)},this._onFocusOut=(po,go,vo)=>{this._onFocus(!1,po,go,vo)},this.moveOut=po=>{var go;const vo=this._firstDummy,bo=this._lastDummy;if(vo&&bo){this._ensurePosition();const xo=vo.input,_o=bo.input,Eo=(go=this._element)===null||go===void 0?void 0:go.get();if(xo&&_o&&Eo){let So;po?(xo.tabIndex=0,So=xo):(_o.tabIndex=0,So=_o),So&&nativeFocus(So)}}},this.moveOutWithDefaultAction=(po,go)=>{var vo;const bo=this._firstDummy,xo=this._lastDummy;if(bo&&xo){this._ensurePosition();const _o=bo.input,Eo=xo.input,So=(vo=this._element)===null||vo===void 0?void 0:vo.get();if(_o&&Eo&&So){let To;po?!bo.isOutside&&this._tabster.focusable.isFocusable(So,!0,!0,!0)?To=So:(bo.useDefaultAction=!0,_o.tabIndex=0,To=_o):(xo.useDefaultAction=!0,Eo.tabIndex=0,To=Eo),To&&triggerMoveFocusEvent({by:"root",owner:So,next:null,relatedEvent:go})&&nativeFocus(To)}}},this.setTabbable=(po,go)=>{var vo,bo;for(const _o of this._wrappers)if(_o.manager===po){_o.tabbable=go;break}const xo=this._getCurrent();if(xo){const _o=xo.tabbable?0:-1;let Eo=(vo=this._firstDummy)===null||vo===void 0?void 0:vo.input;Eo&&(Eo.tabIndex=_o),Eo=(bo=this._lastDummy)===null||bo===void 0?void 0:bo.input,Eo&&(Eo.tabIndex=_o)}},this._addDummyInputs=()=>{this._addTimer||(this._addTimer=this._getWindow().setTimeout(()=>{delete this._addTimer,this._ensurePosition(),this._addTransformOffsets()},0))},this._addTransformOffsets=()=>{this._tabster._dummyObserver.updatePositions(this._computeTransformOffsets)},this._computeTransformOffsets=po=>{var go,vo;const bo=((go=this._firstDummy)===null||go===void 0?void 0:go.input)||((vo=this._lastDummy)===null||vo===void 0?void 0:vo.input),xo=this._transformElements,_o=new Set;let Eo=0,So=0;const To=this._getWindow();for(let wo=bo;wo&&wo.nodeType===Node.ELEMENT_NODE;wo=wo.parentElement){let Co=po.get(wo);if(Co===void 0){const Oo=To.getComputedStyle(wo).transform;Oo&&Oo!=="none"&&(Co={scrollTop:wo.scrollTop,scrollLeft:wo.scrollLeft}),po.set(wo,Co||null)}Co&&(_o.add(wo),xo.has(wo)||wo.addEventListener("scroll",this._addTransformOffsets),Eo+=Co.scrollTop,So+=Co.scrollLeft)}for(const wo of xo)_o.has(wo)||wo.removeEventListener("scroll",this._addTransformOffsets);return this._transformElements=_o,()=>{var wo,Co;(wo=this._firstDummy)===null||wo===void 0||wo.setTopLeft(Eo,So),(Co=this._lastDummy)===null||Co===void 0||Co.setTopLeft(Eo,So)}};const lo=ro.get();if(!lo)throw new Error("No element");this._tabster=to,this._getWindow=to.getWindow,this._callForDefaultAction=ao;const uo=lo.__tabsterDummy;if((uo||this)._wrappers.push({manager:no,priority:oo,tabbable:!0}),uo)return uo;lo.__tabsterDummy=this;const co=io==null?void 0:io.dummyInputsPosition,fo=lo.tagName;this._isOutside=co?co===SysDummyInputsPositions.Outside:(so||fo==="UL"||fo==="OL"||fo==="TABLE")&&!(fo==="LI"||fo==="TD"||fo==="TH"),this._firstDummy=new DummyInput(this._getWindow,this._isOutside,{isFirst:!0},ro),this._lastDummy=new DummyInput(this._getWindow,this._isOutside,{isFirst:!1},ro);const ho=this._firstDummy.input;ho&&to._dummyObserver.add(ho,this._addDummyInputs),this._firstDummy.onFocusIn=this._onFocusIn,this._firstDummy.onFocusOut=this._onFocusOut,this._lastDummy.onFocusIn=this._onFocusIn,this._lastDummy.onFocusOut=this._onFocusOut,this._element=ro,this._addDummyInputs()}dispose(to,ro){var no,oo,io,so;if((this._wrappers=this._wrappers.filter(lo=>lo.manager!==to&&!ro)).length===0){delete((no=this._element)===null||no===void 0?void 0:no.get()).__tabsterDummy;for(const co of this._transformElements)co.removeEventListener("scroll",this._addTransformOffsets);this._transformElements.clear();const lo=this._getWindow();this._addTimer&&(lo.clearTimeout(this._addTimer),delete this._addTimer);const uo=(oo=this._firstDummy)===null||oo===void 0?void 0:oo.input;uo&&this._tabster._dummyObserver.remove(uo),(io=this._firstDummy)===null||io===void 0||io.dispose(),(so=this._lastDummy)===null||so===void 0||so.dispose()}}_onFocus(to,ro,no,oo){var io;const so=this._getCurrent();so&&(!ro.useDefaultAction||this._callForDefaultAction)&&((io=so.manager.getHandler(to))===null||io===void 0||io(ro,no,oo))}_getCurrent(){return this._wrappers.sort((to,ro)=>to.tabbable!==ro.tabbable?to.tabbable?-1:1:to.priority-ro.priority),this._wrappers[0]}_ensurePosition(){var to,ro,no;const oo=(to=this._element)===null||to===void 0?void 0:to.get(),io=(ro=this._firstDummy)===null||ro===void 0?void 0:ro.input,so=(no=this._lastDummy)===null||no===void 0?void 0:no.input;if(!(!oo||!io||!so))if(this._isOutside){const ao=oo.parentElement;if(ao){const lo=oo.nextElementSibling;lo!==so&&ao.insertBefore(so,lo),oo.previousElementSibling!==io&&ao.insertBefore(io,oo)}}else{oo.lastElementChild!==so&&oo.appendChild(so);const ao=oo.firstElementChild;ao&&ao!==io&&oo.insertBefore(io,ao)}}}function getLastChild(eo){let to=null;for(let ro=eo.lastElementChild;ro;ro=ro.lastElementChild)to=ro;return to||void 0}function getAdjacentElement(eo,to){let ro=eo,no=null;for(;ro&&!no;)no=to?ro.previousElementSibling:ro.nextElementSibling,ro=ro.parentElement;return no||void 0}function triggerEvent(eo,to,ro){const no=document.createEvent("HTMLEvents");return no.initEvent(to,!0,!0),no.details=ro,eo.dispatchEvent(no),!no.defaultPrevented}function triggerMoveFocusEvent(eo){return triggerEvent(eo.owner,MoveFocusEventName,eo)}function augmentAttribute(eo,to,ro,no){const oo=eo.storageEntry(to,!0);let io=!1;if(!oo.aug){if(no===void 0)return io;oo.aug={}}if(no===void 0){if(ro in oo.aug){const so=oo.aug[ro];delete oo.aug[ro],so===null?to.removeAttribute(ro):to.setAttribute(ro,so),io=!0}}else{let so;ro in oo.aug||(so=to.getAttribute(ro)),so!==void 0&&so!==no&&(oo.aug[ro]=so,no===null?to.removeAttribute(ro):to.setAttribute(ro,no),io=!0)}return no===void 0&&Object.keys(oo.aug).length===0&&(delete oo.aug,eo.storageEntry(to,!1)),io}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */function getTabsterAttribute(eo,to){const ro=JSON.stringify(eo);return to===!0?ro:{[TabsterAttributeName]:ro}}function mergeTabsterProps(eo,to){for(const ro of Object.keys(to)){const no=to[ro];no?eo[ro]=no:delete eo[ro]}}function setTabsterAttribute(eo,to,ro){let no;if(ro){const oo=eo.getAttribute(TabsterAttributeName);if(oo)try{no=JSON.parse(oo)}catch{}}no||(no={}),mergeTabsterProps(no,to),Object.keys(no).length>0?eo.setAttribute(TabsterAttributeName,getTabsterAttribute(no,!0)):eo.removeAttribute(TabsterAttributeName)}class RootDummyManager extends DummyInputManager{constructor(to,ro,no,oo){super(to,ro,DummyInputManagerPriorities.Root,oo,void 0,!0),this._onDummyInputFocus=io=>{var so;if(io.useDefaultAction)this._setFocused(!1);else{this._tabster.keyboardNavigation.setNavigatingWithKeyboard(!0);const ao=this._element.get();if(ao){this._setFocused(!0);const lo=this._tabster.focusedElement.getFirstOrLastTabbable(io.isFirst,{container:ao,ignoreAccessibility:!0});if(lo){nativeFocus(lo);return}}(so=io.input)===null||so===void 0||so.blur()}},this._setHandlers(this._onDummyInputFocus),this._tabster=to,this._setFocused=no}}class Root extends TabsterPart{constructor(to,ro,no,oo,io){super(to,ro,oo),this._isFocused=!1,this._setFocused=lo=>{var uo;if(this._setFocusedTimer&&(this._tabster.getWindow().clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),this._isFocused===lo)return;const co=this._element.get();co&&(lo?(this._isFocused=!0,(uo=this._dummyManager)===null||uo===void 0||uo.setTabbable(!1),triggerEvent(this._tabster.root.eventTarget,"focus",{element:co})):this._setFocusedTimer=this._tabster.getWindow().setTimeout(()=>{var fo;delete this._setFocusedTimer,this._isFocused=!1,(fo=this._dummyManager)===null||fo===void 0||fo.setTabbable(!0),triggerEvent(this._tabster.root.eventTarget,"blur",{element:co})},0))},this._onFocusIn=lo=>{const uo=this._tabster.getParent,co=this._element.get();let fo=lo.target;do{if(fo===co){this._setFocused(!0);return}fo=fo&&uo(fo)}while(fo)},this._onFocusOut=()=>{this._setFocused(!1)},this._onDispose=no;const so=to.getWindow;this.uid=getElementUId(so,ro),this._sys=io,(to.controlTab||to.rootDummyInputs)&&this.addDummyInputs();const ao=so();ao.document.addEventListener("focusin",this._onFocusIn),ao.document.addEventListener("focusout",this._onFocusOut),this._add()}addDummyInputs(){this._dummyManager||(this._dummyManager=new RootDummyManager(this._tabster,this._element,this._setFocused,this._sys))}dispose(){var to;this._onDispose(this);const ro=this._tabster.getWindow();ro.document.removeEventListener("focusin",this._onFocusIn),ro.document.removeEventListener("focusout",this._onFocusOut),this._setFocusedTimer&&(ro.clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),(to=this._dummyManager)===null||to===void 0||to.dispose(),this._remove()}moveOutWithDefaultAction(to,ro){const no=this._dummyManager;if(no)no.moveOutWithDefaultAction(to,ro);else{const oo=this.getElement();oo&&RootDummyManager.moveWithPhantomDummy(this._tabster,oo,!0,to,ro)}}_add(){}_remove(){}}class RootAPI{constructor(to,ro){this._autoRootWaiting=!1,this._roots={},this._forceDummy=!1,this.rootById={},this._autoRootCreate=()=>{var no;const oo=this._win().document,io=oo.body;if(io){this._autoRootUnwait(oo);const so=this._autoRoot;if(so)return setTabsterAttribute(io,{root:so},!0),updateTabsterByAttribute(this._tabster,io),(no=getTabsterOnElement(this._tabster,io))===null||no===void 0?void 0:no.root}else this._autoRootWaiting||(this._autoRootWaiting=!0,oo.addEventListener("readystatechange",this._autoRootCreate))},this._onRootDispose=no=>{delete this._roots[no.id]},this._tabster=to,this._win=to.getWindow,this._autoRoot=ro,this.eventTarget=createEventTarget(this._win),to.queueInit(()=>{this._autoRoot&&this._autoRootCreate()})}_autoRootUnwait(to){to.removeEventListener("readystatechange",this._autoRootCreate),this._autoRootWaiting=!1}dispose(){const to=this._win();this._autoRootUnwait(to.document),delete this._autoRoot,Object.keys(this._roots).forEach(ro=>{this._roots[ro]&&(this._roots[ro].dispose(),delete this._roots[ro])}),this.rootById={}}createRoot(to,ro,no){const oo=new Root(this._tabster,to,this._onRootDispose,ro,no);return this._roots[oo.id]=oo,this._forceDummy&&oo.addDummyInputs(),oo}addDummyInputs(){this._forceDummy=!0;const to=this._roots;for(const ro of Object.keys(to))to[ro].addDummyInputs()}static getRootByUId(to,ro){const no=to().__tabsterInstance;return no&&no.root.rootById[ro]}static getTabsterContext(to,ro,no){no===void 0&&(no={});var oo,io,so,ao;if(!ro.ownerDocument)return;const{checkRtl:lo,referenceElement:uo}=no,co=to.getParent;to.drainInitQueue();let fo,ho,po,go,vo=!1,bo,xo,_o,Eo,So=uo||ro;const To={};for(;So&&(!fo||lo);){const Co=getTabsterOnElement(to,So);if(lo&&_o===void 0){const Mo=So.dir;Mo&&(_o=Mo.toLowerCase()==="rtl")}if(!Co){So=co(So);continue}const Oo=So.tagName;(Co.uncontrolled||Oo==="IFRAME"||Oo==="WEBVIEW")&&(Eo=So),!go&&(!((oo=Co.focusable)===null||oo===void 0)&&oo.excludeFromMover)&&!po&&(vo=!0);const Ao=Co.modalizer,Ro=Co.groupper,No=Co.mover;!ho&&Ao&&(ho=Ao),!po&&Ro&&(!ho||Ao)&&(ho?(!Ro.isActive()&&Ro.getProps().tabbability&&ho.userId!==((io=to.modalizer)===null||io===void 0?void 0:io.activeId)&&(ho=void 0,po=Ro),xo=Ro):po=Ro),!go&&No&&(!ho||Ao)&&(!Ro||So!==ro)&&(go=No,bo=!!po&&po!==Ro),Co.root&&(fo=Co.root),!((so=Co.focusable)===null||so===void 0)&&so.ignoreKeydown&&Object.assign(To,Co.focusable.ignoreKeydown),So=co(So)}if(!fo){const Co=to.root;Co._autoRoot&&!((ao=ro.ownerDocument)===null||ao===void 0)&&ao.body&&(fo=Co._autoRootCreate())}return po&&!go&&(bo=!0),fo?{root:fo,modalizer:ho,groupper:po,mover:go,groupperBeforeMover:bo,modalizerInGroupper:xo,rtl:lo?!!_o:void 0,uncontrolled:Eo,excludedFromMover:vo,ignoreKeydown:Co=>!!To[Co.key]}:void 0}static getRoot(to,ro){var no;const oo=to.getParent;for(let io=ro;io;io=oo(io)){const so=(no=getTabsterOnElement(to,io))===null||no===void 0?void 0:no.root;if(so)return so}}onRoot(to,ro){ro?delete this.rootById[to.uid]:this.rootById[to.uid]=to}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */class Subscribable{constructor(){this._callbacks=[]}dispose(){this._callbacks=[],delete this._val}subscribe(to){const ro=this._callbacks;ro.indexOf(to)<0&&ro.push(to)}subscribeFirst(to){const ro=this._callbacks,no=ro.indexOf(to);no>=0&&ro.splice(no,1),ro.unshift(to)}unsubscribe(to){const ro=this._callbacks.indexOf(to);ro>=0&&this._callbacks.splice(ro,1)}setVal(to,ro){this._val!==to&&(this._val=to,this._callCallbacks(to,ro))}getVal(){return this._val}trigger(to,ro){this._callCallbacks(to,ro)}_callCallbacks(to,ro){this._callbacks.forEach(no=>no(to,ro))}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */class FocusableAPI{constructor(to){this._tabster=to}dispose(){}getProps(to){const ro=getTabsterOnElement(this._tabster,to);return ro&&ro.focusable||{}}isFocusable(to,ro,no,oo){return matchesSelector(to,FocusableSelector)&&(ro||to.tabIndex!==-1)?(no||this.isVisible(to))&&(oo||this.isAccessible(to)):!1}isVisible(to){if(!to.ownerDocument||to.nodeType!==Node.ELEMENT_NODE||to.offsetParent===null&&to.ownerDocument.body!==to)return!1;const ro=to.ownerDocument.defaultView;if(!ro)return!1;const no=to.ownerDocument.body.getBoundingClientRect();return!(no.width===0&&no.height===0||ro.getComputedStyle(to).visibility==="hidden")}isAccessible(to){var ro;for(let no=to;no;no=no.parentElement){const oo=getTabsterOnElement(this._tabster,no);if(this._isHidden(no)||!((ro=oo==null?void 0:oo.focusable)===null||ro===void 0?void 0:ro.ignoreAriaDisabled)&&this._isDisabled(no))return!1}return!0}_isDisabled(to){return to.hasAttribute("disabled")}_isHidden(to){var ro;const no=to.getAttribute("aria-hidden");return!!(no&&no.toLowerCase()==="true"&&!(!((ro=this._tabster.modalizer)===null||ro===void 0)&&ro.isAugmented(to)))}findFirst(to,ro){return this.findElement({...to},ro)}findLast(to,ro){return this.findElement({isBackward:!0,...to},ro)}findNext(to,ro){return this.findElement({...to},ro)}findPrev(to,ro){return this.findElement({...to,isBackward:!0},ro)}findDefault(to,ro){return this.findElement({...to,acceptCondition:no=>this.isFocusable(no,to.includeProgrammaticallyFocusable)&&!!this.getProps(no).isDefault},ro)||null}findAll(to){return this._findElements(!0,to)||[]}findElement(to,ro){const no=this._findElements(!1,to,ro);return no&&no[0]}_findElements(to,ro,no){var oo,io,so;const{container:ao,currentElement:lo=null,includeProgrammaticallyFocusable:uo,useActiveModalizer:co,ignoreAccessibility:fo,modalizerId:ho,isBackward:po,onElement:go}=ro;no||(no={});const vo=[];let{acceptCondition:bo}=ro;const xo=!!bo;if(!ao)return null;bo||(bo=To=>this.isFocusable(To,uo,!1,fo));const _o={container:ao,modalizerUserId:ho===void 0&&co?(oo=this._tabster.modalizer)===null||oo===void 0?void 0:oo.activeId:ho||((so=(io=RootAPI.getTabsterContext(this._tabster,ao))===null||io===void 0?void 0:io.modalizer)===null||so===void 0?void 0:so.userId),from:lo||ao,isBackward:po,acceptCondition:bo,hasCustomCondition:xo,includeProgrammaticallyFocusable:uo,ignoreAccessibility:fo,cachedGrouppers:{}},Eo=createElementTreeWalker(ao.ownerDocument,ao,To=>this._acceptElement(To,_o));if(!Eo)return null;const So=To=>{var wo,Co;const Oo=(wo=_o.foundElement)!==null&&wo!==void 0?wo:_o.foundBackward;return Oo&&vo.push(Oo),to?Oo&&(_o.found=!1,delete _o.foundElement,delete _o.foundBackward,delete _o.fromCtx,_o.from=Oo,go&&!go(Oo))?!1:!!(Oo||To):(Oo&&no&&(no.uncontrolled=(Co=RootAPI.getTabsterContext(this._tabster,Oo))===null||Co===void 0?void 0:Co.uncontrolled),!!(To&&!Oo))};if(lo||(no.outOfDOMOrder=!0),lo)Eo.currentNode=lo;else if(po){const To=getLastChild(ao);if(!To)return null;if(this._acceptElement(To,_o)===NodeFilter.FILTER_ACCEPT&&!So(!0))return _o.skippedFocusable&&(no.outOfDOMOrder=!0),vo;Eo.currentNode=To}do po?Eo.previousNode():Eo.nextNode();while(So());return _o.skippedFocusable&&(no.outOfDOMOrder=!0),vo.length?vo:null}_acceptElement(to,ro){var no,oo,io,so;if(ro.found)return NodeFilter.FILTER_ACCEPT;const ao=ro.foundBackward;if(ao&&(to===ao||!ao.contains(to)))return ro.found=!0,ro.foundElement=ao,NodeFilter.FILTER_ACCEPT;const lo=ro.container;if(to===lo)return NodeFilter.FILTER_SKIP;if(!lo.contains(to)||to.__tabsterDummyContainer||!((no=ro.rejectElementsFrom)===null||no===void 0)&&no.contains(to))return NodeFilter.FILTER_REJECT;const uo=ro.currentCtx=RootAPI.getTabsterContext(this._tabster,to);if(!uo)return NodeFilter.FILTER_SKIP;if(shouldIgnoreFocus(to))return this.isFocusable(to,void 0,!0,!0)&&(ro.skippedFocusable=!0),NodeFilter.FILTER_SKIP;if(!ro.hasCustomCondition&&(to.tagName==="IFRAME"||to.tagName==="WEBVIEW"))return((oo=uo.modalizer)===null||oo===void 0?void 0:oo.userId)===((io=this._tabster.modalizer)===null||io===void 0?void 0:io.activeId)?(ro.found=!0,ro.rejectElementsFrom=ro.foundElement=to,NodeFilter.FILTER_ACCEPT):NodeFilter.FILTER_REJECT;if(!ro.ignoreAccessibility&&!this.isAccessible(to))return this.isFocusable(to,!1,!0,!0)&&(ro.skippedFocusable=!0),NodeFilter.FILTER_REJECT;let co,fo=ro.fromCtx;fo||(fo=ro.fromCtx=RootAPI.getTabsterContext(this._tabster,ro.from));const ho=fo==null?void 0:fo.mover;let po=uo.groupper,go=uo.mover;if(co=(so=this._tabster.modalizer)===null||so===void 0?void 0:so.acceptElement(to,ro),co!==void 0&&(ro.skippedFocusable=!0),co===void 0&&(po||go||ho)){const vo=po==null?void 0:po.getElement(),bo=ho==null?void 0:ho.getElement();let xo=go==null?void 0:go.getElement();xo&&(bo!=null&&bo.contains(xo))&&lo.contains(bo)&&(!vo||!go||bo.contains(vo))&&(go=ho,xo=bo),vo&&(vo===lo||!lo.contains(vo))&&(po=void 0),xo&&!lo.contains(xo)&&(go=void 0),po&&go&&(xo&&vo&&!vo.contains(xo)?go=void 0:po=void 0),po&&(co=po.acceptElement(to,ro)),go&&(co=go.acceptElement(to,ro))}return co===void 0&&(co=ro.acceptCondition(to)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,co===NodeFilter.FILTER_SKIP&&this.isFocusable(to,!1,!0,!0)&&(ro.skippedFocusable=!0)),co===NodeFilter.FILTER_ACCEPT&&!ro.found&&(ro.isBackward?(ro.foundBackward=to,co=NodeFilter.FILTER_SKIP):(ro.found=!0,ro.foundElement=to)),co}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */const Keys={Tab:9,Enter:13,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40};/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */function getUncontrolledCompletelyContainer(eo,to){var ro;const no=eo.getParent;let oo=to;do{const io=(ro=getTabsterOnElement(eo,oo))===null||ro===void 0?void 0:ro.uncontrolled;if(io&&eo.uncontrolled.isUncontrolledCompletely(oo,!!io.completely))return oo;oo=no(oo)}while(oo)}class FocusedElementState extends Subscribable{constructor(to,ro){super(),this._init=()=>{const no=this._win(),oo=no.document;oo.addEventListener(KEYBORG_FOCUSIN,this._onFocusIn,!0),oo.addEventListener("focusout",this._onFocusOut,!0),no.addEventListener("keydown",this._onKeyDown,!0);const io=oo.activeElement;io&&io!==oo.body&&this._setFocusedElement(io),this.subscribe(this._onChanged)},this._onFocusIn=no=>{this._setFocusedElement(no.target,no.details.relatedTarget,no.details.isFocusedProgrammatically)},this._onFocusOut=no=>{this._setFocusedElement(void 0,no.relatedTarget)},this._validateFocusedElement=no=>{},this._onKeyDown=no=>{if(no.keyCode!==Keys.Tab||no.ctrlKey)return;const oo=this.getVal();if(!oo||!oo.ownerDocument||oo.contentEditable==="true")return;const io=this._tabster,so=io.controlTab,ao=RootAPI.getTabsterContext(io,oo);if(!ao||ao.ignoreKeydown(no))return;const lo=no.shiftKey,uo=FocusedElementState.findNextTabbable(io,ao,void 0,oo,void 0,lo,!0),co=ao.root.getElement();if(!co)return;const fo=uo==null?void 0:uo.element,ho=getUncontrolledCompletelyContainer(io,oo);if(fo){const po=uo.uncontrolled;if(ao.uncontrolled||po!=null&&po.contains(oo)){if(!uo.outOfDOMOrder&&po===ao.uncontrolled||ho&&!ho.contains(fo))return;DummyInputManager.addPhantomDummyWithTarget(io,oo,lo,fo);return}if(po||fo.tagName==="IFRAME"){triggerMoveFocusEvent({by:"root",owner:co,next:fo,relatedEvent:no})&&DummyInputManager.moveWithPhantomDummy(this._tabster,po??fo,!1,lo,no);return}(so||uo!=null&&uo.outOfDOMOrder)&&triggerMoveFocusEvent({by:"root",owner:co,next:fo,relatedEvent:no})&&(no.preventDefault(),no.stopImmediatePropagation(),nativeFocus(fo))}else!ho&&triggerMoveFocusEvent({by:"root",owner:co,next:null,relatedEvent:no})&&ao.root.moveOutWithDefaultAction(lo,no)},this._onChanged=(no,oo)=>{var io,so;if(no)triggerEvent(no,FocusInEventName,oo);else{const ao=(io=this._lastVal)===null||io===void 0?void 0:io.get();if(ao){const lo={...oo},uo=RootAPI.getTabsterContext(this._tabster,ao),co=(so=uo==null?void 0:uo.modalizer)===null||so===void 0?void 0:so.userId;co&&(lo.modalizerId=co),triggerEvent(ao,FocusOutEventName,lo)}}},this._tabster=to,this._win=ro,to.queueInit(this._init)}dispose(){super.dispose();const to=this._win();to.document.removeEventListener(KEYBORG_FOCUSIN,this._onFocusIn,!0),to.document.removeEventListener("focusout",this._onFocusOut,!0),to.removeEventListener("keydown",this._onKeyDown,!0),this.unsubscribe(this._onChanged),delete FocusedElementState._lastResetElement,delete this._nextVal,delete this._lastVal}static forgetMemorized(to,ro){var no,oo;let io=FocusedElementState._lastResetElement,so=io&&io.get();so&&ro.contains(so)&&delete FocusedElementState._lastResetElement,so=(oo=(no=to._nextVal)===null||no===void 0?void 0:no.element)===null||oo===void 0?void 0:oo.get(),so&&ro.contains(so)&&delete to._nextVal,io=to._lastVal,so=io&&io.get(),so&&ro.contains(so)&&delete to._lastVal}getFocusedElement(){return this.getVal()}getLastFocusedElement(){var to;let ro=(to=this._lastVal)===null||to===void 0?void 0:to.get();return(!ro||ro&&!documentContains(ro.ownerDocument,ro))&&(this._lastVal=ro=void 0),ro}focus(to,ro,no){return this._tabster.focusable.isFocusable(to,ro,!1,no)?(to.focus(),!0):!1}focusDefault(to){const ro=this._tabster.focusable.findDefault({container:to});return ro?(this._tabster.focusedElement.focus(ro),!0):!1}getFirstOrLastTabbable(to,ro){var no;const{container:oo,ignoreAccessibility:io}=ro;let so;if(oo){const ao=RootAPI.getTabsterContext(this._tabster,oo);ao&&(so=(no=FocusedElementState.findNextTabbable(this._tabster,ao,oo,void 0,void 0,!to,io))===null||no===void 0?void 0:no.element)}return so&&!(oo!=null&&oo.contains(so))&&(so=void 0),so||void 0}_focusFirstOrLast(to,ro){const no=this.getFirstOrLastTabbable(to,ro);return no?(this.focus(no,!1,!0),!0):!1}focusFirst(to){return this._focusFirstOrLast(!0,to)}focusLast(to){return this._focusFirstOrLast(!1,to)}resetFocus(to){if(!this._tabster.focusable.isVisible(to))return!1;if(this._tabster.focusable.isFocusable(to,!0,!0,!0))this.focus(to);else{const ro=to.getAttribute("tabindex"),no=to.getAttribute("aria-hidden");to.tabIndex=-1,to.setAttribute("aria-hidden","true"),FocusedElementState._lastResetElement=new WeakHTMLElement(this._win,to),this.focus(to,!0,!0),this._setOrRemoveAttribute(to,"tabindex",ro),this._setOrRemoveAttribute(to,"aria-hidden",no)}return!0}_setOrRemoveAttribute(to,ro,no){no===null?to.removeAttribute(ro):to.setAttribute(ro,no)}_setFocusedElement(to,ro,no){var oo,io;if(this._tabster._noop)return;const so={relatedTarget:ro};if(to){const lo=(oo=FocusedElementState._lastResetElement)===null||oo===void 0?void 0:oo.get();if(FocusedElementState._lastResetElement=void 0,lo===to||shouldIgnoreFocus(to))return;so.isFocusedProgrammatically=no;const uo=RootAPI.getTabsterContext(this._tabster,to),co=(io=uo==null?void 0:uo.modalizer)===null||io===void 0?void 0:io.userId;co&&(so.modalizerId=co)}const ao=this._nextVal={element:to?new WeakHTMLElement(this._win,to):void 0,details:so};to&&to!==this._val&&this._validateFocusedElement(to),this._nextVal===ao&&this.setVal(to,so),this._nextVal=void 0}setVal(to,ro){super.setVal(to,ro),to&&(this._lastVal=new WeakHTMLElement(this._win,to))}static findNextTabbable(to,ro,no,oo,io,so,ao){const lo=no||ro.root.getElement();if(!lo)return null;let uo=null;const co=FocusedElementState._isTabbingTimer,fo=to.getWindow();co&&fo.clearTimeout(co),FocusedElementState.isTabbing=!0,FocusedElementState._isTabbingTimer=fo.setTimeout(()=>{delete FocusedElementState._isTabbingTimer,FocusedElementState.isTabbing=!1},0);const ho=ro.modalizer,po=ro.groupper,go=ro.mover,vo=bo=>{var xo;if(uo=bo.findNextTabbable(oo,io,so,ao),oo&&!(uo!=null&&uo.element)){const _o=bo!==ho&&((xo=bo.getElement())===null||xo===void 0?void 0:xo.parentElement);if(_o){const Eo=RootAPI.getTabsterContext(to,oo,{referenceElement:_o});if(Eo){const So=bo.getElement(),To=so?So:So&&getLastChild(So)||So;To&&(uo=FocusedElementState.findNextTabbable(to,Eo,no,To,_o,so,ao),uo&&(uo.outOfDOMOrder=!0))}}}};if(po&&go)vo(ro.groupperBeforeMover?po:go);else if(po)vo(po);else if(go)vo(go);else if(ho)vo(ho);else{const bo={container:lo,currentElement:oo,referenceElement:io,ignoreAccessibility:ao,useActiveModalizer:!0},xo={};uo={element:to.focusable[so?"findPrev":"findNext"](bo,xo),outOfDOMOrder:xo.outOfDOMOrder,uncontrolled:xo.uncontrolled}}return uo}}FocusedElementState.isTabbing=!1;/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */class GroupperDummyManager extends DummyInputManager{constructor(to,ro,no,oo){super(no,to,DummyInputManagerPriorities.Groupper,oo,!0),this._setHandlers((io,so,ao)=>{var lo,uo;const co=to.get(),fo=io.input;if(co&&fo){const ho=RootAPI.getTabsterContext(no,fo);if(ho){let po;po=(lo=ro.findNextTabbable(ao||void 0,void 0,so,!0))===null||lo===void 0?void 0:lo.element,po||(po=(uo=FocusedElementState.findNextTabbable(no,ho,void 0,io.isOutside?fo:getAdjacentElement(co,!so),void 0,so,!0))===null||uo===void 0?void 0:uo.element),po&&nativeFocus(po)}}})}}class Groupper extends TabsterPart{constructor(to,ro,no,oo,io){super(to,ro,oo),this._shouldTabInside=!1,this.makeTabbable(!1),this._onDispose=no,to.controlTab||(this.dummyManager=new GroupperDummyManager(this._element,this,to,io))}dispose(){var to;this._onDispose(this),this._element.get(),(to=this.dummyManager)===null||to===void 0||to.dispose(),delete this.dummyManager,delete this._first}findNextTabbable(to,ro,no,oo){var io;const so=this.getElement();if(!so)return null;const ao=((io=to==null?void 0:to.__tabsterDummyContainer)===null||io===void 0?void 0:io.get())===so;if(!this._shouldTabInside&&to&&so.contains(to)&&!ao)return{element:void 0,outOfDOMOrder:!0};const lo=this.getFirst(!0);if(!to||!so.contains(to)||ao)return{element:lo,outOfDOMOrder:!0};const uo=this._tabster;let co=null,fo=!1,ho;if(this._shouldTabInside&&lo){const po={container:so,currentElement:to,referenceElement:ro,ignoreAccessibility:oo,useActiveModalizer:!0},go={};co=uo.focusable[no?"findPrev":"findNext"](po,go),fo=!!go.outOfDOMOrder,!co&&this._props.tabbability===GroupperTabbabilities.LimitedTrapFocus&&(co=uo.focusable[no?"findLast":"findFirst"]({container:so,ignoreAccessibility:oo,useActiveModalizer:!0},go),fo=!0),ho=go.uncontrolled}return{element:co,uncontrolled:ho,outOfDOMOrder:fo}}makeTabbable(to){this._shouldTabInside=to||!this._props.tabbability}isActive(to){var ro;const no=this.getElement()||null;let oo=!0;for(let so=no==null?void 0:no.parentElement;so;so=so.parentElement){const ao=(ro=getTabsterOnElement(this._tabster,so))===null||ro===void 0?void 0:ro.groupper;ao&&(ao._shouldTabInside||(oo=!1))}let io=oo?this._props.tabbability?this._shouldTabInside:!1:void 0;if(io&&to){const so=this._tabster.focusedElement.getFocusedElement();so&&(io=so!==this.getFirst(!0))}return io}getFirst(to){var ro;const no=this.getElement();let oo;if(no){if(to&&this._tabster.focusable.isFocusable(no))return no;oo=(ro=this._first)===null||ro===void 0?void 0:ro.get(),oo||(oo=this._tabster.focusable.findFirst({container:no,useActiveModalizer:!0})||void 0,oo&&this.setFirst(oo))}return oo}setFirst(to){to?this._first=new WeakHTMLElement(this._tabster.getWindow,to):delete this._first}acceptElement(to,ro){var no;const oo=ro.cachedGrouppers,io=(no=this.getElement())===null||no===void 0?void 0:no.parentElement,so=io&&RootAPI.getTabsterContext(this._tabster,io),ao=so==null?void 0:so.groupper,lo=so!=null&&so.groupperBeforeMover?ao:void 0;let uo;const co=po=>{let go=oo[po.id],vo;return go?vo=go.isActive:(vo=this.isActive(!0),go=oo[po.id]={isActive:vo}),vo};if(lo&&(uo=lo.getElement(),!co(lo)&&uo&&ro.container!==uo&&ro.container.contains(uo)))return ro.skippedFocusable=!0,NodeFilter.FILTER_REJECT;const fo=co(this),ho=this.getElement();if(ho&&fo!==!0){if(ho===to&&ao&&(uo||(uo=ao.getElement()),uo&&!co(ao)&&ro.container.contains(uo)&&uo!==ro.container)||ho!==to&&ho.contains(to))return ro.skippedFocusable=!0,NodeFilter.FILTER_REJECT;const po=oo[this.id];let go;if("first"in po?go=po.first:go=po.first=this.getFirst(!0),go&&ro.acceptCondition(go))return ro.rejectElementsFrom=ho,ro.skippedFocusable=!0,go!==ro.from?(ro.found=!0,ro.foundElement=go,NodeFilter.FILTER_ACCEPT):NodeFilter.FILTER_REJECT}}}class GroupperAPI{constructor(to,ro){this._current={},this._grouppers={},this._init=()=>{const no=this._win();this._tabster.focusedElement.subscribeFirst(this._onFocus),no.document.addEventListener("mousedown",this._onMouseDown,!0),no.addEventListener("keydown",this._onKeyDown,!0)},this._onGroupperDispose=no=>{delete this._grouppers[no.id]},this._onFocus=no=>{no&&this._updateCurrent(no,!0,!0)},this._onMouseDown=no=>{no.target&&this._updateCurrent(no.target,!0)},this._onKeyDown=no=>{if(no.keyCode!==Keys.Enter&&no.keyCode!==Keys.Esc||no.ctrlKey||no.altKey||no.shiftKey||no.metaKey)return;const oo=this._tabster.focusedElement.getFocusedElement();oo&&this.handleKeyPress(oo,no)},this._tabster=to,this._win=ro,to.queueInit(this._init)}dispose(){const to=this._win();this._handleKeyPressTimer&&(to.clearTimeout(this._handleKeyPressTimer),delete this._handleKeyPressTimer),this._current={},this._updateTimer&&(to.clearTimeout(this._updateTimer),delete this._updateTimer),this._tabster.focusedElement.unsubscribe(this._onFocus),to.document.removeEventListener("mousedown",this._onMouseDown,!0),to.removeEventListener("keydown",this._onKeyDown,!0),Object.keys(this._grouppers).forEach(ro=>{this._grouppers[ro]&&(this._grouppers[ro].dispose(),delete this._grouppers[ro])})}createGroupper(to,ro,no){const oo=new Groupper(this._tabster,to,this._onGroupperDispose,ro,no);this._grouppers[oo.id]=oo;const io=this._tabster.focusedElement.getFocusedElement();return io&&to.contains(io)&&!this._updateTimer&&(this._updateTimer=this._win().setTimeout(()=>{delete this._updateTimer,io===this._tabster.focusedElement.getFocusedElement()&&this._updateCurrent(io,!0,!0)},0)),oo}forgetCurrentGrouppers(){this._current={}}_updateCurrent(to,ro,no){var oo;this._updateTimer&&(this._win().clearTimeout(this._updateTimer),delete this._updateTimer);const io={};let so=!0;for(let ao=to;ao;ao=ao.parentElement){const lo=(oo=getTabsterOnElement(this._tabster,ao))===null||oo===void 0?void 0:oo.groupper;if(lo){if(io[lo.id]=!0,so&&no&&ao!==to&&(so=!1),ro||!so){this._current[lo.id]=lo;const uo=lo.isActive()||to!==ao&&(!lo.getProps().delegated||lo.getFirst(!1)!==to);lo.makeTabbable(uo)}so=!1}}for(const ao of Object.keys(this._current)){const lo=this._current[ao];lo.id in io||(lo.makeTabbable(!1),lo.setFirst(void 0),delete this._current[ao])}}handleKeyPress(to,ro,no){const oo=this._tabster,io=RootAPI.getTabsterContext(oo,to),so=io==null?void 0:io.modalizerInGroupper;let ao=(io==null?void 0:io.groupper)||so;if(io&&ao){const lo=this._win();if(this._handleKeyPressTimer&&(lo.clearTimeout(this._handleKeyPressTimer),delete this._handleKeyPressTimer),io.ignoreKeydown(ro))return;let uo;const co=ao.getElement();if(ro.keyCode===Keys.Enter)co&&(to===co||ao.getProps().delegated&&to===ao.getFirst(!1))&&(uo=oo.focusable.findNext({container:co,currentElement:to,useActiveModalizer:!0})),uo&&co&&triggerMoveFocusEvent({by:"groupper",owner:co,next:uo,relatedEvent:ro})&&(ro.preventDefault(),ro.stopImmediatePropagation(),uo.focus());else if(ro.keyCode===Keys.Esc){const fo=oo.focusedElement.getFocusedElement();this._handleKeyPressTimer=lo.setTimeout(()=>{var ho;if(delete this._handleKeyPressTimer,fo===oo.focusedElement.getFocusedElement()&&ao&&co&&co.contains(to)){if(to!==co||no)uo=ao.getFirst(!0);else{const po=co.parentElement,go=po?RootAPI.getTabsterContext(oo,po):void 0;ao=go==null?void 0:go.groupper,uo=ao==null?void 0:ao.getFirst(!0)}uo&&triggerMoveFocusEvent({by:"groupper",owner:co,next:uo,relatedEvent:ro})&&(ao&&(ao.makeTabbable(!1),so&&((ho=oo.modalizer)===null||ho===void 0||ho.setActive(void 0))),uo.focus())}},0)}}}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */class KeyboardNavigationState extends Subscribable{constructor(to){super(),this._onChange=ro=>{this.setVal(ro,void 0)},this._keyborg=createKeyborg(to()),this._keyborg.subscribe(this._onChange)}dispose(){super.dispose(),this._keyborg&&(this._keyborg.unsubscribe(this._onChange),disposeKeyborg(this._keyborg),delete this._keyborg)}setNavigatingWithKeyboard(to){var ro;(ro=this._keyborg)===null||ro===void 0||ro.setVal(to)}isNavigatingWithKeyboard(){var to;return!!(!((to=this._keyborg)===null||to===void 0)&&to.isNavigatingWithKeyboard())}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */let _wasFocusedCounter=0;const _ariaHidden="aria-hidden";class ModalizerDummyManager extends DummyInputManager{constructor(to,ro,no){super(ro,to,DummyInputManagerPriorities.Modalizer,no),this._setHandlers((oo,io)=>{var so,ao,lo;const uo=to.get(),co=uo&&((so=RootAPI.getRoot(ro,uo))===null||so===void 0?void 0:so.getElement()),fo=oo.input;let ho;if(co&&fo){const po=(ao=fo.__tabsterDummyContainer)===null||ao===void 0?void 0:ao.get(),go=RootAPI.getTabsterContext(ro,po||fo);go&&(ho=(lo=FocusedElementState.findNextTabbable(ro,go,co,fo,void 0,io,!0))===null||lo===void 0?void 0:lo.element),ho&&nativeFocus(ho)}})}}class Modalizer extends TabsterPart{constructor(to,ro,no,oo,io,so){super(to,ro,oo),this._wasFocused=0,this.userId=oo.id,this._onDispose=no,this._activeElements=so,to.controlTab||(this.dummyManager=new ModalizerDummyManager(this._element,to,io))}makeActive(to){if(this._isActive!==to){this._isActive=to;const ro=this.getElement();if(ro){const no=this._activeElements,oo=no.map(io=>io.get()).indexOf(ro);to?oo<0&&no.push(new WeakHTMLElement(this._tabster.getWindow,ro)):oo>=0&&no.splice(oo,1)}this.triggerFocusEvent(to?ModalizerActiveEventName:ModalizerInactiveEventName)}}focused(to){return to||(this._wasFocused=++_wasFocusedCounter),this._wasFocused}setProps(to){to.id&&(this.userId=to.id),this._props={...to}}dispose(){var to;this.makeActive(!1),this._onDispose(this),(to=this.dummyManager)===null||to===void 0||to.dispose(),delete this.dummyManager,this._activeElements=[],this._remove()}isActive(){return!!this._isActive}contains(to){var ro;return!!(!((ro=this.getElement())===null||ro===void 0)&&ro.contains(to))}findNextTabbable(to,ro,no,oo){var io,so;if(!this.getElement())return null;const lo=this._tabster;let uo=null,co=!1,fo;const ho=to&&((io=RootAPI.getRoot(lo,to))===null||io===void 0?void 0:io.getElement());if(ho){const po={container:ho,currentElement:to,referenceElement:ro,ignoreAccessibility:oo,useActiveModalizer:!0},go={};uo=lo.focusable[no?"findPrev":"findNext"](po,go),!uo&&this._props.isTrapped&&(!((so=lo.modalizer)===null||so===void 0)&&so.activeId)?(uo=lo.focusable[no?"findLast":"findFirst"]({container:ho,ignoreAccessibility:oo,useActiveModalizer:!0},go),co=!0):co=!!go.outOfDOMOrder,fo=go.uncontrolled}return{element:uo,uncontrolled:fo,outOfDOMOrder:co}}triggerFocusEvent(to,ro){const no=this.getElement();let oo=!1;if(no){const io=ro?this._activeElements.map(so=>so.get()):[no];for(const so of io)so&&!triggerEvent(so,to,{id:this.userId,element:no,eventName:to})&&(oo=!0)}return oo}_remove(){}}class ModalizerAPI{constructor(to,ro,no){this._onModalizerDispose=io=>{const so=io.id,ao=io.userId,lo=this._parts[ao];delete this._modalizers[so],lo&&(delete lo[so],Object.keys(lo).length===0&&(delete this._parts[ao],this.activeId===ao&&this.setActive(void 0)))},this._onKeyDown=io=>{var so;if(io.keyCode!==Keys.Esc)return;const ao=this._tabster,lo=ao.focusedElement.getFocusedElement();if(lo){const uo=RootAPI.getTabsterContext(ao,lo),co=uo==null?void 0:uo.modalizer;if(uo&&!uo.groupper&&(co!=null&&co.isActive())&&!uo.ignoreKeydown(io)){const fo=co.userId;if(fo){const ho=this._parts[fo];if(ho){const po=Object.keys(ho).map(go=>{var vo;const bo=ho[go],xo=bo.getElement();let _o;return xo&&(_o=(vo=getTabsterOnElement(this._tabster,xo))===null||vo===void 0?void 0:vo.groupper),bo&&xo&&_o?{el:xo,focusedSince:bo.focused(!0)}:{focusedSince:0}}).filter(go=>go.focusedSince>0).sort((go,vo)=>go.focusedSince>vo.focusedSince?-1:go.focusedSince{var ao,lo;const uo=io&&RootAPI.getTabsterContext(this._tabster,io);if(!uo||!io)return;const co=this._augMap;for(let ho=io;ho;ho=ho.parentElement)co.has(ho)&&(co.delete(ho),augmentAttribute(this._tabster,ho,_ariaHidden));const fo=uo.modalizer;if((lo=fo||((ao=getTabsterOnElement(this._tabster,io))===null||ao===void 0?void 0:ao.modalizer))===null||lo===void 0||lo.focused(),(fo==null?void 0:fo.userId)===this.activeId){this.currentIsOthersAccessible=fo==null?void 0:fo.getProps().isOthersAccessible;return}if(so.isFocusedProgrammatically||this.currentIsOthersAccessible||fo!=null&&fo.getProps().isAlwaysAccessible)this.setActive(fo);else{const ho=this._win();ho.clearTimeout(this._restoreModalizerFocusTimer),this._restoreModalizerFocusTimer=ho.setTimeout(()=>this._restoreModalizerFocus(io),100)}},this._tabster=to,this._win=to.getWindow,this._modalizers={},this._parts={},this._augMap=new WeakMap,this._aug=[],this._alwaysAccessibleSelector=ro,this._accessibleCheck=no,this.activeElements=[],to.controlTab||to.root.addDummyInputs(),this._win().addEventListener("keydown",this._onKeyDown,!0),to.queueInit(()=>{this._tabster.focusedElement.subscribe(this._onFocus)})}dispose(){const to=this._win();to.removeEventListener("keydown",this._onKeyDown,!0),Object.keys(this._modalizers).forEach(ro=>{this._modalizers[ro]&&(this._modalizers[ro].dispose(),delete this._modalizers[ro])}),to.clearTimeout(this._restoreModalizerFocusTimer),to.clearTimeout(this._hiddenUpdateTimer),this._parts={},delete this.activeId,this.activeElements=[],this._augMap=new WeakMap,this._aug=[],this._tabster.focusedElement.unsubscribe(this._onFocus)}createModalizer(to,ro,no){var oo;const io=new Modalizer(this._tabster,to,this._onModalizerDispose,ro,no,this.activeElements),so=io.id,ao=ro.id;this._modalizers[so]=io;let lo=this._parts[ao];return lo||(lo=this._parts[ao]={}),lo[so]=io,to.contains((oo=this._tabster.focusedElement.getFocusedElement())!==null&&oo!==void 0?oo:null)&&(ao!==this.activeId?this.setActive(io):io.makeActive(!0)),io}isAugmented(to){return this._augMap.has(to)}hiddenUpdate(){this._hiddenUpdateTimer||(this._hiddenUpdateTimer=this._win().setTimeout(()=>{delete this._hiddenUpdateTimer,this._hiddenUpdate()},250))}setActive(to){const ro=to==null?void 0:to.userId,no=this.activeId;if(no!==ro){if(this.activeId=ro,no){const oo=this._parts[no];if(oo)for(const io of Object.keys(oo))oo[io].makeActive(!1)}if(ro){const oo=this._parts[ro];if(oo)for(const io of Object.keys(oo))oo[io].makeActive(!0)}this.currentIsOthersAccessible=to==null?void 0:to.getProps().isOthersAccessible,this.hiddenUpdate()}}focus(to,ro,no){const oo=RootAPI.getTabsterContext(this._tabster,to),io=oo==null?void 0:oo.modalizer;if(io){this.setActive(io);const so=io.getProps(),ao=io.getElement();if(ao){if(ro===void 0&&(ro=so.isNoFocusFirst),!ro&&this._tabster.keyboardNavigation.isNavigatingWithKeyboard()&&this._tabster.focusedElement.focusFirst({container:ao})||(no===void 0&&(no=so.isNoFocusDefault),!no&&this._tabster.focusedElement.focusDefault(ao)))return!0;this._tabster.focusedElement.resetFocus(ao)}}return!1}acceptElement(to,ro){var no;const oo=ro.modalizerUserId,io=(no=ro.currentCtx)===null||no===void 0?void 0:no.modalizer;if(oo)for(const ao of this.activeElements){const lo=ao.get();if(lo&&(to.contains(lo)||lo===to))return NodeFilter.FILTER_SKIP}const so=oo===(io==null?void 0:io.userId)||!oo&&(io!=null&&io.getProps().isAlwaysAccessible)?void 0:NodeFilter.FILTER_SKIP;return so!==void 0&&(ro.skippedFocusable=!0),so}_hiddenUpdate(){var to;const ro=this._tabster,no=ro.getWindow().document.body,oo=this.activeId,io=this._parts,so=[],ao=[],lo=this._alwaysAccessibleSelector,uo=lo?Array.from(no.querySelectorAll(lo)):[],co=[];for(const xo of Object.keys(io)){const _o=io[xo];for(const Eo of Object.keys(_o)){const So=_o[Eo],To=So.getElement(),Co=So.getProps().isAlwaysAccessible;To&&(xo===oo?(co.push(To),this.currentIsOthersAccessible||so.push(To)):Co?uo.push(To):ao.push(To))}}const fo=this._augMap,ho=so.length>0?[...so,...uo]:void 0,po=[],go=new WeakMap,vo=(xo,_o)=>{var Eo;const So=xo.tagName;if(So==="SCRIPT"||So==="STYLE")return;let To=!1;fo.has(xo)?_o?To=!0:(fo.delete(xo),augmentAttribute(ro,xo,_ariaHidden)):_o&&!(!((Eo=this._accessibleCheck)===null||Eo===void 0)&&Eo.call(this,xo,co))&&augmentAttribute(ro,xo,_ariaHidden,"true")&&(fo.set(xo,!0),To=!0),To&&(po.push(new WeakHTMLElement(ro.getWindow,xo)),go.set(xo,!0))},bo=xo=>{for(let _o=xo.firstElementChild;_o;_o=_o.nextElementSibling){let Eo=!1,So=!1;if(ho){for(const To of ho){if(_o===To){Eo=!0;break}if(_o.contains(To)){So=!0;break}}So?bo(_o):Eo||vo(_o,!0)}else vo(_o,!1)}};ho||uo.forEach(xo=>vo(xo,!1)),ao.forEach(xo=>vo(xo,!0)),no&&bo(no),(to=this._aug)===null||to===void 0||to.map(xo=>xo.get()).forEach(xo=>{xo&&!go.get(xo)&&vo(xo,!1)}),this._aug=po,this._augMap=go}_restoreModalizerFocus(to){const ro=to==null?void 0:to.ownerDocument;if(!to||!ro)return;const no=RootAPI.getTabsterContext(this._tabster,to),oo=no==null?void 0:no.modalizer,io=this.activeId;if(!oo&&!io||oo&&io===oo.userId)return;const so=no==null?void 0:no.root.getElement();if(so){let ao=this._tabster.focusable.findFirst({container:so,useActiveModalizer:!0});if(ao){if(to.compareDocumentPosition(ao)&document.DOCUMENT_POSITION_PRECEDING&&(ao=this._tabster.focusable.findLast({container:so,useActiveModalizer:!0}),!ao))throw new Error("Something went wrong.");this._tabster.focusedElement.focus(ao);return}}to.blur()}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */const _inputSelector=["input","textarea","*[contenteditable]"].join(", ");class MoverDummyManager extends DummyInputManager{constructor(to,ro,no,oo){super(ro,to,DummyInputManagerPriorities.Mover,oo),this._onFocusDummyInput=io=>{var so,ao;const lo=this._element.get(),uo=io.input;if(lo&&uo){const co=RootAPI.getTabsterContext(this._tabster,lo);let fo;co&&(fo=(so=FocusedElementState.findNextTabbable(this._tabster,co,void 0,uo,void 0,!io.isFirst,!0))===null||so===void 0?void 0:so.element);const ho=(ao=this._getMemorized())===null||ao===void 0?void 0:ao.get();ho&&(fo=ho),fo&&nativeFocus(fo)}},this._tabster=ro,this._getMemorized=no,this._setHandlers(this._onFocusDummyInput)}}const _moverUpdateAdd=1,_moverUpdateAttr=2,_moverUpdateRemove=3;class Mover extends TabsterPart{constructor(to,ro,no,oo,io){var so;super(to,ro,oo),this._visible={},this._onIntersection=lo=>{for(const uo of lo){const co=uo.target,fo=getElementUId(this._win,co);let ho,po=this._fullyVisible;if(uo.intersectionRatio>=.25?(ho=uo.intersectionRatio>=.75?Visibilities.Visible:Visibilities.PartiallyVisible,ho===Visibilities.Visible&&(po=fo)):ho=Visibilities.Invisible,this._visible[fo]!==ho){ho===void 0?(delete this._visible[fo],po===fo&&delete this._fullyVisible):(this._visible[fo]=ho,this._fullyVisible=po);const go=this.getState(co);go&&triggerEvent(co,MoverEventName,go)}}},this._win=to.getWindow,this.visibilityTolerance=(so=oo.visibilityTolerance)!==null&&so!==void 0?so:.8,(this._props.trackState||this._props.visibilityAware)&&(this._intersectionObserver=new IntersectionObserver(this._onIntersection,{threshold:[0,.25,.5,.75,1]}),this._observeState()),this._onDispose=no;const ao=()=>oo.memorizeCurrent?this._current:void 0;to.controlTab||(this.dummyManager=new MoverDummyManager(this._element,to,ao,io))}dispose(){var to;this._onDispose(this),this._intersectionObserver&&(this._intersectionObserver.disconnect(),delete this._intersectionObserver),delete this._current,delete this._fullyVisible,delete this._allElements,delete this._updateQueue,this._unobserve&&(this._unobserve(),delete this._unobserve);const ro=this._win();this._setCurrentTimer&&(ro.clearTimeout(this._setCurrentTimer),delete this._setCurrentTimer),this._updateTimer&&(ro.clearTimeout(this._updateTimer),delete this._updateTimer),(to=this.dummyManager)===null||to===void 0||to.dispose(),delete this.dummyManager}setCurrent(to){to?this._current=new WeakHTMLElement(this._win,to):this._current=void 0,(this._props.trackState||this._props.visibilityAware)&&!this._setCurrentTimer&&(this._setCurrentTimer=this._win().setTimeout(()=>{var ro;delete this._setCurrentTimer;const no=[];this._current!==this._prevCurrent&&(no.push(this._current),no.push(this._prevCurrent),this._prevCurrent=this._current);for(const oo of no){const io=oo==null?void 0:oo.get();if(io&&((ro=this._allElements)===null||ro===void 0?void 0:ro.get(io))===this){const so=this._props;if(io&&(so.visibilityAware!==void 0||so.trackState)){const ao=this.getState(io);ao&&triggerEvent(io,MoverEventName,ao)}}}}))}getCurrent(){var to;return((to=this._current)===null||to===void 0?void 0:to.get())||null}findNextTabbable(to,ro,no,oo){var io;const so=this.getElement(),ao=so&&((io=to==null?void 0:to.__tabsterDummyContainer)===null||io===void 0?void 0:io.get())===so;if(!so)return null;let lo=null,uo=!1,co;if(this._props.tabbable||ao||to&&!so.contains(to)){const fo={currentElement:to,referenceElement:ro,container:so,ignoreAccessibility:oo,useActiveModalizer:!0},ho={};lo=this._tabster.focusable[no?"findPrev":"findNext"](fo,ho),uo=!!ho.outOfDOMOrder,co=ho.uncontrolled}return{element:lo,uncontrolled:co,outOfDOMOrder:uo}}acceptElement(to,ro){var no,oo,io;if(!FocusedElementState.isTabbing)return!((no=ro.currentCtx)===null||no===void 0)&&no.excludedFromMover?NodeFilter.FILTER_REJECT:void 0;const{memorizeCurrent:so,visibilityAware:ao,hasDefault:lo=!0}=this._props,uo=this.getElement();if(uo&&(so||ao||lo)&&(!uo.contains(ro.from)||((oo=ro.from.__tabsterDummyContainer)===null||oo===void 0?void 0:oo.get())===uo)){let co;if(so){const fo=(io=this._current)===null||io===void 0?void 0:io.get();fo&&ro.acceptCondition(fo)&&(co=fo)}if(!co&&lo&&(co=this._tabster.focusable.findDefault({container:uo,useActiveModalizer:!0})),!co&&ao&&(co=this._tabster.focusable.findElement({container:uo,useActiveModalizer:!0,isBackward:ro.isBackward,acceptCondition:fo=>{var ho;const po=getElementUId(this._win,fo),go=this._visible[po];return uo!==fo&&!!(!((ho=this._allElements)===null||ho===void 0)&&ho.get(fo))&&ro.acceptCondition(fo)&&(go===Visibilities.Visible||go===Visibilities.PartiallyVisible&&(ao===Visibilities.PartiallyVisible||!this._fullyVisible))}})),co)return ro.found=!0,ro.foundElement=co,ro.rejectElementsFrom=uo,ro.skippedFocusable=!0,NodeFilter.FILTER_ACCEPT}}_observeState(){const to=this.getElement();if(this._unobserve||!to||typeof MutationObserver>"u")return;const ro=this._win(),no=this._allElements=new WeakMap,oo=this._tabster.focusable;let io=this._updateQueue=[];const so=new MutationObserver(po=>{for(const go of po){const vo=go.target,bo=go.removedNodes,xo=go.addedNodes;if(go.type==="attributes")go.attributeName==="tabindex"&&io.push({element:vo,type:_moverUpdateAttr});else{for(let _o=0;_o{var vo,bo;const xo=no.get(po);xo&&go&&((vo=this._intersectionObserver)===null||vo===void 0||vo.unobserve(po),no.delete(po)),!xo&&!go&&(no.set(po,this),(bo=this._intersectionObserver)===null||bo===void 0||bo.observe(po))},lo=po=>{const go=oo.isFocusable(po);no.get(po)?go||ao(po,!0):go&&ao(po)},uo=po=>{const{mover:go}=ho(po);if(go&&go!==this)if(go.getElement()===po&&oo.isFocusable(po))ao(po);else return;const vo=createElementTreeWalker(ro.document,po,bo=>{const{mover:xo,groupper:_o}=ho(bo);if(xo&&xo!==this)return NodeFilter.FILTER_REJECT;const Eo=_o==null?void 0:_o.getFirst(!0);return _o&&_o.getElement()!==bo&&Eo&&Eo!==bo?NodeFilter.FILTER_REJECT:(oo.isFocusable(bo)&&ao(bo),NodeFilter.FILTER_SKIP)});if(vo)for(vo.currentNode=po;vo.nextNode(););},co=po=>{no.get(po)&&ao(po,!0);for(let vo=po.firstElementChild;vo;vo=vo.nextElementSibling)co(vo)},fo=()=>{!this._updateTimer&&io.length&&(this._updateTimer=ro.setTimeout(()=>{delete this._updateTimer;for(const{element:po,type:go}of io)switch(go){case _moverUpdateAttr:lo(po);break;case _moverUpdateAdd:uo(po);break;case _moverUpdateRemove:co(po);break}io=this._updateQueue=[]},0))},ho=po=>{const go={};for(let vo=po;vo;vo=vo.parentElement){const bo=getTabsterOnElement(this._tabster,vo);if(bo&&(bo.groupper&&!go.groupper&&(go.groupper=bo.groupper),bo.mover)){go.mover=bo.mover;break}}return go};io.push({element:to,type:_moverUpdateAdd}),fo(),so.observe(to,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex"]}),this._unobserve=()=>{so.disconnect()}}getState(to){const ro=getElementUId(this._win,to);if(ro in this._visible){const no=this._visible[ro]||Visibilities.Invisible;return{isCurrent:this._current?this._current.get()===to:void 0,visibility:no}}}}function getDistance(eo,to,ro,no,oo,io,so,ao){const lo=ro{this._win().addEventListener("keydown",this._onKeyDown,!0),this._tabster.focusedElement.subscribe(this._onFocus)},this._onMoverDispose=no=>{delete this._movers[no.id]},this._onFocus=no=>{var oo;let io=no,so=no;for(let ao=no==null?void 0:no.parentElement;ao;ao=ao.parentElement){const lo=(oo=getTabsterOnElement(this._tabster,ao))===null||oo===void 0?void 0:oo.mover;lo&&(lo.setCurrent(so),io=void 0),!io&&this._tabster.focusable.isFocusable(ao)&&(io=so=ao)}},this._onKeyDown=async no=>{var oo,io,so,ao;this._ignoredInputTimer&&(this._win().clearTimeout(this._ignoredInputTimer),delete this._ignoredInputTimer),(oo=this._ignoredInputResolve)===null||oo===void 0||oo.call(this,!1);let lo=no.keyCode;if(no.ctrlKey||no.altKey||no.shiftKey||no.metaKey)return;switch(lo){case Keys.Down:case Keys.Right:case Keys.Up:case Keys.Left:case Keys.PageDown:case Keys.PageUp:case Keys.Home:case Keys.End:break;default:return}const uo=this._tabster,co=uo.focusedElement.getFocusedElement();if(!co||await this._isIgnoredInput(co,lo))return;const fo=RootAPI.getTabsterContext(uo,co,{checkRtl:!0});if(!fo||!fo.mover||fo.excludedFromMover||fo.ignoreKeydown(no))return;const ho=fo.mover,po=ho.getElement();if(fo.groupperBeforeMover){const Mo=fo.groupper;if(Mo&&!Mo.isActive(!0)){for(let Do=(io=Mo.getElement())===null||io===void 0?void 0:io.parentElement;Do&&Do!==po;Do=Do.parentElement)if(!((ao=(so=getTabsterOnElement(uo,Do))===null||so===void 0?void 0:so.groupper)===null||ao===void 0)&&ao.isActive(!0))return}else return}if(!po)return;const go=uo.focusable,vo=ho.getProps(),bo=vo.direction||MoverDirections.Both,xo=bo===MoverDirections.Both,_o=xo||bo===MoverDirections.Vertical,Eo=xo||bo===MoverDirections.Horizontal,So=bo===MoverDirections.GridLinear,To=So||bo===MoverDirections.Grid,wo=vo.cyclic;let Co,Oo,Ao,Ro=0,No=0;if(To&&(Ao=co.getBoundingClientRect(),Ro=Math.ceil(Ao.left),No=Math.floor(Ao.right)),fo.rtl&&(lo===Keys.Right?lo=Keys.Left:lo===Keys.Left&&(lo=Keys.Right)),lo===Keys.Down&&_o||lo===Keys.Right&&(Eo||To))if(Co=go.findNext({currentElement:co,container:po,useActiveModalizer:!0}),Co&&To){const Mo=Math.ceil(Co.getBoundingClientRect().left);!So&&No>Mo&&(Co=void 0)}else!Co&&wo&&(Co=go.findFirst({container:po,useActiveModalizer:!0}));else if(lo===Keys.Up&&_o||lo===Keys.Left&&(Eo||To))if(Co=go.findPrev({currentElement:co,container:po,useActiveModalizer:!0}),Co&&To){const Mo=Math.floor(Co.getBoundingClientRect().right);!So&&Mo>Ro&&(Co=void 0)}else!Co&&wo&&(Co=go.findLast({container:po,useActiveModalizer:!0}));else if(lo===Keys.Home)To?go.findElement({container:po,currentElement:co,useActiveModalizer:!0,isBackward:!0,acceptCondition:Mo=>{var Do;if(!go.isFocusable(Mo))return!1;const jo=Math.ceil((Do=Mo.getBoundingClientRect().left)!==null&&Do!==void 0?Do:0);return Mo!==co&&Ro<=jo?!0:(Co=Mo,!1)}}):Co=go.findFirst({container:po,useActiveModalizer:!0});else if(lo===Keys.End)To?go.findElement({container:po,currentElement:co,useActiveModalizer:!0,acceptCondition:Mo=>{var Do;if(!go.isFocusable(Mo))return!1;const jo=Math.ceil((Do=Mo.getBoundingClientRect().left)!==null&&Do!==void 0?Do:0);return Mo!==co&&Ro>=jo?!0:(Co=Mo,!1)}}):Co=go.findLast({container:po,useActiveModalizer:!0});else if(lo===Keys.PageUp){if(go.findElement({currentElement:co,container:po,useActiveModalizer:!0,isBackward:!0,acceptCondition:Mo=>go.isFocusable(Mo)?isElementVerticallyVisibleInContainer(this._win,Mo,ho.visibilityTolerance)?(Co=Mo,!1):!0:!1}),To&&Co){const Mo=Math.ceil(Co.getBoundingClientRect().left);go.findElement({currentElement:Co,container:po,useActiveModalizer:!0,acceptCondition:Do=>{if(!go.isFocusable(Do))return!1;const jo=Math.ceil(Do.getBoundingClientRect().left);return Ro=jo?!0:(Co=Do,!1)}})}Oo=!1}else if(lo===Keys.PageDown){if(go.findElement({currentElement:co,container:po,useActiveModalizer:!0,acceptCondition:Mo=>go.isFocusable(Mo)?isElementVerticallyVisibleInContainer(this._win,Mo,ho.visibilityTolerance)?(Co=Mo,!1):!0:!1}),To&&Co){const Mo=Math.ceil(Co.getBoundingClientRect().left);go.findElement({currentElement:Co,container:po,useActiveModalizer:!0,isBackward:!0,acceptCondition:Do=>{if(!go.isFocusable(Do))return!1;const jo=Math.ceil(Do.getBoundingClientRect().left);return Ro>jo||Mo<=jo?!0:(Co=Do,!1)}})}Oo=!0}else if(To){const Mo=lo===Keys.Up,Do=Ro,jo=Math.ceil(Ao.top),Fo=No,$o=Math.floor(Ao.bottom);let Lo,Ho,qo=0;go.findAll({container:po,currentElement:co,isBackward:Mo,onElement:Uo=>{const Yo=Uo.getBoundingClientRect(),Zo=Math.ceil(Yo.left),_s=Math.ceil(Yo.top),Ss=Math.floor(Yo.right),As=Math.floor(Yo.bottom);if(Mo&&jo_s)return!0;const Ns=Math.ceil(Math.min(Fo,Ss))-Math.floor(Math.max(Do,Zo)),ws=Math.ceil(Math.min(Fo-Do,Ss-Zo));if(Ns>0&&ws>=Ns){const Ds=Ns/ws;Ds>qo&&(Lo=Uo,qo=Ds)}else if(qo===0){const Ds=getDistance(Do,jo,Fo,$o,Zo,_s,Ss,As);(Ho===void 0||Ds0)return!1;return!0}}),Co=Lo}Co&&triggerMoveFocusEvent({by:"mover",owner:po,next:Co,relatedEvent:no})&&(Oo!==void 0&&scrollIntoView$4(this._win,Co,Oo),no.preventDefault(),no.stopImmediatePropagation(),nativeFocus(Co))},this._tabster=to,this._win=ro,this._movers={},to.queueInit(this._init)}dispose(){var to;const ro=this._win();this._tabster.focusedElement.unsubscribe(this._onFocus),(to=this._ignoredInputResolve)===null||to===void 0||to.call(this,!1),this._ignoredInputTimer&&(ro.clearTimeout(this._ignoredInputTimer),delete this._ignoredInputTimer),ro.removeEventListener("keydown",this._onKeyDown,!0),Object.keys(this._movers).forEach(no=>{this._movers[no]&&(this._movers[no].dispose(),delete this._movers[no])})}createMover(to,ro,no){const oo=new Mover(this._tabster,to,this._onMoverDispose,ro,no);return this._movers[oo.id]=oo,oo}async _isIgnoredInput(to,ro){var no;if(to.getAttribute("aria-expanded")==="true"&&to.hasAttribute("aria-activedescendant"))return!0;if(matchesSelector(to,_inputSelector)){let oo=0,io=0,so=0,ao;if(to.tagName==="INPUT"||to.tagName==="TEXTAREA"){const lo=to.type;if(so=(to.value||"").length,lo==="email"||lo==="number"){if(so){const co=(no=to.ownerDocument.defaultView)===null||no===void 0?void 0:no.getSelection();if(co){const fo=co.toString().length,ho=ro===Keys.Left||ro===Keys.Up;if(co.modify("extend",ho?"backward":"forward","character"),fo!==co.toString().length)return co.modify("extend",ho?"forward":"backward","character"),!0;so=0}}}else{const co=to.selectionStart;if(co===null)return lo==="hidden";oo=co||0,io=to.selectionEnd||0}}else to.contentEditable==="true"&&(ao=new(getPromise(this._win))(lo=>{this._ignoredInputResolve=go=>{delete this._ignoredInputResolve,lo(go)};const uo=this._win();this._ignoredInputTimer&&uo.clearTimeout(this._ignoredInputTimer);const{anchorNode:co,focusNode:fo,anchorOffset:ho,focusOffset:po}=uo.getSelection()||{};this._ignoredInputTimer=uo.setTimeout(()=>{var go,vo,bo;delete this._ignoredInputTimer;const{anchorNode:xo,focusNode:_o,anchorOffset:Eo,focusOffset:So}=uo.getSelection()||{};if(xo!==co||_o!==fo||Eo!==ho||So!==po){(go=this._ignoredInputResolve)===null||go===void 0||go.call(this,!1);return}if(oo=Eo||0,io=So||0,so=((vo=to.textContent)===null||vo===void 0?void 0:vo.length)||0,xo&&_o&&to.contains(xo)&&to.contains(_o)&&xo!==to){let To=!1;const wo=Co=>{if(Co===xo)To=!0;else if(Co===_o)return!0;const Oo=Co.textContent;if(Oo&&!Co.firstChild){const Ro=Oo.length;To?_o!==xo&&(io+=Ro):(oo+=Ro,io+=Ro)}let Ao=!1;for(let Ro=Co.firstChild;Ro&&!Ao;Ro=Ro.nextSibling)Ao=wo(Ro);return Ao};wo(to)}(bo=this._ignoredInputResolve)===null||bo===void 0||bo.call(this,!0)},0)}));if(ao&&!await ao||oo!==io||oo>0&&(ro===Keys.Left||ro===Keys.Up||ro===Keys.Home)||oo"u")return()=>{};const oo=to.getWindow;let io;const so=co=>{var fo,ho,po,go,vo;for(const bo of co){const xo=bo.target,_o=bo.removedNodes,Eo=bo.addedNodes;if(bo.type==="attributes")bo.attributeName===TabsterAttributeName&&ro(to,xo);else{for(let So=0;So<_o.length;So++)ao(_o[So],!0),(ho=(fo=to._dummyObserver).domChanged)===null||ho===void 0||ho.call(fo,xo);for(let So=0;Solo(po,fo));if(ho)for(;ho.nextNode(););}function lo(co,fo){var ho;if(!co.getAttribute)return NodeFilter.FILTER_SKIP;const po=co.__tabsterElementUID;return po&&io&&(fo?delete io[po]:(ho=io[po])!==null&&ho!==void 0||(io[po]=new WeakHTMLElement(oo,co))),(getTabsterOnElement(to,co)||co.hasAttribute(TabsterAttributeName))&&ro(to,co,fo),NodeFilter.FILTER_SKIP}const uo=new MutationObserver(so);return no&&ao(oo().document.body),uo.observe(eo,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[TabsterAttributeName]}),()=>{uo.disconnect()}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */class UncontrolledAPI{constructor(to){this._isUncontrolledCompletely=to}isUncontrolledCompletely(to,ro){var no;const oo=(no=this._isUncontrolledCompletely)===null||no===void 0?void 0:no.call(this,to,ro);return oo===void 0?ro:oo}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */const EVENT_NAME="restorer:restorefocus",HISOTRY_DEPTH=10;class Restorer extends TabsterPart{constructor(to,ro,no){var oo;if(super(to,ro,no),this._hasFocus=!1,this._onFocusOut=io=>{var so;const ao=(so=this._element)===null||so===void 0?void 0:so.get();ao&&io.relatedTarget===null&&ao.dispatchEvent(new Event(EVENT_NAME,{bubbles:!0})),ao&&!ao.contains(io.relatedTarget)&&(this._hasFocus=!1)},this._onFocusIn=()=>{this._hasFocus=!0},this._props.type===RestorerTypes.Source){const io=(oo=this._element)===null||oo===void 0?void 0:oo.get();io==null||io.addEventListener("focusout",this._onFocusOut),io==null||io.addEventListener("focusin",this._onFocusIn)}}dispose(){var to,ro;if(this._props.type===RestorerTypes.Source){const no=(to=this._element)===null||to===void 0?void 0:to.get();no==null||no.removeEventListener("focusout",this._onFocusOut),no==null||no.removeEventListener("focusin",this._onFocusIn),this._hasFocus&&((ro=this._tabster.getWindow().document.body)===null||ro===void 0||ro.dispatchEvent(new Event(EVENT_NAME,{bubbles:!0})))}}}class RestorerAPI{constructor(to){this._history=[],this._restoreFocusTimeout=0,this._onRestoreFocus=ro=>{const no=this._getWindow();this._restoreFocusTimeout&&no.clearTimeout(this._restoreFocusTimeout),this._restoreFocusTimeout=no.setTimeout(()=>this._restoreFocus(ro.target))},this._onFocusIn=ro=>{var no;if(!ro)return;const oo=getTabsterOnElement(this._tabster,ro);((no=oo==null?void 0:oo.restorer)===null||no===void 0?void 0:no.getProps().type)===RestorerTypes.Target&&this._addToHistory(ro)},this._restoreFocus=ro=>{var no,oo,io;const so=this._getWindow().document;if(so.activeElement!==so.body||!this._keyboardNavState.isNavigatingWithKeyboard()&&so.body.contains(ro))return;let ao=this._history.pop();for(;ao&&!so.body.contains((oo=(no=ao.get())===null||no===void 0?void 0:no.parentElement)!==null&&oo!==void 0?oo:null);)ao=this._history.pop();(io=ao==null?void 0:ao.get())===null||io===void 0||io.focus()},this._tabster=to,this._getWindow=to.getWindow,this._getWindow().addEventListener(EVENT_NAME,this._onRestoreFocus),this._keyboardNavState=to.keyboardNavigation,this._focusedElementState=to.focusedElement,this._focusedElementState.subscribe(this._onFocusIn)}dispose(){const to=this._getWindow();this._focusedElementState.unsubscribe(this._onFocusIn),to.removeEventListener(EVENT_NAME,this._onRestoreFocus),this._restoreFocusTimeout&&to.clearTimeout(this._restoreFocusTimeout)}_addToHistory(to){var ro;((ro=this._history[this._history.length-1])===null||ro===void 0?void 0:ro.get())!==to&&(this._history.length>HISOTRY_DEPTH&&this._history.shift(),this._history.push(new WeakHTMLElement(this._getWindow,to)))}createRestorer(to,ro){const no=new Restorer(this._tabster,to,ro);return ro.type===RestorerTypes.Target&&to.ownerDocument.activeElement===to&&this._addToHistory(to),no}}/*! + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */class Tabster{constructor(to){this.keyboardNavigation=to.keyboardNavigation,this.focusedElement=to.focusedElement,this.focusable=to.focusable,this.root=to.root,this.uncontrolled=to.uncontrolled,this.core=to}}class TabsterCore{constructor(to,ro){var no,oo;this._forgetMemorizedElements=[],this._wrappers=new Set,this._initQueue=[],this._version="5.2.0",this._noop=!1,this.getWindow=()=>{if(!this._win)throw new Error("Using disposed Tabster.");return this._win},this._storage=createWeakMap(to),this._win=to;const io=this.getWindow;this.keyboardNavigation=new KeyboardNavigationState(io),this.focusedElement=new FocusedElementState(this,io),this.focusable=new FocusableAPI(this),this.root=new RootAPI(this,ro==null?void 0:ro.autoRoot),this.uncontrolled=new UncontrolledAPI((ro==null?void 0:ro.checkUncontrolledCompletely)||(ro==null?void 0:ro.checkUncontrolledTrappingFocus)),this.controlTab=(no=ro==null?void 0:ro.controlTab)!==null&&no!==void 0?no:!0,this.rootDummyInputs=!!(ro!=null&&ro.rootDummyInputs),this._dummyObserver=new DummyInputObserver(io),this.getParent=(oo=ro==null?void 0:ro.getParent)!==null&&oo!==void 0?oo:so=>so.parentElement,this.internal={stopObserver:()=>{this._unobserve&&(this._unobserve(),delete this._unobserve)},resumeObserver:so=>{if(!this._unobserve){const ao=io().document;this._unobserve=observeMutations(ao,this,updateTabsterByAttribute,so)}}},startFakeWeakRefsCleanup(io),this.queueInit(()=>{this.internal.resumeObserver(!0)})}_mergeProps(to){var ro;to&&(this.getParent=(ro=to.getParent)!==null&&ro!==void 0?ro:this.getParent)}createTabster(to,ro){const no=new Tabster(this);return to||this._wrappers.add(no),this._mergeProps(ro),no}disposeTabster(to,ro){ro?this._wrappers.clear():this._wrappers.delete(to),this._wrappers.size===0&&this.dispose()}dispose(){var to,ro,no,oo,io,so,ao,lo;this.internal.stopObserver();const uo=this._win;uo==null||uo.clearTimeout(this._initTimer),delete this._initTimer,this._initQueue=[],this._forgetMemorizedElements=[],uo&&this._forgetMemorizedTimer&&(uo.clearTimeout(this._forgetMemorizedTimer),delete this._forgetMemorizedTimer),(to=this.outline)===null||to===void 0||to.dispose(),(ro=this.crossOrigin)===null||ro===void 0||ro.dispose(),(no=this.deloser)===null||no===void 0||no.dispose(),(oo=this.groupper)===null||oo===void 0||oo.dispose(),(io=this.mover)===null||io===void 0||io.dispose(),(so=this.modalizer)===null||so===void 0||so.dispose(),(ao=this.observedElement)===null||ao===void 0||ao.dispose(),(lo=this.restorer)===null||lo===void 0||lo.dispose(),this.keyboardNavigation.dispose(),this.focusable.dispose(),this.focusedElement.dispose(),this.root.dispose(),this._dummyObserver.dispose(),stopFakeWeakRefsCleanupAndClearStorage(this.getWindow),clearElementCache(this.getWindow),this._storage=new WeakMap,this._wrappers.clear(),uo&&(disposeInstanceContext(uo),delete uo.__tabsterInstance,delete this._win)}storageEntry(to,ro){const no=this._storage;let oo=no.get(to);return oo?ro===!1&&Object.keys(oo).length===0&&no.delete(to):ro===!0&&(oo={},no.set(to,oo)),oo}forceCleanup(){this._win&&(this._forgetMemorizedElements.push(this._win.document.body),!this._forgetMemorizedTimer&&(this._forgetMemorizedTimer=this._win.setTimeout(()=>{delete this._forgetMemorizedTimer;for(let to=this._forgetMemorizedElements.shift();to;to=this._forgetMemorizedElements.shift())clearElementCache(this.getWindow,to),FocusedElementState.forgetMemorized(this.focusedElement,to)},0),cleanupFakeWeakRefs(this.getWindow,!0)))}queueInit(to){var ro;this._win&&(this._initQueue.push(to),this._initTimer||(this._initTimer=(ro=this._win)===null||ro===void 0?void 0:ro.setTimeout(()=>{delete this._initTimer,this.drainInitQueue()},0)))}drainInitQueue(){if(!this._win)return;const to=this._initQueue;this._initQueue=[],to.forEach(ro=>ro())}}function createTabster(eo,to){let ro=getCurrentTabster(eo);return ro?ro.createTabster(!1,to):(ro=new TabsterCore(eo,to),eo.__tabsterInstance=ro,ro.createTabster())}function getGroupper(eo){const to=eo.core;return to.groupper||(to.groupper=new GroupperAPI(to,to.getWindow)),to.groupper}function getMover(eo){const to=eo.core;return to.mover||(to.mover=new MoverAPI(to,to.getWindow)),to.mover}function getModalizer(eo,to,ro){const no=eo.core;return no.modalizer||(no.modalizer=new ModalizerAPI(no,to,ro)),no.modalizer}function getRestorer(eo){const to=eo.core;return to.restorer||(to.restorer=new RestorerAPI(to)),to.restorer}function disposeTabster(eo,to){eo.core.disposeTabster(eo,to)}function getCurrentTabster(eo){return eo.__tabsterInstance}const useTabster=()=>{const{targetDocument:eo}=useFluent(),to=(eo==null?void 0:eo.defaultView)||void 0,ro=reactExports.useMemo(()=>to?createTabster(to,{autoRoot:{},controlTab:!1,getParent:getParent$1,checkUncontrolledTrappingFocus:no=>{var oo;return!!(!((oo=no.firstElementChild)===null||oo===void 0)&&oo.hasAttribute("data-is-focus-trap-zone-bumper"))}}):null,[to]);return useIsomorphicLayoutEffect$1(()=>()=>{ro&&disposeTabster(ro)},[ro]),ro},useTabsterAttributes=eo=>(useTabster(),getTabsterAttribute(eo)),useArrowNavigationGroup=(eo={})=>{const{circular:to,axis:ro,memorizeCurrent:no,tabbable:oo,ignoreDefaultKeydown:io,unstable_hasDefault:so}=eo,ao=useTabster();return ao&&getMover(ao),useTabsterAttributes({mover:{cyclic:!!to,direction:axisToMoverDirection(ro??"vertical"),memorizeCurrent:no,tabbable:oo,hasDefault:so},...io&&{focusable:{ignoreKeydown:io}}})};function axisToMoverDirection(eo){switch(eo){case"horizontal":return Types.MoverDirections.Horizontal;case"grid":return Types.MoverDirections.Grid;case"grid-linear":return Types.MoverDirections.GridLinear;case"both":return Types.MoverDirections.Both;case"vertical":default:return Types.MoverDirections.Vertical}}const useFocusableGroup=eo=>{const to=useTabster();return to&&getGroupper(to),useTabsterAttributes({groupper:{tabbability:getTabbability(eo==null?void 0:eo.tabBehavior)},focusable:{ignoreKeydown:eo==null?void 0:eo.ignoreDefaultKeydown}})},getTabbability=eo=>{switch(eo){case"unlimited":return Types.GroupperTabbabilities.Unlimited;case"limited":return Types.GroupperTabbabilities.Limited;case"limited-trap-focus":return Types.GroupperTabbabilities.LimitedTrapFocus;default:return}},useFocusFinders=()=>{const eo=useTabster(),{targetDocument:to}=useFluent(),ro=reactExports.useCallback((ao,lo)=>(eo==null?void 0:eo.focusable.findAll({container:ao,acceptCondition:lo}))||[],[eo]),no=reactExports.useCallback(ao=>eo==null?void 0:eo.focusable.findFirst({container:ao}),[eo]),oo=reactExports.useCallback(ao=>eo==null?void 0:eo.focusable.findLast({container:ao}),[eo]),io=reactExports.useCallback((ao,lo={})=>{if(!eo||!to)return null;const{container:uo=to.body}=lo;return eo.focusable.findNext({currentElement:ao,container:uo})},[eo,to]),so=reactExports.useCallback((ao,lo={})=>{if(!eo||!to)return null;const{container:uo=to.body}=lo;return eo.focusable.findPrev({currentElement:ao,container:uo})},[eo,to]);return{findAllFocusable:ro,findFirstFocusable:no,findLastFocusable:oo,findNextFocusable:io,findPrevFocusable:so}},FOCUS_VISIBLE_ATTR="data-fui-focus-visible",FOCUS_WITHIN_ATTR="data-fui-focus-within";function applyFocusVisiblePolyfill(eo,to){if(alreadyInScope(eo))return()=>{};const ro={current:void 0},no=createKeyborg(to);function oo(lo){no.isNavigatingWithKeyboard()&&isHTMLElement$6(lo)&&(ro.current=lo,lo.setAttribute(FOCUS_VISIBLE_ATTR,""))}function io(){ro.current&&(ro.current.removeAttribute(FOCUS_VISIBLE_ATTR),ro.current=void 0)}no.subscribe(lo=>{lo||io()});const so=lo=>{io();const uo=lo.composedPath()[0];oo(uo)},ao=lo=>{(!lo.relatedTarget||isHTMLElement$6(lo.relatedTarget)&&!eo.contains(lo.relatedTarget))&&io()};return eo.addEventListener(KEYBORG_FOCUSIN,so),eo.addEventListener("focusout",ao),eo.focusVisible=!0,oo(to.document.activeElement),()=>{io(),eo.removeEventListener(KEYBORG_FOCUSIN,so),eo.removeEventListener("focusout",ao),delete eo.focusVisible,disposeKeyborg(no)}}function alreadyInScope(eo){return eo?eo.focusVisible?!0:alreadyInScope(eo==null?void 0:eo.parentElement):!1}function useFocusVisible(eo={}){const to=useFluent(),ro=reactExports.useRef(null);var no;const oo=(no=eo.targetDocument)!==null&&no!==void 0?no:to.targetDocument;return reactExports.useEffect(()=>{if(oo!=null&&oo.defaultView&&ro.current)return applyFocusVisiblePolyfill(ro.current,oo.defaultView)},[ro,oo]),ro}function applyFocusWithinPolyfill(eo,to){const ro=createKeyborg(to);ro.subscribe(io=>{io||removeFocusWithinClass(eo)});const no=io=>{ro.isNavigatingWithKeyboard()&&isHTMLElement$5(io.target)&&applyFocusWithinClass(eo)},oo=io=>{(!io.relatedTarget||isHTMLElement$5(io.relatedTarget)&&!eo.contains(io.relatedTarget))&&removeFocusWithinClass(eo)};return eo.addEventListener(KEYBORG_FOCUSIN,no),eo.addEventListener("focusout",oo),()=>{eo.removeEventListener(KEYBORG_FOCUSIN,no),eo.removeEventListener("focusout",oo),disposeKeyborg(ro)}}function applyFocusWithinClass(eo){eo.setAttribute(FOCUS_WITHIN_ATTR,"")}function removeFocusWithinClass(eo){eo.removeAttribute(FOCUS_WITHIN_ATTR)}function isHTMLElement$5(eo){return eo?!!(eo&&typeof eo=="object"&&"classList"in eo&&"contains"in eo):!1}function useFocusWithin(){const{targetDocument:eo}=useFluent(),to=reactExports.useRef(null);return reactExports.useEffect(()=>{if(eo!=null&&eo.defaultView&&to.current)return applyFocusWithinPolyfill(to.current,eo.defaultView)},[to,eo]),to}const useModalAttributes=(eo={})=>{const{trapFocus:to,alwaysFocusable:ro,legacyTrapFocus:no}=eo,oo=useTabster();oo&&(getModalizer(oo),getRestorer(oo));const io=useId$1("modal-",eo.id),so=useTabsterAttributes({restorer:{type:Types.RestorerTypes.Source},...to&&{modalizer:{id:io,isOthersAccessible:!to,isAlwaysAccessible:ro,isTrapped:no&&to}}}),ao=useTabsterAttributes({restorer:{type:Types.RestorerTypes.Target}});return{modalAttributes:so,triggerAttributes:ao}},grey={2:"#050505",4:"#0a0a0a",6:"#0f0f0f",8:"#141414",10:"#1a1a1a",12:"#1f1f1f",14:"#242424",16:"#292929",18:"#2e2e2e",20:"#333333",22:"#383838",24:"#3d3d3d",26:"#424242",28:"#474747",30:"#4d4d4d",32:"#525252",34:"#575757",36:"#5c5c5c",38:"#616161",40:"#666666",42:"#6b6b6b",44:"#707070",46:"#757575",48:"#7a7a7a",50:"#808080",52:"#858585",54:"#8a8a8a",56:"#8f8f8f",58:"#949494",60:"#999999",62:"#9e9e9e",64:"#a3a3a3",66:"#a8a8a8",68:"#adadad",70:"#b3b3b3",72:"#b8b8b8",74:"#bdbdbd",76:"#c2c2c2",78:"#c7c7c7",80:"#cccccc",82:"#d1d1d1",84:"#d6d6d6",86:"#dbdbdb",88:"#e0e0e0",90:"#e6e6e6",92:"#ebebeb",94:"#f0f0f0",96:"#f5f5f5",98:"#fafafa"},whiteAlpha={5:"rgba(255, 255, 255, 0.05)",10:"rgba(255, 255, 255, 0.1)",20:"rgba(255, 255, 255, 0.2)",30:"rgba(255, 255, 255, 0.3)",40:"rgba(255, 255, 255, 0.4)",50:"rgba(255, 255, 255, 0.5)",60:"rgba(255, 255, 255, 0.6)",70:"rgba(255, 255, 255, 0.7)",80:"rgba(255, 255, 255, 0.8)",90:"rgba(255, 255, 255, 0.9)"},blackAlpha={5:"rgba(0, 0, 0, 0.05)",10:"rgba(0, 0, 0, 0.1)",20:"rgba(0, 0, 0, 0.2)",30:"rgba(0, 0, 0, 0.3)",40:"rgba(0, 0, 0, 0.4)",50:"rgba(0, 0, 0, 0.5)",60:"rgba(0, 0, 0, 0.6)",70:"rgba(0, 0, 0, 0.7)",80:"rgba(0, 0, 0, 0.8)",90:"rgba(0, 0, 0, 0.9)"},grey10Alpha={5:"rgba(26, 26, 26, 0.05)",10:"rgba(26, 26, 26, 0.1)",20:"rgba(26, 26, 26, 0.2)",30:"rgba(26, 26, 26, 0.3)",40:"rgba(26, 26, 26, 0.4)",50:"rgba(26, 26, 26, 0.5)",60:"rgba(26, 26, 26, 0.6)",70:"rgba(26, 26, 26, 0.7)",80:"rgba(26, 26, 26, 0.8)",90:"rgba(26, 26, 26, 0.9)"},grey12Alpha={5:"rgba(31, 31, 31, 0.05)",10:"rgba(31, 31, 31, 0.1)",20:"rgba(31, 31, 31, 0.2)",30:"rgba(31, 31, 31, 0.3)",40:"rgba(31, 31, 31, 0.4)",50:"rgba(31, 31, 31, 0.5)",60:"rgba(31, 31, 31, 0.6)",70:"rgba(31, 31, 31, 0.7)",80:"rgba(31, 31, 31, 0.8)",90:"rgba(31, 31, 31, 0.9)"},grey14Alpha={5:"rgba(36, 36, 36, 0.05)",10:"rgba(36, 36, 36, 0.1)",20:"rgba(36, 36, 36, 0.2)",30:"rgba(36, 36, 36, 0.3)",40:"rgba(36, 36, 36, 0.4)",50:"rgba(36, 36, 36, 0.5)",60:"rgba(36, 36, 36, 0.6)",70:"rgba(36, 36, 36, 0.7)",80:"rgba(36, 36, 36, 0.8)",90:"rgba(36, 36, 36, 0.9)"},white="#ffffff",black="#000000",darkRed={shade50:"#130204",shade40:"#230308",shade30:"#420610",shade20:"#590815",shade10:"#690a19",primary:"#750b1c",tint10:"#861b2c",tint20:"#962f3f",tint30:"#ac4f5e",tint40:"#d69ca5",tint50:"#e9c7cd",tint60:"#f9f0f2"},cranberry={shade50:"#200205",shade40:"#3b0509",shade30:"#6e0811",shade20:"#960b18",shade10:"#b10e1c",primary:"#c50f1f",tint10:"#cc2635",tint20:"#d33f4c",tint30:"#dc626d",tint40:"#eeacb2",tint50:"#f6d1d5",tint60:"#fdf3f4"},red={shade50:"#210809",shade40:"#3f1011",shade30:"#751d1f",shade20:"#9f282b",shade10:"#bc2f32",primary:"#d13438",tint10:"#d7494c",tint20:"#dc5e62",tint30:"#e37d80",tint40:"#f1bbbc",tint50:"#f8dadb",tint60:"#fdf6f6"},darkOrange={shade50:"#230900",shade40:"#411200",shade30:"#7a2101",shade20:"#a62d01",shade10:"#c43501",primary:"#da3b01",tint10:"#de501c",tint20:"#e36537",tint30:"#e9835e",tint40:"#f4bfab",tint50:"#f9dcd1",tint60:"#fdf6f3"},pumpkin={shade50:"#200d03",shade40:"#3d1805",shade30:"#712d09",shade20:"#9a3d0c",shade10:"#b6480e",primary:"#ca5010",tint10:"#d06228",tint20:"#d77440",tint30:"#df8e64",tint40:"#efc4ad",tint50:"#f7dfd2",tint60:"#fdf7f4"},orange={shade50:"#271002",shade40:"#4a1e04",shade30:"#8a3707",shade20:"#bc4b09",shade10:"#de590b",primary:"#f7630c",tint10:"#f87528",tint20:"#f98845",tint30:"#faa06b",tint40:"#fdcfb4",tint50:"#fee5d7",tint60:"#fff9f5"},peach={shade50:"#291600",shade40:"#4d2a00",shade30:"#8f4e00",shade20:"#c26a00",shade10:"#e67e00",primary:"#ff8c00",tint10:"#ff9a1f",tint20:"#ffa83d",tint30:"#ffba66",tint40:"#ffddb3",tint50:"#ffedd6",tint60:"#fffaf5"},marigold={shade50:"#251a00",shade40:"#463100",shade30:"#835b00",shade20:"#b27c00",shade10:"#d39300",primary:"#eaa300",tint10:"#edad1c",tint20:"#efb839",tint30:"#f2c661",tint40:"#f9e2ae",tint50:"#fcefd3",tint60:"#fefbf4"},yellow={primary:"#fde300",shade10:"#e4cc00",shade20:"#c0ad00",shade30:"#817400",shade40:"#4c4400",shade50:"#282400",tint10:"#fde61e",tint20:"#fdea3d",tint30:"#feee66",tint40:"#fef7b2",tint50:"#fffad6",tint60:"#fffef5"},gold={shade50:"#1f1900",shade40:"#3a2f00",shade30:"#6c5700",shade20:"#937700",shade10:"#ae8c00",primary:"#c19c00",tint10:"#c8a718",tint20:"#d0b232",tint30:"#dac157",tint40:"#ecdfa5",tint50:"#f5eece",tint60:"#fdfbf2"},brass={shade50:"#181202",shade40:"#2e2103",shade30:"#553e06",shade20:"#745408",shade10:"#89640a",primary:"#986f0b",tint10:"#a47d1e",tint20:"#b18c34",tint30:"#c1a256",tint40:"#e0cea2",tint50:"#efe4cb",tint60:"#fbf8f2"},brown={shade50:"#170e07",shade40:"#2b1a0e",shade30:"#50301a",shade20:"#6c4123",shade10:"#804d29",primary:"#8e562e",tint10:"#9c663f",tint20:"#a97652",tint30:"#bb8f6f",tint40:"#ddc3b0",tint50:"#edded3",tint60:"#faf7f4"},forest={shade50:"#0c1501",shade40:"#162702",shade30:"#294903",shade20:"#376304",shade10:"#427505",primary:"#498205",tint10:"#599116",tint20:"#6ba02b",tint30:"#85b44c",tint40:"#bdd99b",tint50:"#dbebc7",tint60:"#f6faf0"},seafoam={shade50:"#002111",shade40:"#003d20",shade30:"#00723b",shade20:"#009b51",shade10:"#00b85f",primary:"#00cc6a",tint10:"#19d279",tint20:"#34d889",tint30:"#5ae0a0",tint40:"#a8f0cd",tint50:"#cff7e4",tint60:"#f3fdf8"},lightGreen={shade50:"#031a02",shade40:"#063004",shade30:"#0b5a08",shade20:"#0e7a0b",shade10:"#11910d",primary:"#13a10e",tint10:"#27ac22",tint20:"#3db838",tint30:"#5ec75a",tint40:"#a7e3a5",tint50:"#cef0cd",tint60:"#f2fbf2"},green={shade50:"#031403",shade40:"#052505",shade30:"#094509",shade20:"#0c5e0c",shade10:"#0e700e",primary:"#107c10",tint10:"#218c21",tint20:"#359b35",tint30:"#54b054",tint40:"#9fd89f",tint50:"#c9eac9",tint60:"#f1faf1"},darkGreen={shade50:"#021102",shade40:"#032003",shade30:"#063b06",shade20:"#085108",shade10:"#0a5f0a",primary:"#0b6a0b",tint10:"#1a7c1a",tint20:"#2d8e2d",tint30:"#4da64d",tint40:"#9ad29a",tint50:"#c6e7c6",tint60:"#f0f9f0"},lightTeal={shade50:"#001d1f",shade40:"#00373a",shade30:"#00666d",shade20:"#008b94",shade10:"#00a5af",primary:"#00b7c3",tint10:"#18bfca",tint20:"#32c8d1",tint30:"#58d3db",tint40:"#a6e9ed",tint50:"#cef3f5",tint60:"#f2fcfd"},teal={shade50:"#001516",shade40:"#012728",shade30:"#02494c",shade20:"#026467",shade10:"#037679",primary:"#038387",tint10:"#159195",tint20:"#2aa0a4",tint30:"#4cb4b7",tint40:"#9bd9db",tint50:"#c7ebec",tint60:"#f0fafa"},steel={shade50:"#000f12",shade40:"#001b22",shade30:"#00333f",shade20:"#004555",shade10:"#005265",primary:"#005b70",tint10:"#0f6c81",tint20:"#237d92",tint30:"#4496a9",tint40:"#94c8d4",tint50:"#c3e1e8",tint60:"#eff7f9"},blue={shade50:"#001322",shade40:"#002440",shade30:"#004377",shade20:"#005ba1",shade10:"#006cbf",primary:"#0078d4",tint10:"#1a86d9",tint20:"#3595de",tint30:"#5caae5",tint40:"#a9d3f2",tint50:"#d0e7f8",tint60:"#f3f9fd"},royalBlue={shade50:"#000c16",shade40:"#00172a",shade30:"#002c4e",shade20:"#003b6a",shade10:"#00467e",primary:"#004e8c",tint10:"#125e9a",tint20:"#286fa8",tint30:"#4a89ba",tint40:"#9abfdc",tint50:"#c7dced",tint60:"#f0f6fa"},cornflower={shade50:"#0d1126",shade40:"#182047",shade30:"#2c3c85",shade20:"#3c51b4",shade10:"#4760d5",primary:"#4f6bed",tint10:"#637cef",tint20:"#778df1",tint30:"#93a4f4",tint40:"#c8d1fa",tint50:"#e1e6fc",tint60:"#f7f9fe"},navy={shade50:"#00061d",shade40:"#000c36",shade30:"#001665",shade20:"#001e89",shade10:"#0023a2",primary:"#0027b4",tint10:"#173bbd",tint20:"#3050c6",tint30:"#546fd2",tint40:"#a3b2e8",tint50:"#ccd5f3",tint60:"#f2f4fc"},lavender={shade50:"#120f25",shade40:"#221d46",shade30:"#3f3682",shade20:"#5649b0",shade10:"#6656d1",primary:"#7160e8",tint10:"#8172eb",tint20:"#9184ee",tint30:"#a79cf1",tint40:"#d2ccf8",tint50:"#e7e4fb",tint60:"#f9f8fe"},purple={shade50:"#0f0717",shade40:"#1c0e2b",shade30:"#341a51",shade20:"#46236e",shade10:"#532982",primary:"#5c2e91",tint10:"#6b3f9e",tint20:"#7c52ab",tint30:"#9470bd",tint40:"#c6b1de",tint50:"#e0d3ed",tint60:"#f7f4fb"},grape={shade50:"#160418",shade40:"#29072e",shade30:"#4c0d55",shade20:"#671174",shade10:"#7a1589",primary:"#881798",tint10:"#952aa4",tint20:"#a33fb1",tint30:"#b55fc1",tint40:"#d9a7e0",tint50:"#eaceef",tint60:"#faf2fb"},berry={shade50:"#1f091d",shade40:"#3a1136",shade30:"#6d2064",shade20:"#932b88",shade10:"#af33a1",primary:"#c239b3",tint10:"#c94cbc",tint20:"#d161c4",tint30:"#da7ed0",tint40:"#edbbe7",tint50:"#f5daf2",tint60:"#fdf5fc"},lilac={shade50:"#1c0b1f",shade40:"#35153a",shade30:"#63276d",shade20:"#863593",shade10:"#9f3faf",primary:"#b146c2",tint10:"#ba58c9",tint20:"#c36bd1",tint30:"#cf87da",tint40:"#e6bfed",tint50:"#f2dcf5",tint60:"#fcf6fd"},pink={shade50:"#24091b",shade40:"#441232",shade30:"#80215d",shade20:"#ad2d7e",shade10:"#cd3595",primary:"#e43ba6",tint10:"#e750b0",tint20:"#ea66ba",tint30:"#ef85c8",tint40:"#f7c0e3",tint50:"#fbddf0",tint60:"#fef6fb"},magenta={shade50:"#1f0013",shade40:"#390024",shade30:"#6b0043",shade20:"#91005a",shade10:"#ac006b",primary:"#bf0077",tint10:"#c71885",tint20:"#ce3293",tint30:"#d957a8",tint40:"#eca5d1",tint50:"#f5cee6",tint60:"#fcf2f9"},plum={shade50:"#13000c",shade40:"#240017",shade30:"#43002b",shade20:"#5a003b",shade10:"#6b0045",primary:"#77004d",tint10:"#87105d",tint20:"#98246f",tint30:"#ad4589",tint40:"#d696c0",tint50:"#e9c4dc",tint60:"#faf0f6"},beige={shade50:"#141313",shade40:"#252323",shade30:"#444241",shade20:"#5d5958",shade10:"#6e6968",primary:"#7a7574",tint10:"#8a8584",tint20:"#9a9594",tint30:"#afabaa",tint40:"#d7d4d4",tint50:"#eae8e8",tint60:"#faf9f9"},mink={shade50:"#0f0e0e",shade40:"#1c1b1a",shade30:"#343231",shade20:"#474443",shade10:"#54514f",primary:"#5d5a58",tint10:"#706d6b",tint20:"#84817e",tint30:"#9e9b99",tint40:"#cecccb",tint50:"#e5e4e3",tint60:"#f8f8f8"},platinum={shade50:"#111314",shade40:"#1f2426",shade30:"#3b4447",shade20:"#505c60",shade10:"#5f6d71",primary:"#69797e",tint10:"#79898d",tint20:"#89989d",tint30:"#a0adb2",tint40:"#cdd6d8",tint50:"#e4e9ea",tint60:"#f8f9fa"},anchor={shade50:"#090a0b",shade40:"#111315",shade30:"#202427",shade20:"#2b3135",shade10:"#333a3f",primary:"#394146",tint10:"#4d565c",tint20:"#626c72",tint30:"#808a90",tint40:"#bcc3c7",tint50:"#dbdfe1",tint60:"#f6f7f8"},statusSharedColors={red,green,darkOrange,yellow,berry,lightGreen,marigold},personaSharedColors={darkRed,cranberry,pumpkin,peach,gold,brass,brown,forest,seafoam,darkGreen,lightTeal,teal,steel,blue,royalBlue,cornflower,navy,lavender,purple,grape,lilac,pink,magenta,plum,beige,mink,platinum,anchor},mappedStatusColors={cranberry,green,orange},statusSharedColorNames=["red","green","darkOrange","yellow","berry","lightGreen","marigold"],personaSharedColorNames=["darkRed","cranberry","pumpkin","peach","gold","brass","brown","forest","seafoam","darkGreen","lightTeal","teal","steel","blue","royalBlue","cornflower","navy","lavender","purple","grape","lilac","pink","magenta","plum","beige","mink","platinum","anchor"],statusColorMapping={success:"green",warning:"orange",danger:"cranberry"},statusColorPaletteTokens$1=statusSharedColorNames.reduce((eo,to)=>{const ro=to.slice(0,1).toUpperCase()+to.slice(1),no={[`colorPalette${ro}Background1`]:statusSharedColors[to].tint60,[`colorPalette${ro}Background2`]:statusSharedColors[to].tint40,[`colorPalette${ro}Background3`]:statusSharedColors[to].primary,[`colorPalette${ro}Foreground1`]:statusSharedColors[to].shade10,[`colorPalette${ro}Foreground2`]:statusSharedColors[to].shade30,[`colorPalette${ro}Foreground3`]:statusSharedColors[to].primary,[`colorPalette${ro}BorderActive`]:statusSharedColors[to].primary,[`colorPalette${ro}Border1`]:statusSharedColors[to].tint40,[`colorPalette${ro}Border2`]:statusSharedColors[to].primary};return Object.assign(eo,no)},{});statusColorPaletteTokens$1.colorPaletteYellowForeground1=statusSharedColors.yellow.shade30;statusColorPaletteTokens$1.colorPaletteRedForegroundInverted=statusSharedColors.red.tint20;statusColorPaletteTokens$1.colorPaletteGreenForegroundInverted=statusSharedColors.green.tint20;statusColorPaletteTokens$1.colorPaletteYellowForegroundInverted=statusSharedColors.yellow.tint40;const personaColorPaletteTokens$1=personaSharedColorNames.reduce((eo,to)=>{const ro=to.slice(0,1).toUpperCase()+to.slice(1),no={[`colorPalette${ro}Background2`]:personaSharedColors[to].tint40,[`colorPalette${ro}Foreground2`]:personaSharedColors[to].shade30,[`colorPalette${ro}BorderActive`]:personaSharedColors[to].primary};return Object.assign(eo,no)},{}),colorPaletteTokens$1={...statusColorPaletteTokens$1,...personaColorPaletteTokens$1},colorStatusTokens$1=Object.entries(statusColorMapping).reduce((eo,[to,ro])=>{const no=to.slice(0,1).toUpperCase()+to.slice(1),oo={[`colorStatus${no}Background1`]:mappedStatusColors[ro].tint60,[`colorStatus${no}Background2`]:mappedStatusColors[ro].tint40,[`colorStatus${no}Background3`]:mappedStatusColors[ro].primary,[`colorStatus${no}Foreground1`]:mappedStatusColors[ro].shade10,[`colorStatus${no}Foreground2`]:mappedStatusColors[ro].shade30,[`colorStatus${no}Foreground3`]:mappedStatusColors[ro].primary,[`colorStatus${no}ForegroundInverted`]:mappedStatusColors[ro].tint30,[`colorStatus${no}BorderActive`]:mappedStatusColors[ro].primary,[`colorStatus${no}Border1`]:mappedStatusColors[ro].tint40,[`colorStatus${no}Border2`]:mappedStatusColors[ro].primary};return Object.assign(eo,oo)},{});colorStatusTokens$1.colorStatusWarningForeground1=mappedStatusColors[statusColorMapping.warning].shade20;colorStatusTokens$1.colorStatusWarningForeground3=mappedStatusColors[statusColorMapping.warning].shade20;colorStatusTokens$1.colorStatusWarningBorder2=mappedStatusColors[statusColorMapping.warning].shade20;const generateColorTokens$1=eo=>({colorNeutralForeground1:grey[14],colorNeutralForeground1Hover:grey[14],colorNeutralForeground1Pressed:grey[14],colorNeutralForeground1Selected:grey[14],colorNeutralForeground2:grey[26],colorNeutralForeground2Hover:grey[14],colorNeutralForeground2Pressed:grey[14],colorNeutralForeground2Selected:grey[14],colorNeutralForeground2BrandHover:eo[80],colorNeutralForeground2BrandPressed:eo[70],colorNeutralForeground2BrandSelected:eo[80],colorNeutralForeground3:grey[38],colorNeutralForeground3Hover:grey[26],colorNeutralForeground3Pressed:grey[26],colorNeutralForeground3Selected:grey[26],colorNeutralForeground3BrandHover:eo[80],colorNeutralForeground3BrandPressed:eo[70],colorNeutralForeground3BrandSelected:eo[80],colorNeutralForeground4:grey[44],colorNeutralForegroundDisabled:grey[74],colorNeutralForegroundInvertedDisabled:whiteAlpha[40],colorBrandForegroundLink:eo[70],colorBrandForegroundLinkHover:eo[60],colorBrandForegroundLinkPressed:eo[40],colorBrandForegroundLinkSelected:eo[70],colorNeutralForeground2Link:grey[26],colorNeutralForeground2LinkHover:grey[14],colorNeutralForeground2LinkPressed:grey[14],colorNeutralForeground2LinkSelected:grey[14],colorCompoundBrandForeground1:eo[80],colorCompoundBrandForeground1Hover:eo[70],colorCompoundBrandForeground1Pressed:eo[60],colorBrandForeground1:eo[80],colorBrandForeground2:eo[70],colorBrandForeground2Hover:eo[60],colorBrandForeground2Pressed:eo[30],colorNeutralForeground1Static:grey[14],colorNeutralForegroundStaticInverted:white,colorNeutralForegroundInverted:white,colorNeutralForegroundInvertedHover:white,colorNeutralForegroundInvertedPressed:white,colorNeutralForegroundInvertedSelected:white,colorNeutralForegroundInverted2:white,colorNeutralForegroundOnBrand:white,colorNeutralForegroundInvertedLink:white,colorNeutralForegroundInvertedLinkHover:white,colorNeutralForegroundInvertedLinkPressed:white,colorNeutralForegroundInvertedLinkSelected:white,colorBrandForegroundInverted:eo[100],colorBrandForegroundInvertedHover:eo[110],colorBrandForegroundInvertedPressed:eo[100],colorBrandForegroundOnLight:eo[80],colorBrandForegroundOnLightHover:eo[70],colorBrandForegroundOnLightPressed:eo[50],colorBrandForegroundOnLightSelected:eo[60],colorNeutralBackground1:white,colorNeutralBackground1Hover:grey[96],colorNeutralBackground1Pressed:grey[88],colorNeutralBackground1Selected:grey[92],colorNeutralBackground2:grey[98],colorNeutralBackground2Hover:grey[94],colorNeutralBackground2Pressed:grey[86],colorNeutralBackground2Selected:grey[90],colorNeutralBackground3:grey[96],colorNeutralBackground3Hover:grey[92],colorNeutralBackground3Pressed:grey[84],colorNeutralBackground3Selected:grey[88],colorNeutralBackground4:grey[94],colorNeutralBackground4Hover:grey[98],colorNeutralBackground4Pressed:grey[96],colorNeutralBackground4Selected:white,colorNeutralBackground5:grey[92],colorNeutralBackground5Hover:grey[96],colorNeutralBackground5Pressed:grey[94],colorNeutralBackground5Selected:grey[98],colorNeutralBackground6:grey[90],colorNeutralBackgroundInverted:grey[16],colorNeutralBackgroundStatic:grey[20],colorNeutralBackgroundAlpha:whiteAlpha[50],colorNeutralBackgroundAlpha2:whiteAlpha[80],colorSubtleBackground:"transparent",colorSubtleBackgroundHover:grey[96],colorSubtleBackgroundPressed:grey[88],colorSubtleBackgroundSelected:grey[92],colorSubtleBackgroundLightAlphaHover:whiteAlpha[70],colorSubtleBackgroundLightAlphaPressed:whiteAlpha[50],colorSubtleBackgroundLightAlphaSelected:"transparent",colorSubtleBackgroundInverted:"transparent",colorSubtleBackgroundInvertedHover:blackAlpha[10],colorSubtleBackgroundInvertedPressed:blackAlpha[30],colorSubtleBackgroundInvertedSelected:blackAlpha[20],colorTransparentBackground:"transparent",colorTransparentBackgroundHover:"transparent",colorTransparentBackgroundPressed:"transparent",colorTransparentBackgroundSelected:"transparent",colorNeutralBackgroundDisabled:grey[94],colorNeutralBackgroundInvertedDisabled:whiteAlpha[10],colorNeutralStencil1:grey[90],colorNeutralStencil2:grey[98],colorNeutralStencil1Alpha:blackAlpha[10],colorNeutralStencil2Alpha:blackAlpha[5],colorBackgroundOverlay:blackAlpha[40],colorScrollbarOverlay:blackAlpha[50],colorBrandBackground:eo[80],colorBrandBackgroundHover:eo[70],colorBrandBackgroundPressed:eo[40],colorBrandBackgroundSelected:eo[60],colorCompoundBrandBackground:eo[80],colorCompoundBrandBackgroundHover:eo[70],colorCompoundBrandBackgroundPressed:eo[60],colorBrandBackgroundStatic:eo[80],colorBrandBackground2:eo[160],colorBrandBackground2Hover:eo[150],colorBrandBackground2Pressed:eo[130],colorBrandBackgroundInverted:white,colorBrandBackgroundInvertedHover:eo[160],colorBrandBackgroundInvertedPressed:eo[140],colorBrandBackgroundInvertedSelected:eo[150],colorNeutralStrokeAccessible:grey[38],colorNeutralStrokeAccessibleHover:grey[34],colorNeutralStrokeAccessiblePressed:grey[30],colorNeutralStrokeAccessibleSelected:eo[80],colorNeutralStroke1:grey[82],colorNeutralStroke1Hover:grey[78],colorNeutralStroke1Pressed:grey[70],colorNeutralStroke1Selected:grey[74],colorNeutralStroke2:grey[88],colorNeutralStroke3:grey[94],colorNeutralStrokeSubtle:grey[88],colorNeutralStrokeOnBrand:white,colorNeutralStrokeOnBrand2:white,colorNeutralStrokeOnBrand2Hover:white,colorNeutralStrokeOnBrand2Pressed:white,colorNeutralStrokeOnBrand2Selected:white,colorBrandStroke1:eo[80],colorBrandStroke2:eo[140],colorBrandStroke2Hover:eo[120],colorBrandStroke2Pressed:eo[80],colorBrandStroke2Contrast:eo[140],colorCompoundBrandStroke:eo[80],colorCompoundBrandStrokeHover:eo[70],colorCompoundBrandStrokePressed:eo[60],colorNeutralStrokeDisabled:grey[88],colorNeutralStrokeInvertedDisabled:whiteAlpha[40],colorTransparentStroke:"transparent",colorTransparentStrokeInteractive:"transparent",colorTransparentStrokeDisabled:"transparent",colorNeutralStrokeAlpha:blackAlpha[5],colorNeutralStrokeAlpha2:whiteAlpha[20],colorStrokeFocus1:white,colorStrokeFocus2:black,colorNeutralShadowAmbient:"rgba(0,0,0,0.12)",colorNeutralShadowKey:"rgba(0,0,0,0.14)",colorNeutralShadowAmbientLighter:"rgba(0,0,0,0.06)",colorNeutralShadowKeyLighter:"rgba(0,0,0,0.07)",colorNeutralShadowAmbientDarker:"rgba(0,0,0,0.20)",colorNeutralShadowKeyDarker:"rgba(0,0,0,0.24)",colorBrandShadowAmbient:"rgba(0,0,0,0.30)",colorBrandShadowKey:"rgba(0,0,0,0.25)"}),borderRadius={borderRadiusNone:"0",borderRadiusSmall:"2px",borderRadiusMedium:"4px",borderRadiusLarge:"6px",borderRadiusXLarge:"8px",borderRadiusCircular:"10000px"},curves={curveAccelerateMax:"cubic-bezier(0.9,0.1,1,0.2)",curveAccelerateMid:"cubic-bezier(1,0,1,1)",curveAccelerateMin:"cubic-bezier(0.8,0,0.78,1)",curveDecelerateMax:"cubic-bezier(0.1,0.9,0.2,1)",curveDecelerateMid:"cubic-bezier(0,0,0,1)",curveDecelerateMin:"cubic-bezier(0.33,0,0.1,1)",curveEasyEaseMax:"cubic-bezier(0.8,0,0.2,1)",curveEasyEase:"cubic-bezier(0.33,0,0.67,1)",curveLinear:"cubic-bezier(0,0,1,1)"},durations={durationUltraFast:"50ms",durationFaster:"100ms",durationFast:"150ms",durationNormal:"200ms",durationGentle:"250ms",durationSlow:"300ms",durationSlower:"400ms",durationUltraSlow:"500ms"},fontSizes={fontSizeBase100:"10px",fontSizeBase200:"12px",fontSizeBase300:"14px",fontSizeBase400:"16px",fontSizeBase500:"20px",fontSizeBase600:"24px",fontSizeHero700:"28px",fontSizeHero800:"32px",fontSizeHero900:"40px",fontSizeHero1000:"68px"},lineHeights={lineHeightBase100:"14px",lineHeightBase200:"16px",lineHeightBase300:"20px",lineHeightBase400:"22px",lineHeightBase500:"28px",lineHeightBase600:"32px",lineHeightHero700:"36px",lineHeightHero800:"40px",lineHeightHero900:"52px",lineHeightHero1000:"92px"},fontWeights={fontWeightRegular:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},fontFamilies={fontFamilyBase:"'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif",fontFamilyMonospace:"Consolas, 'Courier New', Courier, monospace",fontFamilyNumeric:"Bahnschrift, 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif"},spacings={none:"0",xxs:"2px",xs:"4px",sNudge:"6px",s:"8px",mNudge:"10px",m:"12px",l:"16px",xl:"20px",xxl:"24px",xxxl:"32px"},horizontalSpacings={spacingHorizontalNone:spacings.none,spacingHorizontalXXS:spacings.xxs,spacingHorizontalXS:spacings.xs,spacingHorizontalSNudge:spacings.sNudge,spacingHorizontalS:spacings.s,spacingHorizontalMNudge:spacings.mNudge,spacingHorizontalM:spacings.m,spacingHorizontalL:spacings.l,spacingHorizontalXL:spacings.xl,spacingHorizontalXXL:spacings.xxl,spacingHorizontalXXXL:spacings.xxxl},verticalSpacings={spacingVerticalNone:spacings.none,spacingVerticalXXS:spacings.xxs,spacingVerticalXS:spacings.xs,spacingVerticalSNudge:spacings.sNudge,spacingVerticalS:spacings.s,spacingVerticalMNudge:spacings.mNudge,spacingVerticalM:spacings.m,spacingVerticalL:spacings.l,spacingVerticalXL:spacings.xl,spacingVerticalXXL:spacings.xxl,spacingVerticalXXXL:spacings.xxxl},strokeWidths={strokeWidthThin:"1px",strokeWidthThick:"2px",strokeWidthThicker:"3px",strokeWidthThickest:"4px"},tokens={colorNeutralForeground1:"var(--colorNeutralForeground1)",colorNeutralForeground1Hover:"var(--colorNeutralForeground1Hover)",colorNeutralForeground1Pressed:"var(--colorNeutralForeground1Pressed)",colorNeutralForeground1Selected:"var(--colorNeutralForeground1Selected)",colorNeutralForeground2:"var(--colorNeutralForeground2)",colorNeutralForeground2Hover:"var(--colorNeutralForeground2Hover)",colorNeutralForeground2Pressed:"var(--colorNeutralForeground2Pressed)",colorNeutralForeground2Selected:"var(--colorNeutralForeground2Selected)",colorNeutralForeground2BrandHover:"var(--colorNeutralForeground2BrandHover)",colorNeutralForeground2BrandPressed:"var(--colorNeutralForeground2BrandPressed)",colorNeutralForeground2BrandSelected:"var(--colorNeutralForeground2BrandSelected)",colorNeutralForeground3:"var(--colorNeutralForeground3)",colorNeutralForeground3Hover:"var(--colorNeutralForeground3Hover)",colorNeutralForeground3Pressed:"var(--colorNeutralForeground3Pressed)",colorNeutralForeground3Selected:"var(--colorNeutralForeground3Selected)",colorNeutralForeground3BrandHover:"var(--colorNeutralForeground3BrandHover)",colorNeutralForeground3BrandPressed:"var(--colorNeutralForeground3BrandPressed)",colorNeutralForeground3BrandSelected:"var(--colorNeutralForeground3BrandSelected)",colorNeutralForeground4:"var(--colorNeutralForeground4)",colorNeutralForegroundDisabled:"var(--colorNeutralForegroundDisabled)",colorBrandForegroundLink:"var(--colorBrandForegroundLink)",colorBrandForegroundLinkHover:"var(--colorBrandForegroundLinkHover)",colorBrandForegroundLinkPressed:"var(--colorBrandForegroundLinkPressed)",colorBrandForegroundLinkSelected:"var(--colorBrandForegroundLinkSelected)",colorNeutralForeground2Link:"var(--colorNeutralForeground2Link)",colorNeutralForeground2LinkHover:"var(--colorNeutralForeground2LinkHover)",colorNeutralForeground2LinkPressed:"var(--colorNeutralForeground2LinkPressed)",colorNeutralForeground2LinkSelected:"var(--colorNeutralForeground2LinkSelected)",colorCompoundBrandForeground1:"var(--colorCompoundBrandForeground1)",colorCompoundBrandForeground1Hover:"var(--colorCompoundBrandForeground1Hover)",colorCompoundBrandForeground1Pressed:"var(--colorCompoundBrandForeground1Pressed)",colorNeutralForegroundOnBrand:"var(--colorNeutralForegroundOnBrand)",colorNeutralForegroundInverted:"var(--colorNeutralForegroundInverted)",colorNeutralForegroundInvertedHover:"var(--colorNeutralForegroundInvertedHover)",colorNeutralForegroundInvertedPressed:"var(--colorNeutralForegroundInvertedPressed)",colorNeutralForegroundInvertedSelected:"var(--colorNeutralForegroundInvertedSelected)",colorNeutralForegroundInverted2:"var(--colorNeutralForegroundInverted2)",colorNeutralForegroundStaticInverted:"var(--colorNeutralForegroundStaticInverted)",colorNeutralForegroundInvertedLink:"var(--colorNeutralForegroundInvertedLink)",colorNeutralForegroundInvertedLinkHover:"var(--colorNeutralForegroundInvertedLinkHover)",colorNeutralForegroundInvertedLinkPressed:"var(--colorNeutralForegroundInvertedLinkPressed)",colorNeutralForegroundInvertedLinkSelected:"var(--colorNeutralForegroundInvertedLinkSelected)",colorNeutralForegroundInvertedDisabled:"var(--colorNeutralForegroundInvertedDisabled)",colorBrandForeground1:"var(--colorBrandForeground1)",colorBrandForeground2:"var(--colorBrandForeground2)",colorBrandForeground2Hover:"var(--colorBrandForeground2Hover)",colorBrandForeground2Pressed:"var(--colorBrandForeground2Pressed)",colorNeutralForeground1Static:"var(--colorNeutralForeground1Static)",colorBrandForegroundInverted:"var(--colorBrandForegroundInverted)",colorBrandForegroundInvertedHover:"var(--colorBrandForegroundInvertedHover)",colorBrandForegroundInvertedPressed:"var(--colorBrandForegroundInvertedPressed)",colorBrandForegroundOnLight:"var(--colorBrandForegroundOnLight)",colorBrandForegroundOnLightHover:"var(--colorBrandForegroundOnLightHover)",colorBrandForegroundOnLightPressed:"var(--colorBrandForegroundOnLightPressed)",colorBrandForegroundOnLightSelected:"var(--colorBrandForegroundOnLightSelected)",colorNeutralBackground1:"var(--colorNeutralBackground1)",colorNeutralBackground1Hover:"var(--colorNeutralBackground1Hover)",colorNeutralBackground1Pressed:"var(--colorNeutralBackground1Pressed)",colorNeutralBackground1Selected:"var(--colorNeutralBackground1Selected)",colorNeutralBackground2:"var(--colorNeutralBackground2)",colorNeutralBackground2Hover:"var(--colorNeutralBackground2Hover)",colorNeutralBackground2Pressed:"var(--colorNeutralBackground2Pressed)",colorNeutralBackground2Selected:"var(--colorNeutralBackground2Selected)",colorNeutralBackground3:"var(--colorNeutralBackground3)",colorNeutralBackground3Hover:"var(--colorNeutralBackground3Hover)",colorNeutralBackground3Pressed:"var(--colorNeutralBackground3Pressed)",colorNeutralBackground3Selected:"var(--colorNeutralBackground3Selected)",colorNeutralBackground4:"var(--colorNeutralBackground4)",colorNeutralBackground4Hover:"var(--colorNeutralBackground4Hover)",colorNeutralBackground4Pressed:"var(--colorNeutralBackground4Pressed)",colorNeutralBackground4Selected:"var(--colorNeutralBackground4Selected)",colorNeutralBackground5:"var(--colorNeutralBackground5)",colorNeutralBackground5Hover:"var(--colorNeutralBackground5Hover)",colorNeutralBackground5Pressed:"var(--colorNeutralBackground5Pressed)",colorNeutralBackground5Selected:"var(--colorNeutralBackground5Selected)",colorNeutralBackground6:"var(--colorNeutralBackground6)",colorNeutralBackgroundInverted:"var(--colorNeutralBackgroundInverted)",colorNeutralBackgroundStatic:"var(--colorNeutralBackgroundStatic)",colorNeutralBackgroundAlpha:"var(--colorNeutralBackgroundAlpha)",colorNeutralBackgroundAlpha2:"var(--colorNeutralBackgroundAlpha2)",colorSubtleBackground:"var(--colorSubtleBackground)",colorSubtleBackgroundHover:"var(--colorSubtleBackgroundHover)",colorSubtleBackgroundPressed:"var(--colorSubtleBackgroundPressed)",colorSubtleBackgroundSelected:"var(--colorSubtleBackgroundSelected)",colorSubtleBackgroundLightAlphaHover:"var(--colorSubtleBackgroundLightAlphaHover)",colorSubtleBackgroundLightAlphaPressed:"var(--colorSubtleBackgroundLightAlphaPressed)",colorSubtleBackgroundLightAlphaSelected:"var(--colorSubtleBackgroundLightAlphaSelected)",colorSubtleBackgroundInverted:"var(--colorSubtleBackgroundInverted)",colorSubtleBackgroundInvertedHover:"var(--colorSubtleBackgroundInvertedHover)",colorSubtleBackgroundInvertedPressed:"var(--colorSubtleBackgroundInvertedPressed)",colorSubtleBackgroundInvertedSelected:"var(--colorSubtleBackgroundInvertedSelected)",colorTransparentBackground:"var(--colorTransparentBackground)",colorTransparentBackgroundHover:"var(--colorTransparentBackgroundHover)",colorTransparentBackgroundPressed:"var(--colorTransparentBackgroundPressed)",colorTransparentBackgroundSelected:"var(--colorTransparentBackgroundSelected)",colorNeutralBackgroundDisabled:"var(--colorNeutralBackgroundDisabled)",colorNeutralBackgroundInvertedDisabled:"var(--colorNeutralBackgroundInvertedDisabled)",colorNeutralStencil1:"var(--colorNeutralStencil1)",colorNeutralStencil2:"var(--colorNeutralStencil2)",colorNeutralStencil1Alpha:"var(--colorNeutralStencil1Alpha)",colorNeutralStencil2Alpha:"var(--colorNeutralStencil2Alpha)",colorBackgroundOverlay:"var(--colorBackgroundOverlay)",colorScrollbarOverlay:"var(--colorScrollbarOverlay)",colorBrandBackground:"var(--colorBrandBackground)",colorBrandBackgroundHover:"var(--colorBrandBackgroundHover)",colorBrandBackgroundPressed:"var(--colorBrandBackgroundPressed)",colorBrandBackgroundSelected:"var(--colorBrandBackgroundSelected)",colorCompoundBrandBackground:"var(--colorCompoundBrandBackground)",colorCompoundBrandBackgroundHover:"var(--colorCompoundBrandBackgroundHover)",colorCompoundBrandBackgroundPressed:"var(--colorCompoundBrandBackgroundPressed)",colorBrandBackgroundStatic:"var(--colorBrandBackgroundStatic)",colorBrandBackground2:"var(--colorBrandBackground2)",colorBrandBackground2Hover:"var(--colorBrandBackground2Hover)",colorBrandBackground2Pressed:"var(--colorBrandBackground2Pressed)",colorBrandBackgroundInverted:"var(--colorBrandBackgroundInverted)",colorBrandBackgroundInvertedHover:"var(--colorBrandBackgroundInvertedHover)",colorBrandBackgroundInvertedPressed:"var(--colorBrandBackgroundInvertedPressed)",colorBrandBackgroundInvertedSelected:"var(--colorBrandBackgroundInvertedSelected)",colorNeutralStrokeAccessible:"var(--colorNeutralStrokeAccessible)",colorNeutralStrokeAccessibleHover:"var(--colorNeutralStrokeAccessibleHover)",colorNeutralStrokeAccessiblePressed:"var(--colorNeutralStrokeAccessiblePressed)",colorNeutralStrokeAccessibleSelected:"var(--colorNeutralStrokeAccessibleSelected)",colorNeutralStroke1:"var(--colorNeutralStroke1)",colorNeutralStroke1Hover:"var(--colorNeutralStroke1Hover)",colorNeutralStroke1Pressed:"var(--colorNeutralStroke1Pressed)",colorNeutralStroke1Selected:"var(--colorNeutralStroke1Selected)",colorNeutralStroke2:"var(--colorNeutralStroke2)",colorNeutralStroke3:"var(--colorNeutralStroke3)",colorNeutralStrokeSubtle:"var(--colorNeutralStrokeSubtle)",colorNeutralStrokeOnBrand:"var(--colorNeutralStrokeOnBrand)",colorNeutralStrokeOnBrand2:"var(--colorNeutralStrokeOnBrand2)",colorNeutralStrokeOnBrand2Hover:"var(--colorNeutralStrokeOnBrand2Hover)",colorNeutralStrokeOnBrand2Pressed:"var(--colorNeutralStrokeOnBrand2Pressed)",colorNeutralStrokeOnBrand2Selected:"var(--colorNeutralStrokeOnBrand2Selected)",colorBrandStroke1:"var(--colorBrandStroke1)",colorBrandStroke2:"var(--colorBrandStroke2)",colorBrandStroke2Hover:"var(--colorBrandStroke2Hover)",colorBrandStroke2Pressed:"var(--colorBrandStroke2Pressed)",colorBrandStroke2Contrast:"var(--colorBrandStroke2Contrast)",colorCompoundBrandStroke:"var(--colorCompoundBrandStroke)",colorCompoundBrandStrokeHover:"var(--colorCompoundBrandStrokeHover)",colorCompoundBrandStrokePressed:"var(--colorCompoundBrandStrokePressed)",colorNeutralStrokeDisabled:"var(--colorNeutralStrokeDisabled)",colorNeutralStrokeInvertedDisabled:"var(--colorNeutralStrokeInvertedDisabled)",colorTransparentStroke:"var(--colorTransparentStroke)",colorTransparentStrokeInteractive:"var(--colorTransparentStrokeInteractive)",colorTransparentStrokeDisabled:"var(--colorTransparentStrokeDisabled)",colorNeutralStrokeAlpha:"var(--colorNeutralStrokeAlpha)",colorNeutralStrokeAlpha2:"var(--colorNeutralStrokeAlpha2)",colorStrokeFocus1:"var(--colorStrokeFocus1)",colorStrokeFocus2:"var(--colorStrokeFocus2)",colorNeutralShadowAmbient:"var(--colorNeutralShadowAmbient)",colorNeutralShadowKey:"var(--colorNeutralShadowKey)",colorNeutralShadowAmbientLighter:"var(--colorNeutralShadowAmbientLighter)",colorNeutralShadowKeyLighter:"var(--colorNeutralShadowKeyLighter)",colorNeutralShadowAmbientDarker:"var(--colorNeutralShadowAmbientDarker)",colorNeutralShadowKeyDarker:"var(--colorNeutralShadowKeyDarker)",colorBrandShadowAmbient:"var(--colorBrandShadowAmbient)",colorBrandShadowKey:"var(--colorBrandShadowKey)",colorPaletteRedBackground1:"var(--colorPaletteRedBackground1)",colorPaletteRedBackground2:"var(--colorPaletteRedBackground2)",colorPaletteRedBackground3:"var(--colorPaletteRedBackground3)",colorPaletteRedBorderActive:"var(--colorPaletteRedBorderActive)",colorPaletteRedBorder1:"var(--colorPaletteRedBorder1)",colorPaletteRedBorder2:"var(--colorPaletteRedBorder2)",colorPaletteRedForeground1:"var(--colorPaletteRedForeground1)",colorPaletteRedForeground2:"var(--colorPaletteRedForeground2)",colorPaletteRedForeground3:"var(--colorPaletteRedForeground3)",colorPaletteRedForegroundInverted:"var(--colorPaletteRedForegroundInverted)",colorPaletteGreenBackground1:"var(--colorPaletteGreenBackground1)",colorPaletteGreenBackground2:"var(--colorPaletteGreenBackground2)",colorPaletteGreenBackground3:"var(--colorPaletteGreenBackground3)",colorPaletteGreenBorderActive:"var(--colorPaletteGreenBorderActive)",colorPaletteGreenBorder1:"var(--colorPaletteGreenBorder1)",colorPaletteGreenBorder2:"var(--colorPaletteGreenBorder2)",colorPaletteGreenForeground1:"var(--colorPaletteGreenForeground1)",colorPaletteGreenForeground2:"var(--colorPaletteGreenForeground2)",colorPaletteGreenForeground3:"var(--colorPaletteGreenForeground3)",colorPaletteGreenForegroundInverted:"var(--colorPaletteGreenForegroundInverted)",colorPaletteDarkOrangeBackground1:"var(--colorPaletteDarkOrangeBackground1)",colorPaletteDarkOrangeBackground2:"var(--colorPaletteDarkOrangeBackground2)",colorPaletteDarkOrangeBackground3:"var(--colorPaletteDarkOrangeBackground3)",colorPaletteDarkOrangeBorderActive:"var(--colorPaletteDarkOrangeBorderActive)",colorPaletteDarkOrangeBorder1:"var(--colorPaletteDarkOrangeBorder1)",colorPaletteDarkOrangeBorder2:"var(--colorPaletteDarkOrangeBorder2)",colorPaletteDarkOrangeForeground1:"var(--colorPaletteDarkOrangeForeground1)",colorPaletteDarkOrangeForeground2:"var(--colorPaletteDarkOrangeForeground2)",colorPaletteDarkOrangeForeground3:"var(--colorPaletteDarkOrangeForeground3)",colorPaletteYellowBackground1:"var(--colorPaletteYellowBackground1)",colorPaletteYellowBackground2:"var(--colorPaletteYellowBackground2)",colorPaletteYellowBackground3:"var(--colorPaletteYellowBackground3)",colorPaletteYellowBorderActive:"var(--colorPaletteYellowBorderActive)",colorPaletteYellowBorder1:"var(--colorPaletteYellowBorder1)",colorPaletteYellowBorder2:"var(--colorPaletteYellowBorder2)",colorPaletteYellowForeground1:"var(--colorPaletteYellowForeground1)",colorPaletteYellowForeground2:"var(--colorPaletteYellowForeground2)",colorPaletteYellowForeground3:"var(--colorPaletteYellowForeground3)",colorPaletteYellowForegroundInverted:"var(--colorPaletteYellowForegroundInverted)",colorPaletteBerryBackground1:"var(--colorPaletteBerryBackground1)",colorPaletteBerryBackground2:"var(--colorPaletteBerryBackground2)",colorPaletteBerryBackground3:"var(--colorPaletteBerryBackground3)",colorPaletteBerryBorderActive:"var(--colorPaletteBerryBorderActive)",colorPaletteBerryBorder1:"var(--colorPaletteBerryBorder1)",colorPaletteBerryBorder2:"var(--colorPaletteBerryBorder2)",colorPaletteBerryForeground1:"var(--colorPaletteBerryForeground1)",colorPaletteBerryForeground2:"var(--colorPaletteBerryForeground2)",colorPaletteBerryForeground3:"var(--colorPaletteBerryForeground3)",colorPaletteMarigoldBackground1:"var(--colorPaletteMarigoldBackground1)",colorPaletteMarigoldBackground2:"var(--colorPaletteMarigoldBackground2)",colorPaletteMarigoldBackground3:"var(--colorPaletteMarigoldBackground3)",colorPaletteMarigoldBorderActive:"var(--colorPaletteMarigoldBorderActive)",colorPaletteMarigoldBorder1:"var(--colorPaletteMarigoldBorder1)",colorPaletteMarigoldBorder2:"var(--colorPaletteMarigoldBorder2)",colorPaletteMarigoldForeground1:"var(--colorPaletteMarigoldForeground1)",colorPaletteMarigoldForeground2:"var(--colorPaletteMarigoldForeground2)",colorPaletteMarigoldForeground3:"var(--colorPaletteMarigoldForeground3)",colorPaletteLightGreenBackground1:"var(--colorPaletteLightGreenBackground1)",colorPaletteLightGreenBackground2:"var(--colorPaletteLightGreenBackground2)",colorPaletteLightGreenBackground3:"var(--colorPaletteLightGreenBackground3)",colorPaletteLightGreenBorderActive:"var(--colorPaletteLightGreenBorderActive)",colorPaletteLightGreenBorder1:"var(--colorPaletteLightGreenBorder1)",colorPaletteLightGreenBorder2:"var(--colorPaletteLightGreenBorder2)",colorPaletteLightGreenForeground1:"var(--colorPaletteLightGreenForeground1)",colorPaletteLightGreenForeground2:"var(--colorPaletteLightGreenForeground2)",colorPaletteLightGreenForeground3:"var(--colorPaletteLightGreenForeground3)",colorPaletteAnchorBackground2:"var(--colorPaletteAnchorBackground2)",colorPaletteAnchorBorderActive:"var(--colorPaletteAnchorBorderActive)",colorPaletteAnchorForeground2:"var(--colorPaletteAnchorForeground2)",colorPaletteBeigeBackground2:"var(--colorPaletteBeigeBackground2)",colorPaletteBeigeBorderActive:"var(--colorPaletteBeigeBorderActive)",colorPaletteBeigeForeground2:"var(--colorPaletteBeigeForeground2)",colorPaletteBlueBackground2:"var(--colorPaletteBlueBackground2)",colorPaletteBlueBorderActive:"var(--colorPaletteBlueBorderActive)",colorPaletteBlueForeground2:"var(--colorPaletteBlueForeground2)",colorPaletteBrassBackground2:"var(--colorPaletteBrassBackground2)",colorPaletteBrassBorderActive:"var(--colorPaletteBrassBorderActive)",colorPaletteBrassForeground2:"var(--colorPaletteBrassForeground2)",colorPaletteBrownBackground2:"var(--colorPaletteBrownBackground2)",colorPaletteBrownBorderActive:"var(--colorPaletteBrownBorderActive)",colorPaletteBrownForeground2:"var(--colorPaletteBrownForeground2)",colorPaletteCornflowerBackground2:"var(--colorPaletteCornflowerBackground2)",colorPaletteCornflowerBorderActive:"var(--colorPaletteCornflowerBorderActive)",colorPaletteCornflowerForeground2:"var(--colorPaletteCornflowerForeground2)",colorPaletteCranberryBackground2:"var(--colorPaletteCranberryBackground2)",colorPaletteCranberryBorderActive:"var(--colorPaletteCranberryBorderActive)",colorPaletteCranberryForeground2:"var(--colorPaletteCranberryForeground2)",colorPaletteDarkGreenBackground2:"var(--colorPaletteDarkGreenBackground2)",colorPaletteDarkGreenBorderActive:"var(--colorPaletteDarkGreenBorderActive)",colorPaletteDarkGreenForeground2:"var(--colorPaletteDarkGreenForeground2)",colorPaletteDarkRedBackground2:"var(--colorPaletteDarkRedBackground2)",colorPaletteDarkRedBorderActive:"var(--colorPaletteDarkRedBorderActive)",colorPaletteDarkRedForeground2:"var(--colorPaletteDarkRedForeground2)",colorPaletteForestBackground2:"var(--colorPaletteForestBackground2)",colorPaletteForestBorderActive:"var(--colorPaletteForestBorderActive)",colorPaletteForestForeground2:"var(--colorPaletteForestForeground2)",colorPaletteGoldBackground2:"var(--colorPaletteGoldBackground2)",colorPaletteGoldBorderActive:"var(--colorPaletteGoldBorderActive)",colorPaletteGoldForeground2:"var(--colorPaletteGoldForeground2)",colorPaletteGrapeBackground2:"var(--colorPaletteGrapeBackground2)",colorPaletteGrapeBorderActive:"var(--colorPaletteGrapeBorderActive)",colorPaletteGrapeForeground2:"var(--colorPaletteGrapeForeground2)",colorPaletteLavenderBackground2:"var(--colorPaletteLavenderBackground2)",colorPaletteLavenderBorderActive:"var(--colorPaletteLavenderBorderActive)",colorPaletteLavenderForeground2:"var(--colorPaletteLavenderForeground2)",colorPaletteLightTealBackground2:"var(--colorPaletteLightTealBackground2)",colorPaletteLightTealBorderActive:"var(--colorPaletteLightTealBorderActive)",colorPaletteLightTealForeground2:"var(--colorPaletteLightTealForeground2)",colorPaletteLilacBackground2:"var(--colorPaletteLilacBackground2)",colorPaletteLilacBorderActive:"var(--colorPaletteLilacBorderActive)",colorPaletteLilacForeground2:"var(--colorPaletteLilacForeground2)",colorPaletteMagentaBackground2:"var(--colorPaletteMagentaBackground2)",colorPaletteMagentaBorderActive:"var(--colorPaletteMagentaBorderActive)",colorPaletteMagentaForeground2:"var(--colorPaletteMagentaForeground2)",colorPaletteMinkBackground2:"var(--colorPaletteMinkBackground2)",colorPaletteMinkBorderActive:"var(--colorPaletteMinkBorderActive)",colorPaletteMinkForeground2:"var(--colorPaletteMinkForeground2)",colorPaletteNavyBackground2:"var(--colorPaletteNavyBackground2)",colorPaletteNavyBorderActive:"var(--colorPaletteNavyBorderActive)",colorPaletteNavyForeground2:"var(--colorPaletteNavyForeground2)",colorPalettePeachBackground2:"var(--colorPalettePeachBackground2)",colorPalettePeachBorderActive:"var(--colorPalettePeachBorderActive)",colorPalettePeachForeground2:"var(--colorPalettePeachForeground2)",colorPalettePinkBackground2:"var(--colorPalettePinkBackground2)",colorPalettePinkBorderActive:"var(--colorPalettePinkBorderActive)",colorPalettePinkForeground2:"var(--colorPalettePinkForeground2)",colorPalettePlatinumBackground2:"var(--colorPalettePlatinumBackground2)",colorPalettePlatinumBorderActive:"var(--colorPalettePlatinumBorderActive)",colorPalettePlatinumForeground2:"var(--colorPalettePlatinumForeground2)",colorPalettePlumBackground2:"var(--colorPalettePlumBackground2)",colorPalettePlumBorderActive:"var(--colorPalettePlumBorderActive)",colorPalettePlumForeground2:"var(--colorPalettePlumForeground2)",colorPalettePumpkinBackground2:"var(--colorPalettePumpkinBackground2)",colorPalettePumpkinBorderActive:"var(--colorPalettePumpkinBorderActive)",colorPalettePumpkinForeground2:"var(--colorPalettePumpkinForeground2)",colorPalettePurpleBackground2:"var(--colorPalettePurpleBackground2)",colorPalettePurpleBorderActive:"var(--colorPalettePurpleBorderActive)",colorPalettePurpleForeground2:"var(--colorPalettePurpleForeground2)",colorPaletteRoyalBlueBackground2:"var(--colorPaletteRoyalBlueBackground2)",colorPaletteRoyalBlueBorderActive:"var(--colorPaletteRoyalBlueBorderActive)",colorPaletteRoyalBlueForeground2:"var(--colorPaletteRoyalBlueForeground2)",colorPaletteSeafoamBackground2:"var(--colorPaletteSeafoamBackground2)",colorPaletteSeafoamBorderActive:"var(--colorPaletteSeafoamBorderActive)",colorPaletteSeafoamForeground2:"var(--colorPaletteSeafoamForeground2)",colorPaletteSteelBackground2:"var(--colorPaletteSteelBackground2)",colorPaletteSteelBorderActive:"var(--colorPaletteSteelBorderActive)",colorPaletteSteelForeground2:"var(--colorPaletteSteelForeground2)",colorPaletteTealBackground2:"var(--colorPaletteTealBackground2)",colorPaletteTealBorderActive:"var(--colorPaletteTealBorderActive)",colorPaletteTealForeground2:"var(--colorPaletteTealForeground2)",colorStatusSuccessBackground1:"var(--colorStatusSuccessBackground1)",colorStatusSuccessBackground2:"var(--colorStatusSuccessBackground2)",colorStatusSuccessBackground3:"var(--colorStatusSuccessBackground3)",colorStatusSuccessForeground1:"var(--colorStatusSuccessForeground1)",colorStatusSuccessForeground2:"var(--colorStatusSuccessForeground2)",colorStatusSuccessForeground3:"var(--colorStatusSuccessForeground3)",colorStatusSuccessForegroundInverted:"var(--colorStatusSuccessForegroundInverted)",colorStatusSuccessBorderActive:"var(--colorStatusSuccessBorderActive)",colorStatusSuccessBorder1:"var(--colorStatusSuccessBorder1)",colorStatusSuccessBorder2:"var(--colorStatusSuccessBorder2)",colorStatusWarningBackground1:"var(--colorStatusWarningBackground1)",colorStatusWarningBackground2:"var(--colorStatusWarningBackground2)",colorStatusWarningBackground3:"var(--colorStatusWarningBackground3)",colorStatusWarningForeground1:"var(--colorStatusWarningForeground1)",colorStatusWarningForeground2:"var(--colorStatusWarningForeground2)",colorStatusWarningForeground3:"var(--colorStatusWarningForeground3)",colorStatusWarningForegroundInverted:"var(--colorStatusWarningForegroundInverted)",colorStatusWarningBorderActive:"var(--colorStatusWarningBorderActive)",colorStatusWarningBorder1:"var(--colorStatusWarningBorder1)",colorStatusWarningBorder2:"var(--colorStatusWarningBorder2)",colorStatusDangerBackground1:"var(--colorStatusDangerBackground1)",colorStatusDangerBackground2:"var(--colorStatusDangerBackground2)",colorStatusDangerBackground3:"var(--colorStatusDangerBackground3)",colorStatusDangerForeground1:"var(--colorStatusDangerForeground1)",colorStatusDangerForeground2:"var(--colorStatusDangerForeground2)",colorStatusDangerForeground3:"var(--colorStatusDangerForeground3)",colorStatusDangerForegroundInverted:"var(--colorStatusDangerForegroundInverted)",colorStatusDangerBorderActive:"var(--colorStatusDangerBorderActive)",colorStatusDangerBorder1:"var(--colorStatusDangerBorder1)",colorStatusDangerBorder2:"var(--colorStatusDangerBorder2)",borderRadiusNone:"var(--borderRadiusNone)",borderRadiusSmall:"var(--borderRadiusSmall)",borderRadiusMedium:"var(--borderRadiusMedium)",borderRadiusLarge:"var(--borderRadiusLarge)",borderRadiusXLarge:"var(--borderRadiusXLarge)",borderRadiusCircular:"var(--borderRadiusCircular)",fontFamilyBase:"var(--fontFamilyBase)",fontFamilyMonospace:"var(--fontFamilyMonospace)",fontFamilyNumeric:"var(--fontFamilyNumeric)",fontSizeBase100:"var(--fontSizeBase100)",fontSizeBase200:"var(--fontSizeBase200)",fontSizeBase300:"var(--fontSizeBase300)",fontSizeBase400:"var(--fontSizeBase400)",fontSizeBase500:"var(--fontSizeBase500)",fontSizeBase600:"var(--fontSizeBase600)",fontSizeHero700:"var(--fontSizeHero700)",fontSizeHero800:"var(--fontSizeHero800)",fontSizeHero900:"var(--fontSizeHero900)",fontSizeHero1000:"var(--fontSizeHero1000)",fontWeightRegular:"var(--fontWeightRegular)",fontWeightMedium:"var(--fontWeightMedium)",fontWeightSemibold:"var(--fontWeightSemibold)",fontWeightBold:"var(--fontWeightBold)",lineHeightBase100:"var(--lineHeightBase100)",lineHeightBase200:"var(--lineHeightBase200)",lineHeightBase300:"var(--lineHeightBase300)",lineHeightBase400:"var(--lineHeightBase400)",lineHeightBase500:"var(--lineHeightBase500)",lineHeightBase600:"var(--lineHeightBase600)",lineHeightHero700:"var(--lineHeightHero700)",lineHeightHero800:"var(--lineHeightHero800)",lineHeightHero900:"var(--lineHeightHero900)",lineHeightHero1000:"var(--lineHeightHero1000)",shadow2:"var(--shadow2)",shadow4:"var(--shadow4)",shadow8:"var(--shadow8)",shadow16:"var(--shadow16)",shadow28:"var(--shadow28)",shadow64:"var(--shadow64)",shadow2Brand:"var(--shadow2Brand)",shadow4Brand:"var(--shadow4Brand)",shadow8Brand:"var(--shadow8Brand)",shadow16Brand:"var(--shadow16Brand)",shadow28Brand:"var(--shadow28Brand)",shadow64Brand:"var(--shadow64Brand)",strokeWidthThin:"var(--strokeWidthThin)",strokeWidthThick:"var(--strokeWidthThick)",strokeWidthThicker:"var(--strokeWidthThicker)",strokeWidthThickest:"var(--strokeWidthThickest)",spacingHorizontalNone:"var(--spacingHorizontalNone)",spacingHorizontalXXS:"var(--spacingHorizontalXXS)",spacingHorizontalXS:"var(--spacingHorizontalXS)",spacingHorizontalSNudge:"var(--spacingHorizontalSNudge)",spacingHorizontalS:"var(--spacingHorizontalS)",spacingHorizontalMNudge:"var(--spacingHorizontalMNudge)",spacingHorizontalM:"var(--spacingHorizontalM)",spacingHorizontalL:"var(--spacingHorizontalL)",spacingHorizontalXL:"var(--spacingHorizontalXL)",spacingHorizontalXXL:"var(--spacingHorizontalXXL)",spacingHorizontalXXXL:"var(--spacingHorizontalXXXL)",spacingVerticalNone:"var(--spacingVerticalNone)",spacingVerticalXXS:"var(--spacingVerticalXXS)",spacingVerticalXS:"var(--spacingVerticalXS)",spacingVerticalSNudge:"var(--spacingVerticalSNudge)",spacingVerticalS:"var(--spacingVerticalS)",spacingVerticalMNudge:"var(--spacingVerticalMNudge)",spacingVerticalM:"var(--spacingVerticalM)",spacingVerticalL:"var(--spacingVerticalL)",spacingVerticalXL:"var(--spacingVerticalXL)",spacingVerticalXXL:"var(--spacingVerticalXXL)",spacingVerticalXXXL:"var(--spacingVerticalXXXL)",durationUltraFast:"var(--durationUltraFast)",durationFaster:"var(--durationFaster)",durationFast:"var(--durationFast)",durationNormal:"var(--durationNormal)",durationGentle:"var(--durationGentle)",durationSlow:"var(--durationSlow)",durationSlower:"var(--durationSlower)",durationUltraSlow:"var(--durationUltraSlow)",curveAccelerateMax:"var(--curveAccelerateMax)",curveAccelerateMid:"var(--curveAccelerateMid)",curveAccelerateMin:"var(--curveAccelerateMin)",curveDecelerateMax:"var(--curveDecelerateMax)",curveDecelerateMid:"var(--curveDecelerateMid)",curveDecelerateMin:"var(--curveDecelerateMin)",curveEasyEaseMax:"var(--curveEasyEaseMax)",curveEasyEase:"var(--curveEasyEase)",curveLinear:"var(--curveLinear)"};function createShadowTokens(eo,to,ro=""){return{[`shadow2${ro}`]:`0 0 2px ${eo}, 0 1px 2px ${to}`,[`shadow4${ro}`]:`0 0 2px ${eo}, 0 2px 4px ${to}`,[`shadow8${ro}`]:`0 0 2px ${eo}, 0 4px 8px ${to}`,[`shadow16${ro}`]:`0 0 2px ${eo}, 0 8px 16px ${to}`,[`shadow28${ro}`]:`0 0 8px ${eo}, 0 14px 28px ${to}`,[`shadow64${ro}`]:`0 0 8px ${eo}, 0 32px 64px ${to}`}}const createLightTheme=eo=>{const to=generateColorTokens$1(eo);return{...borderRadius,...fontSizes,...lineHeights,...fontFamilies,...fontWeights,...strokeWidths,...horizontalSpacings,...verticalSpacings,...durations,...curves,...to,...colorPaletteTokens$1,...colorStatusTokens$1,...createShadowTokens(to.colorNeutralShadowAmbient,to.colorNeutralShadowKey),...createShadowTokens(to.colorBrandShadowAmbient,to.colorBrandShadowKey,"Brand")}},brandWeb={10:"#061724",20:"#082338",30:"#0a2e4a",40:"#0c3b5e",50:"#0e4775",60:"#0f548c",70:"#115ea3",80:"#0f6cbd",90:"#2886de",100:"#479ef5",110:"#62abf5",120:"#77b7f7",130:"#96c6fa",140:"#b4d6fa",150:"#cfe4fa",160:"#ebf3fc"},statusColorPaletteTokens=statusSharedColorNames.reduce((eo,to)=>{const ro=to.slice(0,1).toUpperCase()+to.slice(1),no={[`colorPalette${ro}Background1`]:statusSharedColors[to].shade40,[`colorPalette${ro}Background2`]:statusSharedColors[to].shade30,[`colorPalette${ro}Background3`]:statusSharedColors[to].primary,[`colorPalette${ro}Foreground1`]:statusSharedColors[to].tint30,[`colorPalette${ro}Foreground2`]:statusSharedColors[to].tint40,[`colorPalette${ro}Foreground3`]:statusSharedColors[to].tint20,[`colorPalette${ro}BorderActive`]:statusSharedColors[to].tint30,[`colorPalette${ro}Border1`]:statusSharedColors[to].primary,[`colorPalette${ro}Border2`]:statusSharedColors[to].tint20};return Object.assign(eo,no)},{});statusColorPaletteTokens.colorPaletteRedForeground3=statusSharedColors.red.tint30;statusColorPaletteTokens.colorPaletteRedBorder2=statusSharedColors.red.tint30;statusColorPaletteTokens.colorPaletteGreenForeground3=statusSharedColors.green.tint40;statusColorPaletteTokens.colorPaletteGreenBorder2=statusSharedColors.green.tint40;statusColorPaletteTokens.colorPaletteDarkOrangeForeground3=statusSharedColors.darkOrange.tint30;statusColorPaletteTokens.colorPaletteDarkOrangeBorder2=statusSharedColors.darkOrange.tint30;statusColorPaletteTokens.colorPaletteRedForegroundInverted=statusSharedColors.red.primary;statusColorPaletteTokens.colorPaletteGreenForegroundInverted=statusSharedColors.green.primary;statusColorPaletteTokens.colorPaletteYellowForegroundInverted=statusSharedColors.yellow.shade30;const personaColorPaletteTokens=personaSharedColorNames.reduce((eo,to)=>{const ro=to.slice(0,1).toUpperCase()+to.slice(1),no={[`colorPalette${ro}Background2`]:personaSharedColors[to].shade30,[`colorPalette${ro}Foreground2`]:personaSharedColors[to].tint40,[`colorPalette${ro}BorderActive`]:personaSharedColors[to].tint30};return Object.assign(eo,no)},{});personaColorPaletteTokens.colorPaletteDarkRedBackground2=personaSharedColors.darkRed.shade20;personaColorPaletteTokens.colorPalettePlumBackground2=personaSharedColors.plum.shade20;const colorPaletteTokens={...statusColorPaletteTokens,...personaColorPaletteTokens},colorStatusTokens=Object.entries(statusColorMapping).reduce((eo,[to,ro])=>{const no=to.slice(0,1).toUpperCase()+to.slice(1),oo={[`colorStatus${no}Background1`]:mappedStatusColors[ro].shade40,[`colorStatus${no}Background2`]:mappedStatusColors[ro].shade30,[`colorStatus${no}Background3`]:mappedStatusColors[ro].primary,[`colorStatus${no}Foreground1`]:mappedStatusColors[ro].tint30,[`colorStatus${no}Foreground2`]:mappedStatusColors[ro].tint40,[`colorStatus${no}Foreground3`]:mappedStatusColors[ro].tint20,[`colorStatus${no}BorderActive`]:mappedStatusColors[ro].tint30,[`colorStatus${no}ForegroundInverted`]:mappedStatusColors[ro].shade10,[`colorStatus${no}Border1`]:mappedStatusColors[ro].primary,[`colorStatus${no}Border2`]:mappedStatusColors[ro].tint20};return Object.assign(eo,oo)},{});colorStatusTokens.colorStatusDangerForeground3=mappedStatusColors[statusColorMapping.danger].tint30;colorStatusTokens.colorStatusDangerBorder2=mappedStatusColors[statusColorMapping.danger].tint30;colorStatusTokens.colorStatusSuccessForeground3=mappedStatusColors[statusColorMapping.success].tint40;colorStatusTokens.colorStatusSuccessBorder2=mappedStatusColors[statusColorMapping.success].tint40;colorStatusTokens.colorStatusWarningForegroundInverted=mappedStatusColors[statusColorMapping.warning].shade20;const webLightTheme=createLightTheme(brandWeb),generateColorTokens=eo=>({colorNeutralForeground1:white,colorNeutralForeground1Hover:white,colorNeutralForeground1Pressed:white,colorNeutralForeground1Selected:white,colorNeutralForeground2:grey[84],colorNeutralForeground2Hover:white,colorNeutralForeground2Pressed:white,colorNeutralForeground2Selected:white,colorNeutralForeground2BrandHover:eo[100],colorNeutralForeground2BrandPressed:eo[90],colorNeutralForeground2BrandSelected:eo[100],colorNeutralForeground3:grey[68],colorNeutralForeground3Hover:grey[84],colorNeutralForeground3Pressed:grey[84],colorNeutralForeground3Selected:grey[84],colorNeutralForeground3BrandHover:eo[100],colorNeutralForeground3BrandPressed:eo[90],colorNeutralForeground3BrandSelected:eo[100],colorNeutralForeground4:grey[60],colorNeutralForegroundDisabled:grey[36],colorNeutralForegroundInvertedDisabled:whiteAlpha[40],colorBrandForegroundLink:eo[100],colorBrandForegroundLinkHover:eo[110],colorBrandForegroundLinkPressed:eo[90],colorBrandForegroundLinkSelected:eo[100],colorNeutralForeground2Link:grey[84],colorNeutralForeground2LinkHover:white,colorNeutralForeground2LinkPressed:white,colorNeutralForeground2LinkSelected:white,colorCompoundBrandForeground1:eo[100],colorCompoundBrandForeground1Hover:eo[110],colorCompoundBrandForeground1Pressed:eo[90],colorBrandForeground1:eo[100],colorBrandForeground2:eo[110],colorBrandForeground2Hover:eo[130],colorBrandForeground2Pressed:eo[160],colorNeutralForeground1Static:grey[14],colorNeutralForegroundStaticInverted:white,colorNeutralForegroundInverted:grey[14],colorNeutralForegroundInvertedHover:grey[14],colorNeutralForegroundInvertedPressed:grey[14],colorNeutralForegroundInvertedSelected:grey[14],colorNeutralForegroundInverted2:grey[14],colorNeutralForegroundOnBrand:white,colorNeutralForegroundInvertedLink:white,colorNeutralForegroundInvertedLinkHover:white,colorNeutralForegroundInvertedLinkPressed:white,colorNeutralForegroundInvertedLinkSelected:white,colorBrandForegroundInverted:eo[80],colorBrandForegroundInvertedHover:eo[70],colorBrandForegroundInvertedPressed:eo[60],colorBrandForegroundOnLight:eo[80],colorBrandForegroundOnLightHover:eo[70],colorBrandForegroundOnLightPressed:eo[50],colorBrandForegroundOnLightSelected:eo[60],colorNeutralBackground1:grey[16],colorNeutralBackground1Hover:grey[24],colorNeutralBackground1Pressed:grey[12],colorNeutralBackground1Selected:grey[22],colorNeutralBackground2:grey[12],colorNeutralBackground2Hover:grey[20],colorNeutralBackground2Pressed:grey[8],colorNeutralBackground2Selected:grey[18],colorNeutralBackground3:grey[8],colorNeutralBackground3Hover:grey[16],colorNeutralBackground3Pressed:grey[4],colorNeutralBackground3Selected:grey[14],colorNeutralBackground4:grey[4],colorNeutralBackground4Hover:grey[12],colorNeutralBackground4Pressed:black,colorNeutralBackground4Selected:grey[10],colorNeutralBackground5:black,colorNeutralBackground5Hover:grey[8],colorNeutralBackground5Pressed:grey[2],colorNeutralBackground5Selected:grey[6],colorNeutralBackground6:grey[20],colorNeutralBackgroundInverted:white,colorNeutralBackgroundStatic:grey[24],colorNeutralBackgroundAlpha:grey10Alpha[50],colorNeutralBackgroundAlpha2:grey12Alpha[70],colorSubtleBackground:"transparent",colorSubtleBackgroundHover:grey[22],colorSubtleBackgroundPressed:grey[18],colorSubtleBackgroundSelected:grey[20],colorSubtleBackgroundLightAlphaHover:grey14Alpha[80],colorSubtleBackgroundLightAlphaPressed:grey14Alpha[50],colorSubtleBackgroundLightAlphaSelected:"transparent",colorSubtleBackgroundInverted:"transparent",colorSubtleBackgroundInvertedHover:blackAlpha[10],colorSubtleBackgroundInvertedPressed:blackAlpha[30],colorSubtleBackgroundInvertedSelected:blackAlpha[20],colorTransparentBackground:"transparent",colorTransparentBackgroundHover:"transparent",colorTransparentBackgroundPressed:"transparent",colorTransparentBackgroundSelected:"transparent",colorNeutralBackgroundDisabled:grey[8],colorNeutralBackgroundInvertedDisabled:whiteAlpha[10],colorNeutralStencil1:grey[34],colorNeutralStencil2:grey[20],colorNeutralStencil1Alpha:whiteAlpha[10],colorNeutralStencil2Alpha:whiteAlpha[5],colorBackgroundOverlay:blackAlpha[50],colorScrollbarOverlay:whiteAlpha[60],colorBrandBackground:eo[70],colorBrandBackgroundHover:eo[80],colorBrandBackgroundPressed:eo[40],colorBrandBackgroundSelected:eo[60],colorCompoundBrandBackground:eo[100],colorCompoundBrandBackgroundHover:eo[110],colorCompoundBrandBackgroundPressed:eo[90],colorBrandBackgroundStatic:eo[80],colorBrandBackground2:eo[20],colorBrandBackground2Hover:eo[40],colorBrandBackground2Pressed:eo[10],colorBrandBackgroundInverted:white,colorBrandBackgroundInvertedHover:eo[160],colorBrandBackgroundInvertedPressed:eo[140],colorBrandBackgroundInvertedSelected:eo[150],colorNeutralStrokeAccessible:grey[68],colorNeutralStrokeAccessibleHover:grey[74],colorNeutralStrokeAccessiblePressed:grey[70],colorNeutralStrokeAccessibleSelected:eo[100],colorNeutralStroke1:grey[40],colorNeutralStroke1Hover:grey[46],colorNeutralStroke1Pressed:grey[42],colorNeutralStroke1Selected:grey[44],colorNeutralStroke2:grey[32],colorNeutralStroke3:grey[24],colorNeutralStrokeSubtle:grey[4],colorNeutralStrokeOnBrand:grey[16],colorNeutralStrokeOnBrand2:white,colorNeutralStrokeOnBrand2Hover:white,colorNeutralStrokeOnBrand2Pressed:white,colorNeutralStrokeOnBrand2Selected:white,colorBrandStroke1:eo[100],colorBrandStroke2:eo[50],colorBrandStroke2Hover:eo[50],colorBrandStroke2Pressed:eo[30],colorBrandStroke2Contrast:eo[50],colorCompoundBrandStroke:eo[100],colorCompoundBrandStrokeHover:eo[110],colorCompoundBrandStrokePressed:eo[90],colorNeutralStrokeDisabled:grey[26],colorNeutralStrokeInvertedDisabled:whiteAlpha[40],colorTransparentStroke:"transparent",colorTransparentStrokeInteractive:"transparent",colorTransparentStrokeDisabled:"transparent",colorNeutralStrokeAlpha:whiteAlpha[10],colorNeutralStrokeAlpha2:whiteAlpha[20],colorStrokeFocus1:black,colorStrokeFocus2:white,colorNeutralShadowAmbient:"rgba(0,0,0,0.24)",colorNeutralShadowKey:"rgba(0,0,0,0.28)",colorNeutralShadowAmbientLighter:"rgba(0,0,0,0.12)",colorNeutralShadowKeyLighter:"rgba(0,0,0,0.14)",colorNeutralShadowAmbientDarker:"rgba(0,0,0,0.40)",colorNeutralShadowKeyDarker:"rgba(0,0,0,0.48)",colorBrandShadowAmbient:"rgba(0,0,0,0.30)",colorBrandShadowKey:"rgba(0,0,0,0.25)"}),createDarkTheme=eo=>{const to=generateColorTokens(eo);return{...borderRadius,...fontSizes,...lineHeights,...fontFamilies,...fontWeights,...strokeWidths,...horizontalSpacings,...verticalSpacings,...durations,...curves,...to,...colorPaletteTokens,...colorStatusTokens,...createShadowTokens(to.colorNeutralShadowAmbient,to.colorNeutralShadowKey),...createShadowTokens(to.colorBrandShadowAmbient,to.colorBrandShadowKey,"Brand")}},webDarkTheme=createDarkTheme(brandWeb),fluentProviderClassNames={root:"fui-FluentProvider"},useStyles$C=__styles$1({root:{sj55zd:"f19n0e5",De3pzq:"fxugw4r",fsow6f:["f1o700av","fes3tcz"],Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"}},{d:[".f19n0e5{color:var(--colorNeutralForeground1);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f1o700av{text-align:left;}",".fes3tcz{text-align:right;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}"]}),useFluentProviderStyles_unstable=eo=>{const to=useRenderer(),ro=useStyles$C({dir:eo.dir,renderer:to});return eo.root.className=mergeClasses(fluentProviderClassNames.root,eo.themeClassName,ro.root,eo.root.className),eo},useInsertionEffect$1=reactExports.useInsertionEffect?reactExports.useInsertionEffect:useIsomorphicLayoutEffect$1,createStyleTag=(eo,to)=>{if(!eo)return;const ro=eo.createElement("style");return Object.keys(to).forEach(no=>{ro.setAttribute(no,to[no])}),eo.head.appendChild(ro),ro},insertSheet=(eo,to)=>{const ro=eo.sheet;ro&&(ro.cssRules.length>0&&ro.deleteRule(0),ro.insertRule(to,0))},useFluentProviderThemeStyleTag=eo=>{const{targetDocument:to,theme:ro,rendererAttributes:no}=eo,oo=reactExports.useRef(),io=useId$1(fluentProviderClassNames.root),so=no,ao=reactExports.useMemo(()=>createCSSRuleFromTheme(`.${io}`,ro),[ro,io]);return useHandleSSRStyleElements(to,io),useInsertionEffect$1(()=>{const lo=to==null?void 0:to.getElementById(io);return lo?oo.current=lo:(oo.current=createStyleTag(to,{...so,id:io}),oo.current&&insertSheet(oo.current,ao)),()=>{var uo;(uo=oo.current)===null||uo===void 0||uo.remove()}},[io,to,ao,so]),{styleTagId:io,rule:ao}};function useHandleSSRStyleElements(eo,to){reactExports.useState(()=>{if(!eo)return;const ro=eo.getElementById(to);ro&&eo.head.append(ro)})}const EMPTY_OBJECT={},useFluentProvider_unstable=(eo,to)=>{const ro=useFluent(),no=useTheme(),oo=useOverrides(),io=reactExports.useContext(CustomStyleHooksContext)||EMPTY_OBJECT,{applyStylesToPortals:so=!0,customStyleHooks_unstable:ao,dir:lo=ro.dir,targetDocument:uo=ro.targetDocument,theme:co,overrides_unstable:fo={}}=eo,ho=shallowMerge(no,co),po=shallowMerge(oo,fo),go=shallowMerge(io,ao),vo=useRenderer();var bo;const{styleTagId:xo,rule:_o}=useFluentProviderThemeStyleTag({theme:ho,targetDocument:uo,rendererAttributes:(bo=vo.styleElementAttributes)!==null&&bo!==void 0?bo:{}});return{applyStylesToPortals:so,customStyleHooks_unstable:go,dir:lo,targetDocument:uo,theme:ho,overrides_unstable:po,themeClassName:xo,components:{root:"div"},root:always(getIntrinsicElementProps("div",{...eo,dir:lo,ref:useMergedRefs$1(to,useFocusVisible({targetDocument:uo}))}),{elementType:"div"}),serverStyleProps:{cssRule:_o,attributes:{...vo.styleElementAttributes,id:xo}}}};function shallowMerge(eo,to){return eo&&to?{...eo,...to}:eo||to}function useTheme(){return reactExports.useContext(ThemeContext$2)}function useFluentProviderContextValues_unstable(eo){const{applyStylesToPortals:to,customStyleHooks_unstable:ro,dir:no,root:oo,targetDocument:io,theme:so,themeClassName:ao,overrides_unstable:lo}=eo,uo=reactExports.useMemo(()=>({dir:no,targetDocument:io}),[no,io]),[co]=reactExports.useState(()=>({})),fo=reactExports.useMemo(()=>({textDirection:no}),[no]);return{customStyleHooks_unstable:ro,overrides_unstable:lo,provider:uo,textDirection:no,iconDirection:fo,tooltip:co,theme:so,themeClassName:to?oo.className:ao}}const FluentProvider=reactExports.forwardRef((eo,to)=>{const ro=useFluentProvider_unstable(eo,to);useFluentProviderStyles_unstable(ro);const no=useFluentProviderContextValues_unstable(ro);return renderFluentProvider_unstable(ro,no)});FluentProvider.displayName="FluentProvider";const createProvider=eo=>ro=>{const no=reactExports.useRef(ro.value),oo=reactExports.useRef(0),io=reactExports.useRef();return io.current||(io.current={value:no,version:oo,listeners:[]}),useIsomorphicLayoutEffect$1(()=>{no.current=ro.value,oo.current+=1,schedulerExports.unstable_runWithPriority(schedulerExports.unstable_NormalPriority,()=>{io.current.listeners.forEach(so=>{so([oo.current,ro.value])})})},[ro.value]),reactExports.createElement(eo,{value:io.current},ro.children)},createContext=eo=>{const to=reactExports.createContext({value:{current:eo},version:{current:-1},listeners:[]});return to.Provider=createProvider(to.Provider),delete to.Consumer,to},useContextSelector=(eo,to)=>{const ro=reactExports.useContext(eo),{value:{current:no},version:{current:oo},listeners:io}=ro,so=to(no),[ao,lo]=reactExports.useReducer((uo,co)=>{if(!co)return[no,so];if(co[0]<=oo)return objectIs(uo[1],so)?uo:[no,so];try{if(objectIs(uo[0],co[1]))return uo;const fo=to(co[1]);return objectIs(uo[1],fo)?uo:[co[1],fo]}catch{}return[uo[0],uo[1]]},[no,so]);return objectIs(ao[1],so)||lo(void 0),useIsomorphicLayoutEffect$1(()=>(io.push(lo),()=>{const uo=io.indexOf(lo);io.splice(uo,1)}),[io]),ao[1]};function is$3(eo,to){return eo===to&&(eo!==0||1/eo===1/to)||eo!==eo&&to!==to}const objectIs=typeof Object.is=="function"?Object.is:is$3;function useHasParentContext(eo){const to=reactExports.useContext(eo);return to.version?to.version.current!==-1:!1}const AccordionContext=createContext(void 0),accordionContextDefaultValue={openItems:[],collapsible:!1,multiple:!1,navigation:void 0,requestToggle(){}},{Provider:AccordionProvider}=AccordionContext,useAccordionContext_unstable=eo=>useContextSelector(AccordionContext,(to=accordionContextDefaultValue)=>eo(to)),renderAccordion_unstable=(eo,to)=>jsx$1(eo.root,{children:jsx$1(AccordionProvider,{value:to.accordion,children:eo.root.children})}),useAccordion_unstable=(eo,to)=>{const{openItems:ro,defaultOpenItems:no,multiple:oo=!1,collapsible:io=!1,onToggle:so,navigation:ao}=eo,[lo,uo]=useControllableState({state:reactExports.useMemo(()=>normalizeValues(ro),[ro]),defaultState:()=>initializeUncontrolledOpenItems({defaultOpenItems:no,multiple:oo}),initialState:[]}),co=useArrowNavigationGroup({circular:ao==="circular",tabbable:!0}),fo=useEventCallback$3(ho=>{const po=updateOpenItems(ho.value,lo,oo,io);so==null||so(ho.event,{value:ho.value,openItems:po}),uo(po)});return{collapsible:io,multiple:oo,navigation:ao,openItems:lo,requestToggle:fo,components:{root:"div"},root:always(getIntrinsicElementProps("div",{...eo,...ao?co:void 0,ref:to}),{elementType:"div"})}};function initializeUncontrolledOpenItems({defaultOpenItems:eo,multiple:to}){return eo!==void 0?Array.isArray(eo)?to?eo:[eo[0]]:[eo]:[]}function updateOpenItems(eo,to,ro,no){if(ro)if(to.includes(eo)){if(to.length>1||no)return to.filter(oo=>oo!==eo)}else return[...to,eo].sort();else return to[0]===eo&&no?[]:[eo];return to}function normalizeValues(eo){if(eo!==void 0)return Array.isArray(eo)?eo:[eo]}function useAccordionContextValues_unstable(eo){const{navigation:to,openItems:ro,requestToggle:no,multiple:oo,collapsible:io}=eo;return{accordion:{navigation:to,openItems:ro,requestToggle:no,collapsible:io,multiple:oo}}}const accordionClassNames={root:"fui-Accordion"},useAccordionStyles_unstable=eo=>(eo.root.className=mergeClasses(accordionClassNames.root,eo.root.className),eo),Accordion=reactExports.forwardRef((eo,to)=>{const ro=useAccordion_unstable(eo,to),no=useAccordionContextValues_unstable(ro);return useAccordionStyles_unstable(ro),useCustomStyleHook("useAccordionStyles_unstable")(ro),renderAccordion_unstable(ro,no)});Accordion.displayName="Accordion";const useAccordionItem_unstable=(eo,to)=>{const{value:ro,disabled:no=!1}=eo,oo=useAccordionContext_unstable(ao=>ao.requestToggle),io=useAccordionContext_unstable(ao=>ao.openItems.includes(ro)),so=useEventCallback$3(ao=>oo({event:ao,value:ro}));return{open:io,value:ro,disabled:no,onHeaderClick:so,components:{root:"div"},root:always(getIntrinsicElementProps("div",{ref:to,...eo}),{elementType:"div"})}};function useAccordionItemContextValues_unstable(eo){const{disabled:to,open:ro,value:no,onHeaderClick:oo}=eo;return{accordionItem:reactExports.useMemo(()=>({disabled:to,open:ro,value:no,onHeaderClick:oo}),[to,ro,no,oo])}}const AccordionItemContext=reactExports.createContext(void 0),accordionItemContextDefaultValue={open:!1,disabled:!1,value:void 0,onHeaderClick(){}},{Provider:AccordionItemProvider}=AccordionItemContext,useAccordionItemContext_unstable=()=>{var eo;return(eo=reactExports.useContext(AccordionItemContext))!==null&&eo!==void 0?eo:accordionItemContextDefaultValue},renderAccordionItem_unstable=(eo,to)=>jsx$1(eo.root,{children:jsx$1(AccordionItemProvider,{value:to.accordionItem,children:eo.root.children})}),accordionItemClassNames={root:"fui-AccordionItem"},useAccordionItemStyles_unstable=eo=>(eo.root.className=mergeClasses(accordionItemClassNames.root,eo.root.className),eo),AccordionItem=reactExports.forwardRef((eo,to)=>{const ro=useAccordionItem_unstable(eo,to),no=useAccordionItemContextValues_unstable(ro);return useAccordionItemStyles_unstable(ro),useCustomStyleHook("useAccordionItemStyles_unstable")(ro),renderAccordionItem_unstable(ro,no)});AccordionItem.displayName="AccordionItem";const Enter="Enter",Space=" ",Tab$2="Tab",ArrowDown="ArrowDown",ArrowLeft="ArrowLeft",ArrowRight="ArrowRight",ArrowUp="ArrowUp",End="End",Home="Home",PageDown="PageDown",PageUp="PageUp",Escape$1="Escape";function useARIAButtonProps(eo,to){const{disabled:ro,disabledFocusable:no=!1,["aria-disabled"]:oo,onClick:io,onKeyDown:so,onKeyUp:ao,...lo}=to??{},uo=typeof oo=="string"?oo==="true":oo,co=ro||no||uo,fo=useEventCallback$3(go=>{co?(go.preventDefault(),go.stopPropagation()):io==null||io(go)}),ho=useEventCallback$3(go=>{if(so==null||so(go),go.isDefaultPrevented())return;const vo=go.key;if(co&&(vo===Enter||vo===Space)){go.preventDefault(),go.stopPropagation();return}if(vo===Space){go.preventDefault();return}else vo===Enter&&(go.preventDefault(),go.currentTarget.click())}),po=useEventCallback$3(go=>{if(ao==null||ao(go),go.isDefaultPrevented())return;const vo=go.key;if(co&&(vo===Enter||vo===Space)){go.preventDefault(),go.stopPropagation();return}vo===Space&&(go.preventDefault(),go.currentTarget.click())});if(eo==="button"||eo===void 0)return{...lo,disabled:ro&&!no,"aria-disabled":no?!0:uo,onClick:no?void 0:fo,onKeyUp:no?void 0:ao,onKeyDown:no?void 0:so};{const go={role:"button",tabIndex:ro&&!no?void 0:0,...lo,onClick:fo,onKeyUp:po,onKeyDown:ho,"aria-disabled":ro||no||uo};return eo==="a"&&co&&(go.href=void 0),go}}const useAccordionHeader_unstable=(eo,to)=>{const{icon:ro,button:no,expandIcon:oo,inline:io=!1,size:so="medium",expandIconPosition:ao="start"}=eo,{value:lo,disabled:uo,open:co}=useAccordionItemContext_unstable(),fo=useAccordionContext_unstable(bo=>bo.requestToggle),ho=useAccordionContext_unstable(bo=>!bo.collapsible&&bo.openItems.length===1&&co),{dir:po}=useFluent();let go;ao==="end"?go=co?-90:90:go=co?90:po!=="rtl"?0:180;const vo=always(no,{elementType:"button",defaultProps:{disabled:uo,disabledFocusable:ho,"aria-expanded":co,type:"button"}});return vo.onClick=useEventCallback$3(bo=>{if(isResolvedShorthand(no)){var xo;(xo=no.onClick)===null||xo===void 0||xo.call(no,bo)}bo.defaultPrevented||fo({value:lo,event:bo})}),{disabled:uo,open:co,size:so,inline:io,expandIconPosition:ao,components:{root:"div",button:"button",expandIcon:"span",icon:"div"},root:always(getIntrinsicElementProps("div",{ref:to,...eo}),{elementType:"div"}),icon:optional(ro,{elementType:"div"}),expandIcon:optional(oo,{renderByDefault:!0,defaultProps:{children:reactExports.createElement(ChevronRightRegular,{style:{transform:`rotate(${go}deg)`}}),"aria-hidden":!0},elementType:"span"}),button:useARIAButtonProps(vo.as,vo)}},AccordionHeaderContext=reactExports.createContext(void 0),{Provider:AccordionHeaderProvider}=AccordionHeaderContext,renderAccordionHeader_unstable=(eo,to)=>jsx$1(AccordionHeaderProvider,{value:to.accordionHeader,children:jsx$1(eo.root,{children:jsxs(eo.button,{children:[eo.expandIconPosition==="start"&&eo.expandIcon&&jsx$1(eo.expandIcon,{}),eo.icon&&jsx$1(eo.icon,{}),eo.root.children,eo.expandIconPosition==="end"&&eo.expandIcon&&jsx$1(eo.expandIcon,{})]})})}),accordionHeaderClassNames={root:"fui-AccordionHeader",button:"fui-AccordionHeader__button",expandIcon:"fui-AccordionHeader__expandIcon",icon:"fui-AccordionHeader__icon"},useStyles$B=__styles({resetButton:{B7ck84d:"f1e4lqlz",De3pzq:"f1u2r49w",sj55zd:"f1ym3bx4",Bahqtrf:"f1mo0ibp",Be2twd7:"fjoy568",Bg96gwp:"fytdu2e",B68tc82:"f1mtd64y",Bmxbyg5:"f1y7q3j9",z8tnut:"f1g0x7ka",z189sj:["fhxju0i","f1cnd47f"],Byoj8tv:"f1qch9an",uwmqm3:["f1cnd47f","fhxju0i"],Bv0vk6g:"f37px4s",fsow6f:"fgusgyc"},focusIndicator:{Brovlpu:"ftqa4ok",B486eqv:"f2hkw1w",B8q5s1w:"f8hki3x",Bci5o5g:["f1d2448m","ffh67wi"],n8qw10:"f1bjia2o",Bdrgwmp:["ffh67wi","f1d2448m"],Bb7d1vk:"f226i61",zhwhgb:["f13kzufm","fsx75g8"],dhy2o1:"flujwa2",Gfyso:["fsx75g8","f13kzufm"],Bm4h7ae:"f15bsgw9",B7ys5i9:"f14e48fq",Busjfv9:"f18yb2kv",Bhk32uz:"fd6o370",Bf4ptjt:"fh1cnn4",kclons:["fy7oxxb","f184ne2d"],Bhdgwq3:"fpukqih",Blkhhs4:["f184ne2d","fy7oxxb"],Bqtpl0w:"frrh606",clg4pj:["f1v5zibi","fo2hd23"],hgwjuy:"ful5kiu",Bonggc9:["fo2hd23","f1v5zibi"],B1tsrr9:["f1jqcqds","ftffrms"],Dah5zi:["ftffrms","f1jqcqds"],Bkh64rk:["f2e7qr6","fsr1zz6"],qqdqy8:["fsr1zz6","f2e7qr6"],B6dhp37:"f1dvezut",i03rao:["fd0oaoj","f1cwg4i8"],Boxcth7:"fjvm52t",Bsom6fd:["f1cwg4i8","fd0oaoj"],J0r882:"f57olzd",Bule8hv:["f4stah7","fs1por5"],Bjwuhne:"f480a47",Ghsupd:["fs1por5","f4stah7"]},root:{sj55zd:"f19n0e5",De3pzq:"f1c21dwh",B6of3ja:"f1hu3pq6",t21cq0:["f11qmguv","f1tyq0we"],jrapky:"f19f4twv",Frg6f3:["f1tyq0we","f11qmguv"],Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"]},rootDisabled:{Bcmaq0h:"fwrgwhw",sj55zd:"f1s2aq7o"},rootInline:{mc9l5x:"f14t3ns0"},button:{qhf8xq:"f10pi13n",a9b677:"fly5x3f",B4j52fo:"f5ogflp",Bekrc4i:["f1hqa2wf","finvdd3"],Bn0qgzm:"f1f09k3d",ibv6hh:["finvdd3","f1hqa2wf"],icvyot:"fzkkow9",vrafjx:["fcdblym","fjik90z"],oivjwe:"fg706s2",wvpqe5:["fjik90z","fcdblym"],g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],z8tnut:"f1g0x7ka",z189sj:["fw5db7e","f1uw59to"],Byoj8tv:"f1qch9an",uwmqm3:["f1ng84yb","f11gcy0p"],sshi5w:"f5pgtk9",mc9l5x:"f22iagw",Bt984gj:"f122n59",Bceei9c:"f1k6fduh",Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi",B7ck84d:"f1ewtqcl"},buttonSmall:{sshi5w:"f1nxs5xn",Be2twd7:"fy9rknc"},buttonLarge:{Bg96gwp:"faaz57k",Be2twd7:"fod5ikn"},buttonExtraLarge:{Bg96gwp:"f106mvju",Be2twd7:"f1pp30po"},buttonInline:{mc9l5x:"ftuwxu6"},buttonExpandIconEndNoIcon:{uwmqm3:["f1uw59to","fw5db7e"]},buttonExpandIconEnd:{z189sj:["f11gcy0p","f1ng84yb"]},buttonDisabled:{Bceei9c:"fdrzuqr"},expandIcon:{Bqenvij:"f1l02sjl",mc9l5x:"f22iagw",Bt984gj:"f122n59",Bg96gwp:"f106mvju",Be2twd7:"f1pp30po"},expandIconStart:{z189sj:["f1vdfbxk","f1f5gg8d"]},expandIconEnd:{Bh6795r:"fqerorx",Bnnss6s:"f1neuvcm",xawz:"flqd7gy",mc9l5x:"f22iagw",Brf1p80:"f9c4gz4",uwmqm3:["f1f5gg8d","f1vdfbxk"]},icon:{Bqenvij:"f1l02sjl",mc9l5x:"f22iagw",Bt984gj:"f122n59",z189sj:["f1vdfbxk","f1f5gg8d"],Bg96gwp:"f106mvju",Be2twd7:"f1pp30po"}},{d:[".f1e4lqlz{box-sizing:content-box;}",".f1u2r49w{background-color:inherit;}",".f1ym3bx4{color:inherit;}",".f1mo0ibp{font-family:inherit;}",".fjoy568{font-size:inherit;}",".fytdu2e{line-height:normal;}",".f1mtd64y{overflow-x:visible;}",".f1y7q3j9{overflow-y:visible;}",".f1g0x7ka{padding-top:0;}",".fhxju0i{padding-right:0;}",".f1cnd47f{padding-left:0;}",".f1qch9an{padding-bottom:0;}",".f37px4s{-webkit-appearance:button;}",".fgusgyc{text-align:unset;}",".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",'.f15bsgw9[data-fui-focus-visible]::after{content:"";}',".f14e48fq[data-fui-focus-visible]::after{position:absolute;}",".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}",".fd6o370[data-fui-focus-visible]::after{z-index:1;}",".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}",".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}",".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}",".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}",".frrh606[data-fui-focus-visible]::after{border-top-width:2px;}",".f1v5zibi[data-fui-focus-visible]::after{border-right-width:2px;}",".fo2hd23[data-fui-focus-visible]::after{border-left-width:2px;}",".ful5kiu[data-fui-focus-visible]::after{border-bottom-width:2px;}",".f1jqcqds[data-fui-focus-visible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}",".ftffrms[data-fui-focus-visible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}",".f2e7qr6[data-fui-focus-visible]::after{border-top-right-radius:var(--borderRadiusMedium);}",".fsr1zz6[data-fui-focus-visible]::after{border-top-left-radius:var(--borderRadiusMedium);}",".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}",".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}",".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}",".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}",".f57olzd[data-fui-focus-visible]::after{top:calc(2px * -1);}",".f4stah7[data-fui-focus-visible]::after{right:calc(2px * -1);}",".fs1por5[data-fui-focus-visible]::after{left:calc(2px * -1);}",".f480a47[data-fui-focus-visible]::after{bottom:calc(2px * -1);}",".f19n0e5{color:var(--colorNeutralForeground1);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f1hu3pq6{margin-top:0;}",".f11qmguv{margin-right:0;}",".f1tyq0we{margin-left:0;}",".f19f4twv{margin-bottom:0;}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".fwrgwhw{background-image:none;}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f14t3ns0{display:inline-block;}",".f10pi13n{position:relative;}",".fly5x3f{width:100%;}",".f5ogflp{border-top-width:1px;}",".f1hqa2wf{border-right-width:1px;}",".finvdd3{border-left-width:1px;}",".f1f09k3d{border-bottom-width:1px;}",".fzkkow9{border-top-style:solid;}",".fcdblym{border-right-style:solid;}",".fjik90z{border-left-style:solid;}",".fg706s2{border-bottom-style:solid;}",".f1p3nwhy{border-top-color:transparent;}",".f11589ue{border-right-color:transparent;}",".f1pdflbu{border-left-color:transparent;}",".f1q5o8ev{border-bottom-color:transparent;}",".fw5db7e{padding-right:var(--spacingHorizontalM);}",".f1uw59to{padding-left:var(--spacingHorizontalM);}",".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}",".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}",".f5pgtk9{min-height:44px;}",".f22iagw{display:flex;}",".f122n59{align-items:center;}",".f1k6fduh{cursor:pointer;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".f1ewtqcl{box-sizing:border-box;}",".f1nxs5xn{min-height:32px;}",".fy9rknc{font-size:var(--fontSizeBase200);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".f106mvju{line-height:var(--lineHeightBase500);}",".f1pp30po{font-size:var(--fontSizeBase500);}",".ftuwxu6{display:inline-flex;}",".fdrzuqr{cursor:not-allowed;}",".f1l02sjl{height:100%;}",".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",".fqerorx{flex-grow:1;}",".f1neuvcm{flex-shrink:1;}",".flqd7gy{flex-basis:0%;}",".f9c4gz4{justify-content:flex-end;}"],f:[".ftqa4ok:focus{outline-style:none;}"],i:[".f2hkw1w:focus-visible{outline-style:none;}"],m:[["@media (forced-colors: active){.f226i61[data-fui-focus-visible]::after{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f13kzufm[data-fui-focus-visible]::after{border-right-color:Highlight;}.fsx75g8[data-fui-focus-visible]::after{border-left-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.flujwa2[data-fui-focus-visible]::after{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}]]}),useAccordionHeaderStyles_unstable=eo=>{const to=useStyles$B();return eo.root.className=mergeClasses(accordionHeaderClassNames.root,to.root,eo.inline&&to.rootInline,eo.disabled&&to.rootDisabled,eo.root.className),eo.button.className=mergeClasses(accordionHeaderClassNames.button,to.resetButton,to.button,to.focusIndicator,eo.expandIconPosition==="end"&&!eo.icon&&to.buttonExpandIconEndNoIcon,eo.expandIconPosition==="end"&&to.buttonExpandIconEnd,eo.inline&&to.buttonInline,eo.size==="small"&&to.buttonSmall,eo.size==="large"&&to.buttonLarge,eo.size==="extra-large"&&to.buttonExtraLarge,eo.disabled&&to.buttonDisabled,eo.button.className),eo.expandIcon&&(eo.expandIcon.className=mergeClasses(accordionHeaderClassNames.expandIcon,to.expandIcon,eo.expandIconPosition==="start"&&to.expandIconStart,eo.expandIconPosition==="end"&&to.expandIconEnd,eo.expandIcon.className)),eo.icon&&(eo.icon.className=mergeClasses(accordionHeaderClassNames.icon,to.icon,eo.icon.className)),eo};function useAccordionHeaderContextValues_unstable(eo){const{disabled:to,expandIconPosition:ro,open:no,size:oo}=eo;return{accordionHeader:reactExports.useMemo(()=>({disabled:to,expandIconPosition:ro,open:no,size:oo}),[to,ro,no,oo])}}const AccordionHeader=reactExports.forwardRef((eo,to)=>{const ro=useAccordionHeader_unstable(eo,to),no=useAccordionHeaderContextValues_unstable(ro);return useAccordionHeaderStyles_unstable(ro),useCustomStyleHook("useAccordionHeaderStyles_unstable")(ro),renderAccordionHeader_unstable(ro,no)});AccordionHeader.displayName="AccordionHeader";const useAccordionPanel_unstable=(eo,to)=>{const{open:ro}=useAccordionItemContext_unstable(),no=useTabsterAttributes({focusable:{excludeFromMover:!0}}),oo=useAccordionContext_unstable(io=>io.navigation);return{open:ro,components:{root:"div"},root:always(getIntrinsicElementProps("div",{ref:to,...eo,...oo&&no}),{elementType:"div"})}},renderAccordionPanel_unstable=eo=>eo.open?jsx$1(eo.root,{children:eo.root.children}):null,accordionPanelClassNames={root:"fui-AccordionPanel"},useStyles$A=__styles({root:{B6of3ja:"f1hu3pq6",t21cq0:["fkujibs","f199hnxi"],jrapky:"f19f4twv",Frg6f3:["f199hnxi","fkujibs"]}},{d:[".f1hu3pq6{margin-top:0;}",".fkujibs{margin-right:var(--spacingHorizontalM);}",".f199hnxi{margin-left:var(--spacingHorizontalM);}",".f19f4twv{margin-bottom:0;}"]}),useAccordionPanelStyles_unstable=eo=>{const to=useStyles$A();return eo.root.className=mergeClasses(accordionPanelClassNames.root,to.root,eo.root.className),eo},AccordionPanel=reactExports.forwardRef((eo,to)=>{const ro=useAccordionPanel_unstable(eo,to);return useAccordionPanelStyles_unstable(ro),useCustomStyleHook("useAccordionPanelStyles_unstable")(ro),renderAccordionPanel_unstable(ro)});AccordionPanel.displayName="AccordionPanel";const useBadge_unstable=(eo,to)=>{const{shape:ro="circular",size:no="medium",iconPosition:oo="before",appearance:io="filled",color:so="brand"}=eo;return{shape:ro,size:no,iconPosition:oo,appearance:io,color:so,components:{root:"div",icon:"span"},root:always(getIntrinsicElementProps("div",{ref:to,...eo}),{elementType:"div"}),icon:optional(eo.icon,{elementType:"span"})}},badgeClassNames={root:"fui-Badge",icon:"fui-Badge__icon"},useRootClassName$1=__resetStyles("r1l7mb74","rntuq2r",[".r1l7mb74{display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;position:relative;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase200);height:20px;width:20px;min-width:max-content;padding:0 calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));border-radius:var(--borderRadiusCircular);border-color:var(--colorTransparentStroke);}",'.r1l7mb74::after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;border-style:solid;border-color:inherit;border-width:var(--strokeWidthThin);border-radius:inherit;}',".rntuq2r{display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;position:relative;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase200);height:20px;width:20px;min-width:max-content;padding:0 calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));border-radius:var(--borderRadiusCircular);border-color:var(--colorTransparentStroke);}",'.rntuq2r::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-style:solid;border-color:inherit;border-width:var(--strokeWidthThin);border-radius:inherit;}']),useRootStyles$6=__styles({fontSmallToTiny:{Bahqtrf:"fk6fouc",Be2twd7:"f13mqy1h",Bhrd7zp:"fl43uef",Bg96gwp:"fcpl73t"},tiny:{a9b677:"f16dn6v3",Bqenvij:"f3mu39s",Be2twd7:"f130uwy9",Bg96gwp:"fod1mrr",Bf4jedk:"f18p0k4z",z8tnut:"f1q8r6hh",z189sj:["fio2s09","fkiw60q"],Byoj8tv:"f9yu9nh",uwmqm3:["fkiw60q","fio2s09"]},"extra-small":{a9b677:"fpd43o0",Bqenvij:"f30q22z",Be2twd7:"f1tccstq",Bg96gwp:"f1y3arg5",Bf4jedk:"f18p0k4z",z8tnut:"f1q8r6hh",z189sj:["fio2s09","fkiw60q"],Byoj8tv:"f9yu9nh",uwmqm3:["fkiw60q","fio2s09"]},small:{a9b677:"fjw5fx7",Bqenvij:"fd461yt",z8tnut:"f1g0x7ka",z189sj:["fps1v9c","f17ae1jz"],Byoj8tv:"f1qch9an",uwmqm3:["f17ae1jz","fps1v9c"]},medium:{},large:{a9b677:"fq4mcun",Bqenvij:"frvgh55",z8tnut:"f1g0x7ka",z189sj:["f17a92cs","f1pe0i86"],Byoj8tv:"f1qch9an",uwmqm3:["f1pe0i86","f17a92cs"]},"extra-large":{a9b677:"f1szoe96",Bqenvij:"f1d2rq10",z8tnut:"f1g0x7ka",z189sj:["fqznh8f","f1xile11"],Byoj8tv:"f1qch9an",uwmqm3:["f1xile11","fqznh8f"]},square:{Bbmb7ep:["fzi6hpg","fyowgf4"],Beyfa6y:["fyowgf4","fzi6hpg"],B7oj6ja:["f3fg2lr","f13av6d4"],Btl43ni:["f13av6d4","f3fg2lr"]},rounded:{Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"]},roundedSmallToTiny:{Bbmb7ep:["f1g3puop","fi2rrw2"],Beyfa6y:["fi2rrw2","f1g3puop"],B7oj6ja:["f1rstyi9","f1s4nn1u"],Btl43ni:["f1s4nn1u","f1rstyi9"]},circular:{},borderGhost:{ap17g6:"f10ludwy"},filled:{},"filled-brand":{De3pzq:"ffp7eso",sj55zd:"f1phragk"},"filled-danger":{De3pzq:"fdl5y0r",sj55zd:"f1phragk"},"filled-important":{De3pzq:"f1c73kur",sj55zd:"fr0bkrk"},"filled-informative":{De3pzq:"f3vzo32",sj55zd:"f11d4kpn"},"filled-severe":{De3pzq:"f1s438gw",sj55zd:"f1phragk"},"filled-subtle":{De3pzq:"fxugw4r",sj55zd:"f19n0e5"},"filled-success":{De3pzq:"flxk52p",sj55zd:"f1phragk"},"filled-warning":{De3pzq:"ffq97bm",sj55zd:"ff5vbop"},ghost:{},"ghost-brand":{sj55zd:"f16muhyy"},"ghost-danger":{sj55zd:"f1whyuy6"},"ghost-important":{sj55zd:"f19n0e5"},"ghost-informative":{sj55zd:"f11d4kpn"},"ghost-severe":{sj55zd:"f1l8vj45"},"ghost-subtle":{sj55zd:"fonrgv7"},"ghost-success":{sj55zd:"f1m7fhi8"},"ghost-warning":{sj55zd:"fpti2h4"},outline:{g2u3we:"f23ftbb",h3c5rm:["f1gkuv52","f1p1bl80"],B9xav0g:"fioka3i",zhjwy3:["f1p1bl80","f1gkuv52"]},"outline-brand":{sj55zd:"f16muhyy"},"outline-danger":{sj55zd:"f1whyuy6",g2u3we:"fyqpifd",h3c5rm:["f3ukxca","f1k7dugc"],B9xav0g:"f1njxb2b",zhjwy3:["f1k7dugc","f3ukxca"]},"outline-important":{sj55zd:"f11d4kpn",g2u3we:"fq0vr37",h3c5rm:["f1byw159","f11cr0be"],B9xav0g:"f1c1zstj",zhjwy3:["f11cr0be","f1byw159"]},"outline-informative":{sj55zd:"f11d4kpn",g2u3we:"f68mrw8",h3c5rm:["f7pw515","fw35ms5"],B9xav0g:"frpde29",zhjwy3:["fw35ms5","f7pw515"]},"outline-severe":{sj55zd:"f1l8vj45"},"outline-subtle":{sj55zd:"fonrgv7"},"outline-success":{sj55zd:"f1m7fhi8",g2u3we:"f1mmhl11",h3c5rm:["f1tjpp2f","f1ocn5n7"],B9xav0g:"f1gjv25d",zhjwy3:["f1ocn5n7","f1tjpp2f"]},"outline-warning":{sj55zd:"fpti2h4"},tint:{},"tint-brand":{De3pzq:"f16xkysk",sj55zd:"faj9fo0",g2u3we:"f161y7kd",h3c5rm:["f1c8dzaj","f1sl6hi9"],B9xav0g:"f1619yhw",zhjwy3:["f1sl6hi9","f1c8dzaj"]},"tint-danger":{De3pzq:"ff0poqj",sj55zd:"f1hcrxcs",g2u3we:"f1oqjm8o",h3c5rm:["fkgrb8g","frb5wm0"],B9xav0g:"f1iai1ph",zhjwy3:["frb5wm0","fkgrb8g"]},"tint-important":{De3pzq:"f945g0u",sj55zd:"fr0bkrk",g2u3we:"fghlq4f",h3c5rm:["f1gn591s","fjscplz"],B9xav0g:"fb073pr",zhjwy3:["fjscplz","f1gn591s"]},"tint-informative":{De3pzq:"f1ctqxl6",sj55zd:"f11d4kpn",g2u3we:"f68mrw8",h3c5rm:["f7pw515","fw35ms5"],B9xav0g:"frpde29",zhjwy3:["fw35ms5","f7pw515"]},"tint-severe":{De3pzq:"f1xzsg4",sj55zd:"f1k5f75o",g2u3we:"fxy9dsj",h3c5rm:["f54u6j2","fcm23ze"],B9xav0g:"f4vf0uq",zhjwy3:["fcm23ze","f54u6j2"]},"tint-subtle":{De3pzq:"fxugw4r",sj55zd:"f11d4kpn",g2u3we:"f68mrw8",h3c5rm:["f7pw515","fw35ms5"],B9xav0g:"frpde29",zhjwy3:["fw35ms5","f7pw515"]},"tint-success":{De3pzq:"f2vsrz6",sj55zd:"ffmvakt",g2u3we:"fdmic9h",h3c5rm:["f196y6m","fetptd8"],B9xav0g:"f1pev5xq",zhjwy3:["fetptd8","f196y6m"]},"tint-warning":{De3pzq:"f10s6hli",sj55zd:"f42v8de",g2u3we:"fn9i3n",h3c5rm:["f1aw8cx4","f51if14"],B9xav0g:"fvq8iai",zhjwy3:["f51if14","f1aw8cx4"]}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".f13mqy1h{font-size:var(--fontSizeBase100);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".fcpl73t{line-height:var(--lineHeightBase100);}",".f16dn6v3{width:6px;}",".f3mu39s{height:6px;}",".f130uwy9{font-size:4px;}",".fod1mrr{line-height:4px;}",".f18p0k4z{min-width:unset;}",".f1q8r6hh{padding-top:unset;}",".fio2s09{padding-right:unset;}",".fkiw60q{padding-left:unset;}",".f9yu9nh{padding-bottom:unset;}",".fpd43o0{width:10px;}",".f30q22z{height:10px;}",".f1tccstq{font-size:6px;}",".f1y3arg5{line-height:6px;}",".fjw5fx7{width:16px;}",".fd461yt{height:16px;}",".f1g0x7ka{padding-top:0;}",".fps1v9c{padding-right:calc(var(--spacingHorizontalXXS) + var(--spacingHorizontalXXS));}",".f17ae1jz{padding-left:calc(var(--spacingHorizontalXXS) + var(--spacingHorizontalXXS));}",".f1qch9an{padding-bottom:0;}",".fq4mcun{width:24px;}",".frvgh55{height:24px;}",".f17a92cs{padding-right:calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));}",".f1pe0i86{padding-left:calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));}",".f1szoe96{width:32px;}",".f1d2rq10{height:32px;}",".fqznh8f{padding-right:calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}",".f1xile11{padding-left:calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}",".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}",".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}",".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}",".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}",".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}",".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}",".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}",".f10ludwy::after{display:none;}",".ffp7eso{background-color:var(--colorBrandBackground);}",".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}",".f1c73kur{background-color:var(--colorNeutralForeground1);}",".fr0bkrk{color:var(--colorNeutralBackground1);}",".f3vzo32{background-color:var(--colorNeutralBackground5);}",".f11d4kpn{color:var(--colorNeutralForeground3);}",".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f19n0e5{color:var(--colorNeutralForeground1);}",".flxk52p{background-color:var(--colorPaletteGreenBackground3);}",".ffq97bm{background-color:var(--colorPaletteYellowBackground3);}",".ff5vbop{color:var(--colorNeutralForeground1Static);}",".f16muhyy{color:var(--colorBrandForeground1);}",".f1whyuy6{color:var(--colorPaletteRedForeground3);}",".f1l8vj45{color:var(--colorPaletteDarkOrangeForeground3);}",".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}",".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}",".fpti2h4{color:var(--colorPaletteYellowForeground2);}",".f23ftbb{border-top-color:currentColor;}",".f1gkuv52{border-right-color:currentColor;}",".f1p1bl80{border-left-color:currentColor;}",".fioka3i{border-bottom-color:currentColor;}",".fyqpifd{border-top-color:var(--colorPaletteRedBorder2);}",".f3ukxca{border-right-color:var(--colorPaletteRedBorder2);}",".f1k7dugc{border-left-color:var(--colorPaletteRedBorder2);}",".f1njxb2b{border-bottom-color:var(--colorPaletteRedBorder2);}",".fq0vr37{border-top-color:var(--colorNeutralStrokeAccessible);}",".f1byw159{border-right-color:var(--colorNeutralStrokeAccessible);}",".f11cr0be{border-left-color:var(--colorNeutralStrokeAccessible);}",".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}",".f68mrw8{border-top-color:var(--colorNeutralStroke2);}",".f7pw515{border-right-color:var(--colorNeutralStroke2);}",".fw35ms5{border-left-color:var(--colorNeutralStroke2);}",".frpde29{border-bottom-color:var(--colorNeutralStroke2);}",".f1mmhl11{border-top-color:var(--colorPaletteGreenBorder2);}",".f1tjpp2f{border-right-color:var(--colorPaletteGreenBorder2);}",".f1ocn5n7{border-left-color:var(--colorPaletteGreenBorder2);}",".f1gjv25d{border-bottom-color:var(--colorPaletteGreenBorder2);}",".f16xkysk{background-color:var(--colorBrandBackground2);}",".faj9fo0{color:var(--colorBrandForeground2);}",".f161y7kd{border-top-color:var(--colorBrandStroke2);}",".f1c8dzaj{border-right-color:var(--colorBrandStroke2);}",".f1sl6hi9{border-left-color:var(--colorBrandStroke2);}",".f1619yhw{border-bottom-color:var(--colorBrandStroke2);}",".ff0poqj{background-color:var(--colorPaletteRedBackground1);}",".f1hcrxcs{color:var(--colorPaletteRedForeground1);}",".f1oqjm8o{border-top-color:var(--colorPaletteRedBorder1);}",".fkgrb8g{border-right-color:var(--colorPaletteRedBorder1);}",".frb5wm0{border-left-color:var(--colorPaletteRedBorder1);}",".f1iai1ph{border-bottom-color:var(--colorPaletteRedBorder1);}",".f945g0u{background-color:var(--colorNeutralForeground3);}",".fghlq4f{border-top-color:var(--colorTransparentStroke);}",".f1gn591s{border-right-color:var(--colorTransparentStroke);}",".fjscplz{border-left-color:var(--colorTransparentStroke);}",".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",".f1ctqxl6{background-color:var(--colorNeutralBackground4);}",".f1xzsg4{background-color:var(--colorPaletteDarkOrangeBackground1);}",".f1k5f75o{color:var(--colorPaletteDarkOrangeForeground1);}",".fxy9dsj{border-top-color:var(--colorPaletteDarkOrangeBorder1);}",".f54u6j2{border-right-color:var(--colorPaletteDarkOrangeBorder1);}",".fcm23ze{border-left-color:var(--colorPaletteDarkOrangeBorder1);}",".f4vf0uq{border-bottom-color:var(--colorPaletteDarkOrangeBorder1);}",".f2vsrz6{background-color:var(--colorPaletteGreenBackground1);}",".ffmvakt{color:var(--colorPaletteGreenForeground1);}",".fdmic9h{border-top-color:var(--colorPaletteGreenBorder1);}",".f196y6m{border-right-color:var(--colorPaletteGreenBorder1);}",".fetptd8{border-left-color:var(--colorPaletteGreenBorder1);}",".f1pev5xq{border-bottom-color:var(--colorPaletteGreenBorder1);}",".f10s6hli{background-color:var(--colorPaletteYellowBackground1);}",".f42v8de{color:var(--colorPaletteYellowForeground1);}",".fn9i3n{border-top-color:var(--colorPaletteYellowBorder1);}",".f1aw8cx4{border-right-color:var(--colorPaletteYellowBorder1);}",".f51if14{border-left-color:var(--colorPaletteYellowBorder1);}",".fvq8iai{border-bottom-color:var(--colorPaletteYellowBorder1);}"]}),useIconRootClassName=__resetStyles("rttl5z0",null,[".rttl5z0{display:flex;line-height:1;margin:0 calc(-1 * var(--spacingHorizontalXXS));font-size:12px;}"]),useIconStyles$4=__styles({beforeText:{t21cq0:["f1t8l4o1","f11juvx6"]},afterText:{Frg6f3:["f11juvx6","f1t8l4o1"]},beforeTextXL:{t21cq0:["f1rs9grm","f1kwmkpi"]},afterTextXL:{Frg6f3:["f1kwmkpi","f1rs9grm"]},tiny:{Be2twd7:"f1tccstq"},"extra-small":{Be2twd7:"fnmn6fi"},small:{Be2twd7:"f1ugzwwg"},medium:{},large:{Be2twd7:"f4ybsrx"},"extra-large":{Be2twd7:"fe5j1ua"}},{d:[".f1t8l4o1{margin-right:calc(var(--spacingHorizontalXXS) + var(--spacingHorizontalXXS));}",".f11juvx6{margin-left:calc(var(--spacingHorizontalXXS) + var(--spacingHorizontalXXS));}",".f1rs9grm{margin-right:calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));}",".f1kwmkpi{margin-left:calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));}",".f1tccstq{font-size:6px;}",".fnmn6fi{font-size:10px;}",".f1ugzwwg{font-size:12px;}",".f4ybsrx{font-size:16px;}",".fe5j1ua{font-size:20px;}"]}),useBadgeStyles_unstable=eo=>{const to=useRootClassName$1(),ro=useRootStyles$6(),no=eo.size==="small"||eo.size==="extra-small"||eo.size==="tiny";eo.root.className=mergeClasses(badgeClassNames.root,to,no&&ro.fontSmallToTiny,ro[eo.size],ro[eo.shape],eo.shape==="rounded"&&no&&ro.roundedSmallToTiny,eo.appearance==="ghost"&&ro.borderGhost,ro[eo.appearance],ro[`${eo.appearance}-${eo.color}`],eo.root.className);const oo=useIconRootClassName(),io=useIconStyles$4();if(eo.icon){let so;eo.root.children&&(eo.size==="extra-large"?so=eo.iconPosition==="after"?io.afterTextXL:io.beforeTextXL:so=eo.iconPosition==="after"?io.afterText:io.beforeText),eo.icon.className=mergeClasses(badgeClassNames.icon,oo,so,io[eo.size],eo.icon.className)}return eo},renderBadge_unstable=eo=>jsxs(eo.root,{children:[eo.iconPosition==="before"&&eo.icon&&jsx$1(eo.icon,{}),eo.root.children,eo.iconPosition==="after"&&eo.icon&&jsx$1(eo.icon,{})]}),Badge$2=reactExports.forwardRef((eo,to)=>{const ro=useBadge_unstable(eo,to);return useBadgeStyles_unstable(ro),useCustomStyleHook("useBadgeStyles_unstable")(ro),renderBadge_unstable(ro)});Badge$2.displayName="Badge";const useCounterBadge_unstable=(eo,to)=>{const{shape:ro="circular",appearance:no="filled",showZero:oo=!1,overflowCount:io=99,count:so=0,dot:ao=!1}=eo,lo={...useBadge_unstable(eo,to),shape:ro,appearance:no,showZero:oo,count:so,dot:ao};return(so!==0||oo)&&!ao&&!lo.root.children&&(lo.root.children=so>io?`${io}+`:`${so}`),lo},counterBadgeClassNames={root:"fui-CounterBadge",icon:"fui-CounterBadge__icon"},useStyles$z=__styles({dot:{Bf4jedk:"fgfkb25",a9b677:"f16dn6v3",Bqenvij:"f3mu39s",z8tnut:"f1g0x7ka",z189sj:["fhxju0i","f1cnd47f"],Byoj8tv:"f1qch9an",uwmqm3:["f1cnd47f","fhxju0i"]},hide:{mc9l5x:"fjseox"}},{d:[".fgfkb25{min-width:auto;}",".f16dn6v3{width:6px;}",".f3mu39s{height:6px;}",".f1g0x7ka{padding-top:0;}",".fhxju0i{padding-right:0;}",".f1cnd47f{padding-left:0;}",".f1qch9an{padding-bottom:0;}",".fjseox{display:none;}"]}),useCounterBadgeStyles_unstable=eo=>{const to=useStyles$z();return eo.root.className=mergeClasses(counterBadgeClassNames.root,eo.dot&&to.dot,!eo.root.children&&!eo.dot&&to.hide,eo.root.className),eo.icon&&(eo.icon.className=mergeClasses(counterBadgeClassNames.icon,eo.icon.className)),useBadgeStyles_unstable(eo)},CounterBadge=reactExports.forwardRef((eo,to)=>{const ro=useCounterBadge_unstable(eo,to);return useCounterBadgeStyles_unstable(ro),useCustomStyleHook("useCounterBadgeStyles_unstable")(ro),renderBadge_unstable(ro)});CounterBadge.displayName="CounterBadge";function createVirtualElementFromClick(eo){const to=eo.clientX,ro=eo.clientY,no=to+1,oo=ro+1;function io(){return{left:to,top:ro,right:no,bottom:oo,x:to,y:ro,height:1,width:1}}return{getBoundingClientRect:io}}const DATA_POSITIONING_INTERSECTING="data-popper-is-intersecting",DATA_POSITIONING_ESCAPED="data-popper-escaped",DATA_POSITIONING_HIDDEN="data-popper-reference-hidden",DATA_POSITIONING_PLACEMENT="data-popper-placement",sides=["top","right","bottom","left"],min$2=Math.min,max$2=Math.max,round$1=Math.round,createCoords=eo=>({x:eo,y:eo}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$2(eo,to,ro){return max$2(eo,min$2(to,ro))}function evaluate(eo,to){return typeof eo=="function"?eo(to):eo}function getSide(eo){return eo.split("-")[0]}function getAlignment(eo){return eo.split("-")[1]}function getOppositeAxis(eo){return eo==="x"?"y":"x"}function getAxisLength(eo){return eo==="y"?"height":"width"}function getSideAxis(eo){return["top","bottom"].includes(getSide(eo))?"y":"x"}function getAlignmentAxis(eo){return getOppositeAxis(getSideAxis(eo))}function getAlignmentSides(eo,to,ro){ro===void 0&&(ro=!1);const no=getAlignment(eo),oo=getAlignmentAxis(eo),io=getAxisLength(oo);let so=oo==="x"?no===(ro?"end":"start")?"right":"left":no==="start"?"bottom":"top";return to.reference[io]>to.floating[io]&&(so=getOppositePlacement(so)),[so,getOppositePlacement(so)]}function getExpandedPlacements(eo){const to=getOppositePlacement(eo);return[getOppositeAlignmentPlacement(eo),to,getOppositeAlignmentPlacement(to)]}function getOppositeAlignmentPlacement(eo){return eo.replace(/start|end/g,to=>oppositeAlignmentMap[to])}function getSideList(eo,to,ro){const no=["left","right"],oo=["right","left"],io=["top","bottom"],so=["bottom","top"];switch(eo){case"top":case"bottom":return ro?to?oo:no:to?no:oo;case"left":case"right":return to?io:so;default:return[]}}function getOppositeAxisPlacements(eo,to,ro,no){const oo=getAlignment(eo);let io=getSideList(getSide(eo),ro==="start",no);return oo&&(io=io.map(so=>so+"-"+oo),to&&(io=io.concat(io.map(getOppositeAlignmentPlacement)))),io}function getOppositePlacement(eo){return eo.replace(/left|right|bottom|top/g,to=>oppositeSideMap[to])}function expandPaddingObject(eo){return{top:0,right:0,bottom:0,left:0,...eo}}function getPaddingObject(eo){return typeof eo!="number"?expandPaddingObject(eo):{top:eo,right:eo,bottom:eo,left:eo}}function rectToClientRect(eo){return{...eo,top:eo.y,left:eo.x,right:eo.x+eo.width,bottom:eo.y+eo.height}}function computeCoordsFromPlacement(eo,to,ro){let{reference:no,floating:oo}=eo;const io=getSideAxis(to),so=getAlignmentAxis(to),ao=getAxisLength(so),lo=getSide(to),uo=io==="y",co=no.x+no.width/2-oo.width/2,fo=no.y+no.height/2-oo.height/2,ho=no[ao]/2-oo[ao]/2;let po;switch(lo){case"top":po={x:co,y:no.y-oo.height};break;case"bottom":po={x:co,y:no.y+no.height};break;case"right":po={x:no.x+no.width,y:fo};break;case"left":po={x:no.x-oo.width,y:fo};break;default:po={x:no.x,y:no.y}}switch(getAlignment(to)){case"start":po[so]-=ho*(ro&&uo?-1:1);break;case"end":po[so]+=ho*(ro&&uo?-1:1);break}return po}const computePosition$1=async(eo,to,ro)=>{const{placement:no="bottom",strategy:oo="absolute",middleware:io=[],platform:so}=ro,ao=io.filter(Boolean),lo=await(so.isRTL==null?void 0:so.isRTL(to));let uo=await so.getElementRects({reference:eo,floating:to,strategy:oo}),{x:co,y:fo}=computeCoordsFromPlacement(uo,no,lo),ho=no,po={},go=0;for(let vo=0;vo({name:"arrow",options:eo,async fn(to){const{x:ro,y:no,placement:oo,rects:io,platform:so,elements:ao,middlewareData:lo}=to,{element:uo,padding:co=0}=evaluate(eo,to)||{};if(uo==null)return{};const fo=getPaddingObject(co),ho={x:ro,y:no},po=getAlignmentAxis(oo),go=getAxisLength(po),vo=await so.getDimensions(uo),bo=po==="y",xo=bo?"top":"left",_o=bo?"bottom":"right",Eo=bo?"clientHeight":"clientWidth",So=io.reference[go]+io.reference[po]-ho[po]-io.floating[go],To=ho[po]-io.reference[po],wo=await(so.getOffsetParent==null?void 0:so.getOffsetParent(uo));let Co=wo?wo[Eo]:0;(!Co||!await(so.isElement==null?void 0:so.isElement(wo)))&&(Co=ao.floating[Eo]||io.floating[go]);const Oo=So/2-To/2,Ao=Co/2-vo[go]/2-1,Ro=min$2(fo[xo],Ao),No=min$2(fo[_o],Ao),Mo=Ro,Do=Co-vo[go]-No,jo=Co/2-vo[go]/2+Oo,Fo=clamp$2(Mo,jo,Do),$o=!lo.arrow&&getAlignment(oo)!=null&&jo!=Fo&&io.reference[go]/2-(joMo<=0)){var Ao,Ro;const Mo=(((Ao=io.flip)==null?void 0:Ao.index)||0)+1,Do=To[Mo];if(Do)return{data:{index:Mo,overflows:Oo},reset:{placement:Do}};let jo=(Ro=Oo.filter(Fo=>Fo.overflows[0]<=0).sort((Fo,$o)=>Fo.overflows[1]-$o.overflows[1])[0])==null?void 0:Ro.placement;if(!jo)switch(po){case"bestFit":{var No;const Fo=(No=Oo.map($o=>[$o.placement,$o.overflows.filter(Lo=>Lo>0).reduce((Lo,Ho)=>Lo+Ho,0)]).sort(($o,Lo)=>$o[1]-Lo[1])[0])==null?void 0:No[0];Fo&&(jo=Fo);break}case"initialPlacement":jo=ao;break}if(oo!==jo)return{reset:{placement:jo}}}return{}}}};function getSideOffsets(eo,to){return{top:eo.top-to.height,right:eo.right-to.width,bottom:eo.bottom-to.height,left:eo.left-to.width}}function isAnySideFullyClipped(eo){return sides.some(to=>eo[to]>=0)}const hide=function(eo){return eo===void 0&&(eo={}),{name:"hide",options:eo,async fn(to){const{rects:ro}=to,{strategy:no="referenceHidden",...oo}=evaluate(eo,to);switch(no){case"referenceHidden":{const io=await detectOverflow(to,{...oo,elementContext:"reference"}),so=getSideOffsets(io,ro.reference);return{data:{referenceHiddenOffsets:so,referenceHidden:isAnySideFullyClipped(so)}}}case"escaped":{const io=await detectOverflow(to,{...oo,altBoundary:!0}),so=getSideOffsets(io,ro.floating);return{data:{escapedOffsets:so,escaped:isAnySideFullyClipped(so)}}}default:return{}}}}};async function convertValueToCoords(eo,to){const{placement:ro,platform:no,elements:oo}=eo,io=await(no.isRTL==null?void 0:no.isRTL(oo.floating)),so=getSide(ro),ao=getAlignment(ro),lo=getSideAxis(ro)==="y",uo=["left","top"].includes(so)?-1:1,co=io&&lo?-1:1,fo=evaluate(to,eo);let{mainAxis:ho,crossAxis:po,alignmentAxis:go}=typeof fo=="number"?{mainAxis:fo,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...fo};return ao&&typeof go=="number"&&(po=ao==="end"?go*-1:go),lo?{x:po*co,y:ho*uo}:{x:ho*uo,y:po*co}}const offset$1=function(eo){return eo===void 0&&(eo=0),{name:"offset",options:eo,async fn(to){var ro,no;const{x:oo,y:io,placement:so,middlewareData:ao}=to,lo=await convertValueToCoords(to,eo);return so===((ro=ao.offset)==null?void 0:ro.placement)&&(no=ao.arrow)!=null&&no.alignmentOffset?{}:{x:oo+lo.x,y:io+lo.y,data:{...lo,placement:so}}}}},shift$2=function(eo){return eo===void 0&&(eo={}),{name:"shift",options:eo,async fn(to){const{x:ro,y:no,placement:oo}=to,{mainAxis:io=!0,crossAxis:so=!1,limiter:ao={fn:bo=>{let{x:xo,y:_o}=bo;return{x:xo,y:_o}}},...lo}=evaluate(eo,to),uo={x:ro,y:no},co=await detectOverflow(to,lo),fo=getSideAxis(getSide(oo)),ho=getOppositeAxis(fo);let po=uo[ho],go=uo[fo];if(io){const bo=ho==="y"?"top":"left",xo=ho==="y"?"bottom":"right",_o=po+co[bo],Eo=po-co[xo];po=clamp$2(_o,po,Eo)}if(so){const bo=fo==="y"?"top":"left",xo=fo==="y"?"bottom":"right",_o=go+co[bo],Eo=go-co[xo];go=clamp$2(_o,go,Eo)}const vo=ao.fn({...to,[ho]:po,[fo]:go});return{...vo,data:{x:vo.x-ro,y:vo.y-no}}}}},limitShift=function(eo){return eo===void 0&&(eo={}),{options:eo,fn(to){const{x:ro,y:no,placement:oo,rects:io,middlewareData:so}=to,{offset:ao=0,mainAxis:lo=!0,crossAxis:uo=!0}=evaluate(eo,to),co={x:ro,y:no},fo=getSideAxis(oo),ho=getOppositeAxis(fo);let po=co[ho],go=co[fo];const vo=evaluate(ao,to),bo=typeof vo=="number"?{mainAxis:vo,crossAxis:0}:{mainAxis:0,crossAxis:0,...vo};if(lo){const Eo=ho==="y"?"height":"width",So=io.reference[ho]-io.floating[Eo]+bo.mainAxis,To=io.reference[ho]+io.reference[Eo]-bo.mainAxis;poTo&&(po=To)}if(uo){var xo,_o;const Eo=ho==="y"?"width":"height",So=["top","left"].includes(getSide(oo)),To=io.reference[fo]-io.floating[Eo]+(So&&((xo=so.offset)==null?void 0:xo[fo])||0)+(So?0:bo.crossAxis),wo=io.reference[fo]+io.reference[Eo]+(So?0:((_o=so.offset)==null?void 0:_o[fo])||0)-(So?bo.crossAxis:0);gowo&&(go=wo)}return{[ho]:po,[fo]:go}}}},size=function(eo){return eo===void 0&&(eo={}),{name:"size",options:eo,async fn(to){const{placement:ro,rects:no,platform:oo,elements:io}=to,{apply:so=()=>{},...ao}=evaluate(eo,to),lo=await detectOverflow(to,ao),uo=getSide(ro),co=getAlignment(ro),fo=getSideAxis(ro)==="y",{width:ho,height:po}=no.floating;let go,vo;uo==="top"||uo==="bottom"?(go=uo,vo=co===(await(oo.isRTL==null?void 0:oo.isRTL(io.floating))?"start":"end")?"left":"right"):(vo=uo,go=co==="end"?"top":"bottom");const bo=po-lo[go],xo=ho-lo[vo],_o=!to.middlewareData.shift;let Eo=bo,So=xo;if(fo){const wo=ho-lo.left-lo.right;So=co||_o?min$2(xo,wo):wo}else{const wo=po-lo.top-lo.bottom;Eo=co||_o?min$2(bo,wo):wo}if(_o&&!co){const wo=max$2(lo.left,0),Co=max$2(lo.right,0),Oo=max$2(lo.top,0),Ao=max$2(lo.bottom,0);fo?So=ho-2*(wo!==0||Co!==0?wo+Co:max$2(lo.left,lo.right)):Eo=po-2*(Oo!==0||Ao!==0?Oo+Ao:max$2(lo.top,lo.bottom))}await so({...to,availableWidth:So,availableHeight:Eo});const To=await oo.getDimensions(io.floating);return ho!==To.width||po!==To.height?{reset:{rects:!0}}:{}}}};function getNodeName(eo){return isNode(eo)?(eo.nodeName||"").toLowerCase():"#document"}function getWindow$1(eo){var to;return(eo==null||(to=eo.ownerDocument)==null?void 0:to.defaultView)||window}function getDocumentElement(eo){var to;return(to=(isNode(eo)?eo.ownerDocument:eo.document)||window.document)==null?void 0:to.documentElement}function isNode(eo){return eo instanceof Node||eo instanceof getWindow$1(eo).Node}function isElement$1(eo){return eo instanceof Element||eo instanceof getWindow$1(eo).Element}function isHTMLElement$4(eo){return eo instanceof HTMLElement||eo instanceof getWindow$1(eo).HTMLElement}function isShadowRoot(eo){return typeof ShadowRoot>"u"?!1:eo instanceof ShadowRoot||eo instanceof getWindow$1(eo).ShadowRoot}function isOverflowElement(eo){const{overflow:to,overflowX:ro,overflowY:no,display:oo}=getComputedStyle$1(eo);return/auto|scroll|overlay|hidden|clip/.test(to+no+ro)&&!["inline","contents"].includes(oo)}function isTableElement(eo){return["table","td","th"].includes(getNodeName(eo))}function isContainingBlock(eo){const to=isWebKit(),ro=getComputedStyle$1(eo);return ro.transform!=="none"||ro.perspective!=="none"||(ro.containerType?ro.containerType!=="normal":!1)||!to&&(ro.backdropFilter?ro.backdropFilter!=="none":!1)||!to&&(ro.filter?ro.filter!=="none":!1)||["transform","perspective","filter"].some(no=>(ro.willChange||"").includes(no))||["paint","layout","strict","content"].some(no=>(ro.contain||"").includes(no))}function getContainingBlock(eo){let to=getParentNode$1(eo);for(;isHTMLElement$4(to)&&!isLastTraversableNode(to);){if(isContainingBlock(to))return to;to=getParentNode$1(to)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(eo){return["html","body","#document"].includes(getNodeName(eo))}function getComputedStyle$1(eo){return getWindow$1(eo).getComputedStyle(eo)}function getNodeScroll(eo){return isElement$1(eo)?{scrollLeft:eo.scrollLeft,scrollTop:eo.scrollTop}:{scrollLeft:eo.pageXOffset,scrollTop:eo.pageYOffset}}function getParentNode$1(eo){if(getNodeName(eo)==="html")return eo;const to=eo.assignedSlot||eo.parentNode||isShadowRoot(eo)&&eo.host||getDocumentElement(eo);return isShadowRoot(to)?to.host:to}function getNearestOverflowAncestor(eo){const to=getParentNode$1(eo);return isLastTraversableNode(to)?eo.ownerDocument?eo.ownerDocument.body:eo.body:isHTMLElement$4(to)&&isOverflowElement(to)?to:getNearestOverflowAncestor(to)}function getOverflowAncestors(eo,to,ro){var no;to===void 0&&(to=[]),ro===void 0&&(ro=!0);const oo=getNearestOverflowAncestor(eo),io=oo===((no=eo.ownerDocument)==null?void 0:no.body),so=getWindow$1(oo);return io?to.concat(so,so.visualViewport||[],isOverflowElement(oo)?oo:[],so.frameElement&&ro?getOverflowAncestors(so.frameElement):[]):to.concat(oo,getOverflowAncestors(oo,[],ro))}function getCssDimensions(eo){const to=getComputedStyle$1(eo);let ro=parseFloat(to.width)||0,no=parseFloat(to.height)||0;const oo=isHTMLElement$4(eo),io=oo?eo.offsetWidth:ro,so=oo?eo.offsetHeight:no,ao=round$1(ro)!==io||round$1(no)!==so;return ao&&(ro=io,no=so),{width:ro,height:no,$:ao}}function unwrapElement(eo){return isElement$1(eo)?eo:eo.contextElement}function getScale$1(eo){const to=unwrapElement(eo);if(!isHTMLElement$4(to))return createCoords(1);const ro=to.getBoundingClientRect(),{width:no,height:oo,$:io}=getCssDimensions(to);let so=(io?round$1(ro.width):ro.width)/no,ao=(io?round$1(ro.height):ro.height)/oo;return(!so||!Number.isFinite(so))&&(so=1),(!ao||!Number.isFinite(ao))&&(ao=1),{x:so,y:ao}}const noOffsets=createCoords(0);function getVisualOffsets(eo){const to=getWindow$1(eo);return!isWebKit()||!to.visualViewport?noOffsets:{x:to.visualViewport.offsetLeft,y:to.visualViewport.offsetTop}}function shouldAddVisualOffsets(eo,to,ro){return to===void 0&&(to=!1),!ro||to&&ro!==getWindow$1(eo)?!1:to}function getBoundingClientRect(eo,to,ro,no){to===void 0&&(to=!1),ro===void 0&&(ro=!1);const oo=eo.getBoundingClientRect(),io=unwrapElement(eo);let so=createCoords(1);to&&(no?isElement$1(no)&&(so=getScale$1(no)):so=getScale$1(eo));const ao=shouldAddVisualOffsets(io,ro,no)?getVisualOffsets(io):createCoords(0);let lo=(oo.left+ao.x)/so.x,uo=(oo.top+ao.y)/so.y,co=oo.width/so.x,fo=oo.height/so.y;if(io){const ho=getWindow$1(io),po=no&&isElement$1(no)?getWindow$1(no):no;let go=ho.frameElement;for(;go&&no&&po!==ho;){const vo=getScale$1(go),bo=go.getBoundingClientRect(),xo=getComputedStyle$1(go),_o=bo.left+(go.clientLeft+parseFloat(xo.paddingLeft))*vo.x,Eo=bo.top+(go.clientTop+parseFloat(xo.paddingTop))*vo.y;lo*=vo.x,uo*=vo.y,co*=vo.x,fo*=vo.y,lo+=_o,uo+=Eo,go=getWindow$1(go).frameElement}}return rectToClientRect({width:co,height:fo,x:lo,y:uo})}function convertOffsetParentRelativeRectToViewportRelativeRect(eo){let{rect:to,offsetParent:ro,strategy:no}=eo;const oo=isHTMLElement$4(ro),io=getDocumentElement(ro);if(ro===io)return to;let so={scrollLeft:0,scrollTop:0},ao=createCoords(1);const lo=createCoords(0);if((oo||!oo&&no!=="fixed")&&((getNodeName(ro)!=="body"||isOverflowElement(io))&&(so=getNodeScroll(ro)),isHTMLElement$4(ro))){const uo=getBoundingClientRect(ro);ao=getScale$1(ro),lo.x=uo.x+ro.clientLeft,lo.y=uo.y+ro.clientTop}return{width:to.width*ao.x,height:to.height*ao.y,x:to.x*ao.x-so.scrollLeft*ao.x+lo.x,y:to.y*ao.y-so.scrollTop*ao.y+lo.y}}function getClientRects(eo){return Array.from(eo.getClientRects())}function getWindowScrollBarX(eo){return getBoundingClientRect(getDocumentElement(eo)).left+getNodeScroll(eo).scrollLeft}function getDocumentRect(eo){const to=getDocumentElement(eo),ro=getNodeScroll(eo),no=eo.ownerDocument.body,oo=max$2(to.scrollWidth,to.clientWidth,no.scrollWidth,no.clientWidth),io=max$2(to.scrollHeight,to.clientHeight,no.scrollHeight,no.clientHeight);let so=-ro.scrollLeft+getWindowScrollBarX(eo);const ao=-ro.scrollTop;return getComputedStyle$1(no).direction==="rtl"&&(so+=max$2(to.clientWidth,no.clientWidth)-oo),{width:oo,height:io,x:so,y:ao}}function getViewportRect(eo,to){const ro=getWindow$1(eo),no=getDocumentElement(eo),oo=ro.visualViewport;let io=no.clientWidth,so=no.clientHeight,ao=0,lo=0;if(oo){io=oo.width,so=oo.height;const uo=isWebKit();(!uo||uo&&to==="fixed")&&(ao=oo.offsetLeft,lo=oo.offsetTop)}return{width:io,height:so,x:ao,y:lo}}function getInnerBoundingClientRect(eo,to){const ro=getBoundingClientRect(eo,!0,to==="fixed"),no=ro.top+eo.clientTop,oo=ro.left+eo.clientLeft,io=isHTMLElement$4(eo)?getScale$1(eo):createCoords(1),so=eo.clientWidth*io.x,ao=eo.clientHeight*io.y,lo=oo*io.x,uo=no*io.y;return{width:so,height:ao,x:lo,y:uo}}function getClientRectFromClippingAncestor(eo,to,ro){let no;if(to==="viewport")no=getViewportRect(eo,ro);else if(to==="document")no=getDocumentRect(getDocumentElement(eo));else if(isElement$1(to))no=getInnerBoundingClientRect(to,ro);else{const oo=getVisualOffsets(eo);no={...to,x:to.x-oo.x,y:to.y-oo.y}}return rectToClientRect(no)}function hasFixedPositionAncestor(eo,to){const ro=getParentNode$1(eo);return ro===to||!isElement$1(ro)||isLastTraversableNode(ro)?!1:getComputedStyle$1(ro).position==="fixed"||hasFixedPositionAncestor(ro,to)}function getClippingElementAncestors(eo,to){const ro=to.get(eo);if(ro)return ro;let no=getOverflowAncestors(eo,[],!1).filter(ao=>isElement$1(ao)&&getNodeName(ao)!=="body"),oo=null;const io=getComputedStyle$1(eo).position==="fixed";let so=io?getParentNode$1(eo):eo;for(;isElement$1(so)&&!isLastTraversableNode(so);){const ao=getComputedStyle$1(so),lo=isContainingBlock(so);!lo&&ao.position==="fixed"&&(oo=null),(io?!lo&&!oo:!lo&&ao.position==="static"&&!!oo&&["absolute","fixed"].includes(oo.position)||isOverflowElement(so)&&!lo&&hasFixedPositionAncestor(eo,so))?no=no.filter(co=>co!==so):oo=ao,so=getParentNode$1(so)}return to.set(eo,no),no}function getClippingRect(eo){let{element:to,boundary:ro,rootBoundary:no,strategy:oo}=eo;const so=[...ro==="clippingAncestors"?getClippingElementAncestors(to,this._c):[].concat(ro),no],ao=so[0],lo=so.reduce((uo,co)=>{const fo=getClientRectFromClippingAncestor(to,co,oo);return uo.top=max$2(fo.top,uo.top),uo.right=min$2(fo.right,uo.right),uo.bottom=min$2(fo.bottom,uo.bottom),uo.left=max$2(fo.left,uo.left),uo},getClientRectFromClippingAncestor(to,ao,oo));return{width:lo.right-lo.left,height:lo.bottom-lo.top,x:lo.left,y:lo.top}}function getDimensions(eo){return getCssDimensions(eo)}function getRectRelativeToOffsetParent(eo,to,ro){const no=isHTMLElement$4(to),oo=getDocumentElement(to),io=ro==="fixed",so=getBoundingClientRect(eo,!0,io,to);let ao={scrollLeft:0,scrollTop:0};const lo=createCoords(0);if(no||!no&&!io)if((getNodeName(to)!=="body"||isOverflowElement(oo))&&(ao=getNodeScroll(to)),no){const uo=getBoundingClientRect(to,!0,io,to);lo.x=uo.x+to.clientLeft,lo.y=uo.y+to.clientTop}else oo&&(lo.x=getWindowScrollBarX(oo));return{x:so.left+ao.scrollLeft-lo.x,y:so.top+ao.scrollTop-lo.y,width:so.width,height:so.height}}function getTrueOffsetParent(eo,to){return!isHTMLElement$4(eo)||getComputedStyle$1(eo).position==="fixed"?null:to?to(eo):eo.offsetParent}function getOffsetParent(eo,to){const ro=getWindow$1(eo);if(!isHTMLElement$4(eo))return ro;let no=getTrueOffsetParent(eo,to);for(;no&&isTableElement(no)&&getComputedStyle$1(no).position==="static";)no=getTrueOffsetParent(no,to);return no&&(getNodeName(no)==="html"||getNodeName(no)==="body"&&getComputedStyle$1(no).position==="static"&&!isContainingBlock(no))?ro:no||getContainingBlock(eo)||ro}const getElementRects=async function(eo){let{reference:to,floating:ro,strategy:no}=eo;const oo=this.getOffsetParent||getOffsetParent,io=this.getDimensions;return{reference:getRectRelativeToOffsetParent(to,await oo(ro),no),floating:{x:0,y:0,...await io(ro)}}};function isRTL(eo){return getComputedStyle$1(eo).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale:getScale$1,isElement:isElement$1,isRTL},computePosition=(eo,to,ro)=>{const no=new Map,oo={platform,...ro},io={...oo.platform,_c:no};return computePosition$1(eo,to,{...oo,platform:io})};function parseFloatingUIPlacement(eo){const to=eo.split("-");return{side:to[0],alignment:to[1]}}const getParentNode=eo=>eo.nodeName==="HTML"?eo:eo.parentNode||eo.host,getStyleComputedProperty=eo=>{var to;return eo.nodeType!==1?{}:((to=eo.ownerDocument)===null||to===void 0?void 0:to.defaultView).getComputedStyle(eo,null)},getScrollParent=eo=>{const to=eo&&getParentNode(eo);if(!to)return document.body;switch(to.nodeName){case"HTML":case"BODY":return to.ownerDocument.body;case"#document":return to.body}const{overflow:ro,overflowX:no,overflowY:oo}=getStyleComputedProperty(to);return/(auto|scroll|overlay)/.test(ro+oo+no)?to:getScrollParent(to)},hasScrollParent=eo=>{var to;const ro=getScrollParent(eo);return ro?ro!==((to=ro.ownerDocument)===null||to===void 0?void 0:to.body):!1};function getBoundary(eo,to){if(to==="window")return eo==null?void 0:eo.ownerDocument.documentElement;if(to==="clippingParents")return"clippingAncestors";if(to==="scrollParent"){let ro=getScrollParent(eo);return ro.nodeName==="BODY"&&(ro=eo==null?void 0:eo.ownerDocument.documentElement),ro}return to}function mergeArrowOffset(eo,to){return typeof eo=="number"||typeof eo=="object"&&eo!==null?addArrowOffset(eo,to):typeof eo=="function"?ro=>{const no=eo(ro);return addArrowOffset(no,to)}:{mainAxis:to}}const addArrowOffset=(eo,to)=>{if(typeof eo=="number")return{mainAxis:eo+to};var ro;return{...eo,mainAxis:((ro=eo.mainAxis)!==null&&ro!==void 0?ro:0)+to}};function toFloatingUIPadding(eo,to){if(typeof eo=="number")return eo;const{start:ro,end:no,...oo}=eo,io=oo,so=to?"end":"start",ao=to?"start":"end";return eo[so]&&(io.left=eo[so]),eo[ao]&&(io.right=eo[ao]),io}const getPositionMap$1=eo=>({above:"top",below:"bottom",before:eo?"right":"left",after:eo?"left":"right"}),getAlignmentMap$1=()=>({start:"start",end:"end",top:"start",bottom:"end",center:void 0}),shouldAlignToCenter=(eo,to)=>{const ro=eo==="above"||eo==="below",no=to==="top"||to==="bottom";return ro&&no||!ro&&!no},toFloatingUIPlacement=(eo,to,ro)=>{const no=shouldAlignToCenter(to,eo)?"center":eo,oo=to&&getPositionMap$1(ro)[to],io=no&&getAlignmentMap$1()[no];return oo&&io?`${oo}-${io}`:oo},getPositionMap=()=>({top:"above",bottom:"below",right:"after",left:"before"}),getAlignmentMap=eo=>eo==="above"||eo==="below"?{start:"start",end:"end"}:{start:"top",end:"bottom"},fromFloatingUIPlacement=eo=>{const{side:to,alignment:ro}=parseFloatingUIPlacement(eo),no=getPositionMap()[to],oo=ro&&getAlignmentMap(no)[ro];return{position:no,alignment:oo}},shorthandLookup={above:{position:"above",align:"center"},"above-start":{position:"above",align:"start"},"above-end":{position:"above",align:"end"},below:{position:"below",align:"center"},"below-start":{position:"below",align:"start"},"below-end":{position:"below",align:"end"},before:{position:"before",align:"center"},"before-top":{position:"before",align:"top"},"before-bottom":{position:"before",align:"bottom"},after:{position:"after",align:"center"},"after-top":{position:"after",align:"top"},"after-bottom":{position:"after",align:"bottom"}};function resolvePositioningShorthand(eo){return eo==null?{}:typeof eo=="string"?shorthandLookup[eo]:eo}function useCallbackRef(eo,to,ro){const no=reactExports.useRef(!0),[oo]=reactExports.useState(()=>({value:eo,callback:to,facade:{get current(){return oo.value},set current(io){const so=oo.value;if(so!==io){if(oo.value=io,ro&&no.current)return;oo.callback(io,so)}}}}));return useIsomorphicLayoutEffect$1(()=>{no.current=!1},[]),oo.callback=to,oo.facade}function debounce$1(eo){let to;return()=>(to||(to=new Promise(ro=>{Promise.resolve().then(()=>{to=void 0,ro(eo())})})),to)}function writeArrowUpdates(eo){const{arrow:to,middlewareData:ro}=eo;if(!ro.arrow||!to)return;const{x:no,y:oo}=ro.arrow;Object.assign(to.style,{left:`${no}px`,top:`${oo}px`})}function writeContainerUpdates(eo){var to,ro,no;const{container:oo,placement:io,middlewareData:so,strategy:ao,lowPPI:lo,coordinates:uo,useTransform:co=!0}=eo;if(!oo)return;oo.setAttribute(DATA_POSITIONING_PLACEMENT,io),oo.removeAttribute(DATA_POSITIONING_INTERSECTING),so.intersectionObserver.intersecting&&oo.setAttribute(DATA_POSITIONING_INTERSECTING,""),oo.removeAttribute(DATA_POSITIONING_ESCAPED),!((to=so.hide)===null||to===void 0)&&to.escaped&&oo.setAttribute(DATA_POSITIONING_ESCAPED,""),oo.removeAttribute(DATA_POSITIONING_HIDDEN),!((ro=so.hide)===null||ro===void 0)&&ro.referenceHidden&&oo.setAttribute(DATA_POSITIONING_HIDDEN,"");const fo=((no=oo.ownerDocument.defaultView)===null||no===void 0?void 0:no.devicePixelRatio)||1,ho=Math.round(uo.x*fo)/fo,po=Math.round(uo.y*fo)/fo;if(Object.assign(oo.style,{position:ao}),co){Object.assign(oo.style,{transform:lo?`translate(${ho}px, ${po}px)`:`translate3d(${ho}px, ${po}px, 0)`});return}Object.assign(oo.style,{left:`${ho}px`,top:`${po}px`})}const normalizeAutoSize=eo=>{switch(eo){case"always":case!0:return{applyMaxWidth:!0,applyMaxHeight:!0};case"width-always":case"width":return{applyMaxWidth:!0,applyMaxHeight:!1};case"height-always":case"height":return{applyMaxWidth:!1,applyMaxHeight:!0};default:return!1}};function coverTarget(){return{name:"coverTarget",fn:eo=>{const{placement:to,rects:ro,x:no,y:oo}=eo,io=parseFloatingUIPlacement(to).side,so={x:no,y:oo};switch(io){case"bottom":so.y-=ro.reference.height;break;case"top":so.y+=ro.reference.height;break;case"left":so.x+=ro.reference.width;break;case"right":so.x-=ro.reference.width;break}return so}}}function flip(eo){const{hasScrollableElement:to,flipBoundary:ro,container:no,fallbackPositions:oo=[],isRtl:io}=eo,so=oo.reduce((ao,lo)=>{const{position:uo,align:co}=resolvePositioningShorthand(lo),fo=toFloatingUIPlacement(co,uo,io);return fo&&ao.push(fo),ao},[]);return flip$1({...to&&{boundary:"clippingAncestors"},...ro&&{altBoundary:!0,boundary:getBoundary(no,ro)},fallbackStrategy:"bestFit",...so.length&&{fallbackPlacements:so}})}function intersecting(){return{name:"intersectionObserver",fn:async eo=>{const to=eo.rects.floating,ro=await detectOverflow(eo,{altBoundary:!0}),no=ro.top0,oo=ro.bottom0;return{data:{intersecting:no||oo}}}}}const resetMaxSize=eo=>({name:"resetMaxSize",fn({middlewareData:to,elements:ro}){var no;if(!((no=to.resetMaxSize)===null||no===void 0)&&no.maxSizeAlreadyReset)return{};const{applyMaxWidth:oo,applyMaxHeight:io}=eo;return oo&&(ro.floating.style.removeProperty("box-sizing"),ro.floating.style.removeProperty("max-width"),ro.floating.style.removeProperty("width")),io&&(ro.floating.style.removeProperty("box-sizing"),ro.floating.style.removeProperty("max-height"),ro.floating.style.removeProperty("height")),{data:{maxSizeAlreadyReset:!0},reset:{rects:!0}}}});function maxSize(eo,to){const{container:ro,overflowBoundary:no}=to;return size({...no&&{altBoundary:!0,boundary:getBoundary(ro,no)},apply({availableHeight:oo,availableWidth:io,elements:so,rects:ao}){const lo=(fo,ho,po)=>{if(fo&&(so.floating.style.setProperty("box-sizing","border-box"),so.floating.style.setProperty(`max-${ho}`,`${po}px`),ao.floating[ho]>po)){so.floating.style.setProperty(ho,`${po}px`);const go=ho==="width"?"x":"y";so.floating.style.getPropertyValue(`overflow-${go}`)||so.floating.style.setProperty(`overflow-${go}`,"auto")}},{applyMaxWidth:uo,applyMaxHeight:co}=eo;lo(uo,"width",io),lo(co,"height",oo)}})}function getFloatingUIOffset(eo){return!eo||typeof eo=="number"||typeof eo=="object"?eo:({rects:{floating:to,reference:ro},placement:no})=>{const{position:oo,alignment:io}=fromFloatingUIPlacement(no);return eo({positionedRect:to,targetRect:ro,position:oo,alignment:io})}}function offset(eo){const to=getFloatingUIOffset(eo);return offset$1(to)}function shift$1(eo){const{hasScrollableElement:to,disableTether:ro,overflowBoundary:no,container:oo,overflowBoundaryPadding:io,isRtl:so}=eo;return shift$2({...to&&{boundary:"clippingAncestors"},...ro&&{crossAxis:ro==="all",limiter:limitShift({crossAxis:ro!=="all",mainAxis:!1})},...io&&{padding:toFloatingUIPadding(io,so)},...no&&{altBoundary:!0,boundary:getBoundary(oo,no)}})}const matchTargetSizeCssVar="--fui-match-target-size";function matchTargetSize(){return{name:"matchTargetSize",fn:async eo=>{const{rects:{reference:to,floating:ro},elements:{floating:no},middlewareData:{matchTargetSize:{matchTargetSizeAttempt:oo=!1}={}}}=eo;if(to.width===ro.width||oo)return{};const{width:io}=to;return no.style.setProperty(matchTargetSizeCssVar,`${io}px`),no.style.width||(no.style.width=`var(${matchTargetSizeCssVar})`),{data:{matchTargetSizeAttempt:!0},reset:{rects:!0}}}}}function listScrollParents(eo){const to=[];let ro=eo;for(;ro;){const no=getScrollParent(ro);if(eo.ownerDocument.body===no){to.push(no);break}to.push(no),ro=no}return to}function createPositionManager(eo){const{container:to,target:ro,arrow:no,strategy:oo,middleware:io,placement:so,useTransform:ao=!0}=eo;let lo=!1;if(!ro||!to)return{updatePosition:()=>{},dispose:()=>{}};let uo=!0;const co=new Set,fo=to.ownerDocument.defaultView;Object.assign(to.style,{position:"fixed",left:0,top:0,margin:0});const ho=()=>{lo||(uo&&(listScrollParents(to).forEach(vo=>co.add(vo)),isHTMLElement$6(ro)&&listScrollParents(ro).forEach(vo=>co.add(vo)),co.forEach(vo=>{vo.addEventListener("scroll",po,{passive:!0})}),uo=!1),Object.assign(to.style,{position:oo}),computePosition(ro,to,{placement:so,middleware:io,strategy:oo}).then(({x:vo,y:bo,middlewareData:xo,placement:_o})=>{lo||(writeArrowUpdates({arrow:no,middlewareData:xo}),writeContainerUpdates({container:to,middlewareData:xo,placement:_o,coordinates:{x:vo,y:bo},lowPPI:((fo==null?void 0:fo.devicePixelRatio)||1)<=1,strategy:oo,useTransform:ao}))}).catch(vo=>{}))},po=debounce$1(()=>ho()),go=()=>{lo=!0,fo&&(fo.removeEventListener("scroll",po),fo.removeEventListener("resize",po)),co.forEach(vo=>{vo.removeEventListener("scroll",po)}),co.clear()};return fo&&(fo.addEventListener("scroll",po,{passive:!0}),fo.addEventListener("resize",po)),po(),{updatePosition:po,dispose:go}}function usePositioning(eo){const to=reactExports.useRef(null),ro=reactExports.useRef(null),no=reactExports.useRef(null),oo=reactExports.useRef(null),io=reactExports.useRef(null),{enabled:so=!0}=eo,ao=usePositioningOptions(eo),lo=reactExports.useCallback(()=>{to.current&&to.current.dispose(),to.current=null;var po;const go=(po=no.current)!==null&&po!==void 0?po:ro.current;so&&canUseDOM$3()&&go&&oo.current&&(to.current=createPositionManager({container:oo.current,target:go,arrow:io.current,...ao(oo.current,io.current)}))},[so,ao]),uo=useEventCallback$3(po=>{no.current=po,lo()});reactExports.useImperativeHandle(eo.positioningRef,()=>({updatePosition:()=>{var po;return(po=to.current)===null||po===void 0?void 0:po.updatePosition()},setTarget:po=>{eo.target,uo(po)}}),[eo.target,uo]),useIsomorphicLayoutEffect$1(()=>{var po;uo((po=eo.target)!==null&&po!==void 0?po:null)},[eo.target,uo]),useIsomorphicLayoutEffect$1(()=>{lo()},[lo]);const co=useCallbackRef(null,po=>{ro.current!==po&&(ro.current=po,lo())}),fo=useCallbackRef(null,po=>{oo.current!==po&&(oo.current=po,lo())}),ho=useCallbackRef(null,po=>{io.current!==po&&(io.current=po,lo())});return{targetRef:co,containerRef:fo,arrowRef:ho}}function usePositioningOptions(eo){const{align:to,arrowPadding:ro,autoSize:no,coverTarget:oo,flipBoundary:io,offset:so,overflowBoundary:ao,pinned:lo,position:uo,unstable_disableTether:co,positionFixed:fo,strategy:ho,overflowBoundaryPadding:po,fallbackPositions:go,useTransform:vo,matchTargetSize:bo}=eo,{dir:xo,targetDocument:_o}=useFluent(),Eo=xo==="rtl",So=ho??fo?"fixed":"absolute",To=normalizeAutoSize(no);return reactExports.useCallback((wo,Co)=>{const Oo=hasScrollParent(wo),Ao=[To&&resetMaxSize(To),bo&&matchTargetSize(),so&&offset(so),oo&&coverTarget(),!lo&&flip({container:wo,flipBoundary:io,hasScrollableElement:Oo,isRtl:Eo,fallbackPositions:go}),shift$1({container:wo,hasScrollableElement:Oo,overflowBoundary:ao,disableTether:co,overflowBoundaryPadding:po,isRtl:Eo}),To&&maxSize(To,{container:wo,overflowBoundary:ao}),intersecting(),Co&&arrow$1({element:Co,padding:ro}),hide({strategy:"referenceHidden"}),hide({strategy:"escaped"}),!1].filter(Boolean);return{placement:toFloatingUIPlacement(to,uo,Eo),middleware:Ao,strategy:So,useTransform:vo}},[to,ro,To,oo,co,io,Eo,so,ao,lo,uo,So,po,go,vo,bo,_o])}const usePositioningMouseTarget=eo=>{const[to,ro]=reactExports.useState(eo);return[to,oo=>{if(oo==null){ro(void 0);return}let io;oo instanceof MouseEvent?io=oo:io=oo.nativeEvent,io instanceof MouseEvent;const so=createVirtualElementFromClick(io);ro(so)}]},PopoverContext=createContext(void 0),popoverContextDefaultValue={open:!1,setOpen:()=>null,toggleOpen:()=>null,triggerRef:{current:null},contentRef:{current:null},arrowRef:{current:null},openOnContext:!1,openOnHover:!1,size:"medium",trapFocus:!1,inline:!1};PopoverContext.Provider;const usePopoverContext_unstable=eo=>useContextSelector(PopoverContext,(to=popoverContextDefaultValue)=>eo(to)),usePopoverSurface_unstable=(eo,to)=>{const ro=usePopoverContext_unstable(_o=>_o.contentRef),no=usePopoverContext_unstable(_o=>_o.openOnHover),oo=usePopoverContext_unstable(_o=>_o.setOpen),io=usePopoverContext_unstable(_o=>_o.mountNode),so=usePopoverContext_unstable(_o=>_o.arrowRef),ao=usePopoverContext_unstable(_o=>_o.size),lo=usePopoverContext_unstable(_o=>_o.withArrow),uo=usePopoverContext_unstable(_o=>_o.appearance),co=usePopoverContext_unstable(_o=>_o.trapFocus),fo=usePopoverContext_unstable(_o=>_o.inertTrapFocus),ho=usePopoverContext_unstable(_o=>_o.inline),{modalAttributes:po}=useModalAttributes({trapFocus:co,legacyTrapFocus:!fo,alwaysFocusable:!co}),go={inline:ho,appearance:uo,withArrow:lo,size:ao,arrowRef:so,mountNode:io,components:{root:"div"},root:always(getIntrinsicElementProps("div",{ref:useMergedRefs$1(to,ro),role:co?"dialog":"group","aria-modal":co?!0:void 0,...po,...eo}),{elementType:"div"})},{onMouseEnter:vo,onMouseLeave:bo,onKeyDown:xo}=go.root;return go.root.onMouseEnter=_o=>{no&&oo(_o,!0),vo==null||vo(_o)},go.root.onMouseLeave=_o=>{no&&oo(_o,!1),bo==null||bo(_o)},go.root.onKeyDown=_o=>{var Eo;_o.key==="Escape"&&(!((Eo=ro.current)===null||Eo===void 0)&&Eo.contains(_o.target))&&(_o.preventDefault(),oo(_o,!1)),xo==null||xo(_o)},go};function toMountNodeProps(eo){return isHTMLElement$6(eo)?{element:eo}:typeof eo=="object"?eo===null?{element:null}:eo:{}}var getCurrentOwner=()=>reactExports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current,useIsStrictMode=()=>!1,effectSet=new WeakSet;function useStrictEffect(eo,to){const ro=getCurrentOwner();reactExports.useEffect(()=>{if(!effectSet.has(ro)){effectSet.add(ro),eo();return}return eo()},to)}var memoSet=new WeakSet;function useStrictMemo(eo,to){return reactExports.useMemo(()=>{const ro=getCurrentOwner();return memoSet.has(ro)?eo():(memoSet.add(ro),null)},to)}function useDisposable(eo,to){var ro;const no=useIsStrictMode()&&!1,oo=no?useStrictMemo:reactExports.useMemo,io=no?useStrictEffect:reactExports.useEffect,[so,ao]=(ro=oo(()=>eo(),to))!=null?ro:[null,()=>null];return io(()=>ao,to),so}const usePortalMountNodeStylesStyles=__styles({root:{qhf8xq:"f1euv43f",Bhzewxz:"f15twtuk",oyh7mz:["f1vgc2s3","f1e31b4d"],j35jbq:["f1e31b4d","f1vgc2s3"],Bj3rh1h:"f494woh"}},{d:[".f1euv43f{position:absolute;}",".f15twtuk{top:0;}",".f1vgc2s3{left:0;}",".f1e31b4d{right:0;}",".f494woh{z-index:1000000;}"]}),useInsertionEffect=React$1.useInsertionEffect,usePortalMountNode=eo=>{const{targetDocument:to,dir:ro}=useFluent(),no=usePortalMountNode$1(),oo=useFocusVisible(),io=usePortalMountNodeStylesStyles(),so=useThemeClassName(),ao=mergeClasses(so,io.root,eo.className),lo=no??(to==null?void 0:to.body),uo=useDisposable(()=>{if(lo===void 0||eo.disabled)return[null,()=>null];const co=lo.ownerDocument.createElement("div");return lo.appendChild(co),[co,()=>co.remove()]},[lo]);return useInsertionEffect?useInsertionEffect(()=>{if(!uo)return;const co=ao.split(" ").filter(Boolean);return uo.classList.add(...co),uo.setAttribute("dir",ro),oo.current=uo,()=>{uo.classList.remove(...co),uo.removeAttribute("dir")}},[ao,ro,uo,oo]):reactExports.useMemo(()=>{uo&&(uo.className=ao,uo.setAttribute("dir",ro),oo.current=uo)},[ao,ro,uo,oo]),uo},usePortal_unstable=eo=>{const{element:to,className:ro}=toMountNodeProps(eo.mountNode),no=reactExports.useRef(null),oo=usePortalMountNode({disabled:!!to,className:ro}),io=to??oo,so={children:eo.children,mountNode:io,virtualParentRootRef:no};return reactExports.useEffect(()=>{if(!io)return;const ao=no.current,lo=io.contains(ao);if(ao&&!lo)return setVirtualParent$1(io,ao),()=>{setVirtualParent$1(io,void 0)}},[no,io]),so},renderPortal_unstable=eo=>reactExports.createElement("span",{hidden:!0,ref:eo.virtualParentRootRef},eo.mountNode&&reactDomExports.createPortal(eo.children,eo.mountNode)),Portal$1=eo=>{const to=usePortal_unstable(eo);return renderPortal_unstable(to)};Portal$1.displayName="Portal";const renderPopoverSurface_unstable=eo=>{const to=jsxs(eo.root,{children:[eo.withArrow&&jsx$1("div",{ref:eo.arrowRef,className:eo.arrowClassName}),eo.root.children]});return eo.inline?to:jsx$1(Portal$1,{mountNode:eo.mountNode,children:to})},popoverSurfaceClassNames={root:"fui-PopoverSurface"},arrowHeights={small:6,medium:8,large:8},useStyles$y=__styles({root:{sj55zd:"f19n0e5",De3pzq:"fxugw4r",E5pizo:"f1hg901r",Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],B4j52fo:"f5ogflp",Bekrc4i:["f1hqa2wf","finvdd3"],Bn0qgzm:"f1f09k3d",ibv6hh:["finvdd3","f1hqa2wf"],icvyot:"fzkkow9",vrafjx:["fcdblym","fjik90z"],oivjwe:"fg706s2",wvpqe5:["fjik90z","fcdblym"],g2u3we:"fghlq4f",h3c5rm:["f1gn591s","fjscplz"],B9xav0g:"fb073pr",zhjwy3:["fjscplz","f1gn591s"],Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi",B93otf3:"f18k4bn6",vin17d:"fo1kyvf",Ezkn3b:"fetxo7e",nyiy2g:"f8x1vz1",swvrvq:"f8g0anz",Bkovbt3:"fezwn9i",hgjdhn:"fz5efge",fsy9dk:"f1ydixl4",B3ogreh:"f8dgqj5",jv49x5:"fnyfnr8",Bk7o48c:"fgw77r4",Bv12yb3:"ftje0s4",z0t1cu:"fi19xcv",Bks05zx:"f1mzajhk",Bvtglag:"fjp4h9y"},inline:{Bj3rh1h:"f19g0ac"},inverted:{De3pzq:"fg3r6xk",sj55zd:"fonrgv7"},brand:{De3pzq:"ffp7eso",sj55zd:"f1phragk"},smallPadding:{z8tnut:"f1kcqot9",z189sj:["f11qrl6u","fjlbh76"],Byoj8tv:"fpe6lb7",uwmqm3:["fjlbh76","f11qrl6u"]},mediumPadding:{z8tnut:"fqag9an",z189sj:["f1gbmcue","f1rh9g5y"],Byoj8tv:"fp67ikv",uwmqm3:["f1rh9g5y","f1gbmcue"]},largePadding:{z8tnut:"fc7z3ec",z189sj:["fat0sn4","fekwl8i"],Byoj8tv:"fe2my4m",uwmqm3:["fekwl8i","fat0sn4"]},smallArrow:{a9b677:"f1ekdpwm",Bqenvij:"f83vc9z"},mediumLargeArrow:{a9b677:"f1kmc0fn",Bqenvij:"fb6lvc5"},arrow:{qhf8xq:"f1euv43f",De3pzq:"f1u2r49w",Bcdw1i0:"fd7fpy0",Bj3rh1h:"f1bsuimh",Ftih45:"f1wl9k8s",B1puzpu:"f1wkw4r9",Brfgrao:"f1j7ml58",Bcvre1j:"fyl8oag",Ccq8qp:"frdoeuz",Baz25je:"fb81m9q",cmx5o7:"f1ljr5q2",B4f6apu:"fyfemzf",m598lv:"focyt6c",Bk5zm6e:"fnhxbxj",y0oebl:"fdw6hkg",qa3bma:"f11yjt3y",Bqjgrrk:"f1172wan",Budzafs:["f9e5op9","f112wvtl"],Hv9wc6:["f1500xdc","f1it0ps5"],hl6cv3:"f1773hnp",c8svkw:"fw7o64x",yayu3t:"f1v7783n",nr3p0k:"f1f0d6v",rhl9o9:"fh2hsk5",wiz9v7:"f1gj3y7g",B6q6orb:"f11yvu4",ndpsmx:"f17lejdj"}},{d:[".f19n0e5{color:var(--colorNeutralForeground1);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f1hg901r{box-shadow:var(--shadow16);}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".f5ogflp{border-top-width:1px;}",".f1hqa2wf{border-right-width:1px;}",".finvdd3{border-left-width:1px;}",".f1f09k3d{border-bottom-width:1px;}",".fzkkow9{border-top-style:solid;}",".fcdblym{border-right-style:solid;}",".fjik90z{border-left-style:solid;}",".fg706s2{border-bottom-style:solid;}",".fghlq4f{border-top-color:var(--colorTransparentStroke);}",".f1gn591s{border-right-color:var(--colorTransparentStroke);}",".fjscplz{border-left-color:var(--colorTransparentStroke);}",".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".f18k4bn6{animation-composition:accumulate;}",".fo1kyvf{animation-duration:var(--durationSlower);}",".fetxo7e{animation-timing-function:var(--curveDecelerateMid);}",".f8x1vz1{--fui-positioning-slide-distance-x:0px;}",".f8g0anz{--fui-positioning-slide-distance-y:10px;}",".fezwn9i[data-popper-placement^=right]{--fui-positioning-slide-distance-x:-10px;}",".fz5efge[data-popper-placement^=right]{--fui-positioning-slide-distance-y:0px;}",".f1ydixl4[data-popper-placement^=bottom]{--fui-positioning-slide-distance-x:0px;}",".f8dgqj5[data-popper-placement^=bottom]{--fui-positioning-slide-distance-y:-10px;}",".fnyfnr8[data-popper-placement^=left]{--fui-positioning-slide-distance-x:10px;}",".fgw77r4[data-popper-placement^=left]{--fui-positioning-slide-distance-y:0px;}",".ftje0s4{animation-name:f5j8bii,f79suad;}",".f19g0ac{z-index:1;}",".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}",".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}",".ffp7eso{background-color:var(--colorBrandBackground);}",".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",".f1kcqot9{padding-top:12px;}",".f11qrl6u{padding-right:12px;}",".fjlbh76{padding-left:12px;}",".fpe6lb7{padding-bottom:12px;}",".fqag9an{padding-top:16px;}",".f1gbmcue{padding-right:16px;}",".f1rh9g5y{padding-left:16px;}",".fp67ikv{padding-bottom:16px;}",".fc7z3ec{padding-top:20px;}",".fat0sn4{padding-right:20px;}",".fekwl8i{padding-left:20px;}",".fe2my4m{padding-bottom:20px;}",".f1ekdpwm{width:8.484px;}",".f83vc9z{height:8.484px;}",".f1kmc0fn{width:11.312px;}",".fb6lvc5{height:11.312px;}",".f1euv43f{position:absolute;}",".f1u2r49w{background-color:inherit;}",".fd7fpy0{visibility:hidden;}",".f1bsuimh{z-index:-1;}",'.f1wl9k8s::before{content:"";}',".f1wkw4r9::before{visibility:visible;}",".f1j7ml58::before{position:absolute;}",".fyl8oag::before{box-sizing:border-box;}",".frdoeuz::before{width:inherit;}",".fb81m9q::before{height:inherit;}",".f1ljr5q2::before{background-color:inherit;}",".fyfemzf::before{border-right-width:1px;}",".focyt6c::before{border-right-style:solid;}",".fnhxbxj::before{border-right-color:var(--colorTransparentStroke);}",".fdw6hkg::before{border-bottom-width:1px;}",".f11yjt3y::before{border-bottom-style:solid;}",".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}",".f9e5op9::before{border-bottom-right-radius:var(--borderRadiusSmall);}",".f112wvtl::before{border-bottom-left-radius:var(--borderRadiusSmall);}",".f1500xdc::before{transform:rotate(var(--fui-positioning-angle)) translate(0, 50%) rotate(45deg);}",".f1it0ps5::before{transform:rotate(var(--fui-positioning-angle)) translate(0, 50%) rotate(-45deg);}",'[data-popper-placement^="top"] .f1773hnp{bottom:-1px;}','[data-popper-placement^="top"] .fw7o64x{--fui-positioning-angle:0;}','[data-popper-placement^="right"] .f1v7783n{left:-1px;}','[data-popper-placement^="right"] .f1f0d6v{--fui-positioning-angle:90deg;}','[data-popper-placement^="bottom"] .fh2hsk5{top:-1px;}','[data-popper-placement^="bottom"] .f1gj3y7g{--fui-positioning-angle:180deg;}','[data-popper-placement^="left"] .f11yvu4{right:-1px;}','[data-popper-placement^="left"] .f17lejdj{--fui-positioning-angle:270deg;}'],k:["@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}","@keyframes f79suad{from{transform:translate(var(--fui-positioning-slide-distance-x), var(--fui-positioning-slide-distance-y));}}"],m:[["@media (prefers-reduced-motion){.fi19xcv[data-popper-placement]{animation-duration:1ms;}}",{m:"(prefers-reduced-motion)"}],["@media (prefers-reduced-motion){.f1mzajhk[data-popper-placement]{animation-name:f5j8bii;}}",{m:"(prefers-reduced-motion)"}]],t:["@supports not (animation-composition: accumulate){.fjp4h9y[data-popper-placement]{animation-name:f5j8bii;}}"]}),usePopoverSurfaceStyles_unstable=eo=>{const to=useStyles$y();return eo.root.className=mergeClasses(popoverSurfaceClassNames.root,to.root,eo.inline&&to.inline,eo.size==="small"&&to.smallPadding,eo.size==="medium"&&to.mediumPadding,eo.size==="large"&&to.largePadding,eo.appearance==="inverted"&&to.inverted,eo.appearance==="brand"&&to.brand,eo.root.className),eo.arrowClassName=mergeClasses(to.arrow,eo.size==="small"?to.smallArrow:to.mediumLargeArrow),eo},PopoverSurface=reactExports.forwardRef((eo,to)=>{const ro=usePopoverSurface_unstable(eo,to);return usePopoverSurfaceStyles_unstable(ro),useCustomStyleHook("usePopoverSurfaceStyles_unstable")(ro),renderPopoverSurface_unstable(ro)});PopoverSurface.displayName="PopoverSurface";const popoverSurfaceBorderRadius=4,usePopover_unstable=eo=>{const[to,ro]=usePositioningMouseTarget(),no={size:"medium",contextTarget:to,setContextTarget:ro,...eo},oo=reactExports.Children.toArray(eo.children);let io,so;oo.length===2?(io=oo[0],so=oo[1]):oo.length===1&&(so=oo[0]);const[ao,lo]=useOpenState(no),uo=reactExports.useRef(0),co=useEventCallback$3((Eo,So)=>{if(clearTimeout(uo.current),!(Eo instanceof Event)&&Eo.persist&&Eo.persist(),Eo.type==="mouseleave"){var To;uo.current=setTimeout(()=>{lo(Eo,So)},(To=eo.mouseLeaveDelay)!==null&&To!==void 0?To:500)}else lo(Eo,So)});reactExports.useEffect(()=>()=>{clearTimeout(uo.current)},[]);const fo=reactExports.useCallback(Eo=>{co(Eo,!ao)},[co,ao]),ho=usePopoverRefs(no),{targetDocument:po}=useFluent();var go;useOnClickOutside({contains:elementContains$1,element:po,callback:Eo=>co(Eo,!1),refs:[ho.triggerRef,ho.contentRef],disabled:!ao,disabledFocusOnIframe:!(!((go=eo.closeOnIframeFocus)!==null&&go!==void 0)||go)});const vo=no.openOnContext||no.closeOnScroll;useOnScrollOutside({contains:elementContains$1,element:po,callback:Eo=>co(Eo,!1),refs:[ho.triggerRef,ho.contentRef],disabled:!ao||!vo});const{findFirstFocusable:bo}=useFocusFinders();reactExports.useEffect(()=>{if(!eo.unstable_disableAutoFocus&&ao&&ho.contentRef.current){var Eo;const So=(Eo=ho.contentRef.current.getAttribute("tabIndex"))!==null&&Eo!==void 0?Eo:void 0,To=isNaN(So)?bo(ho.contentRef.current):ho.contentRef.current;To==null||To.focus()}},[bo,ao,ho.contentRef,eo.unstable_disableAutoFocus]);var xo,_o;return{...no,...ho,inertTrapFocus:(xo=eo.inertTrapFocus)!==null&&xo!==void 0?xo:eo.legacyTrapFocus===void 0?!1:!eo.legacyTrapFocus,popoverTrigger:io,popoverSurface:so,open:ao,setOpen:co,toggleOpen:fo,setContextTarget:ro,contextTarget:to,inline:(_o=eo.inline)!==null&&_o!==void 0?_o:!1}};function useOpenState(eo){const to=useEventCallback$3((so,ao)=>{var lo;return(lo=eo.onOpenChange)===null||lo===void 0?void 0:lo.call(eo,so,ao)}),[ro,no]=useControllableState({state:eo.open,defaultState:eo.defaultOpen,initialState:!1});eo.open=ro!==void 0?ro:eo.open;const oo=eo.setContextTarget,io=reactExports.useCallback((so,ao)=>{ao&&so.type==="contextmenu"&&oo(so),ao||oo(void 0),no(ao),to==null||to(so,{open:ao})},[no,to,oo]);return[ro,io]}function usePopoverRefs(eo){const to={position:"above",align:"center",arrowPadding:2*popoverSurfaceBorderRadius,target:eo.openOnContext?eo.contextTarget:void 0,...resolvePositioningShorthand(eo.positioning)};to.coverTarget&&(eo.withArrow=!1),eo.withArrow&&(to.offset=mergeArrowOffset(to.offset,arrowHeights[eo.size]));const{targetRef:ro,containerRef:no,arrowRef:oo}=usePositioning(to);return{triggerRef:ro,contentRef:no,arrowRef:oo}}const renderPopover_unstable=eo=>{const{appearance:to,arrowRef:ro,contentRef:no,inline:oo,mountNode:io,open:so,openOnContext:ao,openOnHover:lo,setOpen:uo,size:co,toggleOpen:fo,trapFocus:ho,triggerRef:po,withArrow:go,inertTrapFocus:vo}=eo;return reactExports.createElement(PopoverContext.Provider,{value:{appearance:to,arrowRef:ro,contentRef:no,inline:oo,mountNode:io,open:so,openOnContext:ao,openOnHover:lo,setOpen:uo,toggleOpen:fo,triggerRef:po,size:co,trapFocus:ho,inertTrapFocus:vo,withArrow:go}},eo.popoverTrigger,eo.open&&eo.popoverSurface)},Popover=eo=>{const to=usePopover_unstable(eo);return renderPopover_unstable(to)};Popover.displayName="Popover";const usePopoverTrigger_unstable=eo=>{const{children:to,disableButtonEnhancement:ro=!1}=eo,no=getTriggerChild(to),oo=usePopoverContext_unstable(Eo=>Eo.open),io=usePopoverContext_unstable(Eo=>Eo.setOpen),so=usePopoverContext_unstable(Eo=>Eo.toggleOpen),ao=usePopoverContext_unstable(Eo=>Eo.triggerRef),lo=usePopoverContext_unstable(Eo=>Eo.openOnHover),uo=usePopoverContext_unstable(Eo=>Eo.openOnContext),{triggerAttributes:co}=useModalAttributes(),fo=Eo=>{uo&&(Eo.preventDefault(),io(Eo,!0))},ho=Eo=>{uo||so(Eo)},po=Eo=>{Eo.key===Escape$1&&oo&&!Eo.isDefaultPrevented()&&(io(Eo,!1),Eo.preventDefault())},go=Eo=>{lo&&io(Eo,!0)},vo=Eo=>{lo&&io(Eo,!1)},bo={...co,"aria-expanded":`${oo}`,...no==null?void 0:no.props,onMouseEnter:useEventCallback$3(mergeCallbacks(no==null?void 0:no.props.onMouseEnter,go)),onMouseLeave:useEventCallback$3(mergeCallbacks(no==null?void 0:no.props.onMouseLeave,vo)),onContextMenu:useEventCallback$3(mergeCallbacks(no==null?void 0:no.props.onContextMenu,fo)),ref:useMergedRefs$1(ao,no==null?void 0:no.ref)},xo={...bo,onClick:useEventCallback$3(mergeCallbacks(no==null?void 0:no.props.onClick,ho)),onKeyDown:useEventCallback$3(mergeCallbacks(no==null?void 0:no.props.onKeyDown,po))},_o=useARIAButtonProps((no==null?void 0:no.type)==="button"||(no==null?void 0:no.type)==="a"?no.type:"div",xo);return{children:applyTriggerPropsToChildren(eo.children,useARIAButtonProps((no==null?void 0:no.type)==="button"||(no==null?void 0:no.type)==="a"?no.type:"div",uo?bo:ro?xo:_o))}},renderPopoverTrigger_unstable=eo=>eo.children,PopoverTrigger=eo=>{const to=usePopoverTrigger_unstable(eo);return renderPopoverTrigger_unstable(to)};PopoverTrigger.displayName="PopoverTrigger";PopoverTrigger.isFluentTriggerComponent=!0;const arrowHeight=6,tooltipBorderRadius=4,useTooltip_unstable=eo=>{var to,ro,no,oo;const io=useTooltipVisibility(),so=useIsSSR(),{targetDocument:ao}=useFluent(),[lo,uo]=useTimeout(),{appearance:co="normal",children:fo,content:ho,withArrow:po=!1,positioning:go="above",onVisibleChange:vo,relationship:bo,showDelay:xo=250,hideDelay:_o=250,mountNode:Eo}=eo,[So,To]=useControllableState({state:eo.visible,initialState:!1}),wo=reactExports.useCallback((Ho,qo)=>{uo(),To(Uo=>(qo.visible!==Uo&&(vo==null||vo(Ho,qo)),qo.visible))},[uo,To,vo]),Co={withArrow:po,positioning:go,showDelay:xo,hideDelay:_o,relationship:bo,visible:So,shouldRenderTooltip:So,appearance:co,mountNode:Eo,components:{content:"div"},content:always(ho,{defaultProps:{role:"tooltip"},elementType:"div"})};Co.content.id=useId$1("tooltip-",Co.content.id);const Oo={enabled:Co.visible,arrowPadding:2*tooltipBorderRadius,position:"above",align:"center",offset:4,...resolvePositioningShorthand(Co.positioning)};Co.withArrow&&(Oo.offset=mergeArrowOffset(Oo.offset,arrowHeight));const{targetRef:Ao,containerRef:Ro,arrowRef:No}=usePositioning(Oo);Co.content.ref=useMergedRefs$1(Co.content.ref,Ro),Co.arrowRef=No,useIsomorphicLayoutEffect$1(()=>{if(So){var Ho;const qo={hide:Yo=>wo(void 0,{visible:!1,documentKeyboardEvent:Yo})};(Ho=io.visibleTooltip)===null||Ho===void 0||Ho.hide(),io.visibleTooltip=qo;const Uo=Yo=>{Yo.key===Escape$1&&!Yo.defaultPrevented&&(qo.hide(Yo),Yo.preventDefault())};return ao==null||ao.addEventListener("keydown",Uo,{capture:!0}),()=>{io.visibleTooltip===qo&&(io.visibleTooltip=void 0),ao==null||ao.removeEventListener("keydown",Uo,{capture:!0})}}},[io,ao,So,wo]);const Mo=reactExports.useRef(!1),Do=reactExports.useCallback(Ho=>{if(Ho.type==="focus"&&Mo.current){Mo.current=!1;return}const qo=io.visibleTooltip?0:Co.showDelay;lo(()=>{wo(Ho,{visible:!0})},qo),Ho.persist()},[lo,wo,Co.showDelay,io]),[jo]=reactExports.useState(()=>{const Ho=Uo=>{var Yo;!((Yo=Uo.detail)===null||Yo===void 0)&&Yo.isFocusedProgrammatically&&(Mo.current=!0)};let qo=null;return Uo=>{qo==null||qo.removeEventListener(KEYBORG_FOCUSIN,Ho),Uo==null||Uo.addEventListener(KEYBORG_FOCUSIN,Ho),qo=Uo}}),Fo=reactExports.useCallback(Ho=>{let qo=Co.hideDelay;Ho.type==="blur"&&(qo=0,Mo.current=(ao==null?void 0:ao.activeElement)===Ho.target),lo(()=>{wo(Ho,{visible:!1})},qo),Ho.persist()},[lo,wo,Co.hideDelay,ao]);Co.content.onPointerEnter=mergeCallbacks(Co.content.onPointerEnter,uo),Co.content.onPointerLeave=mergeCallbacks(Co.content.onPointerLeave,Fo),Co.content.onFocus=mergeCallbacks(Co.content.onFocus,uo),Co.content.onBlur=mergeCallbacks(Co.content.onBlur,Fo);const $o=getTriggerChild(fo),Lo={};return bo==="label"?typeof Co.content.children=="string"?Lo["aria-label"]=Co.content.children:(Lo["aria-labelledby"]=Co.content.id,Co.shouldRenderTooltip=!0):bo==="description"&&(Lo["aria-describedby"]=Co.content.id,Co.shouldRenderTooltip=!0),so&&(Co.shouldRenderTooltip=!1),Co.children=applyTriggerPropsToChildren(fo,{...Lo,...$o==null?void 0:$o.props,ref:useMergedRefs$1($o==null?void 0:$o.ref,jo,Oo.target===void 0?Ao:void 0),onPointerEnter:useEventCallback$3(mergeCallbacks($o==null||(to=$o.props)===null||to===void 0?void 0:to.onPointerEnter,Do)),onPointerLeave:useEventCallback$3(mergeCallbacks($o==null||(ro=$o.props)===null||ro===void 0?void 0:ro.onPointerLeave,Fo)),onFocus:useEventCallback$3(mergeCallbacks($o==null||(no=$o.props)===null||no===void 0?void 0:no.onFocus,Do)),onBlur:useEventCallback$3(mergeCallbacks($o==null||(oo=$o.props)===null||oo===void 0?void 0:oo.onBlur,Fo))}),Co},renderTooltip_unstable=eo=>jsxs(reactExports.Fragment,{children:[eo.children,eo.shouldRenderTooltip&&jsx$1(Portal$1,{mountNode:eo.mountNode,children:jsxs(eo.content,{children:[eo.withArrow&&jsx$1("div",{ref:eo.arrowRef,className:eo.arrowClassName}),eo.content.children]})})]}),tooltipClassNames={content:"fui-Tooltip__content"},useStyles$x=__styles({root:{mc9l5x:"fjseox",B7ck84d:"f1ewtqcl",B2u0y6b:"f132xexn",Bceei9c:"f158kwzp",Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bg96gwp:"fwrc4pm",Btd35i7:"fokg9q4",Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],B4j52fo:"f5ogflp",Bekrc4i:["f1hqa2wf","finvdd3"],Bn0qgzm:"f1f09k3d",ibv6hh:["finvdd3","f1hqa2wf"],icvyot:"fzkkow9",vrafjx:["fcdblym","fjik90z"],oivjwe:"fg706s2",wvpqe5:["fjik90z","fcdblym"],g2u3we:"fghlq4f",h3c5rm:["f1gn591s","fjscplz"],B9xav0g:"fb073pr",zhjwy3:["fjscplz","f1gn591s"],z8tnut:"f10ra9hq",z189sj:["fd9xhir","f1jlaasf"],Byoj8tv:"f1d7kygh",uwmqm3:["f1jlaasf","fd9xhir"],De3pzq:"fxugw4r",sj55zd:"f19n0e5",Bhu2qc9:"fxeb0a7"},visible:{mc9l5x:"ftgm304"},inverted:{De3pzq:"fg3r6xk",sj55zd:"fonrgv7"},arrow:{qhf8xq:"f1euv43f",De3pzq:"f1u2r49w",Bcdw1i0:"fd7fpy0",Bj3rh1h:"f1bsuimh",a9b677:"f1ekdpwm",Bqenvij:"f83vc9z",Ftih45:"f1wl9k8s",B1puzpu:"f1wkw4r9",Brfgrao:"f1j7ml58",Bcvre1j:"fyl8oag",Ccq8qp:"frdoeuz",Baz25je:"fb81m9q",cmx5o7:"f1ljr5q2",B4f6apu:"fyfemzf",m598lv:"focyt6c",Bk5zm6e:"fnhxbxj",y0oebl:"fdw6hkg",qa3bma:"f11yjt3y",Bqjgrrk:"f1172wan",Budzafs:["f9e5op9","f112wvtl"],Hv9wc6:["f1500xdc","f1it0ps5"],hl6cv3:"f1773hnp",c8svkw:"fw7o64x",yayu3t:"f1v7783n",nr3p0k:"f1f0d6v",rhl9o9:"fh2hsk5",wiz9v7:"f1gj3y7g",B6q6orb:"f11yvu4",ndpsmx:"f17lejdj"}},{d:[".fjseox{display:none;}",".f1ewtqcl{box-sizing:border-box;}",".f132xexn{max-width:240px;}",".f158kwzp{cursor:default;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".fokg9q4{overflow-wrap:break-word;}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".f5ogflp{border-top-width:1px;}",".f1hqa2wf{border-right-width:1px;}",".finvdd3{border-left-width:1px;}",".f1f09k3d{border-bottom-width:1px;}",".fzkkow9{border-top-style:solid;}",".fcdblym{border-right-style:solid;}",".fjik90z{border-left-style:solid;}",".fg706s2{border-bottom-style:solid;}",".fghlq4f{border-top-color:var(--colorTransparentStroke);}",".f1gn591s{border-right-color:var(--colorTransparentStroke);}",".fjscplz{border-left-color:var(--colorTransparentStroke);}",".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",".f10ra9hq{padding-top:4px;}",".fd9xhir{padding-right:11px;}",".f1jlaasf{padding-left:11px;}",".f1d7kygh{padding-bottom:6px;}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f19n0e5{color:var(--colorNeutralForeground1);}",".fxeb0a7{filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));}",".ftgm304{display:block;}",".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}",".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}",".f1euv43f{position:absolute;}",".f1u2r49w{background-color:inherit;}",".fd7fpy0{visibility:hidden;}",".f1bsuimh{z-index:-1;}",".f1ekdpwm{width:8.484px;}",".f83vc9z{height:8.484px;}",'.f1wl9k8s::before{content:"";}',".f1wkw4r9::before{visibility:visible;}",".f1j7ml58::before{position:absolute;}",".fyl8oag::before{box-sizing:border-box;}",".frdoeuz::before{width:inherit;}",".fb81m9q::before{height:inherit;}",".f1ljr5q2::before{background-color:inherit;}",".fyfemzf::before{border-right-width:1px;}",".focyt6c::before{border-right-style:solid;}",".fnhxbxj::before{border-right-color:var(--colorTransparentStroke);}",".fdw6hkg::before{border-bottom-width:1px;}",".f11yjt3y::before{border-bottom-style:solid;}",".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}",".f9e5op9::before{border-bottom-right-radius:var(--borderRadiusSmall);}",".f112wvtl::before{border-bottom-left-radius:var(--borderRadiusSmall);}",".f1500xdc::before{transform:rotate(var(--fui-positioning-angle)) translate(0, 50%) rotate(45deg);}",".f1it0ps5::before{transform:rotate(var(--fui-positioning-angle)) translate(0, 50%) rotate(-45deg);}",'[data-popper-placement^="top"] .f1773hnp{bottom:-1px;}','[data-popper-placement^="top"] .fw7o64x{--fui-positioning-angle:0;}','[data-popper-placement^="right"] .f1v7783n{left:-1px;}','[data-popper-placement^="right"] .f1f0d6v{--fui-positioning-angle:90deg;}','[data-popper-placement^="bottom"] .fh2hsk5{top:-1px;}','[data-popper-placement^="bottom"] .f1gj3y7g{--fui-positioning-angle:180deg;}','[data-popper-placement^="left"] .f11yvu4{right:-1px;}','[data-popper-placement^="left"] .f17lejdj{--fui-positioning-angle:270deg;}']}),useTooltipStyles_unstable=eo=>{const to=useStyles$x();return eo.content.className=mergeClasses(tooltipClassNames.content,to.root,eo.appearance==="inverted"&&to.inverted,eo.visible&&to.visible,eo.content.className),eo.arrowClassName=to.arrow,eo},Tooltip=eo=>{const to=useTooltip_unstable(eo);return useTooltipStyles_unstable(to),useCustomStyleHook("useTooltipStyles_unstable")(to),renderTooltip_unstable(to)};Tooltip.displayName="Tooltip";Tooltip.isFluentTriggerComponent=!0;const renderButton_unstable=eo=>{const{iconOnly:to,iconPosition:ro}=eo;return jsxs(eo.root,{children:[ro!=="after"&&eo.icon&&jsx$1(eo.icon,{}),!to&&eo.root.children,ro==="after"&&eo.icon&&jsx$1(eo.icon,{})]})},buttonContext=reactExports.createContext(void 0),buttonContextDefaultValue={};buttonContext.Provider;const useButtonContext=()=>{var eo;return(eo=reactExports.useContext(buttonContext))!==null&&eo!==void 0?eo:buttonContextDefaultValue},useButton_unstable=(eo,to)=>{const{size:ro}=useButtonContext(),{appearance:no="secondary",as:oo="button",disabled:io=!1,disabledFocusable:so=!1,icon:ao,iconPosition:lo="before",shape:uo="rounded",size:co=ro??"medium"}=eo,fo=optional(ao,{elementType:"span"});return{appearance:no,disabled:io,disabledFocusable:so,iconPosition:lo,shape:uo,size:co,iconOnly:!!(fo!=null&&fo.children&&!eo.children),components:{root:"button",icon:"span"},root:always(getIntrinsicElementProps(oo,useARIAButtonProps(eo.as,eo)),{elementType:"button",defaultProps:{ref:to,type:"button"}}),icon:fo}},buttonClassNames={root:"fui-Button",icon:"fui-Button__icon"},useRootBaseClassName$1=__resetStyles("r1alrhcs",null,{r:[".r1alrhcs{align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;text-decoration-line:none;vertical-align:middle;margin:0;overflow:hidden;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);font-family:var(--fontFamilyBase);outline-style:none;padding:5px var(--spacingHorizontalM);min-width:96px;border-radius:var(--borderRadiusMedium);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase300);transition-duration:var(--durationFaster);transition-property:background,border,color;transition-timing-function:var(--curveEasyEase);}",".r1alrhcs:hover{background-color:var(--colorNeutralBackground1Hover);border-color:var(--colorNeutralStroke1Hover);color:var(--colorNeutralForeground1Hover);cursor:pointer;}",".r1alrhcs:hover:active{background-color:var(--colorNeutralBackground1Pressed);border-color:var(--colorNeutralStroke1Pressed);color:var(--colorNeutralForeground1Pressed);outline-style:none;}",".r1alrhcs[data-fui-focus-visible]{border-color:var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);border-width:1px;outline:var(--strokeWidthThick) solid var(--colorTransparentStroke);box-shadow:0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset;z-index:1;}"],s:["@media screen and (prefers-reduced-motion: reduce){.r1alrhcs{transition-duration:0.01ms;}}","@media (forced-colors: active){.r1alrhcs:focus{border-color:ButtonText;}.r1alrhcs:hover{background-color:HighlightText;border-color:Highlight;color:Highlight;forced-color-adjust:none;}.r1alrhcs:hover:active{background-color:HighlightText;border-color:Highlight;color:Highlight;forced-color-adjust:none;}}","@supports (-moz-appearance:button){.r1alrhcs[data-fui-focus-visible]{box-shadow:0 0 0 calc(var(--strokeWidthThin) + 0.25px) var(--colorStrokeFocus2) inset;}}"]}),useIconBaseClassName=__resetStyles("rywnvv2",null,[".rywnvv2{align-items:center;display:inline-flex;justify-content:center;font-size:20px;height:20px;width:20px;--fui-Button__icon--spacing:var(--spacingHorizontalSNudge);}"]),useRootStyles$5=__styles({outline:{De3pzq:"f1c21dwh",Jwef8y:"fjxutwb",iro3zm:"fwiml72"},primary:{De3pzq:"ffp7eso",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],sj55zd:"f1phragk",Jwef8y:"f15wkkf3",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],Bi91k9c:"f1rq72xc",iro3zm:"fnp9lpt",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"],B2d53fq:"f1d6v5y2",Bsw6fvg:"f1rirnrt",Bjwas2f:"f1uu00uk",Bn1d65q:["fkvaka8","f9a0qzu"],Bxeuatn:"f1ux7til",n51gp8:["f9a0qzu","fkvaka8"],Bbusuzp:"f1lkg8j3",ycbfsm:"fkc42ay",Bqrx1nm:"fq7113v",pgvf35:"ff1wgvm",Bh7lczh:["fiob0tu","f1x4h75k"],dpv3f4:"f1j6scgf",Bpnjhaq:["f1x4h75k","fiob0tu"],ze5xyy:"f4xjyn1",g2kj27:"fbgcvur",Bf756sw:"f1ks1yx8",Bow2dr7:["f1o6qegi","fmxjhhp"],Bvhedfk:"fcnxywj",Gye4lf:["fmxjhhp","f1o6qegi"],pc6evw:"f9ddjv3"},secondary:{},subtle:{De3pzq:"fhovq9v",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],sj55zd:"fkfq4zb",Jwef8y:"f1t94bn6",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],Bi91k9c:"fnwyq0v",Bk3fhr4:"ft1hn21",Bmfj8id:"fuxngvv",Bbdnnc7:"fy5bs14",iro3zm:"fsv2rcd",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"],B2d53fq:"f1omzyqd",em6i61:"f1dfjoow",vm6p8p:"f1j98vj9",x3br3k:"fj8yq94",ze5xyy:"f4xjyn1",Bx3q9su:"f1et0tmh",pc6evw:"f9ddjv3",xd2cci:"f1wi8ngl"},transparent:{De3pzq:"f1c21dwh",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],sj55zd:"fkfq4zb",Jwef8y:"fjxutwb",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],Bi91k9c:"f139oj5f",Bk3fhr4:"ft1hn21",Bmfj8id:"fuxngvv",iro3zm:"fwiml72",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"],B2d53fq:"f1fg1p5m",em6i61:"f1dfjoow",vm6p8p:"f1j98vj9",Bqrx1nm:"f1tme0vf",ze5xyy:"f4xjyn1",g2kj27:"f18onu3q",pc6evw:"f9ddjv3"},circular:{Bbmb7ep:["f8fbkgy","f1nfllo7"],Beyfa6y:["f1nfllo7","f8fbkgy"],B7oj6ja:["f1djnp8u","f1s8kh49"],Btl43ni:["f1s8kh49","f1djnp8u"]},rounded:{},square:{Bbmb7ep:["fzi6hpg","fyowgf4"],Beyfa6y:["fyowgf4","fzi6hpg"],B7oj6ja:["f3fg2lr","f13av6d4"],Btl43ni:["f13av6d4","f3fg2lr"]},small:{Bf4jedk:"fh7ncta",z8tnut:"f1khb0e9",z189sj:["f1vdfbxk","f1f5gg8d"],Byoj8tv:"f1jnq6q7",uwmqm3:["f1f5gg8d","f1vdfbxk"],Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm"},smallWithIcon:{Byoj8tv:"f1brlhvm",z8tnut:"f1sl3k7w"},medium:{},large:{Bf4jedk:"f14es27b",z8tnut:"fp9bwmr",z189sj:["fjodcmx","fhx4nu"],Byoj8tv:"f150uoa4",uwmqm3:["fhx4nu","fjodcmx"],Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},largeWithIcon:{Byoj8tv:"fy7v416",z8tnut:"f1a1bwwz"}},{d:[".f1c21dwh{background-color:var(--colorTransparentBackground);}",".ffp7eso{background-color:var(--colorBrandBackground);}",".f1p3nwhy{border-top-color:transparent;}",".f11589ue{border-right-color:transparent;}",".f1pdflbu{border-left-color:transparent;}",".f1q5o8ev{border-bottom-color:transparent;}",".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",".fhovq9v{background-color:var(--colorSubtleBackground);}",".fkfq4zb{color:var(--colorNeutralForeground2);}",".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}",".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}",".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}",".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}",".fzi6hpg{border-bottom-right-radius:var(--borderRadiusNone);}",".fyowgf4{border-bottom-left-radius:var(--borderRadiusNone);}",".f3fg2lr{border-top-right-radius:var(--borderRadiusNone);}",".f13av6d4{border-top-left-radius:var(--borderRadiusNone);}",".fh7ncta{min-width:64px;}",".f1khb0e9{padding-top:3px;}",".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",".f1jnq6q7{padding-bottom:3px;}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f1brlhvm{padding-bottom:1px;}",".f1sl3k7w{padding-top:1px;}",".f14es27b{min-width:96px;}",".fp9bwmr{padding-top:8px;}",".fjodcmx{padding-right:var(--spacingHorizontalL);}",".fhx4nu{padding-left:var(--spacingHorizontalL);}",".f150uoa4{padding-bottom:8px;}",".fod5ikn{font-size:var(--fontSizeBase400);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fy7v416{padding-bottom:7px;}",".f1a1bwwz{padding-top:7px;}"],h:[".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}",".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}",".f15wkkf3:hover{background-color:var(--colorBrandBackgroundHover);}",".f1s2uweq:hover{border-top-color:transparent;}",".fr80ssc:hover{border-right-color:transparent;}",".fecsdlb:hover{border-left-color:transparent;}",".f1ukrpxl:hover{border-bottom-color:transparent;}",".f1rq72xc:hover{color:var(--colorNeutralForegroundOnBrand);}",".fnp9lpt:hover:active{background-color:var(--colorBrandBackgroundPressed);}",".f1h0usnq:hover:active{border-top-color:transparent;}",".fs4ktlq:hover:active{border-right-color:transparent;}",".fx2bmrt:hover:active{border-left-color:transparent;}",".f16h9ulv:hover:active{border-bottom-color:transparent;}",".f1d6v5y2:hover:active{color:var(--colorNeutralForegroundOnBrand);}",".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}",".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}",".ft1hn21:hover .fui-Icon-filled{display:inline;}",".fuxngvv:hover .fui-Icon-regular{display:none;}",".fy5bs14:hover .fui-Button__icon{color:var(--colorNeutralForeground2BrandHover);}",".fsv2rcd:hover:active{background-color:var(--colorSubtleBackgroundPressed);}",".f1omzyqd:hover:active{color:var(--colorNeutralForeground2Pressed);}",".f1dfjoow:hover:active .fui-Icon-filled{display:inline;}",".f1j98vj9:hover:active .fui-Icon-regular{display:none;}",".fj8yq94:hover:active .fui-Button__icon{color:var(--colorNeutralForeground2BrandPressed);}",".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}",".f1fg1p5m:hover:active{color:var(--colorNeutralForeground2BrandPressed);}"],m:[["@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1uu00uk{border-top-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f9a0qzu{border-left-color:HighlightText;}.fkvaka8{border-right-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1ux7til{border-bottom-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1lkg8j3{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fq7113v:hover{background-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.ff1wgvm:hover{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1x4h75k:hover{border-left-color:Highlight;}.fiob0tu:hover{border-right-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1j6scgf:hover{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f4xjyn1:hover{color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fbgcvur:hover:active{background-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1ks1yx8:hover:active{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1o6qegi:hover:active{border-right-color:Highlight;}.fmxjhhp:hover:active{border-left-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fcnxywj:hover:active{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f9ddjv3:hover:active{color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1et0tmh:hover .fui-Button__icon{color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1wi8ngl:hover:active .fui-Button__icon{color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1tme0vf:hover{background-color:var(--colorTransparentBackground);}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f18onu3q:hover:active{background-color:var(--colorTransparentBackground);}}",{m:"(forced-colors: active)"}]]}),useRootDisabledStyles=__styles({base:{De3pzq:"f1bg9a2p",g2u3we:"f1jj8ep1",h3c5rm:["f15xbau","fy0fskl"],B9xav0g:"f4ikngz",zhjwy3:["fy0fskl","f15xbau"],sj55zd:"f1s2aq7o",Bceei9c:"fdrzuqr",Bfinmwp:"f15x8b5r",Jwef8y:"f1falr9n",Bgoe8wy:"f12mpcsy",Bwzppfd:["f1gwvigk","f18rmfxp"],oetu4i:"f1jnshp0",gg5e9n:["f18rmfxp","f1gwvigk"],Bi91k9c:"fvgxktp",eoavqd:"fphbwmw",Bk3fhr4:"f19vpps7",Bmfj8id:"fv5swzo",Bbdnnc7:"f1al02dq",iro3zm:"f1t6o4dc",b661bw:"f10ztigi",Bk6r4ia:["f1ft5sdu","f1gzf82w"],B9zn80p:"f12zbtn2",Bpld233:["f1gzf82w","f1ft5sdu"],B2d53fq:"fcvwxyo",c3iz72:"f8w4c43",em6i61:"f1ol4fw6",vm6p8p:"f1q1lw4e",x3br3k:"f1dwjv2g"},highContrast:{Bsw6fvg:"f4lkoma",Bjwas2f:"fg455y9",Bn1d65q:["f1rvyvqg","f14g86mu"],Bxeuatn:"f1cwzwz",n51gp8:["f14g86mu","f1rvyvqg"],Bbusuzp:"f1dcs8yz",G867l3:"fjwq6ea",gdbnj:["f1lr3nhc","f1mbxvi6"],mxns5l:"fn5gmvv",o3nasb:["f1mbxvi6","f1lr3nhc"],Bqrx1nm:"f1vmkb5g",pgvf35:"f53ppgq",Bh7lczh:["f1663y11","f80fkiy"],dpv3f4:"f18v5270",Bpnjhaq:["f80fkiy","f1663y11"],ze5xyy:"f1kc2mi9",g2kj27:"f1y0svfh",Bf756sw:"fihuait",Bow2dr7:["fnxhupq","fyd6l6x"],Bvhedfk:"fx507ft",Gye4lf:["fyd6l6x","fnxhupq"],pc6evw:"fb3rf2x"},outline:{De3pzq:"f1c21dwh",Jwef8y:"f9ql6rf",iro3zm:"f3h1zc4"},primary:{g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"]},secondary:{},subtle:{De3pzq:"f1c21dwh",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],Jwef8y:"f9ql6rf",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],iro3zm:"f3h1zc4",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"]},transparent:{De3pzq:"f1c21dwh",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],Jwef8y:"f9ql6rf",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],iro3zm:"f3h1zc4",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"]}},{d:[".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}",".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}",".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}",".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}",".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}",".f15x8b5r .fui-Button__icon{color:var(--colorNeutralForegroundDisabled);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f1p3nwhy{border-top-color:transparent;}",".f11589ue{border-right-color:transparent;}",".f1pdflbu{border-left-color:transparent;}",".f1q5o8ev{border-bottom-color:transparent;}"],h:[".f1falr9n:hover{background-color:var(--colorNeutralBackgroundDisabled);}",".f12mpcsy:hover{border-top-color:var(--colorNeutralStrokeDisabled);}",".f1gwvigk:hover{border-right-color:var(--colorNeutralStrokeDisabled);}",".f18rmfxp:hover{border-left-color:var(--colorNeutralStrokeDisabled);}",".f1jnshp0:hover{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}",".fphbwmw:hover{cursor:not-allowed;}",".f19vpps7:hover .fui-Icon-filled{display:none;}",".fv5swzo:hover .fui-Icon-regular{display:inline;}",".f1al02dq:hover .fui-Button__icon{color:var(--colorNeutralForegroundDisabled);}",".f1t6o4dc:hover:active{background-color:var(--colorNeutralBackgroundDisabled);}",".f10ztigi:hover:active{border-top-color:var(--colorNeutralStrokeDisabled);}",".f1ft5sdu:hover:active{border-right-color:var(--colorNeutralStrokeDisabled);}",".f1gzf82w:hover:active{border-left-color:var(--colorNeutralStrokeDisabled);}",".f12zbtn2:hover:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".fcvwxyo:hover:active{color:var(--colorNeutralForegroundDisabled);}",".f8w4c43:hover:active{cursor:not-allowed;}",".f1ol4fw6:hover:active .fui-Icon-filled{display:none;}",".f1q1lw4e:hover:active .fui-Icon-regular{display:inline;}",".f1dwjv2g:hover:active .fui-Button__icon{color:var(--colorNeutralForegroundDisabled);}",".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}",".f3h1zc4:hover:active{background-color:var(--colorTransparentBackground);}",".f1s2uweq:hover{border-top-color:transparent;}",".fr80ssc:hover{border-right-color:transparent;}",".fecsdlb:hover{border-left-color:transparent;}",".f1ukrpxl:hover{border-bottom-color:transparent;}",".f1h0usnq:hover:active{border-top-color:transparent;}",".fs4ktlq:hover:active{border-right-color:transparent;}",".fx2bmrt:hover:active{border-left-color:transparent;}",".f16h9ulv:hover:active{border-bottom-color:transparent;}"],m:[["@media (forced-colors: active){.f4lkoma{background-color:ButtonFace;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fjwq6ea:focus{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1lr3nhc:focus{border-right-color:GrayText;}.f1mbxvi6:focus{border-left-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fn5gmvv:focus{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1vmkb5g:hover{background-color:ButtonFace;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f53ppgq:hover{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1663y11:hover{border-right-color:GrayText;}.f80fkiy:hover{border-left-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f18v5270:hover{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1kc2mi9:hover{color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1y0svfh:hover:active{background-color:ButtonFace;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fihuait:hover:active{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fnxhupq:hover:active{border-right-color:GrayText;}.fyd6l6x:hover:active{border-left-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fx507ft:hover:active{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fb3rf2x:hover:active{color:GrayText;}}",{m:"(forced-colors: active)"}]]}),useRootFocusStyles=__styles({circular:{kdpuga:["fanj13w","f1gou5sz"],Bw81rd7:["f1gou5sz","fanj13w"],B6xbmo0:["fulf6x3","foeb2x"],dm238s:["foeb2x","fulf6x3"]},rounded:{},square:{kdpuga:["f1ndz5i7","f1co4qro"],Bw81rd7:["f1co4qro","f1ndz5i7"],B6xbmo0:["f146y5a9","f1k2ftg"],dm238s:["f1k2ftg","f146y5a9"]},primary:{B8q5s1w:"f17t0x8g",Bci5o5g:["f194v5ow","fk7jm04"],n8qw10:"f1qgg65p",Bdrgwmp:["fk7jm04","f194v5ow"],j6ew2k:["fhgccpy","fjo7pq6"],he4mth:"f32wu9k",Byr4aka:"fu5nqqq",lks7q5:["f13prjl2","f1nl83rv"],Bnan3qt:"f1czftr5",k1dn9:["f1nl83rv","f13prjl2"],Boium3a:["f12k37oa","fdnykm2"],tm8e47:"fr96u23"},small:{kdpuga:["fg3gtdo","fwii5mg"],Bw81rd7:["fwii5mg","fg3gtdo"],B6xbmo0:["f1palphq","f12nxie7"],dm238s:["f12nxie7","f1palphq"]},medium:{},large:{kdpuga:["ft3lys4","f1la4x2g"],Bw81rd7:["f1la4x2g","ft3lys4"],B6xbmo0:["f156y0zm","fakimq4"],dm238s:["fakimq4","f156y0zm"]}},{d:[".fanj13w[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusCircular);}",".f1gou5sz[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusCircular);}",".fulf6x3[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusCircular);}",".foeb2x[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusCircular);}",".f1ndz5i7[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusNone);}",".f1co4qro[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusNone);}",".f146y5a9[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusNone);}",".f1k2ftg[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusNone);}",".f17t0x8g[data-fui-focus-visible]{border-top-color:var(--colorStrokeFocus2);}",".f194v5ow[data-fui-focus-visible]{border-right-color:var(--colorStrokeFocus2);}",".fk7jm04[data-fui-focus-visible]{border-left-color:var(--colorStrokeFocus2);}",".f1qgg65p[data-fui-focus-visible]{border-bottom-color:var(--colorStrokeFocus2);}",".fhgccpy[data-fui-focus-visible]{box-shadow:var(--shadow2),0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset,0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;}",".fjo7pq6[data-fui-focus-visible]{box-shadow:var(--shadow2),0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset,0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;}",".f32wu9k[data-fui-focus-visible]:hover{box-shadow:var(--shadow2),0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset;}",".fu5nqqq[data-fui-focus-visible]:hover{border-top-color:var(--colorStrokeFocus2);}",".f13prjl2[data-fui-focus-visible]:hover{border-right-color:var(--colorStrokeFocus2);}",".f1nl83rv[data-fui-focus-visible]:hover{border-left-color:var(--colorStrokeFocus2);}",".f1czftr5[data-fui-focus-visible]:hover{border-bottom-color:var(--colorStrokeFocus2);}",".fg3gtdo[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusSmall);}",".fwii5mg[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusSmall);}",".f1palphq[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusSmall);}",".f12nxie7[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusSmall);}",".ft3lys4[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusLarge);}",".f1la4x2g[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusLarge);}",".f156y0zm[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusLarge);}",".fakimq4[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusLarge);}"],t:["@supports (-moz-appearance:button){.f12k37oa[data-fui-focus-visible]{box-shadow:var(--shadow2),0 0 0 calc(var(--strokeWidthThin) + 0.25px) var(--colorStrokeFocus2) inset,0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;}.fdnykm2[data-fui-focus-visible]{box-shadow:var(--shadow2),0 0 0 calc(var(--strokeWidthThin) + 0.25px) var(--colorStrokeFocus2) inset,0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;}}","@supports (-moz-appearance:button){.fr96u23[data-fui-focus-visible]:hover{box-shadow:var(--shadow2),0 0 0 calc(var(--strokeWidthThin) + 0.25px) var(--colorStrokeFocus2) inset;}}"]}),useRootIconOnlyStyles=__styles({small:{z8tnut:"f1sl3k7w",z189sj:["f136y8j8","f10xn8zz"],Byoj8tv:"f1brlhvm",uwmqm3:["f10xn8zz","f136y8j8"],Bf4jedk:"f17fgpbq",B2u0y6b:"f1jt17bm"},medium:{z8tnut:"f1sbtcvk",z189sj:["fwiuce9","f15vdbe4"],Byoj8tv:"fdghr9",uwmqm3:["f15vdbe4","fwiuce9"],Bf4jedk:"fwbmr0d",B2u0y6b:"f44c6la"},large:{z8tnut:"f1a1bwwz",z189sj:["f18k1jr3","f1rtp3s9"],Byoj8tv:"fy7v416",uwmqm3:["f1rtp3s9","f18k1jr3"],Bf4jedk:"f12clzc2",B2u0y6b:"fjy1crr"}},{d:[".f1sl3k7w{padding-top:1px;}",".f136y8j8{padding-right:1px;}",".f10xn8zz{padding-left:1px;}",".f1brlhvm{padding-bottom:1px;}",".f17fgpbq{min-width:24px;}",".f1jt17bm{max-width:24px;}",".f1sbtcvk{padding-top:5px;}",".fwiuce9{padding-right:5px;}",".f15vdbe4{padding-left:5px;}",".fdghr9{padding-bottom:5px;}",".fwbmr0d{min-width:32px;}",".f44c6la{max-width:32px;}",".f1a1bwwz{padding-top:7px;}",".f18k1jr3{padding-right:7px;}",".f1rtp3s9{padding-left:7px;}",".fy7v416{padding-bottom:7px;}",".f12clzc2{min-width:40px;}",".fjy1crr{max-width:40px;}"]}),useIconStyles$3=__styles({small:{Be2twd7:"fe5j1ua",Bqenvij:"fjamq6b",a9b677:"f64fuq3",Bqrlyyl:"fbaiahx"},medium:{},large:{Be2twd7:"f1rt2boy",Bqenvij:"frvgh55",a9b677:"fq4mcun",Bqrlyyl:"f1exjqw5"},before:{t21cq0:["f1nizpg2","f1a695kz"]},after:{Frg6f3:["f1a695kz","f1nizpg2"]}},{d:[".fe5j1ua{font-size:20px;}",".fjamq6b{height:20px;}",".f64fuq3{width:20px;}",".fbaiahx{--fui-Button__icon--spacing:var(--spacingHorizontalXS);}",".f1rt2boy{font-size:24px;}",".frvgh55{height:24px;}",".fq4mcun{width:24px;}",".f1exjqw5{--fui-Button__icon--spacing:var(--spacingHorizontalSNudge);}",".f1nizpg2{margin-right:var(--fui-Button__icon--spacing);}",".f1a695kz{margin-left:var(--fui-Button__icon--spacing);}"]}),useButtonStyles_unstable=eo=>{const to=useRootBaseClassName$1(),ro=useIconBaseClassName(),no=useRootStyles$5(),oo=useRootDisabledStyles(),io=useRootFocusStyles(),so=useRootIconOnlyStyles(),ao=useIconStyles$3(),{appearance:lo,disabled:uo,disabledFocusable:co,icon:fo,iconOnly:ho,iconPosition:po,shape:go,size:vo}=eo;return eo.root.className=mergeClasses(buttonClassNames.root,to,lo&&no[lo],no[vo],fo&&vo==="small"&&no.smallWithIcon,fo&&vo==="large"&&no.largeWithIcon,no[go],(uo||co)&&oo.base,(uo||co)&&oo.highContrast,lo&&(uo||co)&&oo[lo],lo==="primary"&&io.primary,io[vo],io[go],ho&&so[vo],eo.root.className),eo.icon&&(eo.icon.className=mergeClasses(buttonClassNames.icon,ro,!!eo.root.children&&ao[po],ao[vo],eo.icon.className)),eo},Button$2=reactExports.forwardRef((eo,to)=>{const ro=useButton_unstable(eo,to);return useButtonStyles_unstable(ro),useCustomStyleHook("useButtonStyles_unstable")(ro),renderButton_unstable(ro)});Button$2.displayName="Button";const FieldContext=reactExports.createContext(void 0);FieldContext.Provider;const useFieldContext_unstable=()=>reactExports.useContext(FieldContext);function useFieldControlProps_unstable(eo,to){return getFieldControlProps(useFieldContext_unstable(),eo,to)}function getFieldControlProps(eo,to,ro){if(!eo)return to;to={...to};const{generatedControlId:no,hintId:oo,labelFor:io,labelId:so,required:ao,validationMessageId:lo,validationState:uo}=eo;if(no){var co,fo;(fo=(co=to).id)!==null&&fo!==void 0||(co.id=no)}if(so&&(!(ro!=null&&ro.supportsLabelFor)||io!==to.id)){var ho,po,go;(go=(ho=to)[po="aria-labelledby"])!==null&&go!==void 0||(ho[po]=so)}if((lo||oo)&&(to["aria-describedby"]=[lo,oo,to==null?void 0:to["aria-describedby"]].filter(Boolean).join(" ")),uo==="error"){var vo,bo,xo;(xo=(vo=to)[bo="aria-invalid"])!==null&&xo!==void 0||(vo[bo]=!0)}if(ao)if(ro!=null&&ro.supportsRequired){var _o,Eo;(Eo=(_o=to).required)!==null&&Eo!==void 0||(_o.required=!0)}else{var So,To,wo;(wo=(So=to)[To="aria-required"])!==null&&wo!==void 0||(So[To]=!0)}if(ro!=null&&ro.supportsSize){var Co,Oo;(Oo=(Co=to).size)!==null&&Oo!==void 0||(Co.size=eo.size)}return to}const useLabel_unstable=(eo,to)=>{const{disabled:ro=!1,required:no=!1,weight:oo="regular",size:io="medium"}=eo;return{disabled:ro,required:optional(no===!0?"*":no||void 0,{defaultProps:{"aria-hidden":"true"},elementType:"span"}),weight:oo,size:io,components:{root:"label",required:"span"},root:always(getIntrinsicElementProps("label",{ref:to,...eo}),{elementType:"label"})}},renderLabel_unstable=eo=>jsxs(eo.root,{children:[eo.root.children,eo.required&&jsx$1(eo.required,{})]}),labelClassNames={root:"fui-Label",required:"fui-Label__required"},useStyles$w=__styles({root:{Bahqtrf:"fk6fouc",sj55zd:"f19n0e5"},disabled:{sj55zd:"f1s2aq7o"},required:{sj55zd:"f1whyuy6",uwmqm3:["fycuoez","f8wuabp"]},requiredDisabled:{sj55zd:"f1s2aq7o"},small:{Be2twd7:"fy9rknc",Bg96gwp:"fwrc4pm"},medium:{Be2twd7:"fkhj508",Bg96gwp:"f1i3iumi"},large:{Be2twd7:"fod5ikn",Bg96gwp:"faaz57k",Bhrd7zp:"fl43uef"},semibold:{Bhrd7zp:"fl43uef"}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".f19n0e5{color:var(--colorNeutralForeground1);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f1whyuy6{color:var(--colorPaletteRedForeground3);}",".fycuoez{padding-left:4px;}",".f8wuabp{padding-right:4px;}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fl43uef{font-weight:var(--fontWeightSemibold);}"]}),useLabelStyles_unstable=eo=>{const to=useStyles$w();return eo.root.className=mergeClasses(labelClassNames.root,to.root,eo.disabled&&to.disabled,to[eo.size],eo.weight==="semibold"&&to.semibold,eo.root.className),eo.required&&(eo.required.className=mergeClasses(labelClassNames.required,to.required,eo.disabled&&to.requiredDisabled,eo.required.className)),eo},Label=reactExports.forwardRef((eo,to)=>{const ro=useLabel_unstable(eo,to);return useLabelStyles_unstable(ro),useCustomStyleHook("useLabelStyles_unstable")(ro),renderLabel_unstable(ro)});Label.displayName="Label";const ComboboxContext=createContext({activeOption:void 0,appearance:"outline",focusVisible:!1,open:!1,registerOption(){return()=>{}},selectedOptions:[],selectOption(){},setActiveOption(){},setOpen(){},size:"medium"});ComboboxContext.Provider;const ListboxContext=createContext({activeOption:void 0,focusVisible:!1,multiselect:!1,registerOption(){return()=>{}},selectedOptions:[],selectOption(){},setActiveOption(){}});ListboxContext.Provider;function useComboboxContextValues(eo){const{activeOption:to,appearance:ro,focusVisible:no,open:oo,registerOption:io,selectedOptions:so,selectOption:ao,setActiveOption:lo,setOpen:uo,size:co}=eo;return{combobox:{activeOption:to,appearance:ro,focusVisible:no,open:oo,registerOption:io,selectedOptions:so,selectOption:ao,setActiveOption:lo,setOpen:uo,size:co}}}function useListboxContextValues(eo){const to=useHasParentContext(ComboboxContext),{activeOption:ro,focusVisible:no,multiselect:oo,registerOption:io,selectedOptions:so,selectOption:ao,setActiveOption:lo}=eo,uo=useContextSelector(ComboboxContext,ho=>ho.registerOption);return{listbox:{activeOption:ro,focusVisible:no,multiselect:oo,registerOption:to?uo:io,selectedOptions:so,selectOption:ao,setActiveOption:lo}}}function getDropdownActionFromKey(eo,to={}){const{open:ro=!0,multiselect:no=!1}=to,oo=eo.key,{altKey:io,ctrlKey:so,key:ao,metaKey:lo}=eo;return ao.length===1&&oo!==Space&&!io&&!so&&!lo?"Type":ro?oo===ArrowUp&&io||oo===Enter||!no&&oo===Space?"CloseSelect":no&&oo===Space?"Select":oo===Escape$1?"Close":oo===ArrowDown?"Next":oo===ArrowUp?"Previous":oo===Home?"First":oo===End?"Last":oo===PageUp?"PageUp":oo===PageDown?"PageDown":oo===Tab$2?"Tab":"None":oo===ArrowDown||oo===ArrowUp||oo===Enter||oo===Space?"Open":"None"}function getIndexFromAction(eo,to,ro){switch(eo){case"Next":return Math.min(ro,to+1);case"Previous":return Math.max(0,to-1);case"First":return 0;case"Last":return ro;case"PageDown":return Math.min(ro,to+10);case"PageUp":return Math.max(0,to-10);default:return to}}const useOptionCollection=()=>{const eo=reactExports.useRef([]),to=reactExports.useMemo(()=>({getCount:()=>eo.current.length,getOptionAtIndex:uo=>{var co;return(co=eo.current[uo])===null||co===void 0?void 0:co.option},getIndexOfId:uo=>eo.current.findIndex(co=>co.option.id===uo),getOptionById:uo=>{const co=eo.current.find(fo=>fo.option.id===uo);return co==null?void 0:co.option},getOptionsMatchingText:uo=>eo.current.filter(co=>uo(co.option.text)).map(co=>co.option),getOptionsMatchingValue:uo=>eo.current.filter(co=>uo(co.option.value)).map(co=>co.option)}),[]),ro=reactExports.useCallback((no,oo)=>{var io;const so=eo.current.findIndex(ao=>!ao.element||!oo?!1:ao.option.id===no.id?!0:ao.element.compareDocumentPosition(oo)&Node.DOCUMENT_POSITION_PRECEDING);if(((io=eo.current[so])===null||io===void 0?void 0:io.option.id)!==no.id){const ao={element:oo,option:no};so===-1?eo.current=[...eo.current,ao]:eo.current.splice(so,0,ao)}return()=>{eo.current=eo.current.filter(ao=>ao.option.id!==no.id)}},[]);return{...to,options:eo.current.map(no=>no.option),registerOption:ro}};function useScrollOptionsIntoView(eo){const{activeOption:to}=eo,ro=reactExports.useRef(null);return reactExports.useEffect(()=>{if(ro.current&&to&&canUseDOM$3()){const no=ro.current.querySelector(`#${to.id}`);if(!no)return;const{offsetHeight:oo,offsetTop:io}=no,{offsetHeight:so,scrollTop:ao}=ro.current,lo=ioao+so,co=2;lo?ro.current.scrollTo(0,io-co):uo&&ro.current.scrollTo(0,io-so+oo+co)}},[to]),ro}const useSelection=eo=>{const{defaultSelectedOptions:to,multiselect:ro,onOptionSelect:no}=eo,[oo,io]=useControllableState({state:eo.selectedOptions,defaultState:to,initialState:[]}),so=reactExports.useCallback((lo,uo)=>{if(uo.disabled)return;let co=[uo.value];if(ro){const fo=oo.findIndex(ho=>ho===uo.value);fo>-1?co=[...oo.slice(0,fo),...oo.slice(fo+1)]:co=[...oo,uo.value]}io(co),no==null||no(lo,{optionValue:uo.value,optionText:uo.text,selectedOptions:co})},[no,ro,oo,io]);return{clearSelection:lo=>{io([]),no==null||no(lo,{optionValue:void 0,optionText:void 0,selectedOptions:[]})},selectOption:so,selectedOptions:oo}},useListbox_unstable=(eo,to)=>{const{multiselect:ro}=eo,no=useOptionCollection(),{getCount:oo,getOptionAtIndex:io,getIndexOfId:so}=no,{clearSelection:ao,selectedOptions:lo,selectOption:uo}=useSelection(eo),[co,fo]=reactExports.useState(),[ho,po]=reactExports.useState(!1),go=Ao=>{const Ro=getDropdownActionFromKey(Ao,{open:!0}),No=oo()-1,Mo=co?so(co.id):-1;let Do=Mo;switch(Ro){case"Select":case"CloseSelect":co&&uo(Ao,co);break;default:Do=getIndexFromAction(Ro,Mo,No)}Do!==Mo&&(Ao.preventDefault(),fo(io(Do)),po(!0))},vo=Ao=>{po(!1)},bo=useHasParentContext(ComboboxContext),xo=useContextSelector(ComboboxContext,Ao=>Ao.activeOption),_o=useContextSelector(ComboboxContext,Ao=>Ao.focusVisible),Eo=useContextSelector(ComboboxContext,Ao=>Ao.selectedOptions),So=useContextSelector(ComboboxContext,Ao=>Ao.selectOption),To=useContextSelector(ComboboxContext,Ao=>Ao.setActiveOption),wo=bo?{activeOption:xo,focusVisible:_o,selectedOptions:Eo,selectOption:So,setActiveOption:To}:{activeOption:co,focusVisible:ho,selectedOptions:lo,selectOption:uo,setActiveOption:fo},Co={components:{root:"div"},root:always(getIntrinsicElementProps("div",{ref:to,role:ro?"menu":"listbox","aria-activedescendant":bo||co==null?void 0:co.id,"aria-multiselectable":ro,tabIndex:0,...eo}),{elementType:"div"}),multiselect:ro,clearSelection:ao,...no,...wo},Oo=useScrollOptionsIntoView(Co);return Co.root.ref=useMergedRefs$1(Co.root.ref,Oo),Co.root.onKeyDown=useEventCallback$3(mergeCallbacks(Co.root.onKeyDown,go)),Co.root.onMouseOver=useEventCallback$3(mergeCallbacks(Co.root.onMouseOver,vo)),Co},renderListbox_unstable=(eo,to)=>jsx$1(ListboxContext.Provider,{value:to.listbox,children:jsx$1(eo.root,{})}),listboxClassNames={root:"fui-Listbox"},useStyles$v=__styles({root:{De3pzq:"fxugw4r",B7ck84d:"f1ewtqcl",mc9l5x:"f22iagw",Beiy3e4:"f1vx9l62",Bf4jedk:"f3hsy1e",Bmxbyg5:"f5zp4f",Bpd4iqm:"fpvhumw",oeaueh:"f1yog68k",Bw0xxkn:"f13sgyd8",z8tnut:"f1x4af0m",z189sj:["f7x41pl","fruq291"],Byoj8tv:"fd55psn",uwmqm3:["fruq291","f7x41pl"],Belr9w4:"fiut8dr"}},{d:[".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f1ewtqcl{box-sizing:border-box;}",".f22iagw{display:flex;}",".f1vx9l62{flex-direction:column;}",".f3hsy1e{min-width:160px;}",".f5zp4f{overflow-y:auto;}",".fpvhumw{outline-width:1px;}",".f1yog68k{outline-style:solid;}",".f13sgyd8{outline-color:var(--colorTransparentStroke);}",".f1x4af0m{padding-top:var(--spacingHorizontalXS);}",".f7x41pl{padding-right:var(--spacingHorizontalXS);}",".fruq291{padding-left:var(--spacingHorizontalXS);}",".fd55psn{padding-bottom:var(--spacingHorizontalXS);}",".fiut8dr{row-gap:var(--spacingHorizontalXXS);}"]}),useListboxStyles_unstable=eo=>{const to=useStyles$v();return eo.root.className=mergeClasses(listboxClassNames.root,to.root,eo.root.className),eo},Listbox$1=reactExports.forwardRef((eo,to)=>{const ro=useListbox_unstable(eo,to),no=useListboxContextValues(ro);return useListboxStyles_unstable(ro),useCustomStyleHook("useListboxStyles_unstable")(ro),renderListbox_unstable(ro,no)});Listbox$1.displayName="Listbox";function getTextString(eo,to){if(eo!==void 0)return eo;let ro="",no=!1;return reactExports.Children.forEach(to,oo=>{typeof oo=="string"?ro+=oo:no=!0}),no&&console.warn("Provide a `text` prop to Option components when they contain non-string children."),ro}const useOption_unstable=(eo,to)=>{const{children:ro,disabled:no,text:oo,value:io}=eo,so=reactExports.useRef(null),ao=getTextString(oo,ro),lo=io??ao,uo=useId$1("fluent-option",eo.id),co=reactExports.useMemo(()=>({id:uo,disabled:no,text:ao,value:lo}),[uo,no,ao,lo]),fo=useContextSelector(ListboxContext,wo=>wo.focusVisible),ho=useContextSelector(ListboxContext,wo=>wo.multiselect),po=useContextSelector(ListboxContext,wo=>wo.registerOption),go=useContextSelector(ListboxContext,wo=>{const Co=wo.selectedOptions;return!!lo&&!!Co.find(Oo=>Oo===lo)}),vo=useContextSelector(ListboxContext,wo=>wo.selectOption),bo=useContextSelector(ListboxContext,wo=>wo.setActiveOption),xo=useContextSelector(ComboboxContext,wo=>wo.setOpen),_o=useContextSelector(ListboxContext,wo=>{var Co,Oo;return((Co=wo.activeOption)===null||Co===void 0?void 0:Co.id)!==void 0&&((Oo=wo.activeOption)===null||Oo===void 0?void 0:Oo.id)===uo});let Eo=reactExports.createElement(CheckmarkFilled,null);ho&&(Eo=go?reactExports.createElement(Checkmark12Filled,null):"");const So=wo=>{var Co;if(no){wo.preventDefault();return}bo(co),ho||xo==null||xo(wo,!1),vo(wo,co),(Co=eo.onClick)===null||Co===void 0||Co.call(eo,wo)};reactExports.useEffect(()=>{if(uo&&so.current)return po(co,so.current)},[uo,co,po]);const To=ho?{role:"menuitemcheckbox","aria-checked":go}:{role:"option","aria-selected":go};return{components:{root:"div",checkIcon:"span"},root:always(getIntrinsicElementProps("div",{ref:useMergedRefs$1(to,so),"aria-disabled":no?"true":void 0,id:uo,...To,...eo,onClick:So}),{elementType:"div"}),checkIcon:optional(eo.checkIcon,{renderByDefault:!0,defaultProps:{"aria-hidden":"true",children:Eo},elementType:"span"}),active:_o,disabled:no,focusVisible:fo,multiselect:ho,selected:go}},renderOption_unstable=eo=>jsxs(eo.root,{children:[eo.checkIcon&&jsx$1(eo.checkIcon,{}),eo.root.children]}),optionClassNames={root:"fui-Option",checkIcon:"fui-Option__checkIcon"},useStyles$u=__styles({root:{Bt984gj:"f122n59",Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],sj55zd:"f19n0e5",i8kkvl:"f1ufnopg",Bceei9c:"f1k6fduh",mc9l5x:"f22iagw",Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bg96gwp:"f1i3iumi",z8tnut:"fp2oml8",z189sj:["f1vdfbxk","f1f5gg8d"],Byoj8tv:"f1tdddsa",uwmqm3:["f1f5gg8d","f1vdfbxk"],qhf8xq:"f10pi13n",Jwef8y:"f1knas48",ecr2s2:"fb40n2d"},active:{Bsft5z2:"f13zj6fq",E3zdtr:"f1mdlcz9",B80jsxd:"f1nwj1ja",t2ki1e:"ffmd2fr",Bm2nyyq:"f8rth92",Barhvk9:["flthirb","ftkbnf5"],Bw17bha:"f1lh990p",vfts7:["ftkbnf5","flthirb"],xrcqlc:"fc9v8v1",Ihftqj:["f1mwfetb","f18mat8f"],Bcgy8vk:"f1cb6c3",Bhxzhr1:["f18mat8f","f1mwfetb"],B3778ie:["f1ibwz09","f1kp91vd"],d9w3h3:["f1kp91vd","f1ibwz09"],Bl18szs:["f1pix4dl","f13nd1z4"],B4j8arr:["f13nd1z4","f1pix4dl"],B0n5ga8:"f1qw5sz7",s924m2:["f19va7ni","f1a9v3mw"],B1q35kw:"fkkziue",Gp14am:["f1a9v3mw","f19va7ni"],bn5sak:"f1a97anr",By385i5:"f5226zp",Eqx8gd:["fa2bdqt","fei6g0k"],B1piin3:["fei6g0k","fa2bdqt"]},disabled:{sj55zd:"f1s2aq7o",Jwef8y:"f9ql6rf",ecr2s2:"fgj9um3",Bbusuzp:"f1dcs8yz"},selected:{},checkIcon:{Be2twd7:"fod5ikn",Frg6f3:["f18b9hdq","fn6qj8t"],t21cq0:["f1xk557c","f1h9en5y"],Bcdw1i0:"fd7fpy0",Bo70h7d:"fvc9v3g"},selectedCheck:{Bcdw1i0:"f1022m68"},multiselectCheck:{B4j52fo:"f192inf7",Bekrc4i:["f5tn483","f1ojsxk5"],Bn0qgzm:"f1vxd6vx",ibv6hh:["f1ojsxk5","f5tn483"],icvyot:"fzkkow9",vrafjx:["fcdblym","fjik90z"],oivjwe:"fg706s2",wvpqe5:["fjik90z","fcdblym"],g2u3we:"fq0vr37",h3c5rm:["f1byw159","f11cr0be"],B9xav0g:"f1c1zstj",zhjwy3:["f11cr0be","f1byw159"],Bbmb7ep:["f1g3puop","fi2rrw2"],Beyfa6y:["fi2rrw2","f1g3puop"],B7oj6ja:["f1rstyi9","f1s4nn1u"],Btl43ni:["f1s4nn1u","f1rstyi9"],B7ck84d:"f1ewtqcl",mc9l5x:"f22iagw",Bt984gj:"f122n59",Brf1p80:"f4d9j23",Bkfmm31:"f1w9h62z",Be2twd7:"f1ugzwwg",Bqenvij:"fd461yt",a9b677:"fjw5fx7",Bcdw1i0:"f1022m68"},selectedMultiselectCheck:{De3pzq:"ftywsgz",sj55zd:"fqpbvvt",g2u3we:"f3xi7mh",h3c5rm:["ftovhe4","f1wczvin"],B9xav0g:"f68vbr6",zhjwy3:["f1wczvin","ftovhe4"]},checkDisabled:{sj55zd:"f1s2aq7o",Bbusuzp:"f1dcs8yz"}},{d:[".f122n59{align-items:center;}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".f19n0e5{color:var(--colorNeutralForeground1);}",".f1ufnopg{column-gap:var(--spacingHorizontalXS);}",".f1k6fduh{cursor:pointer;}",".f22iagw{display:flex;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".fp2oml8{padding-top:var(--spacingVerticalSNudge);}",".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",".f1tdddsa{padding-bottom:var(--spacingVerticalSNudge);}",".f10pi13n{position:relative;}",'.f13zj6fq::after{content:"";}',".f1mdlcz9::after{position:absolute;}",".f1nwj1ja::after{pointer-events:none;}",".ffmd2fr::after{z-index:1;}",".f8rth92::after{border-top-style:solid;}",".flthirb::after{border-right-style:solid;}",".ftkbnf5::after{border-left-style:solid;}",".f1lh990p::after{border-bottom-style:solid;}",".fc9v8v1::after{border-top-width:2px;}",".f1mwfetb::after{border-right-width:2px;}",".f18mat8f::after{border-left-width:2px;}",".f1cb6c3::after{border-bottom-width:2px;}",".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}",".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1pix4dl::after{border-top-right-radius:var(--borderRadiusMedium);}",".f13nd1z4::after{border-top-left-radius:var(--borderRadiusMedium);}",".f1qw5sz7::after{border-top-color:var(--colorStrokeFocus2);}",".f19va7ni::after{border-right-color:var(--colorStrokeFocus2);}",".f1a9v3mw::after{border-left-color:var(--colorStrokeFocus2);}",".fkkziue::after{border-bottom-color:var(--colorStrokeFocus2);}",".f1a97anr::after{top:-2px;}",".f5226zp::after{bottom:-2px;}",".fa2bdqt::after{left:-2px;}",".fei6g0k::after{right:-2px;}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".f18b9hdq{margin-left:calc(var(--spacingHorizontalXXS) * -1);}",".fn6qj8t{margin-right:calc(var(--spacingHorizontalXXS) * -1);}",".f1xk557c{margin-right:var(--spacingHorizontalXXS);}",".f1h9en5y{margin-left:var(--spacingHorizontalXXS);}",".fd7fpy0{visibility:hidden;}",".fvc9v3g svg{display:block;}",".f1022m68{visibility:visible;}",".f192inf7{border-top-width:var(--strokeWidthThin);}",".f5tn483{border-right-width:var(--strokeWidthThin);}",".f1ojsxk5{border-left-width:var(--strokeWidthThin);}",".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}",".fzkkow9{border-top-style:solid;}",".fcdblym{border-right-style:solid;}",".fjik90z{border-left-style:solid;}",".fg706s2{border-bottom-style:solid;}",".fq0vr37{border-top-color:var(--colorNeutralStrokeAccessible);}",".f1byw159{border-right-color:var(--colorNeutralStrokeAccessible);}",".f11cr0be{border-left-color:var(--colorNeutralStrokeAccessible);}",".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}",".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}",".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}",".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}",".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}",".f1ewtqcl{box-sizing:border-box;}",".f4d9j23{justify-content:center;}",".f1w9h62z{fill:currentColor;}",".f1ugzwwg{font-size:12px;}",".fd461yt{height:16px;}",".fjw5fx7{width:16px;}",".ftywsgz{background-color:var(--colorCompoundBrandBackground);}",".fqpbvvt{color:var(--colorNeutralForegroundInverted);}",".f3xi7mh{border-top-color:var(--colorCompoundBrandBackground);}",".ftovhe4{border-right-color:var(--colorCompoundBrandBackground);}",".f1wczvin{border-left-color:var(--colorCompoundBrandBackground);}",".f68vbr6{border-bottom-color:var(--colorCompoundBrandBackground);}"],h:[".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}",".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}"],a:[".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}",".fgj9um3:active{background-color:var(--colorTransparentBackground);}"],m:[["@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}",{m:"(forced-colors: active)"}]]}),useOptionStyles_unstable=eo=>{const{active:to,disabled:ro,focusVisible:no,multiselect:oo,selected:io}=eo,so=useStyles$u();return eo.root.className=mergeClasses(optionClassNames.root,so.root,to&&no&&so.active,ro&&so.disabled,io&&so.selected,eo.root.className),eo.checkIcon&&(eo.checkIcon.className=mergeClasses(optionClassNames.checkIcon,so.checkIcon,oo&&so.multiselectCheck,io&&so.selectedCheck,io&&oo&&so.selectedMultiselectCheck,ro&&so.checkDisabled,eo.checkIcon.className)),eo},Option$3=reactExports.forwardRef((eo,to)=>{const ro=useOption_unstable(eo,to);return useOptionStyles_unstable(ro),useCustomStyleHook("useOptionStyles_unstable")(ro),renderOption_unstable(ro)});Option$3.displayName="Option";const useComboboxBaseState=eo=>{const{appearance:to="outline",children:ro,editable:no=!1,inlinePopup:oo=!1,mountNode:io=void 0,multiselect:so,onOpenChange:ao,size:lo="medium"}=eo,uo=useOptionCollection(),{getOptionAtIndex:co,getOptionsMatchingValue:fo}=uo,[ho,po]=reactExports.useState(),[go,vo]=reactExports.useState(!1),[bo,xo]=reactExports.useState(!1),_o=reactExports.useRef(!1),Eo=useSelection(eo),{selectedOptions:So}=Eo,To=useFirstMount(),[wo,Co]=useControllableState({state:eo.value,initialState:void 0}),Oo=reactExports.useMemo(()=>{if(wo!==void 0)return wo;if(To&&eo.defaultValue!==void 0)return eo.defaultValue;const Mo=fo(Do=>So.includes(Do)).map(Do=>Do.text);return so?no?"":Mo.join(", "):Mo[0]},[wo,no,fo,so,eo.defaultValue,So]),[Ao,Ro]=useControllableState({state:eo.open,defaultState:eo.defaultOpen,initialState:!1}),No=reactExports.useCallback((Mo,Do)=>{ao==null||ao(Mo,{open:Do}),Ro(Do)},[ao,Ro]);return reactExports.useEffect(()=>{if(Ao&&!ho)if(!so&&So.length>0){const Mo=fo(Do=>Do===So[0]).pop();Mo&&po(Mo)}else po(co(0));else Ao||po(void 0)},[Ao,ro]),{...uo,...Eo,activeOption:ho,appearance:to,focusVisible:go,hasFocus:bo,ignoreNextBlur:_o,inlinePopup:oo,mountNode:io,open:Ao,setActiveOption:po,setFocusVisible:vo,setHasFocus:xo,setOpen:No,setValue:Co,size:lo,value:Oo,multiselect:so}};function useComboboxPositioning(eo){const{positioning:to}=eo,no={position:"below",align:"start",offset:{crossAxis:0,mainAxis:2},fallbackPositions:["above","after","after-top","before","before-top"],matchTargetSize:"width",...resolvePositioningShorthand(to)},{targetRef:oo,containerRef:io}=usePositioning(no);return[io,oo]}function useListboxSlot(eo,to,ro){const{state:{multiselect:no},triggerRef:oo,defaultProps:io}=ro,so=useId$1("fluent-listbox",isResolvedShorthand(eo)?eo.id:void 0),ao=optional(eo,{renderByDefault:!0,elementType:Listbox$1,defaultProps:{id:so,multiselect:no,tabIndex:void 0,...io}}),lo=useEventCallback$3(mergeCallbacks(fo=>{fo.preventDefault()},ao==null?void 0:ao.onMouseDown)),uo=useEventCallback$3(mergeCallbacks(fo=>{var ho;fo.preventDefault(),(ho=oo.current)===null||ho===void 0||ho.focus()},ao==null?void 0:ao.onClick)),co=useMergedRefs$1(ao==null?void 0:ao.ref,to);return ao&&(ao.ref=co,ao.onMouseDown=lo,ao.onClick=uo),ao}function useTriggerSlot(eo,to,ro){const{state:{activeOption:no,getCount:oo,getIndexOfId:io,getOptionAtIndex:so,open:ao,selectOption:lo,setActiveOption:uo,setFocusVisible:co,setOpen:fo,multiselect:ho},defaultProps:po,elementType:go}=ro,vo=always(eo,{defaultProps:{type:"text","aria-expanded":ao,"aria-activedescendant":ao?no==null?void 0:no.id:void 0,role:"combobox",...typeof po=="object"&&po},elementType:go}),bo=reactExports.useRef(null);return vo.ref=useMergedRefs$1(bo,vo.ref,to),vo.onBlur=mergeCallbacks(xo=>{fo(xo,!1)},vo.onBlur),vo.onClick=mergeCallbacks(xo=>{fo(xo,!ao)},vo.onClick),vo.onKeyDown=mergeCallbacks(xo=>{const _o=getDropdownActionFromKey(xo,{open:ao,multiselect:ho}),Eo=oo()-1,So=no?io(no.id):-1;let To=So;switch(_o){case"Open":xo.preventDefault(),co(!0),fo(xo,!0);break;case"Close":xo.stopPropagation(),xo.preventDefault(),fo(xo,!1);break;case"CloseSelect":!ho&&!(no!=null&&no.disabled)&&fo(xo,!1);case"Select":no&&lo(xo,no),xo.preventDefault();break;case"Tab":!ho&&no&&lo(xo,no);break;default:To=getIndexFromAction(_o,So,Eo)}To!==So&&(xo.preventDefault(),uo(so(To)),co(!0))},vo.onKeyDown),vo.onMouseOver=mergeCallbacks(xo=>{co(!1)},vo.onMouseOver),vo}function useInputTriggerSlot(eo,to,ro){const{state:{open:no,value:oo,activeOption:io,selectOption:so,setValue:ao,setActiveOption:lo,setFocusVisible:uo,multiselect:co,selectedOptions:fo,clearSelection:ho,getOptionsMatchingText:po,getIndexOfId:go,setOpen:vo},freeform:bo,defaultProps:xo}=ro,_o=No=>{!no&&!bo&&(oo&&io&&oo.trim().toLowerCase()===(io==null?void 0:io.text.toLowerCase())&&so(No,io),ao(void 0))},Eo=No=>{const Mo=No==null?void 0:No.trim().toLowerCase();if(!Mo||Mo.length===0)return;const jo=po($o=>$o.toLowerCase().indexOf(Mo)===0);if(jo.length>1&&io){const $o=go(io.id),Lo=jo.find(Ho=>go(Ho.id)>=$o);return Lo??jo[0]}var Fo;return(Fo=jo[0])!==null&&Fo!==void 0?Fo:void 0},So=No=>{const Mo=No.target.value;ao(Mo);const Do=Eo(Mo);lo(Do),uo(!0),!co&&fo.length===1&&(Mo.length<1||!Do)&&ho(No)},To=useTriggerSlot(eo,to,{state:ro.state,defaultProps:xo,elementType:"input"});To.onChange=mergeCallbacks(To.onChange,So),To.onBlur=mergeCallbacks(To.onBlur,_o);const[wo,Co]=reactExports.useState(!1),Oo=reactExports.useRef(!1),Ao=To.onKeyDown,Ro=useEventCallback$3(No=>{!no&&getDropdownActionFromKey(No)==="Type"&&vo(No,!0),No.key===ArrowLeft||No.key===ArrowRight?Co(!0):Co(!1);const Mo=getDropdownActionFromKey(No,{open:no,multiselect:co});if(Mo==="Type"?Oo.current=!0:(Mo==="Open"&&No.key!==" "||Mo==="Next"||Mo==="Previous"||Mo==="First"||Mo==="Last"||Mo==="PageUp"||Mo==="PageDown")&&(Oo.current=!1),bo&&(Oo.current||!no)&&No.key===" "){var Do;eo==null||(Do=eo.onKeyDown)===null||Do===void 0||Do.call(eo,No);return}Ao==null||Ao(No)});return To.onKeyDown=Ro,wo&&(To["aria-activedescendant"]=void 0),To}const useCombobox_unstable=(eo,to)=>{eo=useFieldControlProps_unstable(eo,{supportsLabelFor:!0,supportsRequired:!0,supportsSize:!0});const ro=useComboboxBaseState({...eo,editable:!0}),{open:no,selectOption:oo,setOpen:io,setValue:so,value:ao}=ro,[lo,uo]=useComboboxPositioning(eo),{disabled:co,freeform:fo,inlinePopup:ho}=eo,po=useId$1("combobox-"),{primary:go,root:vo}=getPartitionedNativeProps({props:eo,primarySlotTagName:"input",excludedPropNames:["children","size"]});ro.selectOption=(Ao,Ro)=>{so(void 0),oo(Ao,Ro)},ro.setOpen=(Ao,Ro)=>{co||(!Ro&&!fo&&so(void 0),io(Ao,Ro))};const bo=reactExports.useRef(null),xo=useListboxSlot(eo.listbox,lo,{state:ro,triggerRef:bo,defaultProps:{children:eo.children}});var _o;const Eo=useInputTriggerSlot((_o=eo.input)!==null&&_o!==void 0?_o:{},useMergedRefs$1(bo,to),{state:ro,freeform:fo,defaultProps:{type:"text",value:ao??"",...go}}),So=always(eo.root,{defaultProps:{"aria-owns":!ho&&no?xo==null?void 0:xo.id:void 0,...vo},elementType:"div"});So.ref=useMergedRefs$1(So.ref,uo);const To={components:{root:"div",input:"input",expandIcon:"span",listbox:Listbox$1},root:So,input:Eo,listbox:no?xo:void 0,expandIcon:optional(eo.expandIcon,{renderByDefault:!0,defaultProps:{"aria-expanded":no,children:reactExports.createElement(ChevronDownRegular,null),role:"button"},elementType:"span"}),...ro},{onMouseDown:wo}=To.expandIcon||{},Co=useEventCallback$3(mergeCallbacks(wo,Ao=>{var Ro;Ao.preventDefault(),To.setOpen(Ao,!To.open),(Ro=bo.current)===null||Ro===void 0||Ro.focus()}));if(To.expandIcon){To.expandIcon.onMouseDown=Co;const Ao=To.expandIcon["aria-label"]||To.expandIcon["aria-labelledby"],Ro="Open";if(!Ao)if(eo["aria-labelledby"]){var Oo;const No=(Oo=To.expandIcon.id)!==null&&Oo!==void 0?Oo:`${po}-chevron`,Mo=`${No} ${To.input["aria-labelledby"]}`;To.expandIcon["aria-label"]=Ro,To.expandIcon.id=No,To.expandIcon["aria-labelledby"]=Mo}else eo["aria-label"]?To.expandIcon["aria-label"]=`${Ro} ${eo["aria-label"]}`:To.expandIcon["aria-label"]=Ro}return To},renderCombobox_unstable=(eo,to)=>jsx$1(eo.root,{children:jsxs(ComboboxContext.Provider,{value:to.combobox,children:[jsx$1(eo.input,{}),eo.expandIcon&&jsx$1(eo.expandIcon,{}),eo.listbox&&(eo.inlinePopup?jsx$1(eo.listbox,{}):jsx$1(Portal$1,{mountNode:eo.mountNode,children:jsx$1(eo.listbox,{})}))]})}),comboboxClassNames={root:"fui-Combobox",input:"fui-Combobox__input",expandIcon:"fui-Combobox__expandIcon",listbox:"fui-Combobox__listbox"},useStyles$t=__styles({root:{Bt984gj:"f122n59",Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],B7ck84d:"f1ewtqcl",i8kkvl:"f14mj54c",mc9l5x:"fwk3njj",Budl1dq:"fz17x9o",Brf1p80:"f1869bpl",Bf4jedk:"f1exfvgq",qhf8xq:"f10pi13n",Bbr2w1p:"f14a1fxs",Bduesf4:"f3e99gv",Bpq79vn:"fhljsf7",li1rpt:"f1gw3sf2",Bsft5z2:"f13zj6fq",E3zdtr:"f1mdlcz9",Eqx8gd:["f1a7op3","f1cjjd47"],By385i5:"f1gboi2j",B1piin3:["f1cjjd47","f1a7op3"],Dlnsje:"f145g4dw",d9w3h3:["f1kp91vd","f1ibwz09"],B3778ie:["f1ibwz09","f1kp91vd"],Bcgy8vk:"f14pi962",Bw17bha:"f1lh990p",B1q35kw:"f1jc6hxc",Gjdm7m:"f13evtba",b1kco5:"f1yk9hq",Ba2ppi3:"fhwpy7i",F2fol1:"f14ee0xe",lck23g:"f1xhbsuh",df92cz:"fv8e3ye",I188md:"ftb5wc6",umuwi5:"fjw5xc1",Blcqepd:"f1xdyd5c",nplu4u:"fatpbeo",Bioka5o:"fb7uyps",H713fs:"f1cmft4k",B9ooomg:"f1x58t8o",Bercvud:"f1ibeo51"},listbox:{E5pizo:"f1hg901r",Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],Bxyxcbc:"fmmk62d",B7ck84d:"f1ewtqcl"},listboxCollapsed:{mc9l5x:"fjseox"},small:{z189sj:["fdw0yi8","fk8j09s"]},medium:{z189sj:["f11gcy0p","f1ng84yb"]},large:{i8kkvl:"f1rjii52",z189sj:["fw5db7e","f1uw59to"]},outline:{De3pzq:"fxugw4r",B4j52fo:"f192inf7",Bekrc4i:["f5tn483","f1ojsxk5"],Bn0qgzm:"f1vxd6vx",ibv6hh:["f1ojsxk5","f5tn483"],icvyot:"fzkkow9",vrafjx:["fcdblym","fjik90z"],oivjwe:"fg706s2",wvpqe5:["fjik90z","fcdblym"],g2u3we:"fj3muxo",h3c5rm:["f1akhkt","f1lxtadh"],B9xav0g:"f1c1zstj",zhjwy3:["f1lxtadh","f1akhkt"]},outlineInteractive:{Bgoe8wy:"fvcxoqz",Bwzppfd:["f1ub3y4t","f1m52nbi"],oetu4i:"flmw63s",gg5e9n:["f1m52nbi","f1ub3y4t"],B6oc9vd:"fvs00aa",ak43y8:["f1assf6x","f4ruux4"],wmxk5l:"fqhmt4z",B50zh58:["f4ruux4","f1assf6x"]},underline:{De3pzq:"f1c21dwh",Bn0qgzm:"f1vxd6vx",oivjwe:"fg706s2",B9xav0g:"f1c1zstj",Bbmb7ep:["f1krrbdw","f1deotkl"],Beyfa6y:["f1deotkl","f1krrbdw"],B7oj6ja:["f10ostut","f1ozlkrg"],Btl43ni:["f1ozlkrg","f10ostut"]},"filled-lighter":{De3pzq:"fxugw4r",B4j52fo:"f192inf7",Bekrc4i:["f5tn483","f1ojsxk5"],Bn0qgzm:"f1vxd6vx",ibv6hh:["f1ojsxk5","f5tn483"],icvyot:"fzkkow9",vrafjx:["fcdblym","fjik90z"],oivjwe:"fg706s2",wvpqe5:["fjik90z","fcdblym"],g2u3we:"fghlq4f",h3c5rm:["f1gn591s","fjscplz"],B9xav0g:"fb073pr",zhjwy3:["fjscplz","f1gn591s"]},"filled-darker":{De3pzq:"f16xq7d1",B4j52fo:"f192inf7",Bekrc4i:["f5tn483","f1ojsxk5"],Bn0qgzm:"f1vxd6vx",ibv6hh:["f1ojsxk5","f5tn483"],icvyot:"fzkkow9",vrafjx:["fcdblym","fjik90z"],oivjwe:"fg706s2",wvpqe5:["fjik90z","fcdblym"],g2u3we:"fghlq4f",h3c5rm:["f1gn591s","fjscplz"],B9xav0g:"fb073pr",zhjwy3:["fjscplz","f1gn591s"]},invalid:{tvckwq:"fs4k3qj",gk2u95:["fcee079","fmyw78r"],hhx65j:"f1fgmyf4",Bxowmz0:["fmyw78r","fcee079"]},invalidUnderline:{hhx65j:"f1fgmyf4"},disabled:{Bceei9c:"fdrzuqr",De3pzq:"f1c21dwh",g2u3we:"f1jj8ep1",h3c5rm:["f15xbau","fy0fskl"],B9xav0g:"f4ikngz",zhjwy3:["fy0fskl","f15xbau"],Bjwas2f:"fg455y9",Bn1d65q:["f1rvyvqg","f14g86mu"],Bxeuatn:"f1cwzwz",n51gp8:["f14g86mu","f1rvyvqg"]}},{d:[".f122n59{align-items:center;}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".f1ewtqcl{box-sizing:border-box;}",".f14mj54c{column-gap:var(--spacingHorizontalXXS);}",".fwk3njj{display:inline-grid;}",".fz17x9o{grid-template-columns:1fr auto;}",".f1869bpl{justify-content:space-between;}",".f1exfvgq{min-width:250px;}",".f10pi13n{position:relative;}",".f1gw3sf2::after{box-sizing:border-box;}",'.f13zj6fq::after{content:"";}',".f1mdlcz9::after{position:absolute;}",".f1a7op3::after{left:-1px;}",".f1cjjd47::after{right:-1px;}",".f1gboi2j::after{bottom:-1px;}",".f145g4dw::after{height:max(2px, var(--borderRadiusMedium));}",".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}",".f14pi962::after{border-bottom-width:var(--strokeWidthThick);}",".f1lh990p::after{border-bottom-style:solid;}",".f1jc6hxc::after{border-bottom-color:var(--colorCompoundBrandStroke);}",".f13evtba::after{clip-path:inset(calc(100% - 2px) 0 0 0);}",".f1yk9hq::after{transform:scaleX(0);}",".fhwpy7i::after{transition-property:transform;}",".f14ee0xe::after{transition-duration:var(--durationUltraFast);}",".f1xhbsuh::after{transition-delay:var(--curveAccelerateMid);}",".f1hg901r{box-shadow:var(--shadow16);}",".fmmk62d{max-height:80vh;}",".fjseox{display:none;}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}",".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}",".f1rjii52{column-gap:var(--spacingHorizontalSNudge);}",".fw5db7e{padding-right:var(--spacingHorizontalM);}",".f1uw59to{padding-left:var(--spacingHorizontalM);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f192inf7{border-top-width:var(--strokeWidthThin);}",".f5tn483{border-right-width:var(--strokeWidthThin);}",".f1ojsxk5{border-left-width:var(--strokeWidthThin);}",".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}",".fzkkow9{border-top-style:solid;}",".fcdblym{border-right-style:solid;}",".fjik90z{border-left-style:solid;}",".fg706s2{border-bottom-style:solid;}",".fj3muxo{border-top-color:var(--colorNeutralStroke1);}",".f1akhkt{border-right-color:var(--colorNeutralStroke1);}",".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}",".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f1krrbdw{border-bottom-right-radius:0;}",".f1deotkl{border-bottom-left-radius:0;}",".f10ostut{border-top-right-radius:0;}",".f1ozlkrg{border-top-left-radius:0;}",".fghlq4f{border-top-color:var(--colorTransparentStroke);}",".f1gn591s{border-right-color:var(--colorTransparentStroke);}",".fjscplz{border-left-color:var(--colorTransparentStroke);}",".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",".f16xq7d1{background-color:var(--colorNeutralBackground3);}",".fs4k3qj:not(:focus-within),.fs4k3qj:hover:not(:focus-within){border-top-color:var(--colorPaletteRedBorder2);}",".fcee079:not(:focus-within),.fcee079:hover:not(:focus-within){border-right-color:var(--colorPaletteRedBorder2);}",".fmyw78r:not(:focus-within),.fmyw78r:hover:not(:focus-within){border-left-color:var(--colorPaletteRedBorder2);}",".f1fgmyf4:not(:focus-within),.f1fgmyf4:hover:not(:focus-within){border-bottom-color:var(--colorPaletteRedBorder2);}",".fdrzuqr{cursor:not-allowed;}",".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}",".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}",".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}",".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}"],w:[".f14a1fxs:focus-within{outline-width:2px;}",".f3e99gv:focus-within{outline-style:solid;}",".fhljsf7:focus-within{outline-color:transparent;}",".fjw5xc1:focus-within::after{transform:scaleX(1);}",".f1xdyd5c:focus-within::after{transition-property:transform;}",".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}",".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}",".f1ibeo51:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}"],m:[["@media screen and (prefers-reduced-motion: reduce){.fv8e3ye::after{transition-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.ftb5wc6::after{transition-delay:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.f1cmft4k:focus-within::after{transition-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.f1x58t8o:focus-within::after{transition-delay:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}]],h:[".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}",".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}",".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}",".flmw63s:hover{border-bottom-color:var(--colorNeutralStrokeAccessible);}"],a:[".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}",".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}",".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}",".fqhmt4z:active{border-bottom-color:var(--colorNeutralStrokeAccessible);}"]}),useInputStyles$1=__styles({input:{De3pzq:"f1c21dwh",B4j52fo:"fre7gi1",Bekrc4i:["f1358rze","f1rvrf73"],Bn0qgzm:"fqdk4by",ibv6hh:["f1rvrf73","f1358rze"],sj55zd:"f19n0e5",Bahqtrf:"fk6fouc",Brovlpu:"ftqa4ok",yvdlaj:"fwyc1cq",B3o7kgh:"f13ta7ih"},small:{Bqenvij:"f50nw0v",Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm",z8tnut:"f1g0x7ka",z189sj:["fhxju0i","f1cnd47f"],Byoj8tv:"f1qch9an",uwmqm3:["f1xile11","fqznh8f"]},medium:{Bqenvij:"f1tvdnth",Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi",z8tnut:"f1g0x7ka",z189sj:["fhxju0i","f1cnd47f"],Byoj8tv:"f1qch9an",uwmqm3:["f1e60jzv","f135dnwl"]},large:{Bqenvij:"f1ihhdec",Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k",z8tnut:"f1g0x7ka",z189sj:["fhxju0i","f1cnd47f"],Byoj8tv:"f1qch9an",uwmqm3:["fnphzt9","flt1dlf"]},disabled:{sj55zd:"f1s2aq7o",De3pzq:"f1c21dwh",Bceei9c:"fdrzuqr",yvdlaj:"fahhnxm"}},{d:[".f1c21dwh{background-color:var(--colorTransparentBackground);}",".fre7gi1{border-top-width:0;}",".f1358rze{border-right-width:0;}",".f1rvrf73{border-left-width:0;}",".fqdk4by{border-bottom-width:0;}",".f19n0e5{color:var(--colorNeutralForeground1);}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fwyc1cq::-webkit-input-placeholder{color:var(--colorNeutralForeground4);}",".fwyc1cq::-moz-placeholder{color:var(--colorNeutralForeground4);}",".f13ta7ih::-webkit-input-placeholder{opacity:1;}",".f13ta7ih::-moz-placeholder{opacity:1;}",".f50nw0v{height:22px;}",".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f1g0x7ka{padding-top:0;}",".fhxju0i{padding-right:0;}",".f1cnd47f{padding-left:0;}",".f1qch9an{padding-bottom:0;}",".f1xile11{padding-left:calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}",".fqznh8f{padding-right:calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}",".f1tvdnth{height:30px;}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".f1e60jzv{padding-left:calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));}",".f135dnwl{padding-right:calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));}",".f1ihhdec{height:38px;}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fnphzt9{padding-left:calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}",".flt1dlf{padding-right:calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}",".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}",".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"],f:[".ftqa4ok:focus{outline-style:none;}"]}),useIconStyles$2=__styles({icon:{B7ck84d:"f1ewtqcl",sj55zd:"fxkbij4",Bceei9c:"f1k6fduh",mc9l5x:"ftgm304",Be2twd7:"f1pp30po",Bo70h7d:"fvc9v3g"},small:{Be2twd7:"f4ybsrx",Frg6f3:["f1h9en5y","f1xk557c"]},medium:{Be2twd7:"fe5j1ua",Frg6f3:["f1h9en5y","f1xk557c"]},large:{Be2twd7:"f1rt2boy",Frg6f3:["f1t5qyk5","f1ikr372"]},disabled:{sj55zd:"f1s2aq7o",Bceei9c:"fdrzuqr"}},{d:[".f1ewtqcl{box-sizing:border-box;}",".fxkbij4{color:var(--colorNeutralStrokeAccessible);}",".f1k6fduh{cursor:pointer;}",".ftgm304{display:block;}",".f1pp30po{font-size:var(--fontSizeBase500);}",".fvc9v3g svg{display:block;}",".f4ybsrx{font-size:16px;}",".f1h9en5y{margin-left:var(--spacingHorizontalXXS);}",".f1xk557c{margin-right:var(--spacingHorizontalXXS);}",".fe5j1ua{font-size:20px;}",".f1rt2boy{font-size:24px;}",".f1t5qyk5{margin-left:var(--spacingHorizontalSNudge);}",".f1ikr372{margin-right:var(--spacingHorizontalSNudge);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}"]}),useComboboxStyles_unstable=eo=>{const{appearance:to,open:ro,size:no}=eo,oo=`${eo.input["aria-invalid"]}`=="true",io=eo.input.disabled,so=useStyles$t(),ao=useIconStyles$2(),lo=useInputStyles$1();return eo.root.className=mergeClasses(comboboxClassNames.root,so.root,so[to],so[no],!io&&to==="outline"&&so.outlineInteractive,oo&&to!=="underline"&&so.invalid,oo&&to==="underline"&&so.invalidUnderline,io&&so.disabled,eo.root.className),eo.input.className=mergeClasses(comboboxClassNames.input,lo.input,lo[no],io&&lo.disabled,eo.input.className),eo.listbox&&(eo.listbox.className=mergeClasses(comboboxClassNames.listbox,so.listbox,!ro&&so.listboxCollapsed,eo.listbox.className)),eo.expandIcon&&(eo.expandIcon.className=mergeClasses(comboboxClassNames.expandIcon,ao.icon,ao[no],io&&ao.disabled,eo.expandIcon.className)),eo},Combobox=reactExports.forwardRef((eo,to)=>{const ro=useCombobox_unstable(eo,to),no=useComboboxContextValues(ro);return useComboboxStyles_unstable(ro),useCustomStyleHook("useComboboxStyles_unstable")(ro),renderCombobox_unstable(ro,no)});Combobox.displayName="Combobox";const useOptionGroup_unstable=(eo,to)=>{const ro=useId$1("group-label"),{label:no}=eo;return{components:{root:"div",label:"span"},root:always(getIntrinsicElementProps("div",{ref:to,role:"group","aria-labelledby":no?ro:void 0,...eo}),{elementType:"div"}),label:optional(no,{defaultProps:{id:ro,role:"presentation"},elementType:"span"})}},renderOptionGroup_unstable=eo=>jsxs(eo.root,{children:[eo.label&&jsx$1(eo.label,{children:eo.label.children}),eo.root.children]}),optionGroupClassNames={root:"fui-OptionGroup",label:"fui-OptionGroup__label"},useStyles$s=__styles({root:{mc9l5x:"f22iagw",Beiy3e4:"f1vx9l62",Belr9w4:"fiut8dr",B8lkq7l:"f1xxzjds",Gwp8xu:"fu19d3i",H93o2g:"flylvvz",eii1in:"f1ug5m11",om0q45:"f5642y",Hl9o3s:"ffdf81h",Bi9x0x4:"flgyru6",B0i58d9:["f1fjgumo","f1sgo0dv"],sl1c2c:"fwsdxdw",z4hxbw:["f1sgo0dv","f1fjgumo"]},label:{Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],sj55zd:"f11d4kpn",mc9l5x:"ftgm304",Be2twd7:"fy9rknc",Bhrd7zp:"fl43uef",Bg96gwp:"fwrc4pm",z8tnut:"f17mpqex",z189sj:["fdw0yi8","fk8j09s"],Byoj8tv:"fdvome7",uwmqm3:["fk8j09s","fdw0yi8"]}},{d:[".f22iagw{display:flex;}",".f1vx9l62{flex-direction:column;}",".fiut8dr{row-gap:var(--spacingHorizontalXXS);}",'.f1xxzjds:not(:last-child)::after{content:"";}',".fu19d3i:not(:last-child)::after{border-bottom-width:var(--strokeWidthThin);}",".flylvvz:not(:last-child)::after{border-bottom-style:solid;}",".f1ug5m11:not(:last-child)::after{border-bottom-color:var(--colorNeutralStroke2);}",".f5642y:not(:last-child)::after{display:block;}",".ffdf81h:not(:last-child)::after{padding-bottom:var(--spacingHorizontalXS);}",".flgyru6:not(:last-child)::after{margin-top:0;}",".f1fjgumo:not(:last-child)::after{margin-right:calc(var(--spacingHorizontalXS) * -1);}",".f1sgo0dv:not(:last-child)::after{margin-left:calc(var(--spacingHorizontalXS) * -1);}",".fwsdxdw:not(:last-child)::after{margin-bottom:var(--spacingVerticalXS);}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".f11d4kpn{color:var(--colorNeutralForeground3);}",".ftgm304{display:block;}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f17mpqex{padding-top:var(--spacingHorizontalS);}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".fdvome7{padding-bottom:var(--spacingHorizontalS);}"]}),useOptionGroupStyles_unstable=eo=>{const to=useStyles$s();return eo.root.className=mergeClasses(optionGroupClassNames.root,to.root,eo.root.className),eo.label&&(eo.label.className=mergeClasses(optionGroupClassNames.label,to.label,eo.label.className)),eo},OptionGroup=reactExports.forwardRef((eo,to)=>{const ro=useOptionGroup_unstable(eo,to);return useOptionGroupStyles_unstable(ro),useCustomStyleHook("useOptionGroupStyles_unstable")(ro),renderOptionGroup_unstable(ro)});OptionGroup.displayName="OptionGroup";const renderDivider_unstable=eo=>jsx$1(eo.root,{children:eo.root.children!==void 0&&jsx$1(eo.wrapper,{children:eo.root.children})}),useDivider_unstable=(eo,to)=>{const{alignContent:ro="center",appearance:no="default",inset:oo=!1,vertical:io=!1,wrapper:so}=eo,ao=useId$1("divider-");return{alignContent:ro,appearance:no,inset:oo,vertical:io,components:{root:"div",wrapper:"div"},root:always(getIntrinsicElementProps("div",{role:"separator","aria-orientation":io?"vertical":"horizontal","aria-labelledby":eo.children?ao:void 0,...eo,ref:to}),{elementType:"div"}),wrapper:always(so,{defaultProps:{id:ao,children:eo.children},elementType:"div"})}},dividerClassNames={root:"fui-Divider",wrapper:"fui-Divider__wrapper"},useBaseStyles=__styles({base:{Bt984gj:"f122n59",B7ck84d:"f1ewtqcl",mc9l5x:"f22iagw",Beiy3e4:"f1063pyq",Bh6795r:"fqerorx",qhf8xq:"f10pi13n",Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm",fsow6f:"f17mccla",Bcvre1j:"fyl8oag",Br0sdwz:"f16vkdww",Bn78ew0:"fhsnbul",li1rpt:"f1gw3sf2",ap17g6:"f1ly5f7u",B771hl4:"f1s3tz6t"},childless:{susq4k:"f1kyqvp9",Bicfajf:["fzynn9s","f1z0ukd1"],jwcpgy:["fekrn8e","ftdg338"],B4rk6o:"fesgyo"},start:{Bsft5z2:"f13zj6fq"},center:{Ftih45:"f1wl9k8s",Bsft5z2:"f13zj6fq"},end:{Ftih45:"f1wl9k8s"},brand:{sj55zd:"f16muhyy",Bq4z7u6:"fcbuu2a",Bk5zm6e:["f1wdw2dr","f1ttio3w"],Bqjgrrk:"f1582fpk",Bm6vgfq:["f1ttio3w","f1wdw2dr"],B0n5ga8:"f1ahrvm8",s924m2:["f1cd3wbc","f17hbk9y"],B1q35kw:"fvrapl0",Gp14am:["f17hbk9y","f1cd3wbc"]},default:{sj55zd:"fkfq4zb",Bq4z7u6:"f1vccso1",Bk5zm6e:["f1geml7w","fjml6kk"],Bqjgrrk:"f1r7kh1m",Bm6vgfq:["fjml6kk","f1geml7w"],B0n5ga8:"f16j7guv",s924m2:["fx01ahm","fj1a37q"],B1q35kw:"fl8d8yv",Gp14am:["fj1a37q","fx01ahm"]},subtle:{sj55zd:"fkfq4zb",Bq4z7u6:"f5g06un",Bk5zm6e:["f13sxdku","f1n015lb"],Bqjgrrk:"f1x6bl8t",Bm6vgfq:["f1n015lb","f13sxdku"],B0n5ga8:"fvod1wy",s924m2:["fwslg65","flk0e17"],B1q35kw:"f103fvts",Gp14am:["flk0e17","fwslg65"]},strong:{sj55zd:"fkfq4zb",Bq4z7u6:"f10tv6oz",Bk5zm6e:["f16xp3sf","f1seuxxq"],Bqjgrrk:"fwrmqbx",Bm6vgfq:["f1seuxxq","f16xp3sf"],B0n5ga8:"ft83z1f",s924m2:["f1g4150c","f192dr6e"],B1q35kw:"f1qnawh6",Gp14am:["f192dr6e","f1g4150c"]}},{d:[".f122n59{align-items:center;}",".f1ewtqcl{box-sizing:border-box;}",".f22iagw{display:flex;}",".f1063pyq{flex-direction:row;}",".fqerorx{flex-grow:1;}",".f10pi13n{position:relative;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f17mccla{text-align:center;}",".fyl8oag::before{box-sizing:border-box;}",".f16vkdww::before{display:flex;}",".fhsnbul::before{flex-grow:1;}",".f1gw3sf2::after{box-sizing:border-box;}",".f1ly5f7u::after{display:flex;}",".f1s3tz6t::after{flex-grow:1;}",".f1kyqvp9::before{margin-bottom:0;}",".fzynn9s::before{margin-right:0;}",".f1z0ukd1::before{margin-left:0;}",".fekrn8e::after{margin-left:0;}",".ftdg338::after{margin-right:0;}",".fesgyo::after{margin-top:0;}",'.f13zj6fq::after{content:"";}','.f1wl9k8s::before{content:"";}',".f16muhyy{color:var(--colorBrandForeground1);}",".fcbuu2a::before{border-top-color:var(--colorBrandStroke1);}",".f1wdw2dr::before{border-right-color:var(--colorBrandStroke1);}",".f1ttio3w::before{border-left-color:var(--colorBrandStroke1);}",".f1582fpk::before{border-bottom-color:var(--colorBrandStroke1);}",".f1ahrvm8::after{border-top-color:var(--colorBrandStroke1);}",".f1cd3wbc::after{border-right-color:var(--colorBrandStroke1);}",".f17hbk9y::after{border-left-color:var(--colorBrandStroke1);}",".fvrapl0::after{border-bottom-color:var(--colorBrandStroke1);}",".fkfq4zb{color:var(--colorNeutralForeground2);}",".f1vccso1::before{border-top-color:var(--colorNeutralStroke2);}",".f1geml7w::before{border-right-color:var(--colorNeutralStroke2);}",".fjml6kk::before{border-left-color:var(--colorNeutralStroke2);}",".f1r7kh1m::before{border-bottom-color:var(--colorNeutralStroke2);}",".f16j7guv::after{border-top-color:var(--colorNeutralStroke2);}",".fx01ahm::after{border-right-color:var(--colorNeutralStroke2);}",".fj1a37q::after{border-left-color:var(--colorNeutralStroke2);}",".fl8d8yv::after{border-bottom-color:var(--colorNeutralStroke2);}",".f5g06un::before{border-top-color:var(--colorNeutralStroke3);}",".f13sxdku::before{border-right-color:var(--colorNeutralStroke3);}",".f1n015lb::before{border-left-color:var(--colorNeutralStroke3);}",".f1x6bl8t::before{border-bottom-color:var(--colorNeutralStroke3);}",".fvod1wy::after{border-top-color:var(--colorNeutralStroke3);}",".fwslg65::after{border-right-color:var(--colorNeutralStroke3);}",".flk0e17::after{border-left-color:var(--colorNeutralStroke3);}",".f103fvts::after{border-bottom-color:var(--colorNeutralStroke3);}",".f10tv6oz::before{border-top-color:var(--colorNeutralStroke1);}",".f16xp3sf::before{border-right-color:var(--colorNeutralStroke1);}",".f1seuxxq::before{border-left-color:var(--colorNeutralStroke1);}",".fwrmqbx::before{border-bottom-color:var(--colorNeutralStroke1);}",".ft83z1f::after{border-top-color:var(--colorNeutralStroke1);}",".f1g4150c::after{border-right-color:var(--colorNeutralStroke1);}",".f192dr6e::after{border-left-color:var(--colorNeutralStroke1);}",".f1qnawh6::after{border-bottom-color:var(--colorNeutralStroke1);}"]}),useHorizontalStyles=__styles({base:{a9b677:"fly5x3f",Bdkvgpv:"f163fonl",B0qfbqy:"f51yk4v",pbipgd:"f13rof3u",Bm2nyyq:"f8rth92",xrcqlc:"f6czdpx",i5u598:"f1iyka9k"},inset:{uwmqm3:["fjlbh76","f11qrl6u"],z189sj:["f11qrl6u","fjlbh76"]},start:{Ftih45:"f1wl9k8s",Bicfajf:["f1ojjlep","fk1kexq"],Bxwl2t9:"f1he2m4d",jwcpgy:["f12w1bnb","f1558wlj"]},center:{Bicfajf:["f1ojjlep","fk1kexq"],jwcpgy:["f12w1bnb","f1558wlj"]},end:{Bicfajf:["f1ojjlep","fk1kexq"],Bsft5z2:"f13zj6fq",jwcpgy:["f12w1bnb","f1558wlj"],Iy66sp:"f1ayce8x"}},{d:[".fly5x3f{width:100%;}",".f163fonl::before{border-top-style:solid;}",".f51yk4v::before{border-top-width:var(--strokeWidthThin);}",".f13rof3u::before{min-width:8px;}",".f8rth92::after{border-top-style:solid;}",".f6czdpx::after{border-top-width:var(--strokeWidthThin);}",".f1iyka9k::after{min-width:8px;}",".fjlbh76{padding-left:12px;}",".f11qrl6u{padding-right:12px;}",'.f1wl9k8s::before{content:"";}',".f1ojjlep::before{margin-right:12px;}",".fk1kexq::before{margin-left:12px;}",".f1he2m4d::before{max-width:8px;}",".f12w1bnb::after{margin-left:12px;}",".f1558wlj::after{margin-right:12px;}",'.f13zj6fq::after{content:"";}',".f1ayce8x::after{max-width:8px;}"]}),useVerticalStyles=__styles({base:{Beiy3e4:"f1vx9l62",sshi5w:"f16gbxbe",m598lv:["f1yq6w5o","f1jpmc5p"],B4f6apu:["f9sc749","f1x8pvcy"],zkzzav:"fhkwbjy",Barhvk9:["flthirb","ftkbnf5"],Ihftqj:["f13hvwk3","f1en4csx"],Bde111x:"f19onpk6"},inset:{B6of3ja:"f1xdg43u",jrapky:"f1jlhsmd"},withChildren:{sshi5w:"f1tjaq3g"},start:{Ftih45:"f1wl9k8s",susq4k:"fg2pwug",Bbdr6tz:"fkjtzyi",B4rk6o:"f8vk40g"},center:{susq4k:"fg2pwug",B4rk6o:"f8vk40g"},end:{susq4k:"fg2pwug",Bsft5z2:"f13zj6fq",B4rk6o:"f8vk40g",gn64ia:"fqg5mu5"}},{d:[".f1vx9l62{flex-direction:column;}",".f16gbxbe{min-height:20px;}",".f1yq6w5o::before{border-right-style:solid;}",".f1jpmc5p::before{border-left-style:solid;}",".f9sc749::before{border-right-width:var(--strokeWidthThin);}",".f1x8pvcy::before{border-left-width:var(--strokeWidthThin);}",".fhkwbjy::before{min-height:8px;}",".flthirb::after{border-right-style:solid;}",".ftkbnf5::after{border-left-style:solid;}",".f13hvwk3::after{border-right-width:var(--strokeWidthThin);}",".f1en4csx::after{border-left-width:var(--strokeWidthThin);}",".f19onpk6::after{min-height:8px;}",".f1xdg43u{margin-top:12px;}",".f1jlhsmd{margin-bottom:12px;}",".f1tjaq3g{min-height:84px;}",'.f1wl9k8s::before{content:"";}',".fg2pwug::before{margin-bottom:12px;}",".fkjtzyi::before{max-height:8px;}",".f8vk40g::after{margin-top:12px;}",'.f13zj6fq::after{content:"";}',".fqg5mu5::after{max-height:8px;}"]}),useDividerStyles_unstable=eo=>{const to=useBaseStyles(),ro=useHorizontalStyles(),no=useVerticalStyles(),{alignContent:oo,appearance:io,inset:so,vertical:ao}=eo;return eo.root.className=mergeClasses(dividerClassNames.root,to.base,to[oo],io&&to[io],!ao&&ro.base,!ao&&so&&ro.inset,!ao&&ro[oo],ao&&no.base,ao&&so&&no.inset,ao&&no[oo],ao&&eo.root.children!==void 0&&no.withChildren,eo.root.children===void 0&&to.childless,eo.root.className),eo.wrapper&&(eo.wrapper.className=mergeClasses(dividerClassNames.wrapper,eo.wrapper.className)),eo},Divider$2=reactExports.forwardRef((eo,to)=>{const ro=useDivider_unstable(eo,to);return useDividerStyles_unstable(ro),useCustomStyleHook("useDividerStyles_unstable")(ro),renderDivider_unstable(ro)});Divider$2.displayName="Divider";const useInput_unstable=(eo,to)=>{eo=useFieldControlProps_unstable(eo,{supportsLabelFor:!0,supportsRequired:!0,supportsSize:!0});const ro=useOverrides();var no;const{size:oo="medium",appearance:io=(no=ro.inputDefaultAppearance)!==null&&no!==void 0?no:"outline",onChange:so}=eo,[ao,lo]=useControllableState({state:eo.value,defaultState:eo.defaultValue,initialState:""}),uo=getPartitionedNativeProps({props:eo,primarySlotTagName:"input",excludedPropNames:["size","onChange","value","defaultValue"]}),co={size:oo,appearance:io,components:{root:"span",input:"input",contentBefore:"span",contentAfter:"span"},input:always(eo.input,{defaultProps:{type:"text",ref:to,...uo.primary},elementType:"input"}),contentAfter:optional(eo.contentAfter,{elementType:"span"}),contentBefore:optional(eo.contentBefore,{elementType:"span"}),root:always(eo.root,{defaultProps:uo.root,elementType:"span"})};return co.input.value=ao,co.input.onChange=useEventCallback$3(fo=>{const ho=fo.target.value;so==null||so(fo,{value:ho}),lo(ho)}),co},renderInput_unstable=eo=>jsxs(eo.root,{children:[eo.contentBefore&&jsx$1(eo.contentBefore,{}),jsx$1(eo.input,{}),eo.contentAfter&&jsx$1(eo.contentAfter,{})]}),inputClassNames={root:"fui-Input",input:"fui-Input__input",contentBefore:"fui-Input__contentBefore",contentAfter:"fui-Input__contentAfter"},useRootClassName=__resetStyles("r1jtohuq","rl1z2p5",{r:[".r1jtohuq{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);position:relative;box-sizing:border-box;min-height:32px;padding:0 var(--spacingHorizontalMNudge);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);background-color:var(--colorNeutralBackground1);border:1px solid var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStrokeAccessible);}",'.r1jtohuq::after{box-sizing:border-box;content:"";position:absolute;left:-1px;bottom:-1px;right:-1px;height:max(2px, var(--borderRadiusMedium));border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-bottom:2px solid var(--colorCompoundBrandStroke);clip-path:inset(calc(100% - 2px) 0 0 0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}',".r1jtohuq:focus-within::after{transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}",".r1jtohuq:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}",".r1jtohuq:focus-within{outline:2px solid transparent;}",".rl1z2p5{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);position:relative;box-sizing:border-box;min-height:32px;padding:0 var(--spacingHorizontalMNudge);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);background-color:var(--colorNeutralBackground1);border:1px solid var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStrokeAccessible);}",'.rl1z2p5::after{box-sizing:border-box;content:"";position:absolute;right:-1px;bottom:-1px;left:-1px;height:max(2px, var(--borderRadiusMedium));border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-bottom:2px solid var(--colorCompoundBrandStroke);clip-path:inset(calc(100% - 2px) 0 0 0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}',".rl1z2p5:focus-within::after{transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}",".rl1z2p5:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}",".rl1z2p5:focus-within{outline:2px solid transparent;}"],s:["@media screen and (prefers-reduced-motion: reduce){.r1jtohuq::after{transition-duration:0.01ms;transition-delay:0.01ms;}}","@media screen and (prefers-reduced-motion: reduce){.r1jtohuq:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}","@media screen and (prefers-reduced-motion: reduce){.rl1z2p5::after{transition-duration:0.01ms;transition-delay:0.01ms;}}","@media screen and (prefers-reduced-motion: reduce){.rl1z2p5:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}"]}),useRootStyles$4=__styles({small:{sshi5w:"f1pha7fy",uwmqm3:["fk8j09s","fdw0yi8"],z189sj:["fdw0yi8","fk8j09s"],Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm"},medium:{},large:{sshi5w:"f1w5jphr",uwmqm3:["f1uw59to","fw5db7e"],z189sj:["fw5db7e","f1uw59to"],Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k",i8kkvl:"f1rjii52",Belr9w4:"f1r7g2jn"},outline:{},outlineInteractive:{Bgoe8wy:"fvcxoqz",Bwzppfd:["f1ub3y4t","f1m52nbi"],oetu4i:"f1l4zc64",gg5e9n:["f1m52nbi","f1ub3y4t"],Drbcw7:"f8vnjqi",udz0bu:["fz1etlk","f1hc16gm"],Be8ivqh:"f1klwx88",ofdepl:["f1hc16gm","fz1etlk"]},underline:{De3pzq:"f1c21dwh",Bbmb7ep:["f1krrbdw","f1deotkl"],Beyfa6y:["f1deotkl","f1krrbdw"],B7oj6ja:["f10ostut","f1ozlkrg"],Btl43ni:["f1ozlkrg","f10ostut"],icvyot:"f1ern45e",vrafjx:["f1n71otn","f1deefiw"],wvpqe5:["f1deefiw","f1n71otn"],Eqx8gd:["f1n6gb5g","f15yvnhg"],B1piin3:["f15yvnhg","f1n6gb5g"]},underlineInteractive:{oetu4i:"f1l4zc64",Be8ivqh:"f1klwx88",B3778ie:["f1nf3wye","feulmo5"],d9w3h3:["feulmo5","f1nf3wye"],Bl18szs:["f18vqdqu","f53nyzz"],B4j8arr:["f53nyzz","f18vqdqu"]},filled:{g2u3we:"fghlq4f",h3c5rm:["f1gn591s","fjscplz"],B9xav0g:"fb073pr",zhjwy3:["fjscplz","f1gn591s"]},filledInteractive:{q7v0qe:"ftmjh5b",kmh5ft:["f17blpuu","fsrcdbj"],nagaa4:"f1tpwn32",B1yhkcb:["fsrcdbj","f17blpuu"]},invalid:{tvckwq:"fs4k3qj",gk2u95:["fcee079","fmyw78r"],hhx65j:"f1fgmyf4",Bxowmz0:["fmyw78r","fcee079"]},"filled-darker":{De3pzq:"f16xq7d1"},"filled-lighter":{De3pzq:"fxugw4r"},"filled-darker-shadow":{De3pzq:"f16xq7d1",E5pizo:"fyed02w"},"filled-lighter-shadow":{De3pzq:"fxugw4r",E5pizo:"fyed02w"},disabled:{Bceei9c:"fdrzuqr",De3pzq:"f1c21dwh",g2u3we:"f1jj8ep1",h3c5rm:["f15xbau","fy0fskl"],B9xav0g:"f4ikngz",zhjwy3:["fy0fskl","f15xbau"],Bjwas2f:"fg455y9",Bn1d65q:["f1rvyvqg","f14g86mu"],Bxeuatn:"f1cwzwz",n51gp8:["f14g86mu","f1rvyvqg"],Bsft5z2:"fhr9occ",Bduesf4:"f99w1ws"}},{d:[".f1pha7fy{min-height:24px;}",".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f1w5jphr{min-height:40px;}",".f1uw59to{padding-left:var(--spacingHorizontalM);}",".fw5db7e{padding-right:var(--spacingHorizontalM);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".f1rjii52{column-gap:var(--spacingHorizontalSNudge);}",".f1r7g2jn{row-gap:var(--spacingHorizontalSNudge);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f1krrbdw{border-bottom-right-radius:0;}",".f1deotkl{border-bottom-left-radius:0;}",".f10ostut{border-top-right-radius:0;}",".f1ozlkrg{border-top-left-radius:0;}",".f1ern45e{border-top-style:none;}",".f1n71otn{border-right-style:none;}",".f1deefiw{border-left-style:none;}",".f1n6gb5g::after{left:0;}",".f15yvnhg::after{right:0;}",".f1nf3wye::after{border-bottom-right-radius:0;}",".feulmo5::after{border-bottom-left-radius:0;}",".f18vqdqu::after{border-top-right-radius:0;}",".f53nyzz::after{border-top-left-radius:0;}",".fghlq4f{border-top-color:var(--colorTransparentStroke);}",".f1gn591s{border-right-color:var(--colorTransparentStroke);}",".fjscplz{border-left-color:var(--colorTransparentStroke);}",".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",".fs4k3qj:not(:focus-within),.fs4k3qj:hover:not(:focus-within){border-top-color:var(--colorPaletteRedBorder2);}",".fcee079:not(:focus-within),.fcee079:hover:not(:focus-within){border-right-color:var(--colorPaletteRedBorder2);}",".fmyw78r:not(:focus-within),.fmyw78r:hover:not(:focus-within){border-left-color:var(--colorPaletteRedBorder2);}",".f1fgmyf4:not(:focus-within),.f1fgmyf4:hover:not(:focus-within){border-bottom-color:var(--colorPaletteRedBorder2);}",".f16xq7d1{background-color:var(--colorNeutralBackground3);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".fyed02w{box-shadow:var(--shadow2);}",".fdrzuqr{cursor:not-allowed;}",".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}",".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}",".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}",".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".fhr9occ::after{content:unset;}"],h:[".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}",".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}",".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}",".f1l4zc64:hover{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}",".ftmjh5b:hover,.ftmjh5b:focus-within{border-top-color:var(--colorTransparentStrokeInteractive);}",".f17blpuu:hover,.f17blpuu:focus-within{border-right-color:var(--colorTransparentStrokeInteractive);}",".fsrcdbj:hover,.fsrcdbj:focus-within{border-left-color:var(--colorTransparentStrokeInteractive);}",".f1tpwn32:hover,.f1tpwn32:focus-within{border-bottom-color:var(--colorTransparentStrokeInteractive);}"],a:[".f8vnjqi:active,.f8vnjqi:focus-within{border-top-color:var(--colorNeutralStroke1Pressed);}",".fz1etlk:active,.fz1etlk:focus-within{border-right-color:var(--colorNeutralStroke1Pressed);}",".f1hc16gm:active,.f1hc16gm:focus-within{border-left-color:var(--colorNeutralStroke1Pressed);}",".f1klwx88:active,.f1klwx88:focus-within{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}"],m:[["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}]],w:[".f99w1ws:focus-within{outline-style:none;}"]}),useInputClassName=__resetStyles("rvp2gzh",null,[".rvp2gzh{box-sizing:border-box;flex-grow:1;min-width:0;border-style:none;padding:0 var(--spacingHorizontalXXS);color:var(--colorNeutralForeground1);background-color:transparent;outline-style:none;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;}",".rvp2gzh::-webkit-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",".rvp2gzh::-moz-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",".rvp2gzh:-ms-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",".rvp2gzh::placeholder{color:var(--colorNeutralForeground4);opacity:1;}"]),useInputElementStyles=__styles({large:{uwmqm3:["fk8j09s","fdw0yi8"],z189sj:["fdw0yi8","fk8j09s"]},disabled:{sj55zd:"f1s2aq7o",De3pzq:"f1c21dwh",Bceei9c:"fdrzuqr",yvdlaj:"fahhnxm"}},{d:[".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".fdrzuqr{cursor:not-allowed;}",".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}",".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"]}),useContentClassName=__resetStyles("r1572tok",null,[".r1572tok{box-sizing:border-box;color:var(--colorNeutralForeground3);display:flex;}",".r1572tok>svg{font-size:20px;}"]),useContentStyles$1=__styles({disabled:{sj55zd:"f1s2aq7o"},small:{kwki1k:"f3u2cy0"},medium:{},large:{kwki1k:"fa420co"}},{d:[".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f3u2cy0>svg{font-size:16px;}",".fa420co>svg{font-size:24px;}"]}),useInputStyles_unstable=eo=>{const{size:to,appearance:ro}=eo,no=eo.input.disabled,oo=`${eo.input["aria-invalid"]}`=="true",io=ro.startsWith("filled"),so=useRootStyles$4(),ao=useInputElementStyles(),lo=useContentStyles$1();eo.root.className=mergeClasses(inputClassNames.root,useRootClassName(),so[to],so[ro],!no&&ro==="outline"&&so.outlineInteractive,!no&&ro==="underline"&&so.underlineInteractive,!no&&io&&so.filledInteractive,io&&so.filled,!no&&oo&&so.invalid,no&&so.disabled,eo.root.className),eo.input.className=mergeClasses(inputClassNames.input,useInputClassName(),to==="large"&&ao.large,no&&ao.disabled,eo.input.className);const uo=[useContentClassName(),no&&lo.disabled,lo[to]];return eo.contentBefore&&(eo.contentBefore.className=mergeClasses(inputClassNames.contentBefore,...uo,eo.contentBefore.className)),eo.contentAfter&&(eo.contentAfter.className=mergeClasses(inputClassNames.contentAfter,...uo,eo.contentAfter.className)),eo},Input=reactExports.forwardRef((eo,to)=>{const ro=useInput_unstable(eo,to);return useInputStyles_unstable(ro),useCustomStyleHook("useInputStyles_unstable")(ro),renderInput_unstable(ro)});Input.displayName="Input";const useLinkState_unstable=eo=>{const{disabled:to,disabledFocusable:ro}=eo,{onClick:no,onKeyDown:oo,role:io,tabIndex:so}=eo.root;return eo.root.as==="a"&&(eo.root.href=to?void 0:eo.root.href,(to||ro)&&(eo.root.role=io||"link")),(eo.root.as==="a"||eo.root.as==="span")&&(eo.root.tabIndex=so??(to&&!ro?void 0:0)),eo.root.onClick=ao=>{to||ro?ao.preventDefault():no==null||no(ao)},eo.root.onKeyDown=ao=>{(to||ro)&&(ao.key===Enter||ao.key===Space)?(ao.preventDefault(),ao.stopPropagation()):oo==null||oo(ao)},eo.disabled=to||ro,eo.root["aria-disabled"]=to||ro||void 0,eo.root.as==="button"&&(eo.root.disabled=to&&!ro),eo},useLink_unstable=(eo,to)=>{const ro=useBackgroundAppearance(),{appearance:no="default",disabled:oo=!1,disabledFocusable:io=!1,inline:so=!1}=eo,ao=eo.as||(eo.href?"a":"button"),lo={role:ao==="span"?"button":void 0,type:ao==="button"?"button":void 0,...eo,as:ao},uo={appearance:no,disabled:oo,disabledFocusable:io,inline:so,components:{root:ao},root:always(getIntrinsicElementProps(ao,{ref:to,...lo}),{elementType:ao}),backgroundAppearance:ro};return useLinkState_unstable(uo),uo},linkClassNames={root:"fui-Link"},useStyles$r=__styles({focusIndicator:{Bttzg6e:"fhgqx19",B3uz8dt:"f1olyrje",B6ihwck:"f1p93eir",g9k6zt:"f1nev41a"},root:{B486eqv:"f2hkw1w",De3pzq:"f3rmtva",B7ck84d:"f1ewtqcl",sj55zd:"fyind8e",Bceei9c:"f1k6fduh",mc9l5x:"f1w7gpdv",Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",B6of3ja:"f1hu3pq6",t21cq0:["f11qmguv","f1tyq0we"],jrapky:"f19f4twv",Frg6f3:["f1tyq0we","f11qmguv"],z8tnut:"f1g0x7ka",z189sj:["fhxju0i","f1cnd47f"],Byoj8tv:"f1qch9an",uwmqm3:["f1cnd47f","fhxju0i"],B68tc82:"fqv5qza",Bmxbyg5:"f1vmzxwi",fsow6f:["f1o700av","fes3tcz"],w71qe1:"f1iuv45f",Bkioxbp:"f1cmlufx",ygn44y:"f9n3di6",famaaq:"f1ids18y",Bde5pd6:"f1tx3yz7",Bi91k9c:"f1deo86v",i089h6:"f1eh06m1",lj723h:"f1iescvh"},button:{icvyot:"f1ern45e",vrafjx:["f1n71otn","f1deefiw"],oivjwe:"f1h8hb77",wvpqe5:["f1deefiw","f1n71otn"]},href:{Be2twd7:"fjoy568"},subtle:{sj55zd:"fkfq4zb",Bde5pd6:"f1tx3yz7",Bi91k9c:"fnwyq0v",i089h6:"f1eh06m1",lj723h:"flvvhsy"},inline:{w71qe1:"f13mvf36"},disabled:{w71qe1:"f1iuv45f",sj55zd:"f1s2aq7o",Bceei9c:"fdrzuqr",Bde5pd6:"fbnuktb",Bi91k9c:"fvgxktp",i089h6:"fljg2da",lj723h:"f19wldhg"},inverted:{sj55zd:"f1qz2gb0",Bi91k9c:"f1mlt8il",lj723h:"f1hsd4st"}},{d:[".fhgqx19[data-fui-focus-visible]{text-decoration-color:var(--colorStrokeFocus2);}",".f1olyrje[data-fui-focus-visible]{text-decoration-line:underline;}",".f1p93eir[data-fui-focus-visible]{text-decoration-style:double;}",".f1nev41a[data-fui-focus-visible]{outline-style:none;}",".f3rmtva{background-color:transparent;}",".f1ewtqcl{box-sizing:border-box;}",".fyind8e{color:var(--colorBrandForegroundLink);}",".f1k6fduh{cursor:pointer;}",".f1w7gpdv{display:inline;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1hu3pq6{margin-top:0;}",".f11qmguv{margin-right:0;}",".f1tyq0we{margin-left:0;}",".f19f4twv{margin-bottom:0;}",".f1g0x7ka{padding-top:0;}",".fhxju0i{padding-right:0;}",".f1cnd47f{padding-left:0;}",".f1qch9an{padding-bottom:0;}",".fqv5qza{overflow-x:inherit;}",".f1vmzxwi{overflow-y:inherit;}",".f1o700av{text-align:left;}",".fes3tcz{text-align:right;}",".f1iuv45f{text-decoration-line:none;}",".f1cmlufx{text-decoration-thickness:var(--strokeWidthThin);}",".f9n3di6{text-overflow:inherit;}",".f1ids18y{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}",".f1ern45e{border-top-style:none;}",".f1n71otn{border-right-style:none;}",".f1deefiw{border-left-style:none;}",".f1h8hb77{border-bottom-style:none;}",".fjoy568{font-size:inherit;}",".fkfq4zb{color:var(--colorNeutralForeground2);}",".f13mvf36{text-decoration-line:underline;}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}",".f1qz2gb0{color:var(--colorBrandForegroundInverted);}"],i:[".f2hkw1w:focus-visible{outline-style:none;}"],h:[".f1tx3yz7:hover{text-decoration-line:underline;}",".f1deo86v:hover{color:var(--colorBrandForegroundLinkHover);}",".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}",".fbnuktb:hover{text-decoration-line:none;}",".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}",".f1mlt8il:hover{color:var(--colorBrandForegroundInvertedHover);}"],a:[".f1eh06m1:active{text-decoration-line:underline;}",".f1iescvh:active{color:var(--colorBrandForegroundLinkPressed);}",".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}",".fljg2da:active{text-decoration-line:none;}",".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}",".f1hsd4st:active{color:var(--colorBrandForegroundInvertedPressed);}"]}),useLinkStyles_unstable=eo=>{const to=useStyles$r(),{appearance:ro,disabled:no,inline:oo,root:io,backgroundAppearance:so}=eo;return eo.root.className=mergeClasses(linkClassNames.root,to.root,to.focusIndicator,io.as==="a"&&io.href&&to.href,io.as==="button"&&to.button,ro==="subtle"&&to.subtle,so==="inverted"&&to.inverted,oo&&to.inline,no&&to.disabled,eo.root.className),eo},renderLink_unstable=eo=>jsx$1(eo.root,{}),Link$1=reactExports.forwardRef((eo,to)=>{const ro=useLink_unstable(eo,to);return useLinkStyles_unstable(ro),renderLink_unstable(ro)});Link$1.displayName="Link";const SkeletonContext=reactExports.createContext(void 0),skeletonContextDefaultValue={},SkeletonContextProvider=SkeletonContext.Provider,useSkeletonContext=()=>{var eo;return(eo=reactExports.useContext(SkeletonContext))!==null&&eo!==void 0?eo:skeletonContextDefaultValue},useSkeleton_unstable=(eo,to)=>{const{animation:ro,appearance:no}=useSkeletonContext(),{animation:oo=ro??"wave",appearance:io=no??"opaque"}=eo,so=always(getIntrinsicElementProps("div",{ref:to,role:"progressbar","aria-busy":!0,"aria-label":"Loading Content",...eo}),{elementType:"div"});return{animation:oo,appearance:io,components:{root:"div"},root:so}},renderSkeleton_unstable=(eo,to)=>jsx$1(SkeletonContextProvider,{value:to.skeletonGroup,children:jsx$1(eo.root,{})}),skeletonClassNames={root:"fui-Skeleton"},useSkeletonStyles_unstable=eo=>(eo.root.className=mergeClasses(skeletonClassNames.root,eo.root.className),eo),useSkeletonContextValues=eo=>{const{animation:to,appearance:ro}=eo;return{skeletonGroup:reactExports.useMemo(()=>({animation:to,appearance:ro}),[to,ro])}},Skeleton=reactExports.forwardRef((eo,to)=>{const ro=useSkeleton_unstable(eo,to),no=useSkeletonContextValues(ro);return useSkeletonStyles_unstable(ro),renderSkeleton_unstable(ro,no)});Skeleton.displayName="Skeleton";const useSkeletonItem_unstable=(eo,to)=>{const{animation:ro,appearance:no}=useSkeletonContext(),{animation:oo=ro??"wave",appearance:io=no??"opaque",size:so=16,shape:ao="rectangle"}=eo,lo=always(getIntrinsicElementProps("div",{ref:to,...eo}),{elementType:"div"});return{appearance:io,animation:oo,size:so,shape:ao,components:{root:"div"},root:lo}},renderSkeletonItem_unstable=eo=>jsx$1(eo.root,{}),skeletonItemClassNames={root:"fui-SkeletonItem"},useStyles$q=__styles({root:{qhf8xq:"f10pi13n",B68tc82:"f1p9o1ba",Bmxbyg5:"f1sil6mw",Bkjc3bi:"f1qx3921",B8a6bjv:"fj9j8l8",Bpptf2m:"f1b6djjb",Bgh53k4:"f1dsdmen",w3vfg9:"f1cpbl36",vin17d:"f1a27w2r",Ezkn3b:"f452v7t",Gqtpxc:"f4akx1t",B3vm3ge:"f18p5put"},wave:{Bv12yb3:"fj20wtk",Bcmaq0h:["f101ziu5","f152emvt"],Bpep1pd:"f9jxvrw"},waveRtl:{Bv12yb3:"f105t0nc",Bcmaq0h:["f101ziu5","f152emvt"],Bpep1pd:"f9jxvrw"},pulse:{Bv12yb3:"fnm2mpv",vin17d:"f1iuewzk",De3pzq:"f1gjxg63"},translucent:{Bcmaq0h:["fss7axp","f4160cw"]},translucentPulse:{De3pzq:"f162mh4z"}},{d:[".f10pi13n{position:relative;}",".f1p9o1ba{overflow-x:hidden;}",".f1sil6mw{overflow-y:hidden;}",".f1qx3921{background-size:300% 100%;}",".fj9j8l8{background-position-x:center;}",".f1b6djjb{background-position-y:center;}",".f1dsdmen{background-attachment:fixed;}",".f1cpbl36{animation-iteration-count:infinite;}",".f1a27w2r{animation-duration:3s;}",".f452v7t{animation-timing-function:linear;}",".fj20wtk{animation-name:fma800j;}",`.f101ziu5{background-image:linear-gradient( + to right, + var(--colorNeutralStencil1) 0%, + var(--colorNeutralStencil2) 50%, + var(--colorNeutralStencil1) 100%);}`,`.f152emvt{background-image:linear-gradient( + to left, + var(--colorNeutralStencil1) 0%, + var(--colorNeutralStencil2) 50%, + var(--colorNeutralStencil1) 100%);}`,".f105t0nc{animation-name:fj9wi3p;}",".fnm2mpv{animation-name:f12o7gg6;}",".f1iuewzk{animation-duration:1s;}",".f1gjxg63{background-color:var(--colorNeutralStencil1);}",`.fss7axp{background-image:linear-gradient( + to right, + var(--colorNeutralStencil1Alpha) 0%, + var(--colorNeutralStencil2Alpha) 50%, + var(--colorNeutralStencil1Alpha) 100%);}`,`.f4160cw{background-image:linear-gradient( + to left, + var(--colorNeutralStencil1Alpha) 0%, + var(--colorNeutralStencil2Alpha) 50%, + var(--colorNeutralStencil1Alpha) 100%);}`,".f162mh4z{background-color:var(--colorNeutralStencil1Alpha);}"],m:[["@media screen and (prefers-reduced-motion: reduce){.f4akx1t{animation-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.f18p5put{animation-iteration-count:1;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (forced-colors: active){.f9jxvrw{background-color:WindowText;}}",{m:"screen and (forced-colors: active)"}]],k:["@keyframes fma800j{from{background-position-x:300%;}to{background-position-x:0%;}}","@keyframes fj9wi3p{from{background-position-x:0%;}to{background-position-x:300%;}}","@keyframes f12o7gg6{0%{opacity:1;}50%{opacity:0.4;}100%{opacity:1;}}"]}),useRectangleStyles=__styles({8:{Bqenvij:"f1x82gua"},12:{Bqenvij:"fvblgha"},16:{Bqenvij:"fd461yt"},20:{Bqenvij:"fjamq6b"},24:{Bqenvij:"frvgh55"},28:{Bqenvij:"fxldao9"},32:{Bqenvij:"f1d2rq10"},36:{Bqenvij:"f8ljn23"},40:{Bqenvij:"fbhnoac"},48:{Bqenvij:"ff2sm71"},56:{Bqenvij:"fzki0ko"},64:{Bqenvij:"f16k9i2m"},72:{Bqenvij:"f1shusfg"},96:{Bqenvij:"fypu0ge"},120:{Bqenvij:"fjr5b71"},128:{Bqenvij:"fele2au"},root:{a9b677:"fly5x3f",Bbmb7ep:["fff7au0","f1bjk9e1"],Beyfa6y:["f1bjk9e1","fff7au0"],B7oj6ja:["fwsfkhu","f8wkphi"],Btl43ni:["f8wkphi","fwsfkhu"]}},{d:[".f1x82gua{height:8px;}",".fvblgha{height:12px;}",".fd461yt{height:16px;}",".fjamq6b{height:20px;}",".frvgh55{height:24px;}",".fxldao9{height:28px;}",".f1d2rq10{height:32px;}",".f8ljn23{height:36px;}",".fbhnoac{height:40px;}",".ff2sm71{height:48px;}",".fzki0ko{height:56px;}",".f16k9i2m{height:64px;}",".f1shusfg{height:72px;}",".fypu0ge{height:96px;}",".fjr5b71{height:120px;}",".fele2au{height:128px;}",".fly5x3f{width:100%;}",".fff7au0{border-bottom-right-radius:4px;}",".f1bjk9e1{border-bottom-left-radius:4px;}",".fwsfkhu{border-top-right-radius:4px;}",".f8wkphi{border-top-left-radius:4px;}"]}),useSizeStyles=__styles({8:{a9b677:"f1o3cbw4",Bqenvij:"f1x82gua"},12:{a9b677:"frx94fk",Bqenvij:"fvblgha"},16:{a9b677:"fjw5fx7",Bqenvij:"fd461yt"},20:{a9b677:"f64fuq3",Bqenvij:"fjamq6b"},24:{a9b677:"fq4mcun",Bqenvij:"frvgh55"},28:{a9b677:"f1w9dchk",Bqenvij:"fxldao9"},32:{a9b677:"f1szoe96",Bqenvij:"f1d2rq10"},36:{a9b677:"fpdz1er",Bqenvij:"f8ljn23"},40:{a9b677:"feqmc2u",Bqenvij:"fbhnoac"},48:{a9b677:"f124akge",Bqenvij:"ff2sm71"},56:{a9b677:"f1u66zr1",Bqenvij:"fzki0ko"},64:{a9b677:"fa9ln6p",Bqenvij:"f16k9i2m"},72:{a9b677:"fhcae8x",Bqenvij:"f1shusfg"},96:{a9b677:"f1kyr2gn",Bqenvij:"fypu0ge"},120:{a9b677:"fwfqyga",Bqenvij:"fjr5b71"},128:{a9b677:"f1iksgmy",Bqenvij:"fele2au"}},{d:[".f1o3cbw4{width:8px;}",".f1x82gua{height:8px;}",".frx94fk{width:12px;}",".fvblgha{height:12px;}",".fjw5fx7{width:16px;}",".fd461yt{height:16px;}",".f64fuq3{width:20px;}",".fjamq6b{height:20px;}",".fq4mcun{width:24px;}",".frvgh55{height:24px;}",".f1w9dchk{width:28px;}",".fxldao9{height:28px;}",".f1szoe96{width:32px;}",".f1d2rq10{height:32px;}",".fpdz1er{width:36px;}",".f8ljn23{height:36px;}",".feqmc2u{width:40px;}",".fbhnoac{height:40px;}",".f124akge{width:48px;}",".ff2sm71{height:48px;}",".f1u66zr1{width:56px;}",".fzki0ko{height:56px;}",".fa9ln6p{width:64px;}",".f16k9i2m{height:64px;}",".fhcae8x{width:72px;}",".f1shusfg{height:72px;}",".f1kyr2gn{width:96px;}",".fypu0ge{height:96px;}",".fwfqyga{width:120px;}",".fjr5b71{height:120px;}",".f1iksgmy{width:128px;}",".fele2au{height:128px;}"]}),useCircleSizeStyles=__styles({root:{Bbmb7ep:["fqgqgel","fchfifz"],Beyfa6y:["fchfifz","fqgqgel"],B7oj6ja:["fc7b1hi","f1dpx5h9"],Btl43ni:["f1dpx5h9","fc7b1hi"]}},{d:[".fqgqgel{border-bottom-right-radius:50%;}",".fchfifz{border-bottom-left-radius:50%;}",".fc7b1hi{border-top-right-radius:50%;}",".f1dpx5h9{border-top-left-radius:50%;}"]}),useSkeletonItemStyles_unstable=eo=>{const{animation:to,appearance:ro,size:no,shape:oo}=eo,{dir:io}=useFluent(),so=useStyles$q(),ao=useRectangleStyles(),lo=useSizeStyles(),uo=useCircleSizeStyles();return eo.root.className=mergeClasses(skeletonItemClassNames.root,so.root,to==="wave"&&so.wave,to==="wave"&&io==="rtl"&&so.waveRtl,to==="pulse"&&so.pulse,ro==="translucent"&&so.translucent,to==="pulse"&&ro==="translucent"&&so.translucentPulse,oo==="rectangle"&&ao.root,oo==="rectangle"&&ao[no],oo==="square"&&lo[no],oo==="circle"&&uo.root,oo==="circle"&&lo[no],eo.root.className),eo},SkeletonItem=reactExports.forwardRef((eo,to)=>{const ro=useSkeletonItem_unstable(eo,to);return useSkeletonItemStyles_unstable(ro),renderSkeletonItem_unstable(ro)});SkeletonItem.displayName="SkeletonItem";const DefaultSvg=()=>reactExports.createElement("svg",{className:"fui-Spinner__Progressbar"},reactExports.createElement("circle",{className:"fui-Spinner__Track"}),reactExports.createElement("circle",{className:"fui-Spinner__Tail"})),SpinnerContext=reactExports.createContext(void 0),SpinnerContextDefaultValue={};SpinnerContext.Provider;const useSpinnerContext=()=>{var eo;return(eo=reactExports.useContext(SpinnerContext))!==null&&eo!==void 0?eo:SpinnerContextDefaultValue},useSpinner_unstable=(eo,to)=>{const{size:ro}=useSpinnerContext(),{appearance:no="primary",labelPosition:oo="after",size:io=ro??"medium",delay:so=0}=eo,ao=useId$1("spinner"),{role:lo="progressbar",tabIndex:uo,...co}=eo,fo=always(getIntrinsicElementProps("div",{ref:to,role:lo,...co},["size"]),{elementType:"div"}),[ho,po]=reactExports.useState(!0),[go,vo]=useTimeout();reactExports.useEffect(()=>{if(!(so<=0))return po(!1),go(()=>{po(!0)},so),()=>{vo()}},[go,vo,so]);const bo=optional(eo.label,{defaultProps:{id:ao},renderByDefault:!1,elementType:Label}),xo=optional(eo.spinner,{renderByDefault:!0,defaultProps:{children:reactExports.createElement(DefaultSvg,null),tabIndex:uo},elementType:"span"});return bo&&fo&&!fo["aria-labelledby"]&&(fo["aria-labelledby"]=bo.id),{appearance:no,delay:so,labelPosition:oo,size:io,shouldRenderSpinner:ho,components:{root:"div",spinner:"span",label:Label},root:fo,spinner:xo,label:bo}},renderSpinner_unstable=eo=>{const{labelPosition:to,shouldRenderSpinner:ro}=eo;return jsxs(eo.root,{children:[eo.label&&ro&&(to==="above"||to==="before")&&jsx$1(eo.label,{}),eo.spinner&&ro&&jsx$1(eo.spinner,{}),eo.label&&ro&&(to==="below"||to==="after")&&jsx$1(eo.label,{})]})},spinnerClassNames={root:"fui-Spinner",spinner:"fui-Spinner__spinner",label:"fui-Spinner__label"},useRootStyles$3=__styles({root:{mc9l5x:"f22iagw",Bt984gj:"f122n59",Brf1p80:"f4d9j23",Bg96gwp:"fez10in",i8kkvl:"f4px1ci",Belr9w4:"fn67r4l"},horizontal:{Beiy3e4:"f1063pyq"},vertical:{Beiy3e4:"f1vx9l62"}},{d:[".f22iagw{display:flex;}",".f122n59{align-items:center;}",".f4d9j23{justify-content:center;}",".fez10in{line-height:0;}",".f4px1ci{column-gap:8px;}",".fn67r4l{row-gap:8px;}",".f1063pyq{flex-direction:row;}",".f1vx9l62{flex-direction:column;}"]}),useLoaderStyles=__styles({spinnerSVG:{B3aqqti:"f1or16p5",Brovlpu:"f1grzc83",Bxa1mx5:"f19shzzi",Bwaue66:["f5tbecn","f15qb8s7"],fyp1ls:"fn4mtlg",ag6ruv:"f1y80fxs",osj692:"f1r2crtq",aq5vjd:"f1wsi8sr",tlu9e1:"f1bkm2qd",J3u96z:"f1urqz7h",d32isg:"f1da2vov",Bsvqbuc:"f11rfva0",b3s3i5:"f1exc66"},"extra-tiny":{Bah9ito:"f1x2gjcb",ut6tcf:"f1vjiaua",B7p06xz:"fv1u54w",B807ibg:"f1oebb0s"},tiny:{Bah9ito:"f1j4wmu2",ut6tcf:"f1vppzuq",B7p06xz:"fv1u54w",B807ibg:"fngtx1d"},"extra-small":{Bah9ito:"fmpqlna",ut6tcf:"f15z5jzu",B7p06xz:"fv1u54w",B807ibg:"fadawes"},small:{Bah9ito:"fo52gbo",ut6tcf:"f1b41i3v",B7p06xz:"fv1u54w",B807ibg:"f1xqyyrl"},medium:{Bah9ito:"f1aiqagr",ut6tcf:"f1wtx80b",B7p06xz:"f1flujpd",B807ibg:"f1u06hy7"},large:{Bah9ito:"f1trdq7b",ut6tcf:"f9e0mc5",B7p06xz:"f1flujpd",B807ibg:"f13pmvhl"},"extra-large":{Bah9ito:"f89rf2a",ut6tcf:"f1w2xg3q",B7p06xz:"f1flujpd",B807ibg:"fmn74v6"},huge:{Bah9ito:"f1rx7k5y",ut6tcf:"f1vtyt49",B7p06xz:"f1owbg48",B807ibg:"f1fr1izd"}},{f:[".f1or16p5:focus{outline-width:3px;}",".f1grzc83:focus{outline-style:solid;}",".f19shzzi:focus{outline-color:transparent;}"],k:["@keyframes fb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}","@keyframes f1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}"],d:[".f5tbecn>svg{animation-name:fb7n1on;}",".f15qb8s7>svg{animation-name:f1gx3jof;}",".fn4mtlg>svg{animation-duration:3s;}",".f1y80fxs>svg{animation-iteration-count:infinite;}",".f1r2crtq>svg{animation-timing-function:linear;}",".f1wsi8sr>svg{background-color:transparent;}",".f1da2vov>svg>circle{cx:50%;}",".f11rfva0>svg>circle{cy:50%;}",".f1exc66>svg>circle{fill:none;}",".f1x2gjcb>svg{height:16px;}",".f1vjiaua>svg{width:16px;}",".fv1u54w>svg>circle{stroke-width:var(--strokeWidthThick);}",".f1oebb0s>svg>circle{r:7px;}",".f1j4wmu2>svg{height:20px;}",".f1vppzuq>svg{width:20px;}",".fngtx1d>svg>circle{r:9px;}",".fmpqlna>svg{height:24px;}",".f15z5jzu>svg{width:24px;}",".fadawes>svg>circle{r:11px;}",".fo52gbo>svg{height:28px;}",".f1b41i3v>svg{width:28px;}",".f1xqyyrl>svg>circle{r:13px;}",".f1aiqagr>svg{height:32px;}",".f1wtx80b>svg{width:32px;}",".f1flujpd>svg>circle{stroke-width:var(--strokeWidthThicker);}",".f1u06hy7>svg>circle{r:14.5px;}",".f1trdq7b>svg{height:36px;}",".f9e0mc5>svg{width:36px;}",".f13pmvhl>svg>circle{r:16.5px;}",".f89rf2a>svg{height:40px;}",".f1w2xg3q>svg{width:40px;}",".fmn74v6>svg>circle{r:18.5px;}",".f1rx7k5y>svg{height:44px;}",".f1vtyt49>svg{width:44px;}",".f1owbg48>svg>circle{stroke-width:var(--strokeWidthThickest);}",".f1fr1izd>svg>circle{r:20px;}"],m:[["@media screen and (prefers-reduced-motion: reduce){.f1bkm2qd>svg{animation-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.f1urqz7h>svg{animation-iteration-count:1;}}",{m:"screen and (prefers-reduced-motion: reduce)"}]]}),useTrackStyles=__styles({inverted:{gwg7kz:"f1jvpmnu",Bvrehnu:"fq8a5sv",Bidp6o:"f1b4lwqj",cq3kgi:"f1najlst",Btwiser:"fjxod4",B8001xd:"fu3xdw0",Bdordwa:["f1ttdh6v","fmyjox0"],Bo2mdfu:"f1eseayc",E10nrc:"folzdkc",Bwl7w15:"fhlfkde",Bksq7rz:"f1esql28"},primary:{gwg7kz:"f11ditju",B8k2rxp:"f1m9nikz",Bvrehnu:"fq8a5sv",Bidp6o:"f1b4lwqj",cq3kgi:"f1najlst",Btwiser:"fjxod4",B8001xd:"fu3xdw0",Bdordwa:["f1ttdh6v","fmyjox0"],Bo2mdfu:"f1eseayc",E10nrc:"folzdkc",Bwl7w15:"fhlfkde",Bksq7rz:"f13qeqtg",y14cdu:"flglbw1"}},{d:[".f1jvpmnu>svg>circle.fui-Spinner__Tail{stroke:var(--colorNeutralStrokeOnBrand2);}",".fq8a5sv>svg>circle.fui-Spinner__Tail{animation-name:f1v1ql0f;}",".f1b4lwqj>svg>circle.fui-Spinner__Tail{animation-duration:1.5s;}",".f1najlst>svg>circle.fui-Spinner__Tail{animation-iteration-count:infinite;}",".fjxod4>svg>circle.fui-Spinner__Tail{animation-timing-function:var(--curveEasyEase);}",".fu3xdw0>svg>circle.fui-Spinner__Tail{stroke-linecap:round;}",".f1ttdh6v>svg>circle.fui-Spinner__Tail{transform:rotate(-90deg);}",".fmyjox0>svg>circle.fui-Spinner__Tail{transform:rotate(90deg);}",".f1eseayc>svg>circle.fui-Spinner__Tail{transform-origin:50% 50%;}",".f1esql28>svg>circle.fui-Spinner__Track{stroke:rgba(255, 255, 255, 0.2);}",".f11ditju>svg>circle.fui-Spinner__Tail{stroke:var(--colorBrandStroke1);}",".f13qeqtg>svg>circle.fui-Spinner__Track{stroke:var(--colorBrandStroke2Contrast);}"],k:["@keyframes f1v1ql0f{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}"],m:[["@media screen and (prefers-reduced-motion: reduce){.folzdkc>svg>circle.fui-Spinner__Tail{animation-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.fhlfkde>svg>circle.fui-Spinner__Tail{animation-iteration-count:1;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (forced-colors: active){.f1m9nikz>svg>circle.fui-Spinner__Tail{stroke:var(--colorNeutralStrokeOnBrand2);}}",{m:"screen and (forced-colors: active)"}],["@media screen and (forced-colors: active){.flglbw1>svg>circle.fui-Spinner__Track{stroke:var(--colorNeutralBackgroundInverted);}}",{m:"screen and (forced-colors: active)"}]]}),useLabelStyles$1=__styles({inverted:{sj55zd:"f15aqcq"},primary:{},"extra-tiny":{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},tiny:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},"extra-small":{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},small:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},medium:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},large:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},"extra-large":{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},huge:{Bahqtrf:"fk6fouc",Be2twd7:"f1pp30po",Bhrd7zp:"fl43uef",Bg96gwp:"f106mvju"}},{d:[".f15aqcq{color:rgba(255, 255, 255, 1);}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".faaz57k{line-height:var(--lineHeightBase400);}",".f1pp30po{font-size:var(--fontSizeBase500);}",".f106mvju{line-height:var(--lineHeightBase500);}"]}),useSpinnerStyles_unstable=eo=>{const{labelPosition:to,size:ro,appearance:no="primary"}=eo,oo=useRootStyles$3(),io=useLoaderStyles(),so=useLabelStyles$1(),ao=useTrackStyles();return eo.root.className=mergeClasses(spinnerClassNames.root,oo.root,(to==="above"||to==="below")&&oo.vertical,(to==="before"||to==="after")&&oo.horizontal,eo.root.className),eo.spinner&&(eo.spinner.className=mergeClasses(spinnerClassNames.spinner,io.spinnerSVG,io[ro],ao[no],eo.spinner.className)),eo.label&&(eo.label.className=mergeClasses(spinnerClassNames.label,so[ro],so[no],eo.label.className)),eo},Spinner=reactExports.forwardRef((eo,to)=>{const ro=useSpinner_unstable(eo,to);return useSpinnerStyles_unstable(ro),useCustomStyleHook("useSpinnerStyles_unstable")(ro),renderSpinner_unstable(ro)});Spinner.displayName="Spinner";const useSwitch_unstable=(eo,to)=>{eo=useFieldControlProps_unstable(eo,{supportsLabelFor:!0,supportsRequired:!0});const{checked:ro,defaultChecked:no,disabled:oo,labelPosition:io="after",onChange:so,required:ao}=eo,lo=getPartitionedNativeProps({props:eo,primarySlotTagName:"input",excludedPropNames:["checked","defaultChecked","onChange"]}),uo=useId$1("switch-",lo.primary.id),co=always(eo.root,{defaultProps:{ref:useFocusWithin(),...lo.root},elementType:"div"}),fo=always(eo.indicator,{defaultProps:{"aria-hidden":!0,children:reactExports.createElement(CircleFilled,null)},elementType:"div"}),ho=always(eo.input,{defaultProps:{checked:ro,defaultChecked:no,id:uo,ref:to,role:"switch",type:"checkbox",...lo.primary},elementType:"input"});ho.onChange=mergeCallbacks(ho.onChange,go=>so==null?void 0:so(go,{checked:go.currentTarget.checked}));const po=optional(eo.label,{defaultProps:{disabled:oo,htmlFor:uo,required:ao,size:"medium"},elementType:Label});return{labelPosition:io,components:{root:"div",indicator:"div",input:"input",label:Label},root:co,indicator:fo,input:ho,label:po}},renderSwitch_unstable=eo=>{const{labelPosition:to}=eo;return jsxs(eo.root,{children:[jsx$1(eo.input,{}),to!=="after"&&eo.label&&jsx$1(eo.label,{}),jsx$1(eo.indicator,{}),to==="after"&&eo.label&&jsx$1(eo.label,{})]})},switchClassNames={root:"fui-Switch",indicator:"fui-Switch__indicator",input:"fui-Switch__input",label:"fui-Switch__label"},useRootBaseClassName=__resetStyles("r1i56xw0","rk4yt03",{r:[".r1i56xw0{align-items:flex-start;box-sizing:border-box;display:inline-flex;position:relative;}",".r1i56xw0:focus{outline-style:none;}",".r1i56xw0:focus-visible{outline-style:none;}",".r1i56xw0[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",'.r1i56xw0[data-fui-focus-within]:focus-within::after{content:"";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}',".rk4yt03{align-items:flex-start;box-sizing:border-box;display:inline-flex;position:relative;}",".rk4yt03:focus{outline-style:none;}",".rk4yt03:focus-visible{outline-style:none;}",".rk4yt03[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",'.rk4yt03[data-fui-focus-within]:focus-within::after{content:"";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}'],s:["@media (forced-colors: active){.r1i56xw0[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}","@media (forced-colors: active){.rk4yt03[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}"]}),useRootStyles$2=__styles({vertical:{Beiy3e4:"f1vx9l62"}},{d:[".f1vx9l62{flex-direction:column;}"]}),useIndicatorBaseClassName=__resetStyles("r13wlxb8",null,{r:[".r13wlxb8{border-radius:var(--borderRadiusCircular);border:1px solid;line-height:0;box-sizing:border-box;fill:currentColor;flex-shrink:0;font-size:18px;height:20px;margin:var(--spacingVerticalS) var(--spacingHorizontalS);pointer-events:none;transition-duration:var(--durationNormal);transition-timing-function:var(--curveEasyEase);transition-property:background,border,color;width:40px;}",".r13wlxb8>*{transition-duration:var(--durationNormal);transition-timing-function:var(--curveEasyEase);transition-property:transform;}"],s:["@media screen and (prefers-reduced-motion: reduce){.r13wlxb8{transition-duration:0.01ms;}}","@media screen and (prefers-reduced-motion: reduce){.r13wlxb8>*{transition-duration:0.01ms;}}"]}),useIndicatorStyles=__styles({labelAbove:{B6of3ja:"f1hu3pq6"}},{d:[".f1hu3pq6{margin-top:0;}"]}),useInputBaseClassName=__resetStyles("rw4brat","r1f4bxyr",{r:[".rw4brat{box-sizing:border-box;cursor:pointer;height:100%;margin:0;opacity:0;position:absolute;width:calc(40px + 2 * var(--spacingHorizontalS));}",".rw4brat:checked~.fui-Switch__indicator>*{transform:translateX(20px);}",".rw4brat:disabled{cursor:default;}",".rw4brat:disabled~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}",".rw4brat:disabled~.fui-Switch__label{cursor:default;color:var(--colorNeutralForegroundDisabled);}",".rw4brat:enabled:not(:checked)~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);border-color:var(--colorNeutralStrokeAccessible);}",".rw4brat:enabled:not(:checked)~.fui-Switch__label{color:var(--colorNeutralForeground1);}",".rw4brat:enabled:not(:checked):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);border-color:var(--colorNeutralStrokeAccessibleHover);}",".rw4brat:enabled:not(:checked):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);border-color:var(--colorNeutralStrokeAccessiblePressed);}",".rw4brat:enabled:checked~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackground);color:var(--colorNeutralForegroundInverted);border-color:var(--colorTransparentStroke);}",".rw4brat:enabled:checked:hover~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackgroundHover);border-color:var(--colorTransparentStrokeInteractive);}",".rw4brat:enabled:checked:hover:active~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackgroundPressed);border-color:var(--colorTransparentStrokeInteractive);}",".rw4brat:disabled:not(:checked)~.fui-Switch__indicator{border-color:var(--colorNeutralStrokeDisabled);}",".rw4brat:disabled:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);border-color:var(--colorTransparentStrokeDisabled);}",".r1f4bxyr{box-sizing:border-box;cursor:pointer;height:100%;margin:0;opacity:0;position:absolute;width:calc(40px + 2 * var(--spacingHorizontalS));}",".r1f4bxyr:checked~.fui-Switch__indicator>*{transform:translateX(-20px);}",".r1f4bxyr:disabled{cursor:default;}",".r1f4bxyr:disabled~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}",".r1f4bxyr:disabled~.fui-Switch__label{cursor:default;color:var(--colorNeutralForegroundDisabled);}",".r1f4bxyr:enabled:not(:checked)~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);border-color:var(--colorNeutralStrokeAccessible);}",".r1f4bxyr:enabled:not(:checked)~.fui-Switch__label{color:var(--colorNeutralForeground1);}",".r1f4bxyr:enabled:not(:checked):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);border-color:var(--colorNeutralStrokeAccessibleHover);}",".r1f4bxyr:enabled:not(:checked):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);border-color:var(--colorNeutralStrokeAccessiblePressed);}",".r1f4bxyr:enabled:checked~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackground);color:var(--colorNeutralForegroundInverted);border-color:var(--colorTransparentStroke);}",".r1f4bxyr:enabled:checked:hover~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackgroundHover);border-color:var(--colorTransparentStrokeInteractive);}",".r1f4bxyr:enabled:checked:hover:active~.fui-Switch__indicator{background-color:var(--colorCompoundBrandBackgroundPressed);border-color:var(--colorTransparentStrokeInteractive);}",".r1f4bxyr:disabled:not(:checked)~.fui-Switch__indicator{border-color:var(--colorNeutralStrokeDisabled);}",".r1f4bxyr:disabled:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);border-color:var(--colorTransparentStrokeDisabled);}"],s:["@media (forced-colors: active){.rw4brat:disabled~.fui-Switch__indicator{color:GrayText;border-color:GrayText;}.rw4brat:disabled~.fui-Switch__label{color:GrayText;}.rw4brat:enabled:checked:hover~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}.rw4brat:enabled:checked~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}}","@media (forced-colors: active){.r1f4bxyr:disabled~.fui-Switch__indicator{color:GrayText;border-color:GrayText;}.r1f4bxyr:disabled~.fui-Switch__label{color:GrayText;}.r1f4bxyr:enabled:checked:hover~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}.r1f4bxyr:enabled:checked~.fui-Switch__indicator{background-color:Highlight;color:Canvas;}}"]}),useInputStyles=__styles({before:{j35jbq:["f1e31b4d","f1vgc2s3"],Bhzewxz:"f15twtuk"},after:{oyh7mz:["f1vgc2s3","f1e31b4d"],Bhzewxz:"f15twtuk"},above:{B5kzvoi:"f1yab3r1",Bqenvij:"f1aar7gd",a9b677:"fly5x3f"}},{d:[".f1e31b4d{right:0;}",".f1vgc2s3{left:0;}",".f15twtuk{top:0;}",".f1yab3r1{bottom:0;}",".f1aar7gd{height:calc(20px + var(--spacingVerticalS));}",".fly5x3f{width:100%;}"]}),useLabelStyles=__styles({base:{Bceei9c:"f1k6fduh",jrapky:"f49ad5g",B6of3ja:"f1xlvstr",z8tnut:"f1kwiid1",z189sj:["f1vdfbxk","f1f5gg8d"],Byoj8tv:"f5b47ha",uwmqm3:["f1f5gg8d","f1vdfbxk"]},above:{z8tnut:"f1ywm7hm",Byoj8tv:"f14wxoun",a9b677:"fly5x3f"},after:{uwmqm3:["fruq291","f7x41pl"]},before:{z189sj:["f7x41pl","fruq291"]}},{d:[".f1k6fduh{cursor:pointer;}",".f49ad5g{margin-bottom:calc((20px - var(--lineHeightBase300)) / 2);}",".f1xlvstr{margin-top:calc((20px - var(--lineHeightBase300)) / 2);}",".f1kwiid1{padding-top:var(--spacingVerticalS);}",".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",".f5b47ha{padding-bottom:var(--spacingVerticalS);}",".f1ywm7hm{padding-top:var(--spacingVerticalXS);}",".f14wxoun{padding-bottom:var(--spacingVerticalXS);}",".fly5x3f{width:100%;}",".fruq291{padding-left:var(--spacingHorizontalXS);}",".f7x41pl{padding-right:var(--spacingHorizontalXS);}"]}),useSwitchStyles_unstable=eo=>{const to=useRootBaseClassName(),ro=useRootStyles$2(),no=useIndicatorBaseClassName(),oo=useIndicatorStyles(),io=useInputBaseClassName(),so=useInputStyles(),ao=useLabelStyles(),{label:lo,labelPosition:uo}=eo;return eo.root.className=mergeClasses(switchClassNames.root,to,uo==="above"&&ro.vertical,eo.root.className),eo.indicator.className=mergeClasses(switchClassNames.indicator,no,lo&&uo==="above"&&oo.labelAbove,eo.indicator.className),eo.input.className=mergeClasses(switchClassNames.input,io,lo&&so[uo],eo.input.className),eo.label&&(eo.label.className=mergeClasses(switchClassNames.label,ao.base,ao[uo],eo.label.className)),eo},Switch=reactExports.forwardRef((eo,to)=>{const ro=useSwitch_unstable(eo,to);return useSwitchStyles_unstable(ro),useCustomStyleHook("useSwitchStyles_unstable")(ro),renderSwitch_unstable(ro)});Switch.displayName="Switch";const tabListContextDefaultValue={appearance:"transparent",reserveSelectedTabSpace:!0,selectTabOnFocus:!1,disabled:!1,selectedValue:void 0,onRegister:()=>{},onUnregister:()=>{},onSelect:()=>{},getRegisteredTabs:()=>({registeredTabs:{}}),size:"medium",vertical:!1},TabListContext=createContext(void 0),TabListProvider=TabListContext.Provider,useTabListContext_unstable=eo=>useContextSelector(TabListContext,(to=tabListContextDefaultValue)=>eo(to)),useTab_unstable=(eo,to)=>{const{content:ro,disabled:no=!1,icon:oo,onClick:io,onFocus:so,value:ao}=eo,lo=useTabListContext_unstable(Ro=>Ro.appearance),uo=useTabListContext_unstable(Ro=>Ro.reserveSelectedTabSpace),co=useTabListContext_unstable(Ro=>Ro.selectTabOnFocus),fo=useTabListContext_unstable(Ro=>Ro.disabled),ho=useTabListContext_unstable(Ro=>Ro.selectedValue===ao),po=useTabListContext_unstable(Ro=>Ro.onRegister),go=useTabListContext_unstable(Ro=>Ro.onUnregister),vo=useTabListContext_unstable(Ro=>Ro.onSelect),bo=useTabListContext_unstable(Ro=>Ro.size),xo=useTabListContext_unstable(Ro=>!!Ro.vertical),_o=fo||no,Eo=reactExports.useRef(null),So=Ro=>vo(Ro,{value:ao}),To=useEventCallback$3(mergeCallbacks(io,So)),wo=useEventCallback$3(mergeCallbacks(so,So));reactExports.useEffect(()=>(po({value:ao,ref:Eo}),()=>{go({value:ao,ref:Eo})}),[po,go,Eo,ao]);const Co=optional(oo,{elementType:"span"}),Oo=always(ro,{defaultProps:{children:eo.children},elementType:"span"}),Ao=!!(Co!=null&&Co.children&&!Oo.children);return{components:{root:"button",icon:"span",content:"span",contentReservedSpace:"span"},root:always(getIntrinsicElementProps("button",{ref:useMergedRefs$1(to,Eo),role:"tab",type:"button","aria-selected":_o?void 0:`${ho}`,...eo,disabled:_o,onClick:To,onFocus:co?wo:so}),{elementType:"button"}),icon:Co,iconOnly:Ao,content:Oo,contentReservedSpace:optional(ro,{renderByDefault:!ho&&!Ao&&uo,defaultProps:{children:eo.children},elementType:"span"}),appearance:lo,disabled:_o,selected:ho,size:bo,value:ao,vertical:xo}},renderTab_unstable=eo=>jsxs(eo.root,{children:[eo.icon&&jsx$1(eo.icon,{}),!eo.iconOnly&&jsx$1(eo.content,{}),eo.contentReservedSpace&&jsx$1(eo.contentReservedSpace,{})]}),tabIndicatorCssVars_unstable={offsetVar:"--fui-Tab__indicator--offset",scaleVar:"--fui-Tab__indicator--scale"},useActiveIndicatorStyles$1=__styles({base:{B68tc82:"f1mtd64y",Bmxbyg5:"f1y7q3j9"},animated:{Ba2ppi3:"fhwpy7i",F2fol1:"f6zz20j",B1dyfl9:"f1ai4sc1",B0vmy72:"f9qxlq5",u9bimw:"f1aql376"},horizontal:{sjv3b2:["fug4aj8","f1i5xzg7"],b1kco5:"f1q7ujh"},vertical:{sjv3b2:"f1hqboyk",b1kco5:"f1dxupa6"}},{d:[".f1mtd64y{overflow-x:visible;}",".f1y7q3j9{overflow-y:visible;}",".fhwpy7i::after{transition-property:transform;}",".f6zz20j::after{transition-duration:var(--durationSlow);}",".f1ai4sc1::after{transition-timing-function:var(--curveDecelerateMax);}",".fug4aj8::after{transform-origin:left;}",".f1i5xzg7::after{transform-origin:right;}",".f1q7ujh::after{transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));}",".f1hqboyk::after{transform-origin:top;}",".f1dxupa6::after{transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));}"],m:[["@media (prefers-reduced-motion: reduce){.f9qxlq5::after{transition-property:none;}}",{m:"(prefers-reduced-motion: reduce)"}],["@media (prefers-reduced-motion: reduce){.f1aql376::after{transition-duration:0.01ms;}}",{m:"(prefers-reduced-motion: reduce)"}]]}),calculateTabRect=eo=>{if(eo){var to;const ro=((to=eo.parentElement)===null||to===void 0?void 0:to.getBoundingClientRect())||{x:0,y:0,width:0,height:0},no=eo.getBoundingClientRect();return{x:no.x-ro.x,y:no.y-ro.y,width:no.width,height:no.height}}},getRegisteredTabRect=(eo,to)=>{var ro;const no=to!=null?(ro=eo[JSON.stringify(to)])===null||ro===void 0?void 0:ro.ref.current:void 0;return no?calculateTabRect(no):void 0},useTabAnimatedIndicatorStyles_unstable=eo=>{const{disabled:to,selected:ro,vertical:no}=eo,oo=useActiveIndicatorStyles$1(),[io,so]=reactExports.useState(),[ao,lo]=reactExports.useState({offset:0,scale:1}),uo=useTabListContext_unstable(ho=>ho.getRegisteredTabs);if(reactExports.useEffect(()=>{io&&lo({offset:0,scale:1})},[io]),ro){const{previousSelectedValue:ho,selectedValue:po,registeredTabs:go}=uo();if(ho&&io!==ho){const vo=getRegisteredTabRect(go,ho),bo=getRegisteredTabRect(go,po);if(bo&&vo){const xo=no?vo.y-bo.y:vo.x-bo.x,_o=no?vo.height/bo.height:vo.width/bo.width;lo({offset:xo,scale:_o}),so(ho)}}}else io&&so(void 0);if(to)return eo;const co=ao.offset===0&&ao.scale===1;eo.root.className=mergeClasses(eo.root.className,ro&&oo.base,ro&&co&&oo.animated,ro&&(no?oo.vertical:oo.horizontal));const fo={[tabIndicatorCssVars_unstable.offsetVar]:`${ao.offset}px`,[tabIndicatorCssVars_unstable.scaleVar]:`${ao.scale}`};return eo.root.style={...fo,...eo.root.style},eo},tabClassNames={root:"fui-Tab",icon:"fui-Tab__icon",content:"fui-Tab__content"},reservedSpaceClassNames={content:"fui-Tab__content--reserved-space"},useRootStyles$1=__styles({base:{Bt984gj:"f122n59",g2u3we:"fwhevhj",h3c5rm:["f61n433","f1q8l70w"],B9xav0g:"fv1dfc8",zhjwy3:["f1q8l70w","f61n433"],Bbmb7ep:["f1aa9q02","f16jpd5f"],Beyfa6y:["f16jpd5f","f1aa9q02"],B7oj6ja:["f1jar5jt","fyu767a"],Btl43ni:["fyu767a","f1jar5jt"],B4j52fo:"fre7gi1",Bekrc4i:["f1358rze","f1rvrf73"],Bn0qgzm:"fqdk4by",ibv6hh:["f1rvrf73","f1358rze"],Bceei9c:"f1k6fduh",mc9l5x:"f13qh94s",Bnnss6s:"fi64zpg",Bxotwcr:"f1u07yai",Budl1dq:"frn2hmy",wkccdc:"f1olsevy",Bahqtrf:"fk6fouc",Bg96gwp:"f1i3iumi",oeaueh:"f1s6fcnf",qhf8xq:"f10pi13n",B68tc82:"f1p9o1ba",Bmxbyg5:"f1sil6mw",B9bfxx9:"f1cxpek8"},horizontal:{Brf1p80:"f4d9j23"},vertical:{Brf1p80:"f1s9ku6b"},smallHorizontal:{i8kkvl:"f14mj54c",z8tnut:"fp2oml8",z189sj:["fdw0yi8","fk8j09s"],Byoj8tv:"f1tdddsa",uwmqm3:["fk8j09s","fdw0yi8"]},smallVertical:{i8kkvl:"f14mj54c",z8tnut:"fclwglc",z189sj:["fdw0yi8","fk8j09s"],Byoj8tv:"fywfov9",uwmqm3:["fk8j09s","fdw0yi8"]},mediumHorizontal:{i8kkvl:"f1rjii52",z8tnut:"f5yzyt",z189sj:["f11gcy0p","f1ng84yb"],Byoj8tv:"fx3omr",uwmqm3:["f1ng84yb","f11gcy0p"]},mediumVertical:{i8kkvl:"f1rjii52",z8tnut:"fp2oml8",z189sj:["f11gcy0p","f1ng84yb"],Byoj8tv:"f1tdddsa",uwmqm3:["f1ng84yb","f11gcy0p"]},largeHorizontal:{i8kkvl:"f1rjii52",z8tnut:"fikn0iw",z189sj:["f11gcy0p","f1ng84yb"],Byoj8tv:"fdxej3c",uwmqm3:["f1ng84yb","f11gcy0p"]},largeVertical:{i8kkvl:"f1rjii52",z8tnut:"f1kwiid1",z189sj:["f11gcy0p","f1ng84yb"],Byoj8tv:"f5b47ha",uwmqm3:["f1ng84yb","f11gcy0p"]},transparent:{De3pzq:"f1c21dwh",Jwef8y:"fjxutwb",ecr2s2:"fophhak",Bptxc3x:"fmmjozx",B076xvk:"f1mfqf41",q9r9w5:"f10aiid4",cl4aha:"fpkze5g",Bk452zc:"f149wc3x",a4hkcw:"fjioou7"},subtle:{De3pzq:"fhovq9v",Jwef8y:"f1t94bn6",ecr2s2:"f1wfn5kd",Bptxc3x:"fmmjozx",B076xvk:"f1mfqf41",q9r9w5:"f10aiid4",cl4aha:"fpkze5g",Bk452zc:"f149wc3x",a4hkcw:"fjioou7"},disabled:{De3pzq:"f1c21dwh",Bptxc3x:"fato7r6",cl4aha:"fao1bnu",Bceei9c:"fdrzuqr"},selected:{Bptxc3x:"f1cadz5z",B076xvk:"f1ck17l",q9r9w5:"f42ak0g",cl4aha:"ffplhdr",Bk452zc:"ffth601",a4hkcw:"fhklyu5"}},{d:[".f122n59{align-items:center;}",".fwhevhj{border-top-color:none;}",".f61n433{border-right-color:none;}",".f1q8l70w{border-left-color:none;}",".fv1dfc8{border-bottom-color:none;}",".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}",".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}",".fre7gi1{border-top-width:0;}",".f1358rze{border-right-width:0;}",".f1rvrf73{border-left-width:0;}",".fqdk4by{border-bottom-width:0;}",".f1k6fduh{cursor:pointer;}",".f13qh94s{display:grid;}",".fi64zpg{flex-shrink:0;}",".f1u07yai{grid-auto-flow:column;}",".frn2hmy{grid-template-columns:auto;}",".f1olsevy{grid-template-rows:auto;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".f1s6fcnf{outline-style:none;}",".f10pi13n{position:relative;}",".f1p9o1ba{overflow-x:hidden;}",".f1sil6mw{overflow-y:hidden;}",".f1cxpek8{text-transform:none;}",".f4d9j23{justify-content:center;}",".f1s9ku6b{justify-content:start;}",".f14mj54c{column-gap:var(--spacingHorizontalXXS);}",".fp2oml8{padding-top:var(--spacingVerticalSNudge);}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".f1tdddsa{padding-bottom:var(--spacingVerticalSNudge);}",".fclwglc{padding-top:var(--spacingVerticalXXS);}",".fywfov9{padding-bottom:var(--spacingVerticalXXS);}",".f1rjii52{column-gap:var(--spacingHorizontalSNudge);}",".f5yzyt{padding-top:var(--spacingVerticalM);}",".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}",".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}",".fx3omr{padding-bottom:var(--spacingVerticalM);}",".fikn0iw{padding-top:var(--spacingVerticalL);}",".fdxej3c{padding-bottom:var(--spacingVerticalL);}",".f1kwiid1{padding-top:var(--spacingVerticalS);}",".f5b47ha{padding-bottom:var(--spacingVerticalS);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".fmmjozx .fui-Tab__icon{color:var(--colorNeutralForeground2);}",".fpkze5g .fui-Tab__content{color:var(--colorNeutralForeground2);}",".fhovq9v{background-color:var(--colorSubtleBackground);}",".fato7r6 .fui-Tab__icon{color:var(--colorNeutralForegroundDisabled);}",".fao1bnu .fui-Tab__content{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}",".f1cadz5z .fui-Tab__icon{color:var(--colorCompoundBrandForeground1);}",".ffplhdr .fui-Tab__content{color:var(--colorNeutralForeground1);}"],h:[".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}",".f1mfqf41:hover .fui-Tab__icon{color:var(--colorNeutralForeground2Hover);}",".f149wc3x:hover .fui-Tab__content{color:var(--colorNeutralForeground2Hover);}",".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}",".f1ck17l:hover .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Hover);}",".ffth601:hover .fui-Tab__content{color:var(--colorNeutralForeground1Hover);}"],a:[".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}",".f10aiid4:active .fui-Tab__icon{color:var(--colorNeutralForeground2Pressed);}",".fjioou7:active .fui-Tab__content{color:var(--colorNeutralForeground2Pressed);}",".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}",".f42ak0g:active .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Pressed);}",".fhklyu5:active .fui-Tab__content{color:var(--colorNeutralForeground1Pressed);}"]}),useFocusStyles=__styles({base:{B8q5s1w:"f8hki3x",Bci5o5g:["f1d2448m","ffh67wi"],n8qw10:"f1bjia2o",Bdrgwmp:["ffh67wi","f1d2448m"],Bn4voq9:"f1p7hgxw",Bfpq7zp:"f1way5bb",g9k6zt:"f9znhxp",j6ew2k:["fqa318h","fqa318h"],Bhxq17a:"f1vjpng2"}},{d:[".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",".f1p7hgxw[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);}",".f1way5bb[data-fui-focus-visible]{outline-color:transparent;}",".f9znhxp[data-fui-focus-visible]{outline-style:solid;}",".fqa318h[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2);}",".f1vjpng2[data-fui-focus-visible]{z-index:1;}"]}),usePendingIndicatorStyles=__styles({base:{az7l2e:"fhw179n",Bv4n3vi:["f10y1uxy","f6aiuy0"],vqofr:["f6aiuy0","f10y1uxy"],B0uxbk8:["f1kfpfnu","f1dx5wco"],Bgqb9hq:["f1dx5wco","f1kfpfnu"],amg5m6:"f1kmhr4c",zkfqfm:"fl1ydde",Bkydozb:"f1y7maxz",vzq8l0:["f105swax","fscdmel"],Bka2azo:["fscdmel","f105swax"],Br4ovkg:["f1tkcw1w","f1u11x8o"],csmgbd:["f1u11x8o","f1tkcw1w"],y36c18:"f16cxu0",B1ctymy:"f1nwgacf",Bgvrrv0:"f15ovonk",ddr6p5:"fvje46l"},disabled:{az7l2e:"f1ut20fw",Bkydozb:"fhrzcfn"},smallHorizontal:{lawp4y:"fchca7p",Baz25je:"f1r53b5e",Fbdkly:["f1s6rxz5","fo35v8s"],mdwyqc:["fo35v8s","f1s6rxz5"]},smallVertical:{lawp4y:"fze4zud",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"fdp32p8",Ccq8qp:"f1aij3q"},mediumHorizontal:{lawp4y:"fchca7p",Baz25je:"f1s2r9ax",Fbdkly:["f1o0nnkk","fxb7rol"],mdwyqc:["fxb7rol","f1o0nnkk"]},mediumVertical:{lawp4y:"f17jracn",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"f117lcb2",Ccq8qp:"f1aij3q"},largeHorizontal:{lawp4y:"fchca7p",Baz25je:"f1s2r9ax",Fbdkly:["f1o0nnkk","fxb7rol"],mdwyqc:["fxb7rol","f1o0nnkk"]},largeVertical:{lawp4y:"fel9d3z",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"f6vqlre",Ccq8qp:"f1aij3q"}},{h:[".fhw179n:hover::before{background-color:var(--colorNeutralStroke1Hover);}",".f10y1uxy:hover::before{border-bottom-right-radius:var(--borderRadiusCircular);}",".f6aiuy0:hover::before{border-bottom-left-radius:var(--borderRadiusCircular);}",".f1kfpfnu:hover::before{border-top-right-radius:var(--borderRadiusCircular);}",".f1dx5wco:hover::before{border-top-left-radius:var(--borderRadiusCircular);}",'.f1kmhr4c:hover::before{content:"";}',".fl1ydde:hover::before{position:absolute;}",".f1ut20fw:hover::before{background-color:var(--colorTransparentStroke);}"],a:[".f1y7maxz:active::before{background-color:var(--colorNeutralStroke1Pressed);}",".f105swax:active::before{border-bottom-right-radius:var(--borderRadiusCircular);}",".fscdmel:active::before{border-bottom-left-radius:var(--borderRadiusCircular);}",".f1tkcw1w:active::before{border-top-right-radius:var(--borderRadiusCircular);}",".f1u11x8o:active::before{border-top-left-radius:var(--borderRadiusCircular);}",'.f16cxu0:active::before{content:"";}',".f1nwgacf:active::before{position:absolute;}",".fhrzcfn:active::before{background-color:var(--colorTransparentStroke);}"],m:[["@media (forced-colors: active){.f15ovonk:hover::before{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fvje46l:active::before{background-color:Highlight;}}",{m:"(forced-colors: active)"}]],d:[".fchca7p::before{bottom:0;}",".f1r53b5e::before{height:var(--strokeWidthThick);}",".f1s6rxz5::before{left:var(--spacingHorizontalSNudge);}",".fo35v8s::before{right:var(--spacingHorizontalSNudge);}",".fze4zud::before{bottom:var(--spacingVerticalXS);}",".f1fzr1x6::before{left:0;}",".f1f351id::before{right:0;}",".fdp32p8::before{top:var(--spacingVerticalXS);}",".f1aij3q::before{width:var(--strokeWidthThicker);}",".f1s2r9ax::before{height:var(--strokeWidthThicker);}",".f1o0nnkk::before{left:var(--spacingHorizontalM);}",".fxb7rol::before{right:var(--spacingHorizontalM);}",".f17jracn::before{bottom:var(--spacingVerticalS);}",".f117lcb2::before{top:var(--spacingVerticalS);}",".fel9d3z::before{bottom:var(--spacingVerticalMNudge);}",".f6vqlre::before{top:var(--spacingVerticalMNudge);}"]}),useActiveIndicatorStyles=__styles({base:{Bjyk6c5:"f1rp0jgh",B3778ie:["fprarqb","f14vs0nd"],d9w3h3:["f14vs0nd","fprarqb"],Bl18szs:["f1gtfqs9","f18zvfd9"],B4j8arr:["f18zvfd9","f1gtfqs9"],Bsft5z2:"f13zj6fq",E3zdtr:"f1mdlcz9",t2ki1e:"ffmd2fr"},selected:{Bjyk6c5:"f1ksivud",Glksuk:"f1eytvvh",Blzl0y7:"fuaa9s",f7digc:"fy7ktjt",Biqphg1:"f16tp0gf",Bntoloa:"fj0yp7j"},disabled:{Bjyk6c5:"f13lkzet"},smallHorizontal:{By385i5:"fo72kxq",Dlnsje:"f9bb2ob",Eqx8gd:["f1q70ajw","f18rbzdx"],B1piin3:["f18rbzdx","f1q70ajw"]},smallVertical:{By385i5:"fqbue9b",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"fk1klkt",a2br6o:"f1o25lip"},mediumHorizontal:{By385i5:"fo72kxq",Dlnsje:"f1vx7lu8",Eqx8gd:["fna7m5n","f1oxpfwv"],B1piin3:["f1oxpfwv","fna7m5n"]},mediumVertical:{By385i5:"fipylg0",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"fqchiol",a2br6o:"f1o25lip"},largeHorizontal:{By385i5:"fo72kxq",Dlnsje:"f1vx7lu8",Eqx8gd:["fna7m5n","f1oxpfwv"],B1piin3:["f1oxpfwv","fna7m5n"]},largeVertical:{By385i5:"f1w7dm5g",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"f1p6em4m",a2br6o:"f1o25lip"}},{d:[".f1rp0jgh::after{background-color:var(--colorTransparentStroke);}",".fprarqb::after{border-bottom-right-radius:var(--borderRadiusCircular);}",".f14vs0nd::after{border-bottom-left-radius:var(--borderRadiusCircular);}",".f1gtfqs9::after{border-top-right-radius:var(--borderRadiusCircular);}",".f18zvfd9::after{border-top-left-radius:var(--borderRadiusCircular);}",'.f13zj6fq::after{content:"";}',".f1mdlcz9::after{position:absolute;}",".ffmd2fr::after{z-index:1;}",".f1ksivud::after{background-color:var(--colorCompoundBrandStroke);}",".f13lkzet::after{background-color:var(--colorNeutralForegroundDisabled);}",".fo72kxq::after{bottom:0;}",".f9bb2ob::after{height:var(--strokeWidthThick);}",".f1q70ajw::after{left:var(--spacingHorizontalSNudge);}",".f18rbzdx::after{right:var(--spacingHorizontalSNudge);}",".fqbue9b::after{bottom:var(--spacingVerticalXS);}",".f1n6gb5g::after{left:0;}",".f15yvnhg::after{right:0;}",".fk1klkt::after{top:var(--spacingVerticalXS);}",".f1o25lip::after{width:var(--strokeWidthThicker);}",".f1vx7lu8::after{height:var(--strokeWidthThicker);}",".fna7m5n::after{left:var(--spacingHorizontalM);}",".f1oxpfwv::after{right:var(--spacingHorizontalM);}",".fipylg0::after{bottom:var(--spacingVerticalS);}",".fqchiol::after{top:var(--spacingVerticalS);}",".f1w7dm5g::after{bottom:var(--spacingVerticalMNudge);}",".f1p6em4m::after{top:var(--spacingVerticalMNudge);}"],h:[".f1eytvvh:hover::after{background-color:var(--colorCompoundBrandStrokeHover);}"],a:[".fuaa9s:active::after{background-color:var(--colorCompoundBrandStrokePressed);}"],m:[["@media (forced-colors: active){.fy7ktjt::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f16tp0gf:hover::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fj0yp7j:active::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}]]}),useIconStyles$1=__styles({base:{Br312pm:"fwpfdsa",Ijaq50:"f16hsg94",Bt984gj:"f122n59",mc9l5x:"ftuwxu6",Brf1p80:"f4d9j23",B68tc82:"f1p9o1ba",Bmxbyg5:"f1sil6mw",D0sxk3:"f16u1re",t6yez3:"f8bsbmo"},small:{Be2twd7:"fe5j1ua",Bqenvij:"fjamq6b",a9b677:"f64fuq3"},medium:{Be2twd7:"fe5j1ua",Bqenvij:"fjamq6b",a9b677:"f64fuq3"},large:{Be2twd7:"f1rt2boy",Bqenvij:"frvgh55",a9b677:"fq4mcun"},selected:{D0sxk3:"fxoiby5",t6yez3:"f15q0o9g"}},{d:[".fwpfdsa{grid-column-start:1;}",".f16hsg94{grid-row-start:1;}",".f122n59{align-items:center;}",".ftuwxu6{display:inline-flex;}",".f4d9j23{justify-content:center;}",".f1p9o1ba{overflow-x:hidden;}",".f1sil6mw{overflow-y:hidden;}",".f16u1re .fui-Icon-filled{display:none;}",".f8bsbmo .fui-Icon-regular{display:inline;}",".fe5j1ua{font-size:20px;}",".fjamq6b{height:20px;}",".f64fuq3{width:20px;}",".f1rt2boy{font-size:24px;}",".frvgh55{height:24px;}",".fq4mcun{width:24px;}",".fxoiby5 .fui-Icon-filled{display:inline;}",".f15q0o9g .fui-Icon-regular{display:none;}"]}),useContentStyles=__styles({base:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi",B68tc82:"f1p9o1ba",Bmxbyg5:"f1sil6mw",z8tnut:"fztplxc",z189sj:["ffczdla","fgiv446"],Byoj8tv:"f9g1xly",uwmqm3:["fgiv446","ffczdla"]},selected:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"fl43uef",Bg96gwp:"f1i3iumi"},large:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k"},largeSelected:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},noIconBefore:{Br312pm:"fwpfdsa",Ijaq50:"f16hsg94"},iconBefore:{Br312pm:"fd46tj4",Ijaq50:"f16hsg94"},placeholder:{Bcdw1i0:"fd7fpy0"}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".f1p9o1ba{overflow-x:hidden;}",".f1sil6mw{overflow-y:hidden;}",".fztplxc{padding-top:var(--spacingVerticalNone);}",".ffczdla{padding-right:var(--spacingHorizontalXXS);}",".fgiv446{padding-left:var(--spacingHorizontalXXS);}",".f9g1xly{padding-bottom:var(--spacingVerticalNone);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fwpfdsa{grid-column-start:1;}",".f16hsg94{grid-row-start:1;}",".fd46tj4{grid-column-start:2;}",".fd7fpy0{visibility:hidden;}"]}),useTabStyles_unstable=eo=>{const to=useRootStyles$1(),ro=useFocusStyles(),no=usePendingIndicatorStyles(),oo=useActiveIndicatorStyles(),io=useIconStyles$1(),so=useContentStyles(),{appearance:ao,disabled:lo,selected:uo,size:co,vertical:fo}=eo;return eo.root.className=mergeClasses(tabClassNames.root,to.base,fo?to.vertical:to.horizontal,co==="small"&&(fo?to.smallVertical:to.smallHorizontal),co==="medium"&&(fo?to.mediumVertical:to.mediumHorizontal),co==="large"&&(fo?to.largeVertical:to.largeHorizontal),ro.base,!lo&&ao==="subtle"&&to.subtle,!lo&&ao==="transparent"&&to.transparent,!lo&&uo&&to.selected,lo&&to.disabled,no.base,co==="small"&&(fo?no.smallVertical:no.smallHorizontal),co==="medium"&&(fo?no.mediumVertical:no.mediumHorizontal),co==="large"&&(fo?no.largeVertical:no.largeHorizontal),lo&&no.disabled,uo&&oo.base,uo&&!lo&&oo.selected,uo&&co==="small"&&(fo?oo.smallVertical:oo.smallHorizontal),uo&&co==="medium"&&(fo?oo.mediumVertical:oo.mediumHorizontal),uo&&co==="large"&&(fo?oo.largeVertical:oo.largeHorizontal),uo&&lo&&oo.disabled,eo.root.className),eo.icon&&(eo.icon.className=mergeClasses(tabClassNames.icon,io.base,io[co],uo&&io.selected,eo.icon.className)),eo.contentReservedSpace&&(eo.contentReservedSpace.className=mergeClasses(reservedSpaceClassNames.content,so.base,co==="large"?so.largeSelected:so.selected,eo.icon?so.iconBefore:so.noIconBefore,so.placeholder,eo.content.className),eo.contentReservedSpaceClassName=eo.contentReservedSpace.className),eo.content.className=mergeClasses(tabClassNames.content,so.base,co==="large"&&so.large,uo&&(co==="large"?so.largeSelected:so.selected),eo.icon?so.iconBefore:so.noIconBefore,eo.content.className),useTabAnimatedIndicatorStyles_unstable(eo),eo},Tab$1=reactExports.forwardRef((eo,to)=>{const ro=useTab_unstable(eo,to);return useTabStyles_unstable(ro),useCustomStyleHook("useTabStyles_unstable")(ro),renderTab_unstable(ro)});Tab$1.displayName="Tab";const useTabList_unstable=(eo,to)=>{const{appearance:ro="transparent",reserveSelectedTabSpace:no=!0,disabled:oo=!1,onTabSelect:io,selectTabOnFocus:so=!1,size:ao="medium",vertical:lo=!1}=eo,uo=reactExports.useRef(null),co=useArrowNavigationGroup({circular:!0,axis:lo?"vertical":"horizontal",memorizeCurrent:!0}),[fo,ho]=useControllableState({state:eo.selectedValue,defaultState:eo.defaultSelectedValue,initialState:void 0}),po=reactExports.useRef(void 0),go=reactExports.useRef(void 0);reactExports.useEffect(()=>{go.current=po.current,po.current=fo},[fo]);const vo=useEventCallback$3((So,To)=>{ho(To.value),io==null||io(So,To)}),bo=reactExports.useRef({}),xo=useEventCallback$3(So=>{bo.current[JSON.stringify(So.value)]=So}),_o=useEventCallback$3(So=>{delete bo.current[JSON.stringify(So.value)]}),Eo=reactExports.useCallback(()=>({selectedValue:po.current,previousSelectedValue:go.current,registeredTabs:bo.current}),[]);return{components:{root:"div"},root:always(getIntrinsicElementProps("div",{ref:useMergedRefs$1(to,uo),role:"tablist","aria-orientation":lo?"vertical":"horizontal",...co,...eo}),{elementType:"div"}),appearance:ro,reserveSelectedTabSpace:no,disabled:oo,selectTabOnFocus:so,selectedValue:fo,size:ao,vertical:lo,onRegister:xo,onUnregister:_o,onSelect:vo,getRegisteredTabs:Eo}},renderTabList_unstable=(eo,to)=>jsx$1(eo.root,{children:jsx$1(TabListProvider,{value:to.tabList,children:eo.root.children})}),tabListClassNames={root:"fui-TabList"},useStyles$p=__styles({root:{mc9l5x:"f22iagw",Beiy3e4:"f1063pyq",Bnnss6s:"fi64zpg",Eh141a:"flvyvdh",qhf8xq:"f10pi13n"},horizontal:{Bt984gj:"f1q9h2pe",Beiy3e4:"f1063pyq"},vertical:{Bt984gj:"f1q9h2pe",Beiy3e4:"f1vx9l62"}},{d:[".f22iagw{display:flex;}",".f1063pyq{flex-direction:row;}",".fi64zpg{flex-shrink:0;}",".flvyvdh{flex-wrap:nowrap;}",".f10pi13n{position:relative;}",".f1q9h2pe{align-items:stretch;}",".f1vx9l62{flex-direction:column;}"]}),useTabListStyles_unstable=eo=>{const{vertical:to}=eo,ro=useStyles$p();return eo.root.className=mergeClasses(tabListClassNames.root,ro.root,to?ro.vertical:ro.horizontal,eo.root.className),eo};function useTabListContextValues_unstable(eo){const{appearance:to,reserveSelectedTabSpace:ro,disabled:no,selectTabOnFocus:oo,selectedValue:io,onRegister:so,onUnregister:ao,onSelect:lo,getRegisteredTabs:uo,size:co,vertical:fo}=eo;return{tabList:{appearance:to,reserveSelectedTabSpace:ro,disabled:no,selectTabOnFocus:oo,selectedValue:io,onSelect:lo,onRegister:so,onUnregister:ao,getRegisteredTabs:uo,size:co,vertical:fo}}}const TabList=reactExports.forwardRef((eo,to)=>{const ro=useTabList_unstable(eo,to),no=useTabListContextValues_unstable(ro);return useTabListStyles_unstable(ro),useCustomStyleHook("useTabListStyles_unstable")(ro),renderTabList_unstable(ro,no)});TabList.displayName="TabList";const useText_unstable=(eo,to)=>{const{wrap:ro,truncate:no,block:oo,italic:io,underline:so,strikethrough:ao,size:lo,font:uo,weight:co,align:fo}=eo;return{align:fo??"start",block:oo??!1,font:uo??"base",italic:io??!1,size:lo??300,strikethrough:ao??!1,truncate:no??!1,underline:so??!1,weight:co??"regular",wrap:ro??!0,components:{root:"span"},root:always(getIntrinsicElementProps("span",{ref:to,...eo}),{elementType:"span"})}},renderText_unstable=eo=>jsx$1(eo.root,{}),textClassNames={root:"fui-Text"},useStyles$o=__styles({root:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bg96gwp:"f1i3iumi",Bhrd7zp:"figsok6",fsow6f:"fpgzoln",mc9l5x:"f1w7gpdv",Huce71:"f6juhto",B68tc82:"f1mtd64y",Bmxbyg5:"f1y7q3j9",ygn44y:"f2jf649"},nowrap:{Huce71:"fz5stix",B68tc82:"f1p9o1ba",Bmxbyg5:"f1sil6mw"},truncate:{ygn44y:"f1cmbuwj"},block:{mc9l5x:"ftgm304"},italic:{B80ckks:"f1j4dglz"},underline:{w71qe1:"f13mvf36"},strikethrough:{w71qe1:"fv5q2k7"},strikethroughUnderline:{w71qe1:"f1drk4o6"},base100:{Be2twd7:"f13mqy1h",Bg96gwp:"fcpl73t"},base200:{Be2twd7:"fy9rknc",Bg96gwp:"fwrc4pm"},base400:{Be2twd7:"fod5ikn",Bg96gwp:"faaz57k"},base500:{Be2twd7:"f1pp30po",Bg96gwp:"f106mvju"},base600:{Be2twd7:"f1x0m3f5",Bg96gwp:"fb86gi6"},hero700:{Be2twd7:"fojgt09",Bg96gwp:"fcen8rp"},hero800:{Be2twd7:"fccw675",Bg96gwp:"f1ebx5kk"},hero900:{Be2twd7:"f15afnhw",Bg96gwp:"fr3w3wp"},hero1000:{Be2twd7:"fpyltcb",Bg96gwp:"f1ivgwrt"},monospace:{Bahqtrf:"f1fedwem"},numeric:{Bahqtrf:"f1uq0ln5"},weightMedium:{Bhrd7zp:"fdj6btp"},weightSemibold:{Bhrd7zp:"fl43uef"},weightBold:{Bhrd7zp:"flh3ekv"},alignCenter:{fsow6f:"f17mccla"},alignEnd:{fsow6f:"f12ymhq5"},alignJustify:{fsow6f:"f1j59e10"}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fpgzoln{text-align:start;}",".f1w7gpdv{display:inline;}",".f6juhto{white-space:normal;}",".f1mtd64y{overflow-x:visible;}",".f1y7q3j9{overflow-y:visible;}",".f2jf649{text-overflow:clip;}",".fz5stix{white-space:nowrap;}",".f1p9o1ba{overflow-x:hidden;}",".f1sil6mw{overflow-y:hidden;}",".f1cmbuwj{text-overflow:ellipsis;}",".ftgm304{display:block;}",".f1j4dglz{font-style:italic;}",".f13mvf36{text-decoration-line:underline;}",".fv5q2k7{text-decoration-line:line-through;}",".f1drk4o6{text-decoration-line:line-through underline;}",".f13mqy1h{font-size:var(--fontSizeBase100);}",".fcpl73t{line-height:var(--lineHeightBase100);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".f1pp30po{font-size:var(--fontSizeBase500);}",".f106mvju{line-height:var(--lineHeightBase500);}",".f1x0m3f5{font-size:var(--fontSizeBase600);}",".fb86gi6{line-height:var(--lineHeightBase600);}",".fojgt09{font-size:var(--fontSizeHero700);}",".fcen8rp{line-height:var(--lineHeightHero700);}",".fccw675{font-size:var(--fontSizeHero800);}",".f1ebx5kk{line-height:var(--lineHeightHero800);}",".f15afnhw{font-size:var(--fontSizeHero900);}",".fr3w3wp{line-height:var(--lineHeightHero900);}",".fpyltcb{font-size:var(--fontSizeHero1000);}",".f1ivgwrt{line-height:var(--lineHeightHero1000);}",".f1fedwem{font-family:var(--fontFamilyMonospace);}",".f1uq0ln5{font-family:var(--fontFamilyNumeric);}",".fdj6btp{font-weight:var(--fontWeightMedium);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".flh3ekv{font-weight:var(--fontWeightBold);}",".f17mccla{text-align:center;}",".f12ymhq5{text-align:end;}",".f1j59e10{text-align:justify;}"]}),useTextStyles_unstable=eo=>{const to=useStyles$o();return eo.root.className=mergeClasses(textClassNames.root,to.root,eo.wrap===!1&&to.nowrap,eo.truncate&&to.truncate,eo.block&&to.block,eo.italic&&to.italic,eo.underline&&to.underline,eo.strikethrough&&to.strikethrough,eo.underline&&eo.strikethrough&&to.strikethroughUnderline,eo.size===100&&to.base100,eo.size===200&&to.base200,eo.size===400&&to.base400,eo.size===500&&to.base500,eo.size===600&&to.base600,eo.size===700&&to.hero700,eo.size===800&&to.hero800,eo.size===900&&to.hero900,eo.size===1e3&&to.hero1000,eo.font==="monospace"&&to.monospace,eo.font==="numeric"&&to.numeric,eo.weight==="medium"&&to.weightMedium,eo.weight==="semibold"&&to.weightSemibold,eo.weight==="bold"&&to.weightBold,eo.align==="center"&&to.alignCenter,eo.align==="end"&&to.alignEnd,eo.align==="justify"&&to.alignJustify,eo.root.className),eo},Text$2=reactExports.forwardRef((eo,to)=>{const ro=useText_unstable(eo,to);return useTextStyles_unstable(ro),useCustomStyleHook("useTextStyles_unstable")(ro),renderText_unstable(ro)});Text$2.displayName="Text";const disableScrollElementProp="__fluentDisableScrollElement";function useDisableBodyScroll(){const{targetDocument:eo}=useFluent();return reactExports.useCallback(()=>{if(eo)return disableScroll(eo.body)},[eo])}function disableScroll(eo){var to;const{clientWidth:ro}=eo.ownerDocument.documentElement;var no;const oo=(no=(to=eo.ownerDocument.defaultView)===null||to===void 0?void 0:to.innerWidth)!==null&&no!==void 0?no:0;return assertIsDisableScrollElement(eo),eo[disableScrollElementProp].count===0&&(eo.style.overflow="hidden",eo.style.paddingRight=`${oo-ro}px`),eo[disableScrollElementProp].count++,()=>{eo[disableScrollElementProp].count--,eo[disableScrollElementProp].count===0&&(eo.style.overflow=eo[disableScrollElementProp].previousOverflowStyle,eo.style.paddingRight=eo[disableScrollElementProp].previousPaddingRightStyle)}}function assertIsDisableScrollElement(eo){var to,ro,no;(no=(to=eo)[ro=disableScrollElementProp])!==null&&no!==void 0||(to[ro]={count:0,previousOverflowStyle:eo.style.overflow,previousPaddingRightStyle:eo.style.paddingRight})}function useFocusFirstElement(eo,to){const{findFirstFocusable:ro}=useFocusFinders(),{targetDocument:no}=useFluent(),oo=reactExports.useRef(null);return reactExports.useEffect(()=>{if(!eo)return;const io=oo.current&&ro(oo.current);if(io)io.focus();else{var so;(so=oo.current)===null||so===void 0||so.focus()}},[ro,eo,to,no]),oo}const defaultContextValue$2={open:!1,inertTrapFocus:!1,modalType:"modal",isNestedDialog:!1,dialogRef:{current:null},requestOpenChange(){}},DialogContext=createContext(void 0),DialogProvider=DialogContext.Provider,useDialogContext_unstable=eo=>useContextSelector(DialogContext,(to=defaultContextValue$2)=>eo(to)),defaultContextValue$1=!1,DialogSurfaceContext=reactExports.createContext(void 0),DialogSurfaceProvider=DialogSurfaceContext.Provider,useDialogSurfaceContext_unstable=()=>{var eo;return(eo=reactExports.useContext(DialogSurfaceContext))!==null&&eo!==void 0?eo:defaultContextValue$1},useDialog_unstable=eo=>{const{children:to,modalType:ro="modal",onOpenChange:no,inertTrapFocus:oo=!1}=eo,[io,so]=childrenToTriggerAndContent(to),[ao,lo]=useControllableState({state:eo.open,defaultState:eo.defaultOpen,initialState:!1}),uo=useEventCallback$3(vo=>{no==null||no(vo.event,vo),vo.event.isDefaultPrevented()||lo(vo.open)}),co=useFocusFirstElement(ao,ro),fo=useDisableBodyScroll(),ho=!!(ao&&ro!=="non-modal");useIsomorphicLayoutEffect$1(()=>{if(ho)return fo()},[fo,ho]);const{modalAttributes:po,triggerAttributes:go}=useModalAttributes({trapFocus:ro!=="non-modal",legacyTrapFocus:!oo});return{components:{backdrop:"div"},inertTrapFocus:oo,open:ao,modalType:ro,content:so,trigger:io,requestOpenChange:uo,dialogTitleId:useId$1("dialog-title-"),isNestedDialog:useHasParentContext(DialogContext),dialogRef:co,modalAttributes:ro!=="non-modal"?po:void 0,triggerAttributes:go}};function childrenToTriggerAndContent(eo){const to=reactExports.Children.toArray(eo);switch(to.length){case 2:return to;case 1:return[void 0,to[0]];default:return[void 0,void 0]}}function _extends$c(){return _extends$c=Object.assign?Object.assign.bind():function(eo){for(var to=1;to=0)&&(ro[oo]=eo[oo]);return ro}function _setPrototypeOf$2(eo,to){return _setPrototypeOf$2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(no,oo){return no.__proto__=oo,no},_setPrototypeOf$2(eo,to)}function _inheritsLoose$1(eo,to){eo.prototype=Object.create(to.prototype),eo.prototype.constructor=eo,_setPrototypeOf$2(eo,to)}var propTypes={exports:{}},ReactPropTypesSecret$1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ReactPropTypesSecret_1=ReactPropTypesSecret$1,ReactPropTypesSecret=ReactPropTypesSecret_1;function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;var factoryWithThrowingShims=function(){function eo(no,oo,io,so,ao,lo){if(lo!==ReactPropTypesSecret){var uo=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw uo.name="Invariant Violation",uo}}eo.isRequired=eo;function to(){return eo}var ro={array:eo,bigint:eo,bool:eo,func:eo,number:eo,object:eo,string:eo,symbol:eo,any:eo,arrayOf:to,element:eo,elementType:eo,instanceOf:to,node:eo,objectOf:to,oneOf:to,oneOfType:to,shape:to,exact:to,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return ro.PropTypes=ro,ro};propTypes.exports=factoryWithThrowingShims();var propTypesExports=propTypes.exports;const PropTypes=getDefaultExportFromCjs(propTypesExports),config$4={disabled:!1},TransitionGroupContext=React.createContext(null);var forceReflow=function(to){return to.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition=function(eo){_inheritsLoose$1(to,eo);function to(no,oo){var io;io=eo.call(this,no,oo)||this;var so=oo,ao=so&&!so.isMounting?no.enter:no.appear,lo;return io.appearStatus=null,no.in?ao?(lo=EXITED,io.appearStatus=ENTERING):lo=ENTERED:no.unmountOnExit||no.mountOnEnter?lo=UNMOUNTED:lo=EXITED,io.state={status:lo},io.nextCallback=null,io}to.getDerivedStateFromProps=function(oo,io){var so=oo.in;return so&&io.status===UNMOUNTED?{status:EXITED}:null};var ro=to.prototype;return ro.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},ro.componentDidUpdate=function(oo){var io=null;if(oo!==this.props){var so=this.state.status;this.props.in?so!==ENTERING&&so!==ENTERED&&(io=ENTERING):(so===ENTERING||so===ENTERED)&&(io=EXITING)}this.updateStatus(!1,io)},ro.componentWillUnmount=function(){this.cancelNextCallback()},ro.getTimeouts=function(){var oo=this.props.timeout,io,so,ao;return io=so=ao=oo,oo!=null&&typeof oo!="number"&&(io=oo.exit,so=oo.enter,ao=oo.appear!==void 0?oo.appear:so),{exit:io,enter:so,appear:ao}},ro.updateStatus=function(oo,io){if(oo===void 0&&(oo=!1),io!==null)if(this.cancelNextCallback(),io===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var so=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this);so&&forceReflow(so)}this.performEnter(oo)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},ro.performEnter=function(oo){var io=this,so=this.props.enter,ao=this.context?this.context.isMounting:oo,lo=this.props.nodeRef?[ao]:[ReactDOM.findDOMNode(this),ao],uo=lo[0],co=lo[1],fo=this.getTimeouts(),ho=ao?fo.appear:fo.enter;if(!oo&&!so||config$4.disabled){this.safeSetState({status:ENTERED},function(){io.props.onEntered(uo)});return}this.props.onEnter(uo,co),this.safeSetState({status:ENTERING},function(){io.props.onEntering(uo,co),io.onTransitionEnd(ho,function(){io.safeSetState({status:ENTERED},function(){io.props.onEntered(uo,co)})})})},ro.performExit=function(){var oo=this,io=this.props.exit,so=this.getTimeouts(),ao=this.props.nodeRef?void 0:ReactDOM.findDOMNode(this);if(!io||config$4.disabled){this.safeSetState({status:EXITED},function(){oo.props.onExited(ao)});return}this.props.onExit(ao),this.safeSetState({status:EXITING},function(){oo.props.onExiting(ao),oo.onTransitionEnd(so.exit,function(){oo.safeSetState({status:EXITED},function(){oo.props.onExited(ao)})})})},ro.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},ro.safeSetState=function(oo,io){io=this.setNextCallback(io),this.setState(oo,io)},ro.setNextCallback=function(oo){var io=this,so=!0;return this.nextCallback=function(ao){so&&(so=!1,io.nextCallback=null,oo(ao))},this.nextCallback.cancel=function(){so=!1},this.nextCallback},ro.onTransitionEnd=function(oo,io){this.setNextCallback(io);var so=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this),ao=oo==null&&!this.props.addEndListener;if(!so||ao){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var lo=this.props.nodeRef?[this.nextCallback]:[so,this.nextCallback],uo=lo[0],co=lo[1];this.props.addEndListener(uo,co)}oo!=null&&setTimeout(this.nextCallback,oo)},ro.render=function(){var oo=this.state.status;if(oo===UNMOUNTED)return null;var io=this.props,so=io.children;io.in,io.mountOnEnter,io.unmountOnExit,io.appear,io.enter,io.exit,io.timeout,io.addEndListener,io.onEnter,io.onEntering,io.onEntered,io.onExit,io.onExiting,io.onExited,io.nodeRef;var ao=_objectWithoutPropertiesLoose$3(io,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React.createElement(TransitionGroupContext.Provider,{value:null},typeof so=="function"?so(oo,ao):React.cloneElement(React.Children.only(so),ao))},to}(React.Component);Transition.contextType=TransitionGroupContext;Transition.propTypes={};function noop$5(){}Transition.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$5,onEntering:noop$5,onEntered:noop$5,onExit:noop$5,onExiting:noop$5,onExited:noop$5};Transition.UNMOUNTED=UNMOUNTED;Transition.EXITED=EXITED;Transition.ENTERING=ENTERING;Transition.ENTERED=ENTERED;Transition.EXITING=EXITING;const Transition$1=Transition;function _assertThisInitialized$3(eo){if(eo===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return eo}const defaultContextValue=void 0,DialogTransitionContext=reactExports.createContext(void 0),DialogTransitionProvider=DialogTransitionContext.Provider,useDialogTransitionContext_unstable=()=>{var eo;return(eo=reactExports.useContext(DialogTransitionContext))!==null&&eo!==void 0?eo:defaultContextValue},renderDialog_unstable=(eo,to)=>{const{content:ro,trigger:no}=eo;return jsx$1(DialogProvider,{value:to.dialog,children:jsxs(DialogSurfaceProvider,{value:to.dialogSurface,children:[no,jsx$1(Transition$1,{mountOnEnter:!0,unmountOnExit:!0,in:eo.open,nodeRef:eo.dialogRef,appear:!0,timeout:250,children:oo=>jsx$1(DialogTransitionProvider,{value:oo,children:ro})})]})})};function useDialogContextValues_unstable(eo){const{modalType:to,open:ro,dialogRef:no,dialogTitleId:oo,isNestedDialog:io,inertTrapFocus:so,requestOpenChange:ao,modalAttributes:lo,triggerAttributes:uo}=eo;return{dialog:{open:ro,modalType:to,dialogRef:no,dialogTitleId:oo,isNestedDialog:io,inertTrapFocus:so,modalAttributes:lo,triggerAttributes:uo,requestOpenChange:ao},dialogSurface:!1}}const Dialog=reactExports.memo(eo=>{const to=useDialog_unstable(eo),ro=useDialogContextValues_unstable(to);return renderDialog_unstable(to,ro)});Dialog.displayName="Dialog";const useDialogTrigger_unstable=eo=>{const to=useDialogSurfaceContext_unstable(),{children:ro,disableButtonEnhancement:no=!1,action:oo=to?"close":"open"}=eo,io=getTriggerChild(ro),so=useDialogContext_unstable(fo=>fo.requestOpenChange),{triggerAttributes:ao}=useModalAttributes(),lo=useEventCallback$3(fo=>{var ho,po;io==null||(ho=(po=io.props).onClick)===null||ho===void 0||ho.call(po,fo),fo.isDefaultPrevented()||so({event:fo,type:"triggerClick",open:oo==="open"})}),uo={...io==null?void 0:io.props,ref:io==null?void 0:io.ref,onClick:lo,...ao},co=useARIAButtonProps((io==null?void 0:io.type)==="button"||(io==null?void 0:io.type)==="a"?io.type:"div",{...uo,type:"button"});return{children:applyTriggerPropsToChildren(ro,no?uo:co)}},renderDialogTrigger_unstable=eo=>eo.children,DialogTrigger=eo=>{const to=useDialogTrigger_unstable(eo);return renderDialogTrigger_unstable(to)};DialogTrigger.displayName="DialogTrigger";DialogTrigger.isFluentTriggerComponent=!0;const useDialogSurface_unstable=(eo,to)=>{const ro=useDialogContext_unstable(ho=>ho.modalType),no=useDialogContext_unstable(ho=>ho.isNestedDialog),oo=useDialogTransitionContext_unstable(),io=useDialogContext_unstable(ho=>ho.modalAttributes),so=useDialogContext_unstable(ho=>ho.dialogRef),ao=useDialogContext_unstable(ho=>ho.requestOpenChange),lo=useDialogContext_unstable(ho=>ho.dialogTitleId),uo=useEventCallback$3(ho=>{if(isResolvedShorthand(eo.backdrop)){var po,go;(po=(go=eo.backdrop).onClick)===null||po===void 0||po.call(go,ho)}ro==="modal"&&!ho.isDefaultPrevented()&&ao({event:ho,open:!1,type:"backdropClick"})}),co=useEventCallback$3(ho=>{var po;(po=eo.onKeyDown)===null||po===void 0||po.call(eo,ho),ho.key===Escape$1&&!ho.isDefaultPrevented()&&(ao({event:ho,open:!1,type:"escapeKeyDown"}),ho.preventDefault())}),fo=optional(eo.backdrop,{renderByDefault:ro!=="non-modal",defaultProps:{"aria-hidden":"true"},elementType:"div"});return fo&&(fo.onClick=uo),{components:{backdrop:"div",root:"div"},backdrop:fo,isNestedDialog:no,transitionStatus:oo,mountNode:eo.mountNode,root:always(getIntrinsicElementProps("div",{tabIndex:-1,"aria-modal":ro!=="non-modal",role:ro==="alert"?"alertdialog":"dialog","aria-labelledby":eo["aria-label"]?void 0:lo,...eo,...io,onKeyDown:co,ref:useMergedRefs$1(to,so)}),{elementType:"div"})}},renderDialogSurface_unstable=(eo,to)=>jsxs(Portal$1,{mountNode:eo.mountNode,children:[eo.backdrop&&jsx$1(eo.backdrop,{}),jsx$1(DialogSurfaceProvider,{value:to.dialogSurface,children:jsx$1(eo.root,{})})]}),dialogSurfaceClassNames={root:"fui-DialogSurface",backdrop:"fui-DialogSurface__backdrop"},useRootBaseStyle=__resetStyles("rhhzfde","r1n1tr5u",{r:[".rhhzfde{top:0;right:0;bottom:0;left:0;padding-top:24px;padding-right:24px;padding-bottom:24px;padding-left:24px;margin-top:auto;margin-right:auto;margin-bottom:auto;margin-left:auto;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;overflow-x:unset;overflow-y:unset;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-color:var(--colorTransparentStroke);border-right-color:var(--colorTransparentStroke);border-bottom-color:var(--colorTransparentStroke);border-left-color:var(--colorTransparentStroke);border-bottom-right-radius:var(--borderRadiusXLarge);border-bottom-left-radius:var(--borderRadiusXLarge);border-top-right-radius:var(--borderRadiusXLarge);border-top-left-radius:var(--borderRadiusXLarge);display:block;-webkit-user-select:unset;-moz-user-select:unset;-ms-user-select:unset;user-select:unset;visibility:unset;position:fixed;height:fit-content;max-width:600px;max-height:100vh;box-sizing:border-box;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);}",".rhhzfde:focus{outline-style:none;}",".rhhzfde:focus-visible{outline-style:none;}",".rhhzfde[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",'.rhhzfde[data-fui-focus-visible]::after{content:"";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}',".r1n1tr5u{top:0;left:0;bottom:0;right:0;padding-top:24px;padding-left:24px;padding-bottom:24px;padding-right:24px;margin-top:auto;margin-left:auto;margin-bottom:auto;margin-right:auto;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;overflow-x:unset;overflow-y:unset;border-top-width:1px;border-left-width:1px;border-bottom-width:1px;border-right-width:1px;border-top-color:var(--colorTransparentStroke);border-left-color:var(--colorTransparentStroke);border-bottom-color:var(--colorTransparentStroke);border-right-color:var(--colorTransparentStroke);border-bottom-left-radius:var(--borderRadiusXLarge);border-bottom-right-radius:var(--borderRadiusXLarge);border-top-left-radius:var(--borderRadiusXLarge);border-top-right-radius:var(--borderRadiusXLarge);display:block;-webkit-user-select:unset;-moz-user-select:unset;-ms-user-select:unset;user-select:unset;visibility:unset;position:fixed;height:fit-content;max-width:600px;max-height:100vh;box-sizing:border-box;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);}",".r1n1tr5u:focus{outline-style:none;}",".r1n1tr5u:focus-visible{outline-style:none;}",".r1n1tr5u[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",'.r1n1tr5u[data-fui-focus-visible]::after{content:"";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}'],s:["@media (forced-colors: active){.rhhzfde[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}","@media screen and (max-width: 480px){.rhhzfde{max-width:100vw;}}","@media (forced-colors: active){.r1n1tr5u[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}","@media screen and (max-width: 480px){.r1n1tr5u{max-width:100vw;}}"]}),useRootStyles=__styles({animated:{abs64n:"fk73vx1",B3o57yi:"fc397y7",Bmy1vo4:"f1b86uth",Bkqvd7p:"f18ad807",E5pizo:"f1yzz98r",Bz10aip:"f15ofi6c"},unmounted:{},entering:{},entered:{E5pizo:"f10nrhrw",Bz10aip:"f186d0ee",abs64n:"f5p0z4x"},idle:{},exiting:{Bkqvd7p:"f1mfizis"},exited:{}},{d:[".fk73vx1{opacity:0;}",".fc397y7{transition-duration:var(--durationGentle);}",".f1b86uth{transition-property:opacity,transform,box-shadow;}",".f18ad807{transition-timing-function:var(--curveDecelerateMid);}",".f1yzz98r{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.1);}",".f15ofi6c{transform:scale(0.85) translateZ(0);}",".f10nrhrw{box-shadow:var(--shadow64);}",".f186d0ee{transform:scale(1) translateZ(0);}",".f5p0z4x{opacity:1;}",".f1mfizis{transition-timing-function:var(--curveAccelerateMin);}"]}),useBackdropBaseStyle=__resetStyles("raidwwn","r17vltcu",[".raidwwn{top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(0, 0, 0, 0.4);position:fixed;transition-duration:var(--durationGentle);transition-timing-function:var(--curveLinear);transition-property:opacity;will-change:opacity;opacity:0;}",".r17vltcu{top:0px;left:0px;bottom:0px;right:0px;background-color:rgba(0, 0, 0, 0.4);position:fixed;transition-duration:var(--durationGentle);transition-timing-function:var(--curveLinear);transition-property:opacity;will-change:opacity;opacity:0;}"]),useBackdropStyles$1=__styles({nestedDialogBackdrop:{De3pzq:"f1c21dwh"},unmounted:{},entering:{},entered:{abs64n:"f5p0z4x"},idle:{},exiting:{Bkqvd7p:"f1mfizis"},exited:{}},{d:[".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f5p0z4x{opacity:1;}",".f1mfizis{transition-timing-function:var(--curveAccelerateMin);}"]}),useDialogSurfaceStyles_unstable=eo=>{const{isNestedDialog:to,root:ro,backdrop:no,transitionStatus:oo}=eo,io=useRootBaseStyle(),so=useRootStyles(),ao=useBackdropBaseStyle(),lo=useBackdropStyles$1();return ro.className=mergeClasses(dialogSurfaceClassNames.root,io,oo&&so.animated,oo&&so[oo],ro.className),no&&(no.className=mergeClasses(dialogSurfaceClassNames.backdrop,ao,to&&lo.nestedDialogBackdrop,oo&&lo[oo],no.className)),eo};function useDialogSurfaceContextValues_unstable(eo){return{dialogSurface:!0}}const DialogSurface=reactExports.forwardRef((eo,to)=>{const ro=useDialogSurface_unstable(eo,to),no=useDialogSurfaceContextValues_unstable();return useDialogSurfaceStyles_unstable(ro),useCustomStyleHook("useDialogSurfaceStyles_unstable")(ro),renderDialogSurface_unstable(ro,no)});DialogSurface.displayName="DialogSurface";const useCardSelectable=(eo,{referenceLabel:to,referenceId:ro},no)=>{const{checkbox:oo={},onSelectionChange:io,floatingAction:so,onClick:ao,onKeyDown:lo}=eo,{findAllFocusable:uo}=useFocusFinders(),co=reactExports.useRef(null),[fo,ho]=useControllableState({state:eo.selected,defaultState:eo.defaultSelected,initialState:!1}),po=[eo.selected,eo.defaultSelected,io].some(wo=>typeof wo<"u"),[go,vo]=reactExports.useState(!1),bo=reactExports.useCallback(wo=>{if(!no.current)return!1;const Co=uo(no.current),Oo=wo.target,Ao=Co.some(No=>No.contains(Oo)),Ro=(co==null?void 0:co.current)===Oo;return Ao&&!Ro},[no,uo]),xo=reactExports.useCallback(wo=>{if(bo(wo))return;const Co=!fo;ho(Co),io&&io(wo,{selected:Co})},[io,fo,ho,bo]),_o=reactExports.useCallback(wo=>{[Enter].includes(wo.key)&&(wo.preventDefault(),xo(wo))},[xo]),Eo=reactExports.useMemo(()=>{if(!po||so)return;const wo={};return ro?wo["aria-labelledby"]=ro:to&&(wo["aria-label"]=to),optional(oo,{defaultProps:{ref:co,type:"checkbox",checked:fo,onChange:Co=>xo(Co),onFocus:()=>vo(!0),onBlur:()=>vo(!1),...wo},elementType:"input"})},[oo,so,fo,po,xo,ro,to]),So=reactExports.useMemo(()=>{if(so)return optional(so,{defaultProps:{ref:co},elementType:"div"})},[so]),To=reactExports.useMemo(()=>po?{onClick:mergeCallbacks(ao,xo),onKeyDown:mergeCallbacks(lo,_o)}:null,[po,xo,ao,lo,_o]);return{selected:fo,selectable:po,selectFocused:go,selectableCardProps:To,checkboxSlot:Eo,floatingActionSlot:So}},cardContext=reactExports.createContext(void 0),cardContextDefaultValue={selectableA11yProps:{referenceId:void 0,setReferenceId(){},referenceLabel:void 0,setReferenceLabel(){}}},CardProvider=cardContext.Provider,useCardContext_unstable=()=>{var eo;return(eo=reactExports.useContext(cardContext))!==null&&eo!==void 0?eo:cardContextDefaultValue},focusMap={off:void 0,"no-tab":"limited-trap-focus","tab-exit":"limited","tab-only":"unlimited"},useCardInteractive=({focusMode:eo="off",...to})=>{const ro=["onClick","onDoubleClick","onMouseUp","onMouseDown","onPointerUp","onPointerDown","onTouchStart","onTouchEnd","onDragStart","onDragEnd"].some(io=>to[io]),oo={...useFocusableGroup({tabBehavior:focusMap[ro?"no-tab":eo]}),tabIndex:0};return{interactive:ro,focusAttributes:!ro&&eo==="off"?null:oo}},useCard_unstable=(eo,to)=>{const{appearance:ro="filled",orientation:no="vertical",size:oo="medium"}=eo,[io,so]=reactExports.useState(cardContextDefaultValue.selectableA11yProps.referenceId),[ao,lo]=reactExports.useState(cardContextDefaultValue.selectableA11yProps.referenceId),uo=useFocusWithin(),{selectable:co,selected:fo,selectableCardProps:ho,selectFocused:po,checkboxSlot:go,floatingActionSlot:vo}=useCardSelectable(eo,{referenceId:io,referenceLabel:ao},uo),bo=useMergedRefs$1(uo,to),{interactive:xo,focusAttributes:_o}=useCardInteractive(eo);return{appearance:ro,orientation:no,size:oo,interactive:xo,selectable:co,selectFocused:po,selected:fo,selectableA11yProps:{setReferenceId:so,referenceId:io,referenceLabel:ao,setReferenceLabel:lo},components:{root:"div",floatingAction:"div",checkbox:"input"},root:always(getIntrinsicElementProps("div",{ref:bo,role:"group",..._o,...eo,...ho}),{elementType:"div"}),floatingAction:vo,checkbox:go}},renderCard_unstable=(eo,to)=>jsx$1(eo.root,{children:jsxs(CardProvider,{value:to,children:[eo.checkbox?jsx$1(eo.checkbox,{}):null,eo.floatingAction?jsx$1(eo.floatingAction,{}):null,eo.root.children]})}),cardHeaderClassNames={root:"fui-CardHeader",image:"fui-CardHeader__image",header:"fui-CardHeader__header",description:"fui-CardHeader__description",action:"fui-CardHeader__action"},useStyles$n=__styles({root:{Bkc6ea2:"fkufhic",mc9l5x:"f13qh94s",t4k1zu:"f8a668j",Bt984gj:"f122n59"},image:{mc9l5x:"ftuwxu6",t21cq0:["fql5097","f6yss9k"],Br312pm:"fwpfdsa",Ijaq50:"fldnz9j"},header:{Br312pm:"fd46tj4",Ijaq50:"f16hsg94",mc9l5x:"f22iagw"},description:{Br312pm:"fd46tj4",Ijaq50:"faunodf",mc9l5x:"f22iagw"},action:{Frg6f3:["f6yss9k","fql5097"],Br312pm:"fis13di",Ijaq50:"fldnz9j"}},{d:[".fkufhic{--fui-CardHeader--gap:12px;}",".f13qh94s{display:grid;}",".f8a668j{grid-auto-columns:min-content 1fr min-content;}",".f122n59{align-items:center;}",".ftuwxu6{display:inline-flex;}",".fql5097{margin-right:var(--fui-CardHeader--gap);}",".f6yss9k{margin-left:var(--fui-CardHeader--gap);}",".fwpfdsa{grid-column-start:1;}",".fldnz9j{grid-row-start:span 2;}",".fd46tj4{grid-column-start:2;}",".f16hsg94{grid-row-start:1;}",".f22iagw{display:flex;}",".faunodf{grid-row-start:2;}",".fis13di{grid-column-start:3;}"]}),useCardHeaderStyles_unstable=eo=>{const to=useStyles$n();return eo.root.className=mergeClasses(cardHeaderClassNames.root,to.root,eo.root.className),eo.image&&(eo.image.className=mergeClasses(cardHeaderClassNames.image,to.image,eo.image.className)),eo.header&&(eo.header.className=mergeClasses(cardHeaderClassNames.header,to.header,eo.header.className)),eo.description&&(eo.description.className=mergeClasses(cardHeaderClassNames.description,to.description,eo.description.className)),eo.action&&(eo.action.className=mergeClasses(cardHeaderClassNames.action,to.action,eo.action.className)),eo},cardClassNames={root:"fui-Card",floatingAction:"fui-Card__floatingAction",checkbox:"fui-Card__checkbox"},useStyles$m=__styles({root:{B68tc82:"f1p9o1ba",Bmxbyg5:"f1sil6mw",Bbmb7ep:["fifeqxg","f899z7z"],Beyfa6y:["f899z7z","fifeqxg"],B7oj6ja:["f4h3tyx","f18ur2pz"],Btl43ni:["f18ur2pz","f4h3tyx"],z8tnut:"f1lplnzb",z189sj:["f10m5gbb","f1k04kkk"],Byoj8tv:"fhftqfp",uwmqm3:["f1k04kkk","f10m5gbb"],i8kkvl:"fxsr4vj",Belr9w4:"fcvsdzp",mc9l5x:"f22iagw",qhf8xq:"f10pi13n",B7ck84d:"f1ewtqcl",sj55zd:"f19n0e5",E3zdtr:"f1mdlcz9",bn5sak:"frwkxtg",Eqx8gd:["f1n6gb5g","f15yvnhg"],B1piin3:["f15yvnhg","f1n6gb5g"],By385i5:"fo72kxq",Bsft5z2:"f13zj6fq",B80jsxd:"f1nwj1ja",Bm2nyyq:"f8rth92",Barhvk9:["flthirb","ftkbnf5"],Bw17bha:"f1lh990p",vfts7:["ftkbnf5","flthirb"],xrcqlc:"f6czdpx",Ihftqj:["f13hvwk3","f1en4csx"],Bcgy8vk:"f1i1u9k0",Bhxzhr1:["f1en4csx","f13hvwk3"],B3778ie:["f1qnomq5","f2fl922"],d9w3h3:["f2fl922","f1qnomq5"],Bl18szs:["f1anhtl","f1n2zcl3"],B4j8arr:["f1n2zcl3","f1anhtl"],B2jhnfs:"f16v3d5c",wiictr:"f1su8t2g"},focused:{Brovlpu:"ftqa4ok",B486eqv:"f2hkw1w",B8q5s1w:"f8hki3x",Bci5o5g:["f1d2448m","ffh67wi"],n8qw10:"f1bjia2o",Bdrgwmp:["ffh67wi","f1d2448m"],Bb7d1vk:"f226i61",zhwhgb:["f13kzufm","fsx75g8"],dhy2o1:"flujwa2",Gfyso:["fsx75g8","f13kzufm"],Bm4h7ae:"f15bsgw9",B7ys5i9:"f14e48fq",Busjfv9:"f18yb2kv",Bhk32uz:"fd6o370",Bf4ptjt:"fh1cnn4",kclons:["fy7oxxb","f184ne2d"],Bhdgwq3:"fpukqih",Blkhhs4:["f184ne2d","fy7oxxb"],Bqtpl0w:"f99gebs",clg4pj:["f13b0oaq","f8t2bz6"],hgwjuy:"f1jvq617",Bonggc9:["f8t2bz6","f13b0oaq"],B1tsrr9:["f11unbnk","fbd201q"],Dah5zi:["fbd201q","f11unbnk"],Bkh64rk:["f12nqxso","f1uguk4w"],qqdqy8:["f1uguk4w","f12nqxso"],B6dhp37:"f1dvezut",i03rao:["fd0oaoj","f1cwg4i8"],Boxcth7:"fjvm52t",Bsom6fd:["f1cwg4i8","fd0oaoj"],J0r882:"f15fr7a0",Bule8hv:["fwsq40z","fy0y4wt"],Bjwuhne:"f34ld9f",Ghsupd:["fy0y4wt","fwsq40z"]},selectableFocused:{Brovlpu:"ftqa4ok",B486eqv:"f2hkw1w",Bssx7fj:"f1b1k54r",uh7if5:["f4ne723","fqqcjud"],clntm0:"fh7aioi",Dlk2r6:["fqqcjud","f4ne723"],Bm3wd5j:"f1k55ka9",Bbrhkcr:["fgclinu","f16pcs8n"],f1oku:"fycbxed",aywvf2:["f16pcs8n","fgclinu"],B2j2mmj:"ffht0p2",wigs8:"f1p0ul1q",pbfy6t:"f1c901ms",B0v4ure:"f1alokd7",ghq09:"f78i1la",B24cy0v:["f1kvsw7t","f1bw8brt"],Bwckmig:"f8k7e5g",Bvwlmkc:["f1bw8brt","f1kvsw7t"],Bbgo44z:"f125hn41",Bil7v7r:["fgxkx34","f1v56tyl"],skfxo0:"fdxas6f",jo1ztg:["f1v56tyl","fgxkx34"],Ba3ybja:["fxwickw","f1ia5cve"],az1dzo:["f1ia5cve","fxwickw"],vppk2z:["f194aguw","fqicc6c"],B6352mv:["fqicc6c","f194aguw"],nr063g:"fq4eyks",Blmvk6g:["f1ya6x16","ftuszwa"],Bsiemmq:"f1e2iu44",B98u21t:["ftuszwa","f1ya6x16"],B2pnrqr:"f1amxum7",B29w5g4:["f1cec8w7","f554mv0"],Bhhzhcn:"f1sj6kbr",Bec0n69:["f554mv0","f1cec8w7"]},orientationHorizontal:{Beiy3e4:"f1063pyq",Bt984gj:"f122n59",Bnoktp0:"fpfyeui",Idhjb2:"fwi74qw",ihgzqh:["ffcmwrh","f6ppoih"],Bgp6ld0:["f1dc9p14","fd933vt"],Bbucpmy:"f18esqgw"},orientationVertical:{Beiy3e4:"f1vx9l62",Bt4kzjz:["fobhde4","fx5r7kn"],B1ou843:["fx5r7kn","fobhde4"],y1433z:"f19chtn8",B7egwnw:"fuvs6re",B49b4xf:"fy4glsf"},sizeSmall:{B7balbw:"f1pi9uxy",B1h88n7:"f1h1zgly"},sizeMedium:{B7balbw:"frsmuga",B1h88n7:"fuldkky"},sizeLarge:{B7balbw:"f1qua4xo",B1h88n7:"fimkt6v"},filled:{De3pzq:"fxugw4r",E5pizo:"f1whvlc6",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"]},filledInteractive:{Bceei9c:"f1k6fduh",De3pzq:"fxugw4r",E5pizo:"f1whvlc6",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"],Jwef8y:"f1knas48",Bvxd0ez:"f1m145df",ecr2s2:"fb40n2d"},filledInteractiveSelected:{De3pzq:"f1nfm20t",B0n5ga8:"f16eln5f",s924m2:["fa2okxs","fg4zq3l"],B1q35kw:"ff6932p",Gp14am:["fg4zq3l","fa2okxs"],Jwef8y:"f1kz6goq"},filledAlternative:{De3pzq:"f1dmdbja",E5pizo:"f1whvlc6",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"]},filledAlternativeInteractive:{Bceei9c:"f1k6fduh",De3pzq:"f1dmdbja",E5pizo:"f1whvlc6",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"],Jwef8y:"f1uvynv3",Bvxd0ez:"f1m145df",ecr2s2:"f1yhgkbh"},filledAlternativeInteractiveSelected:{De3pzq:"fjxa0vh",B0n5ga8:"f16eln5f",s924m2:["fa2okxs","fg4zq3l"],B1q35kw:"ff6932p",Gp14am:["fg4zq3l","fa2okxs"],Jwef8y:"fehi0vp"},outline:{De3pzq:"f1c21dwh",E5pizo:"f1couhl3",B0n5ga8:"ft83z1f",s924m2:["f1g4150c","f192dr6e"],B1q35kw:"f1qnawh6",Gp14am:["f192dr6e","f1g4150c"]},outlineInteractive:{Bceei9c:"f1k6fduh",De3pzq:"f1c21dwh",E5pizo:"f1couhl3",B0n5ga8:"ft83z1f",s924m2:["f1g4150c","f192dr6e"],B1q35kw:"f1qnawh6",Gp14am:["f192dr6e","f1g4150c"],Jwef8y:"fjxutwb",Be0v6ae:"f1llr77y",B5kxglz:["fzk0khw","fjj8tog"],B3pwyw6:"fb1u8ub",Bymgtzf:["fjj8tog","fzk0khw"],ecr2s2:"fophhak",dmfk:"f1uohb70",B4ofi8:["f1jm7v1n","f1bus3rq"],jgq6uv:"f1fbu7rr",Baxewws:["f1bus3rq","f1jm7v1n"]},outlineInteractiveSelected:{De3pzq:"f1q9pm1r",B0n5ga8:"f16eln5f",s924m2:["fa2okxs","fg4zq3l"],B1q35kw:"ff6932p",Gp14am:["fg4zq3l","fa2okxs"],Jwef8y:"fg59vm4"},subtle:{De3pzq:"fhovq9v",E5pizo:"f1couhl3",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"]},subtleInteractive:{Bceei9c:"f1k6fduh",De3pzq:"fhovq9v",E5pizo:"f1couhl3",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"],Jwef8y:"f1t94bn6",ecr2s2:"f1wfn5kd"},subtleInteractiveSelected:{De3pzq:"fq5gl1p",B0n5ga8:"f16eln5f",s924m2:["fa2okxs","fg4zq3l"],B1q35kw:"ff6932p",Gp14am:["fg4zq3l","fa2okxs"],Jwef8y:"f1uqaxdt"},highContrastSelected:{ycbfsm:"fkc42ay",Bsw6fvg:"f1rirnrt",Bbusuzp:"f1lkg8j3",xgfqdd:"f1nkj0oa",Bmmdzwq:"fey3rwa",zkpvhj:["f5jhx11","fff9uym"],B20bydw:"fm7n0jy",Bwwwggl:["fff9uym","f5jhx11"]},highContrastInteractive:{h1vhog:"fpfvv3l",kslmdy:"f1oamsm6",Baaf6ca:"f1il21bs",x9zz3d:"fnn5dk0",Bmmdzwq:"fey3rwa",zkpvhj:["f5jhx11","fff9uym"],B20bydw:"fm7n0jy",Bwwwggl:["fff9uym","f5jhx11"]},select:{qhf8xq:"f1euv43f",Bhzewxz:"fqclxi7",j35jbq:["fiv86kb","f36uhnt"],Bj3rh1h:"f19g0ac"},hiddenCheckbox:{B68tc82:"f1p9o1ba",Bmxbyg5:"f1sil6mw",a9b677:"frkrog8",Bqenvij:"f1mpe4l3",qhf8xq:"f1euv43f",Bh84pgu:"fmf1zke",Bgl5zvf:"f1wch0ki",Huce71:"fz5stix"}},{d:[".f1p9o1ba{overflow-x:hidden;}",".f1sil6mw{overflow-y:hidden;}",".fifeqxg{border-bottom-right-radius:var(--fui-Card--border-radius);}",".f899z7z{border-bottom-left-radius:var(--fui-Card--border-radius);}",".f4h3tyx{border-top-right-radius:var(--fui-Card--border-radius);}",".f18ur2pz{border-top-left-radius:var(--fui-Card--border-radius);}",".f1lplnzb{padding-top:var(--fui-Card--size);}",".f10m5gbb{padding-right:var(--fui-Card--size);}",".f1k04kkk{padding-left:var(--fui-Card--size);}",".fhftqfp{padding-bottom:var(--fui-Card--size);}",".fxsr4vj{column-gap:var(--fui-Card--size);}",".fcvsdzp{row-gap:var(--fui-Card--size);}",".f22iagw{display:flex;}",".f10pi13n{position:relative;}",".f1ewtqcl{box-sizing:border-box;}",".f19n0e5{color:var(--colorNeutralForeground1);}",".f1mdlcz9::after{position:absolute;}",".frwkxtg::after{top:0;}",".f1n6gb5g::after{left:0;}",".f15yvnhg::after{right:0;}",".fo72kxq::after{bottom:0;}",'.f13zj6fq::after{content:"";}',".f1nwj1ja::after{pointer-events:none;}",".f8rth92::after{border-top-style:solid;}",".flthirb::after{border-right-style:solid;}",".ftkbnf5::after{border-left-style:solid;}",".f1lh990p::after{border-bottom-style:solid;}",".f6czdpx::after{border-top-width:var(--strokeWidthThin);}",".f13hvwk3::after{border-right-width:var(--strokeWidthThin);}",".f1en4csx::after{border-left-width:var(--strokeWidthThin);}",".f1i1u9k0::after{border-bottom-width:var(--strokeWidthThin);}",".f1qnomq5::after{border-bottom-right-radius:var(--fui-Card--border-radius);}",".f2fl922::after{border-bottom-left-radius:var(--fui-Card--border-radius);}",".f1anhtl::after{border-top-right-radius:var(--fui-Card--border-radius);}",".f1n2zcl3::after{border-top-left-radius:var(--fui-Card--border-radius);}",".f16v3d5c>.fui-CardHeader,.f16v3d5c>.fui-CardFooter{flex-shrink:0;}",".f1su8t2g>:not(.fui-CardPreview):not(.fui-CardHeader):not(.fui-CardFooter){flex-grow:1;}",".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",'.f15bsgw9[data-fui-focus-visible]::after{content:"";}',".f14e48fq[data-fui-focus-visible]::after{position:absolute;}",".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}",".fd6o370[data-fui-focus-visible]::after{z-index:1;}",".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}",".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}",".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}",".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}",".f99gebs[data-fui-focus-visible]::after{border-top-width:var(--strokeWidthThick);}",".f13b0oaq[data-fui-focus-visible]::after{border-right-width:var(--strokeWidthThick);}",".f8t2bz6[data-fui-focus-visible]::after{border-left-width:var(--strokeWidthThick);}",".f1jvq617[data-fui-focus-visible]::after{border-bottom-width:var(--strokeWidthThick);}",".f11unbnk[data-fui-focus-visible]::after{border-bottom-right-radius:var(--fui-Card--border-radius);}",".fbd201q[data-fui-focus-visible]::after{border-bottom-left-radius:var(--fui-Card--border-radius);}",".f12nqxso[data-fui-focus-visible]::after{border-top-right-radius:var(--fui-Card--border-radius);}",".f1uguk4w[data-fui-focus-visible]::after{border-top-left-radius:var(--fui-Card--border-radius);}",".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}",".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}",".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}",".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}",".f15fr7a0[data-fui-focus-visible]::after{top:calc(0px - var(--strokeWidthThick) - -2px);}",".fwsq40z[data-fui-focus-visible]::after{right:calc(0px - var(--strokeWidthThick) - -2px);}",".fy0y4wt[data-fui-focus-visible]::after{left:calc(0px - var(--strokeWidthThick) - -2px);}",".f34ld9f[data-fui-focus-visible]::after{bottom:calc(0px - var(--strokeWidthThick) - -2px);}",".f1b1k54r[data-fui-focus-within]:focus-within{border-top-color:transparent;}",".f4ne723[data-fui-focus-within]:focus-within{border-right-color:transparent;}",".fqqcjud[data-fui-focus-within]:focus-within{border-left-color:transparent;}",".fh7aioi[data-fui-focus-within]:focus-within{border-bottom-color:transparent;}",'.ffht0p2[data-fui-focus-within]:focus-within::after{content:"";}',".f1p0ul1q[data-fui-focus-within]:focus-within::after{position:absolute;}",".f1c901ms[data-fui-focus-within]:focus-within::after{pointer-events:none;}",".f1alokd7[data-fui-focus-within]:focus-within::after{z-index:1;}",".f78i1la[data-fui-focus-within]:focus-within::after{border-top-style:solid;}",".f1kvsw7t[data-fui-focus-within]:focus-within::after{border-right-style:solid;}",".f1bw8brt[data-fui-focus-within]:focus-within::after{border-left-style:solid;}",".f8k7e5g[data-fui-focus-within]:focus-within::after{border-bottom-style:solid;}",".f125hn41[data-fui-focus-within]:focus-within::after{border-top-width:var(--strokeWidthThick);}",".fgxkx34[data-fui-focus-within]:focus-within::after{border-right-width:var(--strokeWidthThick);}",".f1v56tyl[data-fui-focus-within]:focus-within::after{border-left-width:var(--strokeWidthThick);}",".fdxas6f[data-fui-focus-within]:focus-within::after{border-bottom-width:var(--strokeWidthThick);}",".fxwickw[data-fui-focus-within]:focus-within::after{border-bottom-right-radius:var(--fui-Card--border-radius);}",".f1ia5cve[data-fui-focus-within]:focus-within::after{border-bottom-left-radius:var(--fui-Card--border-radius);}",".f194aguw[data-fui-focus-within]:focus-within::after{border-top-right-radius:var(--fui-Card--border-radius);}",".fqicc6c[data-fui-focus-within]:focus-within::after{border-top-left-radius:var(--fui-Card--border-radius);}",".fq4eyks[data-fui-focus-within]:focus-within::after{border-top-color:var(--colorStrokeFocus2);}",".f1ya6x16[data-fui-focus-within]:focus-within::after{border-right-color:var(--colorStrokeFocus2);}",".ftuszwa[data-fui-focus-within]:focus-within::after{border-left-color:var(--colorStrokeFocus2);}",".f1e2iu44[data-fui-focus-within]:focus-within::after{border-bottom-color:var(--colorStrokeFocus2);}",".f1amxum7[data-fui-focus-within]:focus-within::after{top:calc(0px - var(--strokeWidthThick) - -2px);}",".f1cec8w7[data-fui-focus-within]:focus-within::after{right:calc(0px - var(--strokeWidthThick) - -2px);}",".f554mv0[data-fui-focus-within]:focus-within::after{left:calc(0px - var(--strokeWidthThick) - -2px);}",".f1sj6kbr[data-fui-focus-within]:focus-within::after{bottom:calc(0px - var(--strokeWidthThick) - -2px);}",".f1063pyq{flex-direction:row;}",".f122n59{align-items:center;}",".fpfyeui>.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}",".fwi74qw>.fui-CardPreview{margin-bottom:calc(var(--fui-Card--size) * -1);}",'.ffcmwrh>:not([aria-hidden="true"]).fui-CardPreview:first-of-type{margin-left:calc(var(--fui-Card--size) * -1);}','.f6ppoih>:not([aria-hidden="true"]).fui-CardPreview:first-of-type{margin-right:calc(var(--fui-Card--size) * -1);}','.f1dc9p14>:not([aria-hidden="true"]).fui-CardPreview:last-of-type{margin-right:calc(var(--fui-Card--size) * -1);}','.fd933vt>:not([aria-hidden="true"]).fui-CardPreview:last-of-type{margin-left:calc(var(--fui-Card--size) * -1);}',".f18esqgw>.fui-CardHeader:last-of-type,.f18esqgw>.fui-CardFooter:last-of-type{flex-grow:1;}",".f1vx9l62{flex-direction:column;}",".fobhde4>.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}",".fx5r7kn>.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}",'.f19chtn8>:not([aria-hidden="true"]).fui-CardPreview:first-of-type{margin-top:calc(var(--fui-Card--size) * -1);}',".fuvs6re>.fui-Card__floatingAction+.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}",'.fy4glsf>:not([aria-hidden="true"]).fui-CardPreview:last-of-type{margin-bottom:calc(var(--fui-Card--size) * -1);}',".f1pi9uxy{--fui-Card--size:8px;}",".f1h1zgly{--fui-Card--border-radius:var(--borderRadiusSmall);}",".frsmuga{--fui-Card--size:12px;}",".fuldkky{--fui-Card--border-radius:var(--borderRadiusMedium);}",".f1qua4xo{--fui-Card--size:16px;}",".fimkt6v{--fui-Card--border-radius:var(--borderRadiusLarge);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f1whvlc6{box-shadow:var(--shadow4);}",".f16gxe2i::after{border-top-color:var(--colorTransparentStroke);}",".fpgykix::after{border-right-color:var(--colorTransparentStroke);}",".fzybk4o::after{border-left-color:var(--colorTransparentStroke);}",".f1osi826::after{border-bottom-color:var(--colorTransparentStroke);}",".f1k6fduh{cursor:pointer;}",".f1nfm20t{background-color:var(--colorNeutralBackground1Selected);}",".f16eln5f::after{border-top-color:var(--colorNeutralStroke1Selected);}",".fa2okxs::after{border-right-color:var(--colorNeutralStroke1Selected);}",".fg4zq3l::after{border-left-color:var(--colorNeutralStroke1Selected);}",".ff6932p::after{border-bottom-color:var(--colorNeutralStroke1Selected);}",".f1dmdbja{background-color:var(--colorNeutralBackground2);}",".fjxa0vh{background-color:var(--colorNeutralBackground2Selected);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f1couhl3{box-shadow:none;}",".ft83z1f::after{border-top-color:var(--colorNeutralStroke1);}",".f1g4150c::after{border-right-color:var(--colorNeutralStroke1);}",".f192dr6e::after{border-left-color:var(--colorNeutralStroke1);}",".f1qnawh6::after{border-bottom-color:var(--colorNeutralStroke1);}",".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}",".fhovq9v{background-color:var(--colorSubtleBackground);}",".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}",".f1euv43f{position:absolute;}",".fqclxi7{top:4px;}",".fiv86kb{right:4px;}",".f36uhnt{left:4px;}",".f19g0ac{z-index:1;}",".frkrog8{width:1px;}",".f1mpe4l3{height:1px;}",".fmf1zke{clip:rect(0 0 0 0);}",".f1wch0ki{clip-path:inset(50%);}",".fz5stix{white-space:nowrap;}"],f:[".ftqa4ok:focus{outline-style:none;}"],i:[".f2hkw1w:focus-visible{outline-style:none;}"],m:[["@media (forced-colors: active){.f226i61[data-fui-focus-visible]::after{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f13kzufm[data-fui-focus-visible]::after{border-right-color:Highlight;}.fsx75g8[data-fui-focus-visible]::after{border-left-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.flujwa2[data-fui-focus-visible]::after{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1k55ka9[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f16pcs8n[data-fui-focus-within]:focus-within::after{border-left-color:Highlight;}.fgclinu[data-fui-focus-within]:focus-within::after{border-right-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fycbxed[data-fui-focus-within]:focus-within::after{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1lkg8j3{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1nkj0oa .fui-CardPreview,.f1nkj0oa .fui-CardFooter{forced-color-adjust:auto;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fey3rwa::after{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f5jhx11::after{border-right-color:Highlight;}.fff9uym::after{border-left-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fm7n0jy::after{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fpfvv3l:hover,.fpfvv3l :active{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1oamsm6:hover,.f1oamsm6 :active{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1il21bs:hover,.f1il21bs :active{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fnn5dk0:hover .fui-CardPreview,.fnn5dk0 :active .fui-CardPreview,.fnn5dk0:hover .fui-CardFooter,.fnn5dk0 :active .fui-CardFooter{forced-color-adjust:auto;}}",{m:"(forced-colors: active)"}]],h:[".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}",".f1m145df:hover{box-shadow:var(--shadow8);}",".f1kz6goq:hover{background-color:var(--colorNeutralBackground1Selected);}",".f1uvynv3:hover{background-color:var(--colorNeutralBackground2Hover);}",".fehi0vp:hover{background-color:var(--colorNeutralBackground2Selected);}",".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}",".f1llr77y:hover::after{border-top-color:var(--colorNeutralStroke1Hover);}",".fzk0khw:hover::after{border-right-color:var(--colorNeutralStroke1Hover);}",".fjj8tog:hover::after{border-left-color:var(--colorNeutralStroke1Hover);}",".fb1u8ub:hover::after{border-bottom-color:var(--colorNeutralStroke1Hover);}",".fg59vm4:hover{background-color:var(--colorTransparentBackgroundSelected);}",".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}",".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}"],a:[".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}",".f1yhgkbh:active{background-color:var(--colorNeutralBackground2Pressed);}",".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}",".f1uohb70:active::after{border-top-color:var(--colorNeutralStroke1Pressed);}",".f1jm7v1n:active::after{border-right-color:var(--colorNeutralStroke1Pressed);}",".f1bus3rq:active::after{border-left-color:var(--colorNeutralStroke1Pressed);}",".f1fbu7rr:active::after{border-bottom-color:var(--colorNeutralStroke1Pressed);}",".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]}),useCardStyles_unstable=eo=>{const to=useStyles$m(),ro={horizontal:to.orientationHorizontal,vertical:to.orientationVertical},no={small:to.sizeSmall,medium:to.sizeMedium,large:to.sizeLarge},oo={filled:to.filled,"filled-alternative":to.filledAlternative,outline:to.outline,subtle:to.subtle},io={filled:to.filledInteractiveSelected,"filled-alternative":to.filledAlternativeInteractiveSelected,outline:to.outlineInteractiveSelected,subtle:to.subtleInteractiveSelected},so={filled:to.filledInteractive,"filled-alternative":to.filledAlternativeInteractive,outline:to.outlineInteractive,subtle:to.subtleInteractive},ao=eo.interactive||eo.selectable,lo=reactExports.useMemo(()=>eo.selectable?eo.selectFocused?to.selectableFocused:"":to.focused,[eo.selectFocused,eo.selectable,to.focused,to.selectableFocused]);return eo.root.className=mergeClasses(cardClassNames.root,to.root,ro[eo.orientation],no[eo.size],oo[eo.appearance],ao&&so[eo.appearance],eo.selected&&io[eo.appearance],lo,ao&&to.highContrastInteractive,eo.selected&&to.highContrastSelected,eo.root.className),eo.floatingAction&&(eo.floatingAction.className=mergeClasses(cardClassNames.floatingAction,to.select,eo.floatingAction.className)),eo.checkbox&&(eo.checkbox.className=mergeClasses(cardClassNames.checkbox,to.hiddenCheckbox,eo.checkbox.className)),eo};function useCardContextValue({selectableA11yProps:eo}){return{selectableA11yProps:eo}}const Card=reactExports.forwardRef((eo,to)=>{const ro=useCard_unstable(eo,to),no=useCardContextValue(ro);return useCardStyles_unstable(ro),renderCard_unstable(ro,no)});Card.displayName="Card";function getChildWithId(eo){function to(ro){return reactExports.isValidElement(ro)&&!!ro.props.id}return reactExports.Children.toArray(eo).find(to)}function getReferenceId(eo,to,ro){return eo||(to!=null&&to.props.id?to.props.id:ro)}const useCardHeader_unstable=(eo,to)=>{const{image:ro,header:no,description:oo,action:io}=eo,{selectableA11yProps:{referenceId:so,setReferenceId:ao}}=useCardContext_unstable(),lo=reactExports.useRef(null),uo=reactExports.useRef(!1),co=useId$1(cardHeaderClassNames.header,so),fo=optional(no,{renderByDefault:!0,defaultProps:{ref:lo,id:uo.current?void 0:so},elementType:"div"});return reactExports.useEffect(()=>{var ho;const po=uo.current||(ho=lo.current)===null||ho===void 0?void 0:ho.id,go=getChildWithId(fo==null?void 0:fo.children);uo.current=!!go,ao(getReferenceId(po,go,co))},[co,no,fo,ao]),{components:{root:"div",image:"div",header:"div",description:"div",action:"div"},root:always(getIntrinsicElementProps("div",{ref:to,...eo}),{elementType:"div"}),image:optional(ro,{elementType:"div"}),header:fo,description:optional(oo,{elementType:"div"}),action:optional(io,{elementType:"div"})}},renderCardHeader_unstable=eo=>jsxs(eo.root,{children:[eo.image&&jsx$1(eo.image,{}),jsx$1(eo.header,{}),eo.description&&jsx$1(eo.description,{}),eo.action&&jsx$1(eo.action,{})]}),CardHeader=reactExports.forwardRef((eo,to)=>{const ro=useCardHeader_unstable(eo,to);return useCardHeaderStyles_unstable(ro),renderCardHeader_unstable(ro)});CardHeader.displayName="CardHeader";function getIntentIcon(eo){switch(eo){case"info":return reactExports.createElement(InfoFilled,null);case"warning":return reactExports.createElement(WarningFilled,null);case"error":return reactExports.createElement(ErrorCircleFilled,null);case"success":return reactExports.createElement(CheckmarkCircleFilled,null);default:return null}}function useMessageBarReflow(eo=!1){const{targetDocument:to}=useFluent(),ro=reactExports.useReducer(()=>({}),{})[1],no=reactExports.useRef(!1),oo=reactExports.useRef(null),io=reactExports.useRef(-1),so=reactExports.useCallback(lo=>{const uo=lo[0],co=uo==null?void 0:uo.borderBoxSize[0];if(!co||!uo)return;const{inlineSize:fo}=co,{target:ho}=uo;if(!isHTMLElement$6(ho))return;let po;if(no.current)io.current{var uo;if(!eo||!lo||!(to!=null&&to.defaultView))return;(uo=oo.current)===null||uo===void 0||uo.disconnect();const co=to.defaultView,fo=new co.ResizeObserver(so);oo.current=fo,fo.observe(lo,{box:"border-box"})},[to,so,eo]);return reactExports.useEffect(()=>()=>{var lo;(lo=oo.current)===null||lo===void 0||lo.disconnect()},[]),{ref:ao,reflowing:no.current}}const messageBarTransitionContext=reactExports.createContext(void 0),messageBarTransitionContextDefaultValue={className:"",nodeRef:reactExports.createRef()};messageBarTransitionContext.Provider;const useMessageBarTransitionContext=()=>{var eo;return(eo=reactExports.useContext(messageBarTransitionContext))!==null&&eo!==void 0?eo:messageBarTransitionContextDefaultValue},useMessageBar_unstable=(eo,to)=>{const{layout:ro="auto",intent:no="info",politeness:oo,shape:io="rounded"}=eo,so=oo??no==="info"?"polite":"assertive",ao=ro==="auto",{ref:lo,reflowing:uo}=useMessageBarReflow(ao),co=ao?uo?"multiline":"singleline":ro,{className:fo,nodeRef:ho}=useMessageBarTransitionContext(),po=reactExports.useRef(null),go=reactExports.useRef(null),{announce:vo}=useAnnounce(),bo=useId$1();return reactExports.useEffect(()=>{var xo,_o;const Eo=(xo=go.current)===null||xo===void 0?void 0:xo.textContent,So=(_o=po.current)===null||_o===void 0?void 0:_o.textContent,To=[Eo,So].filter(Boolean).join(",");vo(To,{polite:so==="polite",alert:so==="assertive"})},[go,po,vo,so]),{components:{root:"div",icon:"div"},root:always(getIntrinsicElementProps("div",{ref:useMergedRefs$1(to,lo,ho),role:"group","aria-labelledby":bo,...eo}),{elementType:"div"}),icon:optional(eo.icon,{renderByDefault:!0,elementType:"div",defaultProps:{children:getIntentIcon(no)}}),layout:co,intent:no,transitionClassName:fo,actionsRef:po,bodyRef:go,titleId:bo,shape:io}},messageBarContext=reactExports.createContext(void 0),messageBarContextDefaultValue={titleId:"",layout:"singleline",actionsRef:reactExports.createRef(),bodyRef:reactExports.createRef()},MessageBarContextProvider=messageBarContext.Provider,useMessageBarContext=()=>{var eo;return(eo=reactExports.useContext(messageBarContext))!==null&&eo!==void 0?eo:messageBarContextDefaultValue},renderMessageBar_unstable=(eo,to)=>jsx$1(MessageBarContextProvider,{value:to.messageBar,children:jsxs(eo.root,{children:[eo.icon&&jsx$1(eo.icon,{}),eo.root.children]})}),messageBarClassNames={root:"fui-MessageBar",icon:"fui-MessageBar__icon"},useRootBaseStyles$2=__resetStyles("rashqx","ri1c0vc",['.rashqx{white-space:nowrap;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:1fr;grid-template-areas:"icon body secondaryActions actions";padding-left:var(--spacingHorizontalM);border-top-width:var(--strokeWidthThin);border-right-width:var(--strokeWidthThin);border-bottom-width:var(--strokeWidthThin);border-left-width:var(--strokeWidthThin);border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:var(--colorNeutralStroke1);border-right-color:var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStroke1);border-left-color:var(--colorNeutralStroke1);border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);align-items:center;min-height:36px;box-sizing:border-box;background-color:var(--colorNeutralBackground3);}','.ri1c0vc{white-space:nowrap;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:1fr;grid-template-areas:"icon body secondaryActions actions";padding-right:var(--spacingHorizontalM);border-top-width:var(--strokeWidthThin);border-left-width:var(--strokeWidthThin);border-bottom-width:var(--strokeWidthThin);border-right-width:var(--strokeWidthThin);border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-color:var(--colorNeutralStroke1);border-left-color:var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStroke1);border-right-color:var(--colorNeutralStroke1);border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);align-items:center;min-height:36px;box-sizing:border-box;background-color:var(--colorNeutralBackground3);}']),useIconBaseStyles=__resetStyles("r1bxgyar","rv8i6h8",[".r1bxgyar{grid-row-start:icon;grid-column-start:icon;grid-row-end:icon;grid-column-end:icon;font-size:var(--fontSizeBase500);margin-right:var(--spacingHorizontalS);color:var(--colorNeutralForeground3);display:flex;align-items:center;}",".rv8i6h8{grid-row-start:icon;grid-column-start:icon;grid-row-end:icon;grid-column-end:icon;font-size:var(--fontSizeBase500);margin-left:var(--spacingHorizontalS);color:var(--colorNeutralForeground3);display:flex;align-items:center;}"]),useStyles$l=__styles({rootMultiline:{Huce71:"f6juhto",Bt984gj:"f1s2louj",z8tnut:"f1ngh7ph",Budl1dq:"f17g0uqy",zoa1oz:"f1w7oly7"},secondaryActionsMultiline:{Brf1p80:"f1e8xxv9",B6of3ja:"f1gaxbfw",jrapky:"fqcjy3b",t21cq0:["fibjyge","f9yszdx"]},square:{Bbmb7ep:["f1krrbdw","f1deotkl"],Beyfa6y:["f1deotkl","f1krrbdw"],B7oj6ja:["f10ostut","f1ozlkrg"],Btl43ni:["f1ozlkrg","f10ostut"]}},{d:[".f6juhto{white-space:normal;}",".f1s2louj{align-items:start;}",".f1ngh7ph{padding-top:var(--spacingVerticalMNudge);}",".f17g0uqy{grid-template-columns:auto 1fr auto;}",'.f1w7oly7{grid-template-areas:"icon body actions" "secondaryActions secondaryActions secondaryActions";}',".f1e8xxv9{justify-content:end;}",".f1gaxbfw{margin-top:var(--spacingVerticalMNudge);}",".fqcjy3b{margin-bottom:var(--spacingVerticalS);}",".fibjyge{margin-right:0px;}",".f9yszdx{margin-left:0px;}",".f1krrbdw{border-bottom-right-radius:0;}",".f1deotkl{border-bottom-left-radius:0;}",".f10ostut{border-top-right-radius:0;}",".f1ozlkrg{border-top-left-radius:0;}"]}),useIconIntentStyles=__styles({info:{},error:{sj55zd:"f1ca9wz"},warning:{sj55zd:"f14a4cve"},success:{sj55zd:"f36rra6"}},{d:[".f1ca9wz{color:var(--colorStatusDangerForeground1);}",".f14a4cve{color:var(--colorStatusWarningForeground3);}",".f36rra6{color:var(--colorStatusSuccessForeground1);}"]}),useRootIntentStyles=__styles({info:{},error:{De3pzq:"f1eon7jj",g2u3we:"f1f8dvr7",h3c5rm:["f1g1ijmo","f1nxacbt"],B9xav0g:"fo25q1j",zhjwy3:["f1nxacbt","f1g1ijmo"]},warning:{De3pzq:"f13ftzij",g2u3we:"frd1ypx",h3c5rm:["f1gyjrma","f18qd5xz"],B9xav0g:"fqyqtrt",zhjwy3:["f18qd5xz","f1gyjrma"]},success:{De3pzq:"f64thcm",g2u3we:"f1b4u7v",h3c5rm:["f1nyd2b1","f70v3om"],B9xav0g:"fk173vo",zhjwy3:["f70v3om","f1nyd2b1"]}},{d:[".f1eon7jj{background-color:var(--colorStatusDangerBackground1);}",".f1f8dvr7{border-top-color:var(--colorStatusDangerBorder1);}",".f1g1ijmo{border-right-color:var(--colorStatusDangerBorder1);}",".f1nxacbt{border-left-color:var(--colorStatusDangerBorder1);}",".fo25q1j{border-bottom-color:var(--colorStatusDangerBorder1);}",".f13ftzij{background-color:var(--colorStatusWarningBackground1);}",".frd1ypx{border-top-color:var(--colorStatusWarningBorder1);}",".f1gyjrma{border-right-color:var(--colorStatusWarningBorder1);}",".f18qd5xz{border-left-color:var(--colorStatusWarningBorder1);}",".fqyqtrt{border-bottom-color:var(--colorStatusWarningBorder1);}",".f64thcm{background-color:var(--colorStatusSuccessBackground1);}",".f1b4u7v{border-top-color:var(--colorStatusSuccessBorder1);}",".f1nyd2b1{border-right-color:var(--colorStatusSuccessBorder1);}",".f70v3om{border-left-color:var(--colorStatusSuccessBorder1);}",".fk173vo{border-bottom-color:var(--colorStatusSuccessBorder1);}"]}),useMessageBarStyles_unstable=eo=>{const to=useRootBaseStyles$2(),ro=useIconBaseStyles(),no=useIconIntentStyles(),oo=useRootIntentStyles(),io=useStyles$l();return eo.root.className=mergeClasses(messageBarClassNames.root,to,eo.layout==="multiline"&&io.rootMultiline,eo.shape==="square"&&io.square,oo[eo.intent],eo.transitionClassName,eo.root.className),eo.icon&&(eo.icon.className=mergeClasses(messageBarClassNames.icon,ro,no[eo.intent],eo.icon.className)),eo};function useMessageBarContextValue_unstable(eo){const{layout:to,actionsRef:ro,bodyRef:no,titleId:oo}=eo;return{messageBar:reactExports.useMemo(()=>({layout:to,actionsRef:ro,bodyRef:no,titleId:oo}),[to,ro,no,oo])}}const MessageBar=reactExports.forwardRef((eo,to)=>{const ro=useMessageBar_unstable(eo,to);return useMessageBarStyles_unstable(ro),useCustomStyleHook("useMessageBarStyles_unstable")(ro),renderMessageBar_unstable(ro,useMessageBarContextValue_unstable(ro))});MessageBar.displayName="MessageBar";const useMessageBarTitle_unstable=(eo,to)=>{const{titleId:ro}=useMessageBarContext();return{components:{root:"span"},root:always(getIntrinsicElementProps("span",{ref:to,id:ro,...eo}),{elementType:"span"})}},renderMessageBarTitle_unstable=eo=>jsx$1(eo.root,{}),messageBarTitleClassNames={root:"fui-MessageBarTitle"},useRootBaseStyles$1=__resetStyles("r168xkm9",null,[".r168xkm9{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase300);}",'.r168xkm9::after{content:" ";}']),useMessageBarTitleStyles_unstable=eo=>{const to=useRootBaseStyles$1();return eo.root.className=mergeClasses(messageBarTitleClassNames.root,to,eo.root.className),eo},MessageBarTitle=reactExports.forwardRef((eo,to)=>{const ro=useMessageBarTitle_unstable(eo,to);return useMessageBarTitleStyles_unstable(ro),useCustomStyleHook("useMessageBarTitleStyles_unstable")(ro),renderMessageBarTitle_unstable(ro)});MessageBarTitle.displayName="MessageBarTitle";const useMessageBarBody_unstable=(eo,to)=>{const{bodyRef:ro}=useMessageBarContext();return{components:{root:"div"},root:always(getIntrinsicElementProps("div",{ref:useMergedRefs$1(to,ro),...eo}),{elementType:"div"})}},renderMessageBarBody_unstable=eo=>jsx$1(eo.root,{}),messageBarBodyClassNames={root:"fui-MessageBarBody"},useRootBaseStyles=__resetStyles("rnv3mfe","r1ixc1x8",[".rnv3mfe{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);grid-row-start:body;grid-column-start:body;grid-row-end:body;grid-column-end:body;padding-right:var(--spacingHorizontalM);}",".r1ixc1x8{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);grid-row-start:body;grid-column-start:body;grid-row-end:body;grid-column-end:body;padding-left:var(--spacingHorizontalM);}"]),useMessageBarBodyStyles_unstable=eo=>{const to=useRootBaseStyles();return eo.root.className=mergeClasses(messageBarBodyClassNames.root,to,eo.root.className),eo},MessageBarBody=reactExports.forwardRef((eo,to)=>{const ro=useMessageBarBody_unstable(eo,to);return useMessageBarBodyStyles_unstable(ro),useCustomStyleHook("useMessageBarBodyStyles_unstable")(ro),renderMessageBarBody_unstable(ro)});MessageBarBody.displayName="MessageBarBody";const useReducedMotion=()=>{var eo;const to=useFluent(),ro=reactExports.useRef(!1),no=canUseDOM$3()&&((eo=to.targetDocument)===null||eo===void 0?void 0:eo.defaultView),oo=reactExports.useCallback(io=>{ro.current=io.matches},[]);return useIsomorphicLayoutEffect$1(()=>{if(!no||!no.matchMedia)return;const io=no.matchMedia("screen and (prefers-reduced-motion: reduce)");return io.matches&&(ro.current=!0),io.addEventListener("change",oo),()=>io.removeEventListener("change",oo)},[oo,no]),ro.current},getCSSStyle=eo=>hasCSSOMSupport(eo)?eo.computedStyleMap():getElementComputedStyle(eo),hasCSSOMSupport=eo=>!!(typeof CSS<"u"&&CSS.number&&eo.computedStyleMap),getElementComputedStyle=eo=>{var to,ro;const no=canUseDOM$3()&&((ro=(to=eo.ownerDocument)===null||to===void 0?void 0:to.defaultView)!==null&&ro!==void 0?ro:window);return no?no.getComputedStyle(eo,null):{getPropertyValue:oo=>""}};function toMs(eo){const to=eo.trim();if(to.includes("auto"))return 0;if(to.endsWith("ms")){const ro=Number(to.replace("ms",""));return isNaN(ro)?0:ro}return Number(to.slice(0,-1).replace(",","."))*1e3}const getComputedMapProp=(eo,to)=>{const ro=eo.getAll(to);return ro.length>0?ro.map(({value:no,unit:oo})=>`${no}${oo}`):["0"]},getComputedStyleProp=(eo,to)=>{const ro=eo.getPropertyValue(to);return ro?ro.split(","):["0"]},getMaxCSSDuration=(eo,to)=>{const ro=Math.max(eo.length,to.length),no=[];if(ro===0)return 0;for(let oo=0;oo{const to=hasCSSOMSupport(eo),ro=getCSSStyle(eo),no=so=>to?getComputedMapProp(ro,so):getComputedStyleProp(ro,so),oo=getMaxCSSDuration(no("transition-duration"),no("transition-delay")),io=getMaxCSSDuration(no("animation-duration"),no("animation-delay"));return Math.max(oo,io)},useFirstMountCondition=eo=>{const to=reactExports.useRef(!0);return to.current&&eo?(to.current=!1,!0):to.current};function useMotionPresence(eo,to={}){const{animateOnFirstMount:ro,duration:no}={animateOnFirstMount:!1,...to},[oo,io]=reactExports.useState(eo&&ro?"entering":eo?"idle":"unmounted"),[so,ao]=reactExports.useState(!ro&&eo),[lo,uo]=useTimeout(),[co,fo]=useTimeout(),[ho,po]=useAnimationFrame(),[go,vo]=reactExports.useState(null),bo=useReducedMotion(),xo=useFirstMount(),_o=useFirstMountCondition(!!go),Eo=reactExports.useRef(eo).current,So=bo||_o&&Eo&&!ro,To=reactExports.useCallback(Oo=>{Oo&&vo(Oo)},[]),wo=reactExports.useCallback(Oo=>(co(()=>ho(Oo),0),()=>{fo(),po()}),[po,fo,ho,co]),Co=reactExports.useCallback(()=>{io(eo?"entered":"exited"),wo(()=>io(eo?"idle":"unmounted"))},[wo,eo]);return reactExports.useEffect(()=>{if(!xo){if(So){io(eo?"idle":"unmounted"),ao(eo);return}if(io(eo?"entering":"exiting"),!!go)return wo(()=>{ao(eo),wo(()=>{const Oo=no||getMotionDuration(go);if(Oo===0){Co();return}lo(()=>Co(),Oo)})}),()=>uo()}},[go,So,Co,eo]),reactExports.useMemo(()=>({ref:To,type:oo,active:so,canRender:eo||oo!=="unmounted"}),[so,oo,eo])}function useMotion(eo,to){const ro=typeof eo=="object",no=useMotionPresence(ro?!1:eo,to);return ro?eo:no}const useReducedMotionStyles=__styles({reduced:{Hwfdqs:"f1bggi9a"}},{m:[["@media screen and (prefers-reduced-motion: reduce){.f1bggi9a{transition-duration:0.01ms!important;}}",{m:"screen and (prefers-reduced-motion: reduce)"}]]});function assertMotionStyles(eo){}const useMotionClassNames=(eo,to)=>{const{reduced:ro}=useReducedMotionStyles(),no=reactExports.useMemo(()=>!to.enter&&!to.exit?"":eo.active||eo.type==="idle"?to.enter:eo.active?"":to.exit,[eo.active,eo.type,to.enter,to.exit]);return reactExports.useEffect(()=>void 0,[to]),mergeClasses(to.default,no,to[eo.type],ro)};function useDrawerDefaultProps(eo){const{open:to=!1,size:ro="small",position:no="start"}=eo;return{size:ro,position:no,open:to}}const useBackdropResetStyles=__resetStyles("rivxbo","r1trjn1z",[".rivxbo{top:0px;right:0px;bottom:0px;left:0px;position:fixed;background-color:rgba(0, 0, 0, 0.4);}",".r1trjn1z{top:0px;left:0px;bottom:0px;right:0px;position:fixed;background-color:rgba(0, 0, 0, 0.4);}"]),useBackdropStyles=__styles({nested:{De3pzq:"f1c21dwh"}},{d:[".f1c21dwh{background-color:var(--colorTransparentBackground);}"]}),useOverlayDrawerSurfaceStyles_unstable=eo=>{const to=useBackdropResetStyles(),ro=useBackdropStyles();return eo.backdrop&&(eo.backdrop.className=mergeClasses(to,eo.isNestedDialog&&ro.nested,eo.backdrop.className)),eo},OverlayDrawerSurface=reactExports.forwardRef((eo,to)=>{const ro=useDialogSurface_unstable(eo,to),no=useDialogSurfaceContextValues_unstable();return useOverlayDrawerSurfaceStyles_unstable(ro),renderDialogSurface_unstable(ro,no)});OverlayDrawerSurface.displayName="OverlayDrawerSurface";const useOverlayDrawer_unstable=(eo,to)=>{const{open:ro,size:no,position:oo}=useDrawerDefaultProps(eo),{modalType:io="modal",inertTrapFocus:so,defaultOpen:ao=!1,onOpenChange:lo}=eo,uo=useMotion(ro),co=resolveShorthand(eo.backdrop),ho=always({...eo,backdrop:io!=="non-modal"&&co!==null?{...co}:null},{elementType:OverlayDrawerSurface,defaultProps:{ref:useMergedRefs$1(to,uo.ref)}}),po=always({open:!0,defaultOpen:ao,onOpenChange:lo,inertTrapFocus:so,modalType:io,children:null},{elementType:Dialog});return{components:{root:OverlayDrawerSurface,dialog:Dialog},root:ho,dialog:po,size:no,position:oo,motion:uo}},renderOverlayDrawer_unstable=eo=>eo.motion.canRender?jsx$1(eo.dialog,{children:jsx$1(eo.root,{})}):null,useDrawerStyles=__styles({entering:{Bkqvd7p:"f18ad807"},exiting:{Bkqvd7p:"f1mfizis"},reducedMotion:{Hwfdqs:"f5e8c63"},start:{Bekrc4i:["f5tn483","f1ojsxk5"],vrafjx:["fcdblym","fjik90z"],h3c5rm:["f1gn591s","fjscplz"],oyh7mz:["f1vgc2s3","f1e31b4d"],j35jbq:["fvfyk4","frppm18"]},end:{ibv6hh:["f1ojsxk5","f5tn483"],wvpqe5:["fjik90z","fcdblym"],zhjwy3:["fjscplz","f1gn591s"],j35jbq:["f1e31b4d","f1vgc2s3"],oyh7mz:["frppm18","fvfyk4"]},small:{Bjr0ffy:"f1exhnwo"},medium:{Bjr0ffy:"fqofjzu"},large:{Bjr0ffy:"fce6y3m"},full:{Bjr0ffy:"fsdmzs6"}},{d:[".f18ad807{transition-timing-function:var(--curveDecelerateMid);}",".f1mfizis{transition-timing-function:var(--curveAccelerateMin);}",".f5tn483{border-right-width:var(--strokeWidthThin);}",".f1ojsxk5{border-left-width:var(--strokeWidthThin);}",".fcdblym{border-right-style:solid;}",".fjik90z{border-left-style:solid;}",".f1gn591s{border-right-color:var(--colorTransparentStroke);}",".fjscplz{border-left-color:var(--colorTransparentStroke);}",".f1vgc2s3{left:0;}",".f1e31b4d{right:0;}",".fvfyk4{right:auto;}",".frppm18{left:auto;}",".f1exhnwo{--fui-Drawer--size:320px;}",".fqofjzu{--fui-Drawer--size:592px;}",".fce6y3m{--fui-Drawer--size:940px;}",".fsdmzs6{--fui-Drawer--size:100vw;}"],m:[["@media screen and (prefers-reduced-motion: reduce){.f5e8c63{transition-duration:0.001ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}]]}),useDrawerDurationStyles=__styles({small:{B3o57yi:"fc397y7"},medium:{B3o57yi:"f78771"},large:{B3o57yi:"f9ymmep"},full:{B3o57yi:"f1loko9l"}},{d:[".fc397y7{transition-duration:var(--durationGentle);}",".f78771{transition-duration:var(--durationSlow);}",".f9ymmep{transition-duration:var(--durationSlower);}",".f1loko9l{transition-duration:var(--durationUltraSlow);}"]}),useDrawerBaseClassNames=({position:eo,size:to,motion:ro})=>{const no=useDrawerStyles(),oo=useDrawerDurationStyles();return mergeClasses(no[eo],oo[to],no[to],no.reducedMotion,ro.type==="entering"&&no.entering,ro.type==="exiting"&&no.exiting)},overlayDrawerClassNames={root:"fui-OverlayDrawer",backdrop:"fui-OverlayDrawer__backdrop"},useDrawerResetStyles=__resetStyles("r1vxc6jp","r1uky7bi",{r:[".r1vxc6jp{overflow-x:hidden;overflow-y:hidden;width:var(--fui-Drawer--size);max-width:100vw;height:auto;max-height:100vh;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);position:fixed;top:0;bottom:0;}",".r1vxc6jp:focus{outline-style:none;}",".r1vxc6jp:focus-visible{outline-style:none;}",".r1vxc6jp[data-fui-focus-visible]{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",'.r1vxc6jp[data-fui-focus-visible]::after{content:"";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}',".r1uky7bi{overflow-x:hidden;overflow-y:hidden;width:var(--fui-Drawer--size);max-width:100vw;height:auto;max-height:100vh;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);position:fixed;top:0;bottom:0;}",".r1uky7bi:focus{outline-style:none;}",".r1uky7bi:focus-visible{outline-style:none;}",".r1uky7bi[data-fui-focus-visible]{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",'.r1uky7bi[data-fui-focus-visible]::after{content:"";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}'],s:["@media (forced-colors: active){.r1vxc6jp[data-fui-focus-visible]::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}","@media (forced-colors: active){.r1uky7bi[data-fui-focus-visible]::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}"]}),useDrawerRootStyles=__styles({start:{Bz10aip:"f1d8gkik"},end:{Bz10aip:"f1g0pcr8"}},{d:[".f1d8gkik{transform:translate3D(calc(var(--fui-Drawer--size) * -1), 0, 0);}",".f1g0pcr8{transform:translate3D(calc(var(--fui-Drawer--size) * 1), 0, 0);}"]}),useDrawerMotionStyles=__styles({default:{abs64n:"fk73vx1",E5pizo:"ff88big",Bmy1vo4:"f1neo61",Es3by:"f1ytgekk"},enter:{abs64n:"f5p0z4x",Bz10aip:"f87uvqx",E5pizo:"f10nrhrw"}},{d:[".fk73vx1{opacity:0;}",".ff88big{box-shadow:0px var(--colorTransparentBackground);}",".f1neo61{transition-property:transform,box-shadow,opacity;}",".f1ytgekk{will-change:transform,box-shadow,opacity;}",".f5p0z4x{opacity:1;}",".f87uvqx{transform:translate3D(0, 0, 0);}",".f10nrhrw{box-shadow:var(--shadow64);}"]}),useBackdropMotionStyles=__styles({default:{abs64n:"fk73vx1",Bmy1vo4:"f13u1uyl",Bkqvd7p:"f17wnm97",Es3by:"f1gqqdtu"},enter:{abs64n:"f5p0z4x"}},{d:[".fk73vx1{opacity:0;}",".f13u1uyl{transition-property:opacity;}",".f17wnm97{transition-timing-function:var(--curveEasyEase);}",".f1gqqdtu{will-change:opacity;}",".f5p0z4x{opacity:1;}"]}),useOverlayDrawerStyles_unstable=eo=>{const to=useDrawerBaseClassNames(eo),ro=useDrawerResetStyles(),no=useDrawerRootStyles(),oo=useDrawerDurationStyles(),io=useMotionClassNames(eo.motion,useDrawerMotionStyles()),so=useMotionClassNames(eo.motion,useBackdropMotionStyles()),ao=eo.root.backdrop;return eo.root.className=mergeClasses(overlayDrawerClassNames.root,to,ro,no[eo.position],io,eo.root.className),ao&&(ao.className=mergeClasses(overlayDrawerClassNames.backdrop,so,oo[eo.size],ao.className)),eo},OverlayDrawer=reactExports.forwardRef((eo,to)=>{const ro=useOverlayDrawer_unstable(eo,to);return useOverlayDrawerStyles_unstable(ro),useCustomStyleHook("useDrawerOverlayStyles_unstable")(ro),useCustomStyleHook("useOverlayDrawerStyles_unstable")(ro),renderOverlayDrawer_unstable(ro)});OverlayDrawer.displayName="OverlayDrawer";const useBreadcrumb_unstable=(eo,to)=>{const{focusMode:ro="tab",size:no="medium",list:oo,...io}=eo,so=useArrowNavigationGroup({circular:!0,axis:"horizontal",memorizeCurrent:!0});var ao;return{components:{root:"nav",list:"ol"},root:always(getIntrinsicElementProps("nav",{ref:to,"aria-label":(ao=eo["aria-label"])!==null&&ao!==void 0?ao:"breadcrumb",...ro==="arrow"?so:{},...io}),{elementType:"nav"}),list:optional(oo,{renderByDefault:!0,defaultProps:{role:"list"},elementType:"ol"}),size:no}},BreadcrumbContext=reactExports.createContext(void 0),breadcrumbDefaultValue={size:"medium"},BreadcrumbProvider=BreadcrumbContext.Provider,useBreadcrumbContext_unstable=()=>{var eo;return(eo=reactExports.useContext(BreadcrumbContext))!==null&&eo!==void 0?eo:breadcrumbDefaultValue},renderBreadcrumb_unstable=(eo,to)=>jsx$1(eo.root,{children:jsx$1(BreadcrumbProvider,{value:to,children:eo.list&&jsx$1(eo.list,{children:eo.root.children})})}),breadcrumbClassNames={root:"fui-Breadcrumb",list:"fui-Breadcrumb__list"},useListClassName=__resetStyles("rc5rb6b",null,[".rc5rb6b{list-style-type:none;display:flex;align-items:center;margin:0;padding:0;}"]),useBreadcrumbStyles_unstable=eo=>{const to=useListClassName();return eo.root.className=mergeClasses(breadcrumbClassNames.root,eo.root.className),eo.list&&(eo.list.className=mergeClasses(to,breadcrumbClassNames.list,eo.list.className)),eo};function useBreadcrumbContextValues_unstable(eo){const{size:to}=eo;return reactExports.useMemo(()=>({size:to}),[to])}const Breadcrumb=reactExports.forwardRef((eo,to)=>{const ro=useBreadcrumb_unstable(eo,to),no=useBreadcrumbContextValues_unstable(ro);return useBreadcrumbStyles_unstable(ro),useCustomStyleHook("useBreadcrumbStyles_unstable")(ro),renderBreadcrumb_unstable(ro,no)});Breadcrumb.displayName="Breadcrumb";const useBreadcrumbDivider_unstable=(eo,to)=>{const{size:ro}=useBreadcrumbContext_unstable(),{dir:no}=useFluent(),oo=getDividerIcon(ro,no);return{components:{root:"li"},root:always(getIntrinsicElementProps("li",{ref:to,"aria-hidden":!0,children:oo,...eo}),{elementType:"li"})}},dividerIcons={rtl:{small:reactExports.createElement(ChevronLeft12Regular,null),medium:reactExports.createElement(ChevronLeft16Regular,null),large:reactExports.createElement(ChevronLeft20Regular,null)},ltr:{small:reactExports.createElement(ChevronRight12Regular,null),medium:reactExports.createElement(ChevronRight16Regular,null),large:reactExports.createElement(ChevronRight20Regular,null)}};function getDividerIcon(eo="medium",to){const ro=to==="rtl"?dividerIcons.rtl:dividerIcons.ltr;return eo==="small"?ro.small:eo==="large"?ro.large:ro.medium}const renderBreadcrumbDivider_unstable=eo=>jsx$1(eo.root,{}),breadcrumbDividerClassNames={root:"fui-BreadcrumbDivider"},useStyles$k=__styles({root:{mc9l5x:"f22iagw"}},{d:[".f22iagw{display:flex;}"]}),useBreadcrumbDividerStyles_unstable=eo=>{const to=useStyles$k();return eo.root.className=mergeClasses(breadcrumbDividerClassNames.root,to.root,eo.root.className),eo},BreadcrumbDivider=reactExports.forwardRef((eo,to)=>{const ro=useBreadcrumbDivider_unstable(eo,to);return useBreadcrumbDividerStyles_unstable(ro),useCustomStyleHook("useBreadcrumbDividerStyles_unstable")(ro),renderBreadcrumbDivider_unstable(ro)});BreadcrumbDivider.displayName="BreadcrumbDivider";const useBreadcrumbItem_unstable=(eo,to)=>{const{size:ro}=useBreadcrumbContext_unstable();return{components:{root:"li"},root:always(getIntrinsicElementProps("li",{ref:to,...eo}),{elementType:"li"}),size:ro}},renderBreadcrumbItem_unstable=eo=>jsx$1(eo.root,{children:eo.root.children}),breadcrumbItemClassNames={root:"fui-BreadcrumbItem"},useBreadcrumbItemResetStyles=__resetStyles("r1tl60rs",null,[".r1tl60rs{display:flex;align-items:center;color:var(--colorNeutralForeground2);box-sizing:border-box;text-wrap:nowrap;}"]),useBreadcrumbItemStyles_unstable=eo=>{const to=useBreadcrumbItemResetStyles();return eo.root.className=mergeClasses(breadcrumbItemClassNames.root,to,eo.root.className),eo},BreadcrumbItem=reactExports.forwardRef((eo,to)=>{const ro=useBreadcrumbItem_unstable(eo,to);return useBreadcrumbItemStyles_unstable(ro),useCustomStyleHook("useBreadcrumbItemStyles_unstable")(ro),renderBreadcrumbItem_unstable(ro)});BreadcrumbItem.displayName="BreadcrumbItem";const useBreadcrumbButton_unstable=(eo,to)=>{const{size:ro}=useBreadcrumbContext_unstable(),{current:no=!1,as:oo,...io}=eo,so=oo??eo.href?"a":"button";var ao,lo;return{...useButton_unstable({appearance:"subtle",role:void 0,type:void 0,as:so,iconPosition:"before","aria-current":no?(ao=eo["aria-current"])!==null&&ao!==void 0?ao:"page":void 0,"aria-disabled":no?(lo=eo["aria-disabled"])!==null&&lo!==void 0?lo:!0:void 0,...io},to),current:no,size:ro}},renderBreadcrumbButton_unstable=eo=>renderButton_unstable(eo),breadcrumbButtonClassNames={root:"fui-BreadcrumbButton",icon:"fui-BreadcrumbButton__icon"},useIconStyles=__styles({base:{Be2twd7:"fsj74e5",Bqenvij:"f1qfv4wv",Bg96gwp:"f15xapk4",a9b677:"f17j33op",t21cq0:["fm0x6gh","fbyavb5"]},small:{u3h8gg:"f1qfi7kw",Biu6dll:"f1876atl"},medium:{u3h8gg:"f1h9446d",Biu6dll:"f10xfswh"},large:{u3h8gg:"f5hcofs",Biu6dll:"f1a6v6zl"}},{d:[".fsj74e5{font-size:var(--fui-Breadcrumb--icon-size);}",".f1qfv4wv{height:var(--fui-Breadcrumb--icon-size);}",".f15xapk4{line-height:var(--fui-Breadcrumb--icon-line-height);}",".f17j33op{width:var(--fui-Breadcrumb--icon-size);}",".fm0x6gh{margin-right:var(--spacingHorizontalXS);}",".fbyavb5{margin-left:var(--spacingHorizontalXS);}",".f1qfi7kw{--fui-Breadcrumb--icon-size:12px;}",".f1876atl{--fui-Breadcrumb--icon-line-height:var(--lineHeightBase200);}",".f1h9446d{--fui-Breadcrumb--icon-size:16px;}",".f10xfswh{--fui-Breadcrumb--icon-line-height:var(--lineHeightBase400);}",".f5hcofs{--fui-Breadcrumb--icon-size:20px;}",".f1a6v6zl{--fui-Breadcrumb--icon-line-height:var(--lineHeightBase600);}"]}),useStyles$j=__styles({root:{Bf4jedk:"f18p0k4z",j4b8c3:"fv6wr3j",icvyot:"f1ern45e",vrafjx:["f1n71otn","f1deefiw"],oivjwe:"f1h8hb77",wvpqe5:["f1deefiw","f1n71otn"]},small:{Bqenvij:"frvgh55",Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm",z8tnut:"f16k8034",z189sj:["fdw0yi8","fk8j09s"],Byoj8tv:"f1angvds",uwmqm3:["fk8j09s","fdw0yi8"]},medium:{Bqenvij:"f1d2rq10",Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi",z8tnut:"f16k8034",z189sj:["fdw0yi8","fk8j09s"],Byoj8tv:"f1angvds",uwmqm3:["fk8j09s","fdw0yi8"]},large:{Bqenvij:"fbhnoac",Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k",z8tnut:"f17mpqex",z189sj:["f1vdfbxk","f1f5gg8d"],Byoj8tv:"fdvome7",uwmqm3:["f1f5gg8d","f1vdfbxk"]},current:{Jwef8y:"f9ql6rf",Bi91k9c:"f3p8bqa",eoavqd:"f14w7a5u",Bbdnnc7:"f1irjp3o",Bk3fhr4:"f19vpps7",Bmfj8id:"fv5swzo",iro3zm:"f3h1zc4",B2d53fq:"f1xkgyln",c3iz72:"f17wbbfx",x3br3k:"fofxw0a",em6i61:"f1ol4fw6",vm6p8p:"f1q1lw4e",Bszkowt:"ff24m",Dyrjrp:"ft5r8e9",ezr58z:"f1cbpfqp",nhk3du:"f1motppv",Bfrek18:"fi9vkhg",G209fr:"f1fg3nnv"},currentSmall:{Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"fl43uef",Bg96gwp:"fwrc4pm"},currentMedium:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"fl43uef",Bg96gwp:"f1i3iumi"},currentLarge:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"}},{d:[".f18p0k4z{min-width:unset;}",".fv6wr3j{text-wrap:nowrap;}",".f1ern45e{border-top-style:none;}",".f1n71otn{border-right-style:none;}",".f1deefiw{border-left-style:none;}",".f1h8hb77{border-bottom-style:none;}",".frvgh55{height:24px;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f16k8034{padding-top:var(--spacingHorizontalSNudge);}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".f1angvds{padding-bottom:var(--spacingHorizontalSNudge);}",".f1d2rq10{height:32px;}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".fbhnoac{height:40px;}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".f17mpqex{padding-top:var(--spacingHorizontalS);}",".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",".fdvome7{padding-bottom:var(--spacingHorizontalS);}",".ff24m:disabled{background-color:var(--colorTransparentBackground);}",".ft5r8e9:disabled{color:var(--colorNeutralForeground2);}",".f1cbpfqp:disabled{cursor:auto;}",".f1motppv:disabled .fui-Button__icon{color:unset;}",".fi9vkhg:disabled .fui-Icon-filled{display:none;}",".f1fg3nnv:disabled .fui-Icon-regular{display:inline;}",".fl43uef{font-weight:var(--fontWeightSemibold);}"],h:[".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}",".f3p8bqa:hover{color:var(--colorNeutralForeground2);}",".f14w7a5u:hover{cursor:auto;}",".f1irjp3o:hover .fui-Button__icon{color:unset;}",".f19vpps7:hover .fui-Icon-filled{display:none;}",".fv5swzo:hover .fui-Icon-regular{display:inline;}",".f3h1zc4:hover:active{background-color:var(--colorTransparentBackground);}",".f1xkgyln:hover:active{color:var(--colorNeutralForeground2);}",".f17wbbfx:hover:active{cursor:auto;}",".fofxw0a:hover:active .fui-Button__icon{color:unset;}",".f1ol4fw6:hover:active .fui-Icon-filled{display:none;}",".f1q1lw4e:hover:active .fui-Icon-regular{display:inline;}"]}),useBreadcrumbButtonStyles_unstable=eo=>{const to=useStyles$j(),ro=useIconStyles(),no={small:to.currentSmall,medium:to.currentMedium,large:to.currentLarge};return eo.root.className=mergeClasses(breadcrumbButtonClassNames.root,to[eo.size],to.root,eo.current&&no[eo.size],eo.current&&to.current,eo.root.className),eo.icon&&(eo.icon.className=mergeClasses(ro.base,ro[eo.size],eo.icon.className)),useButtonStyles_unstable(eo),eo},BreadcrumbButton=reactExports.forwardRef((eo,to)=>{const ro=useBreadcrumbButton_unstable(eo,to);return useBreadcrumbButtonStyles_unstable(ro),useCustomStyleHook("useBreadcrumbButtonStyles_unstable")(ro),renderBreadcrumbButton_unstable(ro)});BreadcrumbButton.displayName="BreadcrumbButton";var axios$1={exports:{}},bind$2=function(to,ro){return function(){for(var oo=new Array(arguments.length),io=0;io"u"}function isBuffer$4(eo){return eo!==null&&!isUndefined(eo)&&eo.constructor!==null&&!isUndefined(eo.constructor)&&typeof eo.constructor.isBuffer=="function"&&eo.constructor.isBuffer(eo)}function isArrayBuffer(eo){return toString$3.call(eo)==="[object ArrayBuffer]"}function isFormData(eo){return typeof FormData<"u"&&eo instanceof FormData}function isArrayBufferView(eo){var to;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?to=ArrayBuffer.isView(eo):to=eo&&eo.buffer&&eo.buffer instanceof ArrayBuffer,to}function isString$1(eo){return typeof eo=="string"}function isNumber$1(eo){return typeof eo=="number"}function isObject$g(eo){return eo!==null&&typeof eo=="object"}function isPlainObject$2(eo){if(toString$3.call(eo)!=="[object Object]")return!1;var to=Object.getPrototypeOf(eo);return to===null||to===Object.prototype}function isDate(eo){return toString$3.call(eo)==="[object Date]"}function isFile(eo){return toString$3.call(eo)==="[object File]"}function isBlob(eo){return toString$3.call(eo)==="[object Blob]"}function isFunction$6(eo){return toString$3.call(eo)==="[object Function]"}function isStream(eo){return isObject$g(eo)&&isFunction$6(eo.pipe)}function isURLSearchParams(eo){return typeof URLSearchParams<"u"&&eo instanceof URLSearchParams}function trim$1(eo){return eo.trim?eo.trim():eo.replace(/^\s+|\s+$/g,"")}function isStandardBrowserEnv(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function forEach(eo,to){if(!(eo===null||typeof eo>"u"))if(typeof eo!="object"&&(eo=[eo]),isArray$f(eo))for(var ro=0,no=eo.length;ro"u"||(utils$8.isArray(lo)?uo=uo+"[]":lo=[lo],utils$8.forEach(lo,function(fo){utils$8.isDate(fo)?fo=fo.toISOString():utils$8.isObject(fo)&&(fo=JSON.stringify(fo)),io.push(encode$1(uo)+"="+encode$1(fo))}))}),oo=io.join("&")}if(oo){var so=to.indexOf("#");so!==-1&&(to=to.slice(0,so)),to+=(to.indexOf("?")===-1?"?":"&")+oo}return to},utils$7=utils$9;function InterceptorManager$1(){this.handlers=[]}InterceptorManager$1.prototype.use=function(to,ro,no){return this.handlers.push({fulfilled:to,rejected:ro,synchronous:no?no.synchronous:!1,runWhen:no?no.runWhen:null}),this.handlers.length-1};InterceptorManager$1.prototype.eject=function(to){this.handlers[to]&&(this.handlers[to]=null)};InterceptorManager$1.prototype.forEach=function(to){utils$7.forEach(this.handlers,function(no){no!==null&&to(no)})};var InterceptorManager_1=InterceptorManager$1,utils$6=utils$9,normalizeHeaderName$1=function(to,ro){utils$6.forEach(to,function(oo,io){io!==ro&&io.toUpperCase()===ro.toUpperCase()&&(to[ro]=oo,delete to[io])})},enhanceError$1=function(to,ro,no,oo,io){return to.config=ro,no&&(to.code=no),to.request=oo,to.response=io,to.isAxiosError=!0,to.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},to},createError,hasRequiredCreateError;function requireCreateError(){if(hasRequiredCreateError)return createError;hasRequiredCreateError=1;var eo=enhanceError$1;return createError=function(ro,no,oo,io,so){var ao=new Error(ro);return eo(ao,no,oo,io,so)},createError}var settle,hasRequiredSettle;function requireSettle(){if(hasRequiredSettle)return settle;hasRequiredSettle=1;var eo=requireCreateError();return settle=function(ro,no,oo){var io=oo.config.validateStatus;!oo.status||!io||io(oo.status)?ro(oo):no(eo("Request failed with status code "+oo.status,oo.config,null,oo.request,oo))},settle}var cookies,hasRequiredCookies;function requireCookies(){if(hasRequiredCookies)return cookies;hasRequiredCookies=1;var eo=utils$9;return cookies=eo.isStandardBrowserEnv()?function(){return{write:function(no,oo,io,so,ao,lo){var uo=[];uo.push(no+"="+encodeURIComponent(oo)),eo.isNumber(io)&&uo.push("expires="+new Date(io).toGMTString()),eo.isString(so)&&uo.push("path="+so),eo.isString(ao)&&uo.push("domain="+ao),lo===!0&&uo.push("secure"),document.cookie=uo.join("; ")},read:function(no){var oo=document.cookie.match(new RegExp("(^|;\\s*)("+no+")=([^;]*)"));return oo?decodeURIComponent(oo[3]):null},remove:function(no){this.write(no,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),cookies}var isAbsoluteURL,hasRequiredIsAbsoluteURL;function requireIsAbsoluteURL(){return hasRequiredIsAbsoluteURL||(hasRequiredIsAbsoluteURL=1,isAbsoluteURL=function(to){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(to)}),isAbsoluteURL}var combineURLs,hasRequiredCombineURLs;function requireCombineURLs(){return hasRequiredCombineURLs||(hasRequiredCombineURLs=1,combineURLs=function(to,ro){return ro?to.replace(/\/+$/,"")+"/"+ro.replace(/^\/+/,""):to}),combineURLs}var buildFullPath,hasRequiredBuildFullPath;function requireBuildFullPath(){if(hasRequiredBuildFullPath)return buildFullPath;hasRequiredBuildFullPath=1;var eo=requireIsAbsoluteURL(),to=requireCombineURLs();return buildFullPath=function(no,oo){return no&&!eo(oo)?to(no,oo):oo},buildFullPath}var parseHeaders,hasRequiredParseHeaders;function requireParseHeaders(){if(hasRequiredParseHeaders)return parseHeaders;hasRequiredParseHeaders=1;var eo=utils$9,to=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return parseHeaders=function(no){var oo={},io,so,ao;return no&&eo.forEach(no.split(` +`),function(uo){if(ao=uo.indexOf(":"),io=eo.trim(uo.substr(0,ao)).toLowerCase(),so=eo.trim(uo.substr(ao+1)),io){if(oo[io]&&to.indexOf(io)>=0)return;io==="set-cookie"?oo[io]=(oo[io]?oo[io]:[]).concat([so]):oo[io]=oo[io]?oo[io]+", "+so:so}}),oo},parseHeaders}var isURLSameOrigin,hasRequiredIsURLSameOrigin;function requireIsURLSameOrigin(){if(hasRequiredIsURLSameOrigin)return isURLSameOrigin;hasRequiredIsURLSameOrigin=1;var eo=utils$9;return isURLSameOrigin=eo.isStandardBrowserEnv()?function(){var ro=/(msie|trident)/i.test(navigator.userAgent),no=document.createElement("a"),oo;function io(so){var ao=so;return ro&&(no.setAttribute("href",ao),ao=no.href),no.setAttribute("href",ao),{href:no.href,protocol:no.protocol?no.protocol.replace(/:$/,""):"",host:no.host,search:no.search?no.search.replace(/^\?/,""):"",hash:no.hash?no.hash.replace(/^#/,""):"",hostname:no.hostname,port:no.port,pathname:no.pathname.charAt(0)==="/"?no.pathname:"/"+no.pathname}}return oo=io(window.location.href),function(ao){var lo=eo.isString(ao)?io(ao):ao;return lo.protocol===oo.protocol&&lo.host===oo.host}}():function(){return function(){return!0}}(),isURLSameOrigin}var xhr,hasRequiredXhr;function requireXhr(){if(hasRequiredXhr)return xhr;hasRequiredXhr=1;var eo=utils$9,to=requireSettle(),ro=requireCookies(),no=buildURL$1,oo=requireBuildFullPath(),io=requireParseHeaders(),so=requireIsURLSameOrigin(),ao=requireCreateError();return xhr=function(uo){return new Promise(function(fo,ho){var po=uo.data,go=uo.headers,vo=uo.responseType;eo.isFormData(po)&&delete go["Content-Type"];var bo=new XMLHttpRequest;if(uo.auth){var xo=uo.auth.username||"",_o=uo.auth.password?unescape(encodeURIComponent(uo.auth.password)):"";go.Authorization="Basic "+btoa(xo+":"+_o)}var Eo=oo(uo.baseURL,uo.url);bo.open(uo.method.toUpperCase(),no(Eo,uo.params,uo.paramsSerializer),!0),bo.timeout=uo.timeout;function So(){if(bo){var wo="getAllResponseHeaders"in bo?io(bo.getAllResponseHeaders()):null,Co=!vo||vo==="text"||vo==="json"?bo.responseText:bo.response,Oo={data:Co,status:bo.status,statusText:bo.statusText,headers:wo,config:uo,request:bo};to(fo,ho,Oo),bo=null}}if("onloadend"in bo?bo.onloadend=So:bo.onreadystatechange=function(){!bo||bo.readyState!==4||bo.status===0&&!(bo.responseURL&&bo.responseURL.indexOf("file:")===0)||setTimeout(So)},bo.onabort=function(){bo&&(ho(ao("Request aborted",uo,"ECONNABORTED",bo)),bo=null)},bo.onerror=function(){ho(ao("Network Error",uo,null,bo)),bo=null},bo.ontimeout=function(){var Co="timeout of "+uo.timeout+"ms exceeded";uo.timeoutErrorMessage&&(Co=uo.timeoutErrorMessage),ho(ao(Co,uo,uo.transitional&&uo.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",bo)),bo=null},eo.isStandardBrowserEnv()){var To=(uo.withCredentials||so(Eo))&&uo.xsrfCookieName?ro.read(uo.xsrfCookieName):void 0;To&&(go[uo.xsrfHeaderName]=To)}"setRequestHeader"in bo&&eo.forEach(go,function(Co,Oo){typeof po>"u"&&Oo.toLowerCase()==="content-type"?delete go[Oo]:bo.setRequestHeader(Oo,Co)}),eo.isUndefined(uo.withCredentials)||(bo.withCredentials=!!uo.withCredentials),vo&&vo!=="json"&&(bo.responseType=uo.responseType),typeof uo.onDownloadProgress=="function"&&bo.addEventListener("progress",uo.onDownloadProgress),typeof uo.onUploadProgress=="function"&&bo.upload&&bo.upload.addEventListener("progress",uo.onUploadProgress),uo.cancelToken&&uo.cancelToken.promise.then(function(Co){bo&&(bo.abort(),ho(Co),bo=null)}),po||(po=null),bo.send(po)})},xhr}var utils$5=utils$9,normalizeHeaderName=normalizeHeaderName$1,enhanceError=enhanceError$1,DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(eo,to){!utils$5.isUndefined(eo)&&utils$5.isUndefined(eo["Content-Type"])&&(eo["Content-Type"]=to)}function getDefaultAdapter(){var eo;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(eo=requireXhr()),eo}function stringifySafely(eo,to,ro){if(utils$5.isString(eo))try{return(to||JSON.parse)(eo),utils$5.trim(eo)}catch(no){if(no.name!=="SyntaxError")throw no}return(ro||JSON.stringify)(eo)}var defaults$5={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:getDefaultAdapter(),transformRequest:[function(to,ro){return normalizeHeaderName(ro,"Accept"),normalizeHeaderName(ro,"Content-Type"),utils$5.isFormData(to)||utils$5.isArrayBuffer(to)||utils$5.isBuffer(to)||utils$5.isStream(to)||utils$5.isFile(to)||utils$5.isBlob(to)?to:utils$5.isArrayBufferView(to)?to.buffer:utils$5.isURLSearchParams(to)?(setContentTypeIfUnset(ro,"application/x-www-form-urlencoded;charset=utf-8"),to.toString()):utils$5.isObject(to)||ro&&ro["Content-Type"]==="application/json"?(setContentTypeIfUnset(ro,"application/json"),stringifySafely(to)):to}],transformResponse:[function(to){var ro=this.transitional,no=ro&&ro.silentJSONParsing,oo=ro&&ro.forcedJSONParsing,io=!no&&this.responseType==="json";if(io||oo&&utils$5.isString(to)&&to.length)try{return JSON.parse(to)}catch(so){if(io)throw so.name==="SyntaxError"?enhanceError(so,this,"E_JSON_PARSE"):so}return to}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(to){return to>=200&&to<300}};defaults$5.headers={common:{Accept:"application/json, text/plain, */*"}};utils$5.forEach(["delete","get","head"],function(to){defaults$5.headers[to]={}});utils$5.forEach(["post","put","patch"],function(to){defaults$5.headers[to]=utils$5.merge(DEFAULT_CONTENT_TYPE)});var defaults_1$1=defaults$5,utils$4=utils$9,defaults$4=defaults_1$1,transformData$1=function(to,ro,no){var oo=this||defaults$4;return utils$4.forEach(no,function(so){to=so.call(oo,to,ro)}),to},isCancel$1,hasRequiredIsCancel;function requireIsCancel(){return hasRequiredIsCancel||(hasRequiredIsCancel=1,isCancel$1=function(to){return!!(to&&to.__CANCEL__)}),isCancel$1}var utils$3=utils$9,transformData=transformData$1,isCancel=requireIsCancel(),defaults$3=defaults_1$1;function throwIfCancellationRequested(eo){eo.cancelToken&&eo.cancelToken.throwIfRequested()}var dispatchRequest$1=function(to){throwIfCancellationRequested(to),to.headers=to.headers||{},to.data=transformData.call(to,to.data,to.headers,to.transformRequest),to.headers=utils$3.merge(to.headers.common||{},to.headers[to.method]||{},to.headers),utils$3.forEach(["delete","get","head","post","put","patch","common"],function(oo){delete to.headers[oo]});var ro=to.adapter||defaults$3.adapter;return ro(to).then(function(oo){return throwIfCancellationRequested(to),oo.data=transformData.call(to,oo.data,oo.headers,to.transformResponse),oo},function(oo){return isCancel(oo)||(throwIfCancellationRequested(to),oo&&oo.response&&(oo.response.data=transformData.call(to,oo.response.data,oo.response.headers,to.transformResponse))),Promise.reject(oo)})},utils$2=utils$9,mergeConfig$2=function(to,ro){ro=ro||{};var no={},oo=["url","method","data"],io=["headers","auth","proxy","params"],so=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],ao=["validateStatus"];function lo(ho,po){return utils$2.isPlainObject(ho)&&utils$2.isPlainObject(po)?utils$2.merge(ho,po):utils$2.isPlainObject(po)?utils$2.merge({},po):utils$2.isArray(po)?po.slice():po}function uo(ho){utils$2.isUndefined(ro[ho])?utils$2.isUndefined(to[ho])||(no[ho]=lo(void 0,to[ho])):no[ho]=lo(to[ho],ro[ho])}utils$2.forEach(oo,function(po){utils$2.isUndefined(ro[po])||(no[po]=lo(void 0,ro[po]))}),utils$2.forEach(io,uo),utils$2.forEach(so,function(po){utils$2.isUndefined(ro[po])?utils$2.isUndefined(to[po])||(no[po]=lo(void 0,to[po])):no[po]=lo(void 0,ro[po])}),utils$2.forEach(ao,function(po){po in ro?no[po]=lo(to[po],ro[po]):po in to&&(no[po]=lo(void 0,to[po]))});var co=oo.concat(io).concat(so).concat(ao),fo=Object.keys(to).concat(Object.keys(ro)).filter(function(po){return co.indexOf(po)===-1});return utils$2.forEach(fo,uo),no};const name$1="axios",version$2="0.21.4",description="Promise based HTTP client for the browser and node.js",main$1="index.js",scripts={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository={type:"git",url:"https://github.com/axios/axios.git"},keywords$1=["xhr","http","ajax","promise","node"],author="Matt Zabriskie",license="MIT",bugs={url:"https://github.com/axios/axios/issues"},homepage="https://axios-http.com",devDependencies={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser$2={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr="dist/axios.min.js",unpkg="dist/axios.min.js",typings="./index.d.ts",dependencies={"follow-redirects":"^1.14.0"},bundlesize=[{path:"./dist/axios.min.js",threshold:"5kB"}],require$$0={name:name$1,version:version$2,description,main:main$1,scripts,repository,keywords:keywords$1,author,license,bugs,homepage,devDependencies,browser:browser$2,jsdelivr,unpkg,typings,dependencies,bundlesize};var pkg=require$$0,validators$3={};["object","boolean","number","function","string","symbol"].forEach(function(eo,to){validators$3[eo]=function(no){return typeof no===eo||"a"+(to<1?"n ":" ")+eo}});var deprecatedWarnings={},currentVerArr=pkg.version.split(".");function isOlderVersion(eo,to){for(var ro=to?to.split("."):currentVerArr,no=eo.split("."),oo=0;oo<3;oo++){if(ro[oo]>no[oo])return!0;if(ro[oo]0;){var io=no[oo],so=to[io];if(so){var ao=eo[io],lo=ao===void 0||so(ao,io,eo);if(lo!==!0)throw new TypeError("option "+io+" must be "+lo);continue}if(ro!==!0)throw Error("Unknown option "+io)}}var validator$1={isOlderVersion,assertOptions,validators:validators$3},utils$1=utils$9,buildURL=buildURL$1,InterceptorManager=InterceptorManager_1,dispatchRequest=dispatchRequest$1,mergeConfig$1=mergeConfig$2,validator=validator$1,validators$2=validator.validators;function Axios$1(eo){this.defaults=eo,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios$1.prototype.request=function(to){typeof to=="string"?(to=arguments[1]||{},to.url=arguments[0]):to=to||{},to=mergeConfig$1(this.defaults,to),to.method?to.method=to.method.toLowerCase():this.defaults.method?to.method=this.defaults.method.toLowerCase():to.method="get";var ro=to.transitional;ro!==void 0&&validator.assertOptions(ro,{silentJSONParsing:validators$2.transitional(validators$2.boolean,"1.0.0"),forcedJSONParsing:validators$2.transitional(validators$2.boolean,"1.0.0"),clarifyTimeoutError:validators$2.transitional(validators$2.boolean,"1.0.0")},!1);var no=[],oo=!0;this.interceptors.request.forEach(function(ho){typeof ho.runWhen=="function"&&ho.runWhen(to)===!1||(oo=oo&&ho.synchronous,no.unshift(ho.fulfilled,ho.rejected))});var io=[];this.interceptors.response.forEach(function(ho){io.push(ho.fulfilled,ho.rejected)});var so;if(!oo){var ao=[dispatchRequest,void 0];for(Array.prototype.unshift.apply(ao,no),ao=ao.concat(io),so=Promise.resolve(to);ao.length;)so=so.then(ao.shift(),ao.shift());return so}for(var lo=to;no.length;){var uo=no.shift(),co=no.shift();try{lo=uo(lo)}catch(fo){co(fo);break}}try{so=dispatchRequest(lo)}catch(fo){return Promise.reject(fo)}for(;io.length;)so=so.then(io.shift(),io.shift());return so};Axios$1.prototype.getUri=function(to){return to=mergeConfig$1(this.defaults,to),buildURL(to.url,to.params,to.paramsSerializer).replace(/^\?/,"")};utils$1.forEach(["delete","get","head","options"],function(to){Axios$1.prototype[to]=function(ro,no){return this.request(mergeConfig$1(no||{},{method:to,url:ro,data:(no||{}).data}))}});utils$1.forEach(["post","put","patch"],function(to){Axios$1.prototype[to]=function(ro,no,oo){return this.request(mergeConfig$1(oo||{},{method:to,url:ro,data:no}))}});var Axios_1=Axios$1,Cancel_1,hasRequiredCancel;function requireCancel(){if(hasRequiredCancel)return Cancel_1;hasRequiredCancel=1;function eo(to){this.message=to}return eo.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},eo.prototype.__CANCEL__=!0,Cancel_1=eo,Cancel_1}var CancelToken_1,hasRequiredCancelToken;function requireCancelToken(){if(hasRequiredCancelToken)return CancelToken_1;hasRequiredCancelToken=1;var eo=requireCancel();function to(ro){if(typeof ro!="function")throw new TypeError("executor must be a function.");var no;this.promise=new Promise(function(so){no=so});var oo=this;ro(function(so){oo.reason||(oo.reason=new eo(so),no(oo.reason))})}return to.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},to.source=function(){var no,oo=new to(function(so){no=so});return{token:oo,cancel:no}},CancelToken_1=to,CancelToken_1}var spread$1,hasRequiredSpread;function requireSpread(){return hasRequiredSpread||(hasRequiredSpread=1,spread$1=function(to){return function(no){return to.apply(null,no)}}),spread$1}var isAxiosError,hasRequiredIsAxiosError;function requireIsAxiosError(){return hasRequiredIsAxiosError||(hasRequiredIsAxiosError=1,isAxiosError=function(to){return typeof to=="object"&&to.isAxiosError===!0}),isAxiosError}var utils=utils$9,bind=bind$2,Axios=Axios_1,mergeConfig=mergeConfig$2,defaults$2=defaults_1$1;function createInstance(eo){var to=new Axios(eo),ro=bind(Axios.prototype.request,to);return utils.extend(ro,Axios.prototype,to),utils.extend(ro,to),ro}var axios=createInstance(defaults$2);axios.Axios=Axios;axios.create=function(to){return createInstance(mergeConfig(axios.defaults,to))};axios.Cancel=requireCancel();axios.CancelToken=requireCancelToken();axios.isCancel=requireIsCancel();axios.all=function(to){return Promise.all(to)};axios.spread=requireSpread();axios.isAxiosError=requireIsAxiosError();axios$1.exports=axios;axios$1.exports.default=axios;var rngBrowser={exports:{}},getRandomValues$1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(getRandomValues$1){var rnds8$1=new Uint8Array(16);rngBrowser.exports=function(){return getRandomValues$1(rnds8$1),rnds8$1}}else{var rnds=new Array(16);rngBrowser.exports=function(){for(var to=0,ro;to<16;to++)to&3||(ro=Math.random()*4294967296),rnds[to]=ro>>>((to&3)<<3)&255;return rnds}}var rngBrowserExports=rngBrowser.exports,byteToHex$1=[];for(var i$5=0;i$5<256;++i$5)byteToHex$1[i$5]=(i$5+256).toString(16).substr(1);function bytesToUuid$3(eo,to){var ro=to||0,no=byteToHex$1;return[no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]]].join("")}var bytesToUuid_1=bytesToUuid$3,rng$2=rngBrowserExports,bytesToUuid$2=bytesToUuid_1,_nodeId,_clockseq,_lastMSecs=0,_lastNSecs=0;function v1$1(eo,to,ro){var no=to&&ro||0,oo=to||[];eo=eo||{};var io=eo.node||_nodeId,so=eo.clockseq!==void 0?eo.clockseq:_clockseq;if(io==null||so==null){var ao=rng$2();io==null&&(io=_nodeId=[ao[0]|1,ao[1],ao[2],ao[3],ao[4],ao[5]]),so==null&&(so=_clockseq=(ao[6]<<8|ao[7])&16383)}var lo=eo.msecs!==void 0?eo.msecs:new Date().getTime(),uo=eo.nsecs!==void 0?eo.nsecs:_lastNSecs+1,co=lo-_lastMSecs+(uo-_lastNSecs)/1e4;if(co<0&&eo.clockseq===void 0&&(so=so+1&16383),(co<0||lo>_lastMSecs)&&eo.nsecs===void 0&&(uo=0),uo>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_lastMSecs=lo,_lastNSecs=uo,_clockseq=so,lo+=122192928e5;var fo=((lo&268435455)*1e4+uo)%4294967296;oo[no++]=fo>>>24&255,oo[no++]=fo>>>16&255,oo[no++]=fo>>>8&255,oo[no++]=fo&255;var ho=lo/4294967296*1e4&268435455;oo[no++]=ho>>>8&255,oo[no++]=ho&255,oo[no++]=ho>>>24&15|16,oo[no++]=ho>>>16&255,oo[no++]=so>>>8|128,oo[no++]=so&255;for(var po=0;po<6;++po)oo[no+po]=io[po];return to||bytesToUuid$2(oo)}var v1_1=v1$1,rng$1=rngBrowserExports,bytesToUuid$1=bytesToUuid_1;function v4$2(eo,to,ro){var no=to&&ro||0;typeof eo=="string"&&(to=eo==="binary"?new Array(16):null,eo=null),eo=eo||{};var oo=eo.random||(eo.rng||rng$1)();if(oo[6]=oo[6]&15|64,oo[8]=oo[8]&63|128,to)for(var io=0;io<16;++io)to[no+io]=oo[io];return to||bytesToUuid$1(oo)}var v4_1=v4$2,v1=v1_1,v4$1=v4_1,uuid=v4$1;uuid.v1=v1;uuid.v4=v4$1;var uuid_1=uuid;const BASELINE_VARIANT_ID="variant_0",DEFAULT_CHAT_INPUT_NAME="chat_input",DEFAULT_CHAT_HISTORY_NAME="chat_history",DEFAULT_CHAT_OUTPUT_NAME="chat_output";var FlowFeatures=(eo=>(eo.OpenCodeFileInNode="OpenCodeFileInNode",eo.ShowWarningIconOnNode="ShowWarningIconOnNode",eo))(FlowFeatures||{}),ConnectionType=(eo=>(eo.OpenAI="OpenAI",eo.AzureOpenAI="AzureOpenAI",eo.Serp="Serp",eo.Bing="Bing",eo.AzureContentModerator="AzureContentModerator",eo.Custom="Custom",eo.AzureContentSafety="AzureContentSafety",eo.CognitiveSearch="CognitiveSearch",eo.SubstrateLLM="SubstrateLLM",eo.Pinecone="Pinecone",eo.Qdrant="Qdrant",eo.Weaviate="Weaviate",eo.FormRecognizer="FormRecognizer",eo.Serverless="Serverless",eo))(ConnectionType||{}),FlowType=(eo=>(eo.Default="Default",eo.Evaluation="Evaluation",eo.Chat="Chat",eo.Rag="Rag",eo))(FlowType||{}),InputType=(eo=>(eo.default="default",eo.uionly_hidden="uionly_hidden",eo))(InputType||{}),Orientation$1=(eo=>(eo.Horizontal="Horizontal",eo.Vertical="Vertical",eo))(Orientation$1||{}),ToolType=(eo=>(eo.llm="llm",eo.python="python",eo.action="action",eo.prompt="prompt",eo.custom_llm="custom_llm",eo.csharp="csharp",eo.typescript="typescript",eo))(ToolType||{}),ValueType=(eo=>(eo.int="int",eo.double="double",eo.bool="bool",eo.string="string",eo.secret="secret",eo.prompt_template="prompt_template",eo.object="object",eo.list="list",eo.BingConnection="BingConnection",eo.OpenAIConnection="OpenAIConnection",eo.AzureOpenAIConnection="AzureOpenAIConnection",eo.AzureContentModeratorConnection="AzureContentModeratorConnection",eo.CustomConnection="CustomConnection",eo.AzureContentSafetyConnection="AzureContentSafetyConnection",eo.SerpConnection="SerpConnection",eo.CognitiveSearchConnection="CognitiveSearchConnection",eo.SubstrateLLMConnection="SubstrateLLMConnection",eo.PineconeConnection="PineconeConnection",eo.QdrantConnection="QdrantConnection",eo.WeaviateConnection="WeaviateConnection",eo.function_list="function_list",eo.function_str="function_str",eo.FormRecognizerConnection="FormRecognizerConnection",eo.file_path="file_path",eo.image="image",eo.assistant_definition="assistant_definition",eo.ServerlessConnection="ServerlessConnection",eo))(ValueType||{});const FLOW_INPUT_REF_NAME_FLOW="flow",FLOW_INPUT_REF_NAME_INPUT="inputs",FLOW_INPUT_NODE_NAME="inputs",FLOW_OUTPUT_NODE_NAME="outputs",isFlowInput=eo=>[FLOW_INPUT_REF_NAME_FLOW,FLOW_INPUT_REF_NAME_INPUT].includes(eo),SystemColors=["#637CEF","#E61C99","#00A5AF","#9470BD","#689920","#3487C7","#CA5010","#009B51","#B27C00","#B146C2","#4F6BED","#EE5FB7","#008B94","#D77440","#BA58C9","#3A96DD","#E3008C","#57811B","#C36BD1","#D06228","#6E0811","#C50F1F","#F7630C","#107C10","#094509"];var ValidationErrorType=(eo=>(eo.CircularDependency="CircularDependency",eo.InputDependencyNotFound="InputDependencyNotFound",eo.InputGenerateError="InputGenerateError",eo.InputSelfReference="InputSelfReference",eo.InputEmpty="InputEmpty",eo.InputInvalidType="InputInvalidType",eo.NodeConfigInvalid="NodeConfigInvalid",eo.UnparsedCode="UnparsedCode",eo.EmptyCode="EmptyCode",eo.MissingTool="MissingTool",eo.AutoParseInputError="AutoParseInputError",eo.RuntimeNameEmpty="RuntimeNameEmpty",eo.RuntimeStatusInvalid="RuntimeStatusInvalid",eo))(ValidationErrorType||{}),ChatMessageFrom=(eo=>(eo.System="system",eo.ErrorHandler="error",eo.Chatbot="chatbot",eo.User="user",eo))(ChatMessageFrom||{}),ChatMessageType$1=(eo=>(eo.Text="text",eo.Typing="typing",eo.SessionSplit="session-split",eo))(ChatMessageType$1||{});const convertToBool=eo=>eo==="true"||eo==="True"||eo===!0,basicValueTypeDetector=eo=>Array.isArray(eo)?ValueType.list:typeof eo=="boolean"?ValueType.bool:typeof eo=="string"?ValueType.string:typeof eo=="number"?Number.isInteger(eo)?ValueType.int:ValueType.double:ValueType.object;function valueStringify(eo){if(eo==null)return;switch(basicValueTypeDetector(eo)){case ValueType.string:return eo;case ValueType.int:case ValueType.double:return eo.toString();case ValueType.bool:return eo?"True":"False";case ValueType.object:case ValueType.list:return JSON.stringify(eo);default:return String(eo)}}var lodash$1={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */lodash$1.exports;(function(eo,to){(function(){var ro,no="4.17.21",oo=200,io="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",so="Expected a function",ao="Invalid `variable` option passed into `_.template`",lo="__lodash_hash_undefined__",uo=500,co="__lodash_placeholder__",fo=1,ho=2,po=4,go=1,vo=2,bo=1,xo=2,_o=4,Eo=8,So=16,To=32,wo=64,Co=128,Oo=256,Ao=512,Ro=30,No="...",Mo=800,Do=16,jo=1,Fo=2,$o=3,Lo=1/0,Ho=9007199254740991,qo=17976931348623157e292,Uo=NaN,Yo=4294967295,Zo=Yo-1,_s=Yo>>>1,Ss=[["ary",Co],["bind",bo],["bindKey",xo],["curry",Eo],["curryRight",So],["flip",Ao],["partial",To],["partialRight",wo],["rearg",Oo]],As="[object Arguments]",Ns="[object Array]",ws="[object AsyncFunction]",Ds="[object Boolean]",Jo="[object Date]",Cs="[object DOMException]",Bs="[object Error]",zs="[object Function]",Ls="[object GeneratorFunction]",ga="[object Map]",Js="[object Number]",Xs="[object Null]",$a="[object Object]",Ll="[object Promise]",Kl="[object Proxy]",Xl="[object RegExp]",Nl="[object Set]",xa="[object String]",El="[object Symbol]",cu="[object Undefined]",ks="[object WeakMap]",Es="[object WeakSet]",bs="[object ArrayBuffer]",Os="[object DataView]",Vs="[object Float32Array]",Ks="[object Float64Array]",Ms="[object Int8Array]",Hs="[object Int16Array]",Zs="[object Int32Array]",xl="[object Uint8Array]",Sl="[object Uint8ClampedArray]",$l="[object Uint16Array]",ru="[object Uint32Array]",au=/\b__p \+= '';/g,zl=/\b(__p \+=) '' \+/g,pu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Su=/&(?:amp|lt|gt|quot|#39);/g,Zl=/[&<>"']/g,Dl=RegExp(Su.source),gu=RegExp(Zl.source),lu=/<%-([\s\S]+?)%>/g,mu=/<%([\s\S]+?)%>/g,ou=/<%=([\s\S]+?)%>/g,Fl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yl=/^\w*$/,Ys=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vu=/[\\^$.*+?()[\]{}|]/g,Nu=RegExp(vu.source),du=/^\s+/,cp=/\s/,qu=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ru=/\{\n\/\* \[wrapped with (.+)\] \*/,_h=/,? & /,qs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ko=/[()=,{}\[\]\/\s]/,Qo=/\\(\\)?/g,zo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vo=/\w*$/,Bo=/^[-+]0x[0-9a-f]+$/i,Xo=/^0b[01]+$/i,vs=/^\[object .+?Constructor\]$/,ys=/^0o[0-7]+$/i,ps=/^(?:0|[1-9]\d*)$/,Rs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Us=/($^)/,Rl=/['\n\r\u2028\u2029\\]/g,Ml="\\ud800-\\udfff",Ol="\\u0300-\\u036f",Cl="\\ufe20-\\ufe2f",Ul="\\u20d0-\\u20ff",fu=Ol+Cl+Ul,Bl="\\u2700-\\u27bf",Eu="a-z\\xdf-\\xf6\\xf8-\\xff",Iu="\\xac\\xb1\\xd7\\xf7",zu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",dp="\\u2000-\\u206f",Yu=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kp="A-Z\\xc0-\\xd6\\xd8-\\xde",fp="\\ufe0e\\ufe0f",wu=Iu+zu+dp+Yu,ep="['’]",Cp="["+Ml+"]",hp="["+wu+"]",wp="["+fu+"]",pp="\\d+",jp="["+Bl+"]",bp="["+Eu+"]",Ap="[^"+Ml+wu+pp+Bl+Eu+kp+"]",Op="\\ud83c[\\udffb-\\udfff]",_p="(?:"+wp+"|"+Op+")",xp="[^"+Ml+"]",d1="(?:\\ud83c[\\udde6-\\uddff]){2}",O1="[\\ud800-\\udbff][\\udc00-\\udfff]",zp="["+kp+"]",Y1="\\u200d",R1="(?:"+bp+"|"+Ap+")",Jp="(?:"+zp+"|"+Ap+")",f1="(?:"+ep+"(?:d|ll|m|re|s|t|ve))?",h1="(?:"+ep+"(?:D|LL|M|RE|S|T|VE))?",e1=_p+"?",Hp="["+fp+"]?",Pm="(?:"+Y1+"(?:"+[xp,d1,O1].join("|")+")"+Hp+e1+")*",X1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",I1=Hp+e1+Pm,zm="(?:"+[jp,d1,O1].join("|")+")"+I1,Hm="(?:"+[xp+wp+"?",wp,d1,O1,Cp].join("|")+")",t1=RegExp(ep,"g"),Vm=RegExp(wp,"g"),Vp=RegExp(Op+"(?="+Op+")|"+Hm+I1,"g"),Z1=RegExp([zp+"?"+bp+"+"+f1+"(?="+[hp,zp,"$"].join("|")+")",Jp+"+"+h1+"(?="+[hp,zp+R1,"$"].join("|")+")",zp+"?"+R1+"+"+f1,zp+"+"+h1,jm,X1,pp,zm].join("|"),"g"),Qs=RegExp("["+Y1+Ml+fu+fp+"]"),na=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wl=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Hl=-1,Al={};Al[Vs]=Al[Ks]=Al[Ms]=Al[Hs]=Al[Zs]=Al[xl]=Al[Sl]=Al[$l]=Al[ru]=!0,Al[As]=Al[Ns]=Al[bs]=Al[Ds]=Al[Os]=Al[Jo]=Al[Bs]=Al[zs]=Al[ga]=Al[Js]=Al[$a]=Al[Xl]=Al[Nl]=Al[xa]=Al[ks]=!1;var Il={};Il[As]=Il[Ns]=Il[bs]=Il[Os]=Il[Ds]=Il[Jo]=Il[Vs]=Il[Ks]=Il[Ms]=Il[Hs]=Il[Zs]=Il[ga]=Il[Js]=Il[$a]=Il[Xl]=Il[Nl]=Il[xa]=Il[El]=Il[xl]=Il[Sl]=Il[$l]=Il[ru]=!0,Il[Bs]=Il[zs]=Il[ks]=!1;var bu={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_u={"&":"&","<":"<",">":">",'"':""","'":"'"},$u={"&":"&","<":"<",">":">",""":'"',"'":"'"},tp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Rp=parseFloat,Gm=parseInt,p1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,N1=typeof self=="object"&&self&&self.Object===Object&&self,Du=p1||N1||Function("return this")(),qm=to&&!to.nodeType&&to,r1=qm&&!0&&eo&&!eo.nodeType&&eo,ov=r1&&r1.exports===qm,Wm=ov&&p1.process,rp=function(){try{var xs=r1&&r1.require&&r1.require("util").types;return xs||Wm&&Wm.binding&&Wm.binding("util")}catch{}}(),iv=rp&&rp.isArrayBuffer,sv=rp&&rp.isDate,av=rp&&rp.isMap,lv=rp&&rp.isRegExp,uv=rp&&rp.isSet,cv=rp&&rp.isTypedArray;function Xu(xs,$s,Is){switch(Is.length){case 0:return xs.call($s);case 1:return xs.call($s,Is[0]);case 2:return xs.call($s,Is[0],Is[1]);case 3:return xs.call($s,Is[0],Is[1],Is[2])}return xs.apply($s,Is)}function p_(xs,$s,Is,_l){for(var Ql=-1,uu=xs==null?0:xs.length;++Ql-1}function Km(xs,$s,Is){for(var _l=-1,Ql=xs==null?0:xs.length;++_l-1;);return Is}function yv(xs,$s){for(var Is=xs.length;Is--&&g1($s,xs[Is],0)>-1;);return Is}function E_(xs,$s){for(var Is=xs.length,_l=0;Is--;)xs[Is]===$s&&++_l;return _l}var T_=Xm(bu),k_=Xm(_u);function C_(xs){return"\\"+tp[xs]}function w_(xs,$s){return xs==null?ro:xs[$s]}function m1(xs){return Qs.test(xs)}function A_(xs){return na.test(xs)}function O_(xs){for(var $s,Is=[];!($s=xs.next()).done;)Is.push($s.value);return Is}function t0(xs){var $s=-1,Is=Array(xs.size);return xs.forEach(function(_l,Ql){Is[++$s]=[Ql,_l]}),Is}function bv(xs,$s){return function(Is){return xs($s(Is))}}function Wp(xs,$s){for(var Is=-1,_l=xs.length,Ql=0,uu=[];++Is<_l;){var Mu=xs[Is];(Mu===$s||Mu===co)&&(xs[Is]=co,uu[Ql++]=Is)}return uu}function em(xs){var $s=-1,Is=Array(xs.size);return xs.forEach(function(_l){Is[++$s]=_l}),Is}function R_(xs){var $s=-1,Is=Array(xs.size);return xs.forEach(function(_l){Is[++$s]=[_l,_l]}),Is}function I_(xs,$s,Is){for(var _l=Is-1,Ql=xs.length;++_l-1}function yx(mo,yo){var ko=this.__data__,Io=mm(ko,mo);return Io<0?(++this.size,ko.push([mo,yo])):ko[Io][1]=yo,this}Ip.prototype.clear=hx,Ip.prototype.delete=gx,Ip.prototype.get=mx,Ip.prototype.has=vx,Ip.prototype.set=yx;function Np(mo){var yo=-1,ko=mo==null?0:mo.length;for(this.clear();++yo=yo?mo:yo)),mo}function sp(mo,yo,ko,Io,Po,Wo){var hs,gs=yo&fo,Ts=yo&ho,Fs=yo&po;if(ko&&(hs=Po?ko(mo,Io,Po,Wo):ko(mo)),hs!==ro)return hs;if(!ku(mo))return mo;var Ps=Yl(mo);if(Ps){if(hs=SS(mo),!gs)return Wu(mo,hs)}else{var Gs=ju(mo),ba=Gs==zs||Gs==Ls;if(Zp(mo))return ty(mo,gs);if(Gs==$a||Gs==As||ba&&!Po){if(hs=Ts||ba?{}:_y(mo),!gs)return Ts?dS(mo,Dx(hs,mo)):cS(mo,Iv(hs,mo))}else{if(!Il[Gs])return Po?mo:{};hs=ES(mo,Gs,gs)}}Wo||(Wo=new mp);var Tl=Wo.get(mo);if(Tl)return Tl;Wo.set(mo,hs),Qy(mo)?mo.forEach(function(Gl){hs.add(sp(Gl,yo,ko,Gl,mo,Wo))}):Ky(mo)&&mo.forEach(function(Gl,nu){hs.set(nu,sp(Gl,yo,ko,nu,mo,Wo))});var Vl=Fs?Ts?w0:C0:Ts?Uu:Lu,eu=Ps?ro:Vl(mo);return np(eu||mo,function(Gl,nu){eu&&(nu=Gl,Gl=mo[nu]),P1(hs,nu,sp(Gl,yo,ko,nu,mo,Wo))}),hs}function Mx(mo){var yo=Lu(mo);return function(ko){return Nv(ko,mo,yo)}}function Nv(mo,yo,ko){var Io=ko.length;if(mo==null)return!Io;for(mo=xu(mo);Io--;){var Po=ko[Io],Wo=yo[Po],hs=mo[Po];if(hs===ro&&!(Po in mo)||!Wo(hs))return!1}return!0}function $v(mo,yo,ko){if(typeof mo!="function")throw new op(so);return W1(function(){mo.apply(ro,ko)},yo)}function j1(mo,yo,ko,Io){var Po=-1,Wo=J1,hs=!0,gs=mo.length,Ts=[],Fs=yo.length;if(!gs)return Ts;ko&&(yo=Tu(yo,Zu(ko))),Io?(Wo=Km,hs=!1):yo.length>=oo&&(Wo=$1,hs=!1,yo=new i1(yo));e:for(;++PoPo?0:Po+ko),Io=Io===ro||Io>Po?Po:Jl(Io),Io<0&&(Io+=Po),Io=ko>Io?0:Xy(Io);ko0&&ko(gs)?yo>1?Fu(gs,yo-1,ko,Io,Po):qp(Po,gs):Io||(Po[Po.length]=gs)}return Po}var l0=ay(),Bv=ay(!0);function Sp(mo,yo){return mo&&l0(mo,yo,Lu)}function u0(mo,yo){return mo&&Bv(mo,yo,Lu)}function ym(mo,yo){return Gp(yo,function(ko){return Lp(mo[ko])})}function a1(mo,yo){yo=Yp(yo,mo);for(var ko=0,Io=yo.length;mo!=null&&koyo}function Fx(mo,yo){return mo!=null&&yu.call(mo,yo)}function Px(mo,yo){return mo!=null&&yo in xu(mo)}function jx(mo,yo,ko){return mo>=Pu(yo,ko)&&mo=120&&Ps.length>=120)?new i1(hs&&Ps):ro}Ps=mo[0];var Gs=-1,ba=gs[0];e:for(;++Gs-1;)gs!==mo&&um.call(gs,Ts,1),um.call(mo,Ts,1);return mo}function Kv(mo,yo){for(var ko=mo?yo.length:0,Io=ko-1;ko--;){var Po=yo[ko];if(ko==Io||Po!==Wo){var Wo=Po;Bp(Po)?um.call(mo,Po,1):b0(mo,Po)}}return mo}function m0(mo,yo){return mo+fm(wv()*(yo-mo+1))}function Jx(mo,yo,ko,Io){for(var Po=-1,Wo=Bu(dm((yo-mo)/(ko||1)),0),hs=Is(Wo);Wo--;)hs[Io?Wo:++Po]=mo,mo+=ko;return hs}function v0(mo,yo){var ko="";if(!mo||yo<1||yo>Ho)return ko;do yo%2&&(ko+=mo),yo=fm(yo/2),yo&&(mo+=mo);while(yo);return ko}function tu(mo,yo){return D0(Ey(mo,yo,Qu),mo+"")}function eS(mo){return Rv(A1(mo))}function tS(mo,yo){var ko=A1(mo);return Om(ko,s1(yo,0,ko.length))}function V1(mo,yo,ko,Io){if(!ku(mo))return mo;yo=Yp(yo,mo);for(var Po=-1,Wo=yo.length,hs=Wo-1,gs=mo;gs!=null&&++PoPo?0:Po+yo),ko=ko>Po?Po:ko,ko<0&&(ko+=Po),Po=yo>ko?0:ko-yo>>>0,yo>>>=0;for(var Wo=Is(Po);++Io>>1,hs=mo[Wo];hs!==null&&!_c(hs)&&(ko?hs<=yo:hs=oo){var Fs=yo?null:gS(mo);if(Fs)return em(Fs);hs=!1,Po=$1,Ts=new i1}else Ts=yo?[]:gs;e:for(;++Io=Io?mo:ap(mo,yo,ko)}var ey=G_||function(mo){return Du.clearTimeout(mo)};function ty(mo,yo){if(yo)return mo.slice();var ko=mo.length,Io=Sv?Sv(ko):new mo.constructor(ko);return mo.copy(Io),Io}function E0(mo){var yo=new mo.constructor(mo.byteLength);return new am(yo).set(new am(mo)),yo}function sS(mo,yo){var ko=yo?E0(mo.buffer):mo.buffer;return new mo.constructor(ko,mo.byteOffset,mo.byteLength)}function aS(mo){var yo=new mo.constructor(mo.source,Vo.exec(mo));return yo.lastIndex=mo.lastIndex,yo}function lS(mo){return F1?xu(F1.call(mo)):{}}function ry(mo,yo){var ko=yo?E0(mo.buffer):mo.buffer;return new mo.constructor(ko,mo.byteOffset,mo.length)}function ny(mo,yo){if(mo!==yo){var ko=mo!==ro,Io=mo===null,Po=mo===mo,Wo=_c(mo),hs=yo!==ro,gs=yo===null,Ts=yo===yo,Fs=_c(yo);if(!gs&&!Fs&&!Wo&&mo>yo||Wo&&hs&&Ts&&!gs&&!Fs||Io&&hs&&Ts||!ko&&Ts||!Po)return 1;if(!Io&&!Wo&&!Fs&&mo=gs)return Ts;var Fs=ko[Io];return Ts*(Fs=="desc"?-1:1)}}return mo.index-yo.index}function oy(mo,yo,ko,Io){for(var Po=-1,Wo=mo.length,hs=ko.length,gs=-1,Ts=yo.length,Fs=Bu(Wo-hs,0),Ps=Is(Ts+Fs),Gs=!Io;++gs1?ko[Po-1]:ro,hs=Po>2?ko[2]:ro;for(Wo=mo.length>3&&typeof Wo=="function"?(Po--,Wo):ro,hs&&Vu(ko[0],ko[1],hs)&&(Wo=Po<3?ro:Wo,Po=1),yo=xu(yo);++Io-1?Po[Wo?yo[hs]:hs]:ro}}function cy(mo){return Mp(function(yo){var ko=yo.length,Io=ko,Po=ip.prototype.thru;for(mo&&yo.reverse();Io--;){var Wo=yo[Io];if(typeof Wo!="function")throw new op(so);if(Po&&!hs&&wm(Wo)=="wrapper")var hs=new ip([],!0)}for(Io=hs?Io:ko;++Io1&&su.reverse(),Ps&&Tsgs))return!1;var Fs=Wo.get(mo),Ps=Wo.get(yo);if(Fs&&Ps)return Fs==yo&&Ps==mo;var Gs=-1,ba=!0,Tl=ko&vo?new i1:ro;for(Wo.set(mo,yo),Wo.set(yo,mo);++Gs1?"& ":"")+yo[Io],yo=yo.join(ko>2?", ":" "),mo.replace(qu,`{ +/* [wrapped with `+yo+`] */ +`)}function kS(mo){return Yl(mo)||c1(mo)||!!(kv&&mo&&mo[kv])}function Bp(mo,yo){var ko=typeof mo;return yo=yo??Ho,!!yo&&(ko=="number"||ko!="symbol"&&ps.test(mo))&&mo>-1&&mo%1==0&&mo0){if(++yo>=Mo)return arguments[0]}else yo=0;return mo.apply(ro,arguments)}}function Om(mo,yo){var ko=-1,Io=mo.length,Po=Io-1;for(yo=yo===ro?Io:yo;++ko1?mo[yo-1]:ro;return ko=typeof ko=="function"?(mo.pop(),ko):ro,My(mo,ko)});function By(mo){var yo=Go(mo);return yo.__chain__=!0,yo}function LE(mo,yo){return yo(mo),mo}function Rm(mo,yo){return yo(mo)}var FE=Mp(function(mo){var yo=mo.length,ko=yo?mo[0]:0,Io=this.__wrapped__,Po=function(Wo){return a0(Wo,mo)};return yo>1||this.__actions__.length||!(Io instanceof iu)||!Bp(ko)?this.thru(Po):(Io=Io.slice(ko,+ko+(yo?1:0)),Io.__actions__.push({func:Rm,args:[Po],thisArg:ro}),new ip(Io,this.__chain__).thru(function(Wo){return yo&&!Wo.length&&Wo.push(ro),Wo}))});function PE(){return By(this)}function jE(){return new ip(this.value(),this.__chain__)}function zE(){this.__values__===ro&&(this.__values__=Yy(this.value()));var mo=this.__index__>=this.__values__.length,yo=mo?ro:this.__values__[this.__index__++];return{done:mo,value:yo}}function HE(){return this}function VE(mo){for(var yo,ko=this;ko instanceof gm;){var Io=Oy(ko);Io.__index__=0,Io.__values__=ro,yo?Po.__wrapped__=Io:yo=Io;var Po=Io;ko=ko.__wrapped__}return Po.__wrapped__=mo,yo}function GE(){var mo=this.__wrapped__;if(mo instanceof iu){var yo=mo;return this.__actions__.length&&(yo=new iu(this)),yo=yo.reverse(),yo.__actions__.push({func:Rm,args:[M0],thisArg:ro}),new ip(yo,this.__chain__)}return this.thru(M0)}function qE(){return Zv(this.__wrapped__,this.__actions__)}var WE=Sm(function(mo,yo,ko){yu.call(mo,ko)?++mo[ko]:$p(mo,ko,1)});function KE(mo,yo,ko){var Io=Yl(mo)?dv:Bx;return ko&&Vu(mo,yo,ko)&&(yo=ro),Io(mo,Pl(yo,3))}function UE(mo,yo){var ko=Yl(mo)?Gp:Mv;return ko(mo,Pl(yo,3))}var QE=uy(Ry),YE=uy(Iy);function XE(mo,yo){return Fu(Im(mo,yo),1)}function ZE(mo,yo){return Fu(Im(mo,yo),Lo)}function JE(mo,yo,ko){return ko=ko===ro?1:Jl(ko),Fu(Im(mo,yo),ko)}function Ly(mo,yo){var ko=Yl(mo)?np:Up;return ko(mo,Pl(yo,3))}function Fy(mo,yo){var ko=Yl(mo)?g_:Dv;return ko(mo,Pl(yo,3))}var eT=Sm(function(mo,yo,ko){yu.call(mo,ko)?mo[ko].push(yo):$p(mo,ko,[yo])});function tT(mo,yo,ko,Io){mo=Ku(mo)?mo:A1(mo),ko=ko&&!Io?Jl(ko):0;var Po=mo.length;return ko<0&&(ko=Bu(Po+ko,0)),Bm(mo)?ko<=Po&&mo.indexOf(yo,ko)>-1:!!Po&&g1(mo,yo,ko)>-1}var rT=tu(function(mo,yo,ko){var Io=-1,Po=typeof yo=="function",Wo=Ku(mo)?Is(mo.length):[];return Up(mo,function(hs){Wo[++Io]=Po?Xu(yo,hs,ko):z1(hs,yo,ko)}),Wo}),nT=Sm(function(mo,yo,ko){$p(mo,ko,yo)});function Im(mo,yo){var ko=Yl(mo)?Tu:zv;return ko(mo,Pl(yo,3))}function oT(mo,yo,ko,Io){return mo==null?[]:(Yl(yo)||(yo=yo==null?[]:[yo]),ko=Io?ro:ko,Yl(ko)||(ko=ko==null?[]:[ko]),qv(mo,yo,ko))}var iT=Sm(function(mo,yo,ko){mo[ko?0:1].push(yo)},function(){return[[],[]]});function sT(mo,yo,ko){var Io=Yl(mo)?Um:gv,Po=arguments.length<3;return Io(mo,Pl(yo,4),ko,Po,Up)}function aT(mo,yo,ko){var Io=Yl(mo)?m_:gv,Po=arguments.length<3;return Io(mo,Pl(yo,4),ko,Po,Dv)}function lT(mo,yo){var ko=Yl(mo)?Gp:Mv;return ko(mo,Dm(Pl(yo,3)))}function uT(mo){var yo=Yl(mo)?Rv:eS;return yo(mo)}function cT(mo,yo,ko){(ko?Vu(mo,yo,ko):yo===ro)?yo=1:yo=Jl(yo);var Io=Yl(mo)?Ix:tS;return Io(mo,yo)}function dT(mo){var yo=Yl(mo)?Nx:nS;return yo(mo)}function fT(mo){if(mo==null)return 0;if(Ku(mo))return Bm(mo)?y1(mo):mo.length;var yo=ju(mo);return yo==ga||yo==Nl?mo.size:h0(mo).length}function hT(mo,yo,ko){var Io=Yl(mo)?Qm:oS;return ko&&Vu(mo,yo,ko)&&(yo=ro),Io(mo,Pl(yo,3))}var pT=tu(function(mo,yo){if(mo==null)return[];var ko=yo.length;return ko>1&&Vu(mo,yo[0],yo[1])?yo=[]:ko>2&&Vu(yo[0],yo[1],yo[2])&&(yo=[yo[0]]),qv(mo,Fu(yo,1),[])}),Nm=q_||function(){return Du.Date.now()};function gT(mo,yo){if(typeof yo!="function")throw new op(so);return mo=Jl(mo),function(){if(--mo<1)return yo.apply(this,arguments)}}function Py(mo,yo,ko){return yo=ko?ro:yo,yo=mo&&yo==null?mo.length:yo,Dp(mo,Co,ro,ro,ro,ro,yo)}function jy(mo,yo){var ko;if(typeof yo!="function")throw new op(so);return mo=Jl(mo),function(){return--mo>0&&(ko=yo.apply(this,arguments)),mo<=1&&(yo=ro),ko}}var L0=tu(function(mo,yo,ko){var Io=bo;if(ko.length){var Po=Wp(ko,C1(L0));Io|=To}return Dp(mo,Io,yo,ko,Po)}),zy=tu(function(mo,yo,ko){var Io=bo|xo;if(ko.length){var Po=Wp(ko,C1(zy));Io|=To}return Dp(yo,Io,mo,ko,Po)});function Hy(mo,yo,ko){yo=ko?ro:yo;var Io=Dp(mo,Eo,ro,ro,ro,ro,ro,yo);return Io.placeholder=Hy.placeholder,Io}function Vy(mo,yo,ko){yo=ko?ro:yo;var Io=Dp(mo,So,ro,ro,ro,ro,ro,yo);return Io.placeholder=Vy.placeholder,Io}function Gy(mo,yo,ko){var Io,Po,Wo,hs,gs,Ts,Fs=0,Ps=!1,Gs=!1,ba=!0;if(typeof mo!="function")throw new op(so);yo=up(yo)||0,ku(ko)&&(Ps=!!ko.leading,Gs="maxWait"in ko,Wo=Gs?Bu(up(ko.maxWait)||0,yo):Wo,ba="trailing"in ko?!!ko.trailing:ba);function Tl(Ou){var yp=Io,Pp=Po;return Io=Po=ro,Fs=Ou,hs=mo.apply(Pp,yp),hs}function Vl(Ou){return Fs=Ou,gs=W1(nu,yo),Ps?Tl(Ou):hs}function eu(Ou){var yp=Ou-Ts,Pp=Ou-Fs,l_=yo-yp;return Gs?Pu(l_,Wo-Pp):l_}function Gl(Ou){var yp=Ou-Ts,Pp=Ou-Fs;return Ts===ro||yp>=yo||yp<0||Gs&&Pp>=Wo}function nu(){var Ou=Nm();if(Gl(Ou))return su(Ou);gs=W1(nu,eu(Ou))}function su(Ou){return gs=ro,ba&&Io?Tl(Ou):(Io=Po=ro,hs)}function _d(){gs!==ro&&ey(gs),Fs=0,Io=Ts=Po=gs=ro}function Gu(){return gs===ro?hs:su(Nm())}function _f(){var Ou=Nm(),yp=Gl(Ou);if(Io=arguments,Po=this,Ts=Ou,yp){if(gs===ro)return Vl(Ts);if(Gs)return ey(gs),gs=W1(nu,yo),Tl(Ts)}return gs===ro&&(gs=W1(nu,yo)),hs}return _f.cancel=_d,_f.flush=Gu,_f}var mT=tu(function(mo,yo){return $v(mo,1,yo)}),vT=tu(function(mo,yo,ko){return $v(mo,up(yo)||0,ko)});function yT(mo){return Dp(mo,Ao)}function $m(mo,yo){if(typeof mo!="function"||yo!=null&&typeof yo!="function")throw new op(so);var ko=function(){var Io=arguments,Po=yo?yo.apply(this,Io):Io[0],Wo=ko.cache;if(Wo.has(Po))return Wo.get(Po);var hs=mo.apply(this,Io);return ko.cache=Wo.set(Po,hs)||Wo,hs};return ko.cache=new($m.Cache||Np),ko}$m.Cache=Np;function Dm(mo){if(typeof mo!="function")throw new op(so);return function(){var yo=arguments;switch(yo.length){case 0:return!mo.call(this);case 1:return!mo.call(this,yo[0]);case 2:return!mo.call(this,yo[0],yo[1]);case 3:return!mo.call(this,yo[0],yo[1],yo[2])}return!mo.apply(this,yo)}}function bT(mo){return jy(2,mo)}var _T=iS(function(mo,yo){yo=yo.length==1&&Yl(yo[0])?Tu(yo[0],Zu(Pl())):Tu(Fu(yo,1),Zu(Pl()));var ko=yo.length;return tu(function(Io){for(var Po=-1,Wo=Pu(Io.length,ko);++Po=yo}),c1=Fv(function(){return arguments}())?Fv:function(mo){return Cu(mo)&&yu.call(mo,"callee")&&!Tv.call(mo,"callee")},Yl=Is.isArray,MT=iv?Zu(iv):Hx;function Ku(mo){return mo!=null&&Mm(mo.length)&&!Lp(mo)}function Au(mo){return Cu(mo)&&Ku(mo)}function BT(mo){return mo===!0||mo===!1||Cu(mo)&&Hu(mo)==Ds}var Zp=K_||Q0,LT=sv?Zu(sv):Vx;function FT(mo){return Cu(mo)&&mo.nodeType===1&&!K1(mo)}function PT(mo){if(mo==null)return!0;if(Ku(mo)&&(Yl(mo)||typeof mo=="string"||typeof mo.splice=="function"||Zp(mo)||w1(mo)||c1(mo)))return!mo.length;var yo=ju(mo);if(yo==ga||yo==Nl)return!mo.size;if(q1(mo))return!h0(mo).length;for(var ko in mo)if(yu.call(mo,ko))return!1;return!0}function jT(mo,yo){return H1(mo,yo)}function zT(mo,yo,ko){ko=typeof ko=="function"?ko:ro;var Io=ko?ko(mo,yo):ro;return Io===ro?H1(mo,yo,ro,ko):!!Io}function P0(mo){if(!Cu(mo))return!1;var yo=Hu(mo);return yo==Bs||yo==Cs||typeof mo.message=="string"&&typeof mo.name=="string"&&!K1(mo)}function HT(mo){return typeof mo=="number"&&Cv(mo)}function Lp(mo){if(!ku(mo))return!1;var yo=Hu(mo);return yo==zs||yo==Ls||yo==ws||yo==Kl}function Wy(mo){return typeof mo=="number"&&mo==Jl(mo)}function Mm(mo){return typeof mo=="number"&&mo>-1&&mo%1==0&&mo<=Ho}function ku(mo){var yo=typeof mo;return mo!=null&&(yo=="object"||yo=="function")}function Cu(mo){return mo!=null&&typeof mo=="object"}var Ky=av?Zu(av):qx;function VT(mo,yo){return mo===yo||f0(mo,yo,O0(yo))}function GT(mo,yo,ko){return ko=typeof ko=="function"?ko:ro,f0(mo,yo,O0(yo),ko)}function qT(mo){return Uy(mo)&&mo!=+mo}function WT(mo){if(AS(mo))throw new Ql(io);return Pv(mo)}function KT(mo){return mo===null}function UT(mo){return mo==null}function Uy(mo){return typeof mo=="number"||Cu(mo)&&Hu(mo)==Js}function K1(mo){if(!Cu(mo)||Hu(mo)!=$a)return!1;var yo=lm(mo);if(yo===null)return!0;var ko=yu.call(yo,"constructor")&&yo.constructor;return typeof ko=="function"&&ko instanceof ko&&om.call(ko)==z_}var j0=lv?Zu(lv):Wx;function QT(mo){return Wy(mo)&&mo>=-Ho&&mo<=Ho}var Qy=uv?Zu(uv):Kx;function Bm(mo){return typeof mo=="string"||!Yl(mo)&&Cu(mo)&&Hu(mo)==xa}function _c(mo){return typeof mo=="symbol"||Cu(mo)&&Hu(mo)==El}var w1=cv?Zu(cv):Ux;function YT(mo){return mo===ro}function XT(mo){return Cu(mo)&&ju(mo)==ks}function ZT(mo){return Cu(mo)&&Hu(mo)==Es}var JT=Cm(p0),_k=Cm(function(mo,yo){return mo<=yo});function Yy(mo){if(!mo)return[];if(Ku(mo))return Bm(mo)?gp(mo):Wu(mo);if(D1&&mo[D1])return O_(mo[D1]());var yo=ju(mo),ko=yo==ga?t0:yo==Nl?em:A1;return ko(mo)}function Fp(mo){if(!mo)return mo===0?mo:0;if(mo=up(mo),mo===Lo||mo===-Lo){var yo=mo<0?-1:1;return yo*qo}return mo===mo?mo:0}function Jl(mo){var yo=Fp(mo),ko=yo%1;return yo===yo?ko?yo-ko:yo:0}function Xy(mo){return mo?s1(Jl(mo),0,Yo):0}function up(mo){if(typeof mo=="number")return mo;if(_c(mo))return Uo;if(ku(mo)){var yo=typeof mo.valueOf=="function"?mo.valueOf():mo;mo=ku(yo)?yo+"":yo}if(typeof mo!="string")return mo===0?mo:+mo;mo=mv(mo);var ko=Xo.test(mo);return ko||ys.test(mo)?Gm(mo.slice(2),ko?2:8):Bo.test(mo)?Uo:+mo}function Zy(mo){return Ep(mo,Uu(mo))}function eC(mo){return mo?s1(Jl(mo),-Ho,Ho):mo===0?mo:0}function hu(mo){return mo==null?"":Ju(mo)}var tC=T1(function(mo,yo){if(q1(yo)||Ku(yo)){Ep(yo,Lu(yo),mo);return}for(var ko in yo)yu.call(yo,ko)&&P1(mo,ko,yo[ko])}),Jy=T1(function(mo,yo){Ep(yo,Uu(yo),mo)}),Lm=T1(function(mo,yo,ko,Io){Ep(yo,Uu(yo),mo,Io)}),rC=T1(function(mo,yo,ko,Io){Ep(yo,Lu(yo),mo,Io)}),nC=Mp(a0);function oC(mo,yo){var ko=E1(mo);return yo==null?ko:Iv(ko,yo)}var iC=tu(function(mo,yo){mo=xu(mo);var ko=-1,Io=yo.length,Po=Io>2?yo[2]:ro;for(Po&&Vu(yo[0],yo[1],Po)&&(Io=1);++ko1),Wo}),Ep(mo,w0(mo),ko),Io&&(ko=sp(ko,fo|ho|po,mS));for(var Po=yo.length;Po--;)b0(ko,yo[Po]);return ko});function EC(mo,yo){return e_(mo,Dm(Pl(yo)))}var TC=Mp(function(mo,yo){return mo==null?{}:Xx(mo,yo)});function e_(mo,yo){if(mo==null)return{};var ko=Tu(w0(mo),function(Io){return[Io]});return yo=Pl(yo),Wv(mo,ko,function(Io,Po){return yo(Io,Po[0])})}function kC(mo,yo,ko){yo=Yp(yo,mo);var Io=-1,Po=yo.length;for(Po||(Po=1,mo=ro);++Ioyo){var Io=mo;mo=yo,yo=Io}if(ko||mo%1||yo%1){var Po=wv();return Pu(mo+Po*(yo-mo+Rp("1e-"+((Po+"").length-1))),yo)}return m0(mo,yo)}var BC=k1(function(mo,yo,ko){return yo=yo.toLowerCase(),mo+(ko?n_(yo):yo)});function n_(mo){return V0(hu(mo).toLowerCase())}function o_(mo){return mo=hu(mo),mo&&mo.replace(Rs,T_).replace(Vm,"")}function LC(mo,yo,ko){mo=hu(mo),yo=Ju(yo);var Io=mo.length;ko=ko===ro?Io:s1(Jl(ko),0,Io);var Po=ko;return ko-=yo.length,ko>=0&&mo.slice(ko,Po)==yo}function FC(mo){return mo=hu(mo),mo&&gu.test(mo)?mo.replace(Zl,k_):mo}function PC(mo){return mo=hu(mo),mo&&Nu.test(mo)?mo.replace(vu,"\\$&"):mo}var jC=k1(function(mo,yo,ko){return mo+(ko?"-":"")+yo.toLowerCase()}),zC=k1(function(mo,yo,ko){return mo+(ko?" ":"")+yo.toLowerCase()}),HC=ly("toLowerCase");function VC(mo,yo,ko){mo=hu(mo),yo=Jl(yo);var Io=yo?y1(mo):0;if(!yo||Io>=yo)return mo;var Po=(yo-Io)/2;return km(fm(Po),ko)+mo+km(dm(Po),ko)}function GC(mo,yo,ko){mo=hu(mo),yo=Jl(yo);var Io=yo?y1(mo):0;return yo&&Io>>0,ko?(mo=hu(mo),mo&&(typeof yo=="string"||yo!=null&&!j0(yo))&&(yo=Ju(yo),!yo&&m1(mo))?Xp(gp(mo),0,ko):mo.split(yo,ko)):[]}var XC=k1(function(mo,yo,ko){return mo+(ko?" ":"")+V0(yo)});function ZC(mo,yo,ko){return mo=hu(mo),ko=ko==null?0:s1(Jl(ko),0,mo.length),yo=Ju(yo),mo.slice(ko,ko+yo.length)==yo}function JC(mo,yo,ko){var Io=Go.templateSettings;ko&&Vu(mo,yo,ko)&&(yo=ro),mo=hu(mo),yo=Lm({},yo,Io,gy);var Po=Lm({},yo.imports,Io.imports,gy),Wo=Lu(Po),hs=e0(Po,Wo),gs,Ts,Fs=0,Ps=yo.interpolate||Us,Gs="__p += '",ba=r0((yo.escape||Us).source+"|"+Ps.source+"|"+(Ps===ou?zo:Us).source+"|"+(yo.evaluate||Us).source+"|$","g"),Tl="//# sourceURL="+(yu.call(yo,"sourceURL")?(yo.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hl+"]")+` +`;mo.replace(ba,function(Gl,nu,su,_d,Gu,_f){return su||(su=_d),Gs+=mo.slice(Fs,_f).replace(Rl,C_),nu&&(gs=!0,Gs+=`' + +__e(`+nu+`) + +'`),Gu&&(Ts=!0,Gs+=`'; +`+Gu+`; +__p += '`),su&&(Gs+=`' + +((__t = (`+su+`)) == null ? '' : __t) + +'`),Fs=_f+Gl.length,Gl}),Gs+=`'; +`;var Vl=yu.call(yo,"variable")&&yo.variable;if(!Vl)Gs=`with (obj) { +`+Gs+` +} +`;else if(Ko.test(Vl))throw new Ql(ao);Gs=(Ts?Gs.replace(au,""):Gs).replace(zl,"$1").replace(pu,"$1;"),Gs="function("+(Vl||"obj")+`) { +`+(Vl?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(gs?", __e = _.escape":"")+(Ts?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Gs+`return __p +}`;var eu=s_(function(){return uu(Wo,Tl+"return "+Gs).apply(ro,hs)});if(eu.source=Gs,P0(eu))throw eu;return eu}function ew(mo){return hu(mo).toLowerCase()}function tw(mo){return hu(mo).toUpperCase()}function rw(mo,yo,ko){if(mo=hu(mo),mo&&(ko||yo===ro))return mv(mo);if(!mo||!(yo=Ju(yo)))return mo;var Io=gp(mo),Po=gp(yo),Wo=vv(Io,Po),hs=yv(Io,Po)+1;return Xp(Io,Wo,hs).join("")}function nw(mo,yo,ko){if(mo=hu(mo),mo&&(ko||yo===ro))return mo.slice(0,_v(mo)+1);if(!mo||!(yo=Ju(yo)))return mo;var Io=gp(mo),Po=yv(Io,gp(yo))+1;return Xp(Io,0,Po).join("")}function ow(mo,yo,ko){if(mo=hu(mo),mo&&(ko||yo===ro))return mo.replace(du,"");if(!mo||!(yo=Ju(yo)))return mo;var Io=gp(mo),Po=vv(Io,gp(yo));return Xp(Io,Po).join("")}function iw(mo,yo){var ko=Ro,Io=No;if(ku(yo)){var Po="separator"in yo?yo.separator:Po;ko="length"in yo?Jl(yo.length):ko,Io="omission"in yo?Ju(yo.omission):Io}mo=hu(mo);var Wo=mo.length;if(m1(mo)){var hs=gp(mo);Wo=hs.length}if(ko>=Wo)return mo;var gs=ko-y1(Io);if(gs<1)return Io;var Ts=hs?Xp(hs,0,gs).join(""):mo.slice(0,gs);if(Po===ro)return Ts+Io;if(hs&&(gs+=Ts.length-gs),j0(Po)){if(mo.slice(gs).search(Po)){var Fs,Ps=Ts;for(Po.global||(Po=r0(Po.source,hu(Vo.exec(Po))+"g")),Po.lastIndex=0;Fs=Po.exec(Ps);)var Gs=Fs.index;Ts=Ts.slice(0,Gs===ro?gs:Gs)}}else if(mo.indexOf(Ju(Po),gs)!=gs){var ba=Ts.lastIndexOf(Po);ba>-1&&(Ts=Ts.slice(0,ba))}return Ts+Io}function sw(mo){return mo=hu(mo),mo&&Dl.test(mo)?mo.replace(Su,$_):mo}var aw=k1(function(mo,yo,ko){return mo+(ko?" ":"")+yo.toUpperCase()}),V0=ly("toUpperCase");function i_(mo,yo,ko){return mo=hu(mo),yo=ko?ro:yo,yo===ro?A_(mo)?B_(mo):b_(mo):mo.match(yo)||[]}var s_=tu(function(mo,yo){try{return Xu(mo,ro,yo)}catch(ko){return P0(ko)?ko:new Ql(ko)}}),lw=Mp(function(mo,yo){return np(yo,function(ko){ko=Tp(ko),$p(mo,ko,L0(mo[ko],mo))}),mo});function uw(mo){var yo=mo==null?0:mo.length,ko=Pl();return mo=yo?Tu(mo,function(Io){if(typeof Io[1]!="function")throw new op(so);return[ko(Io[0]),Io[1]]}):[],tu(function(Io){for(var Po=-1;++PoHo)return[];var ko=Yo,Io=Pu(mo,Yo);yo=Pl(yo),mo-=Yo;for(var Po=Jm(Io,yo);++ko0||yo<0)?new iu(ko):(mo<0?ko=ko.takeRight(-mo):mo&&(ko=ko.drop(mo)),yo!==ro&&(yo=Jl(yo),ko=yo<0?ko.dropRight(-yo):ko.take(yo-mo)),ko)},iu.prototype.takeRightWhile=function(mo){return this.reverse().takeWhile(mo).reverse()},iu.prototype.toArray=function(){return this.take(Yo)},Sp(iu.prototype,function(mo,yo){var ko=/^(?:filter|find|map|reject)|While$/.test(yo),Io=/^(?:head|last)$/.test(yo),Po=Go[Io?"take"+(yo=="last"?"Right":""):yo],Wo=Io||/^find/.test(yo);Po&&(Go.prototype[yo]=function(){var hs=this.__wrapped__,gs=Io?[1]:arguments,Ts=hs instanceof iu,Fs=gs[0],Ps=Ts||Yl(hs),Gs=function(nu){var su=Po.apply(Go,qp([nu],gs));return Io&&ba?su[0]:su};Ps&&ko&&typeof Fs=="function"&&Fs.length!=1&&(Ts=Ps=!1);var ba=this.__chain__,Tl=!!this.__actions__.length,Vl=Wo&&!ba,eu=Ts&&!Tl;if(!Wo&&Ps){hs=eu?hs:new iu(this);var Gl=mo.apply(hs,gs);return Gl.__actions__.push({func:Rm,args:[Gs],thisArg:ro}),new ip(Gl,ba)}return Vl&&eu?mo.apply(this,gs):(Gl=this.thru(Gs),Vl?Io?Gl.value()[0]:Gl.value():Gl)})}),np(["pop","push","shift","sort","splice","unshift"],function(mo){var yo=tm[mo],ko=/^(?:push|sort|unshift)$/.test(mo)?"tap":"thru",Io=/^(?:pop|shift)$/.test(mo);Go.prototype[mo]=function(){var Po=arguments;if(Io&&!this.__chain__){var Wo=this.value();return yo.apply(Yl(Wo)?Wo:[],Po)}return this[ko](function(hs){return yo.apply(Yl(hs)?hs:[],Po)})}}),Sp(iu.prototype,function(mo,yo){var ko=Go[yo];if(ko){var Io=ko.name+"";yu.call(S1,Io)||(S1[Io]=[]),S1[Io].push({name:yo,func:ko})}}),S1[Em(ro,xo).name]=[{name:"wrapper",func:ro}],iu.prototype.clone=ox,iu.prototype.reverse=ix,iu.prototype.value=sx,Go.prototype.at=FE,Go.prototype.chain=PE,Go.prototype.commit=jE,Go.prototype.next=zE,Go.prototype.plant=VE,Go.prototype.reverse=GE,Go.prototype.toJSON=Go.prototype.valueOf=Go.prototype.value=qE,Go.prototype.first=Go.prototype.head,D1&&(Go.prototype[D1]=HE),Go},b1=L_();r1?((r1.exports=b1)._=b1,qm._=b1):Du._=b1}).call(commonjsGlobal)})(lodash$1,lodash$1.exports);var lodashExports=lodash$1.exports;const isImageDataObject=eo=>{if(!lodashExports.isPlainObject(eo))return!1;const to=Object.keys(eo);return to.length!==1?!1:to[0].startsWith("data:image/")},encodeImageDataObjectToMarkup=eo=>{const to=Object.keys(eo).find(ro=>ro.startsWith("data:image/"));return to?`![image](${eo[to]??""})`:""},listToMarkup=eo=>eo.map(to=>typeof to=="string"?to:isImageDataObject(to)?encodeImageDataObjectToMarkup(to):valueStringify(to)).join(` + +`),isChatInput=eo=>!!eo.is_chat_input,isChatHistory=(eo,to,ro=!1)=>eo!==FlowType.Chat||to.type!==ValueType.list?!1:Reflect.has(to,"is_chat_history")?!!to.is_chat_history:ro?!1:to.name===DEFAULT_CHAT_HISTORY_NAME,isChatOutput=eo=>!!eo.is_chat_output,makeChatMessageFromUser=(eo,to)=>{const ro=typeof eo=="string"?eo:Array.isArray(eo)?listToMarkup(eo):JSON.stringify(eo)??"",no=Array.isArray(eo)?JSON.stringify(eo):void 0;return{id:uuid_1.v4(),from:ChatMessageFrom.User,type:ChatMessageType$1.Text,content:ro,contentForCopy:no,timestamp:new Date().toISOString(),extraData:to}},makeChatMessageFromChatBot=(eo,to,ro,no)=>{const oo=typeof eo=="string"?eo:Array.isArray(eo)?listToMarkup(eo):JSON.stringify(eo)??"",io=Array.isArray(eo)?JSON.stringify(eo):void 0;return{id:uuid_1.v4(),from:ChatMessageFrom.Chatbot,type:ChatMessageType$1.Text,content:oo,contentForCopy:io,timestamp:new Date().toISOString(),duration:no==null?void 0:no.duration,tokens:no==null?void 0:no.total_tokens,error:ro,extraData:to}},parseChatMessages=(eo,to,ro)=>{const no=[];for(const oo of ro){const io=oo.inputs[eo],so=oo.outputs[to];if(typeof io=="string"&&typeof so=="string"){const ao={flowInputs:oo.inputs,flowOutputs:oo.outputs};no.push(makeChatMessageFromUser(io,ao)),no.push(makeChatMessageFromChatBot(so,ao))}else if(Array.isArray(io)&&Array.isArray(so)){const ao={flowInputs:oo.inputs,flowOutputs:oo.outputs};no.push(makeChatMessageFromUser(io,ao)),no.push(makeChatMessageFromChatBot(so,ao))}}return no};ValueType.AzureContentSafetyConnection,ValueType.AzureContentModeratorConnection,ValueType.OpenAIConnection,ValueType.AzureOpenAIConnection,ValueType.BingConnection,ValueType.CustomConnection,ValueType.SerpConnection,ValueType.CognitiveSearchConnection,ValueType.SubstrateLLMConnection,ValueType.QdrantConnection,ValueType.WeaviateConnection,ValueType.FormRecognizerConnection;const convertConnectionTypeToValueType=eo=>{switch(eo){case ConnectionType.AzureContentSafety:return ValueType.AzureContentSafetyConnection;case ConnectionType.AzureContentModerator:return ValueType.AzureContentModeratorConnection;case ConnectionType.Serp:return ValueType.SerpConnection;case ConnectionType.OpenAI:return ValueType.OpenAIConnection;case ConnectionType.Bing:return ValueType.BingConnection;case ConnectionType.AzureOpenAI:return ValueType.AzureOpenAIConnection;case ConnectionType.CognitiveSearch:return ValueType.CognitiveSearchConnection;case ConnectionType.SubstrateLLM:return ValueType.SubstrateLLMConnection;case ConnectionType.Custom:return ValueType.CustomConnection;default:return ValueType.CustomConnection}},getValueTypeByConnectionType=(eo,to)=>{var ro;return!to||to.length===0?convertConnectionTypeToValueType(eo):(ro=to.find(no=>no.connectionType===eo))==null?void 0:ro.flowValueType},getConnectionTypeByName=(eo,to,ro)=>{var oo;const no=(oo=eo==null?void 0:eo.find(io=>io.connectionName===ro))==null?void 0:oo.connectionType;if(no)return getValueTypeByConnectionType(no,to)};ValueType.AzureContentSafetyConnection+"",ValueType.BingConnection+"",ValueType.OpenAIConnection+"",ValueType.CustomConnection+"",ValueType.AzureOpenAIConnection+"",ValueType.AzureContentModeratorConnection+"",ValueType.SerpConnection+"",ValueType.CognitiveSearchConnection+"",ValueType.SubstrateLLMConnection+"",ValueType.PineconeConnection+"",ValueType.QdrantConnection+"",ValueType.WeaviateConnection+"",ValueType.FormRecognizerConnection+"",ValueType.ServerlessConnection+"";const safelyParseJson=(eo,to)=>{if(!eo)return to??"";try{return JSON.parse(eo)}catch{return to??""}},intNumberRegExp$1=/^[+-]?\d+$/,doubleNumberRegExp$1=/^[+-]?\d+(\.\d+)?$/,safelyParseInt=eo=>{try{const to=parseInt(eo,10);return isNaN(to)?eo:to}catch{return eo}},safelyParseFloat=eo=>{try{const to=parseFloat(eo);return isNaN(to)?eo:to}catch{return eo}},boolValues=["true","false","True","False",!0,!1],safelyParseBool=eo=>{try{return boolValues.includes(eo)?convertToBool(eo):eo}catch{return eo}},convertValByType=(eo,to)=>{var no;let ro=eo;if(!(((no=eo==null?void 0:eo.trim)==null?void 0:no.call(eo))===""&&to!==ValueType.string)){switch(to){case ValueType.int:ro=typeof ro=="string"&&intNumberRegExp$1.test(ro.trim())?safelyParseInt(ro):ro;break;case ValueType.double:ro=typeof ro=="string"&&doubleNumberRegExp$1.test(ro.trim())?safelyParseFloat(ro):ro;break;case ValueType.bool:ro=safelyParseBool(ro);break;case ValueType.string:ro=typeof ro=="object"?JSON.stringify(ro):String(ro??"");break;case ValueType.list:case ValueType.object:ro=typeof ro=="string"?safelyParseJson(ro,ro):ro;break}return ro}},inferTypeByVal=eo=>{if(typeof eo=="boolean")return ValueType.bool;if(typeof eo=="number")return Number.isInteger(eo)?ValueType.int:ValueType.double;if(Array.isArray(eo))return ValueType.list;if(typeof eo=="object"&&eo!==null)return ValueType.object;if(typeof eo=="string")return ValueType.string},filterNodeInputsKeys=(eo,to,ro,no,oo=!1)=>{const io=sortToolInputs(eo),so={...to};return Object.keys(io??{}).filter(uo=>{var fo;const co=io==null?void 0:io[uo];if(!oo&&(co==null?void 0:co.input_type)===InputType.uionly_hidden)return!1;if(co!=null&&co.enabled_by&&(co!=null&&co.enabled_by_value)){const ho=io==null?void 0:io[co.enabled_by],po=(so==null?void 0:so[co.enabled_by])??(ho==null?void 0:ho.default),go=convertValByType(po,(fo=ho==null?void 0:ho.type)==null?void 0:fo[0]),vo=co==null?void 0:co.enabled_by_value.includes(go);return vo||(so[uo]=void 0),vo}if(co!=null&&co.enabled_by&&(co!=null&&co.enabled_by_type)){const ho=so==null?void 0:so[co.enabled_by],po=getConnectionTypeByName(ro??[],no??[],ho??""),go=po?co==null?void 0:co.enabled_by_type.includes(po):!1;return go||(so[uo]=void 0),go}return!0})},sortToolInputs=eo=>{let to=[];if(Object.values(eo??{}).some(oo=>{var io;return((io=oo.ui_hints)==null?void 0:io.index)!==void 0}))to=Object.keys(eo??{}).sort((oo,io)=>{var lo,uo,co,fo;const so=((uo=(lo=eo==null?void 0:eo[oo])==null?void 0:lo.ui_hints)==null?void 0:uo.index)??0,ao=((fo=(co=eo==null?void 0:eo[io])==null?void 0:co.ui_hints)==null?void 0:fo.index)??0;return so-ao});else{const oo=[],io={};Object.keys(eo??{}).forEach(ao=>{const lo=eo==null?void 0:eo[ao];lo!=null&&lo.enabled_by?(io[lo.enabled_by]||(io[lo.enabled_by]=[]),io[lo.enabled_by].push(ao)):oo.push(ao)});const so=ao=>{for(const lo of ao)to.push(lo),io[lo]&&so(io[lo])};so(oo)}const no={};for(const oo of to)no[oo]=eo==null?void 0:eo[oo];return no};var papaparse_min={exports:{}};/* @license +Papa Parse +v5.4.1 +https://github.com/mholt/PapaParse +License: MIT +*/(function(eo,to){(function(ro,no){eo.exports=no()})(commonjsGlobal,function ro(){var no=typeof self<"u"?self:typeof window<"u"?window:no!==void 0?no:{},oo=!no.document&&!!no.postMessage,io=no.IS_PAPA_WORKER||!1,so={},ao=0,lo={parse:function(Oo,Ao){var Ro=(Ao=Ao||{}).dynamicTyping||!1;if(Co(Ro)&&(Ao.dynamicTypingFunction=Ro,Ro={}),Ao.dynamicTyping=Ro,Ao.transform=!!Co(Ao.transform)&&Ao.transform,Ao.worker&&lo.WORKERS_SUPPORTED){var No=function(){if(!lo.WORKERS_SUPPORTED)return!1;var Do=(Fo=no.URL||no.webkitURL||null,$o=ro.toString(),lo.BLOB_URL||(lo.BLOB_URL=Fo.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",$o,")();"],{type:"text/javascript"})))),jo=new no.Worker(Do),Fo,$o;return jo.onmessage=_o,jo.id=ao++,so[jo.id]=jo}();return No.userStep=Ao.step,No.userChunk=Ao.chunk,No.userComplete=Ao.complete,No.userError=Ao.error,Ao.step=Co(Ao.step),Ao.chunk=Co(Ao.chunk),Ao.complete=Co(Ao.complete),Ao.error=Co(Ao.error),delete Ao.worker,void No.postMessage({input:Oo,config:Ao,workerId:No.id})}var Mo=null;return lo.NODE_STREAM_INPUT,typeof Oo=="string"?(Oo=function(Do){return Do.charCodeAt(0)===65279?Do.slice(1):Do}(Oo),Mo=Ao.download?new fo(Ao):new po(Ao)):Oo.readable===!0&&Co(Oo.read)&&Co(Oo.on)?Mo=new go(Ao):(no.File&&Oo instanceof File||Oo instanceof Object)&&(Mo=new ho(Ao)),Mo.stream(Oo)},unparse:function(Oo,Ao){var Ro=!1,No=!0,Mo=",",Do=`\r +`,jo='"',Fo=jo+jo,$o=!1,Lo=null,Ho=!1;(function(){if(typeof Ao=="object"){if(typeof Ao.delimiter!="string"||lo.BAD_DELIMITERS.filter(function(Zo){return Ao.delimiter.indexOf(Zo)!==-1}).length||(Mo=Ao.delimiter),(typeof Ao.quotes=="boolean"||typeof Ao.quotes=="function"||Array.isArray(Ao.quotes))&&(Ro=Ao.quotes),typeof Ao.skipEmptyLines!="boolean"&&typeof Ao.skipEmptyLines!="string"||($o=Ao.skipEmptyLines),typeof Ao.newline=="string"&&(Do=Ao.newline),typeof Ao.quoteChar=="string"&&(jo=Ao.quoteChar),typeof Ao.header=="boolean"&&(No=Ao.header),Array.isArray(Ao.columns)){if(Ao.columns.length===0)throw new Error("Option columns is empty");Lo=Ao.columns}Ao.escapeChar!==void 0&&(Fo=Ao.escapeChar+jo),(typeof Ao.escapeFormulae=="boolean"||Ao.escapeFormulae instanceof RegExp)&&(Ho=Ao.escapeFormulae instanceof RegExp?Ao.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var qo=new RegExp(bo(jo),"g");if(typeof Oo=="string"&&(Oo=JSON.parse(Oo)),Array.isArray(Oo)){if(!Oo.length||Array.isArray(Oo[0]))return Uo(null,Oo,$o);if(typeof Oo[0]=="object")return Uo(Lo||Object.keys(Oo[0]),Oo,$o)}else if(typeof Oo=="object")return typeof Oo.data=="string"&&(Oo.data=JSON.parse(Oo.data)),Array.isArray(Oo.data)&&(Oo.fields||(Oo.fields=Oo.meta&&Oo.meta.fields||Lo),Oo.fields||(Oo.fields=Array.isArray(Oo.data[0])?Oo.fields:typeof Oo.data[0]=="object"?Object.keys(Oo.data[0]):[]),Array.isArray(Oo.data[0])||typeof Oo.data[0]=="object"||(Oo.data=[Oo.data])),Uo(Oo.fields||[],Oo.data||[],$o);throw new Error("Unable to serialize unrecognized input");function Uo(Zo,_s,Ss){var As="";typeof Zo=="string"&&(Zo=JSON.parse(Zo)),typeof _s=="string"&&(_s=JSON.parse(_s));var Ns=Array.isArray(Zo)&&0=this._config.preview;if(io)no.postMessage({results:Do,workerId:lo.WORKER_ID,finished:Fo});else if(Co(this._config.chunk)&&!Ro){if(this._config.chunk(Do,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);Do=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(Do.data),this._completeResults.errors=this._completeResults.errors.concat(Do.errors),this._completeResults.meta=Do.meta),this._completed||!Fo||!Co(this._config.complete)||Do&&Do.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),Fo||Do&&Do.meta.paused||this._nextChunk(),Do}this._halted=!0},this._sendError=function(Ao){Co(this._config.error)?this._config.error(Ao):io&&this._config.error&&no.postMessage({workerId:lo.WORKER_ID,error:Ao,finished:!1})}}function fo(Oo){var Ao;(Oo=Oo||{}).chunkSize||(Oo.chunkSize=lo.RemoteChunkSize),co.call(this,Oo),this._nextChunk=oo?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(Ro){this._input=Ro,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(Ao=new XMLHttpRequest,this._config.withCredentials&&(Ao.withCredentials=this._config.withCredentials),oo||(Ao.onload=wo(this._chunkLoaded,this),Ao.onerror=wo(this._chunkError,this)),Ao.open(this._config.downloadRequestBody?"POST":"GET",this._input,!oo),this._config.downloadRequestHeaders){var Ro=this._config.downloadRequestHeaders;for(var No in Ro)Ao.setRequestHeader(No,Ro[No])}if(this._config.chunkSize){var Mo=this._start+this._config.chunkSize-1;Ao.setRequestHeader("Range","bytes="+this._start+"-"+Mo)}try{Ao.send(this._config.downloadRequestBody)}catch(Do){this._chunkError(Do.message)}oo&&Ao.status===0&&this._chunkError()}},this._chunkLoaded=function(){Ao.readyState===4&&(Ao.status<200||400<=Ao.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:Ao.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(Ro){var No=Ro.getResponseHeader("Content-Range");return No===null?-1:parseInt(No.substring(No.lastIndexOf("/")+1))}(Ao),this.parseChunk(Ao.responseText)))},this._chunkError=function(Ro){var No=Ao.statusText||Ro;this._sendError(new Error(No))}}function ho(Oo){var Ao,Ro;(Oo=Oo||{}).chunkSize||(Oo.chunkSize=lo.LocalChunkSize),co.call(this,Oo);var No=typeof FileReader<"u";this.stream=function(Mo){this._input=Mo,Ro=Mo.slice||Mo.webkitSlice||Mo.mozSlice,No?((Ao=new FileReader).onload=wo(this._chunkLoaded,this),Ao.onerror=wo(this._chunkError,this)):Ao=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(Mo.target.result)},this._chunkError=function(){this._sendError(Ao.error)}}function po(Oo){var Ao;co.call(this,Oo=Oo||{}),this.stream=function(Ro){return Ao=Ro,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var Ro,No=this._config.chunkSize;return No?(Ro=Ao.substring(0,No),Ao=Ao.substring(No)):(Ro=Ao,Ao=""),this._finished=!Ao,this.parseChunk(Ro)}}}function go(Oo){co.call(this,Oo=Oo||{});var Ao=[],Ro=!0,No=!1;this.pause=function(){co.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){co.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(Mo){this._input=Mo,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){No&&Ao.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),Ao.length?this.parseChunk(Ao.shift()):Ro=!0},this._streamData=wo(function(Mo){try{Ao.push(typeof Mo=="string"?Mo:Mo.toString(this._config.encoding)),Ro&&(Ro=!1,this._checkIsFinished(),this.parseChunk(Ao.shift()))}catch(Do){this._streamError(Do)}},this),this._streamError=wo(function(Mo){this._streamCleanUp(),this._sendError(Mo)},this),this._streamEnd=wo(function(){this._streamCleanUp(),No=!0,this._streamData("")},this),this._streamCleanUp=wo(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function vo(Oo){var Ao,Ro,No,Mo=Math.pow(2,53),Do=-Mo,jo=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Fo=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,$o=this,Lo=0,Ho=0,qo=!1,Uo=!1,Yo=[],Zo={data:[],errors:[],meta:{}};if(Co(Oo.step)){var _s=Oo.step;Oo.step=function(Jo){if(Zo=Jo,Ns())As();else{if(As(),Zo.data.length===0)return;Lo+=Jo.data.length,Oo.preview&&Lo>Oo.preview?Ro.abort():(Zo.data=Zo.data[0],_s(Zo,$o))}}}function Ss(Jo){return Oo.skipEmptyLines==="greedy"?Jo.join("").trim()==="":Jo.length===1&&Jo[0].length===0}function As(){return Zo&&No&&(Ds("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+lo.DefaultDelimiter+"'"),No=!1),Oo.skipEmptyLines&&(Zo.data=Zo.data.filter(function(Jo){return!Ss(Jo)})),Ns()&&function(){if(!Zo)return;function Jo(Bs,zs){Co(Oo.transformHeader)&&(Bs=Oo.transformHeader(Bs,zs)),Yo.push(Bs)}if(Array.isArray(Zo.data[0])){for(var Cs=0;Ns()&&Cs=Yo.length?"__parsed_extra":Yo[Ls]),Oo.transform&&(Xs=Oo.transform(Xs,Js)),Xs=ws(Js,Xs),Js==="__parsed_extra"?(ga[Js]=ga[Js]||[],ga[Js].push(Xs)):ga[Js]=Xs}return Oo.header&&(Ls>Yo.length?Ds("FieldMismatch","TooManyFields","Too many fields: expected "+Yo.length+" fields but parsed "+Ls,Ho+zs):Ls=Ll.length/2?`\r +`:"\r"}(Jo,zs)),No=!1,Oo.delimiter)Co(Oo.delimiter)&&(Oo.delimiter=Oo.delimiter(Jo),Zo.meta.delimiter=Oo.delimiter);else{var Ls=function(Js,Xs,$a,Ll,Kl){var Xl,Nl,xa,El;Kl=Kl||[","," ","|",";",lo.RECORD_SEP,lo.UNIT_SEP];for(var cu=0;cu=jo)return Hs(!0)}else for(ks=Lo,Lo++;;){if((ks=qo.indexOf(Ao,ks+1))===-1)return Yo||Ds.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:ws.length,index:Lo}),Ks();if(ks===Zo-1)return Ks(qo.substring(Lo,ks).replace(cu,Ao));if(Ao!==$o||qo[ks+1]!==$o){if(Ao===$o||ks===0||qo[ks-1]!==$o){xa!==-1&&xa=jo)return Hs(!0);break}Ds.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:ws.length,index:Lo}),ks++}}else ks++}return Ks();function Os(xl){ws.push(xl),Cs=Lo}function Vs(xl){var Sl=0;if(xl!==-1){var $l=qo.substring(ks+1,xl);$l&&$l.trim()===""&&(Sl=$l.length)}return Sl}function Ks(xl){return Yo||(xl===void 0&&(xl=qo.substring(Lo)),Jo.push(xl),Lo=Zo,Os(Jo),Ns&&Zs()),Hs()}function Ms(xl){Lo=xl,Os(Jo),Jo=[],El=qo.indexOf(No,Lo)}function Hs(xl){return{data:ws,errors:Ds,meta:{delimiter:Ro,linebreak:No,aborted:Ho,truncated:!!xl,cursor:Cs+(Uo||0)}}}function Zs(){Do(Hs()),ws=[],Ds=[]}},this.abort=function(){Ho=!0},this.getCharIndex=function(){return Lo}}function _o(Oo){var Ao=Oo.data,Ro=so[Ao.workerId],No=!1;if(Ao.error)Ro.userError(Ao.error,Ao.file);else if(Ao.results&&Ao.results.data){var Mo={abort:function(){No=!0,Eo(Ao.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:So,resume:So};if(Co(Ro.userStep)){for(var Do=0;Do{const no={};return Object.keys(eo).forEach(oo=>{const io=eo[oo];oo===to?no[ro]=io:no[oo]=io}),no},getDefaultNodeVariant=eo=>{const{defaultVariantId:to=BASELINE_VARIANT_ID,variants:ro={}}=eo,no=ro[to];return no==null?void 0:no.node},getDefaultNodeList=(eo,to)=>{const ro=[];return eo.forEach(no=>{const oo=to.get(no);if(!oo)return;const io=getDefaultNodeVariant(oo);io&&ro.push(io)}),ro},getFlowSnapshotNodeList=(eo,to,ro)=>{const no=[];return eo.forEach(oo=>{if(ro.includes(oo)){no.push({name:oo,use_variants:!0});return}const io=to[oo];if(!io)return;const so={inputs:{},...getDefaultNodeVariant(io)};so&&no.push(so)}),no};ToolType.llm;ToolType.prompt;ValueType.string,ToolType.python;ValueType.string,ToolType.typescript;const getTokensUsageByRow=eo=>{var to,ro,no,oo,io,so;return eo.children&&eo.children.length>0?eo.children.reduce((ao,lo)=>{const uo=getTokensUsageByRow(lo);return{totalTokens:ao.totalTokens+uo.totalTokens,promptTokens:ao.promptTokens+uo.promptTokens,completionTokens:ao.completionTokens+uo.completionTokens}},{totalTokens:0,promptTokens:0,completionTokens:0}):{totalTokens:((ro=(to=eo.output)==null?void 0:to.usage)==null?void 0:ro.total_tokens)??0,promptTokens:((oo=(no=eo.output)==null?void 0:no.usage)==null?void 0:oo.prompt_tokens)??0,completionTokens:((so=(io=eo.output)==null?void 0:io.usage)==null?void 0:so.completion_tokens)??0}},numberToDigitsString=eo=>eo.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),timePDTFormatter=eo=>{const to=new Date(eo),ro=getUTCTimezoneOffset();return`${to.getFullYear()}-${to.getMonth()+1}-${to.getDate()} ${to.getHours()}:${to.getMinutes()}:${to.getSeconds()}:${to.getMilliseconds()} (${ro})`},getUTCTimezoneOffset=()=>{const eo=new Date().getTimezoneOffset(),to=Math.abs(eo);return`UTC${(eo<0?"+":"-")+`00${Math.floor(to/60)}`.slice(-2)}:${`00${to%60}`.slice(-2)}`},hasOwn=(eo,to)=>Object.prototype.hasOwnProperty.call(eo,to),resolveTool=(eo,to,ro,no)=>{var oo,io,so;if(((oo=eo==null?void 0:eo.source)==null?void 0:oo.type)==="code")return to;if(((io=eo==null?void 0:eo.source)==null?void 0:io.type)==="package_with_prompt"){const ao=(so=eo==null?void 0:eo.source)==null?void 0:so.path,lo=no(ao??"");return ro?{...ro,inputs:{...lo==null?void 0:lo.inputs,...addPositionField(ro==null?void 0:ro.inputs,"parameter")},code:lo==null?void 0:lo.code}:void 0}return ro},addPositionField=(eo,to)=>{if(!eo)return eo;const ro={...eo};return Object.keys(ro).forEach(no=>{ro[no]={...ro[no],position:to}}),ro},keyWords=["and","as","assert","break","class","continue","def","del","elif","else","except","False","finally","for","from","global","if","import","in","is","lambda","None","nonlocal","not","or","pass","raise","return","True","try","while","with","yield"],keyFunction=["abs","all","any","ascii","bin","bool","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","str","sum","super","tuple","type","vars","zip"],flowWords=["input","inputs","output","outputs","flow","flows"],checkNodeNameValid=eo=>keyWords.some(to=>to===eo)||keyFunction.some(to=>to===eo)||flowWords.some(to=>to===eo)?!1:/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(eo),getNodesThatMoreThanOneVariant=(eo={})=>{const to=[];return Object.keys(eo).forEach(ro=>{const no=eo[ro],{variants:oo={},defaultVariantId:io,default_variant_id:so}=no,ao=Object.keys(oo).length;ao>1&&to.push({nodeName:ro,variantsCount:ao,defaultVariantId:io??so??BASELINE_VARIANT_ID,variants:oo})}),to},getVariantNodes=(eo={})=>{const to={};return Object.keys(eo).forEach(ro=>{const no=eo[ro],{variants:oo={}}=no;if(Object.keys(oo).length>1){const so=lodashExports.cloneDeep(no);Object.entries((so==null?void 0:so.variants)??{}).forEach(([lo,uo])=>{uo.node&&delete uo.node.name});const ao=so.defaultVariantId;delete so.defaultVariantId,to[ro]={default_variant_id:ao,...so}}}),Object.keys(to).length>0?to:void 0},revValueRegex=/^\$\{(\S+)\}$/,getRefValueFromRaw=eo=>{var to,ro;return(ro=(to=`${eo??""}`)==null?void 0:to.match(revValueRegex))==null?void 0:ro[1]},generateRandomStrings=eo=>{const to="abcdefghijklmnopqrstuvwxyz0123456789";let ro="";for(let no=0;nogenerateRandomStrings(8),getRandomOutputDefinitionId=getRandomInputDefinitionId,intNumberRegExp=/^[+-]?\d+$/,doubleNumberRegExp=/^[+-]?\d+(\.\d+)?$/,isBool=eo=>eo.toLowerCase()==="true"||eo.toLowerCase()==="false",isNumber=eo=>doubleNumberRegExp.test(eo.trim())?eo===eo.trim()&&eo.length>0&&!Number.isNaN(Number(eo)):!1,isInt=eo=>intNumberRegExp.test(eo.trim())?isNumber(eo)&&Number.isInteger(Number(eo)):!1,isList$1=eo=>{try{const to=JSON.parse(eo);return Array.isArray(to)}catch{return!1}},isObject$f=eo=>{try{const to=JSON.parse(eo);return Object.prototype.toString.call(to)==="[object Object]"}catch{return!1}},isTypeValid=(eo,to)=>{const ro=typeof eo,no=ro==="string";switch(to){case ValueType.int:return no?isInt(eo):Number.isInteger(eo);case ValueType.double:return no?isNumber(eo):ro==="number";case ValueType.list:return no?isList$1(eo):Array.isArray(eo);case ValueType.object:return no?isObject$f(eo):ro==="object";case ValueType.bool:return no?isBool(eo):ro==="boolean";case ValueType.function_str:return!0;default:return!0}},getCycle=(eo,to,ro,no)=>{var so,ao;const oo=[],io=new Set(eo.keys());for(eo.forEach((lo,uo)=>{lo===0&&oo.push(uo)});oo.length>0;){const lo=oo.shift();lo&&(io.delete(lo),(so=to.get(lo))==null||so.forEach(uo=>{const co=(eo.get(uo)??0)-1;eo.set(uo,co),co===0&&oo.push(uo)}))}for(ro.forEach((lo,uo)=>{lo===0&&oo.push(uo)});oo.length>0;){const lo=oo.shift();lo&&(io.delete(lo),(ao=no.get(lo))==null||ao.forEach(uo=>{const co=(ro.get(uo)??0)-1;ro.set(uo,co),co===0&&oo.push(uo)}))}return io};function commonjsRequire$1(eo){throw new Error('Could not dynamically require "'+eo+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$4(eo,to){return eo===to||eo!==eo&&to!==to}var eq_1=eq$4,eq$3=eq_1;function assocIndexOf$4(eo,to){for(var ro=eo.length;ro--;)if(eq$3(eo[ro][0],to))return ro;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(eo){var to=this.__data__,ro=assocIndexOf$3(to,eo);if(ro<0)return!1;var no=to.length-1;return ro==no?to.pop():splice.call(to,ro,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(eo){var to=this.__data__,ro=assocIndexOf$2(to,eo);return ro<0?void 0:to[ro][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(eo){return assocIndexOf$1(this.__data__,eo)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(eo,to){var ro=this.__data__,no=assocIndexOf(ro,eo);return no<0?(++this.size,ro.push([eo,to])):ro[no][1]=to,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(eo){var to=-1,ro=eo==null?0:eo.length;for(this.clear();++to-1&&eo%1==0&&eo-1&&eo%1==0&&eo<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$4=_baseGetTag,isLength$2=isLength_1,isObjectLike$6=isObjectLike_1,argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$5]=typedArrayTags[numberTag$3]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$5]=typedArrayTags[stringTag$4]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray$1(eo){return isObjectLike$6(eo)&&isLength$2(eo.length)&&!!typedArrayTags[baseGetTag$4(eo)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$4(eo){return function(to){return eo(to)}}var _baseUnary=baseUnary$4,_nodeUtil={exports:{}};_nodeUtil.exports;(function(eo,to){var ro=_freeGlobal,no=to&&!to.nodeType&&to,oo=no&&!0&&eo&&!eo.nodeType&&eo,io=oo&&oo.exports===no,so=io&&ro.process,ao=function(){try{var lo=oo&&oo.require&&oo.require("util").types;return lo||so&&so.binding&&so.binding("util")}catch{}}();eo.exports=ao})(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary$3=_baseUnary,nodeUtil$2=_nodeUtilExports,nodeIsTypedArray=nodeUtil$2&&nodeUtil$2.isTypedArray,isTypedArray$2=nodeIsTypedArray?baseUnary$3(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$2,baseTimes=_baseTimes,isArguments$2=isArguments_1,isArray$d=isArray_1,isBuffer$2=isBufferExports,isIndex$2=_isIndex,isTypedArray$1=isTypedArray_1,objectProto$8=Object.prototype,hasOwnProperty$8=objectProto$8.hasOwnProperty;function arrayLikeKeys$2(eo,to){var ro=isArray$d(eo),no=!ro&&isArguments$2(eo),oo=!ro&&!no&&isBuffer$2(eo),io=!ro&&!no&&!oo&&isTypedArray$1(eo),so=ro||no||oo||io,ao=so?baseTimes(eo.length,String):[],lo=ao.length;for(var uo in eo)(to||hasOwnProperty$8.call(eo,uo))&&!(so&&(uo=="length"||oo&&(uo=="offset"||uo=="parent")||io&&(uo=="buffer"||uo=="byteLength"||uo=="byteOffset")||isIndex$2(uo,lo)))&&ao.push(uo);return ao}var _arrayLikeKeys=arrayLikeKeys$2,objectProto$7=Object.prototype;function isPrototype$3(eo){var to=eo&&eo.constructor,ro=typeof to=="function"&&to.prototype||objectProto$7;return eo===ro}var _isPrototype=isPrototype$3;function overArg$2(eo,to){return function(ro){return eo(to(ro))}}var _overArg=overArg$2,overArg$1=_overArg,nativeKeys$1=overArg$1(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$2=_isPrototype,nativeKeys=_nativeKeys,objectProto$6=Object.prototype,hasOwnProperty$7=objectProto$6.hasOwnProperty;function baseKeys$1(eo){if(!isPrototype$2(eo))return nativeKeys(eo);var to=[];for(var ro in Object(eo))hasOwnProperty$7.call(eo,ro)&&ro!="constructor"&&to.push(ro);return to}var _baseKeys=baseKeys$1,isFunction$3=isFunction_1,isLength$1=isLength_1;function isArrayLike$8(eo){return eo!=null&&isLength$1(eo.length)&&!isFunction$3(eo)}var isArrayLike_1=isArrayLike$8,arrayLikeKeys$1=_arrayLikeKeys,baseKeys=_baseKeys,isArrayLike$7=isArrayLike_1;function keys$7(eo){return isArrayLike$7(eo)?arrayLikeKeys$1(eo):baseKeys(eo)}var keys_1=keys$7,copyObject$3=_copyObject,keys$6=keys_1;function baseAssign$1(eo,to){return eo&©Object$3(to,keys$6(to),eo)}var _baseAssign=baseAssign$1;function nativeKeysIn$1(eo){var to=[];if(eo!=null)for(var ro in Object(eo))to.push(ro);return to}var _nativeKeysIn=nativeKeysIn$1,isObject$b=isObject_1,isPrototype$1=_isPrototype,nativeKeysIn=_nativeKeysIn,objectProto$5=Object.prototype,hasOwnProperty$6=objectProto$5.hasOwnProperty;function baseKeysIn$1(eo){if(!isObject$b(eo))return nativeKeysIn(eo);var to=isPrototype$1(eo),ro=[];for(var no in eo)no=="constructor"&&(to||!hasOwnProperty$6.call(eo,no))||ro.push(no);return ro}var _baseKeysIn=baseKeysIn$1,arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$6=isArrayLike_1;function keysIn$3(eo){return isArrayLike$6(eo)?arrayLikeKeys(eo,!0):baseKeysIn(eo)}var keysIn_1=keysIn$3,copyObject$2=_copyObject,keysIn$2=keysIn_1;function baseAssignIn$1(eo,to){return eo&©Object$2(to,keysIn$2(to),eo)}var _baseAssignIn=baseAssignIn$1,_cloneBuffer={exports:{}};_cloneBuffer.exports;(function(eo,to){var ro=_root$1,no=to&&!to.nodeType&&to,oo=no&&!0&&eo&&!eo.nodeType&&eo,io=oo&&oo.exports===no,so=io?ro.Buffer:void 0,ao=so?so.allocUnsafe:void 0;function lo(uo,co){if(co)return uo.slice();var fo=uo.length,ho=ao?ao(fo):new uo.constructor(fo);return uo.copy(ho),ho}eo.exports=lo})(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports;function copyArray$1(eo,to){var ro=-1,no=eo.length;for(to||(to=Array(no));++roao))return!1;var uo=io.get(eo),co=io.get(to);if(uo&&co)return uo==to&&co==eo;var fo=-1,ho=!0,po=ro&COMPARE_UNORDERED_FLAG$3?new SetCache$1:void 0;for(io.set(eo,to),io.set(to,eo);++fo0&&ro(ao)?to>1?baseFlatten$2(ao,to-1,ro,no,oo):arrayPush$1(oo,ao):no||(oo[oo.length]=ao)}return oo}var _baseFlatten=baseFlatten$2;function apply$2(eo,to,ro){switch(ro.length){case 0:return eo.call(to);case 1:return eo.call(to,ro[0]);case 2:return eo.call(to,ro[0],ro[1]);case 3:return eo.call(to,ro[0],ro[1],ro[2])}return eo.apply(to,ro)}var _apply=apply$2,apply$1=_apply,nativeMax$2=Math.max;function overRest$2(eo,to,ro){return to=nativeMax$2(to===void 0?eo.length-1:to,0),function(){for(var no=arguments,oo=-1,io=nativeMax$2(no.length-to,0),so=Array(io);++oo0){if(++to>=HOT_COUNT)return arguments[0]}else to=0;return eo.apply(void 0,arguments)}}var _shortOut=shortOut$1,baseSetToString=_baseSetToString,shortOut=_shortOut,setToString$2=shortOut(baseSetToString),_setToString=setToString$2,identity$5=identity_1,overRest$1=_overRest,setToString$1=_setToString;function baseRest$1(eo,to){return setToString$1(overRest$1(eo,to,identity$5),eo+"")}var _baseRest=baseRest$1;function baseFindIndex$2(eo,to,ro,no){for(var oo=eo.length,io=ro+(no?1:-1);no?io--:++io-1}var _arrayIncludes=arrayIncludes$1;function arrayIncludesWith$1(eo,to,ro){for(var no=-1,oo=eo==null?0:eo.length;++no=LARGE_ARRAY_SIZE){var uo=to?null:createSet(eo);if(uo)return setToArray(uo);so=!1,oo=cacheHas,lo=new SetCache}else lo=to?[]:ao;e:for(;++no1?po.setNode(go,fo):po.setNode(go)}),this},oo.prototype.setNode=function(co,fo){return eo.has(this._nodes,co)?(arguments.length>1&&(this._nodes[co]=fo),this):(this._nodes[co]=arguments.length>1?fo:this._defaultNodeLabelFn(co),this._isCompound&&(this._parent[co]=ro,this._children[co]={},this._children[ro][co]=!0),this._in[co]={},this._preds[co]={},this._out[co]={},this._sucs[co]={},++this._nodeCount,this)},oo.prototype.node=function(co){return this._nodes[co]},oo.prototype.hasNode=function(co){return eo.has(this._nodes,co)},oo.prototype.removeNode=function(co){var fo=this;if(eo.has(this._nodes,co)){var ho=function(po){fo.removeEdge(fo._edgeObjs[po])};delete this._nodes[co],this._isCompound&&(this._removeFromParentsChildList(co),delete this._parent[co],eo.each(this.children(co),function(po){fo.setParent(po)}),delete this._children[co]),eo.each(eo.keys(this._in[co]),ho),delete this._in[co],delete this._preds[co],eo.each(eo.keys(this._out[co]),ho),delete this._out[co],delete this._sucs[co],--this._nodeCount}return this},oo.prototype.setParent=function(co,fo){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(eo.isUndefined(fo))fo=ro;else{fo+="";for(var ho=fo;!eo.isUndefined(ho);ho=this.parent(ho))if(ho===co)throw new Error("Setting "+fo+" as parent of "+co+" would create a cycle");this.setNode(fo)}return this.setNode(co),this._removeFromParentsChildList(co),this._parent[co]=fo,this._children[fo][co]=!0,this},oo.prototype._removeFromParentsChildList=function(co){delete this._children[this._parent[co]][co]},oo.prototype.parent=function(co){if(this._isCompound){var fo=this._parent[co];if(fo!==ro)return fo}},oo.prototype.children=function(co){if(eo.isUndefined(co)&&(co=ro),this._isCompound){var fo=this._children[co];if(fo)return eo.keys(fo)}else{if(co===ro)return this.nodes();if(this.hasNode(co))return[]}},oo.prototype.predecessors=function(co){var fo=this._preds[co];if(fo)return eo.keys(fo)},oo.prototype.successors=function(co){var fo=this._sucs[co];if(fo)return eo.keys(fo)},oo.prototype.neighbors=function(co){var fo=this.predecessors(co);if(fo)return eo.union(fo,this.successors(co))},oo.prototype.isLeaf=function(co){var fo;return this.isDirected()?fo=this.successors(co):fo=this.neighbors(co),fo.length===0},oo.prototype.filterNodes=function(co){var fo=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});fo.setGraph(this.graph());var ho=this;eo.each(this._nodes,function(vo,bo){co(bo)&&fo.setNode(bo,vo)}),eo.each(this._edgeObjs,function(vo){fo.hasNode(vo.v)&&fo.hasNode(vo.w)&&fo.setEdge(vo,ho.edge(vo))});var po={};function go(vo){var bo=ho.parent(vo);return bo===void 0||fo.hasNode(bo)?(po[vo]=bo,bo):bo in po?po[bo]:go(bo)}return this._isCompound&&eo.each(fo.nodes(),function(vo){fo.setParent(vo,go(vo))}),fo},oo.prototype.setDefaultEdgeLabel=function(co){return eo.isFunction(co)||(co=eo.constant(co)),this._defaultEdgeLabelFn=co,this},oo.prototype.edgeCount=function(){return this._edgeCount},oo.prototype.edges=function(){return eo.values(this._edgeObjs)},oo.prototype.setPath=function(co,fo){var ho=this,po=arguments;return eo.reduce(co,function(go,vo){return po.length>1?ho.setEdge(go,vo,fo):ho.setEdge(go,vo),vo}),this},oo.prototype.setEdge=function(){var co,fo,ho,po,go=!1,vo=arguments[0];typeof vo=="object"&&vo!==null&&"v"in vo?(co=vo.v,fo=vo.w,ho=vo.name,arguments.length===2&&(po=arguments[1],go=!0)):(co=vo,fo=arguments[1],ho=arguments[3],arguments.length>2&&(po=arguments[2],go=!0)),co=""+co,fo=""+fo,eo.isUndefined(ho)||(ho=""+ho);var bo=ao(this._isDirected,co,fo,ho);if(eo.has(this._edgeLabels,bo))return go&&(this._edgeLabels[bo]=po),this;if(!eo.isUndefined(ho)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(co),this.setNode(fo),this._edgeLabels[bo]=go?po:this._defaultEdgeLabelFn(co,fo,ho);var xo=lo(this._isDirected,co,fo,ho);return co=xo.v,fo=xo.w,Object.freeze(xo),this._edgeObjs[bo]=xo,io(this._preds[fo],co),io(this._sucs[co],fo),this._in[fo][bo]=xo,this._out[co][bo]=xo,this._edgeCount++,this},oo.prototype.edge=function(co,fo,ho){var po=arguments.length===1?uo(this._isDirected,arguments[0]):ao(this._isDirected,co,fo,ho);return this._edgeLabels[po]},oo.prototype.hasEdge=function(co,fo,ho){var po=arguments.length===1?uo(this._isDirected,arguments[0]):ao(this._isDirected,co,fo,ho);return eo.has(this._edgeLabels,po)},oo.prototype.removeEdge=function(co,fo,ho){var po=arguments.length===1?uo(this._isDirected,arguments[0]):ao(this._isDirected,co,fo,ho),go=this._edgeObjs[po];return go&&(co=go.v,fo=go.w,delete this._edgeLabels[po],delete this._edgeObjs[po],so(this._preds[fo],co),so(this._sucs[co],fo),delete this._in[fo][po],delete this._out[co][po],this._edgeCount--),this},oo.prototype.inEdges=function(co,fo){var ho=this._in[co];if(ho){var po=eo.values(ho);return fo?eo.filter(po,function(go){return go.v===fo}):po}},oo.prototype.outEdges=function(co,fo){var ho=this._out[co];if(ho){var po=eo.values(ho);return fo?eo.filter(po,function(go){return go.w===fo}):po}},oo.prototype.nodeEdges=function(co,fo){var ho=this.inEdges(co,fo);if(ho)return ho.concat(this.outEdges(co,fo))};function io(co,fo){co[fo]?co[fo]++:co[fo]=1}function so(co,fo){--co[fo]||delete co[fo]}function ao(co,fo,ho,po){var go=""+fo,vo=""+ho;if(!co&&go>vo){var bo=go;go=vo,vo=bo}return go+no+vo+no+(eo.isUndefined(po)?to:po)}function lo(co,fo,ho,po){var go=""+fo,vo=""+ho;if(!co&&go>vo){var bo=go;go=vo,vo=bo}var xo={v:go,w:vo};return po&&(xo.name=po),xo}function uo(co,fo){return ao(co,fo.v,fo.w,fo.name)}return graph}var version$1,hasRequiredVersion;function requireVersion(){return hasRequiredVersion||(hasRequiredVersion=1,version$1="2.1.8"),version$1}var lib,hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,lib={Graph:requireGraph(),version:requireVersion()}),lib}var json,hasRequiredJson;function requireJson(){if(hasRequiredJson)return json;hasRequiredJson=1;var eo=requireLodash(),to=requireGraph();json={write:ro,read:io};function ro(so){var ao={options:{directed:so.isDirected(),multigraph:so.isMultigraph(),compound:so.isCompound()},nodes:no(so),edges:oo(so)};return eo.isUndefined(so.graph())||(ao.value=eo.clone(so.graph())),ao}function no(so){return eo.map(so.nodes(),function(ao){var lo=so.node(ao),uo=so.parent(ao),co={v:ao};return eo.isUndefined(lo)||(co.value=lo),eo.isUndefined(uo)||(co.parent=uo),co})}function oo(so){return eo.map(so.edges(),function(ao){var lo=so.edge(ao),uo={v:ao.v,w:ao.w};return eo.isUndefined(ao.name)||(uo.name=ao.name),eo.isUndefined(lo)||(uo.value=lo),uo})}function io(so){var ao=new to(so.options).setGraph(so.value);return eo.each(so.nodes,function(lo){ao.setNode(lo.v,lo.value),lo.parent&&ao.setParent(lo.v,lo.parent)}),eo.each(so.edges,function(lo){ao.setEdge({v:lo.v,w:lo.w,name:lo.name},lo.value)}),ao}return json}var components_1,hasRequiredComponents;function requireComponents(){if(hasRequiredComponents)return components_1;hasRequiredComponents=1;var eo=requireLodash();components_1=to;function to(ro){var no={},oo=[],io;function so(ao){eo.has(no,ao)||(no[ao]=!0,io.push(ao),eo.each(ro.successors(ao),so),eo.each(ro.predecessors(ao),so))}return eo.each(ro.nodes(),function(ao){io=[],so(ao),io.length&&oo.push(io)}),oo}return components_1}var priorityQueue,hasRequiredPriorityQueue;function requirePriorityQueue(){if(hasRequiredPriorityQueue)return priorityQueue;hasRequiredPriorityQueue=1;var eo=requireLodash();priorityQueue=to;function to(){this._arr=[],this._keyIndices={}}return to.prototype.size=function(){return this._arr.length},to.prototype.keys=function(){return this._arr.map(function(ro){return ro.key})},to.prototype.has=function(ro){return eo.has(this._keyIndices,ro)},to.prototype.priority=function(ro){var no=this._keyIndices[ro];if(no!==void 0)return this._arr[no].priority},to.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},to.prototype.add=function(ro,no){var oo=this._keyIndices;if(ro=String(ro),!eo.has(oo,ro)){var io=this._arr,so=io.length;return oo[ro]=so,io.push({key:ro,priority:no}),this._decrease(so),!0}return!1},to.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var ro=this._arr.pop();return delete this._keyIndices[ro.key],this._heapify(0),ro.key},to.prototype.decrease=function(ro,no){var oo=this._keyIndices[ro];if(no>this._arr[oo].priority)throw new Error("New priority is greater than current priority. Key: "+ro+" Old: "+this._arr[oo].priority+" New: "+no);this._arr[oo].priority=no,this._decrease(oo)},to.prototype._heapify=function(ro){var no=this._arr,oo=2*ro,io=oo+1,so=ro;oo>1,!(no[io].priority0&&(fo=co.removeMin(),ho=uo[fo],ho.distance!==Number.POSITIVE_INFINITY);)lo(fo).forEach(po);return uo}return dijkstra_1}var dijkstraAll_1,hasRequiredDijkstraAll;function requireDijkstraAll(){if(hasRequiredDijkstraAll)return dijkstraAll_1;hasRequiredDijkstraAll=1;var eo=requireDijkstra(),to=requireLodash();dijkstraAll_1=ro;function ro(no,oo,io){return to.transform(no.nodes(),function(so,ao){so[ao]=eo(no,ao,oo,io)},{})}return dijkstraAll_1}var tarjan_1,hasRequiredTarjan;function requireTarjan(){if(hasRequiredTarjan)return tarjan_1;hasRequiredTarjan=1;var eo=requireLodash();tarjan_1=to;function to(ro){var no=0,oo=[],io={},so=[];function ao(lo){var uo=io[lo]={onStack:!0,lowlink:no,index:no++};if(oo.push(lo),ro.successors(lo).forEach(function(ho){eo.has(io,ho)?io[ho].onStack&&(uo.lowlink=Math.min(uo.lowlink,io[ho].index)):(ao(ho),uo.lowlink=Math.min(uo.lowlink,io[ho].lowlink))}),uo.lowlink===uo.index){var co=[],fo;do fo=oo.pop(),io[fo].onStack=!1,co.push(fo);while(lo!==fo);so.push(co)}}return ro.nodes().forEach(function(lo){eo.has(io,lo)||ao(lo)}),so}return tarjan_1}var findCycles_1,hasRequiredFindCycles;function requireFindCycles(){if(hasRequiredFindCycles)return findCycles_1;hasRequiredFindCycles=1;var eo=requireLodash(),to=requireTarjan();findCycles_1=ro;function ro(no){return eo.filter(to(no),function(oo){return oo.length>1||oo.length===1&&no.hasEdge(oo[0],oo[0])})}return findCycles_1}var floydWarshall_1,hasRequiredFloydWarshall;function requireFloydWarshall(){if(hasRequiredFloydWarshall)return floydWarshall_1;hasRequiredFloydWarshall=1;var eo=requireLodash();floydWarshall_1=ro;var to=eo.constant(1);function ro(oo,io,so){return no(oo,io||to,so||function(ao){return oo.outEdges(ao)})}function no(oo,io,so){var ao={},lo=oo.nodes();return lo.forEach(function(uo){ao[uo]={},ao[uo][uo]={distance:0},lo.forEach(function(co){uo!==co&&(ao[uo][co]={distance:Number.POSITIVE_INFINITY})}),so(uo).forEach(function(co){var fo=co.v===uo?co.w:co.v,ho=io(co);ao[uo][fo]={distance:ho,predecessor:uo}})}),lo.forEach(function(uo){var co=ao[uo];lo.forEach(function(fo){var ho=ao[fo];lo.forEach(function(po){var go=ho[uo],vo=co[po],bo=ho[po],xo=go.distance+vo.distance;xo0;){if(uo=lo.removeMin(),eo.has(ao,uo))so.setEdge(uo,ao[uo]);else{if(fo)throw new Error("Input graph is not connected: "+oo);fo=!0}oo.nodeEdges(uo).forEach(co)}return so}return prim_1}var alg,hasRequiredAlg;function requireAlg(){return hasRequiredAlg||(hasRequiredAlg=1,alg={components:requireComponents(),dijkstra:requireDijkstra(),dijkstraAll:requireDijkstraAll(),findCycles:requireFindCycles(),floydWarshall:requireFloydWarshall(),isAcyclic:requireIsAcyclic(),postorder:requirePostorder(),preorder:requirePreorder(),prim:requirePrim(),tarjan:requireTarjan(),topsort:requireTopsort()}),alg}var graphlib$1,hasRequiredGraphlib;function requireGraphlib(){if(hasRequiredGraphlib)return graphlib$1;hasRequiredGraphlib=1;var eo=requireLib();return graphlib$1={Graph:eo.Graph,json:requireJson(),alg:requireAlg(),version:eo.version},graphlib$1}var graphlib;if(typeof commonjsRequire$1=="function")try{graphlib=requireGraphlib()}catch{}graphlib||(graphlib=window.graphlib);var graphlib_1=graphlib,cloneDeep_1,hasRequiredCloneDeep;function requireCloneDeep(){if(hasRequiredCloneDeep)return cloneDeep_1;hasRequiredCloneDeep=1;var eo=_baseClone,to=1,ro=4;function no(oo){return eo(oo,to|ro)}return cloneDeep_1=no,cloneDeep_1}var eq=eq_1,isArrayLike$3=isArrayLike_1,isIndex=_isIndex,isObject$7=isObject_1;function isIterateeCall$2(eo,to,ro){if(!isObject$7(ro))return!1;var no=typeof to;return(no=="number"?isArrayLike$3(ro)&&isIndex(to,ro.length):no=="string"&&to in ro)?eq(ro[to],eo):!1}var _isIterateeCall=isIterateeCall$2,defaults_1,hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults_1;hasRequiredDefaults=1;var eo=_baseRest,to=eq_1,ro=_isIterateeCall,no=keysIn_1,oo=Object.prototype,io=oo.hasOwnProperty,so=eo(function(ao,lo){ao=Object(ao);var uo=-1,co=lo.length,fo=co>2?lo[2]:void 0;for(fo&&ro(lo[0],lo[1],fo)&&(co=1);++uo-1?oo[io?to[so]:so]:void 0}}var _createFind=createFind$1,reWhitespace=/\s/;function trimmedEndIndex$1(eo){for(var to=eo.length;to--&&reWhitespace.test(eo.charAt(to)););return to}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(eo){return eo&&eo.slice(0,trimmedEndIndex(eo)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$6=isObject_1,isSymbol$2=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(eo){if(typeof eo=="number")return eo;if(isSymbol$2(eo))return NAN;if(isObject$6(eo)){var to=typeof eo.valueOf=="function"?eo.valueOf():eo;eo=isObject$6(to)?to+"":to}if(typeof eo!="string")return eo===0?eo:+eo;eo=baseTrim(eo);var ro=reIsBinary.test(eo);return ro||reIsOctal.test(eo)?freeParseInt(eo.slice(2),ro?2:8):reIsBadHex.test(eo)?NAN:+eo}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$2(eo){if(!eo)return eo===0?eo:0;if(eo=toNumber(eo),eo===INFINITY||eo===-INFINITY){var to=eo<0?-1:1;return to*MAX_INTEGER}return eo===eo?eo:0}var toFinite_1=toFinite$2,toFinite$1=toFinite_1;function toInteger$1(eo){var to=toFinite$1(eo),ro=to%1;return to===to?ro?to-ro:to:0}var toInteger_1=toInteger$1,baseFindIndex=_baseFindIndex,baseIteratee$3=_baseIteratee,toInteger=toInteger_1,nativeMax$1=Math.max;function findIndex$1(eo,to,ro){var no=eo==null?0:eo.length;if(!no)return-1;var oo=ro==null?0:toInteger(ro);return oo<0&&(oo=nativeMax$1(no+oo,0)),baseFindIndex(eo,baseIteratee$3(to),oo)}var findIndex_1=findIndex$1,createFind=_createFind,findIndex=findIndex_1,find$1=createFind(findIndex),find_1=find$1,baseFlatten$1=_baseFlatten;function flatten$2(eo){var to=eo==null?0:eo.length;return to?baseFlatten$1(eo,1):[]}var flatten_1=flatten$2,forIn_1,hasRequiredForIn;function requireForIn(){if(hasRequiredForIn)return forIn_1;hasRequiredForIn=1;var eo=_baseFor,to=require_castFunction(),ro=keysIn_1;function no(oo,io){return oo==null?oo:eo(oo,to(io),ro)}return forIn_1=no,forIn_1}function last(eo){var to=eo==null?0:eo.length;return to?eo[to-1]:void 0}var last_1=last,baseAssignValue=_baseAssignValue,baseForOwn=_baseForOwn,baseIteratee$2=_baseIteratee;function mapValues(eo,to){var ro={};return to=baseIteratee$2(to),baseForOwn(eo,function(no,oo,io){baseAssignValue(ro,oo,to(no,oo,io))}),ro}var mapValues_1=mapValues,isSymbol$1=isSymbol_1;function baseExtremum$3(eo,to,ro){for(var no=-1,oo=eo.length;++noto}var _baseGt=baseGt$1,baseExtremum$2=_baseExtremum,baseGt=_baseGt,identity$4=identity_1;function max$1(eo){return eo&&eo.length?baseExtremum$2(eo,identity$4,baseGt):void 0}var max_1=max$1,_assignMergeValue,hasRequired_assignMergeValue;function require_assignMergeValue(){if(hasRequired_assignMergeValue)return _assignMergeValue;hasRequired_assignMergeValue=1;var eo=_baseAssignValue,to=eq_1;function ro(no,oo,io){(io!==void 0&&!to(no[oo],io)||io===void 0&&!(oo in no))&&eo(no,oo,io)}return _assignMergeValue=ro,_assignMergeValue}var baseGetTag=_baseGetTag,getPrototype=_getPrototype,isObjectLike=isObjectLike_1,objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$1(eo){if(!isObjectLike(eo)||baseGetTag(eo)!=objectTag)return!1;var to=getPrototype(eo);if(to===null)return!0;var ro=hasOwnProperty$2.call(to,"constructor")&&to.constructor;return typeof ro=="function"&&ro instanceof ro&&funcToString.call(ro)==objectCtorString}var isPlainObject_1=isPlainObject$1,_safeGet,hasRequired_safeGet;function require_safeGet(){if(hasRequired_safeGet)return _safeGet;hasRequired_safeGet=1;function eo(to,ro){if(!(ro==="constructor"&&typeof to[ro]=="function")&&ro!="__proto__")return to[ro]}return _safeGet=eo,_safeGet}var toPlainObject_1,hasRequiredToPlainObject;function requireToPlainObject(){if(hasRequiredToPlainObject)return toPlainObject_1;hasRequiredToPlainObject=1;var eo=_copyObject,to=keysIn_1;function ro(no){return eo(no,to(no))}return toPlainObject_1=ro,toPlainObject_1}var _baseMergeDeep,hasRequired_baseMergeDeep;function require_baseMergeDeep(){if(hasRequired_baseMergeDeep)return _baseMergeDeep;hasRequired_baseMergeDeep=1;var eo=require_assignMergeValue(),to=_cloneBufferExports,ro=_cloneTypedArray,no=_copyArray,oo=_initCloneObject,io=isArguments_1,so=isArray_1,ao=requireIsArrayLikeObject(),lo=isBufferExports,uo=isFunction_1,co=isObject_1,fo=isPlainObject_1,ho=isTypedArray_1,po=require_safeGet(),go=requireToPlainObject();function vo(bo,xo,_o,Eo,So,To,wo){var Co=po(bo,_o),Oo=po(xo,_o),Ao=wo.get(Oo);if(Ao){eo(bo,_o,Ao);return}var Ro=To?To(Co,Oo,_o+"",bo,xo,wo):void 0,No=Ro===void 0;if(No){var Mo=so(Oo),Do=!Mo&&lo(Oo),jo=!Mo&&!Do&&ho(Oo);Ro=Oo,Mo||Do||jo?so(Co)?Ro=Co:ao(Co)?Ro=no(Co):Do?(No=!1,Ro=to(Oo,!0)):jo?(No=!1,Ro=ro(Oo,!0)):Ro=[]:fo(Oo)||io(Oo)?(Ro=Co,io(Co)?Ro=go(Co):(!co(Co)||uo(Co))&&(Ro=oo(Oo))):No=!1}No&&(wo.set(Oo,Ro),So(Ro,Oo,Eo,To,wo),wo.delete(Oo)),eo(bo,_o,Ro)}return _baseMergeDeep=vo,_baseMergeDeep}var _baseMerge,hasRequired_baseMerge;function require_baseMerge(){if(hasRequired_baseMerge)return _baseMerge;hasRequired_baseMerge=1;var eo=_Stack,to=require_assignMergeValue(),ro=_baseFor,no=require_baseMergeDeep(),oo=isObject_1,io=keysIn_1,so=require_safeGet();function ao(lo,uo,co,fo,ho){lo!==uo&&ro(uo,function(po,go){if(ho||(ho=new eo),oo(po))no(lo,uo,go,co,ao,fo,ho);else{var vo=fo?fo(so(lo,go),po,go+"",lo,uo,ho):void 0;vo===void 0&&(vo=po),to(lo,go,vo)}},io)}return _baseMerge=ao,_baseMerge}var _createAssigner,hasRequired_createAssigner;function require_createAssigner(){if(hasRequired_createAssigner)return _createAssigner;hasRequired_createAssigner=1;var eo=_baseRest,to=_isIterateeCall;function ro(no){return eo(function(oo,io){var so=-1,ao=io.length,lo=ao>1?io[ao-1]:void 0,uo=ao>2?io[2]:void 0;for(lo=no.length>3&&typeof lo=="function"?(ao--,lo):void 0,uo&&to(io[0],io[1],uo)&&(lo=ao<3?void 0:lo,ao=1),oo=Object(oo);++soto||io&&so&&lo&&!ao&&!uo||no&&so&&lo||!ro&&lo||!oo)return 1;if(!no&&!io&&!uo&&eo=ao)return lo;var uo=ro[no];return lo*(uo=="desc"?-1:1)}}return eo.index-to.index}var _compareMultiple=compareMultiple$1,arrayMap=_arrayMap,baseGet=_baseGet,baseIteratee=_baseIteratee,baseMap=_baseMap,baseSortBy=_baseSortBy,baseUnary=_baseUnary,compareMultiple=_compareMultiple,identity$2=identity_1,isArray$1=isArray_1;function baseOrderBy$1(eo,to,ro){to.length?to=arrayMap(to,function(io){return isArray$1(io)?function(so){return baseGet(so,io.length===1?io[0]:io)}:io}):to=[identity$2];var no=-1;to=arrayMap(to,baseUnary(baseIteratee));var oo=baseMap(eo,function(io,so,ao){var lo=arrayMap(to,function(uo){return uo(io)});return{criteria:lo,index:++no,value:io}});return baseSortBy(oo,function(io,so){return compareMultiple(io,so,ro)})}var _baseOrderBy=baseOrderBy$1,baseFlatten=_baseFlatten,baseOrderBy=_baseOrderBy,baseRest=_baseRest,isIterateeCall=_isIterateeCall,sortBy=baseRest(function(eo,to){if(eo==null)return[];var ro=to.length;return ro>1&&isIterateeCall(eo,to[0],to[1])?to=[]:ro>2&&isIterateeCall(to[0],to[1],to[2])&&(to=[to[0]]),baseOrderBy(eo,baseFlatten(to,1),[])}),sortBy_1=sortBy,uniqueId_1,hasRequiredUniqueId;function requireUniqueId(){if(hasRequiredUniqueId)return uniqueId_1;hasRequiredUniqueId=1;var eo=toString_1,to=0;function ro(no){var oo=++to;return eo(no)+oo}return uniqueId_1=ro,uniqueId_1}var _baseZipObject,hasRequired_baseZipObject;function require_baseZipObject(){if(hasRequired_baseZipObject)return _baseZipObject;hasRequired_baseZipObject=1;function eo(to,ro,no){for(var oo=-1,io=to.length,so=ro.length,ao={};++oo0;--ao)if(so=to[ao].dequeue(),so){no=no.concat(removeNode(eo,to,ro,so,!0));break}}}return no}function removeNode(eo,to,ro,no,oo){var io=oo?[]:void 0;return _$u.forEach(eo.inEdges(no.v),function(so){var ao=eo.edge(so),lo=eo.node(so.v);oo&&io.push({v:so.v,w:so.w}),lo.out-=ao,assignBucket(to,ro,lo)}),_$u.forEach(eo.outEdges(no.v),function(so){var ao=eo.edge(so),lo=so.w,uo=eo.node(lo);uo.in-=ao,assignBucket(to,ro,uo)}),eo.removeNode(no.v),io}function buildState(eo,to){var ro=new Graph$8,no=0,oo=0;_$u.forEach(eo.nodes(),function(ao){ro.setNode(ao,{v:ao,in:0,out:0})}),_$u.forEach(eo.edges(),function(ao){var lo=ro.edge(ao.v,ao.w)||0,uo=to(ao),co=lo+uo;ro.setEdge(ao.v,ao.w,co),oo=Math.max(oo,ro.node(ao.v).out+=uo),no=Math.max(no,ro.node(ao.w).in+=uo)});var io=_$u.range(oo+no+3).map(function(){return new List$2}),so=no+1;return _$u.forEach(ro.nodes(),function(ao){assignBucket(io,so,ro.node(ao))}),{graph:ro,buckets:io,zeroIdx:so}}function assignBucket(eo,to,ro){ro.out?ro.in?eo[ro.out-ro.in+to].enqueue(ro):eo[eo.length-1].enqueue(ro):eo[0].enqueue(ro)}var _$t=lodash_1,greedyFAS=greedyFas,acyclic$1={run:run$2,undo:undo$4};function run$2(eo){var to=eo.graph().acyclicer==="greedy"?greedyFAS(eo,ro(eo)):dfsFAS(eo);_$t.forEach(to,function(no){var oo=eo.edge(no);eo.removeEdge(no),oo.forwardName=no.name,oo.reversed=!0,eo.setEdge(no.w,no.v,oo,_$t.uniqueId("rev"))});function ro(no){return function(oo){return no.edge(oo).weight}}}function dfsFAS(eo){var to=[],ro={},no={};function oo(io){_$t.has(no,io)||(no[io]=!0,ro[io]=!0,_$t.forEach(eo.outEdges(io),function(so){_$t.has(ro,so.w)?to.push(so):oo(so.w)}),delete ro[io])}return _$t.forEach(eo.nodes(),oo),to}function undo$4(eo){_$t.forEach(eo.edges(),function(to){var ro=eo.edge(to);if(ro.reversed){eo.removeEdge(to);var no=ro.forwardName;delete ro.reversed,delete ro.forwardName,eo.setEdge(to.w,to.v,ro,no)}})}var _$s=lodash_1,Graph$7=graphlib_1.Graph,util$a={addDummyNode,simplify:simplify$1,asNonCompoundGraph,successorWeights,predecessorWeights,intersectRect,buildLayerMatrix,normalizeRanks:normalizeRanks$1,removeEmptyRanks:removeEmptyRanks$1,addBorderNode:addBorderNode$1,maxRank,partition,time,notime};function addDummyNode(eo,to,ro,no){var oo;do oo=_$s.uniqueId(no);while(eo.hasNode(oo));return ro.dummy=to,eo.setNode(oo,ro),oo}function simplify$1(eo){var to=new Graph$7().setGraph(eo.graph());return _$s.forEach(eo.nodes(),function(ro){to.setNode(ro,eo.node(ro))}),_$s.forEach(eo.edges(),function(ro){var no=to.edge(ro.v,ro.w)||{weight:0,minlen:1},oo=eo.edge(ro);to.setEdge(ro.v,ro.w,{weight:no.weight+oo.weight,minlen:Math.max(no.minlen,oo.minlen)})}),to}function asNonCompoundGraph(eo){var to=new Graph$7({multigraph:eo.isMultigraph()}).setGraph(eo.graph());return _$s.forEach(eo.nodes(),function(ro){eo.children(ro).length||to.setNode(ro,eo.node(ro))}),_$s.forEach(eo.edges(),function(ro){to.setEdge(ro,eo.edge(ro))}),to}function successorWeights(eo){var to=_$s.map(eo.nodes(),function(ro){var no={};return _$s.forEach(eo.outEdges(ro),function(oo){no[oo.w]=(no[oo.w]||0)+eo.edge(oo).weight}),no});return _$s.zipObject(eo.nodes(),to)}function predecessorWeights(eo){var to=_$s.map(eo.nodes(),function(ro){var no={};return _$s.forEach(eo.inEdges(ro),function(oo){no[oo.v]=(no[oo.v]||0)+eo.edge(oo).weight}),no});return _$s.zipObject(eo.nodes(),to)}function intersectRect(eo,to){var ro=eo.x,no=eo.y,oo=to.x-ro,io=to.y-no,so=eo.width/2,ao=eo.height/2;if(!oo&&!io)throw new Error("Not possible to find intersection inside of the rectangle");var lo,uo;return Math.abs(io)*so>Math.abs(oo)*ao?(io<0&&(ao=-ao),lo=ao*oo/io,uo=ao):(oo<0&&(so=-so),lo=so,uo=so*io/oo),{x:ro+lo,y:no+uo}}function buildLayerMatrix(eo){var to=_$s.map(_$s.range(maxRank(eo)+1),function(){return[]});return _$s.forEach(eo.nodes(),function(ro){var no=eo.node(ro),oo=no.rank;_$s.isUndefined(oo)||(to[oo][no.order]=ro)}),to}function normalizeRanks$1(eo){var to=_$s.min(_$s.map(eo.nodes(),function(ro){return eo.node(ro).rank}));_$s.forEach(eo.nodes(),function(ro){var no=eo.node(ro);_$s.has(no,"rank")&&(no.rank-=to)})}function removeEmptyRanks$1(eo){var to=_$s.min(_$s.map(eo.nodes(),function(io){return eo.node(io).rank})),ro=[];_$s.forEach(eo.nodes(),function(io){var so=eo.node(io).rank-to;ro[so]||(ro[so]=[]),ro[so].push(io)});var no=0,oo=eo.graph().nodeRankFactor;_$s.forEach(ro,function(io,so){_$s.isUndefined(io)&&so%oo!==0?--no:no&&_$s.forEach(io,function(ao){eo.node(ao).rank+=no})})}function addBorderNode$1(eo,to,ro,no){var oo={width:0,height:0};return arguments.length>=4&&(oo.rank=ro,oo.order=no),addDummyNode(eo,"border",oo,to)}function maxRank(eo){return _$s.max(_$s.map(eo.nodes(),function(to){var ro=eo.node(to).rank;if(!_$s.isUndefined(ro))return ro}))}function partition(eo,to){var ro={lhs:[],rhs:[]};return _$s.forEach(eo,function(no){to(no)?ro.lhs.push(no):ro.rhs.push(no)}),ro}function time(eo,to){var ro=_$s.now();try{return to()}finally{console.log(eo+" time: "+(_$s.now()-ro)+"ms")}}function notime(eo,to){return to()}var _$r=lodash_1,util$9=util$a,normalize$1={run:run$1,undo:undo$3};function run$1(eo){eo.graph().dummyChains=[],_$r.forEach(eo.edges(),function(to){normalizeEdge(eo,to)})}function normalizeEdge(eo,to){var ro=to.v,no=eo.node(ro).rank,oo=to.w,io=eo.node(oo).rank,so=to.name,ao=eo.edge(to),lo=ao.labelRank;if(io!==no+1){eo.removeEdge(to);var uo,co,fo;for(fo=0,++no;noso.lim&&(ao=so,lo=!0);var uo=_$o.filter(to.edges(),function(co){return lo===isDescendant(eo,eo.node(co.v),ao)&&lo!==isDescendant(eo,eo.node(co.w),ao)});return _$o.minBy(uo,function(co){return slack(to,co)})}function exchangeEdges(eo,to,ro,no){var oo=ro.v,io=ro.w;eo.removeEdge(oo,io),eo.setEdge(no.v,no.w,{}),initLowLimValues(eo),initCutValues(eo,to),updateRanks(eo,to)}function updateRanks(eo,to){var ro=_$o.find(eo.nodes(),function(oo){return!to.node(oo).parent}),no=preorder(eo,ro);no=no.slice(1),_$o.forEach(no,function(oo){var io=eo.node(oo).parent,so=to.edge(oo,io),ao=!1;so||(so=to.edge(io,oo),ao=!0),to.node(oo).rank=to.node(io).rank+(ao?so.minlen:-so.minlen)})}function isTreeEdge(eo,to,ro){return eo.hasEdge(to,ro)}function isDescendant(eo,to,ro){return ro.low<=to.lim&&to.lim<=ro.lim}var rankUtil=util$8,longestPath=rankUtil.longestPath,feasibleTree=feasibleTree_1,networkSimplex=networkSimplex_1,rank_1=rank$1;function rank$1(eo){switch(eo.graph().ranker){case"network-simplex":networkSimplexRanker(eo);break;case"tight-tree":tightTreeRanker(eo);break;case"longest-path":longestPathRanker(eo);break;default:networkSimplexRanker(eo)}}var longestPathRanker=longestPath;function tightTreeRanker(eo){longestPath(eo),feasibleTree(eo)}function networkSimplexRanker(eo){networkSimplex(eo)}var _$n=lodash_1,parentDummyChains_1=parentDummyChains$1;function parentDummyChains$1(eo){var to=postorder(eo);_$n.forEach(eo.graph().dummyChains,function(ro){for(var no=eo.node(ro),oo=no.edgeObj,io=findPath(eo,to,oo.v,oo.w),so=io.path,ao=io.lca,lo=0,uo=so[lo],co=!0;ro!==oo.w;){if(no=eo.node(ro),co){for(;(uo=so[lo])!==ao&&eo.node(uo).maxRankso||ao>to[lo].lim));for(uo=lo,lo=no;(lo=eo.parent(lo))!==uo;)io.push(lo);return{path:oo.concat(io.reverse()),lca:uo}}function postorder(eo){var to={},ro=0;function no(oo){var io=ro;_$n.forEach(eo.children(oo),no),to[oo]={low:io,lim:ro++}}return _$n.forEach(eo.children(),no),to}var _$m=lodash_1,util$7=util$a,nestingGraph$1={run,cleanup:cleanup$1};function run(eo){var to=util$7.addDummyNode(eo,"root",{},"_root"),ro=treeDepths(eo),no=_$m.max(_$m.values(ro))-1,oo=2*no+1;eo.graph().nestingRoot=to,_$m.forEach(eo.edges(),function(so){eo.edge(so).minlen*=oo});var io=sumWeights(eo)+1;_$m.forEach(eo.children(),function(so){dfs(eo,to,oo,io,no,ro,so)}),eo.graph().nodeRankFactor=oo}function dfs(eo,to,ro,no,oo,io,so){var ao=eo.children(so);if(!ao.length){so!==to&&eo.setEdge(to,so,{weight:0,minlen:ro});return}var lo=util$7.addBorderNode(eo,"_bt"),uo=util$7.addBorderNode(eo,"_bb"),co=eo.node(so);eo.setParent(lo,so),co.borderTop=lo,eo.setParent(uo,so),co.borderBottom=uo,_$m.forEach(ao,function(fo){dfs(eo,to,ro,no,oo,io,fo);var ho=eo.node(fo),po=ho.borderTop?ho.borderTop:fo,go=ho.borderBottom?ho.borderBottom:fo,vo=ho.borderTop?no:2*no,bo=po!==go?1:oo-io[so]+1;eo.setEdge(lo,po,{weight:vo,minlen:bo,nestingEdge:!0}),eo.setEdge(go,uo,{weight:vo,minlen:bo,nestingEdge:!0})}),eo.parent(so)||eo.setEdge(to,lo,{weight:0,minlen:oo+io[so]})}function treeDepths(eo){var to={};function ro(no,oo){var io=eo.children(no);io&&io.length&&_$m.forEach(io,function(so){ro(so,oo+1)}),to[no]=oo}return _$m.forEach(eo.children(),function(no){ro(no,1)}),to}function sumWeights(eo){return _$m.reduce(eo.edges(),function(to,ro){return to+eo.edge(ro).weight},0)}function cleanup$1(eo){var to=eo.graph();eo.removeNode(to.nestingRoot),delete to.nestingRoot,_$m.forEach(eo.edges(),function(ro){var no=eo.edge(ro);no.nestingEdge&&eo.removeEdge(ro)})}var _$l=lodash_1,util$6=util$a,addBorderSegments_1=addBorderSegments$1;function addBorderSegments$1(eo){function to(ro){var no=eo.children(ro),oo=eo.node(ro);if(no.length&&_$l.forEach(no,to),_$l.has(oo,"minRank")){oo.borderLeft=[],oo.borderRight=[];for(var io=oo.minRank,so=oo.maxRank+1;io0;)co%2&&(fo+=ao[co+1]),co=co-1>>1,ao[co]+=uo.weight;lo+=uo.weight*fo})),lo}var _$h=lodash_1,barycenter_1=barycenter$1;function barycenter$1(eo,to){return _$h.map(to,function(ro){var no=eo.inEdges(ro);if(no.length){var oo=_$h.reduce(no,function(io,so){var ao=eo.edge(so),lo=eo.node(so.v);return{sum:io.sum+ao.weight*lo.order,weight:io.weight+ao.weight}},{sum:0,weight:0});return{v:ro,barycenter:oo.sum/oo.weight,weight:oo.weight}}else return{v:ro}})}var _$g=lodash_1,resolveConflicts_1=resolveConflicts$1;function resolveConflicts$1(eo,to){var ro={};_$g.forEach(eo,function(oo,io){var so=ro[oo.v]={indegree:0,in:[],out:[],vs:[oo.v],i:io};_$g.isUndefined(oo.barycenter)||(so.barycenter=oo.barycenter,so.weight=oo.weight)}),_$g.forEach(to.edges(),function(oo){var io=ro[oo.v],so=ro[oo.w];!_$g.isUndefined(io)&&!_$g.isUndefined(so)&&(so.indegree++,io.out.push(ro[oo.w]))});var no=_$g.filter(ro,function(oo){return!oo.indegree});return doResolveConflicts(no)}function doResolveConflicts(eo){var to=[];function ro(io){return function(so){so.merged||(_$g.isUndefined(so.barycenter)||_$g.isUndefined(io.barycenter)||so.barycenter>=io.barycenter)&&mergeEntries(io,so)}}function no(io){return function(so){so.in.push(io),--so.indegree===0&&eo.push(so)}}for(;eo.length;){var oo=eo.pop();to.push(oo),_$g.forEach(oo.in.reverse(),ro(oo)),_$g.forEach(oo.out,no(oo))}return _$g.map(_$g.filter(to,function(io){return!io.merged}),function(io){return _$g.pick(io,["vs","i","barycenter","weight"])})}function mergeEntries(eo,to){var ro=0,no=0;eo.weight&&(ro+=eo.barycenter*eo.weight,no+=eo.weight),to.weight&&(ro+=to.barycenter*to.weight,no+=to.weight),eo.vs=to.vs.concat(eo.vs),eo.barycenter=ro/no,eo.weight=no,eo.i=Math.min(to.i,eo.i),to.merged=!0}var _$f=lodash_1,util$5=util$a,sort_1=sort$1;function sort$1(eo,to){var ro=util$5.partition(eo,function(co){return _$f.has(co,"barycenter")}),no=ro.lhs,oo=_$f.sortBy(ro.rhs,function(co){return-co.i}),io=[],so=0,ao=0,lo=0;no.sort(compareWithBias(!!to)),lo=consumeUnsortable(io,oo,lo),_$f.forEach(no,function(co){lo+=co.vs.length,io.push(co.vs),so+=co.barycenter*co.weight,ao+=co.weight,lo=consumeUnsortable(io,oo,lo)});var uo={vs:_$f.flatten(io,!0)};return ao&&(uo.barycenter=so/ao,uo.weight=ao),uo}function consumeUnsortable(eo,to,ro){for(var no;to.length&&(no=_$f.last(to)).i<=ro;)to.pop(),eo.push(no.vs),ro++;return ro}function compareWithBias(eo){return function(to,ro){return to.barycenterro.barycenter?1:eo?ro.i-to.i:to.i-ro.i}}var _$e=lodash_1,barycenter=barycenter_1,resolveConflicts=resolveConflicts_1,sort=sort_1,sortSubgraph_1=sortSubgraph$1;function sortSubgraph$1(eo,to,ro,no){var oo=eo.children(to),io=eo.node(to),so=io?io.borderLeft:void 0,ao=io?io.borderRight:void 0,lo={};so&&(oo=_$e.filter(oo,function(go){return go!==so&&go!==ao}));var uo=barycenter(eo,oo);_$e.forEach(uo,function(go){if(eo.children(go.v).length){var vo=sortSubgraph$1(eo,go.v,ro,no);lo[go.v]=vo,_$e.has(vo,"barycenter")&&mergeBarycenters(go,vo)}});var co=resolveConflicts(uo,ro);expandSubgraphs(co,lo);var fo=sort(co,no);if(so&&(fo.vs=_$e.flatten([so,fo.vs,ao],!0),eo.predecessors(so).length)){var ho=eo.node(eo.predecessors(so)[0]),po=eo.node(eo.predecessors(ao)[0]);_$e.has(fo,"barycenter")||(fo.barycenter=0,fo.weight=0),fo.barycenter=(fo.barycenter*fo.weight+ho.order+po.order)/(fo.weight+2),fo.weight+=2}return fo}function expandSubgraphs(eo,to){_$e.forEach(eo,function(ro){ro.vs=_$e.flatten(ro.vs.map(function(no){return to[no]?to[no].vs:no}),!0)})}function mergeBarycenters(eo,to){_$e.isUndefined(eo.barycenter)?(eo.barycenter=to.barycenter,eo.weight=to.weight):(eo.barycenter=(eo.barycenter*eo.weight+to.barycenter*to.weight)/(eo.weight+to.weight),eo.weight+=to.weight)}var _$d=lodash_1,Graph$5=graphlib_1.Graph,buildLayerGraph_1=buildLayerGraph$1;function buildLayerGraph$1(eo,to,ro){var no=createRootNode(eo),oo=new Graph$5({compound:!0}).setGraph({root:no}).setDefaultNodeLabel(function(io){return eo.node(io)});return _$d.forEach(eo.nodes(),function(io){var so=eo.node(io),ao=eo.parent(io);(so.rank===to||so.minRank<=to&&to<=so.maxRank)&&(oo.setNode(io),oo.setParent(io,ao||no),_$d.forEach(eo[ro](io),function(lo){var uo=lo.v===io?lo.w:lo.v,co=oo.edge(uo,io),fo=_$d.isUndefined(co)?0:co.weight;oo.setEdge(uo,io,{weight:eo.edge(lo).weight+fo})}),_$d.has(so,"minRank")&&oo.setNode(io,{borderLeft:so.borderLeft[to],borderRight:so.borderRight[to]}))}),oo}function createRootNode(eo){for(var to;eo.hasNode(to=_$d.uniqueId("_root")););return to}var _$c=lodash_1,addSubgraphConstraints_1=addSubgraphConstraints$1;function addSubgraphConstraints$1(eo,to,ro){var no={},oo;_$c.forEach(ro,function(io){for(var so=eo.parent(io),ao,lo;so;){if(ao=eo.parent(so),ao?(lo=no[ao],no[ao]=so):(lo=oo,oo=so),lo&&lo!==so){to.setEdge(lo,so);return}so=ao}})}var _$b=lodash_1,initOrder=initOrder_1,crossCount=crossCount_1,sortSubgraph=sortSubgraph_1,buildLayerGraph=buildLayerGraph_1,addSubgraphConstraints=addSubgraphConstraints_1,Graph$4=graphlib_1.Graph,util$4=util$a,order_1=order$1;function order$1(eo){var to=util$4.maxRank(eo),ro=buildLayerGraphs(eo,_$b.range(1,to+1),"inEdges"),no=buildLayerGraphs(eo,_$b.range(to-1,-1,-1),"outEdges"),oo=initOrder(eo);assignOrder(eo,oo);for(var io=Number.POSITIVE_INFINITY,so,ao=0,lo=0;lo<4;++ao,++lo){sweepLayerGraphs(ao%2?ro:no,ao%4>=2),oo=util$4.buildLayerMatrix(eo);var uo=crossCount(eo,oo);uouo)&&addConflict(ro,ho,co)})})}function oo(io,so){var ao=-1,lo,uo=0;return _$a.forEach(so,function(co,fo){if(eo.node(co).dummy==="border"){var ho=eo.predecessors(co);ho.length&&(lo=eo.node(ho[0]).order,no(so,uo,fo,ao,lo),uo=fo,ao=lo)}no(so,uo,so.length,lo,io.length)}),so}return _$a.reduce(to,oo),ro}function findOtherInnerSegmentNode(eo,to){if(eo.node(to).dummy)return _$a.find(eo.predecessors(to),function(ro){return eo.node(ro).dummy})}function addConflict(eo,to,ro){if(to>ro){var no=to;to=ro,ro=no}var oo=eo[to];oo||(eo[to]=oo={}),oo[ro]=!0}function hasConflict(eo,to,ro){if(to>ro){var no=to;to=ro,ro=no}return _$a.has(eo[to],ro)}function verticalAlignment(eo,to,ro,no){var oo={},io={},so={};return _$a.forEach(to,function(ao){_$a.forEach(ao,function(lo,uo){oo[lo]=lo,io[lo]=lo,so[lo]=uo})}),_$a.forEach(to,function(ao){var lo=-1;_$a.forEach(ao,function(uo){var co=no(uo);if(co.length){co=_$a.sortBy(co,function(vo){return so[vo]});for(var fo=(co.length-1)/2,ho=Math.floor(fo),po=Math.ceil(fo);ho<=po;++ho){var go=co[ho];io[uo]===uo&&lo=0;ao--)(so=eo[ao])&&(io=(oo<3?so(io):oo>3?so(to,ro,io):so(to,ro))||io);return oo>3&&io&&Object.defineProperty(to,ro,io),io}function __spreadArray$1(eo,to,ro){if(ro||arguments.length===2)for(var no=0,oo=to.length,io;no"u"?InjectionMode$1.none:InjectionMode$1.insertNode,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},to),this._classNameToArgs=(no=ro==null?void 0:ro.classNameToArgs)!==null&&no!==void 0?no:this._classNameToArgs,this._counter=(oo=ro==null?void 0:ro.counter)!==null&&oo!==void 0?oo:this._counter,this._keyToClassName=(so=(io=this._config.classNameCache)!==null&&io!==void 0?io:ro==null?void 0:ro.keyToClassName)!==null&&so!==void 0?so:this._keyToClassName,this._preservedRules=(ao=ro==null?void 0:ro.preservedRules)!==null&&ao!==void 0?ao:this._preservedRules,this._rules=(lo=ro==null?void 0:ro.rules)!==null&&lo!==void 0?lo:this._rules}return eo.getInstance=function(){if(_stylesheet$1=_global$2[STYLESHEET_SETTING$1],!_stylesheet$1||_stylesheet$1._lastStyleElement&&_stylesheet$1._lastStyleElement.ownerDocument!==document){var to=(_global$2==null?void 0:_global$2.FabricConfig)||{},ro=new eo(to.mergeStyles,to.serializedStylesheet);_stylesheet$1=ro,_global$2[STYLESHEET_SETTING$1]=ro}return _stylesheet$1},eo.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},eo.prototype.setConfig=function(to){this._config=__assign$4(__assign$4({},this._config),to)},eo.prototype.onReset=function(to){var ro=this;return this._onResetCallbacks.push(to),function(){ro._onResetCallbacks=ro._onResetCallbacks.filter(function(no){return no!==to})}},eo.prototype.onInsertRule=function(to){var ro=this;return this._onInsertRuleCallbacks.push(to),function(){ro._onInsertRuleCallbacks=ro._onInsertRuleCallbacks.filter(function(no){return no!==to})}},eo.prototype.getClassName=function(to){var ro=this._config.namespace,no=to||this._config.defaultPrefix;return"".concat(ro?ro+"-":"").concat(no,"-").concat(this._counter++)},eo.prototype.cacheClassName=function(to,ro,no,oo){this._keyToClassName[ro]=to,this._classNameToArgs[to]={args:no,rules:oo}},eo.prototype.classNameFromKey=function(to){return this._keyToClassName[to]},eo.prototype.getClassNameCache=function(){return this._keyToClassName},eo.prototype.argsFromClassName=function(to){var ro=this._classNameToArgs[to];return ro&&ro.args},eo.prototype.insertedRulesFromClassName=function(to){var ro=this._classNameToArgs[to];return ro&&ro.rules},eo.prototype.insertRule=function(to,ro){var no=this._config.injectionMode,oo=no!==InjectionMode$1.none?this._getStyleElement():void 0;if(ro&&this._preservedRules.push(to),oo)switch(no){case InjectionMode$1.insertNode:var io=oo.sheet;try{io.insertRule(to,io.cssRules.length)}catch{}break;case InjectionMode$1.appendChild:oo.appendChild(document.createTextNode(to));break}else this._rules.push(to);this._config.onInsertRule&&this._config.onInsertRule(to),this._onInsertRuleCallbacks.forEach(function(so){return so()})},eo.prototype.getRules=function(to){return(to?this._preservedRules.join(""):"")+this._rules.join("")},eo.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach(function(to){return to()})},eo.prototype.resetKeys=function(){this._keyToClassName={}},eo.prototype._getStyleElement=function(){var to=this;return!this._styleElement&&typeof document<"u"&&(this._styleElement=this._createStyleElement(),REUSE_STYLE_NODE$1||window.requestAnimationFrame(function(){to._styleElement=void 0})),this._styleElement},eo.prototype._createStyleElement=function(){var to=document.head,ro=document.createElement("style"),no=null;ro.setAttribute("data-merge-styles","true");var oo=this._config.cspSettings;if(oo&&oo.nonce&&ro.setAttribute("nonce",oo.nonce),this._lastStyleElement)no=this._lastStyleElement.nextElementSibling;else{var io=this._findPlaceholderStyleTag();io?no=io.nextElementSibling:no=to.childNodes[0]}return to.insertBefore(ro,to.contains(no)?no:null),this._lastStyleElement=ro,ro},eo.prototype._findPlaceholderStyleTag=function(){var to=document.head;return to?to.querySelector("style[data-merge-styles]"):null},eo}();function extractStyleParts$1(){for(var eo=[],to=0;to=0)io(uo.split(" "));else{var co=oo.argsFromClassName(uo);co?io(co):ro.indexOf(uo)===-1&&ro.push(uo)}else Array.isArray(uo)?io(uo):typeof uo=="object"&&no.push(uo)}}return io(eo),{classes:ro,objects:no}}function setRTL$1(eo){_rtl$1!==eo&&(_rtl$1=eo)}function getRTL$2(){return _rtl$1===void 0&&(_rtl$1=typeof document<"u"&&!!document.documentElement&&document.documentElement.getAttribute("dir")==="rtl"),_rtl$1}var _rtl$1;_rtl$1=getRTL$2();function getStyleOptions$1(){return{rtl:getRTL$2()}}var rules$1={};function kebabRules$1(eo,to){var ro=eo[to];ro.charAt(0)!=="-"&&(eo[to]=rules$1[ro]=rules$1[ro]||ro.replace(/([A-Z])/g,"-$1").toLowerCase())}var _vendorSettings$1;function getVendorSettings$1(){var eo;if(!_vendorSettings$1){var to=typeof document<"u"?document:void 0,ro=typeof navigator<"u"?navigator:void 0,no=(eo=ro==null?void 0:ro.userAgent)===null||eo===void 0?void 0:eo.toLowerCase();to?_vendorSettings$1={isWebkit:!!(to&&"WebkitAppearance"in to.documentElement.style),isMoz:!!(no&&no.indexOf("firefox")>-1),isOpera:!!(no&&no.indexOf("opera")>-1),isMs:!!(ro&&(/rv:11.0/i.test(ro.userAgent)||/Edge\/\d./i.test(navigator.userAgent)))}:_vendorSettings$1={isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return _vendorSettings$1}var autoPrefixNames$1={"user-select":1};function prefixRules$1(eo,to){var ro=getVendorSettings$1(),no=eo[to];if(autoPrefixNames$1[no]){var oo=eo[to+1];autoPrefixNames$1[no]&&(ro.isWebkit&&eo.push("-webkit-"+no,oo),ro.isMoz&&eo.push("-moz-"+no,oo),ro.isMs&&eo.push("-ms-"+no,oo),ro.isOpera&&eo.push("-o-"+no,oo))}}var NON_PIXEL_NUMBER_PROPS$1=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function provideUnits$1(eo,to){var ro=eo[to],no=eo[to+1];if(typeof no=="number"){var oo=NON_PIXEL_NUMBER_PROPS$1.indexOf(ro)>-1,io=ro.indexOf("--")>-1,so=oo||io?"":"px";eo[to+1]="".concat(no).concat(so)}}var _a$a,LEFT$1="left",RIGHT$1="right",NO_FLIP$1="@noflip",NAME_REPLACEMENTS$1=(_a$a={},_a$a[LEFT$1]=RIGHT$1,_a$a[RIGHT$1]=LEFT$1,_a$a),VALUE_REPLACEMENTS$1={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function rtlifyRules$1(eo,to,ro){if(eo.rtl){var no=to[ro];if(!no)return;var oo=to[ro+1];if(typeof oo=="string"&&oo.indexOf(NO_FLIP$1)>=0)to[ro+1]=oo.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(no.indexOf(LEFT$1)>=0)to[ro]=no.replace(LEFT$1,RIGHT$1);else if(no.indexOf(RIGHT$1)>=0)to[ro]=no.replace(RIGHT$1,LEFT$1);else if(String(oo).indexOf(LEFT$1)>=0)to[ro+1]=oo.replace(LEFT$1,RIGHT$1);else if(String(oo).indexOf(RIGHT$1)>=0)to[ro+1]=oo.replace(RIGHT$1,LEFT$1);else if(NAME_REPLACEMENTS$1[no])to[ro]=NAME_REPLACEMENTS$1[no];else if(VALUE_REPLACEMENTS$1[oo])to[ro+1]=VALUE_REPLACEMENTS$1[oo];else switch(no){case"margin":case"padding":to[ro+1]=flipQuad$1(oo);break;case"box-shadow":to[ro+1]=negateNum$1(oo,0);break}}}function negateNum$1(eo,to){var ro=eo.split(" "),no=parseInt(ro[to],10);return ro[0]=ro[0].replace(String(no),String(no*-1)),ro.join(" ")}function flipQuad$1(eo){if(typeof eo=="string"){var to=eo.split(" ");if(to.length===4)return"".concat(to[0]," ").concat(to[3]," ").concat(to[2]," ").concat(to[1])}return eo}function tokenizeWithParentheses$1(eo){for(var to=[],ro=0,no=0,oo=0;ooro&&to.push(eo.substring(ro,oo)),ro=oo+1);break}return ro-1&&to.push([no.index,no.index+no[0].length,no[1].split(",").map(function(oo){return":global(".concat(oo.trim(),")")}).join(", ")]);return to.reverse().reduce(function(oo,io){var so=io[0],ao=io[1],lo=io[2],uo=oo.slice(0,so),co=oo.slice(ao);return uo+lo+co},eo)}function expandSelector$1(eo,to){return eo.indexOf(":global(")>=0?eo.replace(globalSelectorRegExp$1,"$1"):eo.indexOf(":")===0?to+eo:eo.indexOf("&")<0?to+" "+eo:eo}function extractSelector$1(eo,to,ro,no){to===void 0&&(to={__order:[]}),ro.indexOf("@")===0?(ro=ro+"{"+eo,extractRules$1([no],to,ro)):ro.indexOf(",")>-1?expandCommaSeparatedGlobals$1(ro).split(",").map(function(oo){return oo.trim()}).forEach(function(oo){return extractRules$1([no],to,expandSelector$1(oo,eo))}):extractRules$1([no],to,expandSelector$1(ro,eo))}function extractRules$1(eo,to,ro){to===void 0&&(to={__order:[]}),ro===void 0&&(ro="&");var no=Stylesheet$1.getInstance(),oo=to[ro];oo||(oo={},to[ro]=oo,to.__order.push(ro));for(var io=0,so=eo;io0){ro.subComponentStyles={};var ho=ro.subComponentStyles,po=function(go){if(no.hasOwnProperty(go)){var vo=no[go];ho[go]=function(bo){return concatStyleSets.apply(void 0,vo.map(function(xo){return typeof xo=="function"?xo(bo):xo}))}}};for(var uo in no)po(uo)}return ro}function mergeStyleSets(){for(var eo=[],to=0;to"u")){var to=eo;return to&&to.ownerDocument&&to.ownerDocument.defaultView?to.ownerDocument.defaultView:_window}}var Async=function(){function eo(to,ro){this._timeoutIds=null,this._immediateIds=null,this._intervalIds=null,this._animationFrameIds=null,this._isDisposed=!1,this._parent=to||null,this._onErrorHandler=ro,this._noop=function(){}}return eo.prototype.dispose=function(){var to;if(this._isDisposed=!0,this._parent=null,this._timeoutIds){for(to in this._timeoutIds)this._timeoutIds.hasOwnProperty(to)&&this.clearTimeout(parseInt(to,10));this._timeoutIds=null}if(this._immediateIds){for(to in this._immediateIds)this._immediateIds.hasOwnProperty(to)&&this.clearImmediate(parseInt(to,10));this._immediateIds=null}if(this._intervalIds){for(to in this._intervalIds)this._intervalIds.hasOwnProperty(to)&&this.clearInterval(parseInt(to,10));this._intervalIds=null}if(this._animationFrameIds){for(to in this._animationFrameIds)this._animationFrameIds.hasOwnProperty(to)&&this.cancelAnimationFrame(parseInt(to,10));this._animationFrameIds=null}},eo.prototype.setTimeout=function(to,ro){var no=this,oo=0;return this._isDisposed||(this._timeoutIds||(this._timeoutIds={}),oo=setTimeout(function(){try{no._timeoutIds&&delete no._timeoutIds[oo],to.apply(no._parent)}catch(io){no._logError(io)}},ro),this._timeoutIds[oo]=!0),oo},eo.prototype.clearTimeout=function(to){this._timeoutIds&&this._timeoutIds[to]&&(clearTimeout(to),delete this._timeoutIds[to])},eo.prototype.setImmediate=function(to,ro){var no=this,oo=0,io=getWindow(ro);if(!this._isDisposed){this._immediateIds||(this._immediateIds={});var so=function(){try{no._immediateIds&&delete no._immediateIds[oo],to.apply(no._parent)}catch(ao){no._logError(ao)}};oo=io.setTimeout(so,0),this._immediateIds[oo]=!0}return oo},eo.prototype.clearImmediate=function(to,ro){var no=getWindow(ro);this._immediateIds&&this._immediateIds[to]&&(no.clearTimeout(to),delete this._immediateIds[to])},eo.prototype.setInterval=function(to,ro){var no=this,oo=0;return this._isDisposed||(this._intervalIds||(this._intervalIds={}),oo=setInterval(function(){try{to.apply(no._parent)}catch(io){no._logError(io)}},ro),this._intervalIds[oo]=!0),oo},eo.prototype.clearInterval=function(to){this._intervalIds&&this._intervalIds[to]&&(clearInterval(to),delete this._intervalIds[to])},eo.prototype.throttle=function(to,ro,no){var oo=this;if(this._isDisposed)return this._noop;var io=ro||0,so=!0,ao=!0,lo=0,uo,co,fo=null;no&&typeof no.leading=="boolean"&&(so=no.leading),no&&typeof no.trailing=="boolean"&&(ao=no.trailing);var ho=function(go){var vo=Date.now(),bo=vo-lo,xo=so?io-bo:io;return bo>=io&&(!go||so)?(lo=vo,fo&&(oo.clearTimeout(fo),fo=null),uo=to.apply(oo._parent,co)):fo===null&&ao&&(fo=oo.setTimeout(ho,xo)),uo},po=function(){for(var go=[],vo=0;vo=so&&(Oo=!0),co=Co);var Ao=Co-co,Ro=so-Ao,No=Co-fo,Mo=!1;return uo!==null&&(No>=uo&&go?Mo=!0:Ro=Math.min(Ro,uo-No)),Ao>=so||Mo||Oo?bo(Co):(go===null||!wo)&&lo&&(go=oo.setTimeout(xo,Ro)),ho},_o=function(){return!!go},Eo=function(){_o()&&vo(Date.now())},So=function(){return _o()&&bo(Date.now()),ho},To=function(){for(var wo=[],Co=0;Co-1)for(var so=ro.split(/[ ,]+/),ao=0;ao"u")){var to=eo;return to&&to.ownerDocument?to.ownerDocument:document}}var _scrollbarWidth,_bodyScrollDisabledCount=0,DisabledScrollClassName=mergeStyles$1({overflow:"hidden !important"}),DATA_IS_SCROLLABLE_ATTRIBUTE="data-is-scrollable",allowScrollOnElement=function(eo,to){if(eo){var ro=0,no=null,oo=function(so){so.targetTouches.length===1&&(ro=so.targetTouches[0].clientY)},io=function(so){if(so.targetTouches.length===1&&(so.stopPropagation(),!!no)){var ao=so.targetTouches[0].clientY-ro,lo=findScrollableParent(so.target);lo&&(no=lo),no.scrollTop===0&&ao>0&&so.preventDefault(),no.scrollHeight-Math.ceil(no.scrollTop)<=no.clientHeight&&ao<0&&so.preventDefault()}};to.on(eo,"touchstart",oo,{passive:!1}),to.on(eo,"touchmove",io,{passive:!1}),no=eo}},allowOverscrollOnElement=function(eo,to){if(eo){var ro=function(no){no.stopPropagation()};to.on(eo,"touchmove",ro,{passive:!1})}},_disableIosBodyScroll=function(eo){eo.preventDefault()};function disableBodyScroll(){var eo=getDocument();eo&&eo.body&&!_bodyScrollDisabledCount&&(eo.body.classList.add(DisabledScrollClassName),eo.body.addEventListener("touchmove",_disableIosBodyScroll,{passive:!1,capture:!1})),_bodyScrollDisabledCount++}function enableBodyScroll(){if(_bodyScrollDisabledCount>0){var eo=getDocument();eo&&eo.body&&_bodyScrollDisabledCount===1&&(eo.body.classList.remove(DisabledScrollClassName),eo.body.removeEventListener("touchmove",_disableIosBodyScroll)),_bodyScrollDisabledCount--}}function getScrollbarWidth(){if(_scrollbarWidth===void 0){var eo=document.createElement("div");eo.style.setProperty("width","100px"),eo.style.setProperty("height","100px"),eo.style.setProperty("overflow","scroll"),eo.style.setProperty("position","absolute"),eo.style.setProperty("top","-9999px"),document.body.appendChild(eo),_scrollbarWidth=eo.offsetWidth-eo.clientWidth,document.body.removeChild(eo)}return _scrollbarWidth}function findScrollableParent(eo){for(var to=eo,ro=getDocument(eo);to&&to!==ro.body;){if(to.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE)==="true")return to;to=to.parentElement}for(to=eo;to&&to!==ro.body;){if(to.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE)!=="false"){var no=getComputedStyle(to),oo=no?no.getPropertyValue("overflow-y"):"";if(oo&&(oo==="scroll"||oo==="auto"))return to}to=to.parentElement}return(!to||to===ro.body)&&(to=getWindow(eo)),to}var _warningCallback=void 0;function warn(eo){console&&console.warn&&console.warn(eo)}var GLOBAL_SETTINGS_PROP_NAME="__globalSettings__",CALLBACK_STATE_PROP_NAME="__callbacks__",_counter=0,GlobalSettings=function(){function eo(){}return eo.getValue=function(to,ro){var no=_getGlobalSettings();return no[to]===void 0&&(no[to]=typeof ro=="function"?ro():ro),no[to]},eo.setValue=function(to,ro){var no=_getGlobalSettings(),oo=no[CALLBACK_STATE_PROP_NAME],io=no[to];if(ro!==io){no[to]=ro;var so={oldValue:io,value:ro,key:to};for(var ao in oo)oo.hasOwnProperty(ao)&&oo[ao](so)}return ro},eo.addChangeListener=function(to){var ro=to.__id__,no=_getCallbacks();ro||(ro=to.__id__=String(_counter++)),no[ro]=to},eo.removeChangeListener=function(to){var ro=_getCallbacks();delete ro[to.__id__]},eo}();function _getGlobalSettings(){var eo,to=getWindow(),ro=to||{};return ro[GLOBAL_SETTINGS_PROP_NAME]||(ro[GLOBAL_SETTINGS_PROP_NAME]=(eo={},eo[CALLBACK_STATE_PROP_NAME]={},eo)),ro[GLOBAL_SETTINGS_PROP_NAME]}function _getCallbacks(){var eo=_getGlobalSettings();return eo[CALLBACK_STATE_PROP_NAME]}var KeyCodes$1={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pauseBreak:19,capslock:20,escape:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,del:46,zero:48,one:49,two:50,three:51,four:52,five:53,six:54,seven:55,eight:56,nine:57,colon:58,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftWindow:91,rightWindow:92,select:93,zero_numpad:96,one_numpad:97,two_numpad:98,three_numpad:99,four_numpad:100,five_numpad:101,six_numpad:102,seven_numpad:103,eight_numpad:104,nine_numpad:105,multiply:106,add:107,subtract:109,decimalPoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrollLock:145,semicolon:186,equalSign:187,comma:188,dash:189,period:190,forwardSlash:191,graveAccent:192,openBracket:219,backSlash:220,closeBracket:221,singleQuote:222},Rectangle=function(){function eo(to,ro,no,oo){to===void 0&&(to=0),ro===void 0&&(ro=0),no===void 0&&(no=0),oo===void 0&&(oo=0),this.top=no,this.bottom=oo,this.left=to,this.right=ro}return Object.defineProperty(eo.prototype,"width",{get:function(){return this.right-this.left},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!1,configurable:!0}),eo.prototype.equals=function(to){return parseFloat(this.top.toFixed(4))===parseFloat(to.top.toFixed(4))&&parseFloat(this.bottom.toFixed(4))===parseFloat(to.bottom.toFixed(4))&&parseFloat(this.left.toFixed(4))===parseFloat(to.left.toFixed(4))&&parseFloat(this.right.toFixed(4))===parseFloat(to.right.toFixed(4))},eo}();function appendFunction(eo){for(var to=[],ro=1;ro-1&&oo._virtual.children.splice(io,1)}ro._virtual.parent=no||void 0,no&&(no._virtual||(no._virtual={children:[]}),no._virtual.children.push(ro))}var IS_FOCUSABLE_ATTRIBUTE$1="data-is-focusable",IS_VISIBLE_ATTRIBUTE="data-is-visible",FOCUSZONE_ID_ATTRIBUTE$1="data-focuszone-id",FOCUSZONE_SUB_ATTRIBUTE="data-is-sub-focuszone";function getFirstFocusable(eo,to,ro){return getNextElement(eo,to,!0,!1,!1,ro)}function getLastFocusable(eo,to,ro){return getPreviousElement(eo,to,!0,!1,!0,ro)}function getFirstTabbable(eo,to,ro,no){return no===void 0&&(no=!0),getNextElement(eo,to,no,!1,!1,ro,!1,!0)}function getLastTabbable(eo,to,ro,no){return no===void 0&&(no=!0),getPreviousElement(eo,to,no,!1,!0,ro,!1,!0)}function focusFirstChild(eo,to){var ro=getNextElement(eo,eo,!0,!1,!1,!0,void 0,void 0,to);return ro?(focusAsync(ro),!0):!1}function getPreviousElement(eo,to,ro,no,oo,io,so,ao){if(!to||!so&&to===eo)return null;var lo=isElementVisible(to);if(oo&&lo&&(io||!(isElementFocusZone(to)||isElementFocusSubZone(to)))){var uo=getPreviousElement(eo,to.lastElementChild,!0,!0,!0,io,so,ao);if(uo){if(ao&&isElementTabbable(uo,!0)||!ao)return uo;var co=getPreviousElement(eo,uo.previousElementSibling,!0,!0,!0,io,so,ao);if(co)return co;for(var fo=uo.parentElement;fo&&fo!==to;){var ho=getPreviousElement(eo,fo.previousElementSibling,!0,!0,!0,io,so,ao);if(ho)return ho;fo=fo.parentElement}}}if(ro&&lo&&isElementTabbable(to,ao))return to;var po=getPreviousElement(eo,to.previousElementSibling,!0,!0,!0,io,so,ao);return po||(no?null:getPreviousElement(eo,to.parentElement,!0,!1,!1,io,so,ao))}function getNextElement(eo,to,ro,no,oo,io,so,ao,lo){if(!to||to===eo&&oo&&!so)return null;var uo=lo?isElementVisibleAndNotHidden:isElementVisible,co=uo(to);if(ro&&co&&isElementTabbable(to,ao))return to;if(!oo&&co&&(io||!(isElementFocusZone(to)||isElementFocusSubZone(to)))){var fo=getNextElement(eo,to.firstElementChild,!0,!0,!1,io,so,ao,lo);if(fo)return fo}if(to===eo)return null;var ho=getNextElement(eo,to.nextElementSibling,!0,!0,!1,io,so,ao,lo);return ho||(no?null:getNextElement(eo,to.parentElement,!1,!1,!0,io,so,ao,lo))}function isElementVisible(eo){if(!eo||!eo.getAttribute)return!1;var to=eo.getAttribute(IS_VISIBLE_ATTRIBUTE);return to!=null?to==="true":eo.offsetHeight!==0||eo.offsetParent!==null||eo.isVisible===!0}function isElementVisibleAndNotHidden(eo){return!!eo&&isElementVisible(eo)&&!eo.hidden&&window.getComputedStyle(eo).visibility!=="hidden"}function isElementTabbable(eo,to){if(!eo||eo.disabled)return!1;var ro=0,no=null;eo&&eo.getAttribute&&(no=eo.getAttribute("tabIndex"),no&&(ro=parseInt(no,10)));var oo=eo.getAttribute?eo.getAttribute(IS_FOCUSABLE_ATTRIBUTE$1):null,io=no!==null&&ro>=0,so=!!eo&&oo!=="false"&&(eo.tagName==="A"||eo.tagName==="BUTTON"||eo.tagName==="INPUT"||eo.tagName==="TEXTAREA"||eo.tagName==="SELECT"||oo==="true"||io);return to?ro!==-1&&so:so}function isElementFocusZone(eo){return!!(eo&&eo.getAttribute&&eo.getAttribute(FOCUSZONE_ID_ATTRIBUTE$1))}function isElementFocusSubZone(eo){return!!(eo&&eo.getAttribute&&eo.getAttribute(FOCUSZONE_SUB_ATTRIBUTE)==="true")}function doesElementContainFocus(eo){var to=getDocument(eo),ro=to&&to.activeElement;return!!(ro&&elementContains(eo,ro))}function shouldWrapFocus(eo,to){return elementContainsAttribute(eo,to)!=="true"}var animationId=void 0;function focusAsync(eo){if(eo){var to=getWindow(eo);to&&(animationId!==void 0&&to.cancelAnimationFrame(animationId),animationId=to.requestAnimationFrame(function(){eo&&eo.focus(),animationId=void 0}))}}function getFocusableByIndexPath(eo,to){for(var ro=eo,no=0,oo=to;no(eo.cacheSize||MAX_CACHE_COUNT)){var po=getWindow();!((lo=po==null?void 0:po.FabricConfig)===null||lo===void 0)&&lo.enableClassNameCacheFullWarning&&(console.warn("Styles are being recalculated too frequently. Cache miss rate is ".concat(ro,"/").concat(no,".")),console.trace()),to.clear(),ro=0,eo.disableCaching=!0}return uo[retVal]};return io}function _traverseEdge(eo,to){return to=_normalizeValue(to),eo.has(to)||eo.set(to,new Map),eo.get(to)}function _traverseMap(eo,to){if(typeof to=="function"){var ro=to.__cachedInputs__;if(ro)for(var no=0,oo=to.__cachedInputs__;no"u"?null:WeakMap;function resetMemoizations(){_resetCounter++}function memoizeFunction(eo,to,ro){if(to===void 0&&(to=100),ro===void 0&&(ro=!1),!_weakMap)return eo;if(!_initializedStylesheetResets$1){var no=Stylesheet$1.getInstance();no&&no.onReset&&Stylesheet$1.getInstance().onReset(resetMemoizations),_initializedStylesheetResets$1=!0}var oo,io=0,so=_resetCounter;return function(){for(var lo=[],uo=0;uo0&&io>to)&&(oo=_createNode(),io=0,so=_resetCounter),co=oo;for(var fo=0;fo=0||lo.indexOf("data-")===0||lo.indexOf("aria-")===0;uo&&(!ro||(ro==null?void 0:ro.indexOf(lo))===-1)&&(oo[lo]=eo[lo])}return oo}function initializeComponentRef(eo){extendComponent(eo,{componentDidMount:_onMount,componentDidUpdate:_onUpdate,componentWillUnmount:_onUnmount})}function _onMount(){_setComponentRef(this.props.componentRef,this)}function _onUpdate(eo){eo.componentRef!==this.props.componentRef&&(_setComponentRef(eo.componentRef,null),_setComponentRef(this.props.componentRef,this))}function _onUnmount(){_setComponentRef(this.props.componentRef,null)}function _setComponentRef(eo,to){eo&&(typeof eo=="object"?eo.current=to:typeof eo=="function"&&eo(to))}var _a$9,DirectionalKeyCodes=(_a$9={},_a$9[KeyCodes$1.up]=1,_a$9[KeyCodes$1.down]=1,_a$9[KeyCodes$1.left]=1,_a$9[KeyCodes$1.right]=1,_a$9[KeyCodes$1.home]=1,_a$9[KeyCodes$1.end]=1,_a$9[KeyCodes$1.tab]=1,_a$9[KeyCodes$1.pageUp]=1,_a$9[KeyCodes$1.pageDown]=1,_a$9);function isDirectionalKeyCode(eo){return!!DirectionalKeyCodes[eo]}var IsFocusVisibleClassName="ms-Fabric--isFocusVisible",IsFocusHiddenClassName="ms-Fabric--isFocusHidden";function updateClassList(eo,to){eo&&(eo.classList.add(to?IsFocusVisibleClassName:IsFocusHiddenClassName),eo.classList.remove(to?IsFocusHiddenClassName:IsFocusVisibleClassName))}function setFocusVisibility(eo,to,ro){var no;ro?ro.forEach(function(oo){return updateClassList(oo.current,eo)}):updateClassList((no=getWindow(to))===null||no===void 0?void 0:no.document.body,eo)}var mountCounters=new WeakMap,callbackMap=new WeakMap;function setMountCounters(eo,to){var ro,no=mountCounters.get(eo);return no?ro=no+to:ro=1,mountCounters.set(eo,ro),ro}function setCallbackMap(eo){var to=callbackMap.get(eo);if(to)return to;var ro=function(so){return _onMouseDown(so,eo.registeredProviders)},no=function(so){return _onPointerDown(so,eo.registeredProviders)},oo=function(so){return _onKeyDown(so,eo.registeredProviders)},io=function(so){return _onKeyUp(so,eo.registeredProviders)};return to={onMouseDown:ro,onPointerDown:no,onKeyDown:oo,onKeyUp:io},callbackMap.set(eo,to),to}var FocusRectsContext=reactExports.createContext(void 0);function useFocusRects(eo){var to=reactExports.useContext(FocusRectsContext);reactExports.useEffect(function(){var ro,no,oo,io,so=getWindow(eo==null?void 0:eo.current);if(!(!so||((ro=so.FabricConfig)===null||ro===void 0?void 0:ro.disableFocusRects)===!0)){var ao=so,lo,uo,co,fo;if(!((no=to==null?void 0:to.providerRef)===null||no===void 0)&&no.current&&(!((io=(oo=to==null?void 0:to.providerRef)===null||oo===void 0?void 0:oo.current)===null||io===void 0)&&io.addEventListener)){ao=to.providerRef.current;var ho=setCallbackMap(to);lo=ho.onMouseDown,uo=ho.onPointerDown,co=ho.onKeyDown,fo=ho.onKeyUp}else lo=_onMouseDown,uo=_onPointerDown,co=_onKeyDown,fo=_onKeyUp;var po=setMountCounters(ao,1);return po<=1&&(ao.addEventListener("mousedown",lo,!0),ao.addEventListener("pointerdown",uo,!0),ao.addEventListener("keydown",co,!0),ao.addEventListener("keyup",fo,!0)),function(){var go;!so||((go=so.FabricConfig)===null||go===void 0?void 0:go.disableFocusRects)===!0||(po=setMountCounters(ao,-1),po===0&&(ao.removeEventListener("mousedown",lo,!0),ao.removeEventListener("pointerdown",uo,!0),ao.removeEventListener("keydown",co,!0),ao.removeEventListener("keyup",fo,!0)))}}},[to,eo])}var FocusRects=function(eo){return useFocusRects(eo.rootRef),null};function _onMouseDown(eo,to){setFocusVisibility(!1,eo.target,to)}function _onPointerDown(eo,to){eo.pointerType!=="mouse"&&setFocusVisibility(!1,eo.target,to)}function _onKeyDown(eo,to){isDirectionalKeyCode(eo.which)&&setFocusVisibility(!0,eo.target,to)}function _onKeyUp(eo,to){isDirectionalKeyCode(eo.which)&&setFocusVisibility(!0,eo.target,to)}var FocusRectsProvider=function(eo){var to=eo.providerRef,ro=eo.layerRoot,no=reactExports.useState([])[0],oo=reactExports.useContext(FocusRectsContext),io=oo!==void 0&&!ro,so=reactExports.useMemo(function(){return io?void 0:{providerRef:to,registeredProviders:no,registerProvider:function(ao){no.push(ao),oo==null||oo.registerProvider(ao)},unregisterProvider:function(ao){oo==null||oo.unregisterProvider(ao);var lo=no.indexOf(ao);lo>=0&&no.splice(lo,1)}}},[to,no,oo,io]);return reactExports.useEffect(function(){if(so)return so.registerProvider(so.providerRef),function(){return so.unregisterProvider(so.providerRef)}},[so]),so?reactExports.createElement(FocusRectsContext.Provider,{value:so},eo.children):reactExports.createElement(reactExports.Fragment,null,eo.children)};function getItem(eo){var to=null;try{var ro=getWindow();to=ro?ro.localStorage.getItem(eo):null}catch{}return to}var _language,STORAGE_KEY="language";function getLanguage(eo){if(eo===void 0&&(eo="sessionStorage"),_language===void 0){var to=getDocument(),ro=eo==="localStorage"?getItem(STORAGE_KEY):eo==="sessionStorage"?getItem$1(STORAGE_KEY):void 0;ro&&(_language=ro),_language===void 0&&to&&(_language=to.documentElement.getAttribute("lang")),_language===void 0&&(_language="en")}return _language}function merge$3(eo){for(var to=[],ro=1;ro-1;eo[no]=io?oo:_merge(eo[no]||{},oo,ro)}else eo[no]=oo}return ro.pop(),eo}var isIOS=function(){return!window||!window.navigator||!window.navigator.userAgent?!1:/iPad|iPhone|iPod/i.test(window.navigator.userAgent)},tagsToIgnore=["TEMPLATE","STYLE","SCRIPT"];function modalize(eo){var to=getDocument(eo);if(!to)return function(){};for(var ro=[];eo!==to.body&&eo.parentElement;){for(var no=0,oo=eo.parentElement.children;no"u"||eo){var ro=getWindow(),no=(to=ro==null?void 0:ro.navigator)===null||to===void 0?void 0:to.userAgent;isMacResult=!!no&&no.indexOf("Macintosh")!==-1}return!!isMacResult}function createComposedRenderFunction(eo){var to=createMemoizer(function(ro){var no=createMemoizer(function(oo){return function(io){return ro(io,oo)}});return function(oo,io){return eo(oo,io?no(io):ro)}});return to}var memoizer=createMemoizer(createComposedRenderFunction);function composeRenderFunction(eo,to){return memoizer(eo)(to)}var DefaultFields=["theme","styles"];function styled(eo,to,ro,no,oo){no=no||{scope:"",fields:void 0};var io=no.scope,so=no.fields,ao=so===void 0?DefaultFields:so,lo=reactExports.forwardRef(function(co,fo){var ho=reactExports.useRef(),po=useCustomizationSettings(ao,io),go=po.styles;po.dir;var vo=__rest$1(po,["styles","dir"]),bo=ro?ro(co):void 0,xo=ho.current&&ho.current.__cachedInputs__||[],_o=co.styles;if(!ho.current||go!==xo[1]||_o!==xo[2]){var Eo=function(So){return concatStyleSetsWithProps(So,to,go,_o)};Eo.__cachedInputs__=[to,go,_o],Eo.__noStyleOverride__=!go&&!_o,ho.current=Eo}return reactExports.createElement(eo,__assign$4({ref:fo},vo,bo,co,{styles:ho.current}))});lo.displayName="Styled".concat(eo.displayName||eo.name);var uo=oo?reactExports.memo(lo):lo;return lo.displayName&&(uo.displayName=lo.displayName),uo}function getPropsWithDefaults(eo,to){for(var ro=__assign$4({},to),no=0,oo=Object.keys(eo);nono?" (+ ".concat(_missingIcons.length-no," more)"):"")),_missingIconsTimer=void 0,_missingIcons=[]},ro)))}function makeSemanticColors(eo,to,ro,no,oo){oo===void 0&&(oo=!1);var io=__assign$4({primaryButtonBorder:"transparent",errorText:no?"#F1707B":"#a4262c",messageText:no?"#F3F2F1":"#323130",messageLink:no?"#6CB8F6":"#005A9E",messageLinkHovered:no?"#82C7FF":"#004578",infoIcon:no?"#C8C6C4":"#605e5c",errorIcon:no?"#F1707B":"#A80000",blockingIcon:no?"#442726":"#FDE7E9",warningIcon:no?"#C8C6C4":"#797775",severeWarningIcon:no?"#FCE100":"#D83B01",successIcon:no?"#92C353":"#107C10",infoBackground:no?"#323130":"#f3f2f1",errorBackground:no?"#442726":"#FDE7E9",blockingBackground:no?"#442726":"#FDE7E9",warningBackground:no?"#433519":"#FFF4CE",severeWarningBackground:no?"#4F2A0F":"#FED9CC",successBackground:no?"#393D1B":"#DFF6DD",warningHighlight:no?"#fff100":"#ffb900",successText:no?"#92c353":"#107C10"},ro),so=getSemanticColors(eo,to,io,no);return _fixDeprecatedSlots(so,oo)}function getSemanticColors(eo,to,ro,no,oo){var io={},so=eo||{},ao=so.white,lo=so.black,uo=so.themePrimary,co=so.themeDark,fo=so.themeDarker,ho=so.themeDarkAlt,po=so.themeLighter,go=so.neutralLight,vo=so.neutralLighter,bo=so.neutralDark,xo=so.neutralQuaternary,_o=so.neutralQuaternaryAlt,Eo=so.neutralPrimary,So=so.neutralSecondary,To=so.neutralSecondaryAlt,wo=so.neutralTertiary,Co=so.neutralTertiaryAlt,Oo=so.neutralLighterAlt,Ao=so.accent;return ao&&(io.bodyBackground=ao,io.bodyFrameBackground=ao,io.accentButtonText=ao,io.buttonBackground=ao,io.primaryButtonText=ao,io.primaryButtonTextHovered=ao,io.primaryButtonTextPressed=ao,io.inputBackground=ao,io.inputForegroundChecked=ao,io.listBackground=ao,io.menuBackground=ao,io.cardStandoutBackground=ao),lo&&(io.bodyTextChecked=lo,io.buttonTextCheckedHovered=lo),uo&&(io.link=uo,io.primaryButtonBackground=uo,io.inputBackgroundChecked=uo,io.inputIcon=uo,io.inputFocusBorderAlt=uo,io.menuIcon=uo,io.menuHeader=uo,io.accentButtonBackground=uo),co&&(io.primaryButtonBackgroundPressed=co,io.inputBackgroundCheckedHovered=co,io.inputIconHovered=co),fo&&(io.linkHovered=fo),ho&&(io.primaryButtonBackgroundHovered=ho),po&&(io.inputPlaceholderBackgroundChecked=po),go&&(io.bodyBackgroundChecked=go,io.bodyFrameDivider=go,io.bodyDivider=go,io.variantBorder=go,io.buttonBackgroundCheckedHovered=go,io.buttonBackgroundPressed=go,io.listItemBackgroundChecked=go,io.listHeaderBackgroundPressed=go,io.menuItemBackgroundPressed=go,io.menuItemBackgroundChecked=go),vo&&(io.bodyBackgroundHovered=vo,io.buttonBackgroundHovered=vo,io.buttonBackgroundDisabled=vo,io.buttonBorderDisabled=vo,io.primaryButtonBackgroundDisabled=vo,io.disabledBackground=vo,io.listItemBackgroundHovered=vo,io.listHeaderBackgroundHovered=vo,io.menuItemBackgroundHovered=vo),xo&&(io.primaryButtonTextDisabled=xo,io.disabledSubtext=xo),_o&&(io.listItemBackgroundCheckedHovered=_o),wo&&(io.disabledBodyText=wo,io.variantBorderHovered=(ro==null?void 0:ro.variantBorderHovered)||wo,io.buttonTextDisabled=wo,io.inputIconDisabled=wo,io.disabledText=wo),Eo&&(io.bodyText=Eo,io.actionLink=Eo,io.buttonText=Eo,io.inputBorderHovered=Eo,io.inputText=Eo,io.listText=Eo,io.menuItemText=Eo),Oo&&(io.bodyStandoutBackground=Oo,io.defaultStateBackground=Oo),bo&&(io.actionLinkHovered=bo,io.buttonTextHovered=bo,io.buttonTextChecked=bo,io.buttonTextPressed=bo,io.inputTextHovered=bo,io.menuItemTextHovered=bo),So&&(io.bodySubtext=So,io.focusBorder=So,io.inputBorder=So,io.smallInputBorder=So,io.inputPlaceholderText=So),To&&(io.buttonBorder=To),Co&&(io.disabledBodySubtext=Co,io.disabledBorder=Co,io.buttonBackgroundChecked=Co,io.menuDivider=Co),Ao&&(io.accentButtonBackground=Ao),to!=null&&to.elevation4&&(io.cardShadow=to.elevation4),!no&&(to!=null&&to.elevation8)?io.cardShadowHovered=to.elevation8:io.variantBorderHovered&&(io.cardShadowHovered="0 0 1px "+io.variantBorderHovered),io=__assign$4(__assign$4({},io),ro),io}function _fixDeprecatedSlots(eo,to){var ro="";return to===!0&&(ro=" /* @deprecated */"),eo.listTextColor=eo.listText+ro,eo.menuItemBackgroundChecked+=ro,eo.warningHighlight+=ro,eo.warningText=eo.messageText+ro,eo.successText+=ro,eo}function mergeThemes(eo,to){var ro,no,oo;to===void 0&&(to={});var io=merge$3({},eo,to,{semanticColors:getSemanticColors(to.palette,to.effects,to.semanticColors,to.isInverted===void 0?eo.isInverted:to.isInverted)});if(!((ro=to.palette)===null||ro===void 0)&&ro.themePrimary&&!(!((no=to.palette)===null||no===void 0)&&no.accent)&&(io.palette.accent=to.palette.themePrimary),to.defaultFontStyle)for(var so=0,ao=Object.keys(io.fonts);so"u"?global:window,_styleNonce=_root&&_root.CSPSettings&&_root.CSPSettings.nonce,_themeState=initializeThemeState();function initializeThemeState(){var eo=_root.__themeState__||{theme:void 0,lastStyleElement:void 0,registeredStyles:[]};return eo.runState||(eo=__assign$3(__assign$3({},eo),{perf:{count:0,duration:0},runState:{flushTimer:0,mode:0,buffer:[]}})),eo.registeredThemableStyles||(eo=__assign$3(__assign$3({},eo),{registeredThemableStyles:[]})),_root.__themeState__=eo,eo}function applyThemableStyles(eo,to){_themeState.loadStyles?_themeState.loadStyles(resolveThemableArray(eo).styleString,eo):registerStyles$1(eo)}function loadTheme$1(eo){_themeState.theme=eo,reloadStyles()}function clearStyles(eo){eo===void 0&&(eo=3),(eo===3||eo===2)&&(clearStylesInternal(_themeState.registeredStyles),_themeState.registeredStyles=[]),(eo===3||eo===1)&&(clearStylesInternal(_themeState.registeredThemableStyles),_themeState.registeredThemableStyles=[])}function clearStylesInternal(eo){eo.forEach(function(to){var ro=to&&to.styleElement;ro&&ro.parentElement&&ro.parentElement.removeChild(ro)})}function reloadStyles(){if(_themeState.theme){for(var eo=[],to=0,ro=_themeState.registeredThemableStyles;to0&&(clearStyles(1),applyThemableStyles([].concat.apply([],eo)))}}function resolveThemableArray(eo){var to=_themeState.theme,ro=!1,no=(eo||[]).map(function(oo){var io=oo.theme;if(io){ro=!0;var so=to?to[io]:void 0,ao=oo.defaultValue||"inherit";return to&&!so&&console&&!(io in to)&&typeof DEBUG<"u"&&DEBUG&&console.warn('Theming value not provided for "'.concat(io,'". Falling back to "').concat(ao,'".')),so||ao}else return oo.rawString});return{styleString:no.join(""),themable:ro}}function registerStyles$1(eo){if(!(typeof document>"u")){var to=document.getElementsByTagName("head")[0],ro=document.createElement("style"),no=resolveThemableArray(eo),oo=no.styleString,io=no.themable;ro.setAttribute("data-load-themed-styles","true"),_styleNonce&&ro.setAttribute("nonce",_styleNonce),ro.appendChild(document.createTextNode(oo)),_themeState.perf.count++,to.appendChild(ro);var so=document.createEvent("HTMLEvents");so.initEvent("styleinsert",!0,!1),so.args={newStyle:ro},document.dispatchEvent(so);var ao={styleElement:ro,themableStyle:eo};io?_themeState.registeredThemableStyles.push(ao):_themeState.registeredStyles.push(ao)}}var _theme=createTheme$1({}),_onThemeChangeCallbacks=[],ThemeSettingName="theme";function initializeThemeInCustomizations(){var eo,to,ro,no=getWindow();!((to=no==null?void 0:no.FabricConfig)===null||to===void 0)&&to.legacyTheme?loadTheme(no.FabricConfig.legacyTheme):Customizations.getSettings([ThemeSettingName]).theme||(!((ro=no==null?void 0:no.FabricConfig)===null||ro===void 0)&&ro.theme&&(_theme=createTheme$1(no.FabricConfig.theme)),Customizations.applySettings((eo={},eo[ThemeSettingName]=_theme,eo)))}initializeThemeInCustomizations();function getTheme(eo){return eo===void 0&&(eo=!1),eo===!0&&(_theme=createTheme$1({},eo)),_theme}function loadTheme(eo,to){var ro;return to===void 0&&(to=!1),_theme=createTheme$1(eo,to),loadTheme$1(__assign$4(__assign$4(__assign$4(__assign$4({},_theme.palette),_theme.semanticColors),_theme.effects),_loadFonts(_theme))),Customizations.applySettings((ro={},ro[ThemeSettingName]=_theme,ro)),_onThemeChangeCallbacks.forEach(function(no){try{no(_theme)}catch{}}),_theme}function _loadFonts(eo){for(var to={},ro=0,no=Object.keys(eo.fonts);roto.bottom||eo.leftto.right)}function _getOutOfBoundsEdges(eo,to){var ro=[];return eo.topto.bottom&&ro.push(RectangleEdge.bottom),eo.leftto.right&&ro.push(RectangleEdge.right),ro}function _getEdgeValue(eo,to){return eo[RectangleEdge[to]]}function _setEdgeValue(eo,to,ro){return eo[RectangleEdge[to]]=ro,eo}function _getCenterValue(eo,to){var ro=_getFlankingEdges(to);return(_getEdgeValue(eo,ro.positiveEdge)+_getEdgeValue(eo,ro.negativeEdge))/2}function _getRelativeEdgeValue(eo,to){return eo>0?to:to*-1}function _getRelativeRectEdgeValue(eo,to){return _getRelativeEdgeValue(eo,_getEdgeValue(to,eo))}function _getRelativeEdgeDifference(eo,to,ro){var no=_getEdgeValue(eo,ro)-_getEdgeValue(to,ro);return _getRelativeEdgeValue(ro,no)}function _moveEdge(eo,to,ro,no){no===void 0&&(no=!0);var oo=_getEdgeValue(eo,to)-ro,io=_setEdgeValue(eo,to,ro);return no&&(io=_setEdgeValue(eo,to*-1,_getEdgeValue(eo,to*-1)-oo)),io}function _alignEdges(eo,to,ro,no){return no===void 0&&(no=0),_moveEdge(eo,ro,_getEdgeValue(to,ro)+_getRelativeEdgeValue(ro,no))}function _alignOppositeEdges(eo,to,ro,no){no===void 0&&(no=0);var oo=ro*-1,io=_getRelativeEdgeValue(oo,no);return _moveEdge(eo,ro*-1,_getEdgeValue(to,ro)+io)}function _isEdgeInBounds(eo,to,ro){var no=_getRelativeRectEdgeValue(ro,eo);return no>_getRelativeRectEdgeValue(ro,to)}function _getOutOfBoundsDegree(eo,to){for(var ro=_getOutOfBoundsEdges(eo,to),no=0,oo=0,io=ro;oo=no}function _flipToFit(eo,to,ro,no,oo,io,so){oo===void 0&&(oo=!1),so===void 0&&(so=0);var ao=[RectangleEdge.left,RectangleEdge.right,RectangleEdge.bottom,RectangleEdge.top];getRTL$1()&&(ao[0]*=-1,ao[1]*=-1);for(var lo=eo,uo=no.targetEdge,co=no.alignmentEdge,fo,ho=uo,po=co,go=0;go<4;go++){if(_isEdgeInBounds(lo,ro,uo))return{elementRectangle:lo,targetEdge:uo,alignmentEdge:co};if(oo&&_canScrollResizeToFitEdge(to,ro,uo,io)){switch(uo){case RectangleEdge.bottom:lo.bottom=ro.bottom;break;case RectangleEdge.top:lo.top=ro.top;break}return{elementRectangle:lo,targetEdge:uo,alignmentEdge:co,forcedInBounds:!0}}else{var vo=_getOutOfBoundsDegree(lo,ro);(!fo||vo0&&(ao.indexOf(uo*-1)>-1?uo=uo*-1:(co=uo,uo=ao.slice(-1)[0]),lo=_estimatePosition(eo,to,{targetEdge:uo,alignmentEdge:co},so))}}return lo=_estimatePosition(eo,to,{targetEdge:ho,alignmentEdge:po},so),{elementRectangle:lo,targetEdge:ho,alignmentEdge:po}}function _flipAlignmentEdge(eo,to,ro,no){var oo=eo.alignmentEdge,io=eo.targetEdge,so=eo.elementRectangle,ao=oo*-1,lo=_estimatePosition(so,to,{targetEdge:io,alignmentEdge:ao},ro,no);return{elementRectangle:lo,targetEdge:io,alignmentEdge:ao}}function _adjustFitWithinBounds(eo,to,ro,no,oo,io,so,ao,lo){oo===void 0&&(oo=!1),so===void 0&&(so=0);var uo=no.alignmentEdge,co=no.alignTargetEdge,fo={elementRectangle:eo,targetEdge:no.targetEdge,alignmentEdge:uo};!ao&&!lo&&(fo=_flipToFit(eo,to,ro,no,oo,io,so));var ho=_getOutOfBoundsEdges(fo.elementRectangle,ro),po=ao?-fo.targetEdge:void 0;if(ho.length>0)if(co)if(fo.alignmentEdge&&ho.indexOf(fo.alignmentEdge*-1)>-1){var go=_flipAlignmentEdge(fo,to,so,lo);if(_isRectangleWithinBounds(go.elementRectangle,ro))return go;fo=_alignOutOfBoundsEdges(_getOutOfBoundsEdges(go.elementRectangle,ro),fo,ro,po)}else fo=_alignOutOfBoundsEdges(ho,fo,ro,po);else fo=_alignOutOfBoundsEdges(ho,fo,ro,po);return fo}function _alignOutOfBoundsEdges(eo,to,ro,no){for(var oo=0,io=eo;ooMath.abs(_getRelativeEdgeDifference(eo,ro,to*-1))?to*-1:to}function _isEdgeOnBounds(eo,to,ro){return ro!==void 0&&_getEdgeValue(eo,to)===_getEdgeValue(ro,to)}function _finalizeElementPosition(eo,to,ro,no,oo,io,so,ao){var lo={},uo=_getRectangleFromElement(to),co=io?ro:ro*-1,fo=oo||_getFlankingEdges(ro).positiveEdge;return(!so||_isEdgeOnBounds(eo,getOppositeEdge(fo),no))&&(fo=_finalizeReturnEdge(eo,fo,no)),lo[RectangleEdge[co]]=_getRelativeEdgeDifference(eo,uo,co),lo[RectangleEdge[fo]]=_getRelativeEdgeDifference(eo,uo,fo),ao&&(lo[RectangleEdge[co*-1]]=_getRelativeEdgeDifference(eo,uo,co*-1),lo[RectangleEdge[fo*-1]]=_getRelativeEdgeDifference(eo,uo,fo*-1)),lo}function _calculateActualBeakWidthInPixels(eo){return Math.sqrt(eo*eo*2)}function _getPositionData(eo,to,ro){if(eo===void 0&&(eo=DirectionalHint.bottomAutoEdge),ro)return{alignmentEdge:ro.alignmentEdge,isAuto:ro.isAuto,targetEdge:ro.targetEdge};var no=__assign$4({},DirectionalDictionary[eo]);return getRTL$1()?(no.alignmentEdge&&no.alignmentEdge%2===0&&(no.alignmentEdge=no.alignmentEdge*-1),to!==void 0?DirectionalDictionary[to]:no):no}function _getAlignmentData(eo,to,ro,no,oo){return eo.isAuto&&(eo.alignmentEdge=getClosestEdge(eo.targetEdge,to,ro)),eo.alignTargetEdge=oo,eo}function getClosestEdge(eo,to,ro){var no=_getCenterValue(to,eo),oo=_getCenterValue(ro,eo),io=_getFlankingEdges(eo),so=io.positiveEdge,ao=io.negativeEdge;return no<=oo?so:ao}function _positionElementWithinBounds(eo,to,ro,no,oo,io,so,ao,lo){io===void 0&&(io=!1);var uo=_estimatePosition(eo,to,no,oo,lo);return _isRectangleWithinBounds(uo,ro)?{elementRectangle:uo,targetEdge:no.targetEdge,alignmentEdge:no.alignmentEdge}:_adjustFitWithinBounds(uo,to,ro,no,io,so,oo,ao,lo)}function _finalizeBeakPosition(eo,to,ro){var no=eo.targetEdge*-1,oo=new Rectangle(0,eo.elementRectangle.width,0,eo.elementRectangle.height),io={},so=_finalizeReturnEdge(eo.elementRectangle,eo.alignmentEdge?eo.alignmentEdge:_getFlankingEdges(no).positiveEdge,ro),ao=_getRelativeEdgeDifference(eo.elementRectangle,eo.targetRectangle,no),lo=ao>Math.abs(_getEdgeValue(to,no));return io[RectangleEdge[no]]=_getEdgeValue(to,no),io[RectangleEdge[so]]=_getRelativeEdgeDifference(to,oo,so),{elementPosition:__assign$4({},io),closestEdge:getClosestEdge(eo.targetEdge,to,oo),targetEdge:no,hideBeak:!lo}}function _positionBeak(eo,to){var ro=to.targetRectangle,no=_getFlankingEdges(to.targetEdge),oo=no.positiveEdge,io=no.negativeEdge,so=_getCenterValue(ro,to.targetEdge),ao=new Rectangle(eo/2,to.elementRectangle.width-eo/2,eo/2,to.elementRectangle.height-eo/2),lo=new Rectangle(0,eo,0,eo);return lo=_moveEdge(lo,to.targetEdge*-1,-eo/2),lo=_centerEdgeToPoint(lo,to.targetEdge*-1,so-_getRelativeRectEdgeValue(oo,to.elementRectangle)),_isEdgeInBounds(lo,ao,oo)?_isEdgeInBounds(lo,ao,io)||(lo=_alignEdges(lo,ao,io)):lo=_alignEdges(lo,ao,oo),lo}function _getRectangleFromElement(eo){var to=eo.getBoundingClientRect();return new Rectangle(to.left,to.right,to.top,to.bottom)}function _getRectangleFromIRect(eo){return new Rectangle(eo.left,eo.right,eo.top,eo.bottom)}function _getTargetRect(eo,to){var ro;if(to){if(to.preventDefault){var no=to;ro=new Rectangle(no.clientX,no.clientX,no.clientY,no.clientY)}else if(to.getBoundingClientRect)ro=_getRectangleFromElement(to);else{var oo=to,io=oo.left||oo.x,so=oo.top||oo.y,ao=oo.right||io,lo=oo.bottom||so;ro=new Rectangle(io,ao,so,lo)}if(!_isRectangleWithinBounds(ro,eo))for(var uo=_getOutOfBoundsEdges(ro,eo),co=0,fo=uo;co=no&&oo&&uo.top<=oo&&uo.bottom>=oo&&(so={top:uo.top,left:uo.left,right:uo.right,bottom:uo.bottom,width:uo.width,height:uo.height})}return so}function getBoundsFromTargetWindow(eo,to){return _getBoundsFromTargetWindow(eo,to)}function calculateGapSpace(eo,to,ro){return _calculateGapSpace(eo,to,ro)}function getRectangleFromTarget(eo){return _getRectangleFromTarget(eo)}function useAsync(){var eo=reactExports.useRef();return eo.current||(eo.current=new Async),reactExports.useEffect(function(){return function(){var to;(to=eo.current)===null||to===void 0||to.dispose(),eo.current=void 0}},[]),eo.current}function useConst$1(eo){var to=reactExports.useRef();return to.current===void 0&&(to.current={value:typeof eo=="function"?eo():eo}),to.current.value}function useBoolean(eo){var to=reactExports.useState(eo),ro=to[0],no=to[1],oo=useConst$1(function(){return function(){no(!0)}}),io=useConst$1(function(){return function(){no(!1)}}),so=useConst$1(function(){return function(){no(function(ao){return!ao})}});return[ro,{setTrue:oo,setFalse:io,toggle:so}]}function useEventCallback$2(eo){var to=reactExports.useRef(function(){throw new Error("Cannot call an event handler while rendering")});return useIsomorphicLayoutEffect(function(){to.current=eo},[eo]),useConst$1(function(){return function(){for(var ro=[],no=0;no0&&uo>lo&&(ao=uo-lo>1)}oo!==ao&&io(ao)}}),function(){return ro.dispose()}}),oo}function defaultFocusRestorer(eo){var to=eo.originalElement,ro=eo.containsFocus;to&&ro&&to!==getWindow()&&setTimeout(function(){var no;(no=to.focus)===null||no===void 0||no.call(to)},0)}function useRestoreFocus(eo,to){var ro=eo.onRestoreFocus,no=ro===void 0?defaultFocusRestorer:ro,oo=reactExports.useRef(),io=reactExports.useRef(!1);reactExports.useEffect(function(){return oo.current=getDocument().activeElement,doesElementContainFocus(to.current)&&(io.current=!0),function(){var so;no==null||no({originalElement:oo.current,containsFocus:io.current,documentContainsFocus:((so=getDocument())===null||so===void 0?void 0:so.hasFocus())||!1}),oo.current=void 0}},[]),useOnEvent(to,"focus",reactExports.useCallback(function(){io.current=!0},[]),!0),useOnEvent(to,"blur",reactExports.useCallback(function(so){to.current&&so.relatedTarget&&!to.current.contains(so.relatedTarget)&&(io.current=!1)},[]),!0)}function useHideSiblingNodes(eo,to){var ro=String(eo["aria-modal"]).toLowerCase()==="true"&&eo.enableAriaHiddenSiblings;reactExports.useEffect(function(){if(ro&&to.current){var no=modalize(to.current);return no}},[to,ro])}var Popup=reactExports.forwardRef(function(eo,to){var ro=getPropsWithDefaults({shouldRestoreFocus:!0,enableAriaHiddenSiblings:!0},eo),no=reactExports.useRef(),oo=useMergedRefs(no,to);useHideSiblingNodes(ro,no),useRestoreFocus(ro,no);var io=ro.role,so=ro.className,ao=ro.ariaLabel,lo=ro.ariaLabelledBy,uo=ro.ariaDescribedBy,co=ro.style,fo=ro.children,ho=ro.onDismiss,po=useScrollbarAsync(ro,no),go=reactExports.useCallback(function(bo){switch(bo.which){case KeyCodes$1.escape:ho&&(ho(bo),bo.preventDefault(),bo.stopPropagation());break}},[ho]),vo=useWindow();return useOnEvent(vo,"keydown",go),reactExports.createElement("div",__assign$4({ref:oo},getNativeProps(ro,divProperties),{className:so,role:io,"aria-label":ao,"aria-labelledby":lo,"aria-describedby":uo,onKeyDown:go,style:__assign$4({overflowY:po?"scroll":void 0,outline:"none"},co)}),fo)});Popup.displayName="Popup";var _a$7,COMPONENT_NAME$2="CalloutContentBase",ANIMATIONS=(_a$7={},_a$7[RectangleEdge.top]=AnimationClassNames.slideUpIn10,_a$7[RectangleEdge.bottom]=AnimationClassNames.slideDownIn10,_a$7[RectangleEdge.left]=AnimationClassNames.slideLeftIn10,_a$7[RectangleEdge.right]=AnimationClassNames.slideRightIn10,_a$7),BEAK_ORIGIN_POSITION={top:0,left:0},OFF_SCREEN_STYLE={opacity:0,filter:"opacity(0)",pointerEvents:"none"},ARIA_ROLE_ATTRIBUTES=["role","aria-roledescription"],DEFAULT_PROPS$3={preventDismissOnLostFocus:!1,preventDismissOnScroll:!1,preventDismissOnResize:!1,isBeakVisible:!0,beakWidth:16,gapSpace:0,minPagePadding:8,directionalHint:DirectionalHint.bottomAutoEdge},getClassNames$9=classNamesFunction({disableCaching:!0});function useBounds(eo,to,ro){var no=eo.bounds,oo=eo.minPagePadding,io=oo===void 0?DEFAULT_PROPS$3.minPagePadding:oo,so=eo.target,ao=reactExports.useState(!1),lo=ao[0],uo=ao[1],co=reactExports.useRef(),fo=reactExports.useCallback(function(){if(!co.current||lo){var po=typeof no=="function"?ro?no(so,ro):void 0:no;!po&&ro&&(po=getBoundsFromTargetWindow(to.current,ro),po={top:po.top+io,left:po.left+io,right:po.right-io,bottom:po.bottom-io,width:po.width-io*2,height:po.height-io*2}),co.current=po,lo&&uo(!1)}return co.current},[no,io,so,to,ro,lo]),ho=useAsync();return useOnEvent(ro,"resize",ho.debounce(function(){uo(!0)},500,{leading:!0})),fo}function useMaxHeight(eo,to,ro,no){var oo,io=eo.calloutMaxHeight,so=eo.finalHeight,ao=eo.directionalHint,lo=eo.directionalHintFixed,uo=eo.hidden,co=eo.gapSpace,fo=eo.beakWidth,ho=eo.isBeakVisible,po=reactExports.useState(),go=po[0],vo=po[1],bo=(oo=no==null?void 0:no.elementPosition)!==null&&oo!==void 0?oo:{},xo=bo.top,_o=bo.bottom,Eo=ro!=null&&ro.current?getRectangleFromTarget(ro.current):void 0;return reactExports.useEffect(function(){var So,To=(So=to())!==null&&So!==void 0?So:{},wo=To.top,Co=To.bottom,Oo;(no==null?void 0:no.targetEdge)===RectangleEdge.top&&(Eo!=null&&Eo.top)&&(Co=Eo.top-calculateGapSpace(ho,fo,co)),typeof xo=="number"&&Co?Oo=Co-xo:typeof _o=="number"&&typeof wo=="number"&&Co&&(Oo=Co-wo-_o),!io&&!uo||io&&Oo&&io>Oo?vo(Oo):vo(io||void 0)},[_o,io,so,ao,lo,to,uo,no,xo,co,fo,ho,Eo]),go}function usePositions(eo,to,ro,no,oo,io){var so=reactExports.useState(),ao=so[0],lo=so[1],uo=reactExports.useRef(0),co=reactExports.useRef(),fo=useAsync(),ho=eo.hidden,po=eo.target,go=eo.finalHeight,vo=eo.calloutMaxHeight,bo=eo.onPositioned,xo=eo.directionalHint,_o=eo.hideOverflow,Eo=eo.preferScrollResizePositioning,So=useWindow(),To=reactExports.useRef(),wo;To.current!==io.current&&(To.current=io.current,wo=io.current?So==null?void 0:So.getComputedStyle(io.current):void 0);var Co=wo==null?void 0:wo.overflowY;return reactExports.useEffect(function(){if(ho)lo(void 0),uo.current=0;else{var Oo=fo.requestAnimationFrame(function(){var Ao,Ro;if(to.current&&ro){var No=__assign$4(__assign$4({},eo),{target:no.current,bounds:oo()}),Mo=ro.cloneNode(!0);Mo.style.maxHeight=vo?"".concat(vo):"",Mo.style.visibility="hidden",(Ao=ro.parentElement)===null||Ao===void 0||Ao.appendChild(Mo);var Do=co.current===po?ao:void 0,jo=_o||Co==="clip"||Co==="hidden",Fo=Eo&&!jo,$o=go?positionCard(No,to.current,Mo,Do):positionCallout(No,to.current,Mo,Do,Fo);(Ro=ro.parentElement)===null||Ro===void 0||Ro.removeChild(Mo),!ao&&$o||ao&&$o&&!arePositionsEqual(ao,$o)&&uo.current<5?(uo.current++,lo($o)):uo.current>0&&(uo.current=0,bo==null||bo(ao))}},ro);return co.current=po,function(){fo.cancelAnimationFrame(Oo),co.current=void 0}}},[ho,xo,fo,ro,vo,to,no,go,oo,bo,ao,eo,po,_o,Eo,Co]),ao}function useAutoFocus(eo,to,ro){var no=eo.hidden,oo=eo.setInitialFocus,io=useAsync(),so=!!to;reactExports.useEffect(function(){if(!no&&oo&&so&&ro){var ao=io.requestAnimationFrame(function(){return focusFirstChild(ro)},ro);return function(){return io.cancelAnimationFrame(ao)}}},[no,so,io,ro,oo])}function useDismissHandlers(eo,to,ro,no,oo){var io=eo.hidden,so=eo.onDismiss,ao=eo.preventDismissOnScroll,lo=eo.preventDismissOnResize,uo=eo.preventDismissOnLostFocus,co=eo.dismissOnTargetClick,fo=eo.shouldDismissOnWindowFocus,ho=eo.preventDismissOnEvent,po=reactExports.useRef(!1),go=useAsync(),vo=useConst$1([function(){po.current=!0},function(){po.current=!1}]),bo=!!to;return reactExports.useEffect(function(){var xo=function(Co){bo&&!ao&&So(Co)},_o=function(Co){!lo&&!(ho&&ho(Co))&&(so==null||so(Co))},Eo=function(Co){uo||So(Co)},So=function(Co){var Oo=Co.composedPath?Co.composedPath():[],Ao=Oo.length>0?Oo[0]:Co.target,Ro=ro.current&&!elementContains(ro.current,Ao);if(Ro&&po.current){po.current=!1;return}if(!no.current&&Ro||Co.target!==oo&&Ro&&(!no.current||"stopPropagation"in no.current||co||Ao!==no.current&&!elementContains(no.current,Ao))){if(ho&&ho(Co))return;so==null||so(Co)}},To=function(Co){fo&&(ho&&!ho(Co)||!ho&&!uo)&&!(oo!=null&&oo.document.hasFocus())&&Co.relatedTarget===null&&(so==null||so(Co))},wo=new Promise(function(Co){go.setTimeout(function(){if(!io&&oo){var Oo=[on$1(oo,"scroll",xo,!0),on$1(oo,"resize",_o,!0),on$1(oo.document.documentElement,"focus",Eo,!0),on$1(oo.document.documentElement,"click",Eo,!0),on$1(oo,"blur",To,!0)];Co(function(){Oo.forEach(function(Ao){return Ao()})})}},0)});return function(){wo.then(function(Co){return Co()})}},[io,go,ro,no,oo,so,fo,co,uo,lo,ao,bo,ho]),vo}var CalloutContentBase=reactExports.memo(reactExports.forwardRef(function(eo,to){var ro=getPropsWithDefaults(DEFAULT_PROPS$3,eo),no=ro.styles,oo=ro.style,io=ro.ariaLabel,so=ro.ariaDescribedBy,ao=ro.ariaLabelledBy,lo=ro.className,uo=ro.isBeakVisible,co=ro.children,fo=ro.beakWidth,ho=ro.calloutWidth,po=ro.calloutMaxWidth,go=ro.calloutMinWidth,vo=ro.doNotLayer,bo=ro.finalHeight,xo=ro.hideOverflow,_o=xo===void 0?!!bo:xo,Eo=ro.backgroundColor,So=ro.calloutMaxHeight,To=ro.onScroll,wo=ro.shouldRestoreFocus,Co=wo===void 0?!0:wo,Oo=ro.target,Ao=ro.hidden,Ro=ro.onLayerMounted,No=ro.popupProps,Mo=reactExports.useRef(null),Do=reactExports.useRef(null),jo=useMergedRefs(Do,No==null?void 0:No.ref),Fo=reactExports.useState(null),$o=Fo[0],Lo=Fo[1],Ho=reactExports.useCallback(function(Xs){Lo(Xs)},[]),qo=useMergedRefs(Mo,to),Uo=useTarget(ro.target,{current:$o}),Yo=Uo[0],Zo=Uo[1],_s=useBounds(ro,Yo,Zo),Ss=usePositions(ro,Mo,$o,Yo,_s,jo),As=useMaxHeight(ro,_s,Yo,Ss),Ns=useDismissHandlers(ro,Ss,Mo,Yo,Zo),ws=Ns[0],Ds=Ns[1],Jo=(Ss==null?void 0:Ss.elementPosition.top)&&(Ss==null?void 0:Ss.elementPosition.bottom),Cs=__assign$4(__assign$4({},Ss==null?void 0:Ss.elementPosition),{maxHeight:As});if(Jo&&(Cs.bottom=void 0),useAutoFocus(ro,Ss,$o),reactExports.useEffect(function(){Ao||Ro==null||Ro()},[Ao]),!Zo)return null;var Bs=_o,zs=uo&&!!Oo,Ls=getClassNames$9(no,{theme:ro.theme,className:lo,overflowYHidden:Bs,calloutWidth:ho,positions:Ss,beakWidth:fo,backgroundColor:Eo,calloutMaxWidth:po,calloutMinWidth:go,doNotLayer:vo}),ga=__assign$4(__assign$4({maxHeight:So||"100%"},oo),Bs&&{overflowY:"hidden"}),Js=ro.hidden?{visibility:"hidden"}:void 0;return reactExports.createElement("div",{ref:qo,className:Ls.container,style:Js},reactExports.createElement("div",__assign$4({},getNativeProps(ro,divProperties,ARIA_ROLE_ATTRIBUTES),{className:css$3(Ls.root,Ss&&Ss.targetEdge&&ANIMATIONS[Ss.targetEdge]),style:Ss?__assign$4({},Cs):OFF_SCREEN_STYLE,tabIndex:-1,ref:Ho}),zs&&reactExports.createElement("div",{className:Ls.beak,style:getBeakPosition(Ss)}),zs&&reactExports.createElement("div",{className:Ls.beakCurtain}),reactExports.createElement(Popup,__assign$4({role:ro.role,"aria-roledescription":ro["aria-roledescription"],ariaDescribedBy:so,ariaLabel:io,ariaLabelledBy:ao,className:Ls.calloutMain,onDismiss:ro.onDismiss,onMouseDown:ws,onMouseUp:Ds,onRestoreFocus:ro.onRestoreFocus,onScroll:To,shouldRestoreFocus:Co,style:ga},No,{ref:jo}),co)))}),function(eo,to){return!to.shouldUpdateWhenHidden&&eo.hidden&&to.hidden?!0:shallowCompare(eo,to)});function getBeakPosition(eo){var to,ro,no=__assign$4(__assign$4({},(to=eo==null?void 0:eo.beakPosition)===null||to===void 0?void 0:to.elementPosition),{display:!((ro=eo==null?void 0:eo.beakPosition)===null||ro===void 0)&&ro.hideBeak?"none":void 0});return!no.top&&!no.bottom&&!no.left&&!no.right&&(no.left=BEAK_ORIGIN_POSITION.left,no.top=BEAK_ORIGIN_POSITION.top),no}function arePositionsEqual(eo,to){return comparePositions(eo.elementPosition,to.elementPosition)&&comparePositions(eo.beakPosition.elementPosition,to.beakPosition.elementPosition)}function comparePositions(eo,to){for(var ro in to)if(to.hasOwnProperty(ro)){var no=eo[ro],oo=to[ro];if(no!==void 0&&oo!==void 0){if(no.toFixed(2)!==oo.toFixed(2))return!1}else return!1}return!0}CalloutContentBase.displayName=COMPONENT_NAME$2;function getBeakStyle(eo){return{height:eo,width:eo}}var GlobalClassNames$8={container:"ms-Callout-container",root:"ms-Callout",beak:"ms-Callout-beak",beakCurtain:"ms-Callout-beakCurtain",calloutMain:"ms-Callout-main"},getStyles$9=function(eo){var to,ro=eo.theme,no=eo.className,oo=eo.overflowYHidden,io=eo.calloutWidth,so=eo.beakWidth,ao=eo.backgroundColor,lo=eo.calloutMaxWidth,uo=eo.calloutMinWidth,co=eo.doNotLayer,fo=getGlobalClassNames(GlobalClassNames$8,ro),ho=ro.semanticColors,po=ro.effects;return{container:[fo.container,{position:"relative"}],root:[fo.root,ro.fonts.medium,{position:"absolute",display:"flex",zIndex:co?ZIndexes.Layer:void 0,boxSizing:"border-box",borderRadius:po.roundedCorner2,boxShadow:po.elevation16,selectors:(to={},to[HighContrastSelector]={borderWidth:1,borderStyle:"solid",borderColor:"WindowText"},to)},focusClear(),no,!!io&&{width:io},!!lo&&{maxWidth:lo},!!uo&&{minWidth:uo}],beak:[fo.beak,{position:"absolute",backgroundColor:ho.menuBackground,boxShadow:"inherit",border:"inherit",boxSizing:"border-box",transform:"rotate(45deg)"},getBeakStyle(so),ao&&{backgroundColor:ao}],beakCurtain:[fo.beakCurtain,{position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:ho.menuBackground,borderRadius:po.roundedCorner2}],calloutMain:[fo.calloutMain,{backgroundColor:ho.menuBackground,overflowX:"hidden",overflowY:"auto",position:"relative",width:"100%",borderRadius:po.roundedCorner2},oo&&{overflowY:"hidden"},ao&&{backgroundColor:ao}]}},CalloutContent=styled(CalloutContentBase,getStyles$9,void 0,{scope:"CalloutContent"});const PortalCompatContext=reactExports.createContext(void 0),portalCompatContextDefaultValue=()=>()=>{};PortalCompatContext.Provider;function usePortalCompat(){var eo;return(eo=reactExports.useContext(PortalCompatContext))!==null&&eo!==void 0?eo:portalCompatContextDefaultValue}var getClassNames$8=classNamesFunction(),getFabricTheme=memoizeFunction(function(eo,to){return createTheme$1(__assign$4(__assign$4({},eo),{rtl:to}))}),getDir=function(eo){var to=eo.theme,ro=eo.dir,no=getRTL$1(to)?"rtl":"ltr",oo=getRTL$1()?"rtl":"ltr",io=ro||no;return{rootDir:io!==no||io!==oo?io:ro,needsTheme:io!==no}},FabricBase=reactExports.forwardRef(function(eo,to){var ro=eo.className,no=eo.theme,oo=eo.applyTheme,io=eo.applyThemeToBody,so=eo.styles,ao=getClassNames$8(so,{theme:no,applyTheme:oo,className:ro}),lo=reactExports.useRef(null);return useApplyThemeToBody(io,ao,lo),reactExports.createElement(reactExports.Fragment,null,useRenderedContent(eo,ao,lo,to))});FabricBase.displayName="FabricBase";function useRenderedContent(eo,to,ro,no){var oo=to.root,io=eo.as,so=io===void 0?"div":io,ao=eo.dir,lo=eo.theme,uo=getNativeProps(eo,divProperties,["dir"]),co=getDir(eo),fo=co.rootDir,ho=co.needsTheme,po=reactExports.createElement(FocusRectsProvider,{providerRef:ro},reactExports.createElement(so,__assign$4({dir:fo},uo,{className:oo,ref:useMergedRefs(ro,no)})));return ho&&(po=reactExports.createElement(Customizer,{settings:{theme:getFabricTheme(lo,ao==="rtl")}},po)),po}function useApplyThemeToBody(eo,to,ro){var no=to.bodyThemed;return reactExports.useEffect(function(){if(eo){var oo=getDocument(ro.current);if(oo)return oo.body.classList.add(no),function(){oo.body.classList.remove(no)}}},[no,eo,ro]),ro}var inheritFont={fontFamily:"inherit"},GlobalClassNames$7={root:"ms-Fabric",bodyThemed:"ms-Fabric-bodyThemed"},getStyles$8=function(eo){var to=eo.applyTheme,ro=eo.className,no=eo.preventBlanketFontInheritance,oo=eo.theme,io=getGlobalClassNames(GlobalClassNames$7,oo);return{root:[io.root,oo.fonts.medium,{color:oo.palette.neutralPrimary},!no&&{"& button":inheritFont,"& input":inheritFont,"& textarea":inheritFont},to&&{color:oo.semanticColors.bodyText,backgroundColor:oo.semanticColors.bodyBackground},ro],bodyThemed:[{backgroundColor:oo.semanticColors.bodyBackground}]}},Fabric=styled(FabricBase,getStyles$8,void 0,{scope:"Fabric"}),_layersByHostId={},_layerHostsById={},defaultHostId="fluent-default-layer-host",_defaultHostSelector="#".concat(defaultHostId);function registerLayer(eo,to){_layersByHostId[eo]||(_layersByHostId[eo]=[]),_layersByHostId[eo].push(to);var ro=_layerHostsById[eo];if(ro)for(var no=0,oo=ro;no=0&&(ro.splice(no,1),ro.length===0&&delete _layersByHostId[eo])}var oo=_layerHostsById[eo];if(oo)for(var io=0,so=oo;io0&&to.current.naturalHeight>0||to.current.complete&&SVG_REGEX.test(io):!1;fo&&lo(ImageLoadState.loaded)}}),reactExports.useEffect(function(){ro==null||ro(ao)},[ao]);var uo=reactExports.useCallback(function(fo){no==null||no(fo),io&&lo(ImageLoadState.loaded)},[io,no]),co=reactExports.useCallback(function(fo){oo==null||oo(fo),lo(ImageLoadState.error)},[oo]);return[ao,uo,co]}var ImageBase=reactExports.forwardRef(function(eo,to){var ro=reactExports.useRef(),no=reactExports.useRef(),oo=useLoadState(eo,no),io=oo[0],so=oo[1],ao=oo[2],lo=getNativeProps(eo,imgProperties,["width","height"]),uo=eo.src,co=eo.alt,fo=eo.width,ho=eo.height,po=eo.shouldFadeIn,go=po===void 0?!0:po,vo=eo.shouldStartVisible,bo=eo.className,xo=eo.imageFit,_o=eo.role,Eo=eo.maximizeFrame,So=eo.styles,To=eo.theme,wo=eo.loading,Co=useCoverStyle(eo,io,no,ro),Oo=getClassNames$6(So,{theme:To,className:bo,width:fo,height:ho,maximizeFrame:Eo,shouldFadeIn:go,shouldStartVisible:vo,isLoaded:io===ImageLoadState.loaded||io===ImageLoadState.notLoaded&&eo.shouldStartVisible,isLandscape:Co===ImageCoverStyle.landscape,isCenter:xo===ImageFit.center,isCenterContain:xo===ImageFit.centerContain,isCenterCover:xo===ImageFit.centerCover,isContain:xo===ImageFit.contain,isCover:xo===ImageFit.cover,isNone:xo===ImageFit.none,isError:io===ImageLoadState.error,isNotImageFit:xo===void 0});return reactExports.createElement("div",{className:Oo.root,style:{width:fo,height:ho},ref:ro},reactExports.createElement("img",__assign$4({},lo,{onLoad:so,onError:ao,key:KEY_PREFIX+eo.src||"",className:Oo.image,ref:useMergedRefs(no,to),src:uo,alt:co,role:_o,loading:wo})))});ImageBase.displayName="ImageBase";function useCoverStyle(eo,to,ro,no){var oo=reactExports.useRef(to),io=reactExports.useRef();return(io===void 0||oo.current===ImageLoadState.notLoaded&&to===ImageLoadState.loaded)&&(io.current=computeCoverStyle(eo,to,ro,no)),oo.current=to,io.current}function computeCoverStyle(eo,to,ro,no){var oo=eo.imageFit,io=eo.width,so=eo.height;if(eo.coverStyle!==void 0)return eo.coverStyle;if(to===ImageLoadState.loaded&&(oo===ImageFit.cover||oo===ImageFit.contain||oo===ImageFit.centerContain||oo===ImageFit.centerCover)&&ro.current&&no.current){var ao=void 0;typeof io=="number"&&typeof so=="number"&&oo!==ImageFit.centerContain&&oo!==ImageFit.centerCover?ao=io/so:ao=no.current.clientWidth/no.current.clientHeight;var lo=ro.current.naturalWidth/ro.current.naturalHeight;if(lo>ao)return ImageCoverStyle.landscape}return ImageCoverStyle.portrait}var GlobalClassNames$5={root:"ms-Image",rootMaximizeFrame:"ms-Image--maximizeFrame",image:"ms-Image-image",imageCenter:"ms-Image-image--center",imageContain:"ms-Image-image--contain",imageCover:"ms-Image-image--cover",imageCenterContain:"ms-Image-image--centerContain",imageCenterCover:"ms-Image-image--centerCover",imageNone:"ms-Image-image--none",imageLandscape:"ms-Image-image--landscape",imagePortrait:"ms-Image-image--portrait"},getStyles$6=function(eo){var to=eo.className,ro=eo.width,no=eo.height,oo=eo.maximizeFrame,io=eo.isLoaded,so=eo.shouldFadeIn,ao=eo.shouldStartVisible,lo=eo.isLandscape,uo=eo.isCenter,co=eo.isContain,fo=eo.isCover,ho=eo.isCenterContain,po=eo.isCenterCover,go=eo.isNone,vo=eo.isError,bo=eo.isNotImageFit,xo=eo.theme,_o=getGlobalClassNames(GlobalClassNames$5,xo),Eo={position:"absolute",left:"50% /* @noflip */",top:"50%",transform:"translate(-50%,-50%)"},So=getWindow(),To=So!==void 0&&So.navigator.msMaxTouchPoints===void 0,wo=co&&lo||fo&&!lo?{width:"100%",height:"auto"}:{width:"auto",height:"100%"};return{root:[_o.root,xo.fonts.medium,{overflow:"hidden"},oo&&[_o.rootMaximizeFrame,{height:"100%",width:"100%"}],io&&so&&!ao&&AnimationClassNames.fadeIn400,(uo||co||fo||ho||po)&&{position:"relative"},to],image:[_o.image,{display:"block",opacity:0},io&&["is-loaded",{opacity:1}],uo&&[_o.imageCenter,Eo],co&&[_o.imageContain,To&&{width:"100%",height:"100%",objectFit:"contain"},!To&&wo,!To&&Eo],fo&&[_o.imageCover,To&&{width:"100%",height:"100%",objectFit:"cover"},!To&&wo,!To&&Eo],ho&&[_o.imageCenterContain,lo&&{maxWidth:"100%"},!lo&&{maxHeight:"100%"},Eo],po&&[_o.imageCenterCover,lo&&{maxHeight:"100%"},!lo&&{maxWidth:"100%"},Eo],go&&[_o.imageNone,{width:"auto",height:"auto"}],bo&&[!!ro&&!no&&{height:"auto",width:"100%"},!ro&&!!no&&{height:"100%",width:"auto"},!!ro&&!!no&&{height:"100%",width:"100%"}],lo&&_o.imageLandscape,!lo&&_o.imagePortrait,!io&&"is-notLoaded",so&&"is-fadeIn",vo&&"is-error"]}},Image$1=styled(ImageBase,getStyles$6,void 0,{scope:"Image"},!0);Image$1.displayName="Image";var classNames=mergeStyleSets({root:{display:"inline-block"},placeholder:["ms-Icon-placeHolder",{width:"1em"}],image:["ms-Icon-imageContainer",{overflow:"hidden"}]}),MS_ICON="ms-Icon",getStyles$5=function(eo){var to=eo.className,ro=eo.iconClassName,no=eo.isPlaceholder,oo=eo.isImage,io=eo.styles;return{root:[no&&classNames.placeholder,classNames.root,oo&&classNames.image,ro,to,io&&io.root,io&&io.imageContainer]}},getIconContent=memoizeFunction(function(eo){var to=getIcon(eo)||{subset:{},code:void 0},ro=to.code,no=to.subset;return ro?{children:ro,iconClassName:no.className,fontFamily:no.fontFace&&no.fontFace.fontFamily,mergeImageProps:no.mergeImageProps}:null},void 0,!0),FontIcon=function(eo){var to=eo.iconName,ro=eo.className,no=eo.style,oo=no===void 0?{}:no,io=getIconContent(to)||{},so=io.iconClassName,ao=io.children,lo=io.fontFamily,uo=io.mergeImageProps,co=getNativeProps(eo,htmlElementProperties),fo=eo["aria-label"]||eo.title,ho=eo["aria-label"]||eo["aria-labelledby"]||eo.title?{role:uo?void 0:"img"}:{"aria-hidden":!0},po=ao;return uo&&typeof ao=="object"&&typeof ao.props=="object"&&fo&&(po=reactExports.cloneElement(ao,{alt:fo})),reactExports.createElement("i",__assign$4({"data-icon-name":to},ho,co,uo?{title:void 0,"aria-label":void 0}:{},{className:css$3(MS_ICON,classNames.root,so,!to&&classNames.placeholder,ro),style:__assign$4({fontFamily:lo},oo)}),po)};memoizeFunction(function(eo,to,ro){return FontIcon({iconName:eo,className:to,"aria-label":ro})});var getClassNames$5=classNamesFunction({cacheSize:100}),IconBase=function(eo){__extends$3(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no._onImageLoadingStateChange=function(oo){no.props.imageProps&&no.props.imageProps.onLoadingStateChange&&no.props.imageProps.onLoadingStateChange(oo),oo===ImageLoadState.error&&no.setState({imageLoadError:!0})},no.state={imageLoadError:!1},no}return to.prototype.render=function(){var ro=this.props,no=ro.children,oo=ro.className,io=ro.styles,so=ro.iconName,ao=ro.imageErrorAs,lo=ro.theme,uo=typeof so=="string"&&so.length===0,co=!!this.props.imageProps||this.props.iconType===IconType.image||this.props.iconType===IconType.Image,fo=getIconContent(so)||{},ho=fo.iconClassName,po=fo.children,go=fo.mergeImageProps,vo=getClassNames$5(io,{theme:lo,className:oo,iconClassName:ho,isImage:co,isPlaceholder:uo}),bo=co?"span":"i",xo=getNativeProps(this.props,htmlElementProperties,["aria-label"]),_o=this.state.imageLoadError,Eo=__assign$4(__assign$4({},this.props.imageProps),{onLoadingStateChange:this._onImageLoadingStateChange}),So=_o&&ao||Image$1,To=this.props["aria-label"]||this.props.ariaLabel,wo=Eo.alt||To||this.props.title,Co=!!(wo||this.props["aria-labelledby"]||Eo["aria-label"]||Eo["aria-labelledby"]),Oo=Co?{role:co||go?void 0:"img","aria-label":co||go?void 0:wo}:{"aria-hidden":!0},Ao=po;return go&&po&&typeof po=="object"&&wo&&(Ao=reactExports.cloneElement(po,{alt:wo})),reactExports.createElement(bo,__assign$4({"data-icon-name":so},Oo,xo,go?{title:void 0,"aria-label":void 0}:{},{className:vo.root}),co?reactExports.createElement(So,__assign$4({},Eo)):no||Ao)},to}(reactExports.Component),Icon=styled(IconBase,getStyles$5,void 0,{scope:"Icon"},!0);Icon.displayName="Icon";var FocusZoneTabbableElements={none:0,all:1,inputOnly:2},FocusZoneDirection;(function(eo){eo[eo.vertical=0]="vertical",eo[eo.horizontal=1]="horizontal",eo[eo.bidirectional=2]="bidirectional",eo[eo.domOrder=3]="domOrder"})(FocusZoneDirection||(FocusZoneDirection={}));var IS_FOCUSABLE_ATTRIBUTE="data-is-focusable",IS_ENTER_DISABLED_ATTRIBUTE="data-disable-click-on-enter",FOCUSZONE_ID_ATTRIBUTE="data-focuszone-id",TABINDEX="tabindex",NO_VERTICAL_WRAP="data-no-vertical-wrap",NO_HORIZONTAL_WRAP="data-no-horizontal-wrap",LARGE_DISTANCE_FROM_CENTER=999999999,LARGE_NEGATIVE_DISTANCE_FROM_CENTER=-999999999,focusZoneStyles,focusZoneClass="ms-FocusZone";function raiseClickFromKeyboardEvent(eo,to){var ro;typeof MouseEvent=="function"?ro=new MouseEvent("click",{ctrlKey:to==null?void 0:to.ctrlKey,metaKey:to==null?void 0:to.metaKey,shiftKey:to==null?void 0:to.shiftKey,altKey:to==null?void 0:to.altKey,bubbles:to==null?void 0:to.bubbles,cancelable:to==null?void 0:to.cancelable}):(ro=document.createEvent("MouseEvents"),ro.initMouseEvent("click",to?to.bubbles:!1,to?to.cancelable:!1,window,0,0,0,0,0,to?to.ctrlKey:!1,to?to.altKey:!1,to?to.shiftKey:!1,to?to.metaKey:!1,0,null)),eo.dispatchEvent(ro)}function getRootClass(){return focusZoneStyles||(focusZoneStyles=mergeStyles$1({selectors:{":focus":{outline:"none"}}},focusZoneClass)),focusZoneStyles}var _allInstances={},_outerZones=new Set,ALLOWED_INPUT_TYPES=["text","number","password","email","tel","url","search","textarea"],ALLOW_VIRTUAL_ELEMENTS=!1,FocusZone=function(eo){__extends$3(to,eo);function to(ro){var no=this,oo,io,so,ao;no=eo.call(this,ro)||this,no._root=reactExports.createRef(),no._mergedRef=createMergedRef(),no._onFocus=function(uo){if(!no._portalContainsElement(uo.target)){var co=no.props,fo=co.onActiveElementChanged,ho=co.doNotAllowFocusEventToPropagate,po=co.stopFocusPropagation,go=co.onFocusNotification,vo=co.onFocus,bo=co.shouldFocusInnerElementWhenReceivedFocus,xo=co.defaultTabbableElement,_o=no._isImmediateDescendantOfZone(uo.target),Eo;if(_o)Eo=uo.target;else for(var So=uo.target;So&&So!==no._root.current;){if(isElementTabbable(So)&&no._isImmediateDescendantOfZone(So)){Eo=So;break}So=getParent(So,ALLOW_VIRTUAL_ELEMENTS)}if(bo&&uo.target===no._root.current){var To=xo&&typeof xo=="function"&&no._root.current&&xo(no._root.current);To&&isElementTabbable(To)?(Eo=To,To.focus()):(no.focus(!0),no._activeElement&&(Eo=null))}var wo=!no._activeElement;Eo&&Eo!==no._activeElement&&((_o||wo)&&no._setFocusAlignment(Eo,!0,!0),no._activeElement=Eo,wo&&no._updateTabIndexes()),fo&&fo(no._activeElement,uo),(po||ho)&&uo.stopPropagation(),vo?vo(uo):go&&go()}},no._onBlur=function(){no._setParkedFocus(!1)},no._onMouseDown=function(uo){if(!no._portalContainsElement(uo.target)){var co=no.props.disabled;if(!co){for(var fo=uo.target,ho=[];fo&&fo!==no._root.current;)ho.push(fo),fo=getParent(fo,ALLOW_VIRTUAL_ELEMENTS);for(;ho.length&&(fo=ho.pop(),fo&&isElementTabbable(fo)&&no._setActiveElement(fo,!0),!isElementFocusZone(fo)););}}},no._onKeyDown=function(uo,co){if(!no._portalContainsElement(uo.target)){var fo=no.props,ho=fo.direction,po=fo.disabled,go=fo.isInnerZoneKeystroke,vo=fo.pagingSupportDisabled,bo=fo.shouldEnterInnerZone;if(!po&&(no.props.onKeyDown&&no.props.onKeyDown(uo),!uo.isDefaultPrevented()&&!(no._getDocument().activeElement===no._root.current&&no._isInnerZone))){if((bo&&bo(uo)||go&&go(uo))&&no._isImmediateDescendantOfZone(uo.target)){var xo=no._getFirstInnerZone();if(xo){if(!xo.focus(!0))return}else if(isElementFocusSubZone(uo.target)){if(!no.focusElement(getNextElement(uo.target,uo.target.firstChild,!0)))return}else return}else{if(uo.altKey)return;switch(uo.which){case KeyCodes$1.space:if(no._shouldRaiseClicksOnSpace&&no._tryInvokeClickForFocusable(uo.target,uo))break;return;case KeyCodes$1.left:if(ho!==FocusZoneDirection.vertical&&(no._preventDefaultWhenHandled(uo),no._moveFocusLeft(co)))break;return;case KeyCodes$1.right:if(ho!==FocusZoneDirection.vertical&&(no._preventDefaultWhenHandled(uo),no._moveFocusRight(co)))break;return;case KeyCodes$1.up:if(ho!==FocusZoneDirection.horizontal&&(no._preventDefaultWhenHandled(uo),no._moveFocusUp()))break;return;case KeyCodes$1.down:if(ho!==FocusZoneDirection.horizontal&&(no._preventDefaultWhenHandled(uo),no._moveFocusDown()))break;return;case KeyCodes$1.pageDown:if(!vo&&no._moveFocusPaging(!0))break;return;case KeyCodes$1.pageUp:if(!vo&&no._moveFocusPaging(!1))break;return;case KeyCodes$1.tab:if(no.props.allowTabKey||no.props.handleTabKey===FocusZoneTabbableElements.all||no.props.handleTabKey===FocusZoneTabbableElements.inputOnly&&no._isElementInput(uo.target)){var _o=!1;if(no._processingTabKey=!0,ho===FocusZoneDirection.vertical||!no._shouldWrapFocus(no._activeElement,NO_HORIZONTAL_WRAP))_o=uo.shiftKey?no._moveFocusUp():no._moveFocusDown();else{var Eo=getRTL$1(co)?!uo.shiftKey:uo.shiftKey;_o=Eo?no._moveFocusLeft(co):no._moveFocusRight(co)}if(no._processingTabKey=!1,_o)break;no.props.shouldResetActiveElementWhenTabFromZone&&(no._activeElement=null)}return;case KeyCodes$1.home:if(no._isContentEditableElement(uo.target)||no._isElementInput(uo.target)&&!no._shouldInputLoseFocus(uo.target,!1))return!1;var So=no._root.current&&no._root.current.firstChild;if(no._root.current&&So&&no.focusElement(getNextElement(no._root.current,So,!0)))break;return;case KeyCodes$1.end:if(no._isContentEditableElement(uo.target)||no._isElementInput(uo.target)&&!no._shouldInputLoseFocus(uo.target,!0))return!1;var To=no._root.current&&no._root.current.lastChild;if(no._root.current&&no.focusElement(getPreviousElement(no._root.current,To,!0,!0,!0)))break;return;case KeyCodes$1.enter:if(no._shouldRaiseClicksOnEnter&&no._tryInvokeClickForFocusable(uo.target,uo))break;return;default:return}}uo.preventDefault(),uo.stopPropagation()}}},no._getHorizontalDistanceFromCenter=function(uo,co,fo){var ho=no._focusAlignment.left||no._focusAlignment.x||0,po=Math.floor(fo.top),go=Math.floor(co.bottom),vo=Math.floor(fo.bottom),bo=Math.floor(co.top),xo=uo&&po>go,_o=!uo&&vo=fo.left&&ho<=fo.left+fo.width?0:Math.abs(fo.left+fo.width/2-ho):no._shouldWrapFocus(no._activeElement,NO_VERTICAL_WRAP)?LARGE_DISTANCE_FROM_CENTER:LARGE_NEGATIVE_DISTANCE_FROM_CENTER},initializeComponentRef(no),no._id=getId("FocusZone"),no._focusAlignment={left:0,top:0},no._processingTabKey=!1;var lo=(io=(oo=ro.shouldRaiseClicks)!==null&&oo!==void 0?oo:to.defaultProps.shouldRaiseClicks)!==null&&io!==void 0?io:!0;return no._shouldRaiseClicksOnEnter=(so=ro.shouldRaiseClicksOnEnter)!==null&&so!==void 0?so:lo,no._shouldRaiseClicksOnSpace=(ao=ro.shouldRaiseClicksOnSpace)!==null&&ao!==void 0?ao:lo,no}return to.getOuterZones=function(){return _outerZones.size},to._onKeyDownCapture=function(ro){ro.which===KeyCodes$1.tab&&_outerZones.forEach(function(no){return no._updateTabIndexes()})},to.prototype.componentDidMount=function(){var ro=this._root.current;if(_allInstances[this._id]=this,ro){for(var no=getParent(ro,ALLOW_VIRTUAL_ELEMENTS);no&&no!==this._getDocument().body&&no.nodeType===1;){if(isElementFocusZone(no)){this._isInnerZone=!0;break}no=getParent(no,ALLOW_VIRTUAL_ELEMENTS)}this._isInnerZone||(_outerZones.add(this),this._root.current&&this._root.current.addEventListener("keydown",to._onKeyDownCapture,!0)),this._root.current&&this._root.current.addEventListener("blur",this._onBlur,!0),this._updateTabIndexes(),this.props.defaultTabbableElement&&typeof this.props.defaultTabbableElement=="string"?this._activeElement=this._getDocument().querySelector(this.props.defaultTabbableElement):this.props.defaultActiveElement&&(this._activeElement=this._getDocument().querySelector(this.props.defaultActiveElement)),this.props.shouldFocusOnMount&&this.focus()}},to.prototype.componentDidUpdate=function(){var ro=this._root.current,no=this._getDocument();if((this._activeElement&&!elementContains(this._root.current,this._activeElement,ALLOW_VIRTUAL_ELEMENTS)||this._defaultFocusElement&&!elementContains(this._root.current,this._defaultFocusElement,ALLOW_VIRTUAL_ELEMENTS))&&(this._activeElement=null,this._defaultFocusElement=null,this._updateTabIndexes()),!this.props.preventFocusRestoration&&no&&this._lastIndexPath&&(no.activeElement===no.body||no.activeElement===null||no.activeElement===ro)){var oo=getFocusableByIndexPath(ro,this._lastIndexPath);oo?(this._setActiveElement(oo,!0),oo.focus(),this._setParkedFocus(!1)):this._setParkedFocus(!0)}},to.prototype.componentWillUnmount=function(){delete _allInstances[this._id],this._isInnerZone||(_outerZones.delete(this),this._root.current&&this._root.current.removeEventListener("keydown",to._onKeyDownCapture,!0)),this._root.current&&this._root.current.removeEventListener("blur",this._onBlur,!0),this._activeElement=null,this._defaultFocusElement=null},to.prototype.render=function(){var ro=this,no=this.props,oo=no.as,io=no.elementType,so=no.rootProps,ao=no.ariaDescribedBy,lo=no.ariaLabelledBy,uo=no.className,co=getNativeProps(this.props,htmlElementProperties),fo=oo||io||"div";this._evaluateFocusBeforeRender();var ho=getTheme();return reactExports.createElement(fo,__assign$4({"aria-labelledby":lo,"aria-describedby":ao},co,so,{className:css$3(getRootClass(),uo),ref:this._mergedRef(this.props.elementRef,this._root),"data-focuszone-id":this._id,onKeyDown:function(po){return ro._onKeyDown(po,ho)},onFocus:this._onFocus,onMouseDownCapture:this._onMouseDown}),this.props.children)},to.prototype.focus=function(ro,no){if(ro===void 0&&(ro=!1),no===void 0&&(no=!1),this._root.current)if(!ro&&this._root.current.getAttribute(IS_FOCUSABLE_ATTRIBUTE)==="true"&&this._isInnerZone){var oo=this._getOwnerZone(this._root.current);if(oo!==this._root.current){var io=_allInstances[oo.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];return!!io&&io.focusElement(this._root.current)}return!1}else{if(!ro&&this._activeElement&&elementContains(this._root.current,this._activeElement)&&isElementTabbable(this._activeElement)&&(!no||isElementVisibleAndNotHidden(this._activeElement)))return this._activeElement.focus(),!0;var so=this._root.current.firstChild;return this.focusElement(getNextElement(this._root.current,so,!0,void 0,void 0,void 0,void 0,void 0,no))}return!1},to.prototype.focusLast=function(){if(this._root.current){var ro=this._root.current&&this._root.current.lastChild;return this.focusElement(getPreviousElement(this._root.current,ro,!0,!0,!0))}return!1},to.prototype.focusElement=function(ro,no){var oo=this.props,io=oo.onBeforeFocus,so=oo.shouldReceiveFocus;return so&&!so(ro)||io&&!io(ro)?!1:ro?(this._setActiveElement(ro,no),this._activeElement&&this._activeElement.focus(),!0):!1},to.prototype.setFocusAlignment=function(ro){this._focusAlignment=ro},Object.defineProperty(to.prototype,"defaultFocusElement",{get:function(){return this._defaultFocusElement},enumerable:!1,configurable:!0}),Object.defineProperty(to.prototype,"activeElement",{get:function(){return this._activeElement},enumerable:!1,configurable:!0}),to.prototype._evaluateFocusBeforeRender=function(){var ro=this._root.current,no=this._getDocument();if(no){var oo=no.activeElement;if(oo!==ro){var io=elementContains(ro,oo,!1);this._lastIndexPath=io?getElementIndexPath(ro,oo):void 0}}},to.prototype._setParkedFocus=function(ro){var no=this._root.current;no&&this._isParked!==ro&&(this._isParked=ro,ro?(this.props.allowFocusRoot||(this._parkedTabIndex=no.getAttribute("tabindex"),no.setAttribute("tabindex","-1")),no.focus()):this.props.allowFocusRoot||(this._parkedTabIndex?(no.setAttribute("tabindex",this._parkedTabIndex),this._parkedTabIndex=void 0):no.removeAttribute("tabindex")))},to.prototype._setActiveElement=function(ro,no){var oo=this._activeElement;this._activeElement=ro,oo&&(isElementFocusZone(oo)&&this._updateTabIndexes(oo),oo.tabIndex=-1),this._activeElement&&((!this._focusAlignment||no)&&this._setFocusAlignment(ro,!0,!0),this._activeElement.tabIndex=0)},to.prototype._preventDefaultWhenHandled=function(ro){this.props.preventDefaultWhenHandled&&ro.preventDefault()},to.prototype._tryInvokeClickForFocusable=function(ro,no){var oo=ro;if(oo===this._root.current)return!1;do{if(oo.tagName==="BUTTON"||oo.tagName==="A"||oo.tagName==="INPUT"||oo.tagName==="TEXTAREA"||oo.tagName==="SUMMARY")return!1;if(this._isImmediateDescendantOfZone(oo)&&oo.getAttribute(IS_FOCUSABLE_ATTRIBUTE)==="true"&&oo.getAttribute(IS_ENTER_DISABLED_ATTRIBUTE)!=="true")return raiseClickFromKeyboardEvent(oo,no),!0;oo=getParent(oo,ALLOW_VIRTUAL_ELEMENTS)}while(oo!==this._root.current);return!1},to.prototype._getFirstInnerZone=function(ro){if(ro=ro||this._activeElement||this._root.current,!ro)return null;if(isElementFocusZone(ro))return _allInstances[ro.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];for(var no=ro.firstElementChild;no;){if(isElementFocusZone(no))return _allInstances[no.getAttribute(FOCUSZONE_ID_ATTRIBUTE)];var oo=this._getFirstInnerZone(no);if(oo)return oo;no=no.nextElementSibling}return null},to.prototype._moveFocus=function(ro,no,oo,io){io===void 0&&(io=!0);var so=this._activeElement,ao=-1,lo=void 0,uo=!1,co=this.props.direction===FocusZoneDirection.bidirectional;if(!so||!this._root.current||this._isElementInput(so)&&!this._shouldInputLoseFocus(so,ro))return!1;var fo=co?so.getBoundingClientRect():null;do if(so=ro?getNextElement(this._root.current,so):getPreviousElement(this._root.current,so),co){if(so){var ho=so.getBoundingClientRect(),po=no(fo,ho);if(po===-1&&ao===-1){lo=so;break}if(po>-1&&(ao===-1||po=0&&po<0)break}}else{lo=so;break}while(so);if(lo&&lo!==this._activeElement)uo=!0,this.focusElement(lo);else if(this.props.isCircularNavigation&&io)return ro?this.focusElement(getNextElement(this._root.current,this._root.current.firstElementChild,!0)):this.focusElement(getPreviousElement(this._root.current,this._root.current.lastElementChild,!0,!0,!0));return uo},to.prototype._moveFocusDown=function(){var ro=this,no=-1,oo=this._focusAlignment.left||this._focusAlignment.x||0;return this._moveFocus(!0,function(io,so){var ao=-1,lo=Math.floor(so.top),uo=Math.floor(io.bottom);return lo=uo||lo===no)&&(no=lo,oo>=so.left&&oo<=so.left+so.width?ao=0:ao=Math.abs(so.left+so.width/2-oo)),ao)})?(this._setFocusAlignment(this._activeElement,!1,!0),!0):!1},to.prototype._moveFocusUp=function(){var ro=this,no=-1,oo=this._focusAlignment.left||this._focusAlignment.x||0;return this._moveFocus(!1,function(io,so){var ao=-1,lo=Math.floor(so.bottom),uo=Math.floor(so.top),co=Math.floor(io.top);return lo>co?ro._shouldWrapFocus(ro._activeElement,NO_VERTICAL_WRAP)?LARGE_DISTANCE_FROM_CENTER:LARGE_NEGATIVE_DISTANCE_FROM_CENTER:((no===-1&&lo<=co||uo===no)&&(no=uo,oo>=so.left&&oo<=so.left+so.width?ao=0:ao=Math.abs(so.left+so.width/2-oo)),ao)})?(this._setFocusAlignment(this._activeElement,!1,!0),!0):!1},to.prototype._moveFocusLeft=function(ro){var no=this,oo=this._shouldWrapFocus(this._activeElement,NO_HORIZONTAL_WRAP);return this._moveFocus(getRTL$1(ro),function(io,so){var ao=-1,lo;return getRTL$1(ro)?lo=parseFloat(so.top.toFixed(3))parseFloat(io.top.toFixed(3)),lo&&so.right<=io.right&&no.props.direction!==FocusZoneDirection.vertical?ao=io.right-so.right:oo||(ao=LARGE_NEGATIVE_DISTANCE_FROM_CENTER),ao},void 0,oo)?(this._setFocusAlignment(this._activeElement,!0,!1),!0):!1},to.prototype._moveFocusRight=function(ro){var no=this,oo=this._shouldWrapFocus(this._activeElement,NO_HORIZONTAL_WRAP);return this._moveFocus(!getRTL$1(ro),function(io,so){var ao=-1,lo;return getRTL$1(ro)?lo=parseFloat(so.bottom.toFixed(3))>parseFloat(io.top.toFixed(3)):lo=parseFloat(so.top.toFixed(3))=io.left&&no.props.direction!==FocusZoneDirection.vertical?ao=so.left-io.left:oo||(ao=LARGE_NEGATIVE_DISTANCE_FROM_CENTER),ao},void 0,oo)?(this._setFocusAlignment(this._activeElement,!0,!1),!0):!1},to.prototype._moveFocusPaging=function(ro,no){no===void 0&&(no=!0);var oo=this._activeElement;if(!oo||!this._root.current||this._isElementInput(oo)&&!this._shouldInputLoseFocus(oo,ro))return!1;var io=findScrollableParent(oo);if(!io)return!1;var so=-1,ao=void 0,lo=-1,uo=-1,co=io.clientHeight,fo=oo.getBoundingClientRect();do if(oo=ro?getNextElement(this._root.current,oo):getPreviousElement(this._root.current,oo),oo){var ho=oo.getBoundingClientRect(),po=Math.floor(ho.top),go=Math.floor(fo.bottom),vo=Math.floor(ho.bottom),bo=Math.floor(fo.top),xo=this._getHorizontalDistanceFromCenter(ro,fo,ho),_o=ro&&po>go+co,Eo=!ro&&vo-1&&(ro&&po>lo?(lo=po,so=xo,ao=oo):!ro&&vo-1){var oo=ro.selectionStart,io=ro.selectionEnd,so=oo!==io,ao=ro.value,lo=ro.readOnly;if(so||oo>0&&!no&&!lo||oo!==ao.length&&no&&!lo||this.props.handleTabKey&&!(this.props.shouldInputLoseFocusOnArrowKey&&this.props.shouldInputLoseFocusOnArrowKey(ro)))return!1}return!0},to.prototype._shouldWrapFocus=function(ro,no){return this.props.checkForNoWrap?shouldWrapFocus(ro,no):!0},to.prototype._portalContainsElement=function(ro){return ro&&!!this._root.current&&portalContainsElement(ro,this._root.current)},to.prototype._getDocument=function(){return getDocument(this._root.current)},to.defaultProps={isCircularNavigation:!1,direction:FocusZoneDirection.bidirectional,shouldRaiseClicks:!0},to}(reactExports.Component),ContextualMenuItemType;(function(eo){eo[eo.Normal=0]="Normal",eo[eo.Divider=1]="Divider",eo[eo.Header=2]="Header",eo[eo.Section=3]="Section"})(ContextualMenuItemType||(ContextualMenuItemType={}));function getIsChecked(eo){return eo.canCheck?!!(eo.isChecked||eo.checked):typeof eo.isChecked=="boolean"?eo.isChecked:typeof eo.checked=="boolean"?eo.checked:null}function hasSubmenu(eo){return!!(eo.subMenuProps||eo.items)}function isItemDisabled(eo){return!!(eo.isDisabled||eo.disabled)}function getMenuItemAriaRole(eo){var to=getIsChecked(eo),ro=to!==null;return ro?"menuitemcheckbox":"menuitem"}var defaultIconRenderer=function(eo){var to=eo.item,ro=eo.classNames,no=to.iconProps;return reactExports.createElement(Icon,__assign$4({},no,{className:ro.icon}))},renderItemIcon=function(eo){var to=eo.item,ro=eo.hasIcons;return ro?to.onRenderIcon?to.onRenderIcon(eo,defaultIconRenderer):defaultIconRenderer(eo):null},renderCheckMarkIcon=function(eo){var to=eo.onCheckmarkClick,ro=eo.item,no=eo.classNames,oo=getIsChecked(ro);if(to){var io=function(so){return to(ro,so)};return reactExports.createElement(Icon,{iconName:ro.canCheck!==!1&&oo?"CheckMark":"",className:no.checkmarkIcon,onClick:io})}return null},renderItemName=function(eo){var to=eo.item,ro=eo.classNames;return to.text||to.name?reactExports.createElement("span",{className:ro.label},to.text||to.name):null},renderSecondaryText=function(eo){var to=eo.item,ro=eo.classNames;return to.secondaryText?reactExports.createElement("span",{className:ro.secondaryText},to.secondaryText):null},renderSubMenuIcon=function(eo){var to=eo.item,ro=eo.classNames,no=eo.theme;return hasSubmenu(to)?reactExports.createElement(Icon,__assign$4({iconName:getRTL$1(no)?"ChevronLeft":"ChevronRight"},to.submenuIconProps,{className:ro.subMenuIcon})):null},ContextualMenuItemBase=function(eo){__extends$3(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no.openSubMenu=function(){var oo=no.props,io=oo.item,so=oo.openSubMenu,ao=oo.getSubmenuTarget;if(ao){var lo=ao();hasSubmenu(io)&&so&&lo&&so(io,lo)}},no.dismissSubMenu=function(){var oo=no.props,io=oo.item,so=oo.dismissSubMenu;hasSubmenu(io)&&so&&so()},no.dismissMenu=function(oo){var io=no.props.dismissMenu;io&&io(void 0,oo)},initializeComponentRef(no),no}return to.prototype.render=function(){var ro=this.props,no=ro.item,oo=ro.classNames,io=no.onRenderContent||this._renderLayout;return reactExports.createElement("div",{className:no.split?oo.linkContentMenu:oo.linkContent},io(this.props,{renderCheckMarkIcon,renderItemIcon,renderItemName,renderSecondaryText,renderSubMenuIcon}))},to.prototype._renderLayout=function(ro,no){return reactExports.createElement(reactExports.Fragment,null,no.renderCheckMarkIcon(ro),no.renderItemIcon(ro),no.renderItemName(ro),no.renderSecondaryText(ro),no.renderSubMenuIcon(ro))},to}(reactExports.Component),getDividerClassNames=memoizeFunction(function(eo){return mergeStyleSets({wrapper:{display:"inline-flex",height:"100%",alignItems:"center"},divider:{width:1,height:"100%",backgroundColor:eo.palette.neutralTertiaryAlt}})}),CONTEXTUAL_MENU_ITEM_HEIGHT=36,MediumScreenSelector$1=getScreenSelector(0,ScreenWidthMaxMedium),getMenuItemStyles=memoizeFunction(function(eo){var to,ro,no,oo,io,so=eo.semanticColors,ao=eo.fonts,lo=eo.palette,uo=so.menuItemBackgroundHovered,co=so.menuItemTextHovered,fo=so.menuItemBackgroundPressed,ho=so.bodyDivider,po={item:[ao.medium,{color:so.bodyText,position:"relative",boxSizing:"border-box"}],divider:{display:"block",height:"1px",backgroundColor:ho,position:"relative"},root:[getFocusStyle(eo),ao.medium,{color:so.bodyText,backgroundColor:"transparent",border:"none",width:"100%",height:CONTEXTUAL_MENU_ITEM_HEIGHT,lineHeight:CONTEXTUAL_MENU_ITEM_HEIGHT,display:"block",cursor:"pointer",padding:"0px 8px 0 4px",textAlign:"left"}],rootDisabled:{color:so.disabledBodyText,cursor:"default",pointerEvents:"none",selectors:(to={},to[HighContrastSelector]={color:"GrayText",opacity:1},to)},rootHovered:{backgroundColor:uo,color:co,selectors:{".ms-ContextualMenu-icon":{color:lo.themeDarkAlt},".ms-ContextualMenu-submenuIcon":{color:lo.neutralPrimary}}},rootFocused:{backgroundColor:lo.white},rootChecked:{selectors:{".ms-ContextualMenu-checkmarkIcon":{color:lo.neutralPrimary}}},rootPressed:{backgroundColor:fo,selectors:{".ms-ContextualMenu-icon":{color:lo.themeDark},".ms-ContextualMenu-submenuIcon":{color:lo.neutralPrimary}}},rootExpanded:{backgroundColor:fo,color:so.bodyTextChecked,selectors:(ro={".ms-ContextualMenu-submenuIcon":(no={},no[HighContrastSelector]={color:"inherit"},no)},ro[HighContrastSelector]=__assign$4({},getHighContrastNoAdjustStyle()),ro)},linkContent:{whiteSpace:"nowrap",height:"inherit",display:"flex",alignItems:"center",maxWidth:"100%"},anchorLink:{padding:"0px 8px 0 4px",textRendering:"auto",color:"inherit",letterSpacing:"normal",wordSpacing:"normal",textTransform:"none",textIndent:"0px",textShadow:"none",textDecoration:"none",boxSizing:"border-box"},label:{margin:"0 4px",verticalAlign:"middle",display:"inline-block",flexGrow:"1",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},secondaryText:{color:eo.palette.neutralSecondary,paddingLeft:"20px",textAlign:"right"},icon:{display:"inline-block",minHeight:"1px",maxHeight:CONTEXTUAL_MENU_ITEM_HEIGHT,fontSize:IconFontSizes.medium,width:IconFontSizes.medium,margin:"0 4px",verticalAlign:"middle",flexShrink:"0",selectors:(oo={},oo[MediumScreenSelector$1]={fontSize:IconFontSizes.large,width:IconFontSizes.large},oo)},iconColor:{color:so.menuIcon},iconDisabled:{color:so.disabledBodyText},checkmarkIcon:{color:so.bodySubtext},subMenuIcon:{height:CONTEXTUAL_MENU_ITEM_HEIGHT,lineHeight:CONTEXTUAL_MENU_ITEM_HEIGHT,color:lo.neutralSecondary,textAlign:"center",display:"inline-block",verticalAlign:"middle",flexShrink:"0",fontSize:IconFontSizes.small,selectors:(io={":hover":{color:lo.neutralPrimary},":active":{color:lo.neutralPrimary}},io[MediumScreenSelector$1]={fontSize:IconFontSizes.medium},io)},splitButtonFlexContainer:[getFocusStyle(eo),{display:"flex",height:CONTEXTUAL_MENU_ITEM_HEIGHT,flexWrap:"nowrap",justifyContent:"center",alignItems:"flex-start"}]};return concatStyleSets(po)}),CONTEXTUAL_SPLIT_MENU_MINWIDTH="28px",MediumScreenSelector=getScreenSelector(0,ScreenWidthMaxMedium),getSplitButtonVerticalDividerClassNames=memoizeFunction(function(eo){var to;return mergeStyleSets(getDividerClassNames(eo),{wrapper:{position:"absolute",right:28,selectors:(to={},to[MediumScreenSelector]={right:32},to)},divider:{height:16,width:1}})}),GlobalClassNames$4={item:"ms-ContextualMenu-item",divider:"ms-ContextualMenu-divider",root:"ms-ContextualMenu-link",isChecked:"is-checked",isExpanded:"is-expanded",isDisabled:"is-disabled",linkContent:"ms-ContextualMenu-linkContent",linkContentMenu:"ms-ContextualMenu-linkContent",icon:"ms-ContextualMenu-icon",iconColor:"ms-ContextualMenu-iconColor",checkmarkIcon:"ms-ContextualMenu-checkmarkIcon",subMenuIcon:"ms-ContextualMenu-submenuIcon",label:"ms-ContextualMenu-itemText",secondaryText:"ms-ContextualMenu-secondaryText",splitMenu:"ms-ContextualMenu-splitMenu",screenReaderText:"ms-ContextualMenu-screenReaderText"},getItemClassNames=memoizeFunction(function(eo,to,ro,no,oo,io,so,ao,lo,uo,co,fo){var ho,po,go,vo,bo=getMenuItemStyles(eo),xo=getGlobalClassNames(GlobalClassNames$4,eo);return mergeStyleSets({item:[xo.item,bo.item,so],divider:[xo.divider,bo.divider,ao],root:[xo.root,bo.root,no&&[xo.isChecked,bo.rootChecked],oo&&bo.anchorLink,ro&&[xo.isExpanded,bo.rootExpanded],to&&[xo.isDisabled,bo.rootDisabled],!to&&!ro&&[{selectors:(ho={":hover":bo.rootHovered,":active":bo.rootPressed},ho[".".concat(IsFocusVisibleClassName," &:focus, .").concat(IsFocusVisibleClassName," &:focus:hover")]=bo.rootFocused,ho[".".concat(IsFocusVisibleClassName," &:hover")]={background:"inherit;"},ho)}],fo],splitPrimary:[bo.root,{width:"calc(100% - ".concat(CONTEXTUAL_SPLIT_MENU_MINWIDTH,")")},no&&["is-checked",bo.rootChecked],(to||co)&&["is-disabled",bo.rootDisabled],!(to||co)&&!no&&[{selectors:(po={":hover":bo.rootHovered},po[":hover ~ .".concat(xo.splitMenu)]=bo.rootHovered,po[":active"]=bo.rootPressed,po[".".concat(IsFocusVisibleClassName," &:focus, .").concat(IsFocusVisibleClassName," &:focus:hover")]=bo.rootFocused,po[".".concat(IsFocusVisibleClassName," &:hover")]={background:"inherit;"},po)}]],splitMenu:[xo.splitMenu,bo.root,{flexBasis:"0",padding:"0 8px",minWidth:CONTEXTUAL_SPLIT_MENU_MINWIDTH},ro&&["is-expanded",bo.rootExpanded],to&&["is-disabled",bo.rootDisabled],!to&&!ro&&[{selectors:(go={":hover":bo.rootHovered,":active":bo.rootPressed},go[".".concat(IsFocusVisibleClassName," &:focus, .").concat(IsFocusVisibleClassName," &:focus:hover")]=bo.rootFocused,go[".".concat(IsFocusVisibleClassName," &:hover")]={background:"inherit;"},go)}]],anchorLink:bo.anchorLink,linkContent:[xo.linkContent,bo.linkContent],linkContentMenu:[xo.linkContentMenu,bo.linkContent,{justifyContent:"center"}],icon:[xo.icon,io&&bo.iconColor,bo.icon,lo,to&&[xo.isDisabled,bo.iconDisabled]],iconColor:bo.iconColor,checkmarkIcon:[xo.checkmarkIcon,io&&bo.checkmarkIcon,bo.icon,lo],subMenuIcon:[xo.subMenuIcon,bo.subMenuIcon,uo,ro&&{color:eo.palette.neutralPrimary},to&&[bo.iconDisabled]],label:[xo.label,bo.label],secondaryText:[xo.secondaryText,bo.secondaryText],splitContainer:[bo.splitButtonFlexContainer,!to&&!no&&[{selectors:(vo={},vo[".".concat(IsFocusVisibleClassName," &:focus, .").concat(IsFocusVisibleClassName," &:focus:hover")]=bo.rootFocused,vo)}]],screenReaderText:[xo.screenReaderText,bo.screenReaderText,hiddenContentStyle,{visibility:"hidden"}]})}),getItemStyles=function(eo){var to=eo.theme,ro=eo.disabled,no=eo.expanded,oo=eo.checked,io=eo.isAnchorLink,so=eo.knownIcon,ao=eo.itemClassName,lo=eo.dividerClassName,uo=eo.iconClassName,co=eo.subMenuClassName,fo=eo.primaryDisabled,ho=eo.className;return getItemClassNames(to,ro,no,oo,io,so,ao,lo,uo,co,fo,ho)},ContextualMenuItem=styled(ContextualMenuItemBase,getItemStyles,void 0,{scope:"ContextualMenuItem"}),ContextualMenuItemWrapper=function(eo){__extends$3(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no._onItemMouseEnter=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseEnter;ao&&ao(so,oo,oo.currentTarget)},no._onItemClick=function(oo){var io=no.props,so=io.item,ao=io.onItemClickBase;ao&&ao(so,oo,oo.currentTarget)},no._onItemMouseLeave=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseLeave;ao&&ao(so,oo)},no._onItemKeyDown=function(oo){var io=no.props,so=io.item,ao=io.onItemKeyDown;ao&&ao(so,oo)},no._onItemMouseMove=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseMove;ao&&ao(so,oo,oo.currentTarget)},no._getSubmenuTarget=function(){},initializeComponentRef(no),no}return to.prototype.shouldComponentUpdate=function(ro){return!shallowCompare(ro,this.props)},to}(reactExports.Component),KTP_PREFIX="ktp",KTP_SEPARATOR="-",DATAKTP_TARGET="data-ktp-target",DATAKTP_EXECUTE_TARGET="data-ktp-execute-target",KTP_LAYER_ID="ktp-layer-id",KeytipEvents;(function(eo){eo.KEYTIP_ADDED="keytipAdded",eo.KEYTIP_REMOVED="keytipRemoved",eo.KEYTIP_UPDATED="keytipUpdated",eo.PERSISTED_KEYTIP_ADDED="persistedKeytipAdded",eo.PERSISTED_KEYTIP_REMOVED="persistedKeytipRemoved",eo.PERSISTED_KEYTIP_EXECUTE="persistedKeytipExecute",eo.ENTER_KEYTIP_MODE="enterKeytipMode",eo.EXIT_KEYTIP_MODE="exitKeytipMode"})(KeytipEvents||(KeytipEvents={}));var KeytipManager=function(){function eo(){this.keytips={},this.persistedKeytips={},this.sequenceMapping={},this.inKeytipMode=!1,this.shouldEnterKeytipMode=!0,this.delayUpdatingKeytipChange=!1}return eo.getInstance=function(){return this._instance},eo.prototype.init=function(to){this.delayUpdatingKeytipChange=to},eo.prototype.register=function(to,ro){ro===void 0&&(ro=!1);var no=to;ro||(no=this.addParentOverflow(to),this.sequenceMapping[no.keySequences.toString()]=no);var oo=this._getUniqueKtp(no);if(ro?this.persistedKeytips[oo.uniqueID]=oo:this.keytips[oo.uniqueID]=oo,this.inKeytipMode||!this.delayUpdatingKeytipChange){var io=ro?KeytipEvents.PERSISTED_KEYTIP_ADDED:KeytipEvents.KEYTIP_ADDED;EventGroup.raise(this,io,{keytip:no,uniqueID:oo.uniqueID})}return oo.uniqueID},eo.prototype.update=function(to,ro){var no=this.addParentOverflow(to),oo=this._getUniqueKtp(no,ro),io=this.keytips[ro];io&&(oo.keytip.visible=io.keytip.visible,this.keytips[ro]=oo,delete this.sequenceMapping[io.keytip.keySequences.toString()],this.sequenceMapping[oo.keytip.keySequences.toString()]=oo.keytip,(this.inKeytipMode||!this.delayUpdatingKeytipChange)&&EventGroup.raise(this,KeytipEvents.KEYTIP_UPDATED,{keytip:oo.keytip,uniqueID:oo.uniqueID}))},eo.prototype.unregister=function(to,ro,no){no===void 0&&(no=!1),no?delete this.persistedKeytips[ro]:delete this.keytips[ro],!no&&delete this.sequenceMapping[to.keySequences.toString()];var oo=no?KeytipEvents.PERSISTED_KEYTIP_REMOVED:KeytipEvents.KEYTIP_REMOVED;(this.inKeytipMode||!this.delayUpdatingKeytipChange)&&EventGroup.raise(this,oo,{keytip:to,uniqueID:ro})},eo.prototype.enterKeytipMode=function(){EventGroup.raise(this,KeytipEvents.ENTER_KEYTIP_MODE)},eo.prototype.exitKeytipMode=function(){EventGroup.raise(this,KeytipEvents.EXIT_KEYTIP_MODE)},eo.prototype.getKeytips=function(){var to=this;return Object.keys(this.keytips).map(function(ro){return to.keytips[ro].keytip})},eo.prototype.addParentOverflow=function(to){var ro=__spreadArray$1([],to.keySequences,!0);if(ro.pop(),ro.length!==0){var no=this.sequenceMapping[ro.toString()];if(no&&no.overflowSetSequence)return __assign$4(__assign$4({},to),{overflowSetSequence:no.overflowSetSequence})}return to},eo.prototype.menuExecute=function(to,ro){EventGroup.raise(this,KeytipEvents.PERSISTED_KEYTIP_EXECUTE,{overflowButtonSequences:to,keytipSequences:ro})},eo.prototype._getUniqueKtp=function(to,ro){return ro===void 0&&(ro=getId()),{keytip:__assign$4({},to),uniqueID:ro}},eo._instance=new eo,eo}();function sequencesToID(eo){return eo.reduce(function(to,ro){return to+KTP_SEPARATOR+ro.split("").join(KTP_SEPARATOR)},KTP_PREFIX)}function mergeOverflows(eo,to){var ro=to.length,no=__spreadArray$1([],to,!0).pop(),oo=__spreadArray$1([],eo,!0);return addElementAtIndex(oo,ro-1,no)}function getAriaDescribedBy(eo){var to=" "+KTP_LAYER_ID;return eo.length?to+" "+sequencesToID(eo):to}function useKeytipData(eo){var to=reactExports.useRef(),ro=eo.keytipProps?__assign$4({disabled:eo.disabled},eo.keytipProps):void 0,no=useConst$1(KeytipManager.getInstance()),oo=usePrevious(eo);useIsomorphicLayoutEffect(function(){to.current&&ro&&((oo==null?void 0:oo.keytipProps)!==eo.keytipProps||(oo==null?void 0:oo.disabled)!==eo.disabled)&&no.update(ro,to.current)}),useIsomorphicLayoutEffect(function(){return ro&&(to.current=no.register(ro)),function(){ro&&no.unregister(ro,to.current)}},[]);var io={ariaDescribedBy:void 0,keytipId:void 0};return ro&&(io=getKeytipData(no,ro,eo.ariaDescribedBy)),io}function getKeytipData(eo,to,ro){var no=eo.addParentOverflow(to),oo=mergeAriaAttributeValues(ro,getAriaDescribedBy(no.keySequences)),io=__spreadArray$1([],no.keySequences,!0);no.overflowSetSequence&&(io=mergeOverflows(io,no.overflowSetSequence));var so=sequencesToID(io);return{ariaDescribedBy:oo,keytipId:so}}var KeytipData=function(eo){var to,ro=eo.children,no=__rest$1(eo,["children"]),oo=useKeytipData(no),io=oo.keytipId,so=oo.ariaDescribedBy;return ro((to={},to[DATAKTP_TARGET]=io,to[DATAKTP_EXECUTE_TARGET]=io,to["aria-describedby"]=so,to))},ContextualMenuAnchor=function(eo){__extends$3(to,eo);function to(){var ro=eo!==null&&eo.apply(this,arguments)||this;return ro._anchor=reactExports.createRef(),ro._getMemoizedMenuButtonKeytipProps=memoizeFunction(function(no){return __assign$4(__assign$4({},no),{hasMenu:!0})}),ro._getSubmenuTarget=function(){return ro._anchor.current?ro._anchor.current:void 0},ro._onItemClick=function(no){var oo=ro.props,io=oo.item,so=oo.onItemClick;so&&so(io,no)},ro._renderAriaDescription=function(no,oo){return no?reactExports.createElement("span",{id:ro._ariaDescriptionId,className:oo},no):null},ro}return to.prototype.render=function(){var ro=this,no=this.props,oo=no.item,io=no.classNames,so=no.index,ao=no.focusableElementIndex,lo=no.totalItemCount,uo=no.hasCheckmarks,co=no.hasIcons,fo=no.expandedMenuItemKey,ho=no.onItemClick,po=no.openSubMenu,go=no.dismissSubMenu,vo=no.dismissMenu,bo=ContextualMenuItem;this.props.item.contextualMenuItemAs&&(bo=composeComponentAs(this.props.item.contextualMenuItemAs,bo)),this.props.contextualMenuItemAs&&(bo=composeComponentAs(this.props.contextualMenuItemAs,bo));var xo=oo.rel;oo.target&&oo.target.toLowerCase()==="_blank"&&(xo=xo||"nofollow noopener noreferrer");var _o=hasSubmenu(oo),Eo=getNativeProps(oo,anchorProperties),So=isItemDisabled(oo),To=oo.itemProps,wo=oo.ariaDescription,Co=oo.keytipProps;Co&&_o&&(Co=this._getMemoizedMenuButtonKeytipProps(Co)),wo&&(this._ariaDescriptionId=getId());var Oo=mergeAriaAttributeValues(oo.ariaDescribedBy,wo?this._ariaDescriptionId:void 0,Eo["aria-describedby"]),Ao={"aria-describedby":Oo};return reactExports.createElement("div",null,reactExports.createElement(KeytipData,{keytipProps:oo.keytipProps,ariaDescribedBy:Oo,disabled:So},function(Ro){return reactExports.createElement("a",__assign$4({},Ao,Eo,Ro,{ref:ro._anchor,href:oo.href,target:oo.target,rel:xo,className:io.root,role:"menuitem","aria-haspopup":_o||void 0,"aria-expanded":_o?oo.key===fo:void 0,"aria-posinset":ao+1,"aria-setsize":lo,"aria-disabled":isItemDisabled(oo),style:oo.style,onClick:ro._onItemClick,onMouseEnter:ro._onItemMouseEnter,onMouseLeave:ro._onItemMouseLeave,onMouseMove:ro._onItemMouseMove,onKeyDown:_o?ro._onItemKeyDown:void 0}),reactExports.createElement(bo,__assign$4({componentRef:oo.componentRef,item:oo,classNames:io,index:so,onCheckmarkClick:uo&&ho?ho:void 0,hasIcons:co,openSubMenu:po,dismissSubMenu:go,dismissMenu:vo,getSubmenuTarget:ro._getSubmenuTarget},To)),ro._renderAriaDescription(wo,io.screenReaderText))}))},to}(ContextualMenuItemWrapper),ContextualMenuButton=function(eo){__extends$3(to,eo);function to(){var ro=eo!==null&&eo.apply(this,arguments)||this;return ro._btn=reactExports.createRef(),ro._getMemoizedMenuButtonKeytipProps=memoizeFunction(function(no){return __assign$4(__assign$4({},no),{hasMenu:!0})}),ro._renderAriaDescription=function(no,oo){return no?reactExports.createElement("span",{id:ro._ariaDescriptionId,className:oo},no):null},ro._getSubmenuTarget=function(){return ro._btn.current?ro._btn.current:void 0},ro}return to.prototype.render=function(){var ro=this,no=this.props,oo=no.item,io=no.classNames,so=no.index,ao=no.focusableElementIndex,lo=no.totalItemCount,uo=no.hasCheckmarks,co=no.hasIcons,fo=no.contextualMenuItemAs,ho=no.expandedMenuItemKey,po=no.onItemMouseDown,go=no.onItemClick,vo=no.openSubMenu,bo=no.dismissSubMenu,xo=no.dismissMenu,_o=ContextualMenuItem;oo.contextualMenuItemAs&&(_o=composeComponentAs(oo.contextualMenuItemAs,_o)),fo&&(_o=composeComponentAs(fo,_o));var Eo=getIsChecked(oo),So=Eo!==null,To=getMenuItemAriaRole(oo),wo=hasSubmenu(oo),Co=oo.itemProps,Oo=oo.ariaLabel,Ao=oo.ariaDescription,Ro=getNativeProps(oo,buttonProperties);delete Ro.disabled;var No=oo.role||To;Ao&&(this._ariaDescriptionId=getId());var Mo=mergeAriaAttributeValues(oo.ariaDescribedBy,Ao?this._ariaDescriptionId:void 0,Ro["aria-describedby"]),Do={className:io.root,onClick:this._onItemClick,onKeyDown:wo?this._onItemKeyDown:void 0,onMouseEnter:this._onItemMouseEnter,onMouseLeave:this._onItemMouseLeave,onMouseDown:function(Fo){return po?po(oo,Fo):void 0},onMouseMove:this._onItemMouseMove,href:oo.href,title:oo.title,"aria-label":Oo,"aria-describedby":Mo,"aria-haspopup":wo||void 0,"aria-expanded":wo?oo.key===ho:void 0,"aria-posinset":ao+1,"aria-setsize":lo,"aria-disabled":isItemDisabled(oo),"aria-checked":(No==="menuitemcheckbox"||No==="menuitemradio")&&So?!!Eo:void 0,"aria-selected":No==="menuitem"&&So?!!Eo:void 0,role:No,style:oo.style},jo=oo.keytipProps;return jo&&wo&&(jo=this._getMemoizedMenuButtonKeytipProps(jo)),reactExports.createElement(KeytipData,{keytipProps:jo,ariaDescribedBy:Mo,disabled:isItemDisabled(oo)},function(Fo){return reactExports.createElement("button",__assign$4({ref:ro._btn},Ro,Do,Fo),reactExports.createElement(_o,__assign$4({componentRef:oo.componentRef,item:oo,classNames:io,index:so,onCheckmarkClick:uo&&go?go:void 0,hasIcons:co,openSubMenu:vo,dismissSubMenu:bo,dismissMenu:xo,getSubmenuTarget:ro._getSubmenuTarget},Co)),ro._renderAriaDescription(Ao,io.screenReaderText))})},to}(ContextualMenuItemWrapper),getStyles$4=function(eo){var to=eo.theme,ro=eo.getClassNames,no=eo.className;if(!to)throw new Error("Theme is undefined or null.");if(ro){var oo=ro(to);return{wrapper:[oo.wrapper],divider:[oo.divider]}}return{wrapper:[{display:"inline-flex",height:"100%",alignItems:"center"},no],divider:[{width:1,height:"100%",backgroundColor:to.palette.neutralTertiaryAlt}]}},getClassNames$4=classNamesFunction(),VerticalDividerBase=reactExports.forwardRef(function(eo,to){var ro=eo.styles,no=eo.theme,oo=eo.getClassNames,io=eo.className,so=getClassNames$4(ro,{theme:no,getClassNames:oo,className:io});return reactExports.createElement("span",{className:so.wrapper,ref:to},reactExports.createElement("span",{className:so.divider}))});VerticalDividerBase.displayName="VerticalDividerBase";var VerticalDivider=styled(VerticalDividerBase,getStyles$4,void 0,{scope:"VerticalDivider"}),TouchIdleDelay=500,ContextualMenuSplitButton=function(eo){__extends$3(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no._getMemoizedMenuButtonKeytipProps=memoizeFunction(function(oo){return __assign$4(__assign$4({},oo),{hasMenu:!0})}),no._onItemKeyDown=function(oo){var io=no.props,so=io.item,ao=io.onItemKeyDown;oo.which===KeyCodes$1.enter?(no._executeItemClick(oo),oo.preventDefault(),oo.stopPropagation()):ao&&ao(so,oo)},no._getSubmenuTarget=function(){return no._splitButton},no._renderAriaDescription=function(oo,io){return oo?reactExports.createElement("span",{id:no._ariaDescriptionId,className:io},oo):null},no._onItemMouseEnterPrimary=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseEnter;ao&&ao(__assign$4(__assign$4({},so),{subMenuProps:void 0,items:void 0}),oo,no._splitButton)},no._onItemMouseEnterIcon=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseEnter;ao&&ao(so,oo,no._splitButton)},no._onItemMouseMovePrimary=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseMove;ao&&ao(__assign$4(__assign$4({},so),{subMenuProps:void 0,items:void 0}),oo,no._splitButton)},no._onItemMouseMoveIcon=function(oo){var io=no.props,so=io.item,ao=io.onItemMouseMove;ao&&ao(so,oo,no._splitButton)},no._onIconItemClick=function(oo){var io=no.props,so=io.item,ao=io.onItemClickBase;ao&&ao(so,oo,no._splitButton?no._splitButton:oo.currentTarget)},no._executeItemClick=function(oo){var io=no.props,so=io.item,ao=io.executeItemClick,lo=io.onItemClick;if(!(so.disabled||so.isDisabled)){if(no._processingTouch&&!so.canCheck&&lo)return lo(so,oo);ao&&ao(so,oo)}},no._onTouchStart=function(oo){no._splitButton&&!("onpointerdown"in no._splitButton)&&no._handleTouchAndPointerEvent(oo)},no._onPointerDown=function(oo){oo.pointerType==="touch"&&(no._handleTouchAndPointerEvent(oo),oo.preventDefault(),oo.stopImmediatePropagation())},no._async=new Async(no),no._events=new EventGroup(no),no._dismissLabelId=getId(),no}return to.prototype.componentDidMount=function(){this._splitButton&&"onpointerdown"in this._splitButton&&this._events.on(this._splitButton,"pointerdown",this._onPointerDown,!0)},to.prototype.componentWillUnmount=function(){this._async.dispose(),this._events.dispose()},to.prototype.render=function(){var ro=this,no,oo=this.props,io=oo.item,so=oo.classNames,ao=oo.index,lo=oo.focusableElementIndex,uo=oo.totalItemCount,co=oo.hasCheckmarks,fo=oo.hasIcons,ho=oo.onItemMouseLeave,po=oo.expandedMenuItemKey,go=hasSubmenu(io),vo=io.keytipProps;vo&&(vo=this._getMemoizedMenuButtonKeytipProps(vo));var bo=io.ariaDescription;bo&&(this._ariaDescriptionId=getId());var xo=(no=getIsChecked(io))!==null&&no!==void 0?no:void 0;return reactExports.createElement(KeytipData,{keytipProps:vo,disabled:isItemDisabled(io)},function(_o){return reactExports.createElement("div",{"data-ktp-target":_o["data-ktp-target"],ref:function(Eo){return ro._splitButton=Eo},role:getMenuItemAriaRole(io),"aria-label":io.ariaLabel,className:so.splitContainer,"aria-disabled":isItemDisabled(io),"aria-expanded":go?io.key===po:void 0,"aria-haspopup":!0,"aria-describedby":mergeAriaAttributeValues(io.ariaDescribedBy,bo?ro._ariaDescriptionId:void 0,_o["aria-describedby"]),"aria-checked":xo,"aria-posinset":lo+1,"aria-setsize":uo,onMouseEnter:ro._onItemMouseEnterPrimary,onMouseLeave:ho?ho.bind(ro,__assign$4(__assign$4({},io),{subMenuProps:null,items:null})):void 0,onMouseMove:ro._onItemMouseMovePrimary,onKeyDown:ro._onItemKeyDown,onClick:ro._executeItemClick,onTouchStart:ro._onTouchStart,tabIndex:0,"data-is-focusable":!0,"aria-roledescription":io["aria-roledescription"]},ro._renderSplitPrimaryButton(io,so,ao,co,fo),ro._renderSplitDivider(io),ro._renderSplitIconButton(io,so,ao,_o),ro._renderAriaDescription(bo,so.screenReaderText))})},to.prototype._renderSplitPrimaryButton=function(ro,no,oo,io,so){var ao=this.props,lo=ao.contextualMenuItemAs,uo=lo===void 0?ContextualMenuItem:lo,co=ao.onItemClick,fo={key:ro.key,disabled:isItemDisabled(ro)||ro.primaryDisabled,name:ro.name,text:ro.text||ro.name,secondaryText:ro.secondaryText,className:no.splitPrimary,canCheck:ro.canCheck,isChecked:ro.isChecked,checked:ro.checked,iconProps:ro.iconProps,id:this._dismissLabelId,onRenderIcon:ro.onRenderIcon,data:ro.data,"data-is-focusable":!1},ho=ro.itemProps;return reactExports.createElement("button",__assign$4({},getNativeProps(fo,buttonProperties)),reactExports.createElement(uo,__assign$4({"data-is-focusable":!1,item:fo,classNames:no,index:oo,onCheckmarkClick:io&&co?co:void 0,hasIcons:so},ho)))},to.prototype._renderSplitDivider=function(ro){var no=ro.getSplitButtonVerticalDividerClassNames||getSplitButtonVerticalDividerClassNames;return reactExports.createElement(VerticalDivider,{getClassNames:no})},to.prototype._renderSplitIconButton=function(ro,no,oo,io){var so=this.props,ao=so.onItemMouseLeave,lo=so.onItemMouseDown,uo=so.openSubMenu,co=so.dismissSubMenu,fo=so.dismissMenu,ho=ContextualMenuItem;this.props.item.contextualMenuItemAs&&(ho=composeComponentAs(this.props.item.contextualMenuItemAs,ho)),this.props.contextualMenuItemAs&&(ho=composeComponentAs(this.props.contextualMenuItemAs,ho));var po={onClick:this._onIconItemClick,disabled:isItemDisabled(ro),className:no.splitMenu,subMenuProps:ro.subMenuProps,submenuIconProps:ro.submenuIconProps,split:!0,key:ro.key,"aria-labelledby":this._dismissLabelId},go=__assign$4(__assign$4({},getNativeProps(po,buttonProperties)),{onMouseEnter:this._onItemMouseEnterIcon,onMouseLeave:ao?ao.bind(this,ro):void 0,onMouseDown:function(bo){return lo?lo(ro,bo):void 0},onMouseMove:this._onItemMouseMoveIcon,"data-is-focusable":!1,"data-ktp-execute-target":io["data-ktp-execute-target"],"aria-haspopup":!0}),vo=ro.itemProps;return reactExports.createElement("button",__assign$4({},go),reactExports.createElement(ho,__assign$4({componentRef:ro.componentRef,item:po,classNames:no,index:oo,hasIcons:!1,openSubMenu:uo,dismissSubMenu:co,dismissMenu:fo,getSubmenuTarget:this._getSubmenuTarget},vo)))},to.prototype._handleTouchAndPointerEvent=function(ro){var no=this,oo=this.props.onTap;oo&&oo(ro),this._lastTouchTimeoutId&&(this._async.clearTimeout(this._lastTouchTimeoutId),this._lastTouchTimeoutId=void 0),this._processingTouch=!0,this._lastTouchTimeoutId=this._async.setTimeout(function(){no._processingTouch=!1,no._lastTouchTimeoutId=void 0},TouchIdleDelay)},to}(ContextualMenuItemWrapper),ResponsiveMode;(function(eo){eo[eo.small=0]="small",eo[eo.medium=1]="medium",eo[eo.large=2]="large",eo[eo.xLarge=3]="xLarge",eo[eo.xxLarge=4]="xxLarge",eo[eo.xxxLarge=5]="xxxLarge",eo[eo.unknown=999]="unknown"})(ResponsiveMode||(ResponsiveMode={}));var RESPONSIVE_MAX_CONSTRAINT=[479,639,1023,1365,1919,99999999],_defaultMode,_lastMode;function getInitialResponsiveMode(){var eo;return(eo=_defaultMode??_lastMode)!==null&&eo!==void 0?eo:ResponsiveMode.large}function getWidthOfCurrentWindow(eo){try{return eo.document.documentElement.clientWidth}catch{return eo.innerWidth}}function getResponsiveMode(eo){var to=ResponsiveMode.small;if(eo){try{for(;getWidthOfCurrentWindow(eo)>RESPONSIVE_MAX_CONSTRAINT[to];)to++}catch{to=getInitialResponsiveMode()}_lastMode=to}else throw new Error("Content was rendered in a server environment without providing a default responsive mode. Call setResponsiveMode to define what the responsive mode is.");return to}var useResponsiveMode=function(eo,to){var ro=reactExports.useState(getInitialResponsiveMode()),no=ro[0],oo=ro[1],io=reactExports.useCallback(function(){var ao=getResponsiveMode(getWindow(eo.current));no!==ao&&oo(ao)},[eo,no]),so=useWindow();return useOnEvent(so,"resize",io),reactExports.useEffect(function(){to===void 0&&io()},[to]),to??no},MenuContext=reactExports.createContext({}),getClassNames$3=classNamesFunction(),getContextualMenuItemClassNames=classNamesFunction(),DEFAULT_PROPS$1={items:[],shouldFocusOnMount:!0,gapSpace:0,directionalHint:DirectionalHint.bottomAutoEdge,beakWidth:16};function getItemCount(eo){for(var to=0,ro=0,no=eo;ro0){var Ml=0;return reactExports.createElement("li",{role:"presentation",key:Xo.key||qs.key||"section-".concat(zo)},reactExports.createElement("div",__assign$4({},ys),reactExports.createElement("ul",{className:Qo.list,role:"presentation"},Xo.topDivider&&Ls(zo,Ko,!0,!0),vs&&zs(vs,qs.key||zo,Ko,qs.title),Xo.items.map(function(Ol,Cl){var Ul=Jo(Ol,Cl,Ml,getItemCount(Xo.items),Vo,Bo,Qo);if(Ol.itemType!==ContextualMenuItemType.Divider&&Ol.itemType!==ContextualMenuItemType.Header){var fu=Ol.customOnRenderListLength?Ol.customOnRenderListLength:1;Ml+=fu}return Ul}),Xo.bottomDivider&&Ls(zo,Ko,!1,!0))))}}},zs=function(qs,Ko,Qo,zo){return reactExports.createElement("li",{role:"presentation",title:zo,key:Ko,className:Qo.item},qs)},Ls=function(qs,Ko,Qo,zo){return zo||qs>0?reactExports.createElement("li",{role:"separator",key:"separator-"+qs+(Qo===void 0?"":Qo?"-top":"-bottom"),className:Ko.divider,"aria-hidden":"true"}):null},ga=function(qs,Ko,Qo,zo,Vo,Bo,Xo){if(qs.onRender)return qs.onRender(__assign$4({"aria-posinset":zo+1,"aria-setsize":Vo},qs),lo);var vs=oo.contextualMenuItemAs,ys={item:qs,classNames:Ko,index:Qo,focusableElementIndex:zo,totalItemCount:Vo,hasCheckmarks:Bo,hasIcons:Xo,contextualMenuItemAs:vs,onItemMouseEnter:Uo,onItemMouseLeave:Zo,onItemMouseMove:Yo,onItemMouseDown,executeItemClick:As,onItemKeyDown:Ho,expandedMenuItemKey:go,openSubMenu:vo,dismissSubMenu:xo,dismissMenu:lo};if(qs.href){var ps=ContextualMenuAnchor;return qs.contextualMenuItemWrapperAs&&(ps=composeComponentAs(qs.contextualMenuItemWrapperAs,ps)),reactExports.createElement(ps,__assign$4({},ys,{onItemClick:Ss}))}if(qs.split&&hasSubmenu(qs)){var Rs=ContextualMenuSplitButton;return qs.contextualMenuItemWrapperAs&&(Rs=composeComponentAs(qs.contextualMenuItemWrapperAs,Rs)),reactExports.createElement(Rs,__assign$4({},ys,{onItemClick:_s,onItemClickBase:Ns,onTap:Ro}))}var Us=ContextualMenuButton;return qs.contextualMenuItemWrapperAs&&(Us=composeComponentAs(qs.contextualMenuItemWrapperAs,Us)),reactExports.createElement(Us,__assign$4({},ys,{onItemClick:_s,onItemClickBase:Ns}))},Js=function(qs,Ko,Qo,zo,Vo,Bo){var Xo=ContextualMenuItem;qs.contextualMenuItemAs&&(Xo=composeComponentAs(qs.contextualMenuItemAs,Xo)),oo.contextualMenuItemAs&&(Xo=composeComponentAs(oo.contextualMenuItemAs,Xo));var vs=qs.itemProps,ys=qs.id,ps=vs&&getNativeProps(vs,divProperties);return reactExports.createElement("div",__assign$4({id:ys,className:Qo.header},ps,{style:qs.style}),reactExports.createElement(Xo,__assign$4({item:qs,classNames:Ko,index:zo,onCheckmarkClick:Vo?_s:void 0,hasIcons:Bo},vs)))},Xs=oo.isBeakVisible,$a=oo.items,Ll=oo.labelElementId,Kl=oo.id,Xl=oo.className,Nl=oo.beakWidth,xa=oo.directionalHint,El=oo.directionalHintForRTL,cu=oo.alignTargetEdge,ks=oo.gapSpace,Es=oo.coverTarget,bs=oo.ariaLabel,Os=oo.doNotLayer,Vs=oo.target,Ks=oo.bounds,Ms=oo.useTargetWidth,Hs=oo.useTargetAsMinWidth,Zs=oo.directionalHintFixed,xl=oo.shouldFocusOnMount,Sl=oo.shouldFocusOnContainer,$l=oo.title,ru=oo.styles,au=oo.theme,zl=oo.calloutProps,pu=oo.onRenderSubMenu,Su=pu===void 0?onDefaultRenderSubMenu:pu,Zl=oo.onRenderMenuList,Dl=Zl===void 0?function(qs,Ko){return ws(qs,mu)}:Zl,gu=oo.focusZoneProps,lu=oo.getMenuClassNames,mu=lu?lu(au,Xl):getClassNames$3(ru,{theme:au,className:Xl}),ou=Fl($a);function Fl(qs){for(var Ko=0,Qo=qs;Ko0){var Ru=getItemCount($a),_h=mu.subComponentStyles?mu.subComponentStyles.callout:void 0;return reactExports.createElement(MenuContext.Consumer,null,function(qs){return reactExports.createElement(Callout,__assign$4({styles:_h,onRestoreFocus:ho},zl,{target:Vs||qs.target,isBeakVisible:Xs,beakWidth:Nl,directionalHint:xa,directionalHintForRTL:El,gapSpace:ks,coverTarget:Es,doNotLayer:Os,className:css$3("ms-ContextualMenu-Callout",zl&&zl.className),setInitialFocus:xl,onDismiss:oo.onDismiss||qs.onDismiss,onScroll:Co,bounds:Ks,directionalHintFixed:Zs,alignTargetEdge:cu,hidden:oo.hidden||qs.hidden,ref:to}),reactExports.createElement("div",{style:Nu,ref:io,id:Kl,className:mu.container,tabIndex:Sl?0:-1,onKeyDown:Lo,onKeyUp:$o,onFocusCapture:To,"aria-label":bs,"aria-labelledby":Ll,role:"menu"},$l&&reactExports.createElement("div",{className:mu.title}," ",$l," "),$a&&$a.length?Ds(Dl({ariaLabel:bs,items:$a,totalItemCount:Ru,hasCheckmarks:Ys,hasIcons:ou,defaultMenuItemRenderer:function(Ko){return Cs(Ko,mu)},labelElementId:Ll},function(Ko,Qo){return ws(Ko,mu)}),yl):null,vu&&Su(vu,onDefaultRenderSubMenu)),reactExports.createElement(FocusRects,null))})}else return null}),function(eo,to){return!to.shouldUpdateWhenHidden&&eo.hidden&&to.hidden?!0:shallowCompare(eo,to)});ContextualMenuBase.displayName="ContextualMenuBase";function isAltOrMeta(eo){return eo.which===KeyCodes$1.alt||eo.key==="Meta"}function onItemMouseDown(eo,to){var ro;(ro=eo.onMouseDown)===null||ro===void 0||ro.call(eo,eo,to)}function onDefaultRenderSubMenu(eo,to){throw Error("ContextualMenuBase: onRenderSubMenu callback is null or undefined. Please ensure to set `onRenderSubMenu` property either manually or with `styled` helper.")}function findItemByKeyFromItems(eo,to){for(var ro=0,no=to;ro=($o||ResponsiveMode.small)&&reactExports.createElement(Layer,__assign$4({ref:ws},$l),reactExports.createElement(Popup,__assign$4({role:Zs?"alertdialog":"dialog",ariaLabelledBy:No,ariaDescribedBy:Do,onDismiss:Co,shouldRestoreFocus:!_o,enableAriaHiddenSiblings:Yo,"aria-modal":!Ho},Zo),reactExports.createElement("div",{className:Sl.root,role:Ho?void 0:"document"},!Ho&&reactExports.createElement(Overlay,__assign$4({"aria-hidden":!0,isDarkThemed:wo,onClick:Eo?void 0:Co,allowTouchBodyScroll:lo},Ao)),qo?reactExports.createElement(DraggableZone,{handleSelector:qo.dragHandleSelector||"#".concat(Jo),preventDragSelector:"button",onStart:Su,onDragChange:Zl,onStop:Dl,position:Nl},ou):ou)))||null});ModalBase.displayName="Modal";var Modal=styled(ModalBase,getStyles$2,void 0,{scope:"Modal",fields:["theme","styles","enableAriaHiddenSiblings"]});Modal.displayName="Modal";var assign$1=__assign$4;function withSlots(eo,to){for(var ro=[],no=2;no0)throw new Error("Any module using getSlots must use withSlots. Please see withSlots javadoc for more info.");return _renderSlot(to[so],lo,no[so],no.slots&&no.slots[so],no._defaultStyles&&no._defaultStyles[so],no.theme)};ao.isSlot=!0,ro[so]=ao}};for(var io in to)oo(io);return ro}function _translateShorthand(eo,to){var ro,no;return typeof to=="string"||typeof to=="number"||typeof to=="boolean"?no=(ro={},ro[eo]=to,ro):no=to,no}function _constructFinalProps(eo,to){for(var ro=[],no=2;no2)return{rowGap:{value:0,unit:"px"},columnGap:{value:0,unit:"px"}};if(ro.length===2)return{rowGap:_getValueUnitGap(_getThemedSpacing(ro[0],to)),columnGap:_getValueUnitGap(_getThemedSpacing(ro[1],to))};var no=_getValueUnitGap(_getThemedSpacing(eo,to));return{rowGap:no,columnGap:no}},parsePadding=function(eo,to){if(eo===void 0||typeof eo=="number"||eo==="")return eo;var ro=eo.split(" ");return ro.length<2?_getThemedSpacing(eo,to):ro.reduce(function(no,oo){return _getThemedSpacing(no,to)+" "+_getThemedSpacing(oo,to)})},nameMap={start:"flex-start",end:"flex-end"},GlobalClassNames={root:"ms-Stack",inner:"ms-Stack-inner",child:"ms-Stack-child"},styles$2=function(eo,to,ro){var no,oo,io,so,ao,lo,uo,co,fo,ho,po,go,vo,bo=eo.className,xo=eo.disableShrink,_o=eo.enableScopedSelectors,Eo=eo.grow,So=eo.horizontal,To=eo.horizontalAlign,wo=eo.reversed,Co=eo.verticalAlign,Oo=eo.verticalFill,Ao=eo.wrap,Ro=getGlobalClassNames(GlobalClassNames,to),No=ro&&ro.childrenGap?ro.childrenGap:eo.gap,Mo=ro&&ro.maxHeight?ro.maxHeight:eo.maxHeight,Do=ro&&ro.maxWidth?ro.maxWidth:eo.maxWidth,jo=ro&&ro.padding?ro.padding:eo.padding,Fo=parseGap(No,to),$o=Fo.rowGap,Lo=Fo.columnGap,Ho="".concat(-.5*Lo.value).concat(Lo.unit),qo="".concat(-.5*$o.value).concat($o.unit),Uo={textOverflow:"ellipsis"},Yo="> "+(_o?"."+GlobalClassNames.child:"*"),Zo=(no={},no["".concat(Yo,":not(.").concat(GlobalClassNames$1.root,")")]={flexShrink:0},no);return Ao?{root:[Ro.root,{flexWrap:"wrap",maxWidth:Do,maxHeight:Mo,width:"auto",overflow:"visible",height:"100%"},To&&(oo={},oo[So?"justifyContent":"alignItems"]=nameMap[To]||To,oo),Co&&(io={},io[So?"alignItems":"justifyContent"]=nameMap[Co]||Co,io),bo,{display:"flex"},So&&{height:Oo?"100%":"auto"}],inner:[Ro.inner,(so={display:"flex",flexWrap:"wrap",marginLeft:Ho,marginRight:Ho,marginTop:qo,marginBottom:qo,overflow:"visible",boxSizing:"border-box",padding:parsePadding(jo,to),width:Lo.value===0?"100%":"calc(100% + ".concat(Lo.value).concat(Lo.unit,")"),maxWidth:"100vw"},so[Yo]=__assign$4({margin:"".concat(.5*$o.value).concat($o.unit," ").concat(.5*Lo.value).concat(Lo.unit)},Uo),so),xo&&Zo,To&&(ao={},ao[So?"justifyContent":"alignItems"]=nameMap[To]||To,ao),Co&&(lo={},lo[So?"alignItems":"justifyContent"]=nameMap[Co]||Co,lo),So&&(uo={flexDirection:wo?"row-reverse":"row",height:$o.value===0?"100%":"calc(100% + ".concat($o.value).concat($o.unit,")")},uo[Yo]={maxWidth:Lo.value===0?"100%":"calc(100% - ".concat(Lo.value).concat(Lo.unit,")")},uo),!So&&(co={flexDirection:wo?"column-reverse":"column",height:"calc(100% + ".concat($o.value).concat($o.unit,")")},co[Yo]={maxHeight:$o.value===0?"100%":"calc(100% - ".concat($o.value).concat($o.unit,")")},co)]}:{root:[Ro.root,(fo={display:"flex",flexDirection:So?wo?"row-reverse":"row":wo?"column-reverse":"column",flexWrap:"nowrap",width:"auto",height:Oo?"100%":"auto",maxWidth:Do,maxHeight:Mo,padding:parsePadding(jo,to),boxSizing:"border-box"},fo[Yo]=Uo,fo),xo&&Zo,Eo&&{flexGrow:Eo===!0?1:Eo},To&&(ho={},ho[So?"justifyContent":"alignItems"]=nameMap[To]||To,ho),Co&&(po={},po[So?"alignItems":"justifyContent"]=nameMap[Co]||Co,po),So&&Lo.value>0&&(go={},go[wo?"".concat(Yo,":not(:last-child)"):"".concat(Yo,":not(:first-child)")]={marginLeft:"".concat(Lo.value).concat(Lo.unit)},go),!So&&$o.value>0&&(vo={},vo[wo?"".concat(Yo,":not(:last-child)"):"".concat(Yo,":not(:first-child)")]={marginTop:"".concat($o.value).concat($o.unit)},vo),bo]}},StackView=function(eo){var to=eo.as,ro=to===void 0?"div":to,no=eo.disableShrink,oo=no===void 0?!1:no,io=eo.doNotRenderFalsyValues,so=io===void 0?!1:io,ao=eo.enableScopedSelectors,lo=ao===void 0?!1:ao,uo=eo.wrap,co=__rest$1(eo,["as","disableShrink","doNotRenderFalsyValues","enableScopedSelectors","wrap"]),fo=_processStackChildren(eo.children,{disableShrink:oo,enableScopedSelectors:lo,doNotRenderFalsyValues:so}),ho=getNativeProps(co,htmlElementProperties),po=getSlots(eo,{root:ro,inner:"div"});return uo?withSlots(po.root,__assign$4({},ho),withSlots(po.inner,null,fo)):withSlots(po.root,__assign$4({},ho),fo)};function _processStackChildren(eo,to){var ro=to.disableShrink,no=to.enableScopedSelectors,oo=to.doNotRenderFalsyValues,io=reactExports.Children.toArray(eo);return io=reactExports.Children.map(io,function(so){if(!so)return oo?null:so;if(!reactExports.isValidElement(so))return so;if(so.type===reactExports.Fragment)return so.props.children?_processStackChildren(so.props.children,{disableShrink:ro,enableScopedSelectors:no,doNotRenderFalsyValues:oo}):null;var ao=so,lo={};_isStackItem(so)&&(lo={shrink:!ro});var uo=ao.props.className;return reactExports.cloneElement(ao,__assign$4(__assign$4(__assign$4(__assign$4({},lo),ao.props),uo&&{className:uo}),no&&{className:css$3(GlobalClassNames.child,uo)}))}),io}function _isStackItem(eo){return!!eo&&typeof eo=="object"&&!!eo.type&&eo.type.displayName===StackItem.displayName}var StackStatics={Item:StackItem},Stack$2=createComponent(StackView,{displayName:"Stack",styles:styles$2,statics:StackStatics});const AzureContentSafetyIcon="data:image/svg+xml,%3csvg%20id='uuid-40011f3f-22d0-4882-8376-afe2ef514a7e'%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%3e%3cdefs%3e%3clinearGradient%20id='uuid-5c4dfc33-1236-40a5-b487-5c8d33e4013b'%20x1='12.062'%20y1='5.427'%20x2='12.062'%20y2='3.991'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2376bc2d'/%3e%3cstop%20offset='1'%20stop-color='%2386d633'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-5dc2ae3c-3a23-47ff-9dc1-e087ff0e2742'%20x1='2.902'%20y1='6.762'%20x2='9.455'%20y2='6.762'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23e6e6e6'/%3e%3cstop%20offset='1'%20stop-color='%23999'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-d781b8b0-afbe-4f6e-a478-ee1974441cbf'%20x1='-1288.505'%20y1='-521.774'%20x2='-1284.777'%20y2='-521.774'%20gradientTransform='translate(-512.319%201291.819)%20rotate(90)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2386d633'/%3e%3cstop%20offset='1'%20stop-color='%2376bc2d'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-efb884ed-afc6-4667-82f2-34983e82b107'%20x1='2.902'%20y1='11.544'%20x2='9.455'%20y2='11.544'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23e6e6e6'/%3e%3cstop%20offset='1'%20stop-color='%23999'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-e8c8c19d-aa6c-48ed-823e-cfec5a014d78'%20x1='-274.183'%20y1='-521.774'%20x2='-279.397'%20y2='-521.774'%20gradientTransform='translate(-512.319%20-263.224)%20rotate(-90)%20scale(1%20-1)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23faa21d'/%3e%3cstop%20offset='.999'%20stop-color='%23f78d1e'/%3e%3c/linearGradient%3e%3clinearGradient%20id='uuid-7a6a88dd-1778-43da-9238-45bfc5a17b3e'%20x1='-140.646'%20y1='13.626'%20x2='-143.764'%20y2='4.784'%20gradientTransform='translate(149.182)%20skewX(-19.425)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2350e6ff'/%3e%3cstop%20offset='1'%20stop-color='%239cebff'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='m16.62,4.541l-2.765-1.597c-.129-.075-.291.019-.291.168v.822h-6.158v1.55h6.158v.822c0,.149.161.242.291.168l2.765-1.597c.129-.075.129-.261,0-.336Z'%20fill='url(%23uuid-5c4dfc33-1236-40a5-b487-5c8d33e4013b)'/%3e%3cpath%20d='m4.495,9.616h-1.592v-4.634c-.002-.591.476-1.071,1.067-1.073,0,0,.001,0,.002,0h5.484v1.592h-4.96v4.115Z'%20fill='url(%23uuid-5dc2ae3c-3a23-47ff-9dc1-e087ff0e2742)'/%3e%3ccircle%20cx='9.455'%20cy='4.603'%20r='2.607'%20fill='url(%23uuid-d781b8b0-afbe-4f6e-a478-ee1974441cbf)'/%3e%3cpath%20d='m9.455,14.4H3.971c-.591,0-1.07-.48-1.069-1.071,0,0,0-.001,0-.002v-4.638h1.592v4.115h4.96v1.596Z'%20fill='url(%23uuid-efb884ed-afc6-4667-82f2-34983e82b107)'/%3e%3ccircle%20cx='9.455'%20cy='13.397'%20r='2.607'%20fill='url(%23uuid-e8c8c19d-aa6c-48ed-823e-cfec5a014d78)'/%3e%3cpath%20d='m5.008,12.097H1.696c-.272,0-.453-.301-.405-.673l.584-4.534c.048-.372.307-.673.578-.673h3.312c.272,0,.453.301.405.673l-.584,4.534c-.048.372-.307.673-.578.673Z'%20fill='url(%23uuid-7a6a88dd-1778-43da-9238-45bfc5a17b3e)'/%3e%3cpath%20d='m.362,3.138C.162,3.138,0,2.976,0,2.777h0V.361C0,.162.162,0,.362,0h2.266c.2,0,.362.162.362.361,0,.199-.162.361-.362.361H.724v2.053c0,.199-.161.362-.361.362,0,0,0,0-.001,0Zm17.638-.361V.361C18,.162,17.838,0,17.638,0h-2.266c-.2,0-.362.162-.362.361s.162.361.362.361h1.904v2.053c0,.199.162.361.362.361.2,0,.361-.162.362-.361h0ZM2.99,17.639c0-.199-.162-.361-.362-.361H.724v-2.053c0-.199-.162-.361-.362-.361-.2,0-.362.162-.362.361v2.415c0,.199.163.36.362.36h2.266c.2,0,.362-.162.362-.361Zm15.01.001v-2.415c0-.199-.162-.361-.362-.361-.2,0-.361.162-.362.361v2.053h-1.904c-.2,0-.362.162-.362.362,0,.199.162.361.362.361h2.266c.199,0,.361-.161.362-.36Z'%20fill='%2376bc2d'/%3e%3c/svg%3e",BingLogoIcon="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20234%20343.41'%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='-29.25'%20y1='662.02'%20x2='-23.09'%20y2='658.46'%20gradientTransform='matrix(24.45,%200,%200,%20-24.45,%20967.18,%2016420.97)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2337bdff'/%3e%3cstop%20offset='0.18'%20stop-color='%2333bffd'/%3e%3cstop%20offset='0.36'%20stop-color='%2328c5f5'/%3e%3cstop%20offset='0.53'%20stop-color='%2315d0e9'/%3e%3cstop%20offset='0.55'%20stop-color='%2312d1e7'/%3e%3cstop%20offset='0.59'%20stop-color='%231cd2e5'/%3e%3cstop%20offset='0.77'%20stop-color='%2342d8dc'/%3e%3cstop%20offset='0.91'%20stop-color='%2359dbd6'/%3e%3cstop%20offset='1'%20stop-color='%2362dcd4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='b'%20x1='-32.86'%20y1='656.68'%20x2='-23.89'%20y2='656.68'%20gradientTransform='matrix(24.45,%200,%200,%20-24.45,%20967.18,%2016420.97)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%2339d2ff'/%3e%3cstop%20offset='0.15'%20stop-color='%2338cefe'/%3e%3cstop%20offset='0.29'%20stop-color='%2335c3fa'/%3e%3cstop%20offset='0.43'%20stop-color='%232fb0f3'/%3e%3cstop%20offset='0.55'%20stop-color='%23299aeb'/%3e%3cstop%20offset='0.58'%20stop-color='%232692ec'/%3e%3cstop%20offset='0.76'%20stop-color='%231a6cf1'/%3e%3cstop%20offset='0.91'%20stop-color='%231355f4'/%3e%3cstop%20offset='1'%20stop-color='%23104cf5'/%3e%3c/linearGradient%3e%3clinearGradient%20id='c'%20x1='-31.2'%20y1='655.9'%20x2='-31.2'%20y2='667.89'%20gradientTransform='matrix(24.45,%200,%200,%20-24.45,%20967.18,%2016420.97)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%231b48ef'/%3e%3cstop%20offset='0.12'%20stop-color='%231c51f0'/%3e%3cstop%20offset='0.32'%20stop-color='%231e69f5'/%3e%3cstop%20offset='0.57'%20stop-color='%232190fb'/%3e%3cstop%20offset='1'%20stop-color='%2326b8f4'/%3e%3c/linearGradient%3e%3cclipPath%20id='d'%20transform='translate(-163%20-82.94)'%3e%3crect%20x='163.02'%20y='288.38'%20width='227.17'%20height='140.76'%20style='fill:none'/%3e%3c/clipPath%3e%3clinearGradient%20id='e'%20x1='-31.08'%20y1='654.47'%20x2='-25.54'%20y2='660'%20gradientTransform='matrix(24.45,%200,%200,%20-24.45,%20967.18,%2016420.97)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23fff'/%3e%3cstop%20offset='0.37'%20stop-color='%23fdfdfd'/%3e%3cstop%20offset='0.51'%20stop-color='%23f6f6f6'/%3e%3cstop%20offset='0.6'%20stop-color='%23ebebeb'/%3e%3cstop%20offset='0.68'%20stop-color='%23dadada'/%3e%3cstop%20offset='0.75'%20stop-color='%23c4c4c4'/%3e%3cstop%20offset='0.81'%20stop-color='%23a8a8a8'/%3e%3cstop%20offset='0.86'%20stop-color='%23888'/%3e%3cstop%20offset='0.91'%20stop-color='%23626262'/%3e%3cstop%20offset='0.95'%20stop-color='%23373737'/%3e%3cstop%20offset='0.99'%20stop-color='%23090909'/%3e%3cstop%20offset='1'/%3e%3c/linearGradient%3e%3cclipPath%20id='f'%20transform='translate(-163%20-82.94)'%3e%3crect%20x='163.02'%20y='82.87'%20width='86.51'%20height='302.96'%20style='fill:none'/%3e%3c/clipPath%3e%3clinearGradient%20id='g'%20x1='-31.2'%20y1='668.1'%20x2='-31.2'%20y2='656.02'%20xlink:href='%23e'/%3e%3c/defs%3e%3ctitle%3ebing-logo%3c/title%3e%3cpath%20d='M397,303.4a92.73,92.73,0,0,1-24.84,63.16,41.81,41.81,0,0,0,4.5-6,38.11,38.11,0,0,0,2.69-5.08,17.7,17.7,0,0,0,.74-1.78,17.25,17.25,0,0,0,.65-1.78c.21-.56.39-1.14.55-1.72s.33-1.2.46-1.81l.07-.21c.14-.6.25-1.2.37-1.81s.23-1.25.33-1.88v0c.09-.58.16-1.16.21-1.76a40,40,0,0,0,.21-4.13A41.41,41.41,0,0,0,377,317.11a36.51,36.51,0,0,0-2.85-4.17,39.93,39.93,0,0,0-4-4.43,41.45,41.45,0,0,0-12.36-8.28,38.78,38.78,0,0,0-6.22-2.14l-.09,0-.74-.25-10.81-3.71v0l-28.27-9.72c-.09,0-.21,0-.28,0l-1.77-.65A26.23,26.23,0,0,1,296.29,272L286,245.62l-11.83-30.16-2.27-5.82-.58-1.18a13.35,13.35,0,0,1-1-5.08,12,12,0,0,1,0-1.35,13.19,13.19,0,0,1,18.26-10.79l52.69,27,10.39,5.31A91.11,91.11,0,0,1,367,235a92.45,92.45,0,0,1,29.79,61.87C396.91,299.06,397,301.22,397,303.4Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23a)'/%3e%3cpath%20d='M382.91,338.56a42.8,42.8,0,0,1-.72,7.82c-.14.67-.28,1.35-.44,2-.3,1.2-.62,2.36-1,3.53-.21.6-.42,1.2-.65,1.78s-.49,1.18-.74,1.78a38.1,38.1,0,0,1-2.69,5.08,42.22,42.22,0,0,1-4.5,6c-7.68,8.49-33.75,23.63-43.36,29.79l-21.33,13c-15.63,9.63-30.41,16.45-49,16.91-.88,0-1.74,0-2.6,0-1.2,0-2.39,0-3.57-.07a92.86,92.86,0,0,1-74.92-43.17,91.58,91.58,0,0,1-13.68-38.67,41.13,41.13,0,0,0,60,28.95l.14-.07,2.09-1.25,8.49-5,10.81-6.4v-.3l1.39-.83,96.71-57.29,7.44-4.41.74.25.09,0a38.31,38.31,0,0,1,6.22,2.14,41.45,41.45,0,0,1,12.36,8.28,40,40,0,0,1,4,4.43,37,37,0,0,1,2.85,4.17A41.64,41.64,0,0,1,382.91,338.56Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23b)'/%3e%3cpath%20d='M245.24,147.35l0,213.29L234.39,367l-8.5,5-2.09,1.27a.24.24,0,0,0-.13.06,41.13,41.13,0,0,1-60-28.94c-.16-.89-.28-1.81-.38-2.7-.13-1.68-.22-3.33-.25-5v-240a13.77,13.77,0,0,1,21.46-11.41l42.07,27.48a5.55,5.55,0,0,0,.73.51A41.14,41.14,0,0,1,245.24,147.35Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23c)'/%3e%3cg%20style='opacity:0.14900000393390656;isolation:isolate'%3e%3cg%20style='clip-path:url(%23d)'%3e%3cpath%20d='M382.91,338.56a42.8,42.8,0,0,1-.72,7.82c-.14.67-.28,1.35-.44,2-.3,1.2-.62,2.36-1,3.53-.21.6-.42,1.2-.65,1.78s-.49,1.18-.74,1.78a38.1,38.1,0,0,1-2.69,5.08,41.81,41.81,0,0,1-4.5,6c-7.68,8.49-33.75,23.63-43.36,29.79l-21.33,13c-15.63,9.63-30.41,16.45-49,16.91-.88,0-1.74,0-2.6,0-1.2,0-2.39,0-3.57-.07a92.86,92.86,0,0,1-74.92-43.17,91.58,91.58,0,0,1-13.68-38.67,41.13,41.13,0,0,0,60,28.95l.14-.07,2.09-1.25,8.49-5,10.81-6.4v-.3l1.39-.83,96.71-57.29,7.44-4.41.74.25.09,0a38.31,38.31,0,0,1,6.22,2.14,41.45,41.45,0,0,1,12.36,8.28,40,40,0,0,1,4,4.43,37,37,0,0,1,2.85,4.17A41.64,41.64,0,0,1,382.91,338.56Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23e)'/%3e%3c/g%3e%3c/g%3e%3cg%20style='opacity:0.09799999743700027;isolation:isolate'%3e%3cg%20style='clip-path:url(%23f)'%3e%3cpath%20d='M245.24,147.35l0,213.29L234.39,367l-8.5,5-2.09,1.27a.24.24,0,0,0-.13.06,41.13,41.13,0,0,1-60-28.94c-.16-.89-.28-1.81-.38-2.7-.13-1.68-.22-3.33-.25-5v-240a13.77,13.77,0,0,1,21.46-11.41l42.07,27.48a5.55,5.55,0,0,0,.73.51A41.14,41.14,0,0,1,245.24,147.35Z'%20transform='translate(-163%20-82.94)'%20style='fill:url(%23g)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",DefaultIcon=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 18 18",children:[jsxRuntimeExports.jsxs("defs",{children:[jsxRuntimeExports.jsxs("linearGradient",{id:"a5efbc52-c9a4-425f-9d94-50e000195659",x1:"9",y1:"18.967",x2:"9",y2:"3.398",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:"0",stopColor:"#0078d4"}),jsxRuntimeExports.jsx("stop",{offset:"0.156",stopColor:"#1380da"}),jsxRuntimeExports.jsx("stop",{offset:"0.528",stopColor:"#3c91e5"}),jsxRuntimeExports.jsx("stop",{offset:"0.822",stopColor:"#559cec"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#5ea0ef"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"a110d41d-e4ca-48ee-9efe-328e60a20dcc",x1:"9",y1:"5.019",x2:"9",y2:"13.676",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:"0.22",stopColor:"#fff"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#e6e6e6"})]}),jsxRuntimeExports.jsxs("linearGradient",{id:"bcf81335-a15c-4e8a-85c4-cb14c4ef74b0",x1:"8.991",y1:"2.883",x2:"8.991",y2:"11.32",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:"0.22",stopColor:"#fff"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#e6e6e6"})]})]}),jsxRuntimeExports.jsx("g",{id:"b5d797c5-507f-4358-b61e-ca040c36ef52",children:jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("path",{d:"M.038,9.142,4.4,16.69a.285.285,0,0,0,.246.142h8.716a.285.285,0,0,0,.246-.142l4.358-7.548a.283.283,0,0,0,0-.284L13.6,1.31a.285.285,0,0,0-.246-.142H4.642A.285.285,0,0,0,4.4,1.31L.038,8.858A.283.283,0,0,0,.038,9.142Z",fill:"url(#a5efbc52-c9a4-425f-9d94-50e000195659)"}),jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("path",{id:"a81cd782-d573-434f-a6f1-758ffbb6f88b",d:"M12.239,6.083l.048.042a.085.085,0,0,0,.115,0l.447-.374.808-1.334a.083.083,0,0,0,0-.1l-.138-.145a.085.085,0,0,0-.1,0l-1.273.863L11.78,5.5a.086.086,0,0,0,0,.109l.049.048L9.2,8.394l-.543-.6-.6.6a1.093,1.093,0,0,1-.26.911.945.945,0,0,1-.826.3L4.376,12.232a.163.163,0,0,0,0,.231l0,.005,1.255,1.3a.162.162,0,0,0,.23.011l.011-.011L8.4,11.14a1.037,1.037,0,0,1,.3-.869.964.964,0,0,1,.826-.3l.6-.6L9.6,8.78Z",opacity:"0.4",fill:"url(#a110d41d-e4ca-48ee-9efe-328e60a20dcc)"}),jsxRuntimeExports.jsx("path",{d:"M13.283,12.057l-.6-.645L8.648,7.278h0l-.2-.218a2.242,2.242,0,0,0-.525-2.2,2.067,2.067,0,0,0-1.865-.6.09.09,0,0,0-.065.11.088.088,0,0,0,.017.035l1.05,1.068a.091.091,0,0,1,0,.085L6.808,6.65a.084.084,0,0,1-.061.06l-1.074.3a.084.084,0,0,1-.084,0l-1.02-1.08a.084.084,0,0,0-.145.054,2.19,2.19,0,0,0,.6,1.919,2.035,2.035,0,0,0,2.034.543l.036.043.23.235h0l4.592,4.828a.954.954,0,0,0,1.34.048l.048-.048a1.017,1.017,0,0,0,.284-.724A1.117,1.117,0,0,0,13.283,12.057Z",fill:"url(#bcf81335-a15c-4e8a-85c4-cb14c4ef74b0)"})]})]})})]}),OpenAIIcon$1=()=>jsxRuntimeExports.jsxs("svg",{fill:"currentColor",width:"16px",height:"16px",viewBox:"0 0 2048 2048",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("title",{children:"OpenAI icon"}),jsxRuntimeExports.jsx("path",{d:"M832 676l575 288v760l-575 288-575-288V964l575-288zm0 144l-368 184 368 183 368-183-368-184zm-447 825l383 191v-538l-383-191v538zm894 0v-538l-383 191v538l383-191zm577-733q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9zM704 496q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9zm1206-48q0 23-15 38t-39 16q-27 0-57 11t-58 28-54 37-45 40q-19 19-39 44t-38 54-28 59-11 57q0 23-15 38t-39 16q-23 0-38-15t-16-39q0-27-11-57t-28-58-37-54-40-45q-19-19-44-39t-54-38-59-28-57-11q-23 0-38-15t-16-39q0-23 15-38t39-16q27 0 57-11t58-28 54-37 45-40q19-19 39-44t38-54 28-59 11-57q0-23 15-38t39-16q23 0 38 15t16 39q0 27 11 57t28 58 37 54 40 45q19 19 44 39t54 38 59 28 57 11q23 0 38 15t16 39zm-438 212q38-65 92-119t120-93q-65-38-119-92t-93-120q-38 65-92 119t-120 93q65 38 119 92t93 120z"})]}),PromptIcon=()=>jsxRuntimeExports.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9.5 6.50238C9.5 6.22624 9.72386 6.00238 10 6.00238C10.2761 6.00238 10.5 6.22624 10.5 6.50238V7.50391C10.5 7.78005 10.2761 8.00391 10 8.00391C9.72386 8.00391 9.5 7.78005 9.5 7.50391V6.50238ZM12.8506 7.44332C12.6553 7.24806 12.3388 7.24806 12.1435 7.44332L11.4353 8.15151C11.2401 8.34677 11.2401 8.66335 11.4353 8.85861C11.6306 9.05388 11.9472 9.05388 12.1424 8.85861L12.8506 8.15043C13.0459 7.95517 13.0459 7.63858 12.8506 7.44332ZM7.8521 7.44332C7.65684 7.24806 7.34026 7.24806 7.145 7.44332C6.94973 7.63858 6.94973 7.95517 7.145 8.15043L7.85318 8.85861C8.04844 9.05388 8.36503 9.05388 8.56029 8.85861C8.75555 8.66335 8.75555 8.34677 8.56029 8.15151L7.8521 7.44332ZM10 2C13.3137 2 16 4.59693 16 7.80041C16 9.47737 15.2546 11.0164 13.7961 12.3942C13.7324 12.4544 13.6831 12.5269 13.6512 12.6065L13.6251 12.6883L12.6891 16.6051C12.5048 17.3763 11.8236 17.935 11.0181 17.9947L10.8748 18H9.12546C8.30655 18 7.59 17.4839 7.34866 16.7385L7.31108 16.6047L6.37626 12.6886C6.34955 12.5766 6.29016 12.4745 6.20516 12.3942C4.8153 11.0819 4.07265 9.62354 4.00507 8.03903L4 7.80041L4.00321 7.60894C4.1077 4.49409 6.75257 2 10 2ZM7.955 15L8.27386 16.3344L8.30004 16.4305C8.39695 16.7298 8.67583 16.9517 9.0116 16.993L9.12546 17L10.8379 17.0007L10.9442 16.9974C11.2865 16.9721 11.5726 16.7609 11.6854 16.4718L11.7165 16.3727L12.045 15H7.955ZM10 3C7.36782 3 5.21188 4.95301 5.0151 7.41357L5.00307 7.62569L4.99977 7.77916L5.00416 7.99642C5.05977 9.30026 5.67758 10.5208 6.89167 11.6671C7.07995 11.8449 7.22191 12.0647 7.30572 12.3078L7.34894 12.4564L7.716 14H9.50024V9.49707C9.50024 9.22093 9.7241 8.99707 10.0002 8.99707C10.2764 8.99707 10.5002 9.22093 10.5002 9.49707V14H12.285L12.6722 12.3851L12.7231 12.2343C12.8091 12.0198 12.9409 11.8265 13.1094 11.6673C14.3825 10.4646 15 9.18054 15 7.80041C15 5.15693 12.7689 3 10 3Z",fill:"currentColor"})}),PythonIcon=()=>jsxRuntimeExports.jsxs("svg",{width:"16px",height:"16px",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.0164 2C10.8193 2 9.03825 3.72453 9.03825 5.85185V8.51852H15.9235V9.25926H5.97814C3.78107 9.25926 2 10.9838 2 13.1111L2 18.8889C2 21.0162 3.78107 22.7407 5.97814 22.7407H8.27322V19.4815C8.27322 17.3542 10.0543 15.6296 12.2514 15.6296H19.5956C21.4547 15.6296 22.9617 14.1704 22.9617 12.3704V5.85185C22.9617 3.72453 21.1807 2 18.9836 2H13.0164ZM12.0984 6.74074C12.8589 6.74074 13.4754 6.14378 13.4754 5.40741C13.4754 4.67103 12.8589 4.07407 12.0984 4.07407C11.3378 4.07407 10.7213 4.67103 10.7213 5.40741C10.7213 6.14378 11.3378 6.74074 12.0984 6.74074Z",fill:"#327EBD"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.9834 30C21.1805 30 22.9616 28.2755 22.9616 26.1482V23.4815L16.0763 23.4815L16.0763 22.7408L26.0217 22.7408C28.2188 22.7408 29.9998 21.0162 29.9998 18.8889V13.1111C29.9998 10.9838 28.2188 9.25928 26.0217 9.25928L23.7266 9.25928V12.5185C23.7266 14.6459 21.9455 16.3704 19.7485 16.3704L12.4042 16.3704C10.5451 16.3704 9.03809 17.8296 9.03809 19.6296L9.03809 26.1482C9.03809 28.2755 10.8192 30 13.0162 30H18.9834ZM19.9015 25.2593C19.1409 25.2593 18.5244 25.8562 18.5244 26.5926C18.5244 27.329 19.1409 27.9259 19.9015 27.9259C20.662 27.9259 21.2785 27.329 21.2785 26.5926C21.2785 25.8562 20.662 25.2593 19.9015 25.2593Z",fill:"#FFDA4B"})]}),TypeScriptIcon="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20aria-label='TypeScript'%20role='img'%20viewBox='0%200%20512%20512'%3e%3crect%20width='512'%20height='512'%20rx='15%25'%20fill='%233178c6'/%3e%3cpath%20fill='%23ffffff'%20d='m233%20284h64v-41H118v41h64v183h51zm84%20173c8.1%204.2%2018%207.3%2029%209.4s23%203.1%2035%203.1c12%200%2023-1.1%2034-3.4c11-2.3%2020-6.1%2028-11c8.1-5.3%2015-12%2019-21s7.1-19%207.1-32c0-9.1-1.4-17-4.1-24s-6.6-13-12-18c-5.1-5.3-11-10-18-14s-15-8.2-24-12c-6.6-2.7-12-5.3-18-7.9c-5.2-2.6-9.7-5.2-13-7.8c-3.7-2.7-6.5-5.5-8.5-8.4c-2-3-3-6.3-3-10c0-3.4.89-6.5%202.7-9.3s4.3-5.1%207.5-7.1c3.2-2%207.2-3.5%2012-4.6c4.7-1.1%209.9-1.6%2016-1.6c4.2%200%208.6.31%2013%20.94c4.6.63%209.3%201.6%2014%202.9c4.7%201.3%209.3%202.9%2014%204.9c4.4%202%208.5%204.3%2012%206.9v-47c-7.6-2.9-16-5.1-25-6.5s-19-2.1-31-2.1c-12%200-23%201.3-34%203.8s-20%206.5-28%2012c-8.1%205.4-14%2012-19%2021c-4.7%208.4-7%2018-7%2030c0%2015%204.3%2028%2013%2038c8.6%2011%2022%2019%2039%2027c6.9%202.8%2013%205.6%2019%208.3s11%205.5%2015%208.4c4.3%202.9%207.7%206.1%2010%209.5c2.5%203.4%203.8%207.4%203.8%2012c0%203.2-.78%206.2-2.3%209s-3.9%205.2-7.1%207.2s-7.1%203.6-12%204.8c-4.7%201.1-10%201.7-17%201.7c-11%200-22-1.9-32-5.7c-11-3.8-21-9.5-28.1-15.44z'/%3e%3c/svg%3e",VectorSearchIcon=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 18 18",role:"img",children:[jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsxs("linearGradient",{id:"fb5d9d20-fc2c-4e2c-bffd-dc236176d8b2",x1:"-6428.21",y1:"9646.124",x2:"-6428.21",y2:"9617.899",gradientTransform:"matrix(0.5, 0, 0, -0.5, 3224.856, 4823.856)",gradientUnits:"userSpaceOnUse",children:[jsxRuntimeExports.jsx("stop",{offset:"0",stopColor:"#5ea0ef"}),jsxRuntimeExports.jsx("stop",{offset:"0.178",stopColor:"#589eed"}),jsxRuntimeExports.jsx("stop",{offset:"0.406",stopColor:"#4897e9"}),jsxRuntimeExports.jsx("stop",{offset:"0.662",stopColor:"#2e8ce1"}),jsxRuntimeExports.jsx("stop",{offset:"0.936",stopColor:"#0a7cd7"}),jsxRuntimeExports.jsx("stop",{offset:"1",stopColor:"#0078d4"})]})}),jsxRuntimeExports.jsx("g",{id:"a05a9809-540f-4ec8-9a73-07896b5e7f5c",children:jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("path",{d:"M8.438,10.379h4.234v4.234H8.438ZM3.5,4.734H7.732V.5H4.086a.588.588,0,0,0-.588.588Zm.588,9.879H7.732V10.379H3.5v3.646A.588.588,0,0,0,4.086,14.613ZM3.5,9.674H7.732V5.44H3.5Zm9.88,4.939h3.646a.588.588,0,0,0,.588-.588V10.379H13.378ZM8.438,9.674h4.234V5.44H8.438Zm4.94,0h4.234V5.44H13.378Zm0-9.174V4.734h4.234V1.088A.588.588,0,0,0,17.024.5ZM8.438,4.734h4.234V.5H8.438Z",fill:"url(#fb5d9d20-fc2c-4e2c-bffd-dc236176d8b2)"}),jsxRuntimeExports.jsx("rect",{x:"-0.212",y:"14.751",width:"5.457",height:"1.243",rx:"0.581",transform:"translate(-10.133 6.282) rotate(-45)",fill:"#198ab3"}),jsxRuntimeExports.jsx("circle",{cx:"5.959",cy:"11.709",r:"3.744",fill:"#50e6ff"}),jsxRuntimeExports.jsx("circle",{cx:"5.952",cy:"11.642",r:"2.94",fill:"#fff"})]})})]}),DEFAULT_SIZE$1=16,toolsIcons={PromptFlowToolAzureContentSafety:jsxRuntimeExports.jsx(AzureContentSafetyIcon,{width:DEFAULT_SIZE$1,height:DEFAULT_SIZE$1}),PromptFlowToolSerpAPI:jsxRuntimeExports.jsx(DefaultIcon,{}),PromptFlowToolBing:jsxRuntimeExports.jsx(BingLogoIcon,{width:DEFAULT_SIZE$1,height:DEFAULT_SIZE$1}),PromptFlowToolAzureContentModerator:jsxRuntimeExports.jsx(AzureContentSafetyIcon,{width:DEFAULT_SIZE$1,height:DEFAULT_SIZE$1}),PromptFlowToolVectorIndexLookupByText:jsxRuntimeExports.jsx(VectorSearchIcon,{}),PromptFlowToolFaissIndexLookup:jsxRuntimeExports.jsx(VectorSearchIcon,{}),PromptFlowToolVectorDBLookup:jsxRuntimeExports.jsx(VectorSearchIcon,{}),PromptFlowToolVectorSearch:jsxRuntimeExports.jsx(VectorSearchIcon,{}),PromptFlowToolLlm:jsxRuntimeExports.jsx(OpenAIIcon$1,{}),PromptFlowToolPython:jsxRuntimeExports.jsx(PythonIcon,{}),PromptFlowToolTypeScript:jsxRuntimeExports.jsx(TypeScriptIcon,{width:DEFAULT_SIZE$1,height:DEFAULT_SIZE$1}),PromptFlowToolPrompt:jsxRuntimeExports.jsx(PromptIcon,{}),PromptFlowToolDefault:jsxRuntimeExports.jsx(DefaultIcon,{})};registerIcons({icons:{...toolsIcons}});var getRandomValues=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),rnds8=new Uint8Array(16);function rng(){if(!getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues(rnds8)}var byteToHex=[];for(var i$4=0;i$4<256;++i$4)byteToHex[i$4]=(i$4+256).toString(16).substr(1);function bytesToUuid(eo,to){var ro=to||0,no=byteToHex;return[no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],"-",no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]],no[eo[ro++]]].join("")}function v4(eo,to,ro){var no=to&&ro||0;typeof eo=="string"&&(to=eo==="binary"?new Array(16):null,eo=null),eo=eo||{};var oo=eo.random||(eo.rng||rng)();if(oo[6]=oo[6]&15|64,oo[8]=oo[8]&63|128,to)for(var io=0;io<16;++io)to[no+io]=oo[io];return to||bytesToUuid(oo)}var toposort$1={exports:{}};toposort$1.exports=function(eo){return toposort(uniqueNodes(eo),eo)};toposort$1.exports.array=toposort;function toposort(eo,to){for(var ro=eo.length,no=new Array(ro),oo={},io=ro;io--;)oo[io]||so(eo[io],io,[]);return no;function so(ao,lo,uo){if(uo.indexOf(ao)>=0){var co;try{co=", node was:"+JSON.stringify(ao)}catch{co=""}throw new Error("Cyclic dependency"+co)}if(!~eo.indexOf(ao))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(ao));if(!oo[lo]){oo[lo]=!0;var fo=to.filter(function(go){return go[0]===ao});if(lo=fo.length){var ho=uo.concat(ao);do{var po=fo[--lo][1];so(po,eo.indexOf(po),ho)}while(lo)}no[--ro]=ao}}}function uniqueNodes(eo){for(var to=[],ro=0,no=eo.length;ro1?ro-1:0),oo=1;oo2&&arguments[2]!==void 0?arguments[2]:stringToLowerCase;setPrototypeOf&&setPrototypeOf(eo,null);let no=to.length;for(;no--;){let oo=to[no];if(typeof oo=="string"){const io=ro(oo);io!==oo&&(isFrozen(to)||(to[no]=io),oo=io)}eo[oo]=!0}return eo}function cleanArray(eo){for(let to=0;to/gm),TMPLIT_EXPR=seal(/\${[\w\W]*}/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i);var EXPRESSIONS=Object.freeze({__proto__:null,MUSTACHE_EXPR,ERB_EXPR,TMPLIT_EXPR,DATA_ATTR,ARIA_ATTR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,ATTR_WHITESPACE,DOCTYPE_NAME});const getGlobal=function(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function(to,ro){if(typeof to!="object"||typeof to.createPolicy!="function")return null;let no=null;const oo="data-tt-policy-suffix";ro&&ro.hasAttribute(oo)&&(no=ro.getAttribute(oo));const io="dompurify"+(no?"#"+no:"");try{return to.createPolicy(io,{createHTML(so){return so},createScriptURL(so){return so}})}catch{return console.warn("TrustedTypes policy "+io+" could not be created."),null}};function createDOMPurify(){let eo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const to=Vo=>createDOMPurify(Vo);if(to.version="3.0.9",to.removed=[],!eo||!eo.document||eo.document.nodeType!==9)return to.isSupported=!1,to;let{document:ro}=eo;const no=ro,oo=no.currentScript,{DocumentFragment:io,HTMLTemplateElement:so,Node:ao,Element:lo,NodeFilter:uo,NamedNodeMap:co=eo.NamedNodeMap||eo.MozNamedAttrMap,HTMLFormElement:fo,DOMParser:ho,trustedTypes:po}=eo,go=lo.prototype,vo=lookupGetter(go,"cloneNode"),bo=lookupGetter(go,"nextSibling"),xo=lookupGetter(go,"childNodes"),_o=lookupGetter(go,"parentNode");if(typeof so=="function"){const Vo=ro.createElement("template");Vo.content&&Vo.content.ownerDocument&&(ro=Vo.content.ownerDocument)}let Eo,So="";const{implementation:To,createNodeIterator:wo,createDocumentFragment:Co,getElementsByTagName:Oo}=ro,{importNode:Ao}=no;let Ro={};to.isSupported=typeof entries=="function"&&typeof _o=="function"&&To&&To.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:No,ERB_EXPR:Mo,TMPLIT_EXPR:Do,DATA_ATTR:jo,ARIA_ATTR:Fo,IS_SCRIPT_OR_DATA:$o,ATTR_WHITESPACE:Lo}=EXPRESSIONS;let{IS_ALLOWED_URI:Ho}=EXPRESSIONS,qo=null;const Uo=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let Yo=null;const Zo=addToSet({},[...html$2,...svg$2,...mathMl,...xml]);let _s=Object.seal(create$4(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}})),Ss=null,As=null,Ns=!0,ws=!0,Ds=!1,Jo=!0,Cs=!1,Bs=!1,zs=!1,Ls=!1,ga=!1,Js=!1,Xs=!1,$a=!0,Ll=!1;const Kl="user-content-";let Xl=!0,Nl=!1,xa={},El=null;const cu=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ks=null;const Es=addToSet({},["audio","video","img","source","image","track"]);let bs=null;const Os=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vs="http://www.w3.org/1998/Math/MathML",Ks="http://www.w3.org/2000/svg",Ms="http://www.w3.org/1999/xhtml";let Hs=Ms,Zs=!1,xl=null;const Sl=addToSet({},[Vs,Ks,Ms],stringToString);let $l=null;const ru=["application/xhtml+xml","text/html"],au="text/html";let zl=null,pu=null;const Su=ro.createElement("form"),Zl=function(Bo){return Bo instanceof RegExp||Bo instanceof Function},Dl=function(){let Bo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(pu&&pu===Bo)){if((!Bo||typeof Bo!="object")&&(Bo={}),Bo=clone(Bo),$l=ru.indexOf(Bo.PARSER_MEDIA_TYPE)===-1?au:Bo.PARSER_MEDIA_TYPE,zl=$l==="application/xhtml+xml"?stringToString:stringToLowerCase,qo=objectHasOwnProperty(Bo,"ALLOWED_TAGS")?addToSet({},Bo.ALLOWED_TAGS,zl):Uo,Yo=objectHasOwnProperty(Bo,"ALLOWED_ATTR")?addToSet({},Bo.ALLOWED_ATTR,zl):Zo,xl=objectHasOwnProperty(Bo,"ALLOWED_NAMESPACES")?addToSet({},Bo.ALLOWED_NAMESPACES,stringToString):Sl,bs=objectHasOwnProperty(Bo,"ADD_URI_SAFE_ATTR")?addToSet(clone(Os),Bo.ADD_URI_SAFE_ATTR,zl):Os,ks=objectHasOwnProperty(Bo,"ADD_DATA_URI_TAGS")?addToSet(clone(Es),Bo.ADD_DATA_URI_TAGS,zl):Es,El=objectHasOwnProperty(Bo,"FORBID_CONTENTS")?addToSet({},Bo.FORBID_CONTENTS,zl):cu,Ss=objectHasOwnProperty(Bo,"FORBID_TAGS")?addToSet({},Bo.FORBID_TAGS,zl):{},As=objectHasOwnProperty(Bo,"FORBID_ATTR")?addToSet({},Bo.FORBID_ATTR,zl):{},xa=objectHasOwnProperty(Bo,"USE_PROFILES")?Bo.USE_PROFILES:!1,Ns=Bo.ALLOW_ARIA_ATTR!==!1,ws=Bo.ALLOW_DATA_ATTR!==!1,Ds=Bo.ALLOW_UNKNOWN_PROTOCOLS||!1,Jo=Bo.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Cs=Bo.SAFE_FOR_TEMPLATES||!1,Bs=Bo.WHOLE_DOCUMENT||!1,ga=Bo.RETURN_DOM||!1,Js=Bo.RETURN_DOM_FRAGMENT||!1,Xs=Bo.RETURN_TRUSTED_TYPE||!1,Ls=Bo.FORCE_BODY||!1,$a=Bo.SANITIZE_DOM!==!1,Ll=Bo.SANITIZE_NAMED_PROPS||!1,Xl=Bo.KEEP_CONTENT!==!1,Nl=Bo.IN_PLACE||!1,Ho=Bo.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,Hs=Bo.NAMESPACE||Ms,_s=Bo.CUSTOM_ELEMENT_HANDLING||{},Bo.CUSTOM_ELEMENT_HANDLING&&Zl(Bo.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_s.tagNameCheck=Bo.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Bo.CUSTOM_ELEMENT_HANDLING&&Zl(Bo.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_s.attributeNameCheck=Bo.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Bo.CUSTOM_ELEMENT_HANDLING&&typeof Bo.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(_s.allowCustomizedBuiltInElements=Bo.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Cs&&(ws=!1),Js&&(ga=!0),xa&&(qo=addToSet({},text),Yo=[],xa.html===!0&&(addToSet(qo,html$1),addToSet(Yo,html$2)),xa.svg===!0&&(addToSet(qo,svg$1),addToSet(Yo,svg$2),addToSet(Yo,xml)),xa.svgFilters===!0&&(addToSet(qo,svgFilters),addToSet(Yo,svg$2),addToSet(Yo,xml)),xa.mathMl===!0&&(addToSet(qo,mathMl$1),addToSet(Yo,mathMl),addToSet(Yo,xml))),Bo.ADD_TAGS&&(qo===Uo&&(qo=clone(qo)),addToSet(qo,Bo.ADD_TAGS,zl)),Bo.ADD_ATTR&&(Yo===Zo&&(Yo=clone(Yo)),addToSet(Yo,Bo.ADD_ATTR,zl)),Bo.ADD_URI_SAFE_ATTR&&addToSet(bs,Bo.ADD_URI_SAFE_ATTR,zl),Bo.FORBID_CONTENTS&&(El===cu&&(El=clone(El)),addToSet(El,Bo.FORBID_CONTENTS,zl)),Xl&&(qo["#text"]=!0),Bs&&addToSet(qo,["html","head","body"]),qo.table&&(addToSet(qo,["tbody"]),delete Ss.tbody),Bo.TRUSTED_TYPES_POLICY){if(typeof Bo.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Bo.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Eo=Bo.TRUSTED_TYPES_POLICY,So=Eo.createHTML("")}else Eo===void 0&&(Eo=_createTrustedTypesPolicy(po,oo)),Eo!==null&&typeof So=="string"&&(So=Eo.createHTML(""));freeze&&freeze(Bo),pu=Bo}},gu=addToSet({},["mi","mo","mn","ms","mtext"]),lu=addToSet({},["foreignobject","desc","title","annotation-xml"]),mu=addToSet({},["title","style","font","a","script"]),ou=addToSet({},[...svg$1,...svgFilters,...svgDisallowed]),Fl=addToSet({},[...mathMl$1,...mathMlDisallowed]),yl=function(Bo){let Xo=_o(Bo);(!Xo||!Xo.tagName)&&(Xo={namespaceURI:Hs,tagName:"template"});const vs=stringToLowerCase(Bo.tagName),ys=stringToLowerCase(Xo.tagName);return xl[Bo.namespaceURI]?Bo.namespaceURI===Ks?Xo.namespaceURI===Ms?vs==="svg":Xo.namespaceURI===Vs?vs==="svg"&&(ys==="annotation-xml"||gu[ys]):!!ou[vs]:Bo.namespaceURI===Vs?Xo.namespaceURI===Ms?vs==="math":Xo.namespaceURI===Ks?vs==="math"&&lu[ys]:!!Fl[vs]:Bo.namespaceURI===Ms?Xo.namespaceURI===Ks&&!lu[ys]||Xo.namespaceURI===Vs&&!gu[ys]?!1:!Fl[vs]&&(mu[vs]||!ou[vs]):!!($l==="application/xhtml+xml"&&xl[Bo.namespaceURI]):!1},Ys=function(Bo){arrayPush(to.removed,{element:Bo});try{Bo.parentNode.removeChild(Bo)}catch{Bo.remove()}},vu=function(Bo,Xo){try{arrayPush(to.removed,{attribute:Xo.getAttributeNode(Bo),from:Xo})}catch{arrayPush(to.removed,{attribute:null,from:Xo})}if(Xo.removeAttribute(Bo),Bo==="is"&&!Yo[Bo])if(ga||Js)try{Ys(Xo)}catch{}else try{Xo.setAttribute(Bo,"")}catch{}},Nu=function(Bo){let Xo=null,vs=null;if(Ls)Bo=""+Bo;else{const Rs=stringMatch(Bo,/^[\r\n\t ]+/);vs=Rs&&Rs[0]}$l==="application/xhtml+xml"&&Hs===Ms&&(Bo=''+Bo+"");const ys=Eo?Eo.createHTML(Bo):Bo;if(Hs===Ms)try{Xo=new ho().parseFromString(ys,$l)}catch{}if(!Xo||!Xo.documentElement){Xo=To.createDocument(Hs,"template",null);try{Xo.documentElement.innerHTML=Zs?So:ys}catch{}}const ps=Xo.body||Xo.documentElement;return Bo&&vs&&ps.insertBefore(ro.createTextNode(vs),ps.childNodes[0]||null),Hs===Ms?Oo.call(Xo,Bs?"html":"body")[0]:Bs?Xo.documentElement:ps},du=function(Bo){return wo.call(Bo.ownerDocument||Bo,Bo,uo.SHOW_ELEMENT|uo.SHOW_COMMENT|uo.SHOW_TEXT,null)},cp=function(Bo){return Bo instanceof fo&&(typeof Bo.nodeName!="string"||typeof Bo.textContent!="string"||typeof Bo.removeChild!="function"||!(Bo.attributes instanceof co)||typeof Bo.removeAttribute!="function"||typeof Bo.setAttribute!="function"||typeof Bo.namespaceURI!="string"||typeof Bo.insertBefore!="function"||typeof Bo.hasChildNodes!="function")},qu=function(Bo){return typeof ao=="function"&&Bo instanceof ao},Ru=function(Bo,Xo,vs){Ro[Bo]&&arrayForEach(Ro[Bo],ys=>{ys.call(to,Xo,vs,pu)})},_h=function(Bo){let Xo=null;if(Ru("beforeSanitizeElements",Bo,null),cp(Bo))return Ys(Bo),!0;const vs=zl(Bo.nodeName);if(Ru("uponSanitizeElement",Bo,{tagName:vs,allowedTags:qo}),Bo.hasChildNodes()&&!qu(Bo.firstElementChild)&®ExpTest(/<[/\w]/g,Bo.innerHTML)&®ExpTest(/<[/\w]/g,Bo.textContent))return Ys(Bo),!0;if(!qo[vs]||Ss[vs]){if(!Ss[vs]&&Ko(vs)&&(_s.tagNameCheck instanceof RegExp&®ExpTest(_s.tagNameCheck,vs)||_s.tagNameCheck instanceof Function&&_s.tagNameCheck(vs)))return!1;if(Xl&&!El[vs]){const ys=_o(Bo)||Bo.parentNode,ps=xo(Bo)||Bo.childNodes;if(ps&&ys){const Rs=ps.length;for(let Us=Rs-1;Us>=0;--Us)ys.insertBefore(vo(ps[Us],!0),bo(Bo))}}return Ys(Bo),!0}return Bo instanceof lo&&!yl(Bo)||(vs==="noscript"||vs==="noembed"||vs==="noframes")&®ExpTest(/<\/no(script|embed|frames)/i,Bo.innerHTML)?(Ys(Bo),!0):(Cs&&Bo.nodeType===3&&(Xo=Bo.textContent,arrayForEach([No,Mo,Do],ys=>{Xo=stringReplace(Xo,ys," ")}),Bo.textContent!==Xo&&(arrayPush(to.removed,{element:Bo.cloneNode()}),Bo.textContent=Xo)),Ru("afterSanitizeElements",Bo,null),!1)},qs=function(Bo,Xo,vs){if($a&&(Xo==="id"||Xo==="name")&&(vs in ro||vs in Su))return!1;if(!(ws&&!As[Xo]&®ExpTest(jo,Xo))){if(!(Ns&®ExpTest(Fo,Xo))){if(!Yo[Xo]||As[Xo]){if(!(Ko(Bo)&&(_s.tagNameCheck instanceof RegExp&®ExpTest(_s.tagNameCheck,Bo)||_s.tagNameCheck instanceof Function&&_s.tagNameCheck(Bo))&&(_s.attributeNameCheck instanceof RegExp&®ExpTest(_s.attributeNameCheck,Xo)||_s.attributeNameCheck instanceof Function&&_s.attributeNameCheck(Xo))||Xo==="is"&&_s.allowCustomizedBuiltInElements&&(_s.tagNameCheck instanceof RegExp&®ExpTest(_s.tagNameCheck,vs)||_s.tagNameCheck instanceof Function&&_s.tagNameCheck(vs))))return!1}else if(!bs[Xo]){if(!regExpTest(Ho,stringReplace(vs,Lo,""))){if(!((Xo==="src"||Xo==="xlink:href"||Xo==="href")&&Bo!=="script"&&stringIndexOf(vs,"data:")===0&&ks[Bo])){if(!(Ds&&!regExpTest($o,stringReplace(vs,Lo,"")))){if(vs)return!1}}}}}}return!0},Ko=function(Bo){return Bo!=="annotation-xml"&&Bo.indexOf("-")>0},Qo=function(Bo){Ru("beforeSanitizeAttributes",Bo,null);const{attributes:Xo}=Bo;if(!Xo)return;const vs={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Yo};let ys=Xo.length;for(;ys--;){const ps=Xo[ys],{name:Rs,namespaceURI:Us,value:Rl}=ps,Ml=zl(Rs);let Ol=Rs==="value"?Rl:stringTrim(Rl);if(vs.attrName=Ml,vs.attrValue=Ol,vs.keepAttr=!0,vs.forceKeepAttr=void 0,Ru("uponSanitizeAttribute",Bo,vs),Ol=vs.attrValue,vs.forceKeepAttr||(vu(Rs,Bo),!vs.keepAttr))continue;if(!Jo&®ExpTest(/\/>/i,Ol)){vu(Rs,Bo);continue}Cs&&arrayForEach([No,Mo,Do],Ul=>{Ol=stringReplace(Ol,Ul," ")});const Cl=zl(Bo.nodeName);if(qs(Cl,Ml,Ol)){if(Ll&&(Ml==="id"||Ml==="name")&&(vu(Rs,Bo),Ol=Kl+Ol),Eo&&typeof po=="object"&&typeof po.getAttributeType=="function"&&!Us)switch(po.getAttributeType(Cl,Ml)){case"TrustedHTML":{Ol=Eo.createHTML(Ol);break}case"TrustedScriptURL":{Ol=Eo.createScriptURL(Ol);break}}try{Us?Bo.setAttributeNS(Us,Rs,Ol):Bo.setAttribute(Rs,Ol),arrayPop(to.removed)}catch{}}}Ru("afterSanitizeAttributes",Bo,null)},zo=function Vo(Bo){let Xo=null;const vs=du(Bo);for(Ru("beforeSanitizeShadowDOM",Bo,null);Xo=vs.nextNode();)Ru("uponSanitizeShadowNode",Xo,null),!_h(Xo)&&(Xo.content instanceof io&&Vo(Xo.content),Qo(Xo));Ru("afterSanitizeShadowDOM",Bo,null)};return to.sanitize=function(Vo){let Bo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xo=null,vs=null,ys=null,ps=null;if(Zs=!Vo,Zs&&(Vo=""),typeof Vo!="string"&&!qu(Vo))if(typeof Vo.toString=="function"){if(Vo=Vo.toString(),typeof Vo!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!to.isSupported)return Vo;if(zs||Dl(Bo),to.removed=[],typeof Vo=="string"&&(Nl=!1),Nl){if(Vo.nodeName){const Rl=zl(Vo.nodeName);if(!qo[Rl]||Ss[Rl])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(Vo instanceof ao)Xo=Nu(""),vs=Xo.ownerDocument.importNode(Vo,!0),vs.nodeType===1&&vs.nodeName==="BODY"||vs.nodeName==="HTML"?Xo=vs:Xo.appendChild(vs);else{if(!ga&&!Cs&&!Bs&&Vo.indexOf("<")===-1)return Eo&&Xs?Eo.createHTML(Vo):Vo;if(Xo=Nu(Vo),!Xo)return ga?null:Xs?So:""}Xo&&Ls&&Ys(Xo.firstChild);const Rs=du(Nl?Vo:Xo);for(;ys=Rs.nextNode();)_h(ys)||(ys.content instanceof io&&zo(ys.content),Qo(ys));if(Nl)return Vo;if(ga){if(Js)for(ps=Co.call(Xo.ownerDocument);Xo.firstChild;)ps.appendChild(Xo.firstChild);else ps=Xo;return(Yo.shadowroot||Yo.shadowrootmode)&&(ps=Ao.call(no,ps,!0)),ps}let Us=Bs?Xo.outerHTML:Xo.innerHTML;return Bs&&qo["!doctype"]&&Xo.ownerDocument&&Xo.ownerDocument.doctype&&Xo.ownerDocument.doctype.name&®ExpTest(DOCTYPE_NAME,Xo.ownerDocument.doctype.name)&&(Us=" +`+Us),Cs&&arrayForEach([No,Mo,Do],Rl=>{Us=stringReplace(Us,Rl," ")}),Eo&&Xs?Eo.createHTML(Us):Us},to.setConfig=function(){let Vo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dl(Vo),zs=!0},to.clearConfig=function(){pu=null,zs=!1},to.isValidAttribute=function(Vo,Bo,Xo){pu||Dl({});const vs=zl(Vo),ys=zl(Bo);return qs(vs,ys,Xo)},to.addHook=function(Vo,Bo){typeof Bo=="function"&&(Ro[Vo]=Ro[Vo]||[],arrayPush(Ro[Vo],Bo))},to.removeHook=function(Vo){if(Ro[Vo])return arrayPop(Ro[Vo])},to.removeHooks=function(Vo){Ro[Vo]&&(Ro[Vo]=[])},to.removeAllHooks=function(){Ro={}},to}var purify=createDOMPurify(),eventemitter3={exports:{}};(function(eo){var to=Object.prototype.hasOwnProperty,ro="~";function no(){}Object.create&&(no.prototype=Object.create(null),new no().__proto__||(ro=!1));function oo(lo,uo,co){this.fn=lo,this.context=uo,this.once=co||!1}function io(lo,uo,co,fo,ho){if(typeof co!="function")throw new TypeError("The listener must be a function");var po=new oo(co,fo||lo,ho),go=ro?ro+uo:uo;return lo._events[go]?lo._events[go].fn?lo._events[go]=[lo._events[go],po]:lo._events[go].push(po):(lo._events[go]=po,lo._eventsCount++),lo}function so(lo,uo){--lo._eventsCount===0?lo._events=new no:delete lo._events[uo]}function ao(){this._events=new no,this._eventsCount=0}ao.prototype.eventNames=function(){var uo=[],co,fo;if(this._eventsCount===0)return uo;for(fo in co=this._events)to.call(co,fo)&&uo.push(ro?fo.slice(1):fo);return Object.getOwnPropertySymbols?uo.concat(Object.getOwnPropertySymbols(co)):uo},ao.prototype.listeners=function(uo){var co=ro?ro+uo:uo,fo=this._events[co];if(!fo)return[];if(fo.fn)return[fo.fn];for(var ho=0,po=fo.length,go=new Array(po);ho0?eo:"Unknown")}function _defineProperty$5(eo,to,ro){return to in eo?Object.defineProperty(eo,to,{value:ro,enumerable:!0,configurable:!0,writable:!0}):eo[to]=ro,eo}function _extends$b(){return _extends$b=Object.assign||function(eo){for(var to=1;to"u"?"undefined":_typeof$6(window))==="object"&&(typeof document>"u"?"undefined":_typeof$6(document))==="object"&&document.nodeType===9;function _typeof$5(eo){"@babel/helpers - typeof";return _typeof$5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(to){return typeof to}:function(to){return to&&typeof Symbol=="function"&&to.constructor===Symbol&&to!==Symbol.prototype?"symbol":typeof to},_typeof$5(eo)}function toPrimitive(eo,to){if(_typeof$5(eo)!="object"||!eo)return eo;var ro=eo[Symbol.toPrimitive];if(ro!==void 0){var no=ro.call(eo,to||"default");if(_typeof$5(no)!="object")return no;throw new TypeError("@@toPrimitive must return a primitive value.")}return(to==="string"?String:Number)(eo)}function toPropertyKey(eo){var to=toPrimitive(eo,"string");return _typeof$5(to)=="symbol"?to:String(to)}function _defineProperties$3(eo,to){for(var ro=0;ro<+~=|^:(),"'`\s])/g,nativeEscape=typeof CSS<"u"&&CSS.escape,escape=function(eo){return nativeEscape?nativeEscape(eo):eo.replace(escapeRegex,"\\$1")},BaseStyleRule=function(){function eo(ro,no,oo){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var io=oo.sheet,so=oo.Renderer;this.key=ro,this.options=oo,this.style=no,io?this.renderer=io.renderer:so&&(this.renderer=new so)}var to=eo.prototype;return to.prop=function(no,oo,io){if(oo===void 0)return this.style[no];var so=io?io.force:!1;if(!so&&this.style[no]===oo)return this;var ao=oo;(!io||io.process!==!1)&&(ao=this.options.jss.plugins.onChangeValue(oo,no,this));var lo=ao==null||ao===!1,uo=no in this.style;if(lo&&!uo&&!so)return this;var co=lo&&uo;if(co?delete this.style[no]:this.style[no]=ao,this.renderable&&this.renderer)return co?this.renderer.removeProperty(this.renderable,no):this.renderer.setProperty(this.renderable,no,ao),this;var fo=this.options.sheet;return fo&&fo.attached,this},eo}(),StyleRule=function(eo){_inheritsLoose$1(to,eo);function to(no,oo,io){var so;so=eo.call(this,no,oo,io)||this,so.selectorText=void 0,so.id=void 0,so.renderable=void 0;var ao=io.selector,lo=io.scoped,uo=io.sheet,co=io.generateId;return ao?so.selectorText=ao:lo!==!1&&(so.id=co(_assertThisInitialized$3(_assertThisInitialized$3(so)),uo),so.selectorText="."+escape(so.id)),so}var ro=to.prototype;return ro.applyTo=function(oo){var io=this.renderer;if(io){var so=this.toJSON();for(var ao in so)io.setProperty(oo,ao,so[ao])}return this},ro.toJSON=function(){var oo={};for(var io in this.style){var so=this.style[io];typeof so!="object"?oo[io]=so:Array.isArray(so)&&(oo[io]=toCssValue(so))}return oo},ro.toString=function(oo){var io=this.options.sheet,so=io?io.options.link:!1,ao=so?_extends$c({},oo,{allowEmpty:!0}):oo;return toCss(this.selectorText,this.style,ao)},_createClass$3(to,[{key:"selector",set:function(oo){if(oo!==this.selectorText){this.selectorText=oo;var io=this.renderer,so=this.renderable;if(!(!so||!io)){var ao=io.setSelector(so,oo);ao||io.replaceRule(so,this)}}},get:function(){return this.selectorText}}]),to}(BaseStyleRule),pluginStyleRule={onCreateRule:function(to,ro,no){return to[0]==="@"||no.parent&&no.parent.type==="keyframes"?null:new StyleRule(to,ro,no)}},defaultToStringOptions={indent:1,children:!0},atRegExp=/@([\w-]+)/,ConditionalRule=function(){function eo(ro,no,oo){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=ro,this.query=oo.name;var io=ro.match(atRegExp);this.at=io?io[1]:"unknown",this.options=oo,this.rules=new RuleList(_extends$c({},oo,{parent:this}));for(var so in no)this.rules.add(so,no[so]);this.rules.process()}var to=eo.prototype;return to.getRule=function(no){return this.rules.get(no)},to.indexOf=function(no){return this.rules.indexOf(no)},to.addRule=function(no,oo,io){var so=this.rules.add(no,oo,io);return so?(this.options.jss.plugins.onProcessRule(so),so):null},to.toString=function(no){if(no===void 0&&(no=defaultToStringOptions),no.indent==null&&(no.indent=defaultToStringOptions.indent),no.children==null&&(no.children=defaultToStringOptions.children),no.children===!1)return this.query+" {}";var oo=this.rules.toString(no);return oo?this.query+` { +`+oo+` +}`:""},eo}(),keyRegExp=/@media|@supports\s+/,pluginConditionalRule={onCreateRule:function(to,ro,no){return keyRegExp.test(to)?new ConditionalRule(to,ro,no):null}},defaultToStringOptions$1={indent:1,children:!0},nameRegExp=/@keyframes\s+([\w-]+)/,KeyframesRule=function(){function eo(ro,no,oo){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var io=ro.match(nameRegExp);io&&io[1]?this.name=io[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=oo;var so=oo.scoped,ao=oo.sheet,lo=oo.generateId;this.id=so===!1?this.name:escape(lo(this,ao)),this.rules=new RuleList(_extends$c({},oo,{parent:this}));for(var uo in no)this.rules.add(uo,no[uo],_extends$c({},oo,{parent:this}));this.rules.process()}var to=eo.prototype;return to.toString=function(no){if(no===void 0&&(no=defaultToStringOptions$1),no.indent==null&&(no.indent=defaultToStringOptions$1.indent),no.children==null&&(no.children=defaultToStringOptions$1.children),no.children===!1)return this.at+" "+this.id+" {}";var oo=this.rules.toString(no);return oo&&(oo=` +`+oo+` +`),this.at+" "+this.id+" {"+oo+"}"},eo}(),keyRegExp$1=/@keyframes\s+/,refRegExp$1=/\$([\w-]+)/g,findReferencedKeyframe=function(to,ro){return typeof to=="string"?to.replace(refRegExp$1,function(no,oo){return oo in ro?ro[oo]:no}):to},replaceRef=function(to,ro,no){var oo=to[ro],io=findReferencedKeyframe(oo,no);io!==oo&&(to[ro]=io)},plugin={onCreateRule:function(to,ro,no){return typeof to=="string"&&keyRegExp$1.test(to)?new KeyframesRule(to,ro,no):null},onProcessStyle:function(to,ro,no){return ro.type!=="style"||!no||("animation-name"in to&&replaceRef(to,"animation-name",no.keyframes),"animation"in to&&replaceRef(to,"animation",no.keyframes)),to},onChangeValue:function(to,ro,no){var oo=no.options.sheet;if(!oo)return to;switch(ro){case"animation":return findReferencedKeyframe(to,oo.keyframes);case"animation-name":return findReferencedKeyframe(to,oo.keyframes);default:return to}}},KeyframeRule=function(eo){_inheritsLoose$1(to,eo);function to(){for(var no,oo=arguments.length,io=new Array(oo),so=0;so=this.index){oo.push(no);return}for(var so=0;soio){oo.splice(so,0,no);return}}},to.reset=function(){this.registry=[]},to.remove=function(no){var oo=this.registry.indexOf(no);this.registry.splice(oo,1)},to.toString=function(no){for(var oo=no===void 0?{}:no,io=oo.attached,so=_objectWithoutPropertiesLoose$3(oo,["attached"]),ao="",lo=0;loto.index&&no.options.insertionPoint===to.insertionPoint)return no}return null}function findHighestSheet(eo,to){for(var ro=eo.length-1;ro>=0;ro--){var no=eo[ro];if(no.attached&&no.options.insertionPoint===to.insertionPoint)return no}return null}function findCommentNode(eo){for(var to=getHead(),ro=0;ro0){var ro=findHigherSheet(to,eo);if(ro&&ro.renderer)return{parent:ro.renderer.element.parentNode,node:ro.renderer.element};if(ro=findHighestSheet(to,eo),ro&&ro.renderer)return{parent:ro.renderer.element.parentNode,node:ro.renderer.element.nextSibling}}var no=eo.insertionPoint;if(no&&typeof no=="string"){var oo=findCommentNode(no);if(oo)return{parent:oo.parentNode,node:oo.nextSibling}}return!1}function insertStyle(eo,to){var ro=to.insertionPoint,no=findPrevNode(to);if(no!==!1&&no.parent){no.parent.insertBefore(eo,no.node);return}if(ro&&typeof ro.nodeType=="number"){var oo=ro,io=oo.parentNode;io&&io.insertBefore(eo,oo.nextSibling);return}getHead().appendChild(eo)}var getNonce$1=memoize$2(function(){var eo=document.querySelector('meta[property="csp-nonce"]');return eo?eo.getAttribute("content"):null}),_insertRule=function(to,ro,no){var oo=to.cssRules.length;(no===void 0||no>oo)&&(no=oo);try{if("insertRule"in to){var io=to;io.insertRule(ro,no)}else if("appendRule"in to){var so=to;so.appendRule(ro)}}catch{return!1}return to.cssRules[no]},createStyle=function(){var to=document.createElement("style");return to.textContent=` +`,to},DomRenderer=function(){function eo(ro){this.getPropertyValue=getPropertyValue,this.setProperty=setProperty,this.removeProperty=removeProperty,this.setSelector=setSelector,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,ro&&sheets.add(ro),this.sheet=ro;var no=this.sheet?this.sheet.options:{},oo=no.media,io=no.meta,so=no.element;this.element=so||createStyle(),this.element.setAttribute("data-jss",""),oo&&this.element.setAttribute("media",oo),io&&this.element.setAttribute("data-meta",io);var ao=getNonce$1();ao&&this.element.setAttribute("nonce",ao)}var to=eo.prototype;return to.attach=function(){if(!(this.element.parentNode||!this.sheet)){insertStyle(this.element,this.sheet.options);var no=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&no&&(this.hasInsertedRules=!1,this.deploy())}},to.detach=function(){var no=this.element.parentNode;no&&no.removeChild(this.element)},to.deploy=function(){var no=this.sheet;if(no){if(no.options.link){this.insertRules(no.rules);return}this.element.textContent=` +`+no.toString()+` +`}},to.insertRules=function(no,oo){for(var io=0;io0&&(oo.refs--,oo.refs===0&&oo.sheet.detach()):warning(!1,"SheetsManager: can't find sheet to unmanage")},_createClass$3(eo,[{key:"size",get:function(){return this.length}}]),eo}();/** + * A better abstraction over CSS. + * + * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present + * @website https://github.com/cssinjs/jss + * @license MIT + */var hasCSSTOMSupport=typeof CSS<"u"&&CSS&&"number"in CSS,create$3=function(to){return new Jss(to)},index$4=create$3(),now=Date.now(),fnValuesNs="fnValues"+now,fnRuleNs="fnStyle"+ ++now;function functionPlugin(){return{onCreateRule:function(to,ro,no){if(typeof ro!="function")return null;var oo=createRule(to,{},no);return oo[fnRuleNs]=ro,oo},onProcessStyle:function(to,ro){if(fnValuesNs in ro||fnRuleNs in ro)return to;var no={};for(var oo in to){var io=to[oo];typeof io=="function"&&(delete to[oo],no[oo]=io)}return ro[fnValuesNs]=no,to},onUpdate:function(to,ro,no,oo){var io=ro,so=io[fnRuleNs];so&&(io.style=so(to)||{});var ao=io[fnValuesNs];if(ao)for(var lo in ao)io.prop(lo,ao[lo](to),oo)}}}function symbolObservablePonyfill(eo){var to,ro=eo.Symbol;return typeof ro=="function"?ro.observable?to=ro.observable:(to=ro("observable"),ro.observable=to):to="@@observable",to}var root$1;typeof self<"u"?root$1=self:typeof window<"u"?root$1=window:typeof global<"u"?root$1=global:typeof module<"u"?root$1=module:root$1=Function("return this")();var result=symbolObservablePonyfill(root$1),isObservable$1=function(to){return to&&to[result]&&to===to[result]()};function observablePlugin(eo){return{onCreateRule:function(ro,no,oo){if(!isObservable$1(no))return null;var io=no,so=createRule(ro,{},oo);return io.subscribe(function(ao){for(var lo in ao)so.prop(lo,ao[lo],eo)}),so},onProcessRule:function(ro){if(!(ro&&ro.type!=="style")){var no=ro,oo=no.style,io=function(uo){var co=oo[uo];if(!isObservable$1(co))return"continue";delete oo[uo],co.subscribe({next:function(ho){no.prop(uo,ho,eo)}})};for(var so in oo)var ao=io(so)}}}}var semiWithNl=/;\n/,parse$m=function(eo){for(var to={},ro=eo.split(semiWithNl),no=0;no-1)return registerClass(eo,to.split(" "));var oo=eo.options,io=oo.parent;if(to[0]==="$"){var so=io.getRule(to.substr(1));return!so||so===eo?!1:(io.classes[eo.key]+=" "+io.classes[so.key],!0)}return io.classes[eo.key]+=" "+to,!0}function jssCompose(){function eo(to,ro){return"composes"in to&&(registerClass(ro,to.composes),delete to.composes),to}return{onProcessStyle:eo}}var uppercasePattern=/[A-Z]/g,msPattern=/^ms-/,cache$3={};function toHyphenLower(eo){return"-"+eo.toLowerCase()}function hyphenateStyleName(eo){if(cache$3.hasOwnProperty(eo))return cache$3[eo];var to=eo.replace(uppercasePattern,toHyphenLower);return cache$3[eo]=msPattern.test(to)?"-"+to:to}function convertCase(eo){var to={};for(var ro in eo){var no=ro.indexOf("--")===0?ro:hyphenateStyleName(ro);to[no]=eo[ro]}return eo.fallbacks&&(Array.isArray(eo.fallbacks)?to.fallbacks=eo.fallbacks.map(convertCase):to.fallbacks=convertCase(eo.fallbacks)),to}function camelCase(){function eo(ro){if(Array.isArray(ro)){for(var no=0;noeo.length)&&(to=eo.length);for(var ro=0,no=new Array(to);ro-1){var io=propMap$1[to];if(!Array.isArray(io))return prefix$2.js+pascalize(io)in ro?prefix$2.css+io:!1;if(!oo)return!1;for(var so=0;sono?1:-1:ro.length-no.length};return{onProcessStyle:function(ro,no){if(no.type!=="style")return ro;for(var oo={},io=Object.keys(ro).sort(eo),so=0;soMAX_RULES_PER_SHEET)&&(oo=to.createStyleSheet().attach()),oo};function so(){var ao=arguments,lo=JSON.stringify(ao),uo=ro.get(lo);if(uo)return uo.className;var co=[];for(var fo in ao){var ho=ao[fo];if(!Array.isArray(ho)){co.push(ho);continue}for(var po=0;poto=>!!pick$1(eo)(to),add$1=eo=>to=>{const ro=to||0;return Array.isArray(eo)?eo.reduce((no,oo)=>no|oo,ro):ro|eo},toggle=eo=>to=>(to||0)^eo,pick$1=eo=>to=>(to||0)&eo,remove$2=eo=>to=>{const ro=to||0;return Array.isArray(eo)?eo.reduce((no,oo)=>no&~oo,ro):ro&~eo},replace$1=eo=>()=>eo;var bitset=Object.freeze({__proto__:null,has:has$1,add:add$1,toggle,pick:pick$1,remove:remove$2,replace:replace$1});const EMPTY_STATUS=0,SELECTED_STATUS=1,ACTIVATED_STATUS=2;var GraphEdgeStatus;(function(eo){eo[eo.Default=EMPTY_STATUS]="Default",eo[eo.Selected=SELECTED_STATUS]="Selected",eo[eo.Activated=ACTIVATED_STATUS]="Activated",eo[eo.ConnectedToSelected=4]="ConnectedToSelected",eo[eo.UnconnectedToSelected=8]="UnconnectedToSelected",eo[eo.Editing=16]="Editing"})(GraphEdgeStatus||(GraphEdgeStatus={}));var GraphNodeStatus;(function(eo){eo[eo.Default=EMPTY_STATUS]="Default",eo[eo.Selected=SELECTED_STATUS]="Selected",eo[eo.Activated=ACTIVATED_STATUS]="Activated",eo[eo.Editing=4]="Editing",eo[eo.ConnectedToSelected=8]="ConnectedToSelected",eo[eo.UnconnectedToSelected=16]="UnconnectedToSelected"})(GraphNodeStatus||(GraphNodeStatus={}));var GraphPortStatus;(function(eo){eo[eo.Default=EMPTY_STATUS]="Default",eo[eo.Selected=SELECTED_STATUS]="Selected",eo[eo.Activated=ACTIVATED_STATUS]="Activated",eo[eo.Connecting=4]="Connecting",eo[eo.ConnectingAsTarget=8]="ConnectingAsTarget"})(GraphPortStatus||(GraphPortStatus={}));const updateStatus=eo=>to=>{var ro;const no=eo((ro=to.status)!==null&&ro!==void 0?ro:0);return no===to.status?to:Object.assign(Object.assign({},to),{status:no})};function isNodeEditing(eo){return has$1(GraphNodeStatus.Editing)(eo.status)}function isSelected(eo){return has$1(SELECTED_STATUS)(eo.status)}function notSelected(eo){return!isSelected(eo)}const resetConnectStatus=eo=>to=>(to||0)&GraphNodeStatus.Activated|eo;class Debug{static log(to){}static warn(to){}static error(...to){console.error(...to)}static never(to,ro){throw new Error(ro??`${to} is unexpected`)}}const getNodeConfig=(eo,to)=>{const ro=to.getNodeConfig(eo);if(!ro){Debug.warn(`invalid node ${JSON.stringify(eo)}`);return}return ro};function getRectWidth(eo,to){var ro;const no=(ro=eo==null?void 0:eo.getMinWidth(to))!==null&&ro!==void 0?ro:0;return to.width&&to.width>=no?to.width:no}function getRectHeight(eo,to){var ro;const no=(ro=eo==null?void 0:eo.getMinHeight(to))!==null&&ro!==void 0?ro:0;return to.height&&to.height>=no?to.height:no}function getNodeSize(eo,to){const ro=getNodeConfig(eo,to),no=getRectWidth(ro,eo);return{height:getRectHeight(ro,eo),width:no}}function getGroupRect(eo,to,ro){var no,oo,io,so,ao,lo,uo,co;const fo=new Set(eo.nodeIds),ho=Array.from(to.values()).filter(To=>fo.has(To.id)),po=Math.min(...ho.map(To=>To.x)),go=Math.max(...ho.map(To=>To.x+getNodeSize(To,ro).width)),vo=Math.min(...ho.map(To=>To.y)),bo=Math.max(...ho.map(To=>To.y+getNodeSize(To,ro).height)),xo=po-((oo=(no=eo.padding)===null||no===void 0?void 0:no.left)!==null&&oo!==void 0?oo:0),_o=vo-((so=(io=eo.padding)===null||io===void 0?void 0:io.top)!==null&&so!==void 0?so:0),Eo=bo-_o+((lo=(ao=eo.padding)===null||ao===void 0?void 0:ao.bottom)!==null&&lo!==void 0?lo:0),So=go-xo+((co=(uo=eo.padding)===null||uo===void 0?void 0:uo.left)!==null&&co!==void 0?co:0);return{x:xo,y:_o,width:So,height:Eo}}var MouseEventButton;(function(eo){eo[eo.Primary=0]="Primary",eo[eo.Auxiliary=1]="Auxiliary",eo[eo.Secondary=2]="Secondary",eo[eo.Fourth=4]="Fourth",eo[eo.Fifth=5]="Fifth"})(MouseEventButton||(MouseEventButton={}));var MouseEventButtons;(function(eo){eo[eo.None=0]="None",eo[eo.Left=1]="Left",eo[eo.Right=2]="Right",eo[eo.Middle=4]="Middle"})(MouseEventButtons||(MouseEventButtons={}));const DEFAULT_AUTO_ALIGN_THRESHOLD=50,COPIED_NODE_SPACING=50,NODE_MIN_VISIBLE_LENGTH=5,NODE_MAX_VISIBLE_LENGTH=500,defaultColors={controlPointColor:"#333333",primaryColor:"#0078D4",defaultColor:"#CCCCCC",borderColor:"#B3B0AD",defaultBorderColor:"#FFFFFF",unConnectableBgColor:"#E1DFDD",defaultBackgroundColor:"#FFFFFF",portStroke:"#ccc",portFill:"#fff",connectedPortColor:"gray",nodeActivateFill:"#ffffff",nodeActivateStroke:"#0078D4",nodeFill:"#ffffff",nodeStroke:"#cccccc",contextMenuBackground:"#FFFFFF",contextMenuBorder:"#E1DFDD",contextMenuHoverBackground:"rgba(0, 120, 212, 0.05)",fontColor:"#000000",canvasBackground:"#EDEDED",minimapBackground:"#EDEDED",edgeColor:"#ccc",edgeColorSelected:"#015cda",minimapShadow:"#000000",outlineStyle:"none",focusOutlineColor:"#000000",dummyNodeStroke:"#015cda",inputFocusBorderAlt:"#0078d4",buttonBorder:"#797775",scrollbarColor:"#c8c8c8"},RectComponent=eo=>{const{style:to,node:ro,width:no,height:oo,textY:io}=eo,so=ro.data&&ro.data.comment?ro.data.comment:"",ao=isNodeEditing(ro);return jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("rect",{width:no,height:oo,x:ro.x,y:ro.y,style:to,rx:to.borderRadius}),jsxRuntimeExports.jsx("text",Object.assign({x:ro.x,y:io,fontSize:12},{children:ro.name})),ro.data&&ro.data.comment&&!ao&&jsxRuntimeExports.jsx("text",Object.assign({x:ro.x,y:io+20,fontSize:12,className:`comment-${ro.id}`},{children:ro.data.comment})),ao&&jsxRuntimeExports.jsx("foreignObject",Object.assign({x:ro.x,y:io,height:oo/2.5,width:no-5},{children:jsxRuntimeExports.jsx("input",{value:so,placeholder:"Input your comment here"})}))]},ro.id)},rect={getMinHeight(){return 150},getMinWidth(){return 150},render(eo){const to=eo.model,ro=getRectWidth(rect,to),no=getRectHeight(rect,to),oo=has$1(GraphNodeStatus.Selected|GraphNodeStatus.Activated)(to.status)?{fill:defaultColors.nodeActivateFill,stroke:defaultColors.nodeActivateStroke}:{fill:defaultColors.nodeFill,fillOpacity:.1,stroke:defaultColors.nodeStroke,borderRadius:"5"},io=to.y+no/3;return jsxRuntimeExports.jsx(RectComponent,{style:oo,node:to,width:ro,height:no,textY:io})}},getCurvePathD=(eo,to,ro,no)=>`M${eo},${ro}C${eo},${ro-getControlPointDistance(ro,no)},${to},${no+5+getControlPointDistance(ro,no)},${to},${no+5}`,getControlPointDistance=(eo,to)=>Math.min(5*15,Math.max(5*3,Math.abs((eo-(to+5))/2))),line$1={render(eo){const to=eo.model,ro={cursor:"crosshair",stroke:has$1(GraphEdgeStatus.Selected)(to.status)?defaultColors.edgeColorSelected:defaultColors.edgeColor,strokeWidth:"2"};return jsxRuntimeExports.jsx("path",{d:getCurvePathD(eo.x2,eo.x1,eo.y2,eo.y1),fill:"none",style:ro,id:`edge${to.id}`},to.id)}};class DefaultPort{getStyle(to,ro,no,oo,io){const so=defaultColors.portStroke;let ao=defaultColors.portFill;return(oo||io)&&(ao=defaultColors.connectedPortColor),has$1(GraphPortStatus.Activated)(to.status)&&(ao=defaultColors.primaryColor),{stroke:so,fill:ao}}getIsConnectable(){return!0}render(to){const{model:ro,data:no,parentNode:oo}=to,io=no.isPortConnectedAsSource(oo.id,ro.id),so=no.isPortConnectedAsTarget(oo.id,ro.id),ao=this.getStyle(ro,oo,no,io,so),{x:lo,y:uo}=to,co=`${lo-5} ${uo}, ${lo+7} ${uo}, ${lo+1} ${uo+8}`;return so?jsxRuntimeExports.jsx("polygon",{points:co,style:ao}):jsxRuntimeExports.jsx("circle",{r:5,cx:lo,cy:uo,style:ao},`${to.parentNode.id}-${to.model.id}`)}}const defaultPort=new DefaultPort;class DefaultClipboard{constructor(to){this.storage=to}write(to){this.storage.setItem("graph-clipboard",JSON.stringify({nodes:to.nodes.map(ro=>Object.assign(Object.assign({},ro),{data:{}})),edges:to.edges.map(ro=>Object.assign(Object.assign({},ro),{data:{}}))}))}read(){const to=this.storage.getItem("graph-clipboard");if(!to)return null;try{const ro=JSON.parse(to),no=new Map;return{nodes:ro.nodes.map(oo=>{const io=v4();return no.set(oo.id,io),Object.assign(Object.assign({},oo),{x:oo.x+COPIED_NODE_SPACING,y:oo.y+COPIED_NODE_SPACING,id:io})}),edges:ro.edges.map(oo=>Object.assign(Object.assign({},oo),{id:v4(),source:no.get(oo.source)||"",target:no.get(oo.target)||""}))}}catch{return null}}}class DefaultStorage{get length(){return this.items.size}constructor(){this.key=()=>"DefaultLocalStorage",this.items=new Map}clear(){this.items=new Map}setItem(to,ro){this.items.set(to,ro)}getItem(to){return this.items.has(to)?this.items.get(to):null}removeItem(to){this.items.delete(to)}}class GraphConfigBuilder{constructor(){const to=new DefaultStorage,ro=new DefaultClipboard(to);this.draft={getNodeConfig:()=>rect,getEdgeConfig:()=>line$1,getPortConfig:()=>defaultPort,getGroupConfig:()=>{},getClipboard:()=>ro}}static default(){return new GraphConfigBuilder}static from(to){return new GraphConfigBuilder().registerNode(to.getNodeConfig.bind(to)).registerEdge(to.getEdgeConfig.bind(to)).registerPort(to.getPortConfig.bind(to)).registerGroup(to.getGroupConfig.bind(to)).registerClipboard(to.getClipboard.bind(to))}registerNode(to){return this.draft.getNodeConfig=to,this}registerEdge(to){return this.draft.getEdgeConfig=to,this}registerPort(to){return this.draft.getPortConfig=to,this}registerGroup(to){return this.draft.getGroupConfig=to,this}registerClipboard(to){return this.draft.getClipboard=to,this}build(){return this.draft}}const GraphConfigContext=reactExports.createContext(GraphConfigBuilder.default().build());var MenuType;(function(eo){eo.Node="node",eo.Edge="edge",eo.Port="port",eo.Canvas="canvas",eo.Multi="multi"})(MenuType||(MenuType={}));class ContextMenuConfig{constructor(){this.contextMenu=new Map}registerContextMenu(to){this.contextMenuProps=Object.assign({},to)}registerMenu(to,ro){this.contextMenu.set(ro,to)}getMenu(to){if(this.contextMenuProps&&this.contextMenu.has(to)){const{className:ro,styles:no}=this.contextMenuProps;return reactExports.createElement("div",{className:ro,style:no},this.contextMenu.get(to))}return null}}const ContextMenuConfigContext=reactExports.createContext(new ContextMenuConfig),emptySelectBoxPosition=()=>({startX:0,startY:0,height:0,width:0}),SelectBox=eo=>{const{selectBoxPosition:to,style:ro}=eo,no=`m${to.startX} ${to.startY} v ${to.height} h ${to.width} v${-to.height} h ${-to.width}`,oo=ro??{fill:"none",stroke:defaultColors.defaultColor};return jsxRuntimeExports.jsx("path",{style:oo,d:no})};var GraphFeatures;(function(eo){eo.NodeDraggable="nodeDraggable",eo.NodeResizable="nodeResizable",eo.ClickNodeToSelect="clickNodeToSelect",eo.PanCanvas="panCanvas",eo.MultipleSelect="multipleSelect",eo.LassoSelect="lassoSelect",eo.Delete="delete",eo.AddNewNodes="addNewNodes",eo.AddNewEdges="addNewEdges",eo.AddNewPorts="addNewPorts",eo.AutoFit="autoFit",eo.CanvasHorizontalScrollable="canvasHorizontalScrollable",eo.CanvasVerticalScrollable="canvasVerticalScrollable",eo.NodeHoverView="nodeHoverView",eo.PortHoverView="portHoverView",eo.AddEdgesByKeyboard="addEdgesByKeyboard",eo.A11yFeatures="a11YFeatures",eo.EditNode="editNode",eo.AutoAlign="autoAlign",eo.UndoStack="undoStack",eo.CtrlKeyZoom="ctrlKeyZoom",eo.LimitBoundary="limitBoundary",eo.EditEdge="editEdge",eo.InvisibleScrollbar="InvisibleScrollbar"})(GraphFeatures||(GraphFeatures={}));GraphFeatures.NodeDraggable,GraphFeatures.NodeResizable,GraphFeatures.ClickNodeToSelect,GraphFeatures.PanCanvas,GraphFeatures.MultipleSelect,GraphFeatures.LassoSelect,GraphFeatures.Delete,GraphFeatures.AddNewNodes,GraphFeatures.AddNewEdges,GraphFeatures.AddNewPorts,GraphFeatures.CanvasHorizontalScrollable,GraphFeatures.CanvasVerticalScrollable,GraphFeatures.NodeHoverView,GraphFeatures.PortHoverView,GraphFeatures.AddEdgesByKeyboard,GraphFeatures.A11yFeatures,GraphFeatures.AutoFit,GraphFeatures.EditNode,GraphFeatures.AutoAlign,GraphFeatures.UndoStack,GraphFeatures.CtrlKeyZoom,GraphFeatures.LimitBoundary,GraphFeatures.EditEdge;const defaultFeatures=new Set([GraphFeatures.NodeDraggable,GraphFeatures.NodeResizable,GraphFeatures.ClickNodeToSelect,GraphFeatures.PanCanvas,GraphFeatures.MultipleSelect,GraphFeatures.Delete,GraphFeatures.AddNewNodes,GraphFeatures.AddNewEdges,GraphFeatures.AddNewPorts,GraphFeatures.CanvasHorizontalScrollable,GraphFeatures.CanvasVerticalScrollable,GraphFeatures.NodeHoverView,GraphFeatures.PortHoverView,GraphFeatures.AddEdgesByKeyboard,GraphFeatures.A11yFeatures,GraphFeatures.EditNode,GraphFeatures.AutoAlign,GraphFeatures.UndoStack,GraphFeatures.CtrlKeyZoom,GraphFeatures.LimitBoundary]),dataReadonlyMode=new Set([GraphFeatures.NodeDraggable,GraphFeatures.NodeResizable,GraphFeatures.ClickNodeToSelect,GraphFeatures.PanCanvas,GraphFeatures.MultipleSelect,GraphFeatures.CanvasHorizontalScrollable,GraphFeatures.CanvasVerticalScrollable,GraphFeatures.NodeHoverView,GraphFeatures.PortHoverView,GraphFeatures.A11yFeatures,GraphFeatures.CtrlKeyZoom,GraphFeatures.LimitBoundary]);GraphFeatures.ClickNodeToSelect,GraphFeatures.CanvasHorizontalScrollable,GraphFeatures.CanvasVerticalScrollable,GraphFeatures.NodeHoverView,GraphFeatures.PortHoverView,GraphFeatures.A11yFeatures,GraphFeatures.LassoSelect,GraphFeatures.LimitBoundary;const previewMode=new Set([GraphFeatures.NodeHoverView,GraphFeatures.PortHoverView,GraphFeatures.AutoFit]),emptyDummyNodes=()=>({dx:0,dy:0,dWidth:0,dHeight:0,alignedDX:void 0,alignedDY:void 0,nodes:[],isVisible:!1}),is$1$1=Object.is;let MapIterator$1=class{constructor(to,ro){this.upstream=to,this.f=ro}[Symbol.iterator](){return this}next(){const to=this.upstream.next();return to.done?to:{done:!1,value:this.f(to.value)}}};var NodeType$1;(function(eo){eo[eo.Bitmap=0]="Bitmap",eo[eo.Collision=1]="Collision"})(NodeType$1||(NodeType$1={}));const HASH_CODE_LENGTH=30,BIT_PARTITION_SIZE=5,FULL_MASK=1073741823;function bitPosFrom(eo){return 1<>>to&31}function bitCount(eo){return eo|=0,eo-=eo>>>1&1431655765,eo=(eo&858993459)+(eo>>>2&858993459),eo=eo+(eo>>>4)&252645135,eo+=eo>>>8,eo+=eo>>>16,eo&127}let BitmapIndexedNode$1=class U1{get valueCount(){return this.values.length}get nodeCount(){return this.children.length}constructor(to,ro,no,oo,io,so,ao,lo){this.type=NodeType$1.Bitmap,this.owner=to,this.dataMap=ro,this.nodeMap=no,this.keys=oo,this.values=io,this.children=so,this.hashes=ao,this.size=lo}static empty(to){return new U1(to,0,0,[],[],[],[],0)}getKey(to){return this.keys[to]}getValue(to){return this.values[to]}getHash(to){return this.hashes[to]}getNode(to){return this.children[to]}contains(to,ro,no){const oo=maskFrom(ro,no),io=bitPosFrom(oo),{dataMap:so,nodeMap:ao}=this;if(so&io){const lo=indexFrom(so,oo,io),uo=this.getKey(lo);return is$1$1(uo,to)}else if(ao&io){const lo=indexFrom(ao,oo,io);return this.getNode(lo).contains(to,ro,no+BIT_PARTITION_SIZE)}return!1}get(to,ro,no){const oo=maskFrom(ro,no),io=bitPosFrom(oo),{dataMap:so,nodeMap:ao}=this;if(so&io){const lo=indexFrom(so,oo,io),uo=this.getKey(lo);return is$1$1(uo,to)?this.getValue(lo):void 0}else if(ao&io){const lo=indexFrom(ao,oo,io);return this.getNode(lo).get(to,ro,no+BIT_PARTITION_SIZE)}}insert(to,ro,no,oo,io){const so=maskFrom(oo,io),ao=bitPosFrom(so),{dataMap:lo,nodeMap:uo}=this;if(lo&ao){const co=indexFrom(lo,so,ao),fo=this.getKey(co),ho=this.getValue(co),po=this.getHash(co);if(po===oo&&is$1$1(fo,ro))return is$1$1(ho,no)?this:this.setValue(to,no,co);{const go=mergeTwoKeyValPairs(to,fo,ho,po,ro,no,oo,io+BIT_PARTITION_SIZE);return this.migrateInlineToNode(to,ao,go)}}else if(uo&ao){const co=indexFrom(uo,so,ao),ho=this.getNode(co).insert(to,ro,no,oo,io+BIT_PARTITION_SIZE);return this.setNode(to,1,ho,ao)}return this.insertValue(to,ao,ro,oo,no)}update(to,ro,no,oo,io){const so=maskFrom(oo,io),ao=bitPosFrom(so),{dataMap:lo,nodeMap:uo}=this;if(lo&ao){const co=indexFrom(lo,so,ao),fo=this.getKey(co);if(this.getHash(co)===oo&&is$1$1(fo,ro)){const po=this.getValue(co),go=no(po);return is$1$1(po,go)?this:this.setValue(to,go,co)}}else if(uo&ao){const co=indexFrom(uo,so,ao),fo=this.getNode(co),ho=fo.update(to,ro,no,oo,io+BIT_PARTITION_SIZE);return ho===fo?this:this.setNode(to,0,ho,ao)}return this}remove(to,ro,no,oo){const io=maskFrom(no,oo),so=bitPosFrom(io);if(this.dataMap&so){const ao=indexFrom(this.dataMap,io,so),lo=this.getKey(ao);return is$1$1(lo,ro)?this.removeValue(to,so):void 0}else if(this.nodeMap&so){const ao=indexFrom(this.nodeMap,io,so),lo=this.getNode(ao),uo=lo.remove(to,ro,no,oo+BIT_PARTITION_SIZE);if(uo===void 0)return;const[co,fo]=uo;return co.size===1?this.size===lo.size?[new U1(to,so,0,[co.getKey(0)],[co.getValue(0)],[],[co.getHash(0)],1),fo]:[this.migrateNodeToInline(to,so,co),fo]:[this.setNode(to,-1,co,so),fo]}}toOwned(to){return this.owner===to?this:new U1(to,this.dataMap,this.nodeMap,this.keys.slice(),this.values.slice(),this.children.slice(),this.hashes.slice(),this.size)}iter(){return new BitmapIndexedNodeIterator(this)}map(to,ro){const no=this.valueCount,oo=[],io=[],so=[];let ao=!0;for(let lo=0;lo=HASH_CODE_LENGTH)return new HashCollisionNode$1(eo,no,[to,oo],[ro,io]);{const lo=maskFrom(no,ao),uo=maskFrom(so,ao);if(lo!==uo){const co=bitPosFrom(lo)|bitPosFrom(uo);return lois$1$1(no,to));return ro>=0?this.values[ro]:void 0}insert(to,ro,no){const oo=this.keys.findIndex(io=>is$1$1(io,ro));if(oo>=0){const io=this.values[oo];if(is$1$1(io,no))return this;const so=this.toOwned(to);return so.values[oo]=no,so}else{const io=this.toOwned(to);return io.keys.push(ro),io.values.push(no),io}}update(to,ro,no){const oo=this.keys.findIndex(io=>is$1$1(io,ro));if(oo>=0){const io=this.values[oo],so=no(io);if(is$1$1(io,so))return this;const ao=this.toOwned(to);return ao.values[oo]=so,ao}return this}remove(to,ro){const no=this.keys.findIndex(io=>is$1$1(io,ro));if(no===-1)return;const oo=this.getValue(no);return[new Fm(to,this.hash,this.keys.filter((io,so)=>so!==no),this.values.filter((io,so)=>so!==no)),oo]}getKey(to){return this.keys[to]}getValue(to){return this.values[to]}getHash(){return this.hash}iter(){return new HashCollisionNodeIterator(this)}map(to,ro){const no=this.size,oo=[];let io=!1;for(let so=0;so=this.node.size)return{done:!0,value:void 0};const to=this.node.getKey(this.index),ro=this.node.getValue(this.index);return this.index+=1,{done:!1,value:[to,ro]}}clone(){const to=new HashCollisionNodeIterator(this.node);return to.index=this.index,to}}function hashing(eo){if(eo===null)return 1108378658;switch(typeof eo){case"boolean":return eo?839943201:839943200;case"number":return hashNumber$1(eo);case"string":return hashString$1(eo);case"object":case"function":case"symbol":throw new Error("Using object, function and symbol as hash map key is not supported");case"undefined":return 839943203;default:return hashString$1(String(eo))}}function hashString$1(eo){let to=0;for(let ro=0;ro4294967295;)eo/=4294967295,to^=eo;return smi$1(to)}function smi$1(eo){return eo&1073741823}class Uid{constructor(){this.id=0}take(){return this.id+=1,this.id}peek(){return this.id+1}}const uid$1=new Uid;class HashMap{get size(){return this.root.size}constructor(to){this.id=uid$1.take(),this.root=to}static empty(){return HashMapBuilder.empty().finish()}static from(to){return HashMapBuilder.from(to).finish()}get(to){const ro=hashing(to);return this.root.get(to,ro,0)}has(to){const ro=hashing(to);return this.root.contains(to,ro,0)}set(to,ro){return this.withRoot(this.root.insert(uid$1.peek(),to,ro,hashing(to),0))}update(to,ro){return this.withRoot(this.root.update(uid$1.peek(),to,ro,hashing(to),0))}delete(to){const ro=hashing(to),no=uid$1.peek(),oo=this.root.remove(no,to,ro,0);return oo===void 0?this:new HashMap(oo[0])}clone(){return new HashMap(this.root)}[Symbol.iterator](){return this.entries()}entries(){return this.root.iter()}values(){return new MapIterator$1(this.entries(),([,to])=>to)}mutate(){return new HashMapBuilder(this.root)}map(to){return new HashMap(this.root.map(uid$1.peek(),to))}filter(to){const ro=this.mutate();return this.forEach((no,oo)=>{to(no,oo)||ro.delete(oo)}),ro.finish()}forEach(to){this.root.forEach(to)}find(to){return this.root.find(to)}withRoot(to){return to===this.root?this:new HashMap(to)}}class HashMapBuilder{constructor(to){this.id=uid$1.take(),this.root=to}static empty(){const to=uid$1.peek(),ro=BitmapIndexedNode$1.empty(to);return new HashMapBuilder(ro)}static from(to){if(Array.isArray(to))return HashMapBuilder.fromArray(to);const ro=to[Symbol.iterator](),no=HashMapBuilder.empty();let oo=ro.next();for(;!oo.done;){const[io,so]=oo.value;no.set(io,so),oo=ro.next()}return no}static fromArray(to){const ro=HashMapBuilder.empty();for(let no=0;no=to?ro:no;const oo=ro+no>>>1;if(eo[oo]===to)return oo;to=MIN_SIZE$1)return uo;if(no===oo)return uo.balanceTail(lo),uo;const co=this.getValue(no);return uo.balanceChild(to,lo,ao,co,no)}}removeMostRight(to){const ro=this.selfSize,[no,oo,io]=this.getChild(ro).removeMostRight(to),so=this.toOwned(to);return so.size-=1,so.children[ro]=io,io.selfSizeMIN_SIZE$1)this.rotateRight(ro,ao,io,so);else if(lo.selfSize>MIN_SIZE$1)this.rotateLeft(ro,lo,io,so);else{const uo=ao.toOwned(to),co=lo.toOwned(to),fo=ro.getKey(HALF_NODE_SPLIT),ho=ro.getValue(HALF_NODE_SPLIT);uo.keys.push(this.getKey(io-1)),uo.values.push(this.getValue(io-1)),uo.keys.push(...ro.keys.slice(0,HALF_NODE_SPLIT)),uo.values.push(...ro.values.slice(0,HALF_NODE_SPLIT)),co.keys.unshift(no),co.values.unshift(oo),co.keys.unshift(...ro.keys.slice(HALF_NODE_SPLIT+1,MIN_SIZE$1)),co.values.unshift(...ro.values.slice(HALF_NODE_SPLIT+1,MIN_SIZE$1)),this.keys.splice(io-1,2,fo),this.values.splice(io-1,2,ho),this.children.splice(io-1,3,uo,co),so&&(uo.children.push(...ro.children.slice(0,HALF_NODE_SPLIT+1)),co.children.unshift(...ro.children.slice(HALF_NODE_SPLIT+1,MIN_SIZE$1+1)),uo.updateSize(),co.updateSize())}return this}rotateLeft(to,ro,no,oo){const io=ro.toOwned(this.owner),so=io.keys.shift(),ao=io.values.shift(),lo=this.getKey(no),uo=this.getValue(no);if(to.keys.push(lo),to.values.push(uo),this.keys[no]=so,this.values[no]=ao,this.children[no+1]=io,oo){const co=io.children.shift();to.children.push(co);const fo=co.size+1;to.size+=fo,io.size-=fo}}rotateRight(to,ro,no,oo){const io=ro.toOwned(this.owner),so=io.keys.pop(),ao=io.values.pop(),lo=this.getKey(no-1),uo=this.getValue(no-1);if(to.keys.unshift(lo),to.values.unshift(uo),this.keys[no-1]=so,this.values[no-1]=ao,this.children[no-1]=io,oo){const co=io.children.pop();to.children.unshift(co);const fo=co.size+1;to.size+=fo,io.size-=fo}}balanceTail(to){const ro=this.selfSize,no=this.getChild(ro-1),oo=to.type===NodeType$2.Internal;no.selfSize===MIN_SIZE$1?(to.keys.unshift(this.getKey(ro-1)),to.values.unshift(this.getValue(ro-1)),to.keys.unshift(...no.keys),to.values.unshift(...no.values),this.keys.splice(ro-1,1),this.values.splice(ro-1,1),this.children.splice(ro-1,1),oo&&(to.children.unshift(...no.children),to.size+=no.size+1)):this.rotateRight(to,no,ro,oo)}balanceHead(to){const ro=this.getChild(1),no=to.type===NodeType$2.Internal;ro.selfSize===MIN_SIZE$1?(to.keys.push(this.getKey(0)),to.values.push(this.getValue(0)),to.keys.push(...ro.keys),to.values.push(...ro.values),this.keys.splice(0,1),this.values.splice(0,1),this.children.splice(1,1),no&&(to.children.push(...ro.children),to.size+=ro.size+1)):this.rotateLeft(to,ro,0,no)}updateWithSplit(to,ro,no,oo,io,so){const ao=this.toOwned(to);ao.keys.splice(so,0,oo),ao.values.splice(so,0,io),ao.children.splice(so,1,ro,no);const lo=new InternalNode(to,ao.keys.splice(16,16),ao.values.splice(16,16),ao.children.splice(16,17),0),uo=ao.keys.pop(),co=ao.values.pop();return ao.updateSize(),lo.updateSize(),[ao,lo,uo,co]}updateSize(){let to=this.selfSize;const ro=this.children.length;for(let no=0;no{const[so,ao]=io,lo=ro(ao);return is$1$1(lo,ao)?io:[so,lo]});return this.withRoot(this.itemId,this.hashRoot,oo)}[Symbol.iterator](){return this.entries()}clone(){return new Q1(this.itemId,this.hashRoot,this.sortedRoot)}entries(){return new OrderedMapIterator(new BTreeIterator(this.sortedRoot))}values(){return new MapIterator$1(this.entries(),([,to])=>to)}mutate(){return new OrderedMapBuilder(this.itemId,this.hashRoot,this.sortedRoot)}map(to){const ro=uid.peek(),no=io=>{const[so,ao]=io,lo=to(ao,so);return is$1$1(ao,lo)?io:[so,lo]},oo=this.sortedRoot.map(ro,no);return new Q1(this.itemId,this.hashRoot,oo)}forEach(to){this.sortedRoot.forEach(([ro,no])=>{to(no,ro)})}find(to){const ro=this.sortedRoot.find(([,no])=>to(no));return ro?ro[1]:void 0}first(){const to=this.entries().next();if(!to.done)return to.value[1]}filter(to){const ro=this.mutate();return this.forEach((no,oo)=>{to(no,oo)||ro.delete(oo)}),ro.finish()}withRoot(to,ro,no){return ro===this.hashRoot&&no===this.sortedRoot?this:new Q1(to,ro,no)}};class OrderedMapIterator{constructor(to){this.delegate=to}[Symbol.iterator](){return this.clone()}next(){const to=this.delegate.next();return to.done?{done:!0,value:void 0}:{done:!1,value:to.value[1]}}clone(){return new OrderedMapIterator(this.delegate.clone())}}class OrderedMapBuilder{constructor(to,ro,no){this.id=uid.take(),this.itemId=to,this.hashRoot=ro,this.sortedRoot=no}static empty(){const to=uid.peek(),ro=BitmapIndexedNode$1.empty(to),no=emptyRoot(to);return new OrderedMapBuilder(0,ro,no)}static from(to){if(Array.isArray(to))return OrderedMapBuilder.fromArray(to);const ro=OrderedMapBuilder.empty(),no=to[Symbol.iterator]();let oo=no.next();for(;!oo.done;){const[io,so]=oo.value;ro.set(io,so),oo=no.next()}return ro}static fromArray(to){const ro=OrderedMapBuilder.empty();for(let no=0;no{const[io,so]=oo,ao=ro(so);return is$1$1(ao,so)?oo:[io,ao]}),this):this}finish(){return new OrderedMap$1(this.itemId,this.hashRoot,this.sortedRoot)}}const getPortPosition=(eo,to,ro)=>{const no=getRectWidth(ro,eo),oo=getRectHeight(ro,eo),io=to.position?to.position[0]*no:no*.5,so=eo.x+io,ao=to.position?to.position[1]*oo:oo,lo=eo.y+ao;return{x:so,y:lo}},getPortPositionByPortId=(eo,to,ro)=>{const no=getNodeConfig(eo,ro);if(!no)return;const io=(eo.ports||[]).find(so=>so.id===to);if(!io){Debug.warn(`invalid port id ${JSON.stringify(io)}`);return}return getPortPosition(eo,io,no)},identical=eo=>eo,isMobile=()=>[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(to=>navigator.userAgent.match(to));var BrowserType;(function(eo){eo.Unknown="Unknown",eo.Edge="Edge",eo.EdgeChromium="EdgeChromium",eo.Opera="Opera",eo.Chrome="Chrome",eo.IE="IE",eo.Firefox="Firefox",eo.Safari="Safari",eo.Electron="Electron"})(BrowserType||(BrowserType={}));const getBrowser=()=>{const eo=navigator.userAgent.toLowerCase();if(eo.indexOf("electron")>-1)return BrowserType.Electron;switch(!0){case eo.indexOf("edge")>-1:return BrowserType.Edge;case eo.indexOf("edg")>-1:return BrowserType.EdgeChromium;case(eo.indexOf("opr")>-1&&!!window.opr):return BrowserType.Opera;case(eo.indexOf("chrome")>-1&&!!window.chrome):return BrowserType.Chrome;case eo.indexOf("trident")>-1:return BrowserType.IE;case eo.indexOf("firefox")>-1:return BrowserType.Firefox;case eo.indexOf("safari")>-1:return BrowserType.Safari;default:return BrowserType.Unknown}},isSupported=()=>{if(isMobile())return!1;const eo=getBrowser();return[BrowserType.Chrome,BrowserType.EdgeChromium,BrowserType.Firefox,BrowserType.Safari,BrowserType.Electron].indexOf(eo)>-1},isMacOs=navigator.userAgent.includes("Macintosh"),metaControl=eo=>isMacOs?eo.metaKey:eo.ctrlKey,checkIsMultiSelect=eo=>eo.shiftKey||metaControl(eo),transformPoint=(eo,to,ro)=>({x:ro[0]*eo+ro[2]*to+ro[4],y:ro[1]*eo+ro[3]*to+ro[5]}),reverseTransformPoint=(eo,to,ro)=>{const[no,oo,io,so,ao,lo]=ro;return{x:((eo-ao)*so-(to-lo)*io)/(no*so-oo*io),y:((eo-ao)*oo-(to-lo)*no)/(oo*io-no*so)}},getPointDeltaByClientDelta=(eo,to,ro)=>{const[no,oo,io,so]=ro,ao=so*eo/(no*so-oo*io)+io*to/(oo*io-no*so),lo=oo*eo/(oo*io-no*so)+no*to/(no*so-oo*io);return{x:ao,y:lo}},getClientDeltaByPointDelta=(eo,to,ro)=>{if(!ro)return{x:eo,y:to};const[no,oo,io,so]=ro;return transformPoint(eo,to,[no,oo,io,so,0,0])},getRealPointFromClientPoint=(eo,to,ro)=>{const{rect:no}=ro,oo=eo-no.left,io=to-no.top;return reverseTransformPoint(oo,io,ro.transformMatrix)},getClientPointFromRealPoint=(eo,to,ro)=>{const{x:no,y:oo}=transformPoint(eo,to,ro.transformMatrix),{rect:io}=ro;return{x:no+io.left,y:oo+io.top}},getContainerClientPoint=(eo,to,ro)=>{const no=getClientPointFromRealPoint(eo,to,ro),{rect:oo}=ro;return{x:no.x-oo.left,y:no.y-oo.top}};function markEdgeDirty(eo,to){eo.update(to,ro=>ro.shallow())}const getNearestConnectablePort=eo=>{const{parentNode:to,clientX:ro,clientY:no,graphConfig:oo,viewport:io}=eo;let so=1/0,ao;if(!to.ports)return;const lo=getRealPointFromClientPoint(ro,no,io);return to.ports.forEach(uo=>{if(isConnectable(oo,Object.assign(Object.assign({},eo),{model:uo}))){const co=getPortPositionByPortId(to,uo.id,oo);if(!co)return;const fo=lo.x-co.x,ho=lo.y-co.y,po=fo*fo+ho*ho;po{const ro=eo.getPortConfig(to.model);return ro?ro.getIsConnectable(to):!1},filterSelectedItems=eo=>{const to=new Map,ro=[];return eo.nodes.forEach(({inner:no})=>{isSelected(no)&&to.set(no.id,no)}),eo.edges.forEach(({inner:no})=>{(isSelected(no)||to.has(no.source)&&to.has(no.target))&&ro.push(no)}),{nodes:Array.from(to.values()),edges:ro}},getNeighborPorts=(eo,to,ro)=>{const no=[],oo=eo.getEdgesBySource(to,ro),io=eo.getEdgesByTarget(to,ro);return oo==null||oo.forEach(so=>{const ao=eo.edges.get(so);ao&&no.push({nodeId:ao.target,portId:ao.targetPortId})}),io==null||io.forEach(so=>{const ao=eo.edges.get(so);ao&&no.push({nodeId:ao.source,portId:ao.sourcePortId})}),no},unSelectAllEntity=()=>eo=>eo.mapNodes(to=>to.update(ro=>{var no;const oo=Object.assign(Object.assign({},ro),{ports:(no=ro.ports)===null||no===void 0?void 0:no.map(updateStatus(replace$1(GraphPortStatus.Default)))});return updateStatus(replace$1(GraphNodeStatus.Default))(oo)})).mapEdges(to=>to.update(updateStatus(replace$1(GraphEdgeStatus.Default)))),nodeSelection=(eo,to)=>{if(isNodeEditing(to))return identical;const ro=checkIsMultiSelect(eo);return isSelected(to)&&!ro?identical:no=>{const oo=ro?io=>io.id!==to.id?isSelected(io):eo.button===MouseEventButton.Secondary?!0:!isSelected(to):io=>io.id===to.id;return no.selectNodes(oo,to.id)}},getNodeAutomationId=eo=>{var to;return`node-container-${(to=eo.name)!==null&&to!==void 0?to:"unnamed"}-${eo.id}`},getPortAutomationId=(eo,to)=>`port-${to.name}-${to.id}-${eo.name}-${eo.id}`,getNodeUid=(eo,to)=>`node:${eo}:${to.id}`,getPortUid=(eo,to,ro)=>`port:${eo}:${to.id}:${ro.id}`,getEdgeUid=(eo,to)=>`edge:${eo}:${to.id}`;function preventSpread(eo){Object.defineProperty(eo,"__preventSpread",{enumerable:!0,configurable:!1,get(){document.currentScript&&Debug.error(`${eo.constructor.name} is a class, which should not be used in the spread syntax or argument of Object.assign`)}})}class EdgeModel{get id(){return this.inner.id}get automationId(){return this.inner.automationId}get source(){return this.inner.source}get target(){return this.inner.target}get sourcePortId(){return this.inner.sourcePortId}get targetPortId(){return this.inner.targetPortId}get status(){return this.inner.status}get data(){return this.inner.data}constructor(to){this.inner=to,preventSpread(this)}static fromJSON(to){return new EdgeModel(to)}updateStatus(to){return this.update(updateStatus(to))}update(to){const ro=to(this.inner);return ro===this.inner?this:new EdgeModel(ro)}shallow(){return new EdgeModel(this.inner)}toJSON(){return this.inner}}const is$2=Object.is;function mapCow(eo,to){const ro=[];let no=!0;for(let oo=0;oono.id===to)}link({prev:to,next:ro}){return to===this.prev&&ro===this.next?this:new NodeModel(this.inner,this.portPositionCache,to??this.prev,ro??this.next)}updateStatus(to){return this.update(updateStatus(to))}update(to){const ro=to(this.inner);return ro===this.inner?this:new NodeModel(ro,new Map,this.prev,this.next)}updateData(to){return this.data?this.update(ro=>{const no=to(ro.data);return no===ro.data?ro:Object.assign(Object.assign({},ro),{data:no})}):this}getPortPosition(to,ro){let no=this.portPositionCache.get(to);return no||(no=getPortPositionByPortId(this.inner,to,ro),this.portPositionCache.set(to,no)),no}hasPort(to){var ro;return!!(!((ro=this.inner.ports)===null||ro===void 0)&&ro.find(no=>no.id===to))}updatePositionAndSize(to){const{x:ro,y:no,width:oo,height:io}=to,so=Object.assign(Object.assign({},this.inner),{x:ro,y:no,width:oo??this.inner.width,height:io??this.inner.height});return new NodeModel(so,new Map,this.prev,this.next)}updatePorts(to){if(!this.inner.ports)return this;const ro=mapCow(this.inner.ports,to),no=this.inner.ports===ro?this.inner:Object.assign(Object.assign({},this.inner),{ports:ro});return no===this.inner?this:new NodeModel(no,new Map,this.prev,this.next)}invalidCache(){return new NodeModel(this.inner,new Map,this.prev,this.next)}toJSON(){return this.inner}}class GraphModel{constructor(to){this.nodes=to.nodes,this.edges=to.edges,this.groups=to.groups,this.head=to.head,this.tail=to.tail,this.edgesBySource=to.edgesBySource,this.edgesByTarget=to.edgesByTarget,this.selectedNodes=to.selectedNodes,preventSpread(this)}static empty(){return new GraphModel({nodes:OrderedMap$1.empty(),edges:HashMap.empty(),groups:[],head:void 0,tail:void 0,edgesBySource:HashMap.empty(),edgesByTarget:HashMap.empty(),selectedNodes:new Set})}static fromJSON(to){var ro;const no=OrderedMap$1.empty().mutate(),oo=HashMap.empty().mutate();let io,so;if(to.nodes.length===0)io=void 0,so=void 0;else if(to.nodes.length===1){const uo=to.nodes[0];no.set(uo.id,NodeModel.fromJSON(uo,void 0,void 0)),io=uo.id,so=uo.id}else{const uo=to.nodes[0],co=to.nodes[1],fo=to.nodes[to.nodes.length-1];io=uo.id,so=fo.id,no.set(uo.id,NodeModel.fromJSON(uo,void 0,co.id));let ho=to.nodes[0];if(to.nodes.length>2)for(let po=1;poao.update(ro));if(io===this.nodes)return this;const so=this.edges.mutate();return(no=this.edgesBySource.get(to))===null||no===void 0||no.forEach(ao=>{ao.forEach(lo=>{markEdgeDirty(so,lo)})}),(oo=this.edgesByTarget.get(to))===null||oo===void 0||oo.forEach(ao=>{ao.forEach(lo=>{markEdgeDirty(so,lo)})}),this.merge({nodes:io,edges:so.finish()})}updateNodeData(to,ro){return this.merge({nodes:this.nodes.update(to,no=>no.updateData(ro))})}updatePort(to,ro,no){const oo=this.nodes.update(to,io=>io.updatePorts(so=>so.id===ro?no(so):so));return this.merge({nodes:oo})}insertNode(to){const ro=this.nodes.mutate().set(to.id,NodeModel.fromJSON(to,this.tail,void 0));return this.tail&&!this.nodes.has(to.id)&&ro.update(this.tail,no=>no.link({next:to.id})),this.merge({nodes:ro.finish(),head:this.nodes.size===0?to.id:this.head,tail:to.id})}deleteItems(to){var ro;const no=new Set,oo=this.nodes.mutate();let io=this.head===void 0?void 0:this.nodes.get(this.head),so=io,ao;const lo=this.edgesBySource.mutate(),uo=this.edgesByTarget.mutate();for(;so!==void 0;){const fo=so.next?this.nodes.get(so.next):void 0;!((ro=to.node)===null||ro===void 0)&&ro.call(to,so.inner)?(oo.update(so.id,ho=>ho.link({prev:ao==null?void 0:ao.id}).update(po=>has$1(GraphNodeStatus.Editing)(po.status)?po:Object.assign(Object.assign({},po),{status:GraphNodeStatus.Default}))),ao=so):(oo.delete(so.id),lo.delete(so.id),uo.delete(so.id),no.add(so.id),ao&&oo.update(ao.id,ho=>ho.link({next:so==null?void 0:so.next})),fo&&oo.update(fo.id,ho=>ho.link({prev:ao==null?void 0:ao.id})),so===io&&(io=fo)),so=fo}const co=this.edges.mutate();return this.edges.forEach(fo=>{var ho,po;!no.has(fo.source)&&!no.has(fo.target)&&(!((po=(ho=to.edge)===null||ho===void 0?void 0:ho.call(to,fo))!==null&&po!==void 0)||po)?co.update(fo.id,go=>go.update(updateStatus(replace$1(GraphEdgeStatus.Default)))):(co.delete(fo.id),deleteEdgeByPort(lo,fo.id,fo.source,fo.sourcePortId),deleteEdgeByPort(uo,fo.id,fo.target,fo.targetPortId))}),this.merge({nodes:oo.finish(),edges:co.finish(),head:io==null?void 0:io.id,tail:ao==null?void 0:ao.id,edgesBySource:lo.finish(),edgesByTarget:uo.finish()})}insertEdge(to){if(this.isEdgeExist(to.source,to.sourcePortId,to.target,to.targetPortId)||!this.nodes.has(to.source)||!this.nodes.has(to.target))return this;const ro=setEdgeByPort(this.edgesBySource,to.id,to.source,to.sourcePortId),no=setEdgeByPort(this.edgesByTarget,to.id,to.target,to.targetPortId);return this.merge({nodes:this.nodes.update(to.source,oo=>oo.invalidCache()).update(to.target,oo=>oo.invalidCache()),edges:this.edges.set(to.id,EdgeModel.fromJSON(to)).map(oo=>oo.updateStatus(replace$1(GraphEdgeStatus.Default))),edgesBySource:ro,edgesByTarget:no})}updateEdge(to,ro){return this.merge({edges:this.edges.update(to,no=>no.update(ro))})}deleteEdge(to){const ro=this.edges.get(to);return ro?this.merge({edges:this.edges.delete(to),edgesBySource:deleteEdgeByPort(this.edgesBySource,ro.id,ro.source,ro.sourcePortId),edgesByTarget:deleteEdgeByPort(this.edgesByTarget,ro.id,ro.target,ro.targetPortId)}):this}updateNodesPositionAndSize(to){const ro=new Set,no=this.nodes.mutate(),oo=this.edges.mutate();return to.forEach(io=>{var so,ao;ro.add(io.id),no.update(io.id,lo=>lo.updatePositionAndSize(io)),(so=this.edgesBySource.get(io.id))===null||so===void 0||so.forEach(lo=>{lo.forEach(uo=>{markEdgeDirty(oo,uo)})}),(ao=this.edgesByTarget.get(io.id))===null||ao===void 0||ao.forEach(lo=>{lo.forEach(uo=>{markEdgeDirty(oo,uo)})})}),this.merge({nodes:no.finish(),edges:oo.finish()})}mapNodes(to){return this.merge({nodes:this.nodes.map(to)})}mapEdges(to){return this.merge({edges:this.edges.map(to)})}selectNodes(to,ro){const no=new Set,oo=this.nodes.map(ao=>{const lo=to(ao.inner);return lo&&no.add(ao.id),ao.updatePorts(updateStatus(replace$1(GraphPortStatus.Default))).updateStatus(resetConnectStatus(lo?GraphNodeStatus.Selected:GraphNodeStatus.UnconnectedToSelected))}).mutate();if(no.size===0)this.nodes.forEach(ao=>oo.update(ao.id,lo=>lo.updateStatus(replace$1(GraphNodeStatus.Default))));else if(ro){const ao=oo.get(ro);ao&&(oo.delete(ro),oo.set(ao.id,ao))}const io=ao=>{oo.update(ao,lo=>lo.updateStatus(replace$1(isSelected(lo)?GraphNodeStatus.Selected:GraphNodeStatus.ConnectedToSelected)))},so=no.size?this.edges.map(ao=>{let lo=GraphEdgeStatus.UnconnectedToSelected;return no.has(ao.source)&&(io(ao.target),lo=GraphEdgeStatus.ConnectedToSelected),no.has(ao.target)&&(io(ao.source),lo=GraphEdgeStatus.ConnectedToSelected),ao.updateStatus(replace$1(lo))}):this.edges.map(ao=>ao.updateStatus(replace$1(GraphEdgeStatus.Default)));return this.merge({nodes:oo.finish(),edges:so,selectedNodes:no})}getEdgesBySource(to,ro){var no;return(no=this.edgesBySource.get(to))===null||no===void 0?void 0:no.get(ro)}getEdgesByTarget(to,ro){var no;return(no=this.edgesByTarget.get(to))===null||no===void 0?void 0:no.get(ro)}isPortConnectedAsSource(to,ro){var no,oo;return((oo=(no=this.getEdgesBySource(to,ro))===null||no===void 0?void 0:no.size)!==null&&oo!==void 0?oo:0)>0}isPortConnectedAsTarget(to,ro){var no,oo;return((oo=(no=this.getEdgesByTarget(to,ro))===null||no===void 0?void 0:no.size)!==null&&oo!==void 0?oo:0)>0}shallow(){return this.merge({})}toJSON(){const to=[];let ro=this.head&&this.nodes.get(this.head);for(;ro;)to.push(ro.inner),ro=ro.next&&this.nodes.get(ro.next);const no=Array.from(this.edges.values()).map(oo=>oo.inner);return{nodes:to,edges:no}}isEdgeExist(to,ro,no,oo){const io=this.getEdgesBySource(to,ro),so=this.getEdgesByTarget(no,oo);if(!io||!so)return!1;let ao=!1;return io.forEach(lo=>{so.has(lo)&&(ao=!0)}),ao}merge(to){var ro,no,oo,io,so,ao,lo,uo;return new GraphModel({nodes:(ro=to.nodes)!==null&&ro!==void 0?ro:this.nodes,edges:(no=to.edges)!==null&&no!==void 0?no:this.edges,groups:(oo=to.groups)!==null&&oo!==void 0?oo:this.groups,head:(io=to.head)!==null&&io!==void 0?io:this.head,tail:(so=to.tail)!==null&&so!==void 0?so:this.tail,edgesBySource:(ao=to.edgesBySource)!==null&&ao!==void 0?ao:this.edgesBySource,edgesByTarget:(lo=to.edgesByTarget)!==null&&lo!==void 0?lo:this.edgesByTarget,selectedNodes:(uo=to.selectedNodes)!==null&&uo!==void 0?uo:this.selectedNodes})}}function setEdgeByPort(eo,to,ro,no){return eo.has(ro)?eo.update(ro,oo=>{const io=oo.get(no);return new Map(oo).set(no,(io?new Set(io):new Set).add(to))}):eo.set(ro,new Map([[no,new Set([to])]]))}function setEdgeByPortMutable(eo,to,ro,no){eo.has(ro)?eo.update(ro,oo=>{let io=oo.get(no);return io||(io=new Set,oo.set(no,io)),io.add(to),oo}):eo.set(ro,new Map([[no,new Set([to])]]))}function deleteEdgeByPort(eo,to,ro,no){return eo.has(ro)?eo.update(ro,oo=>{const io=oo.get(no);if(!io)return oo;const so=new Set(io);return so.delete(to),new Map(oo).set(no,so)}):eo}var CanvasMouseMode;(function(eo){eo.Pan="Pan",eo.Select="Select"})(CanvasMouseMode||(CanvasMouseMode={}));var GraphBehavior;(function(eo){eo.Default="default",eo.Dragging="dragging",eo.Panning="panning",eo.MultiSelect="multiSelect",eo.Connecting="connecting",eo.AddingNode="addingNode"})(GraphBehavior||(GraphBehavior={}));function clamp$1(eo,to,ro){return eo>ro?eo:to{const{instance:no,maxWait:oo}=ro||{};let io=0,so;return(...lo)=>{if(window.clearTimeout(io),isDef(oo)){const uo=Date.now();if(!isDef(so))so=uo;else if(uo-so>=oo){so=void 0,ao(lo);return}}io=window.setTimeout(()=>{ao(lo)},to)};function ao(lo){eo.apply(no,lo)}},emptyArrayInstance=[];function constantEmptyArray(){return emptyArrayInstance}const checkRectIntersect=(eo,to)=>{const ro=eo.maxXto.maxX,oo=eo.minY>to.maxY,io=eo.maxY{const{minX:ro,minY:no,maxX:oo,maxY:io}=eo,{x:so,y:ao}=to;return so>ro&&sono&&aoMath.pow(eo,2),distance=(eo,to,ro,no)=>Math.sqrt(square(ro-eo)+square(no-to)),getLinearFunction=(eo,to,ro,no)=>eo===ro?()=>Number.MAX_SAFE_INTEGER:oo=>(no-to)/(ro-eo)*oo+(to*ro-no*eo)/(ro-eo),shallowEqual=(eo,to)=>{if(!eo||eo.length!==to.length)return!1;for(let ro=0;ro{const io=to?Array.isArray(to)?to:to.apply(void 0,oo):oo;return shallowEqual(ro,io)||(ro=io,no=eo.apply(void 0,oo)),no}}var Direction$2;(function(eo){eo[eo.X=0]="X",eo[eo.Y=1]="Y",eo[eo.XY=2]="XY"})(Direction$2||(Direction$2={}));const isViewportComplete=eo=>!!eo.rect,getNodeRect=(eo,to)=>{const{x:ro,y:no}=eo,{width:oo,height:io}=getNodeSize(eo,to);return{x:ro,y:no,width:oo,height:io}},isNodeVisible=(eo,to,ro)=>isRectVisible(getNodeRect(eo,ro),to),isRectVisible=(eo,to)=>{const{x:ro,y:no,width:oo,height:io}=eo;return isPointVisible({x:ro,y:no},to)||isPointVisible({x:ro+oo,y:no},to)||isPointVisible({x:ro+oo,y:no+io},to)||isPointVisible({x:ro,y:no+io},to)},isPointVisible=(eo,to)=>{const{x:ro,y:no}=getContainerClientPoint(eo.x,eo.y,to),{height:oo,width:io}=to.rect;return ro>0&&ro0&&no{const no=[];return eo.forEach(oo=>{isNodeVisible(oo,to,ro)&&no.push(oo.inner)}),no},getRenderedNodes=(eo,to)=>{const ro=[],no=getRenderedArea(to);return eo.forEach(oo=>{isNodeInRenderedArea(oo,no)&&ro.push(oo.inner)}),ro},isNodeInRenderedArea=(eo,to)=>isPointInRect(to,eo),getVisibleArea=eo=>{if(!isViewportComplete(eo))return{minX:0,minY:0,maxX:0,maxY:0};const{rect:to,transformMatrix:ro}=eo,no=0,oo=0,io=to.width,so=to.height,ao=reverseTransformPoint(no,oo,ro),lo=reverseTransformPoint(io,so,ro);return{minX:ao.x,minY:ao.y,maxX:lo.x,maxY:lo.y}},getRenderedArea=eo=>{if(!isViewportComplete(eo))return{minX:0,minY:0,maxX:0,maxY:0};const{rect:to,transformMatrix:ro}=eo,no=0,oo=0,io=to.width,so=to.height,ao=reverseTransformPoint(no-to.width,oo-to.height,ro),lo=reverseTransformPoint(io+to.width,so+to.height,ro);return{minX:ao.x,minY:ao.y,maxX:lo.x,maxY:lo.y}},normalizeSpacing=eo=>eo?typeof eo=="number"?{top:eo,right:eo,bottom:eo,left:eo}:Object.assign({top:0,right:0,bottom:0,left:0},eo):{top:0,right:0,bottom:0,left:0},zoomTo=({scale:eo,anchor:to,direction:ro,limitScale:no})=>oo=>{const io=no(eo)/oo.transformMatrix[0],so=no(eo)/oo.transformMatrix[3],{x:ao,y:lo}=to,uo=ao*(1-io),co=lo*(1-so);let fo;switch(ro){case Direction$2.X:fo=[eo,0,0,oo.transformMatrix[3],oo.transformMatrix[4]*io+uo,oo.transformMatrix[5]];break;case Direction$2.Y:fo=[oo.transformMatrix[0],0,0,eo,oo.transformMatrix[4],oo.transformMatrix[5]*so+co];break;case Direction$2.XY:default:fo=[eo,0,0,eo,oo.transformMatrix[4]*io+uo,oo.transformMatrix[5]*so+co]}return Object.assign(Object.assign({},oo),{transformMatrix:fo})},zoom=({scale:eo,anchor:to,direction:ro,limitScale:no})=>eo===1?identical:oo=>{let io;switch(ro){case Direction$2.X:return zoomTo({anchor:to,direction:ro,limitScale:no,scale:oo.transformMatrix[0]*eo})(oo);case Direction$2.Y:return zoomTo({anchor:to,direction:ro,limitScale:no,scale:oo.transformMatrix[3]*eo})(oo);case Direction$2.XY:default:{const so=no(oo.transformMatrix[0]*eo),ao=no(oo.transformMatrix[3]*eo),lo=so/oo.transformMatrix[0],uo=ao/oo.transformMatrix[3],{x:co,y:fo}=to,ho=co*(1-lo),po=fo*(1-uo);io=[so,0,0,ao,oo.transformMatrix[4]*lo+ho,oo.transformMatrix[5]*uo+po]}}return Object.assign(Object.assign({},oo),{transformMatrix:io})},pan=(eo,to)=>eo===0&&to===0?identical:ro=>Object.assign(Object.assign({},ro),{transformMatrix:[ro.transformMatrix[0],ro.transformMatrix[1],ro.transformMatrix[2],ro.transformMatrix[3],ro.transformMatrix[4]+eo,ro.transformMatrix[5]+to]}),minimapPan=(eo,to)=>eo===0&&to===0?identical:ro=>{const[no,oo,io,so]=ro.transformMatrix;return Object.assign(Object.assign({},ro),{transformMatrix:[no,oo,io,so,ro.transformMatrix[4]+no*eo+oo*to,ro.transformMatrix[5]+io*eo+so*to]})},getContentArea$1=(eo,to,ro)=>{let no=1/0,oo=1/0,io=1/0,so=1/0,ao=-1/0,lo=-1/0;return(ro===void 0?ho=>eo.nodes.forEach(ho):ho=>ro==null?void 0:ro.forEach(po=>{const go=eo.nodes.get(po);go&&ho(go)}))(ho=>{const{width:po,height:go}=getNodeSize(ho,to);ho.xao&&(ao=ho.x+po),ho.y+go>lo&&(lo=ho.y+go),po{let{width:ro,height:no}=eo,{width:oo,height:io}=to;if(ro>oo){const so=ro;ro=oo,oo=so}if(no>io){const so=no;no=io,io=so}return{nodeMinVisibleWidth:ro,nodeMinVisibleHeight:no,nodeMaxVisibleWidth:oo,nodeMaxVisibleHeight:io}},getScaleRange=(eo,{width:to,height:ro})=>{const{nodeMinVisibleWidth:no,nodeMinVisibleHeight:oo,nodeMaxVisibleWidth:io,nodeMaxVisibleHeight:so}=normalizeNodeVisibleMinMax(eo);let ao=0,lo=0,uo=1/0,co=1/0;return to&&(ao=no/to,uo=io/to),ro&&(lo=oo/ro,co=so/ro),{minScaleX:ao,minScaleY:lo,maxScaleX:uo,maxScaleY:co}},getZoomFitMatrix=eo=>{const{data:to,graphConfig:ro,disablePan:no,direction:oo,rect:io}=eo,{nodes:so}=to;if(so.size===0)return[1,0,0,1,0,0];const{minNodeWidth:ao,minNodeHeight:lo,minNodeX:uo,minNodeY:co,maxNodeX:fo,maxNodeY:ho}=getContentArea$1(to,ro),{minScaleX:po,minScaleY:go,maxScaleX:vo,maxScaleY:bo}=getScaleRange(eo,{width:ao,height:lo}),xo=normalizeSpacing(eo.spacing),{width:_o,height:Eo}=io,So=_o/(fo-uo+xo.left+xo.right),To=Eo/(ho-co+xo.top+xo.bottom),wo=oo===Direction$2.Y?Math.min(Math.max(po,go,To),vo,bo):Math.min(Math.max(po,go,Math.min(So,To)),bo,bo),Co=oo===Direction$2.XY?Math.min(Math.max(po,So),vo):wo,Oo=oo===Direction$2.XY?Math.min(Math.max(go,To),bo):wo;if(no)return[Co,0,0,Oo,0,0];const Ao=-Co*(uo-xo.left),Ro=-Oo*(co-xo.top);if(getVisibleNodes(to.nodes,{rect:io,transformMatrix:[Co,0,0,Oo,Ao,Ro]},ro).length>0)return[Co,0,0,Oo,Ao,Ro];let Mo=to.nodes.first();return Mo&&to.nodes.forEach(Do=>{Mo.y>Do.y&&(Mo=Do)}),[Co,0,0,Oo,-Co*(Mo.x-xo.left),-Oo*(Mo.y-xo.top)]},focusArea=(eo,to,ro,no,oo)=>{const io=ro-eo,so=no-to,ao=Math.min(oo.rect.width/io,oo.rect.height/so),lo=-ao*(eo+io/2)+oo.rect.width/2,uo=-ao*(to+so/2)+oo.rect.height/2;return Object.assign(Object.assign({},oo),{transformMatrix:[ao,0,0,ao,lo,uo]})};function getContainerCenter(eo){const to=eo.current;if(!to)return;const ro=to.width/2,no=to.height/2;return{x:ro,y:no}}function getRelativePoint(eo,to){const ro=to.clientX-eo.left,no=to.clientY-eo.top;return{x:ro,y:no}}const scrollIntoView$3=(eo,to,ro,no,oo)=>{if(!ro)return identical;const{width:io,height:so}=ro;return!(eo<0||eo>io||to<0||to>so)&&!no?identical:lo=>{const uo=oo?oo.x-eo:io/2-eo,co=oo?oo.y-to:so/2-to;return Object.assign(Object.assign({},lo),{transformMatrix:[lo.transformMatrix[0],lo.transformMatrix[1],lo.transformMatrix[2],lo.transformMatrix[3],lo.transformMatrix[4]+uo,lo.transformMatrix[5]+co]})}},getScaleLimit=(eo,to)=>{const{minNodeWidth:ro,minNodeHeight:no}=getContentArea$1(eo,to.graphConfig),{minScaleX:oo,minScaleY:io}=getScaleRange(to,{width:ro,height:no});return Math.max(oo,io)},getContentArea=memoize$1(getContentArea$1),getOffsetLimit=({data:eo,graphConfig:to,rect:ro,transformMatrix:no,canvasBoundaryPadding:oo,groupPadding:io})=>{var so,ao,lo,uo;const co=getContentArea(eo,to),fo=getClientDeltaByPointDelta(co.minNodeX-((io==null?void 0:io.left)||0),co.minNodeY-((io==null?void 0:io.top)||0),no);fo.x-=(so=oo==null?void 0:oo.left)!==null&&so!==void 0?so:0,fo.y-=(ao=oo==null?void 0:oo.top)!==null&&ao!==void 0?ao:0;const ho=getClientDeltaByPointDelta(co.maxNodeX+((io==null?void 0:io.right)||0),co.maxNodeY+((io==null?void 0:io.bottom)||0),no);ho.x+=(lo=oo==null?void 0:oo.right)!==null&&lo!==void 0?lo:0,ho.y+=(uo=oo==null?void 0:oo.bottom)!==null&&uo!==void 0?uo:0;let po=-fo.x||0,go=-fo.y||0,vo=ro.width-ho.x||0,bo=ro.height-ho.y||0;if(vo({present:to,past:{next:eo.past,value:ro(eo.present)},future:null}),undo$1=eo=>eo.past?{present:eo.past.value,past:eo.past.next,future:{next:eo.future,value:eo.present}}:eo,redo$1=eo=>eo.future?{present:eo.future.value,past:{next:eo.past,value:eo.present},future:eo.future.next}:eo,resetUndoStack=eo=>({present:eo,future:null,past:null}),isWithinThreshold=(eo,to,ro)=>Math.abs(eo){warnGraphStateContext()}},EMPTY_CONNECT_STATE={sourceNode:void 0,sourcePort:void 0,targetNode:void 0,targetPort:void 0,movingPoint:{x:0,y:0}},GraphValueContext=reactExports.createContext(new Proxy(GraphModel.empty(),{get:(eo,to)=>(console.warn("Default graph data value is being used. Please check if you forget rendering Graph component"),Reflect.get(eo,to))})),GraphStateContext=reactExports.createContext(defaultGraphStateContext),SlotsContext=reactExports.createContext({});class EventChannel{constructor(){this.listenersRef=reactExports.createRef(),this.externalHandlerRef=reactExports.createRef(),this.queue=[],this.working=!1}trigger(to){this.working?this.queue.push(to):(this.working=!0,reactDomExports.unstable_batchedUpdates(()=>{this.callHandlers(to);for(let ro=0;ro{this.dispatchDelegate(no,oo)},this.state=to,this.UNSAFE_latestState=to,this.dispatchDelegate=ro}setMouseClientPosition(to){this.mouseClientPoint=to}unsetMouseClientPosition(){this.mouseClientPoint=void 0}getMouseClientPosition(){return this.mouseClientPoint}getEnabledFeatures(){return this.state.settings.features}getBehavior(){return this.behavior}setBehavior(to){this.behavior=to}getData(){return this.state.data.present}getGlobalEventTarget(){var to,ro;return(ro=(to=this.getGlobalEventTargetDelegate)===null||to===void 0?void 0:to.call(this))!==null&&ro!==void 0?ro:window}}function useConst(eo){const to=reactExports.useRef();return to.current===void 0&&(to.current=eo()),to.current}const noop$2=()=>{};class ErrorBoundary extends reactExports.Component{constructor(to){super(to),this.state={hasError:!1}}static getDerivedStateFromError(to){return{hasError:!0,error:to}}componentDidCatch(to,ro){console.error(to),this.setState({error:to,errorInfo:ro})}render(){var to,ro;if(!this.state.hasError)return this.props.children;if(this.props.renderOnError)return(to=this.props.renderOnError(this.state.error,this.state.errorInfo,this.props.children))!==null&&to!==void 0?to:null;const no=this.state.errorInfo?(ro=this.state.errorInfo.componentStack)===null||ro===void 0?void 0:ro.split(` +`):[];return jsxRuntimeExports.jsxs("div",Object.assign({style:{color:"red"}},{children:[jsxRuntimeExports.jsx("h1",{children:"Something went wrong."}),jsxRuntimeExports.jsx("p",{children:`Error: ${this.state.error}`}),jsxRuntimeExports.jsx("p",{children:`ErrorInfo: ${JSON.stringify(this.state.errorInfo)}`}),jsxRuntimeExports.jsx("h2",{children:"Component Stack"}),(no??[]).map((oo,io)=>jsxRuntimeExports.jsx("p",{children:oo},io))]}))}}const EMPTY_CONNECT_CONTEXT={sourceNode:void 0,sourcePort:void 0,targetNode:void 0,targetPort:void 0},ConnectingStateContext=reactExports.createContext(EMPTY_CONNECT_CONTEXT);ConnectingStateContext.displayName="ConnectingStateContext";const ConnectingState=({children:eo,data:to,connectState:ro})=>{let no,oo,io,so;ro&&(no=to.nodes.get(ro.sourceNode),oo=no==null?void 0:no.getPort(ro.sourcePort),io=ro.targetNode?to.nodes.get(ro.targetNode):void 0,so=ro.targetPort?io==null?void 0:io.getPort(ro.targetPort):void 0);const ao=reactExports.useMemo(()=>({sourceNode:no,sourcePort:oo,targetNode:io,targetPort:so}),[no,oo,io,so]);return jsxRuntimeExports.jsx(ConnectingStateContext.Provider,Object.assign({value:ao},{children:eo}))};ConnectingState.displayName="ConnectingState";const AlignmentLinesContext=reactExports.createContext([]),GraphControllerContext=reactExports.createContext(new GraphController(EMPTY_GRAPH_STATE,noop$2));function GraphStateStore(eo){const{graphController:to,state:ro,dispatch:no,children:oo}=eo,io=reactExports.useMemo(()=>({state:ro,dispatch:no}),[ro,no]);return jsxRuntimeExports.jsx(GraphConfigContext.Provider,Object.assign({value:ro.settings.graphConfig},{children:jsxRuntimeExports.jsx(GraphControllerContext.Provider,Object.assign({value:to},{children:jsxRuntimeExports.jsx(ConnectingState,Object.assign({data:ro.data.present,connectState:ro.connectState},{children:jsxRuntimeExports.jsx(GraphStateContext.Provider,Object.assign({value:io},{children:jsxRuntimeExports.jsx(ViewportContext.Provider,Object.assign({value:ro.viewport},{children:jsxRuntimeExports.jsx(GraphValueContext.Provider,Object.assign({value:ro.data.present},{children:jsxRuntimeExports.jsx(AlignmentLinesContext.Provider,Object.assign({value:ro.alignmentLines},{children:oo}))}))}))}))}))}))}))}const ReactDagEditor=eo=>{var to;reactExports.useEffect(()=>{eo.handleWarning&&(Debug.warn=eo.handleWarning)},[]);const ro=(to=eo.handleError)===null||to===void 0?void 0:to.bind(null),{state:no,dispatch:oo,getGlobalEventTarget:io}=eo,so=useConst(()=>new GraphController(no,oo));return so.UNSAFE_latestState=no,reactExports.useLayoutEffect(()=>{so.state=no,so.dispatchDelegate=oo,so.getGlobalEventTargetDelegate=io},[oo,io,so,no]),reactExports.useEffect(()=>()=>{so.dispatchDelegate=noop$2},[so]),jsxRuntimeExports.jsx(ErrorBoundary,Object.assign({renderOnError:ro},{children:jsxRuntimeExports.jsx(SlotsContext.Provider,Object.assign({value:eo},{children:jsxRuntimeExports.jsx(GraphStateStore,Object.assign({state:no,dispatch:oo,graphController:so},{children:jsxRuntimeExports.jsx(ContextMenuConfigContext.Provider,Object.assign({value:useConst(()=>new ContextMenuConfig)},{children:jsxRuntimeExports.jsx("div",Object.assign({style:eo.style,className:eo.className},{children:eo.children}))}))}))}))}))},useContextMenuConfigContext=()=>reactExports.useContext(ContextMenuConfigContext);var GraphNodeEvent;(function(eo){eo.Click="[Node]Click",eo.DoubleClick="[Node]DoubleClick",eo.MouseDown="[Node]MouseDown",eo.MouseUp="[Node]MouseUp",eo.MouseEnter="[Node]MouseEnter",eo.MouseLeave="[Node]MouseLeave",eo.MouseOver="[Node]MouseOver",eo.MouseOut="[Node]MouseOut",eo.MouseMove="[Node]MouseMove",eo.ContextMenu="[Node]ContextMenu",eo.Drag="[Node]Drag",eo.DragStart="[Node]DragStart",eo.DragEnd="[Node]DragEnd",eo.PointerDown="[Node]PointerDown",eo.PointerEnter="[Node]PointerEnter",eo.PointerMove="[Node]PointerMove",eo.PointerLeave="[Node]PointerLeave",eo.PointerUp="[Node]PointerUp",eo.Resizing="[Node]Resizing",eo.ResizingStart="[Node]ResizingStart",eo.ResizingEnd="[Node]ResizingEnd",eo.KeyDown="[Node]KeyDown",eo.Select="[Node]Select",eo.SelectAll="[Node]SelectAll",eo.Centralize="[Node]Centralize",eo.Locate="[Node]Locate",eo.Add="[Node]Add"})(GraphNodeEvent||(GraphNodeEvent={}));var GraphEdgeEvent;(function(eo){eo.Click="[Edge]Click",eo.DoubleClick="[Edge]DoubleClick",eo.MouseEnter="[Edge]MouseEnter",eo.MouseLeave="[Edge]MouseLeave",eo.MouseOver="[Edge]MouseOver",eo.MouseOut="[Edge]MouseOut",eo.MouseMove="[Edge]MouseMove",eo.MouseDown="[Edge]MouseDown",eo.MouseUp="[Edge]MouseUp",eo.ContextMenu="[Edge]ContextMenu",eo.ConnectStart="[Edge]ConnectStart",eo.ConnectMove="[Edge]ConnectMove",eo.ConnectEnd="[Edge]ConnectEnd",eo.ConnectNavigate="[Edge]ConnectNavigate",eo.Add="[Edge]Add"})(GraphEdgeEvent||(GraphEdgeEvent={}));var GraphPortEvent;(function(eo){eo.Click="[Port]Click",eo.DoubleClick="[Port]DoubleClick",eo.MouseDown="[Port]MouseDown",eo.PointerDown="[Port]PointerDown",eo.PointerUp="[Port]PointerUp",eo.PointerEnter="[Port]PointerEnter",eo.PointerLeave="[Port]PointerLeave",eo.MouseUp="[Port]MouseUp",eo.MouseEnter="[Port]MouseEnter",eo.MouseLeave="[Port]MouseLeave",eo.MouseOver="[Port]MouseOver",eo.MouseOut="[Port]MouseOut",eo.MouseMove="[Port]MouseMove",eo.ContextMenu="[Port]ContextMenu",eo.KeyDown="[Port]KeyDown",eo.Focus="[Port]Focus",eo.Blur="[Port]Blur"})(GraphPortEvent||(GraphPortEvent={}));var GraphCanvasEvent;(function(eo){eo.Click="[Canvas]Click",eo.DoubleClick="[Canvas]DoubleClick",eo.MouseDown="[Canvas]MouseDown",eo.MouseUp="[Canvas]MouseUp",eo.MouseEnter="[Canvas]MouseEnter",eo.MouseLeave="[Canvas]MouseLeave",eo.MouseOver="[Canvas]MouseOver",eo.MouseOut="[Canvas]MouseOut",eo.MouseMove="[Canvas]MouseMove",eo.ContextMenu="[Canvas]ContextMenu",eo.DragStart="[Canvas]DragStart",eo.Drag="[Canvas]Drag",eo.DragEnd="[Canvas]DragEnd",eo.Pan="[Canvas]Pan",eo.Focus="[Canvas]Focus",eo.Blur="[Canvas]Blur",eo.Zoom="[Canvas]Zoom",eo.Pinch="[Canvas]Pinch",eo.KeyDown="[Canvas]KeyDown",eo.KeyUp="[Canvas]KeyUp",eo.SelectStart="[Canvas]SelectStart",eo.SelectMove="[Canvas]SelectMove",eo.SelectEnd="[Canvas]SelectEnd",eo.UpdateNodeSelectionBySelectBox="[Canvas]UpdateNodeSelectionBySelectBox",eo.MouseWheelScroll="[Canvas]MouseWheelScroll",eo.DraggingNodeFromItemPanel="[Canvas]DraggingNodeFromItemPanel",eo.DraggingNodeFromItemPanelStart="[Canvas]DraggingNodeFromItemPanelStart",eo.DraggingNodeFromItemPanelEnd="[Canvas]DraggingNodeFromItemPanelEnd",eo.ViewportResize="[Canvas]ViewportResize",eo.Navigate="[Canvas]Navigate",eo.VirtualizationRecalculated="[Canvas]VirtualizationRecalculated",eo.ResetSelection="[Canvas]ResetSelection",eo.Copy="[Canvas]Copy",eo.Paste="[Canvas]Paste",eo.Delete="[Canvas]Delete",eo.Undo="[Canvas]Undo",eo.Redo="[Canvas]Redo",eo.ScrollIntoView="[Canvas]ScrollIntoView",eo.ResetUndoStack="[Canvas]ResetUndoStack",eo.ResetViewport="[Canvas]ResetViewport",eo.ZoomTo="[Canvas]ZoomTo",eo.ZoomToFit="[Canvas]ZoomToFit",eo.SetData="[Canvas]SetData",eo.UpdateData="[Canvas]UpdateData",eo.ScrollTo="[Canvas]ScrollTo",eo.UpdateSettings="[Canvas]UpdateSettings"})(GraphCanvasEvent||(GraphCanvasEvent={}));var GraphScrollBarEvent;(function(eo){eo.ScrollStart="[ScrollBar]ScrollStart",eo.Scroll="[ScrollBar]Scroll",eo.ScrollEnd="[ScrollBar]ScrollEnd"})(GraphScrollBarEvent||(GraphScrollBarEvent={}));var GraphMinimapEvent;(function(eo){eo.PanStart="[Minimap]PanStart",eo.Pan="[Minimap]Pan",eo.PanEnd="[Minimap]PanEnd",eo.Click="[Minimap]Click"})(GraphMinimapEvent||(GraphMinimapEvent={}));var GraphContextMenuEvent;(function(eo){eo.Open="[ContextMenu]Open",eo.Close="[ContextMenu]Close"})(GraphContextMenuEvent||(GraphContextMenuEvent={}));function getScrollLineHeight(){try{const eo=document.createElement("iframe");eo.src="#",document.body.appendChild(eo);const{contentDocument:to}=eo;if(!to)throw new Error("Fail to create iframe");to.documentElement.innerHTML=purify.sanitize("a",{RETURN_TRUSTED_TYPE:!0});const no=to.body.firstElementChild.offsetHeight;return document.body.removeChild(eo),no}catch(eo){return Debug.error("failed to calculate scroll line height",eo),16}}const scrollLineHeight=getScrollLineHeight(),normalizeWheelDelta=typeof WheelEvent=="function"?(eo,to)=>{switch(eo){case WheelEvent.DOM_DELTA_PIXEL:return to;case WheelEvent.DOM_DELTA_LINE:return to*scrollLineHeight;case WheelEvent.DOM_DELTA_PAGE:return to*window.innerHeight;default:return to}}:(eo,to)=>to,EMPTY_RECT={height:0,width:0,x:0,y:0,bottom:0,left:0,right:0,top:0,toJSON(){return this}},VirtualizationContext=reactExports.createContext({viewport:{rect:EMPTY_RECT,transformMatrix:EMPTY_TRANSFORM_MATRIX},renderedArea:{minX:0,minY:0,maxX:0,maxY:0},visibleArea:{minX:0,minY:0,maxX:0,maxY:0},renderedNodes:new Set,renderedEdges:new Set,timestamp:0});function useGraphConfig(){return reactExports.useContext(GraphConfigContext)}function useGraphController(){return reactExports.useContext(GraphControllerContext)}function useAlignmentLines(){return reactExports.useContext(AlignmentLinesContext)}function useConnectingState(){return reactExports.useContext(ConnectingStateContext)}function useVirtualization(){return reactExports.useContext(VirtualizationContext)}let shouldRespondWheel=!1;const useWheelHandler=eo=>{const{containerRef:to,svgRef:ro,rectRef:no,zoomSensitivity:oo,scrollSensitivity:io,isHorizontalScrollDisabled:so,isVerticalScrollDisabled:ao,isCtrlKeyZoomEnable:lo,eventChannel:uo,graphConfig:co,dispatch:fo}=eo,po=useGraphController().getGlobalEventTarget();reactExports.useLayoutEffect(()=>{const go=ro.current,vo=to.current;if(!go||!vo)return noop$2;const bo=Eo=>{const So=no.current;if(!So||!shouldRespondWheel)return;if(Eo.preventDefault(),Eo.ctrlKey&&lo){const Oo=(normalizeWheelDelta(Eo.deltaMode,Eo.deltaY)>0?-oo:oo)+1;uo.trigger({type:GraphCanvasEvent.Zoom,rawEvent:Eo,scale:Oo,anchor:getRelativePoint(So,Eo)});return}const To=so?0:-normalizeWheelDelta(Eo.deltaMode,Eo.shiftKey?Eo.deltaY:Eo.deltaX)*io,wo=ao||Eo.shiftKey?0:-normalizeWheelDelta(Eo.deltaMode,Eo.deltaY)*io;uo.trigger({type:GraphCanvasEvent.MouseWheelScroll,dx:To,dy:wo,rawEvent:Eo})},xo=()=>{shouldRespondWheel=!0};vo.addEventListener("mouseenter",xo);const _o=()=>{shouldRespondWheel=!1};return vo.addEventListener("mouseleave",_o),po.addEventListener("wheel",bo,{passive:!1}),()=>{po.removeEventListener("wheel",bo),vo.removeEventListener("mouseenter",xo),vo.removeEventListener("mouseleave",_o)}},[ro,no,oo,io,fo,so,ao,co,uo,lo])};function nextFrame(eo){requestAnimationFrame(()=>{requestAnimationFrame(eo)})}const LIMIT=20,isRectChanged=(eo,to)=>eo===to?!1:!eo||!to?!0:eo.top!==to.top||eo.left!==to.left||eo.width!==to.width||eo.height!==to.height,useUpdateViewportCallback=(eo,to,ro)=>reactExports.useCallback((no=!1)=>{var oo;const io=(oo=to.current)===null||oo===void 0?void 0:oo.getBoundingClientRect();(no||isRectChanged(eo.current,io))&&(eo.current=io,ro.trigger({type:GraphCanvasEvent.ViewportResize,viewportRect:io}))},[ro,eo,to]),useContainerRect=(eo,to,ro,no)=>{reactExports.useLayoutEffect(()=>{eo.viewport.rect||no(!0)}),reactExports.useEffect(()=>{const oo=ro.current;if(!oo)return noop$2;const io=debounce(()=>nextFrame(()=>{no()}),LIMIT);if(typeof ResizeObserver<"u"){const so=new ResizeObserver(io);return so.observe(oo),()=>{so.unobserve(oo),so.disconnect()}}return window.addEventListener("resize",io),()=>{window.removeEventListener("resize",io)}},[ro,no]),reactExports.useEffect(()=>{const oo=debounce(so=>{const ao=to.current;!ao||!(so.target instanceof Element)||!so.target.contains(ao)||no()},LIMIT),io={capture:!0,passive:!0};return document.body.addEventListener("scroll",oo,io),()=>{document.body.removeEventListener("scroll",oo,io)}},[to,no])};function makeScheduledCallback(eo,to,ro){let no=!1,oo,io;const so=(...ao)=>{oo=ao,no||(no=!0,io=to(()=>{no=!1,reactDomExports.unstable_batchedUpdates(()=>{eo.apply(null,oo)})}))};return so.cancel=()=>{ro(io)},so}const animationFramed=eo=>makeScheduledCallback(eo,requestAnimationFrame,cancelAnimationFrame),useRenderedArea=(eo,to)=>reactExports.useMemo(()=>to?getRenderedArea(eo):{minX:-Number.MAX_SAFE_INTEGER,minY:-Number.MAX_SAFE_INTEGER,maxX:Number.MAX_SAFE_INTEGER,maxY:Number.MAX_SAFE_INTEGER},[eo,to]);class DragController{constructor(to,ro){this.onMove=noop$2,this.onEnd=noop$2,this.lastEvent=null,this.startX=0,this.startY=0,this.prevClientX=0,this.prevClientY=0,this.onMouseUp=no=>{this.lastEvent=no,this.doOnMouseUp(no),this.lastEvent=null},this.onMouseMove=no=>{this.lastEvent=no,no.preventDefault(),this.mouseMove(no)},this.eventProvider=to,this.getPositionFromEvent=ro,this.mouseMove=animationFramed(no=>{this.doOnMouseMove(no)})}start(to){this.lastEvent=to;const{x:ro,y:no}=this.getPositionFromEvent(to);this.startX=ro,this.startY=no,this.prevClientX=ro,this.prevClientY=no,this.eventProvider.on("move",this.onMouseMove),this.eventProvider.on("end",this.onMouseUp)}stop(){this.mouseMove.cancel(),this.eventProvider.off("move",this.onMouseMove),this.eventProvider.off("end",this.onMouseUp)}getDelta(to,ro){const no=to-this.prevClientX,oo=ro-this.prevClientY;return this.prevClientX=to,this.prevClientY=ro,{x:no,y:oo}}getTotalDelta(to){const ro=to.clientX-this.startX,no=to.clientY-this.startY;return{x:ro,y:no}}doOnMouseMove(to){const{x:ro,y:no}=this.getPositionFromEvent(to),{x:oo,y:io}=this.getDelta(ro,no),{x:so,y:ao}=this.getTotalDelta(to);this.onMove({clientX:ro,clientY:no,dx:oo,dy:io,totalDX:so,totalDY:ao,e:to})}doOnMouseUp(to){to.preventDefault();const{x:ro,y:no}=this.getTotalDelta(to);this.onEnd({totalDX:ro,totalDY:no,e:to}),this.stop()}}function defaultGetPositionFromEvent(eo){return{x:eo.clientX,y:eo.clientY}}class DragNodeController extends DragController{constructor(to,ro,no){super(to,ro),this.rectRef=no}doOnMouseMove(to){super.doOnMouseMove(to);const ro=this.rectRef.current;!ro||!this.lastEvent||(to.clientXro.right||to.clientYro.bottom)&&this.mouseMove(this.lastEvent)}}class TouchController{constructor(to){this.eventHandlers={onPointerDown:(ro,...no)=>{ro.pointerType==="touch"&&(ro.preventDefault(),this.pointers=new Map(this.pointers),this.pointers.set(ro.pointerId,ro.nativeEvent),this.updateHandler(ro.nativeEvent,...no))},onPointerMove:(ro,...no)=>{ro.pointerType==="touch"&&(ro.preventDefault(),this.pointers.set(ro.pointerId,ro.nativeEvent),this.onMove(ro.nativeEvent,...no))},onPointerUp:(ro,...no)=>{ro.pointerType==="touch"&&(ro.preventDefault(),this.pointers=new Map(this.pointers),this.pointers.delete(ro.pointerId),this.updateHandler(ro.nativeEvent,...no))}},this.pointers=new Map,this.onMove=animationFramed((ro,...no)=>{var oo;(oo=this.currentHandler)===null||oo===void 0||oo.onMove(this.pointers,ro,...no)}),this.handlers=to}updateHandler(to,...ro){var no,oo;const io=this.handlers.get(this.pointers.size);io!==this.currentHandler&&((no=this.currentHandler)===null||no===void 0||no.onEnd(to,...ro),this.currentHandler=io,(oo=this.currentHandler)===null||oo===void 0||oo.onStart(this.pointers,to,...ro))}}class TwoFingerHandler{constructor(to,ro){this.prevDistance=0,this.rectRef=to,this.eventChannel=ro}onEnd(){}onMove(to,ro){const no=Array.from(to.values()),oo=distance(no[0].clientX,no[0].clientY,no[1].clientX,no[1].clientY),{prevEvents:io,prevDistance:so}=this;if(this.prevDistance=oo,this.prevEvents=no,!io)return;const ao=no[0].clientX-io[0].clientX,lo=no[1].clientX-io[1].clientX,uo=no[0].clientY-io[0].clientY,co=no[1].clientY-io[1].clientY,fo=(ao+lo)/2,ho=(uo+co)/2,po=(oo-so)/so+1,go=getContainerCenter(this.rectRef);go&&this.eventChannel.trigger({type:GraphCanvasEvent.Pinch,rawEvent:ro,dx:fo,dy:ho,scale:po,anchor:go})}onStart(to){if(to.size!==2)throw new Error(`Unexpected touch event with ${to.size} touches`);this.prevEvents=Array.from(to.values()),this.prevDistance=distance(this.prevEvents[0].clientX,this.prevEvents[0].clientY,this.prevEvents[1].clientX,this.prevEvents[1].clientY)}}const useGraphTouchHandler=(eo,to)=>reactExports.useMemo(()=>new TouchController(new Map().set(2,new TwoFingerHandler(eo,to))).eventHandlers,[eo,to]),isSafari=getBrowser()===BrowserType.Safari;let prevScale=0;function useSafariScale({rectRef:eo,svgRef:to,eventChannel:ro}){reactExports.useEffect(()=>{const no=to.current;if(!isSafari||!no||isMobile())return()=>{};const oo=animationFramed(lo=>{const{scale:uo}=lo,co=uo/prevScale;prevScale=uo,ro.trigger({type:GraphCanvasEvent.Zoom,rawEvent:lo,scale:co,anchor:getContainerCenter(eo)})}),io=lo=>{lo.stopPropagation(),lo.preventDefault(),prevScale=lo.scale,ro.trigger({type:GraphCanvasEvent.Zoom,rawEvent:lo,scale:lo.scale,anchor:getContainerCenter(eo)})},so=lo=>{lo.stopPropagation(),lo.preventDefault(),oo(lo)},ao=lo=>{lo.stopPropagation(),lo.preventDefault(),oo(lo)};return no.addEventListener("gesturestart",io),no.addEventListener("gesturechange",so),no.addEventListener("gestureend",ao),()=>{no.removeEventListener("gesturestart",io),no.removeEventListener("gesturechange",so),no.removeEventListener("gestureend",ao)}},[])}function useDeferredValue(eo,{timeout:to}){const[ro,no]=reactExports.useState(eo);return reactExports.useEffect(()=>{const oo=setTimeout(()=>{no(eo)},to);return()=>{clearTimeout(oo)}},[eo,to]),ro}const useSelectBox=(eo,to)=>{const ro=useDeferredValue(to,{timeout:100});reactExports.useEffect(()=>{eo({type:GraphCanvasEvent.UpdateNodeSelectionBySelectBox})},[ro])},useGraphState=()=>reactExports.useContext(GraphStateContext),handleBehaviorChange=(eo,to)=>{switch(to.type){case GraphNodeEvent.DragStart:return GraphBehavior.Dragging;case GraphEdgeEvent.ConnectStart:return GraphBehavior.Connecting;case GraphCanvasEvent.SelectStart:return GraphBehavior.MultiSelect;case GraphCanvasEvent.DragStart:return GraphBehavior.Panning;case GraphCanvasEvent.DraggingNodeFromItemPanelStart:return GraphBehavior.AddingNode;case GraphNodeEvent.DragEnd:case GraphEdgeEvent.ConnectEnd:case GraphCanvasEvent.SelectEnd:case GraphCanvasEvent.DragEnd:case GraphCanvasEvent.DraggingNodeFromItemPanelEnd:return GraphBehavior.Default;default:return eo}},behaviorReducer=(eo,to)=>{const ro=handleBehaviorChange(eo.behavior,to);return ro===eo.behavior?eo:Object.assign(Object.assign({},eo),{behavior:ro})};function __rest(eo,to){var ro={};for(var no in eo)Object.prototype.hasOwnProperty.call(eo,no)&&to.indexOf(no)<0&&(ro[no]=eo[no]);if(eo!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oo=0,no=Object.getOwnPropertySymbols(eo);oo{switch(to.type){case GraphCanvasEvent.Paste:{const{position:ro}=to;if(!isViewportComplete(eo.viewport))return eo;const{rect:no}=eo.viewport;let oo=to.data.nodes;if(ro&&no){const so=getRealPointFromClientPoint(ro.x,ro.y,eo.viewport);let ao,lo;oo=oo.map((uo,co)=>(co===0&&(ao=so.x-uo.x,lo=so.y-uo.y),Object.assign(Object.assign({},uo),{x:ao?uo.x-COPIED_NODE_SPACING+ao:uo.x,y:lo?uo.y-COPIED_NODE_SPACING+lo:uo.y,state:GraphNodeStatus.Selected})))}let io=unSelectAllEntity()(eo.data.present);return oo.forEach(so=>{io=io.insertNode(so)}),to.data.edges.forEach(so=>{io=io.insertEdge(so)}),Object.assign(Object.assign({},eo),{data:pushHistory(eo.data,io)})}case GraphCanvasEvent.Delete:return eo.settings.features.has(GraphFeatures.Delete)?Object.assign(Object.assign({},eo),{data:pushHistory(eo.data,eo.data.present.deleteItems({node:notSelected,edge:notSelected}),unSelectAllEntity())}):eo;case GraphCanvasEvent.Undo:return Object.assign(Object.assign({},eo),{data:undo$1(eo.data)});case GraphCanvasEvent.Redo:return Object.assign(Object.assign({},eo),{data:redo$1(eo.data)});case GraphCanvasEvent.KeyDown:{const ro=to.rawEvent.key.toLowerCase();if(eo.activeKeys.has(ro))return eo;const no=new Set(eo.activeKeys);return no.add(ro),Object.assign(Object.assign({},eo),{activeKeys:no})}case GraphCanvasEvent.KeyUp:{const ro=to.rawEvent.key.toLowerCase();if(!eo.activeKeys.has(ro))return eo;const no=new Set(eo.activeKeys);return no.delete(ro),Object.assign(Object.assign({},eo),{activeKeys:no})}case GraphCanvasEvent.SetData:return Object.assign(Object.assign({},eo),{data:resetUndoStack(to.data)});case GraphCanvasEvent.UpdateData:return Object.assign(Object.assign({},eo),{data:to.shouldRecord?pushHistory(eo.data,to.updater(eo.data.present)):Object.assign(Object.assign({},eo.data),{present:to.updater(eo.data.present)})});case GraphCanvasEvent.ResetUndoStack:return Object.assign(Object.assign({},eo),{data:resetUndoStack(eo.data.present)});case GraphCanvasEvent.UpdateSettings:{const ro=__rest(to,["type"]);return Object.assign(Object.assign({},eo),{settings:Object.assign(Object.assign({},eo.settings),ro)})}default:return eo}};function composeReducers(eo){return to=>eo.reduceRight((ro,no)=>no(ro),to)}const VisitPortHelper=eo=>{const{neighborPorts:to,data:ro}=eo,no=reactExports.useRef(null),[oo,io]=reactExports.useState(),so=reactExports.useCallback(uo=>{uo.key==="Escape"&&(uo.stopPropagation(),uo.preventDefault(),oo&&eo.onComplete(oo))},[oo,eo]),ao=reactExports.useCallback(()=>{},[]),lo=reactExports.useCallback(uo=>{const co=JSON.parse(uo.target.value);co.nodeId&&co.portId&&io({nodeId:co.nodeId,portId:co.portId})},[io]);return reactExports.useEffect(()=>{no.current&&no.current.focus({preventScroll:!0})},[]),jsxRuntimeExports.jsx("select",Object.assign({onKeyDown:so,onBlur:ao,ref:no,onChange:lo},{children:to.map(uo=>{const co=oo&&oo.portId===uo.portId&&oo.nodeId===uo.nodeId,fo=JSON.stringify(uo),ho=ro.nodes.get(uo.nodeId);if(!ho)return null;const po=ho.ports?ho.ports.filter(vo=>vo.id===uo.portId)[0]:null;if(!po)return null;const go=`${ho.ariaLabel||ho.name||ho.id}: ${po.ariaLabel||po.name||po.id}`;return jsxRuntimeExports.jsx("option",Object.assign({value:fo,"aria-selected":co,"aria-label":go},{children:go}),`${uo.nodeId}-${uo.portId}`)})}))},item=(eo=void 0,to=void 0)=>({node:eo,port:to}),findDOMElement=(eo,{node:to,port:ro})=>{var no,oo;let io;if(to&&ro)io=getPortUid((no=eo.dataset.graphId)!==null&&no!==void 0?no:"",to,ro);else if(to)io=getNodeUid((oo=eo.dataset.graphId)!==null&&oo!==void 0?oo:"",to);else return null;return eo.getElementById(io)},focusItem=(eo,to,ro,no)=>{if(!eo.current)return;const oo=findDOMElement(eo.current,to);oo?(ro.preventDefault(),ro.stopPropagation(),oo.focus({preventScroll:!0}),no.trigger({type:GraphCanvasEvent.Navigate,node:to.node,port:to.port,rawEvent:ro})):!to.node&&!to.port&&no.trigger({type:GraphCanvasEvent.Navigate,node:to.node,port:to.port,rawEvent:ro})},getNextItem=(eo,to,ro)=>{if(to.ports){const io=(ro?to.ports.findIndex(so=>so.id===ro.id):-1)+1;if(io{if(ro&&to.ports){const oo=to.ports.findIndex(io=>io.id===ro.id)-1;return oo>=0?item(to,to.ports[oo]):item(to)}const no=to.prev&&eo.nodes.get(to.prev);return no?item(no,no.ports&&no.ports.length?no.ports[no.ports.length-1]:void 0):item()},nextConnectablePort=(eo,to)=>(ro,no,oo)=>{var io,so,ao;let lo=getNextItem(ro,no,oo);for(;!(((io=lo.node)===null||io===void 0?void 0:io.id)===no.id&&((so=lo.port)===null||so===void 0?void 0:so.id)===(oo==null?void 0:oo.id));){if(!lo.node)lo=item(ro.getNavigationFirstNode());else if(lo.port&&!((ao=eo.getPortConfig(lo.port))===null||ao===void 0)&&ao.getIsConnectable(Object.assign(Object.assign({},to),{data:ro,parentNode:lo.node,model:lo.port})))return lo;lo=getNextItem(ro,lo.node,lo.port)}return item()},focusNextPort=(eo,to,ro,no,oo,io)=>{const ao=(eo.findIndex(uo=>uo.id===ro)+1)%eo.length,lo=eo[ao];lo&&no.current&&focusItem(no,{node:to,port:lo},oo,io)},focusPrevPort=(eo,to,ro,no,oo,io)=>{const ao=(eo.findIndex(uo=>uo.id===ro)-1+eo.length)%eo.length,lo=eo[ao];lo&&no.current&&focusItem(no,{node:to,port:lo},oo,io)},getFocusNodeHandler=eo=>(to,ro,no,oo,io,so)=>{const ao=Array.from(to.nodes.values()).sort(eo),lo=ao.findIndex(co=>co.id===ro),uo=ao[(lo+1)%ao.length];uo&&no.current&&(oo.dispatch({type:GraphNodeEvent.Select,nodes:[uo.id]}),oo.dispatch({type:GraphNodeEvent.Centralize,nodes:[uo.id]}),focusItem(no,{node:uo,port:void 0},io,so))},focusLeftNode=getFocusNodeHandler((eo,to)=>eo.x*10+eo.y-to.x*10-to.y),focusRightNode=getFocusNodeHandler((eo,to)=>to.x*10+to.y-eo.x*10-eo.y),focusDownNode=getFocusNodeHandler((eo,to)=>eo.x+eo.y*10-to.x-to.y*10),focusUpNode=getFocusNodeHandler((eo,to)=>to.x+to.y*10-eo.x-eo.y*10),goToConnectedPort=(eo,to,ro,no,oo,io)=>{var so;const ao=getNeighborPorts(eo,to.id,ro.id);if(ao.length===1&&no.current){const lo=eo.nodes.get(ao[0].nodeId);if(!lo)return;const uo=(so=lo.ports)===null||so===void 0?void 0:so.find(co=>co.id===ao[0].portId);if(!uo)return;focusItem(no,{node:lo,port:uo},oo,io)}else if(ao.length>1&&no.current){const lo=fo=>{var ho;if(reactDomExports.unmountComponentAtNode(uo),no.current){const vo=no.current.closest(".react-dag-editor-container");vo&&vo.removeChild(uo)}const po=eo.nodes.get(fo.nodeId);if(!po)return;const go=(ho=po.ports)===null||ho===void 0?void 0:ho.find(vo=>vo.id===fo.portId);go&&focusItem(no,{node:po,port:go},oo,io)},uo=document.createElement("div"),co=no.current.closest(".react-dag-editor-container");co&&co.appendChild(uo),uo.style.position="fixed",uo.style.top="0",reactDomExports.render(jsxRuntimeExports.jsx(VisitPortHelper,{neighborPorts:ao,onComplete:lo,data:eo}),uo)}};function defaultGetPortAriaLabel(eo,to,ro){return ro.ariaLabel}function defaultGetNodeAriaLabel(eo){return eo.ariaLabel}function attachPort(eo,to,ro){if(!eo.connectState)return eo;let no=eo.data.present;return no=no.updatePort(to,ro,updateStatus(add$1(GraphPortStatus.ConnectingAsTarget))),eo.connectState.targetNode&&eo.connectState.targetPort&&(no=no.updatePort(eo.connectState.targetNode,eo.connectState.targetPort,updateStatus(remove$2(GraphPortStatus.ConnectingAsTarget)))),Object.assign(Object.assign({},eo),{connectState:Object.assign(Object.assign({},eo.connectState),{targetNode:to,targetPort:ro}),data:Object.assign(Object.assign({},eo.data),{present:no})})}function clearAttach(eo){if(!eo.connectState)return eo;let to=eo.data.present;const{targetPort:ro,targetNode:no}=eo.connectState;return no&&ro&&(to=to.updatePort(no,ro,updateStatus(remove$2(GraphPortStatus.ConnectingAsTarget)))),Object.assign(Object.assign({},eo),{connectState:Object.assign(Object.assign({},eo.connectState),{targetNode:void 0,targetPort:void 0}),data:Object.assign(Object.assign({},eo.data),{present:to})})}const connectingReducer=(eo,to)=>{var ro,no,oo;if(!isViewportComplete(eo.viewport))return eo;const{rect:io}=eo.viewport;switch(to.type){case GraphEdgeEvent.ConnectStart:return Object.assign(Object.assign({},eo),{connectState:Object.assign(Object.assign({},EMPTY_CONNECT_STATE),{sourceNode:to.nodeId,sourcePort:to.portId,movingPoint:to.clientPoint?{x:to.clientPoint.x-io.left,y:to.clientPoint.y-io.top}:void 0}),data:Object.assign(Object.assign({},eo.data),{present:eo.data.present.updatePort(to.nodeId,to.portId,updateStatus(add$1(GraphPortStatus.Connecting)))})});case GraphEdgeEvent.ConnectMove:return eo.connectState?Object.assign(Object.assign({},eo),{connectState:Object.assign(Object.assign({},eo.connectState),{movingPoint:{x:to.clientX-io.left,y:to.clientY-io.top}})}):eo;case GraphEdgeEvent.ConnectEnd:if(eo.connectState){const{edgeWillAdd:so,isCancel:ao}=to,{sourceNode:lo,sourcePort:uo,targetNode:co,targetPort:fo}=eo.connectState;let ho=eo.data.present;if(ho=ho.updatePort(lo,uo,updateStatus(replace$1(GraphPortStatus.Default))),!ao&&co&&fo){let po={source:lo,sourcePortId:uo,target:co,targetPortId:fo,id:v4(),status:GraphEdgeStatus.Default};return so&&(po=so(po,ho)),ho=ho.insertEdge(po).updatePort(co,fo,updateStatus(replace$1(GraphPortStatus.Default))),Object.assign(Object.assign({},eo),{connectState:void 0,data:pushHistory(eo.data,ho,unSelectAllEntity())})}return Object.assign(Object.assign({},eo),{connectState:void 0,data:Object.assign(Object.assign({},eo.data),{present:ho})})}return eo;case GraphEdgeEvent.ConnectNavigate:if(eo.connectState){const so=eo.data.present,ao=so.nodes.get(eo.connectState.sourceNode),lo=ao==null?void 0:ao.getPort(eo.connectState.sourcePort),uo=eo.connectState.targetNode?so.nodes.get(eo.connectState.targetNode):void 0,co=eo.connectState.targetPort?uo==null?void 0:uo.getPort(eo.connectState.targetPort):void 0;if(!ao||!lo)return eo;const fo=nextConnectablePort(eo.settings.graphConfig,{anotherNode:ao,anotherPort:lo})(so,uo||ao,co);return!fo.node||!fo.port||fo.node.id===ao.id&&fo.port.id===lo.id?eo:attachPort(eo,fo.node.id,fo.port.id)}return eo;case GraphPortEvent.PointerEnter:if(eo.connectState){const{sourceNode:so,sourcePort:ao}=eo.connectState,lo=eo.data.present,uo=lo.nodes.get(to.node.id),co=uo==null?void 0:uo.getPort(to.port.id),fo=lo.nodes.get(so),ho=fo==null?void 0:fo.getPort(ao);if(uo&&co&&fo&&ho&&isConnectable(eo.settings.graphConfig,{parentNode:uo,model:co,data:lo,anotherPort:ho,anotherNode:fo}))return attachPort(eo,uo.id,co.id)}return eo;case GraphNodeEvent.PointerEnter:case GraphNodeEvent.PointerMove:if(eo.connectState){const{clientX:so,clientY:ao}=to.rawEvent,{sourceNode:lo,sourcePort:uo}=eo.connectState,co=eo.data.present,fo=co.nodes.get(to.node.id),ho=co.nodes.get(lo),po=ho==null?void 0:ho.getPort(uo);if(fo&&ho&&po){const go=getNearestConnectablePort({parentNode:fo,clientX:so,clientY:ao,graphConfig:eo.settings.graphConfig,data:eo.data.present,viewport:eo.viewport,anotherPort:po,anotherNode:ho});return go?attachPort(eo,fo.id,go.id):eo}}return eo;case GraphNodeEvent.PointerLeave:return((ro=eo.connectState)===null||ro===void 0?void 0:ro.targetNode)===to.node.id?clearAttach(eo):eo;case GraphPortEvent.PointerLeave:return((no=eo.connectState)===null||no===void 0?void 0:no.targetNode)===to.node.id&&((oo=eo.connectState)===null||oo===void 0?void 0:oo.targetPort)===to.port.id?clearAttach(eo):eo;default:return eo}},contextMenuReducer=(eo,to)=>{let ro=eo.contextMenuPosition;switch(to.type){case GraphCanvasEvent.ContextMenu:case GraphNodeEvent.ContextMenu:case GraphEdgeEvent.ContextMenu:case GraphPortEvent.ContextMenu:{const no=to.rawEvent;no.button===MouseEventButton.Secondary&&(ro={x:no.clientX,y:no.clientY})}break;case GraphCanvasEvent.Click:case GraphNodeEvent.Click:case GraphEdgeEvent.Click:case GraphPortEvent.Click:ro=void 0;break;case GraphContextMenuEvent.Open:ro={x:to.x,y:to.y};break;case GraphContextMenuEvent.Close:ro=void 0;break}return eo.contextMenuPosition===ro?eo:Object.assign(Object.assign({},eo),{contextMenuPosition:ro})},edgeReducer=(eo,to)=>{switch(to.type){case GraphEdgeEvent.DoubleClick:return eo.settings.features.has(GraphFeatures.EditEdge)?Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:eo.data.present.updateEdge(to.edge.id,updateStatus(replace$1(GraphEdgeStatus.Editing)))})}):eo;case GraphEdgeEvent.MouseEnter:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:eo.data.present.updateEdge(to.edge.id,updateStatus(add$1(GraphEdgeStatus.Activated)))})});case GraphEdgeEvent.MouseLeave:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:eo.data.present.updateEdge(to.edge.id,updateStatus(remove$2(GraphEdgeStatus.Activated)))})});case GraphEdgeEvent.Click:case GraphEdgeEvent.ContextMenu:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:unSelectAllEntity()(eo.data.present).updateEdge(to.edge.id,updateStatus(add$1(GraphEdgeStatus.Selected)))})});case GraphEdgeEvent.Add:return Object.assign(Object.assign({},eo),{data:pushHistory(eo.data,eo.data.present.insertEdge(to.edge))});default:return eo}},getAlignmentLines=(eo,to,ro,no=2)=>{const oo=getDummyDraggingNode(eo),io=getClosestNodes(oo,eo,to,ro,no);return getLines(oo,io,eo.length)},getAutoAlignDisplacement=(eo,to,ro,no)=>{let oo=1/0,io=0;const so=getDummyDraggingNode(to),ao=no==="x"?so.width||0:so.height||0;return eo.forEach(lo=>{let uo;if(no==="x"&&lo.x1===lo.x2)uo=lo.x1;else if(no==="y"&&lo.y1===lo.y2)uo=lo.y1;else return;const co=so[no]-uo,fo=so[no]+(ao||0)/2-uo,ho=so[no]+(ao||0)-uo;Math.abs(co)0?-oo:oo),Math.abs(fo)0?-oo:oo),Math.abs(ho)0?-oo:oo)}),io},getMinCoordinate=(eo,to)=>{if(eo.length)return Math.min(...eo.map(ro=>ro[to]))},getMaxCoordinate=(eo,to)=>{if(eo.length)return Math.max(...eo.map(ro=>ro[to]+(to==="y"?ro.height||0:ro.width||0)))},setSizeForNode=(eo,to)=>Object.assign(Object.assign({},eo),getNodeSize(eo,to)),getBoundingBoxOfNodes=eo=>{let to=1/0,ro=1/0,no=-1/0,oo=-1/0;return eo.forEach(io=>{const so=io.x,ao=io.y,lo=io.x+(io.width||0),uo=io.y+(io.height||0);sono&&(no=lo),uo>oo&&(oo=uo)}),{x:to,y:ro,width:no-to,height:oo-ro}},getDummyDraggingNode=eo=>{const{x:to,y:ro,width:no,height:oo}=getBoundingBoxOfNodes(eo);return{id:v4(),x:to,y:ro,width:no,height:oo}},getClosestNodes=(eo,to,ro,no,oo=2)=>{const io=[],so=[],{x:ao,y:lo,width:uo=0,height:co=0}=eo;let fo=oo,ho=oo;return ro.forEach(po=>{if(to.find(xo=>xo.id===po.id))return;const go=setSizeForNode(po,no),{width:vo=0,height:bo=0}=go;[ao,ao+uo/2,ao+uo].forEach((xo,_o)=>{io[_o]||(io[_o]={}),io[_o].closestNodes||(io[_o].closestNodes=[]),[go.x,go.x+vo/2,go.x+vo].forEach(Eo=>{var So;const To=Math.abs(xo-Eo);To<=fo&&((So=io[_o].closestNodes)===null||So===void 0||So.push(go),io[_o].alignCoordinateValue=Eo,fo=To)})}),[lo,lo+co/2,lo+co].forEach((xo,_o)=>{so[_o]||(so[_o]={}),so[_o].closestNodes||(so[_o].closestNodes=[]),[go.y,go.y+bo/2,go.y+bo].forEach(Eo=>{var So;const To=Math.abs(xo-Eo);To<=ho&&((So=so[_o].closestNodes)===null||So===void 0||So.push(go),so[_o].alignCoordinateValue=Eo,ho=To)})})}),{closestX:io,closestY:so}},getLines=(eo,to,ro=1)=>{const no=[],oo=[],io=to.closestX,so=to.closestY;return io.forEach((ao,lo)=>{var uo;if(ao.alignCoordinateValue===void 0||lo===1&&(no.length||ro>1))return;const co=[],fo=ao.alignCoordinateValue;(uo=ao.closestNodes)===null||uo===void 0||uo.forEach(go=>{(go.x===fo||go.x+(go.width||0)/2===fo||go.x+(go.width||0)===fo)&&co.push(go)});const ho=getMinCoordinate([eo,...co],"y"),po=getMaxCoordinate([eo,...co],"y");ho!==void 0&&po!==void 0&&no.push({x1:fo,y1:ho,x2:fo,y2:po,visible:!0})}),so.forEach((ao,lo)=>{var uo;if(ao.alignCoordinateValue===void 0||lo===1&&(oo.length||ro>1))return;const co=[],fo=ao.alignCoordinateValue;(uo=ao.closestNodes)===null||uo===void 0||uo.forEach(go=>{(go.y===fo||go.y+(go.height||0)/2===fo||go.y+(go.height||0)===fo)&&co.push(go)});const ho=getMinCoordinate([eo,...co],"x"),po=getMaxCoordinate([eo,...co],"x");ho!==void 0&&po!==void 0&&oo.push({x1:ho,y1:fo,x2:po,y2:fo,visible:!0})}),[...no,...oo]};function pipe(...eo){return eo.reduceRight((to,ro)=>no=>to(ro(no)),identical)}const getDelta=(eo,to,ro)=>roto?10:0;function getSelectedNodes(eo,to){const ro=[];return eo.nodes.forEach(no=>{isSelected(no)&&ro.push(Object.assign({id:no.id,x:no.x,y:no.y},getNodeSize(no,to)))}),ro}function dragNodeHandler(eo,to){if(!isViewportComplete(eo.viewport))return eo;const ro=po=>Math.max(po,getScaleLimit(so,eo.settings)),no=to.rawEvent,{rect:oo}=eo.viewport,io=Object.assign({},eo),so=eo.data.present,ao=getDelta(oo.left,oo.right,no.clientX),lo=getDelta(oo.top,oo.bottom,no.clientY),uo=ao!==0||lo!==0?.999:1,co=ao!==0||ao!==0?pipe(pan(-ao,-lo),zoom({scale:uo,anchor:getRelativePoint(oo,no),direction:Direction$2.XY,limitScale:ro}))(eo.viewport):eo.viewport,fo=getPointDeltaByClientDelta(to.dx+ao*uo,to.dy+lo*uo,co.transformMatrix),ho=Object.assign(Object.assign({},eo.dummyNodes),{dx:eo.dummyNodes.dx+fo.x,dy:eo.dummyNodes.dy+fo.y,isVisible:to.isVisible});if(to.isAutoAlignEnable){const po=getRenderedNodes(so.nodes,eo.viewport);if(po.lengthObject.assign(Object.assign({},bo),{x:bo.x+ho.dx,y:bo.y+ho.dy})),vo=getAlignmentLines(go,po,eo.settings.graphConfig,eo.viewport.transformMatrix[0]>.3?2:5);if(vo.length){const bo=getAutoAlignDisplacement(vo,go,eo.settings.graphConfig,"x"),xo=getAutoAlignDisplacement(vo,go,eo.settings.graphConfig,"y");ho.alignedDX=ho.dx+bo,ho.alignedDY=ho.dy+xo}else ho.alignedDX=void 0,ho.alignedDY=void 0;io.alignmentLines=vo}else ho.alignedDX=void 0,ho.alignedDY=void 0}return io.dummyNodes=ho,io.viewport=co,io}function handleDraggingNewNode(eo,to){if(!eo.settings.features.has(GraphFeatures.AutoAlign))return eo;const ro=eo.data.present,no=getRenderedNodes(ro.nodes,eo.viewport),oo=getAlignmentLines([to.node],no,eo.settings.graphConfig,eo.viewport.transformMatrix[0]>.3?2:5);return Object.assign(Object.assign({},eo),{alignmentLines:oo})}function dragStart(eo,to){let ro=eo.data.present;const no=ro.nodes.get(to.node.id);if(!no)return eo;let oo;return to.isMultiSelect?(ro=ro.selectNodes(io=>io.id===to.node.id||isSelected(io)),oo=getSelectedNodes(ro,eo.settings.graphConfig)):isSelected(no)?oo=getSelectedNodes(ro,eo.settings.graphConfig):oo=[Object.assign({id:to.node.id,x:to.node.x,y:to.node.y},getNodeSize(to.node,eo.settings.graphConfig))],Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:ro}),dummyNodes:Object.assign(Object.assign({},emptyDummyNodes()),{isVisible:!1,nodes:oo})})}function dragEnd(eo,to){let ro=eo.data.present;if(to.isDragCanceled)return Object.assign(Object.assign({},eo),{alignmentLines:[],dummyNodes:emptyDummyNodes()});const{dx:no,dy:oo}=eo.dummyNodes;return ro=ro.updateNodesPositionAndSize(eo.dummyNodes.nodes.map(io=>Object.assign(Object.assign({},io),{x:io.x+no,y:io.y+oo,width:void 0,height:void 0}))),Object.assign(Object.assign({},eo),{alignmentLines:[],dummyNodes:emptyDummyNodes(),data:pushHistory(eo.data,ro,unSelectAllEntity())})}function locateNode(eo,to){const ro=to.data.present;if(!isViewportComplete(to.viewport)||!eo.nodes.length)return to;if(eo.nodes.length===1){const ao=eo.nodes[0],lo=ro.nodes.get(ao);if(!lo)return to;const{width:uo,height:co}=getNodeSize(lo,to.settings.graphConfig),fo=eo.type===GraphNodeEvent.Centralize?lo.x+uo/2:lo.x,ho=eo.type===GraphNodeEvent.Centralize?lo.y+co/2:lo.y,{x:po,y:go}=transformPoint(fo,ho,to.viewport.transformMatrix),vo=eo.type===GraphNodeEvent.Locate?eo.position:void 0;return Object.assign(Object.assign({},to),{viewport:scrollIntoView$3(po,go,to.viewport.rect,!0,vo)(to.viewport)})}const{minNodeX:no,minNodeY:oo,maxNodeX:io,maxNodeY:so}=getContentArea$1(ro,to.settings.graphConfig,new Set(eo.nodes));return Object.assign(Object.assign({},to),{viewport:focusArea(no,oo,io,so,to.viewport)})}const nodeReducer=(eo,to)=>{const ro=eo.data.present;switch(to.type){case GraphNodeEvent.ResizingStart:return Object.assign(Object.assign({},eo),{dummyNodes:Object.assign(Object.assign({},emptyDummyNodes()),{isVisible:!0,nodes:getSelectedNodes(ro,eo.settings.graphConfig)})});case GraphNodeEvent.Resizing:return Object.assign(Object.assign({},eo),{dummyNodes:Object.assign(Object.assign({},eo.dummyNodes),{dx:to.dx,dy:to.dy,dWidth:to.dWidth,dHeight:to.dHeight})});case GraphNodeEvent.ResizingEnd:{const{dx:no,dy:oo,dWidth:io,dHeight:so}=eo.dummyNodes;return Object.assign(Object.assign({},eo),{dummyNodes:emptyDummyNodes(),data:pushHistory(eo.data,ro.updateNodesPositionAndSize(eo.dummyNodes.nodes.map(ao=>Object.assign(Object.assign({},ao),{x:ao.x+no,y:ao.y+oo,width:ao.width+io,height:ao.height+so}))),unSelectAllEntity())})}case GraphNodeEvent.DragStart:return dragStart(eo,to);case GraphNodeEvent.Drag:return dragNodeHandler(eo,to);case GraphNodeEvent.DragEnd:return dragEnd(eo,to);case GraphNodeEvent.PointerEnter:switch(eo.behavior){case GraphBehavior.Default:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:ro.updateNode(to.node.id,updateStatus(add$1(GraphNodeStatus.Activated)))})});default:return eo}case GraphNodeEvent.PointerLeave:switch(eo.behavior){case GraphBehavior.Default:case GraphBehavior.Connecting:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:ro.updateNode(to.node.id,updateStatus(remove$2(GraphNodeStatus.Activated)))})});default:return eo}case GraphCanvasEvent.DraggingNodeFromItemPanel:return handleDraggingNewNode(eo,to);case GraphCanvasEvent.DraggingNodeFromItemPanelEnd:return to.node?Object.assign(Object.assign({},eo),{alignmentLines:[],data:pushHistory(eo.data,eo.data.present.insertNode(Object.assign(Object.assign({},to.node),{status:GraphNodeStatus.Selected})),unSelectAllEntity())}):Object.assign(Object.assign({},eo),{alignmentLines:[]});case GraphNodeEvent.Centralize:case GraphNodeEvent.Locate:return locateNode(to,eo);case GraphNodeEvent.Add:return Object.assign(Object.assign({},eo),{data:pushHistory(eo.data,ro.insertNode(to.node))});case GraphNodeEvent.DoubleClick:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:eo.data.present.updateNode(to.node.id,updateStatus(add$1(GraphNodeStatus.Editing)))})});default:return eo}},portReducer=(eo,to)=>{switch(to.type){case GraphPortEvent.Focus:case GraphPortEvent.PointerEnter:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:eo.data.present.updatePort(to.node.id,to.port.id,updateStatus(add$1(GraphPortStatus.Activated)))})});case GraphPortEvent.Blur:case GraphPortEvent.PointerLeave:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:eo.data.present.updatePort(to.node.id,to.port.id,updateStatus(remove$2(GraphPortStatus.Activated)))})});case GraphPortEvent.Click:case GraphPortEvent.ContextMenu:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:unSelectAllEntity()(eo.data.present).updatePort(to.node.id,to.port.id,updateStatus(add$1(GraphPortStatus.Selected)))})});default:return eo}},selectNodeBySelectBox=(eo,to,ro,no)=>{if(!ro.width||!ro.height)return no;const oo=Math.min(ro.startX,ro.startX+ro.width),io=Math.max(ro.startX,ro.startX+ro.width),so=Math.min(ro.startY,ro.startY+ro.height),ao=Math.max(ro.startY,ro.startY+ro.height),lo=reverseTransformPoint(oo,so,to),uo=reverseTransformPoint(io,ao,to),co={minX:lo.x,minY:lo.y,maxX:uo.x,maxY:uo.y};return no.selectNodes(fo=>{const{width:ho,height:po}=getNodeSize(fo,eo),go={minX:fo.x,minY:fo.y,maxX:fo.x+ho,maxY:fo.y+po};return checkRectIntersect(co,go)})};function handleNavigate(eo,to){let ro=unSelectAllEntity()(eo.data.present);if(to.node&&to.port)ro=ro.updatePort(to.node.id,to.port.id,updateStatus(add$1(GraphPortStatus.Selected)));else if(to.node){const no=to.node.id;ro=ro.selectNodes(oo=>oo.id===no)}return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:ro})})}const selectionReducer=(eo,to)=>{var ro,no;const oo=eo.data.present,io=eo.settings.features.has(GraphFeatures.LassoSelect);switch(to.type){case GraphCanvasEvent.Click:case GraphCanvasEvent.ResetSelection:case GraphCanvasEvent.ContextMenu:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:unSelectAllEntity()(oo)})});case GraphNodeEvent.Click:case GraphNodeEvent.ContextMenu:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:nodeSelection(to.rawEvent,to.node)(oo)})});case GraphCanvasEvent.SelectStart:{if(!isViewportComplete(eo.viewport))return eo;const so=getRelativePoint(eo.viewport.rect,to.rawEvent);return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:unSelectAllEntity()(oo)}),selectBoxPosition:{startX:so.x,startY:io?0:so.y,width:0,height:0}})}case GraphCanvasEvent.SelectMove:return eo.behavior!==GraphBehavior.MultiSelect?eo:Object.assign(Object.assign({},eo),{selectBoxPosition:Object.assign(Object.assign({},eo.selectBoxPosition),{width:eo.selectBoxPosition.width+to.dx,height:io?(no=(ro=eo.viewport.rect)===null||ro===void 0?void 0:ro.height)!==null&&no!==void 0?no:eo.selectBoxPosition.height:eo.selectBoxPosition.height+to.dy})});case GraphCanvasEvent.SelectEnd:return Object.assign(Object.assign({},eo),{selectBoxPosition:emptySelectBoxPosition(),data:Object.assign(Object.assign({},eo.data),{present:selectNodeBySelectBox(eo.settings.graphConfig,eo.viewport.transformMatrix,eo.selectBoxPosition,oo)})});case GraphCanvasEvent.UpdateNodeSelectionBySelectBox:return eo.behavior!==GraphBehavior.MultiSelect?eo:Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:selectNodeBySelectBox(eo.settings.graphConfig,eo.viewport.transformMatrix,eo.selectBoxPosition,oo)})});case GraphCanvasEvent.Navigate:return handleNavigate(eo,to);case GraphNodeEvent.SelectAll:return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:oo.selectNodes(()=>!0)})});case GraphNodeEvent.Select:{const so=new Set(to.nodes);return Object.assign(Object.assign({},eo),{data:Object.assign(Object.assign({},eo.data),{present:oo.selectNodes(ao=>so.has(ao.id))})})}default:return eo}};function getRectCenter(eo){return{x:eo.width/2,y:eo.height/2}}function resetViewport(eo,to,ro,no){if(!isViewportComplete(eo))return eo;if(!no.ensureNodeVisible)return Object.assign(Object.assign({},eo),{transformMatrix:EMPTY_TRANSFORM_MATRIX});const{nodes:oo,groups:io}=to;if(oo.size===0)return Object.assign(Object.assign({},eo),{transformMatrix:EMPTY_TRANSFORM_MATRIX});const so=po=>isRectVisible(po,eo),ao=oo.map(po=>getNodeRect(po,ro));if(ao.find(so))return Object.assign(Object.assign({},eo),{transformMatrix:EMPTY_TRANSFORM_MATRIX});const uo=io.map(po=>getGroupRect(po,oo,ro));if(uo.find(so))return Object.assign(Object.assign({},eo),{transformMatrix:EMPTY_TRANSFORM_MATRIX});let fo=ao.first();const ho=po=>{fo.y>po.y&&(fo=po)};return ao.forEach(ho),uo.forEach(ho),Object.assign(Object.assign({},eo),{transformMatrix:[1,0,0,1,-fo.x,-fo.y]})}function zoomToFit(eo,to,ro,no){if(!isViewportComplete(eo))return eo;const{graphConfig:oo,nodeMaxVisibleSize:io,nodeMinVisibleSize:so}=ro,ao=getZoomFitMatrix(Object.assign(Object.assign({},no),{data:to,graphConfig:oo,rect:eo.rect,nodeMaxVisibleSize:io,nodeMinVisibleSize:so}));return Object.assign(Object.assign({},eo),{transformMatrix:ao})}const reducer=(eo,to,ro,no)=>{var oo,io,so,ao;const{graphConfig:lo,canvasBoundaryPadding:uo,features:co}=no,fo=ho=>Math.max(ho,getScaleLimit(ro,no));switch(to.type){case GraphCanvasEvent.ViewportResize:return Object.assign(Object.assign({},eo),{rect:to.viewportRect});case GraphCanvasEvent.Zoom:return isViewportComplete(eo)?zoom({scale:to.scale,anchor:(oo=to.anchor)!==null&&oo!==void 0?oo:getRectCenter(eo.rect),direction:to.direction,limitScale:fo})(eo):eo;case GraphScrollBarEvent.Scroll:case GraphCanvasEvent.MouseWheelScroll:case GraphCanvasEvent.Pan:case GraphCanvasEvent.Drag:{if(!isViewportComplete(eo))return eo;const{transformMatrix:ho,rect:po}=eo;let{dx:go,dy:vo}=to;const bo=co.has(GraphFeatures.LimitBoundary),xo=(so=(io=ro.groups)===null||io===void 0?void 0:io[0])===null||so===void 0?void 0:so.padding;if(bo){const{minX:_o,maxX:Eo,minY:So,maxY:To}=getOffsetLimit({data:ro,graphConfig:lo,rect:po,transformMatrix:ho,canvasBoundaryPadding:uo,groupPadding:xo});go=clamp$1(_o-ho[4],Eo-ho[4],go),vo=clamp$1(So-ho[5],To-ho[5],vo)}return pan(go,vo)(eo)}case GraphCanvasEvent.Pinch:{const{dx:ho,dy:po,scale:go,anchor:vo}=to;return pipe(pan(ho,po),zoom({scale:go,anchor:vo,limitScale:fo}))(eo)}case GraphMinimapEvent.Pan:return minimapPan(to.dx,to.dy)(eo);case GraphCanvasEvent.ResetViewport:return resetViewport(eo,ro,lo,to);case GraphCanvasEvent.ZoomTo:return isViewportComplete(eo)?zoomTo({scale:to.scale,anchor:(ao=to.anchor)!==null&&ao!==void 0?ao:getRectCenter(eo.rect),direction:to.direction,limitScale:fo})(eo):eo;case GraphCanvasEvent.ZoomToFit:return zoomToFit(eo,ro,no,to);case GraphCanvasEvent.ScrollIntoView:if(eo.rect){const{x:ho,y:po}=transformPoint(to.x,to.y,eo.transformMatrix);return scrollIntoView$3(ho,po,eo.rect,!0)(eo)}return eo;default:return eo}},viewportReducer=(eo,to)=>{const ro=reducer(eo.viewport,to,eo.data.present,eo.settings);return ro===eo.viewport?eo:Object.assign(Object.assign({},eo),{viewport:ro})},builtinReducer=composeReducers([behaviorReducer,viewportReducer,nodeReducer,portReducer,edgeReducer,canvasReducer,connectingReducer,selectionReducer,contextMenuReducer].map(eo=>to=>(ro,no)=>to(eo(ro,no),no)));function getGraphReducer(eo=void 0,to=identical){return(eo?composeReducers([eo,builtinReducer]):builtinReducer)(to)}function useGraphReducer(eo,to){const ro=reactExports.useMemo(()=>getGraphReducer(to),[to]),[no,oo]=reactExports.useReducer(ro,eo,createGraphState),io=useConst(()=>[]),so=reactExports.useRef(no),ao=reactExports.useCallback((lo,uo)=>{uo&&io.push(uo),oo(lo)},[io]);return reactExports.useEffect(()=>{const lo=so.current;lo!==no&&(so.current=no,reactDomExports.unstable_batchedUpdates(()=>{io.forEach(uo=>{try{uo(no,lo)}catch(co){console.error(co)}}),io.length=0}))},[no]),[no,ao]}class MouseMoveEventProvider{constructor(to){this.target=to}off(to,ro){switch(to){case"move":this.target.removeEventListener("mousemove",ro);break;case"end":this.target.removeEventListener("mouseup",ro);break}return this}on(to,ro){switch(to){case"move":this.target.addEventListener("mousemove",ro);break;case"end":this.target.addEventListener("mouseup",ro);break}return this}}const useGetMouseDownOnAnchor=(eo,to)=>{const ro=useGraphController();return reactExports.useCallback(no=>oo=>{oo.preventDefault(),oo.stopPropagation(),to.trigger({type:GraphNodeEvent.ResizingStart,rawEvent:oo,node:eo});const io=new DragController(new MouseMoveEventProvider(ro.getGlobalEventTarget()),defaultGetPositionFromEvent);io.onMove=({totalDX:so,totalDY:ao,e:lo})=>{to.trigger(Object.assign({type:GraphNodeEvent.Resizing,rawEvent:lo,node:eo,dx:0,dy:0,dWidth:0,dHeight:0},no(so,ao)))},io.onEnd=({e:so})=>{to.trigger({type:GraphNodeEvent.ResizingEnd,rawEvent:so,node:eo})},to.trigger({type:GraphNodeEvent.ResizingStart,rawEvent:oo,node:eo}),io.start(oo.nativeEvent)},[to,ro,eo])};class PointerEventProvider{constructor(to,ro=null){this.eventEmitter=new eventemitter3Exports.EventEmitter,this.onMove=no=>{(this.pointerId===null||this.pointerId===no.pointerId)&&this.eventEmitter.emit("move",no)},this.onUp=no=>{(this.pointerId===null||this.pointerId===no.pointerId)&&this.eventEmitter.emit("end",no)},this.target=to,this.pointerId=ro}off(to,ro){return this.eventEmitter.off(to,ro),this.ensureRemoveListener(to),this}on(to,ro){return this.ensureAddListener(to),this.eventEmitter.on(to,ro),this}ensureAddListener(to){if(!this.eventEmitter.listeners(to).length)switch(to){case"move":this.target.addEventListener("pointermove",this.onMove);break;case"end":this.target.addEventListener("pointerup",this.onUp);break}}ensureRemoveListener(to){if(!this.eventEmitter.listeners(to).length)switch(to){case"move":this.target.removeEventListener("pointermove",this.onMove);break;case"end":this.target.removeEventListener("pointerup",this.onUp);break}}}const withSimulatedClick=(eo,to)=>({totalDX:ro,totalDY:no,e:oo})=>{var io;const{eventChannel:so,dragThreshold:ao,containerRef:lo}=eo,uo=[];uo.push({type:to,rawEvent:oo}),oo.target instanceof Node&&(!((io=lo.current)===null||io===void 0)&&io.contains(oo.target))&&isWithinThreshold(ro,no,ao)&&uo.push({type:GraphCanvasEvent.Click,rawEvent:oo}),so.batch(uo)},dragMultiSelect=(eo,to)=>{const{getPositionFromEvent:ro,graphController:no,eventChannel:oo}=to,io=new DragController(new MouseMoveEventProvider(no.getGlobalEventTarget()),ro);io.onMove=({dx:so,dy:ao,e:lo})=>{oo.trigger({type:GraphCanvasEvent.SelectMove,rawEvent:lo,dx:so,dy:ao})},io.onEnd=withSimulatedClick(to,GraphCanvasEvent.SelectEnd),oo.trigger({type:GraphCanvasEvent.SelectStart,rawEvent:eo}),io.start(eo)},dragPan=(eo,to)=>{const{getPositionFromEvent:ro,graphController:no,eventChannel:oo}=to,io=new DragController(new MouseMoveEventProvider(no.getGlobalEventTarget()),ro);io.onMove=({dx:so,dy:ao,e:lo})=>{oo.trigger({type:GraphCanvasEvent.Drag,rawEvent:lo,dx:so,dy:ao})},io.onEnd=withSimulatedClick(to,GraphCanvasEvent.DragEnd),io.start(eo),oo.trigger({type:GraphCanvasEvent.DragStart,rawEvent:eo})},onContainerMouseDown=(eo,to)=>{var ro;if(eo.preventDefault(),eo.stopPropagation(),eo.button!==MouseEventButton.Primary)return;const{canvasMouseMode:no,isPanDisabled:oo,isMultiSelectDisabled:io,state:so,isLassoSelectEnable:ao,graphController:lo}=to,uo=no===CanvasMouseMode.Pan&&!eo.ctrlKey&&!eo.shiftKey&&!eo.metaKey||((ro=so.activeKeys)===null||ro===void 0?void 0:ro.has(" "));!oo&&uo?dragPan(eo.nativeEvent,to):!io||ao&&!eo.ctrlKey&&!eo.metaKey?dragMultiSelect(eo.nativeEvent,to):lo.canvasClickOnce=!0};function isMouseButNotLeft(eo){return eo.pointerType==="mouse"&&eo.button!==MouseEventButton.Primary}const onNodePointerDown=(eo,to,ro)=>{eo.preventDefault();const{svgRef:no,isNodesDraggable:oo,getPositionFromEvent:io,isClickNodeToSelectDisabled:so,eventChannel:ao,dragThreshold:lo,rectRef:uo,isAutoAlignEnable:co,autoAlignThreshold:fo,graphController:ho}=ro;oo&&eo.stopPropagation();const po=isMouseButNotLeft(eo);if(so||po)return;no.current&&no.current.focus({preventScroll:!0});const go=checkIsMultiSelect(eo),vo=new DragNodeController(new PointerEventProvider(ho.getGlobalEventTarget(),eo.pointerId),io,uo);vo.onMove=({dx:bo,dy:xo,totalDX:_o,totalDY:Eo,e:So})=>{oo&&ao.trigger({type:GraphNodeEvent.Drag,node:to,dx:bo,dy:xo,rawEvent:So,isVisible:!isWithinThreshold(_o,Eo,lo),isAutoAlignEnable:co,autoAlignThreshold:fo})},vo.onEnd=({totalDX:bo,totalDY:xo,e:_o})=>{var Eo,So;ho.pointerId=null;const To=isWithinThreshold(bo,xo,lo);if((To||!oo)&&(ho.nodeClickOnce=to),ao.trigger({type:GraphNodeEvent.DragEnd,node:to,rawEvent:_o,isDragCanceled:To}),To){const wo=new MouseEvent("click",_o);(So=(Eo=eo.currentTarget)!==null&&Eo!==void 0?Eo:eo.target)===null||So===void 0||So.dispatchEvent(wo)}},ho.pointerId=eo.pointerId,eo.target instanceof Element&&eo.pointerType!=="mouse"&&eo.target.releasePointerCapture(eo.pointerId),ao.trigger({type:GraphNodeEvent.DragStart,node:to,rawEvent:eo,isMultiSelect:go}),vo.start(eo.nativeEvent)},useCanvasKeyboardEventHandlers=eo=>{const{featureControl:to,graphConfig:ro,setCurHoverNode:no,setCurHoverPort:oo,eventChannel:io}=eo,{isDeleteDisabled:so,isPasteDisabled:ao,isUndoEnabled:lo}=to;return reactExports.useMemo(()=>{const uo=new Map,co=()=>So=>{So.preventDefault(),So.stopPropagation(),!so&&(io.trigger({type:GraphCanvasEvent.Delete}),no(void 0),oo(void 0))};uo.set("delete",co()),uo.set("backspace",co());const fo=So=>{metaControl(So)&&(So.preventDefault(),So.stopPropagation(),io.trigger({type:GraphCanvasEvent.Copy}))};uo.set("c",fo);const ho=So=>{if(metaControl(So)){if(So.preventDefault(),So.stopPropagation(),ao)return;const To=ro.getClipboard().read();To&&io.trigger({type:GraphCanvasEvent.Paste,data:To})}};uo.set("v",ho);const po=So=>{lo&&metaControl(So)&&(So.preventDefault(),So.stopPropagation(),io.trigger({type:GraphCanvasEvent.Undo}))};lo&&uo.set("z",po);const go=So=>{lo&&metaControl(So)&&(So.preventDefault(),So.stopPropagation(),io.trigger({type:GraphCanvasEvent.Redo}))};lo&&uo.set("y",go);const vo=So=>{metaControl(So)&&(So.preventDefault(),So.stopPropagation(),io.trigger({type:GraphNodeEvent.SelectAll}))};uo.set("a",vo);const bo=So=>{So.preventDefault(),So.stopPropagation()},xo=So=>{So.preventDefault(),So.stopPropagation()},_o=So=>{So.preventDefault(),So.stopPropagation()},Eo=So=>{So.preventDefault(),So.stopPropagation()};return uo.set(" ",bo),uo.set("control",xo),uo.set("meta",_o),uo.set("shift",Eo),So=>{if(So.repeat)return;const To=So.key.toLowerCase(),wo=uo.get(To);wo&&wo.call(null,So)}},[io,ro,so,ao,lo,no,oo])};let prevMouseDownPortId,prevMouseDownPortTime;function useEventChannel({props:eo,dispatch:to,rectRef:ro,svgRef:no,containerRef:oo,featureControl:io,graphConfig:so,setFocusedWithoutMouse:ao,setCurHoverNode:lo,setCurHoverPort:uo,eventChannel:co,updateViewport:fo,graphController:ho}){const{dragThreshold:po=10,autoAlignThreshold:go=DEFAULT_AUTO_ALIGN_THRESHOLD,getPositionFromEvent:vo=defaultGetPositionFromEvent,canvasMouseMode:bo,edgeWillAdd:xo}=eo,{isNodesDraggable:_o,isAutoAlignEnable:Eo,isClickNodeToSelectDisabled:So,isPanDisabled:To,isMultiSelectDisabled:wo,isLassoSelectEnable:Co,isConnectDisabled:Oo,isPortHoverViewEnable:Ao,isNodeEditDisabled:Ro,isA11yEnable:No}=io,Mo=reactExports.useMemo(()=>animationFramed(to),[to]),Do=useCanvasKeyboardEventHandlers({featureControl:io,eventChannel:co,graphConfig:so,setCurHoverNode:lo,setCurHoverPort:uo}),jo=Jo=>{const Cs=ho.getData();if(Cs.nodes.size>0&&no.current){const Bs=Cs.head&&Cs.nodes.get(Cs.head);Bs&&focusItem(no,{node:Bs,port:void 0},Jo,co)}},Fo=Jo=>{switch(Jo.type){case GraphEdgeEvent.ConnectStart:case GraphEdgeEvent.ConnectMove:case GraphEdgeEvent.ConnectEnd:case GraphEdgeEvent.ConnectNavigate:case GraphEdgeEvent.Click:case GraphEdgeEvent.MouseEnter:case GraphEdgeEvent.MouseLeave:case GraphEdgeEvent.DoubleClick:to(Jo);break;case GraphEdgeEvent.ContextMenu:Jo.rawEvent.stopPropagation(),Jo.rawEvent.preventDefault(),to(Jo);break}},$o=Jo=>{var Cs,Bs;switch(Jo.type){case GraphCanvasEvent.ViewportResize:case GraphCanvasEvent.Drag:case GraphCanvasEvent.MouseWheelScroll:case GraphCanvasEvent.Zoom:case GraphCanvasEvent.Pinch:case GraphCanvasEvent.Click:case GraphCanvasEvent.SelectStart:case GraphCanvasEvent.SelectMove:case GraphCanvasEvent.SelectEnd:case GraphCanvasEvent.ResetSelection:case GraphCanvasEvent.Navigate:case GraphCanvasEvent.Paste:case GraphCanvasEvent.Undo:case GraphCanvasEvent.Redo:case GraphCanvasEvent.Delete:case GraphCanvasEvent.KeyUp:case GraphCanvasEvent.DraggingNodeFromItemPanelStart:case GraphCanvasEvent.DraggingNodeFromItemPanel:case GraphCanvasEvent.DraggingNodeFromItemPanelEnd:to(Jo);break;case GraphCanvasEvent.Copy:{const zs=filterSelectedItems(ho.getData());so.getClipboard().write(zs)}break;case GraphCanvasEvent.KeyDown:!Jo.rawEvent.repeat&&Jo.rawEvent.target===Jo.rawEvent.currentTarget&&!Jo.rawEvent.shiftKey&&Jo.rawEvent.key==="Tab"?(Jo.rawEvent.preventDefault(),Jo.rawEvent.stopPropagation(),ao(!0),jo(Jo.rawEvent)):Do(Jo.rawEvent),to(Jo);break;case GraphCanvasEvent.MouseDown:{ho.nodeClickOnce=null,(Cs=no.current)===null||Cs===void 0||Cs.focus({preventScroll:!0}),ao(!1);const zs=Jo.rawEvent;fo(),onContainerMouseDown(zs,{state:ho.state,canvasMouseMode:bo,isPanDisabled:To,isMultiSelectDisabled:wo,isLassoSelectEnable:Co,dragThreshold:po,containerRef:oo,getPositionFromEvent:defaultGetPositionFromEvent,eventChannel:co,graphController:ho})}break;case GraphCanvasEvent.MouseUp:if(ho.canvasClickOnce){ho.canvasClickOnce=!1;const zs=Jo.rawEvent;zs.target instanceof Node&&(!((Bs=no.current)===null||Bs===void 0)&&Bs.contains(zs.target))&&zs.target.nodeName==="svg"&&co.trigger({type:GraphCanvasEvent.Click,rawEvent:Jo.rawEvent})}break;case GraphCanvasEvent.ContextMenu:Jo.rawEvent.preventDefault(),Jo.rawEvent.stopPropagation(),to(Jo);break;case GraphCanvasEvent.MouseMove:{const zs=Jo.rawEvent;ho.setMouseClientPosition({x:zs.clientX,y:zs.clientY})}break;case GraphCanvasEvent.MouseLeave:ho.unsetMouseClientPosition(),ho.canvasClickOnce=!1;break;case GraphCanvasEvent.Blur:ao(!1);break}},Lo=Jo=>{const{node:Cs}=Jo,{isNodeHoverViewEnabled:Bs}=io;switch(ho.getBehavior()){case GraphBehavior.Connecting:case GraphBehavior.Default:Bs&&(lo(Cs.id),uo(void 0));break}to(Jo)},Ho=Jo=>{to(Jo),lo(void 0)},qo=Jo=>{Ro||(Jo.rawEvent.stopPropagation(),to(Jo))},Uo=Jo=>{if(!no||!No)return;const Cs=ho.getData(),{node:Bs}=Jo,zs=Jo.rawEvent;switch(zs.key){case"Tab":{zs.preventDefault(),zs.stopPropagation();const Ls=zs.shiftKey?getPrevItem(Cs,Bs):getNextItem(Cs,Bs);focusItem(no,Ls,zs,co)}break;case"ArrowUp":zs.preventDefault(),zs.stopPropagation(),focusUpNode(Cs,Bs.id,no,ho,zs,co);break;case"ArrowDown":zs.preventDefault(),zs.stopPropagation(),focusDownNode(Cs,Bs.id,no,ho,zs,co);break;case"ArrowLeft":zs.preventDefault(),zs.stopPropagation(),focusLeftNode(Cs,Bs.id,no,ho,zs,co);break;case"ArrowRight":zs.preventDefault(),zs.stopPropagation(),focusRightNode(Cs,Bs.id,no,ho,zs,co);break}},Yo=Jo=>{var Cs;switch(Jo.type){case GraphNodeEvent.ResizingStart:case GraphNodeEvent.Resizing:case GraphNodeEvent.ResizingEnd:case GraphNodeEvent.DragStart:case GraphNodeEvent.Drag:case GraphNodeEvent.DragEnd:case GraphNodeEvent.SelectAll:to(Jo);break;case GraphNodeEvent.PointerMove:Jo.rawEvent.pointerId===ho.pointerId&&Mo(Jo);break;case GraphNodeEvent.PointerDown:{if(ho.nodeClickOnce=null,ho.getBehavior()!==GraphBehavior.Default)return;const Bs=Jo.rawEvent;fo(),onNodePointerDown(Bs,Jo.node,{svgRef:no,rectRef:ro,isNodesDraggable:_o,isAutoAlignEnable:Eo,dragThreshold:po,getPositionFromEvent:vo,isClickNodeToSelectDisabled:So,autoAlignThreshold:go,eventChannel:co,graphController:ho})}break;case GraphNodeEvent.PointerEnter:Lo(Jo);break;case GraphNodeEvent.PointerLeave:Ho(Jo);break;case GraphNodeEvent.MouseDown:ho.nodeClickOnce=null,Jo.rawEvent.preventDefault(),_o&&Jo.rawEvent.stopPropagation(),ao(!1);break;case GraphNodeEvent.Click:if(((Cs=ho.nodeClickOnce)===null||Cs===void 0?void 0:Cs.id)===Jo.node.id){const{currentTarget:Bs}=Jo.rawEvent;Bs instanceof SVGElement&&Bs.focus({preventScroll:!0}),Jo.node=ho.nodeClickOnce,to(Jo),ho.nodeClickOnce=null}else Jo.intercepted=!0;break;case GraphNodeEvent.ContextMenu:Jo.rawEvent.preventDefault(),Jo.rawEvent.stopPropagation(),to(Jo);break;case GraphNodeEvent.DoubleClick:qo(Jo);break;case GraphNodeEvent.KeyDown:Uo(Jo);break}},Zo=reactExports.useCallback(Jo=>{const Cs=Jo.rawEvent,{node:Bs,port:zs}=Jo;if(ao(!1),Cs.stopPropagation(),Cs.preventDefault(),prevMouseDownPortId=`${Bs.id}:${zs.id}`,prevMouseDownPortTime=performance.now(),Oo||isMouseButNotLeft(Cs))return;fo();const Ls=ho.getGlobalEventTarget(),ga=new DragController(new PointerEventProvider(Ls,Cs.pointerId),vo);ga.onMove=({clientX:Js,clientY:Xs,e:$a})=>{co.trigger({type:GraphEdgeEvent.ConnectMove,rawEvent:$a,clientX:Js,clientY:Xs})},ga.onEnd=({e:Js,totalDY:Xs,totalDX:$a})=>{var Ll,Kl;const Xl=isWithinThreshold($a,Xs,po);if(co.trigger({type:GraphEdgeEvent.ConnectEnd,rawEvent:Js,edgeWillAdd:xo,isCancel:Xl}),ho.pointerId=null,Xl){const Nl=new MouseEvent("click",Js);(Kl=(Ll=Cs.currentTarget)!==null&&Ll!==void 0?Ll:Cs.target)===null||Kl===void 0||Kl.dispatchEvent(Nl)}},co.trigger({type:GraphEdgeEvent.ConnectStart,nodeId:Bs.id,portId:zs.id,rawEvent:Cs,clientPoint:{x:Cs.clientX,y:Cs.clientY}}),Cs.target instanceof Element&&Cs.pointerType!=="mouse"&&Cs.target.releasePointerCapture(Cs.pointerId),ho.pointerId=Cs.pointerId,ga.start(Cs.nativeEvent)},[xo,co,vo,ho,Oo,ao,fo]),_s=reactExports.useCallback(Jo=>{const Cs=Jo.rawEvent,{node:Bs,port:zs}=Jo;prevMouseDownPortId===`${Bs.id}:${zs.id}`&&performance.now()-(prevMouseDownPortTime||0)<500&&(prevMouseDownPortId=void 0,prevMouseDownPortTime=void 0,co.trigger({type:GraphPortEvent.Click,node:Bs,port:zs,rawEvent:Cs}))},[co]),Ss=Jo=>{switch(ho.getBehavior()){case GraphBehavior.Default:uo([Jo.node.id,Jo.port.id]);break}Ao&&uo([Jo.node.id,Jo.port.id]),Jo.rawEvent.pointerId===ho.pointerId&&to(Jo)},As=Jo=>{uo(void 0),to(Jo)},Ns=Jo=>{var Cs,Bs,zs;if(!No)return;const Ls=Jo.rawEvent;if(Ls.altKey&&(Ls.nativeEvent.code==="KeyC"||Ls.key==="c")){Ls.preventDefault(),Ls.stopPropagation(),co.trigger({type:GraphEdgeEvent.ConnectStart,nodeId:Jo.node.id,portId:Jo.port.id,rawEvent:Ls});return}const ga=ho.getData(),{node:Js,port:Xs}=Jo;switch(Ls.key){case"Tab":if(No&&ho.getBehavior()===GraphBehavior.Connecting)Ls.preventDefault(),Ls.stopPropagation(),co.trigger({type:GraphEdgeEvent.ConnectNavigate,rawEvent:Ls});else{const $a=Ls.shiftKey?getPrevItem(ga,Js,Xs):getNextItem(ga,Js,Xs);focusItem(no,$a,Ls,co)}break;case"ArrowUp":case"ArrowLeft":Ls.preventDefault(),Ls.stopPropagation(),focusPrevPort((Cs=Js.ports)!==null&&Cs!==void 0?Cs:[],Js,Xs.id,no,Ls,co);break;case"ArrowDown":case"ArrowRight":Ls.preventDefault(),Ls.stopPropagation(),focusNextPort((Bs=Js.ports)!==null&&Bs!==void 0?Bs:[],Js,Xs.id,no,Ls,co);break;case"g":Ls.preventDefault(),Ls.stopPropagation(),goToConnectedPort(ga,Js,Xs,no,Ls,co);break;case"Escape":ho.getBehavior()===GraphBehavior.Connecting&&(Ls.preventDefault(),Ls.stopPropagation(),no.current&&((zs=findDOMElement(no.current,{node:Js,port:Xs}))===null||zs===void 0||zs.blur()));break;case"Enter":Ls.preventDefault(),Ls.stopPropagation(),co.trigger({type:GraphEdgeEvent.ConnectEnd,rawEvent:Ls.nativeEvent,edgeWillAdd:xo,isCancel:!1});break}},ws=Jo=>{switch(Jo.type){case GraphPortEvent.Click:to(Jo);break;case GraphPortEvent.PointerDown:Zo(Jo);break;case GraphPortEvent.PointerUp:_s(Jo);break;case GraphPortEvent.PointerEnter:Ss(Jo);break;case GraphPortEvent.PointerLeave:As(Jo);break;case GraphPortEvent.ContextMenu:Jo.rawEvent.preventDefault(),Jo.rawEvent.stopPropagation(),to(Jo);break;case GraphPortEvent.Focus:Jo.rawEvent.stopPropagation(),to(Jo);break;case GraphPortEvent.Blur:ho.getBehavior()===GraphBehavior.Connecting&&co.trigger({type:GraphEdgeEvent.ConnectEnd,rawEvent:Jo.rawEvent.nativeEvent,edgeWillAdd:xo,isCancel:!0});break;case GraphPortEvent.KeyDown:Ns(Jo);break}},Ds=Jo=>{const Cs=handleBehaviorChange(ho.getBehavior(),Jo);switch(ho.setBehavior(Cs),Fo(Jo),$o(Jo),Yo(Jo),ws(Jo),Jo.type){case GraphMinimapEvent.Pan:case GraphScrollBarEvent.Scroll:case GraphContextMenuEvent.Open:case GraphContextMenuEvent.Close:to(Jo);break}};reactExports.useImperativeHandle(co.listenersRef,()=>Ds),reactExports.useImperativeHandle(co.externalHandlerRef,()=>eo.onEvent)}const useFeatureControl=eo=>reactExports.useMemo(()=>{const to=eo.has(GraphFeatures.NodeDraggable),ro=eo.has(GraphFeatures.NodeResizable),no=!eo.has(GraphFeatures.AutoFit),oo=!eo.has(GraphFeatures.PanCanvas),io=!eo.has(GraphFeatures.MultipleSelect),so=eo.has(GraphFeatures.LassoSelect),ao=eo.has(GraphFeatures.NodeHoverView),lo=!eo.has(GraphFeatures.ClickNodeToSelect),uo=!eo.has(GraphFeatures.AddNewEdges),co=eo.has(GraphFeatures.PortHoverView),fo=!eo.has(GraphFeatures.EditNode),ho=!eo.has(GraphFeatures.CanvasVerticalScrollable),po=!eo.has(GraphFeatures.CanvasHorizontalScrollable),go=eo.has(GraphFeatures.A11yFeatures),vo=eo.has(GraphFeatures.AutoAlign),bo=eo.has(GraphFeatures.CtrlKeyZoom),xo=eo.has(GraphFeatures.LimitBoundary),_o=!eo.has(GraphFeatures.AutoFit),Eo=eo.has(GraphFeatures.EditEdge),So=!eo.has(GraphFeatures.Delete),To=!eo.has(GraphFeatures.AddNewNodes)||!eo.has(GraphFeatures.AddNewEdges),wo=eo.has(GraphFeatures.UndoStack),Co=(!ho||!po||!oo)&&xo&&!eo.has(GraphFeatures.InvisibleScrollbar);return{isNodesDraggable:to,isNodeResizable:ro,isAutoFitDisabled:no,isPanDisabled:oo,isMultiSelectDisabled:io,isLassoSelectEnable:so,isNodeHoverViewEnabled:ao,isClickNodeToSelectDisabled:lo,isConnectDisabled:uo,isPortHoverViewEnable:co,isNodeEditDisabled:fo,isVerticalScrollDisabled:ho,isHorizontalScrollDisabled:po,isA11yEnable:go,isAutoAlignEnable:vo,isCtrlKeyZoomEnable:bo,isLimitBoundary:xo,isVirtualizationEnabled:_o,isEdgeEditable:Eo,isDeleteDisabled:So,isPasteDisabled:To,isUndoEnabled:wo,isScrollbarVisible:Co}},[eo]),emptyLine=()=>({x1:0,y1:0,x2:0,y2:0,visible:!1}),Line$1=eo=>{var to;const{line:ro,style:no}=eo,oo=Object.assign(Object.assign({strokeWidth:1},no),{stroke:ro.visible?(to=no==null?void 0:no.stroke)!==null&&to!==void 0?to:"#ea4300":"none"});return jsxRuntimeExports.jsx("line",{className:"auto-align-hint",x1:ro.x1,y1:ro.y1,x2:ro.x2,y2:ro.y2,style:oo})},AlignmentLines=reactExports.memo(({style:eo})=>{const to=useAlignmentLines();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:to.map((ro,no)=>ro.visible?jsxRuntimeExports.jsx(Line$1,{line:ro,style:eo},no):null)})});AlignmentLines.displayName="AlignmentLines";const NodeFrame=eo=>{var to,ro;const no=reactExports.useContext(SlotsContext);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(ro=(to=no.renderNodeFrame)===null||to===void 0?void 0:to.call(no,eo))!==null&&ro!==void 0?ro:eo.children})},NodeResizeHandler=eo=>{var to,ro;const no=reactExports.useContext(SlotsContext);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(ro=(to=no.renderNodeResizeHandler)===null||to===void 0?void 0:to.call(no,eo))!==null&&ro!==void 0?ro:eo.children})},Slots={NodeFrame,NodeResizeHandler},AnimatingNodeGroup=eo=>{var to,ro;const{dummyNodes:no,graphData:oo}=eo,io=useGraphConfig(),{dWidth:so,dHeight:ao}=no,lo=(to=no.alignedDX)!==null&&to!==void 0?to:no.dx,uo=(ro=no.alignedDY)!==null&&ro!==void 0?ro:no.dy;return jsxRuntimeExports.jsx("g",{children:no.nodes.map(co=>{const fo=oo.nodes.get(co.id);if(!fo)return null;const ho=co.x+lo,po=co.y+uo,go=co.width+so,vo=co.height+ao,bo=getNodeConfig(fo,io);return bo!=null&&bo.renderDummy?bo.renderDummy(Object.assign(Object.assign({},fo.inner),{x:ho,y:po,width:go,height:vo})):jsxRuntimeExports.jsx(Slots.NodeFrame,Object.assign({height:vo,width:go,x:ho,y:po},{children:jsxRuntimeExports.jsx("rect",{transform:`translate(${ho},${po})`,height:vo,width:go,stroke:defaultColors.dummyNodeStroke,strokeDasharray:"4",fill:"none"},fo.id)}),`node-frame-${co.id}`)})})},ConnectingLine=eo=>{const{autoAttachLine:to,connectingLine:ro,styles:no}=eo,oo=(no==null?void 0:no.stroke)||defaultColors.primaryColor,io=(no==null?void 0:no.fill)||"none",so=(no==null?void 0:no.strokeDasharray)||"4,4",ao=ro.visible?oo:"none";return jsxRuntimeExports.jsxs("g",{children:[jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("marker",Object.assign({id:"markerArrow",markerWidth:"10",markerHeight:"10",refX:"6",refY:"5",orient:"auto",markerUnits:"strokeWidth"},{children:jsxRuntimeExports.jsx("path",{d:"M0,0 L6,5 L0,10",style:{stroke:ao,fill:"none"}})}))}),jsxRuntimeExports.jsx("line",{x1:ro.x1,y1:ro.y1,x2:ro.x2,y2:ro.y2,style:{stroke:ao,fill:io,strokeDasharray:so},markerEnd:"url(#markerArrow)"}),jsxRuntimeExports.jsx("path",{d:getCurvePathD(to.x2,to.x1,to.y2,to.y1),style:{stroke:to.visible?oo:"none",fill:"none"}})]})},Connecting=reactExports.memo(eo=>{const{styles:to,graphConfig:ro,viewport:no,movingPoint:oo}=eo,{sourcePort:io,sourceNode:so,targetPort:ao,targetNode:lo}=useConnectingState();if(!so||!io)return null;const uo=so.getPortPosition(io.id,ro);let co,fo=!1;if(lo&&ao?(fo=!0,co=lo==null?void 0:lo.getPortPosition(ao.id,ro)):co=uo,!uo||!co)return null;const ho=transformPoint(uo.x,uo.y,no.transformMatrix),po=transformPoint(co.x,co.y,no.transformMatrix),go=oo?{x1:ho.x,y1:ho.y,x2:oo.x,y2:oo.y,visible:!fo}:emptyLine(),vo={x1:ho.x,y1:ho.y,x2:po.x,y2:po.y,visible:fo};return jsxRuntimeExports.jsx(ConnectingLine,{connectingLine:go,autoAttachLine:vo,styles:to})});Connecting.displayName="Connecting";const defaultStyle={position:"fixed",userSelect:"none"},GraphContextMenu=({state:eo,onClick:to})=>{var ro,no;const oo=reactExports.useRef(null),[io,so]=reactExports.useState(Object.assign({},defaultStyle));reactExports.useLayoutEffect(()=>{const fo=oo.current;if(!fo||!eo.contextMenuPosition)return;const{x:ho,y:po}=eo.contextMenuPosition,{clientWidth:go,clientHeight:vo}=document.documentElement,{width:bo,height:xo}=fo.getBoundingClientRect(),_o=Object.assign({},defaultStyle);ho+bo>=go?_o.right=0:_o.left=ho,po+xo>vo?_o.bottom=0:_o.top=po,so(_o)},[(ro=eo.contextMenuPosition)===null||ro===void 0?void 0:ro.x,(no=eo.contextMenuPosition)===null||no===void 0?void 0:no.y]);const ao=useContextMenuConfigContext(),[lo,uo]=reactExports.useState(jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}));reactExports.useEffect(()=>{const fo=eo.data.present;let ho=0,po=0,go=0;fo.nodes.forEach(bo=>{var xo;isSelected(bo)&&(ho+=1),(xo=bo.ports)===null||xo===void 0||xo.forEach(_o=>{isSelected(_o)&&(po+=1)})}),fo.edges.forEach(bo=>{isSelected(bo)&&(go+=1)});let vo;po+ho+go>1?vo=ao.getMenu(MenuType.Multi):po+ho+go===0?vo=ao.getMenu(MenuType.Canvas):ho===1?vo=ao.getMenu(MenuType.Node):po===1?vo=ao.getMenu(MenuType.Port):vo=ao.getMenu(MenuType.Edge),uo(vo)},[eo.data.present,ao]);const co=reactExports.useCallback(fo=>{fo.stopPropagation(),fo.preventDefault()},[]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:eo.contextMenuPosition&&jsxRuntimeExports.jsx("div",Object.assign({ref:oo,onClick:to,onContextMenu:co,role:"button",style:io},{children:lo}))})},Renderer=eo=>jsxRuntimeExports.jsx("rect",{height:eo.height,width:eo.width,fill:eo.group.fill}),defaultGroup={render:Renderer},Group=eo=>{var to;const{data:ro,group:no}=eo,oo=useGraphConfig(),{x:io,y:so,width:ao,height:lo}=reactExports.useMemo(()=>getGroupRect(no,ro.nodes,oo),[no,ro.nodes,oo]),uo=(to=oo.getGroupConfig(no))!==null&&to!==void 0?to:defaultGroup,co=`group-container-${no.id}`;return jsxRuntimeExports.jsx("g",Object.assign({"data-automation-id":co,transform:`translate(${io}, ${so})`},{children:uo.render({group:no,height:lo,width:ao})}),no.id)},GraphGroupsRenderer=eo=>jsxRuntimeExports.jsx("g",{children:reactExports.useMemo(()=>eo.groups.map(to=>jsxRuntimeExports.jsx(Group,{group:to,data:eo.data},to.id)),[eo.groups,eo.data])}),NodeTooltips=eo=>{const{node:to,viewport:ro}=eo,no=useGraphConfig();if(!to||!has$1(GraphNodeStatus.Activated)(to.status))return null;const oo=getNodeConfig(to,no);return oo!=null&&oo.renderTooltips?jsxRuntimeExports.jsx("div",Object.assign({className:"node-tooltips"},{children:oo.renderTooltips({model:to,viewport:ro})})):null},PortTooltips=eo=>{const to=useGraphConfig(),{parentNode:ro,port:no,viewport:oo}=eo;if(!has$1(GraphPortStatus.Activated)(no.status))return null;const so=to.getPortConfig(no);if(!so||!so.renderTooltips)return null;const ao=ro.getPortPosition(no.id,to);return ao?jsxRuntimeExports.jsx("div",Object.assign({className:"port-tooltips"},{children:jsxRuntimeExports.jsx(ConnectingStateContext.Consumer,{children:({sourceNode:lo,sourcePort:uo})=>so.renderTooltips&&so.renderTooltips(Object.assign({model:no,parentNode:ro,data:eo.data,anotherNode:lo,anotherPort:uo,viewport:oo},ao))})})):null};function useRefValue(eo){const to=reactExports.useRef(eo);return reactExports.useLayoutEffect(()=>{to.current=eo},[eo]),to}const SCROLL_BAR_WIDTH=10,wrapperCommonStyle={position:"absolute",cursor:"initial"},useStyles$i=createUseStyles({verticalScrollWrapper:Object.assign(Object.assign({},wrapperCommonStyle),{height:"100%",width:SCROLL_BAR_WIDTH,top:0,right:0}),horizontalScrollWrapper:Object.assign(Object.assign({},wrapperCommonStyle),{height:SCROLL_BAR_WIDTH,width:"100%",bottom:0,left:0}),verticalScrollStyle:eo=>({height:eo.scrollbarLayout.verticalScrollHeight,width:"100%",backgroundColor:defaultColors.scrollbarColor,position:"absolute",top:0,right:0,transform:`translateY(${eo.scrollbarLayout.verticalScrollTop}px)`}),horizontalScrollStyle:eo=>({width:eo.scrollbarLayout.horizontalScrollWidth-SCROLL_BAR_WIDTH,height:"100%",backgroundColor:defaultColors.scrollbarColor,position:"absolute",left:0,bottom:0,transform:`translateX(${eo.scrollbarLayout.horizontalScrollLeft}px)`})}),Scrollbar=eo=>{const{vertical:to=!0,horizontal:ro=!0,offsetLimit:no,eventChannel:oo,viewport:io}=eo,so=useGraphController(),ao=getScrollbarLayout(io,no),lo=useStyles$i({scrollbarLayout:ao}),uo=useRefValue(ao);function co(ho){ho.preventDefault(),ho.stopPropagation();const{height:po}=io.rect,go=new DragController(new MouseMoveEventProvider(so.getGlobalEventTarget()),defaultGetPositionFromEvent);go.onMove=({dy:vo,e:bo})=>{const{totalContentHeight:xo}=uo.current,_o=-(vo*xo)/po;oo.trigger({type:GraphScrollBarEvent.Scroll,rawEvent:bo,dx:0,dy:_o})},go.onEnd=()=>{oo.trigger({type:GraphScrollBarEvent.ScrollEnd})},go.start(ho.nativeEvent),oo.trigger({type:GraphScrollBarEvent.ScrollStart})}function fo(ho){ho.preventDefault(),ho.stopPropagation();const{width:po}=io.rect,go=new DragController(new MouseMoveEventProvider(so.getGlobalEventTarget()),defaultGetPositionFromEvent);go.onMove=({dx:vo,e:bo})=>{const{totalContentWidth:xo}=uo.current,_o=-(vo*xo)/po;oo.trigger({type:GraphScrollBarEvent.Scroll,rawEvent:bo,dx:_o,dy:0})},go.onEnd=()=>{oo.trigger({type:GraphScrollBarEvent.ScrollEnd})},go.start(ho.nativeEvent),oo.trigger({type:GraphScrollBarEvent.ScrollStart})}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[to&&jsxRuntimeExports.jsx("div",Object.assign({className:lo.verticalScrollWrapper},{children:jsxRuntimeExports.jsx("div",{className:lo.verticalScrollStyle,onMouseDown:co,role:"button","aria-label":"vertical scrollbar","aria-roledescription":"vertical scrollbar",id:"canvas-vertical-scrollbar"})})),ro&&jsxRuntimeExports.jsx("div",Object.assign({className:lo.horizontalScrollWrapper},{children:jsxRuntimeExports.jsx("div",{className:lo.horizontalScrollStyle,onMouseDown:fo,role:"button","aria-label":"horizontal scrollbar","aria-roledescription":"horizontal scrollbar",id:"canvas-horizontal-scrollbar"})}))]})};function getTotalContentHeight(eo,to){const{minY:ro,maxY:no}=to;return eo+no-ro}function getTotalContentWidth(eo,to){const{minX:ro,maxX:no}=to;return eo+no-ro}function getScrollbarLayout(eo,to){const{rect:ro,transformMatrix:no}=eo,oo=getTotalContentHeight(ro.height,to),io=getTotalContentWidth(ro.width,to);return{totalContentHeight:oo,totalContentWidth:io,verticalScrollHeight:ro.height*ro.height/oo,horizontalScrollWidth:ro.width*ro.width/io,verticalScrollTop:(to.maxY-no[5])*ro.height/oo,horizontalScrollLeft:(to.maxX-no[4])*ro.width/io}}const Transform=({matrix:eo,children:to})=>{const ro=reactExports.useMemo(()=>`matrix(${eo.join(" ")})`,eo);return jsxRuntimeExports.jsx("g",Object.assign({transform:ro},{children:to}))};function getHintPoints(eo,to,{minX:ro,minY:no,maxX:oo,maxY:io},so,ao,lo,uo){return eo.x===to.x?{x:eo.x,y:eo.y=no?{x:oo,y:so}:{x:lo,y:no}:eo.yro?{x:ao,y:io}:{x:ro,y:uo}:uo>no?{x:ro,y:uo}:{x:lo,y:no}}const GraphEdge=reactExports.memo(eo=>{var to;const{edge:ro,data:no,eventChannel:oo,source:io,target:so,graphId:ao}=eo,lo=useGraphConfig(),uo=useVirtualization(),{viewport:co,renderedArea:fo,visibleArea:ho}=uo,po=Oo=>Ao=>{Ao.persist(),oo.trigger({type:Oo,edge:ro,rawEvent:Ao})},go=isPointInRect(fo,io),vo=isPointInRect(fo,so),bo=go&&vo;if(reactExports.useLayoutEffect(()=>{bo&&uo.renderedEdges.add(ro.id)},[uo]),!bo)return null;const xo=lo.getEdgeConfig(ro);if(!xo)return Debug.warn(`invalid edge ${JSON.stringify(ro)}`),null;if(!xo.render)return Debug.warn(`Missing "render" method in edge config ${JSON.stringify(ro)}`),null;const _o=isPointInRect(ho,io),Eo=isPointInRect(ho,so);let So=xo.render({model:ro,data:no,x1:io.x,y1:io.y,x2:so.x,y2:so.y,viewport:co});if(has$1(GraphEdgeStatus.ConnectedToSelected)(ro.status)&&(!_o||!Eo)){const Oo=getLinearFunction(io.x,io.y,so.x,so.y),Ao=getLinearFunction(io.y,io.x,so.y,so.x),Ro=_o?io:so,No=_o?so:io,Mo=Oo(ho.maxX),Do=Ao(ho.maxY),jo=Ao(ho.minY),Fo=Oo(ho.minX),$o=getHintPoints(Ro,No,ho,Mo,Do,jo,Fo);_o&&xo.renderWithTargetHint?So=xo.renderWithTargetHint({model:ro,data:no,x1:io.x,y1:io.y,x2:$o.x,y2:$o.y,viewport:co}):Eo&&xo.renderWithSourceHint&&(So=xo.renderWithSourceHint({model:ro,data:no,x1:$o.x,y1:$o.y,x2:so.x,y2:so.y,viewport:co}))}const To=getEdgeUid(ao,ro),wo=`edge-container-${ro.id}`,Co=(to=ro.automationId)!==null&&to!==void 0?to:wo;return jsxRuntimeExports.jsx("g",Object.assign({id:To,onClick:po(GraphEdgeEvent.Click),onDoubleClick:po(GraphEdgeEvent.DoubleClick),onMouseDown:po(GraphEdgeEvent.MouseDown),onMouseUp:po(GraphEdgeEvent.MouseUp),onMouseEnter:po(GraphEdgeEvent.MouseEnter),onMouseLeave:po(GraphEdgeEvent.MouseLeave),onContextMenu:po(GraphEdgeEvent.ContextMenu),onMouseMove:po(GraphEdgeEvent.MouseMove),onMouseOver:po(GraphEdgeEvent.MouseOver),onMouseOut:po(GraphEdgeEvent.MouseOut),onFocus:void 0,onBlur:void 0,className:wo,"data-automation-id":Co},{children:So}))});function compareEqual(eo,to){return eo.node===to.node}const EdgeChampNodeRender=reactExports.memo(eo=>{var to,ro;const{node:no,data:oo}=eo,io=__rest(eo,["node","data"]),so=useGraphConfig(),ao=[],lo=no.valueCount;for(let fo=0;fo{const{data:to,node:ro}=eo,no=__rest(eo,["data","node"]),oo=useGraphConfig();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ro.values.map(io=>{var so,ao;const lo=(so=to.nodes.get(io.source))===null||so===void 0?void 0:so.getPortPosition(io.sourcePortId,oo),uo=(ao=to.nodes.get(io.target))===null||ao===void 0?void 0:ao.getPortPosition(io.targetPortId,oo);return lo&&uo?reactExports.createElement(GraphEdge,Object.assign({},no,{key:io.id,data:to,edge:io,source:lo,target:uo})):null})})},compareEqual);EdgeHashCollisionNodeRender.displayName="EdgeHashCollisionNodeRender";const EdgeTree=eo=>{const{tree:to}=eo,ro=__rest(eo,["tree"]);return jsxRuntimeExports.jsx(EdgeChampNodeRender,Object.assign({},ro,{node:to.root}))},styles$1=mergeStyleSets({svg:[{position:"absolute",overflow:"hidden",top:0,left:0,width:"100%",height:"100%"},{"&:focus":{outline:"none"}}],node:{cursor:"move"},container:{position:"relative",width:"100%",height:"100%",overflow:"hidden",touchAction:"none"},buttonA11Y:{opacity:0,width:0,height:0,overflow:"hidden"},addingNodeSvg:{zIndex:1e6,position:"fixed",left:0,top:0,width:"100%",height:"100%"},moduleItem:{userSelect:"none",cursor:"pointer"},minimap:{height:320,width:320,userSelect:"none",touchAction:"none"},minimapSvg:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),GraphNode=eo=>{var to;const{node:ro,eventChannel:no,getNodeAriaLabel:oo,viewport:io,graphId:so}=eo,ao=useGraphConfig(),lo=getNodeConfig(ro,ao),uo=po=>go=>{go.persist();const vo={type:po,node:ro,rawEvent:go};no.trigger(vo)},co=po=>{po.persist();const go=checkIsMultiSelect(po);no.trigger({type:GraphNodeEvent.Click,rawEvent:po,isMultiSelect:go,node:ro})},fo=getNodeUid(so,ro),ho=(to=ro.automationId)!==null&&to!==void 0?to:getNodeAutomationId(ro);return lo!=null&&lo.render?jsxRuntimeExports.jsx("g",Object.assign({id:fo,focusable:"true",tabIndex:0,className:styles$1.node,onPointerDown:uo(GraphNodeEvent.PointerDown),onPointerEnter:uo(GraphNodeEvent.PointerEnter),onPointerMove:uo(GraphNodeEvent.PointerMove),onPointerLeave:uo(GraphNodeEvent.PointerLeave),onPointerUp:uo(GraphNodeEvent.PointerUp),onDoubleClick:uo(GraphNodeEvent.DoubleClick),onMouseDown:uo(GraphNodeEvent.MouseDown),onMouseUp:uo(GraphNodeEvent.MouseUp),onMouseEnter:uo(GraphNodeEvent.MouseEnter),onMouseLeave:uo(GraphNodeEvent.MouseLeave),onContextMenu:uo(GraphNodeEvent.ContextMenu),onMouseMove:uo(GraphNodeEvent.MouseMove),onMouseOver:uo(GraphNodeEvent.MouseOver),onMouseOut:uo(GraphNodeEvent.MouseOut),onClick:co,onKeyDown:uo(GraphNodeEvent.KeyDown),"aria-label":oo(ro),role:"group","aria-roledescription":"node","data-automation-id":ho},{children:jsxRuntimeExports.jsx("g",Object.assign({className:"node-box-container"},{children:lo.render({model:ro,viewport:io})}))})):(Debug.warn('Missing "render" method in node config'),null)},RESIZE_POINT_WIDTH=8,RESIZE_POINT_HEIGHT=8,NodeAnchor=({x:eo,y:to,cursor:ro,onMouseDown:no})=>jsxRuntimeExports.jsx(Slots.NodeResizeHandler,Object.assign({x:eo,y:to,cursor:ro,onMouseDown:no},{children:jsxRuntimeExports.jsx("rect",{x:eo,y:to,height:RESIZE_POINT_HEIGHT,width:RESIZE_POINT_WIDTH,stroke:defaultColors.controlPointColor,fill:"transparent",cursor:ro,onMouseDown:no})})),BBOX_PADDING=15,GraphNodeAnchors=eo=>{var to,ro;const{node:no,getMouseDown:oo}=eo,io=useGraphConfig(),so=getNodeConfig(no,io),ao=(to=so==null?void 0:so.getMinWidth(no))!==null&&to!==void 0?to:0,lo=(ro=so==null?void 0:so.getMinHeight(no))!==null&&ro!==void 0?ro:0,uo=getRectHeight(so,no),co=getRectWidth(so,no),fo=oo((Eo,So)=>{const To=Math.min(Eo,co-ao),wo=Math.min(So,uo-lo);return{dx:+To,dy:+wo,dWidth:-To,dHeight:-wo}}),ho=oo((Eo,So)=>{const To=Math.min(So,uo-lo);return{dy:+To,dHeight:-To}}),po=oo((Eo,So)=>{const To=Math.max(Eo,ao-co),wo=Math.min(So,uo-lo);return{dy:+wo,dWidth:+To,dHeight:-wo}}),go=oo(Eo=>({dWidth:+Math.max(Eo,ao-co)})),vo=oo((Eo,So)=>{const To=Math.max(Eo,ao-co),wo=Math.max(So,lo-uo);return{dWidth:+To,dHeight:+wo}}),bo=oo((Eo,So)=>({dHeight:+Math.max(So,lo-uo)})),xo=oo((Eo,So)=>{const To=Math.min(Eo,co-ao),wo=Math.max(So,lo-uo);return{dx:+To,dWidth:-To,dHeight:+wo}}),_o=oo(Eo=>{const So=Math.min(Eo,co-ao);return{dx:So,dWidth:-So}});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(NodeAnchor,{cursor:"nw-resize",x:no.x-BBOX_PADDING,y:no.y-BBOX_PADDING-RESIZE_POINT_HEIGHT,onMouseDown:fo},"nw-resize"),jsxRuntimeExports.jsx(NodeAnchor,{x:no.x+co/2-RESIZE_POINT_WIDTH/2,y:no.y-BBOX_PADDING-RESIZE_POINT_HEIGHT,cursor:"n-resize",onMouseDown:ho},"n-resize"),jsxRuntimeExports.jsx(NodeAnchor,{x:no.x+co+BBOX_PADDING-RESIZE_POINT_WIDTH,y:no.y-BBOX_PADDING-RESIZE_POINT_HEIGHT,cursor:"ne-resize",onMouseDown:po},"ne-resize"),jsxRuntimeExports.jsx(NodeAnchor,{x:no.x+co+BBOX_PADDING-RESIZE_POINT_WIDTH,y:no.y+uo/2-RESIZE_POINT_HEIGHT/2,cursor:"e-resize",onMouseDown:go},"e-resize"),jsxRuntimeExports.jsx(NodeAnchor,{x:no.x+co+BBOX_PADDING-RESIZE_POINT_WIDTH,y:no.y+uo+BBOX_PADDING,cursor:"se-resize",onMouseDown:vo},"se-resize"),jsxRuntimeExports.jsx(NodeAnchor,{x:no.x+co/2-RESIZE_POINT_WIDTH/2,y:no.y+uo+BBOX_PADDING,cursor:"s-resize",onMouseDown:bo},"s-resize"),jsxRuntimeExports.jsx(NodeAnchor,{x:no.x-BBOX_PADDING,y:no.y+uo+BBOX_PADDING,cursor:"sw-resize",onMouseDown:xo},"sw-resize"),jsxRuntimeExports.jsx(NodeAnchor,{x:no.x-BBOX_PADDING,y:no.y+uo/2-RESIZE_POINT_HEIGHT/2,cursor:"w-resize",onMouseDown:_o},"w-resize")]})},GraphOneNodePorts=eo=>{const{data:to,node:ro,getPortAriaLabel:no,eventChannel:oo,viewport:io,graphId:so}=eo,ao=useGraphConfig(),lo=ro.ports;if(!lo)return null;const uo=(co,fo)=>ho=>{ho.persist(),oo.trigger({type:co,node:ro,port:fo,rawEvent:ho})};return jsxRuntimeExports.jsx("g",{children:lo.map(co=>{var fo;const ho=ao.getPortConfig(co);if(!ho||!ho.render)return Debug.warn(`invalid port config ${ro.id}:${ro.name} - ${co.id}:${co.name}`),null;const po=ro.getPortPosition(co.id,ao);if(!po)return null;const go=getPortUid(so,ro,co),vo=(fo=co.automationId)!==null&&fo!==void 0?fo:getPortAutomationId(co,ro);return jsxRuntimeExports.jsx("g",Object.assign({id:go,tabIndex:0,focusable:"true",onPointerDown:uo(GraphPortEvent.PointerDown,co),onPointerUp:uo(GraphPortEvent.PointerUp,co),onDoubleClick:uo(GraphPortEvent.DoubleClick,co),onMouseDown:uo(GraphPortEvent.MouseDown,co),onMouseUp:uo(GraphPortEvent.MouseUp,co),onContextMenu:uo(GraphPortEvent.ContextMenu,co),onPointerEnter:uo(GraphPortEvent.PointerEnter,co),onPointerLeave:uo(GraphPortEvent.PointerLeave,co),onMouseMove:uo(GraphPortEvent.MouseMove,co),onMouseOver:uo(GraphPortEvent.MouseOver,co),onMouseOut:uo(GraphPortEvent.MouseOut,co),onFocus:uo(GraphPortEvent.Focus,co),onBlur:uo(GraphPortEvent.Blur,co),onKeyDown:uo(GraphPortEvent.KeyDown,co),onClick:uo(GraphPortEvent.Click,co),"aria-label":no(to,ro,co),role:"group","aria-roledescription":"port","data-automation-id":vo},{children:jsxRuntimeExports.jsx(ConnectingStateContext.Consumer,{children:({sourceNode:bo,sourcePort:xo})=>ho==null?void 0:ho.render(Object.assign({model:co,data:to,parentNode:ro,anotherNode:bo,anotherPort:xo,viewport:io},po))})}),go)})})},GraphNodeParts=eo=>{var{node:to,isNodeResizable:ro,renderNodeAnchors:no}=eo,oo=__rest(eo,["node","isNodeResizable","renderNodeAnchors"]);const io=useVirtualization(),{renderedArea:so,viewport:ao}=io,lo=useGetMouseDownOnAnchor(to,oo.eventChannel),uo=isPointInRect(so,to);if(reactExports.useLayoutEffect(()=>{uo&&io.renderedEdges.add(to.id)},[io]),!uo)return null;let co;if(ro&&isNodeEditing(to)){const fo=jsxRuntimeExports.jsx(GraphNodeAnchors,{node:to,getMouseDown:lo});co=no?no(to,lo,fo):fo}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GraphNode,Object.assign({},oo,{node:to,viewport:ao})),jsxRuntimeExports.jsx(GraphOneNodePorts,Object.assign({},oo,{node:to,viewport:ao})),co]})},GraphNodePartsMemo=reactExports.memo(GraphNodeParts),NodeTreeNode=reactExports.memo(eo=>{var{node:to}=eo,ro=__rest(eo,["node"]);const no=to.values.map(io=>{const so=io[1];return jsxRuntimeExports.jsx(GraphNodePartsMemo,Object.assign({node:so},ro),so.id)}),oo=to.type===NodeType$2.Internal?to.children.map((io,so)=>{const ao=soeo.node===to.node);NodeTreeNode.displayName="NodeTreeNode";const NodeTree=eo=>{var{tree:to}=eo,ro=__rest(eo,["tree"]);return jsxRuntimeExports.jsx(NodeTreeNode,Object.assign({node:to.sortedRoot},ro))},NodeLayers=({data:eo,renderTree:to})=>{const ro=new Set;return eo.nodes.forEach(no=>ro.add(no.layer)),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Array.from(ro.values()).sort().map(no=>to(eo.nodes.filter(oo=>oo.layer===no),no))})},VirtualizationProvider=({viewport:eo,isVirtualizationEnabled:to,virtualizationDelay:ro,eventChannel:no,children:oo})=>{const io=useRenderedArea(eo,to),so=reactExports.useMemo(()=>getVisibleArea(eo),[eo]),ao=reactExports.useMemo(()=>({viewport:eo,renderedArea:io,visibleArea:so,renderedEdges:new Set,renderedNodes:new Set,timestamp:performance.now()}),[eo,io,so]),lo=useDeferredValue(ao,{timeout:ro}),uo=reactExports.useRef(lo);return reactExports.useEffect(()=>{const co=uo.current;uo.current=lo,no.trigger({type:GraphCanvasEvent.VirtualizationRecalculated,performanceStartTime:lo.timestamp,renderedNodes:co.renderedNodes,renderedEdges:co.renderedEdges,previousRenderedNodes:co.renderedNodes,previousRenderedEdges:co.renderedEdges})},[lo,no]),jsxRuntimeExports.jsx(VirtualizationContext.Provider,Object.assign({value:lo},{children:oo}))},getCursorStyle=({canvasMouseMode:eo,state:to,isPanDisabled:ro,isMultiSelecting:no})=>to.behavior===GraphBehavior.Connecting||["meta","control"].some(so=>to.activeKeys.has(so))?"initial":to.activeKeys.has("shift")?"crosshair":eo!==CanvasMouseMode.Pan?to.activeKeys.has(" ")&&!ro?"grab":no?"crosshair":"inherit":ro?"inherit":"grab";function getNodeCursor(eo){return eo?"move":"initial"}const getGraphStyles=(eo,to,ro,no,oo,io)=>{var so,ao;return mergeStyleSets({svg:["react-dag-editor-svg-container",styles$1.svg,(so=eo.styles)===null||so===void 0?void 0:so.svg,{"& *:focus":{outline:defaultColors.outlineStyle},[`& .${styles$1.node}`]:{cursor:getNodeCursor(no)}}],container:["react-dag-editor-container",styles$1.container,{cursor:getCursorStyle({canvasMouseMode:eo.canvasMouseMode,state:to,isPanDisabled:ro,isMultiSelecting:io}),[`&.${styles$1.container}`]:Object.assign(Object.assign({background:defaultColors.canvasBackground},eo.style),(ao=eo.styles)===null||ao===void 0?void 0:ao.root)},oo&&{outline:`${defaultColors.focusOutlineColor} solid 1px`}],buttonA11y:["react-dag-editor-a11y-help-button",styles$1.buttonA11Y],node:[styles$1.node]})};function Graph(eo){var to,ro,no,oo,io;const[so,ao]=reactExports.useState(!1),lo=useGraphController(),{state:uo,dispatch:co}=useGraphState(),fo=uo.data.present,{viewport:ho}=uo,{eventChannel:po}=lo,go=useConst(()=>`graph-${v4()}`),vo=reactExports.useRef(null),{focusCanvasAccessKey:bo="f",zoomSensitivity:xo=.1,scrollSensitivity:_o=.5,svgRef:Eo=vo,virtualizationDelay:So=500,background:To=null}=eo,wo=useGraphConfig(),Co=useFeatureControl(uo.settings.features),[Oo,Ao]=reactExports.useState(),[Ro,No]=reactExports.useState(void 0),Mo=reactExports.useRef(null),Do=reactExports.useRef(void 0),jo=useUpdateViewportCallback(Do,Eo,po);useEventChannel({props:eo,dispatch:co,rectRef:Do,svgRef:Eo,setFocusedWithoutMouse:ao,containerRef:Mo,featureControl:Co,graphConfig:wo,setCurHoverNode:Ao,setCurHoverPort:No,updateViewport:jo,eventChannel:po,graphController:lo}),useContainerRect(uo,Eo,Mo,jo);const{isNodesDraggable:Fo,isNodeResizable:$o,isPanDisabled:Lo,isMultiSelectDisabled:Ho,isLassoSelectEnable:qo,isNodeEditDisabled:Uo,isVerticalScrollDisabled:Yo,isHorizontalScrollDisabled:Zo,isA11yEnable:_s,isCtrlKeyZoomEnable:Ss,isVirtualizationEnabled:As,isScrollbarVisible:Ns}=Co;useSelectBox(co,uo.selectBoxPosition);const ws=Xs=>$a=>{$a.persist(),po.trigger({type:Xs,rawEvent:$a})},Ds=getGraphStyles(eo,uo,Lo,Fo,so,uo.behavior===GraphBehavior.MultiSelect);useWheelHandler({containerRef:Mo,svgRef:Eo,rectRef:Do,zoomSensitivity:xo,scrollSensitivity:_o,dispatch:co,isHorizontalScrollDisabled:Zo,isVerticalScrollDisabled:Yo,isCtrlKeyZoomEnable:Ss,eventChannel:po,graphConfig:wo});const Jo=reactExports.useCallback(Xs=>{Xs.preventDefault(),Xs.stopPropagation(),po.trigger({type:GraphContextMenuEvent.Close}),Eo.current&&Eo.current.focus({preventScroll:!0})},[po,Eo]),Cs=reactExports.useCallback(()=>{ao(!0),Eo.current&&Eo.current.focus({preventScroll:!0})},[Eo]);useSafariScale({rectRef:Do,svgRef:Eo,eventChannel:po});const Bs=_s?bo:void 0,zs=useGraphTouchHandler(Do,po),Ls=reactExports.useCallback((Xs,$a)=>{var Ll,Kl;return jsxRuntimeExports.jsx(NodeTree,{graphId:go,isNodeResizable:$o,tree:Xs,data:fo,isNodeEditDisabled:Uo,eventChannel:po,getNodeAriaLabel:(Ll=eo.getNodeAriaLabel)!==null&&Ll!==void 0?Ll:defaultGetNodeAriaLabel,getPortAriaLabel:(Kl=eo.getPortAriaLabel)!==null&&Kl!==void 0?Kl:defaultGetPortAriaLabel,renderNodeAnchors:eo.renderNodeAnchors},$a)},[fo,po,go,Uo,$o,eo.getNodeAriaLabel,eo.getPortAriaLabel,eo.renderNodeAnchors]);if(!isSupported()){const{onBrowserNotSupported:Xs=()=>jsxRuntimeExports.jsx("p",{children:"Your browser is not supported"})}=eo;return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Xs()})}const ga=()=>{if(!Ro||!isViewportComplete(uo.viewport))return null;const[Xs,$a]=Ro,Ll=fo.nodes.get(Xs);if(!Ll)return null;const Kl=Ll.getPort($a);return Kl?jsxRuntimeExports.jsx(PortTooltips,{port:Kl,parentNode:Ll,data:fo,viewport:uo.viewport}):null},Js=()=>{var Xs;return!Oo||!isViewportComplete(uo.viewport)||uo.contextMenuPosition&&Oo===((Xs=uo.data.present.nodes.find(isSelected))===null||Xs===void 0?void 0:Xs.id)?null:jsxRuntimeExports.jsx(NodeTooltips,{node:fo.nodes.get(Oo),viewport:uo.viewport})};return jsxRuntimeExports.jsxs("div",Object.assign({ref:Mo,role:"application",id:go,className:Ds.container},zs,{onDoubleClick:ws(GraphCanvasEvent.DoubleClick),onMouseDown:ws(GraphCanvasEvent.MouseDown),onMouseUp:ws(GraphCanvasEvent.MouseUp),onContextMenu:ws(GraphCanvasEvent.ContextMenu),onMouseMove:ws(GraphCanvasEvent.MouseMove),onMouseOver:ws(GraphCanvasEvent.MouseOver),onMouseOut:ws(GraphCanvasEvent.MouseOut),onFocus:ws(GraphCanvasEvent.Focus),onBlur:ws(GraphCanvasEvent.Blur),onKeyDown:ws(GraphCanvasEvent.KeyDown),onKeyUp:ws(GraphCanvasEvent.KeyUp)},{children:[jsxRuntimeExports.jsx("button",{className:Ds.buttonA11y,onClick:Cs,accessKey:Bs,hidden:!0}),jsxRuntimeExports.jsxs("svg",Object.assign({tabIndex:0,focusable:"true",preserveAspectRatio:"xMidYMid meet",ref:Eo,className:Ds.svg,"data-graph-id":go},{children:[jsxRuntimeExports.jsx("title",{children:eo.title}),jsxRuntimeExports.jsx("desc",{children:eo.desc}),jsxRuntimeExports.jsxs(Transform,Object.assign({matrix:ho.transformMatrix},{children:[uo.viewport.rect&&jsxRuntimeExports.jsxs(VirtualizationProvider,Object.assign({viewport:uo.viewport,isVirtualizationEnabled:As,virtualizationDelay:So,eventChannel:po},{children:[To,jsxRuntimeExports.jsx(GraphGroupsRenderer,{data:fo,groups:(to=fo.groups)!==null&&to!==void 0?to:constantEmptyArray()}),jsxRuntimeExports.jsx(EdgeTree,{graphId:go,tree:fo.edges,data:fo,eventChannel:po}),jsxRuntimeExports.jsx(NodeLayers,{data:fo,renderTree:Ls})]})),uo.dummyNodes.isVisible&&jsxRuntimeExports.jsx(AnimatingNodeGroup,{dummyNodes:uo.dummyNodes,graphData:uo.data.present}),jsxRuntimeExports.jsx(AlignmentLines,{style:(ro=eo.styles)===null||ro===void 0?void 0:ro.alignmentLine})]})),(!Ho||qo)&&jsxRuntimeExports.jsx(SelectBox,{selectBoxPosition:uo.selectBoxPosition,style:(no=eo.styles)===null||no===void 0?void 0:no.selectBox}),uo.connectState&&jsxRuntimeExports.jsx(Connecting,{graphConfig:wo,eventChannel:po,viewport:uo.viewport,styles:(oo=eo.styles)===null||oo===void 0?void 0:oo.connectingLine,movingPoint:uo.connectState.movingPoint})]})),Ns&&isViewportComplete(uo.viewport)&&jsxRuntimeExports.jsx(Scrollbar,{viewport:uo.viewport,offsetLimit:getOffsetLimit({data:fo,graphConfig:wo,rect:uo.viewport.rect,transformMatrix:ho.transformMatrix,canvasBoundaryPadding:uo.settings.canvasBoundaryPadding,groupPadding:(io=fo.groups[0])===null||io===void 0?void 0:io.padding}),dispatch:co,horizontal:!Zo,vertical:!Yo,eventChannel:po}),jsxRuntimeExports.jsx(GraphContextMenu,{state:uo,onClick:Jo,"data-automation-id":"context-menu-container"}),Js(),ga()]}))}const el=document.createElement("div");document.body.appendChild(el);const StaticNode=eo=>{const{node:to}=eo,ro=useGraphConfig(),no=getNodeConfig(to,ro);if(no!=null&&no.renderStatic)return jsxRuntimeExports.jsx("g",{children:no.renderStatic({model:to})});const oo=getRectHeight(no,to),io=getRectWidth(no,to);return jsxRuntimeExports.jsx("rect",{transform:`translate(${to.x}, ${to.y})`,height:oo,width:io,fill:defaultColors.dummyNodeStroke})},StaticNodeWithMemo=reactExports.memo(StaticNode,(eo,to)=>{const ro=eo.node,no=to.node;return ro.x===no.x&&ro.y===no.y&&ro.height===no.height&&ro.width===no.width&&ro.isInSearchResults===no.isInSearchResults&&ro.isCurrentSearchResult===no.isCurrentSearchResult}),ReadonlyNodeTreeNode=reactExports.memo(({node:eo})=>{const to=eo.values.map(no=>jsxRuntimeExports.jsx(StaticNodeWithMemo,{node:no[1]},no[1].id)),ro=eo.type===NodeType$2.Internal?eo.children.map((no,oo)=>{const io=oo>>0;if(""+ro!==to||ro===4294967295)return NaN;to=ro}return to<0?ensureSize(eo)+to:to}function returnTrue(){return!0}function wholeSlice(eo,to,ro){return(eo===0&&!isNeg(eo)||ro!==void 0&&eo<=-ro)&&(to===void 0||ro!==void 0&&to>=ro)}function resolveBegin(eo,to){return resolveIndex(eo,to,0)}function resolveEnd(eo,to){return resolveIndex(eo,to,to)}function resolveIndex(eo,to,ro){return eo===void 0?ro:isNeg(eo)?to===1/0?to:Math.max(0,to+eo)|0:to===void 0||to===eo?eo:Math.min(to,eo)|0}function isNeg(eo){return eo<0||eo===0&&1/eo===-1/0}var IS_COLLECTION_SYMBOL="@@__IMMUTABLE_ITERABLE__@@";function isCollection(eo){return!!(eo&&eo[IS_COLLECTION_SYMBOL])}var IS_KEYED_SYMBOL="@@__IMMUTABLE_KEYED__@@";function isKeyed(eo){return!!(eo&&eo[IS_KEYED_SYMBOL])}var IS_INDEXED_SYMBOL="@@__IMMUTABLE_INDEXED__@@";function isIndexed(eo){return!!(eo&&eo[IS_INDEXED_SYMBOL])}function isAssociative(eo){return isKeyed(eo)||isIndexed(eo)}var Collection$1=function(to){return isCollection(to)?to:Seq(to)},KeyedCollection=function(eo){function to(ro){return isKeyed(ro)?ro:KeyedSeq(ro)}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to}(Collection$1),IndexedCollection=function(eo){function to(ro){return isIndexed(ro)?ro:IndexedSeq(ro)}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to}(Collection$1),SetCollection=function(eo){function to(ro){return isCollection(ro)&&!isAssociative(ro)?ro:SetSeq(ro)}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to}(Collection$1);Collection$1.Keyed=KeyedCollection;Collection$1.Indexed=IndexedCollection;Collection$1.Set=SetCollection;var IS_SEQ_SYMBOL="@@__IMMUTABLE_SEQ__@@";function isSeq(eo){return!!(eo&&eo[IS_SEQ_SYMBOL])}var IS_RECORD_SYMBOL="@@__IMMUTABLE_RECORD__@@";function isRecord(eo){return!!(eo&&eo[IS_RECORD_SYMBOL])}function isImmutable(eo){return isCollection(eo)||isRecord(eo)}var IS_ORDERED_SYMBOL="@@__IMMUTABLE_ORDERED__@@";function isOrdered(eo){return!!(eo&&eo[IS_ORDERED_SYMBOL])}var ITERATE_KEYS=0,ITERATE_VALUES=1,ITERATE_ENTRIES=2,REAL_ITERATOR_SYMBOL=typeof Symbol=="function"&&Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator",ITERATOR_SYMBOL=REAL_ITERATOR_SYMBOL||FAUX_ITERATOR_SYMBOL,Iterator=function(to){this.next=to};Iterator.prototype.toString=function(){return"[Iterator]"};Iterator.KEYS=ITERATE_KEYS;Iterator.VALUES=ITERATE_VALUES;Iterator.ENTRIES=ITERATE_ENTRIES;Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()};Iterator.prototype[ITERATOR_SYMBOL]=function(){return this};function iteratorValue(eo,to,ro,no){var oo=eo===0?to:eo===1?ro:[to,ro];return no?no.value=oo:no={value:oo,done:!1},no}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(eo){return Array.isArray(eo)?!0:!!getIteratorFn(eo)}function isIterator(eo){return eo&&typeof eo.next=="function"}function getIterator(eo){var to=getIteratorFn(eo);return to&&to.call(eo)}function getIteratorFn(eo){var to=eo&&(REAL_ITERATOR_SYMBOL&&eo[REAL_ITERATOR_SYMBOL]||eo[FAUX_ITERATOR_SYMBOL]);if(typeof to=="function")return to}function isEntriesIterable(eo){var to=getIteratorFn(eo);return to&&to===eo.entries}function isKeysIterable(eo){var to=getIteratorFn(eo);return to&&to===eo.keys}var hasOwnProperty$1=Object.prototype.hasOwnProperty;function isArrayLike$1(eo){return Array.isArray(eo)||typeof eo=="string"?!0:eo&&typeof eo=="object"&&Number.isInteger(eo.length)&&eo.length>=0&&(eo.length===0?Object.keys(eo).length===1:eo.hasOwnProperty(eo.length-1))}var Seq=function(eo){function to(ro){return ro==null?emptySequence():isImmutable(ro)?ro.toSeq():seqFromValue(ro)}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.toSeq=function(){return this},to.prototype.toString=function(){return this.__toString("Seq {","}")},to.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},to.prototype.__iterate=function(no,oo){var io=this._cache;if(io){for(var so=io.length,ao=0;ao!==so;){var lo=io[oo?so-++ao:ao++];if(no(lo[1],lo[0],this)===!1)break}return ao}return this.__iterateUncached(no,oo)},to.prototype.__iterator=function(no,oo){var io=this._cache;if(io){var so=io.length,ao=0;return new Iterator(function(){if(ao===so)return iteratorDone();var lo=io[oo?so-++ao:ao++];return iteratorValue(no,lo[0],lo[1])})}return this.__iteratorUncached(no,oo)},to}(Collection$1),KeyedSeq=function(eo){function to(ro){return ro==null?emptySequence().toKeyedSeq():isCollection(ro)?isKeyed(ro)?ro.toSeq():ro.fromEntrySeq():isRecord(ro)?ro.toSeq():keyedSeqFromValue(ro)}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.toKeyedSeq=function(){return this},to}(Seq),IndexedSeq=function(eo){function to(ro){return ro==null?emptySequence():isCollection(ro)?isKeyed(ro)?ro.entrySeq():ro.toIndexedSeq():isRecord(ro)?ro.toSeq().entrySeq():indexedSeqFromValue(ro)}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.of=function(){return to(arguments)},to.prototype.toIndexedSeq=function(){return this},to.prototype.toString=function(){return this.__toString("Seq [","]")},to}(Seq),SetSeq=function(eo){function to(ro){return(isCollection(ro)&&!isAssociative(ro)?ro:IndexedSeq(ro)).toSetSeq()}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.of=function(){return to(arguments)},to.prototype.toSetSeq=function(){return this},to}(Seq);Seq.isSeq=isSeq;Seq.Keyed=KeyedSeq;Seq.Set=SetSeq;Seq.Indexed=IndexedSeq;Seq.prototype[IS_SEQ_SYMBOL]=!0;var ArraySeq=function(eo){function to(ro){this._array=ro,this.size=ro.length}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.get=function(no,oo){return this.has(no)?this._array[wrapIndex(this,no)]:oo},to.prototype.__iterate=function(no,oo){for(var io=this._array,so=io.length,ao=0;ao!==so;){var lo=oo?so-++ao:ao++;if(no(io[lo],lo,this)===!1)break}return ao},to.prototype.__iterator=function(no,oo){var io=this._array,so=io.length,ao=0;return new Iterator(function(){if(ao===so)return iteratorDone();var lo=oo?so-++ao:ao++;return iteratorValue(no,lo,io[lo])})},to}(IndexedSeq),ObjectSeq=function(eo){function to(ro){var no=Object.keys(ro).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(ro):[]);this._object=ro,this._keys=no,this.size=no.length}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.get=function(no,oo){return oo!==void 0&&!this.has(no)?oo:this._object[no]},to.prototype.has=function(no){return hasOwnProperty$1.call(this._object,no)},to.prototype.__iterate=function(no,oo){for(var io=this._object,so=this._keys,ao=so.length,lo=0;lo!==ao;){var uo=so[oo?ao-++lo:lo++];if(no(io[uo],uo,this)===!1)break}return lo},to.prototype.__iterator=function(no,oo){var io=this._object,so=this._keys,ao=so.length,lo=0;return new Iterator(function(){if(lo===ao)return iteratorDone();var uo=so[oo?ao-++lo:lo++];return iteratorValue(no,uo,io[uo])})},to}(KeyedSeq);ObjectSeq.prototype[IS_ORDERED_SYMBOL]=!0;var CollectionSeq=function(eo){function to(ro){this._collection=ro,this.size=ro.length||ro.size}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.__iterateUncached=function(no,oo){if(oo)return this.cacheResult().__iterate(no,oo);var io=this._collection,so=getIterator(io),ao=0;if(isIterator(so))for(var lo;!(lo=so.next()).done&&no(lo.value,ao++,this)!==!1;);return ao},to.prototype.__iteratorUncached=function(no,oo){if(oo)return this.cacheResult().__iterator(no,oo);var io=this._collection,so=getIterator(io);if(!isIterator(so))return new Iterator(iteratorDone);var ao=0;return new Iterator(function(){var lo=so.next();return lo.done?lo:iteratorValue(no,ao++,lo.value)})},to}(IndexedSeq),EMPTY_SEQ;function emptySequence(){return EMPTY_SEQ||(EMPTY_SEQ=new ArraySeq([]))}function keyedSeqFromValue(eo){var to=maybeIndexedSeqFromValue(eo);if(to)return to.fromEntrySeq();if(typeof eo=="object")return new ObjectSeq(eo);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+eo)}function indexedSeqFromValue(eo){var to=maybeIndexedSeqFromValue(eo);if(to)return to;throw new TypeError("Expected Array or collection object of values: "+eo)}function seqFromValue(eo){var to=maybeIndexedSeqFromValue(eo);if(to)return isEntriesIterable(eo)?to.fromEntrySeq():isKeysIterable(eo)?to.toSetSeq():to;if(typeof eo=="object")return new ObjectSeq(eo);throw new TypeError("Expected Array or collection object of values, or keyed object: "+eo)}function maybeIndexedSeqFromValue(eo){return isArrayLike$1(eo)?new ArraySeq(eo):hasIterator(eo)?new CollectionSeq(eo):void 0}var IS_MAP_SYMBOL="@@__IMMUTABLE_MAP__@@";function isMap(eo){return!!(eo&&eo[IS_MAP_SYMBOL])}function isOrderedMap(eo){return isMap(eo)&&isOrdered(eo)}function isValueObject(eo){return!!(eo&&typeof eo.equals=="function"&&typeof eo.hashCode=="function")}function is$1(eo,to){if(eo===to||eo!==eo&&to!==to)return!0;if(!eo||!to)return!1;if(typeof eo.valueOf=="function"&&typeof to.valueOf=="function"){if(eo=eo.valueOf(),to=to.valueOf(),eo===to||eo!==eo&&to!==to)return!0;if(!eo||!to)return!1}return!!(isValueObject(eo)&&isValueObject(to)&&eo.equals(to))}var imul=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(to,ro){to|=0,ro|=0;var no=to&65535,oo=ro&65535;return no*oo+((to>>>16)*oo+no*(ro>>>16)<<16>>>0)|0};function smi(eo){return eo>>>1&1073741824|eo&3221225471}var defaultValueOf=Object.prototype.valueOf;function hash$2(eo){if(eo==null)return hashNullish(eo);if(typeof eo.hashCode=="function")return smi(eo.hashCode(eo));var to=valueOf(eo);if(to==null)return hashNullish(to);switch(typeof to){case"boolean":return to?1108378657:1108378656;case"number":return hashNumber(to);case"string":return to.length>STRING_HASH_CACHE_MIN_STRLEN?cachedHashString(to):hashString(to);case"object":case"function":return hashJSObj(to);case"symbol":return hashSymbol(to);default:if(typeof to.toString=="function")return hashString(to.toString());throw new Error("Value type "+typeof to+" cannot be hashed.")}}function hashNullish(eo){return eo===null?1108378658:1108378659}function hashNumber(eo){if(eo!==eo||eo===1/0)return 0;var to=eo|0;for(to!==eo&&(to^=eo*4294967295);eo>4294967295;)eo/=4294967295,to^=eo;return smi(to)}function cachedHashString(eo){var to=stringHashCache[eo];return to===void 0&&(to=hashString(eo),STRING_HASH_CACHE_SIZE===STRING_HASH_CACHE_MAX_SIZE&&(STRING_HASH_CACHE_SIZE=0,stringHashCache={}),STRING_HASH_CACHE_SIZE++,stringHashCache[eo]=to),to}function hashString(eo){for(var to=0,ro=0;ro0)switch(eo.nodeType){case 1:return eo.uniqueID;case 9:return eo.documentElement&&eo.documentElement.uniqueID}}function valueOf(eo){return eo.valueOf!==defaultValueOf&&typeof eo.valueOf=="function"?eo.valueOf(eo):eo}function nextHash(){var eo=++_objHashUID;return _objHashUID&1073741824&&(_objHashUID=0),eo}var usingWeakMap=typeof WeakMap=="function",weakMap;usingWeakMap&&(weakMap=new WeakMap);var symbolMap=Object.create(null),_objHashUID=0,UID_HASH_KEY="__immutablehash__";typeof Symbol=="function"&&(UID_HASH_KEY=Symbol(UID_HASH_KEY));var STRING_HASH_CACHE_MIN_STRLEN=16,STRING_HASH_CACHE_MAX_SIZE=255,STRING_HASH_CACHE_SIZE=0,stringHashCache={},ToKeyedSequence=function(eo){function to(ro,no){this._iter=ro,this._useKeys=no,this.size=ro.size}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.get=function(no,oo){return this._iter.get(no,oo)},to.prototype.has=function(no){return this._iter.has(no)},to.prototype.valueSeq=function(){return this._iter.valueSeq()},to.prototype.reverse=function(){var no=this,oo=reverseFactory(this,!0);return this._useKeys||(oo.valueSeq=function(){return no._iter.toSeq().reverse()}),oo},to.prototype.map=function(no,oo){var io=this,so=mapFactory(this,no,oo);return this._useKeys||(so.valueSeq=function(){return io._iter.toSeq().map(no,oo)}),so},to.prototype.__iterate=function(no,oo){var io=this;return this._iter.__iterate(function(so,ao){return no(so,ao,io)},oo)},to.prototype.__iterator=function(no,oo){return this._iter.__iterator(no,oo)},to}(KeyedSeq);ToKeyedSequence.prototype[IS_ORDERED_SYMBOL]=!0;var ToIndexedSequence=function(eo){function to(ro){this._iter=ro,this.size=ro.size}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.includes=function(no){return this._iter.includes(no)},to.prototype.__iterate=function(no,oo){var io=this,so=0;return oo&&ensureSize(this),this._iter.__iterate(function(ao){return no(ao,oo?io.size-++so:so++,io)},oo)},to.prototype.__iterator=function(no,oo){var io=this,so=this._iter.__iterator(ITERATE_VALUES,oo),ao=0;return oo&&ensureSize(this),new Iterator(function(){var lo=so.next();return lo.done?lo:iteratorValue(no,oo?io.size-++ao:ao++,lo.value,lo)})},to}(IndexedSeq),ToSetSequence=function(eo){function to(ro){this._iter=ro,this.size=ro.size}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.has=function(no){return this._iter.includes(no)},to.prototype.__iterate=function(no,oo){var io=this;return this._iter.__iterate(function(so){return no(so,so,io)},oo)},to.prototype.__iterator=function(no,oo){var io=this._iter.__iterator(ITERATE_VALUES,oo);return new Iterator(function(){var so=io.next();return so.done?so:iteratorValue(no,so.value,so.value,so)})},to}(SetSeq),FromEntriesSequence=function(eo){function to(ro){this._iter=ro,this.size=ro.size}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.prototype.entrySeq=function(){return this._iter.toSeq()},to.prototype.__iterate=function(no,oo){var io=this;return this._iter.__iterate(function(so){if(so){validateEntry(so);var ao=isCollection(so);return no(ao?so.get(1):so[1],ao?so.get(0):so[0],io)}},oo)},to.prototype.__iterator=function(no,oo){var io=this._iter.__iterator(ITERATE_VALUES,oo);return new Iterator(function(){for(;;){var so=io.next();if(so.done)return so;var ao=so.value;if(ao){validateEntry(ao);var lo=isCollection(ao);return iteratorValue(no,lo?ao.get(0):ao[0],lo?ao.get(1):ao[1],so)}}})},to}(KeyedSeq);ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough;function flipFactory(eo){var to=makeSequence(eo);return to._iter=eo,to.size=eo.size,to.flip=function(){return eo},to.reverse=function(){var ro=eo.reverse.apply(this);return ro.flip=function(){return eo.reverse()},ro},to.has=function(ro){return eo.includes(ro)},to.includes=function(ro){return eo.has(ro)},to.cacheResult=cacheResultThrough,to.__iterateUncached=function(ro,no){var oo=this;return eo.__iterate(function(io,so){return ro(so,io,oo)!==!1},no)},to.__iteratorUncached=function(ro,no){if(ro===ITERATE_ENTRIES){var oo=eo.__iterator(ro,no);return new Iterator(function(){var io=oo.next();if(!io.done){var so=io.value[0];io.value[0]=io.value[1],io.value[1]=so}return io})}return eo.__iterator(ro===ITERATE_VALUES?ITERATE_KEYS:ITERATE_VALUES,no)},to}function mapFactory(eo,to,ro){var no=makeSequence(eo);return no.size=eo.size,no.has=function(oo){return eo.has(oo)},no.get=function(oo,io){var so=eo.get(oo,NOT_SET);return so===NOT_SET?io:to.call(ro,so,oo,eo)},no.__iterateUncached=function(oo,io){var so=this;return eo.__iterate(function(ao,lo,uo){return oo(to.call(ro,ao,lo,uo),lo,so)!==!1},io)},no.__iteratorUncached=function(oo,io){var so=eo.__iterator(ITERATE_ENTRIES,io);return new Iterator(function(){var ao=so.next();if(ao.done)return ao;var lo=ao.value,uo=lo[0];return iteratorValue(oo,uo,to.call(ro,lo[1],uo,eo),ao)})},no}function reverseFactory(eo,to){var ro=this,no=makeSequence(eo);return no._iter=eo,no.size=eo.size,no.reverse=function(){return eo},eo.flip&&(no.flip=function(){var oo=flipFactory(eo);return oo.reverse=function(){return eo.flip()},oo}),no.get=function(oo,io){return eo.get(to?oo:-1-oo,io)},no.has=function(oo){return eo.has(to?oo:-1-oo)},no.includes=function(oo){return eo.includes(oo)},no.cacheResult=cacheResultThrough,no.__iterate=function(oo,io){var so=this,ao=0;return io&&ensureSize(eo),eo.__iterate(function(lo,uo){return oo(lo,to?uo:io?so.size-++ao:ao++,so)},!io)},no.__iterator=function(oo,io){var so=0;io&&ensureSize(eo);var ao=eo.__iterator(ITERATE_ENTRIES,!io);return new Iterator(function(){var lo=ao.next();if(lo.done)return lo;var uo=lo.value;return iteratorValue(oo,to?uo[0]:io?ro.size-++so:so++,uo[1],lo)})},no}function filterFactory(eo,to,ro,no){var oo=makeSequence(eo);return no&&(oo.has=function(io){var so=eo.get(io,NOT_SET);return so!==NOT_SET&&!!to.call(ro,so,io,eo)},oo.get=function(io,so){var ao=eo.get(io,NOT_SET);return ao!==NOT_SET&&to.call(ro,ao,io,eo)?ao:so}),oo.__iterateUncached=function(io,so){var ao=this,lo=0;return eo.__iterate(function(uo,co,fo){if(to.call(ro,uo,co,fo))return lo++,io(uo,no?co:lo-1,ao)},so),lo},oo.__iteratorUncached=function(io,so){var ao=eo.__iterator(ITERATE_ENTRIES,so),lo=0;return new Iterator(function(){for(;;){var uo=ao.next();if(uo.done)return uo;var co=uo.value,fo=co[0],ho=co[1];if(to.call(ro,ho,fo,eo))return iteratorValue(io,no?fo:lo++,ho,uo)}})},oo}function countByFactory(eo,to,ro){var no=Map$1().asMutable();return eo.__iterate(function(oo,io){no.update(to.call(ro,oo,io,eo),0,function(so){return so+1})}),no.asImmutable()}function groupByFactory(eo,to,ro){var no=isKeyed(eo),oo=(isOrdered(eo)?OrderedMap():Map$1()).asMutable();eo.__iterate(function(so,ao){oo.update(to.call(ro,so,ao,eo),function(lo){return lo=lo||[],lo.push(no?[ao,so]:so),lo})});var io=collectionClass(eo);return oo.map(function(so){return reify(eo,io(so))}).asImmutable()}function partitionFactory(eo,to,ro){var no=isKeyed(eo),oo=[[],[]];eo.__iterate(function(so,ao){oo[to.call(ro,so,ao,eo)?1:0].push(no?[ao,so]:so)});var io=collectionClass(eo);return oo.map(function(so){return reify(eo,io(so))})}function sliceFactory(eo,to,ro,no){var oo=eo.size;if(wholeSlice(to,ro,oo))return eo;var io=resolveBegin(to,oo),so=resolveEnd(ro,oo);if(io!==io||so!==so)return sliceFactory(eo.toSeq().cacheResult(),to,ro,no);var ao=so-io,lo;ao===ao&&(lo=ao<0?0:ao);var uo=makeSequence(eo);return uo.size=lo===0?lo:eo.size&&lo||void 0,!no&&isSeq(eo)&&lo>=0&&(uo.get=function(co,fo){return co=wrapIndex(this,co),co>=0&&colo)return iteratorDone();var vo=ho.next();return no||co===ITERATE_VALUES||vo.done?vo:co===ITERATE_KEYS?iteratorValue(co,go-1,void 0,vo):iteratorValue(co,go-1,vo.value[1],vo)})},uo}function takeWhileFactory(eo,to,ro){var no=makeSequence(eo);return no.__iterateUncached=function(oo,io){var so=this;if(io)return this.cacheResult().__iterate(oo,io);var ao=0;return eo.__iterate(function(lo,uo,co){return to.call(ro,lo,uo,co)&&++ao&&oo(lo,uo,so)}),ao},no.__iteratorUncached=function(oo,io){var so=this;if(io)return this.cacheResult().__iterator(oo,io);var ao=eo.__iterator(ITERATE_ENTRIES,io),lo=!0;return new Iterator(function(){if(!lo)return iteratorDone();var uo=ao.next();if(uo.done)return uo;var co=uo.value,fo=co[0],ho=co[1];return to.call(ro,ho,fo,so)?oo===ITERATE_ENTRIES?uo:iteratorValue(oo,fo,ho,uo):(lo=!1,iteratorDone())})},no}function skipWhileFactory(eo,to,ro,no){var oo=makeSequence(eo);return oo.__iterateUncached=function(io,so){var ao=this;if(so)return this.cacheResult().__iterate(io,so);var lo=!0,uo=0;return eo.__iterate(function(co,fo,ho){if(!(lo&&(lo=to.call(ro,co,fo,ho))))return uo++,io(co,no?fo:uo-1,ao)}),uo},oo.__iteratorUncached=function(io,so){var ao=this;if(so)return this.cacheResult().__iterator(io,so);var lo=eo.__iterator(ITERATE_ENTRIES,so),uo=!0,co=0;return new Iterator(function(){var fo,ho,po;do{if(fo=lo.next(),fo.done)return no||io===ITERATE_VALUES?fo:io===ITERATE_KEYS?iteratorValue(io,co++,void 0,fo):iteratorValue(io,co++,fo.value[1],fo);var go=fo.value;ho=go[0],po=go[1],uo&&(uo=to.call(ro,po,ho,ao))}while(uo);return io===ITERATE_ENTRIES?fo:iteratorValue(io,ho,po,fo)})},oo}function concatFactory(eo,to){var ro=isKeyed(eo),no=[eo].concat(to).map(function(so){return isCollection(so)?ro&&(so=KeyedCollection(so)):so=ro?keyedSeqFromValue(so):indexedSeqFromValue(Array.isArray(so)?so:[so]),so}).filter(function(so){return so.size!==0});if(no.length===0)return eo;if(no.length===1){var oo=no[0];if(oo===eo||ro&&isKeyed(oo)||isIndexed(eo)&&isIndexed(oo))return oo}var io=new ArraySeq(no);return ro?io=io.toKeyedSeq():isIndexed(eo)||(io=io.toSetSeq()),io=io.flatten(!0),io.size=no.reduce(function(so,ao){if(so!==void 0){var lo=ao.size;if(lo!==void 0)return so+lo}},0),io}function flattenFactory(eo,to,ro){var no=makeSequence(eo);return no.__iterateUncached=function(oo,io){if(io)return this.cacheResult().__iterate(oo,io);var so=0,ao=!1;function lo(uo,co){uo.__iterate(function(fo,ho){return(!to||co0}function zipWithFactory(eo,to,ro,no){var oo=makeSequence(eo),io=new ArraySeq(ro).map(function(so){return so.size});return oo.size=no?io.max():io.min(),oo.__iterate=function(so,ao){for(var lo=this.__iterator(ITERATE_VALUES,ao),uo,co=0;!(uo=lo.next()).done&&so(uo.value,co++,this)!==!1;);return co},oo.__iteratorUncached=function(so,ao){var lo=ro.map(function(fo){return fo=Collection$1(fo),getIterator(ao?fo.reverse():fo)}),uo=0,co=!1;return new Iterator(function(){var fo;return co||(fo=lo.map(function(ho){return ho.next()}),co=no?fo.every(function(ho){return ho.done}):fo.some(function(ho){return ho.done})),co?iteratorDone():iteratorValue(so,uo++,to.apply(null,fo.map(function(ho){return ho.value})))})},oo}function reify(eo,to){return eo===to?eo:isSeq(eo)?to:eo.constructor(to)}function validateEntry(eo){if(eo!==Object(eo))throw new TypeError("Expected [K, V] tuple: "+eo)}function collectionClass(eo){return isKeyed(eo)?KeyedCollection:isIndexed(eo)?IndexedCollection:SetCollection}function makeSequence(eo){return Object.create((isKeyed(eo)?KeyedSeq:isIndexed(eo)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(eo,to){return eo===void 0&&to===void 0?0:eo===void 0?1:to===void 0?-1:eo>to?1:eo0;)to[ro]=arguments[ro+1];if(typeof eo!="function")throw new TypeError("Invalid merger function: "+eo);return mergeIntoKeyedWith(this,to,eo)}function mergeIntoKeyedWith(eo,to,ro){for(var no=[],oo=0;oo0;)to[ro]=arguments[ro+1];return mergeDeepWithSources(this,to,eo)}function mergeIn(eo){for(var to=[],ro=arguments.length-1;ro-- >0;)to[ro]=arguments[ro+1];return updateIn$1(this,eo,emptyMap(),function(no){return mergeWithSources(no,to)})}function mergeDeepIn(eo){for(var to=[],ro=arguments.length-1;ro-- >0;)to[ro]=arguments[ro+1];return updateIn$1(this,eo,emptyMap(),function(no){return mergeDeepWithSources(no,to)})}function withMutations(eo){var to=this.asMutable();return eo(to),to.wasAltered()?to.__ensureOwner(this.__ownerID):this}function asMutable(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)}function asImmutable(){return this.__ensureOwner()}function wasAltered(){return this.__altered}var Map$1=function(eo){function to(ro){return ro==null?emptyMap():isMap(ro)&&!isOrdered(ro)?ro:emptyMap().withMutations(function(no){var oo=eo(ro);assertNotInfinite(oo.size),oo.forEach(function(io,so){return no.set(so,io)})})}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.of=function(){for(var no=[],oo=arguments.length;oo--;)no[oo]=arguments[oo];return emptyMap().withMutations(function(io){for(var so=0;so=no.length)throw new Error("Missing value for key: "+no[so]);io.set(no[so],no[so+1])}})},to.prototype.toString=function(){return this.__toString("Map {","}")},to.prototype.get=function(no,oo){return this._root?this._root.get(0,void 0,no,oo):oo},to.prototype.set=function(no,oo){return updateMap(this,no,oo)},to.prototype.remove=function(no){return updateMap(this,no,NOT_SET)},to.prototype.deleteAll=function(no){var oo=Collection$1(no);return oo.size===0?this:this.withMutations(function(io){oo.forEach(function(so){return io.remove(so)})})},to.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},to.prototype.sort=function(no){return OrderedMap(sortFactory(this,no))},to.prototype.sortBy=function(no,oo){return OrderedMap(sortFactory(this,oo,no))},to.prototype.map=function(no,oo){var io=this;return this.withMutations(function(so){so.forEach(function(ao,lo){so.set(lo,no.call(oo,ao,lo,io))})})},to.prototype.__iterator=function(no,oo){return new MapIterator(this,no,oo)},to.prototype.__iterate=function(no,oo){var io=this,so=0;return this._root&&this._root.iterate(function(ao){return so++,no(ao[1],ao[0],io)},oo),so},to.prototype.__ensureOwner=function(no){return no===this.__ownerID?this:no?makeMap(this.size,this._root,no,this.__hash):this.size===0?emptyMap():(this.__ownerID=no,this.__altered=!1,this)},to}(KeyedCollection);Map$1.isMap=isMap;var MapPrototype=Map$1.prototype;MapPrototype[IS_MAP_SYMBOL]=!0;MapPrototype[DELETE]=MapPrototype.remove;MapPrototype.removeAll=MapPrototype.deleteAll;MapPrototype.setIn=setIn;MapPrototype.removeIn=MapPrototype.deleteIn=deleteIn;MapPrototype.update=update;MapPrototype.updateIn=updateIn;MapPrototype.merge=MapPrototype.concat=merge$1$1;MapPrototype.mergeWith=mergeWith$1;MapPrototype.mergeDeep=mergeDeep;MapPrototype.mergeDeepWith=mergeDeepWith;MapPrototype.mergeIn=mergeIn;MapPrototype.mergeDeepIn=mergeDeepIn;MapPrototype.withMutations=withMutations;MapPrototype.wasAltered=wasAltered;MapPrototype.asImmutable=asImmutable;MapPrototype["@@transducer/init"]=MapPrototype.asMutable=asMutable;MapPrototype["@@transducer/step"]=function(eo,to){return eo.set(to[0],to[1])};MapPrototype["@@transducer/result"]=function(eo){return eo.asImmutable()};var ArrayMapNode=function(to,ro){this.ownerID=to,this.entries=ro};ArrayMapNode.prototype.get=function(to,ro,no,oo){for(var io=this.entries,so=0,ao=io.length;so=MAX_ARRAY_MAP_SIZE)return createNodes(to,uo,oo,io);var po=to&&to===this.ownerID,go=po?uo:arrCopy(uo);return ho?lo?co===fo-1?go.pop():go[co]=go.pop():go[co]=[oo,io]:go.push([oo,io]),po?(this.entries=go,this):new ArrayMapNode(to,go)}};var BitmapIndexedNode=function(to,ro,no){this.ownerID=to,this.bitmap=ro,this.nodes=no};BitmapIndexedNode.prototype.get=function(to,ro,no,oo){ro===void 0&&(ro=hash$2(no));var io=1<<((to===0?ro:ro>>>to)&MASK),so=this.bitmap;return so&io?this.nodes[popCount(so&io-1)].get(to+SHIFT,ro,no,oo):oo};BitmapIndexedNode.prototype.update=function(to,ro,no,oo,io,so,ao){no===void 0&&(no=hash$2(oo));var lo=(ro===0?no:no>>>ro)&MASK,uo=1<=MAX_BITMAP_INDEXED_SIZE)return expandNodes(to,po,co,lo,vo);if(fo&&!vo&&po.length===2&&isLeafNode(po[ho^1]))return po[ho^1];if(fo&&vo&&po.length===1&&isLeafNode(vo))return vo;var bo=to&&to===this.ownerID,xo=fo?vo?co:co^uo:co|uo,_o=fo?vo?setAt(po,ho,vo,bo):spliceOut(po,ho,bo):spliceIn(po,ho,vo,bo);return bo?(this.bitmap=xo,this.nodes=_o,this):new BitmapIndexedNode(to,xo,_o)};var HashArrayMapNode=function(to,ro,no){this.ownerID=to,this.count=ro,this.nodes=no};HashArrayMapNode.prototype.get=function(to,ro,no,oo){ro===void 0&&(ro=hash$2(no));var io=(to===0?ro:ro>>>to)&MASK,so=this.nodes[io];return so?so.get(to+SHIFT,ro,no,oo):oo};HashArrayMapNode.prototype.update=function(to,ro,no,oo,io,so,ao){no===void 0&&(no=hash$2(oo));var lo=(ro===0?no:no>>>ro)&MASK,uo=io===NOT_SET,co=this.nodes,fo=co[lo];if(uo&&!fo)return this;var ho=updateNode(fo,to,ro+SHIFT,no,oo,io,so,ao);if(ho===fo)return this;var po=this.count;if(!fo)po++;else if(!ho&&(po--,po>>ro)&MASK,so=(ro===0?no:no>>>ro)&MASK,ao,lo=io===so?[mergeIntoNode(eo,to,ro+SHIFT,no,oo)]:(ao=new ValueNode(to,no,oo),io>>=1)so[ao]=ro&1?to[io++]:void 0;return so[no]=oo,new HashArrayMapNode(eo,io+1,so)}function popCount(eo){return eo-=eo>>1&1431655765,eo=(eo&858993459)+(eo>>2&858993459),eo=eo+(eo>>4)&252645135,eo+=eo>>8,eo+=eo>>16,eo&127}function setAt(eo,to,ro,no){var oo=no?eo:arrCopy(eo);return oo[to]=ro,oo}function spliceIn(eo,to,ro,no){var oo=eo.length+1;if(no&&to+1===oo)return eo[to]=ro,eo;for(var io=new Array(oo),so=0,ao=0;ao0&&io=0&&no>>ro&MASK;if(oo>=this.array.length)return new VNode([],to);var io=oo===0,so;if(ro>0){var ao=this.array[oo];if(so=ao&&ao.removeBefore(to,ro-SHIFT,no),so===ao&&io)return this}if(io&&!so)return this;var lo=editableVNode(this,to);if(!io)for(var uo=0;uo>>ro&MASK;if(oo>=this.array.length)return this;var io;if(ro>0){var so=this.array[oo];if(io=so&&so.removeAfter(to,ro-SHIFT,no),io===so&&oo===this.array.length-1)return this}var ao=editableVNode(this,to);return ao.array.splice(oo+1),io&&(ao.array[oo]=io),ao};var DONE={};function iterateList(eo,to){var ro=eo._origin,no=eo._capacity,oo=getTailOffset(no),io=eo._tail;return so(eo._root,eo._level,0);function so(uo,co,fo){return co===0?ao(uo,fo):lo(uo,co,fo)}function ao(uo,co){var fo=co===oo?io&&io.array:uo&&uo.array,ho=co>ro?0:ro-co,po=no-co;return po>SIZE&&(po=SIZE),function(){if(ho===po)return DONE;var go=to?--po:ho++;return fo&&fo[go]}}function lo(uo,co,fo){var ho,po=uo&&uo.array,go=fo>ro?0:ro-fo>>co,vo=(no-fo>>co)+1;return vo>SIZE&&(vo=SIZE),function(){for(;;){if(ho){var bo=ho();if(bo!==DONE)return bo;ho=null}if(go===vo)return DONE;var xo=to?--vo:go++;ho=so(po&&po[xo],co-SHIFT,fo+(xo<=eo.size||to<0)return eo.withMutations(function(so){to<0?setListBounds(so,to).set(0,ro):setListBounds(so,0,to+1).set(to,ro)});to+=eo._origin;var no=eo._tail,oo=eo._root,io=MakeRef();return to>=getTailOffset(eo._capacity)?no=updateVNode(no,eo.__ownerID,0,to,ro,io):oo=updateVNode(oo,eo.__ownerID,eo._level,to,ro,io),io.value?eo.__ownerID?(eo._root=oo,eo._tail=no,eo.__hash=void 0,eo.__altered=!0,eo):makeList(eo._origin,eo._capacity,eo._level,oo,no):eo}function updateVNode(eo,to,ro,no,oo,io){var so=no>>>ro&MASK,ao=eo&&so0){var uo=eo&&eo.array[so],co=updateVNode(uo,to,ro-SHIFT,no,oo,io);return co===uo?eo:(lo=editableVNode(eo,to),lo.array[so]=co,lo)}return ao&&eo.array[so]===oo?eo:(io&&SetRef(io),lo=editableVNode(eo,to),oo===void 0&&so===lo.array.length-1?lo.array.pop():lo.array[so]=oo,lo)}function editableVNode(eo,to){return to&&eo&&to===eo.ownerID?eo:new VNode(eo?eo.array.slice():[],to)}function listNodeFor(eo,to){if(to>=getTailOffset(eo._capacity))return eo._tail;if(to<1<0;)ro=ro.array[to>>>no&MASK],no-=SHIFT;return ro}}function setListBounds(eo,to,ro){to!==void 0&&(to|=0),ro!==void 0&&(ro|=0);var no=eo.__ownerID||new OwnerID,oo=eo._origin,io=eo._capacity,so=oo+to,ao=ro===void 0?io:ro<0?io+ro:oo+ro;if(so===oo&&ao===io)return eo;if(so>=ao)return eo.clear();for(var lo=eo._level,uo=eo._root,co=0;so+co<0;)uo=new VNode(uo&&uo.array.length?[void 0,uo]:[],no),lo+=SHIFT,co+=1<=1<fo?new VNode([],no):po;if(po&&ho>fo&&soSHIFT;bo-=SHIFT){var xo=fo>>>bo&MASK;vo=vo.array[xo]=editableVNode(vo.array[xo],no)}vo.array[fo>>>SHIFT&MASK]=po}if(ao=ho)so-=ho,ao-=ho,lo=SHIFT,uo=null,go=go&&go.removeBefore(no,0,so);else if(so>oo||ho>>lo&MASK;if(_o!==ho>>>lo&MASK)break;_o&&(co+=(1<oo&&(uo=uo.removeBefore(no,lo,so-co)),uo&&ho>>SHIFT<=SIZE&&oo.size>=no.size*2?(lo=oo.filter(function(uo,co){return uo!==void 0&&io!==co}),ao=lo.toKeyedSeq().map(function(uo){return uo[0]}).flip().toMap(),eo.__ownerID&&(ao.__ownerID=lo.__ownerID=eo.__ownerID)):(ao=no.remove(to),lo=io===oo.size-1?oo.pop():oo.set(io,void 0))}else if(so){if(ro===oo.get(io)[1])return eo;ao=no,lo=oo.set(io,[to,ro])}else ao=no.set(to,oo.size),lo=oo.set(oo.size,[to,ro]);return eo.__ownerID?(eo.size=ao.size,eo._map=ao,eo._list=lo,eo.__hash=void 0,eo.__altered=!0,eo):makeOrderedMap(ao,lo)}var IS_STACK_SYMBOL="@@__IMMUTABLE_STACK__@@";function isStack(eo){return!!(eo&&eo[IS_STACK_SYMBOL])}var Stack$1=function(eo){function to(ro){return ro==null?emptyStack():isStack(ro)?ro:emptyStack().pushAll(ro)}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.of=function(){return this(arguments)},to.prototype.toString=function(){return this.__toString("Stack [","]")},to.prototype.get=function(no,oo){var io=this._head;for(no=wrapIndex(this,no);io&&no--;)io=io.next;return io?io.value:oo},to.prototype.peek=function(){return this._head&&this._head.value},to.prototype.push=function(){var no=arguments;if(arguments.length===0)return this;for(var oo=this.size+arguments.length,io=this._head,so=arguments.length-1;so>=0;so--)io={value:no[so],next:io};return this.__ownerID?(this.size=oo,this._head=io,this.__hash=void 0,this.__altered=!0,this):makeStack(oo,io)},to.prototype.pushAll=function(no){if(no=eo(no),no.size===0)return this;if(this.size===0&&isStack(no))return no;assertNotInfinite(no.size);var oo=this.size,io=this._head;return no.__iterate(function(so){oo++,io={value:so,next:io}},!0),this.__ownerID?(this.size=oo,this._head=io,this.__hash=void 0,this.__altered=!0,this):makeStack(oo,io)},to.prototype.pop=function(){return this.slice(1)},to.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},to.prototype.slice=function(no,oo){if(wholeSlice(no,oo,this.size))return this;var io=resolveBegin(no,this.size),so=resolveEnd(oo,this.size);if(so!==this.size)return eo.prototype.slice.call(this,no,oo);for(var ao=this.size-io,lo=this._head;io--;)lo=lo.next;return this.__ownerID?(this.size=ao,this._head=lo,this.__hash=void 0,this.__altered=!0,this):makeStack(ao,lo)},to.prototype.__ensureOwner=function(no){return no===this.__ownerID?this:no?makeStack(this.size,this._head,no,this.__hash):this.size===0?emptyStack():(this.__ownerID=no,this.__altered=!1,this)},to.prototype.__iterate=function(no,oo){var io=this;if(oo)return new ArraySeq(this.toArray()).__iterate(function(lo,uo){return no(lo,uo,io)},oo);for(var so=0,ao=this._head;ao&&no(ao.value,so++,this)!==!1;)ao=ao.next;return so},to.prototype.__iterator=function(no,oo){if(oo)return new ArraySeq(this.toArray()).__iterator(no,oo);var io=0,so=this._head;return new Iterator(function(){if(so){var ao=so.value;return so=so.next,iteratorValue(no,io++,ao)}return iteratorDone()})},to}(IndexedCollection);Stack$1.isStack=isStack;var StackPrototype=Stack$1.prototype;StackPrototype[IS_STACK_SYMBOL]=!0;StackPrototype.shift=StackPrototype.pop;StackPrototype.unshift=StackPrototype.push;StackPrototype.unshiftAll=StackPrototype.pushAll;StackPrototype.withMutations=withMutations;StackPrototype.wasAltered=wasAltered;StackPrototype.asImmutable=asImmutable;StackPrototype["@@transducer/init"]=StackPrototype.asMutable=asMutable;StackPrototype["@@transducer/step"]=function(eo,to){return eo.unshift(to)};StackPrototype["@@transducer/result"]=function(eo){return eo.asImmutable()};function makeStack(eo,to,ro,no){var oo=Object.create(StackPrototype);return oo.size=eo,oo._head=to,oo.__ownerID=ro,oo.__hash=no,oo.__altered=!1,oo}var EMPTY_STACK;function emptyStack(){return EMPTY_STACK||(EMPTY_STACK=makeStack(0))}var IS_SET_SYMBOL="@@__IMMUTABLE_SET__@@";function isSet(eo){return!!(eo&&eo[IS_SET_SYMBOL])}function isOrderedSet(eo){return isSet(eo)&&isOrdered(eo)}function deepEqual(eo,to){if(eo===to)return!0;if(!isCollection(to)||eo.size!==void 0&&to.size!==void 0&&eo.size!==to.size||eo.__hash!==void 0&&to.__hash!==void 0&&eo.__hash!==to.__hash||isKeyed(eo)!==isKeyed(to)||isIndexed(eo)!==isIndexed(to)||isOrdered(eo)!==isOrdered(to))return!1;if(eo.size===0&&to.size===0)return!0;var ro=!isAssociative(eo);if(isOrdered(eo)){var no=eo.entries();return to.every(function(lo,uo){var co=no.next().value;return co&&is$1(co[1],lo)&&(ro||is$1(co[0],uo))})&&no.next().done}var oo=!1;if(eo.size===void 0)if(to.size===void 0)typeof eo.cacheResult=="function"&&eo.cacheResult();else{oo=!0;var io=eo;eo=to,to=io}var so=!0,ao=to.__iterate(function(lo,uo){if(ro?!eo.has(lo):oo?!is$1(lo,eo.get(uo,NOT_SET)):!is$1(eo.get(uo,NOT_SET),lo))return so=!1,!1});return so&&eo.size===ao}function mixin(eo,to){var ro=function(no){eo.prototype[no]=to[no]};return Object.keys(to).forEach(ro),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(to).forEach(ro),eo}function toJS(eo){if(!eo||typeof eo!="object")return eo;if(!isCollection(eo)){if(!isDataStructure(eo))return eo;eo=Seq(eo)}if(isKeyed(eo)){var to={};return eo.__iterate(function(no,oo){to[oo]=toJS(no)}),to}var ro=[];return eo.__iterate(function(no){ro.push(toJS(no))}),ro}var Set$1=function(eo){function to(ro){return ro==null?emptySet():isSet(ro)&&!isOrdered(ro)?ro:emptySet().withMutations(function(no){var oo=eo(ro);assertNotInfinite(oo.size),oo.forEach(function(io){return no.add(io)})})}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.of=function(){return this(arguments)},to.fromKeys=function(no){return this(KeyedCollection(no).keySeq())},to.intersect=function(no){return no=Collection$1(no).toArray(),no.length?SetPrototype.intersect.apply(to(no.pop()),no):emptySet()},to.union=function(no){return no=Collection$1(no).toArray(),no.length?SetPrototype.union.apply(to(no.pop()),no):emptySet()},to.prototype.toString=function(){return this.__toString("Set {","}")},to.prototype.has=function(no){return this._map.has(no)},to.prototype.add=function(no){return updateSet(this,this._map.set(no,no))},to.prototype.remove=function(no){return updateSet(this,this._map.remove(no))},to.prototype.clear=function(){return updateSet(this,this._map.clear())},to.prototype.map=function(no,oo){var io=this,so=!1,ao=updateSet(this,this._map.mapEntries(function(lo){var uo=lo[1],co=no.call(oo,uo,uo,io);return co!==uo&&(so=!0),[co,co]},oo));return so?ao:this},to.prototype.union=function(){for(var no=[],oo=arguments.length;oo--;)no[oo]=arguments[oo];return no=no.filter(function(io){return io.size!==0}),no.length===0?this:this.size===0&&!this.__ownerID&&no.length===1?this.constructor(no[0]):this.withMutations(function(io){for(var so=0;so=0&&oo=0&&iothis.size?ro:this.find(function(no,oo){return oo===to},void 0,ro)},has:function(to){return to=wrapIndex(this,to),to>=0&&(this.size!==void 0?this.size===1/0||toto?-1:0}function hashCollection(eo){if(eo.size===1/0)return 0;var to=isOrdered(eo),ro=isKeyed(eo),no=to?1:0,oo=eo.__iterate(ro?to?function(io,so){no=31*no+hashMerge(hash$2(io),hash$2(so))|0}:function(io,so){no=no+hashMerge(hash$2(io),hash$2(so))|0}:to?function(io){no=31*no+hash$2(io)|0}:function(io){no=no+hash$2(io)|0});return murmurHashOfSize(oo,no)}function murmurHashOfSize(eo,to){return to=imul(to,3432918353),to=imul(to<<15|to>>>-15,461845907),to=imul(to<<13|to>>>-13,5),to=(to+3864292196|0)^eo,to=imul(to^to>>>16,2246822507),to=imul(to^to>>>13,3266489909),to=smi(to^to>>>16),to}function hashMerge(eo,to){return eo^to+2654435769+(eo<<6)+(eo>>2)|0}var OrderedSet=function(eo){function to(ro){return ro==null?emptyOrderedSet():isOrderedSet(ro)?ro:emptyOrderedSet().withMutations(function(no){var oo=SetCollection(ro);assertNotInfinite(oo.size),oo.forEach(function(io){return no.add(io)})})}return eo&&(to.__proto__=eo),to.prototype=Object.create(eo&&eo.prototype),to.prototype.constructor=to,to.of=function(){return this(arguments)},to.fromKeys=function(no){return this(KeyedCollection(no).keySeq())},to.prototype.toString=function(){return this.__toString("OrderedSet {","}")},to}(Set$1);OrderedSet.isOrderedSet=isOrderedSet;var OrderedSetPrototype=OrderedSet.prototype;OrderedSetPrototype[IS_ORDERED_SYMBOL]=!0;OrderedSetPrototype.zip=IndexedCollectionPrototype.zip;OrderedSetPrototype.zipWith=IndexedCollectionPrototype.zipWith;OrderedSetPrototype.zipAll=IndexedCollectionPrototype.zipAll;OrderedSetPrototype.__empty=emptyOrderedSet;OrderedSetPrototype.__make=makeOrderedSet;function makeOrderedSet(eo,to){var ro=Object.create(OrderedSetPrototype);return ro.size=eo?eo.size:0,ro._map=eo,ro.__ownerID=to,ro}var EMPTY_ORDERED_SET;function emptyOrderedSet(){return EMPTY_ORDERED_SET||(EMPTY_ORDERED_SET=makeOrderedSet(emptyOrderedMap()))}function throwOnInvalidDefaultValues(eo){if(isRecord(eo))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(isImmutable(eo))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(eo===null||typeof eo!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var Record=function(to,ro){var no;throwOnInvalidDefaultValues(to);var oo=function(ao){var lo=this;if(ao instanceof oo)return ao;if(!(this instanceof oo))return new oo(ao);if(!no){no=!0;var uo=Object.keys(to),co=io._indices={};io._name=ro,io._keys=uo,io._defaultValues=to;for(var fo=0;fo0?this._next(ro.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()},to}(SimpleOuterSubscriber);function mergeAll(eo){return eo===void 0&&(eo=Number.POSITIVE_INFINITY),mergeMap(identity$1,eo)}function merge$2(){for(var eo=[],to=0;to1&&typeof eo[eo.length-1]=="number"&&(ro=eo.pop())):typeof oo=="number"&&(ro=eo.pop()),no===null&&eo.length===1&&eo[0]instanceof Observable$2?eo[0]:mergeAll(ro)(fromArray(eo,no))}function filter(eo,to){return function(no){return no.lift(new FilterOperator(eo,to))}}var FilterOperator=function(){function eo(to,ro){this.predicate=to,this.thisArg=ro}return eo.prototype.call=function(to,ro){return ro.subscribe(new FilterSubscriber(to,this.predicate,this.thisArg))},eo}(),FilterSubscriber=function(eo){__extends$2(to,eo);function to(ro,no,oo){var io=eo.call(this,ro)||this;return io.predicate=no,io.thisArg=oo,io.count=0,io}return to.prototype._next=function(ro){var no;try{no=this.predicate.call(this.thisArg,ro,this.count++)}catch(oo){this.destination.error(oo);return}no&&this.destination.next(ro)},to}(Subscriber$1);function debounceTime(eo,to){return to===void 0&&(to=async),function(ro){return ro.lift(new DebounceTimeOperator(eo,to))}}var DebounceTimeOperator=function(){function eo(to,ro){this.dueTime=to,this.scheduler=ro}return eo.prototype.call=function(to,ro){return ro.subscribe(new DebounceTimeSubscriber(to,this.dueTime,this.scheduler))},eo}(),DebounceTimeSubscriber=function(eo){__extends$2(to,eo);function to(ro,no,oo){var io=eo.call(this,ro)||this;return io.dueTime=no,io.scheduler=oo,io.debouncedSubscription=null,io.lastValue=null,io.hasValue=!1,io}return to.prototype._next=function(ro){this.clearDebounce(),this.lastValue=ro,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(dispatchNext,this.dueTime,this))},to.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},to.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var ro=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(ro)}},to.prototype.clearDebounce=function(){var ro=this.debouncedSubscription;ro!==null&&(this.remove(ro),ro.unsubscribe(),this.debouncedSubscription=null)},to}(Subscriber$1);function dispatchNext(eo){eo.debouncedNext()}function e$4(){return e$4=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{const ao=no.singletonCache.get(so)||no.requestCache.get(so)||no.transientCache.get(so);ao&&(io.proxyTarget.current=ao)}),no.postConstruct.forEach(io=>{io.postConstruct()}),this.currentCtx=null,oo}child(){const to=new this.constructor;return to.parent=this,to}getParent(){return this.parent}getInjectable(to){var ro;const no=this.pool.get(to);if(no)return{value:no,fromParent:!1};const oo=(ro=this.parent)==null?void 0:ro.getInjectable(to);return oo?{value:oo.value,fromParent:!0}:void 0}_resolve(to,ro,no){const oo=this.getInjectable(to);if((ro==null?void 0:ro.optional)===!0&&!oo)return;if(!oo)throw new Error(`Key: ${a$5(to)} not found`);const{value:{value:io,scope:so,type:ao},fromParent:lo}=oo;let uo,co=!1;if(ao===h$7.VALUE)return io;{const fo=no.requestedKeys.get(to);if(fo){if(!fo.constructed){if(!ro.lazy&&!lo){const ho=Array.from(no.requestedKeys.entries()).pop(),po=ho?`[ ${String(ho[0])}: ${ho[1].value.name} ]`:"";throw new Error(`Circular reference detected: ${po} -> [ ${a$5(to)}: ${io.name} ]`)}co=!0}}else no.requestedKeys.set(to,{constructed:!1,value:io})}return uo=co?()=>this.createLazy(to,ao,no):()=>this.create(to,oo.value,no),this.run(so,to,uo,no)}resolveDeps(to,ro){const no=[];for(const oo of to){const{key:io,options:so}=c$7(oo);if(Array.isArray(io)){const ao=[];for(const lo of io){let uo=ro.singletonCache.get(lo.key);uo===void 0&&(uo=this._resolve(lo.key,e$4({},lo.options),ro)),uo===void 0&&so.removeUndefined||ao.push(uo)}no.push(ao.length?ao:so.setToUndefinedIfEmpty?void 0:ao)}else{let ao=ro.singletonCache.get(io);ao===void 0&&(ao=this._resolve(io,e$4({},so),ro)),no.push(ao)}}return no}createLazy(to,ro,no){const oo=no.delayed.get(to);if(oo)return oo.proxy;const io=ro===h$7.CLASS?{}:function(){},so=function(ao,lo,uo){function co(){if(!ao.current)throw new Error(`Lazy target for key:${String(uo)} not yet set`);return ao.current}return new Proxy(ao,{apply:function(fo,ho){const po=co();return Reflect.apply(po,lo?po:void 0,ho)},construct:function(fo,ho){return Reflect.construct(co(),ho)},get:function(fo,ho,po){return ho===t$7?fo.current:ho===n$5||Reflect.get(co(),ho,po)},set:function(fo,ho,po){return Reflect.set(ho==="current"?fo:co(),ho,po)},defineProperty:function(fo,ho,po){return Reflect.defineProperty(co(),ho,po)},deleteProperty:function(fo,ho){return Reflect.deleteProperty(co(),ho)},getPrototypeOf:function(fo){return Reflect.getPrototypeOf(co())},setPrototypeOf:function(fo,ho){return Reflect.setPrototypeOf(co(),ho)},getOwnPropertyDescriptor:function(fo,ho){return Reflect.getOwnPropertyDescriptor(co(),ho)},has:function(fo,ho){return Reflect.has(co(),ho)},isExtensible:function(fo){return Reflect.isExtensible(co())},ownKeys:function(fo){return Reflect.ownKeys(co())},preventExtensions:function(fo){return Reflect.preventExtensions(co())}})}(io,ro===h$7.CLASS,to);return no.delayed.set(to,{proxy:so,proxyTarget:io}),so}create(to,ro,no){const{beforeResolve:oo,afterResolve:io,value:so,type:ao}=ro,lo=so.inject;let uo=[];lo&&(uo=Array.isArray(lo)?this.resolveDeps(lo,no):lo.fn({container:this,ctx:no.ctx},...this.resolveDeps(lo.deps,no)));const co=oo?oo({container:this,value:so.original,ctx:no.ctx},...uo):so(...uo);return io&&io({container:this,value:co,ctx:no.ctx}),no.requestedKeys.get(to).constructed=!0,ao==="CLASS"&&"postConstruct"in co&&no.postConstruct.push(co),co}run(to,ro,no,oo){if(to===f$6.SINGLETON||to===f$6.CONTAINER_SINGLETON){var io;if(!this.pool.has(ro)&&to===f$6.SINGLETON)return(io=this.parent)==null?void 0:io.resolve(ro);const ao=oo.singletonCache.get(ro);if(ao!==void 0)return ao===p$7?void 0:ao;{let lo=no();return lo===void 0&&(lo=p$7),this.singletonCache.set(ro,lo),lo}}if(f$6.REQUEST===to){const ao=oo.requestCache.get(ro);if(ao!==void 0)return ao===p$7?void 0:ao;{let lo=no();return lo===void 0&&(lo=p$7),oo.requestCache.set(ro,lo),lo}}const so=no();return oo.transientCache.set(ro,so),so}};function isClassProvider(eo){return hasOwn(eo,"useClass")}function isFactoryProvider(eo){return hasOwn(eo,"useFactory")}function isValueProvider(eo){return hasOwn(eo,"useValue")}function isTokenProvider(eo){return hasOwn(eo,"useToken")}const SINGLETON=Symbol("singleton");function isConstructor(eo){return typeof eo=="function"&&!!eo.inject}function getClassScope(eo){return eo[SINGLETON]?"SINGLETON":eo.scope?eo.scope:"TRANSIENT"}class DependencyContainer extends d$6{constructor(){super(...arguments),this.name="DependencyContainer"}bindValue(to,ro){return this.has(to,!1)&&this.unbind(to),super.bindValue(to,ro)}bindClass(to,ro,no){const oo=(no==null?void 0:no.scope)??getClassScope(to);return super.bindClass(to,ro,{...no,scope:oo})}register(to,ro){if(isValueProvider(ro))this.bindValue(to,ro.useValue);else if(isFactoryProvider(ro)){const{useFactory:no}=ro;this.bindFactory(to,{value:no,inject:[ContainerToken]},{scope:ro.scope})}else if(isTokenProvider(ro))this.bindFactory(to,{value:no=>no,inject:[ro.useToken]});else if(isClassProvider(ro)){const no=ro.scope??getClassScope(ro.useClass);this.bindClass(to,ro.useClass,{scope:no})}}_resolve(to,ro,no){if(!this.getInjectable(to)&&isConstructor(to)){const oo=getClassScope(to);this.bindClass(to,to,{scope:oo})}return super._resolve(to,ro,no)}}const getGlobalContainer=()=>{const eo=new DependencyContainer;return eo.name="global",eo},container=getGlobalContainer();function createInjectionToken(eo,to){return container.bindValue(eo,to),eo}const ContainerToken=createInjectionToken("DependencyContainer",container),ServicesContext=reactExports.createContext(container),createRegistry=({provide:eo,name:to})=>({containerRef:no,onInitialize:oo,onDispose:io,children:so})=>{const ao=reactExports.useContext(ServicesContext),lo=reactExports.useMemo(()=>{const uo=ao.child();return to&&(uo.name=to),eo==null||eo.forEach(co=>{uo.register(co.token,co)}),uo.bindValue(ContainerToken,uo),oo==null||oo(uo),uo},[oo,ao]);return reactExports.useImperativeHandle(no,()=>lo,[lo]),reactExports.useEffect(()=>()=>{io==null||io(lo),lo.unbindAll(!0)},[lo]),jsxRuntimeExports.jsx(ServicesContext.Provider,{value:lo,children:so})};createInjectionToken("isControlFlowEnabledToken",!1);createInjectionToken("isDoWhileLoopEnabledToken",!1);createInjectionToken("isAnnotationEnabledToken",!1);createInjectionToken("isDesignerUnifiedSubmissionFlowEnabledToken",!1);createInjectionToken("isPipelineComputeDatastoreEnabledToken",!1);createInjectionToken("TransactionalAuthoringEnabled",!1);createInjectionToken("ComponentSettingsEnabled",!1);createInjectionToken("isPipelineOwnerToken",!1);createInjectionToken("isExecutionPhaseEnabledToken",!1);createInjectionToken("isPipelineStreamingEnabledToken",!1);createInjectionToken("useFocusedNodeId",()=>{});createInjectionToken("useIsInSearchResult",()=>!1);createInjectionToken("dismissCompareCheckListPanel",()=>null);const promptFlowGraphReducer=eo=>(to,ro)=>eo(to,ro),graphReducer=()=>getGraphReducer(promptFlowGraphReducer);let Computed$1=class u_ extends Observable$2{constructor(to,ro){super(no=>this.state$.subscribe(no)),this.getSnapshot=()=>this.state$.getValue(),this.state$=new BehaviorSubject(to),this.subscription=ro.subscribe(this.state$)}static fromStates(to,ro){const no=ro(to.map(io=>io.getSnapshot())),oo=combineLatest(to).pipe(map$1(ro));return new u_(no,oo)}destroy(){this.subscription.unsubscribe()}},State$1=class extends BehaviorSubject{constructor(){super(...arguments),this.getState=()=>this.getValue(),this.setState=to=>{this.next(to)},this.updateState=to=>{this.next(to(this.getValue()))},this.getSnapshot=()=>this.getValue()}next(to,ro){!ro&&this.value===to||super.next(to)}copyFrom(to){this.next(to.getSnapshot())}};const X0=class X0{constructor(){this.nodesIndex$=new State$1(List$1()),this.allNodeNames$=Computed$1.fromStates([],()=>List$1()),this.orientation$=new State$1(Orientation$1.Vertical),this.language$=new State$1(void 0)}tweakFlattenNodeOrder(to,ro){const no=this.nodesIndex$.getSnapshot(),oo=no.findIndex(so=>so===to),io=oo+ro;if(oo>=0&&io>=0&&io(this.addListener(to,ro),ro.next(this.get(to)),()=>{this.removeListener(to,ro)}))}notify(to){var ro;(ro=this.listeners.get(to))==null||ro.forEach(no=>{no.next(this.get(to))})}next(to){const ro=this.getSnapshot();super.next(to);const no=new Set;ro.forEach((oo,io)=>{to.has(io)||no.add(io)}),to.forEach((oo,io)=>{ro.has(io)&&Object.is(ro.get(io),oo)||no.add(io)}),no.forEach(oo=>{this.notify(oo)})}addListener(to,ro){let no=this.listeners.get(to);no||(no=new Set,this.listeners.set(to,no)),no.add(ro)}removeListener(to,ro){const no=this.listeners.get(to);no&&(no.delete(ro),no.size===0&&this.listeners.delete(to))}}class ObservableMap extends ObservableCollection{constructor(){super(Map$1())}set(to,ro){return this.updateState(no=>no.set(to,ro)),this}update(to,ro){return this.updateState(no=>no.update(to,ro)),this}delete(to){return this.updateState(ro=>ro.delete(to)),this}deleteAll(to){return this.updateState(ro=>ro.deleteAll(to)),this}clear(){return this.next(Map$1()),this}merge(to){return this.updateState(ro=>ro.merge(to)),this}}class ObservableOrderedMap extends ObservableCollection{constructor(){super(OrderedMap())}set(to,ro){return this.updateState(no=>no.set(to,ro)),this}update(to,ro){return this.updateState(no=>no.update(to,ro)),this}delete(to){return this.updateState(ro=>ro.delete(to)),this}deleteAll(to){return this.updateState(ro=>ro.deleteAll(to)),this}clear(){return this.next(OrderedMap()),this}merge(to){return this.updateState(ro=>ro.merge(to)),this}insertBefore(to,ro,no){return this.updateState(oo=>OrderedMap().withMutations(io=>{for(const[so,ao]of oo.entries())to===so&&io.set(ro,no),io.set(so,ao)})),this.notify(ro),this}insertAfter(to,ro,no){return this.updateState(oo=>OrderedMap().withMutations(io=>{for(const[so,ao]of oo.entries())io.set(so,ao),to===so&&io.set(ro,no)})),this.notify(ro),this}sortByValue(to){return this.updateState(ro=>ro.sort(to)),this}}var _a$6;const Z0=class Z0 extends FlowViewModelShared{constructor(){super(),this.isWorkspaceReady$=new State$1(!1),this.currentNodeId$=new State$1(void 0),this.graphConfig=GraphConfigBuilder.default().build(),this.graphReducer=graphReducer(),this.isReadonly$=new State$1(!1),this.name$=new State$1(""),this.flowType$=new State$1(FlowType.Default),this.owner$=new State$1(void 0),this.isArchived$=new State$1(!1),this.selectedStepId$=new State$1(void 0),this.tools$=new ObservableOrderedMap,this.toolsStatus$=new ObservableOrderedMap,this.batchInputs$=new State$1([]),this.bulkRunDataReference$=new State$1(void 0),this.chatMessages$=new State$1([]),this.nodeVariants$=new ObservableOrderedMap,this.tuningNodeNames$=new State$1([]),this.inputSpec$=new ObservableOrderedMap,this.selectedBulkIndex$=new State$1(void 0),this.nodeRuns$=new ObservableOrderedMap,this.flowRuns$=new State$1([]),this.rootFlowRunMap$=new ObservableMap,this.flowOutputs$=new ObservableOrderedMap,this.connections$=new ObservableOrderedMap,this.promptToolSetting$=new State$1(void 0),this.userInfo$=new State$1(void 0),this.bulkRunDescription$=new State$1(""),this.bulkRunTags$=new State$1([]),this.nodeParameterTypes$=new ObservableMap,this.theme$=new State$1(void 0),this.selectedRuntimeName$=new State$1(void 0),this.connectionList$=new State$1([]),this.connectionSpecList$=new State$1([]),this.connectionDeployments$=new ObservableOrderedMap,this.connectionDeploymentsLoading$=new ObservableOrderedMap,this.runStatus$=new State$1(void 0),this.flowRunType$=new State$1(void 0),this.packageToolsDictionary$=new ObservableMap,this.codeToolsDictionary$=new ObservableMap,this.isToolsJsonReady$=new State$1(!1),this.flowGraphLayout$=new State$1(void 0),this.flowUIHint$=new State$1(void 0),this.isInitialized$=new State$1(!1),this.flowFeatures$=new State$1(new Set),this.loaded=!1,this._allLlmParameterKeys=[],new Set(dataReadonlyMode).add(GraphFeatures.AutoFit);const ro=new Set;ro.add(FlowFeatures.OpenCodeFileInNode),this.flowFeatures$.next(ro),this.canvasState$=new State$1(createGraphState({settings:{graphConfig:this.graphConfig,canvasBoundaryPadding:{top:800,bottom:800}},data:GraphModel.empty()})),this.allNodeNames$=Computed$1.fromStates([this.nodeVariants$],([no])=>List$1(Array.from(no.keys()).filter(oo=>!!oo&&oo!==FLOW_INPUT_NODE_NAME&&oo!==FLOW_OUTPUT_NODE_NAME))),merge$2(this.flowOutputs$,this.batchInputs$,this.inputSpec$,this.selectedRuntimeName$,this.bulkRunTags$,this.nodeVariants$,this.codeToolsDictionary$,this.packageToolsDictionary$).pipe(filter(()=>this.loaded),filter(()=>this.isInitialized$.getSnapshot()),debounceTime(100)).subscribe(()=>{this.notifyFlowChange()}),merge$2(this.flowGraphLayout$,this.orientation$).pipe(debounceTime(100)).subscribe(()=>{this.notifyLayoutChange()}),merge$2(this.flowUIHint$).pipe(debounceTime(100)).subscribe(()=>{this.notifyUIHintChange()}),this.invalidStepInputs$=Computed$1.fromStates([this.nodeVariants$,this.codeToolsDictionary$,this.packageToolsDictionary$,this.connectionList$,this.inputSpec$,this.nodeParameterTypes$],([no,oo,io,so,ao,lo])=>this.validateNodeInputs(no))}attemptToRenameStep(to,ro){if(!checkNodeNameValid(ro))return`step name ${ro} is not valid`;if(this.nodeVariants$.get(ro))return`step with name ${ro} already exists`;if(!this.nodeVariants$.get(to))return`step ${to} not found`;const oo=(so,ao,lo)=>{const uo={...so};return Object.keys(uo).forEach(co=>{const fo=uo[co],ho=getRefValueFromRaw(fo),[po]=(ho==null?void 0:ho.split("."))??[];po===ao&&(uo[co]=fo.replace(`${ao}`,`${lo}`))}),uo},io=(so,ao,lo)=>{if(!so)return;const uo={};return Object.entries(so).forEach(([co,fo])=>{var ho,po,go;uo[co]={...fo,node:{...fo.node,name:((ho=fo.node)==null?void 0:ho.name)===ao?lo:(po=fo.node)==null?void 0:po.name,inputs:oo(((go=fo.node)==null?void 0:go.inputs)??{},ao,lo)}}}),uo};reactDomExports.unstable_batchedUpdates(()=>{this.nodeVariants$.updateState(so=>so.mapEntries(([ao,lo])=>{const uo={...lo,variants:io(lo.variants,to,ro)};return[ao===to?ro:ao,uo]})),this.flowGraphLayout$.updateState(so=>({...so,nodeLayouts:renameKeyInObject((so==null?void 0:so.nodeLayouts)??{},to,ro)})),this.flowUIHint$.updateState(so=>({...so,nodes:renameKeyInObject((so==null?void 0:so.nodes)??{},to,ro)})),this.currentNodeId$.getSnapshot()===to&&this.currentNodeId$.next(ro),this.selectedStepId$.getSnapshot()===to&&this.selectedStepId$.next(ro),this.nodeRuns$.getSnapshot().forEach((so,ao)=>{if(so.node===to){const[,lo,uo,co]=ao.split("#"),fo=parseInt(lo,10);this.nodeRuns$.set(this.getNodeRunKey(ro,isNaN(fo)?0:fo,uo,co),{...so,node:ro}),this.nodeRuns$.delete(ao)}})})}acceptFlowEdit(to,ro){to!==this.viewType&&this.loadFlow(ro)}loadFlow(to){this.loaded=!1;try{reactDomExports.unstable_batchedUpdates(()=>{this.baseEntity=to,this.owner$.next(to.owner),this.isArchived$.next(to.isArchived??!1),this.loadFlowDto(to),to.flowRunResult&&this.loadStatus(to.flowRunResult)}),this.loaded=!0}catch(ro){throw this.loaded=!0,ro}}loadCodeTool(to,ro){this.codeToolsDictionary$.set(to,ro)}loadPackageTool(to,ro){this.packageToolsDictionary$.set(to,ro)}toBatchRequestData(){return{flow:{flowGraph:this.toFlowGraph(),nodeVariants:this.toNodeVariants(),flowGraphLayout:this.flowGraphLayout$.getSnapshot()},flowSubmitRunSettings:{...this.toFlowRunSettings()},flowRunDisplayName:this.name$.getSnapshot()}}toAddOnEvaluationRequestData(){return{flowSubmitRunSettings:{...this.toFlowRunSettings()}}}loadStatus(to){var io;this.clearStatus();let ro=0;const no=[],oo=new Map;if((io=to.flow_runs)!=null&&io.length){for(const so of to.flow_runs)so.index===null?oo.set(so.run_id,so):(ro=so.index,no.push(so));no.sort((so,ao)=>{var lo;return so.root_run_id===ao.root_run_id?(so.index??0)-(ao.index??0):so.variant_id&&ao.variant_id?so.variant_id.localeCompare(ao.variant_id):((lo=so.root_run_id)==null?void 0:lo.localeCompare((ao==null?void 0:ao.root_run_id)??""))??0}),this.flowRuns$.next(no),this.rootFlowRunMap$.next(Map$1(oo))}to.flowRunType&&this.flowRunType$.next(to.flowRunType),to.runStatus&&this.runStatus$.next(to.runStatus),this.loadNodesStatus(to.node_runs||[]),this.selectedBulkIndex$.next(ro)}loadNodesStatus(to){const ro=this.tuningNodeNames$.getSnapshot()[0];to.forEach(no=>{const oo=no.node===ro,io=this.getDefaultVariantId(no.node),so=no.variant_id||io,ao=oo?so:io,lo=this.getNodeRunKey(no.node,no.index??0,ao,so);this.nodeRuns$.set(lo,no)})}loadSingleNodeRunStatus(to,ro,no){this.resetNodesStatus(to,ro),no.forEach(oo=>{const io=this.getDefaultVariantId(oo.node),so=oo.variant_id||io,ao=oo.variant_id||io,lo=this.getNodeRunKey(oo.node,oo.index??0,ao,so);this.nodeRuns$.set(lo,oo)})}resetNodesStatus(to,ro){this.nodeRuns$.updateState(no=>no.filter(oo=>{if(oo.node!==to)return!0;const io=this.getDefaultVariantId(oo.node);return(oo.variant_id||io)!==ro}))}clearStatus(){this.selectedBulkIndex$.next(void 0),this.nodeRuns$.clear(),this.flowRuns$.next([]),this.rootFlowRunMap$.clear()}getDefaultVariantId(to){var ro;return((ro=this.nodeVariants$.get(to))==null?void 0:ro.defaultVariantId)||BASELINE_VARIANT_ID}setStepInput(to,ro,no,oo){const io=this.getNode(to,oo);if(!(io!=null&&io.name))return;const so={...io,inputs:{...io.inputs,[ro]:no}};this.setNode(to,oo,so)}removeStepInputs(to,ro,no){const oo=this.getNode(to,no);if(!(oo!=null&&oo.name))return;const io={...oo.inputs};ro.forEach(ao=>{delete io[ao]});const so={...oo,inputs:io};this.setNode(to,no,so)}renameStepInput(to,ro,no){const oo=this.getNode(to,BASELINE_VARIANT_ID);if(!(oo!=null&&oo.name))return;const io={...oo,inputs:renameKeyInObject(oo.inputs??{},ro,no)};this.setNode(to,BASELINE_VARIANT_ID,io)}setStepActivate(to,ro,no){const oo=this.getNode(to,ro);if(!(oo!=null&&oo.name))return;const io={...oo,activate:no};this.setNode(to,ro,io)}setStepKeyValue(to,ro,no,oo){const io=this.getNode(to,oo);if(!(io!=null&&io.name))return;const so={...io,[ro]:no};this.setNode(to,oo,so)}setStepSourcePath(to,ro,no){const oo=this.getNode(to,no);if(!(oo!=null&&oo.name))return;const io={...oo,source:{...oo.source,path:ro}};this.setNode(to,no,io)}setBatchInput(to,ro,no){const oo=this.batchInputs$.getSnapshot();if(!oo[to])return;const io=[...oo];io[to]={...io[to],[ro]:no},this.batchInputs$.setState(io)}setBulkRunTag(to,ro,no){const oo=[...this.bulkRunTags$.getSnapshot()];if(!oo[to])return;const io={};io[ro]=no,oo[to]=io,this.bulkRunTags$.next(oo)}deleteBulkRunTag(to){const ro=[...this.bulkRunTags$.getSnapshot()];ro.splice(to,1),this.bulkRunTags$.next(ro)}addBulkRunTagRow(){const to=this.bulkRunTags$.getSnapshot(),ro={"":""};this.bulkRunTags$.next([...to,ro])}getNodeRunKey(to,ro,no=BASELINE_VARIANT_ID,oo=BASELINE_VARIANT_ID){return`${to}#${ro}#${no}#${oo}`}dispatch(to){var io;let ro="";switch(to.type){case GraphCanvasEvent.Click:this.currentNodeId$.next(void 0);break;case GraphNodeEvent.Click:this.currentNodeId$.next(to.node.id,!0);break;case GraphNodeEvent.DragEnd:{ro=to.node.name??"";break}}const no=this.canvasState$.getSnapshot(),oo=this.graphReducer(no,to);if(this.canvasState$.next(oo),ro){const so=oo.data.present.nodes.find(uo=>uo.name===ro),ao=this.flowGraphLayout$.getSnapshot(),lo={...ao,nodeLayouts:{...ao==null?void 0:ao.nodeLayouts,[ro]:{...(io=ao==null?void 0:ao.nodeLayouts)==null?void 0:io[ro],x:so==null?void 0:so.x,y:so==null?void 0:so.y}}};this.flowGraphLayout$.next(lo)}}setGraphConfig(to){this.graphConfig=to;const ro=this.canvasState$.getSnapshot();this.canvasState$.next({...ro,settings:{...ro.settings,graphConfig:to}})}toFlowGraph(){const to=this.nodeVariants$.getSnapshot(),ro=getDefaultNodeList(List$1.of(...to.keys()),to);return{inputs:this.inputSpec$.getSnapshot().toJSON(),outputs:this.flowOutputs$.getSnapshot().toJSON(),nodes:ro,tools:void 0}}toFlowGraphSnapshot(to){const ro=lodashExports.mapValues(this.inputSpec$.getSnapshot().toJSON(),lo=>{lo.default!==void 0&&(lo.default=convertValByType(lo.default,lo.type));const{name:uo,id:co,...fo}=lo;return fo}),no=lodashExports.mapValues(this.flowOutputs$.getSnapshot().toJSON(),lo=>{const{name:uo,id:co,...fo}=lo;return fo}),io=getNodesThatMoreThanOneVariant(to).map(lo=>lo.nodeName),so=getFlowSnapshotNodeList(List$1.of(...Object.keys(to)),to,io),ao=getVariantNodes(to);return{inputs:ro,outputs:no,nodes:so,node_variants:ao}}toNodeVariants(){const to=this.nodeVariants$.getSnapshot().toJSON(),ro={};return Object.keys(to).forEach(no=>{const oo=to[no],io={};Object.keys(oo.variants??{}).forEach(so=>{const ao=(oo.variants??{})[so];io[so]={...ao,node:ao.node?this.pruneNodeInputs(ao.node):void 0}}),ro[no]={...oo,variants:io}}),ro}toFlowRunSettings(){var to,ro;return{tuningNodeNames:this.tuningNodeNames$.getSnapshot(),variants:void 0,runtimeName:(to=this.selectedRuntimeName$)==null?void 0:to.getSnapshot(),description:this.bulkRunDescription$.getSnapshot(),tags:Object.assign({},...this.bulkRunTags$.getSnapshot()),...this.bulkRunDataReference$.getSnapshot()!==void 0?{batchDataInput:{dataUri:(ro=this.bulkRunDataReference$.getSnapshot())==null?void 0:ro.id}}:{batch_inputs:this.batchInputs$.getSnapshot()}}}toJSON(){const to=this.toNodeVariants();return{...this.baseEntity,flow:{flowGraph:this.toFlowGraphSnapshot(to)},flowName:this.name$.getSnapshot(),flowRunSettings:this.toFlowRunSettings()}}toFlowGraphLayout(){const to=this.flowGraphLayout$.getSnapshot()??{},ro=Array.from(this.nodeVariants$.getSnapshot().keys()),no={...to.nodeLayouts};return Object.keys(no).forEach(oo=>{no[oo]={...no[oo],index:ro.indexOf(oo)}}),{...to,nodeLayouts:no,orientation:this.orientation$.getSnapshot()}}toFlowUIHint(){return this.flowUIHint$.getSnapshot()??{nodes:{}}}updateToolCode(to,ro){const no=this.codeToolsDictionary$.get(to);no&&this.codeToolsDictionary$.set(to,{...no,code:ro})}updateToolStatus(to,ro){const no=this.toolsStatus$.get(to);this.toolsStatus$.set(to,{...no,...ro})}updateFlowInput(to,ro){const no=this.batchInputs$.getSnapshot(),oo=no==null?void 0:no[0];let io=ro;try{const so=JSON.parse(ro);io=JSON.stringify(so)}catch{io=ro}this.batchInputs$.next([{...oo,[to]:io},...no.slice(1)])}addNewNode(to,ro){if(!to.name)return;const no=to,oo={defaultVariantId:BASELINE_VARIANT_ID,variants:{[BASELINE_VARIANT_ID]:{node:no}}};ro?this.nodeVariants$.insertBefore(ro,to.name,oo):this.nodeVariants$.set(to.name,oo)}patchEditData(to){var ro,no,oo,io;switch(to.type){case"chatInput":{if(this.flowType$.getSnapshot()!==FlowType.Chat)return;const so=this.batchInputs$.getSnapshot(),ao=((ro=this.getChatInputDefinition())==null?void 0:ro.name)??DEFAULT_CHAT_INPUT_NAME;this.batchInputs$.next([{...so[0],[ao]:to.value}]);break}case"chatHistory":{if(this.flowType$.getSnapshot()!==FlowType.Chat)return;const so=this.batchInputs$.getSnapshot(),ao=((no=this.getChatHistoryDefinition())==null?void 0:no.name)??DEFAULT_CHAT_HISTORY_NAME,lo=((oo=this.getChatInputDefinition())==null?void 0:oo.name)??DEFAULT_CHAT_INPUT_NAME,uo=((io=this.getChatOutputDefinition())==null?void 0:io.name)??DEFAULT_CHAT_OUTPUT_NAME;this.batchInputs$.next([{...so[0],[ao]:[...so[0][ao],{inputs:{[lo]:to.value.chatInput},outputs:{[uo]:to.value.chatOutput}}].slice(-10)}]);break}case"flowGraph":{try{this.loaded=!1,reactDomExports.unstable_batchedUpdates(()=>{this.loadFlorGraph(to.value)})}finally{this.loaded=!0}break}default:{const so=to;throw new Error(`Didn't expect to get here: ${so}`)}}}getChatInputDefinition(){return this.inputSpec$.getSnapshot().find(isChatInput)}getChatHistoryDefinition(){const to=this.flowType$.getSnapshot();return this.inputSpec$.getSnapshot().find(ro=>isChatHistory(to,ro))}getChatOutputDefinition(){return this.flowOutputs$.getSnapshot().find(isChatOutput)}clearChatMessages(){this.chatMessages$.next([]),this.syncChatMessagesToInputsValues([])}getProviderByConnection(to){var so;if(!to)return;const ro=this.connectionList$.getSnapshot(),no=this.promptToolSetting$.getSnapshot(),oo=ro.find(ao=>ao.connectionName===to);if(!oo)return;const io=(so=no==null?void 0:no.providers)==null?void 0:so.find(ao=>{var lo;return oo.connectionType&&((lo=ao.connection_type)==null?void 0:lo.includes(oo.connectionType))});if(io)return io.provider}addFlowInput(to,ro){this.inputSpec$.set(to,{...ro,name:to,id:(ro==null?void 0:ro.id)??getRandomInputDefinitionId()})}addFlowOutput(to,ro){this.flowOutputs$.set(to,{...ro,name:to,id:(ro==null?void 0:ro.id)??getRandomOutputDefinitionId()})}loadFlorGraph(to){var io;const ro=(to==null?void 0:to.nodes)||[],no=(to==null?void 0:to.outputs)||{},oo=(to==null?void 0:to.inputs)||{};this.nodeVariants$.clear(),ro.forEach(so=>{so.name&&(this.nodeVariants$.get(so.name)||this.nodeVariants$.set(so.name,{defaultVariantId:BASELINE_VARIANT_ID,variants:{[BASELINE_VARIANT_ID]:{node:so}}}))}),(io=Object.entries((to==null?void 0:to.node_variants)??{}))==null||io.forEach(([so,ao])=>{const lo={...ao.variants};Object.entries(lo).forEach(([uo,co])=>{co.node&&(co.node.name=so)}),this.nodeVariants$.set(so,{defaultVariantId:ao.default_variant_id??BASELINE_VARIANT_ID,variants:lo})}),this.flowOutputs$.clear(),Object.keys(no).forEach(so=>{const ao=no[so];ao&&this.addFlowOutput(so,ao)}),this.inputSpec$.clear(),Object.keys(oo).forEach(so=>{const ao=oo[so];ao&&this.addFlowInput(so,ao)})}loadFlowDto(to){var ro,no,oo,io,so,ao,lo,uo,co,fo,ho,po,go,vo;if(this.name$.next(to.flowName??""),this.flowType$.next(to.flowType??FlowType.Default),this.loadFlorGraph((ro=to.flow)==null?void 0:ro.flowGraph),(no=to.flow)!=null&&no.nodeVariants&&((io=Object.entries(((oo=to.flow)==null?void 0:oo.nodeVariants)??{}))==null||io.forEach(([bo,xo])=>{this.nodeVariants$.set(bo,{...xo,defaultVariantId:xo.defaultVariantId??BASELINE_VARIANT_ID})})),(ao=(so=to.flow)==null?void 0:so.flowGraphLayout)!=null&&ao.nodeLayouts){const bo=(lo=to.flow)==null?void 0:lo.flowGraphLayout;this.flowGraphLayout$.next(bo),bo.orientation&&this.orientation$.next(bo.orientation)}if(this.selectedRuntimeName$.setState(((uo=to.flowRunSettings)==null?void 0:uo.runtimeName)??""),this.batchInputs$.setState(((co=to.flowRunSettings)==null?void 0:co.batch_inputs)??[{}]),this.tuningNodeNames$.setState(((fo=to.flowRunSettings)==null?void 0:fo.tuningNodeNames)??[]),this.bulkRunDescription$.next(to.description??""),this.bulkRunTags$.next([]),to.tags){const bo=[];Object.keys(to.tags).forEach(xo=>{var _o;bo.push({[xo]:((_o=to==null?void 0:to.tags)==null?void 0:_o[xo])??""})}),this.bulkRunTags$.next(bo)}this.initNodeParameterTypes((ho=to.flow)==null?void 0:ho.flowGraph),to.flowType===FlowType.Chat&&(this.initChatFlow(to),this.initChatMessages(((po=to.flowRunSettings)==null?void 0:po.batch_inputs)??[{}])),this.language$.next((vo=(go=to.flow)==null?void 0:go.flowGraph)==null?void 0:vo.language)}initNodeParameterTypes(to){if(!to)return;const ro=this.nodeVariants$.getSnapshot().toJSON();let no=Map$1(new Map);Object.keys(ro).forEach(oo=>{const io=ro[oo];Object.keys(io.variants??{}).forEach(so=>{var lo;const ao=(io.variants??{})[so];if(ao.node){const uo={inputs:{},activate:{is:void 0}},co=this.getToolOfNode(ao.node);if((ao.node.type??(co==null?void 0:co.type))===ToolType.python){const fo=Object.keys((co==null?void 0:co.inputs)??{});Object.keys(ao.node.inputs??{}).filter(go=>!fo.includes(go)).forEach(go=>{var vo,bo;uo.inputs[go]=inferTypeByVal((bo=(vo=ao.node)==null?void 0:vo.inputs)==null?void 0:bo[go])??ValueType.string})}uo.activate.is=inferTypeByVal((lo=ao.node.activate)==null?void 0:lo.is)??ValueType.string,no=no.set(`${oo}#${so}`,uo)}})}),this.nodeParameterTypes$.next(no)}initChatFlow(to){if(to.flowType!==FlowType.Chat)return;this.inputSpec$.getSnapshot().some(io=>isChatHistory(to.flowType,io))||(this.addFlowInput(DEFAULT_CHAT_HISTORY_NAME,{name:DEFAULT_CHAT_HISTORY_NAME,type:ValueType.list}),this.batchInputs$.updateState(io=>[{...io[0],[DEFAULT_CHAT_HISTORY_NAME]:[]},...io.slice(1)])),this.inputSpec$.getSnapshot().some(io=>isChatInput(io))||this.addFlowInput(DEFAULT_CHAT_INPUT_NAME,{name:DEFAULT_CHAT_INPUT_NAME,type:ValueType.string,is_chat_input:!0}),this.flowOutputs$.getSnapshot().some(io=>isChatOutput(io))||this.addFlowOutput(DEFAULT_CHAT_OUTPUT_NAME,{name:DEFAULT_CHAT_OUTPUT_NAME,type:ValueType.string,is_chat_output:!0})}initChatMessages(to){var ao,lo,uo;const ro=((ao=this.getChatHistoryDefinition())==null?void 0:ao.name)??DEFAULT_CHAT_HISTORY_NAME,no=to[0][ro];if(!Array.isArray(no))return;const oo=((lo=this.getChatInputDefinition())==null?void 0:lo.name)??DEFAULT_CHAT_INPUT_NAME,io=((uo=this.getChatOutputDefinition())==null?void 0:uo.name)??DEFAULT_CHAT_OUTPUT_NAME,so=parseChatMessages(oo,io,no);this.chatMessages$.next(so),this.syncChatMessagesToInputsValues(so)}syncChatMessagesToInputsValues(to){var no,oo,io;if(this.batchInputs$.getSnapshot().length<=1){const so=((no=this.getChatInputDefinition())==null?void 0:no.name)??DEFAULT_CHAT_INPUT_NAME,ao=((oo=this.getChatOutputDefinition())==null?void 0:oo.name)??DEFAULT_CHAT_OUTPUT_NAME,lo=((io=this.getChatHistoryDefinition())==null?void 0:io.name)??DEFAULT_CHAT_HISTORY_NAME,uo=[];for(let co=0;co[{...co[0],[lo]:uo}])}}getNode(to,ro){var no,oo,io;return(io=(oo=(no=this.nodeVariants$.get(to))==null?void 0:no.variants)==null?void 0:oo[ro])==null?void 0:io.node}setNode(to,ro,no){var io;const oo=this.nodeVariants$.get(to);this.nodeVariants$.set(to,{defaultVariantId:(oo==null?void 0:oo.defaultVariantId)??BASELINE_VARIANT_ID,variants:{...oo==null?void 0:oo.variants,[ro]:{...(io=oo==null?void 0:oo.variants)==null?void 0:io[ro],node:no}}})}getAllLlmParameterKeys(){var to;if(this._allLlmParameterKeys.length===0){const ro=this.promptToolSetting$.getSnapshot();if(!ro)return[];const no=(to=ro.providers)==null?void 0:to.flatMap(io=>{var so;return(so=io.apis)==null?void 0:so.map(ao=>ao.parameters)}),oo=new Set(no==null?void 0:no.flatMap(io=>Object.keys(io??{})));this._allLlmParameterKeys=[...oo.values()]}return this._allLlmParameterKeys}pruneNodeInputs(to){var fo,ho,po,go;const ro=to?this.getToolOfNode(to):void 0,no=this.promptToolSetting$.getSnapshot(),oo=this.connectionList$.getSnapshot(),io=this.connectionSpecList$.getSnapshot();if(!ro||!no)return to;if((to.type??ro.type)===ToolType.python&&ro.enable_kwargs){const vo={};return Object.keys(to.inputs??{}).forEach(bo=>{var xo,_o,Eo,So;if(((xo=to.inputs)==null?void 0:xo[bo])!==void 0){const To=(_o=ro.inputs)==null?void 0:_o[bo];vo[bo]=convertValByType((Eo=to.inputs)==null?void 0:Eo[bo],(So=To==null?void 0:To.type)==null?void 0:So[0])}}),{...to,inputs:vo}}const so=this.getProviderByConnection(to.connection??"");if((to.type??ro.type)===ToolType.llm&&(!so||!to.api))return to;const ao=(to.type??ro.type)===ToolType.llm,lo=ao?(go=(po=(ho=(fo=no==null?void 0:no.providers)==null?void 0:fo.find(vo=>vo.provider===so))==null?void 0:ho.apis)==null?void 0:po.find(vo=>vo.api===to.api))==null?void 0:go.parameters:void 0,uo=new Set(filterNodeInputsKeys(ro.inputs,to.inputs,oo,io).concat(ao?this.getAllLlmParameterKeys():[])),co={};return Object.keys(to.inputs??{}).forEach(vo=>{var bo,xo,_o,Eo;if(uo.has(vo)&&((bo=to.inputs)==null?void 0:bo[vo])!==void 0){const So=((xo=ro.inputs)==null?void 0:xo[vo])??(lo==null?void 0:lo[vo]);co[vo]=convertValByType((_o=to.inputs)==null?void 0:_o[vo],(Eo=So==null?void 0:So.type)==null?void 0:Eo[0])}}),{...to,inputs:co}}getToolOfNode(to){var oo,io;const ro=this.codeToolsDictionary$.get(((oo=to.source)==null?void 0:oo.path)??""),no=this.packageToolsDictionary$.get(((io=to.source)==null?void 0:io.tool)??"");return resolveTool(to,ro,no,so=>this.codeToolsDictionary$.get(so))}validateNodeInputs(to){const ro=new Map,no=this.getNodesInCycle(to),oo=this.connectionList$.getSnapshot(),io=this.connectionSpecList$.getSnapshot(),so=[];return this.inputSpec$.getSnapshot().forEach((lo,uo)=>{const co=lo.default,fo=lo.type;if(co!==void 0&&co!==""&&!isTypeValid(co,fo)){const ho={section:"inputs",parameterName:uo,type:ValidationErrorType.InputInvalidType,message:"Input type is not valid"};so.push(ho)}}),so.length>0&&ro.set(`${FLOW_INPUT_NODE_NAME}#`,so),Array.from(to.values()).forEach(lo=>{const{variants:uo={}}=lo;Object.keys(uo).forEach(co=>{var xo,_o,Eo;const fo=uo[co],{node:ho}=fo,po=ho?this.getToolOfNode(ho):void 0,go=filterNodeInputsKeys(po==null?void 0:po.inputs,ho==null?void 0:ho.inputs,oo,io);if(!ho||!ho.name)return;if(!po){const So=ho;ro.set(`${ho.name}#${co}`,[{type:ValidationErrorType.MissingTool,message:`Can't find tool ${((xo=So==null?void 0:So.source)==null?void 0:xo.tool)??((_o=So==null?void 0:So.source)==null?void 0:_o.path)}`}]);return}const vo=[],bo=this.validateNodeConfig(ho,po);if(bo&&vo.push(bo),go.forEach(So=>{const To=this.validateNodeInputRequired(po,ho,So);To&&vo.push(To)}),ho.inputs&&vo.push(...Object.keys(ho.inputs).map(So=>{if(!go.includes(So)&&!po.enable_kwargs)return;const{isReference:To,error:wo}=this.validateNodeInputReference(ho,"inputs",So,to,no);if(wo)return wo;if(!To)return this.validateNodeInputType(po,ho,co,So)}).filter(Boolean)),ho.activate){const{error:So}=this.validateNodeInputReference(ho,"activate","when",to,no);So&&vo.push(So);const To=ho.activate.is,wo=(Eo=this.nodeParameterTypes$.get(`${ho.name}#${co}`))==null?void 0:Eo.activate.is;if(!isTypeValid(To,wo)){const Co={section:"activate",parameterName:"is",type:ValidationErrorType.InputInvalidType,message:"Input type is not valid"};vo.push(Co)}}ro.set(`${ho.name}#${co}`,vo)})}),ro}getNodesInCycle(to){const ro=getDefaultNodeList(List$1.of(...to.keys()),to),no=new Map;ro.forEach(uo=>{var fo;const co=(ho,po,go)=>{const vo=getRefValueFromRaw(go),[bo]=(vo==null?void 0:vo.split("."))??[];!bo||isFlowInput(bo)||no.set(`${uo.name}.${ho}.${po}`,bo)};Object.keys((uo==null?void 0:uo.inputs)??{}).forEach(ho=>{var go;const po=(go=uo.inputs)==null?void 0:go[ho];co("inputs",ho,po)}),co("activate","when",(fo=uo.activate)==null?void 0:fo.when)});const oo=new Map,io=new Map,so=new Map,ao=new Map;return ro.forEach(uo=>{const co=uo.name;co&&(oo.set(co,0),io.set(co,0),so.set(co,[]),ao.set(co,[]))}),ro.forEach(uo=>{const co=uo.name;if(!co)return;const fo=(ho,po)=>{const go=no.get(`${co}.${ho}.${po}`);go&&(oo.set(co,(oo.get(co)??0)+1),io.set(go,(io.get(go)??0)+1),so.set(go,[...so.get(go)??[],co]),ao.set(co,[...ao.get(co)??[],go]))};Object.keys((uo==null?void 0:uo.inputs)??{}).forEach(ho=>{fo("inputs",ho)}),fo("activate","when")}),getCycle(oo,so,io,ao)}validateNodeConfig(to,ro){var oo,io,so,ao,lo,uo,co;const no=this.promptToolSetting$.getSnapshot();if((to.type??(ro==null?void 0:ro.type))===ToolType.llm){if(!to.connection)return{parameterName:"connection",type:ValidationErrorType.NodeConfigInvalid,message:"connection is required"};if(!this.connectionList$.getSnapshot().some(vo=>vo.connectionName===to.connection))return{parameterName:"connection",type:ValidationErrorType.NodeConfigInvalid,message:"connection is not valid"};if(!to.api)return{parameterName:"api",type:ValidationErrorType.NodeConfigInvalid,message:"api is required"};const fo=this.getProviderByConnection(to.connection),ho=(ao=(so=(io=(oo=no==null?void 0:no.providers)==null?void 0:oo.find(vo=>vo.provider===fo))==null?void 0:io.apis)==null?void 0:so.find(vo=>vo.api===to.api))==null?void 0:ao.parameters;if((ho==null?void 0:ho.model)&&!((lo=to.inputs)!=null&&lo.model))return{parameterName:"model",type:ValidationErrorType.NodeConfigInvalid,message:"model is required"};if((ho==null?void 0:ho.deployment_name)&&!((uo=to.inputs)!=null&&uo.deployment_name))return{parameterName:"deployment_name",type:ValidationErrorType.NodeConfigInvalid,message:"deployment_name is required"}}if(ro&&((co=ro==null?void 0:ro.connection_type)!=null&&co.length)&&!to.connection)return{parameterName:"connection",type:ValidationErrorType.NodeConfigInvalid,message:"connection is required"}}validateNodeInputRequired(to,ro,no){var io,so,ao;if(((so=(io=to.inputs)==null?void 0:io[no])==null?void 0:so.default)!==void 0)return;const oo=(ao=ro.inputs)==null?void 0:ao[no];if(oo===void 0||oo==="")return{section:"inputs",parameterName:no,type:ValidationErrorType.InputEmpty,message:"Input cannot be empty"}}validateNodeInputReference(to,ro,no,oo,io){var fo;const so=(fo=to==null?void 0:to[ro])==null?void 0:fo[no],ao=getRefValueFromRaw(so),[lo,uo]=(ao==null?void 0:ao.split("."))??[];return lo?isFlowInput(lo)?this.inputSpec$.get(uo)?{isReference:!0,error:void 0}:{isReference:!0,error:{section:ro,parameterName:no,type:ValidationErrorType.InputDependencyNotFound,message:`${ao} is not a valid flow input`}}:lo===to.name?{isReference:!0,error:{section:ro,parameterName:no,type:ValidationErrorType.InputSelfReference,message:"Input cannot reference itself"}}:oo.get(lo)?to.name&&io.has(to.name)&&io.has(lo)?{isReference:!0,error:{section:ro,parameterName:no,type:ValidationErrorType.CircularDependency,message:"Input cannot reference a node in a cycle"}}:{isReference:!0,error:void 0}:{isReference:!0,error:{section:ro,parameterName:no,type:ValidationErrorType.InputDependencyNotFound,message:`${lo} is not a valid node name`}}:{isReference:!1,error:void 0}}validateNodeInputType(to,ro,no,oo){var lo,uo,co,fo,ho;const io=(lo=ro.inputs)==null?void 0:lo[oo];if(!io)return;const so=(uo=to==null?void 0:to.inputs)==null?void 0:uo[oo],ao=((co=so==null?void 0:so.type)==null?void 0:co[0])??((ho=(fo=this.nodeParameterTypes$.get(`${ro.name}#${no}`))==null?void 0:fo.inputs)==null?void 0:ho[oo]);if(!(!io||!to||!ao)&&!isTypeValid(io,ao))return{section:"inputs",parameterName:oo,type:ValidationErrorType.InputInvalidType,message:"Input type is not valid"}}};_a$6=SINGLETON,Z0[_a$6]=!0;let BaseFlowViewModel=Z0;class DefaultFlowViewModel extends BaseFlowViewModel{constructor(){super(...arguments),this.viewType="default"}fetchConnectionList(){}fetchPromptToolSetting(){}openRunListView(){}deployFlow(){}setSelectedStepId(){}notifyFlowChange(){}notifyLayoutChange(){}notifyUIHintChange(){}}createInjectionToken("FlowViewModel",new DefaultFlowViewModel);function useInjected(...eo){const to=reactExports.useContext(ServicesContext);return reactExports.useMemo(()=>eo.map(ro=>{try{return to.resolve(ro)}catch(no){throw[ro,no]}}),[to].concat(eo))}var shim$1={exports:{}},useSyncExternalStoreShim_production_min={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var e$3=reactExports;function h$6(eo,to){return eo===to&&(eo!==0||1/eo===1/to)||eo!==eo&&to!==to}var k$5=typeof Object.is=="function"?Object.is:h$6,l$6=e$3.useState,m$7=e$3.useEffect,n$4=e$3.useLayoutEffect,p$6=e$3.useDebugValue;function q$2(eo,to){var ro=to(),no=l$6({inst:{value:ro,getSnapshot:to}}),oo=no[0].inst,io=no[1];return n$4(function(){oo.value=ro,oo.getSnapshot=to,r$4(oo)&&io({inst:oo})},[eo,ro,to]),m$7(function(){return r$4(oo)&&io({inst:oo}),eo(function(){r$4(oo)&&io({inst:oo})})},[eo]),p$6(ro),ro}function r$4(eo){var to=eo.getSnapshot;eo=eo.value;try{var ro=to();return!k$5(eo,ro)}catch{return!0}}function t$6(eo,to){return to()}var u$6=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?t$6:q$2;useSyncExternalStoreShim_production_min.useSyncExternalStore=e$3.useSyncExternalStore!==void 0?e$3.useSyncExternalStore:u$6;shim$1.exports=useSyncExternalStoreShim_production_min;var shimExports=shim$1.exports;const useSubscribe=eo=>reactExports.useCallback(to=>{const ro=eo.subscribe(to);return()=>{ro.unsubscribe()}},[eo]);function useState(eo){const to=useSubscribe(eo),{getSnapshot:ro}=eo;return shimExports.useSyncExternalStore(to,ro)}function useSetState(eo){return reactExports.useCallback(to=>{typeof to!="function"?eo.setState(to):eo.setState(to(eo.getSnapshot()))},[eo])}of(void 0);var _a$5;const J0=class J0{constructor(to,ro){this.isChatBoxBottomTipVisible$=new State$1(to.isChatBoxBottomTipVisible),this.simpleMode$=new State$1(to.simpleMode),this.freezeLayout$=new State$1(to.freezeLayout),this.viewMyOnlyFlow$=new State$1(to.viewMyOnlyFlow),this.viewOnlyMyRuns$=new State$1(to.viewOnlyMyRuns),this.viewArchived$=new State$1(to.viewArchived),this.wrapTextOn$=new State$1(to.wrapTextOn),this.diffModeOn$=new State$1(to.diffModeOn),this.isRightTopPaneCollapsed$=new State$1(to.isRightTopPaneCollapsed),this.isRightBottomPaneCollapsed$=new State$1(to.isRightBottomPaneCollapsed),this.leftPaneWidth$=new State$1(to.leftPaneWidth),this.rightTopPaneHeight$=new State$1(to.rightTopPaneHeight);const no=(oo,io)=>{io.subscribe(so=>{ro({...this.getSettingsSnapshot(),[oo]:so})})};no("isChatBoxBottomTipVisible",this.isChatBoxBottomTipVisible$),no("simpleMode",this.simpleMode$),no("freezeLayout",this.freezeLayout$),no("viewMyOnlyFlow",this.viewMyOnlyFlow$),no("viewOnlyMyRuns",this.viewOnlyMyRuns$),no("viewArchived",this.viewArchived$),no("wrapTextOn",this.wrapTextOn$),no("diffModeOn",this.diffModeOn$),no("isRightTopPaneCollapsed",this.isRightTopPaneCollapsed$),no("isRightBottomPaneCollapsed",this.isRightBottomPaneCollapsed$),no("leftPaneWidth",this.leftPaneWidth$),no("rightTopPaneHeight",this.rightTopPaneHeight$)}getSettingsSnapshot(){return{isChatBoxBottomTipVisible:this.isChatBoxBottomTipVisible$.getSnapshot(),simpleMode:this.simpleMode$.getSnapshot(),freezeLayout:this.freezeLayout$.getSnapshot(),viewMyOnlyFlow:this.viewMyOnlyFlow$.getSnapshot(),viewOnlyMyRuns:this.viewOnlyMyRuns$.getSnapshot(),viewArchived:this.viewArchived$.getSnapshot(),wrapTextOn:this.wrapTextOn$.getSnapshot(),diffModeOn:this.diffModeOn$.getSnapshot(),isRightTopPaneCollapsed:this.isRightTopPaneCollapsed$.getSnapshot(),isRightBottomPaneCollapsed:this.isRightBottomPaneCollapsed$.getSnapshot(),leftPaneWidth:this.leftPaneWidth$.getSnapshot(),rightTopPaneHeight:this.rightTopPaneHeight$.getSnapshot()}}};_a$5=SINGLETON,J0[_a$5]=!0;let BaseFlowSettingViewModel=J0;class DefaultFlowSettingViewModel extends BaseFlowSettingViewModel{constructor(){super({isChatBoxBottomTipVisible:!0,simpleMode:!0,freezeLayout:!1,viewMyOnlyFlow:!1,viewOnlyMyRuns:!1,viewArchived:!0,wrapTextOn:!1,diffModeOn:!1,isRightTopPaneCollapsed:!0,isRightBottomPaneCollapsed:!1,leftPaneWidth:"66%",rightTopPaneHeight:360},()=>{})}}createInjectionToken("FlowSettingViewModel",new DefaultFlowSettingViewModel);makeStyles({root:{display:"flex",flexWrap:"nowrap"},item:{display:"inline-flex",alignItems:"center",marginRight:"8px",lineHeight:"14px"}});mergeStyleSets({line:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}});const isInVscodeWebview=typeof acquireVsCodeApi<"u";isInVscodeWebview&&acquireVsCodeApi();var _a$4;const ev=class ev{constructor(){this.extensionConfigurations$=new State$1(void 0),this.isPackageInstalled$=new State$1(void 0),this.sdkVersion$=new State$1(void 0),this.sdkFeatureList$=new State$1([]),this.uxFeatureList$=new State$1([])}};_a$4=SINGLETON,ev[_a$4]=!0;let VSCodeExtensionViewModel=ev;createInjectionToken("VSCodeFlowViewModel",new VSCodeExtensionViewModel);React.createContext({variantName:BASELINE_VARIANT_ID,haveMultipleVariants:!1,showAllVariantsOutputs:!1,isDisableEditing:!1});function createCommonjsModule(eo,to,ro){return ro={path:to,exports:{},require:function(no,oo){return commonjsRequire(no,oo??ro.path)}},eo(ro,ro.exports),ro.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var classnames$1=createCommonjsModule(function(eo){/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(){var to={}.hasOwnProperty;function ro(){for(var no=[],oo=0;oo1&&arguments[1]!==void 0?arguments[1]:{},ro=[];return React.Children.forEach(eo,function(no){no==null&&!to.keepEmpty||(Array.isArray(no)?ro=ro.concat(toArray(no)):reactIs.isFragment(no)&&no.props?ro=ro.concat(toArray(no.props.children,to)):ro.push(no))}),ro}function _defineProperty$3(eo,to,ro){return to in eo?Object.defineProperty(eo,to,{value:ro,enumerable:!0,configurable:!0,writable:!0}):eo[to]=ro,eo}function ownKeys$2(eo,to){var ro=Object.keys(eo);if(Object.getOwnPropertySymbols){var no=Object.getOwnPropertySymbols(eo);to&&(no=no.filter(function(oo){return Object.getOwnPropertyDescriptor(eo,oo).enumerable})),ro.push.apply(ro,no)}return ro}function _objectSpread2$2(eo){for(var to=1;to0},eo.prototype.connect_=function(){!isBrowser$1||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mutationObserverSupported?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},eo.prototype.disconnect_=function(){!isBrowser$1||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},eo.prototype.onTransitionEnd_=function(to){var ro=to.propertyName,no=ro===void 0?"":ro,oo=transitionKeys.some(function(io){return!!~no.indexOf(io)});oo&&this.refresh()},eo.getInstance=function(){return this.instance_||(this.instance_=new eo),this.instance_},eo.instance_=null,eo}(),defineConfigurable=function(eo,to){for(var ro=0,no=Object.keys(to);ro"u"||!(Element instanceof Object))){if(!(to instanceof getWindowOf(to).Element))throw new TypeError('parameter 1 is not of type "Element".');var ro=this.observations_;ro.has(to)||(ro.set(to,new ResizeObservation(to)),this.controller_.addObserver(this),this.controller_.refresh())}},eo.prototype.unobserve=function(to){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(to instanceof getWindowOf(to).Element))throw new TypeError('parameter 1 is not of type "Element".');var ro=this.observations_;ro.has(to)&&(ro.delete(to),ro.size||this.controller_.removeObserver(this))}},eo.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},eo.prototype.gatherActive=function(){var to=this;this.clearActive(),this.observations_.forEach(function(ro){ro.isActive()&&to.activeObservations_.push(ro)})},eo.prototype.broadcastActive=function(){if(this.hasActive()){var to=this.callbackCtx_,ro=this.activeObservations_.map(function(no){return new ResizeObserverEntry(no.target,no.broadcastRect())});this.callback_.call(to,ro,to),this.clearActive()}},eo.prototype.clearActive=function(){this.activeObservations_.splice(0)},eo.prototype.hasActive=function(){return this.activeObservations_.length>0},eo}(),observers$1=typeof WeakMap<"u"?new WeakMap:new MapShim,ResizeObserver$1=function(){function eo(to){if(!(this instanceof eo))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var ro=ResizeObserverController.getInstance(),no=new ResizeObserverSPI(to,ro,this);observers$1.set(this,no)}return eo}();["observe","unobserve","disconnect"].forEach(function(eo){ResizeObserver$1.prototype[eo]=function(){var to;return(to=observers$1.get(this))[eo].apply(to,arguments)}});var index$1=function(){return typeof global$1.ResizeObserver<"u"?global$1.ResizeObserver:ResizeObserver$1}(),elementListeners=new Map;function onResize(eo){eo.forEach(function(to){var ro,no=to.target;(ro=elementListeners.get(no))===null||ro===void 0||ro.forEach(function(oo){return oo(no)})})}var resizeObserver=new index$1(onResize);function observe(eo,to){elementListeners.has(eo)||(elementListeners.set(eo,new Set),resizeObserver.observe(eo)),elementListeners.get(eo).add(to)}function unobserve(eo,to){elementListeners.has(eo)&&(elementListeners.get(eo).delete(to),elementListeners.get(eo).size||(resizeObserver.unobserve(eo),elementListeners.delete(eo)))}function _classCallCheck$2(eo,to){if(!(eo instanceof to))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(eo,to){for(var ro=0;ro"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _typeof$3(eo){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(to){return typeof to}:function(to){return to&&typeof Symbol=="function"&&to.constructor===Symbol&&to!==Symbol.prototype?"symbol":typeof to},_typeof$3(eo)}function _assertThisInitialized$1(eo){if(eo===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return eo}function _possibleConstructorReturn$1(eo,to){if(to&&(_typeof$3(to)==="object"||typeof to=="function"))return to;if(to!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(eo)}function _createSuper$1(eo){var to=_isNativeReflectConstruct$1();return function(){var no=_getPrototypeOf$1(eo),oo;if(to){var io=_getPrototypeOf$1(this).constructor;oo=Reflect.construct(no,arguments,io)}else oo=no.apply(this,arguments);return _possibleConstructorReturn$1(this,oo)}}var DomWrapper=function(eo){_inherits$1(ro,eo);var to=_createSuper$1(ro);function ro(){return _classCallCheck$2(this,ro),to.apply(this,arguments)}return _createClass$2(ro,[{key:"render",value:function(){return this.props.children}}]),ro}(reactExports.Component),CollectionContext=reactExports.createContext(null);function Collection(eo){var to=eo.children,ro=eo.onBatchResize,no=reactExports.useRef(0),oo=reactExports.useRef([]),io=reactExports.useContext(CollectionContext),so=reactExports.useCallback(function(ao,lo,uo){no.current+=1;var co=no.current;oo.current.push({size:ao,element:lo,data:uo}),Promise.resolve().then(function(){co===no.current&&(ro==null||ro(oo.current),oo.current=[])}),io==null||io(ao,lo,uo)},[ro,io]);return reactExports.createElement(CollectionContext.Provider,{value:so},to)}function SingleObserver(eo){var to=eo.children,ro=eo.disabled,no=reactExports.useRef(null),oo=reactExports.useRef(null),io=reactExports.useContext(CollectionContext),so=typeof to=="function",ao=so?to(no):to,lo=reactExports.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),uo=!so&&reactExports.isValidElement(ao)&&supportRef(ao),co=uo?ao.ref:null,fo=reactExports.useMemo(function(){return composeRef(co,no)},[co,no]),ho=reactExports.useRef(eo);ho.current=eo;var po=reactExports.useCallback(function(go){var vo=ho.current,bo=vo.onResize,xo=vo.data,_o=go.getBoundingClientRect(),Eo=_o.width,So=_o.height,To=go.offsetWidth,wo=go.offsetHeight,Co=Math.floor(Eo),Oo=Math.floor(So);if(lo.current.width!==Co||lo.current.height!==Oo||lo.current.offsetWidth!==To||lo.current.offsetHeight!==wo){var Ao={width:Co,height:Oo,offsetWidth:To,offsetHeight:wo};lo.current=Ao;var Ro=To===Math.round(Eo)?Eo:To,No=wo===Math.round(So)?So:wo,Mo=_objectSpread2$2(_objectSpread2$2({},Ao),{},{offsetWidth:Ro,offsetHeight:No});io==null||io(Mo,go,xo),bo&&Promise.resolve().then(function(){bo(Mo,go)})}},[]);return reactExports.useEffect(function(){var go=findDOMNode(no.current)||findDOMNode(oo.current);return go&&!ro&&observe(go,po),function(){return unobserve(go,po)}},[no.current,ro]),reactExports.createElement(DomWrapper,{ref:oo},uo?reactExports.cloneElement(ao,{ref:fo}):ao)}var INTERNAL_PREFIX_KEY="rc-observer-key";function ResizeObserver$2(eo){var to=eo.children,ro=typeof to=="function"?[to]:toArray(to);return ro.map(function(no,oo){var io=(no==null?void 0:no.key)||"".concat(INTERNAL_PREFIX_KEY,"-").concat(oo);return reactExports.createElement(SingleObserver,_extends$1$1({},eo,{key:io}),no)})}ResizeObserver$2.Collection=Collection;function ownKeys$1$1(eo,to){var ro=Object.keys(eo);if(Object.getOwnPropertySymbols){var no=Object.getOwnPropertySymbols(eo);to&&(no=no.filter(function(oo){return Object.getOwnPropertyDescriptor(eo,oo).enumerable})),ro.push.apply(ro,no)}return ro}function _objectSpread$1(eo){for(var to=1;to1&&arguments[1]!==void 0?arguments[1]:1;rafUUID+=1;var ro=rafUUID;function no(oo){if(oo===0)cleanup(ro),eo();else{var io=raf(function(){no(oo-1)});rafIds.set(ro,io)}}return no(to),ro}wrapperRaf.cancel=function(eo){var to=rafIds.get(eo);return cleanup(to),caf(to)};function _typeof$2(eo){"@babel/helpers - typeof";return _typeof$2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(to){return typeof to}:function(to){return to&&typeof Symbol=="function"&&to.constructor===Symbol&&to!==Symbol.prototype?"symbol":typeof to},_typeof$2(eo)}function _defineProperty$1$1(eo,to,ro){return to in eo?Object.defineProperty(eo,to,{value:ro,enumerable:!0,configurable:!0,writable:!0}):eo[to]=ro,eo}function _classCallCheck$1(eo,to){if(!(eo instanceof to))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(eo,to){for(var ro=0;ro"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(eo){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(ro){return ro.__proto__||Object.getPrototypeOf(ro)},_getPrototypeOf(eo)}var MIN_SIZE=20;function getPageY(eo){return"touches"in eo?eo.touches[0].pageY:eo.pageY}var ScrollBar=function(eo){_inherits(ro,eo);var to=_createSuper(ro);function ro(){var no;_classCallCheck$1(this,ro);for(var oo=arguments.length,io=new Array(oo),so=0;solo},no}return _createClass$1(ro,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(oo){oo.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var oo=this.state,io=oo.dragging,so=oo.visible,ao=this.props.prefixCls,lo=this.getSpinHeight(),uo=this.getTop(),co=this.showScroll(),fo=co&&so;return reactExports.createElement("div",{ref:this.scrollbarRef,className:classnames$1("".concat(ao,"-scrollbar"),_defineProperty$1$1({},"".concat(ao,"-scrollbar-show"),co)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:fo?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden},reactExports.createElement("div",{ref:this.thumbRef,className:classnames$1("".concat(ao,"-scrollbar-thumb"),_defineProperty$1$1({},"".concat(ao,"-scrollbar-thumb-moving"),io)),style:{width:"100%",height:lo,top:uo,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown}))}}]),ro}(reactExports.Component);function Item(eo){var to=eo.children,ro=eo.setRef,no=reactExports.useCallback(function(oo){ro(oo)},[]);return reactExports.cloneElement(to,{ref:no})}function useChildren(eo,to,ro,no,oo,io){var so=io.getKey;return eo.slice(to,ro+1).map(function(ao,lo){var uo=to+lo,co=oo(ao,uo,{}),fo=so(ao);return reactExports.createElement(Item,{key:fo,setRef:function(po){return no(ao,po)}},co)})}function _classCallCheck(eo,to){if(!(eo instanceof to))throw new TypeError("Cannot call a class as a function")}function _defineProperties(eo,to){for(var ro=0;roeo.length)&&(to=eo.length);for(var ro=0,no=new Array(to);roFo&&(So="bottom")}}Do!==null&&Do!==eo.current.scrollTop&&so(Do)}lo.current=wrapperRaf(function(){Eo&&io(),vo(bo-1,So)})}};go(3)}}}function findListDiffIndex(eo,to,ro){var no=eo.length,oo=to.length,io,so;if(no===0&&oo===0)return null;noeo.length)&&(to=eo.length);for(var ro=0,no=new Array(to);ro"u"?"undefined":_typeof(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),useOriginScroll=function(eo,to){var ro=reactExports.useRef(!1),no=reactExports.useRef(null);function oo(){clearTimeout(no.current),ro.current=!0,no.current=setTimeout(function(){ro.current=!1},50)}var io=reactExports.useRef({top:eo,bottom:to});return io.current.top=eo,io.current.bottom=to,function(so){var ao=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,lo=so<0&&io.current.top||so>0&&io.current.bottom;return ao&&lo?(clearTimeout(no.current),ro.current=!1):(!lo||ro.current)&&oo(),!ro.current&&lo}};function useFrameWheel(eo,to,ro,no){var oo=reactExports.useRef(0),io=reactExports.useRef(null),so=reactExports.useRef(null),ao=reactExports.useRef(!1),lo=useOriginScroll(to,ro);function uo(fo){if(eo){wrapperRaf.cancel(io.current);var ho=fo.deltaY;oo.current+=ho,so.current=ho,!lo(ho)&&(isFF||fo.preventDefault(),io.current=wrapperRaf(function(){var po=ao.current?10:1;no(oo.current*po),oo.current=0}))}}function co(fo){eo&&(ao.current=fo.detail===so.current)}return[uo,co]}function canUseDom(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var useLayoutEffect$1=canUseDom()?reactExports.useLayoutEffect:reactExports.useEffect,SMOOTH_PTG=14/15;function useMobileTouchMove(eo,to,ro){var no=reactExports.useRef(!1),oo=reactExports.useRef(0),io=reactExports.useRef(null),so=reactExports.useRef(null),ao,lo=function(ho){if(no.current){var po=Math.ceil(ho.touches[0].pageY),go=oo.current-po;oo.current=po,ro(go)&&ho.preventDefault(),clearInterval(so.current),so.current=setInterval(function(){go*=SMOOTH_PTG,(!ro(go,!0)||Math.abs(go)<=.1)&&clearInterval(so.current)},16)}},uo=function(){no.current=!1,ao()},co=function(ho){ao(),ho.touches.length===1&&!no.current&&(no.current=!0,oo.current=Math.ceil(ho.touches[0].pageY),io.current=ho.target,io.current.addEventListener("touchmove",lo),io.current.addEventListener("touchend",uo))};ao=function(){io.current&&(io.current.removeEventListener("touchmove",lo),io.current.removeEventListener("touchend",uo))},useLayoutEffect$1(function(){return eo&&to.current.addEventListener("touchstart",co),function(){var fo;(fo=to.current)===null||fo===void 0||fo.removeEventListener("touchstart",co),ao(),clearInterval(so.current)}},[eo])}var _excluded$1=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange"];function _extends$a(){return _extends$a=Object.assign||function(eo){for(var to=1;toeo.length)&&(to=eo.length);for(var ro=0,no=new Array(to);ro=0)&&Object.prototype.propertyIsEnumerable.call(eo,no)&&(ro[no]=eo[no])}return ro}function _objectWithoutPropertiesLoose$2(eo,to){if(eo==null)return{};var ro={},no=Object.keys(eo),oo,io;for(io=0;io=0)&&(ro[oo]=eo[oo]);return ro}var EMPTY_DATA=[],ScrollStyle={overflowY:"auto",overflowAnchor:"none"};function RawList(eo,to){var ro=eo.prefixCls,no=ro===void 0?"rc-virtual-list":ro,oo=eo.className,io=eo.height,so=eo.itemHeight,ao=eo.fullHeight,lo=ao===void 0?!0:ao,uo=eo.style,co=eo.data,fo=eo.children,ho=eo.itemKey,po=eo.virtual,go=eo.component,vo=go===void 0?"div":go,bo=eo.onScroll,xo=eo.onVisibleChange,_o=_objectWithoutProperties$1(eo,_excluded$1),Eo=!!(po!==!1&&io&&so),So=Eo&&co&&so*co.length>io,To=reactExports.useState(0),wo=_slicedToArray$3(To,2),Co=wo[0],Oo=wo[1],Ao=reactExports.useState(!1),Ro=_slicedToArray$3(Ao,2),No=Ro[0],Mo=Ro[1],Do=classnames$1(no,oo),jo=co||EMPTY_DATA,Fo=reactExports.useRef(),$o=reactExports.useRef(),Lo=reactExports.useRef(),Ho=reactExports.useCallback(function(Hs){return typeof ho=="function"?ho(Hs):Hs==null?void 0:Hs[ho]},[ho]),qo={getKey:Ho};function Uo(Hs){Oo(function(Zs){var xl;typeof Hs=="function"?xl=Hs(Zs):xl=Hs;var Sl=Kl(xl);return Fo.current.scrollTop=Sl,Sl})}var Yo=reactExports.useRef({start:0,end:jo.length}),Zo=reactExports.useRef(),_s=useDiffItem(jo,Ho),Ss=_slicedToArray$3(_s,1),As=Ss[0];Zo.current=As;var Ns=useHeights(Ho,null,null),ws=_slicedToArray$3(Ns,4),Ds=ws[0],Jo=ws[1],Cs=ws[2],Bs=ws[3],zs=reactExports.useMemo(function(){if(!Eo)return{scrollHeight:void 0,start:0,end:jo.length-1,offset:void 0};if(!So){var Hs;return{scrollHeight:((Hs=$o.current)===null||Hs===void 0?void 0:Hs.offsetHeight)||0,start:0,end:jo.length-1,offset:void 0}}for(var Zs=0,xl,Sl,$l,ru=jo.length,au=0;au=Co&&xl===void 0&&(xl=au,Sl=Zs),Zl>Co+io&&$l===void 0&&($l=au),Zs=Zl}return xl===void 0&&(xl=0,Sl=0),$l===void 0&&($l=jo.length-1),$l=Math.min($l+1,jo.length),{scrollHeight:Zs,start:xl,end:$l,offset:Sl}},[So,Eo,Co,jo,Bs,io]),Ls=zs.scrollHeight,ga=zs.start,Js=zs.end,Xs=zs.offset;Yo.current.start=ga,Yo.current.end=Js;var $a=Ls-io,Ll=reactExports.useRef($a);Ll.current=$a;function Kl(Hs){var Zs=Hs;return Number.isNaN(Ll.current)||(Zs=Math.min(Zs,Ll.current)),Zs=Math.max(Zs,0),Zs}var Xl=Co<=0,Nl=Co>=$a,xa=useOriginScroll(Xl,Nl);function El(Hs){var Zs=Hs;Uo(Zs)}function cu(Hs){var Zs=Hs.currentTarget.scrollTop;Zs!==Co&&Uo(Zs),bo==null||bo(Hs)}var ks=useFrameWheel(Eo,Xl,Nl,function(Hs){Uo(function(Zs){var xl=Zs+Hs;return xl})}),Es=_slicedToArray$3(ks,2),bs=Es[0],Os=Es[1];useMobileTouchMove(Eo,Fo,function(Hs,Zs){return xa(Hs,Zs)?!1:(bs({preventDefault:function(){},deltaY:Hs}),!0)}),useLayoutEffect$1(function(){function Hs(Zs){Eo&&Zs.preventDefault()}return Fo.current.addEventListener("wheel",bs),Fo.current.addEventListener("DOMMouseScroll",Os),Fo.current.addEventListener("MozMousePixelScroll",Hs),function(){Fo.current&&(Fo.current.removeEventListener("wheel",bs),Fo.current.removeEventListener("DOMMouseScroll",Os),Fo.current.removeEventListener("MozMousePixelScroll",Hs))}},[Eo]);var Vs=useScrollTo(Fo,jo,Cs,so,Ho,Jo,Uo,function(){var Hs;(Hs=Lo.current)===null||Hs===void 0||Hs.delayHidden()});reactExports.useImperativeHandle(to,function(){return{scrollTo:Vs}}),useLayoutEffect$1(function(){if(xo){var Hs=jo.slice(ga,Js+1);xo(Hs,jo)}},[ga,Js,jo]);var Ks=useChildren(jo,ga,Js,Ds,fo,qo),Ms=null;return io&&(Ms=_objectSpread(_defineProperty$4({},lo?"height":"maxHeight",io),ScrollStyle),Eo&&(Ms.overflowY="hidden",No&&(Ms.pointerEvents="none"))),reactExports.createElement("div",_extends$a({style:_objectSpread(_objectSpread({},uo),{},{position:"relative"}),className:Do},_o),reactExports.createElement(vo,{className:"".concat(no,"-holder"),style:Ms,ref:Fo,onScroll:cu},reactExports.createElement(Filler,{prefixCls:no,height:Ls,offset:Xs,onInnerResize:Jo,ref:$o},Ks)),Eo&&reactExports.createElement(ScrollBar,{ref:Lo,prefixCls:no,scrollTop:Co,height:io,scrollHeight:Ls,count:jo.length,onScroll:El,onStartMove:function(){Mo(!0)},onStopMove:function(){Mo(!1)}}))}var List=reactExports.forwardRef(RawList);List.displayName="List";var arrDel=function(eo,to){var ro=eo.slice(),no=ro.indexOf(to);return no>=0&&ro.splice(no,1),ro},arrAdd=function(eo,to){var ro=eo.slice();return ro.indexOf(to)===-1&&ro.push(to),ro},ROOT_NODE_ID="$root",Node$1=function(){function eo(to){var ro=this,no,oo,io,so=to.node,ao=to.flattenNodes,lo=to.parent,uo=to.selectedKeySet,co=uo===void 0?new Set:uo,fo=to.expandedKeySet,ho=fo===void 0?new Set:fo,po=to.loadInfo,go=po===void 0?{loadingKeys:[],loadedKeys:[]}:po;this.internal=so,this.parent=lo,this.level=((oo=(no=this.parent)===null||no===void 0?void 0:no.level)!==null&&oo!==void 0?oo:-1)+1,this.selected=co.has(so.id),this.expanded=ho.has(so.id)||so.id===ROOT_NODE_ID,this.ancestorExpanded=!!(lo!=null&&lo.expanded&&(lo!=null&&lo.ancestorExpanded))||so.id===ROOT_NODE_ID,this.loading=go.loadingKeys.includes(so.id),this.loaded=go.loadedKeys.includes(so.id),this.isLeaf=(io=so.isLeaf)!==null&&io!==void 0?io:!(so.children.length>0),eo.nodesMap.set(so.id,this),this.level>0&&this.ancestorExpanded&&ao.push(this),this.childNodes=so.children.map(function(vo){return new eo({node:vo,parent:ro,selectedKeySet:co,expandedKeySet:ho,loadInfo:go,flattenNodes:ao})})}return Object.defineProperty(eo.prototype,"id",{get:function(){return this.internal.id},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"title",{get:function(){return this.internal.title},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"searchKeys",{get:function(){return this.internal.searchKeys},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"isTag",{get:function(){return this.internal.isTag},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"ariaLabel",{get:function(){return this.internal.ariaLabel},enumerable:!1,configurable:!0}),Object.defineProperty(eo.prototype,"extra",{get:function(){return this.internal.extra},enumerable:!1,configurable:!0}),eo.init=function(to,ro,no,oo){ro===void 0&&(ro=[]),no===void 0&&(no=[]),eo.nodesMap=new Map;var io=[];return eo.root=new eo({node:{title:"",children:to,searchKeys:[],id:ROOT_NODE_ID},selectedKeySet:new Set(ro),expandedKeySet:new Set(no),loadInfo:oo,flattenNodes:io}),io},eo.nodesMap=new Map,eo}();/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var __assign$2=function(){return __assign$2=Object.assign||function(to){for(var ro,no=1,oo=arguments.length;no"u"?InjectionMode.none:InjectionMode.insertNode,defaultPrefix:"css",namespace:void 0,cspSettings:void 0},to),this._classNameToArgs=(no=ro==null?void 0:ro.classNameToArgs)!==null&&no!==void 0?no:this._classNameToArgs,this._counter=(oo=ro==null?void 0:ro.counter)!==null&&oo!==void 0?oo:this._counter,this._keyToClassName=(so=(io=this._config.classNameCache)!==null&&io!==void 0?io:ro==null?void 0:ro.keyToClassName)!==null&&so!==void 0?so:this._keyToClassName,this._preservedRules=(ao=ro==null?void 0:ro.preservedRules)!==null&&ao!==void 0?ao:this._preservedRules,this._rules=(lo=ro==null?void 0:ro.rules)!==null&&lo!==void 0?lo:this._rules}return eo.getInstance=function(){if(_stylesheet=_global[STYLESHEET_SETTING],!_stylesheet||_stylesheet._lastStyleElement&&_stylesheet._lastStyleElement.ownerDocument!==document){var to=(_global==null?void 0:_global.FabricConfig)||{},ro=new eo(to.mergeStyles,to.serializedStylesheet);_stylesheet=ro,_global[STYLESHEET_SETTING]=ro}return _stylesheet},eo.prototype.serialize=function(){return JSON.stringify({classNameToArgs:this._classNameToArgs,counter:this._counter,keyToClassName:this._keyToClassName,preservedRules:this._preservedRules,rules:this._rules})},eo.prototype.setConfig=function(to){this._config=__assign$2(__assign$2({},this._config),to)},eo.prototype.onReset=function(to){var ro=this;return this._onResetCallbacks.push(to),function(){ro._onResetCallbacks=ro._onResetCallbacks.filter(function(no){return no!==to})}},eo.prototype.onInsertRule=function(to){var ro=this;return this._onInsertRuleCallbacks.push(to),function(){ro._onInsertRuleCallbacks=ro._onInsertRuleCallbacks.filter(function(no){return no!==to})}},eo.prototype.getClassName=function(to){var ro=this._config.namespace,no=to||this._config.defaultPrefix;return(ro?ro+"-":"")+no+"-"+this._counter++},eo.prototype.cacheClassName=function(to,ro,no,oo){this._keyToClassName[ro]=to,this._classNameToArgs[to]={args:no,rules:oo}},eo.prototype.classNameFromKey=function(to){return this._keyToClassName[to]},eo.prototype.getClassNameCache=function(){return this._keyToClassName},eo.prototype.argsFromClassName=function(to){var ro=this._classNameToArgs[to];return ro&&ro.args},eo.prototype.insertedRulesFromClassName=function(to){var ro=this._classNameToArgs[to];return ro&&ro.rules},eo.prototype.insertRule=function(to,ro){var no=this._config.injectionMode,oo=no!==InjectionMode.none?this._getStyleElement():void 0;if(ro&&this._preservedRules.push(to),oo)switch(no){case InjectionMode.insertNode:var io=oo.sheet;try{io.insertRule(to,io.cssRules.length)}catch{}break;case InjectionMode.appendChild:oo.appendChild(document.createTextNode(to));break}else this._rules.push(to);this._config.onInsertRule&&this._config.onInsertRule(to),this._onInsertRuleCallbacks.forEach(function(so){return so()})},eo.prototype.getRules=function(to){return(to?this._preservedRules.join(""):"")+this._rules.join("")},eo.prototype.reset=function(){this._rules=[],this._counter=0,this._classNameToArgs={},this._keyToClassName={},this._onResetCallbacks.forEach(function(to){return to()})},eo.prototype.resetKeys=function(){this._keyToClassName={}},eo.prototype._getStyleElement=function(){var to=this;return!this._styleElement&&typeof document<"u"&&(this._styleElement=this._createStyleElement(),REUSE_STYLE_NODE||window.requestAnimationFrame(function(){to._styleElement=void 0})),this._styleElement},eo.prototype._createStyleElement=function(){var to=document.head,ro=document.createElement("style"),no=null;ro.setAttribute("data-merge-styles","true");var oo=this._config.cspSettings;if(oo&&oo.nonce&&ro.setAttribute("nonce",oo.nonce),this._lastStyleElement)no=this._lastStyleElement.nextElementSibling;else{var io=this._findPlaceholderStyleTag();io?no=io.nextElementSibling:no=to.childNodes[0]}return to.insertBefore(ro,to.contains(no)?no:null),this._lastStyleElement=ro,ro},eo.prototype._findPlaceholderStyleTag=function(){var to=document.head;return to?to.querySelector("style[data-merge-styles]"):null},eo}();function extractStyleParts(){for(var eo=[],to=0;to=0)io(uo.split(" "));else{var co=oo.argsFromClassName(uo);co?io(co):ro.indexOf(uo)===-1&&ro.push(uo)}else Array.isArray(uo)?io(uo):typeof uo=="object"&&no.push(uo)}}return io(eo),{classes:ro,objects:no}}function getRTL(){return _rtl===void 0&&(_rtl=typeof document<"u"&&!!document.documentElement&&document.documentElement.getAttribute("dir")==="rtl"),_rtl}var _rtl;_rtl=getRTL();function getStyleOptions(){return{rtl:getRTL()}}var rules={};function kebabRules(eo,to){var ro=eo[to];ro.charAt(0)!=="-"&&(eo[to]=rules[ro]=rules[ro]||ro.replace(/([A-Z])/g,"-$1").toLowerCase())}var _vendorSettings;function getVendorSettings(){var eo;if(!_vendorSettings){var to=typeof document<"u"?document:void 0,ro=typeof navigator<"u"?navigator:void 0,no=(eo=ro==null?void 0:ro.userAgent)===null||eo===void 0?void 0:eo.toLowerCase();to?_vendorSettings={isWebkit:!!(to&&"WebkitAppearance"in to.documentElement.style),isMoz:!!(no&&no.indexOf("firefox")>-1),isOpera:!!(no&&no.indexOf("opera")>-1),isMs:!!(ro&&(/rv:11.0/i.test(ro.userAgent)||/Edge\/\d./i.test(navigator.userAgent)))}:_vendorSettings={isWebkit:!0,isMoz:!0,isOpera:!0,isMs:!0}}return _vendorSettings}var autoPrefixNames={"user-select":1};function prefixRules(eo,to){var ro=getVendorSettings(),no=eo[to];if(autoPrefixNames[no]){var oo=eo[to+1];autoPrefixNames[no]&&(ro.isWebkit&&eo.push("-webkit-"+no,oo),ro.isMoz&&eo.push("-moz-"+no,oo),ro.isMs&&eo.push("-ms-"+no,oo),ro.isOpera&&eo.push("-o-"+no,oo))}}var NON_PIXEL_NUMBER_PROPS=["column-count","font-weight","flex","flex-grow","flex-shrink","fill-opacity","opacity","order","z-index","zoom"];function provideUnits(eo,to){var ro=eo[to],no=eo[to+1];if(typeof no=="number"){var oo=NON_PIXEL_NUMBER_PROPS.indexOf(ro)>-1,io=ro.indexOf("--")>-1,so=oo||io?"":"px";eo[to+1]=""+no+so}}var _a$3,LEFT="left",RIGHT="right",NO_FLIP="@noflip",NAME_REPLACEMENTS=(_a$3={},_a$3[LEFT]=RIGHT,_a$3[RIGHT]=LEFT,_a$3),VALUE_REPLACEMENTS={"w-resize":"e-resize","sw-resize":"se-resize","nw-resize":"ne-resize"};function rtlifyRules(eo,to,ro){if(eo.rtl){var no=to[ro];if(!no)return;var oo=to[ro+1];if(typeof oo=="string"&&oo.indexOf(NO_FLIP)>=0)to[ro+1]=oo.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g,"");else if(no.indexOf(LEFT)>=0)to[ro]=no.replace(LEFT,RIGHT);else if(no.indexOf(RIGHT)>=0)to[ro]=no.replace(RIGHT,LEFT);else if(String(oo).indexOf(LEFT)>=0)to[ro+1]=oo.replace(LEFT,RIGHT);else if(String(oo).indexOf(RIGHT)>=0)to[ro+1]=oo.replace(RIGHT,LEFT);else if(NAME_REPLACEMENTS[no])to[ro]=NAME_REPLACEMENTS[no];else if(VALUE_REPLACEMENTS[oo])to[ro+1]=VALUE_REPLACEMENTS[oo];else switch(no){case"margin":case"padding":to[ro+1]=flipQuad(oo);break;case"box-shadow":to[ro+1]=negateNum(oo,0);break}}}function negateNum(eo,to){var ro=eo.split(" "),no=parseInt(ro[to],10);return ro[0]=ro[0].replace(String(no),String(no*-1)),ro.join(" ")}function flipQuad(eo){if(typeof eo=="string"){var to=eo.split(" ");if(to.length===4)return to[0]+" "+to[3]+" "+to[2]+" "+to[1]}return eo}function tokenizeWithParentheses(eo){for(var to=[],ro=0,no=0,oo=0;ooro&&to.push(eo.substring(ro,oo)),ro=oo+1);break}return ro-1&&to.push([no.index,no.index+no[0].length,no[1].split(",").map(function(oo){return":global("+oo.trim()+")"}).join(", ")]);return to.reverse().reduce(function(oo,io){var so=io[0],ao=io[1],lo=io[2],uo=oo.slice(0,so),co=oo.slice(ao);return uo+lo+co},eo)}function expandSelector(eo,to){return eo.indexOf(":global(")>=0?eo.replace(globalSelectorRegExp,"$1"):eo.indexOf(":")===0?to+eo:eo.indexOf("&")<0?to+" "+eo:eo}function extractSelector(eo,to,ro,no){to===void 0&&(to={__order:[]}),ro.indexOf("@")===0?(ro=ro+"{"+eo,extractRules([no],to,ro)):ro.indexOf(",")>-1?expandCommaSeparatedGlobals(ro).split(",").map(function(oo){return oo.trim()}).forEach(function(oo){return extractRules([no],to,expandSelector(oo,eo))}):extractRules([no],to,expandSelector(ro,eo))}function extractRules(eo,to,ro){to===void 0&&(to={__order:[]}),ro===void 0&&(ro="&");var no=Stylesheet.getInstance(),oo=to[ro];oo||(oo={},to[ro]=oo,to.__order.push(ro));for(var io=0,so=eo;io"u")){var no=document.head||document.getElementsByTagName("head")[0],oo=document.createElement("style");oo.type="text/css",ro==="top"&&no.firstChild?no.insertBefore(oo,no.firstChild):no.appendChild(oo),oo.styleSheet?oo.styleSheet.cssText=eo:oo.appendChild(document.createTextNode(eo))}}var css_248z=".root_ce9fd48c{margin:0;padding:0}.item_34141342{list-style:none}.content_6abc12be{display:flex;align-items:center}.content_6abc12be:hover{cursor:pointer;background-color:#f3f2f1}.icon_aaa0d589{border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #8a8886;margin:0 11px 0 3px}.expanded_6233c4e1{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #8a8886;margin:3px 8px 0 0}.leaf_f2922997{border:6px solid transparent;margin:0 8px 0 0}.group_7e2ac704,.inner_683a43d6{padding:0;margin:0}",classes$3={root:"root_ce9fd48c",item:"item_34141342",content:"content_6abc12be",icon:"icon_aaa0d589",expanded:"expanded_6233c4e1",leaf:"leaf_f2922997",group:"group_7e2ac704",inner:"inner_683a43d6"};styleInject(css_248z);var mergeTreeClasses=function(eo){return{root:mergeStyles(classes$3.root,eo==null?void 0:eo.root)}},mergeTreeNodeClasses=function(eo,to){var ro,no,oo;return{item:mergeStyles(classes$3.item,to==null?void 0:to.item),icon:mergeStyles(classes$3.icon,eo.expanded&&classes$3.expanded,eo.isLeaf&&classes$3.leaf),group:mergeStyles(classes$3.group,to==null?void 0:to.group),inner:mergeStyles(classes$3.inner,to==null?void 0:to.inner),content:mergeStyles(classes$3.content,(ro=to==null?void 0:to.content)===null||ro===void 0?void 0:ro.base,eo.expanded&&((no=to==null?void 0:to.content)===null||no===void 0?void 0:no.expand),eo.isLeaf&&((oo=to==null?void 0:to.content)===null||oo===void 0?void 0:oo.leaf))}},TreeNode$2=reactExports.forwardRef(function(eo,to){var ro,no,oo,io,so,ao,lo,uo,co=eo.node,fo=eo.classes,ho=eo.indent,po=eo.calcIndent,go=eo.onNodeClick,vo=eo.renderIcon,bo=eo.renderContent,xo=eo.renderInnerContent,_o=!co.isLeaf&&co.expanded,Eo=mergeTreeNodeClasses(co,fo),So=po?po(co):{item:(co.level-1)*((ro=ho==null?void 0:ho.item)!==null&&ro!==void 0?ro:20)+((no=ho==null?void 0:ho.root)!==null&&no!==void 0?no:0),innerItem:co.level*((oo=ho==null?void 0:ho.item)!==null&&oo!==void 0?oo:20)+((io=ho==null?void 0:ho.root)!==null&&io!==void 0?io:0)},To=reactExports.useCallback(function(wo){wo.preventDefault(),wo.stopPropagation()},[]);return reactExports.createElement("div",{key:co.id,role:"treeitem","aria-selected":co.selected,"aria-expanded":co.expanded,tabIndex:-1,className:Eo.item,onClick:go.bind(null,co),"data-item-id":co.id,ref:to},reactExports.createElement("div",{className:Eo.content,style:{paddingLeft:(so=So.item)!==null&&so!==void 0?so:20}},(ao=vo==null?void 0:vo(co))!==null&&ao!==void 0?ao:reactExports.createElement("span",{className:Eo.icon}),(lo=bo==null?void 0:bo(co))!==null&&lo!==void 0?lo:reactExports.createElement("span",{role:"button"},co.title)),_o&&reactExports.createElement(reactExports.Fragment,null,xo&&reactExports.createElement("div",{role:"group",key:"innerContent",className:Eo.inner,style:{paddingLeft:(uo=So.innerItem)!==null&&uo!==void 0?uo:40},onClick:To},xo(co))))});TreeNode$2.displayName="TreeNode";var ReactAccessibleTree=reactExports.forwardRef(function(eo,to){var ro=eo.selectedKeys,no=ro===void 0?[]:ro,oo=eo.expandedKeys,io=oo===void 0?[]:oo,so=eo.treeData,ao=eo.classes,lo=eo.indent,uo=eo.height,co=eo.itemHeight,fo=eo.virtual,ho=eo.calcIndent,po=eo.onKeyDown,go=eo.renderIcon,vo=eo.renderContent,bo=eo.renderInnerContent,xo=eo.onSelect,_o=eo.multiple,Eo=eo.onExpand,So=eo.loadData,To=reactExports.useState({loadedKeys:[],loadingKeys:[]}),wo=To[0],Co=To[1],Oo=reactExports.useRef(null),Ao=reactExports.useRef(null),Ro=reactExports.useMemo(function(){return Node$1.init(so,no,io,wo)},[so,no,io,wo]);reactExports.useImperativeHandle(to,function(){return{scrollTo:function(Uo){var Yo;(Yo=Ao.current)===null||Yo===void 0||Yo.scrollTo(Uo)}}}),reactExports.useEffect(function(){jo(0)},[]);var No=function(Uo,Yo){var Zo=no,_s=Yo.id,Ss=!Yo.selected;Ss?_o?Zo=arrAdd(Zo,_s):Zo=[_s]:Zo=arrDel(Zo,_s),xo==null||xo(Zo,{node:Yo,selected:Ss,nativeEvent:Uo})},Mo=function(Uo,Yo){var Zo=io,_s=Yo.id,Ss=!Yo.expanded;Ss?Zo=arrAdd(Zo,_s):Zo=arrDel(Zo,_s),Eo==null||Eo(Zo,{node:Yo,expanded:Ss,nativeEvent:Uo}),Ss&&So&&Do(Yo)},Do=function(Uo){Co(function(Yo){var Zo=Yo.loadedKeys,_s=Yo.loadingKeys,Ss=Uo.id;if(!So||Zo.includes(Ss)||_s.includes(Ss))return wo;var As=So(Uo);return As.then(function(){var Ns=wo.loadedKeys,ws=wo.loadingKeys,Ds=arrAdd(Ns,Ss),Jo=arrDel(ws,Ss);Co({loadedKeys:Ds,loadingKeys:Jo})}),{loadedKeys:Zo,loadingKeys:arrAdd(_s,Ss)}})},jo=function(Uo){var Yo,Zo,_s=Array.from((Zo=(Yo=Oo.current)===null||Yo===void 0?void 0:Yo.querySelectorAll("div[role='treeitem']"))!==null&&Zo!==void 0?Zo:[]);_s.forEach(function(Ss,As){As===Uo?Ss.setAttribute("tabindex","0"):Ss.setAttribute("tabindex","-1")})},Fo=function(Uo){var Yo,Zo,_s;Uo.stopPropagation();var Ss=Uo.target;if(Ss.getAttribute("role")!=="treeitem"||Uo.ctrlKey||Uo.metaKey)return-1;var As=Array.from((Zo=(Yo=Oo.current)===null||Yo===void 0?void 0:Yo.querySelectorAll("div[role='treeitem']"))!==null&&Zo!==void 0?Zo:[]),Ns=As.indexOf(Ss),ws=Uo.keyCode>=65&&Uo.keyCode<=90;if(ws){var Ds=-1,Jo=As.findIndex(function(zs,Ls){var ga=zs.getAttribute("data-item-id"),Js=Node$1.nodesMap.get(ga??""),Xs=Js==null?void 0:Js.searchKeys.some(function($a){return $a.match(new RegExp("^"+Uo.key,"i"))});return Xs&&Ls>Ns?!0:(Xs&&Ls<=Ns&&(Ds=Ds===-1?Ls:Ds),!1)}),Cs=Jo===-1?Ds:Jo;return(_s=As[Cs])===null||_s===void 0||_s.focus(),Cs}switch(Uo.key){case"ArrowDown":{var Bs=(Ns+1)%As.length;return As[Bs].focus(),Bs}case"ArrowUp":{var Bs=(Ns-1+As.length)%As.length;return As[Bs].focus(),Bs}case"ArrowLeft":case"ArrowRight":return Ss.click(),Ns;case"Home":return As[0].focus(),0;case"End":return As[As.length-1].focus(),As.length-1;default:return po==null||po(Uo),Ns}},$o=function(Uo){var Yo=Fo(Uo);Yo>-1&&jo(Yo)},Lo=function(Uo,Yo){Yo.stopPropagation(),No(Yo,Uo),!(Uo.loading||Uo.loaded&&Uo.isLeaf)&&Mo(Yo,Uo)},Ho=mergeTreeClasses(ao),qo=function(Uo){return Uo.id};return reactExports.createElement("div",{role:"tree",className:Ho.root,onKeyDown:$o,ref:Oo},reactExports.createElement(List,{data:Ro,itemKey:qo,height:uo,fullHeight:!1,virtual:fo,itemHeight:co,ref:Ao},function(Uo){return reactExports.createElement(TreeNode$2,{key:Uo.id,node:Uo,classes:ao,indent:lo,calcIndent:ho,renderIcon:go,renderContent:vo,renderInnerContent:bo,onNodeClick:Lo})}))});ReactAccessibleTree.displayName="ReactAccessibleTree";var __extends$1=function(){var eo=function(to,ro){return eo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(no,oo){no.__proto__=oo}||function(no,oo){for(var io in oo)Object.prototype.hasOwnProperty.call(oo,io)&&(no[io]=oo[io])},eo(to,ro)};return function(to,ro){eo(to,ro);function no(){this.constructor=to}to.prototype=ro===null?Object.create(ro):(no.prototype=ro.prototype,new no)}}(),__assign$1=function(){return __assign$1=Object.assign||function(eo){for(var to,ro=1,no=arguments.length;ro"u"?void 0:Number(no),maxHeight:typeof oo>"u"?void 0:Number(oo),minWidth:typeof io>"u"?void 0:Number(io),minHeight:typeof so>"u"?void 0:Number(so)}},definedProps=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],baseClassName="__resizable_base__",Resizable=function(eo){__extends(to,eo);function to(ro){var no=eo.call(this,ro)||this;return no.ratio=1,no.resizable=null,no.parentLeft=0,no.parentTop=0,no.resizableLeft=0,no.resizableRight=0,no.resizableTop=0,no.resizableBottom=0,no.targetLeft=0,no.targetTop=0,no.appendBase=function(){if(!no.resizable||!no.window)return null;var oo=no.parentNode;if(!oo)return null;var io=no.window.document.createElement("div");return io.style.width="100%",io.style.height="100%",io.style.position="absolute",io.style.transform="scale(0, 0)",io.style.left="0",io.style.flex="0 0 100%",io.classList?io.classList.add(baseClassName):io.className+=baseClassName,oo.appendChild(io),io},no.removeBase=function(oo){var io=no.parentNode;io&&io.removeChild(oo)},no.ref=function(oo){oo&&(no.resizable=oo)},no.state={isResizing:!1,width:typeof(no.propsSize&&no.propsSize.width)>"u"?"auto":no.propsSize&&no.propsSize.width,height:typeof(no.propsSize&&no.propsSize.height)>"u"?"auto":no.propsSize&&no.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},no.onResizeStart=no.onResizeStart.bind(no),no.onMouseMove=no.onMouseMove.bind(no),no.onMouseUp=no.onMouseUp.bind(no),no}return Object.defineProperty(to.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(to.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(to.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||DEFAULT_SIZE},enumerable:!1,configurable:!0}),Object.defineProperty(to.prototype,"size",{get:function(){var ro=0,no=0;if(this.resizable&&this.window){var oo=this.resizable.offsetWidth,io=this.resizable.offsetHeight,so=this.resizable.style.position;so!=="relative"&&(this.resizable.style.position="relative"),ro=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:oo,no=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:io,this.resizable.style.position=so}return{width:ro,height:no}},enumerable:!1,configurable:!0}),Object.defineProperty(to.prototype,"sizeStyle",{get:function(){var ro=this,no=this.props.size,oo=function(ao){if(typeof ro.state[ao]>"u"||ro.state[ao]==="auto")return"auto";if(ro.propsSize&&ro.propsSize[ao]&&ro.propsSize[ao].toString().endsWith("%")){if(ro.state[ao].toString().endsWith("%"))return ro.state[ao].toString();var lo=ro.getParentSize(),uo=Number(ro.state[ao].toString().replace("px","")),co=uo/lo[ao]*100;return co+"%"}return getStringSize(ro.state[ao])},io=no&&typeof no.width<"u"&&!this.state.isResizing?getStringSize(no.width):oo("width"),so=no&&typeof no.height<"u"&&!this.state.isResizing?getStringSize(no.height):oo("height");return{width:io,height:so}},enumerable:!1,configurable:!0}),to.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var ro=this.appendBase();if(!ro)return{width:0,height:0};var no=!1,oo=this.parentNode.style.flexWrap;oo!=="wrap"&&(no=!0,this.parentNode.style.flexWrap="wrap"),ro.style.position="relative",ro.style.minWidth="100%",ro.style.minHeight="100%";var io={width:ro.offsetWidth,height:ro.offsetHeight};return no&&(this.parentNode.style.flexWrap=oo),this.removeBase(ro),io},to.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},to.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},to.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var ro=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:ro.flexBasis!=="auto"?ro.flexBasis:void 0})}},to.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},to.prototype.createSizeForCssProperty=function(ro,no){var oo=this.propsSize&&this.propsSize[no];return this.state[no]==="auto"&&this.state.original[no]===ro&&(typeof oo>"u"||oo==="auto")?"auto":ro},to.prototype.calculateNewMaxFromBoundary=function(ro,no){var oo=this.props.boundsByDirection,io=this.state.direction,so=oo&&hasDirection("left",io),ao=oo&&hasDirection("top",io),lo,uo;if(this.props.bounds==="parent"){var co=this.parentNode;co&&(lo=so?this.resizableRight-this.parentLeft:co.offsetWidth+(this.parentLeft-this.resizableLeft),uo=ao?this.resizableBottom-this.parentTop:co.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(lo=so?this.resizableRight:this.window.innerWidth-this.resizableLeft,uo=ao?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(lo=so?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),uo=ao?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return lo&&Number.isFinite(lo)&&(ro=ro&&ro"u"?10:io.width,fo=typeof oo.width>"u"||oo.width<0?ro:oo.width,ho=typeof io.height>"u"?10:io.height,po=typeof oo.height>"u"||oo.height<0?no:oo.height,go=lo||0,vo=uo||0;if(ao){var bo=(ho-go)*this.ratio+vo,xo=(po-go)*this.ratio+vo,_o=(co-vo)/this.ratio+go,Eo=(fo-vo)/this.ratio+go,So=Math.max(co,bo),To=Math.min(fo,xo),wo=Math.max(ho,_o),Co=Math.min(po,Eo);ro=clamp(ro,So,To),no=clamp(no,wo,Co)}else ro=clamp(ro,co,fo),no=clamp(no,ho,po);return{newWidth:ro,newHeight:no}},to.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var ro=this.parentNode;if(ro){var no=ro.getBoundingClientRect();this.parentLeft=no.left,this.parentTop=no.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var oo=this.props.bounds.getBoundingClientRect();this.targetLeft=oo.left,this.targetTop=oo.top}if(this.resizable){var io=this.resizable.getBoundingClientRect(),so=io.left,ao=io.top,lo=io.right,uo=io.bottom;this.resizableLeft=so,this.resizableRight=lo,this.resizableTop=ao,this.resizableBottom=uo}},to.prototype.onResizeStart=function(ro,no){if(!(!this.resizable||!this.window)){var oo=0,io=0;if(ro.nativeEvent&&isMouseEvent(ro.nativeEvent)?(oo=ro.nativeEvent.clientX,io=ro.nativeEvent.clientY):ro.nativeEvent&&isTouchEvent(ro.nativeEvent)&&(oo=ro.nativeEvent.touches[0].clientX,io=ro.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var so=this.props.onResizeStart(ro,no,this.resizable);if(so===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var ao,lo=this.window.getComputedStyle(this.resizable);if(lo.flexBasis!=="auto"){var uo=this.parentNode;if(uo){var co=this.window.getComputedStyle(uo).flexDirection;this.flexDir=co.startsWith("row")?"row":"column",ao=lo.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var fo={original:{x:oo,y:io,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:__assign(__assign({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(ro.target).cursor||"auto"}),direction:no,flexBasis:ao};this.setState(fo)}},to.prototype.onMouseMove=function(ro){var no=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&isTouchEvent(ro))try{ro.preventDefault(),ro.stopPropagation()}catch{}var oo=this.props,io=oo.maxWidth,so=oo.maxHeight,ao=oo.minWidth,lo=oo.minHeight,uo=isTouchEvent(ro)?ro.touches[0].clientX:ro.clientX,co=isTouchEvent(ro)?ro.touches[0].clientY:ro.clientY,fo=this.state,ho=fo.direction,po=fo.original,go=fo.width,vo=fo.height,bo=this.getParentSize(),xo=calculateNewMax(bo,this.window.innerWidth,this.window.innerHeight,io,so,ao,lo);io=xo.maxWidth,so=xo.maxHeight,ao=xo.minWidth,lo=xo.minHeight;var _o=this.calculateNewSizeFromDirection(uo,co),Eo=_o.newHeight,So=_o.newWidth,To=this.calculateNewMaxFromBoundary(io,so);this.props.snap&&this.props.snap.x&&(So=findClosestSnap(So,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(Eo=findClosestSnap(Eo,this.props.snap.y,this.props.snapGap));var wo=this.calculateNewSizeFromAspectRatio(So,Eo,{width:To.maxWidth,height:To.maxHeight},{width:ao,height:lo});if(So=wo.newWidth,Eo=wo.newHeight,this.props.grid){var Co=snap(So,this.props.grid[0]),Oo=snap(Eo,this.props.grid[1]),Ao=this.props.snapGap||0;So=Ao===0||Math.abs(Co-So)<=Ao?Co:So,Eo=Ao===0||Math.abs(Oo-Eo)<=Ao?Oo:Eo}var Ro={width:So-po.width,height:Eo-po.height};if(go&&typeof go=="string"){if(go.endsWith("%")){var No=So/bo.width*100;So=No+"%"}else if(go.endsWith("vw")){var Mo=So/this.window.innerWidth*100;So=Mo+"vw"}else if(go.endsWith("vh")){var Do=So/this.window.innerHeight*100;So=Do+"vh"}}if(vo&&typeof vo=="string"){if(vo.endsWith("%")){var No=Eo/bo.height*100;Eo=No+"%"}else if(vo.endsWith("vw")){var Mo=Eo/this.window.innerWidth*100;Eo=Mo+"vw"}else if(vo.endsWith("vh")){var Do=Eo/this.window.innerHeight*100;Eo=Do+"vh"}}var jo={width:this.createSizeForCssProperty(So,"width"),height:this.createSizeForCssProperty(Eo,"height")};this.flexDir==="row"?jo.flexBasis=jo.width:this.flexDir==="column"&&(jo.flexBasis=jo.height),reactDomExports.flushSync(function(){no.setState(jo)}),this.props.onResize&&this.props.onResize(ro,ho,this.resizable,Ro)}},to.prototype.onMouseUp=function(ro){var no=this.state,oo=no.isResizing,io=no.direction,so=no.original;if(!(!oo||!this.resizable)){var ao={width:this.size.width-so.width,height:this.size.height-so.height};this.props.onResizeStop&&this.props.onResizeStop(ro,io,this.resizable,ao),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:__assign(__assign({},this.state.backgroundStyle),{cursor:"auto"})})}},to.prototype.updateSize=function(ro){this.setState({width:ro.width,height:ro.height})},to.prototype.renderResizer=function(){var ro=this,no=this.props,oo=no.enable,io=no.handleStyles,so=no.handleClasses,ao=no.handleWrapperStyle,lo=no.handleWrapperClass,uo=no.handleComponent;if(!oo)return null;var co=Object.keys(oo).map(function(fo){return oo[fo]!==!1?reactExports.createElement(Resizer,{key:fo,direction:fo,onResizeStart:ro.onResizeStart,replaceStyles:io&&io[fo],className:so&&so[fo]},uo&&uo[fo]?uo[fo]:null):null});return reactExports.createElement("div",{className:lo,style:ao},co)},to.prototype.render=function(){var ro=this,no=Object.keys(this.props).reduce(function(so,ao){return definedProps.indexOf(ao)!==-1||(so[ao]=ro.props[ao]),so},{}),oo=__assign(__assign(__assign({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(oo.flexBasis=this.state.flexBasis);var io=this.props.as||"div";return reactExports.createElement(io,__assign({ref:this.ref,style:oo,className:this.props.className},no),this.state.isResizing&&reactExports.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},to.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},to}(reactExports.PureComponent),_a$2;const tasksToTaskRows=(eo,to)=>eo.map(ro=>({...ro,level:to,children:ro.children?tasksToTaskRows(ro.children,to+1):void 0})),tv=class tv{constructor(){this.rows$=new State$1(List$1([])),this.selectedRowId$=new State$1(void 0),this.startTime=Number.MAX_SAFE_INTEGER,this.endTime=0}toggleRow(to){const ro=this.rows$.getSnapshot(),no=ro.findIndex(ao=>ao.id===to),oo=ro.get(no);if(!oo)return;const{children:io}=oo;if(!io)return;const so=[...ro];so[no]={...oo,isExpanded:!oo.isExpanded},oo.isExpanded?so.splice(no+1,io.length):so.splice(no+1,0,...io),this.rows$.next(List$1(so))}setRows(to){this.rows$.next(List$1(to))}setTasks(to){this.startTime=Number.MAX_SAFE_INTEGER,this.endTime=0,this.rows$.next(List$1(tasksToTaskRows(to,0)));const ro=no=>{no.forEach(oo=>{oo.startTimethis.endTime&&(this.endTime=oo.endTime),oo.children&&ro(oo.children)})};ro(to)}};_a$2=SINGLETON,tv[_a$2]=!0;let GanttViewModel=tv;const GanttViewModelToken=createInjectionToken("GanttViewModel",new GanttViewModel);function r$2(eo){var to,ro,no="";if(typeof eo=="string"||typeof eo=="number")no+=eo;else if(typeof eo=="object")if(Array.isArray(eo))for(to=0;to1&&(!eo.frozen||eo.idx+no-1<=to))return no}function stopPropagation(eo){eo.stopPropagation()}function scrollIntoView$2(eo){eo==null||eo.scrollIntoView({inline:"nearest",block:"nearest"})}function createCellEvent(eo){let to=!1;const ro={...eo,preventGridDefault(){to=!0},isGridDefaultPrevented(){return to}};return Object.setPrototypeOf(ro,Object.getPrototypeOf(eo)),ro}const nonInputKeys=new Set(["Unidentified","Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Tab","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp","Insert","ContextMenu","Escape","Pause","Play","PrintScreen","F1","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]);function isCtrlKeyHeldDown(eo){return(eo.ctrlKey||eo.metaKey)&&eo.key!=="Control"}function isDefaultCellInput(eo){return!nonInputKeys.has(eo.key)}function onEditorNavigation({key:eo,target:to}){var ro;return eo==="Tab"&&(to instanceof HTMLInputElement||to instanceof HTMLTextAreaElement||to instanceof HTMLSelectElement)?((ro=to.closest(".rdg-editor-container"))==null?void 0:ro.querySelectorAll("input, textarea, select").length)===1:!1}const measuringCellClassname="m1l09lto7-0-0-beta-39";function renderMeasuringCells(eo){return eo.map(({key:to,idx:ro,minWidth:no,maxWidth:oo})=>jsxRuntimeExports.jsx("div",{className:measuringCellClassname,style:{gridColumnStart:ro+1,minWidth:no,maxWidth:oo},"data-measuring-cell-key":to},to))}function isSelectedCellEditable({selectedPosition:eo,columns:to,rows:ro}){const no=to[eo.idx],oo=ro[eo.rowIdx];return isCellEditable(no,oo)}function isCellEditable(eo,to){return eo.renderEditCell!=null&&(typeof eo.editable=="function"?eo.editable(to):eo.editable)!==!1}function getSelectedCellColSpan({rows:eo,topSummaryRows:to,bottomSummaryRows:ro,rowIdx:no,mainHeaderRowIdx:oo,lastFrozenColumnIndex:io,column:so}){const ao=(to==null?void 0:to.length)??0;if(no===oo)return getColSpan(so,io,{type:"HEADER"});if(to&&no>oo&&no<=ao+oo)return getColSpan(so,io,{type:"SUMMARY",row:to[no+ao]});if(no>=0&&no{for(const Co of oo){const Oo=Co.idx;if(Oo>bo)break;const Ao=getSelectedCellColSpan({rows:io,topSummaryRows:so,bottomSummaryRows:ao,rowIdx:xo,mainHeaderRowIdx:uo,lastFrozenColumnIndex:go,column:Co});if(Ao&&bo>Oo&&bowo.level+uo,To=()=>{if(to){let Co=no[bo].parent;for(;Co!==void 0;){const Oo=So(Co);if(xo===Oo){bo=Co.idx+Co.colSpan;break}Co=Co.parent}}else if(eo){let Co=no[bo].parent,Oo=!1;for(;Co!==void 0;){const Ao=So(Co);if(xo>=Ao){bo=Co.idx,xo=Ao,Oo=!0;break}Co=Co.parent}Oo||(bo=fo,xo=ho)}};if(vo(po)&&(Eo(to),xo=Oo&&(xo=Ao,bo=Co.idx),Co=Co.parent}}return{idx:bo,rowIdx:xo}}function canExitGrid({maxColIdx:eo,minRowIdx:to,maxRowIdx:ro,selectedPosition:{rowIdx:no,idx:oo},shiftKey:io}){return io?oo===0&&no===to:oo===eo&&no===ro}const cell="c1wupbe7-0-0-beta-39",cellClassname=`rdg-cell ${cell}`,cellFrozen="cd0kgiy7-0-0-beta-39",cellFrozenClassname=`rdg-cell-frozen ${cellFrozen}`,cellFrozenLast="c1730fa47-0-0-beta-39",cellFrozenLastClassname=`rdg-cell-frozen-last ${cellFrozenLast}`;function getRowStyle(eo,to){return to!==void 0?{"--rdg-grid-row-start":eo,"--rdg-row-height":`${to}px`}:{"--rdg-grid-row-start":eo}}function getHeaderCellStyle(eo,to,ro){const no=to+1,oo=`calc(${ro-1} * var(--rdg-header-row-height))`;return eo.parent===void 0?{insetBlockStart:0,gridRowStart:1,gridRowEnd:no,paddingBlockStart:oo}:{insetBlockStart:`calc(${to-ro} * var(--rdg-header-row-height))`,gridRowStart:no-ro,gridRowEnd:no,paddingBlockStart:oo}}function getCellStyle(eo,to=1){const ro=eo.idx+1;return{gridColumnStart:ro,gridColumnEnd:ro+to,insetInlineStart:eo.frozen?`var(--rdg-frozen-left-${eo.idx})`:void 0}}function getCellClassname(eo,...to){return clsx(cellClassname,...to,eo.frozen&&cellFrozenClassname,eo.isLastFrozenColumn&&cellFrozenLastClassname)}const{min,max,round,floor,sign,abs:abs$1}=Math;function assertIsValidKeyGetter(eo){if(typeof eo!="function")throw new Error("Please specify the rowKeyGetter prop to use selection")}function clampColumnWidth(eo,{minWidth:to,maxWidth:ro}){return eo=max(eo,to),typeof ro=="number"&&ro>=to?min(eo,ro):eo}function getHeaderCellRowSpan(eo,to){return eo.parent===void 0?to:eo.level-eo.parent.level}const checkboxLabel="c1hs68w07-0-0-beta-39",checkboxLabelClassname=`rdg-checkbox-label ${checkboxLabel}`,checkboxInput="cojpd0n7-0-0-beta-39",checkboxInputClassname=`rdg-checkbox-input ${checkboxInput}`,checkbox="cwsfieb7-0-0-beta-39",checkboxClassname=`rdg-checkbox ${checkbox}`,checkboxLabelDisabled="c1fgadbl7-0-0-beta-39",checkboxLabelDisabledClassname=`rdg-checkbox-label-disabled ${checkboxLabelDisabled}`;function renderCheckbox({onChange:eo,...to}){function ro(no){eo(no.target.checked,no.nativeEvent.shiftKey)}return jsxRuntimeExports.jsxs("label",{className:clsx(checkboxLabelClassname,to.disabled&&checkboxLabelDisabledClassname),children:[jsxRuntimeExports.jsx("input",{type:"checkbox",...to,className:checkboxInputClassname,onChange:ro}),jsxRuntimeExports.jsx("div",{className:checkboxClassname})]})}function renderValue(eo){try{return eo.row[eo.column.key]}catch{return null}}const DataGridDefaultRenderersContext=reactExports.createContext(void 0),DataGridDefaultRenderersProvider=DataGridDefaultRenderersContext.Provider;function useDefaultRenderers(){return reactExports.useContext(DataGridDefaultRenderersContext)}const RowSelectionContext=reactExports.createContext(void 0),RowSelectionProvider=RowSelectionContext.Provider,RowSelectionChangeContext=reactExports.createContext(void 0),RowSelectionChangeProvider=RowSelectionChangeContext.Provider,SELECT_COLUMN_KEY="select-row",DEFAULT_COLUMN_WIDTH="auto",DEFAULT_COLUMN_MIN_WIDTH=50;function useCalculatedColumns({rawColumns:eo,defaultColumnOptions:to,measuredColumnWidths:ro,resizedColumnWidths:no,viewportWidth:oo,scrollLeft:io,enableVirtualization:so}){const ao=(to==null?void 0:to.width)??DEFAULT_COLUMN_WIDTH,lo=(to==null?void 0:to.minWidth)??DEFAULT_COLUMN_MIN_WIDTH,uo=(to==null?void 0:to.maxWidth)??void 0,co=(to==null?void 0:to.renderCell)??renderValue,fo=(to==null?void 0:to.sortable)??!1,ho=(to==null?void 0:to.resizable)??!1,po=(to==null?void 0:to.draggable)??!1,{columns:go,colSpanColumns:vo,lastFrozenColumnIndex:bo,headerRowsCount:xo}=reactExports.useMemo(()=>{let Oo=-1,Ao=1;const Ro=[];No(eo,1);function No(Do,jo,Fo){for(const $o of Do){if("children"in $o){const qo={name:$o.name,parent:Fo,idx:-1,colSpan:0,level:0,headerCellClass:$o.headerCellClass};No($o.children,jo+1,qo);continue}const Lo=$o.frozen??!1,Ho={...$o,parent:Fo,idx:0,level:0,frozen:Lo,isLastFrozenColumn:!1,width:$o.width??ao,minWidth:$o.minWidth??lo,maxWidth:$o.maxWidth??uo,sortable:$o.sortable??fo,resizable:$o.resizable??ho,draggable:$o.draggable??po,renderCell:$o.renderCell??co};Ro.push(Ho),Lo&&Oo++,jo>Ao&&(Ao=jo)}}Ro.sort(({key:Do,frozen:jo},{key:Fo,frozen:$o})=>Do===SELECT_COLUMN_KEY?-1:Fo===SELECT_COLUMN_KEY?1:jo?$o?0:-1:$o?1:0);const Mo=[];return Ro.forEach((Do,jo)=>{Do.idx=jo,updateColumnParent(Do,jo,0),Do.colSpan!=null&&Mo.push(Do)}),Oo!==-1&&(Ro[Oo].isLastFrozenColumn=!0),{columns:Ro,colSpanColumns:Mo,lastFrozenColumnIndex:Oo,headerRowsCount:Ao}},[eo,ao,lo,uo,co,ho,fo,po]),{templateColumns:_o,layoutCssVars:Eo,totalFrozenColumnWidth:So,columnMetrics:To}=reactExports.useMemo(()=>{const Oo=new Map;let Ao=0,Ro=0;const No=[];for(const Do of go){let jo=no.get(Do.key)??ro.get(Do.key)??Do.width;typeof jo=="number"?jo=clampColumnWidth(jo,Do):jo=Do.minWidth,No.push(`${jo}px`),Oo.set(Do,{width:jo,left:Ao}),Ao+=jo}if(bo!==-1){const Do=Oo.get(go[bo]);Ro=Do.left+Do.width}const Mo={};for(let Do=0;Do<=bo;Do++){const jo=go[Do];Mo[`--rdg-frozen-left-${jo.idx}`]=`${Oo.get(jo).left}px`}return{templateColumns:No,layoutCssVars:Mo,totalFrozenColumnWidth:Ro,columnMetrics:Oo}},[ro,no,go,bo]),[wo,Co]=reactExports.useMemo(()=>{if(!so)return[0,go.length-1];const Oo=io+So,Ao=io+oo,Ro=go.length-1,No=min(bo+1,Ro);if(Oo>=Ao)return[No,No];let Mo=No;for(;MoOo)break;Mo++}let Do=Mo;for(;Do=Ao)break;Do++}const jo=max(No,Mo-1),Fo=min(Ro,Do+1);return[jo,Fo]},[To,go,bo,io,So,oo,so]);return{columns:go,colSpanColumns:vo,colOverscanStartIdx:wo,colOverscanEndIdx:Co,templateColumns:_o,layoutCssVars:Eo,headerRowsCount:xo,lastFrozenColumnIndex:bo,totalFrozenColumnWidth:So}}function updateColumnParent(eo,to,ro){if(ro"u"?reactExports.useEffect:reactExports.useLayoutEffect;function useColumnWidths(eo,to,ro,no,oo,io,so,ao,lo,uo){const co=reactExports.useRef(oo),fo=eo.length===to.length,ho=fo&&oo!==co.current,po=[...ro],go=[];for(const{key:_o,idx:Eo,width:So}of to)typeof So=="string"&&(ho||!so.has(_o))&&!io.has(_o)&&(po[Eo]=So,go.push(_o));const vo=po.join(" ");useLayoutEffect(()=>{co.current=oo,bo(go)});function bo(_o){_o.length!==0&&lo(Eo=>{const So=new Map(Eo);let To=!1;for(const wo of _o){const Co=measureColumnWidth(no,wo);To||(To=Co!==Eo.get(wo)),Co===void 0?So.delete(wo):So.set(wo,Co)}return To?So:Eo})}function xo(_o,Eo){const{key:So}=_o,To=[...ro],wo=[];for(const{key:Oo,idx:Ao,width:Ro}of to)if(So===Oo){const No=typeof Eo=="number"?`${Eo}px`:Eo;To[Ao]=No}else fo&&typeof Ro=="string"&&!io.has(Oo)&&(To[Ao]=Ro,wo.push(Oo));no.current.style.gridTemplateColumns=To.join(" ");const Co=typeof Eo=="number"?Eo:measureColumnWidth(no,So);reactDomExports.flushSync(()=>{ao(Oo=>{const Ao=new Map(Oo);return Ao.set(So,Co),Ao}),bo(wo)}),uo==null||uo(_o.idx,Co)}return{gridTemplateColumns:vo,handleColumnResize:xo}}function measureColumnWidth(eo,to){const ro=`[data-measuring-cell-key="${CSS.escape(to)}"]`,no=eo.current.querySelector(ro);return no==null?void 0:no.getBoundingClientRect().width}function useGridDimensions(){const eo=reactExports.useRef(null),[to,ro]=reactExports.useState(1),[no,oo]=reactExports.useState(1);return useLayoutEffect(()=>{const{ResizeObserver:io}=window;if(io==null)return;const{clientWidth:so,clientHeight:ao,offsetWidth:lo,offsetHeight:uo}=eo.current,{width:co,height:fo}=eo.current.getBoundingClientRect(),ho=co-lo+so,po=fo-uo+ao;ro(ho),oo(po);const go=new io(vo=>{const bo=vo[0].contentBoxSize[0];reactDomExports.flushSync(()=>{ro(bo.inlineSize),oo(bo.blockSize)})});return go.observe(eo.current),()=>{go.disconnect()}},[]),[eo,to,no]}function useLatestFunc(eo){const to=reactExports.useRef(eo);reactExports.useEffect(()=>{to.current=eo});const ro=reactExports.useCallback((...no)=>{to.current(...no)},[]);return eo&&ro}function useRovingTabIndex(eo){const[to,ro]=reactExports.useState(!1);to&&!eo&&ro(!1);function no(io){io.target!==io.currentTarget&&ro(!0)}return{tabIndex:eo&&!to?0:-1,childTabIndex:eo?0:-1,onFocus:eo?no:void 0}}function useViewportColumns({columns:eo,colSpanColumns:to,rows:ro,topSummaryRows:no,bottomSummaryRows:oo,colOverscanStartIdx:io,colOverscanEndIdx:so,lastFrozenColumnIndex:ao,rowOverscanStartIdx:lo,rowOverscanEndIdx:uo}){const co=reactExports.useMemo(()=>{if(io===0)return 0;let fo=io;const ho=(po,go)=>go!==void 0&&po+go>io?(fo=po,!0):!1;for(const po of to){const go=po.idx;if(go>=fo||ho(go,getColSpan(po,ao,{type:"HEADER"})))break;for(let vo=lo;vo<=uo;vo++){const bo=ro[vo];if(ho(go,getColSpan(po,ao,{type:"ROW",row:bo})))break}if(no!=null){for(const vo of no)if(ho(go,getColSpan(po,ao,{type:"SUMMARY",row:vo})))break}if(oo!=null){for(const vo of oo)if(ho(go,getColSpan(po,ao,{type:"SUMMARY",row:vo})))break}}return fo},[lo,uo,ro,no,oo,io,ao,to]);return reactExports.useMemo(()=>{const fo=[];for(let ho=0;ho<=so;ho++){const po=eo[ho];ho{if(typeof to=="number")return{totalRowHeight:to*eo.length,gridTemplateRows:` repeat(${eo.length}, ${to}px)`,getRowTop:bo=>bo*to,getRowHeight:()=>to,findRowIdx:bo=>floor(bo/to)};let ho=0,po=" ";const go=eo.map(bo=>{const xo=to(bo),_o={top:ho,height:xo};return po+=`${xo}px `,ho+=xo,_o}),vo=bo=>max(0,min(eo.length-1,bo));return{totalRowHeight:ho,gridTemplateRows:po,getRowTop:bo=>go[vo(bo)].top,getRowHeight:bo=>go[vo(bo)].height,findRowIdx(bo){let xo=0,_o=go.length-1;for(;xo<=_o;){const Eo=xo+floor((_o-xo)/2),So=go[Eo].top;if(So===bo)return Eo;if(Sobo&&(_o=Eo-1),xo>_o)return _o}return 0}}},[to,eo]);let co=0,fo=eo.length-1;if(oo){const po=uo(no),go=uo(no+ro);co=max(0,po-4),fo=min(eo.length-1,go+4)}return{rowOverscanStartIdx:co,rowOverscanEndIdx:fo,totalRowHeight:io,gridTemplateRows:so,getRowTop:ao,getRowHeight:lo,findRowIdx:uo}}const cellDragHandle="cadd3bp7-0-0-beta-39",cellDragHandleFrozenClassname="ccmuez27-0-0-beta-39",cellDragHandleClassname=`rdg-cell-drag-handle ${cellDragHandle}`;function DragHandle({gridRowStart:eo,rows:to,columns:ro,selectedPosition:no,latestDraggedOverRowIdx:oo,isCellEditable:io,onRowsChange:so,onFill:ao,onClick:lo,setDragging:uo,setDraggedOverRowIdx:co}){var So;const{idx:fo,rowIdx:ho}=no,po=ro[fo];function go(To){if(To.preventDefault(),To.buttons!==1)return;uo(!0),window.addEventListener("mouseover",wo),window.addEventListener("mouseup",Co);function wo(Oo){Oo.buttons!==1&&Co()}function Co(){window.removeEventListener("mouseover",wo),window.removeEventListener("mouseup",Co),uo(!1),vo()}}function vo(){const To=oo.current;if(To===void 0)return;const wo=ho0&&(so==null||so(Ao,{indexes:Ro,column:Co}))}const _o=((So=po.colSpan)==null?void 0:So.call(po,{type:"ROW",row:to[ho]}))??1,Eo=getCellStyle(po,_o);return jsxRuntimeExports.jsx("div",{style:{...Eo,gridRowStart:eo,insetInlineStart:Eo.insetInlineStart&&typeof po.width=="number"?`calc(${Eo.insetInlineStart} + ${po.width}px - var(--rdg-drag-handle-size))`:void 0},className:clsx(cellDragHandleClassname,po.frozen&&cellDragHandleFrozenClassname),onClick:lo,onMouseDown:go,onDoubleClick:bo})}const cellEditing="c1tngyp17-0-0-beta-39";function EditCell({column:eo,colSpan:to,row:ro,rowIdx:no,onRowChange:oo,closeEditor:io,onKeyDown:so,navigate:ao}){var xo,_o,Eo;const lo=reactExports.useRef(),uo=((xo=eo.editorOptions)==null?void 0:xo.commitOnOutsideClick)!==!1,co=useLatestFunc(()=>{po(!0,!1)});reactExports.useEffect(()=>{if(!uo)return;function So(){lo.current=requestAnimationFrame(co)}return addEventListener("mousedown",So,{capture:!0}),()=>{removeEventListener("mousedown",So,{capture:!0}),fo()}},[uo,co]);function fo(){cancelAnimationFrame(lo.current)}function ho(So){if(so){const To=createCellEvent(So);if(so({mode:"EDIT",row:ro,column:eo,rowIdx:no,navigate(){ao(So)},onClose:po},To),To.isGridDefaultPrevented())return}So.key==="Escape"?po():So.key==="Enter"?po(!0):onEditorNavigation(So)&&ao(So)}function po(So=!1,To=!0){So?oo(ro,!0,To):io(To)}function go(So,To=!1){oo(So,To,To)}const{cellClass:vo}=eo,bo=getCellClassname(eo,"rdg-editor-container",typeof vo=="function"?vo(ro):vo,!((_o=eo.editorOptions)!=null&&_o.displayCellContent)&&cellEditing);return jsxRuntimeExports.jsx("div",{role:"gridcell","aria-colindex":eo.idx+1,"aria-colspan":to,"aria-selected":!0,className:bo,style:getCellStyle(eo,to),onKeyDown:ho,onMouseDownCapture:fo,children:eo.renderEditCell!=null&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[eo.renderEditCell({column:eo,row:ro,onRowChange:go,onClose:po}),((Eo=eo.editorOptions)==null?void 0:Eo.displayCellContent)&&eo.renderCell({column:eo,row:ro,isCellEditable:!0,tabIndex:-1,onRowChange:go})]})})}function GroupedColumnHeaderCell({column:eo,rowIdx:to,isCellSelected:ro,selectCell:no}){const{tabIndex:oo,onFocus:io}=useRovingTabIndex(ro),{colSpan:so}=eo,ao=getHeaderCellRowSpan(eo,to),lo=eo.idx+1;function uo(){no({idx:eo.idx,rowIdx:to})}return jsxRuntimeExports.jsx("div",{role:"columnheader","aria-colindex":lo,"aria-colspan":so,"aria-rowspan":ao,"aria-selected":ro,tabIndex:oo,className:clsx(cellClassname,eo.headerCellClass),style:{...getHeaderCellStyle(eo,to,ao),gridColumnStart:lo,gridColumnEnd:lo+so},onFocus:io,onClick:uo,children:eo.name})}const headerSortCellClassname="hizp7y17-0-0-beta-39",headerSortName="h14cojrm7-0-0-beta-39",headerSortNameClassname=`rdg-header-sort-name ${headerSortName}`;function renderHeaderCell({column:eo,sortDirection:to,priority:ro}){return eo.sortable?jsxRuntimeExports.jsx(SortableHeaderCell,{sortDirection:to,priority:ro,children:eo.name}):eo.name}function SortableHeaderCell({sortDirection:eo,priority:to,children:ro}){const no=useDefaultRenderers().renderSortStatus;return jsxRuntimeExports.jsxs("span",{className:headerSortCellClassname,children:[jsxRuntimeExports.jsx("span",{className:headerSortNameClassname,children:ro}),jsxRuntimeExports.jsx("span",{children:no({sortDirection:eo,priority:to})})]})}const cellSortableClassname="celq7o97-0-0-beta-39",cellResizable="ceqw94e7-0-0-beta-39",cellResizableClassname=`rdg-cell-resizable ${cellResizable}`,resizeHandleClassname="r12jy2ca7-0-0-beta-39",cellDragging="c1j3os1p7-0-0-beta-39",cellDraggingClassname=`rdg-cell-dragging ${cellDragging}`,cellOver="c1ui3nad7-0-0-beta-39",cellOverClassname=`rdg-cell-drag-over ${cellOver}`;function HeaderCell({column:eo,colSpan:to,rowIdx:ro,isCellSelected:no,onColumnResize:oo,onColumnsReorder:io,sortColumns:so,onSortColumnsChange:ao,selectCell:lo,shouldFocusGrid:uo,direction:co}){const[fo,ho]=reactExports.useState(!1),[po,go]=reactExports.useState(!1),vo=co==="rtl",bo=getHeaderCellRowSpan(eo,ro),{tabIndex:xo,childTabIndex:_o,onFocus:Eo}=useRovingTabIndex(no),So=so==null?void 0:so.findIndex(ws=>ws.columnKey===eo.key),To=So!==void 0&&So>-1?so[So]:void 0,wo=To==null?void 0:To.direction,Co=To!==void 0&&so.length>1?So+1:void 0,Oo=wo&&!Co?wo==="ASC"?"ascending":"descending":void 0,{sortable:Ao,resizable:Ro,draggable:No}=eo,Mo=getCellClassname(eo,eo.headerCellClass,Ao&&cellSortableClassname,Ro&&cellResizableClassname,fo&&cellDraggingClassname,po&&cellOverClassname),Do=eo.renderHeaderCell??renderHeaderCell;function jo(ws){if(ws.pointerType==="mouse"&&ws.buttons!==1)return;const{currentTarget:Ds,pointerId:Jo}=ws,Cs=Ds.parentElement,{right:Bs,left:zs}=Cs.getBoundingClientRect(),Ls=vo?ws.clientX-zs:Bs-ws.clientX;function ga(Xs){Xs.preventDefault();const{right:$a,left:Ll}=Cs.getBoundingClientRect(),Kl=vo?$a+Ls-Xs.clientX:Xs.clientX+Ls-Ll;Kl>0&&oo(eo,clampColumnWidth(Kl,eo))}function Js(){Ds.removeEventListener("pointermove",ga),Ds.removeEventListener("lostpointercapture",Js)}Ds.setPointerCapture(Jo),Ds.addEventListener("pointermove",ga),Ds.addEventListener("lostpointercapture",Js)}function Fo(ws){if(ao==null)return;const{sortDescendingFirst:Ds}=eo;if(To===void 0){const Jo={columnKey:eo.key,direction:Ds?"DESC":"ASC"};ao(so&&ws?[...so,Jo]:[Jo])}else{let Jo;if((Ds===!0&&wo==="DESC"||Ds!==!0&&wo==="ASC")&&(Jo={columnKey:eo.key,direction:wo==="ASC"?"DESC":"ASC"}),ws){const Cs=[...so];Jo?Cs[So]=Jo:Cs.splice(So,1),ao(Cs)}else ao(Jo?[Jo]:[])}}function $o(ws){lo({idx:eo.idx,rowIdx:ro}),Ao&&Fo(ws.ctrlKey||ws.metaKey)}function Lo(){oo(eo,"max-content")}function Ho(ws){Eo==null||Eo(ws),uo&&lo({idx:0,rowIdx:ro})}function qo(ws){(ws.key===" "||ws.key==="Enter")&&(ws.preventDefault(),Fo(ws.ctrlKey||ws.metaKey))}function Uo(ws){ws.dataTransfer.setData("text/plain",eo.key),ws.dataTransfer.dropEffect="move",ho(!0)}function Yo(){ho(!1)}function Zo(ws){ws.preventDefault(),ws.dataTransfer.dropEffect="move"}function _s(ws){go(!1);const Ds=ws.dataTransfer.getData("text/plain");Ds!==eo.key&&(ws.preventDefault(),io==null||io(Ds,eo.key))}function Ss(ws){isEventPertinent(ws)&&go(!0)}function As(ws){isEventPertinent(ws)&&go(!1)}let Ns;return No&&(Ns={draggable:!0,onDragStart:Uo,onDragEnd:Yo,onDragOver:Zo,onDragEnter:Ss,onDragLeave:As,onDrop:_s}),jsxRuntimeExports.jsxs("div",{role:"columnheader","aria-colindex":eo.idx+1,"aria-colspan":to,"aria-rowspan":bo,"aria-selected":no,"aria-sort":Oo,tabIndex:uo?0:xo,className:Mo,style:{...getHeaderCellStyle(eo,ro,bo),...getCellStyle(eo,to)},onFocus:Ho,onClick:$o,onKeyDown:Ao?qo:void 0,...Ns,children:[Do({column:eo,sortDirection:wo,priority:Co,tabIndex:_o}),Ro&&jsxRuntimeExports.jsx("div",{className:resizeHandleClassname,onClick:stopPropagation,onDoubleClick:Lo,onPointerDown:jo})]})}function isEventPertinent(eo){const to=eo.relatedTarget;return!eo.currentTarget.contains(to)}const row="r1otpg647-0-0-beta-39",rowClassname=`rdg-row ${row}`,rowSelected="rel5gk27-0-0-beta-39",rowSelectedClassname="rdg-row-selected",rowSelectedWithFrozenCell="r1qymf1z7-0-0-beta-39",headerRow="h197vzie7-0-0-beta-39",headerRowClassname=`rdg-header-row ${headerRow}`;function HeaderRow({rowIdx:eo,columns:to,onColumnResize:ro,onColumnsReorder:no,sortColumns:oo,onSortColumnsChange:io,lastFrozenColumnIndex:so,selectedCellIdx:ao,selectCell:lo,shouldFocusGrid:uo,direction:co}){const fo=[];for(let ho=0;hoto&&lo.parent!==void 0;)lo=lo.parent;if(lo.level===to&&!so.has(lo)){so.add(lo);const{idx:uo}=lo;io.push(jsxRuntimeExports.jsx(GroupedColumnHeaderCell,{column:lo,rowIdx:eo,isCellSelected:no===uo,selectCell:oo},uo))}}}return jsxRuntimeExports.jsx("div",{role:"row","aria-rowindex":eo,className:headerRowClassname,children:io})}const GroupedColumnHeaderRow$1=reactExports.memo(GroupedColumnHeaderRow),cellCopied="ccpfvsn7-0-0-beta-39",cellCopiedClassname=`rdg-cell-copied ${cellCopied}`,cellDraggedOver="c1bmg16t7-0-0-beta-39",cellDraggedOverClassname=`rdg-cell-dragged-over ${cellDraggedOver}`;function Cell({column:eo,colSpan:to,isCellSelected:ro,isCopied:no,isDraggedOver:oo,row:io,rowIdx:so,onClick:ao,onDoubleClick:lo,onContextMenu:uo,onRowChange:co,selectCell:fo,...ho}){const{tabIndex:po,childTabIndex:go,onFocus:vo}=useRovingTabIndex(ro),{cellClass:bo}=eo,xo=getCellClassname(eo,typeof bo=="function"?bo(io):bo,no&&cellCopiedClassname,oo&&cellDraggedOverClassname),_o=isCellEditable(eo,io);function Eo(Oo){fo({rowIdx:so,idx:eo.idx},Oo)}function So(Oo){if(ao){const Ao=createCellEvent(Oo);if(ao({row:io,column:eo,selectCell:Eo},Ao),Ao.isGridDefaultPrevented())return}Eo()}function To(Oo){if(uo){const Ao=createCellEvent(Oo);if(uo({row:io,column:eo,selectCell:Eo},Ao),Ao.isGridDefaultPrevented())return}Eo()}function wo(Oo){if(lo){const Ao=createCellEvent(Oo);if(lo({row:io,column:eo,selectCell:Eo},Ao),Ao.isGridDefaultPrevented())return}Eo(!0)}function Co(Oo){co(eo,Oo)}return jsxRuntimeExports.jsx("div",{role:"gridcell","aria-colindex":eo.idx+1,"aria-colspan":to,"aria-selected":ro,"aria-readonly":!_o||void 0,tabIndex:po,className:xo,style:getCellStyle(eo,to),onClick:So,onDoubleClick:wo,onContextMenu:To,onFocus:vo,...ho,children:eo.renderCell({column:eo,row:io,isCellEditable:_o,tabIndex:go,onRowChange:Co})})}const Cell$1=reactExports.memo(Cell);function Row({className:eo,rowIdx:to,gridRowStart:ro,height:no,selectedCellIdx:oo,isRowSelected:io,copiedCellIdx:so,draggedOverCellIdx:ao,lastFrozenColumnIndex:lo,row:uo,viewportColumns:co,selectedCellEditor:fo,onCellClick:ho,onCellDoubleClick:po,onCellContextMenu:go,rowClass:vo,setDraggedOverRowIdx:bo,onMouseEnter:xo,onRowChange:_o,selectCell:Eo,...So},To){const wo=useLatestFunc((Ao,Ro)=>{_o(Ao,to,Ro)});function Co(Ao){bo==null||bo(to),xo==null||xo(Ao)}eo=clsx(rowClassname,`rdg-row-${to%2===0?"even":"odd"}`,vo==null?void 0:vo(uo,to),eo,oo===-1&&rowSelectedClassname);const Oo=[];for(let Ao=0;Ao{scrollIntoView$2(oo.current)}),useLayoutEffect(()=>{function io(){no(null)}const so=new IntersectionObserver(io,{root:ro,threshold:1});return so.observe(oo.current),()=>{so.disconnect()}},[ro,no]),jsxRuntimeExports.jsx("div",{ref:oo,style:{gridColumn:eo===void 0?"1/-1":eo+1,gridRow:to===void 0?"1/-1":to+2}})}const arrow="a1mygwml7-0-0-beta-39",arrowClassname=`rdg-sort-arrow ${arrow}`;function renderSortStatus({sortDirection:eo,priority:to}){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[renderSortIcon({sortDirection:eo}),renderSortPriority({priority:to})]})}function renderSortIcon({sortDirection:eo}){return eo===void 0?null:jsxRuntimeExports.jsx("svg",{viewBox:"0 0 12 8",width:"12",height:"8",className:arrowClassname,"aria-hidden":!0,children:jsxRuntimeExports.jsx("path",{d:eo==="ASC"?"M0 8 6 0 12 8":"M0 0 6 8 12 0"})})}function renderSortPriority({priority:eo}){return eo}const root="r104f42s7-0-0-beta-39",rootClassname=`rdg ${root}`,viewportDragging="v7ly7s7-0-0-beta-39",viewportDraggingClassname=`rdg-viewport-dragging ${viewportDragging}`,focusSinkClassname="fc4f4zb7-0-0-beta-39",focusSinkHeaderAndSummaryClassname="fq51q037-0-0-beta-39",summaryCellClassname="s1n3hxke7-0-0-beta-39";function SummaryCell({column:eo,colSpan:to,row:ro,rowIdx:no,isCellSelected:oo,selectCell:io}){var ho;const{tabIndex:so,childTabIndex:ao,onFocus:lo}=useRovingTabIndex(oo),{summaryCellClass:uo}=eo,co=getCellClassname(eo,summaryCellClassname,typeof uo=="function"?uo(ro):uo);function fo(){io({rowIdx:no,idx:eo.idx})}return jsxRuntimeExports.jsx("div",{role:"gridcell","aria-colindex":eo.idx+1,"aria-colspan":to,"aria-selected":oo,tabIndex:so,className:co,style:getCellStyle(eo,to),onClick:fo,onFocus:lo,children:(ho=eo.renderSummaryCell)==null?void 0:ho.call(eo,{column:eo,row:ro,tabIndex:ao})})}const SummaryCell$1=reactExports.memo(SummaryCell),summaryRow="snfqesz7-0-0-beta-39",topSummaryRow="t1jijrjz7-0-0-beta-39",topSummaryRowBorderClassname="t14bmecc7-0-0-beta-39",bottomSummaryRowBorderClassname="b1odhhml7-0-0-beta-39",summaryRowClassname=`rdg-summary-row ${summaryRow}`,topSummaryRowClassname=`rdg-top-summary-row ${topSummaryRow}`;function SummaryRow({rowIdx:eo,gridRowStart:to,row:ro,viewportColumns:no,top:oo,bottom:io,lastFrozenColumnIndex:so,selectedCellIdx:ao,isTop:lo,showBorder:uo,selectCell:co,"aria-rowindex":fo}){const ho=[];for(let po=0;ponew Map),[Xl,Nl]=reactExports.useState(()=>new Map),[xa,El]=reactExports.useState(null),[cu,ks]=reactExports.useState(!1),[Es,bs]=reactExports.useState(void 0),[Os,Vs]=reactExports.useState(null),[Ks,Ms,Hs]=useGridDimensions(),{columns:Zs,colSpanColumns:xl,lastFrozenColumnIndex:Sl,headerRowsCount:$l,colOverscanStartIdx:ru,colOverscanEndIdx:au,templateColumns:zl,layoutCssVars:pu,totalFrozenColumnWidth:Su}=useCalculatedColumns({rawColumns:ro,defaultColumnOptions:vo,measuredColumnWidths:Xl,resizedColumnWidths:Ll,scrollLeft:Xs,viewportWidth:Ms,enableVirtualization:zs}),Zl=(oo==null?void 0:oo.length)??0,Dl=(io==null?void 0:io.length)??0,gu=Zl+Dl,lu=$l+Zl,mu=$l-1,ou=-lu,Fl=ou+mu,yl=no.length+Dl-1,[Ys,vu]=reactExports.useState(()=>({idx:-1,rowIdx:ou-1,mode:"SELECT"})),Nu=reactExports.useRef(Ys),du=reactExports.useRef(Es),cp=reactExports.useRef(-1),qu=reactExports.useRef(null),Ru=reactExports.useRef(!1),_h=Ss==="treegrid",qs=$l*Ns,Ko=Hs-qs-gu*ws,Qo=fo!=null&&ho!=null,zo=Ls==="rtl",Vo=zo?"ArrowRight":"ArrowLeft",Bo=zo?"ArrowLeft":"ArrowRight",Xo=Yo??$l+no.length+gu,vs=reactExports.useMemo(()=>({renderCheckbox:Cs,renderSortStatus:Jo}),[Cs,Jo]),ys=reactExports.useMemo(()=>{const{length:Qs}=no;return Qs!==0&&fo!=null&&so!=null&&fo.size>=Qs&&no.every(na=>fo.has(so(na)))},[no,fo,so]),{rowOverscanStartIdx:ps,rowOverscanEndIdx:Rs,totalRowHeight:Us,gridTemplateRows:Rl,getRowTop:Ml,getRowHeight:Ol,findRowIdx:Cl}=useViewportRows({rows:no,rowHeight:As,clientHeight:Ko,scrollTop:ga,enableVirtualization:zs}),Ul=useViewportColumns({columns:Zs,colSpanColumns:xl,colOverscanStartIdx:ru,colOverscanEndIdx:au,lastFrozenColumnIndex:Sl,rowOverscanStartIdx:ps,rowOverscanEndIdx:Rs,rows:no,topSummaryRows:oo,bottomSummaryRows:io}),{gridTemplateColumns:fu,handleColumnResize:Bl}=useColumnWidths(Zs,Ul,zl,Ks,Ms,Ll,Xl,Kl,Nl,wo),Eu=_h?-1:0,Iu=Zs.length-1,zu=f1(Ys),dp=h1(Ys),Yu=useLatestFunc(Bl),kp=useLatestFunc(Co),fp=useLatestFunc(go),wu=useLatestFunc(bo),ep=useLatestFunc(xo),Cp=useLatestFunc(_o),hp=useLatestFunc(Ap),wp=useLatestFunc(xp),pp=useLatestFunc(Hp),jp=useLatestFunc(({idx:Qs,rowIdx:na})=>{Hp({rowIdx:ou+na-1,idx:Qs})});useLayoutEffect(()=>{if(!zu||isSamePosition(Ys,Nu.current)){Nu.current=Ys;return}Nu.current=Ys,Ys.idx===-1&&(qu.current.focus({preventScroll:!0}),scrollIntoView$2(qu.current))}),useLayoutEffect(()=>{Ru.current&&(Ru.current=!1,I1())}),reactExports.useImperativeHandle(to,()=>({element:Ks.current,scrollToCell({idx:Qs,rowIdx:na}){const Wl=Qs!==void 0&&Qs>Sl&&Qs{bs(Qs),du.current=Qs},[]);function Ap(Qs){if(!ho)return;if(assertIsValidKeyGetter(so),Qs.type==="HEADER"){const bu=new Set(fo);for(const _u of no){const $u=so(_u);Qs.checked?bu.add($u):bu.delete($u)}ho(bu);return}const{row:na,checked:Wl,isShiftClick:Hl}=Qs,Al=new Set(fo),Il=so(na);if(Wl){Al.add(Il);const bu=cp.current,_u=no.indexOf(na);if(cp.current=_u,Hl&&bu!==-1&&bu!==_u){const $u=sign(_u-bu);for(let tp=bu+$u;tp!==_u;tp+=$u){const Rp=no[tp];Al.add(so(Rp))}}}else Al.delete(Il),cp.current=-1;ho(Al)}function Op(Qs){const{idx:na,rowIdx:Wl,mode:Hl}=Ys;if(Hl==="EDIT")return;if(Eo&&Jp(Wl)){const _u=no[Wl],$u=createCellEvent(Qs);if(Eo({mode:"SELECT",row:_u,column:Zs[na],rowIdx:Wl,selectCell:Hp},$u),$u.isGridDefaultPrevented())return}if(!(Qs.target instanceof Element))return;const Al=Qs.target.closest(".rdg-cell")!==null,Il=_h&&Qs.target===qu.current;if(!Al&&!Il)return;const{keyCode:bu}=Qs;if(dp&&(Ro!=null||Ao!=null)&&isCtrlKeyHeldDown(Qs)){if(bu===67){O1();return}if(bu===86){zp();return}}switch(Qs.key){case"Escape":El(null);return;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Tab":case"Home":case"End":case"PageUp":case"PageDown":X1(Qs);break;default:Y1(Qs);break}}function _p(Qs){const{scrollTop:na,scrollLeft:Wl}=Qs.currentTarget;reactDomExports.flushSync(()=>{Js(na),$a(abs$1(Wl))}),To==null||To(Qs)}function xp(Qs,na,Wl){if(typeof ao!="function"||Wl===no[na])return;const Hl=[...no];Hl[na]=Wl,ao(Hl,{indexes:[na],column:Qs})}function d1(){Ys.mode==="EDIT"&&xp(Zs[Ys.idx],Ys.rowIdx,Ys.row)}function O1(){const{idx:Qs,rowIdx:na}=Ys,Wl=no[na],Hl=Zs[Qs].key;El({row:Wl,columnKey:Hl}),Ao==null||Ao({sourceRow:Wl,sourceColumnKey:Hl})}function zp(){if(!Ro||!ao||xa===null||!e1(Ys))return;const{idx:Qs,rowIdx:na}=Ys,Wl=Zs[Qs],Hl=no[na],Al=Ro({sourceRow:xa.row,sourceColumnKey:xa.columnKey,targetRow:Hl,targetColumnKey:Wl.key});xp(Wl,na,Al)}function Y1(Qs){if(!dp)return;const na=no[Ys.rowIdx],{key:Wl,shiftKey:Hl}=Qs;if(Qo&&Hl&&Wl===" "){assertIsValidKeyGetter(so);const Al=so(na);Ap({type:"ROW",row:na,checked:!fo.has(Al),isShiftClick:!1}),Qs.preventDefault();return}e1(Ys)&&isDefaultCellInput(Qs)&&vu(({idx:Al,rowIdx:Il})=>({idx:Al,rowIdx:Il,mode:"EDIT",row:na,originalRow:na}))}function R1(Qs){return Qs>=Eu&&Qs<=Iu}function Jp(Qs){return Qs>=0&&Qs=ou&&na<=yl&&R1(Qs)}function h1({idx:Qs,rowIdx:na}){return Jp(na)&&R1(Qs)}function e1(Qs){return h1(Qs)&&isSelectedCellEditable({columns:Zs,rows:no,selectedPosition:Qs})}function Hp(Qs,na){if(!f1(Qs))return;d1();const Wl=no[Qs.rowIdx],Hl=isSamePosition(Ys,Qs);na&&e1(Qs)?vu({...Qs,mode:"EDIT",row:Wl,originalRow:Wl}):Hl?scrollIntoView$2(getCellToScroll(Ks.current)):(Ru.current=!0,vu({...Qs,mode:"SELECT"})),So&&!Hl&&So({rowIdx:Qs.rowIdx,row:Wl,column:Zs[Qs.idx]})}function Pm(Qs,na,Wl){const{idx:Hl,rowIdx:Al}=Ys,Il=zu&&Hl===-1;switch(Qs){case"ArrowUp":return{idx:Hl,rowIdx:Al-1};case"ArrowDown":return{idx:Hl,rowIdx:Al+1};case Vo:return{idx:Hl-1,rowIdx:Al};case Bo:return{idx:Hl+1,rowIdx:Al};case"Tab":return{idx:Hl+(Wl?-1:1),rowIdx:Al};case"Home":return Il?{idx:Hl,rowIdx:ou}:{idx:0,rowIdx:na?ou:Al};case"End":return Il?{idx:Hl,rowIdx:yl}:{idx:Iu,rowIdx:na?yl:Al};case"PageUp":{if(Ys.rowIdx===ou)return Ys;const bu=Ml(Al)+Ol(Al)-Ko;return{idx:Hl,rowIdx:bu>0?Cl(bu):0}}case"PageDown":{if(Ys.rowIdx>=no.length)return Ys;const bu=Ml(Al)+Ko;return{idx:Hl,rowIdx:buQs&&Qs>=Es)?Ys.idx:void 0}function I1(){const Qs=getCellToScroll(Ks.current);if(Qs===null)return;scrollIntoView$2(Qs),(Qs.querySelector('[tabindex="0"]')??Qs).focus({preventScroll:!0})}function zm(){if(!(Oo==null||Ys.mode==="EDIT"||!h1(Ys)))return jsxRuntimeExports.jsx(DragHandle,{gridRowStart:lu+Ys.rowIdx+1,rows:no,columns:Zs,selectedPosition:Ys,isCellEditable:e1,latestDraggedOverRowIdx:du,onRowsChange:ao,onClick:I1,onFill:Oo,setDragging:ks,setDraggedOverRowIdx:bp})}function Hm(Qs){if(Ys.rowIdx!==Qs||Ys.mode==="SELECT")return;const{idx:na,row:Wl}=Ys,Hl=Zs[na],Al=getColSpan(Hl,Sl,{type:"ROW",row:Wl}),Il=_u=>{Ru.current=_u,vu(({idx:$u,rowIdx:tp})=>({idx:$u,rowIdx:tp,mode:"SELECT"}))},bu=(_u,$u,tp)=>{$u?reactDomExports.flushSync(()=>{xp(Hl,Ys.rowIdx,_u),Il(tp)}):vu(Rp=>({...Rp,row:_u}))};return no[Ys.rowIdx]!==Ys.originalRow&&Il(!1),jsxRuntimeExports.jsx(EditCell,{column:Hl,colSpan:Al,row:Wl,rowIdx:Qs,onRowChange:bu,closeEditor:Il,onKeyDown:Eo,navigate:X1},Hl.key)}function t1(Qs){const na=Ys.idx===-1?void 0:Zs[Ys.idx];return na!==void 0&&Ys.rowIdx===Qs&&!Ul.includes(na)?Ys.idx>au?[...Ul,na]:[...Ul.slice(0,Sl+1),na,...Ul.slice(Sl+1)]:Ul}function Vm(){const Qs=[],{idx:na,rowIdx:Wl}=Ys,Hl=dp&&WlRs?Rs+1:Rs;for(let Il=Hl;Il<=Al;Il++){const bu=Il===ps-1||Il===Rs+1,_u=bu?Wl:Il;let $u=Ul;const tp=na===-1?void 0:Zs[na];tp!==void 0&&(bu?$u=[tp]:$u=t1(_u));const Rp=no[_u],Gm=lu+_u+1;let p1=_u,N1=!1;typeof so=="function"&&(p1=so(Rp),N1=(fo==null?void 0:fo.has(p1))??!1),Qs.push(Ds(p1,{"aria-rowindex":lu+_u+1,"aria-selected":Qo?N1:void 0,rowIdx:_u,row:Rp,viewportColumns:$u,isRowSelected:N1,onCellClick:wu,onCellDoubleClick:ep,onCellContextMenu:Cp,rowClass:Fo,gridRowStart:Gm,height:Ol(_u),copiedCellIdx:xa!==null&&xa.row===Rp?Zs.findIndex(Du=>Du.key===xa.columnKey):void 0,selectedCellIdx:Wl===_u?na:void 0,draggedOverCellIdx:jm(_u),setDraggedOverRowIdx:cu?bp:void 0,lastFrozenColumnIndex:Sl,onRowChange:wp,selectCell:pp,selectedCellEditor:Hm(_u)}))}return Qs}(Ys.idx>Iu||Ys.rowIdx>yl)&&(vu({idx:-1,rowIdx:ou-1,mode:"SELECT"}),bp(void 0));let Vp=`repeat(${$l}, ${Ns}px)`;Zl>0&&(Vp+=` repeat(${Zl}, ${ws}px)`),no.length>0&&(Vp+=Rl),Dl>0&&(Vp+=` repeat(${Dl}, ${ws}px)`);const Z1=Ys.idx===-1&&Ys.rowIdx!==ou-1;return jsxRuntimeExports.jsxs("div",{role:Ss,"aria-label":Ho,"aria-labelledby":qo,"aria-describedby":Uo,"aria-multiselectable":Qo?!0:void 0,"aria-colcount":Zs.length,"aria-rowcount":Xo,className:clsx(rootClassname,Do,cu&&viewportDraggingClassname),style:{...jo,scrollPaddingInlineStart:Ys.idx>Sl||(Os==null?void 0:Os.idx)!==void 0?`${Su}px`:void 0,scrollPaddingBlock:Jp(Ys.rowIdx)||(Os==null?void 0:Os.rowIdx)!==void 0?`${qs+Zl*ws}px ${Dl*ws}px`:void 0,gridTemplateColumns:fu,gridTemplateRows:Vp,"--rdg-header-row-height":`${Ns}px`,"--rdg-summary-row-height":`${ws}px`,"--rdg-sign":zo?-1:1,...pu},dir:Ls,ref:Ks,onScroll:_p,onKeyDown:Op,"data-testid":Zo,children:[jsxRuntimeExports.jsx(DataGridDefaultRenderersProvider,{value:vs,children:jsxRuntimeExports.jsxs(RowSelectionChangeProvider,{value:hp,children:[jsxRuntimeExports.jsxs(RowSelectionProvider,{value:ys,children:[Array.from({length:mu},(Qs,na)=>jsxRuntimeExports.jsx(GroupedColumnHeaderRow$1,{rowIdx:na+1,level:-mu+na,columns:t1(ou+na),selectedCellIdx:Ys.rowIdx===ou+na?Ys.idx:void 0,selectCell:jp},na)),jsxRuntimeExports.jsx(HeaderRow$1,{rowIdx:$l,columns:t1(Fl),onColumnResize:Yu,onColumnsReorder:kp,sortColumns:po,onSortColumnsChange:fp,lastFrozenColumnIndex:Sl,selectedCellIdx:Ys.rowIdx===Fl?Ys.idx:void 0,selectCell:jp,shouldFocusGrid:!zu,direction:Ls})]}),no.length===0&&Bs?Bs:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[oo==null?void 0:oo.map((Qs,na)=>{const Wl=$l+1+na,Hl=Fl+1+na,Al=Ys.rowIdx===Hl,Il=qs+ws*na;return jsxRuntimeExports.jsx(SummaryRow$1,{"aria-rowindex":Wl,rowIdx:Hl,gridRowStart:Wl,row:Qs,top:Il,bottom:void 0,viewportColumns:t1(Hl),lastFrozenColumnIndex:Sl,selectedCellIdx:Al?Ys.idx:void 0,isTop:!0,showBorder:na===Zl-1,selectCell:pp},na)}),Vm(),io==null?void 0:io.map((Qs,na)=>{const Wl=lu+no.length+na+1,Hl=no.length+na,Al=Ys.rowIdx===Hl,Il=Ko>Us?Hs-ws*(io.length-na):void 0,bu=Il===void 0?ws*(io.length-1-na):void 0;return jsxRuntimeExports.jsx(SummaryRow$1,{"aria-rowindex":Xo-Dl+na+1,rowIdx:Hl,gridRowStart:Wl,row:Qs,top:Il,bottom:bu,viewportColumns:t1(Hl),lastFrozenColumnIndex:Sl,selectedCellIdx:Al?Ys.idx:void 0,isTop:!1,showBorder:na===0,selectCell:pp},na)})]})]})}),zm(),renderMeasuringCells(Ul),_h&&jsxRuntimeExports.jsx("div",{ref:qu,tabIndex:Z1?0:-1,className:clsx(focusSinkClassname,Z1&&[rowSelected,Sl!==-1&&rowSelectedWithFrozenCell],!Jp(Ys.rowIdx)&&focusSinkHeaderAndSummaryClassname),style:{gridRowStart:Ys.rowIdx+lu+1}}),Os!==null&&jsxRuntimeExports.jsx(ScrollToCell,{scrollToPosition:Os,setScrollToCellPosition:Vs,gridElement:Ks.current})]})}function getCellToScroll(eo){return eo.querySelector(':scope > [role="row"] > [tabindex="0"]')}function isSamePosition(eo,to){return eo.idx===to.idx&&eo.rowIdx===to.rowIdx}const DataGrid$1$1=reactExports.forwardRef(DataGrid$2),useGanttViewModel=()=>{const[eo]=useInjected(GanttViewModelToken);return eo},useGanttViewRows=()=>{const eo=useGanttViewModel();return useState(eo.rows$).toArray()},useToggleSubRows=()=>{const eo=useGanttViewModel();return reactExports.useCallback(to=>{eo.toggleRow(to)},[eo])},useTasksTimeBoundaries=()=>{const eo=useGanttViewModel();return[eo.startTime,eo.endTime]},useSelectedRow=()=>{const eo=useGanttViewModel();return useState(eo.selectedRowId$)},useSetSelectedRow=()=>{const eo=useGanttViewModel();return useSetState(eo.selectedRowId$)},GanttChartCell=({row:eo})=>{const[to,ro]=useTasksTimeBoundaries(),no=`${(eo.startTime-to)*100/(ro-to)}%`,oo=`${(ro-eo.endTime)*100/(ro-to)}%`,io=eo.children&&eo.children.length>0,so=eo.isExpanded;return jsxRuntimeExports.jsx("div",{style:{marginLeft:no,marginRight:oo,height:"100%",marginTop:4,marginBottom:4,display:"flex"},children:io&&!so?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(eo.children??[]).map((ao,lo)=>{const uo=`${(ao.endTime-ao.startTime)*100/(eo.endTime-eo.startTime)}%`;return jsxRuntimeExports.jsx("div",{style:{backgroundColor:ao.color??`rgba(0, 120, 212, ${1-.2*lo})`,width:uo}},ao.id)})}):jsxRuntimeExports.jsx("div",{style:{backgroundColor:eo.color??"rgba(0, 120, 212, 1)",width:"100%"}})})},NameCell=({row:eo})=>{const to=eo.children!==void 0&&eo.children.length>0,ro=eo.isExpanded,no=useToggleSubRows(),oo=reactExports.useCallback(io=>{io.preventDefault(),io.stopPropagation(),no(eo.id)},[eo.id,no]);return jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:4,paddingLeft:eo.level*24},children:[to?jsxRuntimeExports.jsx("div",{onClick:oo,role:"button",children:ro?"▼":"▶"}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),jsxRuntimeExports.jsx("div",{children:eo.node_name||eo.name})]})},defaultColumns=[{key:"name",name:"node name",resizable:!0,width:320,renderCell({row:eo}){return jsxRuntimeExports.jsx(NameCell,{row:eo})}},{key:"duration",name:"duration",resizable:!0,width:60,renderHeaderCell(){return jsxRuntimeExports.jsx("div",{style:{textAlign:"right"},children:"duration"})},renderCell({row:eo}){return jsxRuntimeExports.jsxs("div",{style:{textAlign:"right"},children:[Math.round((eo.endTime-eo.startTime)*1e3).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")," ","ms"]})}},{key:"ganttChart",name:"gantt-chart",renderCell({row:eo}){return jsxRuntimeExports.jsx(GanttChartCell,{row:eo})},renderHeaderCell:()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}],GanttGridView=({styles:eo,getColumns:to=ro=>ro})=>{const ro=useGanttViewRows(),no=useSetSelectedRow(),oo=useSelectedRow(),io=reactExports.useCallback(lo=>{const{row:uo}=lo;no(uo.id)},[no]),so=mergeStyles$1(eo==null?void 0:eo.grid,{borderBottom:"none",borderRight:"none"}),ao=reactExports.useCallback(lo=>mergeStyles$1(oo===lo.id?eo==null?void 0:eo.selectedRow:""),[oo,eo==null?void 0:eo.selectedRow]);return jsxRuntimeExports.jsx(DataGrid$1$1,{rows:ro,columns:to(defaultColumns),onCellClick:io,className:so,rowClass:ao})},Wrapper=({viewModel:eo,children:to})=>{const ro=createRegistry({name:"gantt-wrapper"}),no=reactExports.useCallback(oo=>{oo.register(GanttViewModelToken,{useValue:eo})},[eo]);return jsxRuntimeExports.jsx(ro,{onInitialize:no,children:to})};var GanttGridTheme=(eo=>(eo.Light="rdg-light",eo.Dark="rdg-dark",eo))(GanttGridTheme||{});const Gantt=({viewModel:eo,styles:to,getColumns:ro})=>jsxRuntimeExports.jsx(Wrapper,{viewModel:eo,children:jsxRuntimeExports.jsx(GanttGridView,{styles:to,getColumns:ro})}),TraceDetailTemplate=({trace:eo,JSONView:to})=>{const ro=mergeStyleSets({root:["api-call-detail",{padding:8,width:"100%",height:"100%",display:"flex",flexDirection:"column"}],header:["api-call-detail-header",{fontWeight:600,fontSize:20,lineHeight:28,marginBottom:16}],section:["api-call-detail-section",{display:"flex",flexDirection:"column",width:"85%",height:"auto",boxShadow:"rgba(0, 0, 0, 0.18) 0px 1.6px 3.6px 0px, rgba(0, 0, 0, 0.22) 0px 0.3px 0.9px 0px",marginBottom:16}],sectionTitle:["api-call-detail-section-title",{fontWeight:500,fontSize:16,marginTop:8,marginBottom:8,lineHeight:20,borderBottom:"1px inset #ccc",padding:"9px 12px"}],sectionContent:["api-call-detail-section-content",{padding:16,overflow:"auto",maxHeight:"600px"}],fieldTitle:["api-call-detail-field-title",{fontWeight:500,fontSize:14,lineHeight:20}],overviewContainer:["api-call-detail-overview-container",{display:"flex",flexDirection:"row"}],overviewColumn:["api-call-detail-overview-column",{display:"flex",flexGrow:1,flexDirection:"column"}]}),no=eo.node_name??eo.name??"",oo=getTokensUsageByRow(eo),io=eo.inputs??{},so=eo.output??{};return jsxRuntimeExports.jsxs("div",{className:ro.root,children:[jsxRuntimeExports.jsx("div",{className:ro.header,children:no}),jsxRuntimeExports.jsxs("div",{className:ro.section,children:[jsxRuntimeExports.jsx("div",{className:ro.sectionTitle,children:"Overview"}),jsxRuntimeExports.jsx("div",{className:ro.sectionContent,children:jsxRuntimeExports.jsxs("div",{className:ro.overviewContainer,children:[jsxRuntimeExports.jsxs("div",{className:ro.overviewColumn,children:[jsxRuntimeExports.jsx("div",{className:ro.fieldTitle,children:"total tokens"}),jsxRuntimeExports.jsx("div",{children:numberToDigitsString(oo.totalTokens)}),jsxRuntimeExports.jsx("div",{className:ro.fieldTitle,children:"prompt tokens"}),jsxRuntimeExports.jsx("div",{children:numberToDigitsString(oo.promptTokens)}),jsxRuntimeExports.jsx("div",{className:ro.fieldTitle,children:"completion tokens"}),jsxRuntimeExports.jsx("div",{children:numberToDigitsString(oo.completionTokens)})]}),jsxRuntimeExports.jsxs("div",{className:ro.overviewColumn,children:[jsxRuntimeExports.jsx("div",{className:ro.fieldTitle,children:"duration"}),jsxRuntimeExports.jsx("div",{children:eo.end_time&&eo.start_time?`${Math.round((eo.end_time-eo.start_time)*1e3).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")} ms`:"N/A"}),jsxRuntimeExports.jsx("div",{className:ro.fieldTitle,children:"started at"}),jsxRuntimeExports.jsx("div",{children:eo.start_time?timePDTFormatter(eo.start_time*1e3):"N/A"}),jsxRuntimeExports.jsx("div",{className:ro.fieldTitle,children:"finished at"}),jsxRuntimeExports.jsx("div",{children:eo.end_time?timePDTFormatter(eo.end_time*1e3):"N/A"})]})]})})]}),jsxRuntimeExports.jsxs("div",{className:ro.section,children:[jsxRuntimeExports.jsx("div",{className:ro.sectionTitle,children:"Inputs"}),jsxRuntimeExports.jsx("div",{className:ro.sectionContent,children:jsxRuntimeExports.jsx(to,{src:io})})]}),jsxRuntimeExports.jsxs("div",{className:ro.section,children:[jsxRuntimeExports.jsx("div",{className:ro.sectionTitle,children:"Outputs"}),jsxRuntimeExports.jsx("div",{className:ro.sectionContent,children:jsxRuntimeExports.jsx(to,{src:so})})]})]})},traceMap=new Map,hashTraceName=eo=>{let to=0,ro=0;if(eo.length===0)return to;for(let no=0;noeo.map(to=>{const ro=uuid_1.v4();return traceMap.set(ro,to),{startTime:to.start_time??performance.now(),endTime:to.end_time??performance.now(),color:SystemColors[hashTraceName(to.name??"")%systemColorsLength],id:ro,name:to.name??"",node_name:to.node_name??"",output:to.output??[],children:to.children?parseTrace(to.children):void 0}}),DefaultGridContainer=({children:eo,className:to})=>jsxRuntimeExports.jsx(Resizable,{enable:{right:!0},className:to,defaultSize:{width:"50%",height:"100%"},children:eo}),DefaultContainer=({children:eo,className:to})=>jsxRuntimeExports.jsx("div",{className:to,children:eo}),ApiLogs=reactExports.forwardRef(({traces:eo,styles:to,isDarkMode:ro=!1,classNames:no,RootContainer:oo=DefaultContainer,GridContainer:io=DefaultGridContainer,DetailContainer:so=DefaultContainer,renderDetail:ao=fo=>jsxRuntimeExports.jsx(TraceDetailTemplate,{JSONView:ho=>jsxRuntimeExports.jsx("pre",{children:JSON.stringify(ho)}),trace:fo}),onChangeSelectedTrace:lo,renderUnselectedHint:uo=()=>jsxRuntimeExports.jsx("div",{children:"Click on a row to see details"})},co)=>{const fo=reactExports.useMemo(()=>eo.reduce((wo,Co)=>[...wo,...parseTrace(Co)],[]),[eo]),ho=reactExports.useMemo(()=>new GanttViewModel,[]);reactExports.useEffect(()=>{ho.setTasks(fo)},[fo,ho]);const po=useState(ho.selectedRowId$),go=useSetState(ho.selectedRowId$),vo=reactExports.useMemo(()=>po?traceMap.get(po):void 0,[po]),bo=reactExports.useMemo(()=>({...to,grid:mergeStyles$1(to==null?void 0:to.grid,ro?GanttGridTheme.Dark:GanttGridTheme.Light)}),[to,ro]),xo=mergeStyles$1({display:"flex",height:"100%",borderTop:"1px solid #ccc"},no==null?void 0:no.root),_o=mergeStyles$1({height:"100%",width:"100%",padding:16,borderRight:"1px solid #ccc"},no==null?void 0:no.gridContainer),Eo=mergeStyles$1({height:"100%",width:"100%",padding:8},no==null?void 0:no.detailContainer),So=reactExports.useCallback(wo=>{var Oo;const Co=(Oo=fo.find(Ao=>Ao.node_name===wo))==null?void 0:Oo.id;Co&&go(Co)},[fo,go]);reactExports.useImperativeHandle(co,()=>({setSelectedTraceRow:So})),reactExports.useEffect(()=>{lo&&lo(vo)},[lo,vo]),reactExports.useEffect(()=>{go(void 0)},[eo]);const To=reactExports.useCallback(wo=>{const Co={key:"token",name:"token",resizable:!0,width:60,renderHeaderCell(){return jsxRuntimeExports.jsx("div",{style:{textAlign:"right"},children:"Tokens"})},renderCell({row:Ro}){const No=getTokensUsageByRow(Ro),Mo=`prompt tokens: ${numberToDigitsString(No.promptTokens)}, + completion tokens: ${No.completionTokens}`;return jsxRuntimeExports.jsx("div",{style:{textAlign:"right"},title:Mo,children:numberToDigitsString(No.totalTokens)})}},[Oo,...Ao]=wo;return[Oo,Co,...Ao]},[]);return jsxRuntimeExports.jsxs(oo,{className:xo,children:[jsxRuntimeExports.jsx(io,{className:_o,children:jsxRuntimeExports.jsx(Gantt,{viewModel:ho,styles:bo,getColumns:To})}),jsxRuntimeExports.jsx(so,{className:Eo,children:vo?ao(vo):uo()})]})});ApiLogs.displayName="ApiLogs";const $global=function(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof self<"u")return self;if(typeof window<"u")return window;try{return new Function("return this")()}catch{return{}}}();$global.trustedTypes===void 0&&($global.trustedTypes={createPolicy:(eo,to)=>to});const propConfig={configurable:!1,enumerable:!1,writable:!1};$global.FAST===void 0&&Reflect.defineProperty($global,"FAST",Object.assign({value:Object.create(null)},propConfig));const FAST=$global.FAST;if(FAST.getById===void 0){const eo=Object.create(null);Reflect.defineProperty(FAST,"getById",Object.assign({value(to,ro){let no=eo[to];return no===void 0&&(no=ro?eo[to]=ro():null),no}},propConfig))}const emptyArray=Object.freeze([]);function createMetadataLocator(){const eo=new WeakMap;return function(to){let ro=eo.get(to);if(ro===void 0){let no=Reflect.getPrototypeOf(to);for(;ro===void 0&&no!==null;)ro=eo.get(no),no=Reflect.getPrototypeOf(no);ro=ro===void 0?[]:ro.slice(0),eo.set(to,ro)}return ro}}const updateQueue=$global.FAST.getById(1,()=>{const eo=[],to=[];function ro(){if(to.length)throw to.shift()}function no(so){try{so.call()}catch(ao){to.push(ao),setTimeout(ro,0)}}function oo(){let ao=0;for(;ao1024){for(let lo=0,uo=eo.length-ao;loeo});let htmlPolicy=fastHTMLPolicy;const marker=`fast-${Math.random().toString(36).substring(2,8)}`,_interpolationStart=`${marker}{`,_interpolationEnd=`}${marker}`,DOM=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(eo){if(htmlPolicy!==fastHTMLPolicy)throw new Error("The HTML policy can only be set once.");htmlPolicy=eo},createHTML(eo){return htmlPolicy.createHTML(eo)},isMarker(eo){return eo&&eo.nodeType===8&&eo.data.startsWith(marker)},extractDirectiveIndexFromMarker(eo){return parseInt(eo.data.replace(`${marker}:`,""))},createInterpolationPlaceholder(eo){return`${_interpolationStart}${eo}${_interpolationEnd}`},createCustomAttributePlaceholder(eo,to){return`${eo}="${this.createInterpolationPlaceholder(to)}"`},createBlockPlaceholder(eo){return``},queueUpdate:updateQueue.enqueue,processUpdates:updateQueue.process,nextUpdate(){return new Promise(updateQueue.enqueue)},setAttribute(eo,to,ro){ro==null?eo.removeAttribute(to):eo.setAttribute(to,ro)},setBooleanAttribute(eo,to,ro){ro?eo.setAttribute(to,""):eo.removeAttribute(to)},removeChildNodes(eo){for(let to=eo.firstChild;to!==null;to=eo.firstChild)eo.removeChild(to)},createTemplateWalker(eo){return document.createTreeWalker(eo,133,null,!1)}});class SubscriberSet{constructor(to,ro){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=to,this.sub1=ro}has(to){return this.spillover===void 0?this.sub1===to||this.sub2===to:this.spillover.indexOf(to)!==-1}subscribe(to){const ro=this.spillover;if(ro===void 0){if(this.has(to))return;if(this.sub1===void 0){this.sub1=to;return}if(this.sub2===void 0){this.sub2=to;return}this.spillover=[this.sub1,this.sub2,to],this.sub1=void 0,this.sub2=void 0}else ro.indexOf(to)===-1&&ro.push(to)}unsubscribe(to){const ro=this.spillover;if(ro===void 0)this.sub1===to?this.sub1=void 0:this.sub2===to&&(this.sub2=void 0);else{const no=ro.indexOf(to);no!==-1&&ro.splice(no,1)}}notify(to){const ro=this.spillover,no=this.source;if(ro===void 0){const oo=this.sub1,io=this.sub2;oo!==void 0&&oo.handleChange(no,to),io!==void 0&&io.handleChange(no,to)}else for(let oo=0,io=ro.length;oo{const eo=/(:|&&|\|\||if)/,to=new WeakMap,ro=DOM.queueUpdate;let no,oo=uo=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function io(uo){let co=uo.$fastController||to.get(uo);return co===void 0&&(Array.isArray(uo)?co=oo(uo):to.set(uo,co=new PropertyChangeNotifier(uo))),co}const so=createMetadataLocator();class ao{constructor(co){this.name=co,this.field=`_${co}`,this.callback=`${co}Changed`}getValue(co){return no!==void 0&&no.watch(co,this.name),co[this.field]}setValue(co,fo){const ho=this.field,po=co[ho];if(po!==fo){co[ho]=fo;const go=co[this.callback];typeof go=="function"&&go.call(co,po,fo),io(co).notify(this.name)}}}class lo extends SubscriberSet{constructor(co,fo,ho=!1){super(co,fo),this.binding=co,this.isVolatileBinding=ho,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(co,fo){this.needsRefresh&&this.last!==null&&this.disconnect();const ho=no;no=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const po=this.binding(co,fo);return no=ho,po}disconnect(){if(this.last!==null){let co=this.first;for(;co!==void 0;)co.notifier.unsubscribe(this,co.propertyName),co=co.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(co,fo){const ho=this.last,po=io(co),go=ho===null?this.first:{};if(go.propertySource=co,go.propertyName=fo,go.notifier=po,po.subscribe(this,fo),ho!==null){if(!this.needsRefresh){let vo;no=void 0,vo=ho.propertySource[ho.propertyName],no=this,co===vo&&(this.needsRefresh=!0)}ho.next=go}this.last=go}handleChange(){this.needsQueue&&(this.needsQueue=!1,ro(this))}call(){this.last!==null&&(this.needsQueue=!0,this.notify(this))}records(){let co=this.first;return{next:()=>{const fo=co;return fo===void 0?{value:void 0,done:!0}:(co=co.next,{value:fo,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(uo){oo=uo},getNotifier:io,track(uo,co){no!==void 0&&no.watch(uo,co)},trackVolatile(){no!==void 0&&(no.needsRefresh=!0)},notify(uo,co){io(uo).notify(co)},defineProperty(uo,co){typeof co=="string"&&(co=new ao(co)),so(uo).push(co),Reflect.defineProperty(uo,co.name,{enumerable:!0,get:function(){return co.getValue(this)},set:function(fo){co.setValue(this,fo)}})},getAccessors:so,binding(uo,co,fo=this.isVolatileBinding(uo)){return new lo(uo,co,fo)},isVolatileBinding(uo){return eo.test(uo.toString())}})});function observable(eo,to){Observable$1.defineProperty(eo,to)}function volatile(eo,to,ro){return Object.assign({},ro,{get:function(){return Observable$1.trackVolatile(),ro.get.apply(this)}})}const contextEvent=FAST.getById(3,()=>{let eo=null;return{get(){return eo},set(to){eo=to}}});class ExecutionContext{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return contextEvent.get()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(to){contextEvent.set(to)}}Observable$1.defineProperty(ExecutionContext.prototype,"index");Observable$1.defineProperty(ExecutionContext.prototype,"length");const defaultExecutionContext=Object.seal(new ExecutionContext);class HTMLDirective{constructor(){this.targetIndex=0}}class TargetedHTMLDirective extends HTMLDirective{constructor(){super(...arguments),this.createPlaceholder=DOM.createInterpolationPlaceholder}}class AttachedBehaviorHTMLDirective extends HTMLDirective{constructor(to,ro,no){super(),this.name=to,this.behavior=ro,this.options=no}createPlaceholder(to){return DOM.createCustomAttributePlaceholder(this.name,to)}createBehavior(to){return new this.behavior(to,this.options)}}function normalBind(eo,to){this.source=eo,this.context=to,this.bindingObserver===null&&(this.bindingObserver=Observable$1.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(eo,to))}function triggerBind(eo,to){this.source=eo,this.context=to,this.target.addEventListener(this.targetName,this)}function normalUnbind(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function contentUnbind(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const eo=this.target.$fastView;eo!==void 0&&eo.isComposed&&(eo.unbind(),eo.needsBindOnly=!0)}function triggerUnbind(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function updateAttributeTarget(eo){DOM.setAttribute(this.target,this.targetName,eo)}function updateBooleanAttributeTarget(eo){DOM.setBooleanAttribute(this.target,this.targetName,eo)}function updateContentTarget(eo){if(eo==null&&(eo=""),eo.create){this.target.textContent="";let to=this.target.$fastView;to===void 0?to=eo.create():this.target.$fastTemplate!==eo&&(to.isComposed&&(to.remove(),to.unbind()),to=eo.create()),to.isComposed?to.needsBindOnly&&(to.needsBindOnly=!1,to.bind(this.source,this.context)):(to.isComposed=!0,to.bind(this.source,this.context),to.insertBefore(this.target),this.target.$fastView=to,this.target.$fastTemplate=eo)}else{const to=this.target.$fastView;to!==void 0&&to.isComposed&&(to.isComposed=!1,to.remove(),to.needsBindOnly?to.needsBindOnly=!1:to.unbind()),this.target.textContent=eo}}function updatePropertyTarget(eo){this.target[this.targetName]=eo}function updateClassTarget(eo){const to=this.classVersions||Object.create(null),ro=this.target;let no=this.version||0;if(eo!=null&&eo.length){const oo=eo.split(/\s+/);for(let io=0,so=oo.length;ioDOM.createHTML(ro(no,oo))}break;case"?":this.cleanedTargetName=to.substr(1),this.updateTarget=updateBooleanAttributeTarget;break;case"@":this.cleanedTargetName=to.substr(1),this.bind=triggerBind,this.unbind=triggerUnbind;break;default:this.cleanedTargetName=to,to==="class"&&(this.updateTarget=updateClassTarget);break}}targetAtContent(){this.updateTarget=updateContentTarget,this.unbind=contentUnbind}createBehavior(to){return new BindingBehavior(to,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class BindingBehavior{constructor(to,ro,no,oo,io,so,ao){this.source=null,this.context=null,this.bindingObserver=null,this.target=to,this.binding=ro,this.isBindingVolatile=no,this.bind=oo,this.unbind=io,this.updateTarget=so,this.targetName=ao}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(to){ExecutionContext.setEvent(to);const ro=this.binding(this.source,this.context);ExecutionContext.setEvent(null),ro!==!0&&to.preventDefault()}}let sharedContext=null;class CompilationContext{addFactory(to){to.targetIndex=this.targetIndex,this.behaviorFactories.push(to)}captureContentBinding(to){to.targetAtContent(),this.addFactory(to)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){sharedContext=this}static borrow(to){const ro=sharedContext||new CompilationContext;return ro.directives=to,ro.reset(),sharedContext=null,ro}}function createAggregateBinding(eo){if(eo.length===1)return eo[0];let to;const ro=eo.length,no=eo.map(so=>typeof so=="string"?()=>so:(to=so.targetName||to,so.binding)),oo=(so,ao)=>{let lo="";for(let uo=0;uoao),uo.targetName=so.name):uo=createAggregateBinding(lo),uo!==null&&(to.removeAttributeNode(so),oo--,io--,eo.addFactory(uo))}}function compileContent(eo,to,ro){const no=parseContent(eo,to.textContent);if(no!==null){let oo=to;for(let io=0,so=no.length;io0}const ro=this.fragment.cloneNode(!0),no=this.viewBehaviorFactories,oo=new Array(this.behaviorCount),io=DOM.createTemplateWalker(ro);let so=0,ao=this.targetOffset,lo=io.nextNode();for(let uo=no.length;so=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function html(eo,...to){const ro=[];let no="";for(let oo=0,io=eo.length-1;oolo}if(typeof ao=="function"&&(ao=new HTMLBindingDirective(ao)),ao instanceof TargetedHTMLDirective){const lo=lastAttributeNameRegex.exec(so);lo!==null&&(ao.targetName=lo[2])}ao instanceof HTMLDirective?(no+=ao.createPlaceholder(ro.length),ro.push(ao)):no+=ao}return no+=eo[eo.length-1],new ViewTemplate(no,ro)}class ElementStyles{constructor(){this.targets=new WeakSet}addStylesTo(to){this.targets.add(to)}removeStylesFrom(to){this.targets.delete(to)}isAttachedTo(to){return this.targets.has(to)}withBehaviors(...to){return this.behaviors=this.behaviors===null?to:this.behaviors.concat(to),this}}ElementStyles.create=(()=>{if(DOM.supportsAdoptedStyleSheets){const eo=new Map;return to=>new AdoptedStyleSheetsStyles(to,eo)}return eo=>new StyleElementStyles(eo)})();function reduceStyles(eo){return eo.map(to=>to instanceof ElementStyles?reduceStyles(to.styles):[to]).reduce((to,ro)=>to.concat(ro),[])}function reduceBehaviors(eo){return eo.map(to=>to instanceof ElementStyles?to.behaviors:null).reduce((to,ro)=>ro===null?to:(to===null&&(to=[]),to.concat(ro)),null)}let addAdoptedStyleSheets=(eo,to)=>{eo.adoptedStyleSheets=[...eo.adoptedStyleSheets,...to]},removeAdoptedStyleSheets=(eo,to)=>{eo.adoptedStyleSheets=eo.adoptedStyleSheets.filter(ro=>to.indexOf(ro)===-1)};if(DOM.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),addAdoptedStyleSheets=(eo,to)=>{eo.adoptedStyleSheets.push(...to)},removeAdoptedStyleSheets=(eo,to)=>{for(const ro of to){const no=eo.adoptedStyleSheets.indexOf(ro);no!==-1&&eo.adoptedStyleSheets.splice(no,1)}}}catch{}class AdoptedStyleSheetsStyles extends ElementStyles{constructor(to,ro){super(),this.styles=to,this.styleSheetCache=ro,this._styleSheets=void 0,this.behaviors=reduceBehaviors(to)}get styleSheets(){if(this._styleSheets===void 0){const to=this.styles,ro=this.styleSheetCache;this._styleSheets=reduceStyles(to).map(no=>{if(no instanceof CSSStyleSheet)return no;let oo=ro.get(no);return oo===void 0&&(oo=new CSSStyleSheet,oo.replaceSync(no),ro.set(no,oo)),oo})}return this._styleSheets}addStylesTo(to){addAdoptedStyleSheets(to,this.styleSheets),super.addStylesTo(to)}removeStylesFrom(to){removeAdoptedStyleSheets(to,this.styleSheets),super.removeStylesFrom(to)}}let styleClassId=0;function getNextStyleClass(){return`fast-style-class-${++styleClassId}`}class StyleElementStyles extends ElementStyles{constructor(to){super(),this.styles=to,this.behaviors=null,this.behaviors=reduceBehaviors(to),this.styleSheets=reduceStyles(to),this.styleClass=getNextStyleClass()}addStylesTo(to){const ro=this.styleSheets,no=this.styleClass;to=this.normalizeTarget(to);for(let oo=0;oo{no.add(to);const oo=to[this.fieldName];switch(ro){case"reflect":const io=this.converter;DOM.setAttribute(to,this.attribute,io!==void 0?io.toView(oo):oo);break;case"boolean":DOM.setBooleanAttribute(to,this.attribute,oo);break}no.delete(to)})}static collect(to,...ro){const no=[];ro.push(AttributeConfiguration.locate(to));for(let oo=0,io=ro.length;oo1&&(ro.property=io),AttributeConfiguration.locate(oo.constructor).push(ro)}if(arguments.length>1){ro={},no(eo,to);return}return ro=eo===void 0?{}:eo,no}const defaultShadowOptions={mode:"open"},defaultElementOptions={},fastRegistry=FAST.getById(4,()=>{const eo=new Map;return Object.freeze({register(to){return eo.has(to.type)?!1:(eo.set(to.type,to),!0)},getByType(to){return eo.get(to)}})});class FASTElementDefinition{constructor(to,ro=to.definition){typeof ro=="string"&&(ro={name:ro}),this.type=to,this.name=ro.name,this.template=ro.template;const no=AttributeDefinition.collect(to,ro.attributes),oo=new Array(no.length),io={},so={};for(let ao=0,lo=no.length;ao0){const io=this.boundObservables=Object.create(null);for(let so=0,ao=oo.length;so0||ro>0;){if(to===0){oo.push(EDIT_ADD),ro--;continue}if(ro===0){oo.push(EDIT_DELETE),to--;continue}const io=eo[to-1][ro-1],so=eo[to-1][ro],ao=eo[to][ro-1];let lo;so=0){eo.splice(ao,1),ao--,so-=lo.addedCount-lo.removed.length,oo.addedCount+=lo.addedCount-uo;const co=oo.removed.length+lo.removed.length-uo;if(!oo.addedCount&&!co)io=!0;else{let fo=lo.removed;if(oo.indexlo.index+lo.addedCount){const ho=oo.removed.slice(lo.index+lo.addedCount-oo.index);$push.apply(fo,ho)}oo.removed=fo,lo.indexno?ro=no-eo.addedCount:ro<0&&(ro=no+eo.removed.length+ro-eo.addedCount),ro<0&&(ro=0),eo.index=ro,eo}class ArrayObserver extends SubscriberSet{constructor(to){super(to),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(to,"$fastController",{value:this,enumerable:!1})}subscribe(to){this.flush(),super.subscribe(to)}addSplice(to){this.splices===void 0?this.splices=[to]:this.splices.push(to),this.needsQueue&&(this.needsQueue=!1,DOM.queueUpdate(this))}reset(to){this.oldCollection=to,this.needsQueue&&(this.needsQueue=!1,DOM.queueUpdate(this))}flush(){const to=this.splices,ro=this.oldCollection;if(to===void 0&&ro===void 0)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const no=ro===void 0?projectArraySplices(this.source,to):calcSplices(this.source,0,this.source.length,ro,0,ro.length);this.notify(no)}}function enableArrayObservation(){if(arrayObservationEnabled)return;arrayObservationEnabled=!0,Observable$1.setArrayObserverFactory(lo=>new ArrayObserver(lo));const eo=Array.prototype;if(eo.$fastPatch)return;Reflect.defineProperty(eo,"$fastPatch",{value:1,enumerable:!1});const to=eo.pop,ro=eo.push,no=eo.reverse,oo=eo.shift,io=eo.sort,so=eo.splice,ao=eo.unshift;eo.pop=function(){const lo=this.length>0,uo=to.apply(this,arguments),co=this.$fastController;return co!==void 0&&lo&&co.addSplice(newSplice(this.length,[uo],0)),uo},eo.push=function(){const lo=ro.apply(this,arguments),uo=this.$fastController;return uo!==void 0&&uo.addSplice(adjustIndex(newSplice(this.length-arguments.length,[],arguments.length),this)),lo},eo.reverse=function(){let lo;const uo=this.$fastController;uo!==void 0&&(uo.flush(),lo=this.slice());const co=no.apply(this,arguments);return uo!==void 0&&uo.reset(lo),co},eo.shift=function(){const lo=this.length>0,uo=oo.apply(this,arguments),co=this.$fastController;return co!==void 0&&lo&&co.addSplice(newSplice(0,[uo],0)),uo},eo.sort=function(){let lo;const uo=this.$fastController;uo!==void 0&&(uo.flush(),lo=this.slice());const co=io.apply(this,arguments);return uo!==void 0&&uo.reset(lo),co},eo.splice=function(){const lo=so.apply(this,arguments),uo=this.$fastController;return uo!==void 0&&uo.addSplice(adjustIndex(newSplice(+arguments[0],lo,arguments.length>2?arguments.length-2:0),this)),lo},eo.unshift=function(){const lo=ao.apply(this,arguments),uo=this.$fastController;return uo!==void 0&&uo.addSplice(adjustIndex(newSplice(0,[],arguments.length),this)),lo}}class RefBehavior{constructor(to,ro){this.target=to,this.propertyName=ro}bind(to){to[this.propertyName]=this.target}unbind(){}}function ref(eo){return new AttachedBehaviorHTMLDirective("fast-ref",RefBehavior,eo)}const isFunction$1=eo=>typeof eo=="function",noTemplate=()=>null;function normalizeBinding(eo){return eo===void 0?noTemplate:isFunction$1(eo)?eo:()=>eo}function when(eo,to,ro){const no=isFunction$1(eo)?eo:()=>eo,oo=normalizeBinding(to),io=normalizeBinding(ro);return(so,ao)=>no(so,ao)?oo(so,ao):io(so,ao)}function bindWithoutPositioning(eo,to,ro,no){eo.bind(to[ro],no)}function bindWithPositioning(eo,to,ro,no){const oo=Object.create(no);oo.index=ro,oo.length=to.length,eo.bind(to[ro],oo)}class RepeatBehavior{constructor(to,ro,no,oo,io,so){this.location=to,this.itemsBinding=ro,this.templateBinding=oo,this.options=so,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=bindWithoutPositioning,this.itemsBindingObserver=Observable$1.binding(ro,this,no),this.templateBindingObserver=Observable$1.binding(oo,this,io),so.positioning&&(this.bindView=bindWithPositioning)}bind(to,ro){this.source=to,this.originalContext=ro,this.childContext=Object.create(ro),this.childContext.parent=to,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(to,this.originalContext),this.template=this.templateBindingObserver.observe(to,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,this.itemsObserver!==null&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(to,ro){to===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):to===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(ro)}observeItems(to=!1){if(!this.items){this.items=emptyArray;return}const ro=this.itemsObserver,no=this.itemsObserver=Observable$1.getNotifier(this.items),oo=ro!==no;oo&&ro!==null&&ro.unsubscribe(this),(oo||to)&&no.subscribe(this)}updateViews(to){const ro=this.childContext,no=this.views,oo=this.bindView,io=this.items,so=this.template,ao=this.options.recycle,lo=[];let uo=0,co=0;for(let fo=0,ho=to.length;fo0?(vo<=Eo&&_o.length>0?(wo=_o[vo],vo++):(wo=lo[uo],uo++),co--):wo=so.create(),no.splice(bo,0,wo),oo(wo,io,bo,ro),wo.insertBefore(To)}_o[vo]&&lo.push(..._o.slice(vo))}for(let fo=uo,ho=lo.length;fono.name===ro),this.source=to,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(emptyArray),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let to=this.getNodes();return this.options.filter!==void 0&&(to=to.filter(this.options.filter)),to}updateTarget(to){this.source[this.options.property]=to}}class SlottedBehavior extends NodeObservationBehavior{constructor(to,ro){super(to,ro)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}}function slotted(eo){return typeof eo=="string"&&(eo={property:eo}),new AttachedBehaviorHTMLDirective("fast-slotted",SlottedBehavior,eo)}class ChildrenBehavior extends NodeObservationBehavior{constructor(to,ro){super(to,ro),this.observer=null,ro.childList=!0}observe(){this.observer===null&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function children(eo){return typeof eo=="string"&&(eo={property:eo}),new AttachedBehaviorHTMLDirective("fast-children",ChildrenBehavior,eo)}class StartEnd{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}}const endSlotTemplate=(eo,to)=>html` + to.end?"end":void 0} + > + + ${to.end||""} + + +`,startSlotTemplate=(eo,to)=>html` + + + ${to.start||""} + + +`;html` + + + +`;html` + + + +`;/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function __decorate(eo,to,ro,no){var oo=arguments.length,io=oo<3?to:no===null?no=Object.getOwnPropertyDescriptor(to,ro):no,so;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")io=Reflect.decorate(eo,to,ro,no);else for(var ao=eo.length-1;ao>=0;ao--)(so=eo[ao])&&(io=(oo<3?so(io):oo>3?so(to,ro,io):so(to,ro))||io);return oo>3&&io&&Object.defineProperty(to,ro,io),io}const metadataByTarget=new Map;"metadata"in Reflect||(Reflect.metadata=function(eo,to){return function(ro){Reflect.defineMetadata(eo,to,ro)}},Reflect.defineMetadata=function(eo,to,ro){let no=metadataByTarget.get(ro);no===void 0&&metadataByTarget.set(ro,no=new Map),no.set(eo,to)},Reflect.getOwnMetadata=function(eo,to){const ro=metadataByTarget.get(to);if(ro!==void 0)return ro.get(eo)});class ResolverBuilder{constructor(to,ro){this.container=to,this.key=ro}instance(to){return this.registerResolver(0,to)}singleton(to){return this.registerResolver(1,to)}transient(to){return this.registerResolver(2,to)}callback(to){return this.registerResolver(3,to)}cachedCallback(to){return this.registerResolver(3,cacheCallbackResult(to))}aliasTo(to){return this.registerResolver(5,to)}registerResolver(to,ro){const{container:no,key:oo}=this;return this.container=this.key=void 0,no.registerResolver(oo,new ResolverImpl(oo,to,ro))}}function cloneArrayWithPossibleProps(eo){const to=eo.slice(),ro=Object.keys(eo),no=ro.length;let oo;for(let io=0;ionull,responsibleForOwnerRequests:!1,defaultResolver:DefaultResolver.singleton})}),dependencyLookup=new Map;function getParamTypes(eo){return to=>Reflect.getOwnMetadata(eo,to)}let rootDOMContainer=null;const DI=Object.freeze({createContainer(eo){return new ContainerImpl(null,Object.assign({},ContainerConfiguration.default,eo))},findResponsibleContainer(eo){const to=eo.$$container$$;return to&&to.responsibleForOwnerRequests?to:DI.findParentContainer(eo)},findParentContainer(eo){const to=new CustomEvent(DILocateParentEventType,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return eo.dispatchEvent(to),to.detail.container||DI.getOrCreateDOMContainer()},getOrCreateDOMContainer(eo,to){return eo?eo.$$container$$||new ContainerImpl(eo,Object.assign({},ContainerConfiguration.default,to,{parentLocator:DI.findParentContainer})):rootDOMContainer||(rootDOMContainer=new ContainerImpl(null,Object.assign({},ContainerConfiguration.default,to,{parentLocator:()=>null})))},getDesignParamtypes:getParamTypes("design:paramtypes"),getAnnotationParamtypes:getParamTypes("di:paramtypes"),getOrCreateAnnotationParamTypes(eo){let to=this.getAnnotationParamtypes(eo);return to===void 0&&Reflect.defineMetadata("di:paramtypes",to=[],eo),to},getDependencies(eo){let to=dependencyLookup.get(eo);if(to===void 0){const ro=eo.inject;if(ro===void 0){const no=DI.getDesignParamtypes(eo),oo=DI.getAnnotationParamtypes(eo);if(no===void 0)if(oo===void 0){const io=Object.getPrototypeOf(eo);typeof io=="function"&&io!==Function.prototype?to=cloneArrayWithPossibleProps(DI.getDependencies(io)):to=[]}else to=cloneArrayWithPossibleProps(oo);else if(oo===void 0)to=cloneArrayWithPossibleProps(no);else{to=cloneArrayWithPossibleProps(no);let io=oo.length,so;for(let uo=0;uo{const co=DI.findResponsibleContainer(this).get(ro),fo=this[oo];co!==fo&&(this[oo]=io,ao.notify(to))};ao.subscribe({handleChange:lo},"isConnected")}return io}})},createInterface(eo,to){const ro=typeof eo=="function"?eo:to,no=typeof eo=="string"?eo:eo&&"friendlyName"in eo&&eo.friendlyName||defaultFriendlyName,oo=typeof eo=="string"?!1:eo&&"respectConnection"in eo&&eo.respectConnection||!1,io=function(so,ao,lo){if(so==null||new.target!==void 0)throw new Error(`No registration for interface: '${io.friendlyName}'`);if(ao)DI.defineProperty(so,ao,io,oo);else{const uo=DI.getOrCreateAnnotationParamTypes(so);uo[lo]=io}};return io.$isInterface=!0,io.friendlyName=no??"(anonymous)",ro!=null&&(io.register=function(so,ao){return ro(new ResolverBuilder(so,ao??io))}),io.toString=function(){return`InterfaceSymbol<${io.friendlyName}>`},io},inject(...eo){return function(to,ro,no){if(typeof no=="number"){const oo=DI.getOrCreateAnnotationParamTypes(to),io=eo[0];io!==void 0&&(oo[no]=io)}else if(ro)DI.defineProperty(to,ro,eo[0]);else{const oo=no?DI.getOrCreateAnnotationParamTypes(no.value):DI.getOrCreateAnnotationParamTypes(to);let io;for(let so=0;so{no.composedPath()[0]!==this.owner&&(no.detail.container=this,no.stopImmediatePropagation())})}get parent(){return this._parent===void 0&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return this.parent===null?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(to,...ro){return this.context=to,this.register(...ro),this.context=null,this}register(...to){if(++this.registerDepth===100)throw new Error("Unable to autoregister dependency");let ro,no,oo,io,so;const ao=this.context;for(let lo=0,uo=to.length;lothis}))}jitRegister(to,ro){if(typeof to!="function")throw new Error(`Attempted to jitRegister something that is not a constructor: '${to}'. Did you forget to register this dependency?`);if(InstrinsicTypeNames.has(to.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${to.name}. Did you forget to add @inject(Key)`);if(isRegistry(to)){const no=to.register(ro);if(!(no instanceof Object)||no.resolve==null){const oo=ro.resolvers.get(to);if(oo!=null)return oo;throw new Error("A valid resolver was not returned from the static register method")}return no}else{if(to.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${to.friendlyName}`);{const no=this.config.defaultResolver(to,ro);return ro.resolvers.set(to,no),no}}}}const cache$1=new WeakMap;function cacheCallbackResult(eo){return function(to,ro,no){if(cache$1.has(no))return cache$1.get(no);const oo=eo(to,ro,no);return cache$1.set(no,oo),oo}}const Registration=Object.freeze({instance(eo,to){return new ResolverImpl(eo,0,to)},singleton(eo,to){return new ResolverImpl(eo,1,to)},transient(eo,to){return new ResolverImpl(eo,2,to)},callback(eo,to){return new ResolverImpl(eo,3,to)},cachedCallback(eo,to){return new ResolverImpl(eo,3,cacheCallbackResult(to))},aliasTo(eo,to){return new ResolverImpl(to,5,eo)}});function validateKey(eo){if(eo==null)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function buildAllResponse(eo,to,ro){if(eo instanceof ResolverImpl&&eo.strategy===4){const no=eo.state;let oo=no.length;const io=new Array(oo);for(;oo--;)io[oo]=no[oo].resolve(to,ro);return io}return[eo.resolve(to,ro)]}const defaultFriendlyName="(anonymous)";function isObject$3(eo){return typeof eo=="object"&&eo!==null||typeof eo=="function"}const isNativeFunction=function(){const eo=new WeakMap;let to=!1,ro="",no=0;return function(oo){return to=eo.get(oo),to===void 0&&(ro=oo.toString(),no=ro.length,to=no>=29&&no<=100&&ro.charCodeAt(no-1)===125&&ro.charCodeAt(no-2)<=32&&ro.charCodeAt(no-3)===93&&ro.charCodeAt(no-4)===101&&ro.charCodeAt(no-5)===100&&ro.charCodeAt(no-6)===111&&ro.charCodeAt(no-7)===99&&ro.charCodeAt(no-8)===32&&ro.charCodeAt(no-9)===101&&ro.charCodeAt(no-10)===118&&ro.charCodeAt(no-11)===105&&ro.charCodeAt(no-12)===116&&ro.charCodeAt(no-13)===97&&ro.charCodeAt(no-14)===110&&ro.charCodeAt(no-15)===88,eo.set(oo,to)),to}}(),isNumericLookup={};function isArrayIndex(eo){switch(typeof eo){case"number":return eo>=0&&(eo|0)===eo;case"string":{const to=isNumericLookup[eo];if(to!==void 0)return to;const ro=eo.length;if(ro===0)return isNumericLookup[eo]=!1;let no=0;for(let oo=0;oo1||no<48||no>57)return isNumericLookup[eo]=!1;return isNumericLookup[eo]=!0}default:return!1}}function presentationKeyFromTag(eo){return`${eo.toLowerCase()}:presentation`}const presentationRegistry=new Map,ComponentPresentation=Object.freeze({define(eo,to,ro){const no=presentationKeyFromTag(eo);presentationRegistry.get(no)===void 0?presentationRegistry.set(no,to):presentationRegistry.set(no,!1),ro.register(Registration.instance(no,to))},forTag(eo,to){const ro=presentationKeyFromTag(eo),no=presentationRegistry.get(ro);return no===!1?DI.findResponsibleContainer(to).get(ro):no||null}});class DefaultComponentPresentation{constructor(to,ro){this.template=to||null,this.styles=ro===void 0?null:Array.isArray(ro)?ElementStyles.create(ro):ro instanceof ElementStyles?ro:ElementStyles.create([ro])}applyTo(to){const ro=to.$fastController;ro.template===null&&(ro.template=this.template),ro.styles===null&&(ro.styles=this.styles)}}class FoundationElement extends FASTElement{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return this._presentation===void 0&&(this._presentation=ComponentPresentation.forTag(this.tagName,this)),this._presentation}templateChanged(){this.template!==void 0&&(this.$fastController.template=this.template)}stylesChanged(){this.styles!==void 0&&(this.$fastController.styles=this.styles)}connectedCallback(){this.$presentation!==null&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(to){return(ro={})=>new FoundationElementRegistry(this===FoundationElement?class extends FoundationElement{}:this,to,ro)}}__decorate([observable],FoundationElement.prototype,"template",void 0);__decorate([observable],FoundationElement.prototype,"styles",void 0);function resolveOption(eo,to,ro){return typeof eo=="function"?eo(to,ro):eo}class FoundationElementRegistry{constructor(to,ro,no){this.type=to,this.elementDefinition=ro,this.overrideDefinition=no,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(to,ro){const no=this.definition,oo=this.overrideDefinition,so=`${no.prefix||ro.elementPrefix}-${no.baseName}`;ro.tryDefineElement({name:so,type:this.type,baseClass:this.elementDefinition.baseClass,callback:ao=>{const lo=new DefaultComponentPresentation(resolveOption(no.template,ao,no),resolveOption(no.styles,ao,no));ao.definePresentation(lo);let uo=resolveOption(no.shadowOptions,ao,no);ao.shadowRootMode&&(uo?oo.shadowOptions||(uo.mode=ao.shadowRootMode):uo!==null&&(uo={mode:ao.shadowRootMode})),ao.defineElement({elementOptions:resolveOption(no.elementOptions,ao,no),shadowOptions:uo,attributes:resolveOption(no.attributes,ao,no)})}})}}function applyMixins(eo,...to){const ro=AttributeConfiguration.locate(eo);to.forEach(no=>{Object.getOwnPropertyNames(no.prototype).forEach(io=>{io!=="constructor"&&Object.defineProperty(eo.prototype,io,Object.getOwnPropertyDescriptor(no.prototype,io))}),AttributeConfiguration.locate(no).forEach(io=>ro.push(io))})}const Orientation={horizontal:"horizontal",vertical:"vertical"};function findLastIndex(eo,to){let ro=eo.length;for(;ro--;)if(to(eo[ro],ro,eo))return ro;return-1}function canUseDOM$1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function isHTMLElement$3(...eo){return eo.every(to=>to instanceof HTMLElement)}function getNonce(){const eo=document.querySelector('meta[property="csp-nonce"]');return eo?eo.getAttribute("content"):null}let _canUseFocusVisible;function canUseFocusVisible(){if(typeof _canUseFocusVisible=="boolean")return _canUseFocusVisible;if(!canUseDOM$1())return _canUseFocusVisible=!1,_canUseFocusVisible;const eo=document.createElement("style"),to=getNonce();to!==null&&eo.setAttribute("nonce",to),document.head.appendChild(eo);try{eo.sheet.insertRule("foo:focus-visible {color:inherit}",0),_canUseFocusVisible=!0}catch{_canUseFocusVisible=!1}finally{document.head.removeChild(eo)}return _canUseFocusVisible}const eventFocus="focus",eventFocusIn="focusin",eventFocusOut="focusout",eventKeyDown="keydown";var KeyCodes;(function(eo){eo[eo.alt=18]="alt",eo[eo.arrowDown=40]="arrowDown",eo[eo.arrowLeft=37]="arrowLeft",eo[eo.arrowRight=39]="arrowRight",eo[eo.arrowUp=38]="arrowUp",eo[eo.back=8]="back",eo[eo.backSlash=220]="backSlash",eo[eo.break=19]="break",eo[eo.capsLock=20]="capsLock",eo[eo.closeBracket=221]="closeBracket",eo[eo.colon=186]="colon",eo[eo.colon2=59]="colon2",eo[eo.comma=188]="comma",eo[eo.ctrl=17]="ctrl",eo[eo.delete=46]="delete",eo[eo.end=35]="end",eo[eo.enter=13]="enter",eo[eo.equals=187]="equals",eo[eo.equals2=61]="equals2",eo[eo.equals3=107]="equals3",eo[eo.escape=27]="escape",eo[eo.forwardSlash=191]="forwardSlash",eo[eo.function1=112]="function1",eo[eo.function10=121]="function10",eo[eo.function11=122]="function11",eo[eo.function12=123]="function12",eo[eo.function2=113]="function2",eo[eo.function3=114]="function3",eo[eo.function4=115]="function4",eo[eo.function5=116]="function5",eo[eo.function6=117]="function6",eo[eo.function7=118]="function7",eo[eo.function8=119]="function8",eo[eo.function9=120]="function9",eo[eo.home=36]="home",eo[eo.insert=45]="insert",eo[eo.menu=93]="menu",eo[eo.minus=189]="minus",eo[eo.minus2=109]="minus2",eo[eo.numLock=144]="numLock",eo[eo.numPad0=96]="numPad0",eo[eo.numPad1=97]="numPad1",eo[eo.numPad2=98]="numPad2",eo[eo.numPad3=99]="numPad3",eo[eo.numPad4=100]="numPad4",eo[eo.numPad5=101]="numPad5",eo[eo.numPad6=102]="numPad6",eo[eo.numPad7=103]="numPad7",eo[eo.numPad8=104]="numPad8",eo[eo.numPad9=105]="numPad9",eo[eo.numPadDivide=111]="numPadDivide",eo[eo.numPadDot=110]="numPadDot",eo[eo.numPadMinus=109]="numPadMinus",eo[eo.numPadMultiply=106]="numPadMultiply",eo[eo.numPadPlus=107]="numPadPlus",eo[eo.openBracket=219]="openBracket",eo[eo.pageDown=34]="pageDown",eo[eo.pageUp=33]="pageUp",eo[eo.period=190]="period",eo[eo.print=44]="print",eo[eo.quote=222]="quote",eo[eo.scrollLock=145]="scrollLock",eo[eo.shift=16]="shift",eo[eo.space=32]="space",eo[eo.tab=9]="tab",eo[eo.tilde=192]="tilde",eo[eo.windowsLeft=91]="windowsLeft",eo[eo.windowsOpera=219]="windowsOpera",eo[eo.windowsRight=92]="windowsRight"})(KeyCodes||(KeyCodes={}));const keyArrowDown="ArrowDown",keyArrowLeft="ArrowLeft",keyArrowRight="ArrowRight",keyArrowUp="ArrowUp",keyEnter="Enter",keyEscape="Escape",keyHome="Home",keyEnd="End",keyFunction2="F2",keyPageDown="PageDown",keyPageUp="PageUp",keySpace=" ",keyTab="Tab",ArrowKeys={ArrowDown:keyArrowDown,ArrowLeft:keyArrowLeft,ArrowRight:keyArrowRight,ArrowUp:keyArrowUp};var Direction$1;(function(eo){eo.ltr="ltr",eo.rtl="rtl"})(Direction$1||(Direction$1={}));function limit(eo,to,ro){return Math.min(Math.max(ro,eo),to)}function inRange(eo,to,ro=0){return[to,ro]=[to,ro].sort((no,oo)=>no-oo),to<=eo&&eohtml` + + ${startSlotTemplate(eo,to)} + + + + ${endSlotTemplate(eo,to)} + +`;class ARIAGlobalStatesAndProperties{}__decorate([attr({attribute:"aria-atomic"})],ARIAGlobalStatesAndProperties.prototype,"ariaAtomic",void 0);__decorate([attr({attribute:"aria-busy"})],ARIAGlobalStatesAndProperties.prototype,"ariaBusy",void 0);__decorate([attr({attribute:"aria-controls"})],ARIAGlobalStatesAndProperties.prototype,"ariaControls",void 0);__decorate([attr({attribute:"aria-current"})],ARIAGlobalStatesAndProperties.prototype,"ariaCurrent",void 0);__decorate([attr({attribute:"aria-describedby"})],ARIAGlobalStatesAndProperties.prototype,"ariaDescribedby",void 0);__decorate([attr({attribute:"aria-details"})],ARIAGlobalStatesAndProperties.prototype,"ariaDetails",void 0);__decorate([attr({attribute:"aria-disabled"})],ARIAGlobalStatesAndProperties.prototype,"ariaDisabled",void 0);__decorate([attr({attribute:"aria-errormessage"})],ARIAGlobalStatesAndProperties.prototype,"ariaErrormessage",void 0);__decorate([attr({attribute:"aria-flowto"})],ARIAGlobalStatesAndProperties.prototype,"ariaFlowto",void 0);__decorate([attr({attribute:"aria-haspopup"})],ARIAGlobalStatesAndProperties.prototype,"ariaHaspopup",void 0);__decorate([attr({attribute:"aria-hidden"})],ARIAGlobalStatesAndProperties.prototype,"ariaHidden",void 0);__decorate([attr({attribute:"aria-invalid"})],ARIAGlobalStatesAndProperties.prototype,"ariaInvalid",void 0);__decorate([attr({attribute:"aria-keyshortcuts"})],ARIAGlobalStatesAndProperties.prototype,"ariaKeyshortcuts",void 0);__decorate([attr({attribute:"aria-label"})],ARIAGlobalStatesAndProperties.prototype,"ariaLabel",void 0);__decorate([attr({attribute:"aria-labelledby"})],ARIAGlobalStatesAndProperties.prototype,"ariaLabelledby",void 0);__decorate([attr({attribute:"aria-live"})],ARIAGlobalStatesAndProperties.prototype,"ariaLive",void 0);__decorate([attr({attribute:"aria-owns"})],ARIAGlobalStatesAndProperties.prototype,"ariaOwns",void 0);__decorate([attr({attribute:"aria-relevant"})],ARIAGlobalStatesAndProperties.prototype,"ariaRelevant",void 0);__decorate([attr({attribute:"aria-roledescription"})],ARIAGlobalStatesAndProperties.prototype,"ariaRoledescription",void 0);class Anchor extends FoundationElement{constructor(){super(...arguments),this.handleUnsupportedDelegatesFocus=()=>{var to;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(!((to=this.$fastController.definition.shadowOptions)===null||to===void 0)&&to.delegatesFocus)&&(this.focus=()=>{var ro;(ro=this.control)===null||ro===void 0||ro.focus()})}}connectedCallback(){super.connectedCallback(),this.handleUnsupportedDelegatesFocus()}}__decorate([attr],Anchor.prototype,"download",void 0);__decorate([attr],Anchor.prototype,"href",void 0);__decorate([attr],Anchor.prototype,"hreflang",void 0);__decorate([attr],Anchor.prototype,"ping",void 0);__decorate([attr],Anchor.prototype,"referrerpolicy",void 0);__decorate([attr],Anchor.prototype,"rel",void 0);__decorate([attr],Anchor.prototype,"target",void 0);__decorate([attr],Anchor.prototype,"type",void 0);__decorate([observable],Anchor.prototype,"defaultSlottedContent",void 0);class DelegatesARIALink{}__decorate([attr({attribute:"aria-expanded"})],DelegatesARIALink.prototype,"ariaExpanded",void 0);applyMixins(DelegatesARIALink,ARIAGlobalStatesAndProperties);applyMixins(Anchor,StartEnd,DelegatesARIALink);const getDirection=eo=>{const to=eo.closest("[dir]");return to!==null&&to.dir==="rtl"?Direction$1.rtl:Direction$1.ltr},badgeTemplate=(eo,to)=>html` + +`;let Badge$1=class extends FoundationElement{constructor(){super(...arguments),this.generateBadgeStyle=()=>{if(!this.fill&&!this.color)return;const to=`background-color: var(--badge-fill-${this.fill});`,ro=`color: var(--badge-color-${this.color});`;return this.fill&&!this.color?to:this.color&&!this.fill?ro:`${ro} ${to}`}}};__decorate([attr({attribute:"fill"})],Badge$1.prototype,"fill",void 0);__decorate([attr({attribute:"color"})],Badge$1.prototype,"color",void 0);__decorate([attr({mode:"boolean"})],Badge$1.prototype,"circular",void 0);const buttonTemplate=(eo,to)=>html` + +`,proxySlotName="form-associated-proxy",ElementInternalsKey="ElementInternals",supportsElementInternals=ElementInternalsKey in window&&"setFormValue"in window[ElementInternalsKey].prototype,InternalsMap=new WeakMap;function FormAssociated(eo){const to=class extends eo{constructor(...ro){super(...ro),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return supportsElementInternals}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const ro=this.proxy.labels,no=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),oo=ro?no.concat(Array.from(ro)):no;return Object.freeze(oo)}else return emptyArray}valueChanged(ro,no){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(ro,no){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(ro,no){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),DOM.queueUpdate(()=>this.classList.toggle("disabled",this.disabled))}nameChanged(ro,no){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(ro,no){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),DOM.queueUpdate(()=>this.classList.toggle("required",this.required)),this.validate()}get elementInternals(){if(!supportsElementInternals)return null;let ro=InternalsMap.get(this);return ro||(ro=this.attachInternals(),InternalsMap.set(this,ro)),ro}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){super.disconnectedCallback(),this.proxyEventsToBlock.forEach(ro=>this.proxy.removeEventListener(ro,this.stopPropagation)),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(ro,no,oo){this.elementInternals?this.elementInternals.setValidity(ro,no,oo):typeof no=="string"&&this.proxy.setCustomValidity(no)}formDisabledCallback(ro){this.disabled=ro}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var ro;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach(no=>this.proxy.addEventListener(no,this.stopPropagation)),this.proxy.disabled=this.disabled,this.proxy.required=this.required,typeof this.name=="string"&&(this.proxy.name=this.name),typeof this.value=="string"&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",proxySlotName),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",proxySlotName)),(ro=this.shadowRoot)===null||ro===void 0||ro.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var ro;this.removeChild(this.proxy),(ro=this.shadowRoot)===null||ro===void 0||ro.removeChild(this.proxySlot)}validate(ro){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,ro)}setFormValue(ro,no){this.elementInternals&&this.elementInternals.setFormValue(ro,no||ro)}_keypressHandler(ro){switch(ro.key){case keyEnter:if(this.form instanceof HTMLFormElement){const no=this.form.querySelector("[type=submit]");no==null||no.click()}break}}stopPropagation(ro){ro.stopPropagation()}};return attr({mode:"boolean"})(to.prototype,"disabled"),attr({mode:"fromView",attribute:"value"})(to.prototype,"initialValue"),attr({attribute:"current-value"})(to.prototype,"currentValue"),attr(to.prototype,"name"),attr({mode:"boolean"})(to.prototype,"required"),observable(to.prototype,"value"),to}function CheckableFormAssociated(eo){class to extends FormAssociated(eo){}class ro extends to{constructor(...oo){super(oo),this.dirtyChecked=!1,this.checkedAttribute=!1,this.checked=!1,this.dirtyChecked=!1}checkedAttributeChanged(){this.defaultChecked=this.checkedAttribute}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(oo,io){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),oo!==void 0&&this.$emit("change"),this.validate()}currentCheckedChanged(oo,io){this.checked=this.currentChecked}updateForm(){const oo=this.checked?this.value:null;this.setFormValue(oo,oo)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return attr({attribute:"checked",mode:"boolean"})(ro.prototype,"checkedAttribute"),attr({attribute:"current-checked",converter:booleanConverter})(ro.prototype,"currentChecked"),observable(ro.prototype,"defaultChecked"),observable(ro.prototype,"checked"),ro}class _Button extends FoundationElement{}class FormAssociatedButton extends FormAssociated(_Button){constructor(){super(...arguments),this.proxy=document.createElement("input")}}let Button$1=class extends FormAssociatedButton{constructor(){super(...arguments),this.handleClick=to=>{var ro;this.disabled&&((ro=this.defaultSlottedContent)===null||ro===void 0?void 0:ro.length)<=1&&to.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;const to=this.proxy.isConnected;to||this.attachProxy(),typeof this.form.requestSubmit=="function"?this.form.requestSubmit(this.proxy):this.proxy.click(),to||this.detachProxy()},this.handleFormReset=()=>{var to;(to=this.form)===null||to===void 0||to.reset()},this.handleUnsupportedDelegatesFocus=()=>{var to;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(!((to=this.$fastController.definition.shadowOptions)===null||to===void 0)&&to.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(to,ro){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),ro==="submit"&&this.addEventListener("click",this.handleSubmission),to==="submit"&&this.removeEventListener("click",this.handleSubmission),ro==="reset"&&this.addEventListener("click",this.handleFormReset),to==="reset"&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var to;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();const ro=Array.from((to=this.control)===null||to===void 0?void 0:to.children);ro&&ro.forEach(no=>{no.addEventListener("click",this.handleClick)})}disconnectedCallback(){var to;super.disconnectedCallback();const ro=Array.from((to=this.control)===null||to===void 0?void 0:to.children);ro&&ro.forEach(no=>{no.removeEventListener("click",this.handleClick)})}};__decorate([attr({mode:"boolean"})],Button$1.prototype,"autofocus",void 0);__decorate([attr({attribute:"form"})],Button$1.prototype,"formId",void 0);__decorate([attr],Button$1.prototype,"formaction",void 0);__decorate([attr],Button$1.prototype,"formenctype",void 0);__decorate([attr],Button$1.prototype,"formmethod",void 0);__decorate([attr({mode:"boolean"})],Button$1.prototype,"formnovalidate",void 0);__decorate([attr],Button$1.prototype,"formtarget",void 0);__decorate([attr],Button$1.prototype,"type",void 0);__decorate([observable],Button$1.prototype,"defaultSlottedContent",void 0);class DelegatesARIAButton{}__decorate([attr({attribute:"aria-expanded"})],DelegatesARIAButton.prototype,"ariaExpanded",void 0);__decorate([attr({attribute:"aria-pressed"})],DelegatesARIAButton.prototype,"ariaPressed",void 0);applyMixins(DelegatesARIAButton,ARIAGlobalStatesAndProperties);applyMixins(Button$1,StartEnd,DelegatesARIAButton);const GenerateHeaderOptions={none:"none",default:"default",sticky:"sticky"},DataGridCellTypes={default:"default",columnHeader:"columnheader",rowHeader:"rowheader"},DataGridRowTypes={default:"default",header:"header",stickyHeader:"sticky-header"};let DataGridRow$1=class extends FoundationElement{constructor(){super(...arguments),this.rowType=DataGridRowTypes.default,this.rowData=null,this.columnDefinitions=null,this.isActiveRow=!1,this.cellsRepeatBehavior=null,this.cellsPlaceholder=null,this.focusColumnIndex=0,this.refocusOnLoad=!1,this.updateRowStyle=()=>{this.style.gridTemplateColumns=this.gridTemplateColumns}}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowStyle()}rowTypeChanged(){this.$fastController.isConnected&&this.updateItemTemplate()}rowDataChanged(){if(this.rowData!==null&&this.isActiveRow){this.refocusOnLoad=!0;return}}cellItemTemplateChanged(){this.updateItemTemplate()}headerCellItemTemplateChanged(){this.updateItemTemplate()}connectedCallback(){super.connectedCallback(),this.cellsRepeatBehavior===null&&(this.cellsPlaceholder=document.createComment(""),this.appendChild(this.cellsPlaceholder),this.updateItemTemplate(),this.cellsRepeatBehavior=new RepeatDirective(to=>to.columnDefinitions,to=>to.activeCellItemTemplate,{positioning:!0}).createBehavior(this.cellsPlaceholder),this.$fastController.addBehaviors([this.cellsRepeatBehavior])),this.addEventListener("cell-focused",this.handleCellFocus),this.addEventListener(eventFocusOut,this.handleFocusout),this.addEventListener(eventKeyDown,this.handleKeydown),this.updateRowStyle(),this.refocusOnLoad&&(this.refocusOnLoad=!1,this.cellElements.length>this.focusColumnIndex&&this.cellElements[this.focusColumnIndex].focus())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("cell-focused",this.handleCellFocus),this.removeEventListener(eventFocusOut,this.handleFocusout),this.removeEventListener(eventKeyDown,this.handleKeydown)}handleFocusout(to){this.contains(to.target)||(this.isActiveRow=!1,this.focusColumnIndex=0)}handleCellFocus(to){this.isActiveRow=!0,this.focusColumnIndex=this.cellElements.indexOf(to.target),this.$emit("row-focused",this)}handleKeydown(to){if(to.defaultPrevented)return;let ro=0;switch(to.key){case keyArrowLeft:ro=Math.max(0,this.focusColumnIndex-1),this.cellElements[ro].focus(),to.preventDefault();break;case keyArrowRight:ro=Math.min(this.cellElements.length-1,this.focusColumnIndex+1),this.cellElements[ro].focus(),to.preventDefault();break;case keyHome:to.ctrlKey||(this.cellElements[0].focus(),to.preventDefault());break;case keyEnd:to.ctrlKey||(this.cellElements[this.cellElements.length-1].focus(),to.preventDefault());break}}updateItemTemplate(){this.activeCellItemTemplate=this.rowType===DataGridRowTypes.default&&this.cellItemTemplate!==void 0?this.cellItemTemplate:this.rowType===DataGridRowTypes.default&&this.cellItemTemplate===void 0?this.defaultCellItemTemplate:this.headerCellItemTemplate!==void 0?this.headerCellItemTemplate:this.defaultHeaderCellItemTemplate}};__decorate([attr({attribute:"grid-template-columns"})],DataGridRow$1.prototype,"gridTemplateColumns",void 0);__decorate([attr({attribute:"row-type"})],DataGridRow$1.prototype,"rowType",void 0);__decorate([observable],DataGridRow$1.prototype,"rowData",void 0);__decorate([observable],DataGridRow$1.prototype,"columnDefinitions",void 0);__decorate([observable],DataGridRow$1.prototype,"cellItemTemplate",void 0);__decorate([observable],DataGridRow$1.prototype,"headerCellItemTemplate",void 0);__decorate([observable],DataGridRow$1.prototype,"rowIndex",void 0);__decorate([observable],DataGridRow$1.prototype,"isActiveRow",void 0);__decorate([observable],DataGridRow$1.prototype,"activeCellItemTemplate",void 0);__decorate([observable],DataGridRow$1.prototype,"defaultCellItemTemplate",void 0);__decorate([observable],DataGridRow$1.prototype,"defaultHeaderCellItemTemplate",void 0);__decorate([observable],DataGridRow$1.prototype,"cellElements",void 0);function createRowItemTemplate(eo){const to=eo.tagFor(DataGridRow$1);return html` + <${to} + :rowData="${ro=>ro}" + :cellItemTemplate="${(ro,no)=>no.parent.cellItemTemplate}" + :headerCellItemTemplate="${(ro,no)=>no.parent.headerCellItemTemplate}" + > +`}const dataGridTemplate=(eo,to)=>{const ro=createRowItemTemplate(eo),no=eo.tagFor(DataGridRow$1);return html` + + `};let DataGrid$1=class Y0 extends FoundationElement{constructor(){super(),this.noTabbing=!1,this.generateHeader=GenerateHeaderOptions.default,this.rowsData=[],this.columnDefinitions=null,this.focusRowIndex=0,this.focusColumnIndex=0,this.rowsPlaceholder=null,this.generatedHeader=null,this.isUpdatingFocus=!1,this.pendingFocusUpdate=!1,this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!0,this.generatedGridTemplateColumns="",this.focusOnCell=(to,ro,no)=>{if(this.rowElements.length===0){this.focusRowIndex=0,this.focusColumnIndex=0;return}const oo=Math.max(0,Math.min(this.rowElements.length-1,to)),so=this.rowElements[oo].querySelectorAll('[role="cell"], [role="gridcell"], [role="columnheader"], [role="rowheader"]'),ao=Math.max(0,Math.min(so.length-1,ro)),lo=so[ao];no&&this.scrollHeight!==this.clientHeight&&(oo0||oo>this.focusRowIndex&&this.scrollTop{to&&to.length&&(to.forEach(no=>{no.addedNodes.forEach(oo=>{oo.nodeType===1&&oo.getAttribute("role")==="row"&&(oo.columnDefinitions=this.columnDefinitions)})}),this.queueRowIndexUpdate())},this.queueRowIndexUpdate=()=>{this.rowindexUpdateQueued||(this.rowindexUpdateQueued=!0,DOM.queueUpdate(this.updateRowIndexes))},this.updateRowIndexes=()=>{let to=this.gridTemplateColumns;if(to===void 0){if(this.generatedGridTemplateColumns===""&&this.rowElements.length>0){const ro=this.rowElements[0];this.generatedGridTemplateColumns=new Array(ro.cellElements.length).fill("1fr").join(" ")}to=this.generatedGridTemplateColumns}this.rowElements.forEach((ro,no)=>{const oo=ro;oo.rowIndex=no,oo.gridTemplateColumns=to,this.columnDefinitionsStale&&(oo.columnDefinitions=this.columnDefinitions)}),this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!1}}static generateTemplateColumns(to){let ro="";return to.forEach(no=>{ro=`${ro}${ro===""?"":" "}1fr`}),ro}noTabbingChanged(){this.$fastController.isConnected&&(this.noTabbing?this.setAttribute("tabIndex","-1"):this.setAttribute("tabIndex",this.contains(document.activeElement)||this===document.activeElement?"-1":"0"))}generateHeaderChanged(){this.$fastController.isConnected&&this.toggleGeneratedHeader()}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowIndexes()}rowsDataChanged(){this.columnDefinitions===null&&this.rowsData.length>0&&(this.columnDefinitions=Y0.generateColumns(this.rowsData[0])),this.$fastController.isConnected&&this.toggleGeneratedHeader()}columnDefinitionsChanged(){if(this.columnDefinitions===null){this.generatedGridTemplateColumns="";return}this.generatedGridTemplateColumns=Y0.generateTemplateColumns(this.columnDefinitions),this.$fastController.isConnected&&(this.columnDefinitionsStale=!0,this.queueRowIndexUpdate())}headerCellItemTemplateChanged(){this.$fastController.isConnected&&this.generatedHeader!==null&&(this.generatedHeader.headerCellItemTemplate=this.headerCellItemTemplate)}focusRowIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}focusColumnIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}connectedCallback(){super.connectedCallback(),this.rowItemTemplate===void 0&&(this.rowItemTemplate=this.defaultRowItemTemplate),this.rowsPlaceholder=document.createComment(""),this.appendChild(this.rowsPlaceholder),this.toggleGeneratedHeader(),this.rowsRepeatBehavior=new RepeatDirective(to=>to.rowsData,to=>to.rowItemTemplate,{positioning:!0}).createBehavior(this.rowsPlaceholder),this.$fastController.addBehaviors([this.rowsRepeatBehavior]),this.addEventListener("row-focused",this.handleRowFocus),this.addEventListener(eventFocus,this.handleFocus),this.addEventListener(eventKeyDown,this.handleKeydown),this.addEventListener(eventFocusOut,this.handleFocusOut),this.observer=new MutationObserver(this.onChildListChange),this.observer.observe(this,{childList:!0}),this.noTabbing&&this.setAttribute("tabindex","-1"),DOM.queueUpdate(this.queueRowIndexUpdate)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("row-focused",this.handleRowFocus),this.removeEventListener(eventFocus,this.handleFocus),this.removeEventListener(eventKeyDown,this.handleKeydown),this.removeEventListener(eventFocusOut,this.handleFocusOut),this.observer.disconnect(),this.rowsPlaceholder=null,this.generatedHeader=null}handleRowFocus(to){this.isUpdatingFocus=!0;const ro=to.target;this.focusRowIndex=this.rowElements.indexOf(ro),this.focusColumnIndex=ro.focusColumnIndex,this.setAttribute("tabIndex","-1"),this.isUpdatingFocus=!1}handleFocus(to){this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}handleFocusOut(to){(to.relatedTarget===null||!this.contains(to.relatedTarget))&&this.setAttribute("tabIndex",this.noTabbing?"-1":"0")}handleKeydown(to){if(to.defaultPrevented)return;let ro;const no=this.rowElements.length-1,oo=this.offsetHeight+this.scrollTop,io=this.rowElements[no];switch(to.key){case keyArrowUp:to.preventDefault(),this.focusOnCell(this.focusRowIndex-1,this.focusColumnIndex,!0);break;case keyArrowDown:to.preventDefault(),this.focusOnCell(this.focusRowIndex+1,this.focusColumnIndex,!0);break;case keyPageUp:if(to.preventDefault(),this.rowElements.length===0){this.focusOnCell(0,0,!1);break}if(this.focusRowIndex===0){this.focusOnCell(0,this.focusColumnIndex,!1);return}for(ro=this.focusRowIndex-1,ro;ro>=0;ro--){const so=this.rowElements[ro];if(so.offsetTop=no||io.offsetTop+io.offsetHeight<=oo){this.focusOnCell(no,this.focusColumnIndex,!1);return}for(ro=this.focusRowIndex+1,ro;ro<=no;ro++){const so=this.rowElements[ro];if(so.offsetTop+so.offsetHeight>oo){let ao=0;this.generateHeader===GenerateHeaderOptions.sticky&&this.generatedHeader!==null&&(ao=this.generatedHeader.clientHeight),this.scrollTop=so.offsetTop-ao;break}}this.focusOnCell(ro,this.focusColumnIndex,!1);break;case keyHome:to.ctrlKey&&(to.preventDefault(),this.focusOnCell(0,0,!0));break;case keyEnd:to.ctrlKey&&this.columnDefinitions!==null&&(to.preventDefault(),this.focusOnCell(this.rowElements.length-1,this.columnDefinitions.length-1,!0));break}}queueFocusUpdate(){this.isUpdatingFocus&&(this.contains(document.activeElement)||this===document.activeElement)||this.pendingFocusUpdate===!1&&(this.pendingFocusUpdate=!0,DOM.queueUpdate(()=>this.updateFocus()))}updateFocus(){this.pendingFocusUpdate=!1,this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}toggleGeneratedHeader(){if(this.generatedHeader!==null&&(this.removeChild(this.generatedHeader),this.generatedHeader=null),this.generateHeader!==GenerateHeaderOptions.none&&this.rowsData.length>0){const to=document.createElement(this.rowElementTag);this.generatedHeader=to,this.generatedHeader.columnDefinitions=this.columnDefinitions,this.generatedHeader.gridTemplateColumns=this.gridTemplateColumns,this.generatedHeader.rowType=this.generateHeader===GenerateHeaderOptions.sticky?DataGridRowTypes.stickyHeader:DataGridRowTypes.header,(this.firstChild!==null||this.rowsPlaceholder!==null)&&this.insertBefore(to,this.firstChild!==null?this.firstChild:this.rowsPlaceholder);return}}};DataGrid$1.generateColumns=eo=>Object.getOwnPropertyNames(eo).map((to,ro)=>({columnDataKey:to,gridColumn:`${ro}`}));__decorate([attr({attribute:"no-tabbing",mode:"boolean"})],DataGrid$1.prototype,"noTabbing",void 0);__decorate([attr({attribute:"generate-header"})],DataGrid$1.prototype,"generateHeader",void 0);__decorate([attr({attribute:"grid-template-columns"})],DataGrid$1.prototype,"gridTemplateColumns",void 0);__decorate([observable],DataGrid$1.prototype,"rowsData",void 0);__decorate([observable],DataGrid$1.prototype,"columnDefinitions",void 0);__decorate([observable],DataGrid$1.prototype,"rowItemTemplate",void 0);__decorate([observable],DataGrid$1.prototype,"cellItemTemplate",void 0);__decorate([observable],DataGrid$1.prototype,"headerCellItemTemplate",void 0);__decorate([observable],DataGrid$1.prototype,"focusRowIndex",void 0);__decorate([observable],DataGrid$1.prototype,"focusColumnIndex",void 0);__decorate([observable],DataGrid$1.prototype,"defaultRowItemTemplate",void 0);__decorate([observable],DataGrid$1.prototype,"rowElementTag",void 0);__decorate([observable],DataGrid$1.prototype,"rowElements",void 0);const defaultCellContentsTemplate=html` + +`,defaultHeaderCellContentsTemplate=html` + +`;let DataGridCell$1=class extends FoundationElement{constructor(){super(...arguments),this.cellType=DataGridCellTypes.default,this.rowData=null,this.columnDefinition=null,this.isActiveCell=!1,this.customCellView=null,this.updateCellStyle=()=>{this.style.gridColumn=this.gridColumn}}cellTypeChanged(){this.$fastController.isConnected&&this.updateCellView()}gridColumnChanged(){this.$fastController.isConnected&&this.updateCellStyle()}columnDefinitionChanged(to,ro){this.$fastController.isConnected&&this.updateCellView()}connectedCallback(){var to;super.connectedCallback(),this.addEventListener(eventFocusIn,this.handleFocusin),this.addEventListener(eventFocusOut,this.handleFocusout),this.addEventListener(eventKeyDown,this.handleKeydown),this.style.gridColumn=`${((to=this.columnDefinition)===null||to===void 0?void 0:to.gridColumn)===void 0?0:this.columnDefinition.gridColumn}`,this.updateCellView(),this.updateCellStyle()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(eventFocusIn,this.handleFocusin),this.removeEventListener(eventFocusOut,this.handleFocusout),this.removeEventListener(eventKeyDown,this.handleKeydown),this.disconnectCellView()}handleFocusin(to){if(!this.isActiveCell){switch(this.isActiveCell=!0,this.cellType){case DataGridCellTypes.columnHeader:if(this.columnDefinition!==null&&this.columnDefinition.headerCellInternalFocusQueue!==!0&&typeof this.columnDefinition.headerCellFocusTargetCallback=="function"){const ro=this.columnDefinition.headerCellFocusTargetCallback(this);ro!==null&&ro.focus()}break;default:if(this.columnDefinition!==null&&this.columnDefinition.cellInternalFocusQueue!==!0&&typeof this.columnDefinition.cellFocusTargetCallback=="function"){const ro=this.columnDefinition.cellFocusTargetCallback(this);ro!==null&&ro.focus()}break}this.$emit("cell-focused",this)}}handleFocusout(to){this!==document.activeElement&&!this.contains(document.activeElement)&&(this.isActiveCell=!1)}handleKeydown(to){if(!(to.defaultPrevented||this.columnDefinition===null||this.cellType===DataGridCellTypes.default&&this.columnDefinition.cellInternalFocusQueue!==!0||this.cellType===DataGridCellTypes.columnHeader&&this.columnDefinition.headerCellInternalFocusQueue!==!0))switch(to.key){case keyEnter:case keyFunction2:if(this.contains(document.activeElement)&&document.activeElement!==this)return;switch(this.cellType){case DataGridCellTypes.columnHeader:if(this.columnDefinition.headerCellFocusTargetCallback!==void 0){const ro=this.columnDefinition.headerCellFocusTargetCallback(this);ro!==null&&ro.focus(),to.preventDefault()}break;default:if(this.columnDefinition.cellFocusTargetCallback!==void 0){const ro=this.columnDefinition.cellFocusTargetCallback(this);ro!==null&&ro.focus(),to.preventDefault()}break}break;case keyEscape:this.contains(document.activeElement)&&document.activeElement!==this&&(this.focus(),to.preventDefault());break}}updateCellView(){if(this.disconnectCellView(),this.columnDefinition!==null)switch(this.cellType){case DataGridCellTypes.columnHeader:this.columnDefinition.headerCellTemplate!==void 0?this.customCellView=this.columnDefinition.headerCellTemplate.render(this,this):this.customCellView=defaultHeaderCellContentsTemplate.render(this,this);break;case void 0:case DataGridCellTypes.rowHeader:case DataGridCellTypes.default:this.columnDefinition.cellTemplate!==void 0?this.customCellView=this.columnDefinition.cellTemplate.render(this,this):this.customCellView=defaultCellContentsTemplate.render(this,this);break}}disconnectCellView(){this.customCellView!==null&&(this.customCellView.dispose(),this.customCellView=null)}};__decorate([attr({attribute:"cell-type"})],DataGridCell$1.prototype,"cellType",void 0);__decorate([attr({attribute:"grid-column"})],DataGridCell$1.prototype,"gridColumn",void 0);__decorate([observable],DataGridCell$1.prototype,"rowData",void 0);__decorate([observable],DataGridCell$1.prototype,"columnDefinition",void 0);function createCellItemTemplate(eo){const to=eo.tagFor(DataGridCell$1);return html` + <${to} + cell-type="${ro=>ro.isRowHeader?"rowheader":void 0}" + grid-column="${(ro,no)=>no.index+1}" + :rowData="${(ro,no)=>no.parent.rowData}" + :columnDefinition="${ro=>ro}" + > +`}function createHeaderCellItemTemplate(eo){const to=eo.tagFor(DataGridCell$1);return html` + <${to} + cell-type="columnheader" + grid-column="${(ro,no)=>no.index+1}" + :columnDefinition="${ro=>ro}" + > +`}const dataGridRowTemplate=(eo,to)=>{const ro=createCellItemTemplate(eo),no=createHeaderCellItemTemplate(eo);return html` + + `},dataGridCellTemplate=(eo,to)=>html` + + `,checkboxTemplate=(eo,to)=>html` + +`;class _Checkbox extends FoundationElement{}class FormAssociatedCheckbox extends CheckableFormAssociated(_Checkbox){constructor(){super(...arguments),this.proxy=document.createElement("input")}}let Checkbox$1=class extends FormAssociatedCheckbox{constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=to=>{if(!this.readOnly)switch(to.key){case keySpace:this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked;break}},this.clickHandler=to=>{!this.disabled&&!this.readOnly&&(this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}};__decorate([attr({attribute:"readonly",mode:"boolean"})],Checkbox$1.prototype,"readOnly",void 0);__decorate([observable],Checkbox$1.prototype,"defaultSlottedNodes",void 0);__decorate([observable],Checkbox$1.prototype,"indeterminate",void 0);function isListboxOption(eo){return isHTMLElement$3(eo)&&(eo.getAttribute("role")==="option"||eo instanceof HTMLOptionElement)}class ListboxOption extends FoundationElement{constructor(to,ro,no,oo){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,to&&(this.textContent=to),ro&&(this.initialValue=ro),no&&(this.defaultSelected=no),oo&&(this.selected=oo),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}checkedChanged(to,ro){if(typeof ro=="boolean"){this.ariaChecked=ro?"true":"false";return}this.ariaChecked=null}contentChanged(to,ro){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(to,ro){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(to,ro){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){var to;return(to=this.value)!==null&&to!==void 0?to:this.text}get text(){var to,ro;return(ro=(to=this.textContent)===null||to===void 0?void 0:to.replace(/\s+/g," ").trim())!==null&&ro!==void 0?ro:""}set value(to){const ro=`${to??""}`;this._value=ro,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=ro),Observable$1.notify(this,"value")}get value(){var to;return Observable$1.track(this,"value"),(to=this._value)!==null&&to!==void 0?to:this.text}get form(){return this.proxy?this.proxy.form:null}}__decorate([observable],ListboxOption.prototype,"checked",void 0);__decorate([observable],ListboxOption.prototype,"content",void 0);__decorate([observable],ListboxOption.prototype,"defaultSelected",void 0);__decorate([attr({mode:"boolean"})],ListboxOption.prototype,"disabled",void 0);__decorate([attr({attribute:"selected",mode:"boolean"})],ListboxOption.prototype,"selectedAttribute",void 0);__decorate([observable],ListboxOption.prototype,"selected",void 0);__decorate([attr({attribute:"value",mode:"fromView"})],ListboxOption.prototype,"initialValue",void 0);class DelegatesARIAListboxOption{}__decorate([observable],DelegatesARIAListboxOption.prototype,"ariaChecked",void 0);__decorate([observable],DelegatesARIAListboxOption.prototype,"ariaPosInSet",void 0);__decorate([observable],DelegatesARIAListboxOption.prototype,"ariaSelected",void 0);__decorate([observable],DelegatesARIAListboxOption.prototype,"ariaSetSize",void 0);applyMixins(DelegatesARIAListboxOption,ARIAGlobalStatesAndProperties);applyMixins(ListboxOption,StartEnd,DelegatesARIAListboxOption);class Listbox extends FoundationElement{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){var to;return(to=this.selectedOptions[0])!==null&&to!==void 0?to:null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every(to=>to.disabled)}get length(){var to,ro;return(ro=(to=this.options)===null||to===void 0?void 0:to.length)!==null&&ro!==void 0?ro:0}get options(){return Observable$1.track(this,"options"),this._options}set options(to){this._options=to,Observable$1.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(to){this.typeaheadExpired=to}clickHandler(to){const ro=to.target.closest("option,[role=option]");if(ro&&!ro.disabled)return this.selectedIndex=this.options.indexOf(ro),!0}focusAndScrollOptionIntoView(to=this.firstSelectedOption){this.contains(document.activeElement)&&to!==null&&(to.focus(),requestAnimationFrame(()=>{to.scrollIntoView({block:"nearest"})}))}focusinHandler(to){!this.shouldSkipFocus&&to.target===to.currentTarget&&(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const to=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),ro=new RegExp(`^${to}`,"gi");return this.options.filter(no=>no.text.trim().match(ro))}getSelectableIndex(to=this.selectedIndex,ro){const no=to>ro?-1:to!so&&!ao.disabled&&lo!so&&!ao.disabled&&lo>oo?ao:so,io);break}}return this.options.indexOf(io)}handleChange(to,ro){switch(ro){case"selected":{Listbox.slottedOptionFilter(to)&&(this.selectedIndex=this.options.indexOf(to)),this.setSelectedOptions();break}}}handleTypeAhead(to){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>this.typeaheadExpired=!0,Listbox.TYPE_AHEAD_TIMEOUT_MS),!(to.length>1)&&(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${to}`)}keydownHandler(to){if(this.disabled)return!0;this.shouldSkipFocus=!1;const ro=to.key;switch(ro){case keyHome:{to.shiftKey||(to.preventDefault(),this.selectFirstOption());break}case keyArrowDown:{to.shiftKey||(to.preventDefault(),this.selectNextOption());break}case keyArrowUp:{to.shiftKey||(to.preventDefault(),this.selectPreviousOption());break}case keyEnd:{to.preventDefault(),this.selectLastOption();break}case keyTab:return this.focusAndScrollOptionIntoView(),!0;case keyEnter:case keyEscape:return!0;case keySpace:if(this.typeaheadExpired)return!0;default:return ro.length===1&&this.handleTypeAhead(`${ro}`),!0}}mousedownHandler(to){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(to,ro){this.ariaMultiSelectable=ro?"true":null}selectedIndexChanged(to,ro){var no;if(!this.hasSelectableOptions){this.selectedIndex=-1;return}if(!((no=this.options[this.selectedIndex])===null||no===void 0)&&no.disabled&&typeof to=="number"){const oo=this.getSelectableIndex(to,ro),io=oo>-1?oo:to;this.selectedIndex=io,ro===io&&this.selectedIndexChanged(ro,io);return}this.setSelectedOptions()}selectedOptionsChanged(to,ro){var no;const oo=ro.filter(Listbox.slottedOptionFilter);(no=this.options)===null||no===void 0||no.forEach(io=>{const so=Observable$1.getNotifier(io);so.unsubscribe(this,"selected"),io.selected=oo.includes(io),so.subscribe(this,"selected")})}selectFirstOption(){var to,ro;this.disabled||(this.selectedIndex=(ro=(to=this.options)===null||to===void 0?void 0:to.findIndex(no=>!no.disabled))!==null&&ro!==void 0?ro:-1)}selectLastOption(){this.disabled||(this.selectedIndex=findLastIndex(this.options,to=>!to.disabled))}selectNextOption(){!this.disabled&&this.selectedIndex0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){var to,ro;this.selectedIndex=(ro=(to=this.options)===null||to===void 0?void 0:to.findIndex(no=>no.defaultSelected))!==null&&ro!==void 0?ro:-1}setSelectedOptions(){var to,ro,no;!((to=this.options)===null||to===void 0)&&to.length&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=(no=(ro=this.firstSelectedOption)===null||ro===void 0?void 0:ro.id)!==null&&no!==void 0?no:"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(to,ro){this.options=ro.reduce((oo,io)=>(isListboxOption(io)&&oo.push(io),oo),[]);const no=`${this.options.length}`;this.options.forEach((oo,io)=>{oo.id||(oo.id=uniqueId("option-")),oo.ariaPosInSet=`${io+1}`,oo.ariaSetSize=no}),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(to,ro){if(this.$fastController.isConnected){const no=this.getTypeaheadMatches();if(no.length){const oo=this.options.indexOf(no[0]);oo>-1&&(this.selectedIndex=oo)}this.typeaheadExpired=!1}}}Listbox.slottedOptionFilter=eo=>isListboxOption(eo)&&!eo.hidden;Listbox.TYPE_AHEAD_TIMEOUT_MS=1e3;__decorate([attr({mode:"boolean"})],Listbox.prototype,"disabled",void 0);__decorate([observable],Listbox.prototype,"selectedIndex",void 0);__decorate([observable],Listbox.prototype,"selectedOptions",void 0);__decorate([observable],Listbox.prototype,"slottedOptions",void 0);__decorate([observable],Listbox.prototype,"typeaheadBuffer",void 0);class DelegatesARIAListbox{}__decorate([observable],DelegatesARIAListbox.prototype,"ariaActiveDescendant",void 0);__decorate([observable],DelegatesARIAListbox.prototype,"ariaDisabled",void 0);__decorate([observable],DelegatesARIAListbox.prototype,"ariaExpanded",void 0);__decorate([observable],DelegatesARIAListbox.prototype,"ariaMultiSelectable",void 0);applyMixins(DelegatesARIAListbox,ARIAGlobalStatesAndProperties);applyMixins(Listbox,DelegatesARIAListbox);const SelectPosition={above:"above",below:"below"};function composedParent(eo){const to=eo.parentElement;if(to)return to;{const ro=eo.getRootNode();if(ro.host instanceof HTMLElement)return ro.host}return null}function composedContains(eo,to){let ro=to;for(;ro!==null;){if(ro===eo)return!0;ro=composedParent(ro)}return!1}const defaultElement=document.createElement("div");function isFastElement(eo){return eo instanceof FASTElement}class QueuedStyleSheetTarget{setProperty(to,ro){DOM.queueUpdate(()=>this.target.setProperty(to,ro))}removeProperty(to){DOM.queueUpdate(()=>this.target.removeProperty(to))}}class ConstructableStyleSheetTarget extends QueuedStyleSheetTarget{constructor(to){super();const ro=new CSSStyleSheet;this.target=ro.cssRules[ro.insertRule(":host{}")].style,to.$fastController.addStyles(ElementStyles.create([ro]))}}class DocumentStyleSheetTarget extends QueuedStyleSheetTarget{constructor(){super();const to=new CSSStyleSheet;this.target=to.cssRules[to.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,to]}}class HeadStyleElementStyleSheetTarget extends QueuedStyleSheetTarget{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:to}=this.style;if(to){const ro=to.insertRule(":root{}",to.cssRules.length);this.target=to.cssRules[ro].style}}}class StyleElementStyleSheetTarget{constructor(to){this.store=new Map,this.target=null;const ro=to.$fastController;this.style=document.createElement("style"),ro.addStyles(this.style),Observable$1.getNotifier(ro).subscribe(this,"isConnected"),this.handleChange(ro,"isConnected")}targetChanged(){if(this.target!==null)for(const[to,ro]of this.store.entries())this.target.setProperty(to,ro)}setProperty(to,ro){this.store.set(to,ro),DOM.queueUpdate(()=>{this.target!==null&&this.target.setProperty(to,ro)})}removeProperty(to){this.store.delete(to),DOM.queueUpdate(()=>{this.target!==null&&this.target.removeProperty(to)})}handleChange(to,ro){const{sheet:no}=this.style;if(no){const oo=no.insertRule(":host{}",no.cssRules.length);this.target=no.cssRules[oo].style}else this.target=null}}__decorate([observable],StyleElementStyleSheetTarget.prototype,"target",void 0);class ElementStyleSheetTarget{constructor(to){this.target=to.style}setProperty(to,ro){DOM.queueUpdate(()=>this.target.setProperty(to,ro))}removeProperty(to){DOM.queueUpdate(()=>this.target.removeProperty(to))}}class RootStyleSheetTarget{setProperty(to,ro){RootStyleSheetTarget.properties[to]=ro;for(const no of RootStyleSheetTarget.roots.values())PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(no)).setProperty(to,ro)}removeProperty(to){delete RootStyleSheetTarget.properties[to];for(const ro of RootStyleSheetTarget.roots.values())PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(ro)).removeProperty(to)}static registerRoot(to){const{roots:ro}=RootStyleSheetTarget;if(!ro.has(to)){ro.add(to);const no=PropertyTargetManager.getOrCreate(this.normalizeRoot(to));for(const oo in RootStyleSheetTarget.properties)no.setProperty(oo,RootStyleSheetTarget.properties[oo])}}static unregisterRoot(to){const{roots:ro}=RootStyleSheetTarget;if(ro.has(to)){ro.delete(to);const no=PropertyTargetManager.getOrCreate(RootStyleSheetTarget.normalizeRoot(to));for(const oo in RootStyleSheetTarget.properties)no.removeProperty(oo)}}static normalizeRoot(to){return to===defaultElement?document:to}}RootStyleSheetTarget.roots=new Set;RootStyleSheetTarget.properties={};const propertyTargetCache=new WeakMap,propertyTargetCtor=DOM.supportsAdoptedStyleSheets?ConstructableStyleSheetTarget:StyleElementStyleSheetTarget,PropertyTargetManager=Object.freeze({getOrCreate(eo){if(propertyTargetCache.has(eo))return propertyTargetCache.get(eo);let to;return eo===defaultElement?to=new RootStyleSheetTarget:eo instanceof Document?to=DOM.supportsAdoptedStyleSheets?new DocumentStyleSheetTarget:new HeadStyleElementStyleSheetTarget:isFastElement(eo)?to=new propertyTargetCtor(eo):to=new ElementStyleSheetTarget(eo),propertyTargetCache.set(eo,to),to}});class DesignTokenImpl extends CSSDirective{constructor(to){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=to.name,to.cssCustomPropertyName!==null&&(this.cssCustomProperty=`--${to.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=DesignTokenImpl.uniqueId(),DesignTokenImpl.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(to){return new DesignTokenImpl({name:typeof to=="string"?to:to.name,cssCustomPropertyName:typeof to=="string"?to:to.cssCustomPropertyName===void 0?to.name:to.cssCustomPropertyName})}static isCSSDesignToken(to){return typeof to.cssCustomProperty=="string"}static isDerivedDesignTokenValue(to){return typeof to=="function"}static getTokenById(to){return DesignTokenImpl.tokensById.get(to)}getOrCreateSubscriberSet(to=this){return this.subscribers.get(to)||this.subscribers.set(to,new Set)&&this.subscribers.get(to)}createCSS(){return this.cssVar||""}getValueFor(to){const ro=DesignTokenNode.getOrCreate(to).get(this);if(ro!==void 0)return ro;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${to} or an ancestor of ${to}.`)}setValueFor(to,ro){return this._appliedTo.add(to),ro instanceof DesignTokenImpl&&(ro=this.alias(ro)),DesignTokenNode.getOrCreate(to).set(this,ro),this}deleteValueFor(to){return this._appliedTo.delete(to),DesignTokenNode.existsFor(to)&&DesignTokenNode.getOrCreate(to).delete(this),this}withDefault(to){return this.setValueFor(defaultElement,to),this}subscribe(to,ro){const no=this.getOrCreateSubscriberSet(ro);ro&&!DesignTokenNode.existsFor(ro)&&DesignTokenNode.getOrCreate(ro),no.has(to)||no.add(to)}unsubscribe(to,ro){const no=this.subscribers.get(ro||this);no&&no.has(to)&&no.delete(to)}notify(to){const ro=Object.freeze({token:this,target:to});this.subscribers.has(this)&&this.subscribers.get(this).forEach(no=>no.handleChange(ro)),this.subscribers.has(to)&&this.subscribers.get(to).forEach(no=>no.handleChange(ro))}alias(to){return ro=>to.getValueFor(ro)}}DesignTokenImpl.uniqueId=(()=>{let eo=0;return()=>(eo++,eo.toString(16))})();DesignTokenImpl.tokensById=new Map;class CustomPropertyReflector{startReflection(to,ro){to.subscribe(this,ro),this.handleChange({token:to,target:ro})}stopReflection(to,ro){to.unsubscribe(this,ro),this.remove(to,ro)}handleChange(to){const{token:ro,target:no}=to;this.add(ro,no)}add(to,ro){PropertyTargetManager.getOrCreate(ro).setProperty(to.cssCustomProperty,this.resolveCSSValue(DesignTokenNode.getOrCreate(ro).get(to)))}remove(to,ro){PropertyTargetManager.getOrCreate(ro).removeProperty(to.cssCustomProperty)}resolveCSSValue(to){return to&&typeof to.createCSS=="function"?to.createCSS():to}}class DesignTokenBindingObserver{constructor(to,ro,no){this.source=to,this.token=ro,this.node=no,this.dependencies=new Set,this.observer=Observable$1.binding(to,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){this.node.store.set(this.token,this.observer.observe(this.node.target,defaultExecutionContext))}}class Store{constructor(){this.values=new Map}set(to,ro){this.values.get(to)!==ro&&(this.values.set(to,ro),Observable$1.getNotifier(this).notify(to.id))}get(to){return Observable$1.track(this,to.id),this.values.get(to)}delete(to){this.values.delete(to)}all(){return this.values.entries()}}const nodeCache=new WeakMap,childToParent=new WeakMap;class DesignTokenNode{constructor(to){this.target=to,this.store=new Store,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(ro,no)=>{const oo=DesignTokenImpl.getTokenById(no);if(oo&&(oo.notify(this.target),DesignTokenImpl.isCSSDesignToken(oo))){const io=this.parent,so=this.isReflecting(oo);if(io){const ao=io.get(oo),lo=ro.get(oo);ao!==lo&&!so?this.reflectToCSS(oo):ao===lo&&so&&this.stopReflectToCSS(oo)}else so||this.reflectToCSS(oo)}}},nodeCache.set(to,this),Observable$1.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),to instanceof FASTElement?to.$fastController.addBehaviors([this]):to.isConnected&&this.bind()}static getOrCreate(to){return nodeCache.get(to)||new DesignTokenNode(to)}static existsFor(to){return nodeCache.has(to)}static findParent(to){if(defaultElement!==to.target){let ro=composedParent(to.target);for(;ro!==null;){if(nodeCache.has(ro))return nodeCache.get(ro);ro=composedParent(ro)}return DesignTokenNode.getOrCreate(defaultElement)}return null}static findClosestAssignedNode(to,ro){let no=ro;do{if(no.has(to))return no;no=no.parent?no.parent:no.target!==defaultElement?DesignTokenNode.getOrCreate(defaultElement):null}while(no!==null);return null}get parent(){return childToParent.get(this)||null}has(to){return this.assignedValues.has(to)}get(to){const ro=this.store.get(to);if(ro!==void 0)return ro;const no=this.getRaw(to);if(no!==void 0)return this.hydrate(to,no),this.get(to)}getRaw(to){var ro;return this.assignedValues.has(to)?this.assignedValues.get(to):(ro=DesignTokenNode.findClosestAssignedNode(to,this))===null||ro===void 0?void 0:ro.getRaw(to)}set(to,ro){DesignTokenImpl.isDerivedDesignTokenValue(this.assignedValues.get(to))&&this.tearDownBindingObserver(to),this.assignedValues.set(to,ro),DesignTokenImpl.isDerivedDesignTokenValue(ro)?this.setupBindingObserver(to,ro):this.store.set(to,ro)}delete(to){this.assignedValues.delete(to),this.tearDownBindingObserver(to);const ro=this.getRaw(to);ro?this.hydrate(to,ro):this.store.delete(to)}bind(){const to=DesignTokenNode.findParent(this);to&&to.appendChild(this);for(const ro of this.assignedValues.keys())ro.notify(this.target)}unbind(){this.parent&&childToParent.get(this).removeChild(this)}appendChild(to){to.parent&&childToParent.get(to).removeChild(to);const ro=this.children.filter(no=>to.contains(no));childToParent.set(to,this),this.children.push(to),ro.forEach(no=>to.appendChild(no)),Observable$1.getNotifier(this.store).subscribe(to);for(const[no,oo]of this.store.all())to.hydrate(no,this.bindingObservers.has(no)?this.getRaw(no):oo)}removeChild(to){const ro=this.children.indexOf(to);return ro!==-1&&this.children.splice(ro,1),Observable$1.getNotifier(this.store).unsubscribe(to),to.parent===this?childToParent.delete(to):!1}contains(to){return composedContains(this.target,to.target)}reflectToCSS(to){this.isReflecting(to)||(this.reflecting.add(to),DesignTokenNode.cssCustomPropertyReflector.startReflection(to,this.target))}stopReflectToCSS(to){this.isReflecting(to)&&(this.reflecting.delete(to),DesignTokenNode.cssCustomPropertyReflector.stopReflection(to,this.target))}isReflecting(to){return this.reflecting.has(to)}handleChange(to,ro){const no=DesignTokenImpl.getTokenById(ro);no&&this.hydrate(no,this.getRaw(no))}hydrate(to,ro){if(!this.has(to)){const no=this.bindingObservers.get(to);DesignTokenImpl.isDerivedDesignTokenValue(ro)?no?no.source!==ro&&(this.tearDownBindingObserver(to),this.setupBindingObserver(to,ro)):this.setupBindingObserver(to,ro):(no&&this.tearDownBindingObserver(to),this.store.set(to,ro))}}setupBindingObserver(to,ro){const no=new DesignTokenBindingObserver(ro,to,this);return this.bindingObservers.set(to,no),no}tearDownBindingObserver(to){return this.bindingObservers.has(to)?(this.bindingObservers.get(to).disconnect(),this.bindingObservers.delete(to),!0):!1}}DesignTokenNode.cssCustomPropertyReflector=new CustomPropertyReflector;__decorate([observable],DesignTokenNode.prototype,"children",void 0);function create$2(eo){return DesignTokenImpl.from(eo)}const DesignToken=Object.freeze({create:create$2,notifyConnection(eo){return!eo.isConnected||!DesignTokenNode.existsFor(eo)?!1:(DesignTokenNode.getOrCreate(eo).bind(),!0)},notifyDisconnection(eo){return eo.isConnected||!DesignTokenNode.existsFor(eo)?!1:(DesignTokenNode.getOrCreate(eo).unbind(),!0)},registerRoot(eo=defaultElement){RootStyleSheetTarget.registerRoot(eo)},unregisterRoot(eo=defaultElement){RootStyleSheetTarget.unregisterRoot(eo)}}),ElementDisambiguation=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),elementTypesByTag=new Map,elementTagsByType=new Map;let rootDesignSystem=null;const designSystemKey=DI.createInterface(eo=>eo.cachedCallback(to=>(rootDesignSystem===null&&(rootDesignSystem=new DefaultDesignSystem(null,to)),rootDesignSystem))),DesignSystem=Object.freeze({tagFor(eo){return elementTagsByType.get(eo)},responsibleFor(eo){const to=eo.$$designSystem$$;return to||DI.findResponsibleContainer(eo).get(designSystemKey)},getOrCreate(eo){if(!eo)return rootDesignSystem===null&&(rootDesignSystem=DI.getOrCreateDOMContainer().get(designSystemKey)),rootDesignSystem;const to=eo.$$designSystem$$;if(to)return to;const ro=DI.getOrCreateDOMContainer(eo);if(ro.has(designSystemKey,!1))return ro.get(designSystemKey);{const no=new DefaultDesignSystem(eo,ro);return ro.register(Registration.instance(designSystemKey,no)),no}}});function extractTryDefineElementParams(eo,to,ro){return typeof eo=="string"?{name:eo,type:to,callback:ro}:eo}class DefaultDesignSystem{constructor(to,ro){this.owner=to,this.container=ro,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>ElementDisambiguation.definitionCallbackOnly,to!==null&&(to.$$designSystem$$=this)}withPrefix(to){return this.prefix=to,this}withShadowRootMode(to){return this.shadowRootMode=to,this}withElementDisambiguation(to){return this.disambiguate=to,this}withDesignTokenRoot(to){return this.designTokenRoot=to,this}register(...to){const ro=this.container,no=[],oo=this.disambiguate,io=this.shadowRootMode,so={elementPrefix:this.prefix,tryDefineElement(ao,lo,uo){const co=extractTryDefineElementParams(ao,lo,uo),{name:fo,callback:ho,baseClass:po}=co;let{type:go}=co,vo=fo,bo=elementTypesByTag.get(vo),xo=!0;for(;bo;){const _o=oo(vo,go,bo);switch(_o){case ElementDisambiguation.ignoreDuplicate:return;case ElementDisambiguation.definitionCallbackOnly:xo=!1,bo=void 0;break;default:vo=_o,bo=elementTypesByTag.get(vo);break}}xo&&((elementTagsByType.has(go)||go===FoundationElement)&&(go=class extends go{}),elementTypesByTag.set(vo,go),elementTagsByType.set(go,vo),po&&elementTagsByType.set(po,vo)),no.push(new ElementDefinitionEntry(ro,vo,go,io,ho,xo))}};this.designTokensInitialized||(this.designTokensInitialized=!0,this.designTokenRoot!==null&&DesignToken.registerRoot(this.designTokenRoot)),ro.registerWithContext(so,...to);for(const ao of no)ao.callback(ao),ao.willDefine&&ao.definition!==null&&ao.definition.define();return this}}class ElementDefinitionEntry{constructor(to,ro,no,oo,io,so){this.container=to,this.name=ro,this.type=no,this.shadowRootMode=oo,this.callback=io,this.willDefine=so,this.definition=null}definePresentation(to){ComponentPresentation.define(this.name,to,this.container)}defineElement(to){this.definition=new FASTElementDefinition(this.type,Object.assign(Object.assign({},to),{name:this.name}))}tagFor(to){return DesignSystem.tagFor(to)}}const dividerTemplate=(eo,to)=>html` + +`,DividerRole={separator:"separator",presentation:"presentation"};let Divider$1=class extends FoundationElement{constructor(){super(...arguments),this.role=DividerRole.separator,this.orientation=Orientation.horizontal}};__decorate([attr],Divider$1.prototype,"role",void 0);__decorate([attr],Divider$1.prototype,"orientation",void 0);const listboxOptionTemplate=(eo,to)=>html` + +`;class ListboxElement extends Listbox{constructor(){super(...arguments),this.activeIndex=-1,this.rangeStartIndex=-1}get activeOption(){return this.options[this.activeIndex]}get checkedOptions(){var to;return(to=this.options)===null||to===void 0?void 0:to.filter(ro=>ro.checked)}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(to,ro){var no,oo;this.ariaActiveDescendant=(oo=(no=this.options[ro])===null||no===void 0?void 0:no.id)!==null&&oo!==void 0?oo:"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;const to=this.activeOption;to&&(to.checked=!0)}checkFirstOption(to=!1){to?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach((ro,no)=>{ro.checked=inRange(no,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(to=!1){to?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((ro,no)=>{ro.checked=inRange(no,this.rangeStartIndex,this.options.length)})):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(to=!1){to?(this.rangeStartIndex===-1&&(this.rangeStartIndex=this.activeIndex),this.options.forEach((ro,no)=>{ro.checked=inRange(no,this.rangeStartIndex,this.activeIndex+1)})):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex{ro.checked=inRange(no,this.activeIndex,this.rangeStartIndex)})):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(to){var ro;if(!this.multiple)return super.clickHandler(to);const no=(ro=to.target)===null||ro===void 0?void 0:ro.closest("[role=option]");if(!(!no||no.disabled))return this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(no),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}focusinHandler(to){if(!this.multiple)return super.focusinHandler(to);!this.shouldSkipFocus&&to.target===to.currentTarget&&(this.uncheckAllOptions(),this.activeIndex===-1&&(this.activeIndex=this.firstSelectedOptionIndex!==-1?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(to){this.multiple&&this.uncheckAllOptions()}keydownHandler(to){if(!this.multiple)return super.keydownHandler(to);if(this.disabled)return!0;const{key:ro,shiftKey:no}=to;switch(this.shouldSkipFocus=!1,ro){case keyHome:{this.checkFirstOption(no);return}case keyArrowDown:{this.checkNextOption(no);return}case keyArrowUp:{this.checkPreviousOption(no);return}case keyEnd:{this.checkLastOption(no);return}case keyTab:return this.focusAndScrollOptionIntoView(),!0;case keyEscape:return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case keySpace:if(to.preventDefault(),this.typeAheadExpired){this.toggleSelectedForAllCheckedOptions();return}default:return ro.length===1&&this.handleTypeAhead(`${ro}`),!0}}mousedownHandler(to){if(to.offsetX>=0&&to.offsetX<=this.scrollWidth)return super.mousedownHandler(to)}multipleChanged(to,ro){var no;this.ariaMultiSelectable=ro?"true":null,(no=this.options)===null||no===void 0||no.forEach(oo=>{oo.checked=ro?!1:void 0}),this.setSelectedOptions()}setSelectedOptions(){if(!this.multiple){super.setSelectedOptions();return}this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter(to=>to.selected),this.focusAndScrollOptionIntoView())}sizeChanged(to,ro){var no;const oo=Math.max(0,parseInt((no=ro==null?void 0:ro.toFixed())!==null&&no!==void 0?no:"",10));oo!==ro&&DOM.queueUpdate(()=>{this.size=oo})}toggleSelectedForAllCheckedOptions(){const to=this.checkedOptions.filter(no=>!no.disabled),ro=!to.every(no=>no.selected);to.forEach(no=>no.selected=ro),this.selectedIndex=this.options.indexOf(to[to.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(to,ro){if(!this.multiple){super.typeaheadBufferChanged(to,ro);return}if(this.$fastController.isConnected){const no=this.getTypeaheadMatches(),oo=this.options.indexOf(no[0]);oo>-1&&(this.activeIndex=oo,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}uncheckAllOptions(to=!1){this.options.forEach(ro=>ro.checked=this.multiple?!1:void 0),to||(this.rangeStartIndex=-1)}}__decorate([observable],ListboxElement.prototype,"activeIndex",void 0);__decorate([attr({mode:"boolean"})],ListboxElement.prototype,"multiple",void 0);__decorate([attr({converter:nullableNumberConverter})],ListboxElement.prototype,"size",void 0);class _TextField extends FoundationElement{}class FormAssociatedTextField extends FormAssociated(_TextField){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const TextFieldType={email:"email",password:"password",tel:"tel",text:"text",url:"url"};let TextField$1=class extends FormAssociatedTextField{constructor(){super(...arguments),this.type=TextFieldType.text}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&DOM.queueUpdate(()=>{this.focus()})}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}};__decorate([attr({attribute:"readonly",mode:"boolean"})],TextField$1.prototype,"readOnly",void 0);__decorate([attr({mode:"boolean"})],TextField$1.prototype,"autofocus",void 0);__decorate([attr],TextField$1.prototype,"placeholder",void 0);__decorate([attr],TextField$1.prototype,"type",void 0);__decorate([attr],TextField$1.prototype,"list",void 0);__decorate([attr({converter:nullableNumberConverter})],TextField$1.prototype,"maxlength",void 0);__decorate([attr({converter:nullableNumberConverter})],TextField$1.prototype,"minlength",void 0);__decorate([attr],TextField$1.prototype,"pattern",void 0);__decorate([attr({converter:nullableNumberConverter})],TextField$1.prototype,"size",void 0);__decorate([attr({mode:"boolean"})],TextField$1.prototype,"spellcheck",void 0);__decorate([observable],TextField$1.prototype,"defaultSlottedNodes",void 0);class DelegatesARIATextbox{}applyMixins(DelegatesARIATextbox,ARIAGlobalStatesAndProperties);applyMixins(TextField$1,StartEnd,DelegatesARIATextbox);const progressSegments=44,progressRingTemplate=(eo,to)=>html` + +`;class BaseProgress extends FoundationElement{constructor(){super(...arguments),this.percentComplete=0}valueChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}minChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}maxChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}connectedCallback(){super.connectedCallback(),this.updatePercentComplete()}updatePercentComplete(){const to=typeof this.min=="number"?this.min:0,ro=typeof this.max=="number"?this.max:100,no=typeof this.value=="number"?this.value:0,oo=ro-to;this.percentComplete=oo===0?0:Math.fround((no-to)/oo*100)}}__decorate([attr({converter:nullableNumberConverter})],BaseProgress.prototype,"value",void 0);__decorate([attr({converter:nullableNumberConverter})],BaseProgress.prototype,"min",void 0);__decorate([attr({converter:nullableNumberConverter})],BaseProgress.prototype,"max",void 0);__decorate([attr({mode:"boolean"})],BaseProgress.prototype,"paused",void 0);__decorate([observable],BaseProgress.prototype,"percentComplete",void 0);const radioGroupTemplate=(eo,to)=>html` + +`;let RadioGroup$1=class extends FoundationElement{constructor(){super(...arguments),this.orientation=Orientation.horizontal,this.radioChangeHandler=to=>{const ro=to.target;ro.checked&&(this.slottedRadioButtons.forEach(no=>{no!==ro&&(no.checked=!1,this.isInsideFoundationToolbar||no.setAttribute("tabindex","-1"))}),this.selectedRadio=ro,this.value=ro.value,ro.setAttribute("tabindex","0"),this.focusedRadio=ro),to.stopPropagation()},this.moveToRadioByIndex=(to,ro)=>{const no=to[ro];this.isInsideToolbar||(no.setAttribute("tabindex","0"),no.readOnly?this.slottedRadioButtons.forEach(oo=>{oo!==no&&oo.setAttribute("tabindex","-1")}):(no.checked=!0,this.selectedRadio=no)),this.focusedRadio=no,no.focus()},this.moveRightOffGroup=()=>{var to;(to=this.nextElementSibling)===null||to===void 0||to.focus()},this.moveLeftOffGroup=()=>{var to;(to=this.previousElementSibling)===null||to===void 0||to.focus()},this.focusOutHandler=to=>{const ro=this.slottedRadioButtons,no=to.target,oo=no!==null?ro.indexOf(no):0,io=this.focusedRadio?ro.indexOf(this.focusedRadio):-1;return(io===0&&oo===io||io===ro.length-1&&io===oo)&&(this.selectedRadio?(this.focusedRadio=this.selectedRadio,this.isInsideFoundationToolbar||(this.selectedRadio.setAttribute("tabindex","0"),ro.forEach(so=>{so!==this.selectedRadio&&so.setAttribute("tabindex","-1")}))):(this.focusedRadio=ro[0],this.focusedRadio.setAttribute("tabindex","0"),ro.forEach(so=>{so!==this.focusedRadio&&so.setAttribute("tabindex","-1")}))),!0},this.clickHandler=to=>{const ro=to.target;if(ro){const no=this.slottedRadioButtons;ro.checked||no.indexOf(ro)===0?(ro.setAttribute("tabindex","0"),this.selectedRadio=ro):(ro.setAttribute("tabindex","-1"),this.selectedRadio=null),this.focusedRadio=ro}to.preventDefault()},this.shouldMoveOffGroupToTheRight=(to,ro,no)=>to===ro.length&&this.isInsideToolbar&&no===keyArrowRight,this.shouldMoveOffGroupToTheLeft=(to,ro)=>(this.focusedRadio?to.indexOf(this.focusedRadio)-1:0)<0&&this.isInsideToolbar&&ro===keyArrowLeft,this.checkFocusedRadio=()=>{this.focusedRadio!==null&&!this.focusedRadio.readOnly&&!this.focusedRadio.checked&&(this.focusedRadio.checked=!0,this.focusedRadio.setAttribute("tabindex","0"),this.focusedRadio.focus(),this.selectedRadio=this.focusedRadio)},this.moveRight=to=>{const ro=this.slottedRadioButtons;let no=0;if(no=this.focusedRadio?ro.indexOf(this.focusedRadio)+1:1,this.shouldMoveOffGroupToTheRight(no,ro,to.key)){this.moveRightOffGroup();return}else no===ro.length&&(no=0);for(;no1;)if(ro[no].disabled){if(this.focusedRadio&&no===ro.indexOf(this.focusedRadio))break;if(no+1>=ro.length){if(this.isInsideToolbar)break;no=0}else no+=1}else{this.moveToRadioByIndex(ro,no);break}},this.moveLeft=to=>{const ro=this.slottedRadioButtons;let no=0;if(no=this.focusedRadio?ro.indexOf(this.focusedRadio)-1:0,no=no<0?ro.length-1:no,this.shouldMoveOffGroupToTheLeft(ro,to.key)){this.moveLeftOffGroup();return}for(;no>=0&&ro.length>1;)if(ro[no].disabled){if(this.focusedRadio&&no===ro.indexOf(this.focusedRadio))break;no-1<0?no=ro.length-1:no-=1}else{this.moveToRadioByIndex(ro,no);break}},this.keydownHandler=to=>{const ro=to.key;if(ro in ArrowKeys&&this.isInsideFoundationToolbar)return!0;switch(ro){case keyEnter:{this.checkFocusedRadio();break}case keyArrowRight:case keyArrowDown:{this.direction===Direction$1.ltr?this.moveRight(to):this.moveLeft(to);break}case keyArrowLeft:case keyArrowUp:{this.direction===Direction$1.ltr?this.moveLeft(to):this.moveRight(to);break}default:return!0}}}readOnlyChanged(){this.slottedRadioButtons!==void 0&&this.slottedRadioButtons.forEach(to=>{this.readOnly?to.readOnly=!0:to.readOnly=!1})}disabledChanged(){this.slottedRadioButtons!==void 0&&this.slottedRadioButtons.forEach(to=>{this.disabled?to.disabled=!0:to.disabled=!1})}nameChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach(to=>{to.setAttribute("name",this.name)})}valueChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach(to=>{to.value===this.value&&(to.checked=!0,this.selectedRadio=to)}),this.$emit("change")}slottedRadioButtonsChanged(to,ro){this.slottedRadioButtons&&this.slottedRadioButtons.length>0&&this.setupRadioButtons()}get parentToolbar(){return this.closest('[role="toolbar"]')}get isInsideToolbar(){var to;return(to=this.parentToolbar)!==null&&to!==void 0?to:!1}get isInsideFoundationToolbar(){var to;return!!(!((to=this.parentToolbar)===null||to===void 0)&&to.$fastController)}connectedCallback(){super.connectedCallback(),this.direction=getDirection(this),this.setupRadioButtons()}disconnectedCallback(){this.slottedRadioButtons.forEach(to=>{to.removeEventListener("change",this.radioChangeHandler)})}setupRadioButtons(){const to=this.slottedRadioButtons.filter(oo=>oo.hasAttribute("checked")),ro=to?to.length:0;if(ro>1){const oo=to[ro-1];oo.checked=!0}let no=!1;if(this.slottedRadioButtons.forEach(oo=>{this.name!==void 0&&oo.setAttribute("name",this.name),this.disabled&&(oo.disabled=!0),this.readOnly&&(oo.readOnly=!0),this.value&&this.value===oo.value?(this.selectedRadio=oo,this.focusedRadio=oo,oo.checked=!0,oo.setAttribute("tabindex","0"),no=!0):(this.isInsideFoundationToolbar||oo.setAttribute("tabindex","-1"),oo.checked=!1),oo.addEventListener("change",this.radioChangeHandler)}),this.value===void 0&&this.slottedRadioButtons.length>0){const oo=this.slottedRadioButtons.filter(so=>so.hasAttribute("checked")),io=oo!==null?oo.length:0;if(io>0&&!no){const so=oo[io-1];so.checked=!0,this.focusedRadio=so,so.setAttribute("tabindex","0")}else this.slottedRadioButtons[0].setAttribute("tabindex","0"),this.focusedRadio=this.slottedRadioButtons[0]}}};__decorate([attr({attribute:"readonly",mode:"boolean"})],RadioGroup$1.prototype,"readOnly",void 0);__decorate([attr({attribute:"disabled",mode:"boolean"})],RadioGroup$1.prototype,"disabled",void 0);__decorate([attr],RadioGroup$1.prototype,"name",void 0);__decorate([attr],RadioGroup$1.prototype,"value",void 0);__decorate([attr],RadioGroup$1.prototype,"orientation",void 0);__decorate([observable],RadioGroup$1.prototype,"childItems",void 0);__decorate([observable],RadioGroup$1.prototype,"slottedRadioButtons",void 0);const radioTemplate=(eo,to)=>html` + +`;class _Radio extends FoundationElement{}class FormAssociatedRadio extends CheckableFormAssociated(_Radio){constructor(){super(...arguments),this.proxy=document.createElement("input")}}let Radio$1=class extends FormAssociatedRadio{constructor(){super(),this.initialValue="on",this.keypressHandler=to=>{switch(to.key){case keySpace:!this.checked&&!this.readOnly&&(this.checked=!0);return}return!0},this.proxy.setAttribute("type","radio")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}defaultCheckedChanged(){var to;this.$fastController.isConnected&&!this.dirtyChecked&&(this.isInsideRadioGroup()||(this.checked=(to=this.defaultChecked)!==null&&to!==void 0?to:!1,this.dirtyChecked=!1))}connectedCallback(){var to,ro;super.connectedCallback(),this.validate(),((to=this.parentElement)===null||to===void 0?void 0:to.getAttribute("role"))!=="radiogroup"&&this.getAttribute("tabindex")===null&&(this.disabled||this.setAttribute("tabindex","0")),this.checkedAttribute&&(this.dirtyChecked||this.isInsideRadioGroup()||(this.checked=(ro=this.defaultChecked)!==null&&ro!==void 0?ro:!1,this.dirtyChecked=!1))}isInsideRadioGroup(){return this.closest("[role=radiogroup]")!==null}clickHandler(to){!this.disabled&&!this.readOnly&&!this.checked&&(this.checked=!0)}};__decorate([attr({attribute:"readonly",mode:"boolean"})],Radio$1.prototype,"readOnly",void 0);__decorate([observable],Radio$1.prototype,"name",void 0);__decorate([observable],Radio$1.prototype,"defaultSlottedNodes",void 0);function whitespaceFilter(eo,to,ro){return eo.nodeType!==Node.TEXT_NODE?!0:typeof eo.nodeValue=="string"&&!!eo.nodeValue.trim().length}class _Select extends ListboxElement{}class FormAssociatedSelect extends FormAssociated(_Select){constructor(){super(...arguments),this.proxy=document.createElement("select")}}class Select extends FormAssociatedSelect{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=uniqueId("listbox-"),this.maxHeight=0}openChanged(to,ro){if(this.collapsible){if(this.open){this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,DOM.queueUpdate(()=>this.focus());return}this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||typeof this.size=="number")}get value(){return Observable$1.track(this,"value"),this._value}set value(to){var ro,no,oo,io,so,ao,lo;const uo=`${this._value}`;if(!((ro=this._options)===null||ro===void 0)&&ro.length){const co=this._options.findIndex(po=>po.value===to),fo=(oo=(no=this._options[this.selectedIndex])===null||no===void 0?void 0:no.value)!==null&&oo!==void 0?oo:null,ho=(so=(io=this._options[co])===null||io===void 0?void 0:io.value)!==null&&so!==void 0?so:null;(co===-1||fo!==ho)&&(to="",this.selectedIndex=co),to=(lo=(ao=this.firstSelectedOption)===null||ao===void 0?void 0:ao.value)!==null&&lo!==void 0?lo:to}uo!==to&&(this._value=to,super.valueChanged(uo,to),Observable$1.notify(this,"value"),this.updateDisplayValue())}updateValue(to){var ro,no;this.$fastController.isConnected&&(this.value=(no=(ro=this.firstSelectedOption)===null||ro===void 0?void 0:ro.value)!==null&&no!==void 0?no:""),to&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(to,ro){super.selectedIndexChanged(to,ro),this.updateValue()}positionChanged(to,ro){this.positionAttribute=ro,this.setPositioning()}setPositioning(){const to=this.getBoundingClientRect(),no=window.innerHeight-to.bottom;this.position=this.forcedPosition?this.positionAttribute:to.top>no?SelectPosition.above:SelectPosition.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===SelectPosition.above?~~to.top:~~no}get displayValue(){var to,ro;return Observable$1.track(this,"displayValue"),(ro=(to=this.firstSelectedOption)===null||to===void 0?void 0:to.text)!==null&&ro!==void 0?ro:""}disabledChanged(to,ro){super.disabledChanged&&super.disabledChanged(to,ro),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),this.selectedIndex===-1&&(this.selectedIndex=0)}clickHandler(to){if(!this.disabled){if(this.open){const ro=to.target.closest("option,[role=option]");if(ro&&ro.disabled)return}return super.clickHandler(to),this.open=this.collapsible&&!this.open,!this.open&&this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0),!0}}focusoutHandler(to){var ro;if(super.focusoutHandler(to),!this.open)return!0;const no=to.relatedTarget;if(this.isSameNode(no)){this.focus();return}!((ro=this.options)===null||ro===void 0)&&ro.includes(no)||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(to,ro){super.handleChange(to,ro),ro==="value"&&this.updateValue()}slottedOptionsChanged(to,ro){this.options.forEach(no=>{Observable$1.getNotifier(no).unsubscribe(this,"value")}),super.slottedOptionsChanged(to,ro),this.options.forEach(no=>{Observable$1.getNotifier(no).subscribe(this,"value")}),this.setProxyOptions(),this.updateValue()}mousedownHandler(to){var ro;return to.offsetX>=0&&to.offsetX<=((ro=this.listbox)===null||ro===void 0?void 0:ro.scrollWidth)?super.mousedownHandler(to):this.collapsible}multipleChanged(to,ro){super.multipleChanged(to,ro),this.proxy&&(this.proxy.multiple=ro)}selectedOptionsChanged(to,ro){var no;super.selectedOptionsChanged(to,ro),(no=this.options)===null||no===void 0||no.forEach((oo,io)=>{var so;const ao=(so=this.proxy)===null||so===void 0?void 0:so.options.item(io);ao&&(ao.selected=oo.selected)})}setDefaultSelectedOption(){var to;const ro=(to=this.options)!==null&&to!==void 0?to:Array.from(this.children).filter(Listbox.slottedOptionFilter),no=ro==null?void 0:ro.findIndex(oo=>oo.hasAttribute("selected")||oo.selected||oo.value===this.value);if(no!==-1){this.selectedIndex=no;return}this.selectedIndex=0}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach(to=>{const ro=to.proxy||(to instanceof HTMLOptionElement?to.cloneNode():null);ro&&this.proxy.options.add(ro)}))}keydownHandler(to){super.keydownHandler(to);const ro=to.key||to.key.charCodeAt(0);switch(ro){case keySpace:{to.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break}case keyHome:case keyEnd:{to.preventDefault();break}case keyEnter:{to.preventDefault(),this.open=!this.open;break}case keyEscape:{this.collapsible&&this.open&&(to.preventDefault(),this.open=!1);break}case keyTab:return this.collapsible&&this.open&&(to.preventDefault(),this.open=!1),!0}return!this.open&&this.indexWhenOpened!==this.selectedIndex&&(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(ro===keyArrowDown||ro===keyArrowUp)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(to,ro){super.sizeChanged(to,ro),this.proxy&&(this.proxy.size=ro)}updateDisplayValue(){this.collapsible&&Observable$1.notify(this,"displayValue")}}__decorate([attr({attribute:"open",mode:"boolean"})],Select.prototype,"open",void 0);__decorate([volatile],Select.prototype,"collapsible",null);__decorate([observable],Select.prototype,"control",void 0);__decorate([attr({attribute:"position"})],Select.prototype,"positionAttribute",void 0);__decorate([observable],Select.prototype,"position",void 0);__decorate([observable],Select.prototype,"maxHeight",void 0);class DelegatesARIASelect{}__decorate([observable],DelegatesARIASelect.prototype,"ariaControls",void 0);applyMixins(DelegatesARIASelect,DelegatesARIAListbox);applyMixins(Select,StartEnd,DelegatesARIASelect);const selectTemplate=(eo,to)=>html` + +`,tabPanelTemplate=(eo,to)=>html` + +`;class TabPanel extends FoundationElement{}const tabTemplate=(eo,to)=>html` + +`;class Tab extends FoundationElement{}__decorate([attr({mode:"boolean"})],Tab.prototype,"disabled",void 0);const tabsTemplate=(eo,to)=>html` + +`,TabsOrientation={vertical:"vertical",horizontal:"horizontal"};class Tabs extends FoundationElement{constructor(){super(...arguments),this.orientation=TabsOrientation.horizontal,this.activeindicator=!0,this.showActiveIndicator=!0,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.ticking=!1,this.change=()=>{this.$emit("change",this.activetab)},this.isDisabledElement=to=>to.getAttribute("aria-disabled")==="true",this.isHiddenElement=to=>to.hasAttribute("hidden"),this.isFocusableElement=to=>!this.isDisabledElement(to)&&!this.isHiddenElement(to),this.setTabs=()=>{const to="gridColumn",ro="gridRow",no=this.isHorizontal()?to:ro;this.activeTabIndex=this.getActiveIndex(),this.showActiveIndicator=!1,this.tabs.forEach((oo,io)=>{if(oo.slot==="tab"){const so=this.activeTabIndex===io&&this.isFocusableElement(oo);this.activeindicator&&this.isFocusableElement(oo)&&(this.showActiveIndicator=!0);const ao=this.tabIds[io],lo=this.tabpanelIds[io];oo.setAttribute("id",ao),oo.setAttribute("aria-selected",so?"true":"false"),oo.setAttribute("aria-controls",lo),oo.addEventListener("click",this.handleTabClick),oo.addEventListener("keydown",this.handleTabKeyDown),oo.setAttribute("tabindex",so?"0":"-1"),so&&(this.activetab=oo,this.activeid=ao)}oo.style[to]="",oo.style[ro]="",oo.style[no]=`${io+1}`,this.isHorizontal()?oo.classList.remove("vertical"):oo.classList.add("vertical")})},this.setTabPanels=()=>{this.tabpanels.forEach((to,ro)=>{const no=this.tabIds[ro],oo=this.tabpanelIds[ro];to.setAttribute("id",oo),to.setAttribute("aria-labelledby",no),this.activeTabIndex!==ro?to.setAttribute("hidden",""):to.removeAttribute("hidden")})},this.handleTabClick=to=>{const ro=to.currentTarget;ro.nodeType===1&&this.isFocusableElement(ro)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(ro),this.setComponent())},this.handleTabKeyDown=to=>{if(this.isHorizontal())switch(to.key){case keyArrowLeft:to.preventDefault(),this.adjustBackward(to);break;case keyArrowRight:to.preventDefault(),this.adjustForward(to);break}else switch(to.key){case keyArrowUp:to.preventDefault(),this.adjustBackward(to);break;case keyArrowDown:to.preventDefault(),this.adjustForward(to);break}switch(to.key){case keyHome:to.preventDefault(),this.adjust(-this.activeTabIndex);break;case keyEnd:to.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1);break}},this.adjustForward=to=>{const ro=this.tabs;let no=0;for(no=this.activetab?ro.indexOf(this.activetab)+1:1,no===ro.length&&(no=0);no1;)if(this.isFocusableElement(ro[no])){this.moveToTabByIndex(ro,no);break}else{if(this.activetab&&no===ro.indexOf(this.activetab))break;no+1>=ro.length?no=0:no+=1}},this.adjustBackward=to=>{const ro=this.tabs;let no=0;for(no=this.activetab?ro.indexOf(this.activetab)-1:0,no=no<0?ro.length-1:no;no>=0&&ro.length>1;)if(this.isFocusableElement(ro[no])){this.moveToTabByIndex(ro,no);break}else no-1<0?no=ro.length-1:no-=1},this.moveToTabByIndex=(to,ro)=>{const no=to[ro];this.activetab=no,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=ro,no.focus(),this.setComponent()}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}activeidChanged(to,ro){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.prevActiveTabIndex=this.tabs.findIndex(no=>no.id===to),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}getActiveIndex(){return this.activeid!==void 0?this.tabIds.indexOf(this.activeid)===-1?0:this.tabIds.indexOf(this.activeid):0}getTabIds(){return this.tabs.map(to=>{var ro;return(ro=to.getAttribute("id"))!==null&&ro!==void 0?ro:`tab-${uniqueId()}`})}getTabPanelIds(){return this.tabpanels.map(to=>{var ro;return(ro=to.getAttribute("id"))!==null&&ro!==void 0?ro:`panel-${uniqueId()}`})}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab(),this.change())}isHorizontal(){return this.orientation===TabsOrientation.horizontal}handleActiveIndicatorPosition(){this.showActiveIndicator&&this.activeindicator&&this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;const to=this.isHorizontal()?"gridColumn":"gridRow",ro=this.isHorizontal()?"translateX":"translateY",no=this.isHorizontal()?"offsetLeft":"offsetTop",oo=this.activeIndicatorRef[no];this.activeIndicatorRef.style[to]=`${this.activeTabIndex+1}`;const io=this.activeIndicatorRef[no];this.activeIndicatorRef.style[to]=`${this.prevActiveTabIndex+1}`;const so=io-oo;this.activeIndicatorRef.style.transform=`${ro}(${so}px)`,this.activeIndicatorRef.classList.add("activeIndicatorTransition"),this.activeIndicatorRef.addEventListener("transitionend",()=>{this.ticking=!1,this.activeIndicatorRef.style[to]=`${this.activeTabIndex+1}`,this.activeIndicatorRef.style.transform=`${ro}(0px)`,this.activeIndicatorRef.classList.remove("activeIndicatorTransition")})}adjust(to){const ro=this.tabs.filter(so=>this.isFocusableElement(so)),no=ro.indexOf(this.activetab),oo=limit(0,ro.length-1,no+to),io=this.tabs.indexOf(ro[oo]);io>-1&&this.moveToTabByIndex(this.tabs,io)}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}}__decorate([attr],Tabs.prototype,"orientation",void 0);__decorate([attr],Tabs.prototype,"activeid",void 0);__decorate([observable],Tabs.prototype,"tabs",void 0);__decorate([observable],Tabs.prototype,"tabpanels",void 0);__decorate([attr({mode:"boolean"})],Tabs.prototype,"activeindicator",void 0);__decorate([observable],Tabs.prototype,"activeIndicatorRef",void 0);__decorate([observable],Tabs.prototype,"showActiveIndicator",void 0);applyMixins(Tabs,StartEnd);class _TextArea extends FoundationElement{}class FormAssociatedTextArea extends FormAssociated(_TextArea){constructor(){super(...arguments),this.proxy=document.createElement("textarea")}}const TextAreaResize={none:"none",both:"both",horizontal:"horizontal",vertical:"vertical"};let TextArea$1=class extends FormAssociatedTextArea{constructor(){super(...arguments),this.resize=TextAreaResize.none,this.cols=20,this.handleTextInput=()=>{this.value=this.control.value}}readOnlyChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.readOnly=this.readOnly)}autofocusChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.autofocus=this.autofocus)}listChanged(){this.proxy instanceof HTMLTextAreaElement&&this.proxy.setAttribute("list",this.list)}maxlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.maxLength=this.maxlength)}minlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.minLength=this.minlength)}spellcheckChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.spellcheck=this.spellcheck)}select(){this.control.select(),this.$emit("select")}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}};__decorate([attr({mode:"boolean"})],TextArea$1.prototype,"readOnly",void 0);__decorate([attr],TextArea$1.prototype,"resize",void 0);__decorate([attr({mode:"boolean"})],TextArea$1.prototype,"autofocus",void 0);__decorate([attr({attribute:"form"})],TextArea$1.prototype,"formId",void 0);__decorate([attr],TextArea$1.prototype,"list",void 0);__decorate([attr({converter:nullableNumberConverter})],TextArea$1.prototype,"maxlength",void 0);__decorate([attr({converter:nullableNumberConverter})],TextArea$1.prototype,"minlength",void 0);__decorate([attr],TextArea$1.prototype,"name",void 0);__decorate([attr],TextArea$1.prototype,"placeholder",void 0);__decorate([attr({converter:nullableNumberConverter,mode:"fromView"})],TextArea$1.prototype,"cols",void 0);__decorate([attr({converter:nullableNumberConverter,mode:"fromView"})],TextArea$1.prototype,"rows",void 0);__decorate([attr({mode:"boolean"})],TextArea$1.prototype,"spellcheck",void 0);__decorate([observable],TextArea$1.prototype,"defaultSlottedNodes",void 0);applyMixins(TextArea$1,DelegatesARIATextbox);const textAreaTemplate=(eo,to)=>html` + +`,textFieldTemplate=(eo,to)=>html` + +`,disabledCursor="not-allowed",hidden=":host([hidden]){display:none}";function display(eo){return`${hidden}:host{display:${eo}}`}const focusVisible=canUseFocusVisible()?"focus-visible":"focus",reservedReactProperties=new Set(["children","localName","ref","style","className"]),emptyProps=Object.freeze(Object.create(null)),DEFAULT_CACHE_NAME="_default",wrappersCache=new Map;function setRef(eo,to){typeof eo=="function"?eo(to):eo.current=to}function getTagName(eo,to){if(!to.name){const ro=FASTElementDefinition.forType(eo);if(ro)to.name=ro.name;else throw new Error("React wrappers must wrap a FASTElement or be configured with a name.")}return to.name}function getElementEvents(eo){return eo.events||(eo.events={})}function keyIsValid(eo,to,ro){return reservedReactProperties.has(ro)?(console.warn(`${getTagName(eo,to)} contains property ${ro} which is a React reserved property. It will be used by React and not set on the element.`),!1):!0}function getElementKeys(eo,to){if(!to.keys)if(to.properties)to.keys=new Set(to.properties.concat(Object.keys(getElementEvents(to))));else{const ro=new Set(Object.keys(getElementEvents(to))),no=Observable$1.getAccessors(eo.prototype);if(no.length>0)for(const oo of no)keyIsValid(eo,to,oo.name)&&ro.add(oo.name);else for(const oo in eo.prototype)!(oo in HTMLElement.prototype)&&keyIsValid(eo,to,oo)&&ro.add(oo);to.keys=ro}return to.keys}function provideReactWrapper(eo,to){let ro=[];const no={register(io,...so){ro.forEach(ao=>ao.register(io,...so)),ro=[]}};function oo(io,so={}){var ao,lo;io instanceof FoundationElementRegistry&&(to?to.register(io):ro.push(io),io=io.type);const uo=wrappersCache.get(io);if(uo){const ho=uo.get((ao=so.name)!==null&&ao!==void 0?ao:DEFAULT_CACHE_NAME);if(ho)return ho}class co extends eo.Component{constructor(){super(...arguments),this._element=null}_updateElement(po){const go=this._element;if(go===null)return;const vo=this.props,bo=po||emptyProps,xo=getElementEvents(so);for(const _o in this._elementProps){const Eo=vo[_o],So=xo[_o];if(So===void 0)go[_o]=Eo;else{const To=bo[_o];if(Eo===To)continue;To!==void 0&&go.removeEventListener(So,To),Eo!==void 0&&go.addEventListener(So,Eo)}}}componentDidMount(){this._updateElement()}componentDidUpdate(po){this._updateElement(po)}render(){const po=this.props.__forwardedRef;(this._ref===void 0||this._userRef!==po)&&(this._ref=_o=>{this._element===null&&(this._element=_o),po!==null&&setRef(po,_o),this._userRef=po});const go={ref:this._ref},vo=this._elementProps={},bo=getElementKeys(io,so),xo=this.props;for(const _o in xo){const Eo=xo[_o];bo.has(_o)?vo[_o]=Eo:go[_o==="className"?"class":_o]=Eo}return eo.createElement(getTagName(io,so),go)}}const fo=eo.forwardRef((ho,po)=>eo.createElement(co,Object.assign(Object.assign({},ho),{__forwardedRef:po}),ho==null?void 0:ho.children));return wrappersCache.has(io)||wrappersCache.set(io,new Map),wrappersCache.get(io).set((lo=so.name)!==null&&lo!==void 0?lo:DEFAULT_CACHE_NAME,fo),fo}return{wrap:oo,registry:no}}function provideVSCodeDesignSystem(eo){return DesignSystem.getOrCreate(eo).withPrefix("vscode")}function initThemeChangeListener(eo){window.addEventListener("load",()=>{new MutationObserver(()=>{applyCurrentTheme(eo)}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),applyCurrentTheme(eo)})}function applyCurrentTheme(eo){const to=getComputedStyle(document.body),ro=document.querySelector("body");if(ro){const no=ro.getAttribute("data-vscode-theme-kind");for(const[oo,io]of eo){let so=to.getPropertyValue(oo).toString();if(no==="vscode-high-contrast")so.length===0&&io.name.includes("background")&&(so="transparent"),io.name==="button-icon-hover-background"&&(so="transparent");else if(no==="vscode-high-contrast-light"){if(so.length===0&&io.name.includes("background"))switch(io.name){case"button-primary-hover-background":so="#0F4A85";break;case"button-secondary-hover-background":so="transparent";break;case"button-icon-hover-background":so="transparent";break}}else io.name==="contrast-active-border"&&(so="transparent");io.setValueFor(ro,so)}}}const tokenMappings=new Map;let isThemeListenerInitialized=!1;function create$1(eo,to){const ro=DesignToken.create(eo);if(to){if(to.includes("--fake-vscode-token")){const no="id"+Math.random().toString(16).slice(2);to=`${to}-${no}`}tokenMappings.set(to,ro)}return isThemeListenerInitialized||(initThemeChangeListener(tokenMappings),isThemeListenerInitialized=!0),ro}const background$1=create$1("background","--vscode-editor-background").withDefault("#1e1e1e"),borderWidth=create$1("border-width").withDefault(1),contrastActiveBorder=create$1("contrast-active-border","--vscode-contrastActiveBorder").withDefault("#f38518");create$1("contrast-border","--vscode-contrastBorder").withDefault("#6fc3df");const cornerRadius=create$1("corner-radius").withDefault(0),cornerRadiusRound=create$1("corner-radius-round").withDefault(2),designUnit=create$1("design-unit").withDefault(4),disabledOpacity=create$1("disabled-opacity").withDefault(.4),focusBorder=create$1("focus-border","--vscode-focusBorder").withDefault("#007fd4"),fontFamily=create$1("font-family","--vscode-font-family").withDefault("-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol");create$1("font-weight","--vscode-font-weight").withDefault("400");const foreground=create$1("foreground","--vscode-foreground").withDefault("#cccccc"),inputHeight=create$1("input-height").withDefault("26"),inputMinWidth=create$1("input-min-width").withDefault("100px"),typeRampBaseFontSize=create$1("type-ramp-base-font-size","--vscode-font-size").withDefault("13px"),typeRampBaseLineHeight=create$1("type-ramp-base-line-height").withDefault("normal"),typeRampMinus1FontSize=create$1("type-ramp-minus1-font-size").withDefault("11px"),typeRampMinus1LineHeight=create$1("type-ramp-minus1-line-height").withDefault("16px");create$1("type-ramp-minus2-font-size").withDefault("9px");create$1("type-ramp-minus2-line-height").withDefault("16px");create$1("type-ramp-plus1-font-size").withDefault("16px");create$1("type-ramp-plus1-line-height").withDefault("24px");const scrollbarWidth=create$1("scrollbarWidth").withDefault("10px"),scrollbarHeight=create$1("scrollbarHeight").withDefault("10px"),scrollbarSliderBackground=create$1("scrollbar-slider-background","--vscode-scrollbarSlider-background").withDefault("#79797966"),scrollbarSliderHoverBackground=create$1("scrollbar-slider-hover-background","--vscode-scrollbarSlider-hoverBackground").withDefault("#646464b3"),scrollbarSliderActiveBackground=create$1("scrollbar-slider-active-background","--vscode-scrollbarSlider-activeBackground").withDefault("#bfbfbf66"),badgeBackground=create$1("badge-background","--vscode-badge-background").withDefault("#4d4d4d"),badgeForeground=create$1("badge-foreground","--vscode-badge-foreground").withDefault("#ffffff"),buttonBorder=create$1("button-border","--vscode-button-border").withDefault("transparent"),buttonIconBackground=create$1("button-icon-background").withDefault("transparent"),buttonIconCornerRadius=create$1("button-icon-corner-radius").withDefault("5px"),buttonIconFocusBorderOffset=create$1("button-icon-outline-offset").withDefault(0),buttonIconHoverBackground=create$1("button-icon-hover-background","--fake-vscode-token").withDefault("rgba(90, 93, 94, 0.31)"),buttonIconPadding=create$1("button-icon-padding").withDefault("3px"),buttonPrimaryBackground=create$1("button-primary-background","--vscode-button-background").withDefault("#0e639c"),buttonPrimaryForeground=create$1("button-primary-foreground","--vscode-button-foreground").withDefault("#ffffff"),buttonPrimaryHoverBackground=create$1("button-primary-hover-background","--vscode-button-hoverBackground").withDefault("#1177bb"),buttonSecondaryBackground=create$1("button-secondary-background","--vscode-button-secondaryBackground").withDefault("#3a3d41"),buttonSecondaryForeground=create$1("button-secondary-foreground","--vscode-button-secondaryForeground").withDefault("#ffffff"),buttonSecondaryHoverBackground=create$1("button-secondary-hover-background","--vscode-button-secondaryHoverBackground").withDefault("#45494e"),buttonPaddingHorizontal=create$1("button-padding-horizontal").withDefault("11px"),buttonPaddingVertical=create$1("button-padding-vertical").withDefault("4px"),checkboxBackground=create$1("checkbox-background","--vscode-checkbox-background").withDefault("#3c3c3c"),checkboxBorder=create$1("checkbox-border","--vscode-checkbox-border").withDefault("#3c3c3c"),checkboxCornerRadius=create$1("checkbox-corner-radius").withDefault(3);create$1("checkbox-foreground","--vscode-checkbox-foreground").withDefault("#f0f0f0");const listActiveSelectionBackground=create$1("list-active-selection-background","--vscode-list-activeSelectionBackground").withDefault("#094771"),listActiveSelectionForeground=create$1("list-active-selection-foreground","--vscode-list-activeSelectionForeground").withDefault("#ffffff"),listHoverBackground=create$1("list-hover-background","--vscode-list-hoverBackground").withDefault("#2a2d2e"),dividerBackground=create$1("divider-background","--vscode-settings-dropdownListBorder").withDefault("#454545"),dropdownBackground=create$1("dropdown-background","--vscode-dropdown-background").withDefault("#3c3c3c"),dropdownBorder=create$1("dropdown-border","--vscode-dropdown-border").withDefault("#3c3c3c");create$1("dropdown-foreground","--vscode-dropdown-foreground").withDefault("#f0f0f0");const dropdownListMaxHeight=create$1("dropdown-list-max-height").withDefault("200px"),inputBackground=create$1("input-background","--vscode-input-background").withDefault("#3c3c3c"),inputForeground=create$1("input-foreground","--vscode-input-foreground").withDefault("#cccccc");create$1("input-placeholder-foreground","--vscode-input-placeholderForeground").withDefault("#cccccc");const linkActiveForeground=create$1("link-active-foreground","--vscode-textLink-activeForeground").withDefault("#3794ff"),linkForeground=create$1("link-foreground","--vscode-textLink-foreground").withDefault("#3794ff"),progressBackground=create$1("progress-background","--vscode-progressBar-background").withDefault("#0e70c0"),panelTabActiveBorder=create$1("panel-tab-active-border","--vscode-panelTitle-activeBorder").withDefault("#e7e7e7"),panelTabActiveForeground=create$1("panel-tab-active-foreground","--vscode-panelTitle-activeForeground").withDefault("#e7e7e7"),panelTabForeground=create$1("panel-tab-foreground","--vscode-panelTitle-inactiveForeground").withDefault("#e7e7e799");create$1("panel-view-background","--vscode-panel-background").withDefault("#1e1e1e");create$1("panel-view-border","--vscode-panel-border").withDefault("#80808059");const tagCornerRadius=create$1("tag-corner-radius").withDefault("2px"),badgeStyles=(eo,to)=>css$1` + ${display("inline-block")} :host { + box-sizing: border-box; + font-family: ${fontFamily}; + font-size: ${typeRampMinus1FontSize}; + line-height: ${typeRampMinus1LineHeight}; + text-align: center; + } + .control { + align-items: center; + background-color: ${badgeBackground}; + border: calc(${borderWidth} * 1px) solid ${buttonBorder}; + border-radius: 11px; + box-sizing: border-box; + color: ${badgeForeground}; + display: flex; + height: calc(${designUnit} * 4px); + justify-content: center; + min-width: calc(${designUnit} * 4px + 2px); + min-height: calc(${designUnit} * 4px + 2px); + padding: 3px 6px; + } +`;class Badge extends Badge$1{connectedCallback(){super.connectedCallback(),this.circular||(this.circular=!0)}}const vsCodeBadge=Badge.compose({baseName:"badge",template:badgeTemplate,styles:badgeStyles}),BaseButtonStyles=css$1` + ${display("inline-flex")} :host { + outline: none; + font-family: ${fontFamily}; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + color: ${buttonPrimaryForeground}; + background: ${buttonPrimaryBackground}; + border-radius: calc(${cornerRadiusRound} * 1px); + fill: currentColor; + cursor: pointer; + } + .control { + background: transparent; + height: inherit; + flex-grow: 1; + box-sizing: border-box; + display: inline-flex; + justify-content: center; + align-items: center; + padding: ${buttonPaddingVertical} ${buttonPaddingHorizontal}; + white-space: wrap; + outline: none; + text-decoration: none; + border: calc(${borderWidth} * 1px) solid ${buttonBorder}; + color: inherit; + border-radius: inherit; + fill: inherit; + cursor: inherit; + font-family: inherit; + } + :host(:hover) { + background: ${buttonPrimaryHoverBackground}; + } + :host(:active) { + background: ${buttonPrimaryBackground}; + } + .control:${focusVisible} { + outline: calc(${borderWidth} * 1px) solid ${focusBorder}; + outline-offset: calc(${borderWidth} * 2px); + } + .control::-moz-focus-inner { + border: 0; + } + :host([disabled]) { + opacity: ${disabledOpacity}; + background: ${buttonPrimaryBackground}; + cursor: ${disabledCursor}; + } + .content { + display: flex; + } + .start { + display: flex; + } + ::slotted(svg), + ::slotted(span) { + width: calc(${designUnit} * 4px); + height: calc(${designUnit} * 4px); + } + .start { + margin-inline-end: 8px; + } +`,PrimaryButtonStyles=css$1` + :host([appearance='primary']) { + background: ${buttonPrimaryBackground}; + color: ${buttonPrimaryForeground}; + } + :host([appearance='primary']:hover) { + background: ${buttonPrimaryHoverBackground}; + } + :host([appearance='primary']:active) .control:active { + background: ${buttonPrimaryBackground}; + } + :host([appearance='primary']) .control:${focusVisible} { + outline: calc(${borderWidth} * 1px) solid ${focusBorder}; + outline-offset: calc(${borderWidth} * 2px); + } + :host([appearance='primary'][disabled]) { + background: ${buttonPrimaryBackground}; + } +`,SecondaryButtonStyles=css$1` + :host([appearance='secondary']) { + background: ${buttonSecondaryBackground}; + color: ${buttonSecondaryForeground}; + } + :host([appearance='secondary']:hover) { + background: ${buttonSecondaryHoverBackground}; + } + :host([appearance='secondary']:active) .control:active { + background: ${buttonSecondaryBackground}; + } + :host([appearance='secondary']) .control:${focusVisible} { + outline: calc(${borderWidth} * 1px) solid ${focusBorder}; + outline-offset: calc(${borderWidth} * 2px); + } + :host([appearance='secondary'][disabled]) { + background: ${buttonSecondaryBackground}; + } +`,IconButtonStyles=css$1` + :host([appearance='icon']) { + background: ${buttonIconBackground}; + border-radius: ${buttonIconCornerRadius}; + color: ${foreground}; + } + :host([appearance='icon']:hover) { + background: ${buttonIconHoverBackground}; + outline: 1px dotted ${contrastActiveBorder}; + outline-offset: -1px; + } + :host([appearance='icon']) .control { + padding: ${buttonIconPadding}; + border: none; + } + :host([appearance='icon']:active) .control:active { + background: ${buttonIconHoverBackground}; + } + :host([appearance='icon']) .control:${focusVisible} { + outline: calc(${borderWidth} * 1px) solid ${focusBorder}; + outline-offset: ${buttonIconFocusBorderOffset}; + } + :host([appearance='icon'][disabled]) { + background: ${buttonIconBackground}; + } +`,buttonStyles=(eo,to)=>css$1` + ${BaseButtonStyles} + ${PrimaryButtonStyles} + ${SecondaryButtonStyles} + ${IconButtonStyles} +`;class Button extends Button$1{connectedCallback(){if(super.connectedCallback(),!this.appearance){const to=this.getAttribute("appearance");this.appearance=to}}attributeChangedCallback(to,ro,no){to==="appearance"&&no==="icon"&&(this.getAttribute("aria-label")||(this.ariaLabel="Icon Button")),to==="aria-label"&&(this.ariaLabel=no),to==="disabled"&&(this.disabled=no!==null)}}__decorate$1([attr],Button.prototype,"appearance",void 0);const vsCodeButton=Button.compose({baseName:"button",template:buttonTemplate,styles:buttonStyles,shadowOptions:{delegatesFocus:!0}}),checkboxStyles=(eo,to)=>css$1` + ${display("inline-flex")} :host { + align-items: center; + outline: none; + margin: calc(${designUnit} * 1px) 0; + user-select: none; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + } + .control { + position: relative; + width: calc(${designUnit} * 4px + 2px); + height: calc(${designUnit} * 4px + 2px); + box-sizing: border-box; + border-radius: calc(${checkboxCornerRadius} * 1px); + border: calc(${borderWidth} * 1px) solid ${checkboxBorder}; + background: ${checkboxBackground}; + outline: none; + cursor: pointer; + } + .label { + font-family: ${fontFamily}; + color: ${foreground}; + padding-inline-start: calc(${designUnit} * 2px + 2px); + margin-inline-end: calc(${designUnit} * 2px + 2px); + cursor: pointer; + } + .label__hidden { + display: none; + visibility: hidden; + } + .checked-indicator { + width: 100%; + height: 100%; + display: block; + fill: ${foreground}; + opacity: 0; + pointer-events: none; + } + .indeterminate-indicator { + border-radius: 2px; + background: ${foreground}; + position: absolute; + top: 50%; + left: 50%; + width: 50%; + height: 50%; + transform: translate(-50%, -50%); + opacity: 0; + } + :host(:enabled) .control:hover { + background: ${checkboxBackground}; + border-color: ${checkboxBorder}; + } + :host(:enabled) .control:active { + background: ${checkboxBackground}; + border-color: ${focusBorder}; + } + :host(:${focusVisible}) .control { + border: calc(${borderWidth} * 1px) solid ${focusBorder}; + } + :host(.disabled) .label, + :host(.readonly) .label, + :host(.readonly) .control, + :host(.disabled) .control { + cursor: ${disabledCursor}; + } + :host(.checked:not(.indeterminate)) .checked-indicator, + :host(.indeterminate) .indeterminate-indicator { + opacity: 1; + } + :host(.disabled) { + opacity: ${disabledOpacity}; + } +`;class Checkbox extends Checkbox$1{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Checkbox")}}const vsCodeCheckbox=Checkbox.compose({baseName:"checkbox",template:checkboxTemplate,styles:checkboxStyles,checkedIndicator:` + + + + `,indeterminateIndicator:` +
+ `}),dataGridStyles=(eo,to)=>css$1` + :host { + display: flex; + position: relative; + flex-direction: column; + width: 100%; + } +`,dataGridRowStyles=(eo,to)=>css$1` + :host { + display: grid; + padding: calc((${designUnit} / 4) * 1px) 0; + box-sizing: border-box; + width: 100%; + background: transparent; + } + :host(.header) { + } + :host(.sticky-header) { + background: ${background$1}; + position: sticky; + top: 0; + } + :host(:hover) { + background: ${listHoverBackground}; + outline: 1px dotted ${contrastActiveBorder}; + outline-offset: -1px; + } +`,dataGridCellStyles=(eo,to)=>css$1` + :host { + padding: calc(${designUnit} * 1px) calc(${designUnit} * 3px); + color: ${foreground}; + opacity: 1; + box-sizing: border-box; + font-family: ${fontFamily}; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + font-weight: 400; + border: solid calc(${borderWidth} * 1px) transparent; + border-radius: calc(${cornerRadius} * 1px); + white-space: wrap; + overflow-wrap: anywhere; + } + :host(.column-header) { + font-weight: 600; + } + :host(:${focusVisible}), + :host(:focus), + :host(:active) { + background: ${listActiveSelectionBackground}; + border: solid calc(${borderWidth} * 1px) ${focusBorder}; + color: ${listActiveSelectionForeground}; + outline: none; + } + :host(:${focusVisible}) ::slotted(*), + :host(:focus) ::slotted(*), + :host(:active) ::slotted(*) { + color: ${listActiveSelectionForeground} !important; + } +`;class DataGrid extends DataGrid$1{connectedCallback(){super.connectedCallback(),this.getAttribute("aria-label")||this.setAttribute("aria-label","Data Grid")}}const vsCodeDataGrid=DataGrid.compose({baseName:"data-grid",baseClass:DataGrid$1,template:dataGridTemplate,styles:dataGridStyles});class DataGridRow extends DataGridRow$1{}const vsCodeDataGridRow=DataGridRow.compose({baseName:"data-grid-row",baseClass:DataGridRow$1,template:dataGridRowTemplate,styles:dataGridRowStyles});class DataGridCell extends DataGridCell$1{}const vsCodeDataGridCell=DataGridCell.compose({baseName:"data-grid-cell",baseClass:DataGridCell$1,template:dataGridCellTemplate,styles:dataGridCellStyles}),dividerStyles=(eo,to)=>css$1` + ${display("block")} :host { + border: none; + border-top: calc(${borderWidth} * 1px) solid ${dividerBackground}; + box-sizing: content-box; + height: 0; + margin: calc(${designUnit} * 1px) 0; + width: 100%; + } +`;class Divider extends Divider$1{}const vsCodeDivider=Divider.compose({baseName:"divider",template:dividerTemplate,styles:dividerStyles}),dropdownStyles=(eo,to)=>css$1` + ${display("inline-flex")} :host { + background: ${dropdownBackground}; + border-radius: calc(${cornerRadiusRound} * 1px); + box-sizing: border-box; + color: ${foreground}; + contain: contents; + font-family: ${fontFamily}; + height: calc(${inputHeight} * 1px); + position: relative; + user-select: none; + min-width: ${inputMinWidth}; + outline: none; + vertical-align: top; + } + .control { + align-items: center; + box-sizing: border-box; + border: calc(${borderWidth} * 1px) solid ${dropdownBorder}; + border-radius: calc(${cornerRadiusRound} * 1px); + cursor: pointer; + display: flex; + font-family: inherit; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + min-height: 100%; + padding: 2px 6px 2px 8px; + width: 100%; + } + .listbox { + background: ${dropdownBackground}; + border: calc(${borderWidth} * 1px) solid ${focusBorder}; + border-radius: calc(${cornerRadiusRound} * 1px); + box-sizing: border-box; + display: inline-flex; + flex-direction: column; + left: 0; + max-height: ${dropdownListMaxHeight}; + padding: 0; + overflow-y: auto; + position: absolute; + width: 100%; + z-index: 1; + } + .listbox[hidden] { + display: none; + } + :host(:${focusVisible}) .control { + border-color: ${focusBorder}; + } + :host(:not([disabled]):hover) { + background: ${dropdownBackground}; + border-color: ${dropdownBorder}; + } + :host(:${focusVisible}) ::slotted([aria-selected="true"][role="option"]:not([disabled])) { + background: ${listActiveSelectionBackground}; + border: calc(${borderWidth} * 1px) solid transparent; + color: ${listActiveSelectionForeground}; + } + :host([disabled]) { + cursor: ${disabledCursor}; + opacity: ${disabledOpacity}; + } + :host([disabled]) .control { + cursor: ${disabledCursor}; + user-select: none; + } + :host([disabled]:hover) { + background: ${dropdownBackground}; + color: ${foreground}; + fill: currentcolor; + } + :host(:not([disabled])) .control:active { + border-color: ${focusBorder}; + } + :host(:empty) .listbox { + display: none; + } + :host([open]) .control { + border-color: ${focusBorder}; + } + :host([open][position='above']) .listbox { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } + :host([open][position='below']) .listbox { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + :host([open][position='above']) .listbox { + bottom: calc(${inputHeight} * 1px); + } + :host([open][position='below']) .listbox { + top: calc(${inputHeight} * 1px); + } + .selected-value { + flex: 1 1 auto; + font-family: inherit; + overflow: hidden; + text-align: start; + text-overflow: ellipsis; + white-space: nowrap; + } + .indicator { + flex: 0 0 auto; + margin-inline-start: 1em; + } + slot[name='listbox'] { + display: none; + width: 100%; + } + :host([open]) slot[name='listbox'] { + display: flex; + position: absolute; + } + .end { + margin-inline-start: auto; + } + .start, + .end, + .indicator, + .select-indicator, + ::slotted(svg), + ::slotted(span) { + fill: currentcolor; + height: 1em; + min-height: calc(${designUnit} * 4px); + min-width: calc(${designUnit} * 4px); + width: 1em; + } + ::slotted([role='option']), + ::slotted(option) { + flex: 0 0 auto; + } +`;class Dropdown extends Select{}const vsCodeDropdown=Dropdown.compose({baseName:"dropdown",template:selectTemplate,styles:dropdownStyles,indicator:` + + + + `}),linkStyles=(eo,to)=>css$1` + ${display("inline-flex")} :host { + background: transparent; + box-sizing: border-box; + color: ${linkForeground}; + cursor: pointer; + fill: currentcolor; + font-family: ${fontFamily}; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + outline: none; + } + .control { + background: transparent; + border: calc(${borderWidth} * 1px) solid transparent; + border-radius: calc(${cornerRadius} * 1px); + box-sizing: border-box; + color: inherit; + cursor: inherit; + fill: inherit; + font-family: inherit; + height: inherit; + padding: 0; + outline: none; + text-decoration: none; + word-break: break-word; + } + .control::-moz-focus-inner { + border: 0; + } + :host(:hover) { + color: ${linkActiveForeground}; + } + :host(:hover) .content { + text-decoration: underline; + } + :host(:active) { + background: transparent; + color: ${linkActiveForeground}; + } + :host(:${focusVisible}) .control, + :host(:focus) .control { + border: calc(${borderWidth} * 1px) solid ${focusBorder}; + } +`;class Link extends Anchor{}const vsCodeLink=Link.compose({baseName:"link",template:anchorTemplate,styles:linkStyles,shadowOptions:{delegatesFocus:!0}}),optionStyles=(eo,to)=>css$1` + ${display("inline-flex")} :host { + font-family: var(--body-font); + border-radius: ${cornerRadius}; + border: calc(${borderWidth} * 1px) solid transparent; + box-sizing: border-box; + color: ${foreground}; + cursor: pointer; + fill: currentcolor; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + margin: 0; + outline: none; + overflow: hidden; + padding: 0 calc((${designUnit} / 2) * 1px) + calc((${designUnit} / 4) * 1px); + user-select: none; + white-space: nowrap; + } + :host(:${focusVisible}) { + border-color: ${focusBorder}; + background: ${listActiveSelectionBackground}; + color: ${foreground}; + } + :host([aria-selected='true']) { + background: ${listActiveSelectionBackground}; + border: calc(${borderWidth} * 1px) solid transparent; + color: ${listActiveSelectionForeground}; + } + :host(:active) { + background: ${listActiveSelectionBackground}; + color: ${listActiveSelectionForeground}; + } + :host(:not([aria-selected='true']):hover) { + background: ${listActiveSelectionBackground}; + border: calc(${borderWidth} * 1px) solid transparent; + color: ${listActiveSelectionForeground}; + } + :host(:not([aria-selected='true']):active) { + background: ${listActiveSelectionBackground}; + color: ${foreground}; + } + :host([disabled]) { + cursor: ${disabledCursor}; + opacity: ${disabledOpacity}; + } + :host([disabled]:hover) { + background-color: inherit; + } + .content { + grid-column-start: 2; + justify-self: start; + overflow: hidden; + text-overflow: ellipsis; + } +`;let Option$2=class extends ListboxOption{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Option")}};const vsCodeOption=Option$2.compose({baseName:"option",template:listboxOptionTemplate,styles:optionStyles}),panelsStyles=(eo,to)=>css$1` + ${display("grid")} :host { + box-sizing: border-box; + font-family: ${fontFamily}; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + color: ${foreground}; + grid-template-columns: auto 1fr auto; + grid-template-rows: auto 1fr; + overflow-x: auto; + } + .tablist { + display: grid; + grid-template-rows: auto auto; + grid-template-columns: auto; + column-gap: calc(${designUnit} * 8px); + position: relative; + width: max-content; + align-self: end; + padding: calc(${designUnit} * 1px) calc(${designUnit} * 1px) 0; + box-sizing: border-box; + } + .start, + .end { + align-self: center; + } + .activeIndicator { + grid-row: 2; + grid-column: 1; + width: 100%; + height: calc((${designUnit} / 4) * 1px); + justify-self: center; + background: ${panelTabActiveForeground}; + margin: 0; + border-radius: calc(${cornerRadius} * 1px); + } + .activeIndicatorTransition { + transition: transform 0.01s linear; + } + .tabpanel { + grid-row: 2; + grid-column-start: 1; + grid-column-end: 4; + position: relative; + } +`,panelTabStyles=(eo,to)=>css$1` + ${display("inline-flex")} :host { + box-sizing: border-box; + font-family: ${fontFamily}; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + height: calc(${designUnit} * 7px); + padding: calc(${designUnit} * 1px) 0; + color: ${panelTabForeground}; + fill: currentcolor; + border-radius: calc(${cornerRadius} * 1px); + border: solid calc(${borderWidth} * 1px) transparent; + align-items: center; + justify-content: center; + grid-row: 1; + cursor: pointer; + } + :host(:hover) { + color: ${panelTabActiveForeground}; + fill: currentcolor; + } + :host(:active) { + color: ${panelTabActiveForeground}; + fill: currentcolor; + } + :host([aria-selected='true']) { + background: transparent; + color: ${panelTabActiveForeground}; + fill: currentcolor; + } + :host([aria-selected='true']:hover) { + background: transparent; + color: ${panelTabActiveForeground}; + fill: currentcolor; + } + :host([aria-selected='true']:active) { + background: transparent; + color: ${panelTabActiveForeground}; + fill: currentcolor; + } + :host(:${focusVisible}) { + outline: none; + border: solid calc(${borderWidth} * 1px) ${panelTabActiveBorder}; + } + :host(:focus) { + outline: none; + } + ::slotted(vscode-badge) { + margin-inline-start: calc(${designUnit} * 2px); + } +`,panelViewStyles=(eo,to)=>css$1` + ${display("flex")} :host { + color: inherit; + background-color: transparent; + border: solid calc(${borderWidth} * 1px) transparent; + box-sizing: border-box; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + padding: 10px calc((${designUnit} + 2) * 1px); + } +`;class Panels extends Tabs{connectedCallback(){super.connectedCallback(),this.orientation&&(this.orientation=TabsOrientation.horizontal),this.getAttribute("aria-label")||this.setAttribute("aria-label","Panels")}}const vsCodePanels=Panels.compose({baseName:"panels",template:tabsTemplate,styles:panelsStyles});class PanelTab extends Tab{connectedCallback(){super.connectedCallback(),this.disabled&&(this.disabled=!1),this.textContent&&this.setAttribute("aria-label",this.textContent)}}const vsCodePanelTab=PanelTab.compose({baseName:"panel-tab",template:tabTemplate,styles:panelTabStyles});class PanelView extends TabPanel{}const vsCodePanelView=PanelView.compose({baseName:"panel-view",template:tabPanelTemplate,styles:panelViewStyles}),progressRingStyles=(eo,to)=>css$1` + ${display("flex")} :host { + align-items: center; + outline: none; + height: calc(${designUnit} * 7px); + width: calc(${designUnit} * 7px); + margin: 0; + } + .progress { + height: 100%; + width: 100%; + } + .background { + fill: none; + stroke: transparent; + stroke-width: calc(${designUnit} / 2 * 1px); + } + .indeterminate-indicator-1 { + fill: none; + stroke: ${progressBackground}; + stroke-width: calc(${designUnit} / 2 * 1px); + stroke-linecap: square; + transform-origin: 50% 50%; + transform: rotate(-90deg); + transition: all 0.2s ease-in-out; + animation: spin-infinite 2s linear infinite; + } + @keyframes spin-infinite { + 0% { + stroke-dasharray: 0.01px 43.97px; + transform: rotate(0deg); + } + 50% { + stroke-dasharray: 21.99px 21.99px; + transform: rotate(450deg); + } + 100% { + stroke-dasharray: 0.01px 43.97px; + transform: rotate(1080deg); + } + } +`;class ProgressRing extends BaseProgress{connectedCallback(){super.connectedCallback(),this.paused&&(this.paused=!1),this.setAttribute("aria-label","Loading"),this.setAttribute("aria-live","assertive"),this.setAttribute("role","alert")}attributeChangedCallback(to,ro,no){to==="value"&&this.removeAttribute("value")}}const vsCodeProgressRing=ProgressRing.compose({baseName:"progress-ring",template:progressRingTemplate,styles:progressRingStyles,indeterminateIndicator:` + + + + + `}),radioGroupStyles=(eo,to)=>css$1` + ${display("flex")} :host { + align-items: flex-start; + margin: calc(${designUnit} * 1px) 0; + flex-direction: column; + } + .positioning-region { + display: flex; + flex-wrap: wrap; + } + :host([orientation='vertical']) .positioning-region { + flex-direction: column; + } + :host([orientation='horizontal']) .positioning-region { + flex-direction: row; + } + ::slotted([slot='label']) { + color: ${foreground}; + font-size: ${typeRampBaseFontSize}; + margin: calc(${designUnit} * 1px) 0; + } +`;class RadioGroup extends RadioGroup$1{connectedCallback(){super.connectedCallback();const to=this.querySelector("label");if(to){const ro="radio-group-"+Math.random().toString(16).slice(2);to.setAttribute("id",ro),this.setAttribute("aria-labelledby",ro)}}}const vsCodeRadioGroup=RadioGroup.compose({baseName:"radio-group",template:radioGroupTemplate,styles:radioGroupStyles}),radioStyles=(eo,to)=>css$1` + ${display("inline-flex")} :host { + align-items: center; + flex-direction: row; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + margin: calc(${designUnit} * 1px) 0; + outline: none; + position: relative; + transition: all 0.2s ease-in-out; + user-select: none; + } + .control { + background: ${checkboxBackground}; + border-radius: 999px; + border: calc(${borderWidth} * 1px) solid ${checkboxBorder}; + box-sizing: border-box; + cursor: pointer; + height: calc(${designUnit} * 4px); + position: relative; + outline: none; + width: calc(${designUnit} * 4px); + } + .label { + color: ${foreground}; + cursor: pointer; + font-family: ${fontFamily}; + margin-inline-end: calc(${designUnit} * 2px + 2px); + padding-inline-start: calc(${designUnit} * 2px + 2px); + } + .label__hidden { + display: none; + visibility: hidden; + } + .control, + .checked-indicator { + flex-shrink: 0; + } + .checked-indicator { + background: ${foreground}; + border-radius: 999px; + display: inline-block; + inset: calc(${designUnit} * 1px); + opacity: 0; + pointer-events: none; + position: absolute; + } + :host(:not([disabled])) .control:hover { + background: ${checkboxBackground}; + border-color: ${checkboxBorder}; + } + :host(:not([disabled])) .control:active { + background: ${checkboxBackground}; + border-color: ${focusBorder}; + } + :host(:${focusVisible}) .control { + border: calc(${borderWidth} * 1px) solid ${focusBorder}; + } + :host([aria-checked='true']) .control { + background: ${checkboxBackground}; + border: calc(${borderWidth} * 1px) solid ${checkboxBorder}; + } + :host([aria-checked='true']:not([disabled])) .control:hover { + background: ${checkboxBackground}; + border: calc(${borderWidth} * 1px) solid ${checkboxBorder}; + } + :host([aria-checked='true']:not([disabled])) .control:active { + background: ${checkboxBackground}; + border: calc(${borderWidth} * 1px) solid ${focusBorder}; + } + :host([aria-checked="true"]:${focusVisible}:not([disabled])) .control { + border: calc(${borderWidth} * 1px) solid ${focusBorder}; + } + :host([disabled]) .label, + :host([readonly]) .label, + :host([readonly]) .control, + :host([disabled]) .control { + cursor: ${disabledCursor}; + } + :host([aria-checked='true']) .checked-indicator { + opacity: 1; + } + :host([disabled]) { + opacity: ${disabledOpacity}; + } +`;class Radio extends Radio$1{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Radio")}}const vsCodeRadio=Radio.compose({baseName:"radio",template:radioTemplate,styles:radioStyles,checkedIndicator:` +
+ `}),tagStyles=(eo,to)=>css$1` + ${display("inline-block")} :host { + box-sizing: border-box; + font-family: ${fontFamily}; + font-size: ${typeRampMinus1FontSize}; + line-height: ${typeRampMinus1LineHeight}; + } + .control { + background-color: ${badgeBackground}; + border: calc(${borderWidth} * 1px) solid ${buttonBorder}; + border-radius: ${tagCornerRadius}; + color: ${badgeForeground}; + padding: calc(${designUnit} * 0.5px) calc(${designUnit} * 1px); + text-transform: uppercase; + } +`;let Tag$1=class extends Badge$1{connectedCallback(){super.connectedCallback(),this.circular&&(this.circular=!1)}};const vsCodeTag=Tag$1.compose({baseName:"tag",template:badgeTemplate,styles:tagStyles}),textAreaStyles=(eo,to)=>css$1` + ${display("inline-block")} :host { + font-family: ${fontFamily}; + outline: none; + user-select: none; + } + .control { + box-sizing: border-box; + position: relative; + color: ${inputForeground}; + background: ${inputBackground}; + border-radius: calc(${cornerRadiusRound} * 1px); + border: calc(${borderWidth} * 1px) solid ${dropdownBorder}; + font: inherit; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + padding: calc(${designUnit} * 2px + 1px); + width: 100%; + min-width: ${inputMinWidth}; + resize: none; + } + .control:hover:enabled { + background: ${inputBackground}; + border-color: ${dropdownBorder}; + } + .control:active:enabled { + background: ${inputBackground}; + border-color: ${focusBorder}; + } + .control:hover, + .control:${focusVisible}, + .control:disabled, + .control:active { + outline: none; + } + .control::-webkit-scrollbar { + width: ${scrollbarWidth}; + height: ${scrollbarHeight}; + } + .control::-webkit-scrollbar-corner { + background: ${inputBackground}; + } + .control::-webkit-scrollbar-thumb { + background: ${scrollbarSliderBackground}; + } + .control::-webkit-scrollbar-thumb:hover { + background: ${scrollbarSliderHoverBackground}; + } + .control::-webkit-scrollbar-thumb:active { + background: ${scrollbarSliderActiveBackground}; + } + :host(:focus-within:not([disabled])) .control { + border-color: ${focusBorder}; + } + :host([resize='both']) .control { + resize: both; + } + :host([resize='horizontal']) .control { + resize: horizontal; + } + :host([resize='vertical']) .control { + resize: vertical; + } + .label { + display: block; + color: ${foreground}; + cursor: pointer; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + margin-bottom: 2px; + } + .label__hidden { + display: none; + visibility: hidden; + } + :host([disabled]) .label, + :host([readonly]) .label, + :host([readonly]) .control, + :host([disabled]) .control { + cursor: ${disabledCursor}; + } + :host([disabled]) { + opacity: ${disabledOpacity}; + } + :host([disabled]) .control { + border-color: ${dropdownBorder}; + } +`;class TextArea extends TextArea$1{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Text area")}}const vsCodeTextArea=TextArea.compose({baseName:"text-area",template:textAreaTemplate,styles:textAreaStyles,shadowOptions:{delegatesFocus:!0}}),textFieldStyles=(eo,to)=>css$1` + ${display("inline-block")} :host { + font-family: ${fontFamily}; + outline: none; + user-select: none; + } + .root { + box-sizing: border-box; + position: relative; + display: flex; + flex-direction: row; + color: ${inputForeground}; + background: ${inputBackground}; + border-radius: calc(${cornerRadiusRound} * 1px); + border: calc(${borderWidth} * 1px) solid ${dropdownBorder}; + height: calc(${inputHeight} * 1px); + min-width: ${inputMinWidth}; + } + .control { + -webkit-appearance: none; + font: inherit; + background: transparent; + border: 0; + color: inherit; + height: calc(100% - (${designUnit} * 1px)); + width: 100%; + margin-top: auto; + margin-bottom: auto; + border: none; + padding: 0 calc(${designUnit} * 2px + 1px); + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + } + .control:hover, + .control:${focusVisible}, + .control:disabled, + .control:active { + outline: none; + } + .label { + display: block; + color: ${foreground}; + cursor: pointer; + font-size: ${typeRampBaseFontSize}; + line-height: ${typeRampBaseLineHeight}; + margin-bottom: 2px; + } + .label__hidden { + display: none; + visibility: hidden; + } + .start, + .end { + display: flex; + margin: auto; + fill: currentcolor; + } + ::slotted(svg), + ::slotted(span) { + width: calc(${designUnit} * 4px); + height: calc(${designUnit} * 4px); + } + .start { + margin-inline-start: calc(${designUnit} * 2px); + } + .end { + margin-inline-end: calc(${designUnit} * 2px); + } + :host(:hover:not([disabled])) .root { + background: ${inputBackground}; + border-color: ${dropdownBorder}; + } + :host(:active:not([disabled])) .root { + background: ${inputBackground}; + border-color: ${focusBorder}; + } + :host(:focus-within:not([disabled])) .root { + border-color: ${focusBorder}; + } + :host([disabled]) .label, + :host([readonly]) .label, + :host([readonly]) .control, + :host([disabled]) .control { + cursor: ${disabledCursor}; + } + :host([disabled]) { + opacity: ${disabledOpacity}; + } + :host([disabled]) .control { + border-color: ${dropdownBorder}; + } +`;class TextField extends TextField$1{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Text field")}}const vsCodeTextField=TextField.compose({baseName:"text-field",template:textFieldTemplate,styles:textFieldStyles,shadowOptions:{delegatesFocus:!0}}),{wrap}=provideReactWrapper(React,provideVSCodeDesignSystem());wrap(vsCodeBadge(),{name:"vscode-badge"});wrap(vsCodeButton(),{name:"vscode-button"});wrap(vsCodeCheckbox(),{name:"vscode-checkbox",events:{onChange:"change"}});wrap(vsCodeDataGrid(),{name:"vscode-data-grid"});wrap(vsCodeDataGridCell(),{name:"vscode-data-grid-cell"});wrap(vsCodeDataGridRow(),{name:"vscode-data-grid-row"});wrap(vsCodeDivider(),{name:"vscode-divider"});wrap(vsCodeDropdown(),{name:"vscode-dropdown",events:{onChange:"change"}});wrap(vsCodeLink(),{name:"vscode-link"});wrap(vsCodeOption(),{name:"vscode-option"});wrap(vsCodePanels(),{name:"vscode-panels",events:{onChange:"change"}});wrap(vsCodePanelTab(),{name:"vscode-panel-tab"});wrap(vsCodePanelView(),{name:"vscode-panel-view"});const VSCodeProgressRing=wrap(vsCodeProgressRing(),{name:"vscode-progress-ring"});wrap(vsCodeRadio(),{name:"vscode-radio",events:{onChange:"change"}});wrap(vsCodeRadioGroup(),{name:"vscode-radio-group",events:{onChange:"change"}});wrap(vsCodeTag(),{name:"vscode-tag"});wrap(vsCodeTextArea(),{name:"vscode-text-area",events:{onChange:"change",onInput:"input"}});wrap(vsCodeTextField(),{name:"vscode-text-field",events:{onChange:"change",onInput:"input"}});const Loading=({isFullPage:eo=!1,style:to={}})=>{const ro=eo?{...to,height:"100vh",width:"100%"}:{...to};return jsxRuntimeExports.jsx(Stack$2,{horizontalAlign:"center",verticalAlign:"center",verticalFill:!0,style:ro,children:jsxRuntimeExports.jsx(VSCodeProgressRing,{})})};memoizeFunction((eo,to)=>mergeStyleSets({root:mergeStyles$1({display:"flex",flexDirection:"row",alignItems:"center",height:"30px",background:"var(--background)",width:"100%",...to&&{position:"fixed",top:0,zIndex:100}},eo),buttonGroup:{display:"flex",flexDirection:"row",height:"30px"},searchField:{marginRight:"100px",selectors:{"div.root":{height:"30px"}}}}));var toggleSelection=function(){var eo=document.getSelection();if(!eo.rangeCount)return function(){};for(var to=document.activeElement,ro=[],no=0;no"u"){ro&&console.warn("unable to use e.clipboardData"),ro&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var fo=clipboardToIE11Formatting[to.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(fo,eo)}else co.clipboardData.clearData(),co.clipboardData.setData(to.format,eo);to.onCopy&&(co.preventDefault(),to.onCopy(co.clipboardData))}),document.body.appendChild(ao),io.selectNodeContents(ao),so.addRange(io);var uo=document.execCommand("copy");if(!uo)throw new Error("copy command was unsuccessful");lo=!0}catch(co){ro&&console.error("unable to copy using execCommand: ",co),ro&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(to.format||"text",eo),to.onCopy&&to.onCopy(window.clipboardData),lo=!0}catch(fo){ro&&console.error("unable to copy using clipboardData: ",fo),ro&&console.error("falling back to prompt"),no=format$1("message"in to?to.message:defaultMessage),window.prompt(no,eo)}}finally{so&&(typeof so.removeRange=="function"?so.removeRange(io):so.removeAllRanges()),ao&&document.body.removeChild(ao),oo()}return lo}var copyToClipboard$1=copy$1;const copy$2=getDefaultExportFromCjs(copyToClipboard$1);var main={exports:{}};(function(eo,to){(function(ro,no){eo.exports=no(reactExports)})(commonjsGlobal,function(ro){return function(no){var oo={};function io(so){if(oo[so])return oo[so].exports;var ao=oo[so]={i:so,l:!1,exports:{}};return no[so].call(ao.exports,ao,ao.exports,io),ao.l=!0,ao.exports}return io.m=no,io.c=oo,io.d=function(so,ao,lo){io.o(so,ao)||Object.defineProperty(so,ao,{enumerable:!0,get:lo})},io.r=function(so){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(so,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(so,"__esModule",{value:!0})},io.t=function(so,ao){if(1&ao&&(so=io(so)),8&ao||4&ao&&typeof so=="object"&&so&&so.__esModule)return so;var lo=Object.create(null);if(io.r(lo),Object.defineProperty(lo,"default",{enumerable:!0,value:so}),2&ao&&typeof so!="string")for(var uo in so)io.d(lo,uo,(function(co){return so[co]}).bind(null,uo));return lo},io.n=function(so){var ao=so&&so.__esModule?function(){return so.default}:function(){return so};return io.d(ao,"a",ao),ao},io.o=function(so,ao){return Object.prototype.hasOwnProperty.call(so,ao)},io.p="",io(io.s=48)}([function(no,oo){no.exports=ro},function(no,oo){var io=no.exports={version:"2.6.12"};typeof __e=="number"&&(__e=io)},function(no,oo,io){var so=io(26)("wks"),ao=io(17),lo=io(3).Symbol,uo=typeof lo=="function";(no.exports=function(co){return so[co]||(so[co]=uo&&lo[co]||(uo?lo:ao)("Symbol."+co))}).store=so},function(no,oo){var io=no.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=io)},function(no,oo,io){no.exports=!io(8)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(no,oo){var io={}.hasOwnProperty;no.exports=function(so,ao){return io.call(so,ao)}},function(no,oo,io){var so=io(7),ao=io(16);no.exports=io(4)?function(lo,uo,co){return so.f(lo,uo,ao(1,co))}:function(lo,uo,co){return lo[uo]=co,lo}},function(no,oo,io){var so=io(10),ao=io(35),lo=io(23),uo=Object.defineProperty;oo.f=io(4)?Object.defineProperty:function(co,fo,ho){if(so(co),fo=lo(fo,!0),so(ho),ao)try{return uo(co,fo,ho)}catch{}if("get"in ho||"set"in ho)throw TypeError("Accessors not supported!");return"value"in ho&&(co[fo]=ho.value),co}},function(no,oo){no.exports=function(io){try{return!!io()}catch{return!0}}},function(no,oo,io){var so=io(40),ao=io(22);no.exports=function(lo){return so(ao(lo))}},function(no,oo,io){var so=io(11);no.exports=function(ao){if(!so(ao))throw TypeError(ao+" is not an object!");return ao}},function(no,oo){no.exports=function(io){return typeof io=="object"?io!==null:typeof io=="function"}},function(no,oo){no.exports={}},function(no,oo,io){var so=io(39),ao=io(27);no.exports=Object.keys||function(lo){return so(lo,ao)}},function(no,oo){no.exports=!0},function(no,oo,io){var so=io(3),ao=io(1),lo=io(53),uo=io(6),co=io(5),fo=function(ho,po,go){var vo,bo,xo,_o=ho&fo.F,Eo=ho&fo.G,So=ho&fo.S,To=ho&fo.P,wo=ho&fo.B,Co=ho&fo.W,Oo=Eo?ao:ao[po]||(ao[po]={}),Ao=Oo.prototype,Ro=Eo?so:So?so[po]:(so[po]||{}).prototype;for(vo in Eo&&(go=po),go)(bo=!_o&&Ro&&Ro[vo]!==void 0)&&co(Oo,vo)||(xo=bo?Ro[vo]:go[vo],Oo[vo]=Eo&&typeof Ro[vo]!="function"?go[vo]:wo&&bo?lo(xo,so):Co&&Ro[vo]==xo?function(No){var Mo=function(Do,jo,Fo){if(this instanceof No){switch(arguments.length){case 0:return new No;case 1:return new No(Do);case 2:return new No(Do,jo)}return new No(Do,jo,Fo)}return No.apply(this,arguments)};return Mo.prototype=No.prototype,Mo}(xo):To&&typeof xo=="function"?lo(Function.call,xo):xo,To&&((Oo.virtual||(Oo.virtual={}))[vo]=xo,ho&fo.R&&Ao&&!Ao[vo]&&uo(Ao,vo,xo)))};fo.F=1,fo.G=2,fo.S=4,fo.P=8,fo.B=16,fo.W=32,fo.U=64,fo.R=128,no.exports=fo},function(no,oo){no.exports=function(io,so){return{enumerable:!(1&io),configurable:!(2&io),writable:!(4&io),value:so}}},function(no,oo){var io=0,so=Math.random();no.exports=function(ao){return"Symbol(".concat(ao===void 0?"":ao,")_",(++io+so).toString(36))}},function(no,oo,io){var so=io(22);no.exports=function(ao){return Object(so(ao))}},function(no,oo){oo.f={}.propertyIsEnumerable},function(no,oo,io){var so=io(52)(!0);io(34)(String,"String",function(ao){this._t=String(ao),this._i=0},function(){var ao,lo=this._t,uo=this._i;return uo>=lo.length?{value:void 0,done:!0}:(ao=so(lo,uo),this._i+=ao.length,{value:ao,done:!1})})},function(no,oo){var io=Math.ceil,so=Math.floor;no.exports=function(ao){return isNaN(ao=+ao)?0:(ao>0?so:io)(ao)}},function(no,oo){no.exports=function(io){if(io==null)throw TypeError("Can't call method on "+io);return io}},function(no,oo,io){var so=io(11);no.exports=function(ao,lo){if(!so(ao))return ao;var uo,co;if(lo&&typeof(uo=ao.toString)=="function"&&!so(co=uo.call(ao))||typeof(uo=ao.valueOf)=="function"&&!so(co=uo.call(ao))||!lo&&typeof(uo=ao.toString)=="function"&&!so(co=uo.call(ao)))return co;throw TypeError("Can't convert object to primitive value")}},function(no,oo){var io={}.toString;no.exports=function(so){return io.call(so).slice(8,-1)}},function(no,oo,io){var so=io(26)("keys"),ao=io(17);no.exports=function(lo){return so[lo]||(so[lo]=ao(lo))}},function(no,oo,io){var so=io(1),ao=io(3),lo=ao["__core-js_shared__"]||(ao["__core-js_shared__"]={});(no.exports=function(uo,co){return lo[uo]||(lo[uo]=co!==void 0?co:{})})("versions",[]).push({version:so.version,mode:io(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(no,oo){no.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(no,oo,io){var so=io(7).f,ao=io(5),lo=io(2)("toStringTag");no.exports=function(uo,co,fo){uo&&!ao(uo=fo?uo:uo.prototype,lo)&&so(uo,lo,{configurable:!0,value:co})}},function(no,oo,io){io(62);for(var so=io(3),ao=io(6),lo=io(12),uo=io(2)("toStringTag"),co="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),fo=0;fodocument.F=Object<\/script>"),ho.close(),fo=ho.F;go--;)delete fo.prototype[lo[go]];return fo()};no.exports=Object.create||function(ho,po){var go;return ho!==null?(co.prototype=so(ho),go=new co,co.prototype=null,go[uo]=ho):go=fo(),po===void 0?go:ao(go,po)}},function(no,oo,io){var so=io(5),ao=io(9),lo=io(57)(!1),uo=io(25)("IE_PROTO");no.exports=function(co,fo){var ho,po=ao(co),go=0,vo=[];for(ho in po)ho!=uo&&so(po,ho)&&vo.push(ho);for(;fo.length>go;)so(po,ho=fo[go++])&&(~lo(vo,ho)||vo.push(ho));return vo}},function(no,oo,io){var so=io(24);no.exports=Object("z").propertyIsEnumerable(0)?Object:function(ao){return so(ao)=="String"?ao.split(""):Object(ao)}},function(no,oo,io){var so=io(39),ao=io(27).concat("length","prototype");oo.f=Object.getOwnPropertyNames||function(lo){return so(lo,ao)}},function(no,oo,io){var so=io(24),ao=io(2)("toStringTag"),lo=so(function(){return arguments}())=="Arguments";no.exports=function(uo){var co,fo,ho;return uo===void 0?"Undefined":uo===null?"Null":typeof(fo=function(po,go){try{return po[go]}catch{}}(co=Object(uo),ao))=="string"?fo:lo?so(co):(ho=so(co))=="Object"&&typeof co.callee=="function"?"Arguments":ho}},function(no,oo){var io;io=function(){return this}();try{io=io||new Function("return this")()}catch{typeof window=="object"&&(io=window)}no.exports=io},function(no,oo){var io=/-?\d+(\.\d+)?%?/g;no.exports=function(so){return so.match(io)}},function(no,oo,io){Object.defineProperty(oo,"__esModule",{value:!0}),oo.getBase16Theme=oo.createStyling=oo.invertTheme=void 0;var so=bo(io(49)),ao=bo(io(76)),lo=bo(io(81)),uo=bo(io(89)),co=bo(io(93)),fo=function(Ao){if(Ao&&Ao.__esModule)return Ao;var Ro={};if(Ao!=null)for(var No in Ao)Object.prototype.hasOwnProperty.call(Ao,No)&&(Ro[No]=Ao[No]);return Ro.default=Ao,Ro}(io(94)),ho=bo(io(132)),po=bo(io(133)),go=bo(io(138)),vo=io(139);function bo(Ao){return Ao&&Ao.__esModule?Ao:{default:Ao}}var xo=fo.default,_o=(0,uo.default)(xo),Eo=(0,go.default)(po.default,vo.rgb2yuv,function(Ao){var Ro,No=(0,lo.default)(Ao,3),Mo=No[0],Do=No[1],jo=No[2];return[(Ro=Mo,Ro<.25?1:Ro<.5?.9-Ro:1.1-Ro),Do,jo]},vo.yuv2rgb,ho.default),So=function(Ao){return function(Ro){return{className:[Ro.className,Ao.className].filter(Boolean).join(" "),style:(0,ao.default)({},Ro.style||{},Ao.style||{})}}},To=function(Ao,Ro){var No=(0,uo.default)(Ro);for(var Mo in Ao)No.indexOf(Mo)===-1&&No.push(Mo);return No.reduce(function(Do,jo){return Do[jo]=function(Fo,$o){if(Fo===void 0)return $o;if($o===void 0)return Fo;var Lo=Fo===void 0?"undefined":(0,so.default)(Fo),Ho=$o===void 0?"undefined":(0,so.default)($o);switch(Lo){case"string":switch(Ho){case"string":return[$o,Fo].filter(Boolean).join(" ");case"object":return So({className:Fo,style:$o});case"function":return function(qo){for(var Uo=arguments.length,Yo=Array(Uo>1?Uo-1:0),Zo=1;Zo1?Uo-1:0),Zo=1;Zo1?Uo-1:0),Zo=1;Zo1?Uo-1:0),Zo=1;Zo1?Uo-1:0),Zo=1;Zo2?No-2:0),Do=2;Do3?Ro-3:0),Mo=3;Mo1&&arguments[1]!==void 0?arguments[1]:{},jo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Fo=Do.defaultBase16,$o=Fo===void 0?xo:Fo,Lo=Do.base16Themes,Ho=Lo===void 0?null:Lo,qo=Oo(jo,Ho);qo&&(jo=(0,ao.default)({},qo,jo));var Uo=_o.reduce(function(Ss,As){return Ss[As]=jo[As]||$o[As],Ss},{}),Yo=(0,uo.default)(jo).reduce(function(Ss,As){return _o.indexOf(As)===-1&&(Ss[As]=jo[As]),Ss},{}),Zo=Ao(Uo),_s=To(Yo,Zo);return(0,co.default)(wo,2).apply(void 0,[_s].concat(No))},3),oo.getBase16Theme=function(Ao,Ro){if(Ao&&Ao.extend&&(Ao=Ao.extend),typeof Ao=="string"){var No=Ao.split(":"),Mo=(0,lo.default)(No,2),Do=Mo[0],jo=Mo[1];Ao=(Ro||{})[Do]||fo[Do],jo==="inverted"&&(Ao=Co(Ao))}return Ao&&Ao.hasOwnProperty("base00")?Ao:void 0})},function(no,oo,io){var so,ao=typeof Reflect=="object"?Reflect:null,lo=ao&&typeof ao.apply=="function"?ao.apply:function(So,To,wo){return Function.prototype.apply.call(So,To,wo)};so=ao&&typeof ao.ownKeys=="function"?ao.ownKeys:Object.getOwnPropertySymbols?function(So){return Object.getOwnPropertyNames(So).concat(Object.getOwnPropertySymbols(So))}:function(So){return Object.getOwnPropertyNames(So)};var uo=Number.isNaN||function(So){return So!=So};function co(){co.init.call(this)}no.exports=co,no.exports.once=function(So,To){return new Promise(function(wo,Co){function Oo(){Ao!==void 0&&So.removeListener("error",Ao),wo([].slice.call(arguments))}var Ao;To!=="error"&&(Ao=function(Ro){So.removeListener(To,Oo),Co(Ro)},So.once("error",Ao)),So.once(To,Oo)})},co.EventEmitter=co,co.prototype._events=void 0,co.prototype._eventsCount=0,co.prototype._maxListeners=void 0;var fo=10;function ho(So){if(typeof So!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof So)}function po(So){return So._maxListeners===void 0?co.defaultMaxListeners:So._maxListeners}function go(So,To,wo,Co){var Oo,Ao,Ro,No;if(ho(wo),(Ao=So._events)===void 0?(Ao=So._events=Object.create(null),So._eventsCount=0):(Ao.newListener!==void 0&&(So.emit("newListener",To,wo.listener?wo.listener:wo),Ao=So._events),Ro=Ao[To]),Ro===void 0)Ro=Ao[To]=wo,++So._eventsCount;else if(typeof Ro=="function"?Ro=Ao[To]=Co?[wo,Ro]:[Ro,wo]:Co?Ro.unshift(wo):Ro.push(wo),(Oo=po(So))>0&&Ro.length>Oo&&!Ro.warned){Ro.warned=!0;var Mo=new Error("Possible EventEmitter memory leak detected. "+Ro.length+" "+String(To)+" listeners added. Use emitter.setMaxListeners() to increase limit");Mo.name="MaxListenersExceededWarning",Mo.emitter=So,Mo.type=To,Mo.count=Ro.length,No=Mo,console&&console.warn&&console.warn(No)}return So}function vo(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function bo(So,To,wo){var Co={fired:!1,wrapFn:void 0,target:So,type:To,listener:wo},Oo=vo.bind(Co);return Oo.listener=wo,Co.wrapFn=Oo,Oo}function xo(So,To,wo){var Co=So._events;if(Co===void 0)return[];var Oo=Co[To];return Oo===void 0?[]:typeof Oo=="function"?wo?[Oo.listener||Oo]:[Oo]:wo?function(Ao){for(var Ro=new Array(Ao.length),No=0;No0&&(Ao=To[0]),Ao instanceof Error)throw Ao;var Ro=new Error("Unhandled error."+(Ao?" ("+Ao.message+")":""));throw Ro.context=Ao,Ro}var No=Oo[So];if(No===void 0)return!1;if(typeof No=="function")lo(No,this,To);else{var Mo=No.length,Do=Eo(No,Mo);for(wo=0;wo=0;Ao--)if(wo[Ao]===To||wo[Ao].listener===To){Ro=wo[Ao].listener,Oo=Ao;break}if(Oo<0)return this;Oo===0?wo.shift():function(No,Mo){for(;Mo+1=0;Co--)this.removeListener(So,To[Co]);return this},co.prototype.listeners=function(So){return xo(this,So,!0)},co.prototype.rawListeners=function(So){return xo(this,So,!1)},co.listenerCount=function(So,To){return typeof So.listenerCount=="function"?So.listenerCount(To):_o.call(So,To)},co.prototype.listenerCount=_o,co.prototype.eventNames=function(){return this._eventsCount>0?so(this._events):[]}},function(no,oo,io){no.exports.Dispatcher=io(140)},function(no,oo,io){no.exports=io(142)},function(no,oo,io){oo.__esModule=!0;var so=uo(io(50)),ao=uo(io(65)),lo=typeof ao.default=="function"&&typeof so.default=="symbol"?function(co){return typeof co}:function(co){return co&&typeof ao.default=="function"&&co.constructor===ao.default&&co!==ao.default.prototype?"symbol":typeof co};function uo(co){return co&&co.__esModule?co:{default:co}}oo.default=typeof ao.default=="function"&&lo(so.default)==="symbol"?function(co){return co===void 0?"undefined":lo(co)}:function(co){return co&&typeof ao.default=="function"&&co.constructor===ao.default&&co!==ao.default.prototype?"symbol":co===void 0?"undefined":lo(co)}},function(no,oo,io){no.exports={default:io(51),__esModule:!0}},function(no,oo,io){io(20),io(29),no.exports=io(30).f("iterator")},function(no,oo,io){var so=io(21),ao=io(22);no.exports=function(lo){return function(uo,co){var fo,ho,po=String(ao(uo)),go=so(co),vo=po.length;return go<0||go>=vo?lo?"":void 0:(fo=po.charCodeAt(go))<55296||fo>56319||go+1===vo||(ho=po.charCodeAt(go+1))<56320||ho>57343?lo?po.charAt(go):fo:lo?po.slice(go,go+2):ho-56320+(fo-55296<<10)+65536}}},function(no,oo,io){var so=io(54);no.exports=function(ao,lo,uo){if(so(ao),lo===void 0)return ao;switch(uo){case 1:return function(co){return ao.call(lo,co)};case 2:return function(co,fo){return ao.call(lo,co,fo)};case 3:return function(co,fo,ho){return ao.call(lo,co,fo,ho)}}return function(){return ao.apply(lo,arguments)}}},function(no,oo){no.exports=function(io){if(typeof io!="function")throw TypeError(io+" is not a function!");return io}},function(no,oo,io){var so=io(38),ao=io(16),lo=io(28),uo={};io(6)(uo,io(2)("iterator"),function(){return this}),no.exports=function(co,fo,ho){co.prototype=so(uo,{next:ao(1,ho)}),lo(co,fo+" Iterator")}},function(no,oo,io){var so=io(7),ao=io(10),lo=io(13);no.exports=io(4)?Object.defineProperties:function(uo,co){ao(uo);for(var fo,ho=lo(co),po=ho.length,go=0;po>go;)so.f(uo,fo=ho[go++],co[fo]);return uo}},function(no,oo,io){var so=io(9),ao=io(58),lo=io(59);no.exports=function(uo){return function(co,fo,ho){var po,go=so(co),vo=ao(go.length),bo=lo(ho,vo);if(uo&&fo!=fo){for(;vo>bo;)if((po=go[bo++])!=po)return!0}else for(;vo>bo;bo++)if((uo||bo in go)&&go[bo]===fo)return uo||bo||0;return!uo&&-1}}},function(no,oo,io){var so=io(21),ao=Math.min;no.exports=function(lo){return lo>0?ao(so(lo),9007199254740991):0}},function(no,oo,io){var so=io(21),ao=Math.max,lo=Math.min;no.exports=function(uo,co){return(uo=so(uo))<0?ao(uo+co,0):lo(uo,co)}},function(no,oo,io){var so=io(3).document;no.exports=so&&so.documentElement},function(no,oo,io){var so=io(5),ao=io(18),lo=io(25)("IE_PROTO"),uo=Object.prototype;no.exports=Object.getPrototypeOf||function(co){return co=ao(co),so(co,lo)?co[lo]:typeof co.constructor=="function"&&co instanceof co.constructor?co.constructor.prototype:co instanceof Object?uo:null}},function(no,oo,io){var so=io(63),ao=io(64),lo=io(12),uo=io(9);no.exports=io(34)(Array,"Array",function(co,fo){this._t=uo(co),this._i=0,this._k=fo},function(){var co=this._t,fo=this._k,ho=this._i++;return!co||ho>=co.length?(this._t=void 0,ao(1)):ao(0,fo=="keys"?ho:fo=="values"?co[ho]:[ho,co[ho]])},"values"),lo.Arguments=lo.Array,so("keys"),so("values"),so("entries")},function(no,oo){no.exports=function(){}},function(no,oo){no.exports=function(io,so){return{value:so,done:!!io}}},function(no,oo,io){no.exports={default:io(66),__esModule:!0}},function(no,oo,io){io(67),io(73),io(74),io(75),no.exports=io(1).Symbol},function(no,oo,io){var so=io(3),ao=io(5),lo=io(4),uo=io(15),co=io(37),fo=io(68).KEY,ho=io(8),po=io(26),go=io(28),vo=io(17),bo=io(2),xo=io(30),_o=io(31),Eo=io(69),So=io(70),To=io(10),wo=io(11),Co=io(18),Oo=io(9),Ao=io(23),Ro=io(16),No=io(38),Mo=io(71),Do=io(72),jo=io(32),Fo=io(7),$o=io(13),Lo=Do.f,Ho=Fo.f,qo=Mo.f,Uo=so.Symbol,Yo=so.JSON,Zo=Yo&&Yo.stringify,_s=bo("_hidden"),Ss=bo("toPrimitive"),As={}.propertyIsEnumerable,Ns=po("symbol-registry"),ws=po("symbols"),Ds=po("op-symbols"),Jo=Object.prototype,Cs=typeof Uo=="function"&&!!jo.f,Bs=so.QObject,zs=!Bs||!Bs.prototype||!Bs.prototype.findChild,Ls=lo&&ho(function(){return No(Ho({},"a",{get:function(){return Ho(this,"a",{value:7}).a}})).a!=7})?function(bs,Os,Vs){var Ks=Lo(Jo,Os);Ks&&delete Jo[Os],Ho(bs,Os,Vs),Ks&&bs!==Jo&&Ho(Jo,Os,Ks)}:Ho,ga=function(bs){var Os=ws[bs]=No(Uo.prototype);return Os._k=bs,Os},Js=Cs&&typeof Uo.iterator=="symbol"?function(bs){return typeof bs=="symbol"}:function(bs){return bs instanceof Uo},Xs=function(bs,Os,Vs){return bs===Jo&&Xs(Ds,Os,Vs),To(bs),Os=Ao(Os,!0),To(Vs),ao(ws,Os)?(Vs.enumerable?(ao(bs,_s)&&bs[_s][Os]&&(bs[_s][Os]=!1),Vs=No(Vs,{enumerable:Ro(0,!1)})):(ao(bs,_s)||Ho(bs,_s,Ro(1,{})),bs[_s][Os]=!0),Ls(bs,Os,Vs)):Ho(bs,Os,Vs)},$a=function(bs,Os){To(bs);for(var Vs,Ks=Eo(Os=Oo(Os)),Ms=0,Hs=Ks.length;Hs>Ms;)Xs(bs,Vs=Ks[Ms++],Os[Vs]);return bs},Ll=function(bs){var Os=As.call(this,bs=Ao(bs,!0));return!(this===Jo&&ao(ws,bs)&&!ao(Ds,bs))&&(!(Os||!ao(this,bs)||!ao(ws,bs)||ao(this,_s)&&this[_s][bs])||Os)},Kl=function(bs,Os){if(bs=Oo(bs),Os=Ao(Os,!0),bs!==Jo||!ao(ws,Os)||ao(Ds,Os)){var Vs=Lo(bs,Os);return!Vs||!ao(ws,Os)||ao(bs,_s)&&bs[_s][Os]||(Vs.enumerable=!0),Vs}},Xl=function(bs){for(var Os,Vs=qo(Oo(bs)),Ks=[],Ms=0;Vs.length>Ms;)ao(ws,Os=Vs[Ms++])||Os==_s||Os==fo||Ks.push(Os);return Ks},Nl=function(bs){for(var Os,Vs=bs===Jo,Ks=qo(Vs?Ds:Oo(bs)),Ms=[],Hs=0;Ks.length>Hs;)!ao(ws,Os=Ks[Hs++])||Vs&&!ao(Jo,Os)||Ms.push(ws[Os]);return Ms};Cs||(co((Uo=function(){if(this instanceof Uo)throw TypeError("Symbol is not a constructor!");var bs=vo(arguments.length>0?arguments[0]:void 0),Os=function(Vs){this===Jo&&Os.call(Ds,Vs),ao(this,_s)&&ao(this[_s],bs)&&(this[_s][bs]=!1),Ls(this,bs,Ro(1,Vs))};return lo&&zs&&Ls(Jo,bs,{configurable:!0,set:Os}),ga(bs)}).prototype,"toString",function(){return this._k}),Do.f=Kl,Fo.f=Xs,io(41).f=Mo.f=Xl,io(19).f=Ll,jo.f=Nl,lo&&!io(14)&&co(Jo,"propertyIsEnumerable",Ll,!0),xo.f=function(bs){return ga(bo(bs))}),uo(uo.G+uo.W+uo.F*!Cs,{Symbol:Uo});for(var xa="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),El=0;xa.length>El;)bo(xa[El++]);for(var cu=$o(bo.store),ks=0;cu.length>ks;)_o(cu[ks++]);uo(uo.S+uo.F*!Cs,"Symbol",{for:function(bs){return ao(Ns,bs+="")?Ns[bs]:Ns[bs]=Uo(bs)},keyFor:function(bs){if(!Js(bs))throw TypeError(bs+" is not a symbol!");for(var Os in Ns)if(Ns[Os]===bs)return Os},useSetter:function(){zs=!0},useSimple:function(){zs=!1}}),uo(uo.S+uo.F*!Cs,"Object",{create:function(bs,Os){return Os===void 0?No(bs):$a(No(bs),Os)},defineProperty:Xs,defineProperties:$a,getOwnPropertyDescriptor:Kl,getOwnPropertyNames:Xl,getOwnPropertySymbols:Nl});var Es=ho(function(){jo.f(1)});uo(uo.S+uo.F*Es,"Object",{getOwnPropertySymbols:function(bs){return jo.f(Co(bs))}}),Yo&&uo(uo.S+uo.F*(!Cs||ho(function(){var bs=Uo();return Zo([bs])!="[null]"||Zo({a:bs})!="{}"||Zo(Object(bs))!="{}"})),"JSON",{stringify:function(bs){for(var Os,Vs,Ks=[bs],Ms=1;arguments.length>Ms;)Ks.push(arguments[Ms++]);if(Vs=Os=Ks[1],(wo(Os)||bs!==void 0)&&!Js(bs))return So(Os)||(Os=function(Hs,Zs){if(typeof Vs=="function"&&(Zs=Vs.call(this,Hs,Zs)),!Js(Zs))return Zs}),Ks[1]=Os,Zo.apply(Yo,Ks)}}),Uo.prototype[Ss]||io(6)(Uo.prototype,Ss,Uo.prototype.valueOf),go(Uo,"Symbol"),go(Math,"Math",!0),go(so.JSON,"JSON",!0)},function(no,oo,io){var so=io(17)("meta"),ao=io(11),lo=io(5),uo=io(7).f,co=0,fo=Object.isExtensible||function(){return!0},ho=!io(8)(function(){return fo(Object.preventExtensions({}))}),po=function(vo){uo(vo,so,{value:{i:"O"+ ++co,w:{}}})},go=no.exports={KEY:so,NEED:!1,fastKey:function(vo,bo){if(!ao(vo))return typeof vo=="symbol"?vo:(typeof vo=="string"?"S":"P")+vo;if(!lo(vo,so)){if(!fo(vo))return"F";if(!bo)return"E";po(vo)}return vo[so].i},getWeak:function(vo,bo){if(!lo(vo,so)){if(!fo(vo))return!0;if(!bo)return!1;po(vo)}return vo[so].w},onFreeze:function(vo){return ho&&go.NEED&&fo(vo)&&!lo(vo,so)&&po(vo),vo}}},function(no,oo,io){var so=io(13),ao=io(32),lo=io(19);no.exports=function(uo){var co=so(uo),fo=ao.f;if(fo)for(var ho,po=fo(uo),go=lo.f,vo=0;po.length>vo;)go.call(uo,ho=po[vo++])&&co.push(ho);return co}},function(no,oo,io){var so=io(24);no.exports=Array.isArray||function(ao){return so(ao)=="Array"}},function(no,oo,io){var so=io(9),ao=io(41).f,lo={}.toString,uo=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];no.exports.f=function(co){return uo&&lo.call(co)=="[object Window]"?function(fo){try{return ao(fo)}catch{return uo.slice()}}(co):ao(so(co))}},function(no,oo,io){var so=io(19),ao=io(16),lo=io(9),uo=io(23),co=io(5),fo=io(35),ho=Object.getOwnPropertyDescriptor;oo.f=io(4)?ho:function(po,go){if(po=lo(po),go=uo(go,!0),fo)try{return ho(po,go)}catch{}if(co(po,go))return ao(!so.f.call(po,go),po[go])}},function(no,oo){},function(no,oo,io){io(31)("asyncIterator")},function(no,oo,io){io(31)("observable")},function(no,oo,io){oo.__esModule=!0;var so,ao=io(77),lo=(so=ao)&&so.__esModule?so:{default:so};oo.default=lo.default||function(uo){for(var co=1;coxo;)for(var So,To=fo(arguments[xo++]),wo=_o?ao(To).concat(_o(To)):ao(To),Co=wo.length,Oo=0;Co>Oo;)So=wo[Oo++],so&&!Eo.call(To,So)||(vo[So]=To[So]);return vo}:ho},function(no,oo,io){oo.__esModule=!0;var so=lo(io(82)),ao=lo(io(85));function lo(uo){return uo&&uo.__esModule?uo:{default:uo}}oo.default=function(uo,co){if(Array.isArray(uo))return uo;if((0,so.default)(Object(uo)))return function(fo,ho){var po=[],go=!0,vo=!1,bo=void 0;try{for(var xo,_o=(0,ao.default)(fo);!(go=(xo=_o.next()).done)&&(po.push(xo.value),!ho||po.length!==ho);go=!0);}catch(Eo){vo=!0,bo=Eo}finally{try{!go&&_o.return&&_o.return()}finally{if(vo)throw bo}}return po}(uo,co);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(no,oo,io){no.exports={default:io(83),__esModule:!0}},function(no,oo,io){io(29),io(20),no.exports=io(84)},function(no,oo,io){var so=io(42),ao=io(2)("iterator"),lo=io(12);no.exports=io(1).isIterable=function(uo){var co=Object(uo);return co[ao]!==void 0||"@@iterator"in co||lo.hasOwnProperty(so(co))}},function(no,oo,io){no.exports={default:io(86),__esModule:!0}},function(no,oo,io){io(29),io(20),no.exports=io(87)},function(no,oo,io){var so=io(10),ao=io(88);no.exports=io(1).getIterator=function(lo){var uo=ao(lo);if(typeof uo!="function")throw TypeError(lo+" is not iterable!");return so(uo.call(lo))}},function(no,oo,io){var so=io(42),ao=io(2)("iterator"),lo=io(12);no.exports=io(1).getIteratorMethod=function(uo){if(uo!=null)return uo[ao]||uo["@@iterator"]||lo[so(uo)]}},function(no,oo,io){no.exports={default:io(90),__esModule:!0}},function(no,oo,io){io(91),no.exports=io(1).Object.keys},function(no,oo,io){var so=io(18),ao=io(13);io(92)("keys",function(){return function(lo){return ao(so(lo))}})},function(no,oo,io){var so=io(15),ao=io(1),lo=io(8);no.exports=function(uo,co){var fo=(ao.Object||{})[uo]||Object[uo],ho={};ho[uo]=co(fo),so(so.S+so.F*lo(function(){fo(1)}),"Object",ho)}},function(no,oo,io){(function(so){var ao=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],lo=/^\s+|\s+$/g,uo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,co=/\{\n\/\* \[wrapped with (.+)\] \*/,fo=/,? & /,ho=/^[-+]0x[0-9a-f]+$/i,po=/^0b[01]+$/i,go=/^\[object .+?Constructor\]$/,vo=/^0o[0-7]+$/i,bo=/^(?:0|[1-9]\d*)$/,xo=parseInt,_o=typeof so=="object"&&so&&so.Object===Object&&so,Eo=typeof self=="object"&&self&&self.Object===Object&&self,So=_o||Eo||Function("return this")();function To(ks,Es,bs){switch(bs.length){case 0:return ks.call(Es);case 1:return ks.call(Es,bs[0]);case 2:return ks.call(Es,bs[0],bs[1]);case 3:return ks.call(Es,bs[0],bs[1],bs[2])}return ks.apply(Es,bs)}function wo(ks,Es){return!!(ks&&ks.length)&&function(bs,Os,Vs){if(Os!=Os)return function(Hs,Zs,xl,Sl){for(var $l=Hs.length,ru=xl+(Sl?1:-1);Sl?ru--:++ru<$l;)if(Zs(Hs[ru],ru,Hs))return ru;return-1}(bs,Co,Vs);for(var Ks=Vs-1,Ms=bs.length;++Ks-1}function Co(ks){return ks!=ks}function Oo(ks,Es){for(var bs=ks.length,Os=0;bs--;)ks[bs]===Es&&Os++;return Os}function Ao(ks,Es){for(var bs=-1,Os=ks.length,Vs=0,Ks=[];++bs2?No:void 0);function As(ks){return xa(ks)?Yo(ks):{}}function Ns(ks){return!(!xa(ks)||function(Es){return!!$o&&$o in Es}(ks))&&(function(Es){var bs=xa(Es)?qo.call(Es):"";return bs=="[object Function]"||bs=="[object GeneratorFunction]"}(ks)||function(Es){var bs=!1;if(Es!=null&&typeof Es.toString!="function")try{bs=!!(Es+"")}catch{}return bs}(ks)?Uo:go).test(function(Es){if(Es!=null){try{return Lo.call(Es)}catch{}try{return Es+""}catch{}}return""}(ks))}function ws(ks,Es,bs,Os){for(var Vs=-1,Ks=ks.length,Ms=bs.length,Hs=-1,Zs=Es.length,xl=Zo(Ks-Ms,0),Sl=Array(Zs+xl),$l=!Os;++Hs1&&Dl.reverse(),Sl&&Zs1?"& ":"")+Es[Os],Es=Es.join(bs>2?", ":" "),ks.replace(uo,`{ +/* [wrapped with `+Es+`] */ +`)}function $a(ks,Es){return!!(Es=Es??9007199254740991)&&(typeof ks=="number"||bo.test(ks))&&ks>-1&&ks%1==0&&ks1&&lo--,co=6*lo<1?so+6*(ao-so)*lo:2*lo<1?ao:3*lo<2?so+(ao-so)*(2/3-lo)*6:so,uo[go]=255*co;return uo}},function(no,oo,io){(function(so){var ao=typeof so=="object"&&so&&so.Object===Object&&so,lo=typeof self=="object"&&self&&self.Object===Object&&self,uo=ao||lo||Function("return this")();function co(Ao,Ro,No){switch(No.length){case 0:return Ao.call(Ro);case 1:return Ao.call(Ro,No[0]);case 2:return Ao.call(Ro,No[0],No[1]);case 3:return Ao.call(Ro,No[0],No[1],No[2])}return Ao.apply(Ro,No)}function fo(Ao,Ro){for(var No=-1,Mo=Ro.length,Do=Ao.length;++No-1&&Do%1==0&&Do<=9007199254740991}(Mo.length)&&!function(Do){var jo=function(Fo){var $o=typeof Fo;return!!Fo&&($o=="object"||$o=="function")}(Do)?go.call(Do):"";return jo=="[object Function]"||jo=="[object GeneratorFunction]"}(Mo)}(No)}(Ro)&&po.call(Ro,"callee")&&(!bo.call(Ro,"callee")||go.call(Ro)=="[object Arguments]")}(Ao)||!!(xo&&Ao&&Ao[xo])}var So=Array.isArray,To,wo,Co,Oo=(wo=function(Ao){var Ro=(Ao=function Mo(Do,jo,Fo,$o,Lo){var Ho=-1,qo=Do.length;for(Fo||(Fo=Eo),Lo||(Lo=[]);++Ho0&&Fo(Uo)?jo>1?Mo(Uo,jo-1,Fo,$o,Lo):fo(Lo,Uo):$o||(Lo[Lo.length]=Uo)}return Lo}(Ao,1)).length,No=Ro;for(To;No--;)if(typeof Ao[No]!="function")throw new TypeError("Expected a function");return function(){for(var Mo=0,Do=Ro?Ao[Mo].apply(this,arguments):arguments[0];++Mo2?lo-2:0),co=2;co"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var zo,Vo=go(Ko);if(Qo){var Bo=go(this).constructor;zo=Reflect.construct(Vo,arguments,Bo)}else zo=Vo.apply(this,arguments);return xo(this,zo)}}io.r(oo);var Eo=io(0),So=io.n(Eo);function To(){var Ko=this.constructor.getDerivedStateFromProps(this.props,this.state);Ko!=null&&this.setState(Ko)}function wo(Ko){this.setState((function(Qo){var zo=this.constructor.getDerivedStateFromProps(Ko,Qo);return zo??null}).bind(this))}function Co(Ko,Qo){try{var zo=this.props,Vo=this.state;this.props=Ko,this.state=Qo,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(zo,Vo)}finally{this.props=zo,this.state=Vo}}function Oo(Ko){var Qo=Ko.prototype;if(!Qo||!Qo.isReactComponent)throw new Error("Can only polyfill class components");if(typeof Ko.getDerivedStateFromProps!="function"&&typeof Qo.getSnapshotBeforeUpdate!="function")return Ko;var zo=null,Vo=null,Bo=null;if(typeof Qo.componentWillMount=="function"?zo="componentWillMount":typeof Qo.UNSAFE_componentWillMount=="function"&&(zo="UNSAFE_componentWillMount"),typeof Qo.componentWillReceiveProps=="function"?Vo="componentWillReceiveProps":typeof Qo.UNSAFE_componentWillReceiveProps=="function"&&(Vo="UNSAFE_componentWillReceiveProps"),typeof Qo.componentWillUpdate=="function"?Bo="componentWillUpdate":typeof Qo.UNSAFE_componentWillUpdate=="function"&&(Bo="UNSAFE_componentWillUpdate"),zo!==null||Vo!==null||Bo!==null){var Xo=Ko.displayName||Ko.name,vs=typeof Ko.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. + +`+Xo+" uses "+vs+" but also contains the following legacy lifecycles:"+(zo!==null?` + `+zo:"")+(Vo!==null?` + `+Vo:"")+(Bo!==null?` + `+Bo:"")+` + +The above lifecycles should be removed. Learn more about this warning here: +https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof Ko.getDerivedStateFromProps=="function"&&(Qo.componentWillMount=To,Qo.componentWillReceiveProps=wo),typeof Qo.getSnapshotBeforeUpdate=="function"){if(typeof Qo.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");Qo.componentWillUpdate=Co;var ys=Qo.componentDidUpdate;Qo.componentDidUpdate=function(ps,Rs,Us){var Rl=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Us;ys.call(this,ps,Rs,Rl)}}return Ko}function Ao(Ko,Qo){if(Ko==null)return{};var zo,Vo,Bo=function(vs,ys){if(vs==null)return{};var ps,Rs,Us={},Rl=Object.keys(vs);for(Rs=0;Rs=0||(Us[ps]=vs[ps]);return Us}(Ko,Qo);if(Object.getOwnPropertySymbols){var Xo=Object.getOwnPropertySymbols(Ko);for(Vo=0;Vo=0||Object.prototype.propertyIsEnumerable.call(Ko,zo)&&(Bo[zo]=Ko[zo])}return Bo}function Ro(Ko){var Qo=function(zo){return{}.toString.call(zo).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(Ko);return Qo==="number"&&(Qo=isNaN(Ko)?"nan":(0|Ko)!=Ko?"float":"integer"),Qo}To.__suppressDeprecationWarning=!0,wo.__suppressDeprecationWarning=!0,Co.__suppressDeprecationWarning=!0;var No={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},Mo={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"},Do={white:"#fff",black:"#000",transparent:"rgba(1, 1, 1, 0)",globalFontFamily:"monospace",globalCursor:"default",indentBlockWidth:"5px",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyBorderRadius:"3px",keyColonWeight:"bold",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",keyValPaddingHover:"3px 5px 3px 4px",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedFontWeight:"bold",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px"},jo=io(45),Fo=function(Ko){var Qo=function(zo){return{backgroundColor:zo.base00,ellipsisColor:zo.base09,braceColor:zo.base07,expandedIcon:zo.base0D,collapsedIcon:zo.base0E,keyColor:zo.base07,arrayKeyColor:zo.base0C,objectSize:zo.base04,copyToClipboard:zo.base0F,copyToClipboardCheck:zo.base0D,objectBorder:zo.base02,dataTypes:{boolean:zo.base0E,date:zo.base0D,float:zo.base0B,function:zo.base0D,integer:zo.base0F,string:zo.base09,nan:zo.base08,null:zo.base0A,undefined:zo.base05,regexp:zo.base0A,background:zo.base02},editVariable:{editIcon:zo.base0E,cancelIcon:zo.base09,removeIcon:zo.base09,addIcon:zo.base0E,checkIcon:zo.base0E,background:zo.base01,color:zo.base0A,border:zo.base07},addKeyModal:{background:zo.base05,border:zo.base04,color:zo.base0A,labelColor:zo.base01},validationFailure:{background:zo.base09,iconColor:zo.base01,fontColor:zo.base01}}}(Ko);return{"app-container":{fontFamily:Do.globalFontFamily,cursor:Do.globalCursor,backgroundColor:Qo.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:Qo.ellipsisColor,fontSize:Do.ellipsisFontSize,lineHeight:Do.ellipsisLineHeight,cursor:Do.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:Do.braceCursor,fontWeight:Do.braceFontWeight,color:Qo.braceColor},"expanded-icon":{color:Qo.expandedIcon},"collapsed-icon":{color:Qo.collapsedIcon},colon:{display:"inline-block",margin:Do.keyMargin,color:Qo.keyColor,verticalAlign:"top"},objectKeyVal:function(zo,Vo){return{style:lo({paddingTop:Do.keyValPaddingTop,paddingRight:Do.keyValPaddingRight,paddingBottom:Do.keyValPaddingBottom,borderLeft:Do.keyValBorderLeft+" "+Qo.objectBorder,":hover":{paddingLeft:Vo.paddingLeft-1+"px",borderLeft:Do.keyValBorderHover+" "+Qo.objectBorder}},Vo)}},"object-key-val-no-border":{padding:Do.keyValPadding},"pushed-content":{marginLeft:Do.pushedContentMarginLeft},variableValue:function(zo,Vo){return{style:lo({display:"inline-block",paddingRight:Do.variableValuePaddingRight,position:"relative"},Vo)}},"object-name":{display:"inline-block",color:Qo.keyColor,letterSpacing:Do.keyLetterSpacing,fontStyle:Do.keyFontStyle,verticalAlign:Do.keyVerticalAlign,opacity:Do.keyOpacity,":hover":{opacity:Do.keyOpacityHover}},"array-key":{display:"inline-block",color:Qo.arrayKeyColor,letterSpacing:Do.keyLetterSpacing,fontStyle:Do.keyFontStyle,verticalAlign:Do.keyVerticalAlign,opacity:Do.keyOpacity,":hover":{opacity:Do.keyOpacityHover}},"object-size":{color:Qo.objectSize,borderRadius:Do.objectSizeBorderRadius,fontStyle:Do.objectSizeFontStyle,margin:Do.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:Do.dataTypeFontSize,marginRight:Do.dataTypeMarginRight,opacity:Do.datatypeOpacity},boolean:{display:"inline-block",color:Qo.dataTypes.boolean},date:{display:"inline-block",color:Qo.dataTypes.date},"date-value":{marginLeft:Do.dateValueMarginLeft},float:{display:"inline-block",color:Qo.dataTypes.float},function:{display:"inline-block",color:Qo.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:Qo.dataTypes.integer},string:{display:"inline-block",color:Qo.dataTypes.string},nan:{display:"inline-block",color:Qo.dataTypes.nan,fontSize:Do.nanFontSize,fontWeight:Do.nanFontWeight,backgroundColor:Qo.dataTypes.background,padding:Do.nanPadding,borderRadius:Do.nanBorderRadius},null:{display:"inline-block",color:Qo.dataTypes.null,fontSize:Do.nullFontSize,fontWeight:Do.nullFontWeight,backgroundColor:Qo.dataTypes.background,padding:Do.nullPadding,borderRadius:Do.nullBorderRadius},undefined:{display:"inline-block",color:Qo.dataTypes.undefined,fontSize:Do.undefinedFontSize,padding:Do.undefinedPadding,borderRadius:Do.undefinedBorderRadius,backgroundColor:Qo.dataTypes.background},regexp:{display:"inline-block",color:Qo.dataTypes.regexp},"copy-to-clipboard":{cursor:Do.clipboardCursor},"copy-icon":{color:Qo.copyToClipboard,fontSize:Do.iconFontSize,marginRight:Do.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:Qo.copyToClipboardCheck,marginLeft:Do.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:Do.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:Do.metaDataPadding},"icon-container":{display:"inline-block",width:Do.iconContainerWidth},tooltip:{padding:Do.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:Qo.editVariable.removeIcon,cursor:Do.iconCursor,fontSize:Do.iconFontSize,marginRight:Do.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:Qo.editVariable.addIcon,cursor:Do.iconCursor,fontSize:Do.iconFontSize,marginRight:Do.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:Qo.editVariable.editIcon,cursor:Do.iconCursor,fontSize:Do.iconFontSize,marginRight:Do.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:Do.iconCursor,color:Qo.editVariable.checkIcon,fontSize:Do.iconFontSize,paddingRight:Do.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:Do.iconCursor,color:Qo.editVariable.cancelIcon,fontSize:Do.iconFontSize,paddingRight:Do.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:Do.editInputMinWidth,borderRadius:Do.editInputBorderRadius,backgroundColor:Qo.editVariable.background,color:Qo.editVariable.color,padding:Do.editInputPadding,marginRight:Do.editInputMarginRight,fontFamily:Do.editInputFontFamily},"detected-row":{paddingTop:Do.detectedRowPaddingTop},"key-modal-request":{position:Do.addKeyCoverPosition,top:Do.addKeyCoverPositionPx,left:Do.addKeyCoverPositionPx,right:Do.addKeyCoverPositionPx,bottom:Do.addKeyCoverPositionPx,backgroundColor:Do.addKeyCoverBackground},"key-modal":{width:Do.addKeyModalWidth,backgroundColor:Qo.addKeyModal.background,marginLeft:Do.addKeyModalMargin,marginRight:Do.addKeyModalMargin,padding:Do.addKeyModalPadding,borderRadius:Do.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:Qo.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:Qo.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:Qo.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:Qo.addKeyModal.labelColor,fontSize:Do.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:Qo.editVariable.addIcon,fontSize:Do.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:Qo.ellipsisColor,fontSize:Do.ellipsisFontSize,lineHeight:Do.ellipsisLineHeight,cursor:Do.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:Qo.validationFailure.fontColor,backgroundColor:Qo.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:Qo.validationFailure.iconColor,fontSize:Do.iconFontSize,transform:"rotate(45deg)"}}};function $o(Ko,Qo,zo){return Ko||console.error("theme has not been set"),function(Vo){var Bo=No;return Vo!==!1&&Vo!=="none"||(Bo=Mo),Object(jo.createStyling)(Fo,{defaultBase16:Bo})(Vo)}(Ko)(Qo,zo)}var Lo=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=(Vo.rjvId,Vo.type_name),Xo=Vo.displayDataTypes,vs=Vo.theme;return Xo?So.a.createElement("span",Object.assign({className:"data-type-label"},$o(vs,"data-type-label")),Bo):null}}]),zo}(So.a.PureComponent),Ho=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props;return So.a.createElement("div",$o(Vo.theme,"boolean"),So.a.createElement(Lo,Object.assign({type_name:"bool"},Vo)),Vo.value?"true":"false")}}]),zo}(So.a.PureComponent),qo=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props;return So.a.createElement("div",$o(Vo.theme,"date"),So.a.createElement(Lo,Object.assign({type_name:"date"},Vo)),So.a.createElement("span",Object.assign({className:"date-value"},$o(Vo.theme,"date-value")),Vo.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}]),zo}(So.a.PureComponent),Uo=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props;return So.a.createElement("div",$o(Vo.theme,"float"),So.a.createElement(Lo,Object.assign({type_name:"float"},Vo)),this.props.value)}}]),zo}(So.a.PureComponent);function Yo(Ko,Qo){(Qo==null||Qo>Ko.length)&&(Qo=Ko.length);for(var zo=0,Vo=new Array(Qo);zo"u"||Ko[Symbol.iterator]==null){if(Array.isArray(Ko)||(zo=Zo(Ko))||Qo&&Ko&&typeof Ko.length=="number"){zo&&(Ko=zo);var Vo=0,Bo=function(){};return{s:Bo,n:function(){return Vo>=Ko.length?{done:!0}:{done:!1,value:Ko[Vo++]}},e:function(ps){throw ps},f:Bo}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Xo,vs=!0,ys=!1;return{s:function(){zo=Ko[Symbol.iterator]()},n:function(){var ps=zo.next();return vs=ps.done,ps},e:function(ps){ys=!0,Xo=ps},f:function(){try{vs||zo.return==null||zo.return()}finally{if(ys)throw Xo}}}}function Ss(Ko){return function(Qo){if(Array.isArray(Qo))return Yo(Qo)}(Ko)||function(Qo){if(typeof Symbol<"u"&&Symbol.iterator in Object(Qo))return Array.from(Qo)}(Ko)||Zo(Ko)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var As=io(46),Ns=new(io(47)).Dispatcher,ws=new(function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){var Vo;uo(this,zo);for(var Bo=arguments.length,Xo=new Array(Bo),vs=0;vsBo&&(ys.style.cursor="pointer",this.state.collapsed&&(vs=So.a.createElement("span",null,vs.substring(0,Bo),So.a.createElement("span",$o(Xo,"ellipsis")," ...")))),So.a.createElement("div",$o(Xo,"string"),So.a.createElement(Lo,Object.assign({type_name:"string"},Vo)),So.a.createElement("span",Object.assign({className:"string-value"},ys,{onClick:this.toggleCollapsed}),'"',vs,'"'))}}]),zo}(So.a.PureComponent),Js=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){return So.a.createElement("div",$o(this.props.theme,"undefined"),"undefined")}}]),zo}(So.a.PureComponent);function Xs(){return(Xs=Object.assign||function(Ko){for(var Qo=1;Qo=0||(dp[Iu]=Bl[Iu]);return dp}(Ko,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),Us,Rl=Rs.value!==void 0,Ml=Object(Eo.useRef)(null),Ol=Xl(Ml,Qo),Cl=Object(Eo.useRef)(0),Ul=Object(Eo.useRef)(),fu=function(){var Bl=Ml.current,Eu=zo&&Ul.current?Ul.current:function(Yu){var kp=window.getComputedStyle(Yu);if(kp===null)return null;var fp,wu=(fp=kp,ks.reduce(function(Cp,hp){return Cp[hp]=fp[hp],Cp},{})),ep=wu.boxSizing;return ep===""?null:(Es&&ep==="border-box"&&(wu.width=parseFloat(wu.width)+parseFloat(wu.borderRightWidth)+parseFloat(wu.borderLeftWidth)+parseFloat(wu.paddingRight)+parseFloat(wu.paddingLeft)+"px"),{sizingStyle:wu,paddingSize:parseFloat(wu.paddingBottom)+parseFloat(wu.paddingTop),borderSize:parseFloat(wu.borderBottomWidth)+parseFloat(wu.borderTopWidth)})}(Bl);if(Eu){Ul.current=Eu;var Iu=function(Yu,kp,fp,wu){fp===void 0&&(fp=1),wu===void 0&&(wu=1/0),El||((El=document.createElement("textarea")).setAttribute("tab-index","-1"),El.setAttribute("aria-hidden","true"),xa(El)),El.parentNode===null&&document.body.appendChild(El);var ep=Yu.paddingSize,Cp=Yu.borderSize,hp=Yu.sizingStyle,wp=hp.boxSizing;Object.keys(hp).forEach(function(Op){var _p=Op;El.style[_p]=hp[_p]}),xa(El),El.value=kp;var pp=function(Op,_p){var xp=Op.scrollHeight;return _p.sizingStyle.boxSizing==="border-box"?xp+_p.borderSize:xp-_p.paddingSize}(El,Yu);El.value="x";var jp=El.scrollHeight-ep,bp=jp*fp;wp==="border-box"&&(bp=bp+ep+Cp),pp=Math.max(bp,pp);var Ap=jp*wu;return wp==="border-box"&&(Ap=Ap+ep+Cp),[pp=Math.min(Ap,pp),jp]}(Eu,Bl.value||Bl.placeholder||"x",Bo,Vo),zu=Iu[0],dp=Iu[1];Cl.current!==zu&&(Cl.current=zu,Bl.style.setProperty("height",zu+"px","important"),ps(zu,{rowHeight:dp}))}};return Object(Eo.useLayoutEffect)(fu),Us=Ll(fu),Object(Eo.useLayoutEffect)(function(){var Bl=function(Eu){Us.current(Eu)};return window.addEventListener("resize",Bl),function(){window.removeEventListener("resize",Bl)}},[]),Object(Eo.createElement)("textarea",Xs({},Rs,{onChange:function(Bl){Rl||fu(),vs(Bl)},ref:Ol}))},Os=Object(Eo.forwardRef)(bs);function Vs(Ko){Ko=Ko.trim();try{if((Ko=JSON.stringify(JSON.parse(Ko)))[0]==="[")return Ks("array",JSON.parse(Ko));if(Ko[0]==="{")return Ks("object",JSON.parse(Ko));if(Ko.match(/\-?\d+\.\d+/)&&Ko.match(/\-?\d+\.\d+/)[0]===Ko)return Ks("float",parseFloat(Ko));if(Ko.match(/\-?\d+e-\d+/)&&Ko.match(/\-?\d+e-\d+/)[0]===Ko)return Ks("float",Number(Ko));if(Ko.match(/\-?\d+/)&&Ko.match(/\-?\d+/)[0]===Ko)return Ks("integer",parseInt(Ko));if(Ko.match(/\-?\d+e\+\d+/)&&Ko.match(/\-?\d+e\+\d+/)[0]===Ko)return Ks("integer",Number(Ko))}catch{}switch(Ko=Ko.toLowerCase()){case"undefined":return Ks("undefined",void 0);case"nan":return Ks("nan",NaN);case"null":return Ks("null",null);case"true":return Ks("boolean",!0);case"false":return Ks("boolean",!1);default:if(Ko=Date.parse(Ko))return Ks("date",new Date(Ko))}return Ks(!1,null)}function Ks(Ko,Qo){return{type:Ko,value:Qo}}var Ms=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",Object.assign({},Dl(Bo),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),So.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}]),zo}(So.a.PureComponent),Hs=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",Object.assign({},Dl(Bo),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),So.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}]),zo}(So.a.PureComponent),Zs=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]),vs=Dl(Bo).style;return So.a.createElement("span",Xo,So.a.createElement("svg",{fill:vs.color,width:vs.height,height:vs.width,style:vs,viewBox:"0 0 1792 1792"},So.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),zo}(So.a.PureComponent),xl=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]),vs=Dl(Bo).style;return So.a.createElement("span",Xo,So.a.createElement("svg",{fill:vs.color,width:vs.height,height:vs.width,style:vs,viewBox:"0 0 1792 1792"},So.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),zo}(So.a.PureComponent),Sl=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",{style:lo(lo({},Dl(Bo).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},So.a.createElement("path",{d:"M0 14l6-6-6-6z"})))}}]),zo}(So.a.PureComponent),$l=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",{style:lo(lo({},Dl(Bo).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},So.a.createElement("path",{d:"M0 5l6 6 6-6z"})))}}]),zo}(So.a.PureComponent),ru=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",Object.assign({},Dl(Bo),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),So.a.createElement("g",null,So.a.createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}]),zo}(So.a.PureComponent),au=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",Object.assign({},Dl(Bo),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),So.a.createElement("g",null,So.a.createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),zo}(So.a.PureComponent),zl=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",Object.assign({},Dl(Bo),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),So.a.createElement("g",null,So.a.createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),zo}(So.a.PureComponent),pu=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",Object.assign({},Dl(Bo),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),So.a.createElement("g",null,So.a.createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}]),zo}(So.a.PureComponent),Su=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",Object.assign({},Dl(Bo),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),So.a.createElement("g",null,So.a.createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}]),zo}(So.a.PureComponent),Zl=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){return uo(this,zo),Qo.apply(this,arguments)}return fo(zo,[{key:"render",value:function(){var Vo=this.props,Bo=Vo.style,Xo=Ao(Vo,["style"]);return So.a.createElement("span",Xo,So.a.createElement("svg",Object.assign({},Dl(Bo),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),So.a.createElement("g",null,So.a.createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),zo}(So.a.PureComponent);function Dl(Ko){return Ko||(Ko={}),{style:lo(lo({verticalAlign:"middle"},Ko),{},{color:Ko.color?Ko.color:"#000000",height:"1em",width:"1em"})}}var gu=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(Vo){var Bo;return uo(this,zo),(Bo=Qo.call(this,Vo)).copiedTimer=null,Bo.handleCopy=function(){var Xo=document.createElement("textarea"),vs=Bo.props,ys=vs.clickCallback,ps=vs.src,Rs=vs.namespace;Xo.innerHTML=JSON.stringify(Bo.clipboardValue(ps),null," "),document.body.appendChild(Xo),Xo.select(),document.execCommand("copy"),document.body.removeChild(Xo),Bo.copiedTimer=setTimeout(function(){Bo.setState({copied:!1})},5500),Bo.setState({copied:!0},function(){typeof ys=="function"&&ys({src:ps,namespace:Rs,name:Rs[Rs.length-1]})})},Bo.getClippyIcon=function(){var Xo=Bo.props.theme;return Bo.state.copied?So.a.createElement("span",null,So.a.createElement(ru,Object.assign({className:"copy-icon"},$o(Xo,"copy-icon"))),So.a.createElement("span",$o(Xo,"copy-icon-copied"),"✔")):So.a.createElement(ru,Object.assign({className:"copy-icon"},$o(Xo,"copy-icon")))},Bo.clipboardValue=function(Xo){switch(Ro(Xo)){case"function":case"regexp":return Xo.toString();default:return Xo}},Bo.state={copied:!1},Bo}return fo(zo,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var Vo=this.props,Bo=(Vo.src,Vo.theme),Xo=Vo.hidden,vs=Vo.rowHovered,ys=$o(Bo,"copy-to-clipboard").style,ps="inline";return Xo&&(ps="none"),So.a.createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:vs?"inline-block":"none"}},So.a.createElement("span",{style:lo(lo({},ys),{},{display:ps}),onClick:this.handleCopy},this.getClippyIcon()))}}]),zo}(So.a.PureComponent),lu=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(Vo){var Bo;return uo(this,zo),(Bo=Qo.call(this,Vo)).getEditIcon=function(){var Xo=Bo.props,vs=Xo.variable,ys=Xo.theme;return So.a.createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:Bo.state.hovered?"inline-block":"none"}},So.a.createElement(Su,Object.assign({className:"click-to-edit-icon"},$o(ys,"editVarIcon"),{onClick:function(){Bo.prepopInput(vs)}})))},Bo.prepopInput=function(Xo){if(Bo.props.onEdit!==!1){var vs=function(ps){var Rs;switch(Ro(ps)){case"undefined":Rs="undefined";break;case"nan":Rs="NaN";break;case"string":Rs=ps;break;case"date":case"function":case"regexp":Rs=ps.toString();break;default:try{Rs=JSON.stringify(ps,null," ")}catch{Rs=""}}return Rs}(Xo.value),ys=Vs(vs);Bo.setState({editMode:!0,editValue:vs,parsedInput:{type:ys.type,value:ys.value}})}},Bo.getRemoveIcon=function(){var Xo=Bo.props,vs=Xo.variable,ys=Xo.namespace,ps=Xo.theme,Rs=Xo.rjvId;return So.a.createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:Bo.state.hovered?"inline-block":"none"}},So.a.createElement(au,Object.assign({className:"click-to-remove-icon"},$o(ps,"removeVarIcon"),{onClick:function(){Ns.dispatch({name:"VARIABLE_REMOVED",rjvId:Rs,data:{name:vs.name,namespace:ys,existing_value:vs.value,variable_removed:!0}})}})))},Bo.getValue=function(Xo,vs){var ys=!vs&&Xo.type,ps=bo(Bo).props;switch(ys){case!1:return Bo.getEditInput();case"string":return So.a.createElement(ga,Object.assign({value:Xo.value},ps));case"integer":return So.a.createElement(zs,Object.assign({value:Xo.value},ps));case"float":return So.a.createElement(Uo,Object.assign({value:Xo.value},ps));case"boolean":return So.a.createElement(Ho,Object.assign({value:Xo.value},ps));case"function":return So.a.createElement(Jo,Object.assign({value:Xo.value},ps));case"null":return So.a.createElement(Bs,ps);case"nan":return So.a.createElement(Cs,ps);case"undefined":return So.a.createElement(Js,ps);case"date":return So.a.createElement(qo,Object.assign({value:Xo.value},ps));case"regexp":return So.a.createElement(Ls,Object.assign({value:Xo.value},ps));default:return So.a.createElement("div",{className:"object-value"},JSON.stringify(Xo.value))}},Bo.getEditInput=function(){var Xo=Bo.props.theme,vs=Bo.state.editValue;return So.a.createElement("div",null,So.a.createElement(Os,Object.assign({type:"text",inputRef:function(ys){return ys&&ys.focus()},value:vs,className:"variable-editor",onChange:function(ys){var ps=ys.target.value,Rs=Vs(ps);Bo.setState({editValue:ps,parsedInput:{type:Rs.type,value:Rs.value}})},onKeyDown:function(ys){switch(ys.key){case"Escape":Bo.setState({editMode:!1,editValue:""});break;case"Enter":(ys.ctrlKey||ys.metaKey)&&Bo.submitEdit(!0)}ys.stopPropagation()},placeholder:"update this value",minRows:2},$o(Xo,"edit-input"))),So.a.createElement("div",$o(Xo,"edit-icon-container"),So.a.createElement(au,Object.assign({className:"edit-cancel"},$o(Xo,"cancel-icon"),{onClick:function(){Bo.setState({editMode:!1,editValue:""})}})),So.a.createElement(Zl,Object.assign({className:"edit-check string-value"},$o(Xo,"check-icon"),{onClick:function(){Bo.submitEdit()}})),So.a.createElement("div",null,Bo.showDetected())))},Bo.submitEdit=function(Xo){var vs=Bo.props,ys=vs.variable,ps=vs.namespace,Rs=vs.rjvId,Us=Bo.state,Rl=Us.editValue,Ml=Us.parsedInput,Ol=Rl;Xo&&Ml.type&&(Ol=Ml.value),Bo.setState({editMode:!1}),Ns.dispatch({name:"VARIABLE_UPDATED",rjvId:Rs,data:{name:ys.name,namespace:ps,existing_value:ys.value,new_value:Ol,variable_removed:!1}})},Bo.showDetected=function(){var Xo=Bo.props,vs=Xo.theme,ys=(Xo.variable,Xo.namespace,Xo.rjvId,Bo.state.parsedInput),ps=(ys.type,ys.value,Bo.getDetectedInput());if(ps)return So.a.createElement("div",null,So.a.createElement("div",$o(vs,"detected-row"),ps,So.a.createElement(Zl,{className:"edit-check detected",style:lo({verticalAlign:"top",paddingLeft:"3px"},$o(vs,"check-icon").style),onClick:function(){Bo.submitEdit(!0)}})))},Bo.getDetectedInput=function(){var Xo=Bo.state.parsedInput,vs=Xo.type,ys=Xo.value,ps=bo(Bo).props,Rs=ps.theme;if(vs!==!1)switch(vs.toLowerCase()){case"object":return So.a.createElement("span",null,So.a.createElement("span",{style:lo(lo({},$o(Rs,"brace").style),{},{cursor:"default"})},"{"),So.a.createElement("span",{style:lo(lo({},$o(Rs,"ellipsis").style),{},{cursor:"default"})},"..."),So.a.createElement("span",{style:lo(lo({},$o(Rs,"brace").style),{},{cursor:"default"})},"}"));case"array":return So.a.createElement("span",null,So.a.createElement("span",{style:lo(lo({},$o(Rs,"brace").style),{},{cursor:"default"})},"["),So.a.createElement("span",{style:lo(lo({},$o(Rs,"ellipsis").style),{},{cursor:"default"})},"..."),So.a.createElement("span",{style:lo(lo({},$o(Rs,"brace").style),{},{cursor:"default"})},"]"));case"string":return So.a.createElement(ga,Object.assign({value:ys},ps));case"integer":return So.a.createElement(zs,Object.assign({value:ys},ps));case"float":return So.a.createElement(Uo,Object.assign({value:ys},ps));case"boolean":return So.a.createElement(Ho,Object.assign({value:ys},ps));case"function":return So.a.createElement(Jo,Object.assign({value:ys},ps));case"null":return So.a.createElement(Bs,ps);case"nan":return So.a.createElement(Cs,ps);case"undefined":return So.a.createElement(Js,ps);case"date":return So.a.createElement(qo,Object.assign({value:new Date(ys)},ps))}},Bo.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},Bo}return fo(zo,[{key:"render",value:function(){var Vo=this,Bo=this.props,Xo=Bo.variable,vs=Bo.singleIndent,ys=Bo.type,ps=Bo.theme,Rs=Bo.namespace,Us=Bo.indentWidth,Rl=Bo.enableClipboard,Ml=Bo.onEdit,Ol=Bo.onDelete,Cl=Bo.onSelect,Ul=Bo.displayArrayKey,fu=Bo.quotesOnKeys,Bl=this.state.editMode;return So.a.createElement("div",Object.assign({},$o(ps,"objectKeyVal",{paddingLeft:Us*vs}),{onMouseEnter:function(){return Vo.setState(lo(lo({},Vo.state),{},{hovered:!0}))},onMouseLeave:function(){return Vo.setState(lo(lo({},Vo.state),{},{hovered:!1}))},className:"variable-row",key:Xo.name}),ys=="array"?Ul?So.a.createElement("span",Object.assign({},$o(ps,"array-key"),{key:Xo.name+"_"+Rs}),Xo.name,So.a.createElement("div",$o(ps,"colon"),":")):null:So.a.createElement("span",null,So.a.createElement("span",Object.assign({},$o(ps,"object-name"),{className:"object-key",key:Xo.name+"_"+Rs}),!!fu&&So.a.createElement("span",{style:{verticalAlign:"top"}},'"'),So.a.createElement("span",{style:{display:"inline-block"}},Xo.name),!!fu&&So.a.createElement("span",{style:{verticalAlign:"top"}},'"')),So.a.createElement("span",$o(ps,"colon"),":")),So.a.createElement("div",Object.assign({className:"variable-value",onClick:Cl===!1&&Ml===!1?null:function(Eu){var Iu=Ss(Rs);(Eu.ctrlKey||Eu.metaKey)&&Ml!==!1?Vo.prepopInput(Xo):Cl!==!1&&(Iu.shift(),Cl(lo(lo({},Xo),{},{namespace:Iu})))}},$o(ps,"variableValue",{cursor:Cl===!1?"default":"pointer"})),this.getValue(Xo,Bl)),Rl?So.a.createElement(gu,{rowHovered:this.state.hovered,hidden:Bl,src:Xo.value,clickCallback:Rl,theme:ps,namespace:[].concat(Ss(Rs),[Xo.name])}):null,Ml!==!1&&Bl==0?this.getEditIcon():null,Ol!==!1&&Bl==0?this.getRemoveIcon():null)}}]),zo}(So.a.PureComponent),mu=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){var Vo;uo(this,zo);for(var Bo=arguments.length,Xo=new Array(Bo),vs=0;vs0?Rl:null,namespace:Us.splice(0,Us.length-1),existing_value:Ml,variable_removed:!1,key_name:null};Ro(Ml)==="object"?Ns.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:Ol,data:Ul}):Ns.dispatch({name:"VARIABLE_ADDED",rjvId:Ol,data:lo(lo({},Ul),{},{new_value:[].concat(Ss(Ml),[null])})})}})))},Vo.getRemoveObject=function(ys){var ps=Vo.props,Rs=ps.theme,Us=(ps.hover,ps.namespace),Rl=ps.name,Ml=ps.src,Ol=ps.rjvId;if(Us.length!==1)return So.a.createElement("span",{className:"click-to-remove",style:{display:ys?"inline-block":"none"}},So.a.createElement(au,Object.assign({className:"click-to-remove-icon"},$o(Rs,"removeVarIcon"),{onClick:function(){Ns.dispatch({name:"VARIABLE_REMOVED",rjvId:Ol,data:{name:Rl,namespace:Us.splice(0,Us.length-1),existing_value:Ml,variable_removed:!0}})}})))},Vo.render=function(){var ys=Vo.props,ps=ys.theme,Rs=ys.onDelete,Us=ys.onAdd,Rl=ys.enableClipboard,Ml=ys.src,Ol=ys.namespace,Cl=ys.rowHovered;return So.a.createElement("div",Object.assign({},$o(ps,"object-meta-data"),{className:"object-meta-data",onClick:function(Ul){Ul.stopPropagation()}}),Vo.getObjectSize(),Rl?So.a.createElement(gu,{rowHovered:Cl,clickCallback:Rl,src:Ml,theme:ps,namespace:Ol}):null,Us!==!1?Vo.getAddAttribute(Cl):null,Rs!==!1?Vo.getRemoveObject(Cl):null)},Vo}return zo}(So.a.PureComponent);function ou(Ko){var Qo=Ko.parent_type,zo=Ko.namespace,Vo=Ko.quotesOnKeys,Bo=Ko.theme,Xo=Ko.jsvRoot,vs=Ko.name,ys=Ko.displayArrayKey,ps=Ko.name?Ko.name:"";return!Xo||vs!==!1&&vs!==null?Qo=="array"?ys?So.a.createElement("span",Object.assign({},$o(Bo,"array-key"),{key:zo}),So.a.createElement("span",{className:"array-key"},ps),So.a.createElement("span",$o(Bo,"colon"),":")):So.a.createElement("span",null):So.a.createElement("span",Object.assign({},$o(Bo,"object-name"),{key:zo}),So.a.createElement("span",{className:"object-key"},Vo&&So.a.createElement("span",{style:{verticalAlign:"top"}},'"'),So.a.createElement("span",null,ps),Vo&&So.a.createElement("span",{style:{verticalAlign:"top"}},'"')),So.a.createElement("span",$o(Bo,"colon"),":")):So.a.createElement("span",null)}function Fl(Ko){var Qo=Ko.theme;switch(Ko.iconStyle){case"triangle":return So.a.createElement($l,Object.assign({},$o(Qo,"expanded-icon"),{className:"expanded-icon"}));case"square":return So.a.createElement(Zs,Object.assign({},$o(Qo,"expanded-icon"),{className:"expanded-icon"}));default:return So.a.createElement(Ms,Object.assign({},$o(Qo,"expanded-icon"),{className:"expanded-icon"}))}}function yl(Ko){var Qo=Ko.theme;switch(Ko.iconStyle){case"triangle":return So.a.createElement(Sl,Object.assign({},$o(Qo,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return So.a.createElement(xl,Object.assign({},$o(Qo,"collapsed-icon"),{className:"collapsed-icon"}));default:return So.a.createElement(Hs,Object.assign({},$o(Qo,"collapsed-icon"),{className:"collapsed-icon"}))}}var Ys=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(Vo){var Bo;return uo(this,zo),(Bo=Qo.call(this,Vo)).toggleCollapsed=function(Xo){var vs=[];for(var ys in Bo.state.expanded)vs.push(Bo.state.expanded[ys]);vs[Xo]=!vs[Xo],Bo.setState({expanded:vs})},Bo.state={expanded:[]},Bo}return fo(zo,[{key:"getExpandedIcon",value:function(Vo){var Bo=this.props,Xo=Bo.theme,vs=Bo.iconStyle;return this.state.expanded[Vo]?So.a.createElement(Fl,{theme:Xo,iconStyle:vs}):So.a.createElement(yl,{theme:Xo,iconStyle:vs})}},{key:"render",value:function(){var Vo=this,Bo=this.props,Xo=Bo.src,vs=Bo.groupArraysAfterLength,ys=(Bo.depth,Bo.name),ps=Bo.theme,Rs=Bo.jsvRoot,Us=Bo.namespace,Rl=(Bo.parent_type,Ao(Bo,["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"])),Ml=0,Ol=5*this.props.indentWidth;Rs||(Ml=5*this.props.indentWidth);var Cl=vs,Ul=Math.ceil(Xo.length/Cl);return So.a.createElement("div",Object.assign({className:"object-key-val"},$o(ps,Rs?"jsv-root":"objectKeyVal",{paddingLeft:Ml})),So.a.createElement(ou,this.props),So.a.createElement("span",null,So.a.createElement(mu,Object.assign({size:Xo.length},this.props))),Ss(Array(Ul)).map(function(fu,Bl){return So.a.createElement("div",Object.assign({key:Bl,className:"object-key-val array-group"},$o(ps,"objectKeyVal",{marginLeft:6,paddingLeft:Ol})),So.a.createElement("span",$o(ps,"brace-row"),So.a.createElement("div",Object.assign({className:"icon-container"},$o(ps,"icon-container"),{onClick:function(Eu){Vo.toggleCollapsed(Bl)}}),Vo.getExpandedIcon(Bl)),Vo.state.expanded[Bl]?So.a.createElement(du,Object.assign({key:ys+Bl,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:Cl,index_offset:Bl*Cl,src:Xo.slice(Bl*Cl,Bl*Cl+Cl),namespace:Us,type:"array",parent_type:"array_group",theme:ps},Rl)):So.a.createElement("span",Object.assign({},$o(ps,"brace"),{onClick:function(Eu){Vo.toggleCollapsed(Bl)},className:"array-group-brace"}),"[",So.a.createElement("div",Object.assign({},$o(ps,"array-group-meta-data"),{className:"array-group-meta-data"}),So.a.createElement("span",Object.assign({className:"object-size"},$o(ps,"object-size")),Bl*Cl," - ",Bl*Cl+Cl>Xo.length?Xo.length:Bl*Cl+Cl)),"]")))}))}}]),zo}(So.a.PureComponent),vu=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(Vo){var Bo;uo(this,zo),(Bo=Qo.call(this,Vo)).toggleCollapsed=function(){Bo.setState({expanded:!Bo.state.expanded},function(){Ds.set(Bo.props.rjvId,Bo.props.namespace,"expanded",Bo.state.expanded)})},Bo.getObjectContent=function(vs,ys,ps){return So.a.createElement("div",{className:"pushed-content object-container"},So.a.createElement("div",Object.assign({className:"object-content"},$o(Bo.props.theme,"pushed-content")),Bo.renderObjectContents(ys,ps)))},Bo.getEllipsis=function(){return Bo.state.size===0?null:So.a.createElement("div",Object.assign({},$o(Bo.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:Bo.toggleCollapsed}),"...")},Bo.getObjectMetaData=function(vs){var ys=Bo.props,ps=(ys.rjvId,ys.theme,Bo.state),Rs=ps.size,Us=ps.hovered;return So.a.createElement(mu,Object.assign({rowHovered:Us,size:Rs},Bo.props))},Bo.renderObjectContents=function(vs,ys){var ps,Rs=Bo.props,Us=Rs.depth,Rl=Rs.parent_type,Ml=Rs.index_offset,Ol=Rs.groupArraysAfterLength,Cl=Rs.namespace,Ul=Bo.state.object_type,fu=[],Bl=Object.keys(vs||{});return Bo.props.sortKeys&&Ul!=="array"&&(Bl=Bl.sort()),Bl.forEach(function(Eu){if(ps=new Nu(Eu,vs[Eu]),Rl==="array_group"&&Ml&&(ps.name=parseInt(ps.name)+Ml),vs.hasOwnProperty(Eu))if(ps.type==="object")fu.push(So.a.createElement(du,Object.assign({key:ps.name,depth:Us+1,name:ps.name,src:ps.value,namespace:Cl.concat(ps.name),parent_type:Ul},ys)));else if(ps.type==="array"){var Iu=du;Ol&&ps.value.length>Ol&&(Iu=Ys),fu.push(So.a.createElement(Iu,Object.assign({key:ps.name,depth:Us+1,name:ps.name,src:ps.value,namespace:Cl.concat(ps.name),type:"array",parent_type:Ul},ys)))}else fu.push(So.a.createElement(lu,Object.assign({key:ps.name+"_"+Cl,variable:ps,singleIndent:5,namespace:Cl,type:Bo.props.type},ys)))}),fu};var Xo=zo.getState(Vo);return Bo.state=lo(lo({},Xo),{},{prevProps:{}}),Bo}return fo(zo,[{key:"getBraceStart",value:function(Vo,Bo){var Xo=this,vs=this.props,ys=vs.src,ps=vs.theme,Rs=vs.iconStyle;if(vs.parent_type==="array_group")return So.a.createElement("span",null,So.a.createElement("span",$o(ps,"brace"),Vo==="array"?"[":"{"),Bo?this.getObjectMetaData(ys):null);var Us=Bo?Fl:yl;return So.a.createElement("span",null,So.a.createElement("span",Object.assign({onClick:function(Rl){Xo.toggleCollapsed()}},$o(ps,"brace-row")),So.a.createElement("div",Object.assign({className:"icon-container"},$o(ps,"icon-container")),So.a.createElement(Us,{theme:ps,iconStyle:Rs})),So.a.createElement(ou,this.props),So.a.createElement("span",$o(ps,"brace"),Vo==="array"?"[":"{")),Bo?this.getObjectMetaData(ys):null)}},{key:"render",value:function(){var Vo=this,Bo=this.props,Xo=Bo.depth,vs=Bo.src,ys=(Bo.namespace,Bo.name,Bo.type,Bo.parent_type),ps=Bo.theme,Rs=Bo.jsvRoot,Us=Bo.iconStyle,Rl=Ao(Bo,["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle"]),Ml=this.state,Ol=Ml.object_type,Cl=Ml.expanded,Ul={};return Rs||ys==="array_group"?ys==="array_group"&&(Ul.borderLeft=0,Ul.display="inline"):Ul.paddingLeft=5*this.props.indentWidth,So.a.createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return Vo.setState(lo(lo({},Vo.state),{},{hovered:!0}))},onMouseLeave:function(){return Vo.setState(lo(lo({},Vo.state),{},{hovered:!1}))}},$o(ps,Rs?"jsv-root":"objectKeyVal",Ul)),this.getBraceStart(Ol,Cl),Cl?this.getObjectContent(Xo,vs,lo({theme:ps,iconStyle:Us},Rl)):this.getEllipsis(),So.a.createElement("span",{className:"brace-row"},So.a.createElement("span",{style:lo(lo({},$o(ps,"brace").style),{},{paddingLeft:Cl?"3px":"0px"})},Ol==="array"?"]":"}"),Cl?null:this.getObjectMetaData(vs)))}}],[{key:"getDerivedStateFromProps",value:function(Vo,Bo){var Xo=Bo.prevProps;return Vo.src!==Xo.src||Vo.collapsed!==Xo.collapsed||Vo.name!==Xo.name||Vo.namespace!==Xo.namespace||Vo.rjvId!==Xo.rjvId?lo(lo({},zo.getState(Vo)),{},{prevProps:Vo}):null}}]),zo}(So.a.PureComponent);vu.getState=function(Ko){var Qo=Object.keys(Ko.src).length,zo=(Ko.collapsed===!1||Ko.collapsed!==!0&&Ko.collapsed>Ko.depth)&&(!Ko.shouldCollapse||Ko.shouldCollapse({name:Ko.name,src:Ko.src,type:Ro(Ko.src),namespace:Ko.namespace})===!1)&&Qo!==0;return{expanded:Ds.get(Ko.rjvId,Ko.namespace,"expanded",zo),object_type:Ko.type==="array"?"array":"object",parent_type:Ko.type==="array"?"array":"object",size:Qo,hovered:!1}};var Nu=function Ko(Qo,zo){uo(this,Ko),this.name=Qo,this.value=zo,this.type=Ro(zo)};Oo(vu);var du=vu,cp=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){var Vo;uo(this,zo);for(var Bo=arguments.length,Xo=new Array(Bo),vs=0;vsys.groupArraysAfterLength&&(Rs=Ys),So.a.createElement("div",{className:"pretty-json-container object-container"},So.a.createElement("div",{className:"object-content"},So.a.createElement(Rs,Object.assign({namespace:ps,depth:0,jsvRoot:!0},ys))))},Vo}return zo}(So.a.PureComponent),qu=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(Vo){var Bo;return uo(this,zo),(Bo=Qo.call(this,Vo)).closeModal=function(){Ns.dispatch({rjvId:Bo.props.rjvId,name:"RESET"})},Bo.submit=function(){Bo.props.submit(Bo.state.input)},Bo.state={input:Vo.input?Vo.input:""},Bo}return fo(zo,[{key:"render",value:function(){var Vo=this,Bo=this.props,Xo=Bo.theme,vs=Bo.rjvId,ys=Bo.isValid,ps=this.state.input,Rs=ys(ps);return So.a.createElement("div",Object.assign({className:"key-modal-request"},$o(Xo,"key-modal-request"),{onClick:this.closeModal}),So.a.createElement("div",Object.assign({},$o(Xo,"key-modal"),{onClick:function(Us){Us.stopPropagation()}}),So.a.createElement("div",$o(Xo,"key-modal-label"),"Key Name:"),So.a.createElement("div",{style:{position:"relative"}},So.a.createElement("input",Object.assign({},$o(Xo,"key-modal-input"),{className:"key-modal-input",ref:function(Us){return Us&&Us.focus()},spellCheck:!1,value:ps,placeholder:"...",onChange:function(Us){Vo.setState({input:Us.target.value})},onKeyPress:function(Us){Rs&&Us.key==="Enter"?Vo.submit():Us.key==="Escape"&&Vo.closeModal()}})),Rs?So.a.createElement(Zl,Object.assign({},$o(Xo,"key-modal-submit"),{className:"key-modal-submit",onClick:function(Us){return Vo.submit()}})):null),So.a.createElement("span",$o(Xo,"key-modal-cancel"),So.a.createElement(pu,Object.assign({},$o(Xo,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Ns.dispatch({rjvId:vs,name:"RESET"})}})))))}}]),zo}(So.a.PureComponent),Ru=function(Ko){po(zo,Ko);var Qo=_o(zo);function zo(){var Vo;uo(this,zo);for(var Bo=arguments.length,Xo=new Array(Bo),vs=0;vs=0)&&(ro[oo]=eo[oo]);return ro}function _objectWithoutProperties(eo,to){if(eo==null)return{};var ro=_objectWithoutPropertiesLoose$1(eo,to),no,oo;if(Object.getOwnPropertySymbols){var io=Object.getOwnPropertySymbols(eo);for(oo=0;oo=0)&&Object.prototype.propertyIsEnumerable.call(eo,no)&&(ro[no]=eo[no])}return ro}function _slicedToArray(eo,to){return _arrayWithHoles(eo)||_iterableToArrayLimit(eo,to)||_unsupportedIterableToArray(eo,to)||_nonIterableRest()}function _arrayWithHoles(eo){if(Array.isArray(eo))return eo}function _iterableToArrayLimit(eo,to){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(eo)))){var ro=[],no=!0,oo=!1,io=void 0;try{for(var so=eo[Symbol.iterator](),ao;!(no=(ao=so.next()).done)&&(ro.push(ao.value),!(to&&ro.length===to));no=!0);}catch(lo){oo=!0,io=lo}finally{try{!no&&so.return!=null&&so.return()}finally{if(oo)throw io}}return ro}}function _unsupportedIterableToArray(eo,to){if(eo){if(typeof eo=="string")return _arrayLikeToArray(eo,to);var ro=Object.prototype.toString.call(eo).slice(8,-1);if(ro==="Object"&&eo.constructor&&(ro=eo.constructor.name),ro==="Map"||ro==="Set")return Array.from(eo);if(ro==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ro))return _arrayLikeToArray(eo,to)}}function _arrayLikeToArray(eo,to){(to==null||to>eo.length)&&(to=eo.length);for(var ro=0,no=new Array(to);ro=eo.length?eo.apply(this,oo):function(){for(var so=arguments.length,ao=new Array(so),lo=0;lo1&&arguments[1]!==void 0?arguments[1]:{};validators$1.initial(eo),validators$1.handler(to);var ro={current:eo},no=curry$1(didStateUpdate)(ro,to),oo=curry$1(updateState)(ro),io=curry$1(validators$1.changes)(eo),so=curry$1(extractChanges)(ro);function ao(){var uo=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(co){return co};return validators$1.selector(uo),uo(ro.current)}function lo(uo){compose$1(no,oo,io,so)(uo)}return[ao,lo]}function extractChanges(eo,to){return isFunction(to)?to(eo.current):to}function updateState(eo,to){return eo.current=_objectSpread2(_objectSpread2({},eo.current),to),to}function didStateUpdate(eo,to,ro){return isFunction(to)?to(eo.current):Object.keys(ro).forEach(function(no){var oo;return(oo=to[no])===null||oo===void 0?void 0:oo.call(to,eo.current[no])}),ro}var index={create},config$2={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function curry(eo){return function to(){for(var ro=this,no=arguments.length,oo=new Array(no),io=0;io=eo.length?eo.apply(this,oo):function(){for(var so=arguments.length,ao=new Array(so),lo=0;lo{no.current=!1}:eo,to)}var l$4=he$1;function D$3(){}function h$4(eo,to,ro,no){return De$1(eo,no)||be$1(eo,to,ro,no)}function De$1(eo,to){return eo.editor.getModel(te$1(eo,to))}function be$1(eo,to,ro,no){return eo.editor.createModel(to,ro,no?te$1(eo,no):void 0)}function te$1(eo,to){return eo.Uri.parse(to)}function Oe$1({original:eo,modified:to,language:ro,originalLanguage:no,modifiedLanguage:oo,originalModelPath:io,modifiedModelPath:so,keepCurrentOriginalModel:ao=!1,keepCurrentModifiedModel:lo=!1,theme:uo="light",loading:co="Loading...",options:fo={},height:ho="100%",width:po="100%",className:go,wrapperProps:vo={},beforeMount:bo=D$3,onMount:xo=D$3}){let[_o,Eo]=reactExports.useState(!1),[So,To]=reactExports.useState(!0),wo=reactExports.useRef(null),Co=reactExports.useRef(null),Oo=reactExports.useRef(null),Ao=reactExports.useRef(xo),Ro=reactExports.useRef(bo),No=reactExports.useRef(!1);k$3(()=>{let Fo=loader.init();return Fo.then($o=>(Co.current=$o)&&To(!1)).catch($o=>($o==null?void 0:$o.type)!=="cancelation"&&console.error("Monaco initialization: error:",$o)),()=>wo.current?jo():Fo.cancel()}),l$4(()=>{if(wo.current&&Co.current){let Fo=wo.current.getOriginalEditor(),$o=h$4(Co.current,eo||"",no||ro||"text",io||"");$o!==Fo.getModel()&&Fo.setModel($o)}},[io],_o),l$4(()=>{if(wo.current&&Co.current){let Fo=wo.current.getModifiedEditor(),$o=h$4(Co.current,to||"",oo||ro||"text",so||"");$o!==Fo.getModel()&&Fo.setModel($o)}},[so],_o),l$4(()=>{let Fo=wo.current.getModifiedEditor();Fo.getOption(Co.current.editor.EditorOption.readOnly)?Fo.setValue(to||""):to!==Fo.getValue()&&(Fo.executeEdits("",[{range:Fo.getModel().getFullModelRange(),text:to||"",forceMoveMarkers:!0}]),Fo.pushUndoStop())},[to],_o),l$4(()=>{var Fo,$o;($o=(Fo=wo.current)==null?void 0:Fo.getModel())==null||$o.original.setValue(eo||"")},[eo],_o),l$4(()=>{let{original:Fo,modified:$o}=wo.current.getModel();Co.current.editor.setModelLanguage(Fo,no||ro||"text"),Co.current.editor.setModelLanguage($o,oo||ro||"text")},[ro,no,oo],_o),l$4(()=>{var Fo;(Fo=Co.current)==null||Fo.editor.setTheme(uo)},[uo],_o),l$4(()=>{var Fo;(Fo=wo.current)==null||Fo.updateOptions(fo)},[fo],_o);let Mo=reactExports.useCallback(()=>{var Lo;if(!Co.current)return;Ro.current(Co.current);let Fo=h$4(Co.current,eo||"",no||ro||"text",io||""),$o=h$4(Co.current,to||"",oo||ro||"text",so||"");(Lo=wo.current)==null||Lo.setModel({original:Fo,modified:$o})},[ro,to,oo,eo,no,io,so]),Do=reactExports.useCallback(()=>{var Fo;!No.current&&Oo.current&&(wo.current=Co.current.editor.createDiffEditor(Oo.current,{automaticLayout:!0,...fo}),Mo(),(Fo=Co.current)==null||Fo.editor.setTheme(uo),Eo(!0),No.current=!0)},[fo,uo,Mo]);reactExports.useEffect(()=>{_o&&Ao.current(wo.current,Co.current)},[_o]),reactExports.useEffect(()=>{!So&&!_o&&Do()},[So,_o,Do]);function jo(){var $o,Lo,Ho,qo;let Fo=($o=wo.current)==null?void 0:$o.getModel();ao||((Lo=Fo==null?void 0:Fo.original)==null||Lo.dispose()),lo||((Ho=Fo==null?void 0:Fo.modified)==null||Ho.dispose()),(qo=wo.current)==null||qo.dispose()}return React.createElement(H$2,{width:po,height:ho,isEditorReady:_o,loading:co,_ref:Oo,className:go,wrapperProps:vo})}var ie$3=Oe$1;reactExports.memo(ie$3);function He$1(eo){let to=reactExports.useRef();return reactExports.useEffect(()=>{to.current=eo},[eo]),to.current}var se$1=He$1,_$6=new Map;function Ve$1({defaultValue:eo,defaultLanguage:to,defaultPath:ro,value:no,language:oo,path:io,theme:so="light",line:ao,loading:lo="Loading...",options:uo={},overrideServices:co={},saveViewState:fo=!0,keepCurrentModel:ho=!1,width:po="100%",height:go="100%",className:vo,wrapperProps:bo={},beforeMount:xo=D$3,onMount:_o=D$3,onChange:Eo,onValidate:So=D$3}){let[To,wo]=reactExports.useState(!1),[Co,Oo]=reactExports.useState(!0),Ao=reactExports.useRef(null),Ro=reactExports.useRef(null),No=reactExports.useRef(null),Mo=reactExports.useRef(_o),Do=reactExports.useRef(xo),jo=reactExports.useRef(),Fo=reactExports.useRef(no),$o=se$1(io),Lo=reactExports.useRef(!1),Ho=reactExports.useRef(!1);k$3(()=>{let Yo=loader.init();return Yo.then(Zo=>(Ao.current=Zo)&&Oo(!1)).catch(Zo=>(Zo==null?void 0:Zo.type)!=="cancelation"&&console.error("Monaco initialization: error:",Zo)),()=>Ro.current?Uo():Yo.cancel()}),l$4(()=>{var Zo,_s,Ss,As;let Yo=h$4(Ao.current,eo||no||"",to||oo||"",io||ro||"");Yo!==((Zo=Ro.current)==null?void 0:Zo.getModel())&&(fo&&_$6.set($o,(_s=Ro.current)==null?void 0:_s.saveViewState()),(Ss=Ro.current)==null||Ss.setModel(Yo),fo&&((As=Ro.current)==null||As.restoreViewState(_$6.get(io))))},[io],To),l$4(()=>{var Yo;(Yo=Ro.current)==null||Yo.updateOptions(uo)},[uo],To),l$4(()=>{!Ro.current||no===void 0||(Ro.current.getOption(Ao.current.editor.EditorOption.readOnly)?Ro.current.setValue(no):no!==Ro.current.getValue()&&(Ho.current=!0,Ro.current.executeEdits("",[{range:Ro.current.getModel().getFullModelRange(),text:no,forceMoveMarkers:!0}]),Ro.current.pushUndoStop(),Ho.current=!1))},[no],To),l$4(()=>{var Zo,_s;let Yo=(Zo=Ro.current)==null?void 0:Zo.getModel();Yo&&oo&&((_s=Ao.current)==null||_s.editor.setModelLanguage(Yo,oo))},[oo],To),l$4(()=>{var Yo;ao!==void 0&&((Yo=Ro.current)==null||Yo.revealLine(ao))},[ao],To),l$4(()=>{var Yo;(Yo=Ao.current)==null||Yo.editor.setTheme(so)},[so],To);let qo=reactExports.useCallback(()=>{var Yo;if(!(!No.current||!Ao.current)&&!Lo.current){Do.current(Ao.current);let Zo=io||ro,_s=h$4(Ao.current,no||eo||"",to||oo||"",Zo||"");Ro.current=(Yo=Ao.current)==null?void 0:Yo.editor.create(No.current,{model:_s,automaticLayout:!0,...uo},co),fo&&Ro.current.restoreViewState(_$6.get(Zo)),Ao.current.editor.setTheme(so),ao!==void 0&&Ro.current.revealLine(ao),wo(!0),Lo.current=!0}},[eo,to,ro,no,oo,io,uo,co,fo,so,ao]);reactExports.useEffect(()=>{To&&Mo.current(Ro.current,Ao.current)},[To]),reactExports.useEffect(()=>{!Co&&!To&&qo()},[Co,To,qo]),Fo.current=no,reactExports.useEffect(()=>{var Yo,Zo;To&&Eo&&((Yo=jo.current)==null||Yo.dispose(),jo.current=(Zo=Ro.current)==null?void 0:Zo.onDidChangeModelContent(_s=>{Ho.current||Eo(Ro.current.getValue(),_s)}))},[To,Eo]),reactExports.useEffect(()=>{if(To){let Yo=Ao.current.editor.onDidChangeMarkers(Zo=>{var Ss;let _s=(Ss=Ro.current.getModel())==null?void 0:Ss.uri;if(_s&&Zo.find(As=>As.path===_s.path)){let As=Ao.current.editor.getModelMarkers({resource:_s});So==null||So(As)}});return()=>{Yo==null||Yo.dispose()}}return()=>{}},[To,So]);function Uo(){var Yo,Zo;(Yo=jo.current)==null||Yo.dispose(),ho?fo&&_$6.set(io,Ro.current.saveViewState()):(Zo=Ro.current.getModel())==null||Zo.dispose(),Ro.current.dispose()}return React.createElement(H$2,{width:po,height:go,isEditorReady:To,loading:lo,_ref:No,className:vo,wrapperProps:bo})}var fe$1=Ve$1,de$1=reactExports.memo(fe$1),Ft$1=de$1;const JinjaSyntaxHighlighter=({value:eo,theme:to,onMount:ro})=>jsxRuntimeExports.jsx(Ft$1,{value:eo,theme:to,options:{readOnly:!0,minimap:{enabled:!1}},defaultLanguage:"jinja2",onMount:(no,oo)=>{oo.languages.register({id:"jinja2"}),oo.languages.setLanguageConfiguration("jinja2",{comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["{","}"]],folding:{markers:{start:/\{%\s*(block|for|if)/,end:/\{%\s*end(block|for|if)/}}}),oo.languages.setMonarchTokensProvider("jinja2",{tokenizer:{root:[[/\{\{/,"delimiter"],[/\}\}/,"delimiter"],[/\{#/,"comment"],[/#\}/,"comment"],[/\{%/,"control"],[/%\}/,"control"],[/\b(if|else|elif|endif|for|endfor|set|extends|include|block|endblock|macro|endmacro)\b/,"keyword"],[/\b(length|list|lower|upper|trim|truncate|replace|round|urlencode|urlize)\b/,"filter"],[/\b(\+|-|\*|\/|%|\*\*|\/\/)\b/,"operator"],[/\b(\d+|\d*\.\d+)\b/,"number"],[/(^user:|^# user:|^system:|^# system:|^assistant:|^# assistant:)/,"keyword"]]}}),ro==null||ro(no)}}),locStringsInjectionToken=createInjectionToken("locStrings",{}),useLocStrings=()=>{const[eo]=useInjected(locStringsInjectionToken);return eo};var BuildInEventName=(eo=>(eo.exception="exception",eo["function.inputs"]="promptflow.function.inputs",eo["function.output"]="promptflow.function.output",eo["embedding.embeddings"]="promptflow.embedding.embeddings",eo["retrieval.query"]="promptflow.retrieval.query",eo["retrieval.documents"]="promptflow.retrieval.documents",eo["llm.generated_message"]="promptflow.llm.generated_message",eo["prompt.template"]="promptflow.prompt.template",eo))(BuildInEventName||{});const EventNameToAttribute={"promptflow.function.inputs":"inputs","promptflow.function.output":"output"},safeJSONParse=eo=>{try{return JSON.parse(eo)}catch{return eo}};function formatDecimal(eo){return Math.abs(eo=Math.round(eo))>=1e21?eo.toLocaleString("en").replace(/,/g,""):eo.toString(10)}function formatDecimalParts(eo,to){if((ro=(eo=to?eo.toExponential(to-1):eo.toExponential()).indexOf("e"))<0)return null;var ro,no=eo.slice(0,ro);return[no.length>1?no[0]+no.slice(2):no,+eo.slice(ro+1)]}function exponent(eo){return eo=formatDecimalParts(Math.abs(eo)),eo?eo[1]:NaN}function formatGroup(eo,to){return function(ro,no){for(var oo=ro.length,io=[],so=0,ao=eo[0],lo=0;oo>0&&ao>0&&(lo+ao+1>no&&(ao=Math.max(1,no-lo)),io.push(ro.substring(oo-=ao,oo+ao)),!((lo+=ao+1)>no));)ao=eo[so=(so+1)%eo.length];return io.reverse().join(to)}}function formatNumerals(eo){return function(to){return to.replace(/[0-9]/g,function(ro){return eo[+ro]})}}var re$2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(eo){if(!(to=re$2.exec(eo)))throw new Error("invalid format: "+eo);var to;return new FormatSpecifier({fill:to[1],align:to[2],sign:to[3],symbol:to[4],zero:to[5],width:to[6],comma:to[7],precision:to[8]&&to[8].slice(1),trim:to[9],type:to[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(eo){this.fill=eo.fill===void 0?" ":eo.fill+"",this.align=eo.align===void 0?">":eo.align+"",this.sign=eo.sign===void 0?"-":eo.sign+"",this.symbol=eo.symbol===void 0?"":eo.symbol+"",this.zero=!!eo.zero,this.width=eo.width===void 0?void 0:+eo.width,this.comma=!!eo.comma,this.precision=eo.precision===void 0?void 0:+eo.precision,this.trim=!!eo.trim,this.type=eo.type===void 0?"":eo.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(eo){e:for(var to=eo.length,ro=1,no=-1,oo;ro0&&(no=0);break}return no>0?eo.slice(0,no)+eo.slice(oo+1):eo}var prefixExponent;function formatPrefixAuto(eo,to){var ro=formatDecimalParts(eo,to);if(!ro)return eo+"";var no=ro[0],oo=ro[1],io=oo-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(oo/3)))*3)+1,so=no.length;return io===so?no:io>so?no+new Array(io-so+1).join("0"):io>0?no.slice(0,io)+"."+no.slice(io):"0."+new Array(1-io).join("0")+formatDecimalParts(eo,Math.max(0,to+io-1))[0]}function formatRounded(eo,to){var ro=formatDecimalParts(eo,to);if(!ro)return eo+"";var no=ro[0],oo=ro[1];return oo<0?"0."+new Array(-oo).join("0")+no:no.length>oo+1?no.slice(0,oo+1)+"."+no.slice(oo+1):no+new Array(oo-no.length+2).join("0")}const formatTypes={"%":(eo,to)=>(eo*100).toFixed(to),b:eo=>Math.round(eo).toString(2),c:eo=>eo+"",d:formatDecimal,e:(eo,to)=>eo.toExponential(to),f:(eo,to)=>eo.toFixed(to),g:(eo,to)=>eo.toPrecision(to),o:eo=>Math.round(eo).toString(8),p:(eo,to)=>formatRounded(eo*100,to),r:formatRounded,s:formatPrefixAuto,X:eo=>Math.round(eo).toString(16).toUpperCase(),x:eo=>Math.round(eo).toString(16)};function identity(eo){return eo}var map=Array.prototype.map,prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale(eo){var to=eo.grouping===void 0||eo.thousands===void 0?identity:formatGroup(map.call(eo.grouping,Number),eo.thousands+""),ro=eo.currency===void 0?"":eo.currency[0]+"",no=eo.currency===void 0?"":eo.currency[1]+"",oo=eo.decimal===void 0?".":eo.decimal+"",io=eo.numerals===void 0?identity:formatNumerals(map.call(eo.numerals,String)),so=eo.percent===void 0?"%":eo.percent+"",ao=eo.minus===void 0?"−":eo.minus+"",lo=eo.nan===void 0?"NaN":eo.nan+"";function uo(fo){fo=formatSpecifier(fo);var ho=fo.fill,po=fo.align,go=fo.sign,vo=fo.symbol,bo=fo.zero,xo=fo.width,_o=fo.comma,Eo=fo.precision,So=fo.trim,To=fo.type;To==="n"?(_o=!0,To="g"):formatTypes[To]||(Eo===void 0&&(Eo=12),So=!0,To="g"),(bo||ho==="0"&&po==="=")&&(bo=!0,ho="0",po="=");var wo=vo==="$"?ro:vo==="#"&&/[boxX]/.test(To)?"0"+To.toLowerCase():"",Co=vo==="$"?no:/[%p]/.test(To)?so:"",Oo=formatTypes[To],Ao=/[defgprs%]/.test(To);Eo=Eo===void 0?6:/[gprs]/.test(To)?Math.max(1,Math.min(21,Eo)):Math.max(0,Math.min(20,Eo));function Ro(No){var Mo=wo,Do=Co,jo,Fo,$o;if(To==="c")Do=Oo(No)+Do,No="";else{No=+No;var Lo=No<0||1/No<0;if(No=isNaN(No)?lo:Oo(Math.abs(No),Eo),So&&(No=formatTrim(No)),Lo&&+No==0&&go!=="+"&&(Lo=!1),Mo=(Lo?go==="("?go:ao:go==="-"||go==="("?"":go)+Mo,Do=(To==="s"?prefixes[8+prefixExponent/3]:"")+Do+(Lo&&go==="("?")":""),Ao){for(jo=-1,Fo=No.length;++jo$o||$o>57){Do=($o===46?oo+No.slice(jo+1):No.slice(jo))+Do,No=No.slice(0,jo);break}}}_o&&!bo&&(No=to(No,1/0));var Ho=Mo.length+No.length+Do.length,qo=Ho>1)+Mo+No+Do+qo.slice(Ho);break;default:No=qo+Mo+No+Do;break}return io(No)}return Ro.toString=function(){return fo+""},Ro}function co(fo,ho){var po=uo((fo=formatSpecifier(fo),fo.type="f",fo)),go=Math.max(-8,Math.min(8,Math.floor(exponent(ho)/3)))*3,vo=Math.pow(10,-go),bo=prefixes[8+go/3];return function(xo){return po(vo*xo)+bo}}return{format:uo,formatPrefix:co}}var locale,format;defaultLocale({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale(eo){return locale=formatLocale(eo),format=locale.format,locale.formatPrefix,locale}function formatInt(eo){return Math.abs(eo)<1e6?format(",")(eo):format("0.2s")(eo)}function formatFloat(eo){const to=Math.abs(eo);return to===0?"0.00":to<.01?format(".2e")(eo):to<1e3?format("0.2f")(eo):format("0.2s")(eo)}function formatNumber$1(eo){return Number.isInteger(eo)?formatInt(eo):formatFloat(eo)}function createNumberFormatter(eo){return to=>typeof to!="number"?"--":eo(to)}const intFormatter=createNumberFormatter(formatInt),floatFormatter=createNumberFormatter(formatFloat),timeFormat=eo=>(eo&&!eo.endsWith("Z")&&(eo+="Z"),eo?new Date(eo).toLocaleString([],{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"--"),latencyFormat=eo=>eo===void 0?"N/A":eo===0?"0 ms":eo<10?formatFloat(eo)+"ms":formatFloat(eo/1e3)+"s",parseSpanOutput=eo=>{var no,oo,io;const to=(no=eo==null?void 0:eo.events)==null?void 0:no.find(so=>so.name===BuildInEventName["function.output"]),ro=((oo=to==null?void 0:to.attributes)==null?void 0:oo.payload)??((io=eo==null?void 0:eo.attributes)==null?void 0:io.output);if(typeof ro=="string")try{const so=JSON.parse(ro);if(typeof so.usage=="string")try{so.usage=JSON.parse(so.usage)}catch{so.usage={}}return so}catch{return ro}return ro},parseHttpSpanAttributes=eo=>{var no;const to=eo==null?void 0:eo.attributes;if(!to||((no=to.span_type)==null?void 0:no.toLowerCase())!=="http")return;const ro={response:{headers:{}},request:{headers:{}}};return Object.entries(to).forEach(([oo,io])=>{const so=oo.toLowerCase();if(so==="url.full"){ro.urlFull=io;return}const[ao,lo,uo,...co]=so.split(".");if(ao==="http")switch(lo){case"request":uo==="header"?ro.request.headers[co.join(".")]=io:ro.request[[uo,...co].join(".")]=io;break;case"response":uo==="header"?ro.response.headers[co.join(".")]=io:ro.response[[uo,...co].join(".")]=io;break;case"status_code":ro.status_code=io;break;case"method":ro.method=io;break;default:ro[oo.substring(5)]=io}}),ro},convertToTraceListRow=eo=>{var ro,no,oo;const to=eo.end_time&&eo.start_time?Date.parse(eo.end_time)-Date.parse(eo.start_time):0;return{...eo,latency:to,total_tokens:((ro=eo==null?void 0:eo.cumulative_token_count)==null?void 0:ro.total)??0,prompt_tokens:(no=eo==null?void 0:eo.cumulative_token_count)==null?void 0:no.prompt,completion_tokens:(oo=eo==null?void 0:eo.cumulative_token_count)==null?void 0:oo.completion}};var _a$1;const initialTableColumnNames={normalColumns:[],evaluationColumns:[]};var ViewStatus=(eo=>(eo.loading="loading",eo.loaded="loaded",eo.error="error",eo.hidden="hidden",eo))(ViewStatus||{});const rv=class rv{constructor(to){this.selectedSpanId$=new State$1(void 0),this.selectedTraceId$=new State$1(void 0),this.selectedEvaluationTraceId$=new State$1(void 0),this.spans$=new ObservableMap,this.traces$=new ObservableOrderedMap,this.tableColumnNames$=new State$1(initialTableColumnNames),this.tableHiddenColumnKeys$=new State$1([]),this.isTraceDetailOpen$=new State$1(!1),this.isGanttChartOpen$=new State$1(!1),this.traceListStatus$=new State$1("loading"),this.traceDetailStatus$=new State$1("loading"),this.traceListShowMetrics$=new State$1(!0),this.messagesBySpanId$=new ObservableOrderedMap,this.sortColumn$=new State$1(void 0),this.sortableColumns=[],this.isLazyLoadSpan=!0,this.spanEventsLoadStatus$=new ObservableMap;const{traceListConfig:ro,spanConfig:no}=to||{};ro&&(this.traceListColumnModifier=ro.columnModifier,ro.showMetrics!==void 0&&this.traceListShowMetrics$.setState(ro.showMetrics),ro.defaultHiddenColumnKeys!==void 0&&this.tableHiddenColumnKeys$.setState(ro.defaultHiddenColumnKeys),ro.sortableColumns&&(this.sortableColumns=ro.sortableColumns)),no&&(this._fetchSpanEvent=no.fetchSpanEvent,this.isLazyLoadSpan=no.isLazyLoadSpan??!0),this.selectedTrace$=Computed$1.fromStates([this.selectedTraceId$,this.traces$,this.selectedEvaluationTraceId$],([oo,io,so])=>{const ao=oo&&io.get(oo)||void 0;return ao&&ao.evaluations&&Object.values(ao.evaluations).find(uo=>uo.trace_id===so)||ao}),this.selectedTraceId$.subscribe(oo=>{var so;if(!oo)return;const io=this.traces$.get(oo);(so=this._traceDetailDidOpenCallback)==null||so.call(this,oo,io)}),this.isTraceDetailOpen$.subscribe(oo=>{var ao;const io=this.selectedTraceId$.getSnapshot(),so=this.selectedTrace$.getSnapshot();!oo&&io&&((ao=this._traceDetailDidCloseCallback)==null||ao.call(this,io,so),this.traceDetailStatus$.setState("hidden"),this.isGanttChartOpen$.setState(!1),this.selectedTraceId$.setState(void 0),this.selectedEvaluationTraceId$.next(void 0),this.spanEventsLoadStatus$.clear())}),this.sortColumn$.subscribe(oo=>{var io;(io=this._traceListSortColumnDidChangeCallback)==null||io.call(this,oo)}),this.traceDetailTitleParts$=Computed$1.fromStates([this.selectedTraceId$,this.selectedEvaluationTraceId$,this.traces$],([oo,io,so])=>{if(!oo)return[];const ao=so.get(oo),lo=ao==null?void 0:ao.evaluations,uo=[];ao!=null&&ao.name&&uo.push(ao.name);const co=Object.values(lo??{}).find(fo=>fo.trace_id===io);return co!=null&&co.name&&uo.push(co.name),uo})}traceDetailDidOpen(to){this._traceDetailDidOpenCallback=to}traceDetailDidClose(to){this._traceDetailDidCloseCallback=to}onTraceDetailCopyUrl(to){this._traceDetailCopyUrlCallback=to}traceListSortColumnDidChange(to){this._traceListSortColumnDidChangeCallback=to}onRefreshSpans(to){this._refreshSpansCallback=to}setOnRefreshTraces(to){this._refreshTracesCallback=to}traceDetailCopyUrl(){const to=this.selectedTraceId$.getSnapshot(),ro=this.selectedTrace$.getSnapshot();return to&&this._traceDetailCopyUrlCallback?(this._traceDetailCopyUrlCallback(to,ro),!0):!1}refreshSpans(){var no;const to=this.selectedTraceId$.getSnapshot(),ro=this.selectedTrace$.getSnapshot();to&&((no=this._refreshSpansCallback)==null||no.call(this,to,ro))}refreshTraces(){var to;(to=this._refreshTracesCallback)==null||to.call(this)}clear(){this.traces$.clear(),this.spans$.clear()}appendTraces(to,ro){to.forEach(no=>{no.trace_id!==void 0&&(ro?this.traces$.set(no.trace_id,no).sortByValue(ro):this.traces$.set(no.trace_id,no))})}appendSpans(to){to.forEach(ro=>{var so,ao;const no=(so=ro==null?void 0:ro.context)==null?void 0:so.trace_id,oo=(ao=ro==null?void 0:ro.context)==null?void 0:ao.span_id;if(!no||!oo)return;const io=this.spans$.get(no)||new ObservableOrderedMap;this.spans$.set(no,io.set(oo,ro))})}toggleIsGanttChartOpen(){this.isGanttChartOpen$.setState(!this.isGanttChartOpen$.getSnapshot())}getTraceById(to){return to?this.traces$.get(to):void 0}setTraceListStatus(to){this.traceListStatus$.setState(to)}setTraceDetailStatus(to){this.traceDetailStatus$.setState(to)}setTraceDetailOpen(to,ro){this.isTraceDetailOpen$.setState(to),this.selectedTraceId$.setState(to?ro:void 0)}sortTraces(to){this.traces$.sortByValue(to)}fetchSpanEvent(to){var ro;return((ro=this._fetchSpanEvent)==null?void 0:ro.call(this,to))??Promise.resolve({status:"success"})}};_a$1=SINGLETON,rv[_a$1]=!0;let TraceViewModel=rv;const TraceViewModelToken=createInjectionToken("TraceViewModel",new TraceViewModel),useLoadSpanEvents=(eo,to,ro)=>{const no=useTraceViewModel(),oo=useSpanEventsLoadStatus();return reactExports.useCallback(({onCompleted:io,forceRefresh:so})=>{var lo,uo,co,fo;if(!((lo=eo==null?void 0:eo.events)!=null&&lo.length)||!no.isLazyLoadSpan){io();return}if(ro!==void 0){const ho=(uo=eo.external_event_data_uris)==null?void 0:uo[ro];if(!ho){io();return}const po=`${(co=eo.context)==null?void 0:co.span_id}__${ho}`;if(oo.get(po)==="success"){io();return}if(!so&&oo.has(po)){io(oo.get(po)==="error"?new Error("load error"):void 0);return}no.fetchSpanEvent(ho).then(go=>{var vo;if(go.status==="error")oo.set(po,"error"),io(new Error("load error"));else{const{data:bo}=go;(vo=eo.events)!=null&&vo[ro]&&(eo.events[ro]=typeof bo=="string"?safeJSONParse(bo):bo),oo.set(po,"success"),io()}});return}const ao=`${(fo=eo.context)==null?void 0:fo.span_id}__${to}`;if(!so&&oo.has(ao)){io(oo.get(ao)==="error"?new Error("load error"):void 0);return}Promise.all(eo.events.map((ho,po)=>{var go,vo;if(ho.name===to){const bo=(go=eo.external_event_data_uris)==null?void 0:go[po];if(!bo)return Promise.resolve({status:"success"});const xo=`${(vo=eo.context)==null?void 0:vo.span_id}__${bo}`;return oo.get(xo)==="success"?Promise.resolve({status:"success"}):!so&&oo.has(xo)?Promise.resolve({status:oo.get(xo)==="error"?"error":"success"}):no.fetchSpanEvent(bo).then(_o=>{var Eo;if(_o.status==="error")oo.set(xo,"error");else{const{data:So}=_o;(Eo=eo.events)!=null&&Eo[po]&&(eo.events[po]=typeof So=="string"?safeJSONParse(So):So),oo.set(xo,"success")}return _o})}}).filter(ho=>ho!==void 0)).then(ho=>{if(ho.some(po=>(po==null?void 0:po.status)==="error")){oo.set(ao,"error"),io(new Error("load error"));return}oo.set(ao,"success"),io()})},[no,eo,to,ro,oo])},useSpanEventsWithPayload=(eo,to)=>{var ro;return((ro=eo==null?void 0:eo.events)==null?void 0:ro.filter(no=>no.name===to).map(no=>{var oo;return{...no,attributes:safeJSONParse(((oo=no.attributes)==null?void 0:oo.payload)??"")}}))??[]},useTraceViewModel=()=>{const[eo]=useInjected(TraceViewModelToken);return eo},useSelectedSpanId=()=>{const eo=useTraceViewModel();return useState(eo.selectedSpanId$)},useSelectedSpan=()=>{var io;const eo=useTraceViewModel(),to=useSelectedSpanId(),ro=useSelectedTraceId(),oo=useSelectedEvaluationTraceId()??ro;if(!(!to||!oo))return(io=eo.spans$.get(oo))==null?void 0:io.get(to)},useParentSpanOfSelectedSpan=()=>{var no;const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useSelectedSpan();if(!(!ro||!to||!ro.parent_id))return(no=eo.spans$.get(to))==null?void 0:no.get(ro.parent_id)},useSetSelectedSpanId=()=>useSetState(useTraceViewModel().selectedSpanId$),useSelectedTraceId=()=>useState(useTraceViewModel().selectedTraceId$),useSetSelectedTraceId=()=>useSetState(useTraceViewModel().selectedTraceId$),useSelectedTrace=()=>{const eo=useTraceViewModel();return useState(eo.selectedTrace$)},useSpansOfSelectedTrace=()=>{const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useSelectedEvaluationTraceId(),no=useState(eo.spans$.get(ro??to??"")??new ObservableOrderedMap);return Array.from(no.values())},useTraces=()=>{const eo=useState(useTraceViewModel().traces$);return reactExports.useMemo(()=>Array.from(eo.values()),[eo])},useTraceNavigation=()=>{const eo=useTraceViewModel(),to=useTraces(),ro=useSelectedTraceId(),no=to.findIndex(lo=>lo.trace_id===ro),oo=no>0,io=no{oo&&eo.selectedTraceId$.setState(to[no-1].trace_id)},[oo,no,to,eo]),ao=reactExports.useCallback(()=>{io&&eo.selectedTraceId$.setState(to[no+1].trace_id)},[io,no,to,eo]);return{hasPreviousTrace:oo,hasNextTrace:io,goToPreviousTrace:so,goToNextTrace:ao}},useParseTraceOutput=eo=>reactExports.useMemo(()=>parseSpanOutput(eo),[eo]),useEvaluationSpansOfSelectedSpan=()=>{const eo=useTraceViewModel(),to=[],ro=useSelectedTrace();return ro?(Object.keys(ro.evaluations??[]).forEach(no=>{var io,so;const oo=(io=ro==null?void 0:ro.evaluations)==null?void 0:io[no];if(oo){const ao=Array.from(((so=eo.spans$.get(oo.trace_id??""))==null?void 0:so.getState().values())??[]);to.push({evaluationName:oo.name??no,evaluationTraces:ao})}}),to):[]},useRootSpanIdOfSelectedSpans=()=>{const eo=useSelectedTrace();return eo==null?void 0:eo.root_span_id},useTableColumnNames=()=>useState(useTraceViewModel().tableColumnNames$),useSetTableColumnNames=()=>useSetState(useTraceViewModel().tableColumnNames$),useTableHiddenColumnKeys=()=>useState(useTraceViewModel().tableHiddenColumnKeys$),useSetTableHiddenColumnKeys=()=>useSetState(useTraceViewModel().tableHiddenColumnKeys$),useIsTraceDetailOpen=()=>useState(useTraceViewModel().isTraceDetailOpen$),useSetIsTraceDetailOpen=()=>useSetState(useTraceViewModel().isTraceDetailOpen$),useTraceDetailRefreshKey=()=>{const eo=useTraceViewModel(),to=useSelectedTraceId(),ro=useSelectedEvaluationTraceId(),no=useState(eo.spans$),oo=Array.from(useState(no.get(to??"")??new ObservableOrderedMap).keys());return`${to}-${ro}-${oo.join("-")}`},useIsGanttChartOpen=()=>useState(useTraceViewModel().isGanttChartOpen$),useTraceListColumnModifier=()=>useTraceViewModel().traceListColumnModifier,useTraceListShowMetrics=()=>useState(useTraceViewModel().traceListShowMetrics$),useMessagesBySpanId=eo=>{var go,vo,bo,xo,_o;const to=useTraceViewModel(),ro=useState(to.selectedTraceId$),no=ro?(go=to.spans$.get(ro))==null?void 0:go.get(eo):void 0,oo=useSpanEventsWithPayload(no,BuildInEventName["function.inputs"])[0],io=useSpanEventsWithPayload(no,BuildInEventName["function.output"])[0],so=useSpanEventsWithPayload(no,BuildInEventName["llm.generated_message"])[0];if(!ro)return{inputMessages:[],outputMessages:[],tools:[]};const ao=oo?oo.attributes:safeJSONParse(((vo=no==null?void 0:no.attributes)==null?void 0:vo.inputs)??"{}"),lo=io?io.attributes:safeJSONParse(((bo=no==null?void 0:no.attributes)==null?void 0:bo.output)??"{}"),uo=(xo=no==null?void 0:no.attributes)==null?void 0:xo["llm.generated_message"],co=(so==null?void 0:so.attributes)??(uo?safeJSONParse(uo):void 0),fo=(ao==null?void 0:ao.tools)??[],ho=(ao==null?void 0:ao.messages)??[];let po=[];return co?po=[co]:po=((_o=lo==null?void 0:lo.choices)==null?void 0:_o.reduce((Eo,So)=>So.message?[...Eo,{...So.message,tools:fo}]:So.text?[...Eo,{content:So.text,role:"assistant",tools:fo}]:Eo,[]))??[],{inputMessages:ho,outputMessages:po,tools:fo}},useMessagesOfSelectedSpan=()=>{const eo=useSelectedSpanId();return useMessagesBySpanId(eo??"")},useGetAllTraces=()=>{const eo=useTraceViewModel();return reactExports.useCallback(()=>Array.from(eo.traces$.getState().values()),[eo.traces$])},useGetAllSpans=()=>{const eo=useTraceViewModel();return reactExports.useCallback(()=>{const to=[];return eo.spans$.getState().forEach(no=>{no.getState().forEach(io=>{to.push(io)})}),to},[eo.spans$])},useSortColumn=()=>{const eo=useTraceViewModel();return useState(eo.sortColumn$)},useSetSortColumn=()=>useSetState(useTraceViewModel().sortColumn$),useSortableColumns=()=>useTraceViewModel().sortableColumns,useSelectedEvaluationTraceId=()=>useState(useTraceViewModel().selectedEvaluationTraceId$),useSetSelectedEvaluationTraceId=()=>useSetState(useTraceViewModel().selectedEvaluationTraceId$),useSelectedTraceTitleParts=()=>useState(useTraceViewModel().traceDetailTitleParts$),useSpanEventsLoadStatus=()=>useTraceViewModel().spanEventsLoadStatus$,StreamSwitcher=({isStreaming:eo,style:to,onIsStreamingChange:ro,labelName:no})=>{const oo=useLocStrings();return jsxRuntimeExports.jsx(Switch,{label:no||oo.Streaming,labelPosition:"before",checked:eo,onChange:(io,so)=>ro(so.checked),style:to})};var UISize=(eo=>(eo.extraSmall="extra-small",eo.small="small",eo.normal="normal",eo.large="large",eo))(UISize||{});const useUISize=eo=>{const{textSize:to,iconSize:ro,gap:no}=reactExports.useMemo(()=>{switch(eo){case UISize.extraSmall:return{textSize:200,iconSize:"12px",gap:"2px"};case UISize.small:return{textSize:300,iconSize:"16px",gap:"2px"};case UISize.large:return{textSize:500,iconSize:"26px",gap:"5px"};case UISize.normal:default:return{textSize:400,iconSize:"20px",gap:"5px"}}},[eo]);return{textSize:to,iconSize:ro,gap:no}},LatencyText=({startTimeISOString:eo,endTimeISOString:to,size:ro,tipTextSize:no})=>{const oo=useClasses$s(),io=eo?new Date(eo):void 0,so=to?new Date(to):void 0,ao=io&&so?so.getTime()-io.getTime():void 0,lo=latencyFormat(ao),{textSize:uo,iconSize:co,gap:fo}=useUISize(ro);return jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Text$2,{size:no,weight:"bold",block:!0,children:"Start Time"}),jsxRuntimeExports.jsx(Text$2,{size:no,block:!0,children:timeFormat(eo)}),jsxRuntimeExports.jsx(Text$2,{size:no,weight:"bold",block:!0,children:"End Time"}),jsxRuntimeExports.jsx(Text$2,{size:no,block:!0,children:timeFormat(to)})]}),relationship:"label",children:jsxRuntimeExports.jsxs("div",{className:oo.wrapper,style:{gap:fo},children:[jsxRuntimeExports.jsx(Clock20Regular,{style:{height:co,width:co}}),jsxRuntimeExports.jsx(Text$2,{size:uo,className:oo.text,children:lo})]})})},useClasses$s=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center"},text:{color:tokens.colorNeutralForeground3,fontWeight:600}}),MetricTag=({tag:eo})=>{const to=useClasses$r(),[ro,no]=React.useState(!0),oo=reactExports.useMemo(()=>{if(typeof eo.value=="number")return formatNumber$1(eo.value);{const io=eo.value.toString();return ro&&io.length>20?io.substring(0,20)+"...":io}},[eo.value,ro]);return jsxRuntimeExports.jsxs(Badge$2,{className:to.wrapper,size:"medium",shape:"rounded",appearance:"outline",onClick:()=>no(!ro),children:[jsxRuntimeExports.jsxs("span",{className:to.name,children:[eo.name," "]}),jsxRuntimeExports.jsx("span",{className:to.data,children:oo})]})},useClasses$r=makeStyles({wrapper:{display:"inline-flex",fontSize:"12px",cursor:"pointer",...shorthands.padding("0px","8px","1px"),...shorthands.borderColor(tokens.colorPaletteGreenBorder2),...shorthands.gap("0.5rem")},name:{color:tokens.colorPaletteGreenBorder2,fontWeight:tokens.fontWeightRegular},data:{color:tokens.colorNeutralForeground1,fontWeight:tokens.fontWeightRegular}});function TokenText({token:eo,info:to,size:ro=UISize.normal}){const no=useClasses$q(),oo=typeof eo=="number"?intFormatter(eo):eo,{textSize:io,iconSize:so,gap:ao}=useUISize(ro);return jsxRuntimeExports.jsxs("div",{className:no.wrapper,style:{gap:ao},children:[jsxRuntimeExports.jsx(NumberCircle020Regular,{style:{height:so,width:so}}),to?jsxRuntimeExports.jsx(Tooltip,{content:to,relationship:"description",children:jsxRuntimeExports.jsx(Text$2,{size:io,className:no.text,children:oo})}):jsxRuntimeExports.jsx(Text$2,{size:io,className:no.text,children:oo})]})}const useClasses$q=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},text:{color:tokens.colorNeutralForeground3,fontWeight:600}}),NodeToken=({span:eo,showDetail:to=!0,size:ro})=>{const no=useParseTraceOutput(eo);if(!no||typeof no=="string")return null;const oo=no.usage;return!oo||typeof oo=="string"||!oo.total_tokens?null:jsxRuntimeExports.jsx(TokenText,{token:oo.total_tokens,size:ro,info:to?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",rowGap:6},children:[jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Total tokens",value:oo.total_tokens??0}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Prompt tokens",value:oo.prompt_tokens??0}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Completion tokens",value:oo.completion_tokens??0}})]}):void 0})},SummaryToken=({trace:eo,showDetail:to=!0,size:ro})=>{const{total_tokens:no,prompt_tokens:oo,completion_tokens:io}=eo;return jsxRuntimeExports.jsx(TokenText,{token:no,size:ro,info:to?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",rowGap:6},children:[jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Total tokens",value:no}}),oo!==void 0&&jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Prompt tokens",value:oo}}),io!==void 0&&jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Completion tokens",value:io}})]}):void 0})};function StatusText({statusCode:eo,showText:to=!1,size:ro,tooltipContent:no}){const oo=useClasses$p(),io=useLocStrings();eo=eo||io.unknown;const{textSize:so,iconSize:ao,gap:lo}=useUISize(ro),uo=reactExports.useMemo(()=>({width:ao,height:ao}),[ao]),[co,fo]=reactExports.useMemo(()=>{switch(eo==null?void 0:eo.toLowerCase()){case"ok":case"completed":return[jsxRuntimeExports.jsx(CheckmarkCircle20Filled,{style:uo},"ok"),tokens.colorPaletteGreenForeground1];case"error":return[jsxRuntimeExports.jsx(DismissCircle20Filled,{style:uo},"error"),tokens.colorPaletteRedForeground1];case"unset":return[jsxRuntimeExports.jsx(ErrorCircle20Filled,{style:uo},"unset"),tokens.colorPaletteYellowForeground1];case"running":return[jsxRuntimeExports.jsx(ArrowClockwiseDashes20Filled,{className:oo.rotate,style:uo},"running"),tokens.colorPaletteYellowForeground1];default:return[jsxRuntimeExports.jsx(QuestionCircle20Filled,{},"unknown"),tokens.colorPaletteYellowForeground1]}},[oo.rotate,uo,eo]);return jsxRuntimeExports.jsx(Tooltip,{content:no??eo??"",relationship:"label",children:jsxRuntimeExports.jsxs("div",{className:oo.wrapper,style:{color:fo,gap:to?lo:0},children:[co,to&&jsxRuntimeExports.jsx(Text$2,{size:so,children:eo})]})})}const useClasses$p=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},rotate:{animationDuration:"2s",animationTimingFunction:"linear",animationIterationCount:"infinite",animationName:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}}),useClasses$o=makeStyles({root:{display:"flex",fontSize:tokens.fontSizeBase200,marginLeft:"8px",...shorthands.gap("8px","column")}}),TraceSystemMetrics=()=>{const eo=useSelectedTrace(),to=useClasses$o();return eo?jsxRuntimeExports.jsxs("div",{className:to.root,children:[jsxRuntimeExports.jsx(StatusText,{statusCode:eo.status,size:UISize.normal,showText:!0}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:eo.start_time,endTimeISOString:eo.end_time,size:UISize.normal}),jsxRuntimeExports.jsx(SummaryToken,{trace:convertToTraceListRow(eo),size:UISize.normal})]}):null},useClasses$n=makeStyles({title:{...shorthands.flex(1),...shorthands.padding("0"),lineHeight:"28px",fontSize:"20px",fontWeight:600},button:{fontSize:"20px",...shorthands.padding("0")}}),TraceDetailTitle=()=>{const eo=useSelectedTraceTitleParts(),to=useSetSelectedEvaluationTraceId(),ro=eo[0],no=eo[1],oo=useClasses$n();return jsxRuntimeExports.jsxs(Breadcrumb,{className:oo.title,size:"large",children:[jsxRuntimeExports.jsx(BreadcrumbItem,{children:jsxRuntimeExports.jsxs(BreadcrumbButton,{className:oo.button,onClick:()=>{to(void 0)},children:[ro,!no&&jsxRuntimeExports.jsx(TraceSystemMetrics,{})]})}),no&&jsxRuntimeExports.jsx(BreadcrumbDivider,{}),no&&jsxRuntimeExports.jsx(BreadcrumbItem,{children:jsxRuntimeExports.jsxs(BreadcrumbButton,{className:oo.button,children:[no,jsxRuntimeExports.jsx(TraceSystemMetrics,{})]})})]})},TraceDetailHeader=({setIsTraceDetailOpen:eo,showRefresh:to=!0,showGantt:ro=!1,showCopyUrl:no=!1,showStreamSwitch:oo=!1,isStreaming:io,onIsStreamingChange:so})=>{const ao=useClasses$m(),lo=useLocStrings(),uo=useTraceViewModel(),co=useIsGanttChartOpen(),[fo,ho]=React.useState("Copy URL"),po=useSelectedTrace(),go=po!=null&&po.start_time?timeFormat(po.start_time):void 0;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:ao.header,children:[jsxRuntimeExports.jsx(TraceDetailTitle,{}),go&&jsxRuntimeExports.jsxs("time",{className:ao.time,children:["Created on: ",go]}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ao.divider}),jsxRuntimeExports.jsx(TraceNavigation,{}),oo&&io!==void 0&&so!==void 0&&jsxRuntimeExports.jsx(StreamSwitcher,{style:{marginRight:"16px",marginTop:"4px"},isStreaming:io,onIsStreamingChange:so}),no?jsxRuntimeExports.jsx(Tooltip,{content:lo[`${fo}`],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Copy URL",icon:jsxRuntimeExports.jsx(SendCopy20Regular,{}),onMouseEnter:()=>{ho("Copy URL")},onClick:()=>{if(uo.traceDetailCopyUrl()){ho("Copied!");return}const vo=window.location.href;if(navigator.clipboard)navigator.clipboard.writeText(vo),ho("Copied!");else{const bo=document.createElement("textarea");bo.value=vo,document.body.appendChild(bo),bo.select();try{document.execCommand("copy"),ho("Copied!")}catch(xo){console.error("Fallback: Oops, unable to copy",xo),ho("Oops, unable to copy!")}document.body.removeChild(bo)}}})}):null,to?jsxRuntimeExports.jsx(Tooltip,{content:lo["Refresh Data"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Refresh",icon:jsxRuntimeExports.jsx(ArrowClockwise16Regular,{}),onClick:()=>uo.refreshSpans()})}):null,ro?jsxRuntimeExports.jsx(Tooltip,{content:lo[co?"Hide Gantt":"Show Gantt"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{style:{color:co?tokens.colorBrandForeground1:""},appearance:"subtle","aria-label":"Close",icon:jsxRuntimeExports.jsx(GanttChart20Regular,{}),onClick:()=>uo.toggleIsGanttChartOpen()})}):null,jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Close",icon:jsxRuntimeExports.jsx(Dismiss20Regular,{}),onClick:()=>eo(!1)})]}),jsxRuntimeExports.jsx(Divider$2,{})]})},TraceNavigation=()=>{const eo=useLocStrings(),to=useClasses$m(),{hasPreviousTrace:ro,hasNextTrace:no,goToPreviousTrace:oo,goToNextTrace:io}=useTraceNavigation();return ro||no?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:to.navigation,children:[ro&&jsxRuntimeExports.jsxs(Button$2,{icon:jsxRuntimeExports.jsx(ArrowUp20Regular,{}),onClick:oo,appearance:"subtle",children:[eo["Previous trace"]," "]}),no&&jsxRuntimeExports.jsxs(Button$2,{icon:jsxRuntimeExports.jsx(ArrowDown20Regular,{}),onClick:io,appearance:"subtle",children:[eo["Next trace"]," "]})]}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:to.divider})]}):null},useClasses$m=makeStyles({header:{display:"flex",width:"100%",boxSizing:"border-box",...shorthands.padding("12px","20px")},divider:{height:"100%",...shorthands.flex("none"),...shorthands.padding(0,tokens.spacingHorizontalM)},navigation:{display:"flex",alignItems:"center",...shorthands.gap(tokens.spacingHorizontalS)},time:{display:"flex",alignItems:"center",paddingRight:tokens.spacingHorizontalL,...shorthands.flex("0 1 auto")}}),traceDetailErrorInjectionToken=createInjectionToken("traceDetailErrorInjectionToken",()=>{const eo=useLocStrings();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:eo.Failed_to_load_trace})}),traceDetailLoadingInjectionToken=createInjectionToken("traceDetailLoadingInjectionToken",Loading),traceListErrorInjectionToken=createInjectionToken("traceListErrorInjectionToken",()=>{const eo=useLocStrings();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:eo.Failed_to_load_traces})}),traceListLoadingInjectionToken=createInjectionToken("traceListLoadingInjectionToken",Loading),useTraceListViewStatus=()=>{const eo=useTraceViewModel();return useState(eo.traceListStatus$)},useTraceDetailViewStatus=()=>{const eo=useTraceViewModel();return useState(eo.traceDetailStatus$)},useTraceListLoadingComponent=()=>{const[eo]=useInjected(traceListLoadingInjectionToken);return eo},useTraceListErrorComponent=()=>{const[eo]=useInjected(traceListErrorInjectionToken);return eo},useTraceDetailLoadingComponent=()=>{const[eo]=useInjected(traceDetailLoadingInjectionToken);return eo},useTraceDetailErrorComponent=()=>{const[eo]=useInjected(traceDetailErrorInjectionToken);return eo},TREE_NODE_HEIGHT=40,TREE_NODE_WIDTH=400,TREE_NODE_PADDING=10,TREE_NODE_INDENT=48,sortTraceByStartTimeDesc=(eo,to)=>eo.start_time&&to.start_time?Date.parse(to.start_time)-Date.parse(eo.start_time):1,sortTraceByStartTimeAsc=(eo,to)=>eo.start_time&&to.start_time?Date.parse(eo.start_time)-Date.parse(to.start_time):1,defaultGetNodeX=({level:eo})=>eo*TREE_NODE_INDENT,defaultGetNodeWidth=()=>TREE_NODE_WIDTH,defaultGetNodeHeight=()=>TREE_NODE_HEIGHT,spansToGraphModel=(eo,{isEdgesHidden:to=!1,getNodeX:ro=defaultGetNodeX,getNodeWidth:no=defaultGetNodeWidth,getNodeHeight:oo=defaultGetNodeHeight,collapsedSpanIds:io})=>{const so=[],ao=[],lo=new Map,uo=new Set,co=new Set(eo.map(po=>{var go;return(go=po.context)==null?void 0:go.span_id}).filter(po=>!!po));eo.forEach(po=>{var go,vo;(go=po.context)!=null&&go.span_id&&(po.parent_id&&co.has(po.parent_id)?lo.has(po.parent_id)?lo.get(po.parent_id).push(po):lo.set(po.parent_id,[po]):uo.add((vo=po.context)==null?void 0:vo.span_id))});const fo=eo.filter(po=>{var go,vo;return((go=po.context)==null?void 0:go.span_id)&&uo.has((vo=po.context)==null?void 0:vo.span_id)}).sort((po,go)=>Date.parse(po.start_time??"")??0-Date.parse(go.start_time??"")??0);let ho=0;return fo.sort(sortTraceByStartTimeAsc).forEach(po=>{var vo,bo;const go=[{span:po,level:0}];for(;go.length>0;){const{span:xo,level:_o}=go.pop(),Eo=oo({span:xo,level:_o,index:ho});so.push({id:((vo=xo==null?void 0:xo.context)==null?void 0:vo.span_id)??"",width:no({span:xo,level:_o,index:ho}),height:Eo,x:ro({span:xo,level:_o,index:ho}),y:ho*(Eo+TREE_NODE_PADDING),ports:[{id:"port",name:"port",position:[0,.5]}]}),ho++,(bo=xo==null?void 0:xo.context)!=null&&bo.span_id&&lo.has(xo.context.span_id)&&!(io!=null&&io.has(xo.context.span_id))&&lo.get(xo.context.span_id).sort(sortTraceByStartTimeDesc).forEach(So=>{var To,wo;!to&&((To=xo==null?void 0:xo.context)!=null&&To.span_id)&&((wo=So==null?void 0:So.context)!=null&&wo.span_id)&&ao.push({id:`${xo.context.span_id}-${So.context.span_id}`,source:xo.context.span_id,sourcePortId:"port",target:So.context.span_id,targetPortId:"port"}),go.push({span:So,level:_o+1})})}}),{graph:GraphModel.fromJSON({nodes:so,edges:ao}),rootIds:Array.from(uo.values()),parentIdLookUp:lo}},TreeViewEdge=({x1:eo,x2:to,y1:ro,y2:no,model:oo,data:io})=>{if(!io.nodes.get(oo.source)||!io.nodes.get(oo.target))return null;const lo=eo+30,uo=to+20,co=ro+10,fo=`M ${lo} ${co} L ${lo} ${no} L ${uo} ${no}`;return jsxRuntimeExports.jsx("g",{children:jsxRuntimeExports.jsx("path",{d:fo,stroke:tokens.colorNeutralStrokeAccessible,strokeWidth:1,fill:"none"})})};class EdgeConfig{render(to){return jsxRuntimeExports.jsx(TreeViewEdge,{...to})}}const GanttTreeNode=({node:eo})=>{const to=bitset.has(GraphNodeStatus.Selected)(eo.status),ro=bitset.has(GraphNodeStatus.Activated)(eo.status);let no=tokens.colorNeutralStroke1,oo=tokens.colorBrandBackground2,io=1;return to&&(no=tokens.colorBrandStroke2,io=2,oo=tokens.colorBrandBackground2Pressed),ro&&(oo=tokens.colorBrandBackground2Hover),jsxRuntimeExports.jsx("foreignObject",{x:eo.x,y:eo.y,width:eo.width,height:eo.height,style:{border:`${io}px solid ${no}`,backgroundColor:oo,borderRadius:10,paddingLeft:10},children:jsxRuntimeExports.jsx("div",{style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",cursor:"pointer"}})})};class GanttNodeConfig{constructor(to){this.options=to}render(to){const ro=this.options.spans.find(no=>{var oo;return((oo=no==null?void 0:no.context)==null?void 0:oo.span_id)===to.model.id});return ro?jsxRuntimeExports.jsx(GanttTreeNode,{node:to.model,span:ro}):null}getMinHeight(){return 0}getMinWidth(){return 0}}const GanttTimeline=({startMs:eo,endMs:to})=>{const ro=to-eo,no=Math.pow(10,Math.floor(Math.log10(ro))-1),oo=Math.ceil(ro/no),io=[],so=[];for(let ao=0;aojsxRuntimeExports.jsx("div",{style:{width:"100%",height:"100%"},children:jsxRuntimeExports.jsx(ReactDagEditor,{state:eo,dispatch:to,style:{height:"100%",flexGrow:1,display:"flex"},children:jsxRuntimeExports.jsx(Graph,{canvasMouseMode:CanvasMouseMode.Pan})})}),GanttView=()=>{var po;const eo=useSpansOfSelectedTrace(),to=useSetSelectedSpanId(),ro=useSelectedSpanId(),no=go=>(vo,bo)=>(bo&&bo.type===GraphNodeEvent.Click&&to(bo.node.id),go(vo,bo)),oo=GraphConfigBuilder.default().registerNode(()=>new GanttNodeConfig({spans:eo})).registerPort(()=>new PortConfig).registerEdge(()=>new EdgeConfig).build();previewMode.add(GraphFeatures.ClickNodeToSelect);const[so,ao]=useGraphReducer({data:GraphModel.empty(),settings:{features:previewMode,graphConfig:oo}},no),lo=((po=so.viewport.rect)==null?void 0:po.width)||1200;let uo=Number.MAX_SAFE_INTEGER,co=0;eo.forEach(go=>{const vo=Date.parse(go.start_time??"");voco&&(co=bo)});const fo=reactExports.useCallback(({span:go})=>lo/(co-uo)*(Date.parse(go.start_time??"")-uo),[co,lo,uo]),ho=reactExports.useCallback(({span:go})=>lo/(co-uo)*(Date.parse(go.end_time??"")-Date.parse(go.start_time??"")),[co,lo,uo]);return reactExports.useEffect(()=>{ao({type:GraphCanvasEvent.SetData,data:spansToGraphModel(eo,{isEdgesHidden:!0,getNodeX:fo,getNodeWidth:ho,getNodeHeight:()=>24}).graph.selectNodes(go=>go.id===ro)})},[]),reactExports.useEffect(()=>{ro&&ao({type:GraphNodeEvent.Select,nodes:[ro]})},[ro]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GanttTimeline,{startMs:uo,endMs:co}),jsxRuntimeExports.jsx(TreeGraph,{state:so,dispatch:ao})]})},useNodeDetailClasses=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},detailHeaderWrapper:{display:"flex",boxSizing:"border-box",width:"100%",...shorthands.padding("12px","12px",0,"12px"),flexDirection:"row",alignItems:"center",...shorthands.gap("12px")},detailHeaderTitle:{flexGrow:1,flexShrink:1,...shorthands.overflow("hidden"),whiteSpace:"nowrap",textOverflow:"ellipsis"},header:{display:"flex",height:"50px",boxSizing:"border-box",alignItems:"center",justifyContent:"flex-start",...shorthands.padding("6px","12px")},headerModalName:{color:tokens.colorNeutralForeground3,fontSize:"12px",fontWeight:600,lineHeight:"16px"},headerSpan:{marginRight:"10px"},headerTitle:{...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap",marginRight:"4px",...shorthands.flex(0,1,"auto")},headerDivider:{...shorthands.flex("none"),...shorthands.padding(0)},headerRight:{marginLeft:"auto",display:"flex",alignItems:"center",...shorthands.gap("12px")},tabDivider:{...shorthands.flex("none"),...shorthands.padding(0,"12px")},content:{...shorthands.flex(1),...shorthands.padding("12px"),...shorthands.overflow("auto")},panels:{...shorthands.padding(0,"10px"),"& th":{textAlign:"left",...shorthands.padding(0,"30px",0,0)}},cardWrapper:{backgroundColor:tokens.colorNeutralBackground3},cardTitle:{fontSize:"16px",fontWeight:600},innerCardWrapper:{...shorthands.padding("16px"),...shorthands.border("1px","solid",tokens.colorNeutralForeground1),...shorthands.borderRadius("8px")}}),useRetrievalNodeDetailClasses=makeStyles({accordionHeader:{"& button":{...shorthands.padding(0),fontWeight:600}}}),getSpanType=eo=>{var ro;const to=(ro=eo==null?void 0:eo.attributes)==null?void 0:ro.span_type;return to==null?void 0:to.split(".").pop()},getSpanEventPayload=(eo,to)=>{var io,so,ao,lo;const ro=(io=eo==null?void 0:eo.events)==null?void 0:io.find(uo=>uo.name===to);if(ro)return(so=ro==null?void 0:ro.attributes)!=null&&so.payload?safeJSONParse(ro.attributes.payload):void 0;const no=(ao=eo==null?void 0:eo.attributes)==null?void 0:ao[EventNameToAttribute[to]],oo=no?(lo=eo==null?void 0:eo.attributes)==null?void 0:lo[no]:void 0;return oo?safeJSONParse(oo):void 0},TraceViewThemeContext=reactExports.createContext(!1),useIsDark=()=>reactExports.useContext(TraceViewThemeContext);function isObject(eo){return Object.prototype.toString.call(eo)==="[object Object]"}function objectSize(eo){return Array.isArray(eo)?eo.length:isObject(eo)?Object.keys(eo).length:0}function stringifyForCopying(eo,to){if(typeof eo=="string")return eo;try{return JSON.stringify(eo,(ro,no)=>{switch(typeof no){case"bigint":return String(no)+"n";case"number":case"boolean":case"object":case"string":return no;default:return String(no)}},to)}catch(ro){return`${ro.name}: ${ro.message}`||"JSON.stringify failed"}}function isCollapsed(eo,to,ro,no,oo,io){if(io&&io.collapsed!==void 0)return!!io.collapsed;if(typeof no=="boolean")return no;if(typeof no=="number"&&to>no)return!0;const so=objectSize(eo);if(typeof no=="function"){const ao=safeCall(no,[{node:eo,depth:to,indexOrName:ro,size:so}]);if(typeof ao=="boolean")return ao}return!!(Array.isArray(eo)&&so>oo||isObject(eo)&&so>oo)}function isCollapsed_largeArray(eo,to,ro,no,oo,io){if(io&&io.collapsed!==void 0)return!!io.collapsed;if(typeof no=="boolean")return no;if(typeof no=="number"&&to>no)return!0;const so=Math.ceil(eo.length/100);if(typeof no=="function"){const ao=safeCall(no,[{node:eo,depth:to,indexOrName:ro,size:so}]);if(typeof ao=="boolean")return ao}return!!(Array.isArray(eo)&&so>oo||isObject(eo)&&so>oo)}function ifDisplay(eo,to,ro){return typeof eo=="boolean"?eo:!!(typeof eo=="number"&&to>eo||eo==="collapsed"&&ro||eo==="expanded"&&!ro)}function safeCall(eo,to){try{return eo(...to)}catch(ro){reportError(ro)}}function editableAdd(eo){if(eo===!0||isObject(eo)&&eo.add===!0)return!0}function editableEdit(eo){if(eo===!0||isObject(eo)&&eo.edit===!0)return!0}function editableDelete(eo){if(eo===!0||isObject(eo)&&eo.delete===!0)return!0}function isReactComponent(eo){return typeof eo=="function"}function customAdd(eo){return!eo||eo.add===void 0||!!eo.add}function customEdit(eo){return!eo||eo.edit===void 0||!!eo.edit}function customDelete(eo){return!eo||eo.delete===void 0||!!eo.delete}function customCopy(eo){return!eo||eo.enableClipboard===void 0||!!eo.enableClipboard}function customMatchesURL(eo){return!eo||eo.matchesURL===void 0||!!eo.matchesURL}function resolveEvalFailedNewValue(eo,to){return eo==="string"?to.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):to}var _path$8;function _extends$8(){return _extends$8=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{oo.stopPropagation();const io=to(eo);typeof io=="string"&&io&&navigator.clipboard.writeText(io),no(!0),setTimeout(()=>no(!1),3e3)},className:"json-view--copy"})}function NameValue({indexOrName:eo,value:to,depth:ro,parent:no,deleteHandle:oo,editHandle:io}){return jsxRuntimeExports.jsxs("div",Object.assign({className:"json-view--pair"},{children:[jsxRuntimeExports.jsx("span",Object.assign({className:typeof eo=="number"?"json-view--index":"json-view--property"},{children:eo})),":"," ",jsxRuntimeExports.jsx(JsonNode,{node:to,depth:ro+1,deleteHandle:oo,editHandle:io,parent:no,indexOrName:eo})]}))}var _path$5,_path2$4;function _extends$5(){return _extends$5=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{eo[_o]=Eo,uo&&uo({newValue:Eo,oldValue:So,depth:ro,src:lo,indexOrName:_o,parentType:"array"}),co&&co({type:"edit",depth:ro,src:lo,indexOrName:_o,parentType:"array"}),fo()},[to,uo,co,fo]),bo=_o=>{eo.splice(_o,1),fo()},xo=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!po&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>go(!0),className:"jv-size-chevron"},{children:[ifDisplay(ho,ro,po)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(to)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),!po&&ao&&customCopy(io)&&jsxRuntimeExports.jsx(CopyButton$1,{node:to})]});return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"["}),xo,po?jsxRuntimeExports.jsxs("button",Object.assign({onClick:()=>go(!1),className:"jv-button"},{children:[so," ... ",so+to.length-1]})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:to.map((_o,Eo)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Eo+so,value:_o,depth:ro,parent:to,deleteHandle:bo,editHandle:vo},String(no)+String(Eo)))})),jsxRuntimeExports.jsx("span",{children:"]"})]})}function LargeArray({node:eo,depth:to,deleteHandle:ro,indexOrName:no,customOptions:oo}){const io=[];for(let Mo=0;Mo{_o(isCollapsed_largeArray(eo,to,no,so,lo,oo))},[so,lo]);const[Eo,So]=reactExports.useState(!1),To=()=>{So(!1),ro&&ro(no),co&&co({value:eo,depth:to,src:fo,indexOrName:no,parentType:"array"}),go&&go({type:"delete",depth:to,src:fo,indexOrName:no,parentType:"array"})},[wo,Co]=reactExports.useState(!1),Oo=()=>{const Mo=eo;Mo.push(null),ho&&ho({indexOrName:Mo.length-1,depth:to,src:fo,parentType:"array"}),go&&go({type:"add",indexOrName:Mo.length-1,depth:to,src:fo,parentType:"array"}),vo()},Ao=Eo||wo,Ro=()=>{So(!1),Co(!1)},No=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!xo&&!Ao&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>_o(!0),className:"jv-size-chevron"},{children:[ifDisplay(bo,to,xo)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[eo.length," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),Ao&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:wo?Oo:To}),Ao&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:Ro}),!xo&&!Ao&&ao&&customCopy(oo)&&jsxRuntimeExports.jsx(CopyButton$1,{node:eo}),!xo&&!Ao&&editableAdd(uo)&&customAdd(oo)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{Oo()}}),!xo&&!Ao&&editableDelete(uo)&&customDelete(oo)&&ro&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>So(!0)})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),No,xo?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>_o(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:io.map((Mo,Do)=>jsxRuntimeExports.jsx(LargeArrayNode,{originNode:eo,node:Mo,depth:to,index:Do,startIndex:Do*100},String(no)+String(Do)))})),jsxRuntimeExports.jsx("span",{children:"]"}),xo&&ifDisplay(bo,to,xo)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>_o(!1),className:"jv-size"},{children:[eo.length," Items"]}))]})}function ObjectNode({node:eo,depth:to,indexOrName:ro,deleteHandle:no,customOptions:oo}){const{collapsed:io,enableClipboard:so,ignoreLargeArray:ao,collapseObjectsAfterLength:lo,editable:uo,onDelete:co,src:fo,onAdd:ho,onEdit:po,onChange:go,forceUpdate:vo,displaySize:bo}=reactExports.useContext(JsonViewContext);if(!ao&&Array.isArray(eo)&&eo.length>100)return jsxRuntimeExports.jsx(LargeArray,{node:eo,depth:to,indexOrName:ro,deleteHandle:no,customOptions:oo});const xo=isObject(eo),[_o,Eo]=reactExports.useState(isCollapsed(eo,to,ro,io,lo,oo));reactExports.useEffect(()=>{Eo(isCollapsed(eo,to,ro,io,lo,oo))},[io,lo]);const So=reactExports.useCallback((Lo,Ho,qo)=>{Array.isArray(eo)?eo[+Lo]=Ho:eo&&(eo[Lo]=Ho),po&&po({newValue:Ho,oldValue:qo,depth:to,src:fo,indexOrName:Lo,parentType:xo?"object":"array"}),go&&go({type:"edit",depth:to,src:fo,indexOrName:Lo,parentType:xo?"object":"array"}),vo()},[eo,po,go,vo]),To=Lo=>{Array.isArray(eo)?eo.splice(+Lo,1):eo&&delete eo[Lo],vo()},[wo,Co]=reactExports.useState(!1),Oo=()=>{Co(!1),no&&no(ro),co&&co({value:eo,depth:to,src:fo,indexOrName:ro,parentType:xo?"object":"array"}),go&&go({type:"delete",depth:to,src:fo,indexOrName:ro,parentType:xo?"object":"array"})},[Ao,Ro]=reactExports.useState(!1),No=reactExports.useRef(null),Mo=()=>{var Lo;if(xo){const Ho=(Lo=No.current)===null||Lo===void 0?void 0:Lo.value;Ho&&(eo[Ho]=null,No.current&&(No.current.value=""),Ro(!1),ho&&ho({indexOrName:Ho,depth:to,src:fo,parentType:"object"}),go&&go({type:"add",indexOrName:Ho,depth:to,src:fo,parentType:"object"}))}else if(Array.isArray(eo)){const Ho=eo;Ho.push(null),ho&&ho({indexOrName:Ho.length-1,depth:to,src:fo,parentType:"array"}),go&&go({type:"add",indexOrName:Ho.length-1,depth:to,src:fo,parentType:"array"})}vo()},Do=Lo=>{Lo.key==="Enter"?(Lo.preventDefault(),Mo()):Lo.key==="Escape"&&Fo()},jo=wo||Ao,Fo=()=>{Co(!1),Ro(!1)},$o=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!_o&&!jo&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!0),className:"jv-size-chevron"},{children:[ifDisplay(bo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(eo)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),Ao&&xo&&jsxRuntimeExports.jsx("input",{className:"json-view--input",placeholder:"property",ref:No,onKeyDown:Do}),jo&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:Ao?Mo:Oo}),jo&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:Fo}),!_o&&!jo&&so&&customCopy(oo)&&jsxRuntimeExports.jsx(CopyButton$1,{node:eo}),!_o&&!jo&&editableAdd(uo)&&customAdd(oo)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{xo?(Ro(!0),setTimeout(()=>{var Lo;return(Lo=No.current)===null||Lo===void 0?void 0:Lo.focus()})):Mo()}}),!_o&&!jo&&editableDelete(uo)&&customDelete(oo)&&no&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>Co(!0)})]});return Array.isArray(eo)?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),$o,_o?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>Eo(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:eo.map((Lo,Ho)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Ho,value:Lo,depth:to,parent:eo,deleteHandle:To,editHandle:So},String(ro)+String(Ho)))})),jsxRuntimeExports.jsx("span",{children:"]"}),_o&&ifDisplay(bo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!1),className:"jv-size"},{children:[objectSize(eo)," Items"]}))]}):xo?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),$o,_o?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>Eo(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(eo).map(([Lo,Ho])=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Lo,value:Ho,depth:to,parent:eo,deleteHandle:To,editHandle:So},String(ro)+String(Lo)))})),jsxRuntimeExports.jsx("span",{children:"}"}),_o&&ifDisplay(bo,to,_o)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>Eo(!1),className:"jv-size"},{children:[objectSize(eo)," Items"]}))]}):null}const LongString=React.forwardRef(({str:eo,className:to,ctrlClick:ro},no)=>{let{collapseStringMode:oo,collapseStringsAfterLength:io,customizeCollapseStringUI:so}=reactExports.useContext(JsonViewContext);const[ao,lo]=reactExports.useState(!0),uo=reactExports.useRef(null);io=io>0?io:0;const co=eo.replace(/\s+/g," "),fo=typeof so=="function"?so(co,ao):typeof so=="string"?so:"...",ho=po=>{var go;if((po.ctrlKey||po.metaKey)&&ro)ro(po);else{const vo=window.getSelection();if(vo&&vo.anchorOffset!==vo.focusOffset&&((go=vo.anchorNode)===null||go===void 0?void 0:go.parentElement)===uo.current)return;lo(!ao)}};if(eo.length<=io)return jsxRuntimeExports.jsxs("span",Object.assign({ref:uo,className:to,onClick:ro},{children:['"',eo,'"']}));if(oo==="address")return eo.length<=10?jsxRuntimeExports.jsxs("span",Object.assign({ref:uo,className:to,onClick:ro},{children:['"',eo,'"']})):jsxRuntimeExports.jsxs("span",Object.assign({ref:uo,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[co.slice(0,6),fo,co.slice(-4)]:eo,'"']}));if(oo==="directly")return jsxRuntimeExports.jsxs("span",Object.assign({ref:uo,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[co.slice(0,io),fo]:eo,'"']}));if(oo==="word"){let po=io,go=io+1,vo=co,bo=1;for(;;){if(/\W/.test(eo[po])){vo=eo.slice(0,po);break}if(/\W/.test(eo[go])){vo=eo.slice(0,go);break}if(bo===6){vo=eo.slice(0,io);break}bo++,po--,go++}return jsxRuntimeExports.jsxs("span",Object.assign({ref:uo,onClick:ho,className:to+" cursor-pointer"},{children:['"',ao?[vo,fo]:eo,'"']}))}return jsxRuntimeExports.jsxs("span",Object.assign({ref:uo,className:to},{children:['"',eo,'"']}))});var _path$1;function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{setEditing(!0),setTimeout(()=>{var eo,to;(eo=window.getSelection())===null||eo===void 0||eo.selectAllChildren(valueRef.current),(to=valueRef.current)===null||to===void 0||to.focus()})},done=reactExports.useCallback(()=>{let newValue=valueRef.current.innerText;try{(newValue==="{}"||newValue==="[]")&&(newValue=`(${newValue})`);const evalValue=eval(newValue);editHandle&&editHandle(indexOrName,evalValue,node)}catch(eo){const to=resolveEvalFailedNewValue(type,newValue);editHandle&&editHandle(indexOrName,to,node)}setEditing(!1)},[editHandle]),cancel=()=>{setEditing(!1),setDeleting(!1)},deleteHandle=()=>{setDeleting(!1),_deleteHandle&&_deleteHandle(indexOrName),onDelete&&onDelete({value:node,depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object"}),onChange&&onChange({depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object",type:"delete"})},handleKeyDown=reactExports.useCallback(eo=>{eo.key==="Enter"?(eo.preventDefault(),done()):eo.key==="Escape"&&cancel()},[done]),isEditing=editing||deleting,ctrlClick=!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle?eo=>{(eo.ctrlKey||eo.metaKey)&&edit()}:void 0,Icons=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[isEditing&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:deleting?deleteHandle:done}),isEditing&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:cancel}),!isEditing&&enableClipboard&&customCopy(customReturn)&&jsxRuntimeExports.jsx(CopyButton$1,{node}),!isEditing&&matchesURL&&type==="string"&&urlRegExp.test(node)&&customMatchesURL(customReturn)&&jsxRuntimeExports.jsx("a",Object.assign({href:node,target:"_blank",className:"json-view--link"},{children:jsxRuntimeExports.jsx(SvgLink,{})})),!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle&&jsxRuntimeExports.jsx(SvgEdit,{className:"json-view--edit",onClick:edit}),!isEditing&&editableDelete(editable)&&customDelete(customReturn)&&_deleteHandle&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>setDeleting(!0)})]});let className="json-view--string";switch(typeof(customReturn==null?void 0:customReturn.className)=="string"&&(className+=" "+customReturn.className),type){case"number":case"bigint":className="json-view--number";break;case"boolean":className="json-view--boolean";break;case"object":className="json-view--null";break}deleting&&(className+=" json-view--deleting");let displayValue=String(node);type==="bigint"&&(displayValue+="n");const EditingElement=reactExports.useMemo(()=>jsxRuntimeExports.jsx("span",{contentEditable:!0,className,dangerouslySetInnerHTML:{__html:type==="string"?`"${displayValue}"`:displayValue},ref:valueRef,onKeyDown:handleKeyDown}),[displayValue,type,handleKeyDown]);return type==="string"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:node.length>collapseStringsAfterLength?jsxRuntimeExports.jsx(LongString,{str:node,ref:valueRef,className,ctrlClick}):jsxRuntimeExports.jsxs("span",Object.assign({className,onClick:ctrlClick},{children:['"',displayValue,'"']})),Icons]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:jsxRuntimeExports.jsx("span",Object.assign({className,onClick:ctrlClick},{children:displayValue})),Icons]})}}const defaultURLRegExp=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,JsonViewContext=reactExports.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,matchesURL:!1,urlRegExp:defaultURLRegExp,ignoreLargeArray:!1});function JsonView({src:eo,collapseStringsAfterLength:to=99,collapseStringMode:ro="directly",customizeCollapseStringUI:no,collapseObjectsAfterLength:oo=99,collapsed:io,enableClipboard:so=!0,editable:ao=!1,onEdit:lo,onDelete:uo,onAdd:co,onChange:fo,dark:ho=!1,theme:po="default",customizeNode:go,customizeCopy:vo=stringifyForCopying,displaySize:bo,style:xo,className:_o,matchesURL:Eo=!1,urlRegExp:So=defaultURLRegExp,ignoreLargeArray:To=!1}){const[wo,Co]=reactExports.useState(0),Oo=reactExports.useCallback(()=>Co(No=>++No),[]),[Ao,Ro]=reactExports.useState(eo);return reactExports.useEffect(()=>Ro(eo),[eo]),jsxRuntimeExports.jsx(JsonViewContext.Provider,Object.assign({value:{src:Ao,collapseStringsAfterLength:to,collapseStringMode:ro,customizeCollapseStringUI:no,collapseObjectsAfterLength:oo,collapsed:io,enableClipboard:so,editable:ao,onEdit:lo,onDelete:uo,onAdd:co,onChange:fo,forceUpdate:Oo,customizeNode:go,customizeCopy:vo,displaySize:bo,matchesURL:Eo,urlRegExp:So,ignoreLargeArray:To}},{children:jsxRuntimeExports.jsx("code",Object.assign({className:"json-view"+(ho?" dark":"")+(po&&po!=="default"?" json-view_"+po:"")+(_o?" "+_o:""),style:xo},{children:jsxRuntimeExports.jsx(JsonNode,{node:Ao,depth:1,editHandle:(No,Mo,Do)=>{Ro(Mo),lo&&lo({newValue:Mo,oldValue:Do,depth:1,src:Ao,indexOrName:No,parentType:null}),fo&&fo({type:"edit",depth:1,src:Ao,indexOrName:No,parentType:null})},deleteHandle:()=>{Ro(void 0),uo&&uo({value:Ao,depth:1,src:Ao,indexOrName:"",parentType:null}),fo&&fo({depth:1,src:Ao,indexOrName:"",parentType:null,type:"delete"})}})}))}))}const JsonViewer=eo=>{const{useCustomCollapse:to=!0,...ro}=eo;return jsxRuntimeExports.jsx(JsonView,{customizeCollapseStringUI:to?()=>jsxRuntimeExports.jsx(ExpandButton,{}):void 0,...ro})},ExpandButton=()=>{const eo=useClasses$l();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["...",jsxRuntimeExports.jsxs("div",{className:eo.btn,children:[jsxRuntimeExports.jsx(ChevronDown16Regular,{className:eo.icon}),jsxRuntimeExports.jsx("span",{className:eo.text,children:"view all"})]})]})},useClasses$l=makeStyles({btn:{display:"inline-flex",pointer:"cursor",alignItems:"center",...shorthands.padding(0),paddingLeft:"4px",...shorthands.margin(0),fontWeight:400,color:"#A3BEE9"},icon:{height:"12px",width:"12px",...shorthands.padding(0),...shorthands.margin(0)},text:{fontSize:"12px",...shorthands.padding(0),...shorthands.margin(0)}}),JsonNodeCard=({title:eo,src:to,wrapperStyle:ro={},status:no=ViewStatus.loaded,errorTip:oo=null,jsonViewerProps:io={}})=>{let so="";if(typeof to=="string")try{so=JSON.parse(to)}catch{so=to}else typeof to=="object"&&(so=to);const ao=useIsDark();return jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12,...ro},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:eo})})}),no===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),no===ViewStatus.loaded&&jsxRuntimeExports.jsx(JsonViewer,{src:so,theme:"vscode",dark:ao,...io}),no===ViewStatus.error&&oo]})},DefaultNodeInfo=()=>{var go,vo,bo,xo;const eo=useSelectedSpan(),to=(go=getSpanType(eo))==null?void 0:go.toLocaleLowerCase(),ro=useLocStrings(),[no,oo]=reactExports.useState(ViewStatus.loading),[io,so]=reactExports.useState(ViewStatus.loading),ao=useSpanEventsWithPayload(eo,BuildInEventName["function.inputs"]),lo=useSpanEventsWithPayload(eo,BuildInEventName["llm.generated_message"]),uo=useLoadSpanEvents(eo,BuildInEventName["function.inputs"]),co=useLoadSpanEvents(eo,BuildInEventName["llm.generated_message"]);let fo=useSpanEventsWithPayload(eo,BuildInEventName["function.output"]),ho=useLoadSpanEvents(eo,BuildInEventName["function.output"]);to==="llm"&&fo.length===0&&(fo=lo,ho=co);let po=(vo=eo==null?void 0:eo.attributes)==null?void 0:vo.output;return to==="llm"&&(po=po??((bo=eo==null?void 0:eo.attributes)==null?void 0:bo["llm.generated_message"])),reactExports.useEffect(()=>{uo({onCompleted:_o=>{oo(_o?ViewStatus.error:ViewStatus.loaded)}}),ho({onCompleted:_o=>{so(_o?ViewStatus.error:ViewStatus.loaded)}})},[]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ao.length>0?jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Input,status:no,src:ao.length===1?ao[0].attributes:ao,errorTip:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{oo(ViewStatus.loading),uo({onCompleted:_o=>{oo(_o?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Input,src:(xo=eo==null?void 0:eo.attributes)==null?void 0:xo.inputs}),fo.length>0?jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Output,status:io,src:fo.length===1?fo[0].attributes:fo,errorTip:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{so(ViewStatus.loading),ho({onCompleted:_o=>{so(_o?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Output,src:po})]})},DefaultNodeLoadError=({onRetry:eo})=>{const to=useLocStrings();return jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",icon:jsxRuntimeExports.jsx(ErrorCircle16Filled,{style:{color:tokens.colorStatusDangerForeground1}}),style:{fontWeight:400},onClick:eo,children:to["Failed to load, click to try again"]})},BlockquoteType="blockquote",BreakType="break",CodeType="code",DefinitionType="definition",DeleteType="delete",EmphasisType="emphasis",HeadingType="heading",HtmlType="html";var HtmlContentType;(function(eo){eo.CDATA="cdata",eo.Closing="closing",eo.Comment="comment",eo.Declaration="declaration",eo.Instruction="instruction",eo.Open="open"})(HtmlContentType||(HtmlContentType={}));const ImageReferenceType="imageReference",ImageType$1="image",InlineCodeType="inlineCode",LinkReferenceType="linkReference",LinkType="link",ListItemType="listItem";var TaskStatus;(function(eo){eo.TODO="todo",eo.DOING="doing",eo.DONE="done"})(TaskStatus||(TaskStatus={}));const ListType="list",ParagraphType$1="paragraph",StrongType="strong",TableType="table",TextType$1="text",ThematicBreakType="thematicBreak";var AsciiCodePoint;(function(eo){eo[eo.NUL=0]="NUL",eo[eo.SOH=1]="SOH",eo[eo.STX=2]="STX",eo[eo.ETX=3]="ETX",eo[eo.EOT=4]="EOT",eo[eo.ENQ=5]="ENQ",eo[eo.ACK=6]="ACK",eo[eo.BEL=7]="BEL",eo[eo.BS=8]="BS",eo[eo.HT=9]="HT",eo[eo.LF=10]="LF",eo[eo.VT=11]="VT",eo[eo.FF=12]="FF",eo[eo.CR=13]="CR",eo[eo.SO=14]="SO",eo[eo.SI=15]="SI",eo[eo.DLE=16]="DLE",eo[eo.DC1=17]="DC1",eo[eo.DC2=18]="DC2",eo[eo.DC3=19]="DC3",eo[eo.DC4=20]="DC4",eo[eo.NAK=21]="NAK",eo[eo.SYN=22]="SYN",eo[eo.ETB=23]="ETB",eo[eo.CAN=24]="CAN",eo[eo.EM=25]="EM",eo[eo.SUB=26]="SUB",eo[eo.ESC=27]="ESC",eo[eo.FS=28]="FS",eo[eo.GS=29]="GS",eo[eo.RS=30]="RS",eo[eo.US=31]="US",eo[eo.SPACE=32]="SPACE",eo[eo.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",eo[eo.DOUBLE_QUOTE=34]="DOUBLE_QUOTE",eo[eo.NUMBER_SIGN=35]="NUMBER_SIGN",eo[eo.DOLLAR_SIGN=36]="DOLLAR_SIGN",eo[eo.PERCENT_SIGN=37]="PERCENT_SIGN",eo[eo.AMPERSAND=38]="AMPERSAND",eo[eo.SINGLE_QUOTE=39]="SINGLE_QUOTE",eo[eo.OPEN_PARENTHESIS=40]="OPEN_PARENTHESIS",eo[eo.CLOSE_PARENTHESIS=41]="CLOSE_PARENTHESIS",eo[eo.ASTERISK=42]="ASTERISK",eo[eo.PLUS_SIGN=43]="PLUS_SIGN",eo[eo.COMMA=44]="COMMA",eo[eo.MINUS_SIGN=45]="MINUS_SIGN",eo[eo.DOT=46]="DOT",eo[eo.SLASH=47]="SLASH",eo[eo.DIGIT0=48]="DIGIT0",eo[eo.DIGIT1=49]="DIGIT1",eo[eo.DIGIT2=50]="DIGIT2",eo[eo.DIGIT3=51]="DIGIT3",eo[eo.DIGIT4=52]="DIGIT4",eo[eo.DIGIT5=53]="DIGIT5",eo[eo.DIGIT6=54]="DIGIT6",eo[eo.DIGIT7=55]="DIGIT7",eo[eo.DIGIT8=56]="DIGIT8",eo[eo.DIGIT9=57]="DIGIT9",eo[eo.COLON=58]="COLON",eo[eo.SEMICOLON=59]="SEMICOLON",eo[eo.OPEN_ANGLE=60]="OPEN_ANGLE",eo[eo.EQUALS_SIGN=61]="EQUALS_SIGN",eo[eo.CLOSE_ANGLE=62]="CLOSE_ANGLE",eo[eo.QUESTION_MARK=63]="QUESTION_MARK",eo[eo.AT_SIGN=64]="AT_SIGN",eo[eo.UPPERCASE_A=65]="UPPERCASE_A",eo[eo.UPPERCASE_B=66]="UPPERCASE_B",eo[eo.UPPERCASE_C=67]="UPPERCASE_C",eo[eo.UPPERCASE_D=68]="UPPERCASE_D",eo[eo.UPPERCASE_E=69]="UPPERCASE_E",eo[eo.UPPERCASE_F=70]="UPPERCASE_F",eo[eo.UPPERCASE_G=71]="UPPERCASE_G",eo[eo.UPPERCASE_H=72]="UPPERCASE_H",eo[eo.UPPERCASE_I=73]="UPPERCASE_I",eo[eo.UPPERCASE_J=74]="UPPERCASE_J",eo[eo.UPPERCASE_K=75]="UPPERCASE_K",eo[eo.UPPERCASE_L=76]="UPPERCASE_L",eo[eo.UPPERCASE_M=77]="UPPERCASE_M",eo[eo.UPPERCASE_N=78]="UPPERCASE_N",eo[eo.UPPERCASE_O=79]="UPPERCASE_O",eo[eo.UPPERCASE_P=80]="UPPERCASE_P",eo[eo.UPPERCASE_Q=81]="UPPERCASE_Q",eo[eo.UPPERCASE_R=82]="UPPERCASE_R",eo[eo.UPPERCASE_S=83]="UPPERCASE_S",eo[eo.UPPERCASE_T=84]="UPPERCASE_T",eo[eo.UPPERCASE_U=85]="UPPERCASE_U",eo[eo.UPPERCASE_V=86]="UPPERCASE_V",eo[eo.UPPERCASE_W=87]="UPPERCASE_W",eo[eo.UPPERCASE_X=88]="UPPERCASE_X",eo[eo.UPPERCASE_Y=89]="UPPERCASE_Y",eo[eo.UPPERCASE_Z=90]="UPPERCASE_Z",eo[eo.OPEN_BRACKET=91]="OPEN_BRACKET",eo[eo.BACKSLASH=92]="BACKSLASH",eo[eo.CLOSE_BRACKET=93]="CLOSE_BRACKET",eo[eo.CARET=94]="CARET",eo[eo.UNDERSCORE=95]="UNDERSCORE",eo[eo.BACKTICK=96]="BACKTICK",eo[eo.LOWERCASE_A=97]="LOWERCASE_A",eo[eo.LOWERCASE_B=98]="LOWERCASE_B",eo[eo.LOWERCASE_C=99]="LOWERCASE_C",eo[eo.LOWERCASE_D=100]="LOWERCASE_D",eo[eo.LOWERCASE_E=101]="LOWERCASE_E",eo[eo.LOWERCASE_F=102]="LOWERCASE_F",eo[eo.LOWERCASE_G=103]="LOWERCASE_G",eo[eo.LOWERCASE_H=104]="LOWERCASE_H",eo[eo.LOWERCASE_I=105]="LOWERCASE_I",eo[eo.LOWERCASE_J=106]="LOWERCASE_J",eo[eo.LOWERCASE_K=107]="LOWERCASE_K",eo[eo.LOWERCASE_L=108]="LOWERCASE_L",eo[eo.LOWERCASE_M=109]="LOWERCASE_M",eo[eo.LOWERCASE_N=110]="LOWERCASE_N",eo[eo.LOWERCASE_O=111]="LOWERCASE_O",eo[eo.LOWERCASE_P=112]="LOWERCASE_P",eo[eo.LOWERCASE_Q=113]="LOWERCASE_Q",eo[eo.LOWERCASE_R=114]="LOWERCASE_R",eo[eo.LOWERCASE_S=115]="LOWERCASE_S",eo[eo.LOWERCASE_T=116]="LOWERCASE_T",eo[eo.LOWERCASE_U=117]="LOWERCASE_U",eo[eo.LOWERCASE_V=118]="LOWERCASE_V",eo[eo.LOWERCASE_W=119]="LOWERCASE_W",eo[eo.LOWERCASE_X=120]="LOWERCASE_X",eo[eo.LOWERCASE_Y=121]="LOWERCASE_Y",eo[eo.LOWERCASE_Z=122]="LOWERCASE_Z",eo[eo.OPEN_BRACE=123]="OPEN_BRACE",eo[eo.VERTICAL_SLASH=124]="VERTICAL_SLASH",eo[eo.CLOSE_BRACE=125]="CLOSE_BRACE",eo[eo.TILDE=126]="TILDE",eo[eo.DELETE=127]="DELETE"})(AsciiCodePoint||(AsciiCodePoint={}));const foldingCaseCodeMap={µ:"μ",À:"à",Á:"á",Â:"â",Ã:"ã",Ä:"ä",Å:"å",Æ:"æ",Ç:"ç",È:"è",É:"é",Ê:"ê",Ë:"ë",Ì:"ì",Í:"í",Î:"î",Ï:"ï",Ð:"ð",Ñ:"ñ",Ò:"ò",Ó:"ó",Ô:"ô",Õ:"õ",Ö:"ö",Ø:"ø",Ù:"ù",Ú:"ú",Û:"û",Ü:"ü",Ý:"ý",Þ:"þ",Ā:"ā",Ă:"ă",Ą:"ą",Ć:"ć",Ĉ:"ĉ",Ċ:"ċ",Č:"č",Ď:"ď",Đ:"đ",Ē:"ē",Ĕ:"ĕ",Ė:"ė",Ę:"ę",Ě:"ě",Ĝ:"ĝ",Ğ:"ğ",Ġ:"ġ",Ģ:"ģ",Ĥ:"ĥ",Ħ:"ħ",Ĩ:"ĩ",Ī:"ī",Ĭ:"ĭ",Į:"į",IJ:"ij",Ĵ:"ĵ",Ķ:"ķ",Ĺ:"ĺ",Ļ:"ļ",Ľ:"ľ",Ŀ:"ŀ",Ł:"ł",Ń:"ń",Ņ:"ņ",Ň:"ň",Ŋ:"ŋ",Ō:"ō",Ŏ:"ŏ",Ő:"ő",Œ:"œ",Ŕ:"ŕ",Ŗ:"ŗ",Ř:"ř",Ś:"ś",Ŝ:"ŝ",Ş:"ş",Š:"š",Ţ:"ţ",Ť:"ť",Ŧ:"ŧ",Ũ:"ũ",Ū:"ū",Ŭ:"ŭ",Ů:"ů",Ű:"ű",Ų:"ų",Ŵ:"ŵ",Ŷ:"ŷ",Ÿ:"ÿ",Ź:"ź",Ż:"ż",Ž:"ž",ſ:"s",Ɓ:"ɓ",Ƃ:"ƃ",Ƅ:"ƅ",Ɔ:"ɔ",Ƈ:"ƈ",Ɖ:"ɖ",Ɗ:"ɗ",Ƌ:"ƌ",Ǝ:"ǝ",Ə:"ə",Ɛ:"ɛ",Ƒ:"ƒ",Ɠ:"ɠ",Ɣ:"ɣ",Ɩ:"ɩ",Ɨ:"ɨ",Ƙ:"ƙ",Ɯ:"ɯ",Ɲ:"ɲ",Ɵ:"ɵ",Ơ:"ơ",Ƣ:"ƣ",Ƥ:"ƥ",Ʀ:"ʀ",Ƨ:"ƨ",Ʃ:"ʃ",Ƭ:"ƭ",Ʈ:"ʈ",Ư:"ư",Ʊ:"ʊ",Ʋ:"ʋ",Ƴ:"ƴ",Ƶ:"ƶ",Ʒ:"ʒ",Ƹ:"ƹ",Ƽ:"ƽ",DŽ:"dž",Dž:"dž",LJ:"lj",Lj:"lj",NJ:"nj",Nj:"nj",Ǎ:"ǎ",Ǐ:"ǐ",Ǒ:"ǒ",Ǔ:"ǔ",Ǖ:"ǖ",Ǘ:"ǘ",Ǚ:"ǚ",Ǜ:"ǜ",Ǟ:"ǟ",Ǡ:"ǡ",Ǣ:"ǣ",Ǥ:"ǥ",Ǧ:"ǧ",Ǩ:"ǩ",Ǫ:"ǫ",Ǭ:"ǭ",Ǯ:"ǯ",DZ:"dz",Dz:"dz",Ǵ:"ǵ",Ƕ:"ƕ",Ƿ:"ƿ",Ǹ:"ǹ",Ǻ:"ǻ",Ǽ:"ǽ",Ǿ:"ǿ",Ȁ:"ȁ",Ȃ:"ȃ",Ȅ:"ȅ",Ȇ:"ȇ",Ȉ:"ȉ",Ȋ:"ȋ",Ȍ:"ȍ",Ȏ:"ȏ",Ȑ:"ȑ",Ȓ:"ȓ",Ȕ:"ȕ",Ȗ:"ȗ",Ș:"ș",Ț:"ț",Ȝ:"ȝ",Ȟ:"ȟ","Ƞ":"ƞ",Ȣ:"ȣ",Ȥ:"ȥ",Ȧ:"ȧ",Ȩ:"ȩ",Ȫ:"ȫ",Ȭ:"ȭ",Ȯ:"ȯ",Ȱ:"ȱ",Ȳ:"ȳ","Ⱥ":"ⱥ","Ȼ":"ȼ","Ƚ":"ƚ","Ⱦ":"ⱦ","Ɂ":"ɂ","Ƀ":"ƀ","Ʉ":"ʉ","Ʌ":"ʌ","Ɇ":"ɇ","Ɉ":"ɉ","Ɋ":"ɋ","Ɍ":"ɍ","Ɏ":"ɏ","ͅ":"ι","Ͱ":"ͱ","Ͳ":"ͳ","Ͷ":"ͷ","Ϳ":"ϳ",Ά:"ά",Έ:"έ",Ή:"ή",Ί:"ί",Ό:"ό",Ύ:"ύ",Ώ:"ώ",Α:"α",Β:"β",Γ:"γ",Δ:"δ",Ε:"ε",Ζ:"ζ",Η:"η",Θ:"θ",Ι:"ι",Κ:"κ",Λ:"λ",Μ:"μ",Ν:"ν",Ξ:"ξ",Ο:"ο",Π:"π",Ρ:"ρ",Σ:"σ",Τ:"τ",Υ:"υ",Φ:"φ",Χ:"χ",Ψ:"ψ",Ω:"ω",Ϊ:"ϊ",Ϋ:"ϋ",ς:"σ","Ϗ":"ϗ",ϐ:"β",ϑ:"θ",ϕ:"φ",ϖ:"π","Ϙ":"ϙ",Ϛ:"ϛ",Ϝ:"ϝ",Ϟ:"ϟ",Ϡ:"ϡ",Ϣ:"ϣ",Ϥ:"ϥ",Ϧ:"ϧ",Ϩ:"ϩ",Ϫ:"ϫ",Ϭ:"ϭ",Ϯ:"ϯ",ϰ:"κ",ϱ:"ρ","ϴ":"θ","ϵ":"ε","Ϸ":"ϸ","Ϲ":"ϲ","Ϻ":"ϻ","Ͻ":"ͻ","Ͼ":"ͼ","Ͽ":"ͽ",Ѐ:"ѐ",Ё:"ё",Ђ:"ђ",Ѓ:"ѓ",Є:"є",Ѕ:"ѕ",І:"і",Ї:"ї",Ј:"ј",Љ:"љ",Њ:"њ",Ћ:"ћ",Ќ:"ќ",Ѝ:"ѝ",Ў:"ў",Џ:"џ",А:"а",Б:"б",В:"в",Г:"г",Д:"д",Е:"е",Ж:"ж",З:"з",И:"и",Й:"й",К:"к",Л:"л",М:"м",Н:"н",О:"о",П:"п",Р:"р",С:"с",Т:"т",У:"у",Ф:"ф",Х:"х",Ц:"ц",Ч:"ч",Ш:"ш",Щ:"щ",Ъ:"ъ",Ы:"ы",Ь:"ь",Э:"э",Ю:"ю",Я:"я",Ѡ:"ѡ",Ѣ:"ѣ",Ѥ:"ѥ",Ѧ:"ѧ",Ѩ:"ѩ",Ѫ:"ѫ",Ѭ:"ѭ",Ѯ:"ѯ",Ѱ:"ѱ",Ѳ:"ѳ",Ѵ:"ѵ",Ѷ:"ѷ",Ѹ:"ѹ",Ѻ:"ѻ",Ѽ:"ѽ",Ѿ:"ѿ",Ҁ:"ҁ","Ҋ":"ҋ",Ҍ:"ҍ",Ҏ:"ҏ",Ґ:"ґ",Ғ:"ғ",Ҕ:"ҕ",Җ:"җ",Ҙ:"ҙ",Қ:"қ",Ҝ:"ҝ",Ҟ:"ҟ",Ҡ:"ҡ",Ң:"ң",Ҥ:"ҥ",Ҧ:"ҧ",Ҩ:"ҩ",Ҫ:"ҫ",Ҭ:"ҭ",Ү:"ү",Ұ:"ұ",Ҳ:"ҳ",Ҵ:"ҵ",Ҷ:"ҷ",Ҹ:"ҹ",Һ:"һ",Ҽ:"ҽ",Ҿ:"ҿ",Ӏ:"ӏ",Ӂ:"ӂ",Ӄ:"ӄ","Ӆ":"ӆ",Ӈ:"ӈ","Ӊ":"ӊ",Ӌ:"ӌ","Ӎ":"ӎ",Ӑ:"ӑ",Ӓ:"ӓ",Ӕ:"ӕ",Ӗ:"ӗ",Ә:"ә",Ӛ:"ӛ",Ӝ:"ӝ",Ӟ:"ӟ",Ӡ:"ӡ",Ӣ:"ӣ",Ӥ:"ӥ",Ӧ:"ӧ",Ө:"ө",Ӫ:"ӫ",Ӭ:"ӭ",Ӯ:"ӯ",Ӱ:"ӱ",Ӳ:"ӳ",Ӵ:"ӵ","Ӷ":"ӷ",Ӹ:"ӹ","Ӻ":"ӻ","Ӽ":"ӽ","Ӿ":"ӿ","Ԁ":"ԁ","Ԃ":"ԃ","Ԅ":"ԅ","Ԇ":"ԇ","Ԉ":"ԉ","Ԋ":"ԋ","Ԍ":"ԍ","Ԏ":"ԏ","Ԑ":"ԑ","Ԓ":"ԓ","Ԕ":"ԕ","Ԗ":"ԗ","Ԙ":"ԙ","Ԛ":"ԛ","Ԝ":"ԝ","Ԟ":"ԟ","Ԡ":"ԡ","Ԣ":"ԣ","Ԥ":"ԥ","Ԧ":"ԧ","Ԩ":"ԩ","Ԫ":"ԫ","Ԭ":"ԭ","Ԯ":"ԯ",Ա:"ա",Բ:"բ",Գ:"գ",Դ:"դ",Ե:"ե",Զ:"զ",Է:"է",Ը:"ը",Թ:"թ",Ժ:"ժ",Ի:"ի",Լ:"լ",Խ:"խ",Ծ:"ծ",Կ:"կ",Հ:"հ",Ձ:"ձ",Ղ:"ղ",Ճ:"ճ",Մ:"մ",Յ:"յ",Ն:"ն",Շ:"շ",Ո:"ո",Չ:"չ",Պ:"պ",Ջ:"ջ",Ռ:"ռ",Ս:"ս",Վ:"վ",Տ:"տ",Ր:"ր",Ց:"ց",Ւ:"ւ",Փ:"փ",Ք:"ք",Օ:"օ",Ֆ:"ֆ",Ⴀ:"ⴀ",Ⴁ:"ⴁ",Ⴂ:"ⴂ",Ⴃ:"ⴃ",Ⴄ:"ⴄ",Ⴅ:"ⴅ",Ⴆ:"ⴆ",Ⴇ:"ⴇ",Ⴈ:"ⴈ",Ⴉ:"ⴉ",Ⴊ:"ⴊ",Ⴋ:"ⴋ",Ⴌ:"ⴌ",Ⴍ:"ⴍ",Ⴎ:"ⴎ",Ⴏ:"ⴏ",Ⴐ:"ⴐ",Ⴑ:"ⴑ",Ⴒ:"ⴒ",Ⴓ:"ⴓ",Ⴔ:"ⴔ",Ⴕ:"ⴕ",Ⴖ:"ⴖ",Ⴗ:"ⴗ",Ⴘ:"ⴘ",Ⴙ:"ⴙ",Ⴚ:"ⴚ",Ⴛ:"ⴛ",Ⴜ:"ⴜ",Ⴝ:"ⴝ",Ⴞ:"ⴞ",Ⴟ:"ⴟ",Ⴠ:"ⴠ",Ⴡ:"ⴡ",Ⴢ:"ⴢ",Ⴣ:"ⴣ",Ⴤ:"ⴤ",Ⴥ:"ⴥ","Ⴧ":"ⴧ","Ⴭ":"ⴭ",Ḁ:"ḁ",Ḃ:"ḃ",Ḅ:"ḅ",Ḇ:"ḇ",Ḉ:"ḉ",Ḋ:"ḋ",Ḍ:"ḍ",Ḏ:"ḏ",Ḑ:"ḑ",Ḓ:"ḓ",Ḕ:"ḕ",Ḗ:"ḗ",Ḙ:"ḙ",Ḛ:"ḛ",Ḝ:"ḝ",Ḟ:"ḟ",Ḡ:"ḡ",Ḣ:"ḣ",Ḥ:"ḥ",Ḧ:"ḧ",Ḩ:"ḩ",Ḫ:"ḫ",Ḭ:"ḭ",Ḯ:"ḯ",Ḱ:"ḱ",Ḳ:"ḳ",Ḵ:"ḵ",Ḷ:"ḷ",Ḹ:"ḹ",Ḻ:"ḻ",Ḽ:"ḽ",Ḿ:"ḿ",Ṁ:"ṁ",Ṃ:"ṃ",Ṅ:"ṅ",Ṇ:"ṇ",Ṉ:"ṉ",Ṋ:"ṋ",Ṍ:"ṍ",Ṏ:"ṏ",Ṑ:"ṑ",Ṓ:"ṓ",Ṕ:"ṕ",Ṗ:"ṗ",Ṙ:"ṙ",Ṛ:"ṛ",Ṝ:"ṝ",Ṟ:"ṟ",Ṡ:"ṡ",Ṣ:"ṣ",Ṥ:"ṥ",Ṧ:"ṧ",Ṩ:"ṩ",Ṫ:"ṫ",Ṭ:"ṭ",Ṯ:"ṯ",Ṱ:"ṱ",Ṳ:"ṳ",Ṵ:"ṵ",Ṷ:"ṷ",Ṹ:"ṹ",Ṻ:"ṻ",Ṽ:"ṽ",Ṿ:"ṿ",Ẁ:"ẁ",Ẃ:"ẃ",Ẅ:"ẅ",Ẇ:"ẇ",Ẉ:"ẉ",Ẋ:"ẋ",Ẍ:"ẍ",Ẏ:"ẏ",Ẑ:"ẑ",Ẓ:"ẓ",Ẕ:"ẕ",ẛ:"ṡ",Ạ:"ạ",Ả:"ả",Ấ:"ấ",Ầ:"ầ",Ẩ:"ẩ",Ẫ:"ẫ",Ậ:"ậ",Ắ:"ắ",Ằ:"ằ",Ẳ:"ẳ",Ẵ:"ẵ",Ặ:"ặ",Ẹ:"ẹ",Ẻ:"ẻ",Ẽ:"ẽ",Ế:"ế",Ề:"ề",Ể:"ể",Ễ:"ễ",Ệ:"ệ",Ỉ:"ỉ",Ị:"ị",Ọ:"ọ",Ỏ:"ỏ",Ố:"ố",Ồ:"ồ",Ổ:"ổ",Ỗ:"ỗ",Ộ:"ộ",Ớ:"ớ",Ờ:"ờ",Ở:"ở",Ỡ:"ỡ",Ợ:"ợ",Ụ:"ụ",Ủ:"ủ",Ứ:"ứ",Ừ:"ừ",Ử:"ử",Ữ:"ữ",Ự:"ự",Ỳ:"ỳ",Ỵ:"ỵ",Ỷ:"ỷ",Ỹ:"ỹ","Ỻ":"ỻ","Ỽ":"ỽ","Ỿ":"ỿ",Ἀ:"ἀ",Ἁ:"ἁ",Ἂ:"ἂ",Ἃ:"ἃ",Ἄ:"ἄ",Ἅ:"ἅ",Ἆ:"ἆ",Ἇ:"ἇ",Ἐ:"ἐ",Ἑ:"ἑ",Ἒ:"ἒ",Ἓ:"ἓ",Ἔ:"ἔ",Ἕ:"ἕ",Ἠ:"ἠ",Ἡ:"ἡ",Ἢ:"ἢ",Ἣ:"ἣ",Ἤ:"ἤ",Ἥ:"ἥ",Ἦ:"ἦ",Ἧ:"ἧ",Ἰ:"ἰ",Ἱ:"ἱ",Ἲ:"ἲ",Ἳ:"ἳ",Ἴ:"ἴ",Ἵ:"ἵ",Ἶ:"ἶ",Ἷ:"ἷ",Ὀ:"ὀ",Ὁ:"ὁ",Ὂ:"ὂ",Ὃ:"ὃ",Ὄ:"ὄ",Ὅ:"ὅ",Ὑ:"ὑ",Ὓ:"ὓ",Ὕ:"ὕ",Ὗ:"ὗ",Ὠ:"ὠ",Ὡ:"ὡ",Ὢ:"ὢ",Ὣ:"ὣ",Ὤ:"ὤ",Ὥ:"ὥ",Ὦ:"ὦ",Ὧ:"ὧ",Ᾰ:"ᾰ",Ᾱ:"ᾱ",Ὰ:"ὰ",Ά:"ά",ι:"ι",Ὲ:"ὲ",Έ:"έ",Ὴ:"ὴ",Ή:"ή",Ῐ:"ῐ",Ῑ:"ῑ",Ὶ:"ὶ",Ί:"ί",Ῠ:"ῠ",Ῡ:"ῡ",Ὺ:"ὺ",Ύ:"ύ",Ῥ:"ῥ",Ὸ:"ὸ",Ό:"ό",Ὼ:"ὼ",Ώ:"ώ",Ω:"ω",K:"k",Å:"å","Ⅎ":"ⅎ","Ⅰ":"ⅰ","Ⅱ":"ⅱ","Ⅲ":"ⅲ","Ⅳ":"ⅳ","Ⅴ":"ⅴ","Ⅵ":"ⅵ","Ⅶ":"ⅶ","Ⅷ":"ⅷ","Ⅸ":"ⅸ","Ⅹ":"ⅹ","Ⅺ":"ⅺ","Ⅻ":"ⅻ","Ⅼ":"ⅼ","Ⅽ":"ⅽ","Ⅾ":"ⅾ","Ⅿ":"ⅿ","Ↄ":"ↄ","Ⓐ":"ⓐ","Ⓑ":"ⓑ","Ⓒ":"ⓒ","Ⓓ":"ⓓ","Ⓔ":"ⓔ","Ⓕ":"ⓕ","Ⓖ":"ⓖ","Ⓗ":"ⓗ","Ⓘ":"ⓘ","Ⓙ":"ⓙ","Ⓚ":"ⓚ","Ⓛ":"ⓛ","Ⓜ":"ⓜ","Ⓝ":"ⓝ","Ⓞ":"ⓞ","Ⓟ":"ⓟ","Ⓠ":"ⓠ","Ⓡ":"ⓡ","Ⓢ":"ⓢ","Ⓣ":"ⓣ","Ⓤ":"ⓤ","Ⓥ":"ⓥ","Ⓦ":"ⓦ","Ⓧ":"ⓧ","Ⓨ":"ⓨ","Ⓩ":"ⓩ","Ⰰ":"ⰰ","Ⰱ":"ⰱ","Ⰲ":"ⰲ","Ⰳ":"ⰳ","Ⰴ":"ⰴ","Ⰵ":"ⰵ","Ⰶ":"ⰶ","Ⰷ":"ⰷ","Ⰸ":"ⰸ","Ⰹ":"ⰹ","Ⰺ":"ⰺ","Ⰻ":"ⰻ","Ⰼ":"ⰼ","Ⰽ":"ⰽ","Ⰾ":"ⰾ","Ⰿ":"ⰿ","Ⱀ":"ⱀ","Ⱁ":"ⱁ","Ⱂ":"ⱂ","Ⱃ":"ⱃ","Ⱄ":"ⱄ","Ⱅ":"ⱅ","Ⱆ":"ⱆ","Ⱇ":"ⱇ","Ⱈ":"ⱈ","Ⱉ":"ⱉ","Ⱊ":"ⱊ","Ⱋ":"ⱋ","Ⱌ":"ⱌ","Ⱍ":"ⱍ","Ⱎ":"ⱎ","Ⱏ":"ⱏ","Ⱐ":"ⱐ","Ⱑ":"ⱑ","Ⱒ":"ⱒ","Ⱓ":"ⱓ","Ⱔ":"ⱔ","Ⱕ":"ⱕ","Ⱖ":"ⱖ","Ⱗ":"ⱗ","Ⱘ":"ⱘ","Ⱙ":"ⱙ","Ⱚ":"ⱚ","Ⱛ":"ⱛ","Ⱜ":"ⱜ","Ⱝ":"ⱝ","Ⱞ":"ⱞ","Ⱡ":"ⱡ","Ɫ":"ɫ","Ᵽ":"ᵽ","Ɽ":"ɽ","Ⱨ":"ⱨ","Ⱪ":"ⱪ","Ⱬ":"ⱬ","Ɑ":"ɑ","Ɱ":"ɱ","Ɐ":"ɐ","Ɒ":"ɒ","Ⱳ":"ⱳ","Ⱶ":"ⱶ","Ȿ":"ȿ","Ɀ":"ɀ","Ⲁ":"ⲁ","Ⲃ":"ⲃ","Ⲅ":"ⲅ","Ⲇ":"ⲇ","Ⲉ":"ⲉ","Ⲋ":"ⲋ","Ⲍ":"ⲍ","Ⲏ":"ⲏ","Ⲑ":"ⲑ","Ⲓ":"ⲓ","Ⲕ":"ⲕ","Ⲗ":"ⲗ","Ⲙ":"ⲙ","Ⲛ":"ⲛ","Ⲝ":"ⲝ","Ⲟ":"ⲟ","Ⲡ":"ⲡ","Ⲣ":"ⲣ","Ⲥ":"ⲥ","Ⲧ":"ⲧ","Ⲩ":"ⲩ","Ⲫ":"ⲫ","Ⲭ":"ⲭ","Ⲯ":"ⲯ","Ⲱ":"ⲱ","Ⲳ":"ⲳ","Ⲵ":"ⲵ","Ⲷ":"ⲷ","Ⲹ":"ⲹ","Ⲻ":"ⲻ","Ⲽ":"ⲽ","Ⲿ":"ⲿ","Ⳁ":"ⳁ","Ⳃ":"ⳃ","Ⳅ":"ⳅ","Ⳇ":"ⳇ","Ⳉ":"ⳉ","Ⳋ":"ⳋ","Ⳍ":"ⳍ","Ⳏ":"ⳏ","Ⳑ":"ⳑ","Ⳓ":"ⳓ","Ⳕ":"ⳕ","Ⳗ":"ⳗ","Ⳙ":"ⳙ","Ⳛ":"ⳛ","Ⳝ":"ⳝ","Ⳟ":"ⳟ","Ⳡ":"ⳡ","Ⳣ":"ⳣ","Ⳬ":"ⳬ","Ⳮ":"ⳮ","Ⳳ":"ⳳ","Ꙁ":"ꙁ","Ꙃ":"ꙃ","Ꙅ":"ꙅ","Ꙇ":"ꙇ","Ꙉ":"ꙉ","Ꙋ":"ꙋ","Ꙍ":"ꙍ","Ꙏ":"ꙏ","Ꙑ":"ꙑ","Ꙓ":"ꙓ","Ꙕ":"ꙕ","Ꙗ":"ꙗ","Ꙙ":"ꙙ","Ꙛ":"ꙛ","Ꙝ":"ꙝ","Ꙟ":"ꙟ","Ꙡ":"ꙡ","Ꙣ":"ꙣ","Ꙥ":"ꙥ","Ꙧ":"ꙧ","Ꙩ":"ꙩ","Ꙫ":"ꙫ","Ꙭ":"ꙭ","Ꚁ":"ꚁ","Ꚃ":"ꚃ","Ꚅ":"ꚅ","Ꚇ":"ꚇ","Ꚉ":"ꚉ","Ꚋ":"ꚋ","Ꚍ":"ꚍ","Ꚏ":"ꚏ","Ꚑ":"ꚑ","Ꚓ":"ꚓ","Ꚕ":"ꚕ","Ꚗ":"ꚗ","Ꚙ":"ꚙ","Ꚛ":"ꚛ","Ꜣ":"ꜣ","Ꜥ":"ꜥ","Ꜧ":"ꜧ","Ꜩ":"ꜩ","Ꜫ":"ꜫ","Ꜭ":"ꜭ","Ꜯ":"ꜯ","Ꜳ":"ꜳ","Ꜵ":"ꜵ","Ꜷ":"ꜷ","Ꜹ":"ꜹ","Ꜻ":"ꜻ","Ꜽ":"ꜽ","Ꜿ":"ꜿ","Ꝁ":"ꝁ","Ꝃ":"ꝃ","Ꝅ":"ꝅ","Ꝇ":"ꝇ","Ꝉ":"ꝉ","Ꝋ":"ꝋ","Ꝍ":"ꝍ","Ꝏ":"ꝏ","Ꝑ":"ꝑ","Ꝓ":"ꝓ","Ꝕ":"ꝕ","Ꝗ":"ꝗ","Ꝙ":"ꝙ","Ꝛ":"ꝛ","Ꝝ":"ꝝ","Ꝟ":"ꝟ","Ꝡ":"ꝡ","Ꝣ":"ꝣ","Ꝥ":"ꝥ","Ꝧ":"ꝧ","Ꝩ":"ꝩ","Ꝫ":"ꝫ","Ꝭ":"ꝭ","Ꝯ":"ꝯ","Ꝺ":"ꝺ","Ꝼ":"ꝼ","Ᵹ":"ᵹ","Ꝿ":"ꝿ","Ꞁ":"ꞁ","Ꞃ":"ꞃ","Ꞅ":"ꞅ","Ꞇ":"ꞇ","Ꞌ":"ꞌ","Ɥ":"ɥ","Ꞑ":"ꞑ","Ꞓ":"ꞓ","Ꞗ":"ꞗ","Ꞙ":"ꞙ","Ꞛ":"ꞛ","Ꞝ":"ꞝ","Ꞟ":"ꞟ","Ꞡ":"ꞡ","Ꞣ":"ꞣ","Ꞥ":"ꞥ","Ꞧ":"ꞧ","Ꞩ":"ꞩ","Ɦ":"ɦ","Ɜ":"ɜ","Ɡ":"ɡ","Ɬ":"ɬ","Ʞ":"ʞ","Ʇ":"ʇ",A:"a",B:"b",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",J:"j",K:"k",L:"l",M:"m",N:"n",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",U:"u",V:"v",W:"w",X:"x",Y:"y",Z:"z","𐐀":"𐐨","𐐁":"𐐩","𐐂":"𐐪","𐐃":"𐐫","𐐄":"𐐬","𐐅":"𐐭","𐐆":"𐐮","𐐇":"𐐯","𐐈":"𐐰","𐐉":"𐐱","𐐊":"𐐲","𐐋":"𐐳","𐐌":"𐐴","𐐍":"𐐵","𐐎":"𐐶","𐐏":"𐐷","𐐐":"𐐸","𐐑":"𐐹","𐐒":"𐐺","𐐓":"𐐻","𐐔":"𐐼","𐐕":"𐐽","𐐖":"𐐾","𐐗":"𐐿","𐐘":"𐑀","𐐙":"𐑁","𐐚":"𐑂","𐐛":"𐑃","𐐜":"𐑄","𐐝":"𐑅","𐐞":"𐑆","𐐟":"𐑇","𐐠":"𐑈","𐐡":"𐑉","𐐢":"𐑊","𐐣":"𐑋","𐐤":"𐑌","𐐥":"𐑍","𐐦":"𐑎","𐐧":"𐑏","𑢠":"𑣀","𑢡":"𑣁","𑢢":"𑣂","𑢣":"𑣃","𑢤":"𑣄","𑢥":"𑣅","𑢦":"𑣆","𑢧":"𑣇","𑢨":"𑣈","𑢩":"𑣉","𑢪":"𑣊","𑢫":"𑣋","𑢬":"𑣌","𑢭":"𑣍","𑢮":"𑣎","𑢯":"𑣏","𑢰":"𑣐","𑢱":"𑣑","𑢲":"𑣒","𑢳":"𑣓","𑢴":"𑣔","𑢵":"𑣕","𑢶":"𑣖","𑢷":"𑣗","𑢸":"𑣘","𑢹":"𑣙","𑢺":"𑣚","𑢻":"𑣛","𑢼":"𑣜","𑢽":"𑣝","𑢾":"𑣞","𑢿":"𑣟",ß:"ss",İ:"i̇",ʼn:"ʼn",ǰ:"ǰ",ΐ:"ΐ",ΰ:"ΰ",և:"եւ",ẖ:"ẖ",ẗ:"ẗ",ẘ:"ẘ",ẙ:"ẙ",ẚ:"aʾ","ẞ":"ss",ὐ:"ὐ",ὒ:"ὒ",ὔ:"ὔ",ὖ:"ὖ",ᾀ:"ἀι",ᾁ:"ἁι",ᾂ:"ἂι",ᾃ:"ἃι",ᾄ:"ἄι",ᾅ:"ἅι",ᾆ:"ἆι",ᾇ:"ἇι",ᾈ:"ἀι",ᾉ:"ἁι",ᾊ:"ἂι",ᾋ:"ἃι",ᾌ:"ἄι",ᾍ:"ἅι",ᾎ:"ἆι",ᾏ:"ἇι",ᾐ:"ἠι",ᾑ:"ἡι",ᾒ:"ἢι",ᾓ:"ἣι",ᾔ:"ἤι",ᾕ:"ἥι",ᾖ:"ἦι",ᾗ:"ἧι",ᾘ:"ἠι",ᾙ:"ἡι",ᾚ:"ἢι",ᾛ:"ἣι",ᾜ:"ἤι",ᾝ:"ἥι",ᾞ:"ἦι",ᾟ:"ἧι",ᾠ:"ὠι",ᾡ:"ὡι",ᾢ:"ὢι",ᾣ:"ὣι",ᾤ:"ὤι",ᾥ:"ὥι",ᾦ:"ὦι",ᾧ:"ὧι",ᾨ:"ὠι",ᾩ:"ὡι",ᾪ:"ὢι",ᾫ:"ὣι",ᾬ:"ὤι",ᾭ:"ὥι",ᾮ:"ὦι",ᾯ:"ὧι",ᾲ:"ὰι",ᾳ:"αι",ᾴ:"άι",ᾶ:"ᾶ",ᾷ:"ᾶι",ᾼ:"αι",ῂ:"ὴι",ῃ:"ηι",ῄ:"ήι",ῆ:"ῆ",ῇ:"ῆι",ῌ:"ηι",ῒ:"ῒ",ΐ:"ΐ",ῖ:"ῖ",ῗ:"ῗ",ῢ:"ῢ",ΰ:"ΰ",ῤ:"ῤ",ῦ:"ῦ",ῧ:"ῧ",ῲ:"ὼι",ῳ:"ωι",ῴ:"ώι",ῶ:"ῶ",ῷ:"ῶι",ῼ:"ωι",ff:"ff",fi:"fi",fl:"fl",ffi:"ffi",ffl:"ffl",ſt:"st",st:"st",ﬓ:"մն",ﬔ:"մե",ﬕ:"մի",ﬖ:"վն",ﬗ:"մխ"},entityReferences=[{key:[65,69,108,105,103,59],value:"Æ"},{key:[65,77,80,59],value:"&"},{key:[65,97,99,117,116,101,59],value:"Á"},{key:[65,98,114,101,118,101,59],value:"Ă"},{key:[65,99,105,114,99,59],value:"Â"},{key:[65,99,121,59],value:"А"},{key:[65,102,114,59],value:"𝔄"},{key:[65,103,114,97,118,101,59],value:"À"},{key:[65,108,112,104,97,59],value:"Α"},{key:[65,109,97,99,114,59],value:"Ā"},{key:[65,110,100,59],value:"⩓"},{key:[65,111,103,111,110,59],value:"Ą"},{key:[65,111,112,102,59],value:"𝔸"},{key:[65,112,112,108,121,70,117,110,99,116,105,111,110,59],value:"⁡"},{key:[65,114,105,110,103,59],value:"Å"},{key:[65,115,99,114,59],value:"𝒜"},{key:[65,115,115,105,103,110,59],value:"≔"},{key:[65,116,105,108,100,101,59],value:"Ã"},{key:[65,117,109,108,59],value:"Ä"},{key:[66,97,99,107,115,108,97,115,104,59],value:"∖"},{key:[66,97,114,118,59],value:"⫧"},{key:[66,97,114,119,101,100,59],value:"⌆"},{key:[66,99,121,59],value:"Б"},{key:[66,101,99,97,117,115,101,59],value:"∵"},{key:[66,101,114,110,111,117,108,108,105,115,59],value:"ℬ"},{key:[66,101,116,97,59],value:"Β"},{key:[66,102,114,59],value:"𝔅"},{key:[66,111,112,102,59],value:"𝔹"},{key:[66,114,101,118,101,59],value:"˘"},{key:[66,115,99,114,59],value:"ℬ"},{key:[66,117,109,112,101,113,59],value:"≎"},{key:[67,72,99,121,59],value:"Ч"},{key:[67,79,80,89,59],value:"©"},{key:[67,97,99,117,116,101,59],value:"Ć"},{key:[67,97,112,59],value:"⋒"},{key:[67,97,112,105,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59],value:"ⅅ"},{key:[67,97,121,108,101,121,115,59],value:"ℭ"},{key:[67,99,97,114,111,110,59],value:"Č"},{key:[67,99,101,100,105,108,59],value:"Ç"},{key:[67,99,105,114,99,59],value:"Ĉ"},{key:[67,99,111,110,105,110,116,59],value:"∰"},{key:[67,100,111,116,59],value:"Ċ"},{key:[67,101,100,105,108,108,97,59],value:"¸"},{key:[67,101,110,116,101,114,68,111,116,59],value:"·"},{key:[67,102,114,59],value:"ℭ"},{key:[67,104,105,59],value:"Χ"},{key:[67,105,114,99,108,101,68,111,116,59],value:"⊙"},{key:[67,105,114,99,108,101,77,105,110,117,115,59],value:"⊖"},{key:[67,105,114,99,108,101,80,108,117,115,59],value:"⊕"},{key:[67,105,114,99,108,101,84,105,109,101,115,59],value:"⊗"},{key:[67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∲"},{key:[67,108,111,115,101,67,117,114,108,121,68,111,117,98,108,101,81,117,111,116,101,59],value:"”"},{key:[67,108,111,115,101,67,117,114,108,121,81,117,111,116,101,59],value:"’"},{key:[67,111,108,111,110,59],value:"∷"},{key:[67,111,108,111,110,101,59],value:"⩴"},{key:[67,111,110,103,114,117,101,110,116,59],value:"≡"},{key:[67,111,110,105,110,116,59],value:"∯"},{key:[67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∮"},{key:[67,111,112,102,59],value:"ℂ"},{key:[67,111,112,114,111,100,117,99,116,59],value:"∐"},{key:[67,111,117,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∳"},{key:[67,114,111,115,115,59],value:"⨯"},{key:[67,115,99,114,59],value:"𝒞"},{key:[67,117,112,59],value:"⋓"},{key:[67,117,112,67,97,112,59],value:"≍"},{key:[68,68,59],value:"ⅅ"},{key:[68,68,111,116,114,97,104,100,59],value:"⤑"},{key:[68,74,99,121,59],value:"Ђ"},{key:[68,83,99,121,59],value:"Ѕ"},{key:[68,90,99,121,59],value:"Џ"},{key:[68,97,103,103,101,114,59],value:"‡"},{key:[68,97,114,114,59],value:"↡"},{key:[68,97,115,104,118,59],value:"⫤"},{key:[68,99,97,114,111,110,59],value:"Ď"},{key:[68,99,121,59],value:"Д"},{key:[68,101,108,59],value:"∇"},{key:[68,101,108,116,97,59],value:"Δ"},{key:[68,102,114,59],value:"𝔇"},{key:[68,105,97,99,114,105,116,105,99,97,108,65,99,117,116,101,59],value:"´"},{key:[68,105,97,99,114,105,116,105,99,97,108,68,111,116,59],value:"˙"},{key:[68,105,97,99,114,105,116,105,99,97,108,68,111,117,98,108,101,65,99,117,116,101,59],value:"˝"},{key:[68,105,97,99,114,105,116,105,99,97,108,71,114,97,118,101,59],value:"`"},{key:[68,105,97,99,114,105,116,105,99,97,108,84,105,108,100,101,59],value:"˜"},{key:[68,105,97,109,111,110,100,59],value:"⋄"},{key:[68,105,102,102,101,114,101,110,116,105,97,108,68,59],value:"ⅆ"},{key:[68,111,112,102,59],value:"𝔻"},{key:[68,111,116,59],value:"¨"},{key:[68,111,116,68,111,116,59],value:"⃜"},{key:[68,111,116,69,113,117,97,108,59],value:"≐"},{key:[68,111,117,98,108,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∯"},{key:[68,111,117,98,108,101,68,111,116,59],value:"¨"},{key:[68,111,117,98,108,101,68,111,119,110,65,114,114,111,119,59],value:"⇓"},{key:[68,111,117,98,108,101,76,101,102,116,65,114,114,111,119,59],value:"⇐"},{key:[68,111,117,98,108,101,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⇔"},{key:[68,111,117,98,108,101,76,101,102,116,84,101,101,59],value:"⫤"},{key:[68,111,117,98,108,101,76,111,110,103,76,101,102,116,65,114,114,111,119,59],value:"⟸"},{key:[68,111,117,98,108,101,76,111,110,103,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⟺"},{key:[68,111,117,98,108,101,76,111,110,103,82,105,103,104,116,65,114,114,111,119,59],value:"⟹"},{key:[68,111,117,98,108,101,82,105,103,104,116,65,114,114,111,119,59],value:"⇒"},{key:[68,111,117,98,108,101,82,105,103,104,116,84,101,101,59],value:"⊨"},{key:[68,111,117,98,108,101,85,112,65,114,114,111,119,59],value:"⇑"},{key:[68,111,117,98,108,101,85,112,68,111,119,110,65,114,114,111,119,59],value:"⇕"},{key:[68,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59],value:"∥"},{key:[68,111,119,110,65,114,114,111,119,59],value:"↓"},{key:[68,111,119,110,65,114,114,111,119,66,97,114,59],value:"⤓"},{key:[68,111,119,110,65,114,114,111,119,85,112,65,114,114,111,119,59],value:"⇵"},{key:[68,111,119,110,66,114,101,118,101,59],value:"̑"},{key:[68,111,119,110,76,101,102,116,82,105,103,104,116,86,101,99,116,111,114,59],value:"⥐"},{key:[68,111,119,110,76,101,102,116,84,101,101,86,101,99,116,111,114,59],value:"⥞"},{key:[68,111,119,110,76,101,102,116,86,101,99,116,111,114,59],value:"↽"},{key:[68,111,119,110,76,101,102,116,86,101,99,116,111,114,66,97,114,59],value:"⥖"},{key:[68,111,119,110,82,105,103,104,116,84,101,101,86,101,99,116,111,114,59],value:"⥟"},{key:[68,111,119,110,82,105,103,104,116,86,101,99,116,111,114,59],value:"⇁"},{key:[68,111,119,110,82,105,103,104,116,86,101,99,116,111,114,66,97,114,59],value:"⥗"},{key:[68,111,119,110,84,101,101,59],value:"⊤"},{key:[68,111,119,110,84,101,101,65,114,114,111,119,59],value:"↧"},{key:[68,111,119,110,97,114,114,111,119,59],value:"⇓"},{key:[68,115,99,114,59],value:"𝒟"},{key:[68,115,116,114,111,107,59],value:"Đ"},{key:[69,78,71,59],value:"Ŋ"},{key:[69,84,72,59],value:"Ð"},{key:[69,97,99,117,116,101,59],value:"É"},{key:[69,99,97,114,111,110,59],value:"Ě"},{key:[69,99,105,114,99,59],value:"Ê"},{key:[69,99,121,59],value:"Э"},{key:[69,100,111,116,59],value:"Ė"},{key:[69,102,114,59],value:"𝔈"},{key:[69,103,114,97,118,101,59],value:"È"},{key:[69,108,101,109,101,110,116,59],value:"∈"},{key:[69,109,97,99,114,59],value:"Ē"},{key:[69,109,112,116,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"◻"},{key:[69,109,112,116,121,86,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"▫"},{key:[69,111,103,111,110,59],value:"Ę"},{key:[69,111,112,102,59],value:"𝔼"},{key:[69,112,115,105,108,111,110,59],value:"Ε"},{key:[69,113,117,97,108,59],value:"⩵"},{key:[69,113,117,97,108,84,105,108,100,101,59],value:"≂"},{key:[69,113,117,105,108,105,98,114,105,117,109,59],value:"⇌"},{key:[69,115,99,114,59],value:"ℰ"},{key:[69,115,105,109,59],value:"⩳"},{key:[69,116,97,59],value:"Η"},{key:[69,117,109,108,59],value:"Ë"},{key:[69,120,105,115,116,115,59],value:"∃"},{key:[69,120,112,111,110,101,110,116,105,97,108,69,59],value:"ⅇ"},{key:[70,99,121,59],value:"Ф"},{key:[70,102,114,59],value:"𝔉"},{key:[70,105,108,108,101,100,83,109,97,108,108,83,113,117,97,114,101,59],value:"◼"},{key:[70,105,108,108,101,100,86,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"▪"},{key:[70,111,112,102,59],value:"𝔽"},{key:[70,111,114,65,108,108,59],value:"∀"},{key:[70,111,117,114,105,101,114,116,114,102,59],value:"ℱ"},{key:[70,115,99,114,59],value:"ℱ"},{key:[71,74,99,121,59],value:"Ѓ"},{key:[71,84,59],value:">"},{key:[71,97,109,109,97,59],value:"Γ"},{key:[71,97,109,109,97,100,59],value:"Ϝ"},{key:[71,98,114,101,118,101,59],value:"Ğ"},{key:[71,99,101,100,105,108,59],value:"Ģ"},{key:[71,99,105,114,99,59],value:"Ĝ"},{key:[71,99,121,59],value:"Г"},{key:[71,100,111,116,59],value:"Ġ"},{key:[71,102,114,59],value:"𝔊"},{key:[71,103,59],value:"⋙"},{key:[71,111,112,102,59],value:"𝔾"},{key:[71,114,101,97,116,101,114,69,113,117,97,108,59],value:"≥"},{key:[71,114,101,97,116,101,114,69,113,117,97,108,76,101,115,115,59],value:"⋛"},{key:[71,114,101,97,116,101,114,70,117,108,108,69,113,117,97,108,59],value:"≧"},{key:[71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"⪢"},{key:[71,114,101,97,116,101,114,76,101,115,115,59],value:"≷"},{key:[71,114,101,97,116,101,114,83,108,97,110,116,69,113,117,97,108,59],value:"⩾"},{key:[71,114,101,97,116,101,114,84,105,108,100,101,59],value:"≳"},{key:[71,115,99,114,59],value:"𝒢"},{key:[71,116,59],value:"≫"},{key:[72,65,82,68,99,121,59],value:"Ъ"},{key:[72,97,99,101,107,59],value:"ˇ"},{key:[72,97,116,59],value:"^"},{key:[72,99,105,114,99,59],value:"Ĥ"},{key:[72,102,114,59],value:"ℌ"},{key:[72,105,108,98,101,114,116,83,112,97,99,101,59],value:"ℋ"},{key:[72,111,112,102,59],value:"ℍ"},{key:[72,111,114,105,122,111,110,116,97,108,76,105,110,101,59],value:"─"},{key:[72,115,99,114,59],value:"ℋ"},{key:[72,115,116,114,111,107,59],value:"Ħ"},{key:[72,117,109,112,68,111,119,110,72,117,109,112,59],value:"≎"},{key:[72,117,109,112,69,113,117,97,108,59],value:"≏"},{key:[73,69,99,121,59],value:"Е"},{key:[73,74,108,105,103,59],value:"IJ"},{key:[73,79,99,121,59],value:"Ё"},{key:[73,97,99,117,116,101,59],value:"Í"},{key:[73,99,105,114,99,59],value:"Î"},{key:[73,99,121,59],value:"И"},{key:[73,100,111,116,59],value:"İ"},{key:[73,102,114,59],value:"ℑ"},{key:[73,103,114,97,118,101,59],value:"Ì"},{key:[73,109,59],value:"ℑ"},{key:[73,109,97,99,114,59],value:"Ī"},{key:[73,109,97,103,105,110,97,114,121,73,59],value:"ⅈ"},{key:[73,109,112,108,105,101,115,59],value:"⇒"},{key:[73,110,116,59],value:"∬"},{key:[73,110,116,101,103,114,97,108,59],value:"∫"},{key:[73,110,116,101,114,115,101,99,116,105,111,110,59],value:"⋂"},{key:[73,110,118,105,115,105,98,108,101,67,111,109,109,97,59],value:"⁣"},{key:[73,110,118,105,115,105,98,108,101,84,105,109,101,115,59],value:"⁢"},{key:[73,111,103,111,110,59],value:"Į"},{key:[73,111,112,102,59],value:"𝕀"},{key:[73,111,116,97,59],value:"Ι"},{key:[73,115,99,114,59],value:"ℐ"},{key:[73,116,105,108,100,101,59],value:"Ĩ"},{key:[73,117,107,99,121,59],value:"І"},{key:[73,117,109,108,59],value:"Ï"},{key:[74,99,105,114,99,59],value:"Ĵ"},{key:[74,99,121,59],value:"Й"},{key:[74,102,114,59],value:"𝔍"},{key:[74,111,112,102,59],value:"𝕁"},{key:[74,115,99,114,59],value:"𝒥"},{key:[74,115,101,114,99,121,59],value:"Ј"},{key:[74,117,107,99,121,59],value:"Є"},{key:[75,72,99,121,59],value:"Х"},{key:[75,74,99,121,59],value:"Ќ"},{key:[75,97,112,112,97,59],value:"Κ"},{key:[75,99,101,100,105,108,59],value:"Ķ"},{key:[75,99,121,59],value:"К"},{key:[75,102,114,59],value:"𝔎"},{key:[75,111,112,102,59],value:"𝕂"},{key:[75,115,99,114,59],value:"𝒦"},{key:[76,74,99,121,59],value:"Љ"},{key:[76,84,59],value:"<"},{key:[76,97,99,117,116,101,59],value:"Ĺ"},{key:[76,97,109,98,100,97,59],value:"Λ"},{key:[76,97,110,103,59],value:"⟪"},{key:[76,97,112,108,97,99,101,116,114,102,59],value:"ℒ"},{key:[76,97,114,114,59],value:"↞"},{key:[76,99,97,114,111,110,59],value:"Ľ"},{key:[76,99,101,100,105,108,59],value:"Ļ"},{key:[76,99,121,59],value:"Л"},{key:[76,101,102,116,65,110,103,108,101,66,114,97,99,107,101,116,59],value:"⟨"},{key:[76,101,102,116,65,114,114,111,119,59],value:"←"},{key:[76,101,102,116,65,114,114,111,119,66,97,114,59],value:"⇤"},{key:[76,101,102,116,65,114,114,111,119,82,105,103,104,116,65,114,114,111,119,59],value:"⇆"},{key:[76,101,102,116,67,101,105,108,105,110,103,59],value:"⌈"},{key:[76,101,102,116,68,111,117,98,108,101,66,114,97,99,107,101,116,59],value:"⟦"},{key:[76,101,102,116,68,111,119,110,84,101,101,86,101,99,116,111,114,59],value:"⥡"},{key:[76,101,102,116,68,111,119,110,86,101,99,116,111,114,59],value:"⇃"},{key:[76,101,102,116,68,111,119,110,86,101,99,116,111,114,66,97,114,59],value:"⥙"},{key:[76,101,102,116,70,108,111,111,114,59],value:"⌊"},{key:[76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"↔"},{key:[76,101,102,116,82,105,103,104,116,86,101,99,116,111,114,59],value:"⥎"},{key:[76,101,102,116,84,101,101,59],value:"⊣"},{key:[76,101,102,116,84,101,101,65,114,114,111,119,59],value:"↤"},{key:[76,101,102,116,84,101,101,86,101,99,116,111,114,59],value:"⥚"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,59],value:"⊲"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧏"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⊴"},{key:[76,101,102,116,85,112,68,111,119,110,86,101,99,116,111,114,59],value:"⥑"},{key:[76,101,102,116,85,112,84,101,101,86,101,99,116,111,114,59],value:"⥠"},{key:[76,101,102,116,85,112,86,101,99,116,111,114,59],value:"↿"},{key:[76,101,102,116,85,112,86,101,99,116,111,114,66,97,114,59],value:"⥘"},{key:[76,101,102,116,86,101,99,116,111,114,59],value:"↼"},{key:[76,101,102,116,86,101,99,116,111,114,66,97,114,59],value:"⥒"},{key:[76,101,102,116,97,114,114,111,119,59],value:"⇐"},{key:[76,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⇔"},{key:[76,101,115,115,69,113,117,97,108,71,114,101,97,116,101,114,59],value:"⋚"},{key:[76,101,115,115,70,117,108,108,69,113,117,97,108,59],value:"≦"},{key:[76,101,115,115,71,114,101,97,116,101,114,59],value:"≶"},{key:[76,101,115,115,76,101,115,115,59],value:"⪡"},{key:[76,101,115,115,83,108,97,110,116,69,113,117,97,108,59],value:"⩽"},{key:[76,101,115,115,84,105,108,100,101,59],value:"≲"},{key:[76,102,114,59],value:"𝔏"},{key:[76,108,59],value:"⋘"},{key:[76,108,101,102,116,97,114,114,111,119,59],value:"⇚"},{key:[76,109,105,100,111,116,59],value:"Ŀ"},{key:[76,111,110,103,76,101,102,116,65,114,114,111,119,59],value:"⟵"},{key:[76,111,110,103,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⟷"},{key:[76,111,110,103,82,105,103,104,116,65,114,114,111,119,59],value:"⟶"},{key:[76,111,110,103,108,101,102,116,97,114,114,111,119,59],value:"⟸"},{key:[76,111,110,103,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⟺"},{key:[76,111,110,103,114,105,103,104,116,97,114,114,111,119,59],value:"⟹"},{key:[76,111,112,102,59],value:"𝕃"},{key:[76,111,119,101,114,76,101,102,116,65,114,114,111,119,59],value:"↙"},{key:[76,111,119,101,114,82,105,103,104,116,65,114,114,111,119,59],value:"↘"},{key:[76,115,99,114,59],value:"ℒ"},{key:[76,115,104,59],value:"↰"},{key:[76,115,116,114,111,107,59],value:"Ł"},{key:[76,116,59],value:"≪"},{key:[77,97,112,59],value:"⤅"},{key:[77,99,121,59],value:"М"},{key:[77,101,100,105,117,109,83,112,97,99,101,59],value:" "},{key:[77,101,108,108,105,110,116,114,102,59],value:"ℳ"},{key:[77,102,114,59],value:"𝔐"},{key:[77,105,110,117,115,80,108,117,115,59],value:"∓"},{key:[77,111,112,102,59],value:"𝕄"},{key:[77,115,99,114,59],value:"ℳ"},{key:[77,117,59],value:"Μ"},{key:[78,74,99,121,59],value:"Њ"},{key:[78,97,99,117,116,101,59],value:"Ń"},{key:[78,99,97,114,111,110,59],value:"Ň"},{key:[78,99,101,100,105,108,59],value:"Ņ"},{key:[78,99,121,59],value:"Н"},{key:[78,101,103,97,116,105,118,101,77,101,100,105,117,109,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,84,104,105,99,107,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,84,104,105,110,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,86,101,114,121,84,104,105,110,83,112,97,99,101,59],value:"​"},{key:[78,101,115,116,101,100,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"≫"},{key:[78,101,115,116,101,100,76,101,115,115,76,101,115,115,59],value:"≪"},{key:[78,101,119,76,105,110,101,59],value:` +`},{key:[78,102,114,59],value:"𝔑"},{key:[78,111,66,114,101,97,107,59],value:"⁠"},{key:[78,111,110,66,114,101,97,107,105,110,103,83,112,97,99,101,59],value:" "},{key:[78,111,112,102,59],value:"ℕ"},{key:[78,111,116,59],value:"⫬"},{key:[78,111,116,67,111,110,103,114,117,101,110,116,59],value:"≢"},{key:[78,111,116,67,117,112,67,97,112,59],value:"≭"},{key:[78,111,116,68,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59],value:"∦"},{key:[78,111,116,69,108,101,109,101,110,116,59],value:"∉"},{key:[78,111,116,69,113,117,97,108,59],value:"≠"},{key:[78,111,116,69,113,117,97,108,84,105,108,100,101,59],value:"≂̸"},{key:[78,111,116,69,120,105,115,116,115,59],value:"∄"},{key:[78,111,116,71,114,101,97,116,101,114,59],value:"≯"},{key:[78,111,116,71,114,101,97,116,101,114,69,113,117,97,108,59],value:"≱"},{key:[78,111,116,71,114,101,97,116,101,114,70,117,108,108,69,113,117,97,108,59],value:"≧̸"},{key:[78,111,116,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"≫̸"},{key:[78,111,116,71,114,101,97,116,101,114,76,101,115,115,59],value:"≹"},{key:[78,111,116,71,114,101,97,116,101,114,83,108,97,110,116,69,113,117,97,108,59],value:"⩾̸"},{key:[78,111,116,71,114,101,97,116,101,114,84,105,108,100,101,59],value:"≵"},{key:[78,111,116,72,117,109,112,68,111,119,110,72,117,109,112,59],value:"≎̸"},{key:[78,111,116,72,117,109,112,69,113,117,97,108,59],value:"≏̸"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,59],value:"⋪"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧏̸"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⋬"},{key:[78,111,116,76,101,115,115,59],value:"≮"},{key:[78,111,116,76,101,115,115,69,113,117,97,108,59],value:"≰"},{key:[78,111,116,76,101,115,115,71,114,101,97,116,101,114,59],value:"≸"},{key:[78,111,116,76,101,115,115,76,101,115,115,59],value:"≪̸"},{key:[78,111,116,76,101,115,115,83,108,97,110,116,69,113,117,97,108,59],value:"⩽̸"},{key:[78,111,116,76,101,115,115,84,105,108,100,101,59],value:"≴"},{key:[78,111,116,78,101,115,116,101,100,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"⪢̸"},{key:[78,111,116,78,101,115,116,101,100,76,101,115,115,76,101,115,115,59],value:"⪡̸"},{key:[78,111,116,80,114,101,99,101,100,101,115,59],value:"⊀"},{key:[78,111,116,80,114,101,99,101,100,101,115,69,113,117,97,108,59],value:"⪯̸"},{key:[78,111,116,80,114,101,99,101,100,101,115,83,108,97,110,116,69,113,117,97,108,59],value:"⋠"},{key:[78,111,116,82,101,118,101,114,115,101,69,108,101,109,101,110,116,59],value:"∌"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,59],value:"⋫"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧐̸"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⋭"},{key:[78,111,116,83,113,117,97,114,101,83,117,98,115,101,116,59],value:"⊏̸"},{key:[78,111,116,83,113,117,97,114,101,83,117,98,115,101,116,69,113,117,97,108,59],value:"⋢"},{key:[78,111,116,83,113,117,97,114,101,83,117,112,101,114,115,101,116,59],value:"⊐̸"},{key:[78,111,116,83,113,117,97,114,101,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⋣"},{key:[78,111,116,83,117,98,115,101,116,59],value:"⊂⃒"},{key:[78,111,116,83,117,98,115,101,116,69,113,117,97,108,59],value:"⊈"},{key:[78,111,116,83,117,99,99,101,101,100,115,59],value:"⊁"},{key:[78,111,116,83,117,99,99,101,101,100,115,69,113,117,97,108,59],value:"⪰̸"},{key:[78,111,116,83,117,99,99,101,101,100,115,83,108,97,110,116,69,113,117,97,108,59],value:"⋡"},{key:[78,111,116,83,117,99,99,101,101,100,115,84,105,108,100,101,59],value:"≿̸"},{key:[78,111,116,83,117,112,101,114,115,101,116,59],value:"⊃⃒"},{key:[78,111,116,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊉"},{key:[78,111,116,84,105,108,100,101,59],value:"≁"},{key:[78,111,116,84,105,108,100,101,69,113,117,97,108,59],value:"≄"},{key:[78,111,116,84,105,108,100,101,70,117,108,108,69,113,117,97,108,59],value:"≇"},{key:[78,111,116,84,105,108,100,101,84,105,108,100,101,59],value:"≉"},{key:[78,111,116,86,101,114,116,105,99,97,108,66,97,114,59],value:"∤"},{key:[78,115,99,114,59],value:"𝒩"},{key:[78,116,105,108,100,101,59],value:"Ñ"},{key:[78,117,59],value:"Ν"},{key:[79,69,108,105,103,59],value:"Œ"},{key:[79,97,99,117,116,101,59],value:"Ó"},{key:[79,99,105,114,99,59],value:"Ô"},{key:[79,99,121,59],value:"О"},{key:[79,100,98,108,97,99,59],value:"Ő"},{key:[79,102,114,59],value:"𝔒"},{key:[79,103,114,97,118,101,59],value:"Ò"},{key:[79,109,97,99,114,59],value:"Ō"},{key:[79,109,101,103,97,59],value:"Ω"},{key:[79,109,105,99,114,111,110,59],value:"Ο"},{key:[79,111,112,102,59],value:"𝕆"},{key:[79,112,101,110,67,117,114,108,121,68,111,117,98,108,101,81,117,111,116,101,59],value:"“"},{key:[79,112,101,110,67,117,114,108,121,81,117,111,116,101,59],value:"‘"},{key:[79,114,59],value:"⩔"},{key:[79,115,99,114,59],value:"𝒪"},{key:[79,115,108,97,115,104,59],value:"Ø"},{key:[79,116,105,108,100,101,59],value:"Õ"},{key:[79,116,105,109,101,115,59],value:"⨷"},{key:[79,117,109,108,59],value:"Ö"},{key:[79,118,101,114,66,97,114,59],value:"‾"},{key:[79,118,101,114,66,114,97,99,101,59],value:"⏞"},{key:[79,118,101,114,66,114,97,99,107,101,116,59],value:"⎴"},{key:[79,118,101,114,80,97,114,101,110,116,104,101,115,105,115,59],value:"⏜"},{key:[80,97,114,116,105,97,108,68,59],value:"∂"},{key:[80,99,121,59],value:"П"},{key:[80,102,114,59],value:"𝔓"},{key:[80,104,105,59],value:"Φ"},{key:[80,105,59],value:"Π"},{key:[80,108,117,115,77,105,110,117,115,59],value:"±"},{key:[80,111,105,110,99,97,114,101,112,108,97,110,101,59],value:"ℌ"},{key:[80,111,112,102,59],value:"ℙ"},{key:[80,114,59],value:"⪻"},{key:[80,114,101,99,101,100,101,115,59],value:"≺"},{key:[80,114,101,99,101,100,101,115,69,113,117,97,108,59],value:"⪯"},{key:[80,114,101,99,101,100,101,115,83,108,97,110,116,69,113,117,97,108,59],value:"≼"},{key:[80,114,101,99,101,100,101,115,84,105,108,100,101,59],value:"≾"},{key:[80,114,105,109,101,59],value:"″"},{key:[80,114,111,100,117,99,116,59],value:"∏"},{key:[80,114,111,112,111,114,116,105,111,110,59],value:"∷"},{key:[80,114,111,112,111,114,116,105,111,110,97,108,59],value:"∝"},{key:[80,115,99,114,59],value:"𝒫"},{key:[80,115,105,59],value:"Ψ"},{key:[81,85,79,84,59],value:'"'},{key:[81,102,114,59],value:"𝔔"},{key:[81,111,112,102,59],value:"ℚ"},{key:[81,115,99,114,59],value:"𝒬"},{key:[82,66,97,114,114,59],value:"⤐"},{key:[82,69,71,59],value:"®"},{key:[82,97,99,117,116,101,59],value:"Ŕ"},{key:[82,97,110,103,59],value:"⟫"},{key:[82,97,114,114,59],value:"↠"},{key:[82,97,114,114,116,108,59],value:"⤖"},{key:[82,99,97,114,111,110,59],value:"Ř"},{key:[82,99,101,100,105,108,59],value:"Ŗ"},{key:[82,99,121,59],value:"Р"},{key:[82,101,59],value:"ℜ"},{key:[82,101,118,101,114,115,101,69,108,101,109,101,110,116,59],value:"∋"},{key:[82,101,118,101,114,115,101,69,113,117,105,108,105,98,114,105,117,109,59],value:"⇋"},{key:[82,101,118,101,114,115,101,85,112,69,113,117,105,108,105,98,114,105,117,109,59],value:"⥯"},{key:[82,102,114,59],value:"ℜ"},{key:[82,104,111,59],value:"Ρ"},{key:[82,105,103,104,116,65,110,103,108,101,66,114,97,99,107,101,116,59],value:"⟩"},{key:[82,105,103,104,116,65,114,114,111,119,59],value:"→"},{key:[82,105,103,104,116,65,114,114,111,119,66,97,114,59],value:"⇥"},{key:[82,105,103,104,116,65,114,114,111,119,76,101,102,116,65,114,114,111,119,59],value:"⇄"},{key:[82,105,103,104,116,67,101,105,108,105,110,103,59],value:"⌉"},{key:[82,105,103,104,116,68,111,117,98,108,101,66,114,97,99,107,101,116,59],value:"⟧"},{key:[82,105,103,104,116,68,111,119,110,84,101,101,86,101,99,116,111,114,59],value:"⥝"},{key:[82,105,103,104,116,68,111,119,110,86,101,99,116,111,114,59],value:"⇂"},{key:[82,105,103,104,116,68,111,119,110,86,101,99,116,111,114,66,97,114,59],value:"⥕"},{key:[82,105,103,104,116,70,108,111,111,114,59],value:"⌋"},{key:[82,105,103,104,116,84,101,101,59],value:"⊢"},{key:[82,105,103,104,116,84,101,101,65,114,114,111,119,59],value:"↦"},{key:[82,105,103,104,116,84,101,101,86,101,99,116,111,114,59],value:"⥛"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,59],value:"⊳"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧐"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⊵"},{key:[82,105,103,104,116,85,112,68,111,119,110,86,101,99,116,111,114,59],value:"⥏"},{key:[82,105,103,104,116,85,112,84,101,101,86,101,99,116,111,114,59],value:"⥜"},{key:[82,105,103,104,116,85,112,86,101,99,116,111,114,59],value:"↾"},{key:[82,105,103,104,116,85,112,86,101,99,116,111,114,66,97,114,59],value:"⥔"},{key:[82,105,103,104,116,86,101,99,116,111,114,59],value:"⇀"},{key:[82,105,103,104,116,86,101,99,116,111,114,66,97,114,59],value:"⥓"},{key:[82,105,103,104,116,97,114,114,111,119,59],value:"⇒"},{key:[82,111,112,102,59],value:"ℝ"},{key:[82,111,117,110,100,73,109,112,108,105,101,115,59],value:"⥰"},{key:[82,114,105,103,104,116,97,114,114,111,119,59],value:"⇛"},{key:[82,115,99,114,59],value:"ℛ"},{key:[82,115,104,59],value:"↱"},{key:[82,117,108,101,68,101,108,97,121,101,100,59],value:"⧴"},{key:[83,72,67,72,99,121,59],value:"Щ"},{key:[83,72,99,121,59],value:"Ш"},{key:[83,79,70,84,99,121,59],value:"Ь"},{key:[83,97,99,117,116,101,59],value:"Ś"},{key:[83,99,59],value:"⪼"},{key:[83,99,97,114,111,110,59],value:"Š"},{key:[83,99,101,100,105,108,59],value:"Ş"},{key:[83,99,105,114,99,59],value:"Ŝ"},{key:[83,99,121,59],value:"С"},{key:[83,102,114,59],value:"𝔖"},{key:[83,104,111,114,116,68,111,119,110,65,114,114,111,119,59],value:"↓"},{key:[83,104,111,114,116,76,101,102,116,65,114,114,111,119,59],value:"←"},{key:[83,104,111,114,116,82,105,103,104,116,65,114,114,111,119,59],value:"→"},{key:[83,104,111,114,116,85,112,65,114,114,111,119,59],value:"↑"},{key:[83,105,103,109,97,59],value:"Σ"},{key:[83,109,97,108,108,67,105,114,99,108,101,59],value:"∘"},{key:[83,111,112,102,59],value:"𝕊"},{key:[83,113,114,116,59],value:"√"},{key:[83,113,117,97,114,101,59],value:"□"},{key:[83,113,117,97,114,101,73,110,116,101,114,115,101,99,116,105,111,110,59],value:"⊓"},{key:[83,113,117,97,114,101,83,117,98,115,101,116,59],value:"⊏"},{key:[83,113,117,97,114,101,83,117,98,115,101,116,69,113,117,97,108,59],value:"⊑"},{key:[83,113,117,97,114,101,83,117,112,101,114,115,101,116,59],value:"⊐"},{key:[83,113,117,97,114,101,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊒"},{key:[83,113,117,97,114,101,85,110,105,111,110,59],value:"⊔"},{key:[83,115,99,114,59],value:"𝒮"},{key:[83,116,97,114,59],value:"⋆"},{key:[83,117,98,59],value:"⋐"},{key:[83,117,98,115,101,116,59],value:"⋐"},{key:[83,117,98,115,101,116,69,113,117,97,108,59],value:"⊆"},{key:[83,117,99,99,101,101,100,115,59],value:"≻"},{key:[83,117,99,99,101,101,100,115,69,113,117,97,108,59],value:"⪰"},{key:[83,117,99,99,101,101,100,115,83,108,97,110,116,69,113,117,97,108,59],value:"≽"},{key:[83,117,99,99,101,101,100,115,84,105,108,100,101,59],value:"≿"},{key:[83,117,99,104,84,104,97,116,59],value:"∋"},{key:[83,117,109,59],value:"∑"},{key:[83,117,112,59],value:"⋑"},{key:[83,117,112,101,114,115,101,116,59],value:"⊃"},{key:[83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊇"},{key:[83,117,112,115,101,116,59],value:"⋑"},{key:[84,72,79,82,78,59],value:"Þ"},{key:[84,82,65,68,69,59],value:"™"},{key:[84,83,72,99,121,59],value:"Ћ"},{key:[84,83,99,121,59],value:"Ц"},{key:[84,97,98,59],value:" "},{key:[84,97,117,59],value:"Τ"},{key:[84,99,97,114,111,110,59],value:"Ť"},{key:[84,99,101,100,105,108,59],value:"Ţ"},{key:[84,99,121,59],value:"Т"},{key:[84,102,114,59],value:"𝔗"},{key:[84,104,101,114,101,102,111,114,101,59],value:"∴"},{key:[84,104,101,116,97,59],value:"Θ"},{key:[84,104,105,99,107,83,112,97,99,101,59],value:"  "},{key:[84,104,105,110,83,112,97,99,101,59],value:" "},{key:[84,105,108,100,101,59],value:"∼"},{key:[84,105,108,100,101,69,113,117,97,108,59],value:"≃"},{key:[84,105,108,100,101,70,117,108,108,69,113,117,97,108,59],value:"≅"},{key:[84,105,108,100,101,84,105,108,100,101,59],value:"≈"},{key:[84,111,112,102,59],value:"𝕋"},{key:[84,114,105,112,108,101,68,111,116,59],value:"⃛"},{key:[84,115,99,114,59],value:"𝒯"},{key:[84,115,116,114,111,107,59],value:"Ŧ"},{key:[85,97,99,117,116,101,59],value:"Ú"},{key:[85,97,114,114,59],value:"↟"},{key:[85,97,114,114,111,99,105,114,59],value:"⥉"},{key:[85,98,114,99,121,59],value:"Ў"},{key:[85,98,114,101,118,101,59],value:"Ŭ"},{key:[85,99,105,114,99,59],value:"Û"},{key:[85,99,121,59],value:"У"},{key:[85,100,98,108,97,99,59],value:"Ű"},{key:[85,102,114,59],value:"𝔘"},{key:[85,103,114,97,118,101,59],value:"Ù"},{key:[85,109,97,99,114,59],value:"Ū"},{key:[85,110,100,101,114,66,97,114,59],value:"_"},{key:[85,110,100,101,114,66,114,97,99,101,59],value:"⏟"},{key:[85,110,100,101,114,66,114,97,99,107,101,116,59],value:"⎵"},{key:[85,110,100,101,114,80,97,114,101,110,116,104,101,115,105,115,59],value:"⏝"},{key:[85,110,105,111,110,59],value:"⋃"},{key:[85,110,105,111,110,80,108,117,115,59],value:"⊎"},{key:[85,111,103,111,110,59],value:"Ų"},{key:[85,111,112,102,59],value:"𝕌"},{key:[85,112,65,114,114,111,119,59],value:"↑"},{key:[85,112,65,114,114,111,119,66,97,114,59],value:"⤒"},{key:[85,112,65,114,114,111,119,68,111,119,110,65,114,114,111,119,59],value:"⇅"},{key:[85,112,68,111,119,110,65,114,114,111,119,59],value:"↕"},{key:[85,112,69,113,117,105,108,105,98,114,105,117,109,59],value:"⥮"},{key:[85,112,84,101,101,59],value:"⊥"},{key:[85,112,84,101,101,65,114,114,111,119,59],value:"↥"},{key:[85,112,97,114,114,111,119,59],value:"⇑"},{key:[85,112,100,111,119,110,97,114,114,111,119,59],value:"⇕"},{key:[85,112,112,101,114,76,101,102,116,65,114,114,111,119,59],value:"↖"},{key:[85,112,112,101,114,82,105,103,104,116,65,114,114,111,119,59],value:"↗"},{key:[85,112,115,105,59],value:"ϒ"},{key:[85,112,115,105,108,111,110,59],value:"Υ"},{key:[85,114,105,110,103,59],value:"Ů"},{key:[85,115,99,114,59],value:"𝒰"},{key:[85,116,105,108,100,101,59],value:"Ũ"},{key:[85,117,109,108,59],value:"Ü"},{key:[86,68,97,115,104,59],value:"⊫"},{key:[86,98,97,114,59],value:"⫫"},{key:[86,99,121,59],value:"В"},{key:[86,100,97,115,104,59],value:"⊩"},{key:[86,100,97,115,104,108,59],value:"⫦"},{key:[86,101,101,59],value:"⋁"},{key:[86,101,114,98,97,114,59],value:"‖"},{key:[86,101,114,116,59],value:"‖"},{key:[86,101,114,116,105,99,97,108,66,97,114,59],value:"∣"},{key:[86,101,114,116,105,99,97,108,76,105,110,101,59],value:"|"},{key:[86,101,114,116,105,99,97,108,83,101,112,97,114,97,116,111,114,59],value:"❘"},{key:[86,101,114,116,105,99,97,108,84,105,108,100,101,59],value:"≀"},{key:[86,101,114,121,84,104,105,110,83,112,97,99,101,59],value:" "},{key:[86,102,114,59],value:"𝔙"},{key:[86,111,112,102,59],value:"𝕍"},{key:[86,115,99,114,59],value:"𝒱"},{key:[86,118,100,97,115,104,59],value:"⊪"},{key:[87,99,105,114,99,59],value:"Ŵ"},{key:[87,101,100,103,101,59],value:"⋀"},{key:[87,102,114,59],value:"𝔚"},{key:[87,111,112,102,59],value:"𝕎"},{key:[87,115,99,114,59],value:"𝒲"},{key:[88,102,114,59],value:"𝔛"},{key:[88,105,59],value:"Ξ"},{key:[88,111,112,102,59],value:"𝕏"},{key:[88,115,99,114,59],value:"𝒳"},{key:[89,65,99,121,59],value:"Я"},{key:[89,73,99,121,59],value:"Ї"},{key:[89,85,99,121,59],value:"Ю"},{key:[89,97,99,117,116,101,59],value:"Ý"},{key:[89,99,105,114,99,59],value:"Ŷ"},{key:[89,99,121,59],value:"Ы"},{key:[89,102,114,59],value:"𝔜"},{key:[89,111,112,102,59],value:"𝕐"},{key:[89,115,99,114,59],value:"𝒴"},{key:[89,117,109,108,59],value:"Ÿ"},{key:[90,72,99,121,59],value:"Ж"},{key:[90,97,99,117,116,101,59],value:"Ź"},{key:[90,99,97,114,111,110,59],value:"Ž"},{key:[90,99,121,59],value:"З"},{key:[90,100,111,116,59],value:"Ż"},{key:[90,101,114,111,87,105,100,116,104,83,112,97,99,101,59],value:"​"},{key:[90,101,116,97,59],value:"Ζ"},{key:[90,102,114,59],value:"ℨ"},{key:[90,111,112,102,59],value:"ℤ"},{key:[90,115,99,114,59],value:"𝒵"},{key:[97,97,99,117,116,101,59],value:"á"},{key:[97,98,114,101,118,101,59],value:"ă"},{key:[97,99,59],value:"∾"},{key:[97,99,69,59],value:"∾̳"},{key:[97,99,100,59],value:"∿"},{key:[97,99,105,114,99,59],value:"â"},{key:[97,99,117,116,101,59],value:"´"},{key:[97,99,121,59],value:"а"},{key:[97,101,108,105,103,59],value:"æ"},{key:[97,102,59],value:"⁡"},{key:[97,102,114,59],value:"𝔞"},{key:[97,103,114,97,118,101,59],value:"à"},{key:[97,108,101,102,115,121,109,59],value:"ℵ"},{key:[97,108,101,112,104,59],value:"ℵ"},{key:[97,108,112,104,97,59],value:"α"},{key:[97,109,97,99,114,59],value:"ā"},{key:[97,109,97,108,103,59],value:"⨿"},{key:[97,109,112,59],value:"&"},{key:[97,110,100,59],value:"∧"},{key:[97,110,100,97,110,100,59],value:"⩕"},{key:[97,110,100,100,59],value:"⩜"},{key:[97,110,100,115,108,111,112,101,59],value:"⩘"},{key:[97,110,100,118,59],value:"⩚"},{key:[97,110,103,59],value:"∠"},{key:[97,110,103,101,59],value:"⦤"},{key:[97,110,103,108,101,59],value:"∠"},{key:[97,110,103,109,115,100,59],value:"∡"},{key:[97,110,103,109,115,100,97,97,59],value:"⦨"},{key:[97,110,103,109,115,100,97,98,59],value:"⦩"},{key:[97,110,103,109,115,100,97,99,59],value:"⦪"},{key:[97,110,103,109,115,100,97,100,59],value:"⦫"},{key:[97,110,103,109,115,100,97,101,59],value:"⦬"},{key:[97,110,103,109,115,100,97,102,59],value:"⦭"},{key:[97,110,103,109,115,100,97,103,59],value:"⦮"},{key:[97,110,103,109,115,100,97,104,59],value:"⦯"},{key:[97,110,103,114,116,59],value:"∟"},{key:[97,110,103,114,116,118,98,59],value:"⊾"},{key:[97,110,103,114,116,118,98,100,59],value:"⦝"},{key:[97,110,103,115,112,104,59],value:"∢"},{key:[97,110,103,115,116,59],value:"Å"},{key:[97,110,103,122,97,114,114,59],value:"⍼"},{key:[97,111,103,111,110,59],value:"ą"},{key:[97,111,112,102,59],value:"𝕒"},{key:[97,112,59],value:"≈"},{key:[97,112,69,59],value:"⩰"},{key:[97,112,97,99,105,114,59],value:"⩯"},{key:[97,112,101,59],value:"≊"},{key:[97,112,105,100,59],value:"≋"},{key:[97,112,111,115,59],value:"'"},{key:[97,112,112,114,111,120,59],value:"≈"},{key:[97,112,112,114,111,120,101,113,59],value:"≊"},{key:[97,114,105,110,103,59],value:"å"},{key:[97,115,99,114,59],value:"𝒶"},{key:[97,115,116,59],value:"*"},{key:[97,115,121,109,112,59],value:"≈"},{key:[97,115,121,109,112,101,113,59],value:"≍"},{key:[97,116,105,108,100,101,59],value:"ã"},{key:[97,117,109,108,59],value:"ä"},{key:[97,119,99,111,110,105,110,116,59],value:"∳"},{key:[97,119,105,110,116,59],value:"⨑"},{key:[98,78,111,116,59],value:"⫭"},{key:[98,97,99,107,99,111,110,103,59],value:"≌"},{key:[98,97,99,107,101,112,115,105,108,111,110,59],value:"϶"},{key:[98,97,99,107,112,114,105,109,101,59],value:"‵"},{key:[98,97,99,107,115,105,109,59],value:"∽"},{key:[98,97,99,107,115,105,109,101,113,59],value:"⋍"},{key:[98,97,114,118,101,101,59],value:"⊽"},{key:[98,97,114,119,101,100,59],value:"⌅"},{key:[98,97,114,119,101,100,103,101,59],value:"⌅"},{key:[98,98,114,107,59],value:"⎵"},{key:[98,98,114,107,116,98,114,107,59],value:"⎶"},{key:[98,99,111,110,103,59],value:"≌"},{key:[98,99,121,59],value:"б"},{key:[98,100,113,117,111,59],value:"„"},{key:[98,101,99,97,117,115,59],value:"∵"},{key:[98,101,99,97,117,115,101,59],value:"∵"},{key:[98,101,109,112,116,121,118,59],value:"⦰"},{key:[98,101,112,115,105,59],value:"϶"},{key:[98,101,114,110,111,117,59],value:"ℬ"},{key:[98,101,116,97,59],value:"β"},{key:[98,101,116,104,59],value:"ℶ"},{key:[98,101,116,119,101,101,110,59],value:"≬"},{key:[98,102,114,59],value:"𝔟"},{key:[98,105,103,99,97,112,59],value:"⋂"},{key:[98,105,103,99,105,114,99,59],value:"◯"},{key:[98,105,103,99,117,112,59],value:"⋃"},{key:[98,105,103,111,100,111,116,59],value:"⨀"},{key:[98,105,103,111,112,108,117,115,59],value:"⨁"},{key:[98,105,103,111,116,105,109,101,115,59],value:"⨂"},{key:[98,105,103,115,113,99,117,112,59],value:"⨆"},{key:[98,105,103,115,116,97,114,59],value:"★"},{key:[98,105,103,116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▽"},{key:[98,105,103,116,114,105,97,110,103,108,101,117,112,59],value:"△"},{key:[98,105,103,117,112,108,117,115,59],value:"⨄"},{key:[98,105,103,118,101,101,59],value:"⋁"},{key:[98,105,103,119,101,100,103,101,59],value:"⋀"},{key:[98,107,97,114,111,119,59],value:"⤍"},{key:[98,108,97,99,107,108,111,122,101,110,103,101,59],value:"⧫"},{key:[98,108,97,99,107,115,113,117,97,114,101,59],value:"▪"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,59],value:"▴"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▾"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"◂"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"▸"},{key:[98,108,97,110,107,59],value:"␣"},{key:[98,108,107,49,50,59],value:"▒"},{key:[98,108,107,49,52,59],value:"░"},{key:[98,108,107,51,52,59],value:"▓"},{key:[98,108,111,99,107,59],value:"█"},{key:[98,110,101,59],value:"=⃥"},{key:[98,110,101,113,117,105,118,59],value:"≡⃥"},{key:[98,110,111,116,59],value:"⌐"},{key:[98,111,112,102,59],value:"𝕓"},{key:[98,111,116,59],value:"⊥"},{key:[98,111,116,116,111,109,59],value:"⊥"},{key:[98,111,119,116,105,101,59],value:"⋈"},{key:[98,111,120,68,76,59],value:"╗"},{key:[98,111,120,68,82,59],value:"╔"},{key:[98,111,120,68,108,59],value:"╖"},{key:[98,111,120,68,114,59],value:"╓"},{key:[98,111,120,72,59],value:"═"},{key:[98,111,120,72,68,59],value:"╦"},{key:[98,111,120,72,85,59],value:"╩"},{key:[98,111,120,72,100,59],value:"╤"},{key:[98,111,120,72,117,59],value:"╧"},{key:[98,111,120,85,76,59],value:"╝"},{key:[98,111,120,85,82,59],value:"╚"},{key:[98,111,120,85,108,59],value:"╜"},{key:[98,111,120,85,114,59],value:"╙"},{key:[98,111,120,86,59],value:"║"},{key:[98,111,120,86,72,59],value:"╬"},{key:[98,111,120,86,76,59],value:"╣"},{key:[98,111,120,86,82,59],value:"╠"},{key:[98,111,120,86,104,59],value:"╫"},{key:[98,111,120,86,108,59],value:"╢"},{key:[98,111,120,86,114,59],value:"╟"},{key:[98,111,120,98,111,120,59],value:"⧉"},{key:[98,111,120,100,76,59],value:"╕"},{key:[98,111,120,100,82,59],value:"╒"},{key:[98,111,120,100,108,59],value:"┐"},{key:[98,111,120,100,114,59],value:"┌"},{key:[98,111,120,104,59],value:"─"},{key:[98,111,120,104,68,59],value:"╥"},{key:[98,111,120,104,85,59],value:"╨"},{key:[98,111,120,104,100,59],value:"┬"},{key:[98,111,120,104,117,59],value:"┴"},{key:[98,111,120,109,105,110,117,115,59],value:"⊟"},{key:[98,111,120,112,108,117,115,59],value:"⊞"},{key:[98,111,120,116,105,109,101,115,59],value:"⊠"},{key:[98,111,120,117,76,59],value:"╛"},{key:[98,111,120,117,82,59],value:"╘"},{key:[98,111,120,117,108,59],value:"┘"},{key:[98,111,120,117,114,59],value:"└"},{key:[98,111,120,118,59],value:"│"},{key:[98,111,120,118,72,59],value:"╪"},{key:[98,111,120,118,76,59],value:"╡"},{key:[98,111,120,118,82,59],value:"╞"},{key:[98,111,120,118,104,59],value:"┼"},{key:[98,111,120,118,108,59],value:"┤"},{key:[98,111,120,118,114,59],value:"├"},{key:[98,112,114,105,109,101,59],value:"‵"},{key:[98,114,101,118,101,59],value:"˘"},{key:[98,114,118,98,97,114,59],value:"¦"},{key:[98,115,99,114,59],value:"𝒷"},{key:[98,115,101,109,105,59],value:"⁏"},{key:[98,115,105,109,59],value:"∽"},{key:[98,115,105,109,101,59],value:"⋍"},{key:[98,115,111,108,59],value:"\\"},{key:[98,115,111,108,98,59],value:"⧅"},{key:[98,115,111,108,104,115,117,98,59],value:"⟈"},{key:[98,117,108,108,59],value:"•"},{key:[98,117,108,108,101,116,59],value:"•"},{key:[98,117,109,112,59],value:"≎"},{key:[98,117,109,112,69,59],value:"⪮"},{key:[98,117,109,112,101,59],value:"≏"},{key:[98,117,109,112,101,113,59],value:"≏"},{key:[99,97,99,117,116,101,59],value:"ć"},{key:[99,97,112,59],value:"∩"},{key:[99,97,112,97,110,100,59],value:"⩄"},{key:[99,97,112,98,114,99,117,112,59],value:"⩉"},{key:[99,97,112,99,97,112,59],value:"⩋"},{key:[99,97,112,99,117,112,59],value:"⩇"},{key:[99,97,112,100,111,116,59],value:"⩀"},{key:[99,97,112,115,59],value:"∩︀"},{key:[99,97,114,101,116,59],value:"⁁"},{key:[99,97,114,111,110,59],value:"ˇ"},{key:[99,99,97,112,115,59],value:"⩍"},{key:[99,99,97,114,111,110,59],value:"č"},{key:[99,99,101,100,105,108,59],value:"ç"},{key:[99,99,105,114,99,59],value:"ĉ"},{key:[99,99,117,112,115,59],value:"⩌"},{key:[99,99,117,112,115,115,109,59],value:"⩐"},{key:[99,100,111,116,59],value:"ċ"},{key:[99,101,100,105,108,59],value:"¸"},{key:[99,101,109,112,116,121,118,59],value:"⦲"},{key:[99,101,110,116,59],value:"¢"},{key:[99,101,110,116,101,114,100,111,116,59],value:"·"},{key:[99,102,114,59],value:"𝔠"},{key:[99,104,99,121,59],value:"ч"},{key:[99,104,101,99,107,59],value:"✓"},{key:[99,104,101,99,107,109,97,114,107,59],value:"✓"},{key:[99,104,105,59],value:"χ"},{key:[99,105,114,59],value:"○"},{key:[99,105,114,69,59],value:"⧃"},{key:[99,105,114,99,59],value:"ˆ"},{key:[99,105,114,99,101,113,59],value:"≗"},{key:[99,105,114,99,108,101,97,114,114,111,119,108,101,102,116,59],value:"↺"},{key:[99,105,114,99,108,101,97,114,114,111,119,114,105,103,104,116,59],value:"↻"},{key:[99,105,114,99,108,101,100,82,59],value:"®"},{key:[99,105,114,99,108,101,100,83,59],value:"Ⓢ"},{key:[99,105,114,99,108,101,100,97,115,116,59],value:"⊛"},{key:[99,105,114,99,108,101,100,99,105,114,99,59],value:"⊚"},{key:[99,105,114,99,108,101,100,100,97,115,104,59],value:"⊝"},{key:[99,105,114,101,59],value:"≗"},{key:[99,105,114,102,110,105,110,116,59],value:"⨐"},{key:[99,105,114,109,105,100,59],value:"⫯"},{key:[99,105,114,115,99,105,114,59],value:"⧂"},{key:[99,108,117,98,115,59],value:"♣"},{key:[99,108,117,98,115,117,105,116,59],value:"♣"},{key:[99,111,108,111,110,59],value:":"},{key:[99,111,108,111,110,101,59],value:"≔"},{key:[99,111,108,111,110,101,113,59],value:"≔"},{key:[99,111,109,109,97,59],value:","},{key:[99,111,109,109,97,116,59],value:"@"},{key:[99,111,109,112,59],value:"∁"},{key:[99,111,109,112,102,110,59],value:"∘"},{key:[99,111,109,112,108,101,109,101,110,116,59],value:"∁"},{key:[99,111,109,112,108,101,120,101,115,59],value:"ℂ"},{key:[99,111,110,103,59],value:"≅"},{key:[99,111,110,103,100,111,116,59],value:"⩭"},{key:[99,111,110,105,110,116,59],value:"∮"},{key:[99,111,112,102,59],value:"𝕔"},{key:[99,111,112,114,111,100,59],value:"∐"},{key:[99,111,112,121,59],value:"©"},{key:[99,111,112,121,115,114,59],value:"℗"},{key:[99,114,97,114,114,59],value:"↵"},{key:[99,114,111,115,115,59],value:"✗"},{key:[99,115,99,114,59],value:"𝒸"},{key:[99,115,117,98,59],value:"⫏"},{key:[99,115,117,98,101,59],value:"⫑"},{key:[99,115,117,112,59],value:"⫐"},{key:[99,115,117,112,101,59],value:"⫒"},{key:[99,116,100,111,116,59],value:"⋯"},{key:[99,117,100,97,114,114,108,59],value:"⤸"},{key:[99,117,100,97,114,114,114,59],value:"⤵"},{key:[99,117,101,112,114,59],value:"⋞"},{key:[99,117,101,115,99,59],value:"⋟"},{key:[99,117,108,97,114,114,59],value:"↶"},{key:[99,117,108,97,114,114,112,59],value:"⤽"},{key:[99,117,112,59],value:"∪"},{key:[99,117,112,98,114,99,97,112,59],value:"⩈"},{key:[99,117,112,99,97,112,59],value:"⩆"},{key:[99,117,112,99,117,112,59],value:"⩊"},{key:[99,117,112,100,111,116,59],value:"⊍"},{key:[99,117,112,111,114,59],value:"⩅"},{key:[99,117,112,115,59],value:"∪︀"},{key:[99,117,114,97,114,114,59],value:"↷"},{key:[99,117,114,97,114,114,109,59],value:"⤼"},{key:[99,117,114,108,121,101,113,112,114,101,99,59],value:"⋞"},{key:[99,117,114,108,121,101,113,115,117,99,99,59],value:"⋟"},{key:[99,117,114,108,121,118,101,101,59],value:"⋎"},{key:[99,117,114,108,121,119,101,100,103,101,59],value:"⋏"},{key:[99,117,114,114,101,110,59],value:"¤"},{key:[99,117,114,118,101,97,114,114,111,119,108,101,102,116,59],value:"↶"},{key:[99,117,114,118,101,97,114,114,111,119,114,105,103,104,116,59],value:"↷"},{key:[99,117,118,101,101,59],value:"⋎"},{key:[99,117,119,101,100,59],value:"⋏"},{key:[99,119,99,111,110,105,110,116,59],value:"∲"},{key:[99,119,105,110,116,59],value:"∱"},{key:[99,121,108,99,116,121,59],value:"⌭"},{key:[100,65,114,114,59],value:"⇓"},{key:[100,72,97,114,59],value:"⥥"},{key:[100,97,103,103,101,114,59],value:"†"},{key:[100,97,108,101,116,104,59],value:"ℸ"},{key:[100,97,114,114,59],value:"↓"},{key:[100,97,115,104,59],value:"‐"},{key:[100,97,115,104,118,59],value:"⊣"},{key:[100,98,107,97,114,111,119,59],value:"⤏"},{key:[100,98,108,97,99,59],value:"˝"},{key:[100,99,97,114,111,110,59],value:"ď"},{key:[100,99,121,59],value:"д"},{key:[100,100,59],value:"ⅆ"},{key:[100,100,97,103,103,101,114,59],value:"‡"},{key:[100,100,97,114,114,59],value:"⇊"},{key:[100,100,111,116,115,101,113,59],value:"⩷"},{key:[100,101,103,59],value:"°"},{key:[100,101,108,116,97,59],value:"δ"},{key:[100,101,109,112,116,121,118,59],value:"⦱"},{key:[100,102,105,115,104,116,59],value:"⥿"},{key:[100,102,114,59],value:"𝔡"},{key:[100,104,97,114,108,59],value:"⇃"},{key:[100,104,97,114,114,59],value:"⇂"},{key:[100,105,97,109,59],value:"⋄"},{key:[100,105,97,109,111,110,100,59],value:"⋄"},{key:[100,105,97,109,111,110,100,115,117,105,116,59],value:"♦"},{key:[100,105,97,109,115,59],value:"♦"},{key:[100,105,101,59],value:"¨"},{key:[100,105,103,97,109,109,97,59],value:"ϝ"},{key:[100,105,115,105,110,59],value:"⋲"},{key:[100,105,118,59],value:"÷"},{key:[100,105,118,105,100,101,59],value:"÷"},{key:[100,105,118,105,100,101,111,110,116,105,109,101,115,59],value:"⋇"},{key:[100,105,118,111,110,120,59],value:"⋇"},{key:[100,106,99,121,59],value:"ђ"},{key:[100,108,99,111,114,110,59],value:"⌞"},{key:[100,108,99,114,111,112,59],value:"⌍"},{key:[100,111,108,108,97,114,59],value:"$"},{key:[100,111,112,102,59],value:"𝕕"},{key:[100,111,116,59],value:"˙"},{key:[100,111,116,101,113,59],value:"≐"},{key:[100,111,116,101,113,100,111,116,59],value:"≑"},{key:[100,111,116,109,105,110,117,115,59],value:"∸"},{key:[100,111,116,112,108,117,115,59],value:"∔"},{key:[100,111,116,115,113,117,97,114,101,59],value:"⊡"},{key:[100,111,117,98,108,101,98,97,114,119,101,100,103,101,59],value:"⌆"},{key:[100,111,119,110,97,114,114,111,119,59],value:"↓"},{key:[100,111,119,110,100,111,119,110,97,114,114,111,119,115,59],value:"⇊"},{key:[100,111,119,110,104,97,114,112,111,111,110,108,101,102,116,59],value:"⇃"},{key:[100,111,119,110,104,97,114,112,111,111,110,114,105,103,104,116,59],value:"⇂"},{key:[100,114,98,107,97,114,111,119,59],value:"⤐"},{key:[100,114,99,111,114,110,59],value:"⌟"},{key:[100,114,99,114,111,112,59],value:"⌌"},{key:[100,115,99,114,59],value:"𝒹"},{key:[100,115,99,121,59],value:"ѕ"},{key:[100,115,111,108,59],value:"⧶"},{key:[100,115,116,114,111,107,59],value:"đ"},{key:[100,116,100,111,116,59],value:"⋱"},{key:[100,116,114,105,59],value:"▿"},{key:[100,116,114,105,102,59],value:"▾"},{key:[100,117,97,114,114,59],value:"⇵"},{key:[100,117,104,97,114,59],value:"⥯"},{key:[100,119,97,110,103,108,101,59],value:"⦦"},{key:[100,122,99,121,59],value:"џ"},{key:[100,122,105,103,114,97,114,114,59],value:"⟿"},{key:[101,68,68,111,116,59],value:"⩷"},{key:[101,68,111,116,59],value:"≑"},{key:[101,97,99,117,116,101,59],value:"é"},{key:[101,97,115,116,101,114,59],value:"⩮"},{key:[101,99,97,114,111,110,59],value:"ě"},{key:[101,99,105,114,59],value:"≖"},{key:[101,99,105,114,99,59],value:"ê"},{key:[101,99,111,108,111,110,59],value:"≕"},{key:[101,99,121,59],value:"э"},{key:[101,100,111,116,59],value:"ė"},{key:[101,101,59],value:"ⅇ"},{key:[101,102,68,111,116,59],value:"≒"},{key:[101,102,114,59],value:"𝔢"},{key:[101,103,59],value:"⪚"},{key:[101,103,114,97,118,101,59],value:"è"},{key:[101,103,115,59],value:"⪖"},{key:[101,103,115,100,111,116,59],value:"⪘"},{key:[101,108,59],value:"⪙"},{key:[101,108,105,110,116,101,114,115,59],value:"⏧"},{key:[101,108,108,59],value:"ℓ"},{key:[101,108,115,59],value:"⪕"},{key:[101,108,115,100,111,116,59],value:"⪗"},{key:[101,109,97,99,114,59],value:"ē"},{key:[101,109,112,116,121,59],value:"∅"},{key:[101,109,112,116,121,115,101,116,59],value:"∅"},{key:[101,109,112,116,121,118,59],value:"∅"},{key:[101,109,115,112,49,51,59],value:" "},{key:[101,109,115,112,49,52,59],value:" "},{key:[101,109,115,112,59],value:" "},{key:[101,110,103,59],value:"ŋ"},{key:[101,110,115,112,59],value:" "},{key:[101,111,103,111,110,59],value:"ę"},{key:[101,111,112,102,59],value:"𝕖"},{key:[101,112,97,114,59],value:"⋕"},{key:[101,112,97,114,115,108,59],value:"⧣"},{key:[101,112,108,117,115,59],value:"⩱"},{key:[101,112,115,105,59],value:"ε"},{key:[101,112,115,105,108,111,110,59],value:"ε"},{key:[101,112,115,105,118,59],value:"ϵ"},{key:[101,113,99,105,114,99,59],value:"≖"},{key:[101,113,99,111,108,111,110,59],value:"≕"},{key:[101,113,115,105,109,59],value:"≂"},{key:[101,113,115,108,97,110,116,103,116,114,59],value:"⪖"},{key:[101,113,115,108,97,110,116,108,101,115,115,59],value:"⪕"},{key:[101,113,117,97,108,115,59],value:"="},{key:[101,113,117,101,115,116,59],value:"≟"},{key:[101,113,117,105,118,59],value:"≡"},{key:[101,113,117,105,118,68,68,59],value:"⩸"},{key:[101,113,118,112,97,114,115,108,59],value:"⧥"},{key:[101,114,68,111,116,59],value:"≓"},{key:[101,114,97,114,114,59],value:"⥱"},{key:[101,115,99,114,59],value:"ℯ"},{key:[101,115,100,111,116,59],value:"≐"},{key:[101,115,105,109,59],value:"≂"},{key:[101,116,97,59],value:"η"},{key:[101,116,104,59],value:"ð"},{key:[101,117,109,108,59],value:"ë"},{key:[101,117,114,111,59],value:"€"},{key:[101,120,99,108,59],value:"!"},{key:[101,120,105,115,116,59],value:"∃"},{key:[101,120,112,101,99,116,97,116,105,111,110,59],value:"ℰ"},{key:[101,120,112,111,110,101,110,116,105,97,108,101,59],value:"ⅇ"},{key:[102,97,108,108,105,110,103,100,111,116,115,101,113,59],value:"≒"},{key:[102,99,121,59],value:"ф"},{key:[102,101,109,97,108,101,59],value:"♀"},{key:[102,102,105,108,105,103,59],value:"ffi"},{key:[102,102,108,105,103,59],value:"ff"},{key:[102,102,108,108,105,103,59],value:"ffl"},{key:[102,102,114,59],value:"𝔣"},{key:[102,105,108,105,103,59],value:"fi"},{key:[102,106,108,105,103,59],value:"fj"},{key:[102,108,97,116,59],value:"♭"},{key:[102,108,108,105,103,59],value:"fl"},{key:[102,108,116,110,115,59],value:"▱"},{key:[102,110,111,102,59],value:"ƒ"},{key:[102,111,112,102,59],value:"𝕗"},{key:[102,111,114,97,108,108,59],value:"∀"},{key:[102,111,114,107,59],value:"⋔"},{key:[102,111,114,107,118,59],value:"⫙"},{key:[102,112,97,114,116,105,110,116,59],value:"⨍"},{key:[102,114,97,99,49,50,59],value:"½"},{key:[102,114,97,99,49,51,59],value:"⅓"},{key:[102,114,97,99,49,52,59],value:"¼"},{key:[102,114,97,99,49,53,59],value:"⅕"},{key:[102,114,97,99,49,54,59],value:"⅙"},{key:[102,114,97,99,49,56,59],value:"⅛"},{key:[102,114,97,99,50,51,59],value:"⅔"},{key:[102,114,97,99,50,53,59],value:"⅖"},{key:[102,114,97,99,51,52,59],value:"¾"},{key:[102,114,97,99,51,53,59],value:"⅗"},{key:[102,114,97,99,51,56,59],value:"⅜"},{key:[102,114,97,99,52,53,59],value:"⅘"},{key:[102,114,97,99,53,54,59],value:"⅚"},{key:[102,114,97,99,53,56,59],value:"⅝"},{key:[102,114,97,99,55,56,59],value:"⅞"},{key:[102,114,97,115,108,59],value:"⁄"},{key:[102,114,111,119,110,59],value:"⌢"},{key:[102,115,99,114,59],value:"𝒻"},{key:[103,69,59],value:"≧"},{key:[103,69,108,59],value:"⪌"},{key:[103,97,99,117,116,101,59],value:"ǵ"},{key:[103,97,109,109,97,59],value:"γ"},{key:[103,97,109,109,97,100,59],value:"ϝ"},{key:[103,97,112,59],value:"⪆"},{key:[103,98,114,101,118,101,59],value:"ğ"},{key:[103,99,105,114,99,59],value:"ĝ"},{key:[103,99,121,59],value:"г"},{key:[103,100,111,116,59],value:"ġ"},{key:[103,101,59],value:"≥"},{key:[103,101,108,59],value:"⋛"},{key:[103,101,113,59],value:"≥"},{key:[103,101,113,113,59],value:"≧"},{key:[103,101,113,115,108,97,110,116,59],value:"⩾"},{key:[103,101,115,59],value:"⩾"},{key:[103,101,115,99,99,59],value:"⪩"},{key:[103,101,115,100,111,116,59],value:"⪀"},{key:[103,101,115,100,111,116,111,59],value:"⪂"},{key:[103,101,115,100,111,116,111,108,59],value:"⪄"},{key:[103,101,115,108,59],value:"⋛︀"},{key:[103,101,115,108,101,115,59],value:"⪔"},{key:[103,102,114,59],value:"𝔤"},{key:[103,103,59],value:"≫"},{key:[103,103,103,59],value:"⋙"},{key:[103,105,109,101,108,59],value:"ℷ"},{key:[103,106,99,121,59],value:"ѓ"},{key:[103,108,59],value:"≷"},{key:[103,108,69,59],value:"⪒"},{key:[103,108,97,59],value:"⪥"},{key:[103,108,106,59],value:"⪤"},{key:[103,110,69,59],value:"≩"},{key:[103,110,97,112,59],value:"⪊"},{key:[103,110,97,112,112,114,111,120,59],value:"⪊"},{key:[103,110,101,59],value:"⪈"},{key:[103,110,101,113,59],value:"⪈"},{key:[103,110,101,113,113,59],value:"≩"},{key:[103,110,115,105,109,59],value:"⋧"},{key:[103,111,112,102,59],value:"𝕘"},{key:[103,114,97,118,101,59],value:"`"},{key:[103,115,99,114,59],value:"ℊ"},{key:[103,115,105,109,59],value:"≳"},{key:[103,115,105,109,101,59],value:"⪎"},{key:[103,115,105,109,108,59],value:"⪐"},{key:[103,116,59],value:">"},{key:[103,116,99,99,59],value:"⪧"},{key:[103,116,99,105,114,59],value:"⩺"},{key:[103,116,100,111,116,59],value:"⋗"},{key:[103,116,108,80,97,114,59],value:"⦕"},{key:[103,116,113,117,101,115,116,59],value:"⩼"},{key:[103,116,114,97,112,112,114,111,120,59],value:"⪆"},{key:[103,116,114,97,114,114,59],value:"⥸"},{key:[103,116,114,100,111,116,59],value:"⋗"},{key:[103,116,114,101,113,108,101,115,115,59],value:"⋛"},{key:[103,116,114,101,113,113,108,101,115,115,59],value:"⪌"},{key:[103,116,114,108,101,115,115,59],value:"≷"},{key:[103,116,114,115,105,109,59],value:"≳"},{key:[103,118,101,114,116,110,101,113,113,59],value:"≩︀"},{key:[103,118,110,69,59],value:"≩︀"},{key:[104,65,114,114,59],value:"⇔"},{key:[104,97,105,114,115,112,59],value:" "},{key:[104,97,108,102,59],value:"½"},{key:[104,97,109,105,108,116,59],value:"ℋ"},{key:[104,97,114,100,99,121,59],value:"ъ"},{key:[104,97,114,114,59],value:"↔"},{key:[104,97,114,114,99,105,114,59],value:"⥈"},{key:[104,97,114,114,119,59],value:"↭"},{key:[104,98,97,114,59],value:"ℏ"},{key:[104,99,105,114,99,59],value:"ĥ"},{key:[104,101,97,114,116,115,59],value:"♥"},{key:[104,101,97,114,116,115,117,105,116,59],value:"♥"},{key:[104,101,108,108,105,112,59],value:"…"},{key:[104,101,114,99,111,110,59],value:"⊹"},{key:[104,102,114,59],value:"𝔥"},{key:[104,107,115,101,97,114,111,119,59],value:"⤥"},{key:[104,107,115,119,97,114,111,119,59],value:"⤦"},{key:[104,111,97,114,114,59],value:"⇿"},{key:[104,111,109,116,104,116,59],value:"∻"},{key:[104,111,111,107,108,101,102,116,97,114,114,111,119,59],value:"↩"},{key:[104,111,111,107,114,105,103,104,116,97,114,114,111,119,59],value:"↪"},{key:[104,111,112,102,59],value:"𝕙"},{key:[104,111,114,98,97,114,59],value:"―"},{key:[104,115,99,114,59],value:"𝒽"},{key:[104,115,108,97,115,104,59],value:"ℏ"},{key:[104,115,116,114,111,107,59],value:"ħ"},{key:[104,121,98,117,108,108,59],value:"⁃"},{key:[104,121,112,104,101,110,59],value:"‐"},{key:[105,97,99,117,116,101,59],value:"í"},{key:[105,99,59],value:"⁣"},{key:[105,99,105,114,99,59],value:"î"},{key:[105,99,121,59],value:"и"},{key:[105,101,99,121,59],value:"е"},{key:[105,101,120,99,108,59],value:"¡"},{key:[105,102,102,59],value:"⇔"},{key:[105,102,114,59],value:"𝔦"},{key:[105,103,114,97,118,101,59],value:"ì"},{key:[105,105,59],value:"ⅈ"},{key:[105,105,105,105,110,116,59],value:"⨌"},{key:[105,105,105,110,116,59],value:"∭"},{key:[105,105,110,102,105,110,59],value:"⧜"},{key:[105,105,111,116,97,59],value:"℩"},{key:[105,106,108,105,103,59],value:"ij"},{key:[105,109,97,99,114,59],value:"ī"},{key:[105,109,97,103,101,59],value:"ℑ"},{key:[105,109,97,103,108,105,110,101,59],value:"ℐ"},{key:[105,109,97,103,112,97,114,116,59],value:"ℑ"},{key:[105,109,97,116,104,59],value:"ı"},{key:[105,109,111,102,59],value:"⊷"},{key:[105,109,112,101,100,59],value:"Ƶ"},{key:[105,110,59],value:"∈"},{key:[105,110,99,97,114,101,59],value:"℅"},{key:[105,110,102,105,110,59],value:"∞"},{key:[105,110,102,105,110,116,105,101,59],value:"⧝"},{key:[105,110,111,100,111,116,59],value:"ı"},{key:[105,110,116,59],value:"∫"},{key:[105,110,116,99,97,108,59],value:"⊺"},{key:[105,110,116,101,103,101,114,115,59],value:"ℤ"},{key:[105,110,116,101,114,99,97,108,59],value:"⊺"},{key:[105,110,116,108,97,114,104,107,59],value:"⨗"},{key:[105,110,116,112,114,111,100,59],value:"⨼"},{key:[105,111,99,121,59],value:"ё"},{key:[105,111,103,111,110,59],value:"į"},{key:[105,111,112,102,59],value:"𝕚"},{key:[105,111,116,97,59],value:"ι"},{key:[105,112,114,111,100,59],value:"⨼"},{key:[105,113,117,101,115,116,59],value:"¿"},{key:[105,115,99,114,59],value:"𝒾"},{key:[105,115,105,110,59],value:"∈"},{key:[105,115,105,110,69,59],value:"⋹"},{key:[105,115,105,110,100,111,116,59],value:"⋵"},{key:[105,115,105,110,115,59],value:"⋴"},{key:[105,115,105,110,115,118,59],value:"⋳"},{key:[105,115,105,110,118,59],value:"∈"},{key:[105,116,59],value:"⁢"},{key:[105,116,105,108,100,101,59],value:"ĩ"},{key:[105,117,107,99,121,59],value:"і"},{key:[105,117,109,108,59],value:"ï"},{key:[106,99,105,114,99,59],value:"ĵ"},{key:[106,99,121,59],value:"й"},{key:[106,102,114,59],value:"𝔧"},{key:[106,109,97,116,104,59],value:"ȷ"},{key:[106,111,112,102,59],value:"𝕛"},{key:[106,115,99,114,59],value:"𝒿"},{key:[106,115,101,114,99,121,59],value:"ј"},{key:[106,117,107,99,121,59],value:"є"},{key:[107,97,112,112,97,59],value:"κ"},{key:[107,97,112,112,97,118,59],value:"ϰ"},{key:[107,99,101,100,105,108,59],value:"ķ"},{key:[107,99,121,59],value:"к"},{key:[107,102,114,59],value:"𝔨"},{key:[107,103,114,101,101,110,59],value:"ĸ"},{key:[107,104,99,121,59],value:"х"},{key:[107,106,99,121,59],value:"ќ"},{key:[107,111,112,102,59],value:"𝕜"},{key:[107,115,99,114,59],value:"𝓀"},{key:[108,65,97,114,114,59],value:"⇚"},{key:[108,65,114,114,59],value:"⇐"},{key:[108,65,116,97,105,108,59],value:"⤛"},{key:[108,66,97,114,114,59],value:"⤎"},{key:[108,69,59],value:"≦"},{key:[108,69,103,59],value:"⪋"},{key:[108,72,97,114,59],value:"⥢"},{key:[108,97,99,117,116,101,59],value:"ĺ"},{key:[108,97,101,109,112,116,121,118,59],value:"⦴"},{key:[108,97,103,114,97,110,59],value:"ℒ"},{key:[108,97,109,98,100,97,59],value:"λ"},{key:[108,97,110,103,59],value:"⟨"},{key:[108,97,110,103,100,59],value:"⦑"},{key:[108,97,110,103,108,101,59],value:"⟨"},{key:[108,97,112,59],value:"⪅"},{key:[108,97,113,117,111,59],value:"«"},{key:[108,97,114,114,59],value:"←"},{key:[108,97,114,114,98,59],value:"⇤"},{key:[108,97,114,114,98,102,115,59],value:"⤟"},{key:[108,97,114,114,102,115,59],value:"⤝"},{key:[108,97,114,114,104,107,59],value:"↩"},{key:[108,97,114,114,108,112,59],value:"↫"},{key:[108,97,114,114,112,108,59],value:"⤹"},{key:[108,97,114,114,115,105,109,59],value:"⥳"},{key:[108,97,114,114,116,108,59],value:"↢"},{key:[108,97,116,59],value:"⪫"},{key:[108,97,116,97,105,108,59],value:"⤙"},{key:[108,97,116,101,59],value:"⪭"},{key:[108,97,116,101,115,59],value:"⪭︀"},{key:[108,98,97,114,114,59],value:"⤌"},{key:[108,98,98,114,107,59],value:"❲"},{key:[108,98,114,97,99,101,59],value:"{ "},{key:[108,98,114,97,99,107,59],value:"["},{key:[108,98,114,107,101,59],value:"⦋"},{key:[108,98,114,107,115,108,100,59],value:"⦏"},{key:[108,98,114,107,115,108,117,59],value:"⦍"},{key:[108,99,97,114,111,110,59],value:"ľ"},{key:[108,99,101,100,105,108,59],value:"ļ"},{key:[108,99,101,105,108,59],value:"⌈"},{key:[108,99,117,98,59],value:"{ "},{key:[108,99,121,59],value:"л"},{key:[108,100,99,97,59],value:"⤶"},{key:[108,100,113,117,111,59],value:"“"},{key:[108,100,113,117,111,114,59],value:"„"},{key:[108,100,114,100,104,97,114,59],value:"⥧"},{key:[108,100,114,117,115,104,97,114,59],value:"⥋"},{key:[108,100,115,104,59],value:"↲"},{key:[108,101,59],value:"≤"},{key:[108,101,102,116,97,114,114,111,119,59],value:"←"},{key:[108,101,102,116,97,114,114,111,119,116,97,105,108,59],value:"↢"},{key:[108,101,102,116,104,97,114,112,111,111,110,100,111,119,110,59],value:"↽"},{key:[108,101,102,116,104,97,114,112,111,111,110,117,112,59],value:"↼"},{key:[108,101,102,116,108,101,102,116,97,114,114,111,119,115,59],value:"⇇"},{key:[108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"↔"},{key:[108,101,102,116,114,105,103,104,116,97,114,114,111,119,115,59],value:"⇆"},{key:[108,101,102,116,114,105,103,104,116,104,97,114,112,111,111,110,115,59],value:"⇋"},{key:[108,101,102,116,114,105,103,104,116,115,113,117,105,103,97,114,114,111,119,59],value:"↭"},{key:[108,101,102,116,116,104,114,101,101,116,105,109,101,115,59],value:"⋋"},{key:[108,101,103,59],value:"⋚"},{key:[108,101,113,59],value:"≤"},{key:[108,101,113,113,59],value:"≦"},{key:[108,101,113,115,108,97,110,116,59],value:"⩽"},{key:[108,101,115,59],value:"⩽"},{key:[108,101,115,99,99,59],value:"⪨"},{key:[108,101,115,100,111,116,59],value:"⩿"},{key:[108,101,115,100,111,116,111,59],value:"⪁"},{key:[108,101,115,100,111,116,111,114,59],value:"⪃"},{key:[108,101,115,103,59],value:"⋚︀"},{key:[108,101,115,103,101,115,59],value:"⪓"},{key:[108,101,115,115,97,112,112,114,111,120,59],value:"⪅"},{key:[108,101,115,115,100,111,116,59],value:"⋖"},{key:[108,101,115,115,101,113,103,116,114,59],value:"⋚"},{key:[108,101,115,115,101,113,113,103,116,114,59],value:"⪋"},{key:[108,101,115,115,103,116,114,59],value:"≶"},{key:[108,101,115,115,115,105,109,59],value:"≲"},{key:[108,102,105,115,104,116,59],value:"⥼"},{key:[108,102,108,111,111,114,59],value:"⌊"},{key:[108,102,114,59],value:"𝔩"},{key:[108,103,59],value:"≶"},{key:[108,103,69,59],value:"⪑"},{key:[108,104,97,114,100,59],value:"↽"},{key:[108,104,97,114,117,59],value:"↼"},{key:[108,104,97,114,117,108,59],value:"⥪"},{key:[108,104,98,108,107,59],value:"▄"},{key:[108,106,99,121,59],value:"љ"},{key:[108,108,59],value:"≪"},{key:[108,108,97,114,114,59],value:"⇇"},{key:[108,108,99,111,114,110,101,114,59],value:"⌞"},{key:[108,108,104,97,114,100,59],value:"⥫"},{key:[108,108,116,114,105,59],value:"◺"},{key:[108,109,105,100,111,116,59],value:"ŀ"},{key:[108,109,111,117,115,116,59],value:"⎰"},{key:[108,109,111,117,115,116,97,99,104,101,59],value:"⎰"},{key:[108,110,69,59],value:"≨"},{key:[108,110,97,112,59],value:"⪉"},{key:[108,110,97,112,112,114,111,120,59],value:"⪉"},{key:[108,110,101,59],value:"⪇"},{key:[108,110,101,113,59],value:"⪇"},{key:[108,110,101,113,113,59],value:"≨"},{key:[108,110,115,105,109,59],value:"⋦"},{key:[108,111,97,110,103,59],value:"⟬"},{key:[108,111,97,114,114,59],value:"⇽"},{key:[108,111,98,114,107,59],value:"⟦"},{key:[108,111,110,103,108,101,102,116,97,114,114,111,119,59],value:"⟵"},{key:[108,111,110,103,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⟷"},{key:[108,111,110,103,109,97,112,115,116,111,59],value:"⟼"},{key:[108,111,110,103,114,105,103,104,116,97,114,114,111,119,59],value:"⟶"},{key:[108,111,111,112,97,114,114,111,119,108,101,102,116,59],value:"↫"},{key:[108,111,111,112,97,114,114,111,119,114,105,103,104,116,59],value:"↬"},{key:[108,111,112,97,114,59],value:"⦅"},{key:[108,111,112,102,59],value:"𝕝"},{key:[108,111,112,108,117,115,59],value:"⨭"},{key:[108,111,116,105,109,101,115,59],value:"⨴"},{key:[108,111,119,97,115,116,59],value:"∗"},{key:[108,111,119,98,97,114,59],value:"_"},{key:[108,111,122,59],value:"◊"},{key:[108,111,122,101,110,103,101,59],value:"◊"},{key:[108,111,122,102,59],value:"⧫"},{key:[108,112,97,114,59],value:"("},{key:[108,112,97,114,108,116,59],value:"⦓"},{key:[108,114,97,114,114,59],value:"⇆"},{key:[108,114,99,111,114,110,101,114,59],value:"⌟"},{key:[108,114,104,97,114,59],value:"⇋"},{key:[108,114,104,97,114,100,59],value:"⥭"},{key:[108,114,109,59],value:"‎"},{key:[108,114,116,114,105,59],value:"⊿"},{key:[108,115,97,113,117,111,59],value:"‹"},{key:[108,115,99,114,59],value:"𝓁"},{key:[108,115,104,59],value:"↰"},{key:[108,115,105,109,59],value:"≲"},{key:[108,115,105,109,101,59],value:"⪍"},{key:[108,115,105,109,103,59],value:"⪏"},{key:[108,115,113,98,59],value:"["},{key:[108,115,113,117,111,59],value:"‘"},{key:[108,115,113,117,111,114,59],value:"‚"},{key:[108,115,116,114,111,107,59],value:"ł"},{key:[108,116,59],value:"<"},{key:[108,116,99,99,59],value:"⪦"},{key:[108,116,99,105,114,59],value:"⩹"},{key:[108,116,100,111,116,59],value:"⋖"},{key:[108,116,104,114,101,101,59],value:"⋋"},{key:[108,116,105,109,101,115,59],value:"⋉"},{key:[108,116,108,97,114,114,59],value:"⥶"},{key:[108,116,113,117,101,115,116,59],value:"⩻"},{key:[108,116,114,80,97,114,59],value:"⦖"},{key:[108,116,114,105,59],value:"◃"},{key:[108,116,114,105,101,59],value:"⊴"},{key:[108,116,114,105,102,59],value:"◂"},{key:[108,117,114,100,115,104,97,114,59],value:"⥊"},{key:[108,117,114,117,104,97,114,59],value:"⥦"},{key:[108,118,101,114,116,110,101,113,113,59],value:"≨︀"},{key:[108,118,110,69,59],value:"≨︀"},{key:[109,68,68,111,116,59],value:"∺"},{key:[109,97,99,114,59],value:"¯"},{key:[109,97,108,101,59],value:"♂"},{key:[109,97,108,116,59],value:"✠"},{key:[109,97,108,116,101,115,101,59],value:"✠"},{key:[109,97,112,59],value:"↦"},{key:[109,97,112,115,116,111,59],value:"↦"},{key:[109,97,112,115,116,111,100,111,119,110,59],value:"↧"},{key:[109,97,112,115,116,111,108,101,102,116,59],value:"↤"},{key:[109,97,112,115,116,111,117,112,59],value:"↥"},{key:[109,97,114,107,101,114,59],value:"▮"},{key:[109,99,111,109,109,97,59],value:"⨩"},{key:[109,99,121,59],value:"м"},{key:[109,100,97,115,104,59],value:"—"},{key:[109,101,97,115,117,114,101,100,97,110,103,108,101,59],value:"∡"},{key:[109,102,114,59],value:"𝔪"},{key:[109,104,111,59],value:"℧"},{key:[109,105,99,114,111,59],value:"µ"},{key:[109,105,100,59],value:"∣"},{key:[109,105,100,97,115,116,59],value:"*"},{key:[109,105,100,99,105,114,59],value:"⫰"},{key:[109,105,100,100,111,116,59],value:"·"},{key:[109,105,110,117,115,59],value:"−"},{key:[109,105,110,117,115,98,59],value:"⊟"},{key:[109,105,110,117,115,100,59],value:"∸"},{key:[109,105,110,117,115,100,117,59],value:"⨪"},{key:[109,108,99,112,59],value:"⫛"},{key:[109,108,100,114,59],value:"…"},{key:[109,110,112,108,117,115,59],value:"∓"},{key:[109,111,100,101,108,115,59],value:"⊧"},{key:[109,111,112,102,59],value:"𝕞"},{key:[109,112,59],value:"∓"},{key:[109,115,99,114,59],value:"𝓂"},{key:[109,115,116,112,111,115,59],value:"∾"},{key:[109,117,59],value:"μ"},{key:[109,117,108,116,105,109,97,112,59],value:"⊸"},{key:[109,117,109,97,112,59],value:"⊸"},{key:[110,71,103,59],value:"⋙̸"},{key:[110,71,116,59],value:"≫⃒"},{key:[110,71,116,118,59],value:"≫̸"},{key:[110,76,101,102,116,97,114,114,111,119,59],value:"⇍"},{key:[110,76,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⇎"},{key:[110,76,108,59],value:"⋘̸"},{key:[110,76,116,59],value:"≪⃒"},{key:[110,76,116,118,59],value:"≪̸"},{key:[110,82,105,103,104,116,97,114,114,111,119,59],value:"⇏"},{key:[110,86,68,97,115,104,59],value:"⊯"},{key:[110,86,100,97,115,104,59],value:"⊮"},{key:[110,97,98,108,97,59],value:"∇"},{key:[110,97,99,117,116,101,59],value:"ń"},{key:[110,97,110,103,59],value:"∠⃒"},{key:[110,97,112,59],value:"≉"},{key:[110,97,112,69,59],value:"⩰̸"},{key:[110,97,112,105,100,59],value:"≋̸"},{key:[110,97,112,111,115,59],value:"ʼn"},{key:[110,97,112,112,114,111,120,59],value:"≉"},{key:[110,97,116,117,114,59],value:"♮"},{key:[110,97,116,117,114,97,108,59],value:"♮"},{key:[110,97,116,117,114,97,108,115,59],value:"ℕ"},{key:[110,98,115,112,59],value:" "},{key:[110,98,117,109,112,59],value:"≎̸"},{key:[110,98,117,109,112,101,59],value:"≏̸"},{key:[110,99,97,112,59],value:"⩃"},{key:[110,99,97,114,111,110,59],value:"ň"},{key:[110,99,101,100,105,108,59],value:"ņ"},{key:[110,99,111,110,103,59],value:"≇"},{key:[110,99,111,110,103,100,111,116,59],value:"⩭̸"},{key:[110,99,117,112,59],value:"⩂"},{key:[110,99,121,59],value:"н"},{key:[110,100,97,115,104,59],value:"–"},{key:[110,101,59],value:"≠"},{key:[110,101,65,114,114,59],value:"⇗"},{key:[110,101,97,114,104,107,59],value:"⤤"},{key:[110,101,97,114,114,59],value:"↗"},{key:[110,101,97,114,114,111,119,59],value:"↗"},{key:[110,101,100,111,116,59],value:"≐̸"},{key:[110,101,113,117,105,118,59],value:"≢"},{key:[110,101,115,101,97,114,59],value:"⤨"},{key:[110,101,115,105,109,59],value:"≂̸"},{key:[110,101,120,105,115,116,59],value:"∄"},{key:[110,101,120,105,115,116,115,59],value:"∄"},{key:[110,102,114,59],value:"𝔫"},{key:[110,103,69,59],value:"≧̸"},{key:[110,103,101,59],value:"≱"},{key:[110,103,101,113,59],value:"≱"},{key:[110,103,101,113,113,59],value:"≧̸"},{key:[110,103,101,113,115,108,97,110,116,59],value:"⩾̸"},{key:[110,103,101,115,59],value:"⩾̸"},{key:[110,103,115,105,109,59],value:"≵"},{key:[110,103,116,59],value:"≯"},{key:[110,103,116,114,59],value:"≯"},{key:[110,104,65,114,114,59],value:"⇎"},{key:[110,104,97,114,114,59],value:"↮"},{key:[110,104,112,97,114,59],value:"⫲"},{key:[110,105,59],value:"∋"},{key:[110,105,115,59],value:"⋼"},{key:[110,105,115,100,59],value:"⋺"},{key:[110,105,118,59],value:"∋"},{key:[110,106,99,121,59],value:"њ"},{key:[110,108,65,114,114,59],value:"⇍"},{key:[110,108,69,59],value:"≦̸"},{key:[110,108,97,114,114,59],value:"↚"},{key:[110,108,100,114,59],value:"‥"},{key:[110,108,101,59],value:"≰"},{key:[110,108,101,102,116,97,114,114,111,119,59],value:"↚"},{key:[110,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"↮"},{key:[110,108,101,113,59],value:"≰"},{key:[110,108,101,113,113,59],value:"≦̸"},{key:[110,108,101,113,115,108,97,110,116,59],value:"⩽̸"},{key:[110,108,101,115,59],value:"⩽̸"},{key:[110,108,101,115,115,59],value:"≮"},{key:[110,108,115,105,109,59],value:"≴"},{key:[110,108,116,59],value:"≮"},{key:[110,108,116,114,105,59],value:"⋪"},{key:[110,108,116,114,105,101,59],value:"⋬"},{key:[110,109,105,100,59],value:"∤"},{key:[110,111,112,102,59],value:"𝕟"},{key:[110,111,116,59],value:"¬"},{key:[110,111,116,105,110,59],value:"∉"},{key:[110,111,116,105,110,69,59],value:"⋹̸"},{key:[110,111,116,105,110,100,111,116,59],value:"⋵̸"},{key:[110,111,116,105,110,118,97,59],value:"∉"},{key:[110,111,116,105,110,118,98,59],value:"⋷"},{key:[110,111,116,105,110,118,99,59],value:"⋶"},{key:[110,111,116,110,105,59],value:"∌"},{key:[110,111,116,110,105,118,97,59],value:"∌"},{key:[110,111,116,110,105,118,98,59],value:"⋾"},{key:[110,111,116,110,105,118,99,59],value:"⋽"},{key:[110,112,97,114,59],value:"∦"},{key:[110,112,97,114,97,108,108,101,108,59],value:"∦"},{key:[110,112,97,114,115,108,59],value:"⫽⃥"},{key:[110,112,97,114,116,59],value:"∂̸"},{key:[110,112,111,108,105,110,116,59],value:"⨔"},{key:[110,112,114,59],value:"⊀"},{key:[110,112,114,99,117,101,59],value:"⋠"},{key:[110,112,114,101,59],value:"⪯̸"},{key:[110,112,114,101,99,59],value:"⊀"},{key:[110,112,114,101,99,101,113,59],value:"⪯̸"},{key:[110,114,65,114,114,59],value:"⇏"},{key:[110,114,97,114,114,59],value:"↛"},{key:[110,114,97,114,114,99,59],value:"⤳̸"},{key:[110,114,97,114,114,119,59],value:"↝̸"},{key:[110,114,105,103,104,116,97,114,114,111,119,59],value:"↛"},{key:[110,114,116,114,105,59],value:"⋫"},{key:[110,114,116,114,105,101,59],value:"⋭"},{key:[110,115,99,59],value:"⊁"},{key:[110,115,99,99,117,101,59],value:"⋡"},{key:[110,115,99,101,59],value:"⪰̸"},{key:[110,115,99,114,59],value:"𝓃"},{key:[110,115,104,111,114,116,109,105,100,59],value:"∤"},{key:[110,115,104,111,114,116,112,97,114,97,108,108,101,108,59],value:"∦"},{key:[110,115,105,109,59],value:"≁"},{key:[110,115,105,109,101,59],value:"≄"},{key:[110,115,105,109,101,113,59],value:"≄"},{key:[110,115,109,105,100,59],value:"∤"},{key:[110,115,112,97,114,59],value:"∦"},{key:[110,115,113,115,117,98,101,59],value:"⋢"},{key:[110,115,113,115,117,112,101,59],value:"⋣"},{key:[110,115,117,98,59],value:"⊄"},{key:[110,115,117,98,69,59],value:"⫅̸"},{key:[110,115,117,98,101,59],value:"⊈"},{key:[110,115,117,98,115,101,116,59],value:"⊂⃒"},{key:[110,115,117,98,115,101,116,101,113,59],value:"⊈"},{key:[110,115,117,98,115,101,116,101,113,113,59],value:"⫅̸"},{key:[110,115,117,99,99,59],value:"⊁"},{key:[110,115,117,99,99,101,113,59],value:"⪰̸"},{key:[110,115,117,112,59],value:"⊅"},{key:[110,115,117,112,69,59],value:"⫆̸"},{key:[110,115,117,112,101,59],value:"⊉"},{key:[110,115,117,112,115,101,116,59],value:"⊃⃒"},{key:[110,115,117,112,115,101,116,101,113,59],value:"⊉"},{key:[110,115,117,112,115,101,116,101,113,113,59],value:"⫆̸"},{key:[110,116,103,108,59],value:"≹"},{key:[110,116,105,108,100,101,59],value:"ñ"},{key:[110,116,108,103,59],value:"≸"},{key:[110,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"⋪"},{key:[110,116,114,105,97,110,103,108,101,108,101,102,116,101,113,59],value:"⋬"},{key:[110,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"⋫"},{key:[110,116,114,105,97,110,103,108,101,114,105,103,104,116,101,113,59],value:"⋭"},{key:[110,117,59],value:"ν"},{key:[110,117,109,59],value:"#"},{key:[110,117,109,101,114,111,59],value:"№"},{key:[110,117,109,115,112,59],value:" "},{key:[110,118,68,97,115,104,59],value:"⊭"},{key:[110,118,72,97,114,114,59],value:"⤄"},{key:[110,118,97,112,59],value:"≍⃒"},{key:[110,118,100,97,115,104,59],value:"⊬"},{key:[110,118,103,101,59],value:"≥⃒"},{key:[110,118,103,116,59],value:">⃒"},{key:[110,118,105,110,102,105,110,59],value:"⧞"},{key:[110,118,108,65,114,114,59],value:"⤂"},{key:[110,118,108,101,59],value:"≤⃒"},{key:[110,118,108,116,59],value:"<⃒"},{key:[110,118,108,116,114,105,101,59],value:"⊴⃒"},{key:[110,118,114,65,114,114,59],value:"⤃"},{key:[110,118,114,116,114,105,101,59],value:"⊵⃒"},{key:[110,118,115,105,109,59],value:"∼⃒"},{key:[110,119,65,114,114,59],value:"⇖"},{key:[110,119,97,114,104,107,59],value:"⤣"},{key:[110,119,97,114,114,59],value:"↖"},{key:[110,119,97,114,114,111,119,59],value:"↖"},{key:[110,119,110,101,97,114,59],value:"⤧"},{key:[111,83,59],value:"Ⓢ"},{key:[111,97,99,117,116,101,59],value:"ó"},{key:[111,97,115,116,59],value:"⊛"},{key:[111,99,105,114,59],value:"⊚"},{key:[111,99,105,114,99,59],value:"ô"},{key:[111,99,121,59],value:"о"},{key:[111,100,97,115,104,59],value:"⊝"},{key:[111,100,98,108,97,99,59],value:"ő"},{key:[111,100,105,118,59],value:"⨸"},{key:[111,100,111,116,59],value:"⊙"},{key:[111,100,115,111,108,100,59],value:"⦼"},{key:[111,101,108,105,103,59],value:"œ"},{key:[111,102,99,105,114,59],value:"⦿"},{key:[111,102,114,59],value:"𝔬"},{key:[111,103,111,110,59],value:"˛"},{key:[111,103,114,97,118,101,59],value:"ò"},{key:[111,103,116,59],value:"⧁"},{key:[111,104,98,97,114,59],value:"⦵"},{key:[111,104,109,59],value:"Ω"},{key:[111,105,110,116,59],value:"∮"},{key:[111,108,97,114,114,59],value:"↺"},{key:[111,108,99,105,114,59],value:"⦾"},{key:[111,108,99,114,111,115,115,59],value:"⦻"},{key:[111,108,105,110,101,59],value:"‾"},{key:[111,108,116,59],value:"⧀"},{key:[111,109,97,99,114,59],value:"ō"},{key:[111,109,101,103,97,59],value:"ω"},{key:[111,109,105,99,114,111,110,59],value:"ο"},{key:[111,109,105,100,59],value:"⦶"},{key:[111,109,105,110,117,115,59],value:"⊖"},{key:[111,111,112,102,59],value:"𝕠"},{key:[111,112,97,114,59],value:"⦷"},{key:[111,112,101,114,112,59],value:"⦹"},{key:[111,112,108,117,115,59],value:"⊕"},{key:[111,114,59],value:"∨"},{key:[111,114,97,114,114,59],value:"↻"},{key:[111,114,100,59],value:"⩝"},{key:[111,114,100,101,114,59],value:"ℴ"},{key:[111,114,100,101,114,111,102,59],value:"ℴ"},{key:[111,114,100,102,59],value:"ª"},{key:[111,114,100,109,59],value:"º"},{key:[111,114,105,103,111,102,59],value:"⊶"},{key:[111,114,111,114,59],value:"⩖"},{key:[111,114,115,108,111,112,101,59],value:"⩗"},{key:[111,114,118,59],value:"⩛"},{key:[111,115,99,114,59],value:"ℴ"},{key:[111,115,108,97,115,104,59],value:"ø"},{key:[111,115,111,108,59],value:"⊘"},{key:[111,116,105,108,100,101,59],value:"õ"},{key:[111,116,105,109,101,115,59],value:"⊗"},{key:[111,116,105,109,101,115,97,115,59],value:"⨶"},{key:[111,117,109,108,59],value:"ö"},{key:[111,118,98,97,114,59],value:"⌽"},{key:[112,97,114,59],value:"∥"},{key:[112,97,114,97,59],value:"¶"},{key:[112,97,114,97,108,108,101,108,59],value:"∥"},{key:[112,97,114,115,105,109,59],value:"⫳"},{key:[112,97,114,115,108,59],value:"⫽"},{key:[112,97,114,116,59],value:"∂"},{key:[112,99,121,59],value:"п"},{key:[112,101,114,99,110,116,59],value:"%"},{key:[112,101,114,105,111,100,59],value:"."},{key:[112,101,114,109,105,108,59],value:"‰"},{key:[112,101,114,112,59],value:"⊥"},{key:[112,101,114,116,101,110,107,59],value:"‱"},{key:[112,102,114,59],value:"𝔭"},{key:[112,104,105,59],value:"φ"},{key:[112,104,105,118,59],value:"ϕ"},{key:[112,104,109,109,97,116,59],value:"ℳ"},{key:[112,104,111,110,101,59],value:"☎"},{key:[112,105,59],value:"π"},{key:[112,105,116,99,104,102,111,114,107,59],value:"⋔"},{key:[112,105,118,59],value:"ϖ"},{key:[112,108,97,110,99,107,59],value:"ℏ"},{key:[112,108,97,110,99,107,104,59],value:"ℎ"},{key:[112,108,97,110,107,118,59],value:"ℏ"},{key:[112,108,117,115,59],value:"+"},{key:[112,108,117,115,97,99,105,114,59],value:"⨣"},{key:[112,108,117,115,98,59],value:"⊞"},{key:[112,108,117,115,99,105,114,59],value:"⨢"},{key:[112,108,117,115,100,111,59],value:"∔"},{key:[112,108,117,115,100,117,59],value:"⨥"},{key:[112,108,117,115,101,59],value:"⩲"},{key:[112,108,117,115,109,110,59],value:"±"},{key:[112,108,117,115,115,105,109,59],value:"⨦"},{key:[112,108,117,115,116,119,111,59],value:"⨧"},{key:[112,109,59],value:"±"},{key:[112,111,105,110,116,105,110,116,59],value:"⨕"},{key:[112,111,112,102,59],value:"𝕡"},{key:[112,111,117,110,100,59],value:"£"},{key:[112,114,59],value:"≺"},{key:[112,114,69,59],value:"⪳"},{key:[112,114,97,112,59],value:"⪷"},{key:[112,114,99,117,101,59],value:"≼"},{key:[112,114,101,59],value:"⪯"},{key:[112,114,101,99,59],value:"≺"},{key:[112,114,101,99,97,112,112,114,111,120,59],value:"⪷"},{key:[112,114,101,99,99,117,114,108,121,101,113,59],value:"≼"},{key:[112,114,101,99,101,113,59],value:"⪯"},{key:[112,114,101,99,110,97,112,112,114,111,120,59],value:"⪹"},{key:[112,114,101,99,110,101,113,113,59],value:"⪵"},{key:[112,114,101,99,110,115,105,109,59],value:"⋨"},{key:[112,114,101,99,115,105,109,59],value:"≾"},{key:[112,114,105,109,101,59],value:"′"},{key:[112,114,105,109,101,115,59],value:"ℙ"},{key:[112,114,110,69,59],value:"⪵"},{key:[112,114,110,97,112,59],value:"⪹"},{key:[112,114,110,115,105,109,59],value:"⋨"},{key:[112,114,111,100,59],value:"∏"},{key:[112,114,111,102,97,108,97,114,59],value:"⌮"},{key:[112,114,111,102,108,105,110,101,59],value:"⌒"},{key:[112,114,111,102,115,117,114,102,59],value:"⌓"},{key:[112,114,111,112,59],value:"∝"},{key:[112,114,111,112,116,111,59],value:"∝"},{key:[112,114,115,105,109,59],value:"≾"},{key:[112,114,117,114,101,108,59],value:"⊰"},{key:[112,115,99,114,59],value:"𝓅"},{key:[112,115,105,59],value:"ψ"},{key:[112,117,110,99,115,112,59],value:" "},{key:[113,102,114,59],value:"𝔮"},{key:[113,105,110,116,59],value:"⨌"},{key:[113,111,112,102,59],value:"𝕢"},{key:[113,112,114,105,109,101,59],value:"⁗"},{key:[113,115,99,114,59],value:"𝓆"},{key:[113,117,97,116,101,114,110,105,111,110,115,59],value:"ℍ"},{key:[113,117,97,116,105,110,116,59],value:"⨖"},{key:[113,117,101,115,116,59],value:"?"},{key:[113,117,101,115,116,101,113,59],value:"≟"},{key:[113,117,111,116,59],value:'"'},{key:[114,65,97,114,114,59],value:"⇛"},{key:[114,65,114,114,59],value:"⇒"},{key:[114,65,116,97,105,108,59],value:"⤜"},{key:[114,66,97,114,114,59],value:"⤏"},{key:[114,72,97,114,59],value:"⥤"},{key:[114,97,99,101,59],value:"∽̱"},{key:[114,97,99,117,116,101,59],value:"ŕ"},{key:[114,97,100,105,99,59],value:"√"},{key:[114,97,101,109,112,116,121,118,59],value:"⦳"},{key:[114,97,110,103,59],value:"⟩"},{key:[114,97,110,103,100,59],value:"⦒"},{key:[114,97,110,103,101,59],value:"⦥"},{key:[114,97,110,103,108,101,59],value:"⟩"},{key:[114,97,113,117,111,59],value:"»"},{key:[114,97,114,114,59],value:"→"},{key:[114,97,114,114,97,112,59],value:"⥵"},{key:[114,97,114,114,98,59],value:"⇥"},{key:[114,97,114,114,98,102,115,59],value:"⤠"},{key:[114,97,114,114,99,59],value:"⤳"},{key:[114,97,114,114,102,115,59],value:"⤞"},{key:[114,97,114,114,104,107,59],value:"↪"},{key:[114,97,114,114,108,112,59],value:"↬"},{key:[114,97,114,114,112,108,59],value:"⥅"},{key:[114,97,114,114,115,105,109,59],value:"⥴"},{key:[114,97,114,114,116,108,59],value:"↣"},{key:[114,97,114,114,119,59],value:"↝"},{key:[114,97,116,97,105,108,59],value:"⤚"},{key:[114,97,116,105,111,59],value:"∶"},{key:[114,97,116,105,111,110,97,108,115,59],value:"ℚ"},{key:[114,98,97,114,114,59],value:"⤍"},{key:[114,98,98,114,107,59],value:"❳"},{key:[114,98,114,97,99,101,59],value:" }"},{key:[114,98,114,97,99,107,59],value:"]"},{key:[114,98,114,107,101,59],value:"⦌"},{key:[114,98,114,107,115,108,100,59],value:"⦎"},{key:[114,98,114,107,115,108,117,59],value:"⦐"},{key:[114,99,97,114,111,110,59],value:"ř"},{key:[114,99,101,100,105,108,59],value:"ŗ"},{key:[114,99,101,105,108,59],value:"⌉"},{key:[114,99,117,98,59],value:" }"},{key:[114,99,121,59],value:"р"},{key:[114,100,99,97,59],value:"⤷"},{key:[114,100,108,100,104,97,114,59],value:"⥩"},{key:[114,100,113,117,111,59],value:"”"},{key:[114,100,113,117,111,114,59],value:"”"},{key:[114,100,115,104,59],value:"↳"},{key:[114,101,97,108,59],value:"ℜ"},{key:[114,101,97,108,105,110,101,59],value:"ℛ"},{key:[114,101,97,108,112,97,114,116,59],value:"ℜ"},{key:[114,101,97,108,115,59],value:"ℝ"},{key:[114,101,99,116,59],value:"▭"},{key:[114,101,103,59],value:"®"},{key:[114,102,105,115,104,116,59],value:"⥽"},{key:[114,102,108,111,111,114,59],value:"⌋"},{key:[114,102,114,59],value:"𝔯"},{key:[114,104,97,114,100,59],value:"⇁"},{key:[114,104,97,114,117,59],value:"⇀"},{key:[114,104,97,114,117,108,59],value:"⥬"},{key:[114,104,111,59],value:"ρ"},{key:[114,104,111,118,59],value:"ϱ"},{key:[114,105,103,104,116,97,114,114,111,119,59],value:"→"},{key:[114,105,103,104,116,97,114,114,111,119,116,97,105,108,59],value:"↣"},{key:[114,105,103,104,116,104,97,114,112,111,111,110,100,111,119,110,59],value:"⇁"},{key:[114,105,103,104,116,104,97,114,112,111,111,110,117,112,59],value:"⇀"},{key:[114,105,103,104,116,108,101,102,116,97,114,114,111,119,115,59],value:"⇄"},{key:[114,105,103,104,116,108,101,102,116,104,97,114,112,111,111,110,115,59],value:"⇌"},{key:[114,105,103,104,116,114,105,103,104,116,97,114,114,111,119,115,59],value:"⇉"},{key:[114,105,103,104,116,115,113,117,105,103,97,114,114,111,119,59],value:"↝"},{key:[114,105,103,104,116,116,104,114,101,101,116,105,109,101,115,59],value:"⋌"},{key:[114,105,110,103,59],value:"˚"},{key:[114,105,115,105,110,103,100,111,116,115,101,113,59],value:"≓"},{key:[114,108,97,114,114,59],value:"⇄"},{key:[114,108,104,97,114,59],value:"⇌"},{key:[114,108,109,59],value:"‏"},{key:[114,109,111,117,115,116,59],value:"⎱"},{key:[114,109,111,117,115,116,97,99,104,101,59],value:"⎱"},{key:[114,110,109,105,100,59],value:"⫮"},{key:[114,111,97,110,103,59],value:"⟭"},{key:[114,111,97,114,114,59],value:"⇾"},{key:[114,111,98,114,107,59],value:"⟧"},{key:[114,111,112,97,114,59],value:"⦆"},{key:[114,111,112,102,59],value:"𝕣"},{key:[114,111,112,108,117,115,59],value:"⨮"},{key:[114,111,116,105,109,101,115,59],value:"⨵"},{key:[114,112,97,114,59],value:")"},{key:[114,112,97,114,103,116,59],value:"⦔"},{key:[114,112,112,111,108,105,110,116,59],value:"⨒"},{key:[114,114,97,114,114,59],value:"⇉"},{key:[114,115,97,113,117,111,59],value:"›"},{key:[114,115,99,114,59],value:"𝓇"},{key:[114,115,104,59],value:"↱"},{key:[114,115,113,98,59],value:"]"},{key:[114,115,113,117,111,59],value:"’"},{key:[114,115,113,117,111,114,59],value:"’"},{key:[114,116,104,114,101,101,59],value:"⋌"},{key:[114,116,105,109,101,115,59],value:"⋊"},{key:[114,116,114,105,59],value:"▹"},{key:[114,116,114,105,101,59],value:"⊵"},{key:[114,116,114,105,102,59],value:"▸"},{key:[114,116,114,105,108,116,114,105,59],value:"⧎"},{key:[114,117,108,117,104,97,114,59],value:"⥨"},{key:[114,120,59],value:"℞"},{key:[115,97,99,117,116,101,59],value:"ś"},{key:[115,98,113,117,111,59],value:"‚"},{key:[115,99,59],value:"≻"},{key:[115,99,69,59],value:"⪴"},{key:[115,99,97,112,59],value:"⪸"},{key:[115,99,97,114,111,110,59],value:"š"},{key:[115,99,99,117,101,59],value:"≽"},{key:[115,99,101,59],value:"⪰"},{key:[115,99,101,100,105,108,59],value:"ş"},{key:[115,99,105,114,99,59],value:"ŝ"},{key:[115,99,110,69,59],value:"⪶"},{key:[115,99,110,97,112,59],value:"⪺"},{key:[115,99,110,115,105,109,59],value:"⋩"},{key:[115,99,112,111,108,105,110,116,59],value:"⨓"},{key:[115,99,115,105,109,59],value:"≿"},{key:[115,99,121,59],value:"с"},{key:[115,100,111,116,59],value:"⋅"},{key:[115,100,111,116,98,59],value:"⊡"},{key:[115,100,111,116,101,59],value:"⩦"},{key:[115,101,65,114,114,59],value:"⇘"},{key:[115,101,97,114,104,107,59],value:"⤥"},{key:[115,101,97,114,114,59],value:"↘"},{key:[115,101,97,114,114,111,119,59],value:"↘"},{key:[115,101,99,116,59],value:"§"},{key:[115,101,109,105,59],value:";"},{key:[115,101,115,119,97,114,59],value:"⤩"},{key:[115,101,116,109,105,110,117,115,59],value:"∖"},{key:[115,101,116,109,110,59],value:"∖"},{key:[115,101,120,116,59],value:"✶"},{key:[115,102,114,59],value:"𝔰"},{key:[115,102,114,111,119,110,59],value:"⌢"},{key:[115,104,97,114,112,59],value:"♯"},{key:[115,104,99,104,99,121,59],value:"щ"},{key:[115,104,99,121,59],value:"ш"},{key:[115,104,111,114,116,109,105,100,59],value:"∣"},{key:[115,104,111,114,116,112,97,114,97,108,108,101,108,59],value:"∥"},{key:[115,104,121,59],value:"­"},{key:[115,105,103,109,97,59],value:"σ"},{key:[115,105,103,109,97,102,59],value:"ς"},{key:[115,105,103,109,97,118,59],value:"ς"},{key:[115,105,109,59],value:"∼"},{key:[115,105,109,100,111,116,59],value:"⩪"},{key:[115,105,109,101,59],value:"≃"},{key:[115,105,109,101,113,59],value:"≃"},{key:[115,105,109,103,59],value:"⪞"},{key:[115,105,109,103,69,59],value:"⪠"},{key:[115,105,109,108,59],value:"⪝"},{key:[115,105,109,108,69,59],value:"⪟"},{key:[115,105,109,110,101,59],value:"≆"},{key:[115,105,109,112,108,117,115,59],value:"⨤"},{key:[115,105,109,114,97,114,114,59],value:"⥲"},{key:[115,108,97,114,114,59],value:"←"},{key:[115,109,97,108,108,115,101,116,109,105,110,117,115,59],value:"∖"},{key:[115,109,97,115,104,112,59],value:"⨳"},{key:[115,109,101,112,97,114,115,108,59],value:"⧤"},{key:[115,109,105,100,59],value:"∣"},{key:[115,109,105,108,101,59],value:"⌣"},{key:[115,109,116,59],value:"⪪"},{key:[115,109,116,101,59],value:"⪬"},{key:[115,109,116,101,115,59],value:"⪬︀"},{key:[115,111,102,116,99,121,59],value:"ь"},{key:[115,111,108,59],value:"/"},{key:[115,111,108,98,59],value:"⧄"},{key:[115,111,108,98,97,114,59],value:"⌿"},{key:[115,111,112,102,59],value:"𝕤"},{key:[115,112,97,100,101,115,59],value:"♠"},{key:[115,112,97,100,101,115,117,105,116,59],value:"♠"},{key:[115,112,97,114,59],value:"∥"},{key:[115,113,99,97,112,59],value:"⊓"},{key:[115,113,99,97,112,115,59],value:"⊓︀"},{key:[115,113,99,117,112,59],value:"⊔"},{key:[115,113,99,117,112,115,59],value:"⊔︀"},{key:[115,113,115,117,98,59],value:"⊏"},{key:[115,113,115,117,98,101,59],value:"⊑"},{key:[115,113,115,117,98,115,101,116,59],value:"⊏"},{key:[115,113,115,117,98,115,101,116,101,113,59],value:"⊑"},{key:[115,113,115,117,112,59],value:"⊐"},{key:[115,113,115,117,112,101,59],value:"⊒"},{key:[115,113,115,117,112,115,101,116,59],value:"⊐"},{key:[115,113,115,117,112,115,101,116,101,113,59],value:"⊒"},{key:[115,113,117,59],value:"□"},{key:[115,113,117,97,114,101,59],value:"□"},{key:[115,113,117,97,114,102,59],value:"▪"},{key:[115,113,117,102,59],value:"▪"},{key:[115,114,97,114,114,59],value:"→"},{key:[115,115,99,114,59],value:"𝓈"},{key:[115,115,101,116,109,110,59],value:"∖"},{key:[115,115,109,105,108,101,59],value:"⌣"},{key:[115,115,116,97,114,102,59],value:"⋆"},{key:[115,116,97,114,59],value:"☆"},{key:[115,116,97,114,102,59],value:"★"},{key:[115,116,114,97,105,103,104,116,101,112,115,105,108,111,110,59],value:"ϵ"},{key:[115,116,114,97,105,103,104,116,112,104,105,59],value:"ϕ"},{key:[115,116,114,110,115,59],value:"¯"},{key:[115,117,98,59],value:"⊂"},{key:[115,117,98,69,59],value:"⫅"},{key:[115,117,98,100,111,116,59],value:"⪽"},{key:[115,117,98,101,59],value:"⊆"},{key:[115,117,98,101,100,111,116,59],value:"⫃"},{key:[115,117,98,109,117,108,116,59],value:"⫁"},{key:[115,117,98,110,69,59],value:"⫋"},{key:[115,117,98,110,101,59],value:"⊊"},{key:[115,117,98,112,108,117,115,59],value:"⪿"},{key:[115,117,98,114,97,114,114,59],value:"⥹"},{key:[115,117,98,115,101,116,59],value:"⊂"},{key:[115,117,98,115,101,116,101,113,59],value:"⊆"},{key:[115,117,98,115,101,116,101,113,113,59],value:"⫅"},{key:[115,117,98,115,101,116,110,101,113,59],value:"⊊"},{key:[115,117,98,115,101,116,110,101,113,113,59],value:"⫋"},{key:[115,117,98,115,105,109,59],value:"⫇"},{key:[115,117,98,115,117,98,59],value:"⫕"},{key:[115,117,98,115,117,112,59],value:"⫓"},{key:[115,117,99,99,59],value:"≻"},{key:[115,117,99,99,97,112,112,114,111,120,59],value:"⪸"},{key:[115,117,99,99,99,117,114,108,121,101,113,59],value:"≽"},{key:[115,117,99,99,101,113,59],value:"⪰"},{key:[115,117,99,99,110,97,112,112,114,111,120,59],value:"⪺"},{key:[115,117,99,99,110,101,113,113,59],value:"⪶"},{key:[115,117,99,99,110,115,105,109,59],value:"⋩"},{key:[115,117,99,99,115,105,109,59],value:"≿"},{key:[115,117,109,59],value:"∑"},{key:[115,117,110,103,59],value:"♪"},{key:[115,117,112,49,59],value:"¹"},{key:[115,117,112,50,59],value:"²"},{key:[115,117,112,51,59],value:"³"},{key:[115,117,112,59],value:"⊃"},{key:[115,117,112,69,59],value:"⫆"},{key:[115,117,112,100,111,116,59],value:"⪾"},{key:[115,117,112,100,115,117,98,59],value:"⫘"},{key:[115,117,112,101,59],value:"⊇"},{key:[115,117,112,101,100,111,116,59],value:"⫄"},{key:[115,117,112,104,115,111,108,59],value:"⟉"},{key:[115,117,112,104,115,117,98,59],value:"⫗"},{key:[115,117,112,108,97,114,114,59],value:"⥻"},{key:[115,117,112,109,117,108,116,59],value:"⫂"},{key:[115,117,112,110,69,59],value:"⫌"},{key:[115,117,112,110,101,59],value:"⊋"},{key:[115,117,112,112,108,117,115,59],value:"⫀"},{key:[115,117,112,115,101,116,59],value:"⊃"},{key:[115,117,112,115,101,116,101,113,59],value:"⊇"},{key:[115,117,112,115,101,116,101,113,113,59],value:"⫆"},{key:[115,117,112,115,101,116,110,101,113,59],value:"⊋"},{key:[115,117,112,115,101,116,110,101,113,113,59],value:"⫌"},{key:[115,117,112,115,105,109,59],value:"⫈"},{key:[115,117,112,115,117,98,59],value:"⫔"},{key:[115,117,112,115,117,112,59],value:"⫖"},{key:[115,119,65,114,114,59],value:"⇙"},{key:[115,119,97,114,104,107,59],value:"⤦"},{key:[115,119,97,114,114,59],value:"↙"},{key:[115,119,97,114,114,111,119,59],value:"↙"},{key:[115,119,110,119,97,114,59],value:"⤪"},{key:[115,122,108,105,103,59],value:"ß"},{key:[116,97,114,103,101,116,59],value:"⌖"},{key:[116,97,117,59],value:"τ"},{key:[116,98,114,107,59],value:"⎴"},{key:[116,99,97,114,111,110,59],value:"ť"},{key:[116,99,101,100,105,108,59],value:"ţ"},{key:[116,99,121,59],value:"т"},{key:[116,100,111,116,59],value:"⃛"},{key:[116,101,108,114,101,99,59],value:"⌕"},{key:[116,102,114,59],value:"𝔱"},{key:[116,104,101,114,101,52,59],value:"∴"},{key:[116,104,101,114,101,102,111,114,101,59],value:"∴"},{key:[116,104,101,116,97,59],value:"θ"},{key:[116,104,101,116,97,115,121,109,59],value:"ϑ"},{key:[116,104,101,116,97,118,59],value:"ϑ"},{key:[116,104,105,99,107,97,112,112,114,111,120,59],value:"≈"},{key:[116,104,105,99,107,115,105,109,59],value:"∼"},{key:[116,104,105,110,115,112,59],value:" "},{key:[116,104,107,97,112,59],value:"≈"},{key:[116,104,107,115,105,109,59],value:"∼"},{key:[116,104,111,114,110,59],value:"þ"},{key:[116,105,108,100,101,59],value:"˜"},{key:[116,105,109,101,115,59],value:"×"},{key:[116,105,109,101,115,98,59],value:"⊠"},{key:[116,105,109,101,115,98,97,114,59],value:"⨱"},{key:[116,105,109,101,115,100,59],value:"⨰"},{key:[116,105,110,116,59],value:"∭"},{key:[116,111,101,97,59],value:"⤨"},{key:[116,111,112,59],value:"⊤"},{key:[116,111,112,98,111,116,59],value:"⌶"},{key:[116,111,112,99,105,114,59],value:"⫱"},{key:[116,111,112,102,59],value:"𝕥"},{key:[116,111,112,102,111,114,107,59],value:"⫚"},{key:[116,111,115,97,59],value:"⤩"},{key:[116,112,114,105,109,101,59],value:"‴"},{key:[116,114,97,100,101,59],value:"™"},{key:[116,114,105,97,110,103,108,101,59],value:"▵"},{key:[116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▿"},{key:[116,114,105,97,110,103,108,101,108,101,102,116,59],value:"◃"},{key:[116,114,105,97,110,103,108,101,108,101,102,116,101,113,59],value:"⊴"},{key:[116,114,105,97,110,103,108,101,113,59],value:"≜"},{key:[116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"▹"},{key:[116,114,105,97,110,103,108,101,114,105,103,104,116,101,113,59],value:"⊵"},{key:[116,114,105,100,111,116,59],value:"◬"},{key:[116,114,105,101,59],value:"≜"},{key:[116,114,105,109,105,110,117,115,59],value:"⨺"},{key:[116,114,105,112,108,117,115,59],value:"⨹"},{key:[116,114,105,115,98,59],value:"⧍"},{key:[116,114,105,116,105,109,101,59],value:"⨻"},{key:[116,114,112,101,122,105,117,109,59],value:"⏢"},{key:[116,115,99,114,59],value:"𝓉"},{key:[116,115,99,121,59],value:"ц"},{key:[116,115,104,99,121,59],value:"ћ"},{key:[116,115,116,114,111,107,59],value:"ŧ"},{key:[116,119,105,120,116,59],value:"≬"},{key:[116,119,111,104,101,97,100,108,101,102,116,97,114,114,111,119,59],value:"↞"},{key:[116,119,111,104,101,97,100,114,105,103,104,116,97,114,114,111,119,59],value:"↠"},{key:[117,65,114,114,59],value:"⇑"},{key:[117,72,97,114,59],value:"⥣"},{key:[117,97,99,117,116,101,59],value:"ú"},{key:[117,97,114,114,59],value:"↑"},{key:[117,98,114,99,121,59],value:"ў"},{key:[117,98,114,101,118,101,59],value:"ŭ"},{key:[117,99,105,114,99,59],value:"û"},{key:[117,99,121,59],value:"у"},{key:[117,100,97,114,114,59],value:"⇅"},{key:[117,100,98,108,97,99,59],value:"ű"},{key:[117,100,104,97,114,59],value:"⥮"},{key:[117,102,105,115,104,116,59],value:"⥾"},{key:[117,102,114,59],value:"𝔲"},{key:[117,103,114,97,118,101,59],value:"ù"},{key:[117,104,97,114,108,59],value:"↿"},{key:[117,104,97,114,114,59],value:"↾"},{key:[117,104,98,108,107,59],value:"▀"},{key:[117,108,99,111,114,110,59],value:"⌜"},{key:[117,108,99,111,114,110,101,114,59],value:"⌜"},{key:[117,108,99,114,111,112,59],value:"⌏"},{key:[117,108,116,114,105,59],value:"◸"},{key:[117,109,97,99,114,59],value:"ū"},{key:[117,109,108,59],value:"¨"},{key:[117,111,103,111,110,59],value:"ų"},{key:[117,111,112,102,59],value:"𝕦"},{key:[117,112,97,114,114,111,119,59],value:"↑"},{key:[117,112,100,111,119,110,97,114,114,111,119,59],value:"↕"},{key:[117,112,104,97,114,112,111,111,110,108,101,102,116,59],value:"↿"},{key:[117,112,104,97,114,112,111,111,110,114,105,103,104,116,59],value:"↾"},{key:[117,112,108,117,115,59],value:"⊎"},{key:[117,112,115,105,59],value:"υ"},{key:[117,112,115,105,104,59],value:"ϒ"},{key:[117,112,115,105,108,111,110,59],value:"υ"},{key:[117,112,117,112,97,114,114,111,119,115,59],value:"⇈"},{key:[117,114,99,111,114,110,59],value:"⌝"},{key:[117,114,99,111,114,110,101,114,59],value:"⌝"},{key:[117,114,99,114,111,112,59],value:"⌎"},{key:[117,114,105,110,103,59],value:"ů"},{key:[117,114,116,114,105,59],value:"◹"},{key:[117,115,99,114,59],value:"𝓊"},{key:[117,116,100,111,116,59],value:"⋰"},{key:[117,116,105,108,100,101,59],value:"ũ"},{key:[117,116,114,105,59],value:"▵"},{key:[117,116,114,105,102,59],value:"▴"},{key:[117,117,97,114,114,59],value:"⇈"},{key:[117,117,109,108,59],value:"ü"},{key:[117,119,97,110,103,108,101,59],value:"⦧"},{key:[118,65,114,114,59],value:"⇕"},{key:[118,66,97,114,59],value:"⫨"},{key:[118,66,97,114,118,59],value:"⫩"},{key:[118,68,97,115,104,59],value:"⊨"},{key:[118,97,110,103,114,116,59],value:"⦜"},{key:[118,97,114,101,112,115,105,108,111,110,59],value:"ϵ"},{key:[118,97,114,107,97,112,112,97,59],value:"ϰ"},{key:[118,97,114,110,111,116,104,105,110,103,59],value:"∅"},{key:[118,97,114,112,104,105,59],value:"ϕ"},{key:[118,97,114,112,105,59],value:"ϖ"},{key:[118,97,114,112,114,111,112,116,111,59],value:"∝"},{key:[118,97,114,114,59],value:"↕"},{key:[118,97,114,114,104,111,59],value:"ϱ"},{key:[118,97,114,115,105,103,109,97,59],value:"ς"},{key:[118,97,114,115,117,98,115,101,116,110,101,113,59],value:"⊊︀"},{key:[118,97,114,115,117,98,115,101,116,110,101,113,113,59],value:"⫋︀"},{key:[118,97,114,115,117,112,115,101,116,110,101,113,59],value:"⊋︀"},{key:[118,97,114,115,117,112,115,101,116,110,101,113,113,59],value:"⫌︀"},{key:[118,97,114,116,104,101,116,97,59],value:"ϑ"},{key:[118,97,114,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"⊲"},{key:[118,97,114,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"⊳"},{key:[118,99,121,59],value:"в"},{key:[118,100,97,115,104,59],value:"⊢"},{key:[118,101,101,59],value:"∨"},{key:[118,101,101,98,97,114,59],value:"⊻"},{key:[118,101,101,101,113,59],value:"≚"},{key:[118,101,108,108,105,112,59],value:"⋮"},{key:[118,101,114,98,97,114,59],value:"|"},{key:[118,101,114,116,59],value:"|"},{key:[118,102,114,59],value:"𝔳"},{key:[118,108,116,114,105,59],value:"⊲"},{key:[118,110,115,117,98,59],value:"⊂⃒"},{key:[118,110,115,117,112,59],value:"⊃⃒"},{key:[118,111,112,102,59],value:"𝕧"},{key:[118,112,114,111,112,59],value:"∝"},{key:[118,114,116,114,105,59],value:"⊳"},{key:[118,115,99,114,59],value:"𝓋"},{key:[118,115,117,98,110,69,59],value:"⫋︀"},{key:[118,115,117,98,110,101,59],value:"⊊︀"},{key:[118,115,117,112,110,69,59],value:"⫌︀"},{key:[118,115,117,112,110,101,59],value:"⊋︀"},{key:[118,122,105,103,122,97,103,59],value:"⦚"},{key:[119,99,105,114,99,59],value:"ŵ"},{key:[119,101,100,98,97,114,59],value:"⩟"},{key:[119,101,100,103,101,59],value:"∧"},{key:[119,101,100,103,101,113,59],value:"≙"},{key:[119,101,105,101,114,112,59],value:"℘"},{key:[119,102,114,59],value:"𝔴"},{key:[119,111,112,102,59],value:"𝕨"},{key:[119,112,59],value:"℘"},{key:[119,114,59],value:"≀"},{key:[119,114,101,97,116,104,59],value:"≀"},{key:[119,115,99,114,59],value:"𝓌"},{key:[120,99,97,112,59],value:"⋂"},{key:[120,99,105,114,99,59],value:"◯"},{key:[120,99,117,112,59],value:"⋃"},{key:[120,100,116,114,105,59],value:"▽"},{key:[120,102,114,59],value:"𝔵"},{key:[120,104,65,114,114,59],value:"⟺"},{key:[120,104,97,114,114,59],value:"⟷"},{key:[120,105,59],value:"ξ"},{key:[120,108,65,114,114,59],value:"⟸"},{key:[120,108,97,114,114,59],value:"⟵"},{key:[120,109,97,112,59],value:"⟼"},{key:[120,110,105,115,59],value:"⋻"},{key:[120,111,100,111,116,59],value:"⨀"},{key:[120,111,112,102,59],value:"𝕩"},{key:[120,111,112,108,117,115,59],value:"⨁"},{key:[120,111,116,105,109,101,59],value:"⨂"},{key:[120,114,65,114,114,59],value:"⟹"},{key:[120,114,97,114,114,59],value:"⟶"},{key:[120,115,99,114,59],value:"𝓍"},{key:[120,115,113,99,117,112,59],value:"⨆"},{key:[120,117,112,108,117,115,59],value:"⨄"},{key:[120,117,116,114,105,59],value:"△"},{key:[120,118,101,101,59],value:"⋁"},{key:[120,119,101,100,103,101,59],value:"⋀"},{key:[121,97,99,117,116,101,59],value:"ý"},{key:[121,97,99,121,59],value:"я"},{key:[121,99,105,114,99,59],value:"ŷ"},{key:[121,99,121,59],value:"ы"},{key:[121,101,110,59],value:"¥"},{key:[121,102,114,59],value:"𝔶"},{key:[121,105,99,121,59],value:"ї"},{key:[121,111,112,102,59],value:"𝕪"},{key:[121,115,99,114,59],value:"𝓎"},{key:[121,117,99,121,59],value:"ю"},{key:[121,117,109,108,59],value:"ÿ"},{key:[122,97,99,117,116,101,59],value:"ź"},{key:[122,99,97,114,111,110,59],value:"ž"},{key:[122,99,121,59],value:"з"},{key:[122,100,111,116,59],value:"ż"},{key:[122,101,101,116,114,102,59],value:"ℨ"},{key:[122,101,116,97,59],value:"ζ"},{key:[122,102,114,59],value:"𝔷"},{key:[122,104,99,121,59],value:"ж"},{key:[122,105,103,114,97,114,114,59],value:"⇝"},{key:[122,111,112,102,59],value:"𝕫"},{key:[122,115,99,114,59],value:"𝓏"},{key:[122,119,106,59],value:"‍"},{key:[122,119,110,106,59],value:"‌"}];var UnicodePcCodePoint;(function(eo){eo[eo.LOW_LINE=95]="LOW_LINE",eo[eo.UNDERTIE=8255]="UNDERTIE",eo[eo.CHARACTER_TIE=8256]="CHARACTER_TIE",eo[eo.INVERTED_UNDERTIE=8276]="INVERTED_UNDERTIE",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LOW_LINE=65075]="PRESENTATION_FORM_FOR_VERTICAL_LOW_LINE",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_WAVY_LOW_LINE=65076]="PRESENTATION_FORM_FOR_VERTICAL_WAVY_LOW_LINE",eo[eo.DASHED_LOW_LINE=65101]="DASHED_LOW_LINE",eo[eo.CENTRELINE_LOW_LINE=65102]="CENTRELINE_LOW_LINE",eo[eo.WAVY_LOW_LINE=65103]="WAVY_LOW_LINE",eo[eo.FULLWIDTH_LOW_LINE=65343]="FULLWIDTH_LOW_LINE"})(UnicodePcCodePoint||(UnicodePcCodePoint={}));var UnicodePdCodePoint;(function(eo){eo[eo.HYPHEN_MINUS=45]="HYPHEN_MINUS",eo[eo.ARMENIAN_HYPHEN=1418]="ARMENIAN_HYPHEN",eo[eo.HEBREW_PUNCTUATION_MAQAF=1470]="HEBREW_PUNCTUATION_MAQAF",eo[eo.CANADIAN_SYLLABICS_HYPHEN=5120]="CANADIAN_SYLLABICS_HYPHEN",eo[eo.MONGOLIAN_TODO_SOFT_HYPHEN=6150]="MONGOLIAN_TODO_SOFT_HYPHEN",eo[eo.HYPHEN=8208]="HYPHEN",eo[eo.NON_BREAKING_HYPHEN=8209]="NON_BREAKING_HYPHEN",eo[eo.FIGURE_DASH=8210]="FIGURE_DASH",eo[eo.EN_DASH=8211]="EN_DASH",eo[eo.EM_DASH=8212]="EM_DASH",eo[eo.HORIZONTAL_BAR=8213]="HORIZONTAL_BAR",eo[eo.DOUBLE_OBLIQUE_HYPHEN=11799]="DOUBLE_OBLIQUE_HYPHEN",eo[eo.HYPHEN_WITH_DIAERESIS=11802]="HYPHEN_WITH_DIAERESIS",eo[eo.TWO_EM_DASH=11834]="TWO_EM_DASH",eo[eo.THREE_EM_DASH=11835]="THREE_EM_DASH",eo[eo.DOUBLE_HYPHEN=11840]="DOUBLE_HYPHEN",eo[eo.WAVE_DASH=12316]="WAVE_DASH",eo[eo.WAVY_DASH=12336]="WAVY_DASH",eo[eo.KATAKANA_HIRAGANA_DOUBLE_HYPHEN=12448]="KATAKANA_HIRAGANA_DOUBLE_HYPHEN",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_EM_DASH=65073]="PRESENTATION_FORM_FOR_VERTICAL_EM_DASH",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_EN_DASH=65074]="PRESENTATION_FORM_FOR_VERTICAL_EN_DASH",eo[eo.SMALL_EM_DASH=65112]="SMALL_EM_DASH",eo[eo.SMALL_HYPHEN_MINUS=65123]="SMALL_HYPHEN_MINUS",eo[eo.FULLWIDTH_HYPHEN_MINUS=65293]="FULLWIDTH_HYPHEN_MINUS",eo[eo.YEZIDI_HYPHENATION_MARK=69293]="YEZIDI_HYPHENATION_MARK"})(UnicodePdCodePoint||(UnicodePdCodePoint={}));var UnicodePeCodePoint;(function(eo){eo[eo.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",eo[eo.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",eo[eo.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",eo[eo.TIBETAN_MARK_GUG_RTAGS_GYAS=3899]="TIBETAN_MARK_GUG_RTAGS_GYAS",eo[eo.TIBETAN_MARK_ANG_KHANG_GYAS=3901]="TIBETAN_MARK_ANG_KHANG_GYAS",eo[eo.OGHAM_REVERSED_FEATHER_MARK=5788]="OGHAM_REVERSED_FEATHER_MARK",eo[eo.RIGHT_SQUARE_BRACKET_WITH_QUILL=8262]="RIGHT_SQUARE_BRACKET_WITH_QUILL",eo[eo.SUPERSCRIPT_RIGHT_PARENTHESIS=8318]="SUPERSCRIPT_RIGHT_PARENTHESIS",eo[eo.SUBSCRIPT_RIGHT_PARENTHESIS=8334]="SUBSCRIPT_RIGHT_PARENTHESIS",eo[eo.RIGHT_CEILING=8969]="RIGHT_CEILING",eo[eo.RIGHT_FLOOR=8971]="RIGHT_FLOOR",eo[eo.RIGHT_POINTING_ANGLE_BRACKET=9002]="RIGHT_POINTING_ANGLE_BRACKET",eo[eo.MEDIUM_RIGHT_PARENTHESIS_ORNAMENT=10089]="MEDIUM_RIGHT_PARENTHESIS_ORNAMENT",eo[eo.MEDIUM_FLATTENED_RIGHT_PARENTHESIS_ORNAMENT=10091]="MEDIUM_FLATTENED_RIGHT_PARENTHESIS_ORNAMENT",eo[eo.MEDIUM_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT=10093]="MEDIUM_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT",eo[eo.HEAVY_RIGHT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT=10095]="HEAVY_RIGHT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT",eo[eo.HEAVY_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT=10097]="HEAVY_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT",eo[eo.LIGHT_RIGHT_TORTOISE_SHELL_BRACKET_ORNAMENT=10099]="LIGHT_RIGHT_TORTOISE_SHELL_BRACKET_ORNAMENT",eo[eo.MEDIUM_RIGHT_CURLY_BRACKET_ORNAMENT=10101]="MEDIUM_RIGHT_CURLY_BRACKET_ORNAMENT",eo[eo.RIGHT_S_SHAPED_BAG_DELIMITER=10182]="RIGHT_S_SHAPED_BAG_DELIMITER",eo[eo.MATHEMATICAL_RIGHT_WHITE_SQUARE_BRACKET=10215]="MATHEMATICAL_RIGHT_WHITE_SQUARE_BRACKET",eo[eo.MATHEMATICAL_RIGHT_ANGLE_BRACKET=10217]="MATHEMATICAL_RIGHT_ANGLE_BRACKET",eo[eo.MATHEMATICAL_RIGHT_DOUBLE_ANGLE_BRACKET=10219]="MATHEMATICAL_RIGHT_DOUBLE_ANGLE_BRACKET",eo[eo.MATHEMATICAL_RIGHT_WHITE_TORTOISE_SHELL_BRACKET=10221]="MATHEMATICAL_RIGHT_WHITE_TORTOISE_SHELL_BRACKET",eo[eo.MATHEMATICAL_RIGHT_FLATTENED_PARENTHESIS=10223]="MATHEMATICAL_RIGHT_FLATTENED_PARENTHESIS",eo[eo.RIGHT_WHITE_CURLY_BRACKET=10628]="RIGHT_WHITE_CURLY_BRACKET",eo[eo.RIGHT_WHITE_PARENTHESIS=10630]="RIGHT_WHITE_PARENTHESIS",eo[eo.Z_NOTATION_RIGHT_IMAGE_BRACKET=10632]="Z_NOTATION_RIGHT_IMAGE_BRACKET",eo[eo.Z_NOTATION_RIGHT_BINDING_BRACKET=10634]="Z_NOTATION_RIGHT_BINDING_BRACKET",eo[eo.RIGHT_SQUARE_BRACKET_WITH_UNDERBAR=10636]="RIGHT_SQUARE_BRACKET_WITH_UNDERBAR",eo[eo.RIGHT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER=10638]="RIGHT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER",eo[eo.RIGHT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER=10640]="RIGHT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER",eo[eo.RIGHT_ANGLE_BRACKET_WITH_DOT=10642]="RIGHT_ANGLE_BRACKET_WITH_DOT",eo[eo.RIGHT_ARC_GREATER_THAN_BRACKET=10644]="RIGHT_ARC_GREATER_THAN_BRACKET",eo[eo.DOUBLE_RIGHT_ARC_LESS_THAN_BRACKET=10646]="DOUBLE_RIGHT_ARC_LESS_THAN_BRACKET",eo[eo.RIGHT_BLACK_TORTOISE_SHELL_BRACKET=10648]="RIGHT_BLACK_TORTOISE_SHELL_BRACKET",eo[eo.RIGHT_WIGGLY_FENCE=10713]="RIGHT_WIGGLY_FENCE",eo[eo.RIGHT_DOUBLE_WIGGLY_FENCE=10715]="RIGHT_DOUBLE_WIGGLY_FENCE",eo[eo.RIGHT_POINTING_CURVED_ANGLE_BRACKET=10749]="RIGHT_POINTING_CURVED_ANGLE_BRACKET",eo[eo.TOP_RIGHT_HALF_BRACKET=11811]="TOP_RIGHT_HALF_BRACKET",eo[eo.BOTTOM_RIGHT_HALF_BRACKET=11813]="BOTTOM_RIGHT_HALF_BRACKET",eo[eo.RIGHT_SIDEWAYS_U_BRACKET=11815]="RIGHT_SIDEWAYS_U_BRACKET",eo[eo.RIGHT_DOUBLE_PARENTHESIS=11817]="RIGHT_DOUBLE_PARENTHESIS",eo[eo.RIGHT_ANGLE_BRACKET=12297]="RIGHT_ANGLE_BRACKET",eo[eo.RIGHT_DOUBLE_ANGLE_BRACKET=12299]="RIGHT_DOUBLE_ANGLE_BRACKET",eo[eo.RIGHT_CORNER_BRACKET=12301]="RIGHT_CORNER_BRACKET",eo[eo.RIGHT_WHITE_CORNER_BRACKET=12303]="RIGHT_WHITE_CORNER_BRACKET",eo[eo.RIGHT_BLACK_LENTICULAR_BRACKET=12305]="RIGHT_BLACK_LENTICULAR_BRACKET",eo[eo.RIGHT_TORTOISE_SHELL_BRACKET=12309]="RIGHT_TORTOISE_SHELL_BRACKET",eo[eo.RIGHT_WHITE_LENTICULAR_BRACKET=12311]="RIGHT_WHITE_LENTICULAR_BRACKET",eo[eo.RIGHT_WHITE_TORTOISE_SHELL_BRACKET=12313]="RIGHT_WHITE_TORTOISE_SHELL_BRACKET",eo[eo.RIGHT_WHITE_SQUARE_BRACKET=12315]="RIGHT_WHITE_SQUARE_BRACKET",eo[eo.DOUBLE_PRIME_QUOTATION_MARK=12318]="DOUBLE_PRIME_QUOTATION_MARK",eo[eo.LOW_DOUBLE_PRIME_QUOTATION_MARK=12319]="LOW_DOUBLE_PRIME_QUOTATION_MARK",eo[eo.ORNATE_LEFT_PARENTHESIS=64830]="ORNATE_LEFT_PARENTHESIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_LENTICULAR_BRAKCET=65048]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_LENTICULAR_BRAKCET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_PARENTHESIS=65078]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_PARENTHESIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CURLY_BRACKET=65080]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CURLY_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_TORTOISE_SHELL_BRACKET=65082]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_TORTOISE_SHELL_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_BLACK_LENTICULAR_BRACKET=65084]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_BLACK_LENTICULAR_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_DOUBLE_ANGLE_BRACKET=65086]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_DOUBLE_ANGLE_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_ANGLE_BRACKET=65088]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_ANGLE_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CORNER_BRACKET=65090]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CORNER_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_CORNER_BRACKET=65092]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_CORNER_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_SQUARE_BRACKET=65096]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_SQUARE_BRACKET",eo[eo.SMALL_RIGHT_PARENTHESIS=65114]="SMALL_RIGHT_PARENTHESIS",eo[eo.SMALL_RIGHT_CURLY_BRACKET=65116]="SMALL_RIGHT_CURLY_BRACKET",eo[eo.SMALL_RIGHT_TORTOISE_SHELL_BRACKET=65118]="SMALL_RIGHT_TORTOISE_SHELL_BRACKET",eo[eo.FULLWIDTH_RIGHT_PARENTHESIS=65289]="FULLWIDTH_RIGHT_PARENTHESIS",eo[eo.FULLWIDTH_RIGHT_SQUARE_BRACKET=65341]="FULLWIDTH_RIGHT_SQUARE_BRACKET",eo[eo.FULLWIDTH_RIGHT_CURLY_BRACKET=65373]="FULLWIDTH_RIGHT_CURLY_BRACKET",eo[eo.FULLWIDTH_RIGHT_WHITE_PARENTHESIS=65376]="FULLWIDTH_RIGHT_WHITE_PARENTHESIS",eo[eo.HALFWIDTH_RIGHT_CORNER_BRACKET=65379]="HALFWIDTH_RIGHT_CORNER_BRACKET"})(UnicodePeCodePoint||(UnicodePeCodePoint={}));var UnicodePfCodePoint;(function(eo){eo[eo.RIGHT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK=187]="RIGHT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK",eo[eo.RIGHT_SINGLE_QUOTATION_MARK=8217]="RIGHT_SINGLE_QUOTATION_MARK",eo[eo.RIGHT_DOUBLE_QUOTATION_MARK=8221]="RIGHT_DOUBLE_QUOTATION_MARK",eo[eo.SINGLE_RIGHT_POINTING_ANGLE_QUOTATION_MARK=8250]="SINGLE_RIGHT_POINTING_ANGLE_QUOTATION_MARK",eo[eo.RIGHT_SUBSTITUTION_BRACKET=11779]="RIGHT_SUBSTITUTION_BRACKET",eo[eo.RIGHT_DOTTED_SUBSTITUTION_BRACKET=11781]="RIGHT_DOTTED_SUBSTITUTION_BRACKET",eo[eo.RIGHT_TRANSPOSITION_BRACKET=11786]="RIGHT_TRANSPOSITION_BRACKET",eo[eo.RIGHT_RAISED_OMISSION_BRACKET=11789]="RIGHT_RAISED_OMISSION_BRACKET",eo[eo.RIGHT_LOW_PARAPHRASE_BRACKET=11805]="RIGHT_LOW_PARAPHRASE_BRACKET",eo[eo.RIGHT_VERTICAL_BAR_WITH_QUILL=11809]="RIGHT_VERTICAL_BAR_WITH_QUILL"})(UnicodePfCodePoint||(UnicodePfCodePoint={}));var UnicodePiCodePoint;(function(eo){eo[eo.LEFT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK=171]="LEFT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK",eo[eo.LEFT_SINGLE_QUOTATION_MARK=8216]="LEFT_SINGLE_QUOTATION_MARK",eo[eo.SINGLE_HIGH_REVERSED_9_QUOTATION_MARK=8219]="SINGLE_HIGH_REVERSED_9_QUOTATION_MARK",eo[eo.LEFT_DOUBLE_QUOTATION_MARK=8220]="LEFT_DOUBLE_QUOTATION_MARK",eo[eo.DOUBLE_HIGH_REVERSED_9_QUOTATION_MARK=8223]="DOUBLE_HIGH_REVERSED_9_QUOTATION_MARK",eo[eo.SINGLE_LEFT_POINTING_ANGLE_QUOTATION_MARK=8249]="SINGLE_LEFT_POINTING_ANGLE_QUOTATION_MARK",eo[eo.LEFT_SUBSTITUTION_BRACKET=11778]="LEFT_SUBSTITUTION_BRACKET",eo[eo.LEFT_DOTTED_SUBSTITUTION_BRACKET=11780]="LEFT_DOTTED_SUBSTITUTION_BRACKET",eo[eo.LEFT_TRANSPOSITION_BRACKET=11785]="LEFT_TRANSPOSITION_BRACKET",eo[eo.LEFT_RAISED_OMISSION_BRACKET=11788]="LEFT_RAISED_OMISSION_BRACKET",eo[eo.LEFT_LOW_PARAPHRASE_BRACKET=11804]="LEFT_LOW_PARAPHRASE_BRACKET",eo[eo.LEFT_VERTICAL_BAR_WITH_QUILL=11808]="LEFT_VERTICAL_BAR_WITH_QUILL"})(UnicodePiCodePoint||(UnicodePiCodePoint={}));var UnicodePoCodePoint;(function(eo){eo[eo.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",eo[eo.QUOTATION_MARK=34]="QUOTATION_MARK",eo[eo.NUMBER_SIGN=35]="NUMBER_SIGN",eo[eo.PERCENT_SIGN=37]="PERCENT_SIGN",eo[eo.AMPERSAND=38]="AMPERSAND",eo[eo.APOSTROPHE=39]="APOSTROPHE",eo[eo.ASTERISK=42]="ASTERISK",eo[eo.COMMA=44]="COMMA",eo[eo.FULL_STOP=46]="FULL_STOP",eo[eo.SOLIDUS=47]="SOLIDUS",eo[eo.COLON=58]="COLON",eo[eo.SEMICOLON=59]="SEMICOLON",eo[eo.QUESTION_MARK=63]="QUESTION_MARK",eo[eo.COMMERCIAL_AT=64]="COMMERCIAL_AT",eo[eo.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",eo[eo.INVERTED_EXCLAMATION_MARK=161]="INVERTED_EXCLAMATION_MARK",eo[eo.SECTION_SIGN=167]="SECTION_SIGN",eo[eo.PILCROW_SIGN=182]="PILCROW_SIGN",eo[eo.MIDDLE_DOT=183]="MIDDLE_DOT",eo[eo.INVERTED_QUESTION_MARK=191]="INVERTED_QUESTION_MARK",eo[eo.GREEK_QUESTION_MARK=894]="GREEK_QUESTION_MARK",eo[eo.GREEK_ANO_TELEIA=903]="GREEK_ANO_TELEIA",eo[eo.ARMENIAN_APOSTROPHE=1370]="ARMENIAN_APOSTROPHE",eo[eo.ARMENIAN_EMPHASIS_MARK=1371]="ARMENIAN_EMPHASIS_MARK",eo[eo.ARMENIAN_EXCLAMATION_MARK=1372]="ARMENIAN_EXCLAMATION_MARK",eo[eo.ARMENIAN_COMMA=1373]="ARMENIAN_COMMA",eo[eo.ARMENIAN_QUESTION_MARK=1374]="ARMENIAN_QUESTION_MARK",eo[eo.ARMENIAN_ABBREVIATION_MARK=1375]="ARMENIAN_ABBREVIATION_MARK",eo[eo.ARMENIAN_FULL_STOP=1417]="ARMENIAN_FULL_STOP",eo[eo.HEBREW_PUNCTUATION_PASEQ=1472]="HEBREW_PUNCTUATION_PASEQ",eo[eo.HEBREW_PUNCTUATION_SOF_PASUQ=1475]="HEBREW_PUNCTUATION_SOF_PASUQ",eo[eo.HEBREW_PUNCTUATION_NUN_HAFUKHA=1478]="HEBREW_PUNCTUATION_NUN_HAFUKHA",eo[eo.HEBREW_PUNCTUATION_GERESH=1523]="HEBREW_PUNCTUATION_GERESH",eo[eo.HEBREW_PUNCTUATION_GERSHAYIM=1524]="HEBREW_PUNCTUATION_GERSHAYIM",eo[eo.ARABIC_INDIC_PER_MILLE_SIGN=1545]="ARABIC_INDIC_PER_MILLE_SIGN",eo[eo.ARABIC_INDIC_PER_TEN_THOUSAND_SIGN=1546]="ARABIC_INDIC_PER_TEN_THOUSAND_SIGN",eo[eo.ARABIC_COMMA=1548]="ARABIC_COMMA",eo[eo.ARABIC_DATE_SEPARATOR=1549]="ARABIC_DATE_SEPARATOR",eo[eo.ARABIC_SEMICOLON=1563]="ARABIC_SEMICOLON",eo[eo.ARABIC_TRIPLE_DOT_PUNCTUATION_MARK=1566]="ARABIC_TRIPLE_DOT_PUNCTUATION_MARK",eo[eo.ARABIC_QUESTION_MARK=1567]="ARABIC_QUESTION_MARK",eo[eo.ARABIC_PERCENT_SIGN=1642]="ARABIC_PERCENT_SIGN",eo[eo.ARABIC_DECIMAL_SEPARATOR=1643]="ARABIC_DECIMAL_SEPARATOR",eo[eo.ARABIC_THOUSANDS_SEPARATOR=1644]="ARABIC_THOUSANDS_SEPARATOR",eo[eo.ARABIC_FIVE_POINTED_STAR=1645]="ARABIC_FIVE_POINTED_STAR",eo[eo.ARABIC_FULL_STOP=1748]="ARABIC_FULL_STOP",eo[eo.SYRIAC_END_OF_PARAGRAPH=1792]="SYRIAC_END_OF_PARAGRAPH",eo[eo.SYRIAC_SUPRALINEAR_FULL_STOP=1793]="SYRIAC_SUPRALINEAR_FULL_STOP",eo[eo.SYRIAC_SUBLINEAR_FULL_STOP=1794]="SYRIAC_SUBLINEAR_FULL_STOP",eo[eo.SYRIAC_SUPRALINEAR_COLON=1795]="SYRIAC_SUPRALINEAR_COLON",eo[eo.SYRIAC_SUBLINEAR_COLON=1796]="SYRIAC_SUBLINEAR_COLON",eo[eo.SYRIAC_HORIZONTAL_COLON=1797]="SYRIAC_HORIZONTAL_COLON",eo[eo.SYRIAC_COLON_SKEWED_LEFT=1798]="SYRIAC_COLON_SKEWED_LEFT",eo[eo.SYRIAC_COLON_SKEWED_RIGHT=1799]="SYRIAC_COLON_SKEWED_RIGHT",eo[eo.SYRIAC_SUPRALINEAR_COLON_SKEWED_LEFT=1800]="SYRIAC_SUPRALINEAR_COLON_SKEWED_LEFT",eo[eo.SYRIAC_SUBLINEAR_COLON_SKEWED_RIGHT=1801]="SYRIAC_SUBLINEAR_COLON_SKEWED_RIGHT",eo[eo.SYRIAC_CONTRACTION=1802]="SYRIAC_CONTRACTION",eo[eo.SYRIAC_HARKLEAN_OBELUS=1803]="SYRIAC_HARKLEAN_OBELUS",eo[eo.SYRIAC_HARKLEAN_METOBELUS=1804]="SYRIAC_HARKLEAN_METOBELUS",eo[eo.SYRIAC_HARKLEAN_ASTERISCUS=1805]="SYRIAC_HARKLEAN_ASTERISCUS",eo[eo.NKO_SYMBOL_GBAKURUNEN=2039]="NKO_SYMBOL_GBAKURUNEN",eo[eo.NKO_COMMA=2040]="NKO_COMMA",eo[eo.NKO_EXCLAMATION_MARK=2041]="NKO_EXCLAMATION_MARK",eo[eo.SAMARITAN_PUNCTUATION_NEQUDAA=2096]="SAMARITAN_PUNCTUATION_NEQUDAA",eo[eo.SAMARITAN_PUNCTUATION_AFSAAQ=2097]="SAMARITAN_PUNCTUATION_AFSAAQ",eo[eo.SAMARITAN_PUNCTUATION_ANGED=2098]="SAMARITAN_PUNCTUATION_ANGED",eo[eo.SAMARITAN_PUNCTUATION_BAU=2099]="SAMARITAN_PUNCTUATION_BAU",eo[eo.SAMARITAN_PUNCTUATION_ATMAAU=2100]="SAMARITAN_PUNCTUATION_ATMAAU",eo[eo.SAMARITAN_PUNCTUATION_SHIYYAALAA=2101]="SAMARITAN_PUNCTUATION_SHIYYAALAA",eo[eo.SAMARITAN_ABBREVIATION_MARK=2102]="SAMARITAN_ABBREVIATION_MARK",eo[eo.SAMARITAN_PUNCTUATION_MELODIC_QITSA=2103]="SAMARITAN_PUNCTUATION_MELODIC_QITSA",eo[eo.SAMARITAN_PUNCTUATION_ZIQAA=2104]="SAMARITAN_PUNCTUATION_ZIQAA",eo[eo.SAMARITAN_PUNCTUATION_QITSA=2105]="SAMARITAN_PUNCTUATION_QITSA",eo[eo.SAMARITAN_PUNCTUATION_ZAEF=2106]="SAMARITAN_PUNCTUATION_ZAEF",eo[eo.SAMARITAN_PUNCTUATION_TURU=2107]="SAMARITAN_PUNCTUATION_TURU",eo[eo.SAMARITAN_PUNCTUATION_ARKAANU=2108]="SAMARITAN_PUNCTUATION_ARKAANU",eo[eo.SAMARITAN_PUNCTUATION_SOF_MASHFAAT=2109]="SAMARITAN_PUNCTUATION_SOF_MASHFAAT",eo[eo.SAMARITAN_PUNCTUATION_ANNAAU=2110]="SAMARITAN_PUNCTUATION_ANNAAU",eo[eo.MANDAIC_PUNCTUATION=2142]="MANDAIC_PUNCTUATION",eo[eo.DEVANAGARI_DANDA=2404]="DEVANAGARI_DANDA",eo[eo.DEVANAGARI_DOUBLE_DANDA=2405]="DEVANAGARI_DOUBLE_DANDA",eo[eo.DEVANAGARI_ABBREVIATION_SIGN=2416]="DEVANAGARI_ABBREVIATION_SIGN",eo[eo.BENGALI_ABBREVIATION_SIGN=2557]="BENGALI_ABBREVIATION_SIGN",eo[eo.GURMUKHI_ABBREVIATION_SIGN=2678]="GURMUKHI_ABBREVIATION_SIGN",eo[eo.GUJARATI_ABBREVIATION_SIGN=2800]="GUJARATI_ABBREVIATION_SIGN",eo[eo.TELUGU_SIGN_SIDDHAM=3191]="TELUGU_SIGN_SIDDHAM",eo[eo.KANNADA_SIGN_SIDDHAM=3204]="KANNADA_SIGN_SIDDHAM",eo[eo.SINHALA_PUNCTUATION_KUNDDALIYA=3572]="SINHALA_PUNCTUATION_KUNDDALIYA",eo[eo.THAI_CHARACTER_FONGMAN=3663]="THAI_CHARACTER_FONGMAN",eo[eo.THAI_CHARACTER_ANGKHANKHU=3674]="THAI_CHARACTER_ANGKHANKHU",eo[eo.THAI_CHARACTER_KHOMUT=3675]="THAI_CHARACTER_KHOMUT",eo[eo.TIBETAN_MARK_INITIAL_YIG_MGO_MDUN_MA=3844]="TIBETAN_MARK_INITIAL_YIG_MGO_MDUN_MA",eo[eo.TIBETAN_MARK_CLOSING_YIG_MGO_SGAB_MA=3845]="TIBETAN_MARK_CLOSING_YIG_MGO_SGAB_MA",eo[eo.TIBETAN_MARK_CARET_YIG_MGO_PHUR_SHAD_MA=3846]="TIBETAN_MARK_CARET_YIG_MGO_PHUR_SHAD_MA",eo[eo.TIBETAN_MARK_YIG_MGO_TSHEG_SHAD_MA=3847]="TIBETAN_MARK_YIG_MGO_TSHEG_SHAD_MA",eo[eo.TIBETAN_MARK_SBRUL_SHAD=3848]="TIBETAN_MARK_SBRUL_SHAD",eo[eo.TIBETAN_MARK_BSKUR_YIG_MGO=3849]="TIBETAN_MARK_BSKUR_YIG_MGO",eo[eo.TIBETAN_MARK_BKA__SHOG_YIG_MGO=3850]="TIBETAN_MARK_BKA__SHOG_YIG_MGO",eo[eo.TIBETAN_MARK_INTERSYLLABIC_TSHEG=3851]="TIBETAN_MARK_INTERSYLLABIC_TSHEG",eo[eo.TIBETAN_MARK_DELIMITER_TSHEG_BSTAR=3852]="TIBETAN_MARK_DELIMITER_TSHEG_BSTAR",eo[eo.TIBETAN_MARK_SHAD=3853]="TIBETAN_MARK_SHAD",eo[eo.TIBETAN_MARK_NYIS_SHAD=3854]="TIBETAN_MARK_NYIS_SHAD",eo[eo.TIBETAN_MARK_TSHEG_SHAD=3855]="TIBETAN_MARK_TSHEG_SHAD",eo[eo.TIBETAN_MARK_NYIS_TSHEG_SHAD=3856]="TIBETAN_MARK_NYIS_TSHEG_SHAD",eo[eo.TIBETAN_MARK_RIN_CHEN_SPUNGS_SHAD=3857]="TIBETAN_MARK_RIN_CHEN_SPUNGS_SHAD",eo[eo.TIBETAN_MARK_RGYA_GRAM_SHAD=3858]="TIBETAN_MARK_RGYA_GRAM_SHAD",eo[eo.TIBETAN_MARK_GTER_TSHEG=3860]="TIBETAN_MARK_GTER_TSHEG",eo[eo.TIBETAN_MARK_PALUTA=3973]="TIBETAN_MARK_PALUTA",eo[eo.TIBETAN_MARK_BSKA__SHOG_GI_MGO_RGYAN=4048]="TIBETAN_MARK_BSKA__SHOG_GI_MGO_RGYAN",eo[eo.TIBETAN_MARK_MNYAM_YIG_GI_MGO_RGYAN=4049]="TIBETAN_MARK_MNYAM_YIG_GI_MGO_RGYAN",eo[eo.TIBETAN_MARK_NYIS_TSHEG=4050]="TIBETAN_MARK_NYIS_TSHEG",eo[eo.TIBETAN_MARK_INITIAL_BRDA_RNYING_YIG_MGO_MDUN_MA=4051]="TIBETAN_MARK_INITIAL_BRDA_RNYING_YIG_MGO_MDUN_MA",eo[eo.TIBETAN_MARK_CLOSING_BRDA_RNYING_YIG_MGO_SGAB_MA=4052]="TIBETAN_MARK_CLOSING_BRDA_RNYING_YIG_MGO_SGAB_MA",eo[eo.TIBETAN_MARK_LEADING_MCHAN_RTAGS=4057]="TIBETAN_MARK_LEADING_MCHAN_RTAGS",eo[eo.TIBETAN_MARK_TRAILING_MCHAN_RTAGS=4058]="TIBETAN_MARK_TRAILING_MCHAN_RTAGS",eo[eo.MYANMAR_SIGN_LITTLE_SECTION=4170]="MYANMAR_SIGN_LITTLE_SECTION",eo[eo.MYANMAR_SIGN_SECTION=4171]="MYANMAR_SIGN_SECTION",eo[eo.MYANMAR_SYMBOL_LOCATIVE=4172]="MYANMAR_SYMBOL_LOCATIVE",eo[eo.MYANMAR_SYMBOL_COMPLETED=4173]="MYANMAR_SYMBOL_COMPLETED",eo[eo.MYANMAR_SYMBOL_AFOREMENTIONED=4174]="MYANMAR_SYMBOL_AFOREMENTIONED",eo[eo.MYANMAR_SYMBOL_GENITIVE=4175]="MYANMAR_SYMBOL_GENITIVE",eo[eo.GEORGIAN_PARAGRAPH_SEPARATOR=4347]="GEORGIAN_PARAGRAPH_SEPARATOR",eo[eo.ETHIOPIC_SECTION_MARK=4960]="ETHIOPIC_SECTION_MARK",eo[eo.ETHIOPIC_WORDSPACE=4961]="ETHIOPIC_WORDSPACE",eo[eo.ETHIOPIC_FULL_STOP=4962]="ETHIOPIC_FULL_STOP",eo[eo.ETHIOPIC_COMMA=4963]="ETHIOPIC_COMMA",eo[eo.ETHIOPIC_SEMICOLON=4964]="ETHIOPIC_SEMICOLON",eo[eo.ETHIOPIC_COLON=4965]="ETHIOPIC_COLON",eo[eo.ETHIOPIC_PREFACE_COLON=4966]="ETHIOPIC_PREFACE_COLON",eo[eo.ETHIOPIC_QUESTION_MARK=4967]="ETHIOPIC_QUESTION_MARK",eo[eo.ETHIOPIC_PARAGRAPH_SEPARATOR=4968]="ETHIOPIC_PARAGRAPH_SEPARATOR",eo[eo.CANADIAN_SYLLABICS_FULL_STOP=5742]="CANADIAN_SYLLABICS_FULL_STOP",eo[eo.RUNIC_SINGLE_PUNCTUATION=5867]="RUNIC_SINGLE_PUNCTUATION",eo[eo.RUNIC_MULTIPLE_PUNCTUATION=5868]="RUNIC_MULTIPLE_PUNCTUATION",eo[eo.RUNIC_CROSS_PUNCTUATION=5869]="RUNIC_CROSS_PUNCTUATION",eo[eo.PHILIPPINE_SINGLE_PUNCTUATION=5941]="PHILIPPINE_SINGLE_PUNCTUATION",eo[eo.PHILIPPINE_DOUBLE_PUNCTUATION=5942]="PHILIPPINE_DOUBLE_PUNCTUATION",eo[eo.KHMER_SIGN_KHAN=6100]="KHMER_SIGN_KHAN",eo[eo.KHMER_SIGN_BARIYOOSAN=6101]="KHMER_SIGN_BARIYOOSAN",eo[eo.KHMER_SIGN_CAMNUC_PII_KUUH=6102]="KHMER_SIGN_CAMNUC_PII_KUUH",eo[eo.KHMER_SIGN_BEYYAL=6104]="KHMER_SIGN_BEYYAL",eo[eo.KHMER_SIGN_PHNAEK_MUAN=6105]="KHMER_SIGN_PHNAEK_MUAN",eo[eo.KHMER_SIGN_KOOMUUT=6106]="KHMER_SIGN_KOOMUUT",eo[eo.MONGOLIAN_BIRGA=6144]="MONGOLIAN_BIRGA",eo[eo.MONGOLIAN_ELLIPSIS=6145]="MONGOLIAN_ELLIPSIS",eo[eo.MONGOLIAN_COMMA=6146]="MONGOLIAN_COMMA",eo[eo.MONGOLIAN_FULL_STOP=6147]="MONGOLIAN_FULL_STOP",eo[eo.MONGOLIAN_COLON=6148]="MONGOLIAN_COLON",eo[eo.MONGOLIAN_FOUR_DOTS=6149]="MONGOLIAN_FOUR_DOTS",eo[eo.MONGOLIAN_SIBE_SYLLABLE_BOUNDARY_MARKER=6151]="MONGOLIAN_SIBE_SYLLABLE_BOUNDARY_MARKER",eo[eo.MONGOLIAN_MANCHU_COMMA=6152]="MONGOLIAN_MANCHU_COMMA",eo[eo.MONGOLIAN_MANCHU_FULL_STOP=6153]="MONGOLIAN_MANCHU_FULL_STOP",eo[eo.MONGOLIAN_NIRUGU=6154]="MONGOLIAN_NIRUGU",eo[eo.LIMBU_EXCLAMATION_MARK=6468]="LIMBU_EXCLAMATION_MARK",eo[eo.LIMBU_QUESTION_MARK=6469]="LIMBU_QUESTION_MARK",eo[eo.BUGINESE_PALLAWA=6686]="BUGINESE_PALLAWA",eo[eo.BUGINESE_END_OF_SECTION=6687]="BUGINESE_END_OF_SECTION",eo[eo.TAI_THAM_SIGN_WIANG=6816]="TAI_THAM_SIGN_WIANG",eo[eo.TAI_THAM_SIGN_WIANGWAAK=6817]="TAI_THAM_SIGN_WIANGWAAK",eo[eo.TAI_THAM_SIGN_SAWAN=6818]="TAI_THAM_SIGN_SAWAN",eo[eo.TAI_THAM_SIGN_KEOW=6819]="TAI_THAM_SIGN_KEOW",eo[eo.TAI_THAM_SIGN_HOY=6820]="TAI_THAM_SIGN_HOY",eo[eo.TAI_THAM_SIGN_DOKMAI=6821]="TAI_THAM_SIGN_DOKMAI",eo[eo.TAI_THAM_SIGN_REVERSED_ROTATED_RANA=6822]="TAI_THAM_SIGN_REVERSED_ROTATED_RANA",eo[eo.TAI_THAM_SIGN_KAAN=6824]="TAI_THAM_SIGN_KAAN",eo[eo.TAI_THAM_SIGN_KAANKUU=6825]="TAI_THAM_SIGN_KAANKUU",eo[eo.TAI_THAM_SIGN_SATKAAN=6826]="TAI_THAM_SIGN_SATKAAN",eo[eo.TAI_THAM_SIGN_SATKAANKUU=6827]="TAI_THAM_SIGN_SATKAANKUU",eo[eo.TAI_THAM_SIGN_HANG=6828]="TAI_THAM_SIGN_HANG",eo[eo.TAI_THAM_SIGN_CAANG=6829]="TAI_THAM_SIGN_CAANG",eo[eo.BALINESE_PANTI=7002]="BALINESE_PANTI",eo[eo.BALINESE_PAMADA=7003]="BALINESE_PAMADA",eo[eo.BALINESE_WINDU=7004]="BALINESE_WINDU",eo[eo.BALINESE_CARIK_PAMUNGKAH=7005]="BALINESE_CARIK_PAMUNGKAH",eo[eo.BALINESE_CARIK_SIKI=7006]="BALINESE_CARIK_SIKI",eo[eo.BALINESE_CARIK_PAREREN=7007]="BALINESE_CARIK_PAREREN",eo[eo.BALINESE_PAMENENG=7008]="BALINESE_PAMENENG",eo[eo.BATAK_SYMBOL_BINDU_NA_METEK=7164]="BATAK_SYMBOL_BINDU_NA_METEK",eo[eo.BATAK_SYMBOL_BINDU_PINARBORAS=7165]="BATAK_SYMBOL_BINDU_PINARBORAS",eo[eo.BATAK_SYMBOL_BINDU_JUDUL=7166]="BATAK_SYMBOL_BINDU_JUDUL",eo[eo.BATAK_SYMBOL_BINDU_PANGOLAT=7167]="BATAK_SYMBOL_BINDU_PANGOLAT",eo[eo.LEPCHA_PUNCTUATION_TA_ROL=7227]="LEPCHA_PUNCTUATION_TA_ROL",eo[eo.LEPCHA_PUNCTUATION_NYET_THYOOM_TA_ROL=7228]="LEPCHA_PUNCTUATION_NYET_THYOOM_TA_ROL",eo[eo.LEPCHA_PUNCTUATION_CER_WA=7229]="LEPCHA_PUNCTUATION_CER_WA",eo[eo.LEPCHA_PUNCTUATION_TSHOOK_CER_WA=7230]="LEPCHA_PUNCTUATION_TSHOOK_CER_WA",eo[eo.LEPCHA_PUNCTUATION_TSHOOK=7231]="LEPCHA_PUNCTUATION_TSHOOK",eo[eo.OL_CHIKI_PUNCTUATION_MUCAAD=7294]="OL_CHIKI_PUNCTUATION_MUCAAD",eo[eo.OL_CHIKI_PUNCTUATION_DOUBLE_MUCAAD=7295]="OL_CHIKI_PUNCTUATION_DOUBLE_MUCAAD",eo[eo.SUNDANESE_PUNCTUATION_BINDU_SURYA=7360]="SUNDANESE_PUNCTUATION_BINDU_SURYA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_PANGLONG=7361]="SUNDANESE_PUNCTUATION_BINDU_PANGLONG",eo[eo.SUNDANESE_PUNCTUATION_BINDU_PURNAMA=7362]="SUNDANESE_PUNCTUATION_BINDU_PURNAMA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_CAKRA=7363]="SUNDANESE_PUNCTUATION_BINDU_CAKRA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_LEU_SATANGA=7364]="SUNDANESE_PUNCTUATION_BINDU_LEU_SATANGA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_KA_SATANGA=7365]="SUNDANESE_PUNCTUATION_BINDU_KA_SATANGA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_DA_SATANGA=7366]="SUNDANESE_PUNCTUATION_BINDU_DA_SATANGA",eo[eo.SUNDANESE_PUNCTUATION_BINDU_BA_SATANGA=7367]="SUNDANESE_PUNCTUATION_BINDU_BA_SATANGA",eo[eo.VEDIC_SIGN_NIHSHVASA=7379]="VEDIC_SIGN_NIHSHVASA",eo[eo.DOUBLE_VERTICAL_LINE=8214]="DOUBLE_VERTICAL_LINE",eo[eo.DOUBLE_LOW_LINE=8215]="DOUBLE_LOW_LINE",eo[eo.DAGGER=8224]="DAGGER",eo[eo.DOUBLE_DAGGER=8225]="DOUBLE_DAGGER",eo[eo.BULLET=8226]="BULLET",eo[eo.TRIANGULAR_BULLET=8227]="TRIANGULAR_BULLET",eo[eo.ONE_DOT_LEADER=8228]="ONE_DOT_LEADER",eo[eo.TWO_DOT_LEADER=8229]="TWO_DOT_LEADER",eo[eo.HORIZONTAL_ELLIPSIS=8230]="HORIZONTAL_ELLIPSIS",eo[eo.HYPHENATION_POINT=8231]="HYPHENATION_POINT",eo[eo.PER_MILLE_SIGN=8240]="PER_MILLE_SIGN",eo[eo.PER_TEN_THOUSAND_SIGN=8241]="PER_TEN_THOUSAND_SIGN",eo[eo.PRIME=8242]="PRIME",eo[eo.DOUBLE_PRIME=8243]="DOUBLE_PRIME",eo[eo.TRIPLE_PRIME=8244]="TRIPLE_PRIME",eo[eo.REVERSED_PRIME=8245]="REVERSED_PRIME",eo[eo.REVERSED_DOUBLE_PRIME=8246]="REVERSED_DOUBLE_PRIME",eo[eo.REVERSED_TRIPLE_PRIME=8247]="REVERSED_TRIPLE_PRIME",eo[eo.CARET=8248]="CARET",eo[eo.REFERENCE_MARK=8251]="REFERENCE_MARK",eo[eo.DOUBLE_EXCLAMATION_MARK=8252]="DOUBLE_EXCLAMATION_MARK",eo[eo.INTERROBANG=8253]="INTERROBANG",eo[eo.OVERLINE=8254]="OVERLINE",eo[eo.CARET_INSERTION_POINT=8257]="CARET_INSERTION_POINT",eo[eo.ASTERISM=8258]="ASTERISM",eo[eo.HYPHEN_BULLET=8259]="HYPHEN_BULLET",eo[eo.DOUBLE_QUESTION_MARK=8263]="DOUBLE_QUESTION_MARK",eo[eo.QUESTION_EXCLAMATION_MARK=8264]="QUESTION_EXCLAMATION_MARK",eo[eo.EXCLAMATION_QUESTION_MARK=8265]="EXCLAMATION_QUESTION_MARK",eo[eo.TIRONIAN_SIGN_ET=8266]="TIRONIAN_SIGN_ET",eo[eo.REVERSED_PILCROW_SIGN=8267]="REVERSED_PILCROW_SIGN",eo[eo.BLACK_LEFTWARDS_BULLET=8268]="BLACK_LEFTWARDS_BULLET",eo[eo.BLACK_RIGHTWARDS_BULLET=8269]="BLACK_RIGHTWARDS_BULLET",eo[eo.LOW_ASTERISK=8270]="LOW_ASTERISK",eo[eo.REVERSED_SEMICOLON=8271]="REVERSED_SEMICOLON",eo[eo.CLOSE_UP=8272]="CLOSE_UP",eo[eo.TWO_ASTERISKS_ALIGNED_VERTICALLY=8273]="TWO_ASTERISKS_ALIGNED_VERTICALLY",eo[eo.SWUNG_DASH=8275]="SWUNG_DASH",eo[eo.FLOWER_PUNCTUATION_MARK=8277]="FLOWER_PUNCTUATION_MARK",eo[eo.THREE_DOT_PUNCTUATION=8278]="THREE_DOT_PUNCTUATION",eo[eo.QUADRUPLE_PRIME=8279]="QUADRUPLE_PRIME",eo[eo.FOUR_DOT_PUNCTUATION=8280]="FOUR_DOT_PUNCTUATION",eo[eo.FIVE_DOT_PUNCTUATION=8281]="FIVE_DOT_PUNCTUATION",eo[eo.TWO_DOT_PUNCTUATION=8282]="TWO_DOT_PUNCTUATION",eo[eo.FOUR_DOT_MARK=8283]="FOUR_DOT_MARK",eo[eo.DOTTED_CROSS=8284]="DOTTED_CROSS",eo[eo.TRICOLON=8285]="TRICOLON",eo[eo.VERTICAL_FOUR_DOTS=8286]="VERTICAL_FOUR_DOTS",eo[eo.COPTIC_OLD_NUBIAN_FULL_STOP=11513]="COPTIC_OLD_NUBIAN_FULL_STOP",eo[eo.COPTIC_OLD_NUBIAN_DIRECT_QUESTION_MARK=11514]="COPTIC_OLD_NUBIAN_DIRECT_QUESTION_MARK",eo[eo.COPTIC_OLD_NUBIAN_INDIRECT_QUESTION_MARK=11515]="COPTIC_OLD_NUBIAN_INDIRECT_QUESTION_MARK",eo[eo.COPTIC_OLD_NUBIAN_VERSE_DIVIDER=11516]="COPTIC_OLD_NUBIAN_VERSE_DIVIDER",eo[eo.COPTIC_FULL_STOP=11518]="COPTIC_FULL_STOP",eo[eo.COPTIC_MORPHOLOGICAL_DIVIDER=11519]="COPTIC_MORPHOLOGICAL_DIVIDER",eo[eo.TIFINAGH_SEPARATOR_MARK=11632]="TIFINAGH_SEPARATOR_MARK",eo[eo.RIGHT_ANGLE_SUBSTITUTION_MARKER=11776]="RIGHT_ANGLE_SUBSTITUTION_MARKER",eo[eo.RIGHT_ANGLE_DOTTED_SUBSTITUTION_MARKER=11777]="RIGHT_ANGLE_DOTTED_SUBSTITUTION_MARKER",eo[eo.RAISED_INTERPOLATION_MARKER=11782]="RAISED_INTERPOLATION_MARKER",eo[eo.RAISED_DOTTED_INTERPOLATION_MARKER=11783]="RAISED_DOTTED_INTERPOLATION_MARKER",eo[eo.DOTTED_TRANSPOSITION_MARKER=11784]="DOTTED_TRANSPOSITION_MARKER",eo[eo.RAISED_SQUARE=11787]="RAISED_SQUARE",eo[eo.EDITORIAL_CORONIS=11790]="EDITORIAL_CORONIS",eo[eo.PARAGRAPHOS=11791]="PARAGRAPHOS",eo[eo.FORKED_PARAGRAPHOS=11792]="FORKED_PARAGRAPHOS",eo[eo.REVERSED_FORKED_PARAGRAPHOS=11793]="REVERSED_FORKED_PARAGRAPHOS",eo[eo.HYPODIASTOLE=11794]="HYPODIASTOLE",eo[eo.DOTTED_OBELOS=11795]="DOTTED_OBELOS",eo[eo.DOWNWARDS_ANCORA=11796]="DOWNWARDS_ANCORA",eo[eo.UPWARDS_ANCORA=11797]="UPWARDS_ANCORA",eo[eo.DOTTED_RIGHT_POINTING_ANGLE=11798]="DOTTED_RIGHT_POINTING_ANGLE",eo[eo.INVERTED_INTERROBANG=11800]="INVERTED_INTERROBANG",eo[eo.PALM_BRANCH=11801]="PALM_BRANCH",eo[eo.TILDE_WITH_RING_ABOVE=11803]="TILDE_WITH_RING_ABOVE",eo[eo.TILDE_WITH_DOT_ABOVE=11806]="TILDE_WITH_DOT_ABOVE",eo[eo.TILDE_WITH_DOT_BELOW=11807]="TILDE_WITH_DOT_BELOW",eo[eo.TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=11818]="TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",eo[eo.ONE_DOT_OVER_TWO_DOTS_PUNCTUATION=11819]="ONE_DOT_OVER_TWO_DOTS_PUNCTUATION",eo[eo.SQUARED_FOUR_DOT_PUNCTUATION=11820]="SQUARED_FOUR_DOT_PUNCTUATION",eo[eo.FIVE_DOT_MARK=11821]="FIVE_DOT_MARK",eo[eo.REVERSED_QUESTION_MARK=11822]="REVERSED_QUESTION_MARK",eo[eo.RING_POINT=11824]="RING_POINT",eo[eo.WORD_SEPARATOR_MIDDLE_DOT=11825]="WORD_SEPARATOR_MIDDLE_DOT",eo[eo.TURNED_COMMA=11826]="TURNED_COMMA",eo[eo.RAISED_DOT=11827]="RAISED_DOT",eo[eo.RAISED_COMMA=11828]="RAISED_COMMA",eo[eo.TURNED_SEMICOLON=11829]="TURNED_SEMICOLON",eo[eo.DAGGER_WITH_LEFT_GUARD=11830]="DAGGER_WITH_LEFT_GUARD",eo[eo.DAGGER_WITH_RIGHT_GUARD=11831]="DAGGER_WITH_RIGHT_GUARD",eo[eo.TURNED_DAGGER=11832]="TURNED_DAGGER",eo[eo.TOP_HALF_SECTION_SIGN=11833]="TOP_HALF_SECTION_SIGN",eo[eo.STENOGRAPHIC_FULL_STOP=11836]="STENOGRAPHIC_FULL_STOP",eo[eo.VERTICAL_SIX_DOTS=11837]="VERTICAL_SIX_DOTS",eo[eo.WIGGLY_VERTICAL_LINE=11838]="WIGGLY_VERTICAL_LINE",eo[eo.CAPITULUM=11839]="CAPITULUM",eo[eo.REVERSED_COMMA=11841]="REVERSED_COMMA",eo[eo.DASH_WITH_LEFT_UPTURN=11843]="DASH_WITH_LEFT_UPTURN",eo[eo.DOUBLE_SUSPENSION_MARK=11844]="DOUBLE_SUSPENSION_MARK",eo[eo.INVERTED_LOW_KAVYKA=11845]="INVERTED_LOW_KAVYKA",eo[eo.INVERTED_LOW_KAVYKA_WITH_KAVYKA_ABOVE=11846]="INVERTED_LOW_KAVYKA_WITH_KAVYKA_ABOVE",eo[eo.LOW_KAVYKA=11847]="LOW_KAVYKA",eo[eo.LOW_KAVYKA_WITH_DOT=11848]="LOW_KAVYKA_WITH_DOT",eo[eo.DOUBLE_STACKED_COMMA=11849]="DOUBLE_STACKED_COMMA",eo[eo.DOTTED_SOLIDUS=11850]="DOTTED_SOLIDUS",eo[eo.TRIPLE_DAGGER=11851]="TRIPLE_DAGGER",eo[eo.MEDIEVAL_COMMA=11852]="MEDIEVAL_COMMA",eo[eo.PARAGRAPHUS_MARK=11853]="PARAGRAPHUS_MARK",eo[eo.PUNCTUS_ELEVATUS_MARK=11854]="PUNCTUS_ELEVATUS_MARK",eo[eo.CORNISH_VERSE_DIVIDER=11855]="CORNISH_VERSE_DIVIDER",eo[eo.TIRONIAN_SIGN_CAPITAL_ET=11858]="TIRONIAN_SIGN_CAPITAL_ET",eo[eo.IDEOGRAPHIC_COMMA=12289]="IDEOGRAPHIC_COMMA",eo[eo.IDEOGRAPHIC_FULL_STOP=12290]="IDEOGRAPHIC_FULL_STOP",eo[eo.DITTO_MARK=12291]="DITTO_MARK",eo[eo.PART_ALTERNATION_MARK=12349]="PART_ALTERNATION_MARK",eo[eo.KATAKANA_MIDDLE_DOT=12539]="KATAKANA_MIDDLE_DOT",eo[eo.LISU_PUNCTUATION_COMMA=42238]="LISU_PUNCTUATION_COMMA",eo[eo.LISU_PUNCTUATION_FULL_STOP=42239]="LISU_PUNCTUATION_FULL_STOP",eo[eo.VAI_COMMA=42509]="VAI_COMMA",eo[eo.VAI_FULL_STOP=42510]="VAI_FULL_STOP",eo[eo.VAI_QUESTION_MARK=42511]="VAI_QUESTION_MARK",eo[eo.SLAVONIC_ASTERISK=42611]="SLAVONIC_ASTERISK",eo[eo.CYRILLIC_KAVYKA=42622]="CYRILLIC_KAVYKA",eo[eo.BAMUM_NJAEMLI=42738]="BAMUM_NJAEMLI",eo[eo.BAMUM_FULL_STOP=42739]="BAMUM_FULL_STOP",eo[eo.BAMUM_COLON=42740]="BAMUM_COLON",eo[eo.BAMUM_COMMA=42741]="BAMUM_COMMA",eo[eo.BAMUM_SEMICOLON=42742]="BAMUM_SEMICOLON",eo[eo.BAMUM_QUESTION_MARK=42743]="BAMUM_QUESTION_MARK",eo[eo.PHAGS_PA_SINGLE_HEAD_MARK=43124]="PHAGS_PA_SINGLE_HEAD_MARK",eo[eo.PHAGS_PA_DOUBLE_HEAD_MARK=43125]="PHAGS_PA_DOUBLE_HEAD_MARK",eo[eo.PHAGS_PA_MARK_SHAD=43126]="PHAGS_PA_MARK_SHAD",eo[eo.PHAGS_PA_MARK_DOUBLE_SHAD=43127]="PHAGS_PA_MARK_DOUBLE_SHAD",eo[eo.SAURASHTRA_DANDA=43214]="SAURASHTRA_DANDA",eo[eo.SAURASHTRA_DOUBLE_DANDA=43215]="SAURASHTRA_DOUBLE_DANDA",eo[eo.DEVANAGARI_SIGN_PUSHPIKA=43256]="DEVANAGARI_SIGN_PUSHPIKA",eo[eo.DEVANAGARI_GAP_FILLER=43257]="DEVANAGARI_GAP_FILLER",eo[eo.DEVANAGARI_CARET=43258]="DEVANAGARI_CARET",eo[eo.DEVANAGARI_SIGN_SIDDHAM=43260]="DEVANAGARI_SIGN_SIDDHAM",eo[eo.KAYAH_LI_SIGN_CWI=43310]="KAYAH_LI_SIGN_CWI",eo[eo.KAYAH_LI_SIGN_SHYA=43311]="KAYAH_LI_SIGN_SHYA",eo[eo.REJANG_SECTION_MARK=43359]="REJANG_SECTION_MARK",eo[eo.JAVANESE_LEFT_RERENGGAN=43457]="JAVANESE_LEFT_RERENGGAN",eo[eo.JAVANESE_RIGHT_RERENGGAN=43458]="JAVANESE_RIGHT_RERENGGAN",eo[eo.JAVANESE_PADA_ANDAP=43459]="JAVANESE_PADA_ANDAP",eo[eo.JAVANESE_PADA_MADYA=43460]="JAVANESE_PADA_MADYA",eo[eo.JAVANESE_PADA_LUHUR=43461]="JAVANESE_PADA_LUHUR",eo[eo.JAVANESE_PADA_WINDU=43462]="JAVANESE_PADA_WINDU",eo[eo.JAVANESE_PADA_PANGKAT=43463]="JAVANESE_PADA_PANGKAT",eo[eo.JAVANESE_PADA_LINGSA=43464]="JAVANESE_PADA_LINGSA",eo[eo.JAVANESE_PADA_LUNGSI=43465]="JAVANESE_PADA_LUNGSI",eo[eo.JAVANESE_PADA_ADEG=43466]="JAVANESE_PADA_ADEG",eo[eo.JAVANESE_PADA_ADEG_ADEG=43467]="JAVANESE_PADA_ADEG_ADEG",eo[eo.JAVANESE_PADA_PISELEH=43468]="JAVANESE_PADA_PISELEH",eo[eo.JAVANESE_TURNED_PADA_PISELEH=43469]="JAVANESE_TURNED_PADA_PISELEH",eo[eo.JAVANESE_PADA_TIRTA_TUMETES=43486]="JAVANESE_PADA_TIRTA_TUMETES",eo[eo.JAVANESE_PADA_ISEN_ISEN=43487]="JAVANESE_PADA_ISEN_ISEN",eo[eo.CHAM_PUNCTUATION_SPIRAL=43612]="CHAM_PUNCTUATION_SPIRAL",eo[eo.CHAM_PUNCTUATION_DANDA=43613]="CHAM_PUNCTUATION_DANDA",eo[eo.CHAM_PUNCTUATION_DOUBLE_DANDA=43614]="CHAM_PUNCTUATION_DOUBLE_DANDA",eo[eo.CHAM_PUNCTUATION_TRIPLE_DANDA=43615]="CHAM_PUNCTUATION_TRIPLE_DANDA",eo[eo.TAI_VIET_SYMBOL_HO_HOI=43742]="TAI_VIET_SYMBOL_HO_HOI",eo[eo.TAI_VIET_SYMBOL_KOI_KOI=43743]="TAI_VIET_SYMBOL_KOI_KOI",eo[eo.MEETEI_MAYEK_CHEIKHAN=43760]="MEETEI_MAYEK_CHEIKHAN",eo[eo.MEETEI_MAYEK_AHANG_KHUDAM=43761]="MEETEI_MAYEK_AHANG_KHUDAM",eo[eo.MEETEI_MAYEK_CHEIKHEI=44011]="MEETEI_MAYEK_CHEIKHEI",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_COMMA=65040]="PRESENTATION_FORM_FOR_VERTICAL_COMMA",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_COMMA=65041]="PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_COMMA",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_FULL_STOP=65042]="PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_FULL_STOP",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_COLON=65043]="PRESENTATION_FORM_FOR_VERTICAL_COLON",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_SEMICOLON=65044]="PRESENTATION_FORM_FOR_VERTICAL_SEMICOLON",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_EXCLAMATION_MARK=65045]="PRESENTATION_FORM_FOR_VERTICAL_EXCLAMATION_MARK",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_QUESTION_MARK=65046]="PRESENTATION_FORM_FOR_VERTICAL_QUESTION_MARK",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_HORIZONTAL_ELLIPSIS=65049]="PRESENTATION_FORM_FOR_VERTICAL_HORIZONTAL_ELLIPSIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_TWO_DOT_LEADER=65072]="PRESENTATION_FORM_FOR_VERTICAL_TWO_DOT_LEADER",eo[eo.SESAME_DOT=65093]="SESAME_DOT",eo[eo.WHITE_SESAME_DOT=65094]="WHITE_SESAME_DOT",eo[eo.DASHED_OVERLINE=65097]="DASHED_OVERLINE",eo[eo.CENTRELINE_OVERLINE=65098]="CENTRELINE_OVERLINE",eo[eo.WAVY_OVERLINE=65099]="WAVY_OVERLINE",eo[eo.DOUBLE_WAVY_OVERLINE=65100]="DOUBLE_WAVY_OVERLINE",eo[eo.SMALL_COMMA=65104]="SMALL_COMMA",eo[eo.SMALL_IDEOGRAPHIC_COMMA=65105]="SMALL_IDEOGRAPHIC_COMMA",eo[eo.SMALL_FULL_STOP=65106]="SMALL_FULL_STOP",eo[eo.SMALL_SEMICOLON=65108]="SMALL_SEMICOLON",eo[eo.SMALL_COLON=65109]="SMALL_COLON",eo[eo.SMALL_QUESTION_MARK=65110]="SMALL_QUESTION_MARK",eo[eo.SMALL_EXCLAMATION_MARK=65111]="SMALL_EXCLAMATION_MARK",eo[eo.SMALL_NUMBER_SIGN=65119]="SMALL_NUMBER_SIGN",eo[eo.SMALL_AMPERSAND=65120]="SMALL_AMPERSAND",eo[eo.SMALL_ASTERISK=65121]="SMALL_ASTERISK",eo[eo.SMALL_REVERSE_SOLIDUS=65128]="SMALL_REVERSE_SOLIDUS",eo[eo.SMALL_PERCENT_SIGN=65130]="SMALL_PERCENT_SIGN",eo[eo.SMALL_COMMERCIAL_AT=65131]="SMALL_COMMERCIAL_AT",eo[eo.FULLWIDTH_EXCLAMATION_MARK=65281]="FULLWIDTH_EXCLAMATION_MARK",eo[eo.FULLWIDTH_QUOTATION_MARK=65282]="FULLWIDTH_QUOTATION_MARK",eo[eo.FULLWIDTH_NUMBER_SIGN=65283]="FULLWIDTH_NUMBER_SIGN",eo[eo.FULLWIDTH_PERCENT_SIGN=65285]="FULLWIDTH_PERCENT_SIGN",eo[eo.FULLWIDTH_AMPERSAND=65286]="FULLWIDTH_AMPERSAND",eo[eo.FULLWIDTH_APOSTROPHE=65287]="FULLWIDTH_APOSTROPHE",eo[eo.FULLWIDTH_ASTERISK=65290]="FULLWIDTH_ASTERISK",eo[eo.FULLWIDTH_COMMA=65292]="FULLWIDTH_COMMA",eo[eo.FULLWIDTH_FULL_STOP=65294]="FULLWIDTH_FULL_STOP",eo[eo.FULLWIDTH_SOLIDUS=65295]="FULLWIDTH_SOLIDUS",eo[eo.FULLWIDTH_COLON=65306]="FULLWIDTH_COLON",eo[eo.FULLWIDTH_SEMICOLON=65307]="FULLWIDTH_SEMICOLON",eo[eo.FULLWIDTH_QUESTION_MARK=65311]="FULLWIDTH_QUESTION_MARK",eo[eo.FULLWIDTH_COMMERCIAL_AT=65312]="FULLWIDTH_COMMERCIAL_AT",eo[eo.FULLWIDTH_REVERSE_SOLIDUS=65340]="FULLWIDTH_REVERSE_SOLIDUS",eo[eo.HALFWIDTH_IDEOGRAPHIC_FULL_STOP=65377]="HALFWIDTH_IDEOGRAPHIC_FULL_STOP",eo[eo.HALFWIDTH_IDEOGRAPHIC_COMMA=65380]="HALFWIDTH_IDEOGRAPHIC_COMMA",eo[eo.HALFWIDTH_KATAKANA_MIDDLE_DOT=65381]="HALFWIDTH_KATAKANA_MIDDLE_DOT",eo[eo.AEGEAN_WORD_SEPARATOR_LINE=65792]="AEGEAN_WORD_SEPARATOR_LINE",eo[eo.AEGEAN_WORD_SEPARATOR_DOT=65793]="AEGEAN_WORD_SEPARATOR_DOT",eo[eo.AEGEAN_CHECK_MARK=65794]="AEGEAN_CHECK_MARK",eo[eo.UGARITIC_WORD_DIVIDER=66463]="UGARITIC_WORD_DIVIDER",eo[eo.OLD_PERSIAN_WORD_DIVIDER=66512]="OLD_PERSIAN_WORD_DIVIDER",eo[eo.CAUCASIAN_ALBANIAN_CITATION_MARK=66927]="CAUCASIAN_ALBANIAN_CITATION_MARK",eo[eo.IMPERIAL_ARAMAIC_SECTION_SIGN=67671]="IMPERIAL_ARAMAIC_SECTION_SIGN",eo[eo.PHOENICIAN_WORD_SEPARATOR=67871]="PHOENICIAN_WORD_SEPARATOR",eo[eo.LYDIAN_TRIANGULAR_MARK=67903]="LYDIAN_TRIANGULAR_MARK",eo[eo.KHAROSHTHI_PUNCTUATION_DOT=68176]="KHAROSHTHI_PUNCTUATION_DOT",eo[eo.KHAROSHTHI_PUNCTUATION_SMALL_CIRCLE=68177]="KHAROSHTHI_PUNCTUATION_SMALL_CIRCLE",eo[eo.KHAROSHTHI_PUNCTUATION_CIRCLE=68178]="KHAROSHTHI_PUNCTUATION_CIRCLE",eo[eo.KHAROSHTHI_PUNCTUATION_CRESCENT_BAR=68179]="KHAROSHTHI_PUNCTUATION_CRESCENT_BAR",eo[eo.KHAROSHTHI_PUNCTUATION_MANGALAM=68180]="KHAROSHTHI_PUNCTUATION_MANGALAM",eo[eo.KHAROSHTHI_PUNCTUATION_LOTUS=68181]="KHAROSHTHI_PUNCTUATION_LOTUS",eo[eo.KHAROSHTHI_PUNCTUATION_DANDA=68182]="KHAROSHTHI_PUNCTUATION_DANDA",eo[eo.KHAROSHTHI_PUNCTUATION_DOUBLE_DANDA=68183]="KHAROSHTHI_PUNCTUATION_DOUBLE_DANDA",eo[eo.KHAROSHTHI_PUNCTUATION_LINES=68184]="KHAROSHTHI_PUNCTUATION_LINES",eo[eo.OLD_SOUTH_ARABIAN_NUMERIC_INDICATOR=68223]="OLD_SOUTH_ARABIAN_NUMERIC_INDICATOR",eo[eo.MANICHAEAN_PUNCTUATION_STAR=68336]="MANICHAEAN_PUNCTUATION_STAR",eo[eo.MANICHAEAN_PUNCTUATION_FLEURON=68337]="MANICHAEAN_PUNCTUATION_FLEURON",eo[eo.MANICHAEAN_PUNCTUATION_DOUBLE_DOT_WITHIN_DOT=68338]="MANICHAEAN_PUNCTUATION_DOUBLE_DOT_WITHIN_DOT",eo[eo.MANICHAEAN_PUNCTUATION_DOT_WITHIN_DOT=68339]="MANICHAEAN_PUNCTUATION_DOT_WITHIN_DOT",eo[eo.MANICHAEAN_PUNCTUATION_DOT=68340]="MANICHAEAN_PUNCTUATION_DOT",eo[eo.MANICHAEAN_PUNCTUATION_TWO_DOTS=68341]="MANICHAEAN_PUNCTUATION_TWO_DOTS",eo[eo.MANICHAEAN_PUNCTUATION_LINE_FILLER=68342]="MANICHAEAN_PUNCTUATION_LINE_FILLER",eo[eo.AVESTAN_ABBREVIATION_MARK=68409]="AVESTAN_ABBREVIATION_MARK",eo[eo.TINY_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68410]="TINY_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",eo[eo.SMALL_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68411]="SMALL_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",eo[eo.LARGE_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68412]="LARGE_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",eo[eo.LARGE_ONE_DOT_OVER_TWO_DOTS_PUNCTUATION=68413]="LARGE_ONE_DOT_OVER_TWO_DOTS_PUNCTUATION",eo[eo.LARGE_TWO_RINGS_OVER_ONE_RING_PUNCTUATION=68414]="LARGE_TWO_RINGS_OVER_ONE_RING_PUNCTUATION",eo[eo.LARGE_ONE_RING_OVER_TWO_RINGS_PUNCTUATION=68415]="LARGE_ONE_RING_OVER_TWO_RINGS_PUNCTUATION",eo[eo.PSALTER_PAHLAVI_SECTION_MARK=68505]="PSALTER_PAHLAVI_SECTION_MARK",eo[eo.PSALTER_PAHLAVI_TURNED_SECTION_MARK=68506]="PSALTER_PAHLAVI_TURNED_SECTION_MARK",eo[eo.PSALTER_PAHLAVI_FOUR_DOTS_WITH_CROSS=68507]="PSALTER_PAHLAVI_FOUR_DOTS_WITH_CROSS",eo[eo.PSALTER_PAHLAVI_FOUR_DOTS_WITH_DOT=68508]="PSALTER_PAHLAVI_FOUR_DOTS_WITH_DOT",eo[eo.SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS=69461]="SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS",eo[eo.SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS_WITH_DOTS=69462]="SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS_WITH_DOTS",eo[eo.SOGDIAN_PUNCTUATION_CIRCLE_WITH_DOT=69463]="SOGDIAN_PUNCTUATION_CIRCLE_WITH_DOT",eo[eo.SOGDIAN_PUNCTUATION_TWO_CIRCLES_WITH_DOTS=69464]="SOGDIAN_PUNCTUATION_TWO_CIRCLES_WITH_DOTS",eo[eo.SOGDIAN_PUNCTUATION_HALF_CIRCLE_WITH_DOT=69465]="SOGDIAN_PUNCTUATION_HALF_CIRCLE_WITH_DOT",eo[eo.BRAHMI_DANDA=69703]="BRAHMI_DANDA",eo[eo.BRAHMI_DOUBLE_DANDA=69704]="BRAHMI_DOUBLE_DANDA",eo[eo.BRAHMI_PUNCTUATION_DOT=69705]="BRAHMI_PUNCTUATION_DOT",eo[eo.BRAHMI_PUNCTUATION_DOUBLE_DOT=69706]="BRAHMI_PUNCTUATION_DOUBLE_DOT",eo[eo.BRAHMI_PUNCTUATION_LINE=69707]="BRAHMI_PUNCTUATION_LINE",eo[eo.BRAHMI_PUNCTUATION_CRESCENT_BAR=69708]="BRAHMI_PUNCTUATION_CRESCENT_BAR",eo[eo.BRAHMI_PUNCTUATION_LOTUS=69709]="BRAHMI_PUNCTUATION_LOTUS",eo[eo.KAITHI_ABBREVIATION_SIGN=69819]="KAITHI_ABBREVIATION_SIGN",eo[eo.KAITHI_ENUMERATION_SIGN=69820]="KAITHI_ENUMERATION_SIGN",eo[eo.KAITHI_SECTION_MARK=69822]="KAITHI_SECTION_MARK",eo[eo.KAITHI_DOUBLE_SECTION_MARK=69823]="KAITHI_DOUBLE_SECTION_MARK",eo[eo.KAITHI_DANDA=69824]="KAITHI_DANDA",eo[eo.KAITHI_DOUBLE_DANDA=69825]="KAITHI_DOUBLE_DANDA",eo[eo.CHAKMA_SECTION_MARK=69952]="CHAKMA_SECTION_MARK",eo[eo.CHAKMA_DANDA=69953]="CHAKMA_DANDA",eo[eo.CHAKMA_DOUBLE_DANDA=69954]="CHAKMA_DOUBLE_DANDA",eo[eo.CHAKMA_QUESTION_MARK=69955]="CHAKMA_QUESTION_MARK",eo[eo.MAHAJANI_ABBREVIATION_SIGN=70004]="MAHAJANI_ABBREVIATION_SIGN",eo[eo.MAHAJANI_SECTION_MARK=70005]="MAHAJANI_SECTION_MARK",eo[eo.SHARADA_DANDA=70085]="SHARADA_DANDA",eo[eo.SHARADA_DOUBLE_DANDA=70086]="SHARADA_DOUBLE_DANDA",eo[eo.SHARADA_ABBREVIATION_SIGN=70087]="SHARADA_ABBREVIATION_SIGN",eo[eo.SHARADA_SEPARATOR=70088]="SHARADA_SEPARATOR",eo[eo.SHARADA_SUTRA_MARK=70093]="SHARADA_SUTRA_MARK",eo[eo.SHARADA_SIGN_SIDDHAM=70107]="SHARADA_SIGN_SIDDHAM",eo[eo.SHARADA_CONTINUATION_SIGN=70109]="SHARADA_CONTINUATION_SIGN",eo[eo.SHARADA_SECTION_MARK_1=70110]="SHARADA_SECTION_MARK_1",eo[eo.SHARADA_SECTION_MARK_2=70111]="SHARADA_SECTION_MARK_2",eo[eo.KHOJKI_DANDA=70200]="KHOJKI_DANDA",eo[eo.KHOJKI_DOUBLE_DANDA=70201]="KHOJKI_DOUBLE_DANDA",eo[eo.KHOJKI_WORD_SEPARATOR=70202]="KHOJKI_WORD_SEPARATOR",eo[eo.KHOJKI_SECTION_MARK=70203]="KHOJKI_SECTION_MARK",eo[eo.KHOJKI_DOUBLE_SECTION_MARK=70204]="KHOJKI_DOUBLE_SECTION_MARK",eo[eo.KHOJKI_ABBREVIATION_SIGN=70205]="KHOJKI_ABBREVIATION_SIGN",eo[eo.MULTANI_SECTION_MARK=70313]="MULTANI_SECTION_MARK",eo[eo.NEWA_DANDA=70731]="NEWA_DANDA",eo[eo.NEWA_DOUBLE_DANDA=70732]="NEWA_DOUBLE_DANDA",eo[eo.NEWA_COMMA=70733]="NEWA_COMMA",eo[eo.NEWA_GAP_FILLER=70734]="NEWA_GAP_FILLER",eo[eo.NEWA_ABBREVIATION_SIGN=70735]="NEWA_ABBREVIATION_SIGN",eo[eo.NEWA_DOUBLE_COMMA=70746]="NEWA_DOUBLE_COMMA",eo[eo.NEWA_PLACEHOLDER_MARK=70747]="NEWA_PLACEHOLDER_MARK",eo[eo.NEWA_INSERTION_SIGN=70749]="NEWA_INSERTION_SIGN",eo[eo.TIRHUTA_ABBREVIATION_SIGN=70854]="TIRHUTA_ABBREVIATION_SIGN",eo[eo.SIDDHAM_SIGN_SIDDHAM=71105]="SIDDHAM_SIGN_SIDDHAM",eo[eo.SIDDHAM_DANDA=71106]="SIDDHAM_DANDA",eo[eo.SIDDHAM_DOUBLE_DANDA=71107]="SIDDHAM_DOUBLE_DANDA",eo[eo.SIDDHAM_SEPARATOR_DOT=71108]="SIDDHAM_SEPARATOR_DOT",eo[eo.SIDDHAM_SEPARATOR_BAR=71109]="SIDDHAM_SEPARATOR_BAR",eo[eo.SIDDHAM_REPETITION_MARK_1=71110]="SIDDHAM_REPETITION_MARK_1",eo[eo.SIDDHAM_REPETITION_MARK_2=71111]="SIDDHAM_REPETITION_MARK_2",eo[eo.SIDDHAM_REPETITION_MARK_3=71112]="SIDDHAM_REPETITION_MARK_3",eo[eo.SIDDHAM_END_OF_TEXT_MARK=71113]="SIDDHAM_END_OF_TEXT_MARK",eo[eo.SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_U_SHAPED_ORNAMENTS=71114]="SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_U_SHAPED_ORNAMENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_DOTTED_CRESCENTS=71115]="SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_DOTTED_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_CRESCENTS=71116]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_DOUBLE_CRESCENTS=71117]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_DOUBLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_TRIPLE_CRESCENTS=71118]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_TRIPLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_DOUBLE_RING=71119]="SIDDHAM_SECTION_MARK_DOUBLE_RING",eo[eo.SIDDHAM_SECTION_MARK_DOUBLE_RING_WITH_RAYS=71120]="SIDDHAM_SECTION_MARK_DOUBLE_RING_WITH_RAYS",eo[eo.SIDDHAM_SECTION_MARK_WITH_DOUBLE_CRESCENTS=71121]="SIDDHAM_SECTION_MARK_WITH_DOUBLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_TRIPLE_CRESCENTS=71122]="SIDDHAM_SECTION_MARK_WITH_TRIPLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_QUADRUPLE_CRESCENTS=71123]="SIDDHAM_SECTION_MARK_WITH_QUADRUPLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_SEPTUPLE_CRESCENTS=71124]="SIDDHAM_SECTION_MARK_WITH_SEPTUPLE_CRESCENTS",eo[eo.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_RAYS=71125]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_RAYS",eo[eo.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_TWO_ENCLOSURES=71126]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_TWO_ENCLOSURES",eo[eo.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_FOUR_ENCLOSURES=71127]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_FOUR_ENCLOSURES",eo[eo.MODI_DANDA=71233]="MODI_DANDA",eo[eo.MODI_DOUBLE_DANDA=71234]="MODI_DOUBLE_DANDA",eo[eo.MODI_ABBREVIATION_SIGN=71235]="MODI_ABBREVIATION_SIGN",eo[eo.MONGOLIAN_BIRGA_WITH_ORNAMENT=71264]="MONGOLIAN_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_ROTATED_BIRGA=71265]="MONGOLIAN_ROTATED_BIRGA",eo[eo.MONGOLIAN_DOUBLE_BIRGA_WITH_ORNAMENT=71266]="MONGOLIAN_DOUBLE_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_TRIPLE_BIRGA_WITH_ORNAMENT=71267]="MONGOLIAN_TRIPLE_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_BIRGA_WITH_DOUBLE_ORNAMENT=71268]="MONGOLIAN_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.MONGOLIAN_ROTATED_BIRGA_WITH_ORNAMENT=71269]="MONGOLIAN_ROTATED_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_ROTATED_BIRGA_WITH_DOUBLE_ORNAMENT=71270]="MONGOLIAN_ROTATED_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.MONGOLIAN_INVERTED_BIRGA=71271]="MONGOLIAN_INVERTED_BIRGA",eo[eo.MONGOLIAN_INVERTED_BIRGA_WITH_DOUBLE_ORNAMENT=71272]="MONGOLIAN_INVERTED_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.MONGOLIAN_SWIRL_BIRGA=71273]="MONGOLIAN_SWIRL_BIRGA",eo[eo.MONGOLIAN_SWIRL_BIRGA_WITH_ORNAMENT=71274]="MONGOLIAN_SWIRL_BIRGA_WITH_ORNAMENT",eo[eo.MONGOLIAN_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT=71275]="MONGOLIAN_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.MONGOLIAN_TURNED_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT=71276]="MONGOLIAN_TURNED_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT",eo[eo.AHOM_SIGN_SMALL_SECTION=71484]="AHOM_SIGN_SMALL_SECTION",eo[eo.AHOM_SIGN_SECTION=71485]="AHOM_SIGN_SECTION",eo[eo.AHOM_SIGN_RULAI=71486]="AHOM_SIGN_RULAI",eo[eo.DOGRA_ABBREVIATION_SIGN=71739]="DOGRA_ABBREVIATION_SIGN",eo[eo.DIVES_AKURU_DOUBLE_DANDA=72004]="DIVES_AKURU_DOUBLE_DANDA",eo[eo.DIVES_AKURU_GAP_FILLER=72005]="DIVES_AKURU_GAP_FILLER",eo[eo.DIVES_AKURU_END_OF_TEXT_MARK=72006]="DIVES_AKURU_END_OF_TEXT_MARK",eo[eo.NANDINAGARI_SIGN_SIDDHAM=72162]="NANDINAGARI_SIGN_SIDDHAM",eo[eo.ZANABAZAR_SQUARE_INITIAL_HEAD_MARK=72255]="ZANABAZAR_SQUARE_INITIAL_HEAD_MARK",eo[eo.ZANABAZAR_SQUARE_CLOSING_HEAD_MARK=72256]="ZANABAZAR_SQUARE_CLOSING_HEAD_MARK",eo[eo.ZANABAZAR_SQUARE_MARK_TSHEG=72257]="ZANABAZAR_SQUARE_MARK_TSHEG",eo[eo.ZANABAZAR_SQUARE_MARK_SHAD=72258]="ZANABAZAR_SQUARE_MARK_SHAD",eo[eo.ZANABAZAR_SQUARE_MARK_DOUBLE_SHAD=72259]="ZANABAZAR_SQUARE_MARK_DOUBLE_SHAD",eo[eo.ZANABAZAR_SQUARE_MARK_LONG_TSHEG=72260]="ZANABAZAR_SQUARE_MARK_LONG_TSHEG",eo[eo.ZANABAZAR_SQUARE_INITIAL_DOUBLE_LINED_HEAD_MARK=72261]="ZANABAZAR_SQUARE_INITIAL_DOUBLE_LINED_HEAD_MARK",eo[eo.ZANABAZAR_SQUARE_CLOSING_DOUBLE_LINED_HEAD_MARK=72262]="ZANABAZAR_SQUARE_CLOSING_DOUBLE_LINED_HEAD_MARK",eo[eo.SOYOMBO_MARK_TSHEG=72346]="SOYOMBO_MARK_TSHEG",eo[eo.SOYOMBO_MARK_SHAD=72347]="SOYOMBO_MARK_SHAD",eo[eo.SOYOMBO_MARK_DOUBLE_SHAD=72348]="SOYOMBO_MARK_DOUBLE_SHAD",eo[eo.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_TRIPLE_FLAME=72350]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_TRIPLE_FLAME",eo[eo.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_FLAME=72351]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_FLAME",eo[eo.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN=72352]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN",eo[eo.SOYOMBO_TERMINAL_MARK_1=72353]="SOYOMBO_TERMINAL_MARK_1",eo[eo.SOYOMBO_TERMINAL_MARK_2=72354]="SOYOMBO_TERMINAL_MARK_2",eo[eo.BHAIKSUKI_DANDA=72769]="BHAIKSUKI_DANDA",eo[eo.BHAIKSUKI_DOUBLE_DANDA=72770]="BHAIKSUKI_DOUBLE_DANDA",eo[eo.BHAIKSUKI_WORD_SEPARATOR=72771]="BHAIKSUKI_WORD_SEPARATOR",eo[eo.BHAIKSUKI_GAP_FILLER_1=72772]="BHAIKSUKI_GAP_FILLER_1",eo[eo.BHAIKSUKI_GAP_FILLER_2=72773]="BHAIKSUKI_GAP_FILLER_2",eo[eo.MARCHEN_HEAD_MARK=72816]="MARCHEN_HEAD_MARK",eo[eo.MARCHEN_MARK_SHAD=72817]="MARCHEN_MARK_SHAD",eo[eo.MAKASAR_PASSIMBANG=73463]="MAKASAR_PASSIMBANG",eo[eo.MAKASAR_END_OF_SECTION=73464]="MAKASAR_END_OF_SECTION",eo[eo.TAMIL_PUNCTUATION_END_OF_TEXT=73727]="TAMIL_PUNCTUATION_END_OF_TEXT",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_OLD_ASSYRIAN_WORD_DIVIDER=74864]="CUNEIFORM_PUNCTUATION_SIGN_OLD_ASSYRIAN_WORD_DIVIDER",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_VERTICAL_COLON=74865]="CUNEIFORM_PUNCTUATION_SIGN_VERTICAL_COLON",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_COLON=74866]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_COLON",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_TRICOLON=74867]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_TRICOLON",eo[eo.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_QUADCOLON=74868]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_QUADCOLON",eo[eo.MRO_DANDA=92782]="MRO_DANDA",eo[eo.MRO_DOUBLE_DANDA=92783]="MRO_DOUBLE_DANDA",eo[eo.BASSA_VAH_FULL_STOP=92917]="BASSA_VAH_FULL_STOP",eo[eo.PAHAWH_HMONG_SIGN_VOS_THOM=92983]="PAHAWH_HMONG_SIGN_VOS_THOM",eo[eo.PAHAWH_HMONG_SIGN_VOS_TSHAB_CEEB=92984]="PAHAWH_HMONG_SIGN_VOS_TSHAB_CEEB",eo[eo.PAHAWH_HMONG_SIGN_CIM_CHEEM=92985]="PAHAWH_HMONG_SIGN_CIM_CHEEM",eo[eo.PAHAWH_HMONG_SIGN_VOS_THIAB=92986]="PAHAWH_HMONG_SIGN_VOS_THIAB",eo[eo.PAHAWH_HMONG_SIGN_VOS_FEEM=92987]="PAHAWH_HMONG_SIGN_VOS_FEEM",eo[eo.PAHAWH_HMONG_SIGN_XAUS=92996]="PAHAWH_HMONG_SIGN_XAUS",eo[eo.MEDEFAIDRIN_COMMA=93847]="MEDEFAIDRIN_COMMA",eo[eo.MEDEFAIDRIN_FULL_STOP=93848]="MEDEFAIDRIN_FULL_STOP",eo[eo.MEDEFAIDRIN_SYMBOL_AIVA=93849]="MEDEFAIDRIN_SYMBOL_AIVA",eo[eo.MEDEFAIDRIN_EXCLAMATION_OH=93850]="MEDEFAIDRIN_EXCLAMATION_OH",eo[eo.OLD_CHINESE_HOOK_MARK=94178]="OLD_CHINESE_HOOK_MARK",eo[eo.DUPLOYAN_PUNCTUATION_CHINOOK_FULL_STOP=113823]="DUPLOYAN_PUNCTUATION_CHINOOK_FULL_STOP",eo[eo.SIGNWRITING_COMMA=121479]="SIGNWRITING_COMMA",eo[eo.SIGNWRITING_FULL_STOP=121480]="SIGNWRITING_FULL_STOP",eo[eo.SIGNWRITING_SEMICOLON=121481]="SIGNWRITING_SEMICOLON",eo[eo.SIGNWRITING_COLON=121482]="SIGNWRITING_COLON",eo[eo.SIGNWRITING_PARENTHESIS=121483]="SIGNWRITING_PARENTHESIS",eo[eo.ADLAM_INITIAL_EXCLAMATION_MARK=125278]="ADLAM_INITIAL_EXCLAMATION_MARK",eo[eo.ADLAM_INITIAL_QUESTION_MARK=125279]="ADLAM_INITIAL_QUESTION_MARK"})(UnicodePoCodePoint||(UnicodePoCodePoint={}));var UnicodePsCodePoint;(function(eo){eo[eo.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",eo[eo.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",eo[eo.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",eo[eo.TIBETAN_MARK_GUG_RTAGS_GYON=3898]="TIBETAN_MARK_GUG_RTAGS_GYON",eo[eo.TIBETAN_MARK_ANG_KHANG_GYON=3900]="TIBETAN_MARK_ANG_KHANG_GYON",eo[eo.OGHAM_FEATHER_MARK=5787]="OGHAM_FEATHER_MARK",eo[eo.SINGLE_LOW_9_QUOTATION_MARK=8218]="SINGLE_LOW_9_QUOTATION_MARK",eo[eo.DOUBLE_LOW_9_QUOTATION_MARK=8222]="DOUBLE_LOW_9_QUOTATION_MARK",eo[eo.LEFT_SQUARE_BRACKET_WITH_QUILL=8261]="LEFT_SQUARE_BRACKET_WITH_QUILL",eo[eo.SUPERSCRIPT_LEFT_PARENTHESIS=8317]="SUPERSCRIPT_LEFT_PARENTHESIS",eo[eo.SUBSCRIPT_LEFT_PARENTHESIS=8333]="SUBSCRIPT_LEFT_PARENTHESIS",eo[eo.LEFT_CEILING=8968]="LEFT_CEILING",eo[eo.LEFT_FLOOR=8970]="LEFT_FLOOR",eo[eo.LEFT_POINTING_ANGLE_BRACKET=9001]="LEFT_POINTING_ANGLE_BRACKET",eo[eo.MEDIUM_LEFT_PARENTHESIS_ORNAMENT=10088]="MEDIUM_LEFT_PARENTHESIS_ORNAMENT",eo[eo.MEDIUM_FLATTENED_LEFT_PARENTHESIS_ORNAMENT=10090]="MEDIUM_FLATTENED_LEFT_PARENTHESIS_ORNAMENT",eo[eo.MEDIUM_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT=10092]="MEDIUM_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT",eo[eo.HEAVY_LEFT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT=10094]="HEAVY_LEFT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT",eo[eo.HEAVY_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT=10096]="HEAVY_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT",eo[eo.LIGHT_LEFT_TORTOISE_SHELL_BRACKET_ORNAMENT=10098]="LIGHT_LEFT_TORTOISE_SHELL_BRACKET_ORNAMENT",eo[eo.MEDIUM_LEFT_CURLY_BRACKET_ORNAMENT=10100]="MEDIUM_LEFT_CURLY_BRACKET_ORNAMENT",eo[eo.LEFT_S_SHAPED_BAG_DELIMITER=10181]="LEFT_S_SHAPED_BAG_DELIMITER",eo[eo.MATHEMATICAL_LEFT_WHITE_SQUARE_BRACKET=10214]="MATHEMATICAL_LEFT_WHITE_SQUARE_BRACKET",eo[eo.MATHEMATICAL_LEFT_ANGLE_BRACKET=10216]="MATHEMATICAL_LEFT_ANGLE_BRACKET",eo[eo.MATHEMATICAL_LEFT_DOUBLE_ANGLE_BRACKET=10218]="MATHEMATICAL_LEFT_DOUBLE_ANGLE_BRACKET",eo[eo.MATHEMATICAL_LEFT_WHITE_TORTOISE_SHELL_BRACKET=10220]="MATHEMATICAL_LEFT_WHITE_TORTOISE_SHELL_BRACKET",eo[eo.MATHEMATICAL_LEFT_FLATTENED_PARENTHESIS=10222]="MATHEMATICAL_LEFT_FLATTENED_PARENTHESIS",eo[eo.LEFT_WHITE_CURLY_BRACKET=10627]="LEFT_WHITE_CURLY_BRACKET",eo[eo.LEFT_WHITE_PARENTHESIS=10629]="LEFT_WHITE_PARENTHESIS",eo[eo.Z_NOTATION_LEFT_IMAGE_BRACKET=10631]="Z_NOTATION_LEFT_IMAGE_BRACKET",eo[eo.Z_NOTATION_LEFT_BINDING_BRACKET=10633]="Z_NOTATION_LEFT_BINDING_BRACKET",eo[eo.LEFT_SQUARE_BRACKET_WITH_UNDERBAR=10635]="LEFT_SQUARE_BRACKET_WITH_UNDERBAR",eo[eo.LEFT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER=10637]="LEFT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER",eo[eo.LEFT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER=10639]="LEFT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER",eo[eo.LEFT_ANGLE_BRACKET_WITH_DOT=10641]="LEFT_ANGLE_BRACKET_WITH_DOT",eo[eo.LEFT_ARC_LESS_THAN_BRACKET=10643]="LEFT_ARC_LESS_THAN_BRACKET",eo[eo.DOUBLE_LEFT_ARC_GREATER_THAN_BRACKET=10645]="DOUBLE_LEFT_ARC_GREATER_THAN_BRACKET",eo[eo.LEFT_BLACK_TORTOISE_SHELL_BRACKET=10647]="LEFT_BLACK_TORTOISE_SHELL_BRACKET",eo[eo.LEFT_WIGGLY_FENCE=10712]="LEFT_WIGGLY_FENCE",eo[eo.LEFT_DOUBLE_WIGGLY_FENCE=10714]="LEFT_DOUBLE_WIGGLY_FENCE",eo[eo.LEFT_POINTING_CURVED_ANGLE_BRACKET=10748]="LEFT_POINTING_CURVED_ANGLE_BRACKET",eo[eo.TOP_LEFT_HALF_BRACKET=11810]="TOP_LEFT_HALF_BRACKET",eo[eo.BOTTOM_LEFT_HALF_BRACKET=11812]="BOTTOM_LEFT_HALF_BRACKET",eo[eo.LEFT_SIDEWAYS_U_BRACKET=11814]="LEFT_SIDEWAYS_U_BRACKET",eo[eo.LEFT_DOUBLE_PARENTHESIS=11816]="LEFT_DOUBLE_PARENTHESIS",eo[eo.DOUBLE_LOW_REVERSED_9_QUOTATION_MARK=11842]="DOUBLE_LOW_REVERSED_9_QUOTATION_MARK",eo[eo.LEFT_ANGLE_BRACKET=12296]="LEFT_ANGLE_BRACKET",eo[eo.LEFT_DOUBLE_ANGLE_BRACKET=12298]="LEFT_DOUBLE_ANGLE_BRACKET",eo[eo.LEFT_CORNER_BRACKET=12300]="LEFT_CORNER_BRACKET",eo[eo.LEFT_WHITE_CORNER_BRACKET=12302]="LEFT_WHITE_CORNER_BRACKET",eo[eo.LEFT_BLACK_LENTICULAR_BRACKET=12304]="LEFT_BLACK_LENTICULAR_BRACKET",eo[eo.LEFT_TORTOISE_SHELL_BRACKET=12308]="LEFT_TORTOISE_SHELL_BRACKET",eo[eo.LEFT_WHITE_LENTICULAR_BRACKET=12310]="LEFT_WHITE_LENTICULAR_BRACKET",eo[eo.LEFT_WHITE_TORTOISE_SHELL_BRACKET=12312]="LEFT_WHITE_TORTOISE_SHELL_BRACKET",eo[eo.LEFT_WHITE_SQUARE_BRACKET=12314]="LEFT_WHITE_SQUARE_BRACKET",eo[eo.REVERSED_DOUBLE_PRIME_QUOTATION_MARK=12317]="REVERSED_DOUBLE_PRIME_QUOTATION_MARK",eo[eo.ORNATE_RIGHT_PARENTHESIS=64831]="ORNATE_RIGHT_PARENTHESIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_LENTICULAR_BRACKET=65047]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_LENTICULAR_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_PARENTHESIS=65077]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_PARENTHESIS",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_CURLY_BRACKET=65079]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_CURLY_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_TORTOISE_SHELL_BRACKET=65081]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_TORTOISE_SHELL_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_BLACK_LENTICULAR_BRACKET=65083]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_BLACK_LENTICULAR_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_DOUBLE_ANGLE_BRACKET=65085]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_DOUBLE_ANGLE_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_ANGLE_BRACKET=65087]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_ANGLE_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_CORNER_BRACKET=65089]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_CORNER_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_CORNER_BRACKET=65091]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_CORNER_BRACKET",eo[eo.PRESENTATION_FORM_FOR_VERTICAL_LEFT_SQUARE_BRACKET=65095]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_SQUARE_BRACKET",eo[eo.SMALL_LEFT_PARENTHESIS=65113]="SMALL_LEFT_PARENTHESIS",eo[eo.SMALL_LEFT_CURLY_BRACKET=65115]="SMALL_LEFT_CURLY_BRACKET",eo[eo.SMALL_LEFT_TORTOISE_SHELL_BRACKET=65117]="SMALL_LEFT_TORTOISE_SHELL_BRACKET",eo[eo.FULLWIDTH_LEFT_PARENTHESIS=65288]="FULLWIDTH_LEFT_PARENTHESIS",eo[eo.FULLWIDTH_LEFT_SQUARE_BRACKET=65339]="FULLWIDTH_LEFT_SQUARE_BRACKET",eo[eo.FULLWIDTH_LEFT_CURLY_BRACKET=65371]="FULLWIDTH_LEFT_CURLY_BRACKET",eo[eo.FULLWIDTH_LEFT_WHITE_PARENTHESIS=65375]="FULLWIDTH_LEFT_WHITE_PARENTHESIS",eo[eo.HALFWIDTH_LEFT_CORNER_BRACKET=65378]="HALFWIDTH_LEFT_CORNER_BRACKET"})(UnicodePsCodePoint||(UnicodePsCodePoint={}));var UnicodeZsCodePoint;(function(eo){eo[eo.SPACE=32]="SPACE",eo[eo.NO_BREAK_SPACE=160]="NO_BREAK_SPACE",eo[eo.OGHAM_SPACE_MARK=5760]="OGHAM_SPACE_MARK",eo[eo.EN_QUAD=8192]="EN_QUAD",eo[eo.EM_QUAD=8193]="EM_QUAD",eo[eo.EN_SPACE=8194]="EN_SPACE",eo[eo.EM_SPACE=8195]="EM_SPACE",eo[eo.THREE_PER_EM_SPACE=8196]="THREE_PER_EM_SPACE",eo[eo.FOUR_PER_EM_SPACE=8197]="FOUR_PER_EM_SPACE",eo[eo.SIX_PER_EM_SPACE=8198]="SIX_PER_EM_SPACE",eo[eo.FIGURE_SPACE=8199]="FIGURE_SPACE",eo[eo.PUNCTUATION_SPACE=8200]="PUNCTUATION_SPACE",eo[eo.THIN_SPACE=8201]="THIN_SPACE",eo[eo.HAIR_SPACE=8202]="HAIR_SPACE",eo[eo.NARROW_NO_BREAK_SPACE=8239]="NARROW_NO_BREAK_SPACE",eo[eo.MEDIUM_MATHEMATICAL_SPACE=8287]="MEDIUM_MATHEMATICAL_SPACE",eo[eo.IDEOGRAPHIC_SPACE=12288]="IDEOGRAPHIC_SPACE"})(UnicodeZsCodePoint||(UnicodeZsCodePoint={}));var VirtualCodePoint;(function(eo){eo[eo.LINE_END=-1]="LINE_END",eo[eo.SPACE=-2]="SPACE"})(VirtualCodePoint||(VirtualCodePoint={}));function createCodePointSearcher(eo){const to=[...new Set(eo)].sort((oo,io)=>oo-io),ro=to.length;if(ro<8)return[oo=>{for(let io=0;ioso+io);++io);no.push(so,so+io)}if(no.length*1.5{for(let so=0;so{let so=0,ao=oo;for(;so>>1;io{let io=0,so=ro;for(;io>>1;ootypeof to=="number")}createCodePointSearcher([AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.CR,AsciiCodePoint.SPACE]);const[isAsciiPunctuationCharacter,asciiPunctuationCharacters]=createCodePointSearcher([AsciiCodePoint.EXCLAMATION_MARK,AsciiCodePoint.DOUBLE_QUOTE,AsciiCodePoint.NUMBER_SIGN,AsciiCodePoint.DOLLAR_SIGN,AsciiCodePoint.PERCENT_SIGN,AsciiCodePoint.AMPERSAND,AsciiCodePoint.SINGLE_QUOTE,AsciiCodePoint.OPEN_PARENTHESIS,AsciiCodePoint.CLOSE_PARENTHESIS,AsciiCodePoint.ASTERISK,AsciiCodePoint.PLUS_SIGN,AsciiCodePoint.COMMA,AsciiCodePoint.MINUS_SIGN,AsciiCodePoint.DOT,AsciiCodePoint.SLASH,AsciiCodePoint.COLON,AsciiCodePoint.SEMICOLON,AsciiCodePoint.OPEN_ANGLE,AsciiCodePoint.EQUALS_SIGN,AsciiCodePoint.CLOSE_ANGLE,AsciiCodePoint.QUESTION_MARK,AsciiCodePoint.AT_SIGN,AsciiCodePoint.OPEN_BRACKET,AsciiCodePoint.BACKSLASH,AsciiCodePoint.CLOSE_BRACKET,AsciiCodePoint.CARET,AsciiCodePoint.UNDERSCORE,AsciiCodePoint.BACKTICK,AsciiCodePoint.OPEN_BRACE,AsciiCodePoint.VERTICAL_SLASH,AsciiCodePoint.CLOSE_BRACE,AsciiCodePoint.TILDE]),isAsciiDigitCharacter=eo=>eo>=AsciiCodePoint.DIGIT0&&eo<=AsciiCodePoint.DIGIT9,isAsciiLowerLetter=eo=>eo>=AsciiCodePoint.LOWERCASE_A&&eo<=AsciiCodePoint.LOWERCASE_Z,isAsciiUpperLetter=eo=>eo>=AsciiCodePoint.UPPERCASE_A&&eo<=AsciiCodePoint.UPPERCASE_Z,isAsciiLetter=eo=>isAsciiLowerLetter(eo)||isAsciiUpperLetter(eo),isAlphanumeric=eo=>isAsciiLowerLetter(eo)||isAsciiUpperLetter(eo)||isAsciiDigitCharacter(eo),isAsciiCharacter=eo=>eo>=AsciiCodePoint.NUL&&eo<=AsciiCodePoint.DELETE,[isAsciiControlCharacter,asciiControlCharacters]=createCodePointSearcher([AsciiCodePoint.NUL,AsciiCodePoint.SOH,AsciiCodePoint.STX,AsciiCodePoint.ETX,AsciiCodePoint.EOT,AsciiCodePoint.ENQ,AsciiCodePoint.ACK,AsciiCodePoint.BEL,AsciiCodePoint.BS,AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.CR,AsciiCodePoint.SO,AsciiCodePoint.SI,AsciiCodePoint.DLE,AsciiCodePoint.DC1,AsciiCodePoint.DC2,AsciiCodePoint.DC3,AsciiCodePoint.DC4,AsciiCodePoint.NAK,AsciiCodePoint.SYN,AsciiCodePoint.ETB,AsciiCodePoint.CAN,AsciiCodePoint.EM,AsciiCodePoint.SUB,AsciiCodePoint.ESC,AsciiCodePoint.FS,AsciiCodePoint.GS,AsciiCodePoint.RS,AsciiCodePoint.US,AsciiCodePoint.DELETE]),[isWhitespaceCharacter,whitespaceCharacters]=createCodePointSearcher([AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.SPACE,VirtualCodePoint.SPACE,VirtualCodePoint.LINE_END]);AsciiCodePoint.SPACE,VirtualCodePoint.SPACE;const isSpaceCharacter=eo=>eo===AsciiCodePoint.SPACE||eo===VirtualCodePoint.SPACE,isLineEnding=eo=>eo===VirtualCodePoint.LINE_END,[isPunctuationCharacter,punctuationCharacters]=createCodePointSearcher([...asciiPunctuationCharacters,...collectCodePointsFromEnum(UnicodePcCodePoint),...collectCodePointsFromEnum(UnicodePdCodePoint),...collectCodePointsFromEnum(UnicodePeCodePoint),...collectCodePointsFromEnum(UnicodePfCodePoint),...collectCodePointsFromEnum(UnicodePiCodePoint),...collectCodePointsFromEnum(UnicodePoCodePoint),...collectCodePointsFromEnum(UnicodePsCodePoint)]),isSpaceLike=eo=>isSpaceCharacter(eo)||isLineEnding(eo),[isUnicodeWhitespaceCharacter,unicodeWhitespaceCharacters]=createCodePointSearcher([AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.FF,AsciiCodePoint.CR,VirtualCodePoint.SPACE,VirtualCodePoint.LINE_END,...collectCodePointsFromEnum(UnicodeZsCodePoint)]);var UnicodeCodePoint;(function(eo){eo[eo.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(UnicodeCodePoint||(UnicodeCodePoint={}));function createEntityReferenceTrie(){const eo=(oo,io)=>{if(oo.length<=4){for(let lo=0;lo=io)return lo;return oo.length}let so=0,ao=oo.length;for(;so>>1;oo[lo].key{let so=to;for(const ao of oo){const lo=eo(so.children,ao);if(lo>=so.children.length){const co={key:ao,children:[]};so.children.push(co),so=co;continue}let uo=so.children[lo];if(uo.key===ao){so=uo;continue}uo={key:ao,children:[]},so.children.splice(lo,0,uo),so=uo}so.value=io},search:(oo,io,so)=>{let ao=to;for(let lo=io;lo=ao.children.length)return null;const fo=ao.children[co];if(fo.key!==uo)return null;if(fo.value!=null)return{nextIndex:lo+1,value:fo.value};ao=fo}return null}}}const entityReferenceTrie=createEntityReferenceTrie();entityReferences.forEach(eo=>entityReferenceTrie.insert(eo.key,eo.value));function eatEntityReference(eo,to,ro){if(to+1>=ro)return null;const no=entityReferenceTrie.search(eo,to,ro);if(no!=null)return no;if(eo[to].codePoint!==AsciiCodePoint.NUMBER_SIGN)return null;let oo=0,io=to+1;if(eo[io].codePoint===AsciiCodePoint.LOWERCASE_X||eo[io].codePoint===AsciiCodePoint.UPPERCASE_X){io+=1;for(let ao=1;ao<=6&&io=AsciiCodePoint.UPPERCASE_A&&lo<=AsciiCodePoint.UPPERCASE_F){oo=(oo<<4)+(lo-AsciiCodePoint.UPPERCASE_A+10);continue}if(lo>=AsciiCodePoint.LOWERCASE_A&&lo<=AsciiCodePoint.LOWERCASE_F){oo=(oo<<4)+(lo-AsciiCodePoint.LOWERCASE_A+10);continue}break}}else for(let ao=1;ao<=7&&io=ro||eo[io].codePoint!==AsciiCodePoint.SEMICOLON)return null;let so;try{oo===0&&(oo=UnicodeCodePoint.REPLACEMENT_CHARACTER),so=String.fromCodePoint(oo)}catch{so=String.fromCodePoint(UnicodeCodePoint.REPLACEMENT_CHARACTER)}return{nextIndex:io+1,value:so}}function foldCase(eo){return Array.from(eo).map(to=>foldingCaseCodeMap[to]??to).join("")}(()=>{try{const eo=new RegExp("\\p{Script=Han}|[\\u{3002}\\u{ff1f}\\u{ff01}\\u{ff0c}\\u{3001}\\u{ff1b}\\u{ff1a}\\u{201c}\\u{201d}\\u{2018}\\u{2019}\\u{ff08}\\u{ff09}\\u{300a}\\u{300b}\\u{3008}\\u{3009}\\u{3010}\\u{3011}\\u{300e}\\u{300f}\\u{300c}\\u{300d}\\u{fe43}\\u{fe44}\\u{3014}\\u{3015}\\u{2026}\\u{2014}\\u{ff5e}\\u{fe4f}\\u{ffe5}]","u").source,to=new RegExp(`(${eo})\\n+(${eo})`,"gu");return ro=>ro.replace(to,"$1$2")}catch{const eo=/[\u{4E00}-\u{9FCC}\u{3400}-\u{4DB5}\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]|[\u{d840}-\u{d868}][\u{dc00}-\u{dfff}]|\u{d869}[\u{dc00}-\u{ded6}\u{df00}-\u{dfff}]|[\u{d86a}-\u{d86c}][\u{dc00}-\u{dfff}]|\u{d86d}[\u{dc00}-\u{df34}\u{df40}-\u{dfff}]|\u{d86e}[\u{dc00}-\u{dc1d}]/u.source,to=new RegExp(`(${eo})\\n+(${eo})`,"gu");return ro=>ro.replace(to,"$1$2")}})();(()=>{try{const eo=new RegExp("\\p{Script=Han}|[\\u{3002}\\u{ff1f}\\u{ff01}\\u{ff0c}\\u{3001}\\u{ff1b}\\u{ff1a}\\u{201c}\\u{201d}\\u{2018}\\u{2019}\\u{ff08}\\u{ff09}\\u{300a}\\u{300b}\\u{3008}\\u{3009}\\u{3010}\\u{3011}\\u{300e}\\u{300f}\\u{300c}\\u{300d}\\u{fe43}\\u{fe44}\\u{3014}\\u{3015}\\u{2026}\\u{2014}\\u{ff5e}\\u{fe4f}\\u{ffe5}]","u").source,to=new RegExp(`(${eo})[\\s\\n]+(${eo})`,"gu");return ro=>ro.replace(to,"$1$2")}catch{const eo=/[\u{4E00}-\u{9FCC}\u{3400}-\u{4DB5}\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]|[\u{d840}-\u{d868}][\u{dc00}-\u{dfff}]|\u{d869}[\u{dc00}-\u{ded6}\u{df00}-\u{dfff}]|[\u{d86a}-\u{d86c}][\u{dc00}-\u{dfff}]|\u{d86d}[\u{dc00}-\u{df34}\u{df40}-\u{dfff}]|\u{d86e}[\u{dc00}-\u{dc1d}]/u.source,to=new RegExp(`(${eo})[\\s\\n]+(${eo})`,"gu");return ro=>ro.replace(to,"$1$2")}})();function*createNodePointGenerator(eo){let to=0,ro=1,no=1;const oo=typeof eo=="string"?[eo]:eo;for(const io of oo){const so=[];for(const uo of io){const co=uo.codePointAt(0);so.push(co)}const ao=[],lo=so.length;for(let uo=0;uo>2,uo=so-io&3;for(let co=0;co>2,uo=so-io&3;for(let co=0;co!0;if(eo instanceof Function)return eo;if(eo.length===0)return()=>!1;if(eo.length===1){const to=eo[0];return ro=>ro.type===to}if(eo.length===2){const[to,ro]=eo;return no=>no.type===to||no.type===ro}return to=>{for(const ro of eo)if(to.type===ro)return!0;return!1}}function traverseAst(eo,to,ro){const no=createNodeMatcher(to),oo=io=>{const{children:so}=io;for(let ao=0;ao{const no={};traverseAst(eo,to,so=>{const ao=so;no[ao.identifier]===void 0&&(no[ao.identifier]=ao)});const oo=[];for(const so of ro)no[so.identifier]===void 0&&(no[so.identifier]=so,oo.push(so));return{root:oo.length>0?{...eo,children:eo.children.concat(oo)}:eo,definitionMap:no}},astClasses=mergeStyleSets({root:{"--colorBgBlockquote":"none","--colorBgTableHead":"hsl(0deg, 0%, 94%)","--colorBgTableEvenRow":"hsl(0deg, 0%, 96%)","--colorBgTableOddRow":"hsl(0deg, 0%, 100%)","--colorBorderBlockquote":"hsl(210deg, 13%, 85%)","--colorBorderHeading":"hsl(0deg, 0%, 80%)","--colorBorderImage":"hsl(277deg, 19%, 47%)","--colorBorderTable":"hsl(220deg, 7%, 90%)","--colorBgCode":"#f5f7f9","--colorDelete":"hsl(210deg, 8%, 65%)","--colorHeading":"hsl(0deg, 0%, 25%)","--colorImageTitle":"hsl(0deg, 0%, 50%)","--colorInlineCode":"hsl(348deg, 60%, 47%)","--colorLink":"hsl(206deg, 53%, 47%)","--colorLinkActive":"hsl(206deg, 53%, 52%)","--colorLinkHover":"hsl(206deg, 53%, 52%)","--colorLinkVisited":"hsl(206deg, 53%, 47%)","--fontFamilyCode":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif","--fontFamilyHeading":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif"},rootDarken:{"&&":{"--colorBgBlockquote":"none","--colorBgTableHead":"hsl(200deg, 10%, 16%)","--colorBgTableEvenRow":"hsl(200deg, 10%, 16%)","--colorBgTableOddRow":"hsl(0deg, 0%, 9%)","--colorBorderBlockquote":"hsl(207deg, 7%, 45%)","--colorBorderHeading":"hsla(0deg, 0%, 30%, 0.8)","--colorBorderImage":"hsl(290deg, 15%, 49%)","--colorBorderTable":"hsl(0deg, 0%, 50%)","--colorBgCode":"hsl(0deg, 0%, 12%)","--colorDelete":"hsl(220deg, 5%, 68%)","--colorHeading":"hsl(0deg, 0%, 65%)","--colorImageTitle":"hsl(0deg, 0%, 50%)","--colorInlineCode":"hsl(348deg, 70%, 52%)","--colorLink":"hsl(207deg, 53%, 50%)","--colorLinkActive":"hsl(207deg, 53%, 50%)","--colorLinkHover":"hsl(207deg, 53%, 50%)","--colorLinkVisited":"hsl(207deg, 53%, 50%)","--fontFamilyCode":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif","--fontFamilyHeading":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif"}},blockquote:{},break:{},code:{},delete:{},emphasis:{},heading:{},image:{},imageReference:{},inlineCode:{},link:{},linkReference:{},list:{},listItem:{},paragraph:{},strong:{},table:{},text:{},thematicBreak:{}}),NodeRendererContextType=React.createContext(null);NodeRendererContextType.displayName="NodeRendererContextType";const useNodeRendererContext=()=>React.useContext(NodeRendererContextType);class SafeBatchHandler{constructor(){Ws(this,"_errors");Ws(this,"_summary");this._errors=[],this._summary=void 0}cleanup(){this._errors.length=0,this._summary=void 0}run(to){try{to()}catch(ro){this._errors.push(ro),this._summary=void 0}}summary(to){if(this._summary===void 0){if(this._errors.length===1)throw this._summary=this._errors[0];this._errors.length>1&&(this._summary=new AggregateError(this._errors,to))}if(this._summary!==void 0)throw this._summary}}function disposeAll(eo){const to=new SafeBatchHandler;for(const ro of eo)to.run(()=>ro.dispose());to.summary("[disposeAll] Encountered errors while disposing"),to.cleanup()}class BatchDisposable{constructor(){Ws(this,"_disposed");Ws(this,"_disposables");this._disposed=!1,this._disposables=[]}get disposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;try{disposeAll(this._disposables)}finally{this._disposables.length=0}}}registerDisposable(to){to.disposed||(this._disposed?to.dispose():this._disposables.push(to))}}class Disposable{constructor(to){Ws(this,"_onDispose");Ws(this,"_disposed");this._onDispose=to,this._disposed=!1}get disposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._onDispose())}}function isDisposable(eo){return eo===null||typeof eo!="object"?!1:typeof Reflect.get(eo,"dispose")=="function"&&typeof Reflect.get(eo,"disposed")=="boolean"}const noop$1=()=>{};class Subscriber{constructor(to){Ws(this,"_onDispose");Ws(this,"_onNext");Ws(this,"_disposed");this._onDispose=(to==null?void 0:to.onDispose)??noop$1,this._onNext=to.onNext,this._disposed=!1}get disposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._onDispose())}next(to,ro){this._disposed||this._onNext(to,ro)}}const noopUnsubscribable$1={unsubscribe:()=>{}};class Subscribers{constructor(to={}){Ws(this,"ARRANGE_THRESHOLD");Ws(this,"_disposed");Ws(this,"_items");Ws(this,"_subscribingCount");this.ARRANGE_THRESHOLD=to.ARRANGE_THRESHOLD??16,this._disposed=!1,this._items=[],this._subscribingCount=0}get size(){return this._subscribingCount}get disposed(){return this._disposed}dispose(){if(this._disposed)return;this._disposed=!0;const to=new SafeBatchHandler,ro=this._items;for(let no=0;nooo.subscriber.dispose()))}ro.length=0,this._subscribingCount=0,to.summary("Encountered errors while disposing."),to.cleanup()}notify(to,ro){if(this._disposed)return;const no=new SafeBatchHandler,oo=this._items;for(let io=0,so=oo.length;ioao.subscriber.next(to,ro))}no.summary("Encountered errors while notifying subscribers."),no.cleanup()}subscribe(to){if(to.disposed)return noopUnsubscribable$1;if(this.disposed)return to.dispose(),noopUnsubscribable$1;const ro={subscriber:to,unsubscribed:!1};return this._items.push(ro),this._subscribingCount+=1,{unsubscribe:()=>{ro.unsubscribed||(ro.unsubscribed=!0,this._subscribingCount-=1,this._arrange())}}}_arrange(){const to=this._items;if(to.length>=this.ARRANGE_THRESHOLD&&this._subscribingCount*2<=to.length){const ro=[];for(let no=0;no{},noopUnsubscribable={unsubscribe:noop},noopUnobservable={unobserve:noop},isObservable=eo=>eo===null||typeof eo!="object"?!1:typeof Reflect.get(eo,"dispose")=="function"&&typeof Reflect.get(eo,"disposed")=="boolean"&&typeof Reflect.get(eo,"subscribe")=="function"&&typeof Reflect.get(eo,"equals")=="function"&&typeof Reflect.get(eo,"getSnapshot")=="function"&&typeof Reflect.get(eo,"next")=="function",defaultEquals=(eo,to)=>Object.is(eo,to);class Observable extends BatchDisposable{constructor(ro,no={}){super();Ws(this,"equals");Ws(this,"_delay");Ws(this,"_subscribers");Ws(this,"_value");Ws(this,"_updateTick");Ws(this,"_notifyTick");Ws(this,"_lastNotifiedValue");Ws(this,"_timer");const{equals:oo=defaultEquals}=no;this._delay=Math.max(0,Number(no.delay)||0),this._subscribers=new Subscribers,this._value=ro,this._updateTick=0,this._notifyTick=0,this._lastNotifiedValue=void 0,this._timer=void 0,this.equals=oo}dispose(){this.disposed||(super.dispose(),this._flush(),this._subscribers.dispose())}getSnapshot(){return this._value}next(ro,no){if(this.disposed){if((no==null?void 0:no.strict)??!0)throw new RangeError(`Don't update a disposed observable. value: ${String(ro)}.`);return}!((no==null?void 0:no.force)??!1)&&this.equals(ro,this._value)||(this._value=ro,this._updateTick+=1,this._notify())}subscribe(ro){if(ro.disposed)return noopUnsubscribable;const no=this._lastNotifiedValue,oo=this._value;return this.disposed?(ro.next(oo,no),ro.dispose(),noopUnsubscribable):(this._flush(),ro.next(oo,no),this._subscribers.subscribe(ro))}_flush(){this._notifyTick{try{this._notifyImmediate()}finally{this._timer=void 0}this._notify()},this._delay))}}_notifyImmediate(){const ro=this._lastNotifiedValue,no=this._value;this._lastNotifiedValue=no,this._notifyTick=this._updateTick,this._subscribers.notify(no,ro)}}const equals=(eo,to)=>eo===to;class Ticker extends Observable{constructor(to={}){const{start:ro=0,delay:no}=to;super(ro,{delay:no,equals})}tick(to){this.next(this._value+1,to)}observe(to,ro){if(this.disposed){if((ro==null?void 0:ro.strict)??!0)throw new RangeError("[Ticker.observe] the ticker has been disposed.");return noopUnobservable}if(to.disposed)return noopUnobservable;const no=new Subscriber({onNext:()=>this.tick()}),oo=to.subscribe(no),io=new Disposable(()=>{no.dispose(),oo.unsubscribe()});return this.registerDisposable(io),{unobserve:()=>io.dispose()}}}class Computed{constructor(to){Ws(this,"_observable");Ws(this,"getSnapshot",()=>this._observable.getSnapshot());Ws(this,"getServerSnapshot",()=>this._observable.getSnapshot());Ws(this,"subscribeStateChange",to=>{const ro=new Subscriber({onNext:()=>to()}),no=this._observable.subscribe(ro),oo=new Disposable(()=>{ro.dispose(),no.unsubscribe()});return this._observable.registerDisposable(oo),()=>oo.dispose()});this._observable=to}static fromObservables(to,ro,no){const oo=new Ticker;for(const lo of to)oo.observe(lo);const io=()=>{const lo=to.map(uo=>uo.getSnapshot());return ro(lo)},so=new Observable(io(),no);so.registerDisposable(oo);const ao=new Subscriber({onNext:()=>so.next(io())});return oo.subscribe(ao),new Computed(so)}get disposed(){return this._observable.disposed}dispose(){this._observable.disposed||this._observable.dispose()}registerDisposable(to){this._observable.registerDisposable(to)}subscribe(to){return this._observable.subscribe(to)}}class State extends Observable{constructor(){super(...arguments);Ws(this,"getSnapshot",()=>super.getSnapshot());Ws(this,"getServerSnapshot",()=>super.getSnapshot());Ws(this,"setState",ro=>{const no=this.getSnapshot(),oo=ro(no);super.next(oo)});Ws(this,"subscribeStateChange",ro=>{const no=new Subscriber({onNext:()=>ro()}),oo=super.subscribe(no),io=new Disposable(()=>{no.dispose(),oo.unsubscribe()});return this.registerDisposable(io),()=>io.dispose()})}}class ViewModel extends BatchDisposable{constructor(){super();Ws(this,"_tickerMap");this._tickerMap=new Map}dispose(){if(!this.disposed){super.dispose();for(const ro of Reflect.ownKeys(this))if(typeof ro=="string"&&ro.endsWith("$")){const no=this[ro];isDisposable(no)&&no.dispose()}for(const ro of this._tickerMap.values())ro.ticker.dispose();this._tickerMap.clear()}}ticker(ro){const no=Array.from(new Set(ro)).sort(),oo=no.join("|");let io=this._tickerMap.get(oo);if(io===void 0){const so=new Ticker;io={keys:no,ticker:so},this.registerDisposable(so),this._tickerMap.set(oo,io);for(const ao of no){const lo=this[ao];if(!isObservable(lo)){console.warn("[ViewModel.ticker] not an observable, key:",ao,"val:",lo);continue}so.observe(lo)}}return io}}class ReactMarkdownViewModel extends ViewModel{constructor(to){super(),this.preferCodeWrap$=new State(!1);const{definitionMap:ro,rendererMap:no,showCodeLineno:oo,themeScheme:io}=to;this.definitionMap$=new State(ro),this.rendererMap$=new State(no),this.showCodeLineno$=new State(oo),this.themeScheme$=new State(io)}}function useSyncExternalStore$2(eo,to,ro){const no=to(),[{inst:oo},io]=reactExports.useState({inst:{value:no,getSnapshot:to}});return reactExports.useLayoutEffect(()=>{oo.value=no,oo.getSnapshot=to,checkIfSnapshotChanged(oo)&&io({inst:oo})},[eo,no,to]),reactExports.useEffect(()=>(checkIfSnapshotChanged(oo)&&io({inst:oo}),eo(()=>{checkIfSnapshotChanged(oo)&&io({inst:oo})})),[eo]),reactExports.useDebugValue(no),no}function checkIfSnapshotChanged(eo){const to=eo.getSnapshot,ro=eo.value;try{const no=to();return!Object.is(ro,no)}catch{return!0}}function useSyncExternalStore$1(eo,to,ro){return to()}const canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",shim=canUseDOM?useSyncExternalStore$2:useSyncExternalStore$1,builtin=reactExports.useSyncExternalStore,useSyncExternalStore=builtin||shim;function useStateValue(eo){const{getSnapshot:to,getServerSnapshot:ro,subscribeStateChange:no}=eo;return useSyncExternalStore(no,to,ro)}const NodesRenderer=eo=>{const{nodes:to}=eo,{viewmodel:ro}=useNodeRendererContext(),no=useStateValue(ro.rendererMap$);return!Array.isArray(to)||to.length<=0?jsxRuntimeExports.jsx(React.Fragment,{}):jsxRuntimeExports.jsx(NodesRendererInner,{nodes:to,rendererMap:no})};class NodesRendererInner extends React.Component{shouldComponentUpdate(to){const ro=this.props;return!lodashExports.isEqual(ro.nodes,to.nodes)||ro.rendererMap!==to.rendererMap}render(){const{nodes:to,rendererMap:ro}=this.props;return jsxRuntimeExports.jsx(React.Fragment,{children:to.map((no,oo)=>{const io=`${no.type}-${oo}`,so=ro[no.type]??ro._fallback;return jsxRuntimeExports.jsx(so,{...no},io)})})}}var TokenizerType;(function(eo){eo.BLOCK="block",eo.INLINE="inline"})(TokenizerType||(TokenizerType={}));var TokenizerPriority;(function(eo){eo[eo.ATOMIC=10]="ATOMIC",eo[eo.FENCED_BLOCK=10]="FENCED_BLOCK",eo[eo.CONTAINING_BLOCK=10]="CONTAINING_BLOCK",eo[eo.INTERRUPTABLE_BLOCK=2]="INTERRUPTABLE_BLOCK",eo[eo.IMAGES=4]="IMAGES",eo[eo.LINKS=3]="LINKS",eo[eo.CONTAINING_INLINE=2]="CONTAINING_INLINE",eo[eo.SOFT_INLINE=1]="SOFT_INLINE",eo[eo.FALLBACK=-1]="FALLBACK"})(TokenizerPriority||(TokenizerPriority={}));class BaseInlineTokenizer{constructor(to){Ws(this,"type",TokenizerType.INLINE);Ws(this,"name");Ws(this,"priority");this.name=to.name,this.priority=to.priority}toString(){return this.name}}function*genFindDelimiter(eo){let to=-1,ro=null;for(;;){const[no,oo]=yield ro;to===oo&&(ro==null||ro.startIndex>=no)||(to=oo,ro=eo(no,oo))}}class BaseBlockTokenizer{constructor(to){Ws(this,"type",TokenizerType.BLOCK);Ws(this,"name");Ws(this,"priority");this.name=to.name,this.priority=to.priority}extractPhrasingContentLines(to){return null}buildBlockToken(to,ro){return null}toString(){return this.name}}function calcStartPoint(eo,to){const{line:ro,column:no,offset:oo}=eo[to];return{line:ro,column:no,offset:oo}}function calcEndPoint(eo,to){const{line:ro,column:no,offset:oo}=eo[to];return{line:ro,column:no+1,offset:oo+1}}function calcPositionFromPhrasingContentLines(eo){const to=eo[0],ro=eo[eo.length-1];return{start:calcStartPoint(to.nodePoints,to.startIndex),end:calcEndPoint(ro.nodePoints,ro.endIndex-1)}}function mergeContentLinesFaithfully(eo,to=0,ro=eo.length){if(to>=ro||to<0||ro>eo.length)return[];const no=[];for(let oo=to;oo=ro||to<0||ro>eo.length)return[];for(let lo=to;lo+1=0;--ao){const lo=oo[ao];if(!isWhitespaceCharacter(lo.codePoint))break}for(let lo=so;lo<=ao;++lo)no.push(oo[lo]);return no}function encodeLinkDestination(eo){let to=eo;for(;;)try{const ro=decodeURIComponent(to);if(ro===to)break;to=ro}catch{break}return encodeURI(to)}function resolveLabelToIdentifier(eo){const to=eo.trim().replace(/\s+/gu," ").toLowerCase();return foldCase(to)}function resolveLinkLabelAndIdentifier(eo,to,ro){const no=calcStringFromNodePoints(eo,to,ro,!0);if(no.length<=0)return null;const oo=resolveLabelToIdentifier(no);return{label:no,identifier:oo}}function eatLinkLabel(eo,to,ro){let no=to+1;const oo=Math.min(no+1e3,ro);for(;noto;--ro){const no=eo[ro];if(no.firstNonWhitespaceIndexro?[]:eo.slice(to,ro+1)}const prefix$1="Invariant failed";function invariant(eo,to){if(!eo)throw new Error(prefix$1)}const createBlockContentProcessor=(eo,to)=>{const ro={_tokenizer:"root",nodeType:"root",position:{start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}},children:[]},no=[];no.push({hook:{isContainingBlock:!0},token:ro});let oo=0;const io=po=>{for(let go=oo;go>=0;--go){const vo=no[go];vo.token.position.end={...po}}},so=(po,go)=>{if(go.length<=0)return null;const vo=eo.filter(xo=>xo!==po),bo=createBlockContentProcessor(vo,to);for(const xo of go)bo.consume(xo);return bo},ao=()=>{const po=no.pop();if(po!=null){if(no.length>0){const go=no[no.length-1];if(po.hook.onClose!=null){const vo=po.hook.onClose(po.token);if(vo!=null)switch(vo.status){case"closingAndRollback":{const bo=so(po.hook,vo.lines);if(bo==null)break;const xo=bo.done();go.token.children.push(...xo.children);break}case"failedAndRollback":{go.token.children.pop();const bo=so(po.hook,vo.lines);if(bo==null)break;const xo=bo.done();go.token.children.push(...xo.children);break}}}}return oo>=no.length&&(oo=no.length-1),po}},lo=po=>{for(;no.length>po;)ao()},uo=(po,go,vo)=>{lo(oo+1),no[oo].token.children.push(go),io(go.position.end),oo+=1,no.push({hook:po,token:go}),vo&&ao()},co=(po,go,vo)=>{const bo=so(po,go);if(bo==null)return!1;const xo=bo.shallowSnapshot(),_o=xo[0];_o.token.children!=null&&vo.token.children.push(..._o.token.children),io(_o.token.position.end);for(let Eo=1;Eo{const{nodePoints:go,startIndex:vo,endIndex:bo}=po;let{firstNonWhitespaceIndex:xo,countOfPrecedeSpaces:_o,startIndex:Eo}=po;const So=()=>({nodePoints:go,startIndex:Eo,endIndex:bo,firstNonWhitespaceIndex:xo,countOfPrecedeSpaces:_o}),To=(No,Mo)=>{if(invariant(Eo<=No),Mo){const Do=calcEndPoint(go,No-1);io(Do)}if(Eo!==No)for(Eo=No,_o=0,xo=No;xo{const{token:Do}=no[oo],jo=No.eatOpener(Mo,Do);if(jo==null)return!1;invariant(jo.nextIndex>Eo,`[consumeNewOpener] The marker of the new data node cannot be empty. + tokenizer(${jo.token._tokenizer})`),To(jo.nextIndex,!1);const Fo=jo.token;return Fo._tokenizer=No.name,uo(No,Fo,!!jo.saturated),!0},Co=(No,Mo)=>{if(No.eatAndInterruptPreviousSibling==null)return!1;const{hook:Do,token:jo}=no[oo],{token:Fo}=no[oo-1];if(No.priority<=Do.priority)return!1;const $o=No.eatAndInterruptPreviousSibling(Mo,jo,Fo);if($o==null)return!1;lo(oo),Fo.children.pop(),$o.remainingSibling!=null&&(Array.isArray($o.remainingSibling)?Fo.children.push(...$o.remainingSibling):Fo.children.push($o.remainingSibling)),To($o.nextIndex,!1);const Lo=$o.token;return Lo._tokenizer=No.name,uo(No,Lo,!!$o.saturated),!0},Oo=()=>{if(oo=1,no.length<2)return;let{token:No}=no[oo-1];for(;EoHo!==Do&&Co(Ho,jo)))break;const Fo=Do.eatContinuationText==null?{status:"notMatched"}:Do.eatContinuationText(jo,Mo.token,No);let $o=!1,Lo=!1;switch(Fo.status){case"failedAndRollback":{if(No.children.pop(),no.length=oo,oo-=1,Fo.lines.length>0){const Ho=no[oo];if(co(Do,Fo.lines,Ho)){Lo=!0;break}}$o=!0;break}case"closingAndRollback":{if(lo(oo),Fo.lines.length>0){const Ho=no[oo];if(co(Do,Fo.lines,Ho)){Lo=!0;break}}$o=!0;break}case"notMatched":{oo-=1,$o=!0;break}case"closing":{To(Fo.nextIndex,!0),oo-=1,$o=!0;break}case"opening":{To(Fo.nextIndex,!0);break}default:throw new TypeError(`[eatContinuationText] unexpected status (${Fo.status}).`)}if($o)break;Lo||(oo+=1,No=Mo.token)}},Ao=()=>{if(!(Eo>=bo)){if(oo=4)return}else oo=no.length-1;for(;Eo{if(Eo>=bo||oo+1>=no.length)return!1;const{hook:No,token:Mo}=no[no.length-1];if(No.eatLazyContinuationText==null)return!1;const{token:Do}=no[no.length-2],jo=So(),Fo=No.eatLazyContinuationText(jo,Mo,Do);switch(Fo.status){case"notMatched":return!1;case"opening":return oo=no.length-1,To(Fo.nextIndex,!0),oo=no.length-1,!0;default:throw new TypeError(`[eatLazyContinuationText] unexpected status (${Fo.status}).`)}};if(Oo(),Ao(),Ro()||lo(oo+1),to!=null&&Eo=bo)},done:()=>{for(;no.length>1;)ao();return ro},shallowSnapshot:()=>[...no]}},createSinglePriorityDelimiterProcessor=()=>{let eo=0;const to=[],ro=[],no=[],oo=fo=>{let ho=fo-1;for(;ho>=0&&ro[ho].inactive;)ho-=1;ro.length=ho+1},io=(fo,ho)=>{ro.push({hook:fo,delimiter:ho,inactive:!1,tokenStackIndex:no.length})},so=(fo,ho)=>{if(ro.length<=0)return null;let po=null;for(let go=ro.length-1;go>=0;--go){if(po=ro[go],po.inactive||po.hook!==fo)continue;const vo=po.delimiter,bo=fo.isDelimiterPair(vo,ho,to);if(bo.paired)return vo;if(!bo.closer)return null}return null},ao=(fo,ho)=>{if(ro.length<=0)return ho;let po,go=ho,vo=[];for(let bo=ro.length-1;bo>=0;--bo){const xo=ro[bo];if(xo.hook!==fo||xo.inactive)continue;const _o=xo.tokenStackIndex;for(_o0){for(const wo of To)wo._tokenizer=fo.name;vo.unshift(...To)}po=void 0,xo.inactive=!0}if(!Eo.closer){const To=fo.processSingleDelimiter(go);if(To.length>0){for(const wo of To)wo._tokenizer=fo.name;vo.push(...To)}go=void 0}break}const So=fo.processDelimiterPair(po,go,vo);{for(const To of So.tokens)To._tokenizer==null&&(To._tokenizer=fo.name);vo=So.tokens}po=So.remainOpenerDelimiter,go=So.remainCloserDelimiter,oo(bo),bo=Math.min(bo,ro.length),po!=null&&io(fo,po)}if(go==null||go.type==="full")break}if(no.push(...vo),go==null)return null;if(go.type==="full"||go.type==="closer"){const bo=fo.processSingleDelimiter(go);for(const xo of bo)xo._tokenizer=fo.name,no.push(xo);return null}return go};return{process:(fo,ho)=>{for(;eo=ho.endIndex)break;po.startIndex>=ho.startIndex||no.push(po)}switch(ho.type){case"opener":{io(fo,ho);break}case"both":{const po=ao(fo,ho);po!=null&&io(fo,po);break}case"closer":{ao(fo,ho);break}case"full":{const po=fo.processSingleDelimiter(ho);for(const go of po)go._tokenizer=fo.name,no.push(go);break}default:throw new TypeError(`Unexpected delimiter type(${ho.type}) from ${fo.name}.`)}},done:()=>{const fo=[];for(const{delimiter:po,hook:go}of ro){const vo=go.processSingleDelimiter(po);for(const bo of vo)bo._tokenizer=go.name,fo.push(bo)}if(ro.length=0,fo.length>0){const po=mergeSortedTokenStack(no,fo);no.length=0,no.push(...po)}return no.concat(to.slice(eo))},reset:fo=>{to.length=fo.length;for(let ho=0;ho{if(eo.length<=0)return to;if(to.length<=0)return eo;const ro=[];let no=0,oo=0;for(;no{const ro=(io,so,ao)=>{let lo=[],uo=null;const co=[io,so];for(const ho of ao){const po=ho.findDelimiter(co);if(po!=null){if(uo!=null){if(po.startIndex>uo)continue;po.startIndex1){let ho=0;for(const po of lo){const go=po.delimiter.type;if(go==="full")return{items:[po],nextIndex:po.delimiter.endIndex};(go==="both"||go==="closer")&&(ho+=1)}if(ho>1){let po=-1,go=-1;for(let bo=0;bo-1?[lo[po]]:lo.filter(bo=>bo.delimiter.type!=="closer"),nextIndex:fo}}}return{items:lo,nextIndex:fo}},no=createSinglePriorityDelimiterProcessor();return{process:(io,so,ao)=>{let lo=io;for(let uo=to;uo{const no=[];for(let oo=0;oo{let ho=so.process(uo,co,fo);return ho=ro(ho,co,fo),ho}}),lo=eo[oo].priority;for(;oo{let ro;const no=eo.match(to);return{isDelimiterPair:()=>({paired:!0}),processDelimiterPair:(oo,io,so)=>({tokens:so}),processSingleDelimiter:()=>[],...no,name:eo.name,priority:eo.priority,findDelimiter:oo=>ro.next(oo).value,reset:()=>{ro=no.findDelimiter(),ro.next()}}};function createProcessor(eo){const{inlineTokenizers:to,inlineTokenizerMap:ro,blockTokenizers:no,blockTokenizerMap:oo,blockFallbackTokenizer:io,inlineFallbackTokenizer:so,shouldReservePosition:ao,presetDefinitions:lo,presetFootnoteDefinitions:uo,formatUrl:co}=eo;let fo=!1;const ho=new Set,po=new Set;let go=[],vo=-1,bo=-1;const xo=Object.freeze({matchBlockApi:{extractPhrasingLines:Ao,rollbackPhrasingLines:Ro,registerDefinitionIdentifier:Lo=>{fo&&ho.add(Lo)},registerFootnoteDefinitionIdentifier:Lo=>{fo&&po.add(Lo)}},parseBlockApi:{shouldReservePosition:ao,formatUrl:co,processInlines:jo,parseBlockTokens:Do},matchInlineApi:{hasDefinition:Lo=>ho.has(Lo),hasFootnoteDefinition:Lo=>po.has(Lo),getNodePoints:()=>go,getBlockStartIndex:()=>vo,getBlockEndIndex:()=>bo,resolveFallbackTokens:No},parseInlineApi:{shouldReservePosition:ao,calcPosition:Lo=>({start:calcStartPoint(go,Lo.startIndex),end:calcEndPoint(go,Lo.endIndex-1)}),formatUrl:co,getNodePoints:()=>go,hasDefinition:Lo=>ho.has(Lo),hasFootnoteDefinition:Lo=>po.has(Lo),parseInlineTokens:$o}}),_o=no.map(Lo=>({...Lo.match(xo.matchBlockApi),name:Lo.name,priority:Lo.priority})),Eo=new Map(Array.from(oo.entries()).map(Lo=>[Lo[0],Lo[1].parse(xo.parseBlockApi)])),So=io?{...io.match(xo.matchBlockApi),name:io.name,priority:io.priority}:null,To=createProcessorHookGroups(to,xo.matchInlineApi,No),wo=new Map(Array.from(ro.entries()).map(Lo=>[Lo[0],Lo[1].parse(xo.parseInlineApi)])),Co=createPhrasingContentProcessor(To,0);return{process:Oo};function Oo(Lo){ho.clear(),po.clear(),fo=!0;const Ho=Mo(Lo);fo=!1;for(const Yo of lo)ho.add(Yo.identifier);for(const Yo of uo)po.add(Yo.identifier);const qo=Do(Ho.children);return ao?{type:"root",position:Ho.position,children:qo}:{type:"root",children:qo}}function Ao(Lo){const Ho=oo.get(Lo._tokenizer);return(Ho==null?void 0:Ho.extractPhrasingContentLines(Lo))??null}function Ro(Lo,Ho){if(Ho!=null){const Uo=oo.get(Ho._tokenizer);if(Uo!==void 0&&Uo.buildBlockToken!=null){const Yo=Uo.buildBlockToken(Lo,Ho);if(Yo!==null)return Yo._tokenizer=Uo.name,[Yo]}}return Mo([Lo]).children}function No(Lo,Ho,qo){if(so==null)return Lo;let Uo=Ho;const Yo=[];for(const Zo of Lo){if(Uoso.priority)break}io<0||io>=to.length?to.push(no):to.splice(io,0,no)}_unregisterTokenizer(to,ro,no){var ao,lo;const oo=typeof no=="string"?no:no.name;if(!ro.delete(oo))return;((ao=this.blockFallbackTokenizer)==null?void 0:ao.name)===oo&&(this.blockFallbackTokenizer=null),((lo=this.inlineFallbackTokenizer)==null?void 0:lo.name)===oo&&(this.inlineFallbackTokenizer=null);const so=to.findIndex(uo=>uo.name===oo);so>=0&&to.splice(so,1)}}function eatEmailAddress(eo,to,ro){let no=to;for(;no=ro||eo[no].codePoint!==AsciiCodePoint.AT_SIGN||!isAlphanumeric(eo[no+1].codePoint))return{valid:!1,nextIndex:no+1};for(no=eatAddressPart0(eo,no+2,ro);no+1=to?oo+1:to}function eatAbsoluteUri(eo,to,ro){const no=eatAutolinkSchema(eo,to,ro);let{nextIndex:oo}=no;if(!no.valid||oo>=ro||eo[oo].codePoint!==AsciiCodePoint.COLON)return{valid:!1,nextIndex:oo};for(oo+=1;oo32?{valid:!1,nextIndex:no+1}:{valid:!0,nextIndex:no}}const helpers=[{contentType:"uri",eat:eatAbsoluteUri},{contentType:"email",eat:eatEmailAddress}],match$l=function(eo){return{findDelimiter:()=>genFindDelimiter(to),processSingleDelimiter:ro};function to(no,oo){const io=eo.getNodePoints();for(let so=no;soto.map(ro=>{const no=eo.getNodePoints();let oo=calcStringFromNodePoints(no,ro.startIndex+1,ro.endIndex-1);ro.contentType==="email"&&(oo="mailto:"+oo);const io=eo.formatUrl(oo),so=eo.parseInlineTokens(ro.children);return eo.shouldReservePosition?{type:LinkType,position:eo.calcPosition(ro),url:io,children:so}:{type:LinkType,url:io,children:so}})}},uniqueName$j="@yozora/tokenizer-autolink";class AutolinkTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$j,priority:ro.priority??TokenizerPriority.ATOMIC});Ws(this,"match",match$l);Ws(this,"parse",parse$l)}}const match$k=function(){return{isContainingBlock:!0,eatOpener:eo,eatAndInterruptPreviousSibling:to,eatContinuationText:ro};function eo(no){if(no.countOfPrecedeSpaces>=4)return null;const{nodePoints:oo,startIndex:io,endIndex:so,firstNonWhitespaceIndex:ao}=no;if(ao>=so||oo[ao].codePoint!==AsciiCodePoint.CLOSE_ANGLE)return null;let lo=ao+1;return lo=4||uo>=lo||so[uo].codePoint!==AsciiCodePoint.CLOSE_ANGLE?io.nodeType===BlockquoteType?{status:"opening",nextIndex:ao}:{status:"notMatched"}:{status:"opening",nextIndex:uo+1to.map(ro=>{const no=eo.parseBlockTokens(ro.children);return eo.shouldReservePosition?{type:BlockquoteType,position:ro.position,children:no}:{type:BlockquoteType,children:no}})}},uniqueName$i="@yozora/tokenizer-blockquote";class BlockquoteTokenizer extends BaseBlockTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$i,priority:ro.priority??TokenizerPriority.CONTAINING_BLOCK});Ws(this,"match",match$k);Ws(this,"parse",parse$k)}}const uniqueName$h="@yozora/tokenizer-break";var BreakTokenMarkerType;(function(eo){eo.BACKSLASH="backslash",eo.MORE_THAN_TWO_SPACES="more-than-two-spaces"})(BreakTokenMarkerType||(BreakTokenMarkerType={}));const match$j=function(eo){return{findDelimiter:()=>genFindDelimiter(to),processSingleDelimiter:ro};function to(no,oo){const io=eo.getNodePoints();for(let so=no+1;so=no&&io[co].codePoint===AsciiCodePoint.BACKSLASH;co-=1);so-co&1||(lo=so-1,uo=BreakTokenMarkerType.BACKSLASH);break}case AsciiCodePoint.SPACE:{let co=so-2;for(;co>=no&&io[co].codePoint===AsciiCodePoint.SPACE;co-=1);so-co>2&&(lo=co+1,uo=BreakTokenMarkerType.MORE_THAN_TWO_SPACES);break}}if(!(lo==null||uo==null))return{type:"full",markerType:uo,startIndex:lo,endIndex:so}}return null}function ro(no){return[{nodeType:BreakType,startIndex:no.startIndex,endIndex:no.endIndex}]}},parse$j=function(eo){return{parse:to=>to.map(ro=>eo.shouldReservePosition?{type:BreakType,position:eo.calcPosition(ro)}:{type:BreakType})}};class BreakTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$h,priority:ro.priority??TokenizerPriority.SOFT_INLINE});Ws(this,"match",match$j);Ws(this,"parse",parse$j)}}function eatAndCollectLinkDestination(eo,to,ro,no){let oo=to;no==null&&(no={saturated:!1,nodePoints:[],hasOpenAngleBracket:!1,openParensCount:0});const io=eatOptionalWhitespaces(eo,oo,ro);if(io>=ro)return{nextIndex:-1,state:no};if(no.nodePoints.length<=0){oo=io;const so=eo[oo];so.codePoint===AsciiCodePoint.OPEN_ANGLE&&(oo+=1,no.hasOpenAngleBracket=!0,no.nodePoints.push(so))}if(no.hasOpenAngleBracket){for(;oo=ro)return{nextIndex:-1,state:no};if(no.nodePoints.length<=0){oo=io;const so=eo[oo];if(so.codePoint!==AsciiCodePoint.OPEN_BRACKET)return{nextIndex:-1,state:no};oo+=1,no.nodePoints.push(so)}for(;oo=ro)return{nextIndex:-1,state:no};if(no.nodePoints.length<=0){oo=io;const so=eo[oo];switch(so.codePoint){case AsciiCodePoint.DOUBLE_QUOTE:case AsciiCodePoint.SINGLE_QUOTE:case AsciiCodePoint.OPEN_PARENTHESIS:no.wrapSymbol=so.codePoint,no.nodePoints.push(so),oo+=1;break;default:return{nextIndex:-1,state:no}}}if(no.wrapSymbol==null)return{nextIndex:-1,state:no};switch(no.wrapSymbol){case AsciiCodePoint.DOUBLE_QUOTE:case AsciiCodePoint.SINGLE_QUOTE:{for(;oo=ro||eo[oo+1].codePoint===VirtualCodePoint.LINE_END){no.nodePoints.push(so),no.saturated=!0;break}return{nextIndex:-1,state:no};default:no.nodePoints.push(so)}}break}}return{nextIndex:ro,state:no}}const match$i=function(eo){return{isContainingBlock:!1,eatOpener:to,eatContinuationText:ro,onClose:no};function to(oo){if(oo.countOfPrecedeSpaces>=4)return null;const{nodePoints:io,startIndex:so,endIndex:ao,firstNonWhitespaceIndex:lo}=oo;if(lo>=ao)return null;let uo=lo;const{nextIndex:co,state:fo}=eatAndCollectLinkLabel(io,uo,ao,null);if(co<0)return null;const ho=io[so].line,po=()=>({nodeType:DefinitionType,position:{start:calcStartPoint(io,so),end:calcEndPoint(io,ao-1)},label:fo,destination:null,title:null,lineNoOfLabel:ho,lineNoOfDestination:-1,lineNoOfTitle:-1,lines:[oo]});if(!fo.saturated)return{token:po(),nextIndex:ao};if(co<0||co+1>=ao||io[co].codePoint!==AsciiCodePoint.COLON)return null;if(uo=eatOptionalWhitespaces(io,co+1,ao),uo>=ao)return{token:po(),nextIndex:ao};const{nextIndex:go,state:vo}=eatAndCollectLinkDestination(io,uo,ao,null);if(go<0||!vo.saturated&&go!==ao)return null;if(uo=eatOptionalWhitespaces(io,go,ao),uo>=ao){const Eo=po();return Eo.destination=vo,Eo.lineNoOfDestination=ho,{token:Eo,nextIndex:ao}}if(uo===go)return null;const{nextIndex:bo,state:xo}=eatAndCollectLinkTitle(io,uo,ao,null);if(bo>=0&&(uo=bo),uo=uo||so[bo].codePoint!==AsciiCodePoint.COLON)return{status:"failedAndRollback",lines:io.lines};fo=bo+1}if(io.destination==null){if(fo=eatOptionalWhitespaces(so,fo,uo),fo>=uo)return{status:"failedAndRollback",lines:io.lines};const{nextIndex:bo,state:xo}=eatAndCollectLinkDestination(so,fo,uo,null);if(bo<0||!xo.saturated)return{status:"failedAndRollback",lines:io.lines};if(fo=eatOptionalWhitespaces(so,bo,uo),fo>=uo)return io.destination=xo,io.lines.push(oo),{status:"opening",nextIndex:uo};io.lineNoOfDestination=co,io.lineNoOfTitle=co}io.lineNoOfTitle<0&&(io.lineNoOfTitle=co);const{nextIndex:ho,state:po}=eatAndCollectLinkTitle(so,fo,uo,io.title);if(io.title=po,ho<0||po.nodePoints.length<=0||po.saturated&&eatOptionalWhitespaces(so,ho,uo)to.map(ro=>{const no=ro._label,oo=ro._identifier,io=ro.destination.nodePoints,so=io[0].codePoint===AsciiCodePoint.OPEN_ANGLE?calcEscapedStringFromNodePoints(io,1,io.length-1,!0):calcEscapedStringFromNodePoints(io,0,io.length,!0),ao=eo.formatUrl(so),lo=ro.title==null?void 0:calcEscapedStringFromNodePoints(ro.title.nodePoints,1,ro.title.nodePoints.length-1);return eo.shouldReservePosition?{type:DefinitionType,position:ro.position,identifier:oo,label:no,url:ao,title:lo}:{type:DefinitionType,identifier:oo,label:no,url:ao,title:lo}})}},uniqueName$g="@yozora/tokenizer-definition";class DefinitionTokenizer extends BaseBlockTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$g,priority:ro.priority??TokenizerPriority.ATOMIC});Ws(this,"match",match$i);Ws(this,"parse",parse$i)}}const match$h=function(eo){return{findDelimiter:()=>genFindDelimiter(to),isDelimiterPair:ro,processDelimiterPair:no};function to(oo,io){const so=eo.getNodePoints(),ao=eo.getBlockStartIndex(),lo=eo.getBlockEndIndex(),uo=(fo,ho)=>{if(ho===lo)return!1;if(ho===io)return!0;const po=so[ho];if(isUnicodeWhitespaceCharacter(po.codePoint))return!1;if(!isPunctuationCharacter(po.codePoint)||fo<=oo)return!0;const go=so[fo-1];return isUnicodeWhitespaceCharacter(go.codePoint)||isPunctuationCharacter(go.codePoint)},co=(fo,ho)=>{if(fo===ao)return!1;if(fo===oo)return!0;const po=so[fo-1];if(isUnicodeWhitespaceCharacter(po.codePoint))return!1;if(!isPunctuationCharacter(po.codePoint)||ho>=io)return!0;const go=so[ho];return isUnicodeWhitespaceCharacter(go.codePoint)||isPunctuationCharacter(go.codePoint)};for(let fo=oo;fooo&&!isPunctuationCharacter(so[po-1].codePoint)&&(xo=!1);const So=so[go];isPunctuationCharacter(So.codePoint)||(_o=!1)}if(!xo&&!_o)break;const Eo=go-po;return{type:xo?_o?"both":"opener":"closer",startIndex:po,endIndex:go,thickness:Eo,originalThickness:Eo}}}}return null}function ro(oo,io){const so=eo.getNodePoints();return so[oo.startIndex].codePoint!==so[io.startIndex].codePoint||(oo.type==="both"||io.type==="both")&&(oo.originalThickness+io.originalThickness)%3===0&&oo.originalThickness%3!==0?{paired:!1,opener:!0,closer:!0}:{paired:!0}}function no(oo,io,so){let ao=1;oo.thickness>1&&io.thickness>1&&(ao=2),so=eo.resolveInternalTokens(so,oo.endIndex,io.startIndex);const lo={nodeType:ao===1?EmphasisType:StrongType,startIndex:oo.endIndex-ao,endIndex:io.startIndex+ao,thickness:ao,children:so},uo=oo.thickness>ao?{type:oo.type,startIndex:oo.startIndex,endIndex:oo.endIndex-ao,thickness:oo.thickness-ao,originalThickness:oo.originalThickness}:void 0,co=io.thickness>ao?{type:io.type,startIndex:io.startIndex+ao,endIndex:io.endIndex,thickness:io.thickness-ao,originalThickness:io.originalThickness}:void 0;return{tokens:[lo],remainOpenerDelimiter:uo,remainCloserDelimiter:co}}},parse$h=function(eo){return{parse:to=>to.map(ro=>{const no=eo.parseInlineTokens(ro.children);return eo.shouldReservePosition?{type:ro.nodeType,position:eo.calcPosition(ro),children:no}:{type:ro.nodeType,children:no}})}},uniqueName$f="@yozora/tokenizer-emphasis";class EmphasisTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$f,priority:ro.priority??TokenizerPriority.CONTAINING_INLINE});Ws(this,"match",match$h);Ws(this,"parse",parse$h)}}function match$g(eo){const{nodeType:to,markers:ro,markersRequired:no,checkInfoString:oo}=this;return{isContainingBlock:!1,eatOpener:io,eatAndInterruptPreviousSibling:so,eatContinuationText:ao};function io(lo){if(lo.countOfPrecedeSpaces>=4)return null;const{endIndex:uo,firstNonWhitespaceIndex:co}=lo;if(co+no-1>=uo)return null;const{nodePoints:fo,startIndex:ho}=lo,po=fo[co].codePoint;if(ro.indexOf(po)<0)return null;const go=eatOptionalCharacters(fo,co+1,uo,po),vo=go-co;if(vo=uo.markerCount){for(;bo=ho)return{status:"closing",nextIndex:ho}}}const vo=Math.min(fo+uo.indent,po,ho-1);return uo.lines.push({nodePoints:co,startIndex:vo,endIndex:ho,firstNonWhitespaceIndex:po,countOfPrecedeSpaces:go}),{status:"opening",nextIndex:ho}}}class FencedBlockTokenizer extends BaseBlockTokenizer{constructor(ro){super({name:ro.name,priority:ro.priority??TokenizerPriority.FENCED_BLOCK});Ws(this,"nodeType");Ws(this,"markers",[]);Ws(this,"markersRequired");Ws(this,"checkInfoString");Ws(this,"match",match$g);this.nodeType=ro.nodeType,this.markers=ro.markers,this.markersRequired=ro.markersRequired,this.checkInfoString=ro.checkInfoString}}const match$f=function(eo){return{...match$g.call(this,eo),isContainingBlock:!1}},parse$g=function(eo){return{parse:to=>to.map(ro=>{const no=ro.infoString;let oo=0;const io=[];for(;oo0?so:null,meta:ao.length>0?ao:null,value:uo}:{type:CodeType,lang:so.length>0?so:null,meta:ao.length>0?ao:null,value:uo}})}},uniqueName$e="@yozora/tokenizer-fenced-code";class FencedCodeTokenizer extends FencedBlockTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$e,priority:ro.priority??TokenizerPriority.FENCED_BLOCK,nodeType:CodeType,markers:[AsciiCodePoint.BACKTICK,AsciiCodePoint.TILDE],markersRequired:3,checkInfoString:(no,oo)=>{if(oo===AsciiCodePoint.BACKTICK){for(const io of no)if(io.codePoint===AsciiCodePoint.BACKTICK)return!1}return!0}});Ws(this,"match",match$f);Ws(this,"parse",parse$g)}}const match$e=function(){return{isContainingBlock:!1,eatOpener:eo,eatAndInterruptPreviousSibling:to};function eo(ro){if(ro.countOfPrecedeSpaces>=4)return null;const{nodePoints:no,startIndex:oo,endIndex:io,firstNonWhitespaceIndex:so}=ro;if(so>=io||no[so].codePoint!==AsciiCodePoint.NUMBER_SIGN)return null;const ao=eatOptionalCharacters(no,so+1,io,AsciiCodePoint.NUMBER_SIGN),lo=ao-so;if(lo>6||ao+1to.map(ro=>{const{nodePoints:no,firstNonWhitespaceIndex:oo,endIndex:io}=ro.line;let[so,ao]=calcTrimBoundaryOfCodePoints(no,oo+ro.depth,io),lo=0;for(let po=ao-1;po>=so&&no[po].codePoint===AsciiCodePoint.NUMBER_SIGN;--po)lo+=1;if(lo>0){let po=0,go=ao-1-lo;for(;go>=so;--go){const vo=no[go].codePoint;if(!isWhitespaceCharacter(vo))break;po+=1}(po>0||go=ro)return null;const oo=no;let io=eo[no].codePoint;if(!isAsciiLetter(io)&&io!==AsciiCodePoint.UNDERSCORE&&io!==AsciiCodePoint.COLON)return null;for(no=oo+1;nouo&&(ao.value={startIndex:uo,endIndex:co});break}}if(ao.value!=null)return{attribute:ao,nextIndex:no}}return{attribute:ao,nextIndex:so}}function eatHTMLTagName(eo,to,ro){if(to>=ro||!isAsciiLetter(eo[to].codePoint))return null;let no=to;for(;no=ro)return ro;const oo=eo[to].codePoint;return isWhitespaceCharacter(oo)||oo===AsciiCodePoint.CLOSE_ANGLE?to+1:null}function eatEndCondition1(eo,to,ro){for(let no=to;no=ro||eo[io].codePoint!==AsciiCodePoint.CLOSE_ANGLE){no+=1;continue}const ao=calcStringFromNodePoints(eo,oo,io,!0).toLowerCase();if(includedTags$1.includes(ao))return io}return null}function eatStartCondition2(eo,to,ro){const no=to;return no+2=ro)return ro;const oo=eo[to].codePoint;return isWhitespaceCharacter(oo)||oo===AsciiCodePoint.CLOSE_ANGLE?to+1:oo===AsciiCodePoint.SLASH&&to+1=ro)return null;let io=to;if(oo){for(;io=ro)return null;eo[io].codePoint===AsciiCodePoint.SLASH&&(io+=1)}else io=eatOptionalWhitespaces(eo,to,ro);if(io>=ro||eo[io].codePoint!==AsciiCodePoint.CLOSE_ANGLE)return null;for(io+=1;io=4)return null;const{nodePoints:so,startIndex:ao,endIndex:lo,firstNonWhitespaceIndex:uo}=io;if(uo>=lo||so[uo].codePoint!==AsciiCodePoint.OPEN_ANGLE)return null;const co=uo+1,fo=no(so,co,lo);if(fo==null)return null;const{condition:ho}=fo;let po=!1;ho!==6&&ho!==7&&oo(so,fo.nextIndex,lo,ho)!=null&&(po=!0);const go=lo;return{token:{nodeType:HtmlType,position:{start:calcStartPoint(so,ao),end:calcEndPoint(so,go-1)},condition:ho,lines:[io]},nextIndex:go,saturated:po}}function to(io,so){const ao=eo(io);if(ao==null||ao.token.condition===7)return null;const{token:lo,nextIndex:uo}=ao;return{token:lo,nextIndex:uo,remainingSibling:so}}function ro(io,so){const{nodePoints:ao,endIndex:lo,firstNonWhitespaceIndex:uo}=io,co=oo(ao,uo,lo,so.condition);return co===-1?{status:"notMatched"}:(so.lines.push(io),co!=null?{status:"closing",nextIndex:lo}:{status:"opening",nextIndex:lo})}function no(io,so,ao){let lo=null;if(so>=ao)return null;if(lo=eatStartCondition2(io,so,ao),lo!=null)return{nextIndex:lo,condition:2};if(lo=eatStartCondition3(io,so,ao),lo!=null)return{nextIndex:lo,condition:3};if(lo=eatStartCondition4(io,so,ao),lo!=null)return{nextIndex:lo,condition:4};if(lo=eatStartCondition5(io,so,ao),lo!=null)return{nextIndex:lo,condition:5};if(io[so].codePoint!==AsciiCodePoint.SLASH){const go=so,vo=eatHTMLTagName(io,go,ao);if(vo==null)return null;const bo={startIndex:go,endIndex:vo},_o=calcStringFromNodePoints(io,bo.startIndex,bo.endIndex).toLowerCase();return lo=eatStartCondition1(io,bo.endIndex,ao,_o),lo!=null?{nextIndex:lo,condition:1}:(lo=eatStartCondition6(io,bo.endIndex,ao,_o),lo!=null?{nextIndex:lo,condition:6}:(lo=eatStartCondition7(io,bo.endIndex,ao,_o,!0),lo!=null?{nextIndex:lo,condition:7}:null))}const uo=so+1,co=eatHTMLTagName(io,uo,ao);if(co==null)return null;const fo={startIndex:uo,endIndex:co},po=calcStringFromNodePoints(io,fo.startIndex,fo.endIndex).toLowerCase();return lo=eatStartCondition6(io,fo.endIndex,ao,po),lo!=null?{nextIndex:lo,condition:6}:(lo=eatStartCondition7(io,fo.endIndex,ao,po,!1),lo!=null?{nextIndex:lo,condition:7}:null)}function oo(io,so,ao,lo){switch(lo){case 1:return eatEndCondition1(io,so,ao)==null?null:ao;case 2:return eatEndCondition2(io,so,ao)==null?null:ao;case 3:return eatEndCondition3(io,so,ao)==null?null:ao;case 4:return eatEndCondition4(io,so,ao)==null?null:ao;case 5:return eatEndCondition5(io,so,ao)==null?null:ao;case 6:case 7:return eatOptionalWhitespaces(io,so,ao)>=ao?-1:null}}},parse$e=function(eo){return{parse:to=>to.map(ro=>{const no=mergeContentLinesFaithfully(ro.lines);return eo.shouldReservePosition?{type:"html",position:ro.position,value:calcStringFromNodePoints(no)}:{type:"html",value:calcStringFromNodePoints(no)}})}},uniqueName$c="@yozora/tokenizer-html-block";class HtmlBlockTokenizer extends BaseBlockTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$c,priority:ro.priority??TokenizerPriority.ATOMIC});Ws(this,"match",match$d);Ws(this,"parse",parse$e)}}function eatHtmlInlineCDataDelimiter(eo,to,ro){let no=to;if(no+11>=ro||eo[no+1].codePoint!==AsciiCodePoint.EXCLAMATION_MARK||eo[no+2].codePoint!==AsciiCodePoint.OPEN_BRACKET||eo[no+3].codePoint!==AsciiCodePoint.UPPERCASE_C||eo[no+4].codePoint!==AsciiCodePoint.UPPERCASE_D||eo[no+5].codePoint!==AsciiCodePoint.UPPERCASE_A||eo[no+6].codePoint!==AsciiCodePoint.UPPERCASE_T||eo[no+7].codePoint!==AsciiCodePoint.UPPERCASE_A||eo[no+8].codePoint!==AsciiCodePoint.OPEN_BRACKET)return null;const oo=no+9;for(no=oo;no=ro)return null;if(eo[no+1].codePoint===AsciiCodePoint.CLOSE_BRACKET&&eo[no+2].codePoint===AsciiCodePoint.CLOSE_ANGLE)return{type:"full",startIndex:to,endIndex:no+3,htmlType:"cdata"}}return null}function eatHtmlInlineClosingDelimiter(eo,to,ro){let no=to;if(no+3>=ro||eo[no+1].codePoint!==AsciiCodePoint.SLASH)return null;const oo=no+2,io=eatHTMLTagName(eo,oo,ro);return io==null||(no=eatOptionalWhitespaces(eo,io,ro),no>=ro||eo[no].codePoint!==AsciiCodePoint.CLOSE_ANGLE)?null:{type:"full",startIndex:to,endIndex:no+1,htmlType:"closing",tagName:{startIndex:oo,endIndex:io}}}function eatHtmlInlineCommentDelimiter(eo,to,ro){let no=to;if(no+6>=ro||eo[no+1].codePoint!==AsciiCodePoint.EXCLAMATION_MARK||eo[no+2].codePoint!==AsciiCodePoint.MINUS_SIGN||eo[no+3].codePoint!==AsciiCodePoint.MINUS_SIGN||eo[no+4].codePoint===AsciiCodePoint.CLOSE_ANGLE||eo[no+4].codePoint===AsciiCodePoint.MINUS_SIGN&&eo[no+5].codePoint===AsciiCodePoint.CLOSE_ANGLE)return null;const oo=no+4;for(no=oo;no2||no+2>=ro||eo[no+2].codePoint!==AsciiCodePoint.CLOSE_ANGLE?null:{type:"full",startIndex:to,endIndex:no+3,htmlType:"comment"}}return null}function eatHtmlInlineDeclarationDelimiter(eo,to,ro){let no=to;if(no+4>=ro||eo[no+1].codePoint!==AsciiCodePoint.EXCLAMATION_MARK)return null;const oo=no+2;for(no=oo;no=ro||!isWhitespaceCharacter(eo[no].codePoint))return null;const io=no,so=no+1;for(no=so;no=ro||eo[no+1].codePoint!==AsciiCodePoint.QUESTION_MARK)return null;const oo=no+2;for(no=oo;no=ro)return null;if(eo[no+1].codePoint===AsciiCodePoint.CLOSE_ANGLE)return{type:"full",startIndex:to,endIndex:no+2,htmlType:"instruction"}}return null}function eatHtmlInlineTokenOpenDelimiter(eo,to,ro){let no=to;if(no+2>=ro)return null;const oo=no+1,io=eatHTMLTagName(eo,oo,ro);if(io==null)return null;const so=[];for(no=io;no=ro)return null;let ao=!1;return eo[no].codePoint===AsciiCodePoint.SLASH&&(no+=1,ao=!0),no>=ro||eo[no].codePoint!==AsciiCodePoint.CLOSE_ANGLE?null:{type:"full",startIndex:to,endIndex:no+1,htmlType:"open",tagName:{startIndex:oo,endIndex:io},attributes:so,selfClosed:ao}}const match$c=function(eo){return{findDelimiter:()=>genFindDelimiter(to),processSingleDelimiter:ro};function to(no,oo){const io=eo.getNodePoints();for(let so=no;so=oo));++so)switch(io[so].codePoint){case AsciiCodePoint.BACKSLASH:so+=1;break;case AsciiCodePoint.OPEN_ANGLE:{const lo=tryToEatDelimiter(io,so,oo);if(lo!=null)return lo;break}}return null}function ro(no){return[{...no,nodeType:HtmlType}]}};function tryToEatDelimiter(eo,to,ro){let no=null;return no=eatHtmlInlineTokenOpenDelimiter(eo,to,ro),no!=null||(no=eatHtmlInlineClosingDelimiter(eo,to,ro),no!=null)||(no=eatHtmlInlineCommentDelimiter(eo,to,ro),no!=null)||(no=eatHtmlInlineInstructionDelimiter(eo,to,ro),no!=null)||(no=eatHtmlInlineDeclarationDelimiter(eo,to,ro),no!=null)||(no=eatHtmlInlineCDataDelimiter(eo,to,ro)),no}const parse$d=function(eo){return{parse:to=>to.map(ro=>{const{startIndex:no,endIndex:oo}=ro,io=eo.getNodePoints(),so=calcStringFromNodePoints(io,no,oo);return eo.shouldReservePosition?{type:HtmlType,position:eo.calcPosition(ro),value:so}:{type:HtmlType,value:so}})}},uniqueName$b="@yozora/tokenizer-html-inline";class HtmlInlineTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$b,priority:ro.priority??TokenizerPriority.ATOMIC});Ws(this,"match",match$c);Ws(this,"parse",parse$d)}}const checkBalancedBracketsStatus=(eo,to,ro,no)=>{let oo=eo,io=0;const so=()=>{switch(no[oo].codePoint){case AsciiCodePoint.BACKSLASH:oo+=1;break;case AsciiCodePoint.OPEN_BRACKET:io+=1;break;case AsciiCodePoint.CLOSE_BRACKET:io-=1;break}};for(const ao of ro)if(!(ao.startIndexto)break;for(;oo0?1:0};function eatLinkDestination(eo,to,ro){if(to>=ro)return-1;let no=to;switch(eo[no].codePoint){case AsciiCodePoint.OPEN_ANGLE:{for(no+=1;no=ro)return-1;let no=to;const oo=eo[no].codePoint;switch(oo){case AsciiCodePoint.DOUBLE_QUOTE:case AsciiCodePoint.SINGLE_QUOTE:{for(no+=1;noio.line+1)return-1;break}}}break}case AsciiCodePoint.OPEN_PARENTHESIS:{let io=1;for(no+=1;noso.line+1)return-1;break}case AsciiCodePoint.OPEN_PARENTHESIS:io+=1;break;case AsciiCodePoint.CLOSE_PARENTHESIS:if(io-=1,io===0)return no+1;break}}break}case AsciiCodePoint.CLOSE_PARENTHESIS:return no;default:return-1}return-1}const match$b=function(eo){return{findDelimiter:()=>genFindDelimiter(to),isDelimiterPair:ro,processDelimiterPair:no};function to(oo,io){const so=eo.getNodePoints(),ao=eo.getBlockEndIndex();for(let lo=oo;lo=io||so[lo+1].codePoint!==AsciiCodePoint.OPEN_PARENTHESIS)break;const co=eatOptionalWhitespaces(so,lo+2,ao),fo=eatLinkDestination(so,co,ao);if(fo<0)break;const ho=eatOptionalWhitespaces(so,fo,ao),po=eatLinkTitle(so,ho,ao);if(po<0)break;const go=lo,vo=eatOptionalWhitespaces(so,po,ao)+1;if(vo>ao||so[vo-1].codePoint!==AsciiCodePoint.CLOSE_PARENTHESIS)break;return{type:"closer",startIndex:go,endIndex:vo,destinationContent:coto.map(ro=>{const no=eo.getNodePoints();let oo="";if(ro.destinationContent!=null){let{startIndex:lo,endIndex:uo}=ro.destinationContent;no[lo].codePoint===AsciiCodePoint.OPEN_ANGLE&&(lo+=1,uo-=1);const co=calcEscapedStringFromNodePoints(no,lo,uo,!0);oo=eo.formatUrl(co)}let io;if(ro.titleContent!=null){const{startIndex:lo,endIndex:uo}=ro.titleContent;io=calcEscapedStringFromNodePoints(no,lo+1,uo-1)}const so=eo.parseInlineTokens(ro.children);return eo.shouldReservePosition?{type:LinkType,position:eo.calcPosition(ro),url:oo,title:io,children:so}:{type:LinkType,url:oo,title:io,children:so}})}},uniqueName$a="@yozora/tokenizer-link";class LinkTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$a,priority:ro.priority??TokenizerPriority.LINKS});Ws(this,"match",match$b);Ws(this,"parse",parse$c)}}function calcImageAlt(eo){return eo.map(to=>to.value!=null?to.value:to.alt!=null?to.alt:to.children!=null?calcImageAlt(to.children):"").join("")}const match$a=function(eo){return{findDelimiter:()=>genFindDelimiter(to),isDelimiterPair:ro,processDelimiterPair:no};function to(oo,io){const so=eo.getNodePoints(),ao=eo.getBlockEndIndex();for(let lo=oo;lo=io||so[lo+1].codePoint!==AsciiCodePoint.OPEN_PARENTHESIS)break;const co=eatOptionalWhitespaces(so,lo+2,ao),fo=eatLinkDestination(so,co,ao);if(fo<0)break;const ho=eatOptionalWhitespaces(so,fo,ao),po=eatLinkTitle(so,ho,ao);if(po<0)break;const go=lo,vo=eatOptionalWhitespaces(so,po,ao)+1;if(vo>ao||so[vo-1].codePoint!==AsciiCodePoint.CLOSE_PARENTHESIS)break;return{type:"closer",startIndex:go,endIndex:vo,destinationContent:coto.map(ro=>{const no=eo.getNodePoints();let oo="";if(ro.destinationContent!=null){let{startIndex:uo,endIndex:co}=ro.destinationContent;no[uo].codePoint===AsciiCodePoint.OPEN_ANGLE&&(uo+=1,co-=1);const fo=calcEscapedStringFromNodePoints(no,uo,co,!0);oo=eo.formatUrl(fo)}const io=eo.parseInlineTokens(ro.children),so=calcImageAlt(io);let ao;if(ro.titleContent!=null){const{startIndex:uo,endIndex:co}=ro.titleContent;ao=calcEscapedStringFromNodePoints(no,uo+1,co-1)}return eo.shouldReservePosition?{type:ImageType$1,position:eo.calcPosition(ro),url:oo,alt:so,title:ao}:{type:ImageType$1,url:oo,alt:so,title:ao}})}},uniqueName$9="@yozora/tokenizer-image";class ImageTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$9,priority:ro.priority??TokenizerPriority.LINKS});Ws(this,"match",match$a);Ws(this,"parse",parse$b)}}const match$9=function(eo){return{findDelimiter:()=>genFindDelimiter(to),isDelimiterPair:ro,processDelimiterPair:no};function to(oo,io){const so=eo.getNodePoints();for(let ao=oo;ao=io||so[ao+1].codePoint!==AsciiCodePoint.OPEN_BRACKET)break;return{type:"opener",startIndex:ao,endIndex:ao+2,brackets:[]}}case AsciiCodePoint.CLOSE_BRACKET:{const uo={type:"closer",startIndex:ao,endIndex:ao+1,brackets:[]};if(ao+1>=io||so[ao+1].codePoint!==AsciiCodePoint.OPEN_BRACKET)return uo;const co=eatLinkLabel(so,ao+1,io);return co.nextIndex<0?uo:co.labelAndIdentifier==null?{type:"closer",startIndex:ao,endIndex:co.nextIndex,brackets:[{startIndex:ao+1,endIndex:co.nextIndex}]}:{type:"closer",startIndex:ao,endIndex:co.nextIndex,brackets:[{startIndex:ao+1,endIndex:co.nextIndex,label:co.labelAndIdentifier.label,identifier:co.labelAndIdentifier.identifier}]}}}return null}function ro(oo,io,so){const ao=eo.getNodePoints();switch(checkBalancedBracketsStatus(oo.endIndex,io.startIndex,so,ao)){case-1:return{paired:!1,opener:!1,closer:!0};case 0:return{paired:!0};case 1:return{paired:!1,opener:!0,closer:!1}}}function no(oo,io,so){const ao=eo.getNodePoints(),lo=io.brackets[0];if(lo!=null&&lo.identifier!=null)return eo.hasDefinition(lo.identifier)?{tokens:[{nodeType:ImageReferenceType,startIndex:oo.startIndex,endIndex:lo.endIndex,referenceType:"full",label:lo.label,identifier:lo.identifier,children:eo.resolveInternalTokens(so,oo.endIndex,io.startIndex)}]}:{tokens:so};const{nextIndex:uo,labelAndIdentifier:co}=eatLinkLabel(ao,oo.endIndex-1,io.startIndex+1);return uo===io.startIndex+1&&co!=null&&eo.hasDefinition(co.identifier)?{tokens:[{nodeType:ImageReferenceType,startIndex:oo.startIndex,endIndex:io.endIndex,referenceType:lo==null?"shortcut":"collapsed",label:co.label,identifier:co.identifier,children:eo.resolveInternalTokens(so,oo.endIndex,io.startIndex)}]}:{tokens:so}}},parse$a=function(eo){return{parse:to=>to.map(ro=>{const{identifier:no,label:oo,referenceType:io}=ro,so=eo.parseInlineTokens(ro.children),ao=calcImageAlt(so);return eo.shouldReservePosition?{type:ImageReferenceType,position:eo.calcPosition(ro),identifier:no,label:oo,referenceType:io,alt:ao}:{type:ImageReferenceType,identifier:no,label:oo,referenceType:io,alt:ao}})}},uniqueName$8="@yozora/tokenizer-image-reference";class ImageReferenceTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$8,priority:ro.priority??TokenizerPriority.LINKS});Ws(this,"match",match$9);Ws(this,"parse",parse$a)}}const match$8=function(){return{isContainingBlock:!1,eatOpener:eo,eatContinuationText:to};function eo(ro){if(ro.countOfPrecedeSpaces<4)return null;const{nodePoints:no,startIndex:oo,firstNonWhitespaceIndex:io,endIndex:so}=ro;let ao=oo+4;if(no[oo].codePoint===AsciiCodePoint.SPACE&&no[oo+3].codePoint===VirtualCodePoint.SPACE){let co=oo+1;for(;coto.map(ro=>{const{lines:no}=ro;let oo=0,io=no.length;for(;ooco+1&&so.push({type:"opener",startIndex:co+1,endIndex:ho}),co=ho-1}break}case AsciiCodePoint.BACKTICK:{const ho=co,po=eatOptionalCharacters(no,co+1,io,fo);so.push({type:"both",startIndex:ho,endIndex:po}),co=po-1;break}}}let ao=0,lo=-1,uo=null;for(;ao=co))continue;lo=fo;let ho=null,po=null;for(;ao=co&&vo.type!=="closer")break}if(ao+1>=so.length)return;ho=so[ao];const go=ho.endIndex-ho.startIndex;for(let vo=ao+1;voto.map(ro=>{const no=eo.getNodePoints();let oo=ro.startIndex+ro.thickness,io=ro.endIndex-ro.thickness,so=!0;for(let uo=oo;uogenFindDelimiter(to),isDelimiterPair:ro,processDelimiterPair:no,processSingleDelimiter:oo};function to(io,so){const ao=eo.getNodePoints();for(let lo=io;lo=so||ao[lo+1].codePoint!==AsciiCodePoint.OPEN_BRACKET)break;const co=eatLinkLabel(ao,lo+1,so);if(co.nextIndex===-1)return{type:"opener",startIndex:lo+1,endIndex:lo+2,brackets:[]};if(co.labelAndIdentifier==null){lo=co.nextIndex-1;break}const fo=[{startIndex:lo+1,endIndex:co.nextIndex,label:co.labelAndIdentifier.label,identifier:co.labelAndIdentifier.identifier}],ho={type:"closer",startIndex:lo,endIndex:co.nextIndex,brackets:fo};for(lo=co.nextIndex;lo=ao.length)break;if(uo+1to.map(ro=>{const{identifier:no,label:oo,referenceType:io}=ro,so=eo.parseInlineTokens(ro.children);return eo.shouldReservePosition?{type:LinkReferenceType,position:eo.calcPosition(ro),identifier:no,label:oo,referenceType:io,children:so}:{type:LinkReferenceType,identifier:no,label:oo,referenceType:io,children:so}})}},uniqueName$5="@yozora/tokenizer-link-reference";class LinkReferenceTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$5,priority:ro.priority??TokenizerPriority.LINKS});Ws(this,"match",match$6);Ws(this,"parse",parse$7)}}const match$5=function(){const{emptyItemCouldNotInterruptedTypes:eo,enableTaskListItem:to}=this;return{isContainingBlock:!0,eatOpener:ro,eatAndInterruptPreviousSibling:no,eatContinuationText:oo};function ro(io){if(io.countOfPrecedeSpaces>=4)return null;const{nodePoints:so,startIndex:ao,endIndex:lo,firstNonWhitespaceIndex:uo}=io;if(uo>=lo)return null;let co=!1,fo=null,ho,po,go=uo,vo=so[go].codePoint;if(go+1uo&&go-uo<=9&&(vo===AsciiCodePoint.DOT||vo===AsciiCodePoint.CLOSE_PARENTHESIS)&&(go+=1,co=!0,fo=vo)}if(co||(vo===AsciiCodePoint.PLUS_SIGN||vo===AsciiCodePoint.MINUS_SIGN||vo===AsciiCodePoint.ASTERISK)&&(go+=1,fo=vo),fo==null)return null;let bo=0,xo=go;for(xo4&&(xo-=bo-1,bo=1),bo===0&&xo=lo){if(so.countOfTopBlankLine>=0&&(so.countOfTopBlankLine+=1,so.countOfTopBlankLine>1))return{status:"notMatched"}}else so.countOfTopBlankLine=-1;return{status:"opening",nextIndex:Math.min(ao+so.indent,lo-1)}}};function eatTaskStatus(eo,to,ro){let no=to;for(;no=ro||eo[no].codePoint!==AsciiCodePoint.OPEN_BRACKET||eo[no+2].codePoint!==AsciiCodePoint.CLOSE_BRACKET||!isWhitespaceCharacter(eo[no+3].codePoint))return{status:null,nextIndex:to};let oo;switch(eo[no+1].codePoint){case AsciiCodePoint.SPACE:oo=TaskStatus.TODO;break;case AsciiCodePoint.MINUS_SIGN:oo=TaskStatus.DOING;break;case AsciiCodePoint.LOWERCASE_X:case AsciiCodePoint.UPPERCASE_X:oo=TaskStatus.DONE;break;default:return{status:null,nextIndex:to}}return{status:oo,nextIndex:no+4}}const parse$6=function(eo){return{parse:to=>{const ro=[];let no=[];for(let io=0;io{if(eo.length<=0)return null;let ro=eo.some(io=>{if(io.children==null||io.children.length<=1)return!1;let so=io.children[0].position;for(let ao=1;ao1){let io=eo[0];for(let so=1;so{const so=to.parseBlockTokens(io.children),ao=ro?so:so.map(uo=>uo.type===ParagraphType$1?uo.children:uo).flat();return to.shouldReservePosition?{type:ListItemType,position:io.position,status:io.status,children:ao}:{type:ListItemType,status:io.status,children:ao}});return to.shouldReservePosition?{type:ListType,position:{start:{...eo[0].position.start},end:{...eo[eo.length-1].position.end}},ordered:eo[0].ordered,orderType:eo[0].orderType,start:eo[0].order,marker:eo[0].marker,spread:ro,children:no}:{type:ListType,ordered:eo[0].ordered,orderType:eo[0].orderType,start:eo[0].order,marker:eo[0].marker,spread:ro,children:no}},uniqueName$4="@yozora/tokenizer-list";class ListTokenizer extends BaseBlockTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$4,priority:ro.priority??TokenizerPriority.CONTAINING_BLOCK});Ws(this,"enableTaskListItem");Ws(this,"emptyItemCouldNotInterruptedTypes");Ws(this,"match",match$5);Ws(this,"parse",parse$6);this.enableTaskListItem=ro.enableTaskListItem??!1,this.emptyItemCouldNotInterruptedTypes=ro.emptyItemCouldNotInterruptedTypes??[ParagraphType$1]}}const match$4=function(){return{isContainingBlock:!1,eatOpener:eo,eatContinuationText:to,eatLazyContinuationText:ro};function eo(no){const{endIndex:oo,firstNonWhitespaceIndex:io}=no;if(io>=oo)return null;const so=[no],ao=calcPositionFromPhrasingContentLines(so);return{token:{nodeType:ParagraphType$1,position:ao,lines:so},nextIndex:oo}}function to(no,oo){const{endIndex:io,firstNonWhitespaceIndex:so}=no;return so>=io?{status:"notMatched"}:(oo.lines.push(no),{status:"opening",nextIndex:io})}function ro(no,oo){return to(no,oo)}},parse$5=function(eo){return{parse:to=>{const ro=[];for(const no of to){const oo=mergeAndStripContentLines(no.lines),io=eo.processInlines(oo);if(io.length<=0)continue;const so=eo.shouldReservePosition?{type:ParagraphType$1,position:no.position,children:io}:{type:ParagraphType$1,children:io};ro.push(so)}return ro}}},uniqueName$3="@yozora/tokenizer-paragraph";class ParagraphTokenizer extends BaseBlockTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$3,priority:ro.priority??TokenizerPriority.FALLBACK});Ws(this,"match",match$4);Ws(this,"parse",parse$5)}extractPhrasingContentLines(ro){return ro.lines}buildBlockToken(ro){const no=trimBlankLines(ro);if(no.length<=0)return null;const oo=calcPositionFromPhrasingContentLines(no);return{nodeType:ParagraphType$1,lines:no,position:oo}}}const match$3=function(eo){return{isContainingBlock:!1,eatOpener:to,eatAndInterruptPreviousSibling:ro};function to(){return null}function ro(no,oo){const{nodePoints:io,endIndex:so,firstNonWhitespaceIndex:ao,countOfPrecedeSpaces:lo}=no;if(lo>=4||ao>=so)return null;let uo=null,co=!1;for(let go=ao;goto.map(ro=>{let no=1;switch(ro.marker){case AsciiCodePoint.EQUALS_SIGN:no=1;break;case AsciiCodePoint.MINUS_SIGN:no=2;break}const oo=mergeAndStripContentLines(ro.lines),io=eo.processInlines(oo);return eo.shouldReservePosition?{type:HeadingType,position:ro.position,depth:no,children:io}:{type:HeadingType,depth:no,children:io}})}},uniqueName$2="@yozora/tokenizer-setext-heading";class SetextHeadingTokenizer extends BaseBlockTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$2,priority:ro.priority??TokenizerPriority.ATOMIC});Ws(this,"match",match$3);Ws(this,"parse",parse$4)}}const match$2=function(){return{findDelimiter:()=>genFindDelimiter((eo,to)=>({type:"full",startIndex:eo,endIndex:to})),processSingleDelimiter:eo=>[{nodeType:TextType$1,startIndex:eo.startIndex,endIndex:eo.endIndex}]}},parse$3=function(eo){return{parse:to=>to.map(ro=>{const no=eo.getNodePoints();let oo=calcEscapedStringFromNodePoints(no,ro.startIndex,ro.endIndex);return oo=stripSpaces(oo),eo.shouldReservePosition?{type:TextType$1,position:eo.calcPosition(ro),value:oo}:{type:TextType$1,value:oo}})}},_stripRegex=/[^\S\n]*\n[^\S\n]*/g,stripSpaces=eo=>eo.replace(_stripRegex,` +`),uniqueName$1="@yozora/tokenizer-text";class TextTokenizer extends BaseInlineTokenizer{constructor(ro={}){super({name:ro.name??uniqueName$1,priority:ro.priority??TokenizerPriority.FALLBACK});Ws(this,"match",match$2);Ws(this,"parse",parse$3)}findAndHandleDelimiter(ro,no){return{nodeType:TextType$1,startIndex:ro,endIndex:no}}}const match$1=function(){return{isContainingBlock:!1,eatOpener:eo,eatAndInterruptPreviousSibling:to};function eo(ro){if(ro.countOfPrecedeSpaces>=4)return null;const{nodePoints:no,startIndex:oo,endIndex:io,firstNonWhitespaceIndex:so}=ro;if(so+2>=io)return null;let ao,lo=0,uo=!0,co=!1;for(let ho=so;hoto.map(ro=>eo.shouldReservePosition?{type:ThematicBreakType,position:ro.position}:{type:ThematicBreakType})}},uniqueName="@yozora/tokenizer-thematic-break";class ThematicBreakTokenizer extends BaseBlockTokenizer{constructor(ro={}){super({name:ro.name??uniqueName,priority:ro.priority??TokenizerPriority.ATOMIC});Ws(this,"match",match$1);Ws(this,"parse",parse$2)}}class GfmParser extends DefaultParser{constructor(to={}){super({...to,blockFallbackTokenizer:to.blockFallbackTokenizer??new ParagraphTokenizer,inlineFallbackTokenizer:to.inlineFallbackTokenizer??new TextTokenizer}),this.useTokenizer(new IndentedCodeTokenizer).useTokenizer(new HtmlBlockTokenizer).useTokenizer(new SetextHeadingTokenizer).useTokenizer(new ThematicBreakTokenizer).useTokenizer(new BlockquoteTokenizer).useTokenizer(new ListTokenizer({enableTaskListItem:!1})).useTokenizer(new HeadingTokenizer).useTokenizer(new FencedCodeTokenizer).useTokenizer(new DefinitionTokenizer).useTokenizer(new HtmlInlineTokenizer).useTokenizer(new InlineCodeTokenizer).useTokenizer(new AutolinkTokenizer).useTokenizer(new BreakTokenizer).useTokenizer(new ImageTokenizer).useTokenizer(new ImageReferenceTokenizer).useTokenizer(new LinkTokenizer).useTokenizer(new LinkReferenceTokenizer).useTokenizer(new EmphasisTokenizer)}}const parser$1=new GfmParser({defaultParseOptions:{shouldReservePosition:!1}});class BlockquoteRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("blockquote",{className:cls$b,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$b=mergeStyles$1(astClasses.blockquote,{boxSizing:"border-box",padding:"0.625em 1em",borderLeft:"0.25em solid var(--colorBorderBlockquote)",margin:"0px 0px 1.25em 0px",background:"var(--colorBgBlockquote)",boxShadow:"0 1px 2px 0 hsla(0deg, 0%, 0%, 0.1)","> :last-child":{marginBottom:0}});class BreakRenderer extends React.Component{shouldComponentUpdate(){return!1}render(){return jsxRuntimeExports.jsx("br",{className:cls$a})}}const cls$a=mergeStyles$1(astClasses.break,{boxSizing:"border-box"});var prism={exports:{}};(function(eo){var to=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var ro=function(no){var oo=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,io=0,so={},ao={manual:no.Prism&&no.Prism.manual,disableWorkerMessageHandler:no.Prism&&no.Prism.disableWorkerMessageHandler,util:{encode:function _o(Eo){return Eo instanceof lo?new lo(Eo.type,_o(Eo.content),Eo.alias):Array.isArray(Eo)?Eo.map(_o):Eo.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(To){var _o=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(To.stack)||[])[1];if(_o){var Eo=document.getElementsByTagName("script");for(var So in Eo)if(Eo[So].src==_o)return Eo[So]}return null}},isActive:function(_o,Eo,So){for(var To="no-"+Eo;_o;){var wo=_o.classList;if(wo.contains(Eo))return!0;if(wo.contains(To))return!1;_o=_o.parentElement}return!!So}},languages:{plain:so,plaintext:so,text:so,txt:so,extend:function(_o,Eo){var So=ao.util.clone(ao.languages[_o]);for(var To in Eo)So[To]=Eo[To];return So},insertBefore:function(_o,Eo,So,To){To=To||ao.languages;var wo=To[_o],Co={};for(var Oo in wo)if(wo.hasOwnProperty(Oo)){if(Oo==Eo)for(var Ao in So)So.hasOwnProperty(Ao)&&(Co[Ao]=So[Ao]);So.hasOwnProperty(Oo)||(Co[Oo]=wo[Oo])}var Ro=To[_o];return To[_o]=Co,ao.languages.DFS(ao.languages,function(No,Mo){Mo===Ro&&No!=_o&&(this[No]=Co)}),Co},DFS:function _o(Eo,So,To,wo){wo=wo||{};var Co=ao.util.objId;for(var Oo in Eo)if(Eo.hasOwnProperty(Oo)){So.call(Eo,Oo,Eo[Oo],To||Oo);var Ao=Eo[Oo],Ro=ao.util.type(Ao);Ro==="Object"&&!wo[Co(Ao)]?(wo[Co(Ao)]=!0,_o(Ao,So,null,wo)):Ro==="Array"&&!wo[Co(Ao)]&&(wo[Co(Ao)]=!0,_o(Ao,So,Oo,wo))}}},plugins:{},highlightAll:function(_o,Eo){ao.highlightAllUnder(document,_o,Eo)},highlightAllUnder:function(_o,Eo,So){var To={callback:So,container:_o,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};ao.hooks.run("before-highlightall",To),To.elements=Array.prototype.slice.apply(To.container.querySelectorAll(To.selector)),ao.hooks.run("before-all-elements-highlight",To);for(var wo=0,Co;Co=To.elements[wo++];)ao.highlightElement(Co,Eo===!0,To.callback)},highlightElement:function(_o,Eo,So){var To=ao.util.getLanguage(_o),wo=ao.languages[To];ao.util.setLanguage(_o,To);var Co=_o.parentElement;Co&&Co.nodeName.toLowerCase()==="pre"&&ao.util.setLanguage(Co,To);var Oo=_o.textContent,Ao={element:_o,language:To,grammar:wo,code:Oo};function Ro(Mo){Ao.highlightedCode=Mo,ao.hooks.run("before-insert",Ao),Ao.element.innerHTML=Ao.highlightedCode,ao.hooks.run("after-highlight",Ao),ao.hooks.run("complete",Ao),So&&So.call(Ao.element)}if(ao.hooks.run("before-sanity-check",Ao),Co=Ao.element.parentElement,Co&&Co.nodeName.toLowerCase()==="pre"&&!Co.hasAttribute("tabindex")&&Co.setAttribute("tabindex","0"),!Ao.code){ao.hooks.run("complete",Ao),So&&So.call(Ao.element);return}if(ao.hooks.run("before-highlight",Ao),!Ao.grammar){Ro(ao.util.encode(Ao.code));return}if(Eo&&no.Worker){var No=new Worker(ao.filename);No.onmessage=function(Mo){Ro(Mo.data)},No.postMessage(JSON.stringify({language:Ao.language,code:Ao.code,immediateClose:!0}))}else Ro(ao.highlight(Ao.code,Ao.grammar,Ao.language))},highlight:function(_o,Eo,So){var To={code:_o,grammar:Eo,language:So};if(ao.hooks.run("before-tokenize",To),!To.grammar)throw new Error('The language "'+To.language+'" has no grammar.');return To.tokens=ao.tokenize(To.code,To.grammar),ao.hooks.run("after-tokenize",To),lo.stringify(ao.util.encode(To.tokens),To.language)},tokenize:function(_o,Eo){var So=Eo.rest;if(So){for(var To in So)Eo[To]=So[To];delete Eo.rest}var wo=new fo;return ho(wo,wo.head,_o),co(_o,wo,Eo,wo.head,0),go(wo)},hooks:{all:{},add:function(_o,Eo){var So=ao.hooks.all;So[_o]=So[_o]||[],So[_o].push(Eo)},run:function(_o,Eo){var So=ao.hooks.all[_o];if(!(!So||!So.length))for(var To=0,wo;wo=So[To++];)wo(Eo)}},Token:lo};no.Prism=ao;function lo(_o,Eo,So,To){this.type=_o,this.content=Eo,this.alias=So,this.length=(To||"").length|0}lo.stringify=function _o(Eo,So){if(typeof Eo=="string")return Eo;if(Array.isArray(Eo)){var To="";return Eo.forEach(function(Ro){To+=_o(Ro,So)}),To}var wo={type:Eo.type,content:_o(Eo.content,So),tag:"span",classes:["token",Eo.type],attributes:{},language:So},Co=Eo.alias;Co&&(Array.isArray(Co)?Array.prototype.push.apply(wo.classes,Co):wo.classes.push(Co)),ao.hooks.run("wrap",wo);var Oo="";for(var Ao in wo.attributes)Oo+=" "+Ao+'="'+(wo.attributes[Ao]||"").replace(/"/g,""")+'"';return"<"+wo.tag+' class="'+wo.classes.join(" ")+'"'+Oo+">"+wo.content+""};function uo(_o,Eo,So,To){_o.lastIndex=Eo;var wo=_o.exec(So);if(wo&&To&&wo[1]){var Co=wo[1].length;wo.index+=Co,wo[0]=wo[0].slice(Co)}return wo}function co(_o,Eo,So,To,wo,Co){for(var Oo in So)if(!(!So.hasOwnProperty(Oo)||!So[Oo])){var Ao=So[Oo];Ao=Array.isArray(Ao)?Ao:[Ao];for(var Ro=0;Ro=Co.reach);qo+=Ho.value.length,Ho=Ho.next){var Uo=Ho.value;if(Eo.length>_o.length)return;if(!(Uo instanceof lo)){var Yo=1,Zo;if(jo){if(Zo=uo(Lo,qo,_o,Do),!Zo||Zo.index>=_o.length)break;var Ns=Zo.index,_s=Zo.index+Zo[0].length,Ss=qo;for(Ss+=Ho.value.length;Ns>=Ss;)Ho=Ho.next,Ss+=Ho.value.length;if(Ss-=Ho.value.length,qo=Ss,Ho.value instanceof lo)continue;for(var As=Ho;As!==Eo.tail&&(Ss<_s||typeof As.value=="string");As=As.next)Yo++,Ss+=As.value.length;Yo--,Uo=_o.slice(qo,Ss),Zo.index-=qo}else if(Zo=uo(Lo,0,Uo,Do),!Zo)continue;var Ns=Zo.index,ws=Zo[0],Ds=Uo.slice(0,Ns),Jo=Uo.slice(Ns+ws.length),Cs=qo+Uo.length;Co&&Cs>Co.reach&&(Co.reach=Cs);var Bs=Ho.prev;Ds&&(Bs=ho(Eo,Bs,Ds),qo+=Ds.length),po(Eo,Bs,Yo);var zs=new lo(Oo,Mo?ao.tokenize(ws,Mo):ws,Fo,ws);if(Ho=ho(Eo,Bs,zs),Jo&&ho(Eo,Ho,Jo),Yo>1){var Ls={cause:Oo+","+Ro,reach:Cs};co(_o,Eo,So,Ho.prev,qo,Ls),Co&&Ls.reach>Co.reach&&(Co.reach=Ls.reach)}}}}}}function fo(){var _o={value:null,prev:null,next:null},Eo={value:null,prev:_o,next:null};_o.next=Eo,this.head=_o,this.tail=Eo,this.length=0}function ho(_o,Eo,So){var To=Eo.next,wo={value:So,prev:Eo,next:To};return Eo.next=wo,To.prev=wo,_o.length++,wo}function po(_o,Eo,So){for(var To=Eo.next,wo=0;wo/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ro.languages.markup.tag.inside["attr-value"].inside.entity=ro.languages.markup.entity,ro.languages.markup.doctype.inside["internal-subset"].inside=ro.languages.markup,ro.hooks.add("wrap",function(no){no.type==="entity"&&(no.attributes.title=no.content.replace(/&/,"&"))}),Object.defineProperty(ro.languages.markup.tag,"addInlined",{value:function(oo,io){var so={};so["language-"+io]={pattern:/(^$)/i,lookbehind:!0,inside:ro.languages[io]},so.cdata=/^$/i;var ao={"included-cdata":{pattern://i,inside:so}};ao["language-"+io]={pattern:/[\s\S]+/,inside:ro.languages[io]};var lo={};lo[oo]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return oo}),"i"),lookbehind:!0,greedy:!0,inside:ao},ro.languages.insertBefore("markup","cdata",lo)}}),Object.defineProperty(ro.languages.markup.tag,"addAttribute",{value:function(no,oo){ro.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+no+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[oo,"language-"+oo],inside:ro.languages[oo]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ro.languages.html=ro.languages.markup,ro.languages.mathml=ro.languages.markup,ro.languages.svg=ro.languages.markup,ro.languages.xml=ro.languages.extend("markup",{}),ro.languages.ssml=ro.languages.xml,ro.languages.atom=ro.languages.xml,ro.languages.rss=ro.languages.xml,function(no){var oo=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;no.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+oo.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+oo.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+oo.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+oo.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:oo,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},no.languages.css.atrule.inside.rest=no.languages.css;var io=no.languages.markup;io&&(io.tag.addInlined("style","css"),io.tag.addAttribute("style","css"))}(ro),ro.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ro.languages.javascript=ro.languages.extend("clike",{"class-name":[ro.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ro.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ro.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ro.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ro.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ro.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ro.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ro.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ro.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ro.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ro.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ro.languages.markup&&(ro.languages.markup.tag.addInlined("script","javascript"),ro.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ro.languages.js=ro.languages.javascript,function(){if(typeof ro>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var no="Loading…",oo=function(vo,bo){return"✖ Error "+vo+" while fetching file: "+bo},io="✖ Error: File does not exist or is empty",so={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},ao="data-src-status",lo="loading",uo="loaded",co="failed",fo="pre[data-src]:not(["+ao+'="'+uo+'"]):not(['+ao+'="'+lo+'"])';function ho(vo,bo,xo){var _o=new XMLHttpRequest;_o.open("GET",vo,!0),_o.onreadystatechange=function(){_o.readyState==4&&(_o.status<400&&_o.responseText?bo(_o.responseText):_o.status>=400?xo(oo(_o.status,_o.statusText)):xo(io))},_o.send(null)}function po(vo){var bo=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(vo||"");if(bo){var xo=Number(bo[1]),_o=bo[2],Eo=bo[3];return _o?Eo?[xo,Number(Eo)]:[xo,void 0]:[xo,xo]}}ro.hooks.add("before-highlightall",function(vo){vo.selector+=", "+fo}),ro.hooks.add("before-sanity-check",function(vo){var bo=vo.element;if(bo.matches(fo)){vo.code="",bo.setAttribute(ao,lo);var xo=bo.appendChild(document.createElement("CODE"));xo.textContent=no;var _o=bo.getAttribute("data-src"),Eo=vo.language;if(Eo==="none"){var So=(/\.(\w+)$/.exec(_o)||[,"none"])[1];Eo=so[So]||So}ro.util.setLanguage(xo,Eo),ro.util.setLanguage(bo,Eo);var To=ro.plugins.autoloader;To&&To.loadLanguages(Eo),ho(_o,function(wo){bo.setAttribute(ao,uo);var Co=po(bo.getAttribute("data-range"));if(Co){var Oo=wo.split(/\r\n?|\n/g),Ao=Co[0],Ro=Co[1]==null?Oo.length:Co[1];Ao<0&&(Ao+=Oo.length),Ao=Math.max(0,Math.min(Ao-1,Oo.length)),Ro<0&&(Ro+=Oo.length),Ro=Math.max(0,Math.min(Ro,Oo.length)),wo=Oo.slice(Ao,Ro).join(` +`),bo.hasAttribute("data-start")||bo.setAttribute("data-start",String(Ao+1))}xo.textContent=wo,ro.highlightElement(xo)},function(wo){bo.setAttribute(ao,co),xo.textContent=wo})}}),ro.plugins.fileHighlight={highlight:function(bo){for(var xo=(bo||document).querySelectorAll(fo),_o=0,Eo;Eo=xo[_o++];)ro.highlightElement(Eo)}};var go=!1;ro.fileHighlight=function(){go||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),go=!0),ro.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(prism);var prismExports=prism.exports;const Prism=getDefaultExportFromCjs(prismExports);function sheetForTag(eo){if(eo.sheet)return eo.sheet;for(var to=0;to0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position2||token$1(character)>3?"":" "}function escaping(eo,to){for(;--to&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(eo,caret()+(to<6&&peek()==32&&next()==32))}function delimiter(eo){for(;next();)switch(character){case eo:return position;case 34:case 39:eo!==34&&eo!==39&&delimiter(character);break;case 40:eo===41&&delimiter(eo);break;case 92:next();break}return position}function commenter(eo,to){for(;next()&&eo+character!==57;)if(eo+character===84&&peek()===47)break;return"/*"+slice(to,position-1)+"*"+from(eo===47?eo:next())}function identifier(eo){for(;!token$1(peek());)next();return slice(eo,position)}function compile(eo){return dealloc(parse$1("",null,null,null,[""],eo=alloc(eo),0,[0],eo))}function parse$1(eo,to,ro,no,oo,io,so,ao,lo){for(var uo=0,co=0,fo=so,ho=0,po=0,go=0,vo=1,bo=1,xo=1,_o=0,Eo="",So=oo,To=io,wo=no,Co=Eo;bo;)switch(go=_o,_o=next()){case 40:if(go!=108&&charat(Co,fo-1)==58){indexof(Co+=replace(delimit(_o),"&","&\f"),"&\f")!=-1&&(xo=-1);break}case 34:case 39:case 91:Co+=delimit(_o);break;case 9:case 10:case 13:case 32:Co+=whitespace(go);break;case 92:Co+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment$1(commenter(next(),caret()),to,ro),lo);break;default:Co+="/"}break;case 123*vo:ao[uo++]=strlen(Co)*xo;case 125*vo:case 59:case 0:switch(_o){case 0:case 125:bo=0;case 59+co:xo==-1&&(Co=replace(Co,/\f/g,"")),po>0&&strlen(Co)-fo&&append(po>32?declaration(Co+";",no,ro,fo-1):declaration(replace(Co," ","")+";",no,ro,fo-2),lo);break;case 59:Co+=";";default:if(append(wo=ruleset(Co,to,ro,uo,co,oo,ao,Eo,So=[],To=[],fo),io),_o===123)if(co===0)parse$1(Co,to,wo,wo,So,io,fo,ao,To);else switch(ho===99&&charat(Co,3)===110?100:ho){case 100:case 108:case 109:case 115:parse$1(eo,wo,wo,no&&append(ruleset(eo,wo,wo,0,0,oo,ao,Eo,oo,So=[],fo),To),oo,To,fo,ao,no?So:To);break;default:parse$1(Co,wo,wo,wo,[""],To,0,ao,To)}}uo=co=po=0,vo=xo=1,Eo=Co="",fo=so;break;case 58:fo=1+strlen(Co),po=go;default:if(vo<1){if(_o==123)--vo;else if(_o==125&&vo++==0&&prev()==125)continue}switch(Co+=from(_o),_o*vo){case 38:xo=co>0?1:(Co+="\f",-1);break;case 44:ao[uo++]=(strlen(Co)-1)*xo,xo=1;break;case 64:peek()===45&&(Co+=delimit(next())),ho=peek(),co=fo=strlen(Eo=Co+=identifier(caret())),_o++;break;case 45:go===45&&strlen(Co)==2&&(vo=0)}}return io}function ruleset(eo,to,ro,no,oo,io,so,ao,lo,uo,co){for(var fo=oo-1,ho=oo===0?io:[""],po=sizeof(ho),go=0,vo=0,bo=0;go0?ho[xo]+" "+_o:replace(_o,/&\f/g,ho[xo])))&&(lo[bo++]=Eo);return node(eo,to,ro,oo===0?RULESET:ao,lo,uo,co)}function comment$1(eo,to,ro){return node(eo,to,ro,COMMENT,from(char()),substr(eo,2,-2),0)}function declaration(eo,to,ro,no){return node(eo,to,ro,DECLARATION,substr(eo,0,no),substr(eo,no+1,-1),no)}function serialize(eo,to){for(var ro="",no=sizeof(eo),oo=0;oo6)switch(charat(eo,to+1)){case 109:if(charat(eo,to+4)!==45)break;case 102:return replace(eo,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(eo,to+3)==108?"$3":"$2-$3"))+eo;case 115:return~indexof(eo,"stretch")?prefix(replace(eo,"stretch","fill-available"),to)+eo:eo}break;case 4949:if(charat(eo,to+1)!==115)break;case 6444:switch(charat(eo,strlen(eo)-3-(~indexof(eo,"!important")&&10))){case 107:return replace(eo,":",":"+WEBKIT)+eo;case 101:return replace(eo,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(eo,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+eo}break;case 5936:switch(charat(eo,to+11)){case 114:return WEBKIT+eo+MS+replace(eo,/[svh]\w+-[tblr]{2}/,"tb")+eo;case 108:return WEBKIT+eo+MS+replace(eo,/[svh]\w+-[tblr]{2}/,"tb-rl")+eo;case 45:return WEBKIT+eo+MS+replace(eo,/[svh]\w+-[tblr]{2}/,"lr")+eo}return WEBKIT+eo+MS+eo+eo}return eo}var prefixer=function eo(to,ro,no,oo){if(to.length>-1&&!to.return)switch(to.type){case DECLARATION:to.return=prefix(to.value,to.length);break;case KEYFRAMES:return serialize([copy(to,{value:replace(to.value,"@","@"+WEBKIT)})],oo);case RULESET:if(to.length)return combine(to.props,function(io){switch(match(io,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(to,{props:[replace(io,/:(read-\w+)/,":"+MOZ+"$1")]})],oo);case"::placeholder":return serialize([copy(to,{props:[replace(io,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(to,{props:[replace(io,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(to,{props:[replace(io,/:(plac\w+)/,MS+"input-$1")]})],oo)}return""})}},defaultStylisPlugins=[prefixer],createCache=function eo(to){var ro=to.key;if(ro==="css"){var no=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(no,function(vo){var bo=vo.getAttribute("data-emotion");bo.indexOf(" ")!==-1&&(document.head.appendChild(vo),vo.setAttribute("data-s",""))})}var oo=to.stylisPlugins||defaultStylisPlugins,io={},so,ao=[];so=to.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+ro+' "]'),function(vo){for(var bo=vo.getAttribute("data-emotion").split(" "),xo=1;xoNumber.isNaN(Number(eo))).map(([eo,to])=>[eo,`var(${to})`]));Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>/=$<%]+(?:\s(?:\s*[^\s>/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>/]+/,inside:{namespace:/^[^\s>/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(eo){eo.type==="entity"&&eo.attributes&&(eo.attributes.title=eo.content.replace(/&/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function eo(to,ro){const no={};no["language-"+ro]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[ro]},no.cdata=/^$/i;const oo={"included-cdata":{pattern://i,inside:no}};oo["language-"+ro]={pattern:/[\s\S]+/,inside:Prism.languages[ro]};const io={};io[to]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return to}),"i"),lookbehind:!0,greedy:!0,inside:oo},Prism.languages.insertBefore("markup","cdata",io)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(eo,to){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+eo+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[to,"language-"+to],inside:Prism.languages[to]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;const envVars="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",commandAfterHeredoc={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:void 0},insideString={bash:commandAfterHeredoc,environment:{pattern:RegExp("\\$"+envVars),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!/]|##?|%%?|\^\^?|,,?/,punctuation:/[[\]]/,environment:{pattern:RegExp("(\\{)"+envVars),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};Prism.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+envVars),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:insideString},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:commandAfterHeredoc}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:insideString},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:insideString.entity}}],environment:{pattern:RegExp("\\$?"+envVars),alias:"constant"},variable:insideString.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};commandAfterHeredoc.inside=Prism.languages.bash;const toBeCopied=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],inside$1=insideString.variable[1].inside;for(let eo=0;eo>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;const string$1=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+string$1.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+string$1.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+string$1.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+string$1.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:string$1,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/};Prism.languages.css.atrule.inside.rest=Prism.languages.css;const markup=Prism.languages.markup;markup&&(markup.tag.addInlined("style","css"),markup.tag.addAttribute("style","css"));const keyword$1=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,modName=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return keyword$1.source});Prism.languages.cpp=Prism.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return keyword$1.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:keyword$1,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/});Prism.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return modName})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}});Prism.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:Prism.languages.cpp}}}});Prism.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});Prism.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:Prism.languages.extend("cpp",{})}});Prism.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},Prism.languages.cpp["base-clause"]);const ID="(?:"+[/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,/<(?:[^<>]|(?!)*>/.source].join("|")+")",IDInside={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:Prism.languages.markup}};function withID(eo,to){return RegExp(eo.replace(//g,function(){return ID}),to)}Prism.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:withID(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)/.source,"i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:IDInside},"attr-value":{pattern:withID(/(=[ \t\r\n]*)/.source),lookbehind:!0,greedy:!0,inside:IDInside},"attr-name":{pattern:withID(/([[;, \t\r\n])(?=[ \t\r\n]*=)/.source),lookbehind:!0,greedy:!0,inside:IDInside},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:withID(/(^|[^-.\w\x80-\uFFFF\\])/.source),lookbehind:!0,greedy:!0,inside:IDInside},operator:/[=:]|-[->]/,punctuation:/[[\]{};,]/};Prism.languages.gv=Prism.languages.dot;Prism.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};const PREFIXES={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(PREFIXES).forEach(function(eo){const to=PREFIXES[eo],ro=[];/^\w+$/.test(eo)||ro.push(/\w+/.exec(eo)[0]),eo==="diff"&&ro.push("bold"),Prism.languages.diff[eo]={pattern:RegExp("^(?:["+to+`].*(?:\r +?| +|(?![\\s\\S])))+`,"m"),alias:ro,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(eo)[0]}}}});Object.defineProperty(Prism.languages.diff,"PREFIXES",{value:PREFIXES});Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m};Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/});Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}});delete Prism.languages.go["class-name"];const keywords=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,classNamePrefix=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,className={pattern:RegExp(/(^|[^\w.])/.source+classNamePrefix+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};Prism.languages.java=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[className,{pattern:RegExp(/(^|[^\w.])/.source+classNamePrefix+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:className.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+classNamePrefix+/[A-Z]\w*\b/.source),lookbehind:!0,inside:className.inside}],keyword:keywords,function:[Prism.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/});Prism.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}});Prism.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":className,keyword:keywords,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+classNamePrefix+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:className.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+classNamePrefix+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:className.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return keywords.source})),lookbehind:!0,inside:{punctuation:/\./}}});Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});if(Prism.languages.markup){const eo=Prism.languages.markup;eo.tag.addInlined("script","javascript"),eo.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")}Prism.languages.js=Prism.languages.javascript;Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;const javascript=Prism.util.clone(Prism.languages.javascript),space$1=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,braces=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source;let spread=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function re$1(eo,to){const ro=eo.replace(//g,()=>space$1).replace(//g,()=>braces).replace(//g,()=>spread);return RegExp(ro,to)}spread=re$1(spread).source;Prism.languages.jsx=Prism.languages.extend("markup",javascript);const jsx=Prism.languages.jsx;jsx.tag.pattern=re$1(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source);jsx.tag.inside.tag.pattern=/^<\/?[^\s>/]*/;jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/;jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/;jsx.tag.inside.comment=javascript.comment;Prism.languages.insertBefore("inside","attr-name",{spread:{pattern:re$1(//.source),inside:Prism.languages.jsx}},jsx.tag);Prism.languages.insertBefore("inside","special-attr",{script:{pattern:re$1(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:Prism.languages.jsx}}},jsx.tag);const stringifyToken=function(eo){return eo?typeof eo=="string"?eo:typeof eo.content=="string"?eo.content:eo.content.map(stringifyToken).join(""):""},walkTokens=function(eo){const to=[];for(let ro=0;ro0&&to[to.length-1].tagName===stringifyToken(io[0].content[1])&&to.pop():io[io.length-1].content==="/>"||to.push({tagName:stringifyToken(io[0].content[1]),openedBraces:0}):to.length>0&&no.type==="punctuation"&&no.content==="{"?to[to.length-1].openedBraces+=1:to.length>0&&to[to.length-1].openedBraces>0&&no.type==="punctuation"&&no.content==="}"?to[to.length-1].openedBraces-=1:oo=!0}if((oo||typeof no=="string")&&to.length>0&&to[to.length-1].openedBraces===0){let io=stringifyToken(no);ro0&&(typeof eo[ro-1]=="string"||eo[ro-1].type==="plain-text")&&(io=stringifyToken(eo[ro-1])+io,eo.splice(ro-1,1),ro-=1),eo[ro]=new Prism.Token("plain-text",io,void 0,io)}typeof no!="string"&&no.content&&typeof no.content!="string"&&walkTokens(no.content)}};Prism.hooks.add("after-tokenize",function(eo){eo.language!=="jsx"&&eo.language!=="tsx"||walkTokens(eo.tokens)});Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};const inner=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function createInline(eo){const to=eo.replace(//g,function(){return inner});return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+to+")")}const tableCell=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,tableRow=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return tableCell}),tableLine=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;Prism.languages.markdown=Prism.languages.extend("markup",{});Prism.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:Prism.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+tableRow+tableLine+"(?:"+tableRow+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+tableRow+tableLine+")(?:"+tableRow+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(tableCell),inside:Prism.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+tableRow+")"+tableLine+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+tableRow+"$"),inside:{"table-header":{pattern:RegExp(tableCell),alias:"important",inside:Prism.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[[\]!:]|[<>]/},alias:"url"},bold:{pattern:createInline(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:createInline(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:createInline(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:createInline(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}});["url","bold","italic","strike"].forEach(function(eo){["url","bold","italic","strike","code-snippet"].forEach(function(to){if(eo!==to){const ro=Prism.languages.markdown;ro[eo].inside.content.inside[to]=ro[to]}})});Prism.hooks.add("after-tokenize",function(eo){if(eo.language!=="markdown"&&eo.language!=="md")return;function to(ro){if(!(!ro||typeof ro=="string"))for(let no=0,oo=ro.length;no",quot:'"'},fromCodePoint$1=String.fromCodePoint||String.fromCharCode;function textContent(eo){let to=eo.replace(tagPattern,"");return to=to.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(ro,no){if(no=no.toLowerCase(),no[0]==="#"){let oo;return no[1]==="x"?oo=parseInt(no.slice(2),16):oo=Number(no.slice(1)),fromCodePoint$1(oo)}else{const oo=KNOWN_ENTITY_NAMES[no];return oo||ro}}),to}Prism.languages.md=Prism.languages.markdown;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]});Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/});Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}});Prism.languages.scss.atrule.inside.rest=Prism.languages.scss;Prism.languages.sass=Prism.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}});Prism.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}});delete Prism.languages.sass.atrule;const variable=/\$[-\w]+|#\{\$[-\w]+\}/,operator$1=[/[+*/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];Prism.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable,operator:operator$1}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable,operator:operator$1,important:Prism.languages.sass.important}}});delete Prism.languages.sass.property;delete Prism.languages.sass.important;Prism.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}});Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const unit={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},number$1={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},inside$2={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit,number:number$1,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit,boolean:/\b(?:false|true)\b/,operator:[/~|[+!/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:number$1,punctuation:/[{}()[\];:,]/};inside$2.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:inside$2}};inside$2.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:inside$2}};Prism.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:inside$2}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:inside$2}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:inside$2}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:inside$2.interpolation}},rest:inside$2}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:inside$2.interpolation,comment:inside$2.comment,punctuation:/[{},]/}},func:inside$2.func,string:inside$2.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:inside$2.interpolation,punctuation:/[{}()[\];:.]/};Prism.languages.typescript=Prism.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/});Prism.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[{*]|$))/);delete Prism.languages.typescript.parameter;delete Prism.languages.typescript["literal-property"];const typeInside=Prism.languages.extend("typescript",{});delete typeInside["class-name"];Prism.languages.typescript["class-name"].inside=typeInside;Prism.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:typeInside}}}});Prism.languages.ts=Prism.languages.typescript;const typescript=Prism.util.clone(Prism.languages.typescript);Prism.languages.tsx=Prism.languages.extend("jsx",typescript);delete Prism.languages.tsx.parameter;delete Prism.languages.tsx["literal-property"];const tag$1=Prism.languages.tsx.tag;tag$1.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+tag$1.pattern.source+")",tag$1.pattern.flags);tag$1.lookbehind=!0;Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/};Prism.languages.vb=Prism.languages["visual-basic"];Prism.languages.vba=Prism.languages["visual-basic"];Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const anchorOrAlias=/[*&][^\s[\]{},]+/,tag=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,properties="(?:"+tag.source+"(?:[ ]+"+anchorOrAlias.source+")?|"+anchorOrAlias.source+"(?:[ ]+"+tag.source+")?)",plainKey=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,()=>/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source),string$2=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function createValuePattern(eo,to){const ro=(to||"").replace(/m/g,"")+"m",no=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return properties}).replace(/<>/g,function(){return eo});return RegExp(no,ro)}Prism.languages.yaml={scalar:{pattern:RegExp(/([-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return properties})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return properties}).replace(/<>/g,function(){return"(?:"+plainKey+"|"+string$2+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:createValuePattern(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:createValuePattern(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:createValuePattern(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:createValuePattern(string$2),lookbehind:!0,greedy:!0},number:{pattern:createValuePattern(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag,important:anchorOrAlias,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./};Prism.languages.yml=Prism.languages.yaml;const vscDarkTheme={plain:{color:"#d4d4d4",backgroundColor:"#1e1e1e"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment","punctuation"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin"],style:{color:"rgb(79, 193, 255)"}},{types:["number","variable","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["operator"],style:{color:"rgb(212, 212, 212)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["tag","changed","function","keyword"],style:{color:"rgb(86, 156, 214)"}},{types:["attr-name"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value"],style:{color:"rgb(206, 145, 120)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}}]},vscLightTheme={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},vars={border:`1px solid var(${TokenNames.colorBorderCodeLineno}, hsla(0deg, 0%, 80%, 0.8))`,highlightBackground:`var(${TokenNames.colorBgCodeHighlight}, hsla(30deg, 90%, 50%, 0.3))`,fontSizeCode:`var(${CommonTokenNames.fontSizeCode}, 14px)`,lineHeightCode:`var(${CommonTokenNames.lineHeightCode}, 1.6)`},classes$2={container:css({MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",display:"flex",alignItems:"stretch",overflow:"hidden",width:"100%",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,padding:0,transition:"max-height 0.5s ease-in-out",tabSize:2,fontSmooth:"always",whiteSpace:"pre",wordBreak:"keep-all",wordSpacing:"normal",wordWrap:"normal"}),line:css({boxSizing:"border-box",display:"flex",minWidth:"fit-content",width:"100%",padding:"0 6px",letterSpacing:"inherit",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,height:vars.lineHeightCode,overflowWrap:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"inherit",wordBreak:"inherit",wordSpacing:"inherit",wordWrap:"inherit"}),linenoLine:css({justifyContent:"flex-end",padding:"0 4px"}),highlightLine:css({background:vars.highlightBackground,borderColor:"transparent"}),lineno:css({flex:"0 0 auto",overflow:"hidden",boxSizing:"border-box",padding:"0.5rem 0",cursor:"default",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,userSelect:"none",textAlign:"right",borderRight:vars.border}),codes:css({flex:"1 1 auto",overflow:"overlay",boxSizing:"border-box",padding:"0.5rem 0",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode}),codeWrapper:css({minWidth:"100%",width:"fit-content"}),codeLine:css({boxSizing:"border-box",padding:"0 12px"})},languageMap={js:"javascript",ts:"typescript"},themeToDict=(eo,to)=>{eo=languageMap[eo]??eo;const{plain:ro}=to,no=Object.create(null),oo=to.styles.reduce((io,so)=>{const{types:ao,style:lo,languages:uo}=so;if(uo&&!uo.includes(eo))return io;for(const co of ao){const fo={...io[co],...lo};io[co]=fo}return io},no);return oo.root=ro,oo.plain={...ro,backgroundColor:void 0},oo},newlineRegex=/\r\n|\r|\n/,normalizeEmptyLines=eo=>{eo.length===0?eo.push({types:["plain"],content:` +`,empty:!0}):eo.length===1&&eo[0].content===""&&(eo[0].content=` +`,eo[0].empty=!0)},appendTypes=(eo,to)=>{const ro=eo.length;return ro>0&&eo[ro-1]===to?eo:eo.concat(to)},normalizeTokens=eo=>{const to=[[]],ro=[eo],no=[0],oo=[eo.length];let io=[];const so=[io];for(let ao=0;ao>-1;--ao){for(let lo=0;(lo=no[ao]++)0?co:["plain"],uo=ho):(co=appendTypes(co,ho.type),ho.alias&&(co=appendTypes(co,ho.alias)),uo=ho.content),typeof uo!="string"){ao+=1,to.push(co),ro.push(uo),no.push(0),oo.push(uo.length);continue}const po=uo.split(newlineRegex),go=po.length;io.push({types:co,content:po[0]});for(let vo=1;vo{var io,so;const no=ro.target;if(no==null)return;const{scrollTop:oo}=no;(so=(io=this.linenoRef.current)==null?void 0:io.scrollTo)==null||so.call(io,0,oo)});const no=themeToDict(ro.language,ro.theme),oo=this.tokenize(ro.code,ro.language),io=ro.showLineno?`${Math.max(2,String(oo.length).length)*1.1}em`:void 0;this.state={linenoWidth:io,themeDict:no,tokens:oo},this.linenoRef={current:null}}shouldComponentUpdate(ro,no){const oo=this.props,io=this.state;return io.linenoWidth!==no.linenoWidth||io.themeDict!==no.themeDict||io.tokens!==no.tokens||oo.code!==ro.code||oo.codesRef!==ro.codesRef||oo.collapsed!==ro.collapsed||oo.language!==ro.language||oo.maxLines!==ro.maxLines||oo.showLineno!==ro.showLineno||!isEqual(oo.theme,ro.theme)||!isEqual(oo.highlightLinenos,ro.highlightLinenos)}render(){const{linenoRef:ro,onScroll:no}=this,{codesRef:oo,collapsed:io,highlightLinenos:so,language:ao,maxLines:lo,showLineno:uo=!0}=this.props,{linenoWidth:co,tokens:fo}=this.state,ho=fo.length,po=lo>0?Math.min(lo,ho):ho,go={...this.state.themeDict.root,backgroundColor:"none",...io?{maxHeight:0}:{maxHeight:`calc(calc(${vars.lineHeightCode} * ${po+.8}) + 6px)`,minHeight:"100%"}};return React.createElement("div",{className:cx(classes$2.container,ao?`prism-code language-${ao}`:"prism-code"),style:go},uo&&React.createElement("div",{key:"linenos",className:classes$2.lineno,style:{width:co},ref:ro},React.createElement(HighlightLinenos,{countOfLines:ho,highlightLinenos:so})),React.createElement("div",{key:"codes",ref:oo,className:classes$2.codes,onScroll:no},React.createElement("div",{className:classes$2.codeWrapper},fo.map((vo,bo)=>{const xo=so.includes(bo+1),_o=this.getLineProps({line:vo});return React.createElement("div",{..._o,key:bo,className:cx(classes$2.line,classes$2.codeLine,xo&&classes$2.highlightLine,_o.className)},vo.map((Eo,So)=>React.createElement("span",{...this.getTokenProps({token:Eo}),key:So})))}))))}componentDidMount(){var ro,no;(no=(ro=this.props).onLinenoWidthChange)==null||no.call(ro,this.state.linenoWidth)}componentDidUpdate(ro,no){var ao,lo;const oo=this.props,io=this.state,so=oo.language!==ro.language||!isEqual(oo.theme,ro.theme)?themeToDict(oo.language,oo.theme):io.themeDict;if(oo.code!==ro.code||oo.language!==ro.language||so!==no.themeDict){const uo=this.tokenize(oo.code,oo.language),co=oo.showLineno?`${Math.max(2,String(uo.length).length)*1.1}em`:void 0;this.setState({linenoWidth:co,themeDict:so,tokens:uo})}io.linenoWidth!==no.linenoWidth&&((lo=(ao=this.props).onLinenoWidthChange)==null||lo.call(ao,io.linenoWidth))}tokenize(ro,no){const oo=no?Prism.languages[no]:void 0;if(oo){const io={code:ro,grammar:oo,language:no,tokens:[]};return Prism.hooks.run("before-tokenize",io),io.tokens=Prism.tokenize(io.code,io.grammar),Prism.hooks.run("after-tokenize",io),normalizeTokens(io.tokens)}else return normalizeTokens([ro])}getLineProps(ro){const{themeDict:no}=this.state,{key:oo,className:io,style:so,line:ao,...lo}=ro,uo={...lo,className:"token-line",style:void 0,key:void 0};return no!==void 0&&(uo.style=no.plain),so!==void 0&&(uo.style=uo.style!==void 0?{...uo.style,...so}:so),oo!==void 0&&(uo.key=oo),io&&(uo.className+=` ${io}`),uo}getStyleForToken({types:ro,empty:no}){const{themeDict:oo}=this.state,io=ro.length;if(oo===void 0)return;if(io===1&&ro[0]==="plain")return no?{display:"inline-block"}:void 0;if(io===1&&!no)return oo[ro[0]];const so=no?{display:"inline-block"}:{};for(const ao of ro){const lo=oo[ao];Object.assign(so,lo)}return so}getTokenProps(ro){const{key:no,className:oo,style:io,token:so,...ao}=ro,lo={...ao,className:`token ${so.types.join(" ")}`,children:so.content,style:this.getStyleForToken(so),key:void 0};return io!==void 0&&(lo.style=lo.style!==void 0?{...lo.style,...io}:io),no!==void 0&&(lo.key=no),oo&&(lo.className+=` ${oo}`),lo}}Ws(HighlightContent,"displayName","HighlightContent"),Ws(HighlightContent,"propTypes",{code:PropTypes.string.isRequired,codesRef:PropTypes.any,collapsed:PropTypes.bool.isRequired,language:PropTypes.string.isRequired,maxLines:PropTypes.number.isRequired,showLineno:PropTypes.bool.isRequired,theme:PropTypes.object.isRequired,highlightLinenos:PropTypes.array.isRequired,onLinenoWidthChange:PropTypes.func});class CodeHighlighter extends React.PureComponent{render(){const{lang:to,value:ro,darken:no=!0,highlightLinenos:oo=[],maxLines:io=-1,collapsed:so=!1,showLineNo:ao=!0,codesRef:lo,onLinenoWidthChange:uo}=this.props,co=this.props.theme??(no?vscDarkTheme:vscLightTheme);return React.createElement(HighlightContent,{code:ro,codesRef:lo,collapsed:so,highlightLinenos:oo,language:to??"",maxLines:io,showLineno:ao,theme:co,onLinenoWidthChange:uo})}}Ws(CodeHighlighter,"displayName","YozoraCodeHighlighter"),Ws(CodeHighlighter,"propTypes",{codesRef:PropTypes.any,collapsed:PropTypes.bool,darken:PropTypes.bool,highlightLinenos:PropTypes.arrayOf(PropTypes.number),lang:PropTypes.string,maxLines:PropTypes.number,onLinenoWidthChange:PropTypes.func,showLineNo:PropTypes.bool,theme:PropTypes.any,value:PropTypes.string.isRequired});const CopyButton=eo=>{const{className:to,delay:ro=1500,calcContentForCopy:no}=eo,[oo,io]=React.useState(0),so=useStyles$h(),ao=oo!==0,lo=()=>{if(oo===0){io(1);try{const uo=no();copy$2(uo),io(2)}catch{io(3)}}};return React.useEffect(()=>{if(oo===2||oo===3){const uo=setTimeout(()=>io(0),ro);return()=>{uo&&clearTimeout(uo)}}},[oo,ro]),jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",className:mergeClasses(so.copyButton,to),disabled:ao,as:"button",icon:oo===0?jsxRuntimeExports.jsx(Copy20Regular,{}):jsxRuntimeExports.jsx(CopyArrowRight20Regular,{}),onClick:lo})},useStyles$h=makeStyles({copyButton:{cursor:"pointer"}});class CodeRendererInner extends React.PureComponent{constructor(){super(...arguments),this.calcContentForCopy=()=>this.props.value}render(){const{calcContentForCopy:to}=this,{darken:ro,lang:no,value:oo,preferCodeWrap:io,showCodeLineno:so}=this.props;return jsxRuntimeExports.jsxs("code",{className:codeCls,"data-wrap":io,children:[jsxRuntimeExports.jsx(CodeHighlighter,{lang:no,value:oo,collapsed:!1,showLineNo:so&&!io,darken:ro}),jsxRuntimeExports.jsx("div",{className:copyBtnCls,children:jsxRuntimeExports.jsx(CopyButton,{calcContentForCopy:to})})]})}}const copyBtnCls=mergeStyles$1({position:"absolute",right:"4px",top:"4px",display:"none"}),codeCls=mergeStyles$1(astClasses.code,{position:"relative",display:"block",boxSizing:"border-box",borderRadius:"4px",margin:"0px 0px 1.25em 0px",backgroundColor:"var(--colorBgCode)",[`&:hover > .${copyBtnCls}`]:{display:"inline-block"},'&&[data-wrap="true"] > div':{whiteSpace:"pre-wrap",wordBreak:"keep-all"}}),CodeRenderer=eo=>{const{lang:to}=eo,ro=eo.value.replace(/[\r\n]+$/,""),{viewmodel:no}=useNodeRendererContext(),oo=useStateValue(no.preferCodeWrap$),io=useStateValue(no.showCodeLineno$),ao=useStateValue(no.themeScheme$)==="darken";return jsxRuntimeExports.jsx(CodeRendererInner,{darken:ao,lang:to??"text",value:ro,preferCodeWrap:oo,showCodeLineno:io})};class DeleteRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("del",{className:cls$9,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$9=mergeStyles$1(astClasses.delete,{marginRight:"4px",color:"var(--colorDelete)",fontStyle:"italic",textDecoration:"line-through"});class EmphasisRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("em",{className:cls$8,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$8=mergeStyles$1(astClasses.emphasis,{fontStyle:"italic",margin:"0 6px 0 2px"});class HeadingRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.depth!==to.depth||ro.identifier!==to.identifier||ro.children!==to.children||ro.linkIcon!==to.linkIcon}render(){const{depth:to,identifier:ro,children:no,linkIcon:oo="¶"}=this.props,io=ro==null?void 0:encodeURIComponent(ro),so="h"+to,ao=so,lo=mergeStyles$1(astClasses.heading,classes$1.heading,classes$1[so]);return jsxRuntimeExports.jsxs(ao,{id:io,className:lo,children:[jsxRuntimeExports.jsx("p",{className:classes$1.content,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:no})}),ro&&jsxRuntimeExports.jsx("a",{className:classes$1.anchor,href:"#"+io,children:oo})]})}}const anchorCls=mergeStyles$1({flex:"0 0 3rem",paddingLeft:"0.5rem",color:"var(--colorLink)",opacity:0,transition:"color 0.2s ease-in-out, opacity 0.2s ease-in-out",userSelect:"none",textDecoration:"none","> svg":{overflow:"hidden",display:"inline-block",verticalAlign:"middle",fill:"currentColor"}}),classes$1=mergeStyleSets({heading:{display:"flex",alignItems:"center",justifyContent:"flex-start",padding:"0px",margin:"0px 0px 1.25em 0px",marginBottom:"1em",lineHeight:"1.25",fontFamily:"var(--fontFamilyHeading)",color:"var(--colorHeading)",[`&:active .${anchorCls}`]:{opacity:.8,color:"var(--colorLinkActive)"},[`&&:hover .${anchorCls}`]:{opacity:.8,color:"var(--colorLinkHover)"}},anchor:anchorCls,content:{flex:"0 1 auto",minWidth:0,margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre-wrap",lineHeight:"1.7"},h1:{padding:"0.3rem 0",borderBottom:"1px solid var(--colorBorderHeading)",fontSize:"2rem",fontStyle:"normal",fontWeight:500},h2:{padding:"0.3rem 0",borderBottom:"1px solid var(--colorBorderHeading)",fontSize:"1.5rem",fontStyle:"normal",fontWeight:500,marginBottom:"0.875rem"},h3:{fontSize:"1.25rem",fontStyle:"normal",fontWeight:500},h4:{fontSize:"1rem",fontStyle:"normal",fontWeight:500},h5:{fontSize:"0.875rem",fontStyle:"normal",fontWeight:500},h6:{fontSize:"0.85rem",fontStyle:"normal",fontWeight:500}});class ImageRendererInner extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.src!==to.src||ro.alt!==to.alt||ro.title!==to.title||ro.srcSet!==to.srcSet||ro.sizes!==to.sizes||ro.loading!==to.loading||ro.className!==to.className}render(){const{src:to,alt:ro,title:no,srcSet:oo,sizes:io,loading:so,className:ao}=this.props;return jsxRuntimeExports.jsxs("figure",{className:`${ao} ${cls$7}`,children:[jsxRuntimeExports.jsx("img",{alt:ro,src:to,title:no,srcSet:oo,sizes:io,loading:so}),no&&jsxRuntimeExports.jsx("figcaption",{children:no})]})}}const cls$7=mergeStyles$1({boxSizing:"border-box",maxWidth:"80%",display:"flex",flexDirection:"column",alignItems:"center",margin:0,"> img":{flex:"1 0 auto",boxSizing:"border-box",maxWidth:"100%",border:"1px solid var(--colorBorderImage)",boxShadow:"0 0 20px 1px rgba(126, 125, 150, 0.6)"},"> figcaption":{textAlign:"center",fontStyle:"italic",fontSize:"1em",color:"var(--colorImageTitle)"}}),ImageRenderer=eo=>{const{url:to,alt:ro,title:no,srcSet:oo,sizes:io,loading:so}=eo;return jsxRuntimeExports.jsx(ImageRendererInner,{alt:ro,src:to,title:no,srcSet:oo,sizes:io,loading:so,className:astClasses.image})},ImageReferenceRenderer=eo=>{const{viewmodel:to}=useNodeRendererContext(),ro=useStateValue(to.definitionMap$),{alt:no,srcSet:oo,sizes:io,loading:so}=eo,ao=ro[eo.identifier],lo=(ao==null?void 0:ao.url)??"",uo=ao==null?void 0:ao.title;return jsxRuntimeExports.jsx(ImageRendererInner,{alt:no,src:lo,title:uo,srcSet:oo,sizes:io,loading:so,className:astClasses.imageReference})};class InlineCodeRenderer extends React.Component{shouldComponentUpdate(to){return this.props.value!==to.value}render(){return jsxRuntimeExports.jsx("code",{className:cls$6,children:this.props.value})}}const cls$6=mergeStyles$1(astClasses.inlineCode,{padding:"1px 4px",borderRadius:"4px",margin:0,background:"hsla(210deg, 15%, 60%, 0.15)",lineHeight:"1.375",color:"var(--colorInlineCode)",fontFamily:"var(--fontFamilyCode)",fontSize:"min(1rem, 18px)",fontWeight:500});class LinkRendererInner extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.url!==to.url||ro.title!==to.title||ro.childNodes!==to.childNodes||ro.className!==to.className}render(){const{url:to,title:ro,childNodes:no,className:oo}=this.props;return jsxRuntimeExports.jsx("a",{className:mergeStyles$1(cls$5,oo),href:to,title:ro,rel:"noopener, noreferrer",target:"_blank",children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:no})})}}const cls$5=mergeStyles$1({padding:"0.2rem 0",color:"var(--colorLink)",textDecoration:"none",background:"linear-gradient(90deg, hsla(358deg, 100%, 62%, 0.8), hsla(048deg, 100%, 50%, 0.8), hsla(196deg, 100%, 53%, 0.8))",backgroundSize:"0 3px",backgroundRepeat:"no-repeat",backgroundPosition:"50% 100%",transition:"all 0.3s ease-in-out","&:active":{color:"var(--colorLinkActive)"},"&&:hover":{color:"var(--colorLinkHover)",backgroundSize:"100% 3px",backgroundPositionX:0},"&:visited":{color:"var(--colorLinkVisited)"}}),LinkRenderer=eo=>{const{url:to,title:ro,children:no}=eo;return jsxRuntimeExports.jsx(LinkRendererInner,{url:to,title:ro,childNodes:no,className:astClasses.link})},LinkReferenceRenderer=eo=>{const{viewmodel:to}=useNodeRendererContext(),no=useStateValue(to.definitionMap$)[eo.identifier],oo=(no==null?void 0:no.url)??"",io=no==null?void 0:no.title;return jsxRuntimeExports.jsx(LinkRendererInner,{url:oo,title:io,childNodes:eo.children,className:astClasses.linkReference})};class ListRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return ro.ordered!==to.ordered||ro.orderType!==to.orderType||ro.start!==to.start||ro.children!==to.children}render(){const{ordered:to,orderType:ro,start:no,children:oo}=this.props;return to?jsxRuntimeExports.jsx("ol",{className:cls$4,type:ro,start:no,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:oo})}):jsxRuntimeExports.jsx("ul",{className:cls$4,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:oo})})}}const cls$4=mergeStyles$1(astClasses.list,{padding:"0px",margin:"0 0 1em 2em",lineHeight:"2","> :last-child":{marginBottom:"0px"}});class ListItemRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("li",{className:cls$3,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$3=mergeStyles$1(astClasses.listItem,{position:"relative",padding:0,margin:0,"> :last-child":{marginBottom:0}});class ParagraphRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return to.some(no=>no.type===ImageType$1||no.type===ImageReferenceType)?jsxRuntimeExports.jsx("div",{className:paragraphDisplayCls,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})}):jsxRuntimeExports.jsx("p",{className:paragraphCls,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const paragraphCls=mergeStyles$1(astClasses.paragraph,{overflow:"hidden",padding:0,margin:"0px 0px 1.25em 0px",marginBottom:"1em",lineHeight:"1.8",hyphens:"auto",wordBreak:"normal",letterSpacing:"1px",overflowWrap:"break-word","> :last-child":{marginBottom:0}}),paragraphDisplayCls=mergeStyles$1(paragraphCls,{display:"flex",alignItems:"center",justifyContent:"center",padding:"1rem 0",margin:0});class StrongRenderer extends React.Component{shouldComponentUpdate(to){return this.props.children!==to.children}render(){const to=this.props.children;return jsxRuntimeExports.jsx("strong",{className:cls$2,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:to})})}}const cls$2=mergeStyles$1(astClasses.strong,{fontWeight:600});class TableRenderer extends React.Component{shouldComponentUpdate(to){const ro=this.props;return!isEqual(ro.columns,to.columns)||!isEqual(ro.children,to.children)}render(){const{columns:to,children:ro}=this.props,no=to.map(so=>so.align??void 0),[oo,...io]=ro.map(so=>so.children.map((ao,lo)=>jsxRuntimeExports.jsx(NodesRenderer,{nodes:ao.children},lo)));return jsxRuntimeExports.jsxs("table",{className:cls$1,children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:oo.map((so,ao)=>jsxRuntimeExports.jsx(Th,{align:no[ao],children:so},ao))})}),jsxRuntimeExports.jsx("tbody",{children:io.map((so,ao)=>jsxRuntimeExports.jsx("tr",{children:so.map((lo,uo)=>jsxRuntimeExports.jsx("td",{align:no[uo],children:lo},uo))},ao))})]})}}class Th extends React.Component{constructor(to){super(to),this.ref={current:null}}shouldComponentUpdate(to){const ro=this.props;return ro.align!==to.align||ro.children!==to.children}render(){const{align:to,children:ro}=this.props;return jsxRuntimeExports.jsx("th",{ref:this.ref,align:to,children:ro})}componentDidMount(){const to=this.ref.current;to&&to.setAttribute("title",to.innerText)}componentDidUpdate(){const to=this.ref.current;to&&to.setAttribute("title",to.innerText)}}const cls$1=mergeStyles$1(astClasses.table,{display:"block",overflow:"auto",width:"max-content",maxWidth:"100%",padding:0,borderCollapse:"collapse",borderRadius:"6px",borderSpacing:"0px",border:"1px solid var(--colorBorderTable)",margin:"0 auto 1.25em",lineHeight:"1.6","> thead":{backgroundColor:"var(--colorBgTableHead)",borderBottom:"1px solid #f0f0f0",th:{padding:"0.5rem 1rem",borderLeft:"1px solid var(--colorBorderTable)",wordBreak:"normal",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:first-child":{borderLeft:"none"}}},"> tbody":{tr:{borderTop:"1px solid var(--colorBorderTable)",backgroundColor:"var(--colorBgTableOddRow)"},"tr:nth-child(2n)":{backgroundColor:"var(--colorBgTableEvenRow)"},td:{padding:"0.5rem 1rem",borderLeft:"1px solid var(--colorBorderTable)","&:first-child":{borderLeft:"none"}}}});class TextRenderer extends React.Component{shouldComponentUpdate(to){return this.props.value!==to.value}render(){return jsxRuntimeExports.jsx(React.Fragment,{children:this.props.value})}}class ThematicBreakRenderer extends React.Component{shouldComponentUpdate(){return!1}render(){return jsxRuntimeExports.jsx("hr",{className:cls})}}const cls=mergeStyles$1(astClasses.thematicBreak,{boxSizing:"content-box",display:"block",height:0,width:"100%",padding:0,border:0,borderBottom:"1px solid #dadada",outline:0,margin:"1.5em 0px"});function buildNodeRendererMap(eo){if(eo==null)return defaultNodeRendererMap;let to=!1;const ro={};for(const[no,oo]of Object.entries(eo))oo&&oo!==defaultNodeRendererMap[no]&&(to=!0,ro[no]=oo);return to?{...defaultNodeRendererMap,...ro}:defaultNodeRendererMap}const defaultNodeRendererMap={[BlockquoteType]:BlockquoteRenderer,[BreakType]:BreakRenderer,[CodeType]:CodeRenderer,[DefinitionType]:()=>null,[DeleteType]:DeleteRenderer,[EmphasisType]:EmphasisRenderer,[HeadingType]:HeadingRenderer,[HtmlType]:()=>null,[ImageType$1]:ImageRenderer,[ImageReferenceType]:ImageReferenceRenderer,[InlineCodeType]:InlineCodeRenderer,[LinkType]:LinkRenderer,[LinkReferenceType]:LinkReferenceRenderer,[ListType]:ListRenderer,[ListItemType]:ListItemRenderer,[ParagraphType$1]:ParagraphRenderer,[StrongType]:StrongRenderer,[TableType]:TableRenderer,[TextType$1]:TextRenderer,[ThematicBreakType]:ThematicBreakRenderer,_fallback:function eo(to,ro){return console.warn(`Cannot find render for \`${to.type}\` type node with key \`${ro}\`:`,to),null}},ReactMarkdown=eo=>{const{presetDefinitionMap:to,customizedRendererMap:ro,preferCodeWrap:no=!1,showCodeLineno:oo=!0,text:io,themeScheme:so="lighten",className:ao,style:lo}=eo,uo=React.useMemo(()=>parser$1.parse(io),[io]),co=React.useMemo(()=>calcDefinitionMap(uo).definitionMap,[uo]),[fo]=React.useState(()=>new ReactMarkdownViewModel({definitionMap:{...to,...co},rendererMap:buildNodeRendererMap(ro),preferCodeWrap:no,showCodeLineno:oo,themeScheme:so})),ho=React.useMemo(()=>({viewmodel:fo}),[fo]),po=mergeClasses(rootCls,so==="darken"&&astClasses.rootDarken,ao);return React.useEffect(()=>{fo.preferCodeWrap$.next(no)},[fo,no]),React.useEffect(()=>{fo.showCodeLineno$.next(oo)},[fo,oo]),React.useEffect(()=>{fo.themeScheme$.next(so)},[fo,so]),jsxRuntimeExports.jsx("div",{className:po,style:lo,children:jsxRuntimeExports.jsx(NodeRendererContextType.Provider,{value:ho,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:uo.children})})})},rootCls=mergeStyles$1(astClasses.root,{wordBreak:"break-all",userSelect:"unset",[astClasses.listItem]:{[`> ${astClasses.list}`]:{marginLeft:"1.2em"}},"> :last-child":{marginBottom:0}}),BasicViewer=({styles:eo,showEmpty:to,emptyRender:ro,previewRender:no,rawRender:oo,headerRender:io})=>{const so=useClasses$k(),[ao,lo]=reactExports.useState("preview"),uo=reactExports.useCallback(fo=>{lo(fo)},[]),co=useLocStrings();return to?ro?ro():jsxRuntimeExports.jsx(MessageBar,{intent:"info",children:co["No content"]}):jsxRuntimeExports.jsxs("div",{className:eo==null?void 0:eo.root,children:[oo&&jsxRuntimeExports.jsxs("div",{className:so.header,children:[jsxRuntimeExports.jsx("div",{style:{flex:1,overflow:"hidden"},children:io==null?void 0:io()}),jsxRuntimeExports.jsx("div",{className:so.groupWrapper,children:jsxRuntimeExports.jsxs("div",{className:so.buttonGroup,children:[jsxRuntimeExports.jsx(Button$2,{value:"preview",size:"small",appearance:ao==="preview"?void 0:"transparent",onClick:()=>uo("preview"),children:co.Preview}),jsxRuntimeExports.jsx(Button$2,{value:"raw",size:"small",appearance:ao==="raw"?void 0:"transparent",onClick:()=>uo("raw"),children:co.Raw})]})})]}),ao==="preview"||!oo?no():null,ao==="raw"&&oo?oo():null]})},useClasses$k=makeStyles({header:{display:"flex",alignItems:"center",marginBottom:"12px"},groupWrapper:{display:"flex",flexDirection:"row-reverse"},buttonGroup:{display:"inline-flex",...shorthands.borderRadius("5px"),backgroundColor:tokens.colorNeutralBackground5}}),MarkdownViewer=({content:eo})=>{const to=useStyles$g();return jsxRuntimeExports.jsx(BasicViewer,{styles:to,showEmpty:!eo,previewRender:()=>jsxRuntimeExports.jsx(ReactMarkdown,{text:`${eo}`}),rawRender:()=>jsxRuntimeExports.jsx("div",{style:{marginTop:6},children:`${eo}`})})},useStyles$g=makeStyles({root:{wordBreak:"break-all",whiteSpace:"break-spaces",...shorthands.overflow("auto")}}),EmbeddingNodeInfo=()=>{var lo,uo,co;const eo=useSelectedSpan(),to=((lo=eo==null?void 0:eo.attributes)==null?void 0:lo["llm.response.model"])??((uo=eo==null?void 0:eo.attributes)==null?void 0:uo["embedding.model"]),ro=useLocStrings(),[no,oo]=reactExports.useState(ViewStatus.loading),io=useLoadSpanEvents(eo,BuildInEventName["embedding.embeddings"]),so=useSpanEventsWithPayload(eo,BuildInEventName["embedding.embeddings"]);let ao=JSON.parse(((co=eo==null?void 0:eo.attributes)==null?void 0:co["embedding.embeddings"])??"[]")??[];return so.length>0&&(ao=so.map(fo=>(fo==null?void 0:fo.attributes)??[]).flat()),reactExports.useEffect(()=>{io({onCompleted:fo=>{oo(fo?ViewStatus.error:ViewStatus.loaded)}})},[]),no===ViewStatus.loading?jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh"},children:jsxRuntimeExports.jsx(Spinner,{size:"tiny"})}):no===ViewStatus.error?jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh",textAlign:"center"},children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{oo(ViewStatus.loading),io({onCompleted:fo=>{oo(fo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("span",{children:to})}),ao.map((fo,ho)=>jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("i",{children:ro.Embedded_text})}),fo["embedding.text"]?jsxRuntimeExports.jsx(MarkdownViewer,{content:fo["embedding.text"]}):null]},ho))]})},CollapsibleTextArea=({children:eo})=>{const[to,ro]=reactExports.useState(!0),no=useClasses$j();return jsxRuntimeExports.jsxs("div",{className:no.wrapper,children:[jsxRuntimeExports.jsx(Button$2,{icon:to?jsxRuntimeExports.jsx(TextWrapOff16Regular,{}):jsxRuntimeExports.jsx(TextWrap16Regular,{}),onClick:()=>ro(!to),size:"small"}),jsxRuntimeExports.jsx("pre",{className:`${to&&no.wrap} ${no.pre}`,children:eo})]})},useClasses$j=makeStyles({wrapper:{width:"95%",height:"100%",paddingLeft:tokens.spacingHorizontalM,color:tokens.colorNeutralForeground1,display:"flex",flexDirection:"column"},wrap:{wordBreak:"break-all",whiteSpace:"pre-wrap"},pre:{marginTop:0}}),ErrorsTab=()=>{var lo;const eo=useClasses$i(),to=useSelectedSpan(),ro=((lo=to==null?void 0:to.events)==null?void 0:lo.filter(uo=>uo.name===BuildInEventName.exception))??[],no=useIsDark(),oo=useLocStrings(),[io,so]=reactExports.useState(ViewStatus.loading),ao=useLoadSpanEvents(to,BuildInEventName.exception);return reactExports.useEffect(()=>{ao({onCompleted:uo=>{so(uo?ViewStatus.error:ViewStatus.loaded)}})},[]),ro.length===0?jsxRuntimeExports.jsxs("div",{className:eo.emptyWrapper,children:[jsxRuntimeExports.jsx(ShieldCheckmark24Regular,{}),jsxRuntimeExports.jsxs(Text$2,{className:eo.emptyText,children:[" ",oo.No_Exception_found]})]}):io===ViewStatus.loading?jsxRuntimeExports.jsx("div",{className:eo.emptyWrapper,children:jsxRuntimeExports.jsx(Spinner,{size:"tiny"})}):io===ViewStatus.error?jsxRuntimeExports.jsx("div",{className:eo.emptyWrapper,children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{so(ViewStatus.loading),ao({onCompleted:uo=>{so(uo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ro.map((uo,co)=>jsxRuntimeExports.jsx(Card,{className:eo.wrapper,children:jsxRuntimeExports.jsx(JsonViewer,{src:uo,collapseStringsAfterLength:1e4,theme:"vscode",dark:no,customizeNode:({node:fo,indexOrName:ho})=>{if(ho==="exception.message"||ho==="exception.stacktrace")return jsxRuntimeExports.jsx(CollapsibleTextArea,{children:fo})}})},co))})},useClasses$i=makeStyles({wrapper:{marginBottom:tokens.spacingVerticalM},emptyWrapper:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},emptyText:{paddingTop:tokens.spacingVerticalM}}),useEvaluationTracesListRow=eo=>{const[to,ro]=reactExports.useState([]),no=reactExports.useMemo(()=>{const ao={};return eo.forEach(lo=>{var uo;(uo=lo==null?void 0:lo.context)!=null&&uo.span_id&&(ao[lo.context.span_id]={...lo,children:[],depth:0})}),eo.forEach(lo=>{var uo;if(lo.parent_id&&((uo=lo==null?void 0:lo.context)!=null&&uo.span_id)&&lo.parent_id!==""){const co=ao[lo.parent_id],fo=ao[lo.context.span_id];fo.depth=co.depth+1,co.children.push(fo)}}),Object.values(ao).filter(lo=>!lo.parent_id)},[eo]),oo=reactExports.useCallback(ao=>{if(to.includes(ao)){const uo=findRowById(ao,no);if(!uo)return;const fo=(uo.children?findAllDescendants(uo):[]).map(po=>{var go;return(go=po==null?void 0:po.context)==null?void 0:go.span_id}).filter(po=>po!==void 0),ho=to.filter(po=>po!==ao).filter(po=>!fo.includes(po));ro(ho)}else ro([...to,ao])},[to,no]),io=reactExports.useMemo(()=>{const ao=lo=>lo.reduce((uo,co)=>{var po,go;const ho=((po=co==null?void 0:co.context)!=null&&po.span_id?to.includes((go=co==null?void 0:co.context)==null?void 0:go.span_id):!1)?ao(co.children):[];return[...uo,co,...ho]},[]);return ao(no)},[to,no]),so=reactExports.useCallback(ao=>ao?to.includes(ao):!1,[to]);return{rows:io,toggleSubRows:oo,isRowExpanded:so}},findAllDescendants=eo=>{let to=[...eo.children];return eo.children.forEach(ro=>{to=[...to,...findAllDescendants(ro)]}),to},findRowById=(eo,to)=>{var ro;for(const no of to){if(((ro=no==null?void 0:no.context)==null?void 0:ro.span_id)===eo)return no;const oo=findRowById(eo,no.children);if(oo)return oo}return null},CellExpander=({isExpanded:eo=!1,onToggle:to})=>{const ro=useClasses$h();return jsxRuntimeExports.jsx("div",{className:ro.wrapper,onClick:()=>to&&to(!eo),children:eo?jsxRuntimeExports.jsx(ChevronDown16Filled,{}):jsxRuntimeExports.jsx(ChevronRight16Filled,{})})},useClasses$h=makeStyles({wrapper:{cursor:"pointer",display:"flex"}}),UNDEFINED_VALUE_PLACEHOLDER="N/A",TRACE_POLLING_GAP=6e4,RUNNING_TRACE_POLLING_GAP=3e4,SPAN_POLLING_GAP=3e4,LOCAL_URL_PREFIX="";function KindText({kind:eo}){return jsxRuntimeExports.jsx(Badge$2,{appearance:"outline",size:"medium",children:eo||UNDEFINED_VALUE_PLACEHOLDER})}function TimeText({time:eo}){const to=timeFormat(eo);return jsxRuntimeExports.jsx("time",{children:to})}const CellWrapper=({children:eo})=>{const to=useClasses$g();return jsxRuntimeExports.jsx("div",{className:to.cellWrapper,children:eo})},TextCellWrapper=({children:eo})=>{const to=useClasses$g();return jsxRuntimeExports.jsx("div",{className:to.textCellWrapper,children:jsxRuntimeExports.jsx("p",{className:to.textCellP,children:eo})})},CellSkeleton=({height:eo})=>{const to=useClasses$g();return jsxRuntimeExports.jsx(Skeleton,{className:to.textCellWrapper,children:jsxRuntimeExports.jsx(SkeletonItem,{style:{height:`${eo??20}px`}})})},useClasses$g=makeStyles({cellWrapper:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%"},textCellWrapper:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%",width:"100%"},textCellP:{wordWrap:"break-word",maxWidth:"100%",lineHeight:tokens.lineHeightBase200,fontSize:tokens.fontSizeBase300,maxHeight:"100%",whiteSpace:"normal",...shorthands.padding(tokens.spacingVerticalS,tokens.spacingHorizontalXS)}}),isValidJson=eo=>{if(typeof eo=="string")return!1;try{return JSON.stringify(eo),!0}catch{return!1}},TraceListJsonCell=({jsonObject:eo,isViewDetailEnabled:to=!1})=>{const ro=isValidJson(eo);return jsxRuntimeExports.jsx(CellWrapper,{children:ro?jsxRuntimeExports.jsx(TraceListObjectCell,{object:eo,isViewDetailEnabled:to}):jsxRuntimeExports.jsx(TextCellWrapper,{children:formatText(String(eo))})})},TraceListObjectCell=({object:eo,isViewDetailEnabled:to})=>{const ro=useIsDark();return to?jsxRuntimeExports.jsxs(Dialog,{children:[jsxRuntimeExports.jsx(DialogTrigger,{children:jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",height:"100%",width:"100%",marginTop:"12px",lineHeight:"16px"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!1,collapsed:1,dark:ro,theme:"vscode"})})}),jsxRuntimeExports.jsx(DialogSurface,{children:jsxRuntimeExports.jsx("div",{style:{height:"800px",width:"800ppx",marginTop:"12px",lineHeight:"16px",overflow:"auto"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!0,collapseStringsAfterLength:200,dark:ro,theme:"vscode"})})})]}):jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",height:"100%",width:"100%",marginTop:"12px",lineHeight:"16px"},children:jsxRuntimeExports.jsx(JsonViewer,{src:eo,enableClipboard:!1,collapseStringsAfterLength:50,collapsed:1,dark:ro,theme:"vscode"})})},MAX_LENGTH=80;function formatText(eo){return eo.length>MAX_LENGTH?`${eo.slice(0,MAX_LENGTH)}...`:eo}const useClasses$f=makeStyles({grid:{},row:{cursor:"pointer"},nameCell:{color:tokens.colorBrandForeground1,fontWeight:tokens.fontWeightSemibold,":hover":{...shorthands.textDecoration("underline")}},kindCell:{display:"flex",alignItems:"center",justifyContent:"flex-start",height:"100%",...shorthands.gap("4px")}}),EvaluationTracesList=({evaluationSpans:eo,className:to})=>{const ro=useClasses$f(),no=useIsDark(),{rows:oo,toggleSubRows:io,isRowExpanded:so}=useEvaluationTracesListRow(eo),ao=useLocStrings(),lo=useSetSelectedEvaluationTraceId();return jsxRuntimeExports.jsx(DataGrid$1$1,{className:`${mergeStyles$1(ro.grid,to)} ${no?"rdg-dark":"rdg-light"}`,rowClass:()=>ro.row,columns:[{key:"kind",name:ao.Kind,minWidth:150,maxWidth:300,renderCell:({row:uo})=>{var fo,ho,po;const co=((fo=uo==null?void 0:uo.children)==null?void 0:fo.length)>0;return jsxRuntimeExports.jsxs("div",{className:ro.kindCell,style:{paddingLeft:uo.depth*16+(co?0:20)},children:[co&&jsxRuntimeExports.jsx(CellExpander,{isExpanded:so((ho=uo==null?void 0:uo.context)==null?void 0:ho.span_id),onToggle:()=>{var go,vo;(go=uo==null?void 0:uo.context)!=null&&go.span_id&&io((vo=uo==null?void 0:uo.context)==null?void 0:vo.span_id)}}),jsxRuntimeExports.jsx(KindText,{kind:(po=uo.attributes)==null?void 0:po.span_type})]})}},{key:"name",name:ao.Name,minWidth:150,maxWidth:300,renderCell:({row:uo})=>jsxRuntimeExports.jsx(Tooltip,{content:uo.name??"",relationship:"label",children:jsxRuntimeExports.jsx(Link$1,{className:ro.nameCell,title:uo.name,onClick:()=>{var co;lo((co=uo.context)==null?void 0:co.trace_id)},children:uo.name})})},{key:"input",name:ao.Input,minWidth:200,renderCell:({row:uo})=>jsxRuntimeExports.jsx(TraceListJsonCell,{isViewDetailEnabled:!0,jsonObject:getSpanEventPayload(uo,BuildInEventName["function.inputs"])??{}})},{key:"output",name:ao.Output,minWidth:200,renderCell:({row:uo})=>jsxRuntimeExports.jsx(TraceListJsonCell,{isViewDetailEnabled:!0,jsonObject:getSpanEventPayload(uo,BuildInEventName["function.output"])??{}})},{key:"start_time",name:ao.Start_time,minWidth:150,renderCell:({row:uo})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:uo.start_time})})},{key:"end_time",name:ao.End_time,minWidth:150,renderCell:({row:uo})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:uo.end_time})})},{key:"latency",name:ao.Latency,minWidth:120,renderCell:({row:uo})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:uo.start_time,endTimeISOString:uo.end_time})})},{key:"total_tokens",name:ao.Total_tokens,minWidth:120,renderCell:({row:uo})=>{var co;return jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(TokenText,{token:Number.parseInt(((co=uo.attributes)==null?void 0:co["__computed__.cumulative_token_count.total"])??"0")})})}},{key:"status",name:ao.Status,minWidth:120,renderCell:({row:uo})=>{var co;return jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(StatusText,{statusCode:(co=uo.status)==null?void 0:co.status_code})})}}],rows:oo,headerRowHeight:26,rowHeight:80,defaultColumnOptions:{resizable:!0}})},EvaluationsTab=()=>{var lo,uo,co;const eo=useClasses$e(),to=useEvaluationSpansOfSelectedSpan(),[ro,no]=reactExports.useState((lo=to[0])==null?void 0:lo.evaluationName),oo=((uo=to.find(fo=>fo.evaluationName===ro))==null?void 0:uo.evaluationTraces)??[],io=useSelectedTrace(),so=(io==null?void 0:io.evaluations)??{},ao=((co=so[ro??""])==null?void 0:co.outputs)??{};return jsxRuntimeExports.jsxs(Card,{style:{height:"100%"},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx(TabList,{selectedValue:ro,onTabSelect:(fo,ho)=>{no(ho.value)},children:to.map(fo=>jsxRuntimeExports.jsx(Tab$1,{value:fo.evaluationName,children:fo.evaluationName},fo.evaluationName))})}),jsxRuntimeExports.jsxs("div",{className:eo.wrapper,children:[ro&&so[ro]&&Object.keys(ao).map(fo=>{const ho=ao[fo];return ho?jsxRuntimeExports.jsx(MetricTag,{tag:{name:fo,value:ho}},fo):null}),jsxRuntimeExports.jsx(EvaluationTracesList,{evaluationSpans:oo,className:eo.grid})]})]})},useClasses$e=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%",...shorthands.gap("8px")},grid:{flexGrow:1}}),LLMNodeInvocationParametersTab=()=>{var vo,bo;const eo=useSelectedSpan(),to=useParentSpanOfSelectedSpan(),ro=to==null?void 0:to.attributes,no=useSpanEventsWithPayload(to,BuildInEventName["prompt.template"])[0],oo=no?(vo=no.attributes)==null?void 0:vo["prompt.variables"]:JSON.parse((ro==null?void 0:ro["prompt.variables"])??"{}"),so=useSpanEventsWithPayload(eo,BuildInEventName["function.inputs"])[0]??JSON.parse(((bo=eo==null?void 0:eo.attributes)==null?void 0:bo.inputs)??"{}"),ao=Object.keys(oo??{}),lo={};Object.keys(so).forEach(xo=>{xo!=="messages"&&(ao.includes(xo)||(lo[xo]=so[xo]))});const[uo,co]=reactExports.useState(ViewStatus.loading),fo=useLoadSpanEvents(eo,BuildInEventName["prompt.template"]),[ho,po]=reactExports.useState(ViewStatus.loading),go=useLoadSpanEvents(eo,BuildInEventName["function.inputs"]);return reactExports.useEffect(()=>{fo({onCompleted:xo=>{co(xo?ViewStatus.error:ViewStatus.loaded)}}),go({onCompleted:xo=>{po(xo?ViewStatus.error:ViewStatus.loaded)}})},[]),uo===ViewStatus.loading||ho===ViewStatus.loading?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Spinner,{})}):uo===ViewStatus.error||ho===ViewStatus.error?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{co(ViewStatus.loading),fo({onCompleted:xo=>{co(xo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0}),po(ViewStatus.loading),go({onCompleted:xo=>{po(xo?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(LLMNodeInvocationParameters,{invocationParameters:lo})},LLMNodeInvocationParameters=({invocationParameters:eo})=>{const to=useIsDark();return jsxRuntimeExports.jsx(JsonViewer,{src:eo,theme:"vscode",dark:to})};var ChatMessageCategory=(eo=>(eo.System="system",eo.Error="error",eo.Chatbot="chatbot",eo.User="user",eo))(ChatMessageCategory||{}),ChatMessageType=(eo=>(eo.Message="message",eo.SessionSplit="session-split",eo))(ChatMessageType||{}),CopyStatus=(eo=>(eo[eo.PENDING=0]="PENDING",eo[eo.COPYING=1]="COPYING",eo[eo.COPIED=2]="COPIED",eo[eo.FAILED=3]="FAILED",eo))(CopyStatus||{}),ChatboxLocator=(eo=>(eo.MessageBubble="chatbox-message-bubble",eo.MessageContent="chatbox-message-content",eo.MessageList="chatbox-message-list",eo.MessageActionBar="chatbox-message-action-bar",eo))(ChatboxLocator||{}),ChatboxSelector=(eo=>(eo.MessageBubble='[data-chatbox-locator="chatbox-message-bubble"]',eo.MessageContent='[data-chatbox-locator="chatbox-message-content"]',eo.MessageList='[data-chatbox-locator="chatbox-message-list"]',eo.MessageActionBar='[data-chatbox-locator="chatbox-message-action-bar"]',eo))(ChatboxSelector||{});const defaultLocStrings$1={CopyToClipboard:"Copy to clipboard",CopyToClipboard_Copying:"Copying...",CopyToClipboard_Copied:"Copied!",CopyToClipboard_Failed:"Failed!",Header_Clear:"Click to clear all chat histories",Header_Close:"Click to close chat box",Header_EnterFullScreen:"Click to enter full screen mode",Header_ExitFullScreen:"Click to exit full screen mode",Header_Title:"Chat",Input_Placeholder:"Input anything to test...",MessageError_HideDetail:"Hide Detail",MessageError_ShowDetail:"Show Detail",MessageStatus_TimeSpentDesc:"time spent",MessageStatus_TimeSpentDscCapitalized:"Time spent",MessageStatus_TimeSpent_Unit:"sec",MessageStatus_TokensDesc:"Total tokens for generating this",MessageStatus_TokensUint:"tokens",SessionSplit_Desc:"Your session start from here.",Tooltip_Bottom:"Only default variants will be used for chat, if you want to test variants please try bulk test. For chatbot and test app bot, it will only show the chat output.",Tooltip_TotalTokens:"Total tokens",Typing:"Generating chat output for you"};class ChatboxViewModel{constructor(to){this.calcContentForCopy=fo=>this.calcContentForCopy$.getSnapshot()(fo),this.monitorInputContentChange=fo=>this.inputContentChangeTick$.subscribeStateChange(fo),this.notifyInputContentChange=()=>{this.inputContentChangeTick$.setState(fo=>fo+1)},this.sendMessage=fo=>{const ho=this.editorRef.current;if(!ho){console.log("!!!editorRef is not mounted.");return}const po=fo??ho.getContent(),go=this.sendMessage$.getSnapshot(),bo=this.makeUserMessage$.getSnapshot()(po);this.messages$.setState(xo=>[...xo,bo]),ho.clear(),this.isOthersTyping$.next(!0),go(po,this,bo).then(xo=>{xo!==void 0&&this.messages$.setState(_o=>[..._o,xo])}).finally(()=>{this.isOthersTyping$.next(!1)})},this.setCalcContentForCopy=fo=>{this.calcContentForCopy$.next(fo)},this.setMakeUserMessage=fo=>{this.makeUserMessage$.next(fo)},this.setSendMessage=fo=>{this.sendMessage$.next(fo)},this.sessionSplit=fo=>{const ho={id:uuid_1.v4(),type:ChatMessageType.SessionSplit,history:[{category:ChatMessageCategory.System,from:"system",content:fo??"",timestamp:new Date().toISOString()}]};return this.messages$.setState(po=>[...po,ho]),ho};const{alias:ro="",initialDisabled:no=!1,initialMessages:oo=[],locStrings:io=defaultLocStrings$1,calcContentForCopy:so=fo=>typeof fo.content=="string"?fo.content:JSON.stringify(fo.content),makeUserMessage:ao=fo=>({id:uuid_1.v4(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.User,from:this.alias$.getSnapshot(),timestamp:new Date().toISOString(),content:fo}]}),sendMessage:lo=async fo=>({id:uuid_1.v4(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.Chatbot,from:"chatbot",timestamp:new Date().toISOString(),content:fo}]})}=to;this.editorRef={current:null};const uo=new State(0),co=Computed.fromObservables([uo],()=>{var fo;return(fo=this.editorRef.current)==null?void 0:fo.isEmpty()});this.alias$=new State(ro),this.disabled$=new State(no),this.inputContentChangeTick$=uo,this.isEditorEmpty$=co,this.isOthersTyping$=new State(!1),this.locStrings$=new State(io),this.messages$=new State(oo),this.calcContentForCopy$=new State(so),this.makeUserMessage$=new State(ao),this.sendMessage$=new State(lo)}}const viewmodel=new ChatboxViewModel({sendMessage:()=>Promise.resolve({id:Date.now(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.System,from:"system",timestamp:new Date().toISOString(),content:"sendMessage not implemented!"}]})});React.createContext({viewmodel});function useEventCallback$1(eo){const to=reactExports.useRef(eo);return reactExports.useLayoutEffect(()=>{to.current=eo}),reactExports.useCallback((...ro)=>{const no=to.current;return no(...ro)},[])}function useCopyAction(eo,to){const[ro,no]=React.useState(CopyStatus.PENDING),oo=useEventCallback$3(so=>{if(ro===CopyStatus.PENDING){no(CopyStatus.COPYING);try{const ao=to(so);copy$2(ao),no(CopyStatus.COPIED)}catch{no(CopyStatus.FAILED)}}});return React.useEffect(()=>{if(ro===CopyStatus.COPIED||ro===CopyStatus.FAILED){let so=setTimeout(()=>{so=void 0,no(CopyStatus.PENDING)},1500);return()=>{so&&clearTimeout(so)}}},[ro]),React.useMemo(()=>({key:"copy",group:2,icon:ro===CopyStatus.PENDING?jsxRuntimeExports.jsx(Copy20Regular,{}):jsxRuntimeExports.jsx(CopyArrowRight20Regular,{}),tooltip:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:eo.CopyToClipboard}),disabled:ro!==CopyStatus.PENDING,onClick:oo,condition:so=>so.category===ChatMessageCategory.Chatbot||so.category===ChatMessageCategory.User||so.category===ChatMessageCategory.Error}),[eo,ro,oo])}makeStyles({copyButton:{cursor:"pointer"}});const defaultUploadPopoverLocStrings={Add:"Add",AddAnImage:"Add an image",PasteImageOrLinkHere:"Paste image or link here",UploadFromThisDevice:"Upload from this device"},ImageView=eo=>{const{src:to,alt:ro,loading:no=!1,width:oo,height:io,styles:so}=eo;return to?no?jsxRuntimeExports.jsx("div",{children:"Loading..."}):jsxRuntimeExports.jsx("div",{className:so==null?void 0:so.root,children:jsxRuntimeExports.jsx("img",{className:so==null?void 0:so.image,src:to,alt:ro,width:oo,height:io})}):jsxRuntimeExports.jsx("div",{children:"This image can not be previewed."})},ImageViewModal=eo=>{const{src:to,alt:ro,visible:no,loading:oo=!1,width:io,height:so,onDismiss:ao}=eo,lo=useStyles$f(),uo=jsxRuntimeExports.jsxs("div",{className:lo.container,children:[jsxRuntimeExports.jsxs("div",{className:lo.header,children:[jsxRuntimeExports.jsx("h2",{className:lo.heading,children:"Preview"}),jsxRuntimeExports.jsx(Button$2,{as:"button",appearance:"transparent",icon:jsxRuntimeExports.jsx(Dismiss24Regular,{}),className:lo.dismissBtn,onClick:ao})]}),jsxRuntimeExports.jsx("div",{className:lo.main,children:jsxRuntimeExports.jsx(ImageView,{src:to,alt:ro,loading:oo,width:io,height:so,styles:{image:lo.image}})})]});return jsxRuntimeExports.jsx(Modal,{isOpen:no,isBlocking:!1,onDismiss:ao,children:uo})},useStyles$f=makeStyles({container:{display:"flex",flexDirection:"column",flexWrap:"nowrap",...shorthands.padding("16px")},header:{...shorthands.flex(0,0,"auto"),display:"flex",flexDirection:"row",flexWrap:"nowrap",justifyContent:"space-between",marginBottom:"20px"},heading:{...shorthands.margin(0),fontWeight:FontWeights.semibold,fontSize:"inherit"},dismissBtn:{"&&":{fontSize:"16px",lineHeight:"16px",height:"16px",width:"16px",color:tokens.colorNeutralStroke1}},main:{...shorthands.overflow("auto"),display:"flex",justifyContent:"center",alignItems:"center"},image:{width:"auto",height:"auto",maxWidth:"60vw",maxHeight:"60vh"}}),IMAGE_WIDTH="48px",MASK_SELECTOR_CLASS_NAME="__MASK_SELECTOR_CLASS_NAME__",UploadPopoverImagePreview=eo=>{const{image:to,alt:ro,isReadonly:no,onClickDelete:oo}=eo,[io,so]=React.useState(!1),ao=useStyles$e(),lo=React.useMemo(()=>{if(to)return typeof to=="string"?to:URL.createObjectURL(to)},[to]),uo=React.useCallback(()=>{so(fo=>!fo)},[]),co=lo||"";return jsxRuntimeExports.jsxs("div",{className:mergeClasses(ao.root,no?ao.readonlyRoot:void 0),children:[jsxRuntimeExports.jsxs("div",{className:ao.imageContainer,children:[jsxRuntimeExports.jsx("img",{decoding:"async",className:ao.image,src:co,alt:ro}),jsxRuntimeExports.jsx("div",{"aria-hidden":!0,className:mergeClasses(ao.mask,MASK_SELECTOR_CLASS_NAME),onClick:uo,role:"button",children:jsxRuntimeExports.jsx(ZoomIn20Regular,{})})]}),!no&&jsxRuntimeExports.jsx(Button$2,{as:"button",className:ao.closeButton,icon:jsxRuntimeExports.jsx(Dismiss20Regular,{}),onClick:oo}),jsxRuntimeExports.jsx(ImageViewModal,{src:co,alt:ro||"",visible:io,onDismiss:uo})]})},useStyles$e=makeStyles({root:{boxSizing:"border-box",display:"flex",height:"32px",width:"80px",...shorthands.border("1px","solid",tokens.colorNeutralStroke2),...shorthands.borderRadius("4px")},readonlyRoot:{width:"48px"},imageContainer:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:IMAGE_WIDTH,[`:hover .${MASK_SELECTOR_CLASS_NAME}`]:{visibility:"visible"}},image:{maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto"},mask:{visibility:"hidden",cursor:"pointer",position:"absolute",top:0,left:0,width:`calc(${IMAGE_WIDTH} - 2px)`,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",color:tokens.colorNeutralForegroundStaticInverted,...shorthands.borderRadius("4px",0,0,"4px")},closeButton:{width:"32px",...shorthands.border(0)}}),UploadPopoverTrigger=React.forwardRef((eo,to)=>jsxRuntimeExports.jsx(Button$2,{...eo,ref:to,as:"button",appearance:"transparent",size:"medium",icon:jsxRuntimeExports.jsx(Attach16Regular,{})}));UploadPopoverTrigger.displayName="UploadPopoverTrigger";const mergeStyleSlots=(eo,...to)=>{const ro={...eo};for(const no of Object.keys(eo))ro[no]=mergeClasses(eo[no],...to.map(oo=>oo==null?void 0:oo[no]));return ro},UploadPopover=React.forwardRef(({isUploading:eo,disabled:to,trigger:ro=jsxRuntimeExports.jsx(UploadPopoverTrigger,{}),locStrings:no=defaultUploadPopoverLocStrings,styles:oo,events:io,onUpload:so,onRenderImagePreview:ao},lo)=>{const uo=mergeStyleSlots(useStyles$d(),oo),{onDelete:co,onInputBlur:fo,onPaste:ho,onLocalUpload:po}=io??{};React.useImperativeHandle(lo,()=>({open(){vo(!0)},close(){vo(!1)},reset:()=>{wo()},retrieve:()=>_o}));const[go,vo]=React.useState(!1),[bo,xo]=React.useState(""),[_o,Eo]=React.useState(void 0),So=React.useRef(null),To=React.useCallback((Mo,Do)=>{vo(Do.open||!1)},[]),wo=React.useCallback(()=>{xo(""),Eo(void 0),So.current&&(So.current.value="")},[]),Co=React.useCallback(Mo=>{const Do=Mo[0];Eo(Do),ho==null||ho(Do)},[ho]),Oo=React.useCallback(Mo=>{Mo.clipboardData.files&&Co&&Co(Mo.clipboardData.files)},[Co]),Ao=React.useCallback(()=>{fo==null||fo(bo),Eo(bo)},[bo,fo]),Ro=React.useCallback(()=>{_o&&so(_o)},[_o,so]),No=React.useMemo(()=>ao?ao({cachedImage:_o,customerInputContent:bo,isReadonly:to||eo||!1}):jsxRuntimeExports.jsx(UploadPopoverImagePreview,{image:_o||bo,alt:bo||"",isReadonly:eo,onClickDelete:()=>{wo(),co==null||co()}}),[bo,_o,wo,to,eo,co,ao]);return jsxRuntimeExports.jsxs(Popover,{positioning:"above-end",open:go,onOpenChange:To,children:[jsxRuntimeExports.jsx(PopoverTrigger,{disableButtonEnhancement:!0,children:ro}),jsxRuntimeExports.jsxs(PopoverSurface,{className:uo.attachUploadPopover,children:[jsxRuntimeExports.jsxs("div",{className:uo.attachUploadHeader,children:[jsxRuntimeExports.jsx("span",{children:no.AddAnImage}),jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:to,appearance:"transparent",icon:jsxRuntimeExports.jsx(Dismiss24Regular,{}),onClick:()=>{vo(!1)}})]}),jsxRuntimeExports.jsxs("div",{className:uo.attachUploadInputWrapper,children:[_o?No:jsxRuntimeExports.jsx(Input,{className:uo.attachUploadInput,value:bo,disabled:to,placeholder:no.PasteImageOrLinkHere,onChange:(Mo,Do)=>{Eo(void 0),xo(Do.value)},onPaste:Oo,onBlur:Ao}),jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:to||eo||!_o&&!bo,className:uo.addButton,onClick:Ro,children:eo?jsxRuntimeExports.jsx(Spinner,{size:"tiny"}):no.Add})]}),jsxRuntimeExports.jsx("input",{tabIndex:-1,"aria-hidden":!0,ref:So,disabled:to,className:uo.invisibleFileInput,onChange:Mo=>{var jo;const Do=(jo=Mo.target.files)==null?void 0:jo[0];Do&&(po==null||po(Do)),Eo(Do)},type:"file",accept:"image/*"}),jsxRuntimeExports.jsx("div",{className:uo.triggerUploadButton,children:jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:to,appearance:"transparent",icon:jsxRuntimeExports.jsx(ArrowUpload24Regular,{}),onClick:()=>{var Mo;(Mo=So.current)==null||Mo.click()},children:no.UploadFromThisDevice})})]})]})});UploadPopover.displayName="UploadPopover";const useStyles$d=makeStyles({attachUploadPopover:{width:"400px",backgroundColor:tokens.colorNeutralBackground1,...shorthands.padding("12px")},attachUploadHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontWeight:500,fontSize:"16px",lineHeight:"22px"},attachUploadInputWrapper:{marginTop:"8px",display:"flex",columnGap:"8px",justifyContent:"space-between"},attachUploadInput:{flexGrow:1},addButton:{minWidth:"52px"},invisibleFileInput:{display:"none"},triggerUploadButton:{marginTop:"8px",display:"flex",justifyContent:"space-between"}});function DefaultMessageContentRenderer(eo){const{content:to,className:ro}=eo,no=useStyles$c(),oo=mergeClasses(no.content,ro);if(typeof to=="string")return jsxRuntimeExports.jsx("p",{className:oo,children:to});const io=JSON.stringify(to,null,2);return jsxRuntimeExports.jsx("pre",{className:oo,children:io})}DefaultMessageContentRenderer.displayName="DefaultMessageContentRenderer";const useStyles$c=makeStyles({content:{...shorthands.overflow("auto"),wordBreak:"break-all",whiteSpace:"break-spaces"}});function DefaultMessageErrorRenderer(eo){const{error:to,locStrings:ro,className:no}=eo,[oo,io]=React.useState(!1),so=useStyles$b(),ao=mergeClasses(so.errorMessageDetail,!oo&&so.errorMessageDetailHidden,no);return jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(Link$1,{onClick:()=>io(lo=>!lo),children:oo?ro.MessageError_HideDetail:ro.MessageError_ShowDetail})}),jsxRuntimeExports.jsx("p",{className:ao,children:to})]})}DefaultMessageErrorRenderer.displayName="DefaultMessageErrorRenderer";const useStyles$b=makeStyles({errorMessageDetail:{...shorthands.margin("0","0","0","0"),wordBreak:"break-word",whiteSpace:"break-spaces"},errorMessageDetailHidden:{display:"none"}}),useToolbarDefaultActions=()=>React.useMemo(()=>[],[]);function DefaultMessageActionBarRenderer(eo){const{useMessageActions:to=useToolbarDefaultActions,data:ro,className:no}=eo,oo=to(ro),io=useStyles$a(),so=React.useMemo(()=>{const uo=oo.filter(fo=>!fo.condition||fo.condition(ro)).sort((fo,ho)=>fo.group-ho.group),co=[];for(let fo=0,ho;fo0))return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const lo=[];for(let uo=0;uobo(ro)},ho)},ho))}uo+1{ro>0&&oo(ro-1)},ao=()=>{ro=Fo?jo:""+Array(Fo+1-Lo.length).join($o)+jo},So={s:Eo,z:function(jo){var Fo=-jo.utcOffset(),$o=Math.abs(Fo),Lo=Math.floor($o/60),Ho=$o%60;return(Fo<=0?"+":"-")+Eo(Lo,2,"0")+":"+Eo(Ho,2,"0")},m:function jo(Fo,$o){if(Fo.date()<$o.date())return-jo($o,Fo);var Lo=12*($o.year()-Fo.year())+($o.month()-Fo.month()),Ho=Fo.clone().add(Lo,fo),qo=$o-Ho<0,Uo=Fo.clone().add(Lo+(qo?-1:1),fo);return+(-(Lo+($o-Ho)/(qo?Ho-Uo:Uo-Ho))||0)},a:function(jo){return jo<0?Math.ceil(jo)||0:Math.floor(jo)},p:function(jo){return{M:fo,y:po,w:co,d:uo,D:go,h:lo,m:ao,s:so,ms:io,Q:ho}[jo]||String(jo||"").toLowerCase().replace(/s$/,"")},u:function(jo){return jo===void 0}},To="en",wo={};wo[To]=_o;var Co="$isDayjsObject",Oo=function(jo){return jo instanceof Mo||!(!jo||!jo[Co])},Ao=function jo(Fo,$o,Lo){var Ho;if(!Fo)return To;if(typeof Fo=="string"){var qo=Fo.toLowerCase();wo[qo]&&(Ho=qo),$o&&(wo[qo]=$o,Ho=qo);var Uo=Fo.split("-");if(!Ho&&Uo.length>1)return jo(Uo[0])}else{var Yo=Fo.name;wo[Yo]=Fo,Ho=Yo}return!Lo&&Ho&&(To=Ho),Ho||!Lo&&To},Ro=function(jo,Fo){if(Oo(jo))return jo.clone();var $o=typeof Fo=="object"?Fo:{};return $o.date=jo,$o.args=arguments,new Mo($o)},No=So;No.l=Ao,No.i=Oo,No.w=function(jo,Fo){return Ro(jo,{locale:Fo.$L,utc:Fo.$u,x:Fo.$x,$offset:Fo.$offset})};var Mo=function(){function jo($o){this.$L=Ao($o.locale,null,!0),this.parse($o),this.$x=this.$x||$o.x||{},this[Co]=!0}var Fo=jo.prototype;return Fo.parse=function($o){this.$d=function(Lo){var Ho=Lo.date,qo=Lo.utc;if(Ho===null)return new Date(NaN);if(No.u(Ho))return new Date;if(Ho instanceof Date)return new Date(Ho);if(typeof Ho=="string"&&!/Z$/i.test(Ho)){var Uo=Ho.match(bo);if(Uo){var Yo=Uo[2]-1||0,Zo=(Uo[7]||"0").substring(0,3);return qo?new Date(Date.UTC(Uo[1],Yo,Uo[3]||1,Uo[4]||0,Uo[5]||0,Uo[6]||0,Zo)):new Date(Uo[1],Yo,Uo[3]||1,Uo[4]||0,Uo[5]||0,Uo[6]||0,Zo)}}return new Date(Ho)}($o),this.init()},Fo.init=function(){var $o=this.$d;this.$y=$o.getFullYear(),this.$M=$o.getMonth(),this.$D=$o.getDate(),this.$W=$o.getDay(),this.$H=$o.getHours(),this.$m=$o.getMinutes(),this.$s=$o.getSeconds(),this.$ms=$o.getMilliseconds()},Fo.$utils=function(){return No},Fo.isValid=function(){return this.$d.toString()!==vo},Fo.isSame=function($o,Lo){var Ho=Ro($o);return this.startOf(Lo)<=Ho&&Ho<=this.endOf(Lo)},Fo.isAfter=function($o,Lo){return Ro($o){const{duration:to,tokens:ro,locStrings:no,className:oo}=eo,io=to.toFixed(2).replace(/\.?0*$/,"");return jsxRuntimeExports.jsxs("div",{className:oo,children:[ro>0&&jsxRuntimeExports.jsxs(React.Fragment,{children:[`${no.MessageStatus_TokensDesc}: `,jsxRuntimeExports.jsx("b",{children:ro}),` ${no.MessageStatus_TokensUint}, `]}),`${ro>0?no.MessageStatus_TimeSpentDesc:no.MessageStatus_TimeSpentDscCapitalized}: `,jsxRuntimeExports.jsx("b",{children:io}),` ${no.MessageStatus_TimeSpent_Unit}`]})};DefaultMessageStatusRenderer.displayName="DefaultMessageStatusRenderer";const EMPTY_CONTEXTUAL_MENU_ITEMS$1=[],defaultUseContextualMenuItems$1=eo=>EMPTY_CONTEXTUAL_MENU_ITEMS$1;function DefaultMessageBubbleRenderer(eo){const{MessageAvatarRenderer:to,MessageContentRenderer:ro=DefaultMessageContentRenderer,MessageErrorRenderer:no=DefaultMessageErrorRenderer,MessageSenderRenderer:oo=DefaultMessageSenderRenderer,MessagePaginationRenderer:io=DefaultMessagePaginationRenderer,MessageActionBarRenderer:so=DefaultMessageActionBarRenderer,MessageStatusRenderer:ao=DefaultMessageStatusRenderer,useMessageContextualMenuItems:lo=defaultUseContextualMenuItems$1,useMessageActions:uo,initialPage:co=-1,locStrings:fo,message:ho,className:po}=eo,go=useStyles$8(),[vo,bo]=React.useState((co%ho.history.length+ho.history.length)%ho.history.length),[xo,_o]=React.useState(!1),Eo=React.useRef(null),So=React.useRef(null),To=React.useCallback(()=>{_o(!1)},[]),wo=React.useCallback(No=>{const Mo=Eo.current,Do=So.current;if(Mo&&Do){const jo=No.clientX,Fo=No.clientY,$o=Mo.getBoundingClientRect(),Lo=$o.left+window.scrollX,Ho=$o.top+window.scrollY,qo=jo-Lo,Uo=Fo-Ho;Do.style.left=`${qo}px`,Do.style.top=`${Uo}px`}},[]),Co=React.useCallback(No=>{No.preventDefault(),wo(No),_o(!0)},[]),Oo=ho.history[vo],Ao=Oo.category===ChatMessageCategory.User?"right":"left",Ro=lo(Oo);return React.useEffect(()=>{const No=()=>{_o(!1)};return document.addEventListener("mousedown",No),()=>document.removeEventListener("mousedown",No)},[]),jsxRuntimeExports.jsx("div",{className:go.container,"data-chatbox-locator":ChatboxLocator.MessageBubble,"data-position":Ao,children:jsxRuntimeExports.jsxs("div",{className:mergeClasses(go.message,po),"data-position":Ao,children:[jsxRuntimeExports.jsx("div",{className:go.avatar,children:to&&jsxRuntimeExports.jsx(to,{data:Oo,position:Ao})}),jsxRuntimeExports.jsxs("div",{className:go.main,children:[jsxRuntimeExports.jsx("div",{className:go.sender,children:jsxRuntimeExports.jsx(oo,{data:Oo,position:Ao})}),jsxRuntimeExports.jsxs("div",{ref:Eo,className:go.content,"data-category":Oo.category,"data-chatbox-locator":ChatboxLocator.MessageContent,onContextMenu:Co,onClick:wo,children:[jsxRuntimeExports.jsx(ro,{content:Oo.content,className:go.contentMain}),Oo.error&&jsxRuntimeExports.jsx(no,{error:Oo.error,locStrings:fo,className:go.error}),typeof Oo.duration=="number"&&typeof Oo.tokens=="number"&&jsxRuntimeExports.jsx(ao,{duration:Oo.duration,tokens:Oo.tokens,locStrings:fo,className:go.status}),ho.history.length>1&&jsxRuntimeExports.jsx(io,{className:go.pagination,message:ho,current:vo,setCurrent:bo}),jsxRuntimeExports.jsx("div",{ref:So,className:go.contentMenuAnchor}),Ro.length>0&&jsxRuntimeExports.jsx(ContextualMenu,{items:Ro,hidden:!xo,target:So,onItemClick:To,onDismiss:To,className:go.contextualMenu}),jsxRuntimeExports.jsx("div",{className:go.actionBar,"data-chatbox-locator":ChatboxLocator.MessageActionBar,children:jsxRuntimeExports.jsx(so,{data:Oo,locStrings:fo,useMessageActions:uo})})]})]})]})})}DefaultMessageBubbleRenderer.displayName="DefaultMessageBubbleRenderer";const useStyles$8=makeStyles({container:{...shorthands.margin("16px","0"),display:"flex",justifyContent:"flex-start",'&&[data-position="right"]':{justifyContent:"flex-end"},width:"100%"},message:{display:"flex",flexDirection:"row",'&&[data-position="right"]':{flexDirection:"row-reverse"},maxWidth:"calc(100% - 80px)"},avatar:{...shorthands.flex(0,0,"auto")},main:{...shorthands.flex(1,1,"auto"),display:"flex",flexDirection:"column",width:"100%"},sender:{...shorthands.flex(0,0,"auto")},content:{...shorthands.flex(1,1,"auto"),...shorthands.borderRadius("4px"),position:"relative",boxSizing:"border-box",minWidth:"48px",wordBreak:"break-word",lineHeight:"22px","> p":{...shorthands.margin(0)},[`&:hover > ${ChatboxSelector.MessageActionBar}`]:{display:"flex",visibility:"visible"},[`&&[data-category="${ChatMessageCategory.System}"]`]:{color:tokens.colorNeutralForeground4},[`&&[data-category="${ChatMessageCategory.Error}"]`]:{backgroundColor:tokens.colorPaletteRedBackground2,color:tokens.colorNeutralForeground1},[`&&[data-category="${ChatMessageCategory.Chatbot}"]`]:{backgroundColor:tokens.colorNeutralBackground4,color:tokens.colorNeutralForeground1},[`&&[data-category="${ChatMessageCategory.User}"]`]:{backgroundColor:tokens.colorBrandBackground2,color:tokens.colorNeutralForeground1}},contentMain:{...shorthands.padding("12px","20px","12px","12px")},contextualMenu:{width:"auto",minWidth:"180px"},contentMenuAnchor:{position:"absolute",top:"0px",left:"0px"},error:{...shorthands.borderTop("1px","solid",tokens.colorPaletteDarkRedBorderActive),marginTop:"8px !important",paddingTop:"8px"},pagination:{},status:{...shorthands.borderTop("1px","solid",tokens.colorNeutralStroke1),...shorthands.padding("0px","20px","0px","12px"),fontSize:"12px",fontStyle:"italic"},actionBar:{position:"absolute",right:"0px",top:"-32px",display:"none",justifyContent:"space-between"}});function DefaultSessionSplitRenderer(eo){const{locStrings:to,className:ro}=eo,no=useStyles$7();return jsxRuntimeExports.jsx("div",{className:mergeClasses(no.sessionSplit,ro),children:jsxRuntimeExports.jsxs("span",{children:["--- ",to.SessionSplit_Desc," ---"]})})}DefaultSessionSplitRenderer.displayName="DefaultSessionSplitRenderer";const useStyles$7=makeStyles({sessionSplit:{display:"flex",justifyContent:"center",height:"24px",color:tokens.colorNeutralForeground4}});makeStyles({hintTyping:{...shorthands.overflow("hidden"),width:"1px",height:"1px"},typingDots:{...shorthands.transition("opacity","0.1s"),display:"flex",alignItems:"center",height:"22.5px"},typingDot:{...shorthands.borderRadius("50%"),...shorthands.margin("0","0","0","6px"),display:"inline-block",width:"6px",height:"6px",backgroundColor:tokens.colorNeutralStroke1,animationDuration:"1.5s",animationTimingFunction:"linear",animationIterationCount:"infinite",animationName:{"0%":{transform:"scale(1)"},"16.67%":{transform:"scale(0)"},"33.33%":{transform:"scale(0)"},"50%":{transform:"scale(0)"},"66.67%":{transform:"scale(1)"},"83.33%":{transform:"scale(1)"},"100%":{transform:"scale(1)"}},"&:nth-child(1)":{...shorthands.margin("0px")},"&:nth-child(2)":{animationDelay:"0.18s"},"&:nth-child(3)":{animationDelay:"0.36s"}}});makeStyles({toolbar:{display:"flex",justifyContent:"flex-end"}});makeStyles({input:{...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),boxSizing:"border-box",display:"grid",gridTemplateRows:"1fr auto"},editor:{boxSizing:"border-box"},editorInner:{...shorthands.border("0px"),boxSizing:"border-box"},editorToolbar:{boxSizing:"border-box",display:"flex",alignItems:"flex-end",justifyContent:"flex-end",height:"100%"}});function MessageListRenderer(eo){const{MessageAvatarRenderer:to,MessageContentRenderer:ro,MessageErrorRenderer:no,MessageSenderRenderer:oo,MessageBubbleRenderer:io=DefaultMessageBubbleRenderer,SessionSplitRenderer:so=DefaultSessionSplitRenderer,className:ao,bubbleClassName:lo,sessionSplitClassName:uo,locStrings:co,messages:fo,useMessageContextualMenuItems:ho,useMessageActions:po}=eo,go=useStyles$6();return jsxRuntimeExports.jsx("div",{className:mergeClasses(go.container,ao),"data-chatbox-locator":ChatboxLocator.MessageList,children:fo.map(vo=>{switch(vo.type){case ChatMessageType.Message:return jsxRuntimeExports.jsx(io,{MessageAvatarRenderer:to,MessageContentRenderer:ro,MessageErrorRenderer:no,MessageSenderRenderer:oo,locStrings:co,message:vo,className:lo,useMessageContextualMenuItems:ho,useMessageActions:po},vo.id);case ChatMessageType.SessionSplit:return jsxRuntimeExports.jsx(so,{locStrings:co,className:uo},vo.id);default:return jsxRuntimeExports.jsx(React.Fragment,{},vo.id)}})})}MessageListRenderer.displayName="MessageListRenderer";const useStyles$6=makeStyles({container:{boxSizing:"border-box"}}),nv=class nv extends React.PureComponent{render(){const{elements:to,deltaH:ro,deltaW:no,scaleH:oo,scaleW:io,className:so,elementClassName:ao}=this.props;return jsxRuntimeExports.jsx("div",{className:so,children:to.map((lo,uo)=>{const co=(lo.top-ro)*oo,fo=(lo.left-no)*io,ho=lo.height*oo,po=lo.width*io,go={top:co,left:fo,height:ho,width:po};return lo.backgroundColor&&(go.backgroundColor=lo.backgroundColor),jsxRuntimeExports.jsx("div",{className:ao,style:go},uo)})})}};nv.displayName="MinimapOverview";let MinimapOverview=nv;const MinimapViewport=eo=>{const{scaleH:to,sourceRootRef:ro,sourceQuerySelector:no,className:oo}=eo,[io,so]=React.useState(0),[ao,lo]=React.useState(0),uo=useStyles$5();return React.useLayoutEffect(()=>{var po,go;const co=(go=(po=ro.current)==null?void 0:po.querySelector(no))==null?void 0:go.parentElement;if(!co)return()=>{};const{height:fo}=co.getBoundingClientRect();lo(fo);const ho=()=>{so(co.scrollTop||0)};return co.addEventListener("scroll",ho),()=>co.removeEventListener("scroll",ho)},[ro.current]),jsxRuntimeExports.jsx("div",{className:mergeClasses(uo.viewport,oo),style:{position:"absolute",top:io*to,height:`${ao*to}px`}})};MinimapViewport.displayName="MinimapViewport";const useStyles$5=makeStyles({viewport:{display:"block",width:"100%",left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.15)"}}),Minimap=eo=>{const{SCROLL_DELTA_THRESHOLD:to=5,syncScale:ro=!0,sourceRootRef:no,sourceQuerySelector:oo,sourceElementQuerySelector:io,className:so,overviewClassName:ao,overviewElementClassName:lo,viewportClassName:uo,style:co}=eo,[fo,ho]=React.useState([]),[po,go]=React.useState(0),[vo,bo]=React.useState(0),[xo,_o]=React.useState(0),[Eo,So]=React.useState(0),[To,wo]=React.useState(0),[Co,Oo]=React.useState(0),[Ao,Ro]=React.useState(0),[No,Mo]=React.useState(0),Do=Eo<=0?0:vo/Eo||.1,jo=xo<=0?0:ro?Math.max(1/xo,Math.min(Do,(po-10)/xo||.1)):Math.max(1/xo,(po-10)/xo||.1),Fo=React.useRef(null),$o=React.useRef(null),Lo=React.useRef(!1),Ho=useEventCallback$1(Ss=>{var Ns,ws;if(Ss.preventDefault(),Ss.stopPropagation(),Lo.current=!0,!$o.current)return;const As=(ws=(Ns=no.current)==null?void 0:Ns.querySelector(oo))==null?void 0:ws.parentElement;if(As){const Jo=(Ss.clientY-$o.current.getBoundingClientRect().top)/jo;Math.abs(As.scrollTop-Jo)>to&&(As.scrollTop=Jo)}}),qo=useEventCallback$1(Ss=>{var Ns,ws;if(Ss.preventDefault(),Ss.stopPropagation(),!Lo.current||!$o.current)return;const As=(ws=(Ns=no.current)==null?void 0:Ns.querySelector(oo))==null?void 0:ws.parentElement;if(As){const Jo=(Ss.clientY-$o.current.getBoundingClientRect().top)/jo;Math.abs(As.scrollTop-Jo)>to&&(As.scrollTop=Jo)}}),Uo=React.useCallback(Ss=>{const As=Ss.querySelector(oo);if(!As)return;const Ns=As.querySelectorAll(io),ws=[];for(let Jo=0;Jo{const Ss=()=>{Lo.current=!1};return document.addEventListener("mouseup",Ss),()=>document.removeEventListener("mouseup",Ss)},[]),React.useLayoutEffect(()=>{const Ss=Fo.current;if(!Ss)return;const{height:As,width:Ns}=Ss.getBoundingClientRect();go(As),bo(Ns)},[]),React.useLayoutEffect(()=>{const Ss=no.current;if(!Ss)return()=>{};Uo(Ss);const As=new MutationObserver(Ns=>{for(const ws of Ns)ws.type==="childList"&&Uo(Ss)});return As.observe(Ss,{childList:!0,subtree:!0}),()=>{As.disconnect()}},[no.current,Uo]);const Yo=useStyles$4(),Zo=xo+To-Ao,_s=Eo+Co-No;return jsxRuntimeExports.jsx("div",{ref:Fo,className:mergeClasses(Yo.container,so),style:co,children:jsxRuntimeExports.jsxs("div",{ref:$o,className:Yo.minimap,onMouseDown:Ho,onMouseMove:qo,children:[jsxRuntimeExports.jsx(MinimapOverview,{elements:fo,deltaH:Zo,deltaW:_s,scaleH:jo,scaleW:Do,className:mergeClasses(Yo.overview,ao),elementClassName:mergeClasses(Yo.minimapElement,lo)}),jsxRuntimeExports.jsx(MinimapViewport,{scaleH:jo,sourceRootRef:no,sourceQuerySelector:oo,className:uo})]})})};Minimap.displayName="Minimap";const useStyles$4=makeStyles({container:{height:"100%",width:"100%",...shorthands.overflow("hidden")},minimap:{position:"relative",width:"100%",height:"100%"},overview:{},minimapElement:{position:"absolute",backgroundColor:"#c292f9"}});makeStyles({editor:{...shorthands.padding("8px"),...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),boxSizing:"border-box",display:"block",width:"100%",userSelect:"none",position:"relative",'&[data-disabled="true"]':{backgroundColor:tokens.colorNeutralBackgroundDisabled}},textarea:{...shorthands.padding("0px"),...shorthands.overflow("hidden","auto"),...shorthands.borderWidth(0),...shorthands.outline(0,"solid","transparent"),backgroundColor:"transparent",boxSizing:"border-box",resize:"none",appearance:"none",overflowWrap:"break-word",lineHeight:"24px",height:"24px",width:"100%",wordBreak:"break-all",color:tokens.colorNeutralForeground1,userSelect:"text"}});function e$1(eo){return{}}const t$4={},n$2={},r$1={},i$3={},s$2={},o$5={},l$3={},c$5={},u$5={},a$4={},f$4={},d$4={},h$3={},g$6={},_$5={},p$4={},y$4={},m$5={},x$5={},v$3={},T$3={},S$4={},k$2={},C$5={},b$2={},N$3={},w$3={},E$4={},P$3={},D$2={},I$1={},O$2={},A$3={},L$2={},F$1={},M$3={},W={},z$1={},B$2={},R$2={},K$2={},J={},U={},V={},$$1={};var H$1=function(eo){const to=new URLSearchParams;to.append("code",eo);for(let ro=1;roOe;try{Vi(eo,()=>{const oo=fi()||function(ho){return ho.getEditorState().read(()=>{const po=fi();return po!==null?po.clone():null})}(eo),io=new Map,so=eo.getRootElement(),ao=eo._editorState,lo=eo._blockCursorElement;let uo=!1,co="";for(let ho=0;ho0){let So=0;for(let To=0;To0)for(const[ho,po]of io)if(qi(po)){const go=po.getChildrenKeys();let vo=ho.firstChild;for(let bo=0;bo0){for(let ho=0;ho{Be(eo,to,ro)})}function Je(eo,to){const ro=eo.__mode,no=eo.__format,oo=eo.__style,io=to.__mode,so=to.__format,ao=to.__style;return!(ro!==null&&ro!==io||no!==null&&no!==so||oo!==null&&oo!==ao)}function Ue(eo,to){const ro=eo.mergeWithSibling(to),no=Oi()._normalizedNodes;return no.add(eo.__key),no.add(to.__key),ro}function Ve(eo){let to,ro,no=eo;if(no.__text!==""||!no.isSimpleText()||no.isUnmergeable()){for(;(to=no.getPreviousSibling())!==null&&Br(to)&&to.isSimpleText()&&!to.isUnmergeable();){if(to.__text!==""){if(Je(to,no)){no=Ue(to,no);break}break}to.remove()}for(;(ro=no.getNextSibling())!==null&&Br(ro)&&ro.isSimpleText()&&!ro.isUnmergeable();){if(ro.__text!==""){if(Je(no,ro)){no=Ue(no,ro);break}break}ro.remove()}}else no.remove()}function $e(eo){return He(eo.anchor),He(eo.focus),eo}function He(eo){for(;eo.type==="element";){const to=eo.getNode(),ro=eo.offset;let no,oo;if(ro===to.getChildrenSize()?(no=to.getChildAtIndex(ro-1),oo=!0):(no=to.getChildAtIndex(ro),oo=!1),Br(no)){eo.set(no.__key,oo?no.getTextContentSize():0,"text");break}if(!qi(no))break;eo.set(no.__key,oo?no.getChildrenSize():0,"element")}}let je=1;const qe=typeof queueMicrotask=="function"?queueMicrotask:eo=>{Promise.resolve().then(eo)};function Qe(eo){const to=document.activeElement;if(to===null)return!1;const ro=to.nodeName;return Hi(at$1(eo))&&(ro==="INPUT"||ro==="TEXTAREA"||to.contentEditable==="true"&&to.__lexicalEditor==null)}function Xe(eo,to,ro){const no=eo.getRootElement();try{return no!==null&&no.contains(to)&&no.contains(ro)&&to!==null&&!Qe(to)&&Ye(to)===eo}catch{return!1}}function Ye(eo){let to=eo;for(;to!=null;){const ro=to.__lexicalEditor;if(ro!=null)return ro;to=Jt(to)}return null}function Ze(eo){return eo.isToken()||eo.isSegmented()}function Ge(eo){return eo.nodeType===se}function et(eo){let to=eo;for(;to!=null;){if(Ge(to))return to;to=to.firstChild}return null}function tt(eo,to,ro){const no=be[to];if(ro!==null&&(eo&no)==(ro&no))return eo;let oo=eo^no;return to==="subscript"?oo&=~be.superscript:to==="superscript"&&(oo&=~be.subscript),oo}function nt(eo){return Br(eo)||vr(eo)||Hi(eo)}function rt(eo,to){if(to!=null)return void(eo.__key=to);Pi(),Di();const ro=Oi(),no=Ii(),oo=""+je++;no._nodeMap.set(oo,eo),qi(eo)?ro._dirtyElements.set(oo,!0):ro._dirtyLeaves.add(oo),ro._cloneNotNeeded.add(oo),ro._dirtyType=le,eo.__key=oo}function it(eo){const to=eo.getParent();if(to!==null){const ro=eo.getWritable(),no=to.getWritable(),oo=eo.getPreviousSibling(),io=eo.getNextSibling();if(oo===null)if(io!==null){const so=io.getWritable();no.__first=io.__key,so.__prev=null}else no.__first=null;else{const so=oo.getWritable();if(io!==null){const ao=io.getWritable();ao.__prev=so.__key,so.__next=ao.__key}else so.__next=null;ro.__prev=null}if(io===null)if(oo!==null){const so=oo.getWritable();no.__last=oo.__key,so.__next=null}else no.__last=null;else{const so=io.getWritable();if(oo!==null){const ao=oo.getWritable();ao.__next=so.__key,so.__prev=ao.__key}else so.__prev=null;ro.__next=null}no.__size--,ro.__parent=null}}function st$1(eo){Di();const to=eo.getLatest(),ro=to.__parent,no=Ii(),oo=Oi(),io=no._nodeMap,so=oo._dirtyElements;ro!==null&&function(lo,uo,co){let fo=lo;for(;fo!==null;){if(co.has(fo))return;const ho=uo.get(fo);if(ho===void 0)break;co.set(fo,!1),fo=ho.__parent}}(ro,io,so);const ao=to.__key;oo._dirtyType=le,qi(eo)?so.set(ao,!0):oo._dirtyLeaves.add(ao)}function ot(eo){Pi();const to=Oi(),ro=to._compositionKey;if(eo!==ro){if(to._compositionKey=eo,ro!==null){const no=ct$1(ro);no!==null&&no.getWritable()}if(eo!==null){const no=ct$1(eo);no!==null&&no.getWritable()}}}function lt$1(){return Ei()?null:Oi()._compositionKey}function ct$1(eo,to){const ro=(to||Ii())._nodeMap.get(eo);return ro===void 0?null:ro}function ut$1(eo,to){const ro=eo[`__lexicalKey_${Oi()._key}`];return ro!==void 0?ct$1(ro,to):null}function at$1(eo,to){let ro=eo;for(;ro!=null;){const no=ut$1(ro,to);if(no!==null)return no;ro=Jt(ro)}return null}function ft$1(eo){const to=eo._decorators,ro=Object.assign({},to);return eo._pendingDecorators=ro,ro}function dt$1(eo){return eo.read(()=>ht$1().getTextContent())}function ht$1(){return gt$1(Ii())}function gt$1(eo){return eo._nodeMap.get("root")}function _t(eo){Pi();const to=Ii();eo!==null&&(eo.dirty=!0,eo.setCachedNodes(null)),to._selection=eo}function pt$1(eo){const to=Oi(),ro=function(no,oo){let io=no;for(;io!=null;){const so=io[`__lexicalKey_${oo._key}`];if(so!==void 0)return so;io=Jt(io)}return null}(eo,to);return ro===null?eo===to.getRootElement()?ct$1("root"):null:ct$1(ro)}function yt$1(eo,to){return to?eo.getTextContentSize():0}function mt$1(eo){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(eo)}function xt$1(eo){const to=[];let ro=eo;for(;ro!==null;)to.push(ro),ro=ro._parentEditor;return to}function vt$1(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Tt(eo){return eo.nodeType===se?eo.nodeValue:null}function St(eo,to,ro){const no=nn(to._window);if(no===null)return;const oo=no.anchorNode;let{anchorOffset:io,focusOffset:so}=no;if(oo!==null){let ao=Tt(oo);const lo=at$1(oo);if(ao!==null&&Br(lo)){if(ao===me&&ro){const uo=ro.length;ao=ro,io=uo,so=uo}ao!==null&&kt(lo,ao,io,so,eo)}}}function kt(eo,to,ro,no,oo){let io=eo;if(io.isAttached()&&(oo||!io.isDirty())){const so=io.isComposing();let ao=to;(so||oo)&&to[to.length-1]===me&&(ao=to.slice(0,-1));const lo=io.getTextContent();if(oo||ao!==lo){if(ao===""){if(ot(null),Z||G||re)io.remove();else{const vo=Oi();setTimeout(()=>{vo.update(()=>{io.isAttached()&&io.remove()})},20)}return}const uo=io.getParent(),co=di(),fo=io.getTextContentSize(),ho=lt$1(),po=io.getKey();if(io.isToken()||ho!==null&&po===ho&&!so||Xr(co)&&(uo!==null&&!uo.canInsertTextBefore()&&co.anchor.offset===0||co.anchor.key===eo.__key&&co.anchor.offset===0&&!io.canInsertTextBefore()&&!so||co.focus.key===eo.__key&&co.focus.offset===fo&&!io.canInsertTextAfter()&&!so))return void io.markDirty();const go=fi();if(!Xr(go)||ro===null||no===null)return void io.setTextContent(ao);if(go.setTextNodeRange(io,ro,io,no),io.isSegmented()){const vo=zr(io.getTextContent());io.replace(vo),io=vo}io.setTextContent(ao)}}}function Ct$1(eo,to){if(to.isSegmented())return!0;if(!eo.isCollapsed())return!1;const ro=eo.anchor.offset,no=to.getParentOrThrow(),oo=to.isToken();return ro===0?!to.canInsertTextBefore()||!no.canInsertTextBefore()||oo||function(io){const so=io.getPreviousSibling();return(Br(so)||qi(so)&&so.isInline())&&!so.canInsertTextAfter()}(to):ro===to.getTextContentSize()&&(!to.canInsertTextAfter()||!no.canInsertTextAfter()||oo)}function bt(eo){return eo===37}function Nt$1(eo){return eo===39}function wt$1(eo,to){return Q?eo:to}function Et$1(eo){return eo===13}function Pt$1(eo){return eo===8}function Dt$1(eo){return eo===46}function It(eo,to,ro){return eo===65&&wt$1(to,ro)}function Ot$1(){const eo=ht$1();_t($e(eo.select(0,eo.getChildrenSize())))}function At$1(eo,to){eo.__lexicalClassNameCache===void 0&&(eo.__lexicalClassNameCache={});const ro=eo.__lexicalClassNameCache,no=ro[to];if(no!==void 0)return no;const oo=eo[to];if(typeof oo=="string"){const io=Ie(oo);return ro[to]=io,io}return oo}function Lt(eo,to,ro,no,oo){if(ro.size===0)return;const io=no.__type,so=no.__key,ao=to.get(io);ao===void 0&&H$1(33,io);const lo=ao.klass;let uo=eo.get(lo);uo===void 0&&(uo=new Map,eo.set(lo,uo));const co=uo.get(so),fo=co==="destroyed"&&oo==="created";(co===void 0||fo)&&uo.set(so,fo?"updated":oo)}function Ft(eo){const to=Ii(),ro=to._readOnly,no=eo.getType(),oo=to._nodeMap,io=[];for(const[,so]of oo)so instanceof eo&&so.__type===no&&(ro||so.isAttached())&&io.push(so);return io}function Mt(eo,to,ro){const no=eo.getParent();let oo=ro,io=eo;return no!==null&&(to&&ro===0?(oo=io.getIndexWithinParent(),io=no):to||ro!==io.getChildrenSize()||(oo=io.getIndexWithinParent()+1,io=no)),io.getChildAtIndex(to?oo-1:oo)}function Wt(eo,to){const ro=eo.offset;if(eo.type==="element")return Mt(eo.getNode(),to,ro);{const no=eo.getNode();if(to&&ro===0||!to&&ro===no.getTextContentSize()){const oo=to?no.getPreviousSibling():no.getNextSibling();return oo===null?Mt(no.getParentOrThrow(),to,no.getIndexWithinParent()+(to?0:1)):oo}}return null}function zt(eo){const to=Ht(eo).event,ro=to&&to.inputType;return ro==="insertFromPaste"||ro==="insertFromPasteAsQuotation"}function Bt(eo,to,ro){return Ki(eo,to,ro)}function Rt(eo){return!Yi(eo)&&!eo.isLastChild()&&!eo.isInline()}function Kt(eo,to){const ro=eo._keyToDOMMap.get(to);return ro===void 0&&H$1(75,to),ro}function Jt(eo){const to=eo.assignedSlot||eo.parentElement;return to!==null&&to.nodeType===11?to.host:to}function Ut(eo){return Oi()._updateTags.has(eo)}function Vt(eo){Pi(),Oi()._updateTags.add(eo)}function $t(eo,to){let ro=eo.getParent();for(;ro!==null;){if(ro.is(to))return!0;ro=ro.getParent()}return!1}function Ht(eo){const to=eo._window;return to===null&&H$1(78),to}function jt(eo){return qi(eo)&&eo.isInline()||Hi(eo)&&eo.isInline()}function qt(eo){let to=eo.getParentOrThrow();for(;to!==null;){if(Qt(to))return to;to=to.getParentOrThrow()}return to}function Qt(eo){return Yi(eo)||qi(eo)&&eo.isShadowRoot()}function Xt(eo){const to=eo.constructor.clone(eo);return rt(to,null),to}function Yt(eo){const to=Oi(),ro=eo.constructor.getType(),no=to._nodes.get(ro);no===void 0&&H$1(97);const oo=no.replace;if(oo!==null){const io=oo(eo);return io instanceof eo.constructor||H$1(98),io}return eo}function Zt(eo,to){!Yi(eo.getParent())||qi(to)||Hi(to)||H$1(99)}function Gt(eo){return(Hi(eo)||qi(eo)&&!eo.canBeEmpty())&&!eo.isInline()}function en(eo,to,ro){ro.style.removeProperty("caret-color"),to._blockCursorElement=null;const no=eo.parentElement;no!==null&&no.removeChild(eo)}function tn(eo,to,ro){let no=eo._blockCursorElement;if(Xr(ro)&&ro.isCollapsed()&&ro.anchor.type==="element"&&to.contains(document.activeElement)){const oo=ro.anchor,io=oo.getNode(),so=oo.offset;let ao=!1,lo=null;if(so===io.getChildrenSize())Gt(io.getChildAtIndex(so-1))&&(ao=!0);else{const uo=io.getChildAtIndex(so);if(Gt(uo)){const co=uo.getPreviousSibling();(co===null||Gt(co))&&(ao=!0,lo=eo.getElementByKey(uo.__key))}}if(ao){const uo=eo.getElementByKey(io.__key);return no===null&&(eo._blockCursorElement=no=function(co){const fo=co.theme,ho=document.createElement("div");ho.contentEditable="false",ho.setAttribute("data-lexical-cursor","true");let po=fo.blockCursor;if(po!==void 0){if(typeof po=="string"){const go=Ie(po);po=fo.blockCursor=go}po!==void 0&&ho.classList.add(...po)}return ho}(eo._config)),to.style.caretColor="transparent",void(lo===null?uo.appendChild(no):uo.insertBefore(no,lo))}}no!==null&&en(no,eo,to)}function nn(eo){return j?(eo||window).getSelection():null}function rn(eo,to){let ro=eo.getChildAtIndex(to);ro==null&&(ro=eo),Qt(eo)&&H$1(102);const no=so=>{const ao=so.getParentOrThrow(),lo=Qt(ao),uo=so!==ro||lo?Xt(so):so;if(lo)return qi(so)&&qi(uo)||H$1(133),so.insertAfter(uo),[so,uo,uo];{const[co,fo,ho]=no(ao),po=so.getNextSiblings();return ho.append(uo,...po),[co,fo,uo]}},[oo,io]=no(ro);return[oo,io]}function sn(eo){return on(eo)&&eo.tagName==="A"}function on(eo){return eo.nodeType===1}function ln(eo){if(Hi(eo)&&!eo.isInline())return!0;if(!qi(eo)||Qt(eo))return!1;const to=eo.getFirstChild(),ro=to===null||vr(to)||Br(to)||to.isInline();return!eo.isInline()&&eo.canBeEmpty()!==!1&&ro}function cn(eo,to){let ro=eo;for(;ro!==null&&ro.getParent()!==null&&!to(ro);)ro=ro.getParentOrThrow();return to(ro)?ro:null}function un(){return Oi()}function an(eo,to,ro,no,oo,io){let so=eo.getFirstChild();for(;so!==null;){const ao=so.__key;so.__parent===to&&(qi(so)&&an(so,ao,ro,no,oo,io),ro.has(ao)||io.delete(ao),oo.push(ao)),so=so.getNextSibling()}}let fn,dn,hn,gn,_n,pn,yn,mn,xn,vn,Tn="",Sn="",kn="",Cn=!1,bn=!1,Nn=null;function wn(eo,to){const ro=yn.get(eo);if(to!==null){const no=Vn(eo);no.parentNode===to&&to.removeChild(no)}if(mn.has(eo)||dn._keyToDOMMap.delete(eo),qi(ro)){const no=Bn(ro,yn);En(no,0,no.length-1,null)}ro!==void 0&&Lt(vn,hn,gn,ro,"destroyed")}function En(eo,to,ro,no){let oo=to;for(;oo<=ro;++oo){const io=eo[oo];io!==void 0&&wn(io,no)}}function Pn(eo,to){eo.setProperty("text-align",to)}const Dn="40px";function In(eo,to){const ro=fn.theme.indent;if(typeof ro=="string"){const oo=eo.classList.contains(ro);to>0&&!oo?eo.classList.add(ro):to<1&&oo&&eo.classList.remove(ro)}const no=getComputedStyle(eo).getPropertyValue("--lexical-indent-base-value")||Dn;eo.style.setProperty("padding-inline-start",to===0?"":`calc(${to} * ${no})`)}function On(eo,to){const ro=eo.style;to===0?Pn(ro,""):to===de?Pn(ro,"left"):to===he?Pn(ro,"center"):to===ge?Pn(ro,"right"):to===_e?Pn(ro,"justify"):to===pe?Pn(ro,"start"):to===ye&&Pn(ro,"end")}function An(eo,to,ro){const no=mn.get(eo);no===void 0&&H$1(60);const oo=no.createDOM(fn,dn);if(function(io,so,ao){const lo=ao._keyToDOMMap;so["__lexicalKey_"+ao._key]=io,lo.set(io,so)}(eo,oo,dn),Br(no)?oo.setAttribute("data-lexical-text","true"):Hi(no)&&oo.setAttribute("data-lexical-decorator","true"),qi(no)){const io=no.__indent,so=no.__size;if(io!==0&&In(oo,io),so!==0){const lo=so-1;(function(uo,co,fo,ho){const po=Sn;Sn="",Ln(uo,fo,0,co,ho,null),Wn(fo,ho),Sn=po})(Bn(no,mn),lo,no,oo)}const ao=no.__format;ao!==0&&On(oo,ao),no.isInline()||Mn(null,no,oo),Rt(no)&&(Tn+=xe,kn+=xe)}else{const io=no.getTextContent();if(Hi(no)){const so=no.decorate(dn,fn);so!==null&&Kn(eo,so),oo.contentEditable="false"}else Br(no)&&(no.isDirectionless()||(Sn+=io));Tn+=io,kn+=io}if(to!==null)if(ro!=null)to.insertBefore(oo,ro);else{const io=to.__lexicalLineBreak;io!=null?to.insertBefore(oo,io):to.appendChild(oo)}return Lt(vn,hn,gn,no,"created"),oo}function Ln(eo,to,ro,no,oo,io){const so=Tn;Tn="";let ao=ro;for(;ao<=no;++ao)An(eo[ao],oo,io);Rt(to)&&(Tn+=xe),oo.__lexicalTextContent=Tn,Tn=so+Tn}function Fn(eo,to){const ro=to.get(eo);return vr(ro)||Hi(ro)&&ro.isInline()}function Mn(eo,to,ro){const no=eo!==null&&(eo.__size===0||Fn(eo.__last,yn)),oo=to.__size===0||Fn(to.__last,mn);if(no){if(!oo){const io=ro.__lexicalLineBreak;io!=null&&ro.removeChild(io),ro.__lexicalLineBreak=null}}else if(oo){const io=document.createElement("br");ro.__lexicalLineBreak=io,ro.appendChild(io)}}function Wn(eo,to){const ro=to.__lexicalDirTextContent,no=to.__lexicalDir;if(ro!==Sn||no!==Nn){const io=Sn==="",so=io?Nn:(oo=Sn,ke.test(oo)?"rtl":Ce.test(oo)?"ltr":null);if(so!==no){const ao=to.classList,lo=fn.theme;let uo=no!==null?lo[no]:void 0,co=so!==null?lo[so]:void 0;if(uo!==void 0){if(typeof uo=="string"){const fo=Ie(uo);uo=lo[no]=fo}ao.remove(...uo)}if(so===null||io&&so==="ltr")to.removeAttribute("dir");else{if(co!==void 0){if(typeof co=="string"){const fo=Ie(co);co=lo[so]=fo}co!==void 0&&ao.add(...co)}to.dir=so}bn||(eo.getWritable().__dir=so)}Nn=so,to.__lexicalDirTextContent=Sn,to.__lexicalDir=so}var oo}function zn(eo,to,ro){const no=Sn;Sn="",function(oo,io,so){const ao=Tn,lo=oo.__size,uo=io.__size;if(Tn="",lo===1&&uo===1){const co=oo.__first,fo=io.__first;if(co===fo)Rn(co,so);else{const ho=Vn(co),po=An(fo,null,null);so.replaceChild(po,ho),wn(co,null)}}else{const co=Bn(oo,yn),fo=Bn(io,mn);if(lo===0)uo!==0&&Ln(fo,io,0,uo-1,so,null);else if(uo===0){if(lo!==0){const ho=so.__lexicalLineBreak==null;En(co,0,lo-1,ho?null:so),ho&&(so.textContent="")}}else(function(ho,po,go,vo,bo,xo){const _o=vo-1,Eo=bo-1;let So,To,wo=(Ao=xo,Ao.firstChild),Co=0,Oo=0;for(var Ao;Co<=_o&&Oo<=Eo;){const Mo=po[Co],Do=go[Oo];if(Mo===Do)wo=Jn(Rn(Do,xo)),Co++,Oo++;else{So===void 0&&(So=new Set(po)),To===void 0&&(To=new Set(go));const jo=To.has(Mo),Fo=So.has(Do);if(jo)if(Fo){const $o=Kt(dn,Do);$o===wo?wo=Jn(Rn(Do,xo)):(wo!=null?xo.insertBefore($o,wo):xo.appendChild($o),Rn(Do,xo)),Co++,Oo++}else An(Do,xo,wo),Oo++;else wo=Jn(Vn(Mo)),wn(Mo,xo),Co++}}const Ro=Co>_o,No=Oo>Eo;if(Ro&&!No){const Mo=go[Eo+1];Ln(go,ho,Oo,Eo,xo,Mo===void 0?null:dn.getElementByKey(Mo))}else No&&!Ro&&En(po,Co,_o,xo)})(io,co,fo,lo,uo,so)}Rt(io)&&(Tn+=xe),so.__lexicalTextContent=Tn,Tn=ao+Tn}(eo,to,ro),Wn(to,ro),Sn=no}function Bn(eo,to){const ro=[];let no=eo.__first;for(;no!==null;){const oo=to.get(no);oo===void 0&&H$1(101),ro.push(no),no=oo.__next}return ro}function Rn(eo,to){const ro=yn.get(eo);let no=mn.get(eo);ro!==void 0&&no!==void 0||H$1(61);const oo=Cn||pn.has(eo)||_n.has(eo),io=Kt(dn,eo);if(ro===no&&!oo){if(qi(ro)){const so=io.__lexicalTextContent;so!==void 0&&(Tn+=so,kn+=so);const ao=io.__lexicalDirTextContent;ao!==void 0&&(Sn+=ao)}else{const so=ro.getTextContent();Br(ro)&&!ro.isDirectionless()&&(Sn+=so),kn+=so,Tn+=so}return io}if(ro!==no&&oo&&Lt(vn,hn,gn,no,"updated"),no.updateDOM(ro,io,fn)){const so=An(eo,null,null);return to===null&&H$1(62),to.replaceChild(so,io),wn(eo,null),so}if(qi(ro)&&qi(no)){const so=no.__indent;so!==ro.__indent&&In(io,so);const ao=no.__format;ao!==ro.__format&&On(io,ao),oo&&(zn(ro,no,io),Yi(no)||no.isInline()||Mn(ro,no,io)),Rt(no)&&(Tn+=xe,kn+=xe)}else{const so=no.getTextContent();if(Hi(no)){const ao=no.decorate(dn,fn);ao!==null&&Kn(eo,ao)}else Br(no)&&!no.isDirectionless()&&(Sn+=so);Tn+=so,kn+=so}if(!bn&&Yi(no)&&no.__cachedText!==kn){const so=no.getWritable();so.__cachedText=kn,no=so}return io}function Kn(eo,to){let ro=dn._pendingDecorators;const no=dn._decorators;if(ro===null){if(no[eo]===to)return;ro=ft$1(dn)}ro[eo]=to}function Jn(eo){let to=eo.nextSibling;return to!==null&&to===dn._blockCursorElement&&(to=to.nextSibling),to}function Un(eo,to,ro,no,oo,io){Tn="",kn="",Sn="",Cn=no===ce,Nn=null,dn=ro,fn=ro._config,hn=ro._nodes,gn=dn._listeners.mutation,_n=oo,pn=io,yn=eo._nodeMap,mn=to._nodeMap,bn=to._readOnly,xn=new Map(ro._keyToDOMMap);const so=new Map;return vn=so,Rn("root",null),dn=void 0,hn=void 0,_n=void 0,pn=void 0,yn=void 0,mn=void 0,fn=void 0,xn=void 0,vn=void 0,so}function Vn(eo){const to=xn.get(eo);return to===void 0&&H$1(75,eo),to}const $n=Object.freeze({}),Hn=30,jn=[["keydown",function(eo,to){if(qn=eo.timeStamp,Qn=eo.keyCode,to.isComposing())return;const{keyCode:ro,shiftKey:no,ctrlKey:oo,metaKey:io,altKey:so}=eo;Bt(to,_$5,eo)||(function(ao,lo,uo,co){return Nt$1(ao)&&!lo&&!co&&!uo}(ro,oo,so,io)?Bt(to,p$4,eo):function(ao,lo,uo,co,fo){return Nt$1(ao)&&!co&&!uo&&(lo||fo)}(ro,oo,no,so,io)?Bt(to,y$4,eo):function(ao,lo,uo,co){return bt(ao)&&!lo&&!co&&!uo}(ro,oo,so,io)?Bt(to,m$5,eo):function(ao,lo,uo,co,fo){return bt(ao)&&!co&&!uo&&(lo||fo)}(ro,oo,no,so,io)?Bt(to,x$5,eo):function(ao,lo,uo){return function(co){return co===38}(ao)&&!lo&&!uo}(ro,oo,io)?Bt(to,v$3,eo):function(ao,lo,uo){return function(co){return co===40}(ao)&&!lo&&!uo}(ro,oo,io)?Bt(to,T$3,eo):function(ao,lo){return Et$1(ao)&&lo}(ro,no)?(tr=!0,Bt(to,S$4,eo)):function(ao){return ao===32}(ro)?Bt(to,k$2,eo):function(ao,lo){return Q&&lo&&ao===79}(ro,oo)?(eo.preventDefault(),tr=!0,Bt(to,s$2,!0)):function(ao,lo){return Et$1(ao)&&!lo}(ro,no)?(tr=!1,Bt(to,S$4,eo)):function(ao,lo,uo,co){return Q?!lo&&!uo&&(Pt$1(ao)||ao===72&&co):!(co||lo||uo)&&Pt$1(ao)}(ro,so,io,oo)?Pt$1(ro)?Bt(to,C$5,eo):(eo.preventDefault(),Bt(to,i$3,!0)):function(ao){return ao===27}(ro)?Bt(to,b$2,eo):function(ao,lo,uo,co,fo){return Q?!(uo||co||fo)&&(Dt$1(ao)||ao===68&&lo):!(lo||co||fo)&&Dt$1(ao)}(ro,oo,no,so,io)?Dt$1(ro)?Bt(to,N$3,eo):(eo.preventDefault(),Bt(to,i$3,!1)):function(ao,lo,uo){return Pt$1(ao)&&(Q?lo:uo)}(ro,so,oo)?(eo.preventDefault(),Bt(to,a$4,!0)):function(ao,lo,uo){return Dt$1(ao)&&(Q?lo:uo)}(ro,so,oo)?(eo.preventDefault(),Bt(to,a$4,!1)):function(ao,lo){return Q&&lo&&Pt$1(ao)}(ro,io)?(eo.preventDefault(),Bt(to,f$4,!0)):function(ao,lo){return Q&&lo&&Dt$1(ao)}(ro,io)?(eo.preventDefault(),Bt(to,f$4,!1)):function(ao,lo,uo,co){return ao===66&&!lo&&wt$1(uo,co)}(ro,so,io,oo)?(eo.preventDefault(),Bt(to,d$4,"bold")):function(ao,lo,uo,co){return ao===85&&!lo&&wt$1(uo,co)}(ro,so,io,oo)?(eo.preventDefault(),Bt(to,d$4,"underline")):function(ao,lo,uo,co){return ao===73&&!lo&&wt$1(uo,co)}(ro,so,io,oo)?(eo.preventDefault(),Bt(to,d$4,"italic")):function(ao,lo,uo,co){return ao===9&&!lo&&!uo&&!co}(ro,so,oo,io)?Bt(to,w$3,eo):function(ao,lo,uo,co){return ao===90&&!lo&&wt$1(uo,co)}(ro,no,io,oo)?(eo.preventDefault(),Bt(to,h$3,void 0)):function(ao,lo,uo,co){return Q?ao===90&&uo&&lo:ao===89&&co||ao===90&&co&&lo}(ro,no,io,oo)?(eo.preventDefault(),Bt(to,g$6,void 0)):Zr(to._editorState._selection)?function(ao,lo,uo,co){return!lo&&ao===67&&(Q?uo:co)}(ro,no,io,oo)?(eo.preventDefault(),Bt(to,M$3,eo)):function(ao,lo,uo,co){return!lo&&ao===88&&(Q?uo:co)}(ro,no,io,oo)?(eo.preventDefault(),Bt(to,W,eo)):It(ro,io,oo)&&(eo.preventDefault(),Bt(to,z$1,eo)):!X&&It(ro,io,oo)&&(eo.preventDefault(),Bt(to,z$1,eo)),function(ao,lo,uo,co){return ao||lo||uo||co}(oo,no,so,io)&&Bt(to,$$1,eo))}],["pointerdown",function(eo,to){const ro=eo.target,no=eo.pointerType;ro instanceof Node&&no!=="touch"&&Vi(to,()=>{Hi(at$1(ro))||(er=!0)})}],["compositionstart",function(eo,to){Vi(to,()=>{const ro=fi();if(Xr(ro)&&!to.isComposing()){const no=ro.anchor,oo=ro.anchor.getNode();ot(no.key),(eo.timeStamp{cr(to,eo.data)})}],["input",function(eo,to){eo.stopPropagation(),Vi(to,()=>{const ro=fi(),no=eo.data,oo=lr(eo);if(no!=null&&Xr(ro)&&ir(ro,oo,no,eo.timeStamp,!1)){nr&&(cr(to,no),nr=!1);const io=ro.anchor,so=io.getNode(),ao=nn(to._window);if(ao===null)return;const lo=io.offset;Y&&!ro.isCollapsed()&&Br(so)&&ao.anchorNode!==null&&so.getTextContent().slice(0,lo)+no+so.getTextContent().slice(lo+ro.focus.offset)===Tt(ao.anchorNode)||Bt(to,l$3,no);const uo=no.length;X&&uo>1&&eo.inputType==="insertCompositionText"&&!to.isComposing()&&(ro.anchor.offset-=uo),Z||G||re||!to.isComposing()||(qn=0,ot(null))}else St(!1,to,no!==null?no:void 0),nr&&(cr(to,no||void 0),nr=!1);Pi(),Re(Oi())}),Yn=null}],["click",function(eo,to){Vi(to,()=>{const ro=fi(),no=nn(to._window),oo=di();if(no){if(Xr(ro)){const io=ro.anchor,so=io.getNode();io.type==="element"&&io.offset===0&&ro.isCollapsed()&&!Yi(so)&&ht$1().getChildrenSize()===1&&so.getTopLevelElementOrThrow().isEmpty()&&oo!==null&&ro.is(oo)?(no.removeAllRanges(),ro.dirty=!0):eo.detail===3&&!ro.isCollapsed()&&so!==ro.focus.getNode()&&(qi(so)?so.select(0):so.getParentOrThrow().select(0))}else if(eo.pointerType==="touch"){const io=no.anchorNode;if(io!==null){const so=io.nodeType;(so===ie$2||so===se)&&_t(ai(oo,no,to,eo))}}}Bt(to,r$1,eo)})}],["cut",$n],["copy",$n],["dragstart",$n],["dragover",$n],["dragend",$n],["paste",$n],["focus",$n],["blur",$n],["drop",$n]];Y&&jn.push(["beforeinput",(eo,to)=>function(ro,no){const oo=ro.inputType,io=lr(ro);oo==="deleteCompositionText"||X&&zt(no)||oo!=="insertCompositionText"&&Vi(no,()=>{const so=fi();if(oo==="deleteContentBackward"){if(so===null){const po=di();if(!Xr(po))return;_t(po.clone())}if(Xr(so)){const po=so.anchor.key===so.focus.key;if(ao=ro.timeStamp,Qn===229&&ao{Vi(no,()=>{ot(null)})},Hn),Xr(so)){const go=so.anchor.getNode();go.markDirty(),so.format=go.getFormat(),Br(go)||H$1(142),so.style=go.getStyle()}}else{ot(null),ro.preventDefault();const go=so.anchor.getNode().getTextContent(),vo=so.anchor.offset===0&&so.focus.offset===go.length;ne&&po&&!vo||Bt(no,i$3,!0)}return}}var ao;if(!Xr(so))return;const lo=ro.data;Yn!==null&&St(!1,no,Yn),so.dirty&&Yn===null||!so.isCollapsed()||Yi(so.anchor.getNode())||io===null||so.applyDOMRange(io),Yn=null;const uo=so.anchor,co=so.focus,fo=uo.getNode(),ho=co.getNode();if(oo!=="insertText"&&oo!=="insertTranspose")switch(ro.preventDefault(),oo){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Bt(no,l$3,ro);break;case"insertFromComposition":ot(null),Bt(no,l$3,ro);break;case"insertLineBreak":ot(null),Bt(no,s$2,!1);break;case"insertParagraph":ot(null),tr&&!G?(tr=!1,Bt(no,s$2,!1)):Bt(no,o$5,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Bt(no,c$5,ro);break;case"deleteByComposition":(function(po,go){return po!==go||qi(po)||qi(go)||!po.isToken()||!go.isToken()})(fo,ho)&&Bt(no,u$5,ro);break;case"deleteByDrag":case"deleteByCut":Bt(no,u$5,ro);break;case"deleteContent":Bt(no,i$3,!1);break;case"deleteWordBackward":Bt(no,a$4,!0);break;case"deleteWordForward":Bt(no,a$4,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Bt(no,f$4,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Bt(no,f$4,!1);break;case"formatStrikeThrough":Bt(no,d$4,"strikethrough");break;case"formatBold":Bt(no,d$4,"bold");break;case"formatItalic":Bt(no,d$4,"italic");break;case"formatUnderline":Bt(no,d$4,"underline");break;case"historyUndo":Bt(no,h$3,void 0);break;case"historyRedo":Bt(no,g$6,void 0)}else{if(lo===` +`)ro.preventDefault(),Bt(no,s$2,!1);else if(lo===xe)ro.preventDefault(),Bt(no,o$5,void 0);else if(lo==null&&ro.dataTransfer){const po=ro.dataTransfer.getData("text/plain");ro.preventDefault(),so.insertRawText(po)}else lo!=null&&ir(so,io,lo,ro.timeStamp,!0)?(ro.preventDefault(),Bt(no,l$3,lo)):Yn=lo;Xn=ro.timeStamp}})}(eo,to)]);let qn=0,Qn=0,Xn=0,Yn=null;const Zn=new WeakMap;let Gn=!1,er=!1,tr=!1,nr=!1,rr=[0,"",0,"root",0];function ir(eo,to,ro,no,oo){const io=eo.anchor,so=eo.focus,ao=io.getNode(),lo=Oi(),uo=nn(lo._window),co=uo!==null?uo.anchorNode:null,fo=io.key,ho=lo.getElementByKey(fo),po=ro.length;return fo!==so.key||!Br(ao)||(!oo&&(!Y||Xn1||(oo||!Y)&&ho!==null&&!ao.isComposing()&&co!==et(ho)||uo!==null&&to!==null&&(!to.collapsed||to.startContainer!==uo.anchorNode||to.startOffset!==uo.anchorOffset)||ao.getFormat()!==eo.format||ao.getStyle()!==eo.style||Ct$1(eo,ao)}function sr(eo,to){return eo!==null&&eo.nodeValue!==null&&eo.nodeType===se&&to!==0&&to!==eo.nodeValue.length}function or(eo,to,ro){const{anchorNode:no,anchorOffset:oo,focusNode:io,focusOffset:so}=eo;Gn&&(Gn=!1,sr(no,oo)&&sr(io,so))||Vi(to,()=>{if(!ro)return void _t(null);if(!Xe(to,no,io))return;const ao=fi();if(Xr(ao)){const lo=ao.anchor,uo=lo.getNode();if(ao.isCollapsed()){eo.type==="Range"&&eo.anchorNode===eo.focusNode&&(ao.dirty=!0);const co=Ht(to).event,fo=co?co.timeStamp:performance.now(),[ho,po,go,vo,bo]=rr,xo=ht$1(),_o=to.isComposing()===!1&&xo.getTextContent()==="";fo{const uo=di(),co=ro.anchorNode;if(co===null)return;const fo=co.nodeType;fo!==ie$2&&fo!==se||_t(ai(uo,ro,no,eo))}));const oo=xt$1(no),io=oo[oo.length-1],so=io._key,ao=ar.get(so),lo=ao||io;lo!==no&&or(ro,lo,!1),or(ro,no,!0),no!==io?ar.set(so,no):ao&&ar.delete(so)}function dr(eo){eo._lexicalHandled=!0}function hr(eo){return eo._lexicalHandled===!0}function gr(eo){const to=eo.ownerDocument,ro=Zn.get(to);if(ro===void 0)throw Error("Root element not registered");Zn.set(to,ro-1),ro===1&&to.removeEventListener("selectionchange",fr);const no=eo.__lexicalEditor;no!=null&&(function(io){if(io._parentEditor!==null){const so=xt$1(io),ao=so[so.length-1]._key;ar.get(ao)===io&&ar.delete(ao)}else ar.delete(io._key)}(no),eo.__lexicalEditor=null);const oo=ur(eo);for(let io=0;iooo.__key===this.__key);return(Br(this)||!Xr(ro)||ro.anchor.type!=="element"||ro.focus.type!=="element"||ro.anchor.key!==ro.focus.key||ro.anchor.offset!==ro.focus.offset)&&no}getKey(){return this.__key}getIndexWithinParent(){const to=this.getParent();if(to===null)return-1;let ro=to.getFirstChild(),no=0;for(;ro!==null;){if(this.is(ro))return no;no++,ro=ro.getNextSibling()}return-1}getParent(){const to=this.getLatest().__parent;return to===null?null:ct$1(to)}getParentOrThrow(){const to=this.getParent();return to===null&&H$1(66,this.__key),to}getTopLevelElement(){let to=this;for(;to!==null;){const ro=to.getParent();if(Qt(ro))return qi(to)||H$1(138),to;to=ro}return null}getTopLevelElementOrThrow(){const to=this.getTopLevelElement();return to===null&&H$1(67,this.__key),to}getParents(){const to=[];let ro=this.getParent();for(;ro!==null;)to.push(ro),ro=ro.getParent();return to}getParentKeys(){const to=[];let ro=this.getParent();for(;ro!==null;)to.push(ro.__key),ro=ro.getParent();return to}getPreviousSibling(){const to=this.getLatest().__prev;return to===null?null:ct$1(to)}getPreviousSiblings(){const to=[],ro=this.getParent();if(ro===null)return to;let no=ro.getFirstChild();for(;no!==null&&!no.is(this);)to.push(no),no=no.getNextSibling();return to}getNextSibling(){const to=this.getLatest().__next;return to===null?null:ct$1(to)}getNextSiblings(){const to=[];let ro=this.getNextSibling();for(;ro!==null;)to.push(ro),ro=ro.getNextSibling();return to}getCommonAncestor(to){const ro=this.getParents(),no=to.getParents();qi(this)&&ro.unshift(this),qi(to)&&no.unshift(to);const oo=ro.length,io=no.length;if(oo===0||io===0||ro[oo-1]!==no[io-1])return null;const so=new Set(no);for(let ao=0;ao{ao.append(vo)})),Xr(no)){_t(no);const vo=no.anchor,bo=no.focus;vo.key===io&&Hr(vo,ao),bo.key===io&&Hr(bo,ao)}return lt$1()===io&&ot(so),ao}insertAfter(to,ro=!0){Pi(),Zt(this,to);const no=this.getWritable(),oo=to.getWritable(),io=oo.getParent(),so=fi();let ao=!1,lo=!1;if(io!==null){const po=to.getIndexWithinParent();if(it(oo),Xr(so)){const go=io.__key,vo=so.anchor,bo=so.focus;ao=vo.type==="element"&&vo.key===go&&vo.offset===po+1,lo=bo.type==="element"&&bo.key===go&&bo.offset===po+1}}const uo=this.getNextSibling(),co=this.getParentOrThrow().getWritable(),fo=oo.__key,ho=no.__next;if(uo===null?co.__last=fo:uo.getWritable().__prev=fo,co.__size++,no.__next=fo,oo.__next=ho,oo.__prev=no.__key,oo.__parent=no.__parent,ro&&Xr(so)){const po=this.getIndexWithinParent();hi(so,co,po+1);const go=co.__key;ao&&so.anchor.set(go,po+2,"element"),lo&&so.focus.set(go,po+2,"element")}return to}insertBefore(to,ro=!0){Pi(),Zt(this,to);const no=this.getWritable(),oo=to.getWritable(),io=oo.__key;it(oo);const so=this.getPreviousSibling(),ao=this.getParentOrThrow().getWritable(),lo=no.__prev,uo=this.getIndexWithinParent();so===null?ao.__first=io:so.getWritable().__next=io,ao.__size++,no.__prev=io,oo.__prev=lo,oo.__next=no.__key,oo.__parent=no.__parent;const co=fi();return ro&&Xr(co)&&hi(co,this.getParentOrThrow(),uo),to}isParentRequired(){return!1}createParentElementNode(){return rs()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(to,ro){Pi();const no=this.getPreviousSibling(),oo=this.getParentOrThrow();if(no===null)return oo.select(0,0);if(qi(no))return no.select();if(!Br(no)){const io=no.getIndexWithinParent()+1;return oo.select(io,io)}return no.select(to,ro)}selectNext(to,ro){Pi();const no=this.getNextSibling(),oo=this.getParentOrThrow();if(no===null)return oo.select();if(qi(no))return no.select(0,0);if(!Br(no)){const io=no.getIndexWithinParent();return oo.select(io,io)}return no.select(to,ro)}markDirty(){this.getWritable()}}class yr extends pr{static getType(){return"linebreak"}static clone(to){return new yr(to.__key)}constructor(to){super(to)}getTextContent(){return` +`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:to=>function(ro){const no=ro.parentElement;if(no!==null){const oo=no.firstChild;if(oo===ro||oo.nextSibling===ro&&Tr(oo)){const io=no.lastChild;if(io===ro||io.previousSibling===ro&&Tr(io))return!0}}return!1}(to)?null:{conversion:mr,priority:0}}}static importJSON(to){return xr()}exportJSON(){return{type:"linebreak",version:1}}}function mr(eo){return{node:xr()}}function xr(){return Yt(new yr)}function vr(eo){return eo instanceof yr}function Tr(eo){return eo.nodeType===se&&/^( |\t|\r?\n)+$/.test(eo.textContent||"")}function Sr(eo,to){return 16&to?"code":128&to?"mark":32&to?"sub":64&to?"sup":null}function kr(eo,to){return 1&to?"strong":2&to?"em":"span"}function Cr(eo,to,ro,no,oo){const io=no.classList;let so=At$1(oo,"base");so!==void 0&&io.add(...so),so=At$1(oo,"underlineStrikethrough");let ao=!1;const lo=to&ae&&to&ue;so!==void 0&&(ro&ae&&ro&ue?(ao=!0,lo||io.add(...so)):lo&&io.remove(...so));for(const uo in be){const co=be[uo];if(so=At$1(oo,uo),so!==void 0)if(ro&co){if(ao&&(uo==="underline"||uo==="strikethrough")){to&co&&io.remove(...so);continue}(!(to&co)||lo&&uo==="underline"||uo==="strikethrough")&&io.add(...so)}else to&co&&io.remove(...so)}}function br(eo,to,ro){const no=to.firstChild,oo=ro.isComposing(),io=eo+(oo?me:"");if(no==null)to.textContent=io;else{const so=no.nodeValue;if(so!==io)if(oo||X){const[ao,lo,uo]=function(co,fo){const ho=co.length,po=fo.length;let go=0,vo=0;for(;go({conversion:Ar,priority:0}),b:()=>({conversion:Dr,priority:0}),code:()=>({conversion:Wr,priority:0}),em:()=>({conversion:Wr,priority:0}),i:()=>({conversion:Wr,priority:0}),s:()=>({conversion:Wr,priority:0}),span:()=>({conversion:Pr,priority:0}),strong:()=>({conversion:Wr,priority:0}),sub:()=>({conversion:Wr,priority:0}),sup:()=>({conversion:Wr,priority:0}),u:()=>({conversion:Wr,priority:0})}}static importJSON(to){const ro=zr(to.text);return ro.setFormat(to.format),ro.setDetail(to.detail),ro.setMode(to.mode),ro.setStyle(to.style),ro}exportDOM(to){let{element:ro}=super.exportDOM(to);return ro!==null&&on(ro)||H$1(132),ro.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(ro=wr(ro,"b")),this.hasFormat("italic")&&(ro=wr(ro,"i")),this.hasFormat("strikethrough")&&(ro=wr(ro,"s")),this.hasFormat("underline")&&(ro=wr(ro,"u")),{element:ro}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(to,ro){}setFormat(to){const ro=this.getWritable();return ro.__format=typeof to=="string"?be[to]:to,ro}setDetail(to){const ro=this.getWritable();return ro.__detail=typeof to=="string"?Ne[to]:to,ro}setStyle(to){const ro=this.getWritable();return ro.__style=to,ro}toggleFormat(to){const ro=tt(this.getFormat(),to,null);return this.setFormat(ro)}toggleDirectionless(){const to=this.getWritable();return to.__detail^=1,to}toggleUnmergeable(){const to=this.getWritable();return to.__detail^=2,to}setMode(to){const ro=Pe[to];if(this.__mode===ro)return this;const no=this.getWritable();return no.__mode=ro,no}setTextContent(to){if(this.__text===to)return this;const ro=this.getWritable();return ro.__text=to,ro}select(to,ro){Pi();let no=to,oo=ro;const io=fi(),so=this.getTextContent(),ao=this.__key;if(typeof so=="string"){const lo=so.length;no===void 0&&(no=lo),oo===void 0&&(oo=lo)}else no=0,oo=0;if(!Xr(io))return li(ao,no,ao,oo,"text","text");{const lo=lt$1();lo!==io.anchor.key&&lo!==io.focus.key||ot(ao),io.setTextNodeRange(this,no,this,oo)}return io}selectStart(){return this.select(0,0)}selectEnd(){const to=this.getTextContentSize();return this.select(to,to)}spliceText(to,ro,no,oo){const io=this.getWritable(),so=io.__text,ao=no.length;let lo=to;lo<0&&(lo=ao+lo,lo<0&&(lo=0));const uo=fi();if(oo&&Xr(uo)){const fo=to+ao;uo.setTextNodeRange(io,fo,io,fo)}const co=so.slice(0,lo)+no+so.slice(lo+ro);return io.__text=co,io}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...to){Pi();const ro=this.getLatest(),no=ro.getTextContent(),oo=ro.__key,io=lt$1(),so=new Set(to),ao=[],lo=no.length;let uo="";for(let Co=0;CoSo&&Do.offset<=Mo&&(Do.key=No,Do.offset-=So,_o.dirty=!0),jo.key===oo&&jo.type==="text"&&jo.offset>So&&jo.offset<=Mo&&(jo.key=No,jo.offset-=So,_o.dirty=!0)}io===oo&&ot(No),So=Mo,Eo.push(Ro)}(function(Co){const Oo=Co.getPreviousSibling(),Ao=Co.getNextSibling();Oo!==null&&st$1(Oo),Ao!==null&&st$1(Ao)})(this);const To=ho.getWritable(),wo=this.getIndexWithinParent();return xo?(To.splice(wo,0,Eo),this.remove()):To.splice(wo,1,Eo),Xr(_o)&&hi(_o,ho,wo,co-1),Eo}mergeWithSibling(to){const ro=to===this.getPreviousSibling();ro||to===this.getNextSibling()||H$1(50);const no=this.__key,oo=to.__key,io=this.__text,so=io.length;lt$1()===oo&&ot(no);const ao=fi();if(Xr(ao)){const fo=ao.anchor,ho=ao.focus;fo!==null&&fo.key===oo&&(pi(fo,ro,no,to,so),ao.dirty=!0),ho!==null&&ho.key===oo&&(pi(ho,ro,no,to,so),ao.dirty=!0)}const lo=to.__text,uo=ro?lo+io:io+lo;this.setTextContent(uo);const co=this.getWritable();return to.remove(),co}isTextEntity(){return!1}}function Pr(eo){const to=eo,ro=to.style.fontWeight==="700",no=to.style.textDecoration==="line-through",oo=to.style.fontStyle==="italic",io=to.style.textDecoration==="underline",so=to.style.verticalAlign;return{forChild:ao=>(Br(ao)&&(ro&&ao.toggleFormat("bold"),no&&ao.toggleFormat("strikethrough"),oo&&ao.toggleFormat("italic"),io&&ao.toggleFormat("underline"),so==="sub"&&ao.toggleFormat("subscript"),so==="super"&&ao.toggleFormat("superscript")),ao),node:null}}function Dr(eo){const to=eo.style.fontWeight==="normal";return{forChild:ro=>(Br(ro)&&!to&&ro.toggleFormat("bold"),ro),node:null}}const Ir=new WeakMap;function Or(eo){return eo.nodeName==="PRE"||eo.nodeType===ie$2&&eo.style!==void 0&&eo.style.whiteSpace!==void 0&&eo.style.whiteSpace.startsWith("pre")}function Ar(eo){const to=eo;eo.parentElement===null&&H$1(129);let ro=to.textContent||"";if(function(no){let oo,io=no.parentNode;const so=[no];for(;io!==null&&(oo=Ir.get(io))===void 0&&!Or(io);)so.push(io),io=io.parentNode;const ao=oo===void 0?io:oo;for(let lo=0;lo0){/[ \t\n]$/.test(io)&&(ro=ro.slice(1)),oo=!1;break}}oo&&(ro=ro.slice(1))}if(ro[ro.length-1]===" "){let no=to,oo=!0;for(;no!==null&&(no=Fr(no,!0))!==null;)if((no.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){oo=!1;break}oo&&(ro=ro.slice(0,ro.length-1))}return ro===""?{node:null}:{node:zr(ro)}}const Lr=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function Fr(eo,to){let ro=eo;for(;;){let no;for(;(no=to?ro.nextSibling:ro.previousSibling)===null;){const io=ro.parentElement;if(io===null)return null;ro=io}if(ro=no,ro.nodeType===ie$2){const io=ro.style.display;if(io===""&&ro.nodeName.match(Lr)===null||io!==""&&!io.startsWith("inline"))return null}let oo=ro;for(;(oo=to?ro.firstChild:ro.lastChild)!==null;)ro=oo;if(ro.nodeType===se)return ro;if(ro.nodeName==="BR")return null}}const Mr={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Wr(eo){const to=Mr[eo.nodeName.toLowerCase()];return to===void 0?{node:null}:{forChild:ro=>(Br(ro)&&!ro.hasFormat(to)&&ro.toggleFormat(to),ro),node:null}}function zr(eo=""){return Yt(new Er(eo))}function Br(eo){return eo instanceof Er}class Rr extends Er{static getType(){return"tab"}static clone(to){const ro=new Rr(to.__key);return ro.__text=to.__text,ro.__format=to.__format,ro.__style=to.__style,ro}constructor(to){super(" ",to),this.__detail=2}static importDOM(){return null}static importJSON(to){const ro=Kr();return ro.setFormat(to.format),ro.setStyle(to.style),ro}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(to){H$1(126)}setDetail(to){H$1(127)}setMode(to){H$1(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Kr(){return Yt(new Rr)}function Jr(eo){return eo instanceof Rr}class Ur{constructor(to,ro,no){this._selection=null,this.key=to,this.offset=ro,this.type=no}is(to){return this.key===to.key&&this.offset===to.offset&&this.type===to.type}isBefore(to){let ro=this.getNode(),no=to.getNode();const oo=this.offset,io=to.offset;if(qi(ro)){const so=ro.getDescendantByIndex(oo);ro=so??ro}if(qi(no)){const so=no.getDescendantByIndex(io);no=so??no}return ro===no?ooio&&(no=io)}else if(!qi(to)){const io=to.getNextSibling();if(Br(io))ro=io.__key,no=0,oo="text";else{const so=to.getParent();so&&(ro=so.__key,no=to.getIndexWithinParent()+1)}}eo.set(ro,no,oo)}function Hr(eo,to){if(qi(to)){const ro=to.getLastDescendant();qi(ro)||Br(ro)?$r(eo,ro):$r(eo,to)}else $r(eo,to)}function jr(eo,to,ro,no){const oo=eo.getNode(),io=oo.getChildAtIndex(eo.offset),so=zr(),ao=Yi(oo)?rs().append(so):so;so.setFormat(ro),so.setStyle(no),io===null?oo.append(ao):io.insertBefore(ao),eo.is(to)&&to.set(so.__key,0,"text"),eo.set(so.__key,0,"text")}function qr(eo,to,ro,no){eo.key=to,eo.offset=ro,eo.type=no}class Qr{constructor(to){this._cachedNodes=null,this._nodes=to,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(to){this._cachedNodes=to}is(to){if(!Zr(to))return!1;const ro=this._nodes,no=to._nodes;return ro.size===no.size&&Array.from(ro).every(oo=>no.has(oo))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(to){this.dirty=!0,this._nodes.add(to),this._cachedNodes=null}delete(to){this.dirty=!0,this._nodes.delete(to),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(to){return this._nodes.has(to)}clone(){return new Qr(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(to){}insertText(){}insertNodes(to){const ro=this.getNodes(),no=ro.length,oo=ro[no-1];let io;if(Br(oo))io=oo.select();else{const so=oo.getIndexWithinParent()+1;io=oo.getParentOrThrow().select(so,so)}io.insertNodes(to);for(let so=0;so0?[]:[ao]:ao.getNodesBetween(lo),Ei()||(this._cachedNodes=fo),fo}setTextNodeRange(to,ro,no,oo){qr(this.anchor,to.__key,ro,"text"),qr(this.focus,no.__key,oo,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const to=this.getNodes();if(to.length===0)return"";const ro=to[0],no=to[to.length-1],oo=this.anchor,io=this.focus,so=oo.isBefore(io),[ao,lo]=ei(this);let uo="",co=!0;for(let fo=0;fo=0;Oo--){const Ao=So[Oo];if(Ao.is(ho)||qi(Ao)&&Ao.isParentOf(ho))break;Ao.isAttached()&&(!To.has(Ao)||Ao.is(Eo)?wo||Co.insertAfter(Ao,!1):Ao.remove())}if(!wo){let Oo=_o,Ao=null;for(;Oo!==null;){const Ro=Oo.getChildren(),No=Ro.length;(No===0||Ro[No-1].is(Ao))&&(bo.delete(Oo.__key),Ao=Oo),Oo=Oo.getParent()}}if(ho.isToken())if(co===po)ho.select();else{const Oo=zr(to);Oo.select(),ho.replace(Oo)}else ho=ho.spliceText(co,po-co,to,!0),ho.getTextContent()===""?ho.remove():ho.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=to.length);for(let Oo=1;Oo0&&(bo!==vo.getTextContentSize()&&([vo]=vo.splitText(bo)),vo.setFormat(xo));for(let _o=co+1;_o(qi(go)||Hi(go))&&!go.isInline())){qi(ro)||H$1(135);const go=vi(this);return ro.splice(go,0,to),void no.selectEnd()}const oo=function(go){const vo=rs();let bo=null;for(let xo=0;xo"__value"in go&&"__checked"in go,lo=!qi(ro)||!ro.isEmpty()?this.insertParagraph():null,uo=so[so.length-1];let co=so[0];var fo;qi(fo=co)&&ln(fo)&&!fo.isEmpty()&&qi(ro)&&(!ro.isEmpty()||ao(ro))&&(qi(ro)||H$1(135),ro.append(...co.getChildren()),co=so[1]),co&&function(go,vo,bo){const xo=bo||vo.getParentOrThrow().getLastChild();let _o=vo;const Eo=[vo];for(;_o!==xo;)_o.getNextSibling()||H$1(140),_o=_o.getNextSibling(),Eo.push(_o);let So=go;for(const To of Eo)So=So.insertAfter(To)}(ro,co);const ho=cn(io,ln);lo&&qi(ho)&&(ao(lo)||ln(uo))&&(ho.append(...lo.getChildren()),lo.remove()),qi(ro)&&ro.isEmpty()&&ro.remove(),io.selectEnd();const po=qi(ro)?ro.getLastChild():null;vr(po)&&ho!==ro&&po.remove()}insertParagraph(){if(this.anchor.key==="root"){const so=rs();return ht$1().splice(this.anchor.offset,0,[so]),so.select(),so}const to=vi(this),ro=cn(this.anchor.getNode(),ln);qi(ro)||H$1(136);const no=ro.getChildAtIndex(to),oo=no?[no,...no.getNextSiblings()]:[],io=ro.insertNewAfter(this,!1);return io?(io.append(...oo),io.selectStart(),io):null}insertLineBreak(to){const ro=xr();if(this.insertNodes([ro]),to){const no=ro.getParentOrThrow(),oo=ro.getIndexWithinParent();no.select(oo,oo)}}extract(){const to=this.getNodes(),ro=to.length,no=ro-1,oo=this.anchor,io=this.focus;let so=to[0],ao=to[no];const[lo,uo]=ei(this);if(ro===0)return[];if(ro===1){if(Br(so)&&!this.isCollapsed()){const fo=lo>uo?uo:lo,ho=lo>uo?lo:uo,po=so.splitText(fo,ho),go=fo===0?po[0]:po[1];return go!=null?[go]:[]}return[so]}const co=oo.isBefore(io);if(Br(so)){const fo=co?lo:uo;fo===so.getTextContentSize()?to.shift():fo!==0&&([,so]=so.splitText(fo),to[0]=so)}if(Br(ao)){const fo=ao.getTextContent().length,ho=co?uo:lo;ho===0?to.pop():ho!==fo&&([ao]=ao.splitText(ho),to[no]=ao)}return to}modify(to,ro,no){const oo=this.focus,io=this.anchor,so=to==="move",ao=Wt(oo,ro);if(Hi(ao)&&!ao.isIsolated()){if(so&&ao.isKeyboardSelectable()){const po=ui();return po.add(ao.__key),void _t(po)}const ho=ro?ao.getPreviousSibling():ao.getNextSibling();if(Br(ho)){const po=ho.__key,go=ro?ho.getTextContent().length:0;return oo.set(po,go,"text"),void(so&&io.set(po,go,"text"))}{const po=ao.getParentOrThrow();let go,vo;return qi(ho)?(vo=ho.__key,go=ro?ho.getChildrenSize():0):(go=ao.getIndexWithinParent(),vo=po.__key,ro||go++),oo.set(vo,go,"element"),void(so&&io.set(vo,go,"element"))}}const lo=Oi(),uo=nn(lo._window);if(!uo)return;const co=lo._blockCursorElement,fo=lo._rootElement;if(fo===null||co===null||!qi(ao)||ao.isInline()||ao.canBeEmpty()||en(co,lo,fo),function(ho,po,go,vo){ho.modify(po,go,vo)}(uo,to,ro?"backward":"forward",no),uo.rangeCount>0){const ho=uo.getRangeAt(0),po=this.anchor.getNode(),go=Yi(po)?po:qt(po);if(this.applyDOMRange(ho),this.dirty=!0,!so){const vo=this.getNodes(),bo=[];let xo=!1;for(let _o=0;_o0)if(ro){const _o=bo[0];qi(_o)?_o.selectStart():_o.getParentOrThrow().selectStart()}else{const _o=bo[bo.length-1];qi(_o)?_o.selectEnd():_o.getParentOrThrow().selectEnd()}uo.anchorNode===ho.startContainer&&uo.anchorOffset===ho.startOffset||function(_o){const Eo=_o.focus,So=_o.anchor,To=So.key,wo=So.offset,Co=So.type;qr(So,Eo.key,Eo.offset,Eo.type),qr(Eo,To,wo,Co),_o._cachedNodes=null}(this)}}}forwardDeletion(to,ro,no){if(!no&&(to.type==="element"&&qi(ro)&&to.offset===ro.getChildrenSize()||to.type==="text"&&to.offset===ro.getTextContentSize())){const oo=ro.getParent(),io=ro.getNextSibling()||(oo===null?null:oo.getNextSibling());if(qi(io)&&io.isShadowRoot())return!0}return!1}deleteCharacter(to){const ro=this.isCollapsed();if(this.isCollapsed()){const no=this.anchor;let oo=no.getNode();if(this.forwardDeletion(no,oo,to))return;const io=this.focus,so=Wt(io,to);if(Hi(so)&&!so.isIsolated()){if(so.isKeyboardSelectable()&&qi(oo)&&oo.getChildrenSize()===0){oo.remove();const ao=ui();ao.add(so.__key),_t(ao)}else so.remove(),Oi().dispatchCommand(t$4,void 0);return}if(!to&&qi(so)&&qi(oo)&&oo.isEmpty())return oo.remove(),void so.selectStart();if(this.modify("extend",to,"character"),this.isCollapsed()){if(to&&no.offset===0&&(no.type==="element"?no.getNode():no.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const ao=io.type==="text"?io.getNode():null;if(oo=no.type==="text"?no.getNode():null,ao!==null&&ao.isSegmented()){const lo=io.offset,uo=ao.getTextContentSize();if(ao.is(oo)||to&&lo!==uo||!to&&lo!==0)return void ti(ao,to,lo)}else if(oo!==null&&oo.isSegmented()){const lo=no.offset,uo=oo.getTextContentSize();if(oo.is(ao)||to&&lo!==0||!to&&lo!==uo)return void ti(oo,to,lo)}(function(lo,uo){const co=lo.anchor,fo=lo.focus,ho=co.getNode(),po=fo.getNode();if(ho===po&&co.type==="text"&&fo.type==="text"){const go=co.offset,vo=fo.offset,bo=goro||co){oo.splice(uo,1),co&&(ao=void 0);break}}const lo=oo.join("").trim();lo===""?no.remove():(no.setTextContent(lo),no.select(ao,ao))}function ni(eo,to,ro,no){let oo,io=to;if(eo.nodeType===ie$2){let so=!1;const ao=eo.childNodes,lo=ao.length;io===lo&&(so=!0,io=lo-1);let uo=ao[io],co=!1;if(uo===no._blockCursorElement?(uo=ao[io+1],co=!0):no._blockCursorElement!==null&&io--,oo=pt$1(uo),Br(oo))io=yt$1(oo,so);else{let fo=pt$1(eo);if(fo===null)return null;if(qi(fo)){let ho=fo.getChildAtIndex(io);if(qi(ho)&&function(po,go,vo){const bo=po.getParent();return vo===null||bo===null||!bo.canBeEmpty()||bo!==vo.getNode()}(ho,0,ro)){const po=so?ho.getLastDescendant():ho.getFirstDescendant();po===null?(fo=ho,io=0):(ho=po,fo=qi(ho)?ho:ho.getParentOrThrow())}Br(ho)?(oo=ho,fo=null,io=yt$1(ho,so)):ho!==fo&&so&&!co&&io++}else{const ho=fo.getIndexWithinParent();io=to===0&&Hi(fo)&&pt$1(eo)===fo?ho:ho+1,fo=fo.getParentOrThrow()}if(qi(fo))return Vr(fo.__key,io,"element")}}else oo=pt$1(eo);return Br(oo)?Vr(oo.__key,io,"text"):null}function ri(eo,to,ro){const no=eo.offset,oo=eo.getNode();if(no===0){const io=oo.getPreviousSibling(),so=oo.getParent();if(to){if((ro||!to)&&io===null&&qi(so)&&so.isInline()){const ao=so.getPreviousSibling();Br(ao)&&(eo.key=ao.__key,eo.offset=ao.getTextContent().length)}}else qi(io)&&!ro&&io.isInline()?(eo.key=io.__key,eo.offset=io.getChildrenSize(),eo.type="element"):Br(io)&&(eo.key=io.__key,eo.offset=io.getTextContent().length)}else if(no===oo.getTextContent().length){const io=oo.getNextSibling(),so=oo.getParent();if(to&&qi(io)&&io.isInline())eo.key=io.__key,eo.offset=0,eo.type="element";else if((ro||to)&&io===null&&qi(so)&&so.isInline()&&!so.canInsertTextAfter()){const ao=so.getNextSibling();Br(ao)&&(eo.key=ao.__key,eo.offset=0)}}}function ii(eo,to,ro){if(eo.type==="text"&&to.type==="text"){const no=eo.isBefore(to),oo=eo.is(to);ri(eo,no,oo),ri(to,!no,oo),oo&&(to.key=eo.key,to.offset=eo.offset,to.type=eo.type);const io=Oi();if(io.isComposing()&&io._compositionKey!==eo.key&&Xr(ro)){const so=ro.anchor,ao=ro.focus;qr(eo,so.key,so.offset,so.type),qr(to,ao.key,ao.offset,ao.type)}}}function si(eo,to,ro,no,oo,io){if(eo===null||ro===null||!Xe(oo,eo,ro))return null;const so=ni(eo,to,Xr(io)?io.anchor:null,oo);if(so===null)return null;const ao=ni(ro,no,Xr(io)?io.focus:null,oo);if(ao===null)return null;if(so.type==="element"&&ao.type==="element"){const lo=pt$1(eo),uo=pt$1(ro);if(Hi(lo)&&Hi(uo))return null}return ii(so,ao,io),[so,ao]}function oi(eo){return qi(eo)&&!eo.isInline()}function li(eo,to,ro,no,oo,io){const so=Ii(),ao=new Yr(Vr(eo,to,oo),Vr(ro,no,io),0,"");return ao.dirty=!0,so._selection=ao,ao}function ci(){const eo=Vr("root",0,"element"),to=Vr("root",0,"element");return new Yr(eo,to,0,"")}function ui(){return new Qr(new Set)}function ai(eo,to,ro,no){const oo=ro._window;if(oo===null)return null;const io=no||oo.event,so=io?io.type:void 0,ao=so==="selectionchange",lo=!Ae&&(ao||so==="beforeinput"||so==="compositionstart"||so==="compositionend"||so==="click"&&io&&io.detail===3||so==="drop"||so===void 0);let uo,co,fo,ho;if(Xr(eo)&&!lo)return eo.clone();if(to===null)return null;if(uo=to.anchorNode,co=to.focusNode,fo=to.anchorOffset,ho=to.focusOffset,ao&&Xr(eo)&&!Xe(ro,uo,co))return eo.clone();const po=si(uo,fo,co,ho,ro,eo);if(po===null)return null;const[go,vo]=po;return new Yr(go,vo,Xr(eo)?eo.format:0,Xr(eo)?eo.style:"")}function fi(){return Ii()._selection}function di(){return Oi()._editorState._selection}function hi(eo,to,ro,no=1){const oo=eo.anchor,io=eo.focus,so=oo.getNode(),ao=io.getNode();if(!to.is(so)&&!to.is(ao))return;const lo=to.__key;if(eo.isCollapsed()){const uo=oo.offset;if(ro<=uo&&no>0||ro0||ro0||ro=ao,uo=lo?io.getChildAtIndex(ao-1):io.getChildAtIndex(ro);if(Br(uo)){let co=0;lo&&(co=uo.getTextContentSize()),to.set(uo.__key,co,"text"),no.set(uo.__key,co,"text")}}else{if(qi(io)){const ao=io.getChildrenSize(),lo=ro>=ao,uo=lo?io.getChildAtIndex(ao-1):io.getChildAtIndex(ro);if(Br(uo)){let co=0;lo&&(co=uo.getTextContentSize()),to.set(uo.__key,co,"text")}}if(qi(so)){const ao=so.getChildrenSize(),lo=oo>=ao,uo=lo?so.getChildAtIndex(ao-1):so.getChildAtIndex(oo);if(Br(uo)){let co=0;lo&&(co=uo.getTextContentSize()),no.set(uo.__key,co,"text")}}}}function _i(eo,to,ro,no,oo){let io=null,so=0,ao=null;no!==null?(io=no.__key,Br(no)?(so=no.getTextContentSize(),ao="text"):qi(no)&&(so=no.getChildrenSize(),ao="element")):oo!==null&&(io=oo.__key,Br(oo)?ao="text":qi(oo)&&(ao="element")),io!==null&&ao!==null?eo.set(io,so,ao):(so=to.getIndexWithinParent(),so===-1&&(so=ro.getChildrenSize()),eo.set(ro.__key,so,"element"))}function pi(eo,to,ro,no,oo){eo.type==="text"?(eo.key=ro,to||(eo.offset+=oo)):eo.offset>no.getIndexWithinParent()&&(eo.offset-=1)}function yi(eo,to,ro,no,oo,io,so){const ao=no.anchorNode,lo=no.focusNode,uo=no.anchorOffset,co=no.focusOffset,fo=document.activeElement;if(oo.has("collaboration")&&fo!==io||fo!==null&&Qe(fo))return;if(!Xr(to))return void(eo!==null&&Xe(ro,ao,lo)&&no.removeAllRanges());const ho=to.anchor,po=to.focus,go=ho.key,vo=po.key,bo=Kt(ro,go),xo=Kt(ro,vo),_o=ho.offset,Eo=po.offset,So=to.format,To=to.style,wo=to.isCollapsed();let Co=bo,Oo=xo,Ao=!1;if(ho.type==="text"){Co=et(bo);const Fo=ho.getNode();Ao=Fo.getFormat()!==So||Fo.getStyle()!==To}else Xr(eo)&&eo.anchor.type==="text"&&(Ao=!0);var Ro,No,Mo,Do,jo;if(po.type==="text"&&(Oo=et(xo)),Co!==null&&Oo!==null&&(wo&&(eo===null||Ao||Xr(eo)&&(eo.format!==So||eo.style!==To))&&(Ro=So,No=To,Mo=_o,Do=go,jo=performance.now(),rr=[Ro,No,Mo,Do,jo]),uo!==_o||co!==Eo||ao!==Co||lo!==Oo||no.type==="Range"&&wo||(fo!==null&&io.contains(fo)||io.focus({preventScroll:!0}),ho.type==="element"))){try{no.setBaseAndExtent(Co,_o,Oo,Eo)}catch{}if(!oo.has("skip-scroll-into-view")&&to.isCollapsed()&&io!==null&&io===document.activeElement){const Fo=to instanceof Yr&&to.anchor.type==="element"?Co.childNodes[_o]||null:no.rangeCount>0?no.getRangeAt(0):null;if(Fo!==null){let $o;if(Fo instanceof Text){const Lo=document.createRange();Lo.selectNode(Fo),$o=Lo.getBoundingClientRect()}else $o=Fo.getBoundingClientRect();(function(Lo,Ho,qo){const Uo=qo.ownerDocument,Yo=Uo.defaultView;if(Yo===null)return;let{top:Zo,bottom:_s}=Ho,Ss=0,As=0,Ns=qo;for(;Ns!==null;){const ws=Ns===Uo.body;if(ws)Ss=0,As=Ht(Lo).innerHeight;else{const Jo=Ns.getBoundingClientRect();Ss=Jo.top,As=Jo.bottom}let Ds=0;if(ZoAs&&(Ds=_s-As),Ds!==0)if(ws)Yo.scrollBy(0,Ds);else{const Jo=Ns.scrollTop;Ns.scrollTop+=Ds;const Cs=Ns.scrollTop-Jo;Zo-=Cs,_s-=Cs}if(ws)break;Ns=Jt(Ns)}})(ro,$o,io)}}Gn=!0}}function mi(eo){let to=fi()||di();to===null&&(to=ht$1().selectEnd()),to.insertNodes(eo)}function xi(){const eo=fi();return eo===null?"":eo.getTextContent()}function vi(eo){eo.isCollapsed()||eo.removeText();const to=eo.anchor;let ro=to.getNode(),no=to.offset;for(;!ln(ro);)[ro,no]=Ti(ro,no);return no}function Ti(eo,to){const ro=eo.getParent();if(!ro){const oo=rs();return ht$1().append(oo),oo.select(),[ht$1(),0]}if(Br(eo)){const oo=eo.splitText(to);if(oo.length===0)return[ro,eo.getIndexWithinParent()];const io=to===0?0:1;return[ro,oo[0].getIndexWithinParent()+io]}if(!qi(eo)||to===0)return[ro,eo.getIndexWithinParent()];const no=eo.getChildAtIndex(to);if(no){const oo=new Yr(Vr(eo.__key,to,"element"),Vr(eo.__key,to,"element"),0,""),io=eo.insertNewAfter(oo);io&&io.append(no,...no.getNextSiblings())}return[ro,eo.getIndexWithinParent()+1]}let Si=null,ki=null,Ci=!1,bi=!1,Ni=0;const wi={characterData:!0,childList:!0,subtree:!0};function Ei(){return Ci||Si!==null&&Si._readOnly}function Pi(){Ci&&H$1(13)}function Di(){Ni>99&&H$1(14)}function Ii(){return Si===null&&H$1(15),Si}function Oi(){return ki===null&&H$1(16),ki}function Ai(){return ki}function Li(eo,to,ro){const no=to.__type,oo=function(ao,lo){const uo=ao._nodes.get(lo);return uo===void 0&&H$1(30,lo),uo}(eo,no);let io=ro.get(no);io===void 0&&(io=Array.from(oo.transforms),ro.set(no,io));const so=io.length;for(let ao=0;ao{oo=Ki(eo,to,ro)}),oo}const no=xt$1(eo);for(let oo=4;oo>=0;oo--)for(let io=0;io0||Mo>0;){if(Ro>0){Eo._dirtyLeaves=new Set;for(const Do of Ao){const jo=wo.get(Do);Br(jo)&&jo.isAttached()&&jo.isSimpleText()&&!jo.isUnmergeable()&&Ve(jo),jo!==void 0&&Fi(jo,Co)&&Li(Eo,jo,Oo),So.add(Do)}if(Ao=Eo._dirtyLeaves,Ro=Ao.size,Ro>0){Ni++;continue}}Eo._dirtyLeaves=new Set,Eo._dirtyElements=new Map;for(const Do of No){const jo=Do[0],Fo=Do[1];if(jo!=="root"&&!Fo)continue;const $o=wo.get(jo);$o!==void 0&&Fi($o,Co)&&Li(Eo,$o,Oo),To.set(jo,Fo)}Ao=Eo._dirtyLeaves,Ro=Ao.size,No=Eo._dirtyElements,Mo=No.size,Ni++}Eo._dirtyLeaves=So,Eo._dirtyElements=To}(uo,eo),Ji(eo),function(_o,Eo,So,To){const wo=_o._nodeMap,Co=Eo._nodeMap,Oo=[];for(const[Ao]of To){const Ro=Co.get(Ao);Ro!==void 0&&(Ro.isAttached()||(qi(Ro)&&an(Ro,Ao,wo,Co,Oo,To),wo.has(Ao)||To.delete(Ao),Oo.push(Ao)))}for(const Ao of Oo)Co.delete(Ao);for(const Ao of So){const Ro=Co.get(Ao);Ro===void 0||Ro.isAttached()||(wo.has(Ao)||So.delete(Ao),Co.delete(Ao))}}(lo,uo,eo._dirtyLeaves,eo._dirtyElements)),bo!==eo._compositionKey&&(uo._flushSync=!0);const xo=uo._selection;if(Xr(xo)){const _o=uo._nodeMap,Eo=xo.anchor.key,So=xo.focus.key;_o.get(Eo)!==void 0&&_o.get(So)!==void 0||H$1(19)}else Zr(xo)&&xo._nodes.size===0&&(uo._selection=null)}catch(bo){return bo instanceof Error&&eo._onError(bo),eo._pendingEditorState=lo,eo._dirtyType=ce,eo._cloneNotNeeded.clear(),eo._dirtyLeaves=new Set,eo._dirtyElements.clear(),void Bi(eo)}finally{Si=fo,Ci=ho,ki=po,eo._updating=go,Ni=0}eo._dirtyType!==oe||function(bo,xo){const _o=xo.getEditorState()._selection,Eo=bo._selection;if(Eo!==null){if(Eo.dirty||!Eo.is(_o))return!0}else if(_o!==null)return!0;return!1}(uo,eo)?uo._flushSync?(uo._flushSync=!1,Bi(eo)):co&&qe(()=>{Bi(eo)}):(uo._flushSync=!1,co&&(no.clear(),eo._deferred=[],eo._pendingEditorState=null))}function Vi(eo,to,ro){eo._updating?eo._updates.push([to,ro]):Ui(eo,to,ro)}class $i extends pr{constructor(to){super(to)}decorate(to,ro){H$1(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Hi(eo){return eo instanceof $i}class ji extends pr{constructor(to){super(to),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const to=this.getFormat();return Ee[to]||""}getIndent(){return this.getLatest().__indent}getChildren(){const to=[];let ro=this.getFirstChild();for(;ro!==null;)to.push(ro),ro=ro.getNextSibling();return to}getChildrenKeys(){const to=[];let ro=this.getFirstChild();for(;ro!==null;)to.push(ro.__key),ro=ro.getNextSibling();return to}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const to=Oi()._dirtyElements;return to!==null&&to.has(this.__key)}isLastChild(){const to=this.getLatest(),ro=this.getParentOrThrow().getLastChild();return ro!==null&&ro.is(to)}getAllTextNodes(){const to=[];let ro=this.getFirstChild();for(;ro!==null;){if(Br(ro)&&to.push(ro),qi(ro)){const no=ro.getAllTextNodes();to.push(...no)}ro=ro.getNextSibling()}return to}getFirstDescendant(){let to=this.getFirstChild();for(;qi(to);){const ro=to.getFirstChild();if(ro===null)break;to=ro}return to}getLastDescendant(){let to=this.getLastChild();for(;qi(to);){const ro=to.getLastChild();if(ro===null)break;to=ro}return to}getDescendantByIndex(to){const ro=this.getChildren(),no=ro.length;if(to>=no){const io=ro[no-1];return qi(io)&&io.getLastDescendant()||io||null}const oo=ro[to];return qi(oo)&&oo.getFirstDescendant()||oo||null}getFirstChild(){const to=this.getLatest().__first;return to===null?null:ct$1(to)}getFirstChildOrThrow(){const to=this.getFirstChild();return to===null&&H$1(45,this.__key),to}getLastChild(){const to=this.getLatest().__last;return to===null?null:ct$1(to)}getLastChildOrThrow(){const to=this.getLastChild();return to===null&&H$1(96,this.__key),to}getChildAtIndex(to){const ro=this.getChildrenSize();let no,oo;if(to=to;){if(oo===to)return no;no=no.getPreviousSibling(),oo--}return null}getTextContent(){let to="";const ro=this.getChildren(),no=ro.length;for(let oo=0;ooro.remove()),to}append(...to){return this.splice(this.getChildrenSize(),0,to)}setDirection(to){const ro=this.getWritable();return ro.__dir=to,ro}setFormat(to){return this.getWritable().__format=to!==""?we[to]:0,this}setIndent(to){return this.getWritable().__indent=to,this}splice(to,ro,no){const oo=no.length,io=this.getChildrenSize(),so=this.getWritable(),ao=so.__key,lo=[],uo=[],co=this.getChildAtIndex(to+ro);let fo=null,ho=io-ro+oo;if(to!==0)if(to===io)fo=this.getLastChild();else{const go=this.getChildAtIndex(to);go!==null&&(fo=go.getPreviousSibling())}if(ro>0){let go=fo===null?this.getFirstChild():fo.getNextSibling();for(let vo=0;vo({root:Gi(ht$1())}))}}class ts extends ji{static getType(){return"paragraph"}static clone(to){return new ts(to.__key)}createDOM(to){const ro=document.createElement("p"),no=At$1(to.theme,"paragraph");return no!==void 0&&ro.classList.add(...no),ro}updateDOM(to,ro,no){return!1}static importDOM(){return{p:to=>({conversion:ns,priority:0})}}exportDOM(to){const{element:ro}=super.exportDOM(to);if(ro&&on(ro)){this.isEmpty()&&ro.append(document.createElement("br"));const no=this.getFormatType();ro.style.textAlign=no;const oo=this.getDirection();oo&&(ro.dir=oo);const io=this.getIndent();io>0&&(ro.style.textIndent=20*io+"px")}return{element:ro}}static importJSON(to){const ro=rs();return ro.setFormat(to.format),ro.setIndent(to.indent),ro.setDirection(to.direction),ro}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(to,ro){const no=rs(),oo=this.getDirection();return no.setDirection(oo),this.insertAfter(no,ro),no}collapseAtStart(){const to=this.getChildren();if(to.length===0||Br(to[0])&&to[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function ns(eo){const to=rs();if(eo.style){to.setFormat(eo.style.textAlign);const ro=parseInt(eo.style.textIndent,10)/20;ro>0&&to.setIndent(ro)}return{node:to}}function rs(){return Yt(new ts)}function is(eo){return eo instanceof ts}const ss=0,os=1,ls=2,cs=3,us=4;function as(eo,to,ro,no){const oo=eo._keyToDOMMap;oo.clear(),eo._editorState=Zi(),eo._pendingEditorState=no,eo._compositionKey=null,eo._dirtyType=oe,eo._cloneNotNeeded.clear(),eo._dirtyLeaves=new Set,eo._dirtyElements.clear(),eo._normalizedNodes=new Set,eo._updateTags=new Set,eo._updates=[],eo._blockCursorElement=null;const io=eo._observer;io!==null&&(io.disconnect(),eo._observer=null),to!==null&&(to.textContent=""),ro!==null&&(ro.textContent="",oo.set("root",ro))}function fs(eo){const to=eo||{},ro=Ai(),no=to.theme||{},oo=eo===void 0?ro:to.parentEditor||null,io=to.disableEvents||!1,so=Zi(),ao=to.namespace||(oo!==null?oo._config.namespace:vt$1()),lo=to.editorState,uo=[Xi,Er,yr,Rr,ts,...to.nodes||[]],{onError:co,html:fo}=to,ho=to.editable===void 0||to.editable;let po;if(eo===void 0&&ro!==null)po=ro._nodes;else{po=new Map;for(let vo=0;vo{Object.keys(So).forEach(To=>{let wo=xo.get(To);wo===void 0&&(wo=[],xo.set(To,wo)),wo.push(So[To])})};return vo.forEach(So=>{const To=So.klass.importDOM;if(To==null||_o.has(To))return;_o.add(To);const wo=To.call(So.klass);wo!==null&&Eo(wo)}),bo&&Eo(bo),xo}(po,fo?fo.import:void 0),ho);return lo!==void 0&&(go._pendingEditorState=lo,go._dirtyType=ce),go}class ds{constructor(to,ro,no,oo,io,so,ao){this._parentEditor=ro,this._rootElement=null,this._editorState=to,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=oo,this._nodes=no,this._decorators={},this._pendingDecorators=null,this._dirtyType=oe,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=vt$1(),this._onError=io,this._htmlConversions=so,this._editable=ao,this._headless=ro!==null&&ro._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(to){const ro=this._listeners.update;return ro.add(to),()=>{ro.delete(to)}}registerEditableListener(to){const ro=this._listeners.editable;return ro.add(to),()=>{ro.delete(to)}}registerDecoratorListener(to){const ro=this._listeners.decorator;return ro.add(to),()=>{ro.delete(to)}}registerTextContentListener(to){const ro=this._listeners.textcontent;return ro.add(to),()=>{ro.delete(to)}}registerRootListener(to){const ro=this._listeners.root;return to(this._rootElement,null),ro.add(to),()=>{to(null,this._rootElement),ro.delete(to)}}registerCommand(to,ro,no){no===void 0&&H$1(35);const oo=this._commands;oo.has(to)||oo.set(to,[new Set,new Set,new Set,new Set,new Set]);const io=oo.get(to);io===void 0&&H$1(36,String(to));const so=io[no];return so.add(ro),()=>{so.delete(ro),io.every(ao=>ao.size===0)&&oo.delete(to)}}registerMutationListener(to,ro){this._nodes.get(to.getType())===void 0&&H$1(37,to.name);const no=this._listeners.mutation;return no.set(ro,to),()=>{no.delete(ro)}}registerNodeTransformToKlass(to,ro){const no=to.getType(),oo=this._nodes.get(no);return oo===void 0&&H$1(37,to.name),oo.transforms.add(ro),oo}registerNodeTransform(to,ro){const no=this.registerNodeTransformToKlass(to,ro),oo=[no],io=no.replaceWithKlass;if(io!=null){const lo=this.registerNodeTransformToKlass(io,ro);oo.push(lo)}var so,ao;return so=this,ao=to.getType(),Vi(so,()=>{const lo=Ii();if(lo.isEmpty())return;if(ao==="root")return void ht$1().markDirty();const uo=lo._nodeMap;for(const[,co]of uo)co.markDirty()},so._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{oo.forEach(lo=>lo.transforms.delete(ro))}}hasNode(to){return this._nodes.has(to.getType())}hasNodes(to){return to.every(this.hasNode.bind(this))}dispatchCommand(to,ro){return Bt(this,to,ro)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(to){const ro=this._rootElement;if(to!==ro){const no=At$1(this._config.theme,"root"),oo=this._pendingEditorState||this._editorState;if(this._rootElement=to,as(this,ro,to,oo),ro!==null&&(this._config.disableEvents||gr(ro),no!=null&&ro.classList.remove(...no)),to!==null){const io=function(ao){const lo=ao.ownerDocument;return lo&&lo.defaultView||null}(to),so=to.style;so.userSelect="text",so.whiteSpace="pre-wrap",so.wordBreak="break-word",to.setAttribute("data-lexical-editor","true"),this._window=io,this._dirtyType=ce,Ke(this),this._updateTags.add("history-merge"),Bi(this),this._config.disableEvents||function(ao,lo){const uo=ao.ownerDocument,co=Zn.get(uo);co===void 0&&uo.addEventListener("selectionchange",fr),Zn.set(uo,co||1),ao.__lexicalEditor=lo;const fo=ur(ao);for(let ho=0;ho{hr(bo)||(dr(bo),(lo.isEditable()||po==="click")&&go(bo,lo))}:bo=>{if(!hr(bo)&&(dr(bo),lo.isEditable()))switch(po){case"cut":return Bt(lo,W,bo);case"copy":return Bt(lo,M$3,bo);case"paste":return Bt(lo,c$5,bo);case"dragstart":return Bt(lo,A$3,bo);case"dragover":return Bt(lo,L$2,bo);case"dragend":return Bt(lo,F$1,bo);case"focus":return Bt(lo,U,bo);case"blur":return Bt(lo,V,bo);case"drop":return Bt(lo,I$1,bo)}};ao.addEventListener(po,vo),fo.push(()=>{ao.removeEventListener(po,vo)})}}(to,this),no!=null&&to.classList.add(...no)}else this._editorState=oo,this._pendingEditorState=null,this._window=null;Ri("root",this,!1,to,ro)}}getElementByKey(to){return this._keyToDOMMap.get(to)||null}getEditorState(){return this._editorState}setEditorState(to,ro){to.isEmpty()&&H$1(38),Re(this);const no=this._pendingEditorState,oo=this._updateTags,io=ro!==void 0?ro.tag:null;no===null||no.isEmpty()||(io!=null&&oo.add(io),Bi(this)),this._pendingEditorState=to,this._dirtyType=ce,this._dirtyElements.set("root",!1),this._compositionKey=null,io!=null&&oo.add(io),Bi(this)}parseEditorState(to,ro){return function(no,oo,io){const so=Zi(),ao=Si,lo=Ci,uo=ki,co=oo._dirtyElements,fo=oo._dirtyLeaves,ho=oo._cloneNotNeeded,po=oo._dirtyType;oo._dirtyElements=new Map,oo._dirtyLeaves=new Set,oo._cloneNotNeeded=new Set,oo._dirtyType=0,Si=so,Ci=!1,ki=oo;try{const go=oo._nodes;Wi(no.root,go),io&&io(),so._readOnly=!0}catch(go){go instanceof Error&&oo._onError(go)}finally{oo._dirtyElements=co,oo._dirtyLeaves=fo,oo._cloneNotNeeded=ho,oo._dirtyType=po,Si=ao,Ci=lo,ki=uo}return so}(typeof to=="string"?JSON.parse(to):to,this,ro)}update(to,ro){Vi(this,to,ro)}focus(to,ro={}){const no=this._rootElement;no!==null&&(no.setAttribute("autocapitalize","off"),Vi(this,()=>{const oo=fi(),io=ht$1();oo!==null?oo.dirty=!0:io.getChildrenSize()!==0&&(ro.defaultSelection==="rootStart"?io.selectStart():io.selectEnd())},{onUpdate:()=>{no.removeAttribute("autocapitalize"),to&&to()},tag:"focus"}),this._pendingEditorState===null&&no.removeAttribute("autocapitalize"))}blur(){const to=this._rootElement;to!==null&&to.blur();const ro=nn(this._window);ro!==null&&ro.removeAllRanges()}isEditable(){return this._editable}setEditable(to){this._editable!==to&&(this._editable=to,Ri("editable",this,!0,to))}toJSON(){return{editorState:this._editorState.toJSON()}}}const modProd$i=Object.freeze(Object.defineProperty({__proto__:null,$addUpdateTag:Vt,$applyNodeReplacement:Yt,$copyNode:Xt,$createLineBreakNode:xr,$createNodeSelection:ui,$createParagraphNode:rs,$createPoint:Vr,$createRangeSelection:ci,$createTabNode:Kr,$createTextNode:zr,$getAdjacentNode:Wt,$getCharacterOffsets:ei,$getEditor:un,$getNearestNodeFromDOMNode:at$1,$getNearestRootOrShadowRoot:qt,$getNodeByKey:ct$1,$getPreviousSelection:di,$getRoot:ht$1,$getSelection:fi,$getTextContent:xi,$hasAncestor:$t,$hasUpdateTag:Ut,$insertNodes:mi,$isBlockElementNode:oi,$isDecoratorNode:Hi,$isElementNode:qi,$isInlineElementOrDecoratorNode:jt,$isLeafNode:nt,$isLineBreakNode:vr,$isNodeSelection:Zr,$isParagraphNode:is,$isRangeSelection:Xr,$isRootNode:Yi,$isRootOrShadowRoot:Qt,$isTabNode:Jr,$isTextNode:Br,$nodesOfType:Ft,$normalizeSelection__EXPERIMENTAL:$e,$parseSerializedNode:Mi,$selectAll:Ot$1,$setCompositionKey:ot,$setSelection:_t,$splitNode:rn,BLUR_COMMAND:V,CAN_REDO_COMMAND:K$2,CAN_UNDO_COMMAND:J,CLEAR_EDITOR_COMMAND:B$2,CLEAR_HISTORY_COMMAND:R$2,CLICK_COMMAND:r$1,COMMAND_PRIORITY_CRITICAL:us,COMMAND_PRIORITY_EDITOR:ss,COMMAND_PRIORITY_HIGH:cs,COMMAND_PRIORITY_LOW:os,COMMAND_PRIORITY_NORMAL:ls,CONTROLLED_TEXT_INSERTION_COMMAND:l$3,COPY_COMMAND:M$3,CUT_COMMAND:W,DELETE_CHARACTER_COMMAND:i$3,DELETE_LINE_COMMAND:f$4,DELETE_WORD_COMMAND:a$4,DRAGEND_COMMAND:F$1,DRAGOVER_COMMAND:L$2,DRAGSTART_COMMAND:A$3,DROP_COMMAND:I$1,DecoratorNode:$i,ElementNode:ji,FOCUS_COMMAND:U,FORMAT_ELEMENT_COMMAND:O$2,FORMAT_TEXT_COMMAND:d$4,INDENT_CONTENT_COMMAND:P$3,INSERT_LINE_BREAK_COMMAND:s$2,INSERT_PARAGRAPH_COMMAND:o$5,INSERT_TAB_COMMAND:E$4,KEY_ARROW_DOWN_COMMAND:T$3,KEY_ARROW_LEFT_COMMAND:m$5,KEY_ARROW_RIGHT_COMMAND:p$4,KEY_ARROW_UP_COMMAND:v$3,KEY_BACKSPACE_COMMAND:C$5,KEY_DELETE_COMMAND:N$3,KEY_DOWN_COMMAND:_$5,KEY_ENTER_COMMAND:S$4,KEY_ESCAPE_COMMAND:b$2,KEY_MODIFIER_COMMAND:$$1,KEY_SPACE_COMMAND:k$2,KEY_TAB_COMMAND:w$3,LineBreakNode:yr,MOVE_TO_END:y$4,MOVE_TO_START:x$5,OUTDENT_CONTENT_COMMAND:D$2,PASTE_COMMAND:c$5,ParagraphNode:ts,REDO_COMMAND:g$6,REMOVE_TEXT_COMMAND:u$5,RootNode:Xi,SELECTION_CHANGE_COMMAND:t$4,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND:n$2,SELECT_ALL_COMMAND:z$1,TabNode:Rr,TextNode:Er,UNDO_COMMAND:h$3,createCommand:e$1,createEditor:fs,getNearestEditorFromDOMNode:Ye,isCurrentlyReadOnlyMode:Ei,isHTMLAnchorElement:sn,isHTMLElement:on,isSelectionCapturedInDecoratorInput:Qe,isSelectionWithinEditor:Xe},Symbol.toStringTag,{value:"Module"})),mod$i=modProd$i,$applyNodeReplacement=mod$i.$applyNodeReplacement,$copyNode=mod$i.$copyNode,$createNodeSelection=mod$i.$createNodeSelection,$createParagraphNode=mod$i.$createParagraphNode,$createRangeSelection=mod$i.$createRangeSelection,$createTabNode=mod$i.$createTabNode,$createTextNode=mod$i.$createTextNode,$getAdjacentNode=mod$i.$getAdjacentNode,$getCharacterOffsets=mod$i.$getCharacterOffsets,$getNearestNodeFromDOMNode=mod$i.$getNearestNodeFromDOMNode,$getNodeByKey=mod$i.$getNodeByKey,$getPreviousSelection=mod$i.$getPreviousSelection,$getRoot=mod$i.$getRoot,$getSelection=mod$i.$getSelection,$hasAncestor=mod$i.$hasAncestor,$insertNodes=mod$i.$insertNodes,$isDecoratorNode=mod$i.$isDecoratorNode,$isElementNode=mod$i.$isElementNode,$isLeafNode=mod$i.$isLeafNode,$isLineBreakNode=mod$i.$isLineBreakNode,$isNodeSelection=mod$i.$isNodeSelection,$isParagraphNode=mod$i.$isParagraphNode,$isRangeSelection=mod$i.$isRangeSelection,$isRootNode=mod$i.$isRootNode,$isRootOrShadowRoot=mod$i.$isRootOrShadowRoot,$isTextNode=mod$i.$isTextNode,$normalizeSelection__EXPERIMENTAL=mod$i.$normalizeSelection__EXPERIMENTAL,$parseSerializedNode=mod$i.$parseSerializedNode,$selectAll=mod$i.$selectAll,$setSelection=mod$i.$setSelection,$splitNode=mod$i.$splitNode,CAN_REDO_COMMAND=mod$i.CAN_REDO_COMMAND,CAN_UNDO_COMMAND=mod$i.CAN_UNDO_COMMAND,CLEAR_EDITOR_COMMAND=mod$i.CLEAR_EDITOR_COMMAND,CLEAR_HISTORY_COMMAND=mod$i.CLEAR_HISTORY_COMMAND,CLICK_COMMAND=mod$i.CLICK_COMMAND,COMMAND_PRIORITY_CRITICAL=mod$i.COMMAND_PRIORITY_CRITICAL,COMMAND_PRIORITY_EDITOR=mod$i.COMMAND_PRIORITY_EDITOR,COMMAND_PRIORITY_HIGH=mod$i.COMMAND_PRIORITY_HIGH,COMMAND_PRIORITY_LOW=mod$i.COMMAND_PRIORITY_LOW,CONTROLLED_TEXT_INSERTION_COMMAND=mod$i.CONTROLLED_TEXT_INSERTION_COMMAND,COPY_COMMAND=mod$i.COPY_COMMAND,CUT_COMMAND=mod$i.CUT_COMMAND,DELETE_CHARACTER_COMMAND=mod$i.DELETE_CHARACTER_COMMAND,DELETE_LINE_COMMAND=mod$i.DELETE_LINE_COMMAND,DELETE_WORD_COMMAND=mod$i.DELETE_WORD_COMMAND,DRAGOVER_COMMAND=mod$i.DRAGOVER_COMMAND,DRAGSTART_COMMAND=mod$i.DRAGSTART_COMMAND,DROP_COMMAND=mod$i.DROP_COMMAND,DecoratorNode=mod$i.DecoratorNode,ElementNode=mod$i.ElementNode,FORMAT_ELEMENT_COMMAND=mod$i.FORMAT_ELEMENT_COMMAND,FORMAT_TEXT_COMMAND=mod$i.FORMAT_TEXT_COMMAND,INDENT_CONTENT_COMMAND=mod$i.INDENT_CONTENT_COMMAND,INSERT_LINE_BREAK_COMMAND=mod$i.INSERT_LINE_BREAK_COMMAND,INSERT_PARAGRAPH_COMMAND=mod$i.INSERT_PARAGRAPH_COMMAND,INSERT_TAB_COMMAND=mod$i.INSERT_TAB_COMMAND,KEY_ARROW_DOWN_COMMAND=mod$i.KEY_ARROW_DOWN_COMMAND,KEY_ARROW_LEFT_COMMAND=mod$i.KEY_ARROW_LEFT_COMMAND,KEY_ARROW_RIGHT_COMMAND=mod$i.KEY_ARROW_RIGHT_COMMAND,KEY_ARROW_UP_COMMAND=mod$i.KEY_ARROW_UP_COMMAND,KEY_BACKSPACE_COMMAND=mod$i.KEY_BACKSPACE_COMMAND,KEY_DELETE_COMMAND=mod$i.KEY_DELETE_COMMAND,KEY_ENTER_COMMAND=mod$i.KEY_ENTER_COMMAND,KEY_ESCAPE_COMMAND=mod$i.KEY_ESCAPE_COMMAND,LineBreakNode=mod$i.LineBreakNode,OUTDENT_CONTENT_COMMAND=mod$i.OUTDENT_CONTENT_COMMAND,PASTE_COMMAND=mod$i.PASTE_COMMAND,ParagraphNode=mod$i.ParagraphNode,REDO_COMMAND=mod$i.REDO_COMMAND,REMOVE_TEXT_COMMAND=mod$i.REMOVE_TEXT_COMMAND,RootNode=mod$i.RootNode,SELECTION_CHANGE_COMMAND=mod$i.SELECTION_CHANGE_COMMAND,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND=mod$i.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,SELECT_ALL_COMMAND=mod$i.SELECT_ALL_COMMAND,TextNode$1=mod$i.TextNode,UNDO_COMMAND=mod$i.UNDO_COMMAND,createCommand=mod$i.createCommand,createEditor=mod$i.createEditor,isHTMLAnchorElement$1=mod$i.isHTMLAnchorElement,isHTMLElement$2=mod$i.isHTMLElement,isSelectionCapturedInDecoratorInput=mod$i.isSelectionCapturedInDecoratorInput,isSelectionWithinEditor=mod$i.isSelectionWithinEditor,m$4=new Map;function _$4(eo){let to=eo;for(;to!=null;){if(to.nodeType===Node.TEXT_NODE)return to;to=to.firstChild}return null}function y$3(eo){const to=eo.parentNode;if(to==null)throw new Error("Should never happen");return[to,Array.from(to.childNodes).indexOf(eo)]}function T$2(eo,to,ro,no,oo){const io=to.getKey(),so=no.getKey(),ao=document.createRange();let lo=eo.getElementByKey(io),uo=eo.getElementByKey(so),co=ro,fo=oo;if($isTextNode(to)&&(lo=_$4(lo)),$isTextNode(no)&&(uo=_$4(uo)),to===void 0||no===void 0||lo===null||uo===null)return null;lo.nodeName==="BR"&&([lo,co]=y$3(lo)),uo.nodeName==="BR"&&([uo,fo]=y$3(uo));const ho=lo.firstChild;lo===uo&&ho!=null&&ho.nodeName==="BR"&&co===0&&fo===0&&(fo=1);try{ao.setStart(lo,co),ao.setEnd(uo,fo)}catch{return null}return!ao.collapsed||co===fo&&io===so||(ao.setStart(uo,fo),ao.setEnd(lo,co)),ao}function x$4(eo,to){const ro=eo.getRootElement();if(ro===null)return[];const no=ro.getBoundingClientRect(),oo=getComputedStyle(ro),io=parseFloat(oo.paddingLeft)+parseFloat(oo.paddingRight),so=Array.from(to.getClientRects());let ao,lo=so.length;so.sort((uo,co)=>{const fo=uo.top-co.top;return Math.abs(fo)<=3?uo.left-co.left:fo});for(let uo=0;uoco.top&&ao.left+ao.width>co.left,ho=co.width+io===no.width;fo||ho?(so.splice(uo--,1),lo--):ao=co}return so}function S$3(eo){const to={},ro=eo.split(";");for(const no of ro)if(no!==""){const[oo,io]=no.split(/:([^]+)/);oo&&io&&(to[oo.trim()]=io.trim())}return to}function N$2(eo){let to=m$4.get(eo);return to===void 0&&(to=S$3(eo),m$4.set(eo,to)),to}function E$3(eo){const to=eo.constructor.clone(eo);return to.__parent=eo.__parent,to.__next=eo.__next,to.__prev=eo.__prev,$isElementNode(eo)&&$isElementNode(to)?(no=eo,(ro=to).__first=no.__first,ro.__last=no.__last,ro.__size=no.__size,ro.__format=no.__format,ro.__indent=no.__indent,ro.__dir=no.__dir,ro):$isTextNode(eo)&&$isTextNode(to)?function(oo,io){return oo.__format=io.__format,oo.__style=io.__style,oo.__mode=io.__mode,oo.__detail=io.__detail,oo}(to,eo):to;var ro,no}function v$2(eo,to){const ro=eo.getStartEndPoints();if(to.isSelected(eo)&&!to.isSegmented()&&!to.isToken()&&ro!==null){const[no,oo]=ro,io=eo.isBackward(),so=no.getNode(),ao=oo.getNode(),lo=to.is(so),uo=to.is(ao);if(lo||uo){const[co,fo]=$getCharacterOffsets(eo),ho=so.is(ao),po=to.is(io?ao:so),go=to.is(io?so:ao);let vo,bo=0;return ho?(bo=co>fo?fo:co,vo=co>fo?co:fo):po?(bo=io?fo:co,vo=void 0):go&&(bo=0,vo=io?co:fo),to.__text=to.__text.slice(bo,vo),to}}return to}function C$4(eo){if(eo.type==="text")return eo.offset===eo.getNode().getTextContentSize();const to=eo.getNode();if(!$isElementNode(to))throw Error("isAtNodeEnd: node must be a TextNode or ElementNode");return eo.offset===to.getChildrenSize()}function w$2(eo,to,ro){let no=to.getNode(),oo=ro;if($isElementNode(no)){const io=no.getDescendantByIndex(to.offset);io!==null&&(no=io)}for(;oo>0&&no!==null;){if($isElementNode(no)){const uo=no.getLastDescendant();uo!==null&&(no=uo)}let io=no.getPreviousSibling(),so=0;if(io===null){let uo=no.getParentOrThrow(),co=uo.getPreviousSibling();for(;co===null;){if(uo=uo.getParent(),uo===null){io=null;break}co=uo.getPreviousSibling()}uo!==null&&(so=uo.isInline()?0:2,io=co)}let ao=no.getTextContent();ao===""&&$isElementNode(no)&&!no.isInline()&&(ao=` + +`);const lo=ao.length;if(!$isTextNode(no)||oo>=lo){const uo=no.getParent();no.remove(),uo==null||uo.getChildrenSize()!==0||$isRootNode(uo)||uo.remove(),oo-=lo+so,no=io}else{const uo=no.getKey(),co=eo.getEditorState().read(()=>{const po=$getNodeByKey(uo);return $isTextNode(po)&&po.isSimpleText()?po.getTextContent():null}),fo=lo-oo,ho=ao.slice(0,fo);if(co!==null&&co!==ao){const po=$getPreviousSelection();let go=no;if(no.isSimpleText())no.setTextContent(co);else{const vo=$createTextNode(co);no.replace(vo),go=vo}if($isRangeSelection(po)&&po.isCollapsed()){const vo=po.anchor.offset;go.select(vo,vo)}}else if(no.isSimpleText()){const po=to.key===uo;let go=to.offset;go(ao instanceof Function?io[so]=ao(ro[so]):ao===null?delete io[so]:io[so]=ao,io),{...ro}),oo=function(io){let so="";for(const ao in io)ao&&(so+=`${ao}: ${io[ao]};`);return so}(no);eo.setStyle(oo),m$4.set(oo,no)}function I(eo,to){const ro=eo.getNodes(),no=ro.length,oo=eo.getStartEndPoints();if(oo===null)return;const[io,so]=oo,ao=no-1;let lo=ro[0],uo=ro[ao];if(eo.isCollapsed()&&$isRangeSelection(eo))return void F(eo,to);const co=lo.getTextContent().length,fo=so.offset;let ho=io.offset;const po=io.isBefore(so);let go=po?ho:fo,vo=po?fo:ho;const bo=po?io.type:so.type,xo=po?so.type:io.type,_o=po?so.key:io.key;if($isTextNode(lo)&&go===co){const Eo=lo.getNextSibling();$isTextNode(Eo)&&(ho=0,go=0,lo=Eo)}if(ro.length===1){if($isTextNode(lo)&&lo.canHaveFormat()){if(go=bo==="element"?0:ho>fo?fo:ho,vo=xo==="element"?co:ho>fo?ho:fo,go===vo)return;if(go===0&&vo===co)F(lo,to),lo.select(go,vo);else{const Eo=lo.splitText(go,vo),So=go===0?Eo[0]:Eo[1];F(So,to),So.select(0,vo-go)}}}else{if($isTextNode(lo)&&gofo.append(ho)),ro&&(fo=ro.append(fo)),void uo.replace(fo)}let ao=null,lo=[];for(let uo=0;uo{_o.append(Eo),fo.add(Eo.getKey()),$isElementNode(Eo)&&Eo.getChildrenKeys().forEach(So=>fo.add(So))}),O$1(bo)}}else if(co.has(vo.getKey())){if(!$isElementNode(vo))throw Error("Expected node in emptyElements to be an ElementNode");const xo=no();xo.setFormat(vo.getFormatType()),xo.setIndent(vo.getIndent()),ao.push(xo),vo.remove(!0)}}if(oo!==null)for(let go=0;go=0;go--){const vo=ao[go];lo.insertAfter(vo)}else{const go=lo.getFirstChild();if($isElementNode(go)&&(lo=go),go===null)if(oo)lo.append(oo);else for(let vo=0;vo=0;go--){const vo=ao[go];lo.insertAfter(vo),ho=vo}const po=$getPreviousSelection();$isRangeSelection(po)&&b$1(po.anchor)&&b$1(po.focus)?$setSelection(po.clone()):ho!==null?ho.selectEnd():eo.dirty=!0}function z(eo,to){const ro=$getAdjacentNode(eo.focus,to);return $isDecoratorNode(ro)&&!ro.isIsolated()||$isElementNode(ro)&&!ro.isInline()&&!ro.canBeEmpty()}function A$2(eo,to,ro,no){eo.modify(to?"extend":"move",ro,no)}function R$1(eo){const to=eo.anchor.getNode();return($isRootNode(to)?to:to.getParentOrThrow()).getDirection()==="rtl"}function D$1(eo,to,ro){const no=R$1(eo);A$2(eo,to,ro?!no:no,"character")}function L$1(eo){const to=eo.anchor,ro=eo.focus,no=to.getNode().getTopLevelElementOrThrow().getParentOrThrow();let oo=no.getFirstDescendant(),io=no.getLastDescendant(),so="element",ao="element",lo=0;$isTextNode(oo)?so="text":$isElementNode(oo)||oo===null||(oo=oo.getParentOrThrow()),$isTextNode(io)?(ao="text",lo=io.getTextContentSize()):$isElementNode(io)||io===null||(io=io.getParentOrThrow()),oo&&io&&(to.set(oo.getKey(),0,so),ro.set(io.getKey(),lo,ao))}function H(eo,to,ro){const no=N$2(eo.getStyle());return no!==null&&no[to]||ro}function M$2(eo,to,ro=""){let no=null;const oo=eo.getNodes(),io=eo.anchor,so=eo.focus,ao=eo.isBackward(),lo=ao?so.offset:io.offset,uo=ao?so.getNode():io.getNode();if(eo.isCollapsed()&&eo.style!==""){const co=N$2(eo.style);if(co!==null&&to in co)return co[to]}for(let co=0;co{eo.forEach(to=>to())}}function m$3(eo){return`${eo}px`}const E$2={attributes:!0,characterData:!0,childList:!0,subtree:!0};function x$3(eo,to,ro){let no=null,oo=null,io=null,so=[];const ao=document.createElement("div");function lo(){if(no===null)throw Error("Unexpected null rootDOMNode");if(oo===null)throw Error("Unexpected null parentDOMNode");const{left:fo,top:ho}=no.getBoundingClientRect(),po=oo,go=createRectsFromDOMRange(eo,to);ao.isConnected||po.append(ao);let vo=!1;for(let bo=0;bogo.length;)so.pop();vo&&ro(so)}function uo(){oo=null,no=null,io!==null&&io.disconnect(),io=null,ao.remove();for(const fo of so)fo.remove();so=[]}const co=eo.registerRootListener(function fo(){const ho=eo.getRootElement();if(ho===null)return uo();const po=ho.parentElement;if(!(po instanceof HTMLElement))return uo();uo(),no=ho,oo=po,io=new MutationObserver(go=>{const vo=eo.getRootElement(),bo=vo&&vo.parentElement;if(vo!==no||bo!==oo)return fo();for(const xo of go)if(!ao.contains(xo.target))return lo()}),io.observe(po,E$2),lo()});return()=>{co(),uo()}}function y$2(eo,to){let ro=null,no=null,oo=null,io=null,so=()=>{};function ao(lo){lo.read(()=>{const uo=$getSelection();if(!$isRangeSelection(uo))return ro=null,no=null,oo=null,io=null,so(),void(so=()=>{});const{anchor:co,focus:fo}=uo,ho=co.getNode(),po=ho.getKey(),go=co.offset,vo=fo.getNode(),bo=vo.getKey(),xo=fo.offset,_o=eo.getElementByKey(po),Eo=eo.getElementByKey(bo),So=ro===null||_o===null||go!==no||po!==ro.getKey()||ho!==ro&&(!(ro instanceof TextNode$1)||ho.updateDOM(ro,_o,eo._config)),To=oo===null||Eo===null||xo!==io||bo!==oo.getKey()||vo!==oo&&(!(oo instanceof TextNode$1)||vo.updateDOM(oo,Eo,eo._config));if(So||To){const wo=eo.getElementByKey(co.getNode().getKey()),Co=eo.getElementByKey(fo.getNode().getKey());if(wo!==null&&Co!==null&&wo.tagName==="SPAN"&&Co.tagName==="SPAN"){const Oo=document.createRange();let Ao,Ro,No,Mo;fo.isBefore(co)?(Ao=Co,Ro=fo.offset,No=wo,Mo=co.offset):(Ao=wo,Ro=co.offset,No=Co,Mo=fo.offset);const Do=Ao.firstChild;if(Do===null)throw Error("Expected text node to be first child of span");const jo=No.firstChild;if(jo===null)throw Error("Expected text node to be first child of span");Oo.setStart(Do,Ro),Oo.setEnd(jo,Mo),so(),so=x$3(eo,Oo,Fo=>{for(const $o of Fo){const Lo=$o.style;Lo.background!=="Highlight"&&(Lo.background="Highlight"),Lo.color!=="HighlightText"&&(Lo.color="HighlightText"),Lo.zIndex!=="-1"&&(Lo.zIndex="-1"),Lo.pointerEvents!=="none"&&(Lo.pointerEvents="none"),Lo.marginTop!==m$3(-1.5)&&(Lo.marginTop=m$3(-1.5)),Lo.paddingTop!==m$3(4)&&(Lo.paddingTop=m$3(4)),Lo.paddingBottom!==m$3(0)&&(Lo.paddingBottom=m$3(0))}to!==void 0&&to(Fo)})}}ro=ho,no=go,oo=vo,io=xo})}return ao(eo.getEditorState()),h$2(eo.registerUpdateListener(({editorState:lo})=>ao(lo)),so,()=>{so()})}function v$1(eo,...to){const ro=p$3(...to);ro.length>0&&eo.classList.add(...ro)}function N$1(eo,...to){const ro=p$3(...to);ro.length>0&&eo.classList.remove(...ro)}function w$1(eo,to){for(const ro of to)if(eo.type.startsWith(ro))return!0;return!1}function L(eo,to){const ro=eo[Symbol.iterator]();return new Promise((no,oo)=>{const io=[],so=()=>{const{done:ao,value:lo}=ro.next();if(ao)return no(io);const uo=new FileReader;uo.addEventListener("error",oo),uo.addEventListener("load",()=>{const co=uo.result;typeof co=="string"&&io.push({file:lo,result:co}),so()}),w$1(lo,to)?uo.readAsDataURL(lo):so()};so()})}function T$1(eo,to){const ro=[],no=(eo||$getRoot()).getLatest(),oo=to||($isElementNode(no)?no.getLastDescendant():no);let io=no,so=function(ao){let lo=ao,uo=0;for(;(lo=lo.getParent())!==null;)uo++;return uo}(io);for(;io!==null&&!io.is(oo);)if(ro.push({depth:so,node:io}),$isElementNode(io)&&io.getChildrenSize()>0)io=io.getFirstChild(),so++;else{let ao=null;for(;ao===null&&io!==null;)ao=io.getNextSibling(),ao===null?(io=io.getParent(),so--):io=ao}return io!==null&&io.is(oo)&&ro.push({depth:so,node:io}),ro}function b(eo,to){let ro=eo;for(;ro!=null;){if(ro instanceof to)return ro;ro=ro.getParent()}return null}function S$2(eo){const to=_$3(eo,ro=>$isElementNode(ro)&&!ro.isInline());return $isElementNode(to)||g$5(4,eo.__key),to}const _$3=(eo,to)=>{let ro=eo;for(;ro!==$getRoot()&&ro!=null;){if(to(ro))return ro;ro=ro.getParent()}return null};function B(eo,to,ro,no){const oo=io=>io instanceof to;return eo.registerNodeTransform(to,io=>{const so=(ao=>{const lo=ao.getChildren();for(let fo=0;fo0&&(so+=1,no.splitText(oo))):(io=no,so=oo);const[,ao]=$splitNode(io,so);ao.insertBefore(eo),ao.selectStart()}}else{if(to!=null){const no=to.getNodes();no[no.length-1].getTopLevelElementOrThrow().insertAfter(eo)}else $getRoot().append(eo);const ro=$createParagraphNode();eo.insertAfter(ro),ro.select()}return eo.getLatest()}function A$1(eo,to){const ro=to();return eo.replace(ro),ro.append(eo),ro}function C$3(eo,to){return eo!==null&&Object.getPrototypeOf(eo).constructor.name===to.name}function K(eo,to){const ro=[];for(let no=0;no({conversion:a$3,priority:1})}}static importJSON(to){const ro=g$4(to.url,{rel:to.rel,target:to.target,title:to.title});return ro.setFormat(to.format),ro.setIndent(to.indent),ro.setDirection(to.direction),ro}sanitizeUrl(to){try{const ro=new URL(to);if(!o$4.has(ro.protocol))return"about:blank"}catch{return to}return to}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(to){this.getWritable().__url=to}getTarget(){return this.getLatest().__target}setTarget(to){this.getWritable().__target=to}getRel(){return this.getLatest().__rel}setRel(to){this.getWritable().__rel=to}getTitle(){return this.getLatest().__title}setTitle(to){this.getWritable().__title=to}insertNewAfter(to,ro=!0){const no=g$4(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(no,ro),no}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(to,ro,no){if(!$isRangeSelection(ro))return!1;const oo=ro.anchor.getNode(),io=ro.focus.getNode();return this.isParentOf(oo)&&this.isParentOf(io)&&ro.getTextContent().length>0}};function a$3(eo){let to=null;if(isHTMLAnchorElement(eo)){const ro=eo.textContent;(ro!==null&&ro!==""||eo.children.length>0)&&(to=g$4(eo.getAttribute("href")||"",{rel:eo.getAttribute("rel"),target:eo.getAttribute("target"),title:eo.getAttribute("title")}))}return{node:to}}function g$4(eo,to){return $applyNodeReplacement(new _$2(eo,to))}function c$4(eo){return eo instanceof _$2}let h$1=class d_ extends _$2{static getType(){return"autolink"}static clone(to){return new d_(to.__url,{rel:to.__rel,target:to.__target,title:to.__title},to.__key)}static importJSON(to){const ro=f$3(to.url,{rel:to.rel,target:to.target,title:to.title});return ro.setFormat(to.format),ro.setIndent(to.indent),ro.setDirection(to.direction),ro}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(to,ro=!0){const no=this.getParentOrThrow().insertNewAfter(to,ro);if($isElementNode(no)){const oo=f$3(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return no.append(oo),oo}return null}};function f$3(eo,to){return $applyNodeReplacement(new h$1(eo,to))}function p$2(eo){return eo instanceof h$1}const d$3=createCommand("TOGGLE_LINK_COMMAND");function m$2(eo,to={}){const{target:ro,title:no}=to,oo=to.rel===void 0?"noreferrer":to.rel,io=$getSelection();if(!$isRangeSelection(io))return;const so=io.extract();if(eo===null)so.forEach(ao=>{const lo=ao.getParent();if(c$4(lo)){const uo=lo.getChildren();for(let co=0;co{const co=uo.getParent();if(co!==lo&&co!==null&&(!$isElementNode(uo)||uo.isInline())){if(c$4(co))return lo=co,co.setURL(eo),ro!==void 0&&co.setTarget(ro),oo!==null&&lo.setRel(oo),void(no!==void 0&&lo.setTitle(no));if(co.is(ao)||(ao=co,lo=g$4(eo,{rel:oo,target:ro,title:no}),c$4(co)?uo.getPreviousSibling()===null?co.insertBefore(lo):co.insertAfter(lo):uo.insertBefore(lo)),c$4(uo)){if(uo.is(lo))return;if(lo!==null){const fo=uo.getChildren();for(let ho=0;ho{const{theme:no,namespace:oo,editor__DEPRECATED:io,nodes:so,onError:ao,editorState:lo,html:uo}=eo,co=createLexicalComposerContext(null,no);let fo=io||null;if(fo===null){const ho=createEditor({editable:eo.editable,html:uo,namespace:oo,nodes:so,onError:po=>ao(po,ho),theme:no});(function(po,go){if(go!==null){if(go===void 0)po.update(()=>{const vo=$getRoot();if(vo.isEmpty()){const bo=$createParagraphNode();vo.append(bo);const xo=d$2?document.activeElement:null;($getSelection()!==null||xo!==null&&xo===po.getRootElement())&&bo.select()}},u$4);else if(go!==null)switch(typeof go){case"string":{const vo=po.parseEditorState(go);po.setEditorState(vo,u$4);break}case"object":po.setEditorState(go,u$4);break;case"function":po.update(()=>{$getRoot().isEmpty()&&go(po)},u$4)}}})(ho,lo),fo=ho}return[fo,co]},[]);return m$1(()=>{const no=eo.editable,[oo]=ro;oo.setEditable(no===void 0||no)},[]),reactExports.createElement(LexicalComposerContext.Provider,{value:ro},to)}const modProd$d=Object.freeze(Object.defineProperty({__proto__:null,LexicalComposer:f$2},Symbol.toStringTag,{value:"Module"})),mod$d=modProd$d,LexicalComposer=mod$d.LexicalComposer;function n$1(){return n$1=Object.assign?Object.assign.bind():function(eo){for(var to=1;to{Co&&Co.ownerDocument&&Co.ownerDocument.defaultView&&Eo.setRootElement(Co)},[Eo]);return d$1(()=>(To(Eo.isEditable()),Eo.registerEditableListener(Co=>{To(Co)})),[Eo]),reactExports.createElement("div",n$1({},_o,{"aria-activedescendant":So?eo:void 0,"aria-autocomplete":So?to:"none","aria-controls":So?ro:void 0,"aria-describedby":no,"aria-expanded":So&&po==="combobox"?!!oo:void 0,"aria-label":io,"aria-labelledby":so,"aria-multiline":ao,"aria-owns":So?lo:void 0,"aria-readonly":!So||void 0,"aria-required":uo,autoCapitalize:co,className:fo,contentEditable:So,"data-testid":xo,id:ho,ref:wo,role:po,spellCheck:go,style:vo,tabIndex:bo}))}const modProd$c=Object.freeze(Object.defineProperty({__proto__:null,ContentEditable:l$1},Symbol.toStringTag,{value:"Module"})),mod$c=modProd$c,ContentEditable=mod$c.ContentEditable;function e(eo,to){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ro,no){return ro.__proto__=no,ro},e(eo,to)}var t$2={error:null},o$2=function(eo){var to,ro;function no(){for(var io,so=arguments.length,ao=new Array(so),lo=0;lo1){const xo=to._nodeMap,_o=xo.get(io.anchor.key),Eo=xo.get(so.anchor.key);return _o&&Eo&&!eo._nodeMap.has(_o.__key)&&$isTextNode(_o)&&_o.__text.length===1&&io.anchor.offset===1?m:p$1}const lo=ao[0],uo=eo._nodeMap.get(lo.__key);if(!$isTextNode(uo)||!$isTextNode(lo)||uo.__mode!==lo.__mode)return p$1;const co=uo.__text,fo=lo.__text;if(co===fo)return p$1;const ho=io.anchor,po=so.anchor;if(ho.key!==po.key||ho.type!=="text")return p$1;const go=ho.offset,vo=po.offset,bo=fo.length-co.length;return bo===1&&vo===go-1?m:bo===-1&&vo===go+1?g$3:bo===-1&&vo===go?y$1:p$1}function k(eo,to){let ro=Date.now(),no=p$1;return(oo,io,so,ao,lo,uo)=>{const co=Date.now();if(uo.has("historic"))return no=p$1,ro=co,f$1;const fo=S$1(oo,io,ao,lo,eo.isComposing()),ho=(()=>{const po=so===null||so.editor===eo,go=uo.has("history-push");if(!go&&po&&uo.has("history-merge"))return l;if(oo===null)return _$1;const vo=io._selection;return ao.size>0||lo.size>0?go===!1&&fo!==p$1&&fo===no&&co{const ho=to.current,po=to.redoStack,go=to.undoStack,vo=ho===null?null:ho.editorState;if(ho!==null&&ao===vo)return;const bo=no(lo,ao,ho,uo,co,fo);if(bo===_$1)po.length!==0&&(to.redoStack=[],eo.dispatchCommand(CAN_REDO_COMMAND,!1)),ho!==null&&(go.push({...ho}),eo.dispatchCommand(CAN_UNDO_COMMAND,!0));else if(bo===f$1)return;to.current={editor:eo,editorState:ao}},io=mergeRegister(eo.registerCommand(UNDO_COMMAND,()=>(function(ao,lo){const uo=lo.redoStack,co=lo.undoStack;if(co.length!==0){const fo=lo.current,ho=co.pop();fo!==null&&(uo.push(fo),ao.dispatchCommand(CAN_REDO_COMMAND,!0)),co.length===0&&ao.dispatchCommand(CAN_UNDO_COMMAND,!1),lo.current=ho||null,ho&&ho.editor.setEditorState(ho.editorState,{tag:"historic"})}}(eo,to),!0),COMMAND_PRIORITY_EDITOR),eo.registerCommand(REDO_COMMAND,()=>(function(ao,lo){const uo=lo.redoStack,co=lo.undoStack;if(uo.length!==0){const fo=lo.current;fo!==null&&(co.push(fo),ao.dispatchCommand(CAN_UNDO_COMMAND,!0));const ho=uo.pop();uo.length===0&&ao.dispatchCommand(CAN_REDO_COMMAND,!1),lo.current=ho||null,ho&&ho.editor.setEditorState(ho.editorState,{tag:"historic"})}}(eo,to),!0),COMMAND_PRIORITY_EDITOR),eo.registerCommand(CLEAR_EDITOR_COMMAND,()=>(C$2(to),!1),COMMAND_PRIORITY_EDITOR),eo.registerCommand(CLEAR_HISTORY_COMMAND,()=>(C$2(to),eo.dispatchCommand(CAN_REDO_COMMAND,!1),eo.dispatchCommand(CAN_UNDO_COMMAND,!1),!0),COMMAND_PRIORITY_EDITOR),eo.registerUpdateListener(oo)),so=eo.registerUpdateListener(oo);return()=>{io(),so()}}function M(){return{current:null,redoStack:[],undoStack:[]}}const modProd$a=Object.freeze(Object.defineProperty({__proto__:null,createEmptyHistoryState:M,registerHistory:x$2},Symbol.toStringTag,{value:"Module"})),mod$a=modProd$a,createEmptyHistoryState=mod$a.createEmptyHistoryState,registerHistory=mod$a.registerHistory;function c$3({externalHistoryState:eo}){const[to]=useLexicalComposerContext();return function(ro,no,oo=1e3){const io=reactExports.useMemo(()=>no||createEmptyHistoryState(),[no]);reactExports.useEffect(()=>registerHistory(ro,io,oo),[oo,ro,io])}(to,eo),null}const modProd$9=Object.freeze(Object.defineProperty({__proto__:null,HistoryPlugin:c$3,createEmptyHistoryState},Symbol.toStringTag,{value:"Module"})),mod$9=modProd$9,HistoryPlugin=mod$9.HistoryPlugin;var o$1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?reactExports.useLayoutEffect:reactExports.useEffect;function i$2({ignoreHistoryMergeTagChange:eo=!0,ignoreSelectionChange:to=!1,onChange:ro}){const[no]=useLexicalComposerContext();return o$1(()=>{if(ro)return no.registerUpdateListener(({editorState:oo,dirtyElements:io,dirtyLeaves:so,prevEditorState:ao,tags:lo})=>{to&&io.size===0&&so.size===0||eo&&lo.has("history-merge")||ao.isEmpty()||ro(oo,no,lo)})},[no,eo,to,ro]),null}const modProd$8=Object.freeze(Object.defineProperty({__proto__:null,OnChangePlugin:i$2},Symbol.toStringTag,{value:"Module"})),mod$8=modProd$8,OnChangePlugin=mod$8.OnChangePlugin;var u$3=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?reactExports.useLayoutEffect:reactExports.useEffect;function c$2(eo){return{initialValueFn:()=>eo.isEditable(),subscribe:to=>eo.registerEditableListener(to)}}function a$2(){return function(eo){const[to]=useLexicalComposerContext(),ro=reactExports.useMemo(()=>eo(to),[to,eo]),no=reactExports.useRef(ro.initialValueFn()),[oo,io]=reactExports.useState(no.current);return u$3(()=>{const{initialValueFn:so,subscribe:ao}=ro,lo=so();return no.current!==lo&&(no.current=lo,io(lo)),ao(uo=>{no.current=uo,io(uo)})},[ro,eo]),oo}(c$2)}const modProd$7=Object.freeze(Object.defineProperty({__proto__:null,default:a$2},Symbol.toStringTag,{value:"Module"})),mod$7=modProd$7,t$1=mod$7.default;function s$1(eo,to){let ro=eo.getFirstChild(),no=0;e:for(;ro!==null;){if($isElementNode(ro)){const so=ro.getFirstChild();if(so!==null){ro=so;continue}}else if($isTextNode(ro)){const so=ro.getTextContentSize();if(no+so>to)return{node:ro,offset:to-no};no+=so}const oo=ro.getNextSibling();if(oo!==null){ro=oo;continue}let io=ro.getParent();for(;io!==null;){const so=io.getNextSibling();if(so!==null){ro=so;continue e}io=io.getParent()}break}return null}function u$2(eo,to=!0){if(eo)return!1;let ro=c$1();return to&&(ro=ro.trim()),ro===""}function f(eo,to){return()=>u$2(eo,to)}function c$1(){return $getRoot().getTextContent()}function g$2(eo){if(!u$2(eo,!1))return!1;const to=$getRoot().getChildren(),ro=to.length;if(ro>1)return!1;for(let no=0;nog$2(eo)}function a$1(eo,to,ro,no){const oo=so=>so instanceof ro,io=so=>{const ao=$createTextNode(so.getTextContent());ao.setFormat(so.getFormat()),so.replace(ao)};return[eo.registerNodeTransform(TextNode$1,so=>{if(!so.isSimpleText())return;const ao=so.getPreviousSibling();let lo,uo=so.getTextContent(),co=so;if($isTextNode(ao)){const fo=ao.getTextContent(),ho=to(fo+uo);if(oo(ao)){if(ho===null||(po=>po.getLatest().__mode)(ao)!==0)return void io(ao);{const po=ho.end-fo.length;if(po>0){const go=fo+uo.slice(0,po);if(ao.select(),ao.setTextContent(go),po===uo.length)so.remove();else{const vo=uo.slice(po);so.setTextContent(vo)}return}}}else if(ho===null||ho.start{const ao=so.getTextContent(),lo=to(ao);if(lo===null||lo.start!==0)return void io(so);if(ao.length>lo.end)return void so.splitText(lo.end);const uo=so.getPreviousSibling();$isTextNode(uo)&&uo.isTextEntity()&&(io(uo),io(so));const co=so.getNextSibling();$isTextNode(co)&&co.isTextEntity()&&(io(co),oo(so)&&io(so))})]}const modProd$6=Object.freeze(Object.defineProperty({__proto__:null,$canShowPlaceholder:g$2,$canShowPlaceholderCurry:x$1,$findTextIntersectionFromCharacters:s$1,$isRootTextContentEmpty:u$2,$isRootTextContentEmptyCurry:f,$rootTextContent:c$1,registerLexicalTextEntity:a$1},Symbol.toStringTag,{value:"Module"})),mod$6=modProd$6,$canShowPlaceholderCurry=mod$6.$canShowPlaceholderCurry;function o(eo){const to=window.location.origin,ro=no=>{if(no.origin!==to)return;const oo=eo.getRootElement();if(document.activeElement!==oo)return;const io=no.data;if(typeof io=="string"){let so;try{so=JSON.parse(io)}catch{return}if(so&&so.protocol==="nuanria_messaging"&&so.type==="request"){const ao=so.payload;if(ao&&ao.functionId==="makeChanges"){const lo=ao.args;if(lo){const[uo,co,fo,ho,po,go]=lo;eo.update(()=>{const vo=$getSelection();if($isRangeSelection(vo)){const bo=vo.anchor;let xo=bo.getNode(),_o=0,Eo=0;if($isTextNode(xo)&&uo>=0&&co>=0&&(_o=uo,Eo=uo+co,vo.setTextNodeRange(xo,_o,xo,Eo)),_o===Eo&&fo===""||(vo.insertRawText(fo),xo=bo.getNode()),$isTextNode(xo)){_o=ho,Eo=ho+po;const So=xo.getTextContentSize();_o=_o>So?So:_o,Eo=Eo>So?So:Eo,vo.setTextNodeRange(xo,_o,xo,Eo)}no.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",ro,!0),()=>{window.removeEventListener("message",ro,!0)}}const modProd$5=Object.freeze(Object.defineProperty({__proto__:null,registerDragonSupport:o},Symbol.toStringTag,{value:"Module"})),mod$5=modProd$5,registerDragonSupport=mod$5.registerDragonSupport;function i$1(eo,to){const ro=to.body?to.body.childNodes:[];let no=[];for(let oo=0;oo"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const ro=document.createElement("div"),no=$getRoot().getChildren();for(let oo=0;oow?(eo||window).getSelection():null;function v(eo){const to=$getSelection();if(to==null)throw Error("Expected valid LexicalSelection");return $isRangeSelection(to)&&to.isCollapsed()||to.getNodes().length===0?"":$generateHtmlFromNodes(eo,to)}function D(eo){const to=$getSelection();if(to==null)throw Error("Expected valid LexicalSelection");return $isRangeSelection(to)&&to.isCollapsed()||to.getNodes().length===0?null:JSON.stringify(T(eo,to))}function C$1(eo,to){const ro=eo.getData("text/plain")||eo.getData("text/uri-list");ro!=null&&to.insertRawText(ro)}function E$1(eo,to,ro){const no=eo.getData("application/x-lexical-editor");if(no)try{const so=JSON.parse(no);if(so.namespace===ro._config.namespace&&Array.isArray(so.nodes))return N(ro,_(so.nodes),to)}catch{}const oo=eo.getData("text/html");if(oo)try{const so=new DOMParser().parseFromString(oo,"text/html");return N(ro,$generateNodesFromDOM(ro,so),to)}catch{}const io=eo.getData("text/plain")||eo.getData("text/uri-list");if(io!=null)if($isRangeSelection(to)){const so=io.split(/(\r?\n|\t)/);so[so.length-1]===""&&so.pop();for(let ao=0;ao0?lo.text=uo:oo=!1}for(let uo=0;uo{eo.update(()=>{ao(P(eo,to))})});const ro=eo.getRootElement(),no=eo._window==null?window.document:eo._window.document,oo=y(eo._window);if(ro===null||oo===null)return!1;const io=no.createElement("span");io.style.cssText="position: fixed; top: -1000px;",io.append(no.createTextNode("#")),ro.append(io);const so=new Range;return so.setStart(io,0),so.setEnd(io,1),oo.removeAllRanges(),oo.addRange(so),new Promise((ao,lo)=>{const uo=eo.registerCommand(COPY_COMMAND,co=>(objectKlassEquals(co,ClipboardEvent)&&(uo(),A!==null&&(window.clearTimeout(A),A=null),ao(P(eo,co))),!0),COMMAND_PRIORITY_CRITICAL);A=window.setTimeout(()=>{uo(),A=null,ao(!1)},50),no.execCommand("copy"),io.remove()})}function P(eo,to){const ro=y(eo._window);if(!ro)return!1;const no=ro.anchorNode,oo=ro.focusNode;if(no!==null&&oo!==null&&!isSelectionWithinEditor(eo,no,oo))return!1;to.preventDefault();const io=to.clipboardData,so=$getSelection();if(io===null||so===null)return!1;const ao=v(eo),lo=D(eo);let uo="";return so!==null&&(uo=so.getTextContent()),ao!==null&&io.setData("text/html",ao),lo!==null&&io.setData("application/x-lexical-editor",lo),io.setData("text/plain",uo),!0}const modProd$3=Object.freeze(Object.defineProperty({__proto__:null,$generateJSONFromSelectedNodes:T,$generateNodesFromSerializedNodes:_,$getHtmlContent:v,$getLexicalContent:D,$insertDataTransferForPlainText:C$1,$insertDataTransferForRichText:E$1,$insertGeneratedNodes:N,copyToClipboard:R},Symbol.toStringTag,{value:"Module"})),mod$3=modProd$3,$insertDataTransferForRichText=mod$3.$insertDataTransferForRichText,copyToClipboard=mod$3.copyToClipboard;function st(eo,to){if(document.caretRangeFromPoint!==void 0){const ro=document.caretRangeFromPoint(eo,to);return ro===null?null:{node:ro.startContainer,offset:ro.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const ro=document.caretPositionFromPoint(eo,to);return ro===null?null:{node:ro.offsetNode,offset:ro.offset}}return null}const at=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ct=at&&"documentMode"in document?document.documentMode:null,ut=!(!at||!("InputEvent"in window)||ct)&&"getTargetRanges"in new window.InputEvent("input"),lt=at&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),dt=at&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,mt=at&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ft=at&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!mt,gt=createCommand("DRAG_DROP_PASTE_FILE");class pt extends ElementNode{static getType(){return"quote"}static clone(to){return new pt(to.__key)}constructor(to){super(to)}createDOM(to){const ro=document.createElement("blockquote");return addClassNamesToElement(ro,to.theme.quote),ro}updateDOM(to,ro){return!1}static importDOM(){return{blockquote:to=>({conversion:xt,priority:0})}}exportDOM(to){const{element:ro}=super.exportDOM(to);if(ro&&isHTMLElement$1(ro)){this.isEmpty()&&ro.append(document.createElement("br"));const no=this.getFormatType();ro.style.textAlign=no;const oo=this.getDirection();oo&&(ro.dir=oo)}return{element:ro}}static importJSON(to){const ro=ht();return ro.setFormat(to.format),ro.setIndent(to.indent),ro.setDirection(to.direction),ro}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(to,ro){const no=$createParagraphNode(),oo=this.getDirection();return no.setDirection(oo),this.insertAfter(no,ro),no}collapseAtStart(){const to=$createParagraphNode();return this.getChildren().forEach(ro=>to.append(ro)),this.replace(to),!0}}function ht(){return $applyNodeReplacement(new pt)}function vt(eo){return eo instanceof pt}class Ct extends ElementNode{static getType(){return"heading"}static clone(to){return new Ct(to.__tag,to.__key)}constructor(to,ro){super(ro),this.__tag=to}getTag(){return this.__tag}createDOM(to){const ro=this.__tag,no=document.createElement(ro),oo=to.theme.heading;if(oo!==void 0){const io=oo[ro];addClassNamesToElement(no,io)}return no}updateDOM(to,ro){return!1}static importDOM(){return{h1:to=>({conversion:Dt,priority:0}),h2:to=>({conversion:Dt,priority:0}),h3:to=>({conversion:Dt,priority:0}),h4:to=>({conversion:Dt,priority:0}),h5:to=>({conversion:Dt,priority:0}),h6:to=>({conversion:Dt,priority:0}),p:to=>{const ro=to.firstChild;return ro!==null&&yt(ro)?{conversion:()=>({node:null}),priority:3}:null},span:to=>yt(to)?{conversion:ro=>({node:wt("h1")}),priority:3}:null}}exportDOM(to){const{element:ro}=super.exportDOM(to);if(ro&&isHTMLElement$1(ro)){this.isEmpty()&&ro.append(document.createElement("br"));const no=this.getFormatType();ro.style.textAlign=no;const oo=this.getDirection();oo&&(ro.dir=oo)}return{element:ro}}static importJSON(to){const ro=wt(to.tag);return ro.setFormat(to.format),ro.setIndent(to.indent),ro.setDirection(to.direction),ro}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(to,ro=!0){const no=to?to.anchor.offset:0,oo=no!==this.getTextContentSize()&&to?wt(this.getTag()):$createParagraphNode(),io=this.getDirection();if(oo.setDirection(io),this.insertAfter(oo,ro),no===0&&!this.isEmpty()&&to){const so=$createParagraphNode();so.select(),this.replace(so,!0)}return oo}collapseAtStart(){const to=this.isEmpty()?$createParagraphNode():wt(this.getTag());return this.getChildren().forEach(ro=>to.append(ro)),this.replace(to),!0}extractWithChild(){return!0}}function yt(eo){return eo.nodeName.toLowerCase()==="span"&&eo.style.fontSize==="26pt"}function Dt(eo){const to=eo.nodeName.toLowerCase();let ro=null;return to!=="h1"&&to!=="h2"&&to!=="h3"&&to!=="h4"&&to!=="h5"&&to!=="h6"||(ro=wt(to),eo.style!==null&&ro.setFormat(eo.style.textAlign)),{node:ro}}function xt(eo){const to=ht();return eo.style!==null&&to.setFormat(eo.style.textAlign),{node:to}}function wt(eo){return $applyNodeReplacement(new Ct(eo))}function Et(eo){return eo instanceof Ct}function Nt(eo){let to=null;if(objectKlassEquals(eo,DragEvent)?to=eo.dataTransfer:objectKlassEquals(eo,ClipboardEvent)&&(to=eo.clipboardData),to===null)return[!1,[],!1];const ro=to.types,no=ro.includes("Files"),oo=ro.includes("text/html")||ro.includes("text/plain");return[no,Array.from(to.files),oo]}function At(eo){const to=$getSelection();if(!$isRangeSelection(to))return!1;const ro=new Set,no=to.getNodes();for(let oo=0;oo0}function Pt(eo){const to=$getNearestNodeFromDOMNode(eo);return $isDecoratorNode(to)}function Ot(eo){return mergeRegister(eo.registerCommand(CLICK_COMMAND,to=>{const ro=$getSelection();return!!$isNodeSelection(ro)&&(ro.clear(),!0)},0),eo.registerCommand(DELETE_CHARACTER_COMMAND,to=>{const ro=$getSelection();return!!$isRangeSelection(ro)&&(ro.deleteCharacter(to),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(DELETE_WORD_COMMAND,to=>{const ro=$getSelection();return!!$isRangeSelection(ro)&&(ro.deleteWord(to),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(DELETE_LINE_COMMAND,to=>{const ro=$getSelection();return!!$isRangeSelection(ro)&&(ro.deleteLine(to),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(CONTROLLED_TEXT_INSERTION_COMMAND,to=>{const ro=$getSelection();if(typeof to=="string")ro!==null&&ro.insertText(to);else{if(ro===null)return!1;const no=to.dataTransfer;if(no!=null)$insertDataTransferForRichText(no,ro,eo);else if($isRangeSelection(ro)){const oo=to.data;return oo&&ro.insertText(oo),!0}}return!0},COMMAND_PRIORITY_EDITOR),eo.registerCommand(REMOVE_TEXT_COMMAND,()=>{const to=$getSelection();return!!$isRangeSelection(to)&&(to.removeText(),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(FORMAT_TEXT_COMMAND,to=>{const ro=$getSelection();return!!$isRangeSelection(ro)&&(ro.formatText(to),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(FORMAT_ELEMENT_COMMAND,to=>{const ro=$getSelection();if(!$isRangeSelection(ro)&&!$isNodeSelection(ro))return!1;const no=ro.getNodes();for(const oo of no){const io=$findMatchingParent(oo,so=>$isElementNode(so)&&!so.isInline());io!==null&&io.setFormat(to)}return!0},COMMAND_PRIORITY_EDITOR),eo.registerCommand(INSERT_LINE_BREAK_COMMAND,to=>{const ro=$getSelection();return!!$isRangeSelection(ro)&&(ro.insertLineBreak(to),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(INSERT_PARAGRAPH_COMMAND,()=>{const to=$getSelection();return!!$isRangeSelection(to)&&(to.insertParagraph(),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(INSERT_TAB_COMMAND,()=>($insertNodes([$createTabNode()]),!0),COMMAND_PRIORITY_EDITOR),eo.registerCommand(INDENT_CONTENT_COMMAND,()=>At(to=>{const ro=to.getIndent();to.setIndent(ro+1)}),COMMAND_PRIORITY_EDITOR),eo.registerCommand(OUTDENT_CONTENT_COMMAND,()=>At(to=>{const ro=to.getIndent();ro>0&&to.setIndent(ro-1)}),COMMAND_PRIORITY_EDITOR),eo.registerCommand(KEY_ARROW_UP_COMMAND,to=>{const ro=$getSelection();if($isNodeSelection(ro)&&!Pt(to.target)){const no=ro.getNodes();if(no.length>0)return no[0].selectPrevious(),!0}else if($isRangeSelection(ro)){const no=$getAdjacentNode(ro.focus,!0);if(!to.shiftKey&&$isDecoratorNode(no)&&!no.isIsolated()&&!no.isInline())return no.selectPrevious(),to.preventDefault(),!0}return!1},COMMAND_PRIORITY_EDITOR),eo.registerCommand(KEY_ARROW_DOWN_COMMAND,to=>{const ro=$getSelection();if($isNodeSelection(ro)){const no=ro.getNodes();if(no.length>0)return no[0].selectNext(0,0),!0}else if($isRangeSelection(ro)){if(function(oo){const io=oo.focus;return io.key==="root"&&io.offset===$getRoot().getChildrenSize()}(ro))return to.preventDefault(),!0;const no=$getAdjacentNode(ro.focus,!1);if(!to.shiftKey&&$isDecoratorNode(no)&&!no.isIsolated()&&!no.isInline())return no.selectNext(),to.preventDefault(),!0}return!1},COMMAND_PRIORITY_EDITOR),eo.registerCommand(KEY_ARROW_LEFT_COMMAND,to=>{const ro=$getSelection();if($isNodeSelection(ro)){const no=ro.getNodes();if(no.length>0)return to.preventDefault(),no[0].selectPrevious(),!0}if(!$isRangeSelection(ro))return!1;if($shouldOverrideDefaultCharacterSelection(ro,!0)){const no=to.shiftKey;return to.preventDefault(),$moveCharacter(ro,no,!0),!0}return!1},COMMAND_PRIORITY_EDITOR),eo.registerCommand(KEY_ARROW_RIGHT_COMMAND,to=>{const ro=$getSelection();if($isNodeSelection(ro)&&!Pt(to.target)){const oo=ro.getNodes();if(oo.length>0)return to.preventDefault(),oo[0].selectNext(0,0),!0}if(!$isRangeSelection(ro))return!1;const no=to.shiftKey;return!!$shouldOverrideDefaultCharacterSelection(ro,!1)&&(to.preventDefault(),$moveCharacter(ro,no,!1),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(KEY_BACKSPACE_COMMAND,to=>{if(Pt(to.target))return!1;const ro=$getSelection();if(!$isRangeSelection(ro))return!1;to.preventDefault();const{anchor:no}=ro,oo=no.getNode();return ro.isCollapsed()&&no.offset===0&&!$isRootNode(oo)&&$getNearestBlockElementAncestorOrThrow(oo).getIndent()>0?eo.dispatchCommand(OUTDENT_CONTENT_COMMAND,void 0):eo.dispatchCommand(DELETE_CHARACTER_COMMAND,!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(KEY_DELETE_COMMAND,to=>{if(Pt(to.target))return!1;const ro=$getSelection();return!!$isRangeSelection(ro)&&(to.preventDefault(),eo.dispatchCommand(DELETE_CHARACTER_COMMAND,!1))},COMMAND_PRIORITY_EDITOR),eo.registerCommand(KEY_ENTER_COMMAND,to=>{const ro=$getSelection();if(!$isRangeSelection(ro))return!1;if(to!==null){if((dt||lt||ft)&&ut)return!1;if(to.preventDefault(),to.shiftKey)return eo.dispatchCommand(INSERT_LINE_BREAK_COMMAND,!1)}return eo.dispatchCommand(INSERT_PARAGRAPH_COMMAND,void 0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(KEY_ESCAPE_COMMAND,()=>{const to=$getSelection();return!!$isRangeSelection(to)&&(eo.blur(),!0)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(DROP_COMMAND,to=>{const[,ro]=Nt(to);if(ro.length>0){const oo=st(to.clientX,to.clientY);if(oo!==null){const{offset:io,node:so}=oo,ao=$getNearestNodeFromDOMNode(so);if(ao!==null){const lo=$createRangeSelection();if($isTextNode(ao))lo.anchor.set(ao.getKey(),io,"text"),lo.focus.set(ao.getKey(),io,"text");else{const co=ao.getParentOrThrow().getKey(),fo=ao.getIndexWithinParent()+1;lo.anchor.set(co,fo,"element"),lo.focus.set(co,fo,"element")}const uo=$normalizeSelection__EXPERIMENTAL(lo);$setSelection(uo)}eo.dispatchCommand(gt,ro)}return to.preventDefault(),!0}const no=$getSelection();return!!$isRangeSelection(no)},COMMAND_PRIORITY_EDITOR),eo.registerCommand(DRAGSTART_COMMAND,to=>{const[ro]=Nt(to),no=$getSelection();return!(ro&&!$isRangeSelection(no))},COMMAND_PRIORITY_EDITOR),eo.registerCommand(DRAGOVER_COMMAND,to=>{const[ro]=Nt(to),no=$getSelection();if(ro&&!$isRangeSelection(no))return!1;const oo=st(to.clientX,to.clientY);if(oo!==null){const io=$getNearestNodeFromDOMNode(oo.node);$isDecoratorNode(io)&&to.preventDefault()}return!0},COMMAND_PRIORITY_EDITOR),eo.registerCommand(SELECT_ALL_COMMAND,()=>($selectAll(),!0),COMMAND_PRIORITY_EDITOR),eo.registerCommand(COPY_COMMAND,to=>(copyToClipboard(eo,objectKlassEquals(to,ClipboardEvent)?to:null),!0),COMMAND_PRIORITY_EDITOR),eo.registerCommand(CUT_COMMAND,to=>(async function(ro,no){await copyToClipboard(no,objectKlassEquals(ro,ClipboardEvent)?ro:null),no.update(()=>{const oo=$getSelection();$isRangeSelection(oo)?oo.removeText():$isNodeSelection(oo)&&oo.getNodes().forEach(io=>io.remove())})}(to,eo),!0),COMMAND_PRIORITY_EDITOR),eo.registerCommand(PASTE_COMMAND,to=>{const[,ro,no]=Nt(to);return ro.length>0&&!no?(eo.dispatchCommand(gt,ro),!0):isSelectionCapturedInDecoratorInput(to.target)?!1:$getSelection()!==null&&(function(oo,io){oo.preventDefault(),io.update(()=>{const so=$getSelection(),ao=objectKlassEquals(oo,InputEvent)||objectKlassEquals(oo,KeyboardEvent)?null:oo.clipboardData;ao!=null&&so!==null&&$insertDataTransferForRichText(ao,so,io)},{tag:"paste"})}(to,eo),!0)},COMMAND_PRIORITY_EDITOR))}const modProd$2=Object.freeze(Object.defineProperty({__proto__:null,$createHeadingNode:wt,$createQuoteNode:ht,$isHeadingNode:Et,$isQuoteNode:vt,DRAG_DROP_PASTE:gt,HeadingNode:Ct,QuoteNode:pt,eventFiles:Nt,registerRichText:Ot},Symbol.toStringTag,{value:"Module"})),mod$2=modProd$2,DRAG_DROP_PASTE=mod$2.DRAG_DROP_PASTE,eventFiles=mod$2.eventFiles,registerRichText=mod$2.registerRichText;var p=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?reactExports.useLayoutEffect:reactExports.useEffect;function E(eo){return eo.getEditorState().read($canShowPlaceholderCurry(eo.isComposing()))}function x({contentEditable:eo,placeholder:to,ErrorBoundary:ro}){const[no]=useLexicalComposerContext(),oo=function(io,so){const[ao,lo]=reactExports.useState(()=>io.getDecorators());return p(()=>io.registerDecoratorListener(uo=>{reactDomExports.flushSync(()=>{lo(uo)})}),[io]),reactExports.useEffect(()=>{lo(io.getDecorators())},[io]),reactExports.useMemo(()=>{const uo=[],co=Object.keys(ao);for(let fo=0;foio._onError(vo)},reactExports.createElement(reactExports.Suspense,{fallback:null},ao[ho])),go=io.getElementByKey(ho);go!==null&&uo.push(reactDomExports.createPortal(po,go,ho))}return uo},[so,ao,io])}(no,ro);return function(io){p(()=>mergeRegister(registerRichText(io),registerDragonSupport(io)),[io])}(no),reactExports.createElement(reactExports.Fragment,null,eo,reactExports.createElement(g,{content:to}),oo)}function g({content:eo}){const[to]=useLexicalComposerContext(),ro=function(oo){const[io,so]=reactExports.useState(()=>E(oo));return p(()=>{function ao(){const lo=E(oo);so(lo)}return ao(),mergeRegister(oo.registerUpdateListener(()=>{ao()}),oo.registerEditableListener(()=>{ao()}))},[oo]),io}(to),no=t$1();return ro?typeof eo=="function"?eo(no):eo:null}const modProd$1=Object.freeze(Object.defineProperty({__proto__:null,RichTextPlugin:x},Symbol.toStringTag,{value:"Module"})),mod$1=modProd$1,RichTextPlugin=mod$1.RichTextPlugin;var RichEditorContentType=(eo=>(eo.IMAGE="image",eo.TEXT="text",eo))(RichEditorContentType||{});const FAKE_PROTOCOL="fake:",CAN_USE_DOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function d(eo,to){return eo.getEditorState().read(()=>{const ro=$getNodeByKey(to);return ro!==null&&ro.isSelected()})}function u(eo){const[to]=useLexicalComposerContext(),[ro,no]=reactExports.useState(()=>d(to,eo));return reactExports.useEffect(()=>{let oo=!0;const io=to.registerUpdateListener(()=>{oo&&no(d(to,eo))});return()=>{oo=!1,io()}},[to,eo]),[ro,reactExports.useCallback(oo=>{to.update(()=>{let io=$getSelection();$isNodeSelection(io)||(io=$createNodeSelection(),$setSelection(io)),$isNodeSelection(io)&&(oo?io.add(eo):io.delete(eo))})},[to,eo]),reactExports.useCallback(()=>{to.update(()=>{const oo=$getSelection();$isNodeSelection(oo)&&oo.clear()})},[to])]}const modProd=Object.freeze(Object.defineProperty({__proto__:null,useLexicalNodeSelection:u},Symbol.toStringTag,{value:"Module"})),mod=modProd,useLexicalNodeSelection=mod.useLexicalNodeSelection;function useEventCallback(eo){const to=reactExports.useRef(eo);return reactExports.useLayoutEffect(()=>{to.current=eo}),reactExports.useCallback((...ro)=>{const no=to.current;return no(...ro)},[])}const INSERT_IMAGE_COMMAND=createCommand("INSERT_IMAGE_COMMAND"),INSERT_MULTIPLE_NODES_COMMAND=createCommand("INSERT_MULTIPLE_NODES_COMMAND"),RIGHT_CLICK_IMAGE_COMMAND=createCommand("RIGHT_CLICK_IMAGE_COMMAND");class RichEditorViewModel extends ViewModel{constructor(to){super(),this.editor$=new State(void 0),this.maxHeight$=new State(void 0),this.resolveUrlByPath$=new State(void 0),this.resolveUrlByFile$=new State(void 0),this._resetEditorState=to.resetEditorState,this._replaceImageSrc=to.replaceImageSrc,this._extractEditorData=to.extractEditorData}get requiredEditor(){const to=this.editor$.getSnapshot();if(!to)throw new Error("[RichEditor] editor is not prepared.");return to}focus(){this.requiredEditor.focus()}getContent(){const ro=this.requiredEditor.getEditorState();return this._extractEditorData(ro)}insert(to){this.requiredEditor.dispatchCommand(INSERT_MULTIPLE_NODES_COMMAND,{nodes:to})}isEmpty(){return this.requiredEditor.getEditorState().read(()=>{const oo=$getRoot(),io=oo.getFirstChild();return io?oo.getChildrenSize()===1&&io instanceof ElementNode?io.isEmpty():!1:!0})}replaceImageSrc(to,ro){const no=this.editor$.getSnapshot();if(!no)throw new Error("[RichEditor] editor is not prepared.");this._replaceImageSrc(no,to,ro)}reset(to){const ro=this.requiredEditor;this._resetEditorState(to)(ro)}async resolveUrlByFile(to){const ro=this.resolveUrlByFile$.getSnapshot();return ro?ro(to):""}async resolveUrlByPath(to){if(to.startsWith(FAKE_PROTOCOL))return to;const ro=this.resolveUrlByPath$.getSnapshot();return(ro==null?void 0:ro(to))??to}}const RichEditorContextType=reactExports.createContext({viewmodel:new RichEditorViewModel({extractEditorData:()=>[],resetEditorState:()=>()=>{},replaceImageSrc:()=>{}})}),useRichEditorContext=()=>{const eo=reactExports.useContext(RichEditorContextType),to=reactExports.useContext(LexicalComposerContext),ro=(to==null?void 0:to[0])??void 0;return ro&&eo.viewmodel.editor$.next(ro),eo},useAutoResize=()=>{const[eo]=useLexicalComposerContext(),{viewmodel:to}=useRichEditorContext(),ro=useStateValue(to.maxHeight$);return useEventCallback(()=>{if(ro===void 0)return;const oo=eo==null?void 0:eo.getRootElement();if(oo){oo.style.height="24px";const io=Math.min(ro,oo.scrollHeight);oo.style.height=`${io}px`}})},imageCache=new Set;function useSuspenseImage(eo){imageCache.has(eo)||new Promise(to=>{const ro=new Image;ro.src=eo,ro.onload=()=>{imageCache.add(eo),to(null)}})}function LazyImage({alt:eo,className:to,imageRef:ro,src:no,width:oo,height:io,maxWidth:so,onLoad:ao}){return useSuspenseImage(no),jsxRuntimeExports.jsx("img",{className:to||void 0,src:no,alt:eo,ref:ro,style:{height:io,maxWidth:so,width:oo,border:"1px solid #E5E5E5"},draggable:!1,onLoad:ao})}const ImageComponent=eo=>{const{viewmodel:to}=useRichEditorContext(),ro=useAutoResize(),{src:no,alt:oo,nodeKey:io,width:so,height:ao,maxWidth:lo,isImageNode:uo}=eo,[co,fo]=reactExports.useState(no),ho=reactExports.useRef(null),po=reactExports.useRef(null),[go,vo,bo]=useLexicalNodeSelection(io),[xo]=useLexicalComposerContext(),[_o,Eo]=reactExports.useState(null),So=reactExports.useRef(null),To=reactExports.useCallback(Fo=>{if(go&&$isNodeSelection($getSelection())){Fo.preventDefault();const Lo=$getNodeByKey(io);uo(Lo)&&Lo.remove()}return!1},[go,io,uo]),wo=reactExports.useCallback(Fo=>{const $o=$getSelection(),Lo=po.current;return go&&$isNodeSelection($o)&&$o.getNodes().length===1&&Lo!==null&&Lo!==document.activeElement?(Fo.preventDefault(),Lo.focus(),!0):!1},[go]),Co=reactExports.useCallback(Fo=>Fo.target===ho.current?(Fo.preventDefault(),!0):!1,[]),Oo=reactExports.useCallback(Fo=>po.current===Fo.target?($setSelection(null),xo.update(()=>{vo(!0);const $o=xo.getRootElement();$o!==null&&$o.focus()}),!0):!1,[xo,vo]),Ao=reactExports.useCallback(Fo=>{const $o=Fo;return $o.target===ho.current?($o.shiftKey?vo(!go):(bo(),vo(!0)),!0):!1},[go,vo,bo]),Ro=reactExports.useCallback(Fo=>{xo.getEditorState().read(()=>{const $o=$getSelection();Fo.target.tagName==="IMG"&&$isRangeSelection($o)&&$o.getNodes().length===1&&xo.dispatchCommand(RIGHT_CLICK_IMAGE_COMMAND,Fo)})},[xo]);reactExports.useEffect(()=>{let Fo=!1;return to.resolveUrlByPath(no).then($o=>{Fo||fo($o)}),()=>{Fo=!0}},[to,no]),reactExports.useEffect(()=>{let Fo=!0;const $o=xo.getRootElement(),Lo=mergeRegister(xo.registerUpdateListener(({editorState:Ho})=>{Fo&&Eo(Ho.read($getSelection))}),xo.registerCommand(SELECTION_CHANGE_COMMAND,(Ho,qo)=>(So.current=qo,!1),COMMAND_PRIORITY_LOW),xo.registerCommand(CLICK_COMMAND,Ao,COMMAND_PRIORITY_LOW),xo.registerCommand(RIGHT_CLICK_IMAGE_COMMAND,Ao,COMMAND_PRIORITY_LOW),xo.registerCommand(DRAGSTART_COMMAND,Co,COMMAND_PRIORITY_LOW),xo.registerCommand(KEY_DELETE_COMMAND,To,COMMAND_PRIORITY_LOW),xo.registerCommand(KEY_BACKSPACE_COMMAND,To,COMMAND_PRIORITY_LOW),xo.registerCommand(KEY_ENTER_COMMAND,wo,COMMAND_PRIORITY_LOW),xo.registerCommand(KEY_ESCAPE_COMMAND,Oo,COMMAND_PRIORITY_LOW));return $o==null||$o.addEventListener("contextmenu",Ro),()=>{Fo=!1,Lo(),$o==null||$o.removeEventListener("contextmenu",Ro)}},[xo,go,io,bo,To,Co,wo,Oo,Ao,Ro,vo]);const No=go&&$isNodeSelection(_o),Do=go?`focused ${$isNodeSelection(_o)?"draggable":""}`:void 0,jo=(co.startsWith(FAKE_PROTOCOL)?co.slice(FAKE_PROTOCOL.length):co).replace(/#[\s\S]*$/,"");return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsx("div",{draggable:No,children:jsxRuntimeExports.jsx(LazyImage,{className:Do,src:jo,alt:oo,imageRef:ho,width:so,height:ao,maxWidth:lo,onLoad:ro})})})};class ImageNode extends DecoratorNode{constructor(to,ro,no,oo,io,so){super(so),this.src=to,this.alt=ro,this.maxWidth=no,this.width=oo||"inherit",this.height=io||"inherit"}static getType(){return RichEditorContentType.IMAGE}static clone(to){return new ImageNode(to.src,to.alt,to.maxWidth,to.width,to.height,to.__key)}static importDOM(){return{img:to=>({conversion:convertImageElement,priority:0})}}static importJSON(to){const{alt:ro,height:no,width:oo,maxWidth:io,src:so}=to;return $createImageNode({alt:ro,height:no,maxWidth:io,src:so,width:oo})}exportDOM(){const to=document.createElement("img");return to.setAttribute("src",this.src),to.setAttribute("alt",this.alt),to.setAttribute("width",this.width.toString()),to.setAttribute("height",this.height.toString()),{element:to}}exportJSON(){return{alt:this.getAltText(),height:this.height==="inherit"?0:this.height,maxWidth:this.maxWidth,src:this.getSrc(),type:RichEditorContentType.IMAGE,version:1,width:this.width==="inherit"?0:this.width}}setWidthAndHeight(to,ro){const no=this.getWritable();no.width=to,no.height=ro}createDOM(to){const ro=document.createElement("span"),oo=to.theme.image;return oo!==void 0&&(ro.className=oo),ro}updateDOM(){return!1}getSrc(){return this.src}getAltText(){return this.alt}decorate(){return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsx(ImageComponent,{src:this.src,alt:this.alt,width:this.width,height:this.height,maxWidth:this.maxWidth,nodeKey:this.getKey(),isImageNode:$isImageNode})})}}function $createImageNode({alt:eo,height:to,maxWidth:ro=240,src:no,width:oo,key:io}){return $applyNodeReplacement(new ImageNode(no,eo,ro,oo,to,io))}function $isImageNode(eo){return eo instanceof ImageNode}function convertImageElement(eo){if(eo instanceof HTMLImageElement){const{alt:to,src:ro,width:no,height:oo}=eo;return ro.startsWith("blob:")?null:{node:$createImageNode({alt:to,height:oo,src:ro,width:no})}}return null}const CommandPlugin=()=>{const[eo]=useLexicalComposerContext();return React.useLayoutEffect(()=>mergeRegister(eo.registerCommand(INSERT_MULTIPLE_NODES_COMMAND,to=>{const{nodes:ro}=to;if(ro.length===1&&ro[0].type===RichEditorContentType.TEXT){const io=ro[0];return eo.update(()=>{const so=$getSelection();so&&so.insertRawText(io.value)}),!0}let no;const oo=[];for(const io of ro)switch(io.type){case RichEditorContentType.TEXT:{const so=$createTextNode(io.value),ao=$createParagraphNode();no=so,ao.append(so),oo.push(ao);break}case RichEditorContentType.IMAGE:{const so=$createImageNode(io),ao=$createParagraphNode();no=so,ao.append(so),oo.push(ao);break}}return oo.length<=0||($insertNodes(oo),no&&$isRootOrShadowRoot(no.getParentOrThrow())&&no.selectEnd()),!0},COMMAND_PRIORITY_EDITOR)),[eo]),jsxRuntimeExports.jsx(React.Fragment,{})};CommandPlugin.displayName="CommandPlugin";const ACCEPTABLE_IMAGE_TYPES=["image/","image/heic","image/heif","image/gif","image/webp"],DragDropPastePlugin=()=>{const[eo]=useLexicalComposerContext(),{viewmodel:to}=useRichEditorContext();return reactExports.useLayoutEffect(()=>eo.registerCommand(DRAG_DROP_PASTE,ro=>{return no(),!0;async function no(){for(const oo of ro)if(isMimeType(oo,ACCEPTABLE_IMAGE_TYPES)){const io=oo.name,so=await to.resolveUrlByFile(oo);eo.dispatchCommand(INSERT_IMAGE_COMMAND,{alt:io,src:so})}}},COMMAND_PRIORITY_LOW),[eo,to]),jsxRuntimeExports.jsx(reactExports.Fragment,{})};DragDropPastePlugin.displayName="DragDropPastePlugin";class Point{constructor(to,ro){this._x=to,this._y=ro}get x(){return this._x}get y(){return this._y}equals(to){return this.x===to.x&&this.y===to.y}calcDeltaXTo(to){return this.x-to.x}calcDeltaYTo(to){return this.y-to.y}calcHorizontalDistanceTo(to){return Math.abs(this.calcDeltaXTo(to))}calcVerticalDistance(to){return Math.abs(this.calcDeltaYTo(to))}calcDistanceTo(to){const ro=this.calcDeltaXTo(to)**2,no=this.calcDeltaYTo(to)**2;return Math.sqrt(ro+no)}}function isPoint(eo){return eo instanceof Point}class Rect{constructor(to,ro,no,oo){const[io,so]=ro<=oo?[ro,oo]:[oo,ro],[ao,lo]=to<=no?[to,no]:[no,to];this._top=io,this._right=lo,this._left=ao,this._bottom=so}get top(){return this._top}get right(){return this._right}get bottom(){return this._bottom}get left(){return this._left}get width(){return Math.abs(this._left-this._right)}get height(){return Math.abs(this._bottom-this._top)}static fromLTRB(to,ro,no,oo){return new Rect(to,ro,no,oo)}static fromLWTH(to,ro,no,oo){return new Rect(to,no,to+ro,no+oo)}static fromPoints(to,ro){const{y:no,x:oo}=to,{y:io,x:so}=ro;return Rect.fromLTRB(oo,no,so,io)}static fromDOM(to){const{top:ro,width:no,left:oo,height:io}=to.getBoundingClientRect();return Rect.fromLWTH(oo,no,ro,io)}equals(to){return to.top===this._top&&to.bottom===this._bottom&&to.left===this._left&&to.right===this._right}contains(to){if(isPoint(to)){const{x:ro,y:no}=to,oo=nothis._bottom,so=rothis._right;return{reason:{isOnBottomSide:io,isOnLeftSide:so,isOnRightSide:ao,isOnTopSide:oo},result:!oo&&!io&&!so&&!ao}}else{const{top:ro,left:no,bottom:oo,right:io}=to;return ro>=this._top&&ro<=this._bottom&&oo>=this._top&&oo<=this._bottom&&no>=this._left&&no<=this._right&&io>=this._left&&io<=this._right}}intersectsWith(to){const{left:ro,top:no,width:oo,height:io}=to,{left:so,top:ao,width:lo,height:uo}=this,co=ro+oo>=so+lo?ro+oo:so+lo,fo=no+io>=ao+uo?no+io:ao+uo,ho=ro<=so?ro:so,po=no<=ao?no:ao;return co-ho<=oo+lo&&fo-po<=io+uo}generateNewRect({left:to=this.left,top:ro=this.top,right:no=this.right,bottom:oo=this.bottom}){return new Rect(to,ro,no,oo)}}const SPACE=4,TARGET_LINE_HALF_HEIGHT=2,DRAGGABLE_BLOCK_MENU_CLASSNAME="draggable-block-menu",DRAG_DATA_FORMAT="application/x-lexical-drag-block",TEXT_BOX_HORIZONTAL_PADDING=28,Downward=1,Upward=-1,Indeterminate=0,DraggableBlockPlugin=eo=>{const{anchorElem:to=document.body}=eo,[ro]=useLexicalComposerContext();return useDraggableBlockMenu(ro,to,ro._editable)};DraggableBlockPlugin.displayName="DraggableBlockPlugin";let prevIndex=1/0;function getCurrentIndex(eo){return eo===0?1/0:prevIndex>=0&&prevIndex$getRoot().getChildrenKeys())}function getCollapsedMargins(eo){const to=(lo,uo)=>lo?parseFloat(window.getComputedStyle(lo)[uo]):0,{marginTop:ro,marginBottom:no}=window.getComputedStyle(eo),oo=to(eo.previousElementSibling,"marginBottom"),io=to(eo.nextElementSibling,"marginTop"),so=Math.max(parseFloat(ro),oo);return{marginBottom:Math.max(parseFloat(no),io),marginTop:so}}function getBlockElement(eo,to,ro,no=!1){const oo=eo.getBoundingClientRect(),io=getTopLevelNodeKeys(to);let so=null;return to.getEditorState().read(()=>{if(no){const uo=to.getElementByKey(io[0]),co=to.getElementByKey(io[io.length-1]),fo=uo==null?void 0:uo.getBoundingClientRect(),ho=co==null?void 0:co.getBoundingClientRect();if(fo&&ho&&(ro.yho.bottom&&(so=co),so))return}let ao=getCurrentIndex(io.length),lo=Indeterminate;for(;ao>=0&&ao{no.transform=ro})}function setTargetLine(eo,to,ro,no){const{top:oo,height:io}=to.getBoundingClientRect(),{top:so,width:ao}=no.getBoundingClientRect(),{marginTop:lo,marginBottom:uo}=getCollapsedMargins(to);let co=oo;ro>=oo?co+=io+uo/2:co-=lo/2;const fo=co-so-TARGET_LINE_HALF_HEIGHT,ho=TEXT_BOX_HORIZONTAL_PADDING-SPACE,po=eo.style;po.transform=`translate(${ho}px, ${fo}px)`,po.width=`${ao-(TEXT_BOX_HORIZONTAL_PADDING-SPACE)*2}px`,po.opacity=".4"}function hideTargetLine(eo){const to=eo==null?void 0:eo.style;to&&(to.opacity="0",to.transform="translate(-10000px, -10000px)")}function useDraggableBlockMenu(eo,to,ro){const no=to.parentElement,oo=reactExports.useRef(null),io=reactExports.useRef(null),so=reactExports.useRef(!1),[ao,lo]=reactExports.useState(null);reactExports.useLayoutEffect(()=>{function fo(po){const go=po.target;if(!isHTMLElement(go)){lo(null);return}if(isOnMenu(go))return;const vo=getBlockElement(to,eo,po);lo(vo)}function ho(){lo(null)}return no==null||no.addEventListener("mousemove",fo),no==null||no.addEventListener("mouseleave",ho),()=>{no==null||no.removeEventListener("mousemove",fo),no==null||no.removeEventListener("mouseleave",ho)}},[no,to,eo]),reactExports.useEffect(()=>{oo.current&&setMenuPosition(ao,oo.current,to)},[to,ao]),reactExports.useEffect(()=>{function fo(po){if(!so.current)return!1;const[go]=eventFiles(po);if(go)return!1;const{pageY:vo,target:bo}=po;if(!isHTMLElement(bo))return!1;const xo=getBlockElement(to,eo,po,!0),_o=io.current;return xo===null||_o===null?!1:(setTargetLine(_o,xo,vo,to),po.preventDefault(),!0)}function ho(po){if(!so.current)return!1;const[go]=eventFiles(po);if(go)return!1;const{target:vo,dataTransfer:bo,pageY:xo}=po,_o=(bo==null?void 0:bo.getData(DRAG_DATA_FORMAT))||"",Eo=$getNodeByKey(_o);if(!Eo||!isHTMLElement(vo))return!1;const So=getBlockElement(to,eo,po,!0);if(!So)return!1;const To=$getNearestNodeFromDOMNode(So);if(!To)return!1;if(To===Eo)return!0;const wo=So.getBoundingClientRect().top;return xo>=wo?To.insertAfter(Eo):To.insertBefore(Eo),lo(null),!0}return mergeRegister(eo.registerCommand(DRAGOVER_COMMAND,po=>fo(po),COMMAND_PRIORITY_LOW),eo.registerCommand(DROP_COMMAND,po=>ho(po),COMMAND_PRIORITY_HIGH))},[to,eo]);const uo=fo=>{const ho=fo.dataTransfer;if(!ho||!ao)return;setDragImage(ho,ao);let po="";eo.update(()=>{const go=$getNearestNodeFromDOMNode(ao);go&&(po=go.getKey())}),so.current=!0,ho.setData(DRAG_DATA_FORMAT,po)},co=()=>{so.current=!1,hideTargetLine(io.current)};return reactDomExports.createPortal(jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"icon draggable-block-menu",role:"button",ref:oo,draggable:!0,onDragStart:uo,onDragEnd:co,children:jsxRuntimeExports.jsx("div",{className:ro?"icon":""})}),jsxRuntimeExports.jsx("div",{className:"draggable-block-target-line",ref:io})]}),to)}const EditablePlugin=eo=>{const{editable:to}=eo,[ro]=useLexicalComposerContext();return reactExports.useEffect(()=>{ro.setEditable(to)},[ro,to]),jsxRuntimeExports.jsx(reactExports.Fragment,{})};EditablePlugin.displayName="EditablePlugin";const ImagesPlugin=()=>{const[eo]=useLexicalComposerContext();return reactExports.useLayoutEffect(()=>{if(!eo.hasNodes([ImageNode]))throw new Error("[RichEditor] ImagesPlugin: ImageNode not registered on editor");return mergeRegister(eo.registerCommand(INSERT_IMAGE_COMMAND,onInsertImage,COMMAND_PRIORITY_EDITOR),eo.registerCommand(DRAGSTART_COMMAND,onDragStart,COMMAND_PRIORITY_HIGH),eo.registerCommand(DRAGOVER_COMMAND,onDragover,COMMAND_PRIORITY_LOW),eo.registerCommand(DROP_COMMAND,to=>onDrop(to,eo),COMMAND_PRIORITY_HIGH))},[eo]),jsxRuntimeExports.jsx(reactExports.Fragment,{})};ImagesPlugin.displayName="ImagesPlugin";let _transparentImage;const getTransparentImage=()=>{if(_transparentImage===void 0){const eo="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";_transparentImage=document.createElement("img"),_transparentImage.src=eo}return _transparentImage};function onInsertImage(eo){const to=$createImageNode(eo);return $insertNodes([to]),$isRootOrShadowRoot(to.getParentOrThrow())&&$wrapNodeInElement(to,$createParagraphNode).selectEnd(),!0}function onDragStart(eo){const to=getImageNodeInSelection();if(!to)return!1;const ro=eo.dataTransfer;if(!ro)return!1;const no=getTransparentImage();return ro.setData("text/plain","_"),ro.setDragImage(no,0,0),ro.setData("application/x-lexical-drag",JSON.stringify({type:RichEditorContentType.IMAGE,data:{alt:to.alt,height:to.height,key:to.getKey(),maxWidth:to.maxWidth,src:to.src,width:to.width}})),!0}function onDragover(eo){return getImageNodeInSelection()?(canDropImage(eo)||eo.preventDefault(),!0):!1}function onDrop(eo,to){const ro=getImageNodeInSelection();if(!ro)return!1;const no=getDragImageData(eo);if(!no)return!1;if(eo.preventDefault(),canDropImage(eo)){const oo=getDragSelection(eo);ro.remove();const io=$createRangeSelection();oo!=null&&io.applyDOMRange(oo),$setSelection(io),to.dispatchCommand(INSERT_IMAGE_COMMAND,no)}return!0}function getImageNodeInSelection(){const eo=$getSelection();if(!$isNodeSelection(eo))return null;const ro=eo.getNodes()[0];return $isImageNode(ro)?ro:null}function getDragImageData(eo){var ro;const to=(ro=eo.dataTransfer)==null?void 0:ro.getData("application/x-lexical-drag");if(!to)return null;try{const{type:no,data:oo}=JSON.parse(to);return no===RichEditorContentType.IMAGE?oo:null}catch{return null}}function canDropImage(eo){const to=eo.target;return!!(to&&to instanceof HTMLElement&&!to.closest("code, span.editor-image")&&to.parentElement&&to.parentElement.closest("div.ContentEditable__root"))}const getDOMSelection=eo=>CAN_USE_DOM?(eo||window).getSelection():null;function getDragSelection(eo){const to=eo,ro=to.target,no=ro==null?null:ro.nodeType===9?ro.defaultView:ro.ownerDocument.defaultView,oo=getDOMSelection(no);let io;if(document.caretRangeFromPoint)io=document.caretRangeFromPoint(to.clientX,to.clientY);else if(to.rangeParent&&oo!==null)oo.collapse(to.rangeParent,to.rangeOffset||0),io=oo.getRangeAt(0);else throw Error("[RichEditor] ImagesPlugin: Cannot get the selection when dragging");return io}const OnKeyDownPlugin=eo=>{const[to]=useLexicalComposerContext(),ro=reactExports.useRef(eo.onKeyDown);return reactExports.useLayoutEffect(()=>{const no=oo=>{var io;(io=ro.current)==null||io.call(ro,oo)};return to.registerRootListener((oo,io)=>{io!==null&&io.removeEventListener("keydown",no),oo!==null&&oo.addEventListener("keydown",no)})},[to]),jsxRuntimeExports.jsx(reactExports.Fragment,{})};OnKeyDownPlugin.displayName="OnKeyDownPlugin";const PlainContentPastePlugin=()=>{const[eo]=useLexicalComposerContext();return reactExports.useLayoutEffect(()=>mergeRegister(eo.registerUpdateListener(to=>{to.tags.has("paste")&&eo.update(()=>{to.dirtyLeaves.forEach(ro=>{const no=$getNodeByKey(ro);if($isTextNode(no)){const oo=$copyNode(no);oo.setFormat(0),oo.setStyle(""),no.replace(oo)}})})}),eo.registerNodeTransform(TextNode$1,to=>{const ro=to.getParentOrThrow();if($isLinkNode(ro)){const no=$createTextNode(ro.__url);ro.insertBefore(no),ro.remove()}})),[eo]),jsxRuntimeExports.jsx(reactExports.Fragment,{})};PlainContentPastePlugin.displayName="PlainContentPastePlugin";const resetEditorState=eo=>to=>{to.update(()=>{const ro=$getRoot();ro.clear();for(const no of eo)if(no!=null){if(typeof no=="string"){const oo=$createTextNode(no),io=$createParagraphNode();io.append(oo),ro.append(io);continue}if(typeof no=="object"){switch(no.type){case RichEditorContentType.IMAGE:{const oo=$createImageNode({alt:no.alt,src:no.src}),io=$createParagraphNode();io.append(oo),ro.append(io);break}case RichEditorContentType.TEXT:{const oo=$createTextNode(no.value),io=$createParagraphNode();io.append(oo),ro.append(io);break}default:throw console.log("item:",no),new TypeError(`[resetEditorState] unknown rich-editor content type: ${no.type}`)}continue}console.error("[resetEditorState] unknown rich-editor data:",no)}})},RootType=RootNode.getType(),ParagraphType=ParagraphNode.getType(),TextType=TextNode$1.getType(),ImageType=ImageNode.getType(),LineBreakType=LineBreakNode.getType(),extractEditorData=eo=>{const to=eo.toJSON(),ro=[];for(const oo of to.root.children)no(oo);return ro;function no(oo){switch(oo.type){case ImageType:{const{src:io,alt:so}=oo;if(io.startsWith(FAKE_PROTOCOL)){const ao=ro[ro.length-1];(ao==null?void 0:ao.type)===RichEditorContentType.TEXT&&(ao.value+=` +`);break}ro.push({type:RichEditorContentType.IMAGE,src:io,alt:so});break}case LineBreakType:{const io=ro[ro.length-1];(io==null?void 0:io.type)===RichEditorContentType.TEXT&&(io.value+=` +`);break}case ParagraphType:{const io=oo.children;for(const so of io)no(so);break}case TextType:{const io=oo.text,so=ro[ro.length-1];(so==null?void 0:so.type)===RichEditorContentType.TEXT?so.value+=io:ro.push({type:RichEditorContentType.TEXT,value:io});break}default:throw new TypeError(`[RichEditor] [extractEditorData] Unknown node.type: (${oo.type})`)}}},replaceImageSrc=(eo,to,ro)=>{eo.update(()=>{const no=$getRoot();oo(no);function oo(io){switch(io.getType()){case RootType:case ParagraphType:for(const so of io.getChildren())oo(so);break;case ImageType:{const so=io;if(so.getSrc()===to){const ao=$createImageNode({alt:so.getAltText(),src:ro});so.replace(ao)}break}}}})};class RichEditor extends reactExports.Component{constructor(to){super(to),this.state={floatingAnchorElem:null};const{editable:ro=!0,initialContent:no}=this.props;this.initialConfig={namespace:"react-simple-rich-editor",theme:{ltr:"ltr",rtl:"rtl",placeholder:classes.editorPlaceholder,paragraph:classes.editorParagraph},nodes:[ImageNode,LinkNode],editable:ro,editorState:no?resetEditorState(no):null,onError:oo=>{console.error(oo)}},this.onKeyDown=this.onKeyDown.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onChange=this.onChange.bind(this),this.onEditorInputWrapperRef=this.onEditorInputWrapperRef.bind(this)}render(){const{initialConfig:to,onKeyDown:ro,onFocus:no,onBlur:oo,onChange:io,onEditorInputWrapperRef:so}=this,{editable:ao=!0,placeholder:lo="Enter some text...",pluginsBeforeRichEditors:uo=[],pluginsAfterRichEditors:co=[]}=this.props,{floatingAnchorElem:fo}=this.state,ho=mergeStyles$1(classes.editorContainer,this.props.editorContainerCls),po=mergeStyles$1(classes.editorInput,this.props.editorInputCls),go=mergeStyles$1(classes.editorInputBox,this.props.editorInputBoxCls),vo=mergeStyles$1(classes.editorPlaceholder,this.props.editorPlaceholderCls),bo=jsxRuntimeExports.jsx("div",{ref:so,className:go,children:jsxRuntimeExports.jsx(ContentEditable,{onFocus:no,onBlur:oo,className:po})});return jsxRuntimeExports.jsxs(LexicalComposer,{initialConfig:to,children:[jsxRuntimeExports.jsx(EditablePlugin,{editable:ao}),jsxRuntimeExports.jsx(CommandPlugin,{}),jsxRuntimeExports.jsxs("div",{className:ho,children:[uo,jsxRuntimeExports.jsx(RichTextPlugin,{contentEditable:bo,placeholder:jsxRuntimeExports.jsx("div",{className:vo,children:lo}),ErrorBoundary:LexicalErrorBoundary}),co,jsxRuntimeExports.jsx(OnKeyDownPlugin,{onKeyDown:ro}),jsxRuntimeExports.jsx(OnChangePlugin,{onChange:io}),jsxRuntimeExports.jsx(DragDropPastePlugin,{}),jsxRuntimeExports.jsx(PlainContentPastePlugin,{}),jsxRuntimeExports.jsx(ImagesPlugin,{}),jsxRuntimeExports.jsx(HistoryPlugin,{}),fo&&jsxRuntimeExports.jsx(DraggableBlockPlugin,{anchorElem:fo})]})]})}onKeyDown(to){var ro,no;(no=(ro=this.props).onKeyDown)==null||no.call(ro,to)}onFocus(to){var ro,no;(no=(ro=this.props).onFocus)==null||no.call(ro,to)}onBlur(to){var ro,no;(no=(ro=this.props).onBlur)==null||no.call(ro,to)}onChange(to){var ro,no;(no=(ro=this.props).onChange)==null||no.call(ro,to)}onEditorInputWrapperRef(to){to!==null&&this.setState({floatingAnchorElem:to})}}const classes=mergeStyleSets({editorContainer:{boxSizing:"border-box",position:"relative"},editorInputBox:{boxSizing:"border-box",overflow:"auto",border:"none",position:"relative",fontWeight:"400",textAlign:"left"},editorInput:{overflow:"auto",boxSizing:"border-box",resize:"none",fontSize:"15px",position:"relative",tabSize:"1",outline:"0","> :last-child":{marginBottom:0}},editorPlaceholder:{boxSizing:"border-box",color:"#999",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",top:"0px",left:"0px",fontSize:"15px",userSelect:"none",display:"inline-block",pointerEvents:"none",width:"100%"},editorParagraph:{margin:"0 0 15px 0",position:"relative"}}),ReactRichEditor=reactExports.forwardRef((eo,to)=>{const[ro]=reactExports.useState(()=>new RichEditorViewModel({extractEditorData,replaceImageSrc,resetEditorState})),no=reactExports.useMemo(()=>({viewmodel:ro}),[ro]);return ro.resolveUrlByFile$.next(eo.resolveUrlByFile),ro.resolveUrlByPath$.next(eo.resolveUrlByPath),reactExports.useImperativeHandle(to,()=>({focus:()=>{no.viewmodel.focus()},getContent:()=>no.viewmodel.getContent(),insert:oo=>{no.viewmodel.insert(oo)},isEmpty:()=>no.viewmodel.isEmpty(),replaceImageSrc:(oo,io)=>{no.viewmodel.replaceImageSrc(oo,io)},reset:oo=>{no.viewmodel.reset(oo)}})),jsxRuntimeExports.jsx(RichEditorContextType.Provider,{value:no,children:jsxRuntimeExports.jsx(RichEditor,{...eo})})});ReactRichEditor.displayName="ReactRichEditor";makeStyles({editor:{...shorthands.padding("8px"),...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),boxSizing:"border-box",display:"block",width:"100%",userSelect:"none",position:"relative"}});makeStyles({chatbox:{...shorthands.borderRadius("8px"),display:"flex",flexDirection:"column",alignItems:"stretch",backgroundColor:tokens.colorNeutralBackground1,width:"100%",height:"100%",boxShadow:"0px 6.4px 14.4px rgba(0, 0, 0, 0.132), 0px 1.2px 3.6px rgba(0, 0, 0, 0.108)","::-webkit-scrollbar":{width:"4px",backgroundColor:tokens.colorNeutralBackground1Hover},"::-webkit-scrollbar-thumb":{backgroundColor:tokens.colorScrollbarOverlay,...shorthands.border("1px","solid",tokens.colorNeutralBackground1),...shorthands.borderRadius("9999px")},"::-webkit-scrollbar-thumb:hover":{backgroundColor:tokens.colorNeutralForeground1Static},"::-webkit-scrollbar-track":{...shorthands.borderRadius("9999px"),backgroundColor:"transparent"}},header:{...shorthands.flex(0,0,"auto")},main:{...shorthands.flex(1,1,"auto"),...shorthands.overflow("hidden","auto")},footer:{...shorthands.flex(0,0,"auto")}});makeStyles({header:{},topbar:{...shorthands.padding("0px","16px"),...shorthands.borderBottom("1px","solid",tokens.colorNeutralBackground5),boxSizing:"border-box",display:"flex",justifyContent:"space-between",alignItems:"center",height:"48px"},toolbarTitle:{display:"flex",alignItems:"center",columnGap:"2px"},toolbarActionButton:{color:tokens.colorNeutralForeground2}});makeStyles({main:{...shorthands.padding("0","16px"),...shorthands.overflow("hidden","auto"),height:"100%"}});makeStyles({footer:{...shorthands.padding("16px"),boxSizing:"border-box"},footerContainer:{display:"flex"},leftToolbar:{...shorthands.flex(0,0,"auto")},editor:{...shorthands.flex(1),boxSizing:"border-box"},validation:{boxSizing:"border-box"},validationInner:{...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),...shorthands.margin("8px","0px"),...shorthands.padding("2px","8px"),backgroundColor:tokens.colorStatusWarningBackground1,color:tokens.colorStatusWarningForeground1}});const capitalizeFirstLetter=eo=>eo.charAt(0).toUpperCase()+eo.slice(1),getSenderNameByLLMMessage=eo=>eo.role&&eo.name?`${eo.role}: ${eo.name}`:eo.role?eo.role:eo.name?eo.name:"user",defaultCalcContentForCopy=eo=>JSON.stringify(eo.content),messageRoleToCategory=eo=>{switch(eo){case"system":return ChatMessageCategory.System;case"user":return ChatMessageCategory.User;default:return ChatMessageCategory.Chatbot}},colorsPool=[{color:tokens.colorPaletteSeafoamForeground2,backgroundColor:tokens.colorPaletteSeafoamBackground2},{color:tokens.colorPaletteNavyForeground2,backgroundColor:tokens.colorPaletteNavyBackground2},{color:tokens.colorPaletteGrapeForeground2,backgroundColor:tokens.colorPaletteGrapeBackground2},{color:tokens.colorPalettePinkForeground2,backgroundColor:tokens.colorPalettePinkBackground2},{color:tokens.colorPaletteDarkOrangeForeground2,backgroundColor:tokens.colorPaletteDarkOrangeBackground2},{color:tokens.colorPaletteBrassForeground2,backgroundColor:tokens.colorPaletteBrassBackground2}],nameToColor=new Map,getColorForMessage=({name:eo="",role:to=""})=>{if(to.toLowerCase()==="system")return{color:tokens.colorNeutralForeground3,backgroundColor:tokens.colorNeutralBackground3};const ro=`${eo}_${to}`;return nameToColor.has(ro)||nameToColor.set(ro,colorsPool[nameToColor.size%colorsPool.length]),nameToColor.get(ro)},EMPTY_CONTEXTUAL_MENU_ITEMS=[],defaultUseContextualMenuItems=eo=>EMPTY_CONTEXTUAL_MENU_ITEMS;function LLMNodeMessageBubbleRenderer(eo){const{MessageAvatarRenderer:to,MessageContentRenderer:ro=DefaultMessageContentRenderer,MessageErrorRenderer:no=DefaultMessageErrorRenderer,MessageSenderRenderer:oo=DefaultMessageSenderRenderer,MessagePaginationRenderer:io=DefaultMessagePaginationRenderer,MessageActionBarRenderer:so=DefaultMessageActionBarRenderer,MessageStatusRenderer:ao=DefaultMessageStatusRenderer,useMessageContextualMenuItems:lo=defaultUseContextualMenuItems,useMessageActions:uo,initialPage:co=-1,locStrings:fo,message:ho,className:po}=eo,go=useStyles$3(),[vo,bo]=React.useState((co%ho.history.length+ho.history.length)%ho.history.length),[xo,_o]=React.useState(!1),Eo=React.useRef(null),So=React.useRef(null),To=React.useCallback(()=>{_o(!1)},[]),wo=React.useCallback(Mo=>{const Do=Eo.current,jo=So.current;if(Do&&jo){const Fo=Mo.clientX,$o=Mo.clientY,Lo=Do.getBoundingClientRect(),Ho=Lo.left+window.scrollX,qo=Lo.top+window.scrollY,Uo=Fo-Ho,Yo=$o-qo;jo.style.left=`${Uo}px`,jo.style.top=`${Yo}px`}},[]),Co=React.useCallback(Mo=>{Mo.preventDefault(),wo(Mo),_o(!0)},[wo]),Oo=ho.history[vo],Ao="left",Ro=lo(Oo);React.useEffect(()=>{const Mo=()=>{_o(!1)};return document.addEventListener("mousedown",Mo),()=>document.removeEventListener("mousedown",Mo)},[]);const No=getColorForMessage(Oo.content[0]??{});return jsxRuntimeExports.jsx("div",{className:go.container,"data-chatbox-locator":ChatboxLocator.MessageBubble,"data-position":Ao,children:jsxRuntimeExports.jsx("div",{className:mergeClasses(go.message,po),"data-position":Ao,children:jsxRuntimeExports.jsxs("div",{className:go.main,children:[jsxRuntimeExports.jsxs("div",{className:go.heading,children:[jsxRuntimeExports.jsx("div",{className:go.avatar,children:to&&jsxRuntimeExports.jsx(to,{data:Oo,position:Ao})}),jsxRuntimeExports.jsx("div",{className:go.sender,children:jsxRuntimeExports.jsx(oo,{data:Oo,position:Ao})})]}),jsxRuntimeExports.jsxs("div",{ref:Eo,className:go.content,style:No,"data-category":Oo.category,"data-chatbox-locator":ChatboxLocator.MessageContent,onContextMenu:Co,onClick:wo,children:[jsxRuntimeExports.jsx(ro,{content:Oo.content,className:go.contentMain}),Oo.error&&jsxRuntimeExports.jsx(no,{error:Oo.error,locStrings:fo,className:go.error}),typeof Oo.duration=="number"&&typeof Oo.tokens=="number"&&jsxRuntimeExports.jsx(ao,{duration:Oo.duration,tokens:Oo.tokens,locStrings:fo,className:go.status}),ho.history.length>1&&jsxRuntimeExports.jsx(io,{className:go.pagination,message:ho,current:vo,setCurrent:bo}),jsxRuntimeExports.jsx("div",{ref:So,className:go.contentMenuAnchor}),Ro.length>0&&jsxRuntimeExports.jsx(ContextualMenu,{items:Ro,hidden:!xo,target:So,onItemClick:To,onDismiss:To,className:go.contextualMenu}),jsxRuntimeExports.jsx("div",{className:go.actionBar,"data-chatbox-locator":ChatboxLocator.MessageActionBar,children:jsxRuntimeExports.jsx(so,{data:Oo,locStrings:fo,useMessageActions:uo})})]})]})})})}LLMNodeMessageBubbleRenderer.displayName="LLMNodeMessageBubbleRenderer";const useStyles$3=makeStyles({container:{...shorthands.margin("16px","0"),display:"flex",justifyContent:"flex-start",'&&[data-position="right"]':{justifyContent:"flex-end"},width:"100%"},message:{display:"flex",flexDirection:"row",'&&[data-position="right"]':{flexDirection:"row-reverse"},width:"calc(100% - 8px)",marginBottom:"18px"},heading:{display:"flex",alignContent:"center"},avatar:{...shorthands.flex(0,0,"auto")},main:{...shorthands.flex(1,1,"auto"),display:"flex",flexDirection:"column",width:"100%"},sender:{...shorthands.flex(0,0,"auto"),fontSize:"16px",fontWeight:600,lineHeight:"22px"},content:{...shorthands.flex(1,1,"auto"),...shorthands.borderRadius("4px"),position:"relative",boxSizing:"border-box",minWidth:"48px",wordBreak:"break-word",lineHeight:"22px","> p":{...shorthands.margin(0)},[`&:hover > ${ChatboxSelector.MessageActionBar}`]:{display:"flex",visibility:"visible"}},contentMain:{...shorthands.padding("12px","20px","12px","12px")},contextualMenu:{width:"auto",minWidth:"180px"},contentMenuAnchor:{position:"absolute",top:"0px",left:"0px"},error:{...shorthands.borderTop("1px","solid",tokens.colorPaletteDarkRedBorderActive),marginTop:"8px !important",paddingTop:"8px"},pagination:{},status:{...shorthands.borderTop("1px","solid",tokens.colorNeutralStroke1),...shorthands.padding("0px","20px","0px","12px"),fontSize:"12px",fontStyle:"italic"},actionBar:{position:"absolute",right:"0px",top:"-32px",display:"none",justifyContent:"space-between"}});function MessageSenderRenderer(eo){const{data:to,position:ro,className:no}=eo,oo=useStyles$2(),{name:io,role:so}=to.content[0],ao={user:"success",assistant:"brand",system:"informative"};return jsxRuntimeExports.jsxs("div",{className:mergeClasses(oo.container,no),"data-position":ro,children:[io&&jsxRuntimeExports.jsx("span",{className:oo.name,"data-position":ro,"data-category":to.category,children:io}),so&&jsxRuntimeExports.jsx(Badge$2,{className:oo.role,color:ao[so],children:so})]})}MessageSenderRenderer.displayName="MessageSenderRenderer";const useStyles$2=makeStyles({container:{display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",color:tokens.colorNeutralForeground3},name:{...shorthands.margin("0px","0px","0px","6px"),fontSize:"16px",lineHeight:"22px"},role:{marginLeft:"6px"}}),OpenAIIcon=({styles:eo})=>jsxRuntimeExports.jsxs("svg",{fill:"currentColor",width:"20px",height:"20px",viewBox:"0 0 2048 2048",role:"img",xmlns:"http://www.w3.org/2000/svg",style:eo,children:[jsxRuntimeExports.jsx("title",{children:"OpenAI icon"}),jsxRuntimeExports.jsx("path",{d:"M832 676l575 288v760l-575 288-575-288V964l575-288zm0 144l-368 184 368 183 368-183-368-184zm-447 825l383 191v-538l-383-191v538zm894 0v-538l-383 191v538l383-191zm577-733q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9zM704 496q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9zm1206-48q0 23-15 38t-39 16q-27 0-57 11t-58 28-54 37-45 40q-19 19-39 44t-38 54-28 59-11 57q0 23-15 38t-39 16q-23 0-38-15t-16-39q0-27-11-57t-28-58-37-54-40-45q-19-19-44-39t-54-38-59-28-57-11q-23 0-38-15t-16-39q0-23 15-38t39-16q27 0 57-11t58-28 54-37 45-40q19-19 39-44t38-54 28-59 11-57q0-23 15-38t39-16q23 0 38 15t16 39q0 27 11 57t28 58 37 54 40 45q19 19 44 39t54 38 59 28 57 11q23 0 38 15t16 39zm-438 212q38-65 92-119t120-93q-65-38-119-92t-93-120q-38 65-92 119t-120 93q65 38 119 92t93 120z"})]});var RichContentType=(eo=>(eo.TEXT="text",eo.IMAGE_URL="image_url",eo.IMAGE_FILE="image_file",eo))(RichContentType||{});const useClasses$d=makeStyles({header:{display:"flex",alignItems:"center"},paramKey:{fontSize:"14px",fontWeight:600,lineHeight:"20px",marginRight:"4px"},type:{fontSize:"13px",marginLeft:"10px",lineHeight:"20px",color:tokens.colorNeutralForeground3},description:{fontSize:"14px",lineHeight:"21px"},required:{color:tokens.colorPaletteRedForeground1,marginLeft:"10px"},optional:{color:tokens.colorPaletteGreenForeground1,marginLeft:"10px"},sectionTitle:{fontSize:"12px",color:tokens.colorNeutralForeground3}}),FunctionParameterRow=({paramKey:eo,paramSchema:to,isRequired:ro})=>{const{type:no,description:oo,properties:io,required:so,enum:ao}=to,lo=useClasses$d();return jsxRuntimeExports.jsxs(Card,{appearance:"outline",children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsxs("div",{className:lo.header,children:[jsxRuntimeExports.jsx("div",{className:lo.paramKey,children:eo}),jsxRuntimeExports.jsx("div",{className:lo.type,children:no}),ro?jsxRuntimeExports.jsx("div",{className:lo.required,children:"Required"}):jsxRuntimeExports.jsx("div",{className:lo.optional,children:"Optional"})]})}),oo&&jsxRuntimeExports.jsx("div",{className:lo.description,children:oo}),io&&jsxRuntimeExports.jsx(Accordion,{collapsible:!0,children:jsxRuntimeExports.jsxs(AccordionItem,{value:"properties",children:[jsxRuntimeExports.jsx(AccordionHeader,{children:jsxRuntimeExports.jsx("div",{className:lo.sectionTitle,children:"Properties"})}),jsxRuntimeExports.jsx(AccordionPanel,{children:Object.keys(io).map(uo=>jsxRuntimeExports.jsx(FunctionParameterRow,{paramKey:uo,paramSchema:io[uo],isRequired:so==null?void 0:so.includes(uo)},uo))})]})}),ao&&jsxRuntimeExports.jsx(Accordion,{collapsible:!0,children:jsxRuntimeExports.jsxs(AccordionItem,{value:"enum",children:[jsxRuntimeExports.jsx(AccordionHeader,{children:jsxRuntimeExports.jsx("div",{className:lo.sectionTitle,children:"Possible values"})}),jsxRuntimeExports.jsx(AccordionPanel,{children:ao.map(uo=>jsxRuntimeExports.jsx("div",{children:uo},uo))})]})})]})},useClasses$c=makeStyles({root:{...shorthands.padding("8px")},header:{fontSize:"24px",fontWeight:700,lineHeight:"30px"},parametersTitle:{fontSize:"20px",fontWeight:700,lineHeight:"28px"}}),LLMNodeToolCard=({tool:eo})=>{var ro;const to=useClasses$c();return jsxRuntimeExports.jsx("div",{className:to.root,children:jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{className:to.header,children:eo.function.name})}),eo.function.description&&jsxRuntimeExports.jsx("div",{children:eo.function.description}),eo.function.parameters&&jsxRuntimeExports.jsx("div",{className:to.parametersTitle,children:"Parameters"}),Object.keys(((ro=eo.function.parameters)==null?void 0:ro.properties)||{}).map(no=>{var io,so,ao,lo;const oo=(so=(io=eo.function.parameters)==null?void 0:io.properties)==null?void 0:so[no];return oo?jsxRuntimeExports.jsx(FunctionParameterRow,{paramKey:no,paramSchema:oo,isRequired:(lo=(ao=eo.function.parameters)==null?void 0:ao.required)==null?void 0:lo.includes(no)},no):null})]})})},RichTextChatboxMessageContent=eo=>{const{content:to,className:ro}=eo,no=to.map(co=>co.function_call).filter(Boolean),oo=to.reduce((co,fo)=>fo.tool_calls?[...co,...fo.tool_calls]:co,[]),io=to.reduce((co,fo)=>fo.tools?[...co,...fo.tools]:co,[]),so=reactExports.useMemo(()=>to.map(co=>weaveRichNodesIntoMarkup(co.content??"")).join(` + +`),[to]),ao=useStyles$1(),lo=mergeClasses(ao.content,ro,"rich-text-chatbox-message-content"),uo=useLocStrings();return jsxRuntimeExports.jsxs("div",{className:lo,children:[jsxRuntimeExports.jsx(ReactMarkdown,{text:so}),no.length>0&&jsxRuntimeExports.jsx("h3",{children:uo.Function_Calls}),no.map(co=>jsxRuntimeExports.jsx(JsonNodeCard,{title:(co==null?void 0:co.name)??"Function call",src:co==null?void 0:co.arguments},co==null?void 0:co.name)),oo.length>0&&jsxRuntimeExports.jsx("h3",{children:uo.Tool_Calls}),oo.map(co=>{const fo=io.find(ho=>ho.function.name===co.function.name);return jsxRuntimeExports.jsxs(Card,{style:{marginBottom:8},children:[jsxRuntimeExports.jsx(CardHeader,{header:fo?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("span",{children:["[",co.type,"]"]}),jsxRuntimeExports.jsxs(Popover,{children:[jsxRuntimeExports.jsx(PopoverTrigger,{children:jsxRuntimeExports.jsx("div",{className:ao.popoverTrigger,children:co.function.name})}),jsxRuntimeExports.jsx(PopoverSurface,{children:jsxRuntimeExports.jsx(LLMNodeToolCard,{tool:fo})})]})]}):`[${co.type}] ${co.function.name}`}),jsxRuntimeExports.jsx(JsonNodeCard,{title:uo.Arguments,src:co.function.arguments})]},co.id)})]})},useStyles$1=makeStyles({content:{...shorthands.overflow("auto"),wordBreak:"break-all",whiteSpace:"break-spaces"},popoverTrigger:{cursor:"pointer",marginLeft:"4px",color:tokens.colorBrandBackground,...shorthands.textDecoration("underline")}});function weaveRichNodesIntoMarkup(eo){if(typeof eo=="string")return eo;return Array.isArray(eo)?eo.map(to).filter(Boolean).join(` + +`):new Error("content type is not supported");function to(ro){var no,oo,io,so;switch(ro.type){case RichContentType.TEXT:return ro.text??"";case RichContentType.IMAGE_URL:return`![${(no=ro.image_url)==null?void 0:no.url}](${(oo=ro.image_url)==null?void 0:oo.url})`;case RichContentType.IMAGE_FILE:return`![${(io=ro.image_file)==null?void 0:io.path}](${(so=ro.image_file)==null?void 0:so.path})`;default:return""}}}const useAvatarStyles=makeStyles({avatar:{}}),useMessagesContainerStyles=makeStyles({messagesContainer:{display:"flex",height:"100%",width:"100%"},minimap:{boxSizing:"border-box",height:"100%",width:"8px"},minimapInner:{boxSizing:"border-box",width:"8px",...shorthands.border("1px","solid","rgba(0, 0, 128, 0.15)")}}),LLMNodeMessagesList=eo=>{const to=useSelectedSpan(),ro=useMessagesContainerStyles(),no=reactExports.useRef(null),oo=ChatboxSelector.MessageList,io=ChatboxSelector.MessageContent,so=eo.messages.map((ao,lo)=>({id:lo,type:ChatMessageType.Message,history:[{content:[{content:ao.content??"",name:ao.name,role:ao.role,timestamp:ao.timestamp,function_call:ao.function_call,tool_calls:ao.tool_calls,tools:eo.tools}],category:messageRoleToCategory(ao.role),from:capitalizeFirstLetter(getSenderNameByLLMMessage(ao)),timestamp:ao.role==="assistant"?to==null?void 0:to.start_time:to==null?void 0:to.end_time}]}));return reactExports.useEffect(()=>{const ao=document.querySelectorAll(".rich-text-chatbox-message-content"),lo=ao[ao.length-1];lo&&lo.scrollIntoView({block:"end"})},[]),jsxRuntimeExports.jsxs("div",{className:ro.messagesContainer,children:[jsxRuntimeExports.jsx(ChatboxMessageList,{locStrings:defaultLocStrings$1,messages:so,calcContentForCopy:defaultCalcContentForCopy,containerRef:no}),jsxRuntimeExports.jsx("div",{className:ro.minimap,children:jsxRuntimeExports.jsx(Minimap,{className:ro.minimapInner,syncScale:!1,sourceRootRef:no,sourceQuerySelector:oo,sourceElementQuerySelector:io})})]})},MessageAvatarRenderer=({data:eo,className:to})=>{const ro=useAvatarStyles();return eo.category===ChatMessageCategory.System?jsxRuntimeExports.jsx("div",{className:mergeClasses(ro.avatar,to),children:jsxRuntimeExports.jsx(Alert24Regular,{})}):eo.category===ChatMessageCategory.User?jsxRuntimeExports.jsx("div",{className:mergeClasses(ro.avatar,to),children:jsxRuntimeExports.jsx(Person24Regular,{})}):eo.category===ChatMessageCategory.Chatbot?jsxRuntimeExports.jsx("div",{className:mergeClasses(ro.avatar,to),children:jsxRuntimeExports.jsx(OpenAIIcon,{})}):null};function ChatboxMessageList(eo){const{locStrings:to,messages:ro,calcContentForCopy:no,containerRef:oo}=eo,io=useCopyAction(to,no),so=reactExports.useCallback(()=>[io],[io]),ao=useStyles();return jsxRuntimeExports.jsx("div",{ref:oo,className:ao.main,children:jsxRuntimeExports.jsx(MessageListRenderer,{locStrings:to,messages:ro,MessageAvatarRenderer,MessageContentRenderer:RichTextChatboxMessageContent,MessageSenderRenderer,MessageBubbleRenderer:LLMNodeMessageBubbleRenderer,useMessageActions:so})})}ChatboxMessageList.displayName="ChatboxMessageList";const useStyles=makeStyles({main:{...shorthands.padding("0","6px"),...shorthands.overflow("auto"),...shorthands.flex(1),height:"100%"}}),getVariableHoverMarkdown=eo=>{let to="";return typeof eo=="string"?to=eo:to=JSON.stringify(eo),to},useLLMJinjaEditorMount=eo=>reactExports.useCallback(ro=>{const no=Object.keys(eo),oo=ro.getModel();no.forEach(io=>{const so=oo==null?void 0:oo.findMatches(`[^.](${io})\\s*(%|\\})`,!1,!0,!1,null,!1);so==null||so.forEach(ao=>{ro.createDecorationsCollection([{range:{...ao.range,startColumn:ao.range.startColumn+1,endColumn:ao.range.endColumn-1},options:{isWholeLine:!1,inlineClassName:"llm-variable-highlight",hoverMessage:{value:getVariableHoverMarkdown(eo[io])}}}])})})},[eo]),useMessageCardClasses=makeStyles({card:{...shorthands.borderRadius("8px"),...shorthands.borderColor(tokens.colorNeutralStroke1),...shorthands.borderWidth("1px"),...shorthands.borderStyle("solid"),...shorthands.padding("16px"),...shorthands.margin("16px")}}),useClasses$b=makeStyles({root:{height:"100%",display:"flex",flexDirection:"column",...shorthands.overflow("auto")},title:{fontSize:"14px",lineHeight:"20px",fontStyle:"italic",fontWeight:400,color:tokens.colorNeutralForeground1},card:{flexGrow:1,...shorthands.padding("0px"),...shorthands.margin("0px")}}),LLMNodePromptTemplateTab=()=>{var lo,uo;const eo=useParentSpanOfSelectedSpan(),to=eo==null?void 0:eo.attributes,[ro,no]=reactExports.useState(ViewStatus.loading),oo=useLoadSpanEvents(eo,BuildInEventName["prompt.template"]),io=useSpanEventsWithPayload(eo,BuildInEventName["prompt.template"])[0],so=io?(lo=io.attributes)==null?void 0:lo["prompt.template"]:to==null?void 0:to["prompt.template"],ao=io?(uo=io.attributes)==null?void 0:uo["prompt.variables"]:JSON.parse((to==null?void 0:to["prompt.variables"])??"{}");return reactExports.useEffect(()=>{oo({onCompleted:co=>{no(co?ViewStatus.error:ViewStatus.loaded)}})},[]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[ro===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny",style:{marginTop:"30vh"}}),ro===ViewStatus.loaded&&so&&jsxRuntimeExports.jsx(LLMNodePromptTemplate,{promptTemplate:so,templateVariables:ao}),ro===ViewStatus.error&&jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh",textAlign:"center"},children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{no(ViewStatus.loading),oo({onCompleted:co=>{no(co?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})})]})},LLMNodePromptTemplate=({promptTemplate:eo,templateVariables:to})=>{const ro=useClasses$b(),no=useMessageCardClasses(),io=useIsDark()?"vs-dark":"light",so=useLLMJinjaEditorMount(to);return jsxRuntimeExports.jsx("div",{className:ro.root,children:jsxRuntimeExports.jsx(Card,{className:mergeClasses(no.card,ro.card),children:jsxRuntimeExports.jsx(JinjaSyntaxHighlighter,{value:eo,theme:io,onMount:so})})})},LLMNodeTools=({tools:eo})=>jsxRuntimeExports.jsx("div",{children:eo.map((to,ro)=>jsxRuntimeExports.jsx(LLMNodeToolCard,{tool:to},ro))}),useLLMNodeClasses=makeStyles({root:{height:"100%",display:"flex"},header:{display:"flex",width:"100%",justifyContent:"space-between"},content:{...shorthands.overflow("auto")}}),LLMNodeInfo=({item:eo})=>{const{inputMessages:to,outputMessages:ro,tools:no}=useMessagesOfSelectedSpan(),oo=[...to,...ro],io=useLLMNodeClasses(),so=useSelectedSpan(),[ao,lo]=reactExports.useState(ViewStatus.loading),[uo,co]=reactExports.useState(ViewStatus.loading),fo=useLoadSpanEvents(so,BuildInEventName["function.inputs"]),ho=useLoadSpanEvents(so,BuildInEventName["function.output"]);return reactExports.useEffect(()=>{(eo==="messages"||eo==="tools")&&(fo({onCompleted:po=>{lo(po?ViewStatus.error:ViewStatus.loaded)}}),ho({onCompleted:po=>{co(po?ViewStatus.error:ViewStatus.loaded)}}))},[eo]),eo==="raw"?jsxRuntimeExports.jsx(DefaultNodeInfo,{}):eo==="promptTemplate"?jsxRuntimeExports.jsx(LLMNodePromptTemplateTab,{}):eo==="llmParameters"?jsxRuntimeExports.jsx(Card,{className:io.root,children:jsxRuntimeExports.jsx("div",{className:io.content,children:jsxRuntimeExports.jsx(LLMNodeInvocationParametersTab,{})})}):ao===ViewStatus.loading||uo===ViewStatus.loading?jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh"},children:jsxRuntimeExports.jsx(Spinner,{})}):ao===ViewStatus.error||uo===ViewStatus.error?jsxRuntimeExports.jsx("div",{style:{marginTop:"30vh",textAlign:"center"},children:jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{lo(ViewStatus.loading),fo({onCompleted:po=>{lo(po?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0}),co(ViewStatus.loading),ho({onCompleted:po=>{co(po?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})}):jsxRuntimeExports.jsx(Card,{className:io.root,children:jsxRuntimeExports.jsxs("div",{className:io.content,children:[eo==="messages"&&jsxRuntimeExports.jsx(LLMNodeMessagesList,{messages:oo,tools:no}),eo==="tools"&&jsxRuntimeExports.jsx(LLMNodeTools,{tools:no})]})})},ModelName=()=>{const eo=useNodeDetailClasses(),to=useSelectedSpan(),[ro,no]=reactExports.useState(ViewStatus.loading),oo=useLoadSpanEvents(to,BuildInEventName["function.inputs"]),io=getSpanType(to),so=reactExports.useMemo(()=>(io==null?void 0:io.toLowerCase())==="llm",[io]);if(reactExports.useEffect(()=>{so&&oo({onCompleted:uo=>{no(uo?ViewStatus.error:ViewStatus.loaded)}})},[so]),!so||ro!==ViewStatus.loaded)return null;const ao=getSpanEventPayload(to,BuildInEventName["function.inputs"]),lo=ao==null?void 0:ao.model;return lo&&jsxRuntimeExports.jsx("div",{className:eo.headerModalName,children:lo})},getMimeTypeFromContentType=eo=>{var ro;return(ro=/^\s*([^;\s]*)(?:;|\s|$)/.exec(eo))==null?void 0:ro[1].toLowerCase()},NodeHttpCard=({type:eo})=>{const to=useLocStrings(),ro=useSelectedSpan(),no=React.useMemo(()=>parseHttpSpanAttributes(ro),[ro]);if(!no)return null;const{urlFull:oo}=no,io=parseInt(no.status_code);let so;io>=200&&io<300?so="success":io>=400?so="danger":so="warning";const ao=jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[no.status_code!==void 0?jsxRuntimeExports.jsxs(Badge$2,{appearance:"outline",color:so,children:[to.Status," ",jsxRuntimeExports.jsx("span",{style:{marginLeft:4},children:no.status_code})]}):null,jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:no.method}),jsxRuntimeExports.jsx("span",{style:{marginRight:8,wordBreak:"break-all"},children:oo})]}),lo=eo==="response"?no.response:no.request;return jsxRuntimeExports.jsx(Card,{style:{marginBottom:12},children:jsxRuntimeExports.jsx(NodeHttpItem,{type:eo,header:ao,data:lo})})},NodeHttpItem=({type:eo,header:to,data:ro})=>{const no=useLocStrings(),{headers:oo,body:io}=ro,so=JSON.stringify(ro),ao=eo==="response",lo=ao?"Response":"Request";let uo;if(io)if(ao){const co=getMimeTypeFromContentType(oo["content-type"]);uo=jsxRuntimeExports.jsx(HttpResponseContent,{mimeType:co,body:io})}else uo=jsxRuntimeExports.jsx(JsonNodeCard,{wrapperStyle:{background:tokens.colorNeutralBackground2},src:io,title:no[`${lo} Body`]});return jsxRuntimeExports.jsx(BasicViewer,{showEmpty:!1,previewRender:()=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(JsonNodeCard,{wrapperStyle:{background:tokens.colorNeutralBackground2},src:oo,title:no[`${lo} Headers`]}),uo]}),rawRender:()=>jsxRuntimeExports.jsx(Card,{style:{wordBreak:"break-all"},children:so}),headerRender:to?()=>to:void 0})},HttpResponseContent=({mimeType:eo,body:to=""})=>{const ro=useLocStrings();return eo!=null&&eo.includes("json")?jsxRuntimeExports.jsx(JsonNodeCard,{wrapperStyle:{background:tokens.colorNeutralBackground2},src:to,title:ro["Response Body"]}):eo==="text/event-stream"?jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12,background:tokens.colorNeutralBackground2},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:ro["Response Body"]})})}),to.split("data:").filter(no=>!!no).map((no,oo)=>jsxRuntimeExports.jsxs("div",{children:["data: ",no]},`${no}-${oo}`))]}):jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12,background:tokens.colorNeutralBackground2},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:ro["Response Body"]})})}),jsxRuntimeExports.jsx("div",{style:{wordBreak:"break-all"},children:to})]})},NodeRawCard=()=>{const eo=useSelectedSpan(),to=useSpanEventsLoadStatus(),ro=useLocStrings(),[,no]=reactExports.useReducer(oo=>oo+1,0);return jsxRuntimeExports.jsx(JsonNodeCard,{title:ro.Raw_JSON,src:eo,jsonViewerProps:{customizeNode:({depth:oo,indexOrName:io,node:so})=>{var lo,uo;if(oo===3&&typeof io=="number"&&typeof so.name=="string"&&typeof so.timestamp=="string"&&typeof so.attributes=="object"){const co=`${(lo=eo==null?void 0:eo.context)==null?void 0:lo.span_id}__${(uo=eo==null?void 0:eo.external_event_data_uris)==null?void 0:uo[io]}`;return to.get(co)==="success"?void 0:jsxRuntimeExports.jsx(NodeEventItem,{name:so.name,index:io,timestamp:so.timestamp,forceUpdate:no})}}}})},NodeEventItem=({index:eo,name:to,timestamp:ro,forceUpdate:no})=>{const oo=useSelectedSpan(),io=useLocStrings(),so=useLoadSpanEvents(oo,to,eo),[ao,lo]=reactExports.useState(ViewStatus.hidden);if(ao===ViewStatus.loaded){no();return}let uo=io.load_all;return ao===ViewStatus.loading?uo=io.loading:ao===ViewStatus.error&&(uo=io["Failed to load, click to try again"]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),jsxRuntimeExports.jsxs("div",{style:{paddingLeft:"1em"},children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--json-property)"},children:"name:"}),jsxRuntimeExports.jsx("span",{style:{color:"var(--json-string)"},children:` "${to}",`})]}),jsxRuntimeExports.jsxs("div",{style:{paddingLeft:"1em"},children:[jsxRuntimeExports.jsx("span",{style:{color:"var(--json-property)"},children:"timestamp:"}),jsxRuntimeExports.jsx("span",{style:{color:"var(--json-string)"},children:` "${ro}",`})]}),jsxRuntimeExports.jsx("div",{style:{paddingLeft:"1em"},children:jsxRuntimeExports.jsxs(Button$2,{size:"small",appearance:"transparent",style:{padding:0,color:"rgb(163, 190, 233)",justifyContent:"flex-start"},onClick:()=>{lo(ViewStatus.loading),so({onCompleted:co=>{lo(co?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})},children:["... ",uo]})}),jsxRuntimeExports.jsx("span",{children:"}"})]})},RetrievalNodeInfo=()=>{const eo=useSelectedSpan(),to=useLocStrings(),[ro,no]=reactExports.useState(ViewStatus.loading),oo=useLoadSpanEvents(eo,BuildInEventName["retrieval.documents"]),io=useSpanEventsWithPayload(eo,BuildInEventName["retrieval.documents"]),so=(eo==null?void 0:eo.attributes)??{};let ao=[];if(io.length>0)ao=io.map(po=>po.attributes).flat();else if(typeof so["retrieval.documents"]=="string")try{ao=JSON.parse(so["retrieval.documents"])}catch{ao=[]}const[lo,uo]=reactExports.useState(ViewStatus.loading),co=useLoadSpanEvents(eo,BuildInEventName["retrieval.query"]),fo=useSpanEventsWithPayload(eo,BuildInEventName["retrieval.query"]);let ho=so["retrieval.query"];return fo.length>0&&(ho=fo.map(po=>po.attributes).join(` +`)),reactExports.useEffect(()=>{oo({onCompleted:po=>{no(po?ViewStatus.error:ViewStatus.loaded)}}),co({onCompleted:po=>{uo(po?ViewStatus.error:ViewStatus.loaded)}})},[]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:to.Query})})}),lo===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),lo===ViewStatus.loaded&&(ho??""),lo===ViewStatus.error&&jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{uo(ViewStatus.loading),co({onCompleted:po=>{uo(po?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})]}),jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:to.Documents})})}),ro===ViewStatus.loading&&jsxRuntimeExports.jsx(Spinner,{size:"tiny"}),ro===ViewStatus.loaded&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ao.map(po=>jsxRuntimeExports.jsx(Document$1,{document:po},po["document.id"]))}),ro===ViewStatus.error&&jsxRuntimeExports.jsx(DefaultNodeLoadError,{onRetry:()=>{no(ViewStatus.loading),oo({onCompleted:po=>{no(po?ViewStatus.error:ViewStatus.loaded)},forceRefresh:!0})}})]})]})},Document$1=({document:eo})=>{const to=useRetrievalNodeDetailClasses(),[ro,no]=reactExports.useState(["content"]),oo=reactExports.useCallback((so,ao)=>{no(ao.openItems)},[]),io=useLocStrings();return jsxRuntimeExports.jsxs(Card,{style:{background:tokens.colorNeutralBackground2},children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",columnGap:6},children:[jsxRuntimeExports.jsx(Document16Regular,{}),jsxRuntimeExports.jsx("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:"id"})," ",eo["document.id"]]}),relationship:"description",children:jsxRuntimeExports.jsxs("span",{children:[io.document," ",eo["document.id"]]})})}),jsxRuntimeExports.jsx(Tooltip,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:io.score})," ",eo["document.score"]]}),relationship:"description",children:jsxRuntimeExports.jsxs(Badge$2,{appearance:"outline",children:["score ",floatFormatter(eo["document.score"])]})})]}),jsxRuntimeExports.jsx(Divider$2,{}),jsxRuntimeExports.jsx(Card,{style:{background:tokens.colorNeutralBackground3},children:jsxRuntimeExports.jsx(Accordion,{openItems:ro,onToggle:oo,collapsible:!0,multiple:!0,children:jsxRuntimeExports.jsxs(AccordionItem,{value:"content",children:[jsxRuntimeExports.jsx(AccordionHeader,{className:to.accordionHeader,children:io.content}),jsxRuntimeExports.jsx(AccordionPanel,{children:jsxRuntimeExports.jsx(MarkdownViewer,{content:eo["document.content"]})})]})})}),jsxRuntimeExports.jsx(JsonNodeCard,{title:"metadata",src:eo["document.metadata"],wrapperStyle:{background:tokens.colorNeutralBackground3}})]})};function SpanType({span:eo,showText:to=!0,className:ro}){const no=useClasses$a(),{color:oo,backgroundColor:io,borderColor:so,icon:ao,text:lo}=reactExports.useMemo(()=>(eo==null?void 0:eo.toLocaleLowerCase())==="flow"?{color:tokens.colorBrandForeground2,backgroundColor:tokens.colorBrandBackground2,borderColor:tokens.colorBrandStroke2,icon:jsxRuntimeExports.jsx(Flow16Regular,{}),text:"Flow"}:(eo==null?void 0:eo.toLocaleLowerCase())==="function"||(eo==null?void 0:eo.toLocaleLowerCase())==="tool"?{color:tokens.colorPaletteBerryForeground2,backgroundColor:tokens.colorPaletteBerryBackground1,borderColor:tokens.colorPaletteBerryBorder1,icon:jsxRuntimeExports.jsx(HexagonThree16Regular,{}),text:"Function"}:(eo==null?void 0:eo.toLocaleLowerCase())==="retrieval"?{color:tokens.colorPaletteDarkOrangeForeground2,backgroundColor:tokens.colorPaletteDarkOrangeBackground1,borderColor:tokens.colorPaletteDarkOrangeBorder1,icon:jsxRuntimeExports.jsx(BranchRequest16Regular,{}),text:"Retrieval"}:(eo==null?void 0:eo.toLocaleLowerCase())==="embedding"?{color:tokens.colorPaletteLightGreenForeground2,backgroundColor:tokens.colorPaletteLightGreenBackground1,borderColor:tokens.colorPaletteLightGreenBorder1,icon:jsxRuntimeExports.jsx(FlowchartRegular,{}),text:"Embedding"}:(eo==null?void 0:eo.toLocaleLowerCase())==="llm"?{color:tokens.colorPaletteMarigoldForeground2,backgroundColor:tokens.colorPaletteMarigoldBackground1,borderColor:tokens.colorPaletteMarigoldBorder1,icon:jsxRuntimeExports.jsx(OpenAIIcon,{styles:{height:"16px",width:"16px"}}),text:"LLM"}:(eo==null?void 0:eo.toLocaleLowerCase())==="network"?{color:tokens.colorPaletteRedForeground2,backgroundColor:tokens.colorPaletteRedBackground1,borderColor:tokens.colorPaletteRedBorder1,icon:jsxRuntimeExports.jsx(Link16Regular,{}),text:"Network"}:{color:tokens.colorPaletteYellowForeground2,backgroundColor:tokens.colorPaletteYellowBackground1,borderColor:tokens.colorPaletteYellowBorder1,icon:jsxRuntimeExports.jsx(QuestionCircle16Regular,{}),text:"Unknown"},[eo]);return jsxRuntimeExports.jsx(Badge$2,{appearance:"filled",size:"large",className:mergeClasses(no.root,ro),icon:ao,style:{color:oo,backgroundColor:io,borderColor:so},children:to&&lo})}const useClasses$a=makeStyles({root:{height:"24px",...shorthands.padding("0","6px")}}),NodeDetail=({emptyTip:eo=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"No Data"})})=>{var _o,Eo,So;const to=useNodeDetailClasses(),ro=useSelectedSpan(),no=useEvaluationSpansOfSelectedSpan(),oo=useRootSpanIdOfSelectedSpans(),io=useLocStrings(),so=getSpanType(ro),ao=reactExports.useMemo(()=>{var To;return oo===((To=ro==null?void 0:ro.context)==null?void 0:To.span_id)},[oo,ro]),lo=reactExports.useMemo(()=>(so==null?void 0:so.toLowerCase())==="http",[so]),uo=reactExports.useMemo(()=>(so==null?void 0:so.toLowerCase())==="llm",[so]),co=reactExports.useMemo(()=>{const To=so==null?void 0:so.toLowerCase();let wo="Input_&_Output";return To==="retrieval"?wo="Retrieval":To==="embedding"&&(wo="Embedding"),wo},[so]),fo=[...uo?[{key:"llm_conversations",name:io.Conversations}]:[],...lo?[{key:"response",name:io.Response},{key:"request",name:io.Request}]:[{key:"info",name:io[`${co}`]}],{key:"raw",name:io.Raw_JSON},...uo?[{key:"llm_template",name:io.Prompt_Template},{key:"llm_params",name:io.LLM_Parameters},{key:"llm_tools",name:io.Tools}]:[],...ao?[{key:"evaluations",name:io.Metrics}]:[],{key:"error",name:io.Exception}];let ho="info";uo?ho="llm_conversations":lo&&(ho="response");const[po,go]=reactExports.useState(ho),vo=(_o=ro==null?void 0:ro.events)==null?void 0:_o.filter(To=>To.name===BuildInEventName.exception),bo=(vo==null?void 0:vo.length)??0,xo=no.length??0;return ro?jsxRuntimeExports.jsxs("div",{className:to.wrapper,children:[jsxRuntimeExports.jsxs("div",{className:to.header,children:[so&&jsxRuntimeExports.jsx(SpanType,{span:so,showText:!1,className:to.headerSpan})," ",jsxRuntimeExports.jsx(Tooltip,{content:ro.name??"",relationship:"label",children:jsxRuntimeExports.jsx("div",{className:to.headerTitle,children:`${ro.name}`})}),jsxRuntimeExports.jsxs("div",{className:to.headerRight,children:[jsxRuntimeExports.jsx(ModelName,{}),jsxRuntimeExports.jsx(NodeToken,{span:ro,size:UISize.small}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:ro.start_time,endTimeISOString:ro.end_time,size:UISize.small})]})]}),jsxRuntimeExports.jsx(Divider$2,{className:to.headerDivider}),((So=(Eo=ro==null?void 0:ro.status)==null?void 0:Eo.status_code)==null?void 0:So.toLowerCase())==="error"&&jsxRuntimeExports.jsx(MessageBar,{intent:"error",onClick:()=>{go("error")},style:{cursor:"pointer"},children:jsxRuntimeExports.jsxs(MessageBarBody,{children:[jsxRuntimeExports.jsxs(MessageBarTitle,{children:[" ",io.Error]}),ro.status.message]})}),jsxRuntimeExports.jsx(TabList,{selectedValue:po,onTabSelect:(To,wo)=>{go(wo.value)},children:fo.map(To=>jsxRuntimeExports.jsxs(Tab$1,{value:To.key,style:{flexShrink:1},children:[To.name,To.key==="evaluations"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[" ",jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:"informative",count:xo,size:"small",showZero:!0})]}),To.key==="error"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[" ",jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:bo>0?"danger":"informative",count:bo,size:"small",showZero:!0})]})]},To.key))}),jsxRuntimeExports.jsx(Divider$2,{className:to.tabDivider}),jsxRuntimeExports.jsxs("div",{className:to.content,children:[uo&&po==="llm_conversations"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"messages"}),!lo&&po==="info"&&jsxRuntimeExports.jsx(NodeInfoCard,{}),lo&&po==="response"&&jsxRuntimeExports.jsx(NodeHttpCard,{type:"response"}),lo&&po==="request"&&jsxRuntimeExports.jsx(NodeHttpCard,{type:"request"}),po==="raw"&&jsxRuntimeExports.jsx(NodeRawCard,{}),uo&&po==="llm_template"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"promptTemplate"}),uo&&po==="llm_params"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"llmParameters"}),uo&&po==="llm_tools"&&jsxRuntimeExports.jsx(LLMNodeInfo,{item:"tools"}),ao&&po==="evaluations"&&jsxRuntimeExports.jsx(EvaluationsTab,{}),po==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{})]})]}):eo},NodeInfoCard=()=>{const eo=useSelectedSpan(),to=getSpanType(eo);switch(to==null?void 0:to.toLowerCase()){case"llm":return jsxRuntimeExports.jsx(LLMNodeInfo,{item:"raw"});case"retrieval":return jsxRuntimeExports.jsx(RetrievalNodeInfo,{});case"embedding":return jsxRuntimeExports.jsx(EmbeddingNodeInfo,{});default:return jsxRuntimeExports.jsx(DefaultNodeInfo,{})}},SpansTreeContext=reactExports.createContext({parentIdLookUp:new Map,collapsedSpanIds:Set$1(),setCollapsedSpanIds:()=>{}}),useIsLeafSpan=eo=>{var no;const ro=reactExports.useContext(SpansTreeContext).parentIdLookUp;return!ro.get(eo)||((no=ro.get(eo))==null?void 0:no.length)===0},useToggleCollapse=()=>{const{setCollapsedSpanIds:eo}=reactExports.useContext(SpansTreeContext);return reactExports.useCallback(to=>{eo(ro=>ro.has(to)?ro.delete(to):ro.add(to))},[eo])},useIsCollapsed=eo=>reactExports.useContext(SpansTreeContext).collapsedSpanIds.has(eo),useClasses$9=makeStyles({root:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",flexWrap:"nowrap",cursor:"pointer",boxSizing:"border-box",position:"relative",...shorthands.padding("6px","8px"),...shorthands.gap("6px")},toggleButton:{marginLeft:"-6px",marginRight:"-2px"},spanName:{...shorthands.flex(0,1,"auto"),fontSize:"14px",color:tokens.colorNeutralForeground1,...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap",marginRight:"4px"},lastInputMessage:{...shorthands.margin("0px","0px","0px","4px"),fontSize:"12px",color:tokens.colorNeutralForeground2},lastInputMessageLabel:shorthands.margin("0px","4px","0px","0px"),right:{display:"flex",flexWrap:"nowrap",justifyContent:"flex-end",marginLeft:"auto",...shorthands.flex(0,1,"auto"),...shorthands.padding("0px","10px","0px","0px"),...shorthands.gap(tokens.spacingHorizontalXS)},selectedBar:{position:"absolute",backgroundColor:"#1372ED",width:"3px",height:"24px",left:"0px",...shorthands.borderRadius("3px")}}),TreeNode$1=({node:eo,span:to})=>{var ho,po,go,vo,bo,xo;const ro=getSpanType(to),no=bitset.has(GraphNodeStatus.Selected)(eo.status),oo=bitset.has(GraphNodeStatus.Activated)(eo.status),io=useClasses$9(),so=useIsLeafSpan(((ho=to.context)==null?void 0:ho.span_id)??""),ao=useIsCollapsed(((po=to.context)==null?void 0:po.span_id)??""),lo=useToggleCollapse(),uo=tokens.colorNeutralStroke2;let co=tokens.colorNeutralBackground1;no&&(co=tokens.colorNeutralBackground1Selected),oo&&(co=tokens.colorNeutralBackground1Hover);const fo=reactExports.useCallback(_o=>{var Eo;_o.preventDefault(),_o.stopPropagation(),lo(((Eo=to.context)==null?void 0:Eo.span_id)??"")},[(go=to.context)==null?void 0:go.span_id,lo]);return jsxRuntimeExports.jsx("foreignObject",{x:eo.x,y:eo.y,width:TREE_NODE_WIDTH,height:TREE_NODE_HEIGHT,style:{borderRadius:tokens.borderRadiusXLarge,border:`1px solid ${uo}`,backgroundColor:co,boxShadow:"0px 1px 2px 0px rgba(0, 0, 0, 0.05)"},children:jsxRuntimeExports.jsxs("div",{className:io.root,children:[no&&jsxRuntimeExports.jsx("div",{className:io.selectedBar}),!so&&jsxRuntimeExports.jsx(Button$2,{size:"small",className:io.toggleButton,onClick:fo,appearance:"transparent",icon:ao?jsxRuntimeExports.jsx(ChevronRight20Regular,{}):jsxRuntimeExports.jsx(ChevronDown20Regular,{})}),jsxRuntimeExports.jsx(SpanType,{span:ro}),jsxRuntimeExports.jsx(Tooltip,{content:to.name??"",relationship:"label",children:jsxRuntimeExports.jsx("div",{className:io.spanName,children:`${to.name}`})}),jsxRuntimeExports.jsxs("div",{className:io.right,children:[((bo=(vo=to==null?void 0:to.status)==null?void 0:vo.status_code)==null?void 0:bo.toLowerCase())==="error"&&jsxRuntimeExports.jsx(StatusText,{statusCode:(xo=to.status)==null?void 0:xo.status_code,tooltipContent:to.status.message,size:UISize.extraSmall}),jsxRuntimeExports.jsx(NodeToken,{span:to,size:UISize.extraSmall}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:to.start_time,endTimeISOString:to.end_time,size:UISize.extraSmall})]})]})})};class NodeConfig{constructor(to){this.options=to}render(to){const ro=this.options.spans.find(no=>{var oo;return((oo=no==null?void 0:no.context)==null?void 0:oo.span_id)===to.model.id});return ro?jsxRuntimeExports.jsx(TreeNode$1,{node:to.model,span:ro}):null}getMinHeight(){return 0}getMinWidth(){return 0}}const TreeView=()=>{const[eo,to]=reactExports.useState(new Map),[ro,no]=reactExports.useState(Set$1()),oo=useSpansOfSelectedTrace(),io=useSetSelectedSpanId(),so=useSelectedSpanId(),ao=ho=>(po,go)=>(go&&go.type===GraphNodeEvent.Click&&io(go.node.id),ho(po,go)),lo=GraphConfigBuilder.default().registerNode(()=>new NodeConfig({spans:oo})).registerPort(()=>new PortConfig).registerEdge(()=>new EdgeConfig).build(),uo=new Set;uo.add(GraphFeatures.ClickNodeToSelect),uo.add(GraphFeatures.CanvasVerticalScrollable),uo.add(GraphFeatures.CanvasHorizontalScrollable),uo.add(GraphFeatures.LimitBoundary),uo.add(GraphFeatures.InvisibleScrollbar);const[co,fo]=useGraphReducer({data:GraphModel.empty(),settings:{features:uo,graphConfig:lo,canvasBoundaryPadding:{top:0,bottom:TREE_NODE_HEIGHT,left:0,right:TREE_NODE_HEIGHT}}},ao);return reactExports.useEffect(()=>{const{graph:ho,rootIds:po,parentIdLookUp:go}=spansToGraphModel(oo,{collapsedSpanIds:ro});to(go),fo({type:GraphCanvasEvent.SetData,data:ho.selectNodes(vo=>vo.id===po[0])}),io(po[0])},[]),reactExports.useEffect(()=>{const{graph:ho,rootIds:po,parentIdLookUp:go}=spansToGraphModel(oo,{collapsedSpanIds:ro});to(go),fo({type:GraphCanvasEvent.SetData,data:ho.selectNodes(vo=>vo.id===po[0])})},[ro]),reactExports.useEffect(()=>{so&&fo({type:GraphNodeEvent.Select,nodes:[so]})},[so]),jsxRuntimeExports.jsx(SpansTreeContext.Provider,{value:{parentIdLookUp:eo,collapsedSpanIds:ro,setCollapsedSpanIds:no},children:jsxRuntimeExports.jsx(TreeGraph,{state:co,dispatch:fo})})},TraceDetail=()=>{const eo=useClasses$8(),to=useSelectedSpanId(),ro=reactExports.useRef(null),no=useTraceDetailRefreshKey(),oo=useIsGanttChartOpen(),io=useTraceDetailViewStatus(),so=useTraceDetailLoadingComponent(),ao=useTraceDetailErrorComponent(),lo=useLocStrings();return reactExports.useEffect(()=>{var uo;oo&&((uo=ro.current)==null||uo.updateSize({height:400,width:"100%"}))},[oo]),io===ViewStatus.error?jsxRuntimeExports.jsx(ao,{}):io===ViewStatus.loading?jsxRuntimeExports.jsx(so,{}):io===ViewStatus.hidden?null:jsxRuntimeExports.jsxs("div",{className:eo.root,children:[jsxRuntimeExports.jsx("div",{className:eo.container,children:jsxRuntimeExports.jsxs("div",{className:eo.content,children:[jsxRuntimeExports.jsx(Resizable,{enable:{right:!0},minWidth:100,maxWidth:"60%",defaultSize:{width:TREE_NODE_WIDTH+2*TREE_NODE_INDENT+32,height:"100%"},handleComponent:{right:jsxRuntimeExports.jsx("div",{className:eo.resizeBar})},children:jsxRuntimeExports.jsx("div",{className:eo.leftPane,children:jsxRuntimeExports.jsx(TreeView,{},no)})}),jsxRuntimeExports.jsx("div",{className:eo.rightPane,children:jsxRuntimeExports.jsx(NodeDetail,{emptyTip:jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:lo.No_span_data})},no)},`${to}`)]})}),oo&&jsxRuntimeExports.jsx("div",{className:eo.bottomPane,children:jsxRuntimeExports.jsx(Resizable,{ref:ro,className:eo.ganttContainer,defaultSize:{height:0,width:"100%"},enable:{top:!0},handleComponent:{top:jsxRuntimeExports.jsx("div",{className:eo.resizeBarBottom})},children:jsxRuntimeExports.jsx(GanttView,{},no)})})]})},useClasses$8=makeStyles({root:{width:"100%",height:"100%"},container:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},summary:{display:"flex",alignItems:"stretch",height:"48px",width:"100%",...shorthands.margin("16px"),...shorthands.gap("1rem")},content:{...shorthands.flex(1),display:"flex"},leftPane:{height:"100%",...shorthands.margin("16px",0,0,"16px")},rightPane:{position:"relative",width:"100%",height:"100%",...shorthands.flex(1),...shorthands.overflow("hidden")},bottomPane:{position:"absolute",backgroundColor:tokens.colorNeutralBackground1,bottom:0,width:"100%"},ganttContainer:{...shorthands.padding("16px")},resizeBar:{position:"absolute",top:0,bottom:0,right:"5px",width:"6px",backgroundColor:tokens.colorNeutralBackground3,"::before":{content:"''",position:"absolute",top:"50%",right:"1px",marginTop:"-12px",height:"24px",width:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed},"::after":{content:"''",position:"absolute",top:"50%",left:"1px",marginTop:"-12px",height:"24px",width:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed}},resizeBarBottom:{position:"absolute",left:0,right:0,bottom:"5px",height:"6px",backgroundColor:tokens.colorNeutralBackground3,"::before":{content:"''",position:"absolute",left:"50%",bottom:"1px",marginLeft:"-12px",width:"24px",height:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed},"::after":{content:"''",position:"absolute",left:"50%",top:"1px",marginLeft:"-12px",width:"24px",height:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed}}});let Text$1=class f_{lineAt(to){if(to<0||to>this.length)throw new RangeError(`Invalid position ${to} in document of length ${this.length}`);return this.lineInner(to,!1,1,0)}line(to){if(to<1||to>this.lines)throw new RangeError(`Invalid line number ${to} in ${this.lines}-line document`);return this.lineInner(to,!0,1,0)}replace(to,ro,no){[to,ro]=clip(this,to,ro);let oo=[];return this.decompose(0,to,oo,2),no.length&&no.decompose(0,no.length,oo,3),this.decompose(ro,this.length,oo,1),TextNode.from(oo,this.length-(ro-to)+no.length)}append(to){return this.replace(this.length,this.length,to)}slice(to,ro=this.length){[to,ro]=clip(this,to,ro);let no=[];return this.decompose(to,ro,no,0),TextNode.from(no,ro-to)}eq(to){if(to==this)return!0;if(to.length!=this.length||to.lines!=this.lines)return!1;let ro=this.scanIdentical(to,1),no=this.length-this.scanIdentical(to,-1),oo=new RawTextCursor(this),io=new RawTextCursor(to);for(let so=ro,ao=ro;;){if(oo.next(so),io.next(so),so=0,oo.lineBreak!=io.lineBreak||oo.done!=io.done||oo.value!=io.value)return!1;if(ao+=oo.value.length,oo.done||ao>=no)return!0}}iter(to=1){return new RawTextCursor(this,to)}iterRange(to,ro=this.length){return new PartialTextCursor(this,to,ro)}iterLines(to,ro){let no;if(to==null)no=this.iter();else{ro==null&&(ro=this.lines+1);let oo=this.line(to).from;no=this.iterRange(oo,Math.max(oo,ro==this.lines+1?this.length:ro<=1?0:this.line(ro-1).to))}return new LineCursor(no)}toString(){return this.sliceString(0)}toJSON(){let to=[];return this.flatten(to),to}constructor(){}static of(to){if(to.length==0)throw new RangeError("A document must have at least one line");return to.length==1&&!to[0]?f_.empty:to.length<=32?new TextLeaf(to):TextNode.from(TextLeaf.split(to,[]))}};class TextLeaf extends Text$1{constructor(to,ro=textLength(to)){super(),this.text=to,this.length=ro}get lines(){return this.text.length}get children(){return null}lineInner(to,ro,no,oo){for(let io=0;;io++){let so=this.text[io],ao=oo+so.length;if((ro?no:ao)>=to)return new Line(oo,ao,no,so);oo=ao+1,no++}}decompose(to,ro,no,oo){let io=to<=0&&ro>=this.length?this:new TextLeaf(sliceText(this.text,to,ro),Math.min(ro,this.length)-Math.max(0,to));if(oo&1){let so=no.pop(),ao=appendText(io.text,so.text.slice(),0,io.length);if(ao.length<=32)no.push(new TextLeaf(ao,so.length+io.length));else{let lo=ao.length>>1;no.push(new TextLeaf(ao.slice(0,lo)),new TextLeaf(ao.slice(lo)))}}else no.push(io)}replace(to,ro,no){if(!(no instanceof TextLeaf))return super.replace(to,ro,no);[to,ro]=clip(this,to,ro);let oo=appendText(this.text,appendText(no.text,sliceText(this.text,0,to)),ro),io=this.length+no.length-(ro-to);return oo.length<=32?new TextLeaf(oo,io):TextNode.from(TextLeaf.split(oo,[]),io)}sliceString(to,ro=this.length,no=` +`){[to,ro]=clip(this,to,ro);let oo="";for(let io=0,so=0;io<=ro&&soto&&so&&(oo+=no),toio&&(oo+=ao.slice(Math.max(0,to-io),ro-io)),io=lo+1}return oo}flatten(to){for(let ro of this.text)to.push(ro)}scanIdentical(){return 0}static split(to,ro){let no=[],oo=-1;for(let io of to)no.push(io),oo+=io.length+1,no.length==32&&(ro.push(new TextLeaf(no,oo)),no=[],oo=-1);return oo>-1&&ro.push(new TextLeaf(no,oo)),ro}}class TextNode extends Text$1{constructor(to,ro){super(),this.children=to,this.length=ro,this.lines=0;for(let no of to)this.lines+=no.lines}lineInner(to,ro,no,oo){for(let io=0;;io++){let so=this.children[io],ao=oo+so.length,lo=no+so.lines-1;if((ro?lo:ao)>=to)return so.lineInner(to,ro,no,oo);oo=ao+1,no=lo+1}}decompose(to,ro,no,oo){for(let io=0,so=0;so<=ro&&io=so){let uo=oo&((so<=to?1:0)|(lo>=ro?2:0));so>=to&&lo<=ro&&!uo?no.push(ao):ao.decompose(to-so,ro-so,no,uo)}so=lo+1}}replace(to,ro,no){if([to,ro]=clip(this,to,ro),no.lines=io&&ro<=ao){let lo=so.replace(to-io,ro-io,no),uo=this.lines-so.lines+lo.lines;if(lo.lines>4&&lo.lines>uo>>6){let co=this.children.slice();return co[oo]=lo,new TextNode(co,this.length-(ro-to)+no.length)}return super.replace(io,ao,lo)}io=ao+1}return super.replace(to,ro,no)}sliceString(to,ro=this.length,no=` +`){[to,ro]=clip(this,to,ro);let oo="";for(let io=0,so=0;ioto&&io&&(oo+=no),toso&&(oo+=ao.sliceString(to-so,ro-so,no)),so=lo+1}return oo}flatten(to){for(let ro of this.children)ro.flatten(to)}scanIdentical(to,ro){if(!(to instanceof TextNode))return 0;let no=0,[oo,io,so,ao]=ro>0?[0,0,this.children.length,to.children.length]:[this.children.length-1,to.children.length-1,-1,-1];for(;;oo+=ro,io+=ro){if(oo==so||io==ao)return no;let lo=this.children[oo],uo=to.children[io];if(lo!=uo)return no+lo.scanIdentical(uo,ro);no+=lo.length+1}}static from(to,ro=to.reduce((no,oo)=>no+oo.length+1,-1)){let no=0;for(let po of to)no+=po.lines;if(no<32){let po=[];for(let go of to)go.flatten(po);return new TextLeaf(po,ro)}let oo=Math.max(32,no>>5),io=oo<<1,so=oo>>1,ao=[],lo=0,uo=-1,co=[];function fo(po){let go;if(po.lines>io&&po instanceof TextNode)for(let vo of po.children)fo(vo);else po.lines>so&&(lo>so||!lo)?(ho(),ao.push(po)):po instanceof TextLeaf&&lo&&(go=co[co.length-1])instanceof TextLeaf&&po.lines+go.lines<=32?(lo+=po.lines,uo+=po.length+1,co[co.length-1]=new TextLeaf(go.text.concat(po.text),go.length+1+po.length)):(lo+po.lines>oo&&ho(),lo+=po.lines,uo+=po.length+1,co.push(po))}function ho(){lo!=0&&(ao.push(co.length==1?co[0]:TextNode.from(co,uo)),uo=-1,lo=co.length=0)}for(let po of to)fo(po);return ho(),ao.length==1?ao[0]:new TextNode(ao,ro)}}Text$1.empty=new TextLeaf([""],0);function textLength(eo){let to=-1;for(let ro of eo)to+=ro.length+1;return to}function appendText(eo,to,ro=0,no=1e9){for(let oo=0,io=0,so=!0;io=ro&&(lo>no&&(ao=ao.slice(0,no-oo)),oo0?1:(to instanceof TextLeaf?to.text.length:to.children.length)<<1]}nextInner(to,ro){for(this.done=this.lineBreak=!1;;){let no=this.nodes.length-1,oo=this.nodes[no],io=this.offsets[no],so=io>>1,ao=oo instanceof TextLeaf?oo.text.length:oo.children.length;if(so==(ro>0?ao:0)){if(no==0)return this.done=!0,this.value="",this;ro>0&&this.offsets[no-1]++,this.nodes.pop(),this.offsets.pop()}else if((io&1)==(ro>0?0:1)){if(this.offsets[no]+=ro,to==0)return this.lineBreak=!0,this.value=` +`,this;to--}else if(oo instanceof TextLeaf){let lo=oo.text[so+(ro<0?-1:0)];if(this.offsets[no]+=ro,lo.length>Math.max(0,to))return this.value=to==0?lo:ro>0?lo.slice(to):lo.slice(0,lo.length-to),this;to-=lo.length}else{let lo=oo.children[so+(ro<0?-1:0)];to>lo.length?(to-=lo.length,this.offsets[no]+=ro):(ro<0&&this.offsets[no]--,this.nodes.push(lo),this.offsets.push(ro>0?1:(lo instanceof TextLeaf?lo.text.length:lo.children.length)<<1))}}}next(to=0){return to<0&&(this.nextInner(-to,-this.dir),to=this.value.length),this.nextInner(to,this.dir)}}class PartialTextCursor{constructor(to,ro,no){this.value="",this.done=!1,this.cursor=new RawTextCursor(to,ro>no?-1:1),this.pos=ro>no?to.length:0,this.from=Math.min(ro,no),this.to=Math.max(ro,no)}nextInner(to,ro){if(ro<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;to+=Math.max(0,ro<0?this.pos-this.to:this.from-this.pos);let no=ro<0?this.pos-this.from:this.to-this.pos;to>no&&(to=no),no-=to;let{value:oo}=this.cursor.next(to);return this.pos+=(oo.length+to)*ro,this.value=oo.length<=no?oo:ro<0?oo.slice(oo.length-no):oo.slice(0,no),this.done=!this.value,this}next(to=0){return to<0?to=Math.max(to,this.from-this.pos):to>0&&(to=Math.min(to,this.to-this.pos)),this.nextInner(to,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class LineCursor{constructor(to){this.inner=to,this.afterBreak=!0,this.value="",this.done=!1}next(to=0){let{done:ro,lineBreak:no,value:oo}=this.inner.next(to);return ro&&this.afterBreak?(this.value="",this.afterBreak=!1):ro?(this.done=!0,this.value=""):no?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=oo,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Text$1.prototype[Symbol.iterator]=function(){return this.iter()},RawTextCursor.prototype[Symbol.iterator]=PartialTextCursor.prototype[Symbol.iterator]=LineCursor.prototype[Symbol.iterator]=function(){return this});class Line{constructor(to,ro,no,oo){this.from=to,this.to=ro,this.number=no,this.text=oo}get length(){return this.to-this.from}}function clip(eo,to,ro){return to=Math.max(0,Math.min(eo.length,to)),[to,Math.max(to,Math.min(eo.length,ro))]}let extend="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(eo=>eo?parseInt(eo,36):1);for(let eo=1;eoeo)return extend[to-1]<=eo;return!1}function isRegionalIndicator(eo){return eo>=127462&&eo<=127487}const ZWJ=8205;function findClusterBreak(eo,to,ro=!0,no=!0){return(ro?nextClusterBreak:prevClusterBreak)(eo,to,no)}function nextClusterBreak(eo,to,ro){if(to==eo.length)return to;to&&surrogateLow(eo.charCodeAt(to))&&surrogateHigh(eo.charCodeAt(to-1))&&to--;let no=codePointAt(eo,to);for(to+=codePointSize(no);to=0&&isRegionalIndicator(codePointAt(eo,so));)io++,so-=2;if(io%2==0)break;to+=2}else break}return to}function prevClusterBreak(eo,to,ro){for(;to>0;){let no=nextClusterBreak(eo,to-2,ro);if(no=56320&&eo<57344}function surrogateHigh(eo){return eo>=55296&&eo<56320}function codePointAt(eo,to){let ro=eo.charCodeAt(to);if(!surrogateHigh(ro)||to+1==eo.length)return ro;let no=eo.charCodeAt(to+1);return surrogateLow(no)?(ro-55296<<10)+(no-56320)+65536:ro}function fromCodePoint(eo){return eo<=65535?String.fromCharCode(eo):(eo-=65536,String.fromCharCode((eo>>10)+55296,(eo&1023)+56320))}function codePointSize(eo){return eo<65536?1:2}const DefaultSplit=/\r\n?|\n/;var MapMode=function(eo){return eo[eo.Simple=0]="Simple",eo[eo.TrackDel=1]="TrackDel",eo[eo.TrackBefore=2]="TrackBefore",eo[eo.TrackAfter=3]="TrackAfter",eo}(MapMode||(MapMode={}));class ChangeDesc{constructor(to){this.sections=to}get length(){let to=0;for(let ro=0;roto)return io+(to-oo);io+=ao}else{if(no!=MapMode.Simple&&uo>=to&&(no==MapMode.TrackDel&&ooto||no==MapMode.TrackBefore&&ooto))return null;if(uo>to||uo==to&&ro<0&&!ao)return to==oo||ro<0?io:io+lo;io+=lo}oo=uo}if(to>oo)throw new RangeError(`Position ${to} is out of range for changeset of length ${oo}`);return io}touchesRange(to,ro=to){for(let no=0,oo=0;no=0&&oo<=ro&&ao>=to)return ooro?"cover":!0;oo=ao}return!1}toString(){let to="";for(let ro=0;ro=0?":"+oo:"")}return to}toJSON(){return this.sections}static fromJSON(to){if(!Array.isArray(to)||to.length%2||to.some(ro=>typeof ro!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ChangeDesc(to)}static create(to){return new ChangeDesc(to)}}class ChangeSet extends ChangeDesc{constructor(to,ro){super(to),this.inserted=ro}apply(to){if(this.length!=to.length)throw new RangeError("Applying change set to a document with the wrong length");return iterChanges(this,(ro,no,oo,io,so)=>to=to.replace(oo,oo+(no-ro),so),!1),to}mapDesc(to,ro=!1){return mapSet(this,to,ro,!0)}invert(to){let ro=this.sections.slice(),no=[];for(let oo=0,io=0;oo=0){ro[oo]=ao,ro[oo+1]=so;let lo=oo>>1;for(;no.length0&&addInsert(no,ro,io.text),io.forward(co),ao+=co}let uo=to[so++];for(;ao>1].toJSON()))}return to}static of(to,ro,no){let oo=[],io=[],so=0,ao=null;function lo(co=!1){if(!co&&!oo.length)return;soho||fo<0||ho>ro)throw new RangeError(`Invalid change range ${fo} to ${ho} (in doc of length ${ro})`);let go=po?typeof po=="string"?Text$1.of(po.split(no||DefaultSplit)):po:Text$1.empty,vo=go.length;if(fo==ho&&vo==0)return;foso&&addSection(oo,fo-so,-1),addSection(oo,ho-fo,vo),addInsert(io,oo,go),so=ho}}return uo(to),lo(!ao),ao}static empty(to){return new ChangeSet(to?[to,-1]:[],[])}static fromJSON(to){if(!Array.isArray(to))throw new RangeError("Invalid JSON representation of ChangeSet");let ro=[],no=[];for(let oo=0;ooao&&typeof so!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(io.length==1)ro.push(io[0],0);else{for(;no.length=0&&ro<=0&&ro==eo[oo+1]?eo[oo]+=to:to==0&&eo[oo]==0?eo[oo+1]+=ro:no?(eo[oo]+=to,eo[oo+1]+=ro):eo.push(to,ro)}function addInsert(eo,to,ro){if(ro.length==0)return;let no=to.length-2>>1;if(no>1])),!(ro||so==eo.sections.length||eo.sections[so+1]<0);)ao=eo.sections[so++],lo=eo.sections[so++];to(oo,uo,io,co,fo),oo=uo,io=co}}}function mapSet(eo,to,ro,no=!1){let oo=[],io=no?[]:null,so=new SectionIter(eo),ao=new SectionIter(to);for(let lo=-1;;)if(so.ins==-1&&ao.ins==-1){let uo=Math.min(so.len,ao.len);addSection(oo,uo,-1),so.forward(uo),ao.forward(uo)}else if(ao.ins>=0&&(so.ins<0||lo==so.i||so.off==0&&(ao.len=0&&lo=0){let uo=0,co=so.len;for(;co;)if(ao.ins==-1){let fo=Math.min(co,ao.len);uo+=fo,co-=fo,ao.forward(fo)}else if(ao.ins==0&&ao.lenlo||so.ins>=0&&so.len>lo)&&(ao||no.length>uo),io.forward2(lo),so.forward(lo)}}}}class SectionIter{constructor(to){this.set=to,this.i=0,this.next()}next(){let{sections:to}=this.set;this.i>1;return ro>=to.length?Text$1.empty:to[ro]}textBit(to){let{inserted:ro}=this.set,no=this.i-2>>1;return no>=ro.length&&!to?Text$1.empty:ro[no].slice(this.off,to==null?void 0:this.off+to)}forward(to){to==this.len?this.next():(this.len-=to,this.off+=to)}forward2(to){this.ins==-1?this.forward(to):to==this.ins?this.next():(this.ins-=to,this.off+=to)}}class SelectionRange{constructor(to,ro,no){this.from=to,this.to=ro,this.flags=no}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let to=this.flags&7;return to==7?null:to}get goalColumn(){let to=this.flags>>6;return to==16777215?void 0:to}map(to,ro=-1){let no,oo;return this.empty?no=oo=to.mapPos(this.from,ro):(no=to.mapPos(this.from,1),oo=to.mapPos(this.to,-1)),no==this.from&&oo==this.to?this:new SelectionRange(no,oo,this.flags)}extend(to,ro=to){if(to<=this.anchor&&ro>=this.anchor)return EditorSelection.range(to,ro);let no=Math.abs(to-this.anchor)>Math.abs(ro-this.anchor)?to:ro;return EditorSelection.range(this.anchor,no)}eq(to,ro=!1){return this.anchor==to.anchor&&this.head==to.head&&(!ro||!this.empty||this.assoc==to.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(to){if(!to||typeof to.anchor!="number"||typeof to.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return EditorSelection.range(to.anchor,to.head)}static create(to,ro,no){return new SelectionRange(to,ro,no)}}class EditorSelection{constructor(to,ro){this.ranges=to,this.mainIndex=ro}map(to,ro=-1){return to.empty?this:EditorSelection.create(this.ranges.map(no=>no.map(to,ro)),this.mainIndex)}eq(to,ro=!1){if(this.ranges.length!=to.ranges.length||this.mainIndex!=to.mainIndex)return!1;for(let no=0;noto.toJSON()),main:this.mainIndex}}static fromJSON(to){if(!to||!Array.isArray(to.ranges)||typeof to.main!="number"||to.main>=to.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new EditorSelection(to.ranges.map(ro=>SelectionRange.fromJSON(ro)),to.main)}static single(to,ro=to){return new EditorSelection([EditorSelection.range(to,ro)],0)}static create(to,ro=0){if(to.length==0)throw new RangeError("A selection needs at least one range");for(let no=0,oo=0;ooto?8:0)|io)}static normalized(to,ro=0){let no=to[ro];to.sort((oo,io)=>oo.from-io.from),ro=to.indexOf(no);for(let oo=1;ooio.head?EditorSelection.range(lo,ao):EditorSelection.range(ao,lo))}}return new EditorSelection(to,ro)}}function checkSelection(eo,to){for(let ro of eo.ranges)if(ro.to>to)throw new RangeError("Selection points outside of document")}let nextID=0;class Facet{constructor(to,ro,no,oo,io){this.combine=to,this.compareInput=ro,this.compare=no,this.isStatic=oo,this.id=nextID++,this.default=to([]),this.extensions=typeof io=="function"?io(this):io}get reader(){return this}static define(to={}){return new Facet(to.combine||(ro=>ro),to.compareInput||((ro,no)=>ro===no),to.compare||(to.combine?(ro,no)=>ro===no:sameArray$1),!!to.static,to.enables)}of(to){return new FacetProvider([],this,0,to)}compute(to,ro){if(this.isStatic)throw new Error("Can't compute a static facet");return new FacetProvider(to,this,1,ro)}computeN(to,ro){if(this.isStatic)throw new Error("Can't compute a static facet");return new FacetProvider(to,this,2,ro)}from(to,ro){return ro||(ro=no=>no),this.compute([to],no=>ro(no.field(to)))}}function sameArray$1(eo,to){return eo==to||eo.length==to.length&&eo.every((ro,no)=>ro===to[no])}class FacetProvider{constructor(to,ro,no,oo){this.dependencies=to,this.facet=ro,this.type=no,this.value=oo,this.id=nextID++}dynamicSlot(to){var ro;let no=this.value,oo=this.facet.compareInput,io=this.id,so=to[io]>>1,ao=this.type==2,lo=!1,uo=!1,co=[];for(let fo of this.dependencies)fo=="doc"?lo=!0:fo=="selection"?uo=!0:((ro=to[fo.id])!==null&&ro!==void 0?ro:1)&1||co.push(to[fo.id]);return{create(fo){return fo.values[so]=no(fo),1},update(fo,ho){if(lo&&ho.docChanged||uo&&(ho.docChanged||ho.selection)||ensureAll(fo,co)){let po=no(fo);if(ao?!compareArray(po,fo.values[so],oo):!oo(po,fo.values[so]))return fo.values[so]=po,1}return 0},reconfigure:(fo,ho)=>{let po,go=ho.config.address[io];if(go!=null){let vo=getAddr(ho,go);if(this.dependencies.every(bo=>bo instanceof Facet?ho.facet(bo)===fo.facet(bo):bo instanceof StateField?ho.field(bo,!1)==fo.field(bo,!1):!0)||(ao?compareArray(po=no(fo),vo,oo):oo(po=no(fo),vo)))return fo.values[so]=vo,0}else po=no(fo);return fo.values[so]=po,1}}}}function compareArray(eo,to,ro){if(eo.length!=to.length)return!1;for(let no=0;noeo[lo.id]),oo=ro.map(lo=>lo.type),io=no.filter(lo=>!(lo&1)),so=eo[to.id]>>1;function ao(lo){let uo=[];for(let co=0;cono===oo),to);return to.provide&&(ro.provides=to.provide(ro)),ro}create(to){let ro=to.facet(initField).find(no=>no.field==this);return((ro==null?void 0:ro.create)||this.createF)(to)}slot(to){let ro=to[this.id]>>1;return{create:no=>(no.values[ro]=this.create(no),1),update:(no,oo)=>{let io=no.values[ro],so=this.updateF(io,oo);return this.compareF(io,so)?0:(no.values[ro]=so,1)},reconfigure:(no,oo)=>oo.config.address[this.id]!=null?(no.values[ro]=oo.field(this),0):(no.values[ro]=this.create(no),1)}}init(to){return[this,initField.of({field:this,create:to})]}get extension(){return this}}const Prec_={lowest:4,low:3,default:2,high:1,highest:0};function prec(eo){return to=>new PrecExtension(to,eo)}const Prec={highest:prec(Prec_.highest),high:prec(Prec_.high),default:prec(Prec_.default),low:prec(Prec_.low),lowest:prec(Prec_.lowest)};class PrecExtension{constructor(to,ro){this.inner=to,this.prec=ro}}class Compartment{of(to){return new CompartmentInstance(this,to)}reconfigure(to){return Compartment.reconfigure.of({compartment:this,extension:to})}get(to){return to.config.compartments.get(this)}}class CompartmentInstance{constructor(to,ro){this.compartment=to,this.inner=ro}}class Configuration{constructor(to,ro,no,oo,io,so){for(this.base=to,this.compartments=ro,this.dynamicSlots=no,this.address=oo,this.staticValues=io,this.facets=so,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(to,ro,no){let oo=[],io=Object.create(null),so=new Map;for(let ho of flatten(to,ro,so))ho instanceof StateField?oo.push(ho):(io[ho.facet.id]||(io[ho.facet.id]=[])).push(ho);let ao=Object.create(null),lo=[],uo=[];for(let ho of oo)ao[ho.id]=uo.length<<1,uo.push(po=>ho.slot(po));let co=no==null?void 0:no.config.facets;for(let ho in io){let po=io[ho],go=po[0].facet,vo=co&&co[ho]||[];if(po.every(bo=>bo.type==0))if(ao[go.id]=lo.length<<1|1,sameArray$1(vo,po))lo.push(no.facet(go));else{let bo=go.combine(po.map(xo=>xo.value));lo.push(no&&go.compare(bo,no.facet(go))?no.facet(go):bo)}else{for(let bo of po)bo.type==0?(ao[bo.id]=lo.length<<1|1,lo.push(bo.value)):(ao[bo.id]=uo.length<<1,uo.push(xo=>bo.dynamicSlot(xo)));ao[go.id]=uo.length<<1,uo.push(bo=>dynamicFacetSlot(bo,go,po))}}let fo=uo.map(ho=>ho(ao));return new Configuration(to,so,fo,ao,lo,io)}}function flatten(eo,to,ro){let no=[[],[],[],[],[]],oo=new Map;function io(so,ao){let lo=oo.get(so);if(lo!=null){if(lo<=ao)return;let uo=no[lo].indexOf(so);uo>-1&&no[lo].splice(uo,1),so instanceof CompartmentInstance&&ro.delete(so.compartment)}if(oo.set(so,ao),Array.isArray(so))for(let uo of so)io(uo,ao);else if(so instanceof CompartmentInstance){if(ro.has(so.compartment))throw new RangeError("Duplicate use of compartment in extensions");let uo=to.get(so.compartment)||so.inner;ro.set(so.compartment,uo),io(uo,ao)}else if(so instanceof PrecExtension)io(so.inner,so.prec);else if(so instanceof StateField)no[ao].push(so),so.provides&&io(so.provides,ao);else if(so instanceof FacetProvider)no[ao].push(so),so.facet.extensions&&io(so.facet.extensions,Prec_.default);else{let uo=so.extension;if(!uo)throw new Error(`Unrecognized extension value in extension set (${so}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);io(uo,ao)}}return io(eo,Prec_.default),no.reduce((so,ao)=>so.concat(ao))}function ensureAddr(eo,to){if(to&1)return 2;let ro=to>>1,no=eo.status[ro];if(no==4)throw new Error("Cyclic dependency between fields and/or facets");if(no&2)return no;eo.status[ro]=4;let oo=eo.computeSlot(eo,eo.config.dynamicSlots[ro]);return eo.status[ro]=2|oo}function getAddr(eo,to){return to&1?eo.config.staticValues[to>>1]:eo.values[to>>1]}const languageData=Facet.define(),allowMultipleSelections=Facet.define({combine:eo=>eo.some(to=>to),static:!0}),lineSeparator=Facet.define({combine:eo=>eo.length?eo[0]:void 0,static:!0}),changeFilter=Facet.define(),transactionFilter=Facet.define(),transactionExtender=Facet.define(),readOnly=Facet.define({combine:eo=>eo.length?eo[0]:!1});class Annotation{constructor(to,ro){this.type=to,this.value=ro}static define(){return new AnnotationType}}class AnnotationType{of(to){return new Annotation(this,to)}}class StateEffectType{constructor(to){this.map=to}of(to){return new StateEffect(this,to)}}class StateEffect{constructor(to,ro){this.type=to,this.value=ro}map(to){let ro=this.type.map(this.value,to);return ro===void 0?void 0:ro==this.value?this:new StateEffect(this.type,ro)}is(to){return this.type==to}static define(to={}){return new StateEffectType(to.map||(ro=>ro))}static mapEffects(to,ro){if(!to.length)return to;let no=[];for(let oo of to){let io=oo.map(ro);io&&no.push(io)}return no}}StateEffect.reconfigure=StateEffect.define();StateEffect.appendConfig=StateEffect.define();class Transaction{constructor(to,ro,no,oo,io,so){this.startState=to,this.changes=ro,this.selection=no,this.effects=oo,this.annotations=io,this.scrollIntoView=so,this._doc=null,this._state=null,no&&checkSelection(no,ro.newLength),io.some(ao=>ao.type==Transaction.time)||(this.annotations=io.concat(Transaction.time.of(Date.now())))}static create(to,ro,no,oo,io,so){return new Transaction(to,ro,no,oo,io,so)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(to){for(let ro of this.annotations)if(ro.type==to)return ro.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(to){let ro=this.annotation(Transaction.userEvent);return!!(ro&&(ro==to||ro.length>to.length&&ro.slice(0,to.length)==to&&ro[to.length]=="."))}}Transaction.time=Annotation.define();Transaction.userEvent=Annotation.define();Transaction.addToHistory=Annotation.define();Transaction.remote=Annotation.define();function joinRanges(eo,to){let ro=[];for(let no=0,oo=0;;){let io,so;if(no=eo[no]))io=eo[no++],so=eo[no++];else if(oo=0;oo--){let io=no[oo](eo);io instanceof Transaction?eo=io:Array.isArray(io)&&io.length==1&&io[0]instanceof Transaction?eo=io[0]:eo=resolveTransaction(to,asArray$1(io),!1)}return eo}function extendTransaction(eo){let to=eo.startState,ro=to.facet(transactionExtender),no=eo;for(let oo=ro.length-1;oo>=0;oo--){let io=ro[oo](eo);io&&Object.keys(io).length&&(no=mergeTransaction(no,resolveTransactionInner(to,io,eo.changes.newLength),!0))}return no==eo?eo:Transaction.create(to,eo.changes,eo.selection,no.effects,no.annotations,no.scrollIntoView)}const none$2=[];function asArray$1(eo){return eo==null?none$2:Array.isArray(eo)?eo:[eo]}var CharCategory=function(eo){return eo[eo.Word=0]="Word",eo[eo.Space=1]="Space",eo[eo.Other=2]="Other",eo}(CharCategory||(CharCategory={}));const nonASCIISingleCaseWordChar=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wordChar;try{wordChar=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(eo){}function hasWordChar(eo){if(wordChar)return wordChar.test(eo);for(let to=0;to"€"&&(ro.toUpperCase()!=ro.toLowerCase()||nonASCIISingleCaseWordChar.test(ro)))return!0}return!1}function makeCategorizer(eo){return to=>{if(!/\S/.test(to))return CharCategory.Space;if(hasWordChar(to))return CharCategory.Word;for(let ro=0;ro-1)return CharCategory.Word;return CharCategory.Other}}class EditorState{constructor(to,ro,no,oo,io,so){this.config=to,this.doc=ro,this.selection=no,this.values=oo,this.status=to.statusTemplate.slice(),this.computeSlot=io,so&&(so._state=this);for(let ao=0;aooo.set(uo,lo)),ro=null),oo.set(ao.value.compartment,ao.value.extension)):ao.is(StateEffect.reconfigure)?(ro=null,no=ao.value):ao.is(StateEffect.appendConfig)&&(ro=null,no=asArray$1(no).concat(ao.value));let io;ro?io=to.startState.values.slice():(ro=Configuration.resolve(no,oo,this),io=new EditorState(ro,this.doc,this.selection,ro.dynamicSlots.map(()=>null),(lo,uo)=>uo.reconfigure(lo,this),null).values);let so=to.startState.facet(allowMultipleSelections)?to.newSelection:to.newSelection.asSingle();new EditorState(ro,to.newDoc,so,io,(ao,lo)=>lo.update(ao,to),to)}replaceSelection(to){return typeof to=="string"&&(to=this.toText(to)),this.changeByRange(ro=>({changes:{from:ro.from,to:ro.to,insert:to},range:EditorSelection.cursor(ro.from+to.length)}))}changeByRange(to){let ro=this.selection,no=to(ro.ranges[0]),oo=this.changes(no.changes),io=[no.range],so=asArray$1(no.effects);for(let ao=1;aoso.spec.fromJSON(ao,lo)))}}return EditorState.create({doc:to.doc,selection:EditorSelection.fromJSON(to.selection),extensions:ro.extensions?oo.concat([ro.extensions]):oo})}static create(to={}){let ro=Configuration.resolve(to.extensions||[],new Map),no=to.doc instanceof Text$1?to.doc:Text$1.of((to.doc||"").split(ro.staticFacet(EditorState.lineSeparator)||DefaultSplit)),oo=to.selection?to.selection instanceof EditorSelection?to.selection:EditorSelection.single(to.selection.anchor,to.selection.head):EditorSelection.single(0);return checkSelection(oo,no.length),ro.staticFacet(allowMultipleSelections)||(oo=oo.asSingle()),new EditorState(ro,no,oo,ro.dynamicSlots.map(()=>null),(io,so)=>so.create(io),null)}get tabSize(){return this.facet(EditorState.tabSize)}get lineBreak(){return this.facet(EditorState.lineSeparator)||` +`}get readOnly(){return this.facet(readOnly)}phrase(to,...ro){for(let no of this.facet(EditorState.phrases))if(Object.prototype.hasOwnProperty.call(no,to)){to=no[to];break}return ro.length&&(to=to.replace(/\$(\$|\d*)/g,(no,oo)=>{if(oo=="$")return"$";let io=+(oo||1);return!io||io>ro.length?no:ro[io-1]})),to}languageDataAt(to,ro,no=-1){let oo=[];for(let io of this.facet(languageData))for(let so of io(this,ro,no))Object.prototype.hasOwnProperty.call(so,to)&&oo.push(so[to]);return oo}charCategorizer(to){return makeCategorizer(this.languageDataAt("wordChars",to).join(""))}wordAt(to){let{text:ro,from:no,length:oo}=this.doc.lineAt(to),io=this.charCategorizer(to),so=to-no,ao=to-no;for(;so>0;){let lo=findClusterBreak(ro,so,!1);if(io(ro.slice(lo,so))!=CharCategory.Word)break;so=lo}for(;aoeo.length?eo[0]:4});EditorState.lineSeparator=lineSeparator;EditorState.readOnly=readOnly;EditorState.phrases=Facet.define({compare(eo,to){let ro=Object.keys(eo),no=Object.keys(to);return ro.length==no.length&&ro.every(oo=>eo[oo]==to[oo])}});EditorState.languageData=languageData;EditorState.changeFilter=changeFilter;EditorState.transactionFilter=transactionFilter;EditorState.transactionExtender=transactionExtender;Compartment.reconfigure=StateEffect.define();function combineConfig(eo,to,ro={}){let no={};for(let oo of eo)for(let io of Object.keys(oo)){let so=oo[io],ao=no[io];if(ao===void 0)no[io]=so;else if(!(ao===so||so===void 0))if(Object.hasOwnProperty.call(ro,io))no[io]=ro[io](ao,so);else throw new Error("Config merge conflict for field "+io)}for(let oo in to)no[oo]===void 0&&(no[oo]=to[oo]);return no}class RangeValue{eq(to){return this==to}range(to,ro=to){return Range$2.create(to,ro,this)}}RangeValue.prototype.startSide=RangeValue.prototype.endSide=0;RangeValue.prototype.point=!1;RangeValue.prototype.mapMode=MapMode.TrackDel;let Range$2=class h_{constructor(to,ro,no){this.from=to,this.to=ro,this.value=no}static create(to,ro,no){return new h_(to,ro,no)}};function cmpRange(eo,to){return eo.from-to.from||eo.value.startSide-to.value.startSide}class Chunk{constructor(to,ro,no,oo){this.from=to,this.to=ro,this.value=no,this.maxPoint=oo}get length(){return this.to[this.to.length-1]}findIndex(to,ro,no,oo=0){let io=no?this.to:this.from;for(let so=oo,ao=io.length;;){if(so==ao)return so;let lo=so+ao>>1,uo=io[lo]-to||(no?this.value[lo].endSide:this.value[lo].startSide)-ro;if(lo==so)return uo>=0?so:ao;uo>=0?ao=lo:so=lo+1}}between(to,ro,no,oo){for(let io=this.findIndex(ro,-1e9,!0),so=this.findIndex(no,1e9,!1,io);iopo||ho==po&&uo.startSide>0&&uo.endSide<=0)continue;(po-ho||uo.endSide-uo.startSide)<0||(so<0&&(so=ho),uo.point&&(ao=Math.max(ao,po-ho)),no.push(uo),oo.push(ho-so),io.push(po-so))}return{mapped:no.length?new Chunk(oo,io,no,ao):null,pos:so}}}class RangeSet{constructor(to,ro,no,oo){this.chunkPos=to,this.chunk=ro,this.nextLayer=no,this.maxPoint=oo}static create(to,ro,no,oo){return new RangeSet(to,ro,no,oo)}get length(){let to=this.chunk.length-1;return to<0?0:Math.max(this.chunkEnd(to),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let to=this.nextLayer.size;for(let ro of this.chunk)to+=ro.value.length;return to}chunkEnd(to){return this.chunkPos[to]+this.chunk[to].length}update(to){let{add:ro=[],sort:no=!1,filterFrom:oo=0,filterTo:io=this.length}=to,so=to.filter;if(ro.length==0&&!so)return this;if(no&&(ro=ro.slice().sort(cmpRange)),this.isEmpty)return ro.length?RangeSet.of(ro):this;let ao=new LayerCursor(this,null,-1).goto(0),lo=0,uo=[],co=new RangeSetBuilder;for(;ao.value||lo=0){let fo=ro[lo++];co.addInner(fo.from,fo.to,fo.value)||uo.push(fo)}else ao.rangeIndex==1&&ao.chunkIndexthis.chunkEnd(ao.chunkIndex)||ioao.to||io=io&&to<=io+so.length&&so.between(io,to-io,ro-io,no)===!1)return}this.nextLayer.between(to,ro,no)}}iter(to=0){return HeapCursor.from([this]).goto(to)}get isEmpty(){return this.nextLayer==this}static iter(to,ro=0){return HeapCursor.from(to).goto(ro)}static compare(to,ro,no,oo,io=-1){let so=to.filter(fo=>fo.maxPoint>0||!fo.isEmpty&&fo.maxPoint>=io),ao=ro.filter(fo=>fo.maxPoint>0||!fo.isEmpty&&fo.maxPoint>=io),lo=findSharedChunks(so,ao,no),uo=new SpanCursor(so,lo,io),co=new SpanCursor(ao,lo,io);no.iterGaps((fo,ho,po)=>compare(uo,fo,co,ho,po,oo)),no.empty&&no.length==0&&compare(uo,0,co,0,0,oo)}static eq(to,ro,no=0,oo){oo==null&&(oo=999999999);let io=to.filter(co=>!co.isEmpty&&ro.indexOf(co)<0),so=ro.filter(co=>!co.isEmpty&&to.indexOf(co)<0);if(io.length!=so.length)return!1;if(!io.length)return!0;let ao=findSharedChunks(io,so),lo=new SpanCursor(io,ao,0).goto(no),uo=new SpanCursor(so,ao,0).goto(no);for(;;){if(lo.to!=uo.to||!sameValues(lo.active,uo.active)||lo.point&&(!uo.point||!lo.point.eq(uo.point)))return!1;if(lo.to>oo)return!0;lo.next(),uo.next()}}static spans(to,ro,no,oo,io=-1){let so=new SpanCursor(to,null,io).goto(ro),ao=ro,lo=so.openStart;for(;;){let uo=Math.min(so.to,no);if(so.point){let co=so.activeForPoint(so.to),fo=so.pointFromao&&(oo.span(ao,uo,so.active,lo),lo=so.openEnd(uo));if(so.to>no)return lo+(so.point&&so.to>no?1:0);ao=so.to,so.next()}}static of(to,ro=!1){let no=new RangeSetBuilder;for(let oo of to instanceof Range$2?[to]:ro?lazySort(to):to)no.add(oo.from,oo.to,oo.value);return no.finish()}static join(to){if(!to.length)return RangeSet.empty;let ro=to[to.length-1];for(let no=to.length-2;no>=0;no--)for(let oo=to[no];oo!=RangeSet.empty;oo=oo.nextLayer)ro=new RangeSet(oo.chunkPos,oo.chunk,ro,Math.max(oo.maxPoint,ro.maxPoint));return ro}}RangeSet.empty=new RangeSet([],[],null,-1);function lazySort(eo){if(eo.length>1)for(let to=eo[0],ro=1;ro0)return eo.slice().sort(cmpRange);to=no}return eo}RangeSet.empty.nextLayer=RangeSet.empty;class RangeSetBuilder{finishChunk(to){this.chunks.push(new Chunk(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,to&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(to,ro,no){this.addInner(to,ro,no)||(this.nextLayer||(this.nextLayer=new RangeSetBuilder)).add(to,ro,no)}addInner(to,ro,no){let oo=to-this.lastTo||no.startSide-this.last.endSide;if(oo<=0&&(to-this.lastFrom||no.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return oo<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=to),this.from.push(to-this.chunkStart),this.to.push(ro-this.chunkStart),this.last=no,this.lastFrom=to,this.lastTo=ro,this.value.push(no),no.point&&(this.maxPoint=Math.max(this.maxPoint,ro-to)),!0)}addChunk(to,ro){if((to-this.lastTo||ro.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,ro.maxPoint),this.chunks.push(ro),this.chunkPos.push(to);let no=ro.value.length-1;return this.last=ro.value[no],this.lastFrom=ro.from[no]+to,this.lastTo=ro.to[no]+to,!0}finish(){return this.finishInner(RangeSet.empty)}finishInner(to){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return to;let ro=RangeSet.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(to):to,this.setMaxPoint);return this.from=null,ro}}function findSharedChunks(eo,to,ro){let no=new Map;for(let io of eo)for(let so=0;so=this.minPoint)break}}setRangeIndex(to){if(to==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=no&&oo.push(new LayerCursor(so,ro,no,io));return oo.length==1?oo[0]:new HeapCursor(oo)}get startSide(){return this.value?this.value.startSide:0}goto(to,ro=-1e9){for(let no of this.heap)no.goto(to,ro);for(let no=this.heap.length>>1;no>=0;no--)heapBubble(this.heap,no);return this.next(),this}forward(to,ro){for(let no of this.heap)no.forward(to,ro);for(let no=this.heap.length>>1;no>=0;no--)heapBubble(this.heap,no);(this.to-to||this.value.endSide-ro)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let to=this.heap[0];this.from=to.from,this.to=to.to,this.value=to.value,this.rank=to.rank,to.value&&to.next(),heapBubble(this.heap,0)}}}function heapBubble(eo,to){for(let ro=eo[to];;){let no=(to<<1)+1;if(no>=eo.length)break;let oo=eo[no];if(no+1=0&&(oo=eo[no+1],no++),ro.compare(oo)<0)break;eo[no]=ro,eo[to]=oo,to=no}}class SpanCursor{constructor(to,ro,no){this.minPoint=no,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=HeapCursor.from(to,ro,no)}goto(to,ro=-1e9){return this.cursor.goto(to,ro),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=to,this.endSide=ro,this.openStart=-1,this.next(),this}forward(to,ro){for(;this.minActive>-1&&(this.activeTo[this.minActive]-to||this.active[this.minActive].endSide-ro)<0;)this.removeActive(this.minActive);this.cursor.forward(to,ro)}removeActive(to){remove(this.active,to),remove(this.activeTo,to),remove(this.activeRank,to),this.minActive=findMinIndex(this.active,this.activeTo)}addActive(to){let ro=0,{value:no,to:oo,rank:io}=this.cursor;for(;ro0;)ro++;insert(this.active,ro,no),insert(this.activeTo,ro,oo),insert(this.activeRank,ro,io),to&&insert(to,ro,this.cursor.from),this.minActive=findMinIndex(this.active,this.activeTo)}next(){let to=this.to,ro=this.point;this.point=null;let no=this.openStart<0?[]:null;for(;;){let oo=this.minActive;if(oo>-1&&(this.activeTo[oo]-this.cursor.from||this.active[oo].endSide-this.cursor.startSide)<0){if(this.activeTo[oo]>to){this.to=this.activeTo[oo],this.endSide=this.active[oo].endSide;break}this.removeActive(oo),no&&remove(no,oo)}else if(this.cursor.value)if(this.cursor.from>to){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let io=this.cursor.value;if(!io.point)this.addActive(no),this.cursor.next();else if(ro&&this.cursor.to==this.to&&this.cursor.from=0&&no[oo]=0&&!(this.activeRank[no]to||this.activeTo[no]==to&&this.active[no].endSide>=this.point.endSide)&&ro.push(this.active[no]);return ro.reverse()}openEnd(to){let ro=0;for(let no=this.activeTo.length-1;no>=0&&this.activeTo[no]>to;no--)ro++;return ro}}function compare(eo,to,ro,no,oo,io){eo.goto(to),ro.goto(no);let so=no+oo,ao=no,lo=no-to;for(;;){let uo=eo.to+lo-ro.to||eo.endSide-ro.endSide,co=uo<0?eo.to+lo:ro.to,fo=Math.min(co,so);if(eo.point||ro.point?eo.point&&ro.point&&(eo.point==ro.point||eo.point.eq(ro.point))&&sameValues(eo.activeForPoint(eo.to),ro.activeForPoint(ro.to))||io.comparePoint(ao,fo,eo.point,ro.point):fo>ao&&!sameValues(eo.active,ro.active)&&io.compareRange(ao,fo,eo.active,ro.active),co>so)break;ao=co,uo<=0&&eo.next(),uo>=0&&ro.next()}}function sameValues(eo,to){if(eo.length!=to.length)return!1;for(let ro=0;ro=to;no--)eo[no+1]=eo[no];eo[to]=ro}function findMinIndex(eo,to){let ro=-1,no=1e9;for(let oo=0;oo=to)return oo;if(oo==eo.length)break;io+=eo.charCodeAt(oo)==9?ro-io%ro:1,oo=findClusterBreak(eo,oo)}return no===!0?-1:eo.length}const C="ͼ",COUNT=typeof Symbol>"u"?"__"+C:Symbol.for(C),SET=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),top=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class StyleModule{constructor(to,ro){this.rules=[];let{finish:no}=ro||{};function oo(so){return/^@/.test(so)?[so]:so.split(/,\s*/)}function io(so,ao,lo,uo){let co=[],fo=/^@(\w+)\b/.exec(so[0]),ho=fo&&fo[1]=="keyframes";if(fo&&ao==null)return lo.push(so[0]+";");for(let po in ao){let go=ao[po];if(/&/.test(po))io(po.split(/,\s*/).map(vo=>so.map(bo=>vo.replace(/&/,bo))).reduce((vo,bo)=>vo.concat(bo)),go,lo);else if(go&&typeof go=="object"){if(!fo)throw new RangeError("The value of a property ("+po+") should be a primitive value.");io(oo(po),go,co,ho)}else go!=null&&co.push(po.replace(/_.*/,"").replace(/[A-Z]/g,vo=>"-"+vo.toLowerCase())+": "+go+";")}(co.length||ho)&&lo.push((no&&!fo&&!uo?so.map(no):so).join(", ")+" {"+co.join(" ")+"}")}for(let so in to)io(oo(so),to[so],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let to=top[COUNT]||1;return top[COUNT]=to+1,C+to.toString(36)}static mount(to,ro,no){let oo=to[SET],io=no&&no.nonce;oo?io&&oo.setNonce(io):oo=new StyleSet(to,io),oo.mount(Array.isArray(ro)?ro:[ro],to)}}let adoptedSet=new Map;class StyleSet{constructor(to,ro){let no=to.ownerDocument||to,oo=no.defaultView;if(!to.head&&to.adoptedStyleSheets&&oo.CSSStyleSheet){let io=adoptedSet.get(no);if(io)return to[SET]=io;this.sheet=new oo.CSSStyleSheet,adoptedSet.set(no,this)}else this.styleTag=no.createElement("style"),ro&&this.styleTag.setAttribute("nonce",ro);this.modules=[],to[SET]=this}mount(to,ro){let no=this.sheet,oo=0,io=0;for(let so=0;so-1&&(this.modules.splice(lo,1),io--,lo=-1),lo==-1){if(this.modules.splice(io++,0,ao),no)for(let uo=0;uo",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},mac=typeof navigator<"u"&&/Mac/.test(navigator.platform),ie$1=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var i=0;i<10;i++)base[48+i]=base[96+i]=String(i);for(var i=1;i<=24;i++)base[i+111]="F"+i;for(var i=65;i<=90;i++)base[i]=String.fromCharCode(i+32),shift[i]=String.fromCharCode(i);for(var code in base)shift.hasOwnProperty(code)||(shift[code]=base[code]);function keyName(eo){var to=mac&&eo.metaKey&&eo.shiftKey&&!eo.ctrlKey&&!eo.altKey||ie$1&&eo.shiftKey&&eo.key&&eo.key.length==1||eo.key=="Unidentified",ro=!to&&eo.key||(eo.shiftKey?shift:base)[eo.keyCode]||eo.key||"Unidentified";return ro=="Esc"&&(ro="Escape"),ro=="Del"&&(ro="Delete"),ro=="Left"&&(ro="ArrowLeft"),ro=="Up"&&(ro="ArrowUp"),ro=="Right"&&(ro="ArrowRight"),ro=="Down"&&(ro="ArrowDown"),ro}function getSelection(eo){let to;return eo.nodeType==11?to=eo.getSelection?eo:eo.ownerDocument:to=eo,to.getSelection()}function contains(eo,to){return to?eo==to||eo.contains(to.nodeType!=1?to.parentNode:to):!1}function deepActiveElement(eo){let to=eo.activeElement;for(;to&&to.shadowRoot;)to=to.shadowRoot.activeElement;return to}function hasSelection(eo,to){if(!to.anchorNode)return!1;try{return contains(eo,to.anchorNode)}catch{return!1}}function clientRectsFor(eo){return eo.nodeType==3?textRange(eo,0,eo.nodeValue.length).getClientRects():eo.nodeType==1?eo.getClientRects():[]}function isEquivalentPosition(eo,to,ro,no){return ro?scanFor(eo,to,ro,no,-1)||scanFor(eo,to,ro,no,1):!1}function domIndex(eo){for(var to=0;;to++)if(eo=eo.previousSibling,!eo)return to}function isBlockElement(eo){return eo.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(eo.nodeName)}function scanFor(eo,to,ro,no,oo){for(;;){if(eo==ro&&to==no)return!0;if(to==(oo<0?0:maxOffset(eo))){if(eo.nodeName=="DIV")return!1;let io=eo.parentNode;if(!io||io.nodeType!=1)return!1;to=domIndex(eo)+(oo<0?0:1),eo=io}else if(eo.nodeType==1){if(eo=eo.childNodes[to+(oo<0?-1:0)],eo.nodeType==1&&eo.contentEditable=="false")return!1;to=oo<0?maxOffset(eo):0}else return!1}}function maxOffset(eo){return eo.nodeType==3?eo.nodeValue.length:eo.childNodes.length}function flattenRect(eo,to){let ro=to?eo.left:eo.right;return{left:ro,right:ro,top:eo.top,bottom:eo.bottom}}function windowRect(eo){let to=eo.visualViewport;return to?{left:0,right:to.width,top:0,bottom:to.height}:{left:0,right:eo.innerWidth,top:0,bottom:eo.innerHeight}}function getScale(eo,to){let ro=to.width/eo.offsetWidth,no=to.height/eo.offsetHeight;return(ro>.995&&ro<1.005||!isFinite(ro)||Math.abs(to.width-eo.offsetWidth)<1)&&(ro=1),(no>.995&&no<1.005||!isFinite(no)||Math.abs(to.height-eo.offsetHeight)<1)&&(no=1),{scaleX:ro,scaleY:no}}function scrollRectIntoView(eo,to,ro,no,oo,io,so,ao){let lo=eo.ownerDocument,uo=lo.defaultView||window;for(let co=eo,fo=!1;co&&!fo;)if(co.nodeType==1){let ho,po=co==lo.body,go=1,vo=1;if(po)ho=windowRect(uo);else{if(/^(fixed|sticky)$/.test(getComputedStyle(co).position)&&(fo=!0),co.scrollHeight<=co.clientHeight&&co.scrollWidth<=co.clientWidth){co=co.assignedSlot||co.parentNode;continue}let _o=co.getBoundingClientRect();({scaleX:go,scaleY:vo}=getScale(co,_o)),ho={left:_o.left,right:_o.left+co.clientWidth*go,top:_o.top,bottom:_o.top+co.clientHeight*vo}}let bo=0,xo=0;if(oo=="nearest")to.top0&&to.bottom>ho.bottom+xo&&(xo=to.bottom-ho.bottom+xo+so)):to.bottom>ho.bottom&&(xo=to.bottom-ho.bottom+so,ro<0&&to.top-xo0&&to.right>ho.right+bo&&(bo=to.right-ho.right+bo+io)):to.right>ho.right&&(bo=to.right-ho.right+io,ro<0&&to.leftro.clientHeight||ro.scrollWidth>ro.clientWidth)return ro;ro=ro.assignedSlot||ro.parentNode}else if(ro.nodeType==11)ro=ro.host;else break;return null}class DOMSelectionState{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(to){return this.anchorNode==to.anchorNode&&this.anchorOffset==to.anchorOffset&&this.focusNode==to.focusNode&&this.focusOffset==to.focusOffset}setRange(to){let{anchorNode:ro,focusNode:no}=to;this.set(ro,Math.min(to.anchorOffset,ro?maxOffset(ro):0),no,Math.min(to.focusOffset,no?maxOffset(no):0))}set(to,ro,no,oo){this.anchorNode=to,this.anchorOffset=ro,this.focusNode=no,this.focusOffset=oo}}let preventScrollSupported=null;function focusPreventScroll(eo){if(eo.setActive)return eo.setActive();if(preventScrollSupported)return eo.focus(preventScrollSupported);let to=[];for(let ro=eo;ro&&(to.push(ro,ro.scrollTop,ro.scrollLeft),ro!=ro.ownerDocument);ro=ro.parentNode);if(eo.focus(preventScrollSupported==null?{get preventScroll(){return preventScrollSupported={preventScroll:!0},!0}}:void 0),!preventScrollSupported){preventScrollSupported=!1;for(let ro=0;roMath.max(1,eo.scrollHeight-eo.clientHeight-4)}function textNodeBefore(eo,to){for(let ro=eo,no=to;;){if(ro.nodeType==3&&no>0)return{node:ro,offset:no};if(ro.nodeType==1&&no>0){if(ro.contentEditable=="false")return null;ro=ro.childNodes[no-1],no=maxOffset(ro)}else if(ro.parentNode&&!isBlockElement(ro))no=domIndex(ro),ro=ro.parentNode;else return null}}function textNodeAfter(eo,to){for(let ro=eo,no=to;;){if(ro.nodeType==3&&noro)return fo.domBoundsAround(to,ro,uo);if(ho>=to&&oo==-1&&(oo=lo,io=uo),uo>ro&&fo.dom.parentNode==this.dom){so=lo,ao=co;break}co=ho,uo=ho+fo.breakAfter}return{from:io,to:ao<0?no+this.length:ao,startDOM:(oo?this.children[oo-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:so=0?this.children[so].dom:null}}markDirty(to=!1){this.flags|=2,this.markParentsDirty(to)}markParentsDirty(to){for(let ro=this.parent;ro;ro=ro.parent){if(to&&(ro.flags|=2),ro.flags&1)return;ro.flags|=1,to=!1}}setParent(to){this.parent!=to&&(this.parent=to,this.flags&7&&this.markParentsDirty(!0))}setDOM(to){this.dom!=to&&(this.dom&&(this.dom.cmView=null),this.dom=to,to.cmView=this)}get rootView(){for(let to=this;;){let ro=to.parent;if(!ro)return to;to=ro}}replaceChildren(to,ro,no=noChildren){this.markDirty();for(let oo=to;oothis.pos||to==this.pos&&(ro>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=to-this.pos,this;let no=this.children[--this.i];this.pos-=no.length+no.breakAfter}}}function replaceRange(eo,to,ro,no,oo,io,so,ao,lo){let{children:uo}=eo,co=uo.length?uo[to]:null,fo=io.length?io[io.length-1]:null,ho=fo?fo.breakAfter:so;if(!(to==no&&co&&!so&&!ho&&io.length<2&&co.merge(ro,oo,io.length?fo:null,ro==0,ao,lo))){if(no0&&(!so&&io.length&&co.merge(ro,co.length,io[0],!1,ao,0)?co.breakAfter=io.shift().breakAfter:(ro2);var browser={mac:ios||/Mac/.test(nav.platform),windows:/Win/.test(nav.platform),linux:/Linux|X11/.test(nav.platform),ie,ie_version:ie_upto10?doc.documentMode||6:ie_11up?+ie_11up[1]:ie_edge?+ie_edge[1]:0,gecko,gecko_version:gecko?+(/Firefox\/(\d+)/.exec(nav.userAgent)||[0,0])[1]:0,chrome:!!chrome,chrome_version:chrome?+chrome[1]:0,ios,android:/Android\b/.test(nav.userAgent),webkit,safari,webkit_version:webkit?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:doc.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const MaxJoinLen=256;class TextView extends ContentView{constructor(to){super(),this.text=to}get length(){return this.text.length}createDOM(to){this.setDOM(to||document.createTextNode(this.text))}sync(to,ro){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(ro&&ro.node==this.dom&&(ro.written=!0),this.dom.nodeValue=this.text)}reuseDOM(to){to.nodeType==3&&this.createDOM(to)}merge(to,ro,no){return this.flags&8||no&&(!(no instanceof TextView)||this.length-(ro-to)+no.length>MaxJoinLen||no.flags&8)?!1:(this.text=this.text.slice(0,to)+(no?no.text:"")+this.text.slice(ro),this.markDirty(),!0)}split(to){let ro=new TextView(this.text.slice(to));return this.text=this.text.slice(0,to),this.markDirty(),ro.flags|=this.flags&8,ro}localPosFromDOM(to,ro){return to==this.dom?ro:ro?this.text.length:0}domAtPos(to){return new DOMPos(this.dom,to)}domBoundsAround(to,ro,no){return{from:no,to:no+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(to,ro){return textCoords(this.dom,to,ro)}}class MarkView extends ContentView{constructor(to,ro=[],no=0){super(),this.mark=to,this.children=ro,this.length=no;for(let oo of ro)oo.setParent(this)}setAttrs(to){if(clearAttributes(to),this.mark.class&&(to.className=this.mark.class),this.mark.attrs)for(let ro in this.mark.attrs)to.setAttribute(ro,this.mark.attrs[ro]);return to}canReuseDOM(to){return super.canReuseDOM(to)&&!((this.flags|to.flags)&8)}reuseDOM(to){to.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(to),this.flags|=6)}sync(to,ro){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(to,ro)}merge(to,ro,no,oo,io,so){return no&&(!(no instanceof MarkView&&no.mark.eq(this.mark))||to&&io<=0||roto&&ro.push(no=to&&(oo=io),no=lo,io++}let so=this.length-to;return this.length=to,oo>-1&&(this.children.length=oo,this.markDirty()),new MarkView(this.mark,ro,so)}domAtPos(to){return inlineDOMAtPos(this,to)}coordsAt(to,ro){return coordsInChildren(this,to,ro)}}function textCoords(eo,to,ro){let no=eo.nodeValue.length;to>no&&(to=no);let oo=to,io=to,so=0;to==0&&ro<0||to==no&&ro>=0?browser.chrome||browser.gecko||(to?(oo--,so=1):io=0)?0:ao.length-1];return browser.safari&&!so&&lo.width==0&&(lo=Array.prototype.find.call(ao,uo=>uo.width)||lo),so?flattenRect(lo,so<0):lo||null}class WidgetView extends ContentView{static create(to,ro,no){return new WidgetView(to,ro,no)}constructor(to,ro,no){super(),this.widget=to,this.length=ro,this.side=no,this.prevWidget=null}split(to){let ro=WidgetView.create(this.widget,this.length-to,this.side);return this.length-=to,ro}sync(to){(!this.dom||!this.widget.updateDOM(this.dom,to))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(to)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(to,ro,no,oo,io,so){return no&&(!(no instanceof WidgetView)||!this.widget.compare(no.widget)||to>0&&io<=0||ro0)?DOMPos.before(this.dom):DOMPos.after(this.dom,to==this.length)}domBoundsAround(){return null}coordsAt(to,ro){let no=this.widget.coordsAt(this.dom,to,ro);if(no)return no;let oo=this.dom.getClientRects(),io=null;if(!oo.length)return null;let so=this.side?this.side<0:to>0;for(let ao=so?oo.length-1:0;io=oo[ao],!(to>0?ao==0:ao==oo.length-1||io.top0?DOMPos.before(this.dom):DOMPos.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(to){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Text$1.empty}get isHidden(){return!0}}TextView.prototype.children=WidgetView.prototype.children=WidgetBufferView.prototype.children=noChildren;function inlineDOMAtPos(eo,to){let ro=eo.dom,{children:no}=eo,oo=0;for(let io=0;ooio&&to0;io--){let so=no[io-1];if(so.dom.parentNode==ro)return so.domAtPos(so.length)}for(let io=oo;io0&&to instanceof MarkView&&oo.length&&(no=oo[oo.length-1])instanceof MarkView&&no.mark.eq(to.mark)?joinInlineInto(no,to.children[0],ro-1):(oo.push(to),to.setParent(eo)),eo.length+=to.length}function coordsInChildren(eo,to,ro){let no=null,oo=-1,io=null,so=-1;function ao(uo,co){for(let fo=0,ho=0;fo=co&&(po.children.length?ao(po,co-ho):(!io||io.isHidden&&ro>0)&&(go>co||ho==go&&po.getSide()>0)?(io=po,so=co-ho):(ho-1?1:0)!=oo.length-(ro&&oo.indexOf(ro)>-1?1:0))return!1;for(let io of no)if(io!=ro&&(oo.indexOf(io)==-1||eo[io]!==to[io]))return!1;return!0}function updateAttrs(eo,to,ro){let no=!1;if(to)for(let oo in to)ro&&oo in ro||(no=!0,oo=="style"?eo.style.cssText="":eo.removeAttribute(oo));if(ro)for(let oo in ro)to&&to[oo]==ro[oo]||(no=!0,oo=="style"?eo.style.cssText=ro[oo]:eo.setAttribute(oo,ro[oo]));return no}function getAttrs(eo){let to=Object.create(null);for(let ro=0;ro0&&this.children[no-1].length==0;)this.children[--no].destroy();return this.children.length=no,this.markDirty(),this.length=to,ro}transferDOM(to){this.dom&&(this.markDirty(),to.setDOM(this.dom),to.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(to){attrsEq(this.attrs,to)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=to)}append(to,ro){joinInlineInto(this,to,ro)}addLineDeco(to){let ro=to.spec.attributes,no=to.spec.class;ro&&(this.attrs=combineAttrs(ro,this.attrs||{})),no&&(this.attrs=combineAttrs({class:no},this.attrs||{}))}domAtPos(to){return inlineDOMAtPos(this,to)}reuseDOM(to){to.nodeName=="DIV"&&(this.setDOM(to),this.flags|=6)}sync(to,ro){var no;this.dom?this.flags&4&&(clearAttributes(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(updateAttrs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(to,ro);let oo=this.dom.lastChild;for(;oo&&ContentView.get(oo)instanceof MarkView;)oo=oo.lastChild;if(!oo||!this.length||oo.nodeName!="BR"&&((no=ContentView.get(oo))===null||no===void 0?void 0:no.isEditable)==!1&&(!browser.ios||!this.children.some(io=>io instanceof TextView))){let io=document.createElement("BR");io.cmIgnore=!0,this.dom.appendChild(io)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let to=0,ro;for(let no of this.children){if(!(no instanceof TextView)||/[^ -~]/.test(no.text))return null;let oo=clientRectsFor(no.dom);if(oo.length!=1)return null;to+=oo[0].width,ro=oo[0].height}return to?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:to/this.length,textHeight:ro}:null}coordsAt(to,ro){let no=coordsInChildren(this,to,ro);if(!this.children.length&&no&&this.parent){let{heightOracle:oo}=this.parent.view.viewState,io=no.bottom-no.top;if(Math.abs(io-oo.lineHeight)<2&&oo.textHeight=ro){if(io instanceof LineView)return io;if(so>ro)break}oo=so+io.breakAfter}return null}}class BlockWidgetView extends ContentView{constructor(to,ro,no){super(),this.widget=to,this.length=ro,this.deco=no,this.breakAfter=0,this.prevWidget=null}merge(to,ro,no,oo,io,so){return no&&(!(no instanceof BlockWidgetView)||!this.widget.compare(no.widget)||to>0&&io<=0||ro0}}class WidgetType{eq(to){return!1}updateDOM(to,ro){return!1}compare(to){return this==to||this.constructor==to.constructor&&this.eq(to)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(to){return!0}coordsAt(to,ro,no){return null}get isHidden(){return!1}get editable(){return!1}destroy(to){}}var BlockType=function(eo){return eo[eo.Text=0]="Text",eo[eo.WidgetBefore=1]="WidgetBefore",eo[eo.WidgetAfter=2]="WidgetAfter",eo[eo.WidgetRange=3]="WidgetRange",eo}(BlockType||(BlockType={}));class Decoration extends RangeValue{constructor(to,ro,no,oo){super(),this.startSide=to,this.endSide=ro,this.widget=no,this.spec=oo}get heightRelevant(){return!1}static mark(to){return new MarkDecoration(to)}static widget(to){let ro=Math.max(-1e4,Math.min(1e4,to.side||0)),no=!!to.block;return ro+=no&&!to.inlineOrder?ro>0?3e8:-4e8:ro>0?1e8:-1e8,new PointDecoration(to,ro,ro,no,to.widget||null,!1)}static replace(to){let ro=!!to.block,no,oo;if(to.isBlockGap)no=-5e8,oo=4e8;else{let{start:io,end:so}=getInclusive(to,ro);no=(io?ro?-3e8:-1:5e8)-1,oo=(so?ro?2e8:1:-6e8)+1}return new PointDecoration(to,no,oo,ro,to.widget||null,!0)}static line(to){return new LineDecoration(to)}static set(to,ro=!1){return RangeSet.of(to,ro)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Decoration.none=RangeSet.empty;class MarkDecoration extends Decoration{constructor(to){let{start:ro,end:no}=getInclusive(to);super(ro?-1:5e8,no?1:-6e8,null,to),this.tagName=to.tagName||"span",this.class=to.class||"",this.attrs=to.attributes||null}eq(to){var ro,no;return this==to||to instanceof MarkDecoration&&this.tagName==to.tagName&&(this.class||((ro=this.attrs)===null||ro===void 0?void 0:ro.class))==(to.class||((no=to.attrs)===null||no===void 0?void 0:no.class))&&attrsEq(this.attrs,to.attrs,"class")}range(to,ro=to){if(to>=ro)throw new RangeError("Mark decorations may not be empty");return super.range(to,ro)}}MarkDecoration.prototype.point=!1;class LineDecoration extends Decoration{constructor(to){super(-2e8,-2e8,null,to)}eq(to){return to instanceof LineDecoration&&this.spec.class==to.spec.class&&attrsEq(this.spec.attributes,to.spec.attributes)}range(to,ro=to){if(ro!=to)throw new RangeError("Line decoration ranges must be zero-length");return super.range(to,ro)}}LineDecoration.prototype.mapMode=MapMode.TrackBefore;LineDecoration.prototype.point=!0;class PointDecoration extends Decoration{constructor(to,ro,no,oo,io,so){super(ro,no,io,to),this.block=oo,this.isReplace=so,this.mapMode=oo?ro<=0?MapMode.TrackBefore:MapMode.TrackAfter:MapMode.TrackDel}get type(){return this.startSide!=this.endSide?BlockType.WidgetRange:this.startSide<=0?BlockType.WidgetBefore:BlockType.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(to){return to instanceof PointDecoration&&widgetsEq(this.widget,to.widget)&&this.block==to.block&&this.startSide==to.startSide&&this.endSide==to.endSide}range(to,ro=to){if(this.isReplace&&(to>ro||to==ro&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&ro!=to)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(to,ro)}}PointDecoration.prototype.point=!0;function getInclusive(eo,to=!1){let{inclusiveStart:ro,inclusiveEnd:no}=eo;return ro==null&&(ro=eo.inclusive),no==null&&(no=eo.inclusive),{start:ro??to,end:no??to}}function widgetsEq(eo,to){return eo==to||!!(eo&&to&&eo.compare(to))}function addRange(eo,to,ro,no=0){let oo=ro.length-1;oo>=0&&ro[oo]+no>=eo?ro[oo]=Math.max(ro[oo],to):ro.push(eo,to)}class ContentBuilder{constructor(to,ro,no,oo){this.doc=to,this.pos=ro,this.end=no,this.disallowBlockEffectsFor=oo,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=to.iter(),this.skip=ro}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let to=this.content[this.content.length-1];return!(to.breakAfter||to instanceof BlockWidgetView&&to.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new LineView),this.atCursorPos=!0),this.curLine}flushBuffer(to=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(wrapMarks(new WidgetBufferView(-1),to),to.length),this.pendingBuffer=0)}addBlockWidget(to){this.flushBuffer(),this.curLine=null,this.content.push(to)}finish(to){this.pendingBuffer&&to<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(to&&this.content.length&&this.content[this.content.length-1]instanceof BlockWidgetView)&&this.getLine()}buildText(to,ro,no){for(;to>0;){if(this.textOff==this.text.length){let{value:io,lineBreak:so,done:ao}=this.cursor.next(this.skip);if(this.skip=0,ao)throw new Error("Ran out of text content when drawing inline views");if(so){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,to--;continue}else this.text=io,this.textOff=0}let oo=Math.min(this.text.length-this.textOff,to,512);this.flushBuffer(ro.slice(ro.length-no)),this.getLine().append(wrapMarks(new TextView(this.text.slice(this.textOff,this.textOff+oo)),ro),no),this.atCursorPos=!0,this.textOff+=oo,to-=oo,no=0}}span(to,ro,no,oo){this.buildText(ro-to,no,oo),this.pos=ro,this.openStart<0&&(this.openStart=oo)}point(to,ro,no,oo,io,so){if(this.disallowBlockEffectsFor[so]&&no instanceof PointDecoration){if(no.block)throw new RangeError("Block decorations may not be specified via plugins");if(ro>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let ao=ro-to;if(no instanceof PointDecoration)if(no.block)no.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new BlockWidgetView(no.widget||NullWidget.block,ao,no));else{let lo=WidgetView.create(no.widget||NullWidget.inline,ao,ao?0:no.startSide),uo=this.atCursorPos&&!lo.isEditable&&io<=oo.length&&(to0),co=!lo.isEditable&&(tooo.length||no.startSide<=0),fo=this.getLine();this.pendingBuffer==2&&!uo&&!lo.isEditable&&(this.pendingBuffer=0),this.flushBuffer(oo),uo&&(fo.append(wrapMarks(new WidgetBufferView(1),oo),io),io=oo.length+Math.max(0,io-oo.length)),fo.append(wrapMarks(lo,oo),io),this.atCursorPos=co,this.pendingBuffer=co?tooo.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=oo.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(no);ao&&(this.textOff+ao<=this.text.length?this.textOff+=ao:(this.skip+=ao-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=ro),this.openStart<0&&(this.openStart=io)}static build(to,ro,no,oo,io){let so=new ContentBuilder(to,ro,no,io);return so.openEnd=RangeSet.spans(oo,ro,no,so),so.openStart<0&&(so.openStart=so.openEnd),so.finish(so.openEnd),so}}function wrapMarks(eo,to){for(let ro of to)eo=new MarkView(ro,[eo],eo.length);return eo}class NullWidget extends WidgetType{constructor(to){super(),this.tag=to}eq(to){return to.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(to){return to.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}NullWidget.inline=new NullWidget("span");NullWidget.block=new NullWidget("div");var Direction=function(eo){return eo[eo.LTR=0]="LTR",eo[eo.RTL=1]="RTL",eo}(Direction||(Direction={}));const LTR=Direction.LTR,RTL=Direction.RTL;function dec(eo){let to=[];for(let ro=0;ro=ro){if(ao.level==no)return so;(io<0||(oo!=0?oo<0?ao.fromro:to[io].level>ao.level))&&(io=so)}}if(io<0)throw new RangeError("Index out of range");return io}}function isolatesEq(eo,to){if(eo.length!=to.length)return!1;for(let ro=0;ro=0;vo-=3)if(BracketStack[vo+1]==-po){let bo=BracketStack[vo+2],xo=bo&2?oo:bo&4?bo&1?io:oo:0;xo&&(types[fo]=types[BracketStack[vo]]=xo),ao=vo;break}}else{if(BracketStack.length==189)break;BracketStack[ao++]=fo,BracketStack[ao++]=ho,BracketStack[ao++]=lo}else if((go=types[fo])==2||go==1){let vo=go==oo;lo=vo?0:1;for(let bo=ao-3;bo>=0;bo-=3){let xo=BracketStack[bo+2];if(xo&2)break;if(vo)BracketStack[bo+2]|=2;else{if(xo&4)break;BracketStack[bo+2]|=4}}}}}function processNeutrals(eo,to,ro,no){for(let oo=0,io=no;oo<=ro.length;oo++){let so=oo?ro[oo-1].to:eo,ao=oolo;)go==bo&&(go=ro[--vo].from,bo=vo?ro[vo-1].to:eo),types[--go]=po;lo=co}else io=uo,lo++}}}function emitSpans(eo,to,ro,no,oo,io,so){let ao=no%2?2:1;if(no%2==oo%2)for(let lo=to,uo=0;lolo&&so.push(new BidiSpan(lo,vo.from,po));let bo=vo.direction==LTR!=!(po%2);computeSectionOrder(eo,bo?no+1:no,oo,vo.inner,vo.from,vo.to,so),lo=vo.to}go=vo.to}else{if(go==ro||(co?types[go]!=ao:types[go]==ao))break;go++}ho?emitSpans(eo,lo,go,no+1,oo,ho,so):loto;){let co=!0,fo=!1;if(!uo||lo>io[uo-1].to){let vo=types[lo-1];vo!=ao&&(co=!1,fo=vo==16)}let ho=!co&&ao==1?[]:null,po=co?no:no+1,go=lo;e:for(;;)if(uo&&go==io[uo-1].to){if(fo)break e;let vo=io[--uo];if(!co)for(let bo=vo.from,xo=uo;;){if(bo==to)break e;if(xo&&io[xo-1].to==bo)bo=io[--xo].from;else{if(types[bo-1]==ao)break e;break}}if(ho)ho.push(vo);else{vo.totypes.length;)types[types.length]=256;let no=[],oo=to==LTR?0:1;return computeSectionOrder(eo,oo,oo,ro,0,eo.length,no),no}function trivialOrder(eo){return[new BidiSpan(0,eo,0)]}let movedOver="";function moveVisually(eo,to,ro,no,oo){var io;let so=no.head-eo.from,ao=BidiSpan.find(to,so,(io=no.bidiLevel)!==null&&io!==void 0?io:-1,no.assoc),lo=to[ao],uo=lo.side(oo,ro);if(so==uo){let ho=ao+=oo?1:-1;if(ho<0||ho>=to.length)return null;lo=to[ao=ho],so=lo.side(!oo,ro),uo=lo.side(oo,ro)}let co=findClusterBreak(eo.text,so,lo.forward(oo,ro));(colo.to)&&(co=uo),movedOver=eo.text.slice(Math.min(so,co),Math.max(so,co));let fo=ao==(oo?to.length-1:0)?null:to[ao+(oo?1:-1)];return fo&&co==uo&&fo.level+(oo?0:1)eo.some(to=>to)}),nativeSelectionHidden=Facet.define({combine:eo=>eo.some(to=>to)}),scrollHandler=Facet.define();class ScrollTarget{constructor(to,ro="nearest",no="nearest",oo=5,io=5,so=!1){this.range=to,this.y=ro,this.x=no,this.yMargin=oo,this.xMargin=io,this.isSnapshot=so}map(to){return to.empty?this:new ScrollTarget(this.range.map(to),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(to){return this.range.to<=to.doc.length?this:new ScrollTarget(EditorSelection.cursor(to.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const scrollIntoView$1=StateEffect.define({map:(eo,to)=>eo.map(to)});function logException(eo,to,ro){let no=eo.facet(exceptionSink);no.length?no[0](to):window.onerror?window.onerror(String(to),ro,void 0,void 0,to):ro?console.error(ro+":",to):console.error(to)}const editable=Facet.define({combine:eo=>eo.length?eo[0]:!0});let nextPluginID=0;const viewPlugin=Facet.define();class ViewPlugin{constructor(to,ro,no,oo,io){this.id=to,this.create=ro,this.domEventHandlers=no,this.domEventObservers=oo,this.extension=io(this)}static define(to,ro){const{eventHandlers:no,eventObservers:oo,provide:io,decorations:so}=ro||{};return new ViewPlugin(nextPluginID++,to,no,oo,ao=>{let lo=[viewPlugin.of(ao)];return so&&lo.push(decorations.of(uo=>{let co=uo.plugin(ao);return co?so(co):Decoration.none})),io&&lo.push(io(ao)),lo})}static fromClass(to,ro){return ViewPlugin.define(no=>new to(no),ro)}}class PluginInstance{constructor(to){this.spec=to,this.mustUpdate=null,this.value=null}update(to){if(this.value){if(this.mustUpdate){let ro=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(ro)}catch(no){if(logException(ro.state,no,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(to)}catch(ro){logException(to.state,ro,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(to){var ro;if(!((ro=this.value)===null||ro===void 0)&&ro.destroy)try{this.value.destroy()}catch(no){logException(to.state,no,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const editorAttributes=Facet.define(),contentAttributes=Facet.define(),decorations=Facet.define(),outerDecorations=Facet.define(),atomicRanges=Facet.define(),bidiIsolatedRanges=Facet.define();function getIsolatedRanges(eo,to){let ro=eo.state.facet(bidiIsolatedRanges);if(!ro.length)return ro;let no=ro.map(io=>io instanceof Function?io(eo):io),oo=[];return RangeSet.spans(no,to.from,to.to,{point(){},span(io,so,ao,lo){let uo=io-to.from,co=so-to.from,fo=oo;for(let ho=ao.length-1;ho>=0;ho--,lo--){let po=ao[ho].spec.bidiIsolate,go;if(po==null&&(po=autoDirection(to.text,uo,co)),lo>0&&fo.length&&(go=fo[fo.length-1]).to==uo&&go.direction==po)go.to=co,fo=go.inner;else{let vo={from:uo,to:co,direction:po,inner:[]};fo.push(vo),fo=vo.inner}}}}),oo}const scrollMargins=Facet.define();function getScrollMargins(eo){let to=0,ro=0,no=0,oo=0;for(let io of eo.state.facet(scrollMargins)){let so=io(eo);so&&(so.left!=null&&(to=Math.max(to,so.left)),so.right!=null&&(ro=Math.max(ro,so.right)),so.top!=null&&(no=Math.max(no,so.top)),so.bottom!=null&&(oo=Math.max(oo,so.bottom)))}return{left:to,right:ro,top:no,bottom:oo}}const styleModule=Facet.define();class ChangedRange{constructor(to,ro,no,oo){this.fromA=to,this.toA=ro,this.fromB=no,this.toB=oo}join(to){return new ChangedRange(Math.min(this.fromA,to.fromA),Math.max(this.toA,to.toA),Math.min(this.fromB,to.fromB),Math.max(this.toB,to.toB))}addToSet(to){let ro=to.length,no=this;for(;ro>0;ro--){let oo=to[ro-1];if(!(oo.fromA>no.toA)){if(oo.toAco)break;io+=2}if(!lo)return no;new ChangedRange(lo.fromA,lo.toA,lo.fromB,lo.toB).addToSet(no),so=lo.toA,ao=lo.toB}}}class ViewUpdate{constructor(to,ro,no){this.view=to,this.state=ro,this.transactions=no,this.flags=0,this.startState=to.state,this.changes=ChangeSet.empty(this.startState.doc.length);for(let io of no)this.changes=this.changes.compose(io.changes);let oo=[];this.changes.iterChangedRanges((io,so,ao,lo)=>oo.push(new ChangedRange(io,so,ao,lo))),this.changedRanges=oo}static create(to,ro,no){return new ViewUpdate(to,ro,no)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(to=>to.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class DocView extends ContentView{get length(){return this.view.state.doc.length}constructor(to){super(),this.view=to,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.compositionBarrier=Decoration.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(to.contentDOM),this.children=[new LineView],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ChangedRange(0,0,0,to.state.doc.length)],0,null)}update(to){var ro;let no=to.changedRanges;this.minWidth>0&&no.length&&(no.every(({fromA:uo,toA:co})=>cothis.minWidthTo)?(this.minWidthFrom=to.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=to.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let oo=-1;this.view.inputState.composing>=0&&(!((ro=this.domChanged)===null||ro===void 0)&&ro.newSel?oo=this.domChanged.newSel.head:!touchesComposition(to.changes,this.hasComposition)&&!to.selectionSet&&(oo=to.state.selection.main.head));let io=oo>-1?findCompositionRange(this.view,to.changes,oo):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:uo,to:co}=this.hasComposition;no=new ChangedRange(uo,co,to.changes.mapPos(uo,-1),to.changes.mapPos(co,1)).addToSet(no.slice())}this.hasComposition=io?{from:io.range.fromB,to:io.range.toB}:null,(browser.ie||browser.chrome)&&!io&&to&&to.state.doc.lines!=to.startState.doc.lines&&(this.forceSelection=!0);let so=this.decorations,ao=this.updateDeco(),lo=findChangedDeco(so,ao,to.changes);return no=ChangedRange.extendWithRanges(no,lo),!(this.flags&7)&&no.length==0?!1:(this.updateInner(no,to.startState.doc.length,io),to.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(to,ro,no){this.view.viewState.mustMeasureContent=!0,this.updateChildren(to,ro,no);let{observer:oo}=this.view;oo.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let so=browser.chrome||browser.ios?{node:oo.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,so),this.flags&=-8,so&&(so.written||oo.selectionRange.focusNode!=so.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(so=>so.flags&=-9);let io=[];if(this.view.viewport.from||this.view.viewport.to=0?oo[so]:null;if(!ao)break;let{fromA:lo,toA:uo,fromB:co,toB:fo}=ao,ho,po,go,vo;if(no&&no.range.fromBco){let So=ContentBuilder.build(this.view.state.doc,co,no.range.fromB,this.decorations,this.dynamicDecorationMap),To=ContentBuilder.build(this.view.state.doc,no.range.toB,fo,this.decorations,this.dynamicDecorationMap);po=So.breakAtStart,go=So.openStart,vo=To.openEnd;let wo=this.compositionView(no);To.breakAtStart?wo.breakAfter=1:To.content.length&&wo.merge(wo.length,wo.length,To.content[0],!1,To.openStart,0)&&(wo.breakAfter=To.content[0].breakAfter,To.content.shift()),So.content.length&&wo.merge(0,0,So.content[So.content.length-1],!0,0,So.openEnd)&&So.content.pop(),ho=So.content.concat(wo).concat(To.content)}else({content:ho,breakAtStart:po,openStart:go,openEnd:vo}=ContentBuilder.build(this.view.state.doc,co,fo,this.decorations,this.dynamicDecorationMap));let{i:bo,off:xo}=io.findPos(uo,1),{i:_o,off:Eo}=io.findPos(lo,-1);replaceRange(this,_o,Eo,bo,xo,ho,po,go,vo)}no&&this.fixCompositionDOM(no)}compositionView(to){let ro=new TextView(to.text.nodeValue);ro.flags|=8;for(let{deco:oo}of to.marks)ro=new MarkView(oo,[ro],ro.length);let no=new LineView;return no.append(ro,0),no}fixCompositionDOM(to){let ro=(io,so)=>{so.flags|=8|(so.children.some(lo=>lo.flags&7)?1:0),this.markedForComposition.add(so);let ao=ContentView.get(io);ao&&ao!=so&&(ao.dom=null),so.setDOM(io)},no=this.childPos(to.range.fromB,1),oo=this.children[no.i];ro(to.line,oo);for(let io=to.marks.length-1;io>=-1;io--)no=oo.childPos(no.off,1),oo=oo.children[no.i],ro(io>=0?to.marks[io].node:to.text,oo)}updateSelection(to=!1,ro=!1){(to||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let no=this.view.root.activeElement,oo=no==this.dom,io=!oo&&hasSelection(this.dom,this.view.observer.selectionRange)&&!(no&&this.dom.contains(no));if(!(oo||ro||io))return;let so=this.forceSelection;this.forceSelection=!1;let ao=this.view.state.selection.main,lo=this.moveToLine(this.domAtPos(ao.anchor)),uo=ao.empty?lo:this.moveToLine(this.domAtPos(ao.head));if(browser.gecko&&ao.empty&&!this.hasComposition&&betweenUneditable(lo)){let fo=document.createTextNode("");this.view.observer.ignore(()=>lo.node.insertBefore(fo,lo.node.childNodes[lo.offset]||null)),lo=uo=new DOMPos(fo,0),so=!0}let co=this.view.observer.selectionRange;(so||!co.focusNode||(!isEquivalentPosition(lo.node,lo.offset,co.anchorNode,co.anchorOffset)||!isEquivalentPosition(uo.node,uo.offset,co.focusNode,co.focusOffset))&&!this.suppressWidgetCursorChange(co,ao))&&(this.view.observer.ignore(()=>{browser.android&&browser.chrome&&this.dom.contains(co.focusNode)&&inUneditable(co.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let fo=getSelection(this.view.root);if(fo)if(ao.empty){if(browser.gecko){let ho=nextToUneditable(lo.node,lo.offset);if(ho&&ho!=3){let po=(ho==1?textNodeBefore:textNodeAfter)(lo.node,lo.offset);po&&(lo=new DOMPos(po.node,po.offset))}}fo.collapse(lo.node,lo.offset),ao.bidiLevel!=null&&fo.caretBidiLevel!==void 0&&(fo.caretBidiLevel=ao.bidiLevel)}else if(fo.extend){fo.collapse(lo.node,lo.offset);try{fo.extend(uo.node,uo.offset)}catch{}}else{let ho=document.createRange();ao.anchor>ao.head&&([lo,uo]=[uo,lo]),ho.setEnd(uo.node,uo.offset),ho.setStart(lo.node,lo.offset),fo.removeAllRanges(),fo.addRange(ho)}io&&this.view.root.activeElement==this.dom&&(this.dom.blur(),no&&no.focus())}),this.view.observer.setSelectionRange(lo,uo)),this.impreciseAnchor=lo.precise?null:new DOMPos(co.anchorNode,co.anchorOffset),this.impreciseHead=uo.precise?null:new DOMPos(co.focusNode,co.focusOffset)}suppressWidgetCursorChange(to,ro){return this.hasComposition&&ro.empty&&!this.compositionBarrier.size&&isEquivalentPosition(to.focusNode,to.focusOffset,to.anchorNode,to.anchorOffset)&&this.posFromDOM(to.focusNode,to.focusOffset)==ro.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:to}=this,ro=to.state.selection.main,no=getSelection(to.root),{anchorNode:oo,anchorOffset:io}=to.observer.selectionRange;if(!no||!ro.empty||!ro.assoc||!no.modify)return;let so=LineView.find(this,ro.head);if(!so)return;let ao=so.posAtStart;if(ro.head==ao||ro.head==ao+so.length)return;let lo=this.coordsAt(ro.head,-1),uo=this.coordsAt(ro.head,1);if(!lo||!uo||lo.bottom>uo.top)return;let co=this.domAtPos(ro.head+ro.assoc);no.collapse(co.node,co.offset),no.modify("move",ro.assoc<0?"forward":"backward","lineboundary"),to.observer.readSelectionRange();let fo=to.observer.selectionRange;to.docView.posFromDOM(fo.anchorNode,fo.anchorOffset)!=ro.from&&no.collapse(oo,io)}moveToLine(to){let ro=this.dom,no;if(to.node!=ro)return to;for(let oo=to.offset;!no&&oo=0;oo--){let io=ContentView.get(ro.childNodes[oo]);io instanceof LineView&&(no=io.domAtPos(io.length))}return no?new DOMPos(no.node,no.offset,!0):to}nearest(to){for(let ro=to;ro;){let no=ContentView.get(ro);if(no&&no.rootView==this)return no;ro=ro.parentNode}return null}posFromDOM(to,ro){let no=this.nearest(to);if(!no)throw new RangeError("Trying to find position for a DOM position outside of the document");return no.localPosFromDOM(to,ro)+no.posAtStart}domAtPos(to){let{i:ro,off:no}=this.childCursor().findPos(to,-1);for(;ro=0;so--){let ao=this.children[so],lo=io-ao.breakAfter,uo=lo-ao.length;if(loto||ao.covers(1))&&(!no||ao instanceof LineView&&!(no instanceof LineView&&ro>=0))&&(no=ao,oo=uo),io=uo}return no?no.coordsAt(to-oo,ro):null}coordsForChar(to){let{i:ro,off:no}=this.childPos(to,1),oo=this.children[ro];if(!(oo instanceof LineView))return null;for(;oo.children.length;){let{i:ao,off:lo}=oo.childPos(no,1);for(;;ao++){if(ao==oo.children.length)return null;if((oo=oo.children[ao]).length)break}no=lo}if(!(oo instanceof TextView))return null;let io=findClusterBreak(oo.text,no);if(io==no)return null;let so=textRange(oo.dom,no,io).getClientRects();for(let ao=0;aoMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,ao=-1,lo=this.view.textDirection==Direction.LTR;for(let uo=0,co=0;cooo)break;if(uo>=no){let po=fo.dom.getBoundingClientRect();if(ro.push(po.height),so){let go=fo.dom.lastChild,vo=go?clientRectsFor(go):[];if(vo.length){let bo=vo[vo.length-1],xo=lo?bo.right-po.left:po.right-bo.left;xo>ao&&(ao=xo,this.minWidth=io,this.minWidthFrom=uo,this.minWidthTo=ho)}}}uo=ho+fo.breakAfter}return ro}textDirectionAt(to){let{i:ro}=this.childPos(to,1);return getComputedStyle(this.children[ro].dom).direction=="rtl"?Direction.RTL:Direction.LTR}measureTextSize(){for(let io of this.children)if(io instanceof LineView){let so=io.measureTextSize();if(so)return so}let to=document.createElement("div"),ro,no,oo;return to.className="cm-line",to.style.width="99999px",to.style.position="absolute",to.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(to);let io=clientRectsFor(to.firstChild)[0];ro=to.getBoundingClientRect().height,no=io?io.width/27:7,oo=io?io.height:ro,to.remove()}),{lineHeight:ro,charWidth:no,textHeight:oo}}childCursor(to=this.length){let ro=this.children.length;return ro&&(to-=this.children[--ro].length),new ChildCursor(this.children,to,ro)}computeBlockGapDeco(){let to=[],ro=this.view.viewState;for(let no=0,oo=0;;oo++){let io=oo==ro.viewports.length?null:ro.viewports[oo],so=io?io.from-1:this.length;if(so>no){let ao=(ro.lineBlockAt(so).bottom-ro.lineBlockAt(no).top)/this.view.scaleY;to.push(Decoration.replace({widget:new BlockGapWidget(ao),block:!0,inclusive:!0,isBlockGap:!0}).range(no,so))}if(!io)break;no=io.to+1}return Decoration.set(to)}updateDeco(){let to=1,ro=this.view.state.facet(decorations).map(io=>(this.dynamicDecorationMap[to++]=typeof io=="function")?io(this.view):io),no=!1,oo=this.view.state.facet(outerDecorations).map((io,so)=>{let ao=typeof io=="function";return ao&&(no=!0),ao?io(this.view):io});for(oo.length&&(this.dynamicDecorationMap[to++]=no,ro.push(RangeSet.join(oo))),this.decorations=[this.compositionBarrier,...ro,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];to{ao.point?no=!1:ao.endSide<0&&ioro.anchor?-1:1),oo;if(!no)return;!ro.empty&&(oo=this.coordsAt(ro.anchor,ro.anchor>ro.head?-1:1))&&(no={left:Math.min(no.left,oo.left),top:Math.min(no.top,oo.top),right:Math.max(no.right,oo.right),bottom:Math.max(no.bottom,oo.bottom)});let io=getScrollMargins(this.view),so={left:no.left-io.left,top:no.top-io.top,right:no.right+io.right,bottom:no.bottom+io.bottom},{offsetWidth:ao,offsetHeight:lo}=this.view.scrollDOM;scrollRectIntoView(this.view.scrollDOM,so,ro.head{noto.from&&(ro=!0)}),ro}function groupAt(eo,to,ro=1){let no=eo.charCategorizer(to),oo=eo.doc.lineAt(to),io=to-oo.from;if(oo.length==0)return EditorSelection.cursor(to);io==0?ro=1:io==oo.length&&(ro=-1);let so=io,ao=io;ro<0?so=findClusterBreak(oo.text,io,!1):ao=findClusterBreak(oo.text,io);let lo=no(oo.text.slice(so,ao));for(;so>0;){let uo=findClusterBreak(oo.text,so,!1);if(no(oo.text.slice(uo,so))!=lo)break;so=uo}for(;aoeo?to.left-eo:Math.max(0,eo-to.right)}function getdy(eo,to){return to.top>eo?to.top-eo:Math.max(0,eo-to.bottom)}function yOverlap(eo,to){return eo.topto.top+1}function upTop(eo,to){return toeo.bottom?{top:eo.top,left:eo.left,right:eo.right,bottom:to}:eo}function domPosAtCoords(eo,to,ro){let no,oo,io,so,ao=!1,lo,uo,co,fo;for(let go=eo.firstChild;go;go=go.nextSibling){let vo=clientRectsFor(go);for(let bo=0;boEo||so==Eo&&io>_o){no=go,oo=xo,io=_o,so=Eo;let So=Eo?ro0?bo0)}_o==0?ro>xo.bottom&&(!co||co.bottomxo.top)&&(uo=go,fo=xo):co&&yOverlap(co,xo)?co=upBot(co,xo.bottom):fo&&yOverlap(fo,xo)&&(fo=upTop(fo,xo.top))}}if(co&&co.bottom>=ro?(no=lo,oo=co):fo&&fo.top<=ro&&(no=uo,oo=fo),!no)return{node:eo,offset:0};let ho=Math.max(oo.left,Math.min(oo.right,to));if(no.nodeType==3)return domPosInText(no,ho,ro);if(ao&&no.contentEditable!="false")return domPosAtCoords(no,ho,ro);let po=Array.prototype.indexOf.call(eo.childNodes,no)+(to>=(oo.left+oo.right)/2?1:0);return{node:eo,offset:po}}function domPosInText(eo,to,ro){let no=eo.nodeValue.length,oo=-1,io=1e9,so=0;for(let ao=0;aoro?co.top-ro:ro-co.bottom)-1;if(co.left-1<=to&&co.right+1>=to&&fo=(co.left+co.right)/2,po=ho;if((browser.chrome||browser.gecko)&&textRange(eo,ao).getBoundingClientRect().left==co.right&&(po=!ho),fo<=0)return{node:eo,offset:ao+(po?1:0)};oo=ao+(po?1:0),io=fo}}}return{node:eo,offset:oo>-1?oo:so>0?eo.nodeValue.length:0}}function posAtCoords(eo,to,ro,no=-1){var oo,io;let so=eo.contentDOM.getBoundingClientRect(),ao=so.top+eo.viewState.paddingTop,lo,{docHeight:uo}=eo.viewState,{x:co,y:fo}=to,ho=fo-ao;if(ho<0)return 0;if(ho>uo)return eo.state.doc.length;for(let So=eo.viewState.heightOracle.textHeight/2,To=!1;lo=eo.elementAtHeight(ho),lo.type!=BlockType.Text;)for(;ho=no>0?lo.bottom+So:lo.top-So,!(ho>=0&&ho<=uo);){if(To)return ro?null:0;To=!0,no=-no}fo=ao+ho;let po=lo.from;if(poeo.viewport.to)return eo.viewport.to==eo.state.doc.length?eo.state.doc.length:ro?null:posAtCoordsImprecise(eo,so,lo,co,fo);let go=eo.dom.ownerDocument,vo=eo.root.elementFromPoint?eo.root:go,bo=vo.elementFromPoint(co,fo);bo&&!eo.contentDOM.contains(bo)&&(bo=null),bo||(co=Math.max(so.left+1,Math.min(so.right-1,co)),bo=vo.elementFromPoint(co,fo),bo&&!eo.contentDOM.contains(bo)&&(bo=null));let xo,_o=-1;if(bo&&((oo=eo.docView.nearest(bo))===null||oo===void 0?void 0:oo.isEditable)!=!1){if(go.caretPositionFromPoint){let So=go.caretPositionFromPoint(co,fo);So&&({offsetNode:xo,offset:_o}=So)}else if(go.caretRangeFromPoint){let So=go.caretRangeFromPoint(co,fo);So&&({startContainer:xo,startOffset:_o}=So,(!eo.contentDOM.contains(xo)||browser.safari&&isSuspiciousSafariCaretResult(xo,_o,co)||browser.chrome&&isSuspiciousChromeCaretResult(xo,_o,co))&&(xo=void 0))}}if(!xo||!eo.docView.dom.contains(xo)){let So=LineView.find(eo.docView,po);if(!So)return ho>lo.top+lo.height/2?lo.to:lo.from;({node:xo,offset:_o}=domPosAtCoords(So.dom,co,fo))}let Eo=eo.docView.nearest(xo);if(!Eo)return null;if(Eo.isWidget&&((io=Eo.dom)===null||io===void 0?void 0:io.nodeType)==1){let So=Eo.dom.getBoundingClientRect();return to.yeo.defaultLineHeight*1.5){let ao=eo.viewState.heightOracle.textHeight,lo=Math.floor((oo-ro.top-(eo.defaultLineHeight-ao)*.5)/ao);io+=lo*eo.viewState.heightOracle.lineLength}let so=eo.state.sliceDoc(ro.from,ro.to);return ro.from+findColumn(so,io,eo.state.tabSize)}function isSuspiciousSafariCaretResult(eo,to,ro){let no;if(eo.nodeType!=3||to!=(no=eo.nodeValue.length))return!1;for(let oo=eo.nextSibling;oo;oo=oo.nextSibling)if(oo.nodeType!=1||oo.nodeName!="BR")return!1;return textRange(eo,no-1,no).getBoundingClientRect().left>ro}function isSuspiciousChromeCaretResult(eo,to,ro){if(to!=0)return!1;for(let oo=eo;;){let io=oo.parentNode;if(!io||io.nodeType!=1||io.firstChild!=oo)return!1;if(io.classList.contains("cm-line"))break;oo=io}let no=eo.nodeType==1?eo.getBoundingClientRect():textRange(eo,0,Math.max(eo.nodeValue.length,1)).getBoundingClientRect();return ro-no.left>5}function blockAt(eo,to){let ro=eo.lineBlockAt(to);if(Array.isArray(ro.type)){for(let no of ro.type)if(no.to>to||no.to==to&&(no.to==ro.to||no.type==BlockType.Text))return no}return ro}function moveToLineBoundary(eo,to,ro,no){let oo=blockAt(eo,to.head),io=!no||oo.type!=BlockType.Text||!(eo.lineWrapping||oo.widgetLineBreaks)?null:eo.coordsAtPos(to.assoc<0&&to.head>oo.from?to.head-1:to.head);if(io){let so=eo.dom.getBoundingClientRect(),ao=eo.textDirectionAt(oo.from),lo=eo.posAtCoords({x:ro==(ao==Direction.LTR)?so.right-1:so.left+1,y:(io.top+io.bottom)/2});if(lo!=null)return EditorSelection.cursor(lo,ro?-1:1)}return EditorSelection.cursor(ro?oo.to:oo.from,ro?-1:1)}function moveByChar(eo,to,ro,no){let oo=eo.state.doc.lineAt(to.head),io=eo.bidiSpans(oo),so=eo.textDirectionAt(oo.from);for(let ao=to,lo=null;;){let uo=moveVisually(oo,io,so,ao,ro),co=movedOver;if(!uo){if(oo.number==(ro?eo.state.doc.lines:1))return ao;co=` +`,oo=eo.state.doc.line(oo.number+(ro?1:-1)),io=eo.bidiSpans(oo),uo=eo.visualLineSide(oo,!ro)}if(lo){if(!lo(co))return ao}else{if(!no)return uo;lo=no(co)}ao=uo}}function byGroup(eo,to,ro){let no=eo.state.charCategorizer(to),oo=no(ro);return io=>{let so=no(io);return oo==CharCategory.Space&&(oo=so),oo==so}}function moveVertically(eo,to,ro,no){let oo=to.head,io=ro?1:-1;if(oo==(ro?eo.state.doc.length:0))return EditorSelection.cursor(oo,to.assoc);let so=to.goalColumn,ao,lo=eo.contentDOM.getBoundingClientRect(),uo=eo.coordsAtPos(oo,to.assoc||-1),co=eo.documentTop;if(uo)so==null&&(so=uo.left-lo.left),ao=io<0?uo.top:uo.bottom;else{let po=eo.viewState.lineBlockAt(oo);so==null&&(so=Math.min(lo.right-lo.left,eo.defaultCharacterWidth*(oo-po.from))),ao=(io<0?po.top:po.bottom)+co}let fo=lo.left+so,ho=no??eo.viewState.heightOracle.textHeight>>1;for(let po=0;;po+=10){let go=ao+(ho+po)*io,vo=posAtCoords(eo,{x:fo,y:go},!1,io);if(golo.bottom||(io<0?vooo)){let bo=eo.docView.coordsForChar(vo),xo=!bo||go{if(to>io&&tooo(eo)),ro.from,to.head>ro.from?-1:1);return no==ro.from?ro:EditorSelection.cursor(no,nonull),browser.gecko&&firefoxCopyCutHack(to.contentDOM.ownerDocument)}handleEvent(to){!eventBelongsToEditor(this.view,to)||this.ignoreDuringComposition(to)||to.type=="keydown"&&this.keydown(to)||this.runHandlers(to.type,to)}runHandlers(to,ro){let no=this.handlers[to];if(no){for(let oo of no.observers)oo(this.view,ro);for(let oo of no.handlers){if(ro.defaultPrevented)break;if(oo(this.view,ro)){ro.preventDefault();break}}}}ensureHandlers(to){let ro=computeHandlers(to),no=this.handlers,oo=this.view.contentDOM;for(let io in ro)if(io!="scroll"){let so=!ro[io].handlers.length,ao=no[io];ao&&so!=!ao.handlers.length&&(oo.removeEventListener(io,this.handleEvent),ao=null),ao||oo.addEventListener(io,this.handleEvent,{passive:so})}for(let io in no)io!="scroll"&&!ro[io]&&oo.removeEventListener(io,this.handleEvent);this.handlers=ro}keydown(to){if(this.lastKeyCode=to.keyCode,this.lastKeyTime=Date.now(),to.keyCode==9&&Date.now()no.keyCode==to.keyCode))&&!to.ctrlKey||EmacsyPendingKeys.indexOf(to.key)>-1&&to.ctrlKey&&!to.shiftKey)?(this.pendingIOSKey=ro||to,setTimeout(()=>this.flushIOSKey(),250),!0):(to.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(to){let ro=this.pendingIOSKey;return!ro||ro.key=="Enter"&&to&&to.from0?!0:browser.safari&&!browser.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(to){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=to}update(to){this.mouseSelection&&this.mouseSelection.update(to),this.draggedContent&&to.docChanged&&(this.draggedContent=this.draggedContent.map(to.changes)),to.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function bindHandler(eo,to){return(ro,no)=>{try{return to.call(eo,no,ro)}catch(oo){logException(ro.state,oo)}}}function computeHandlers(eo){let to=Object.create(null);function ro(no){return to[no]||(to[no]={observers:[],handlers:[]})}for(let no of eo){let oo=no.spec;if(oo&&oo.domEventHandlers)for(let io in oo.domEventHandlers){let so=oo.domEventHandlers[io];so&&ro(io).handlers.push(bindHandler(no.value,so))}if(oo&&oo.domEventObservers)for(let io in oo.domEventObservers){let so=oo.domEventObservers[io];so&&ro(io).observers.push(bindHandler(no.value,so))}}for(let no in handlers)ro(no).handlers.push(handlers[no]);for(let no in observers)ro(no).observers.push(observers[no]);return to}const PendingKeys=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],EmacsyPendingKeys="dthko",modifierCodes=[16,17,18,20,91,92,224,225],dragScrollMargin=6;function dragScrollSpeed(eo){return Math.max(0,eo)*.7+8}function dist(eo,to){return Math.max(Math.abs(eo.clientX-to.clientX),Math.abs(eo.clientY-to.clientY))}class MouseSelection{constructor(to,ro,no,oo){this.view=to,this.startEvent=ro,this.style=no,this.mustSelect=oo,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=ro,this.scrollParent=scrollableParent(to.contentDOM),this.atoms=to.state.facet(atomicRanges).map(so=>so(to));let io=to.contentDOM.ownerDocument;io.addEventListener("mousemove",this.move=this.move.bind(this)),io.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=ro.shiftKey,this.multiple=to.state.facet(EditorState.allowMultipleSelections)&&addsSelectionRange(to,ro),this.dragging=isInPrimarySelection(to,ro)&&getClickType(ro)==1?null:!1}start(to){this.dragging===!1&&this.select(to)}move(to){var ro;if(to.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&dist(this.startEvent,to)<10)return;this.select(this.lastEvent=to);let no=0,oo=0,io=((ro=this.scrollParent)===null||ro===void 0?void 0:ro.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},so=getScrollMargins(this.view);to.clientX-so.left<=io.left+dragScrollMargin?no=-dragScrollSpeed(io.left-to.clientX):to.clientX+so.right>=io.right-dragScrollMargin&&(no=dragScrollSpeed(to.clientX-io.right)),to.clientY-so.top<=io.top+dragScrollMargin?oo=-dragScrollSpeed(io.top-to.clientY):to.clientY+so.bottom>=io.bottom-dragScrollMargin&&(oo=dragScrollSpeed(to.clientY-io.bottom)),this.setScrollSpeed(no,oo)}up(to){this.dragging==null&&this.select(this.lastEvent),this.dragging||to.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let to=this.view.contentDOM.ownerDocument;to.removeEventListener("mousemove",this.move),to.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(to,ro){this.scrollSpeed={x:to,y:ro},to||ro?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(to){let ro=null;for(let no=0;nothis.select(this.lastEvent),20)}}function addsSelectionRange(eo,to){let ro=eo.state.facet(clickAddsSelectionRange);return ro.length?ro[0](to):browser.mac?to.metaKey:to.ctrlKey}function dragMovesSelection(eo,to){let ro=eo.state.facet(dragMovesSelection$1);return ro.length?ro[0](to):browser.mac?!to.altKey:!to.ctrlKey}function isInPrimarySelection(eo,to){let{main:ro}=eo.state.selection;if(ro.empty)return!1;let no=getSelection(eo.root);if(!no||no.rangeCount==0)return!0;let oo=no.getRangeAt(0).getClientRects();for(let io=0;io=to.clientX&&so.top<=to.clientY&&so.bottom>=to.clientY)return!0}return!1}function eventBelongsToEditor(eo,to){if(!to.bubbles)return!0;if(to.defaultPrevented)return!1;for(let ro=to.target,no;ro!=eo.contentDOM;ro=ro.parentNode)if(!ro||ro.nodeType==11||(no=ContentView.get(ro))&&no.ignoreEvent(to))return!1;return!0}const handlers=Object.create(null),observers=Object.create(null),brokenClipboardAPI=browser.ie&&browser.ie_version<15||browser.ios&&browser.webkit_version<604;function capturePaste(eo){let to=eo.dom.parentNode;if(!to)return;let ro=to.appendChild(document.createElement("textarea"));ro.style.cssText="position: fixed; left: -10000px; top: 10px",ro.focus(),setTimeout(()=>{eo.focus(),ro.remove(),doPaste(eo,ro.value)},50)}function doPaste(eo,to){let{state:ro}=eo,no,oo=1,io=ro.toText(to),so=io.lines==ro.selection.ranges.length;if(lastLinewiseCopy!=null&&ro.selection.ranges.every(lo=>lo.empty)&&lastLinewiseCopy==io.toString()){let lo=-1;no=ro.changeByRange(uo=>{let co=ro.doc.lineAt(uo.from);if(co.from==lo)return{range:uo};lo=co.from;let fo=ro.toText((so?io.line(oo++).text:to)+ro.lineBreak);return{changes:{from:co.from,insert:fo},range:EditorSelection.cursor(uo.from+fo.length)}})}else so?no=ro.changeByRange(lo=>{let uo=io.line(oo++);return{changes:{from:lo.from,to:lo.to,insert:uo.text},range:EditorSelection.cursor(lo.from+uo.length)}}):no=ro.replaceSelection(io);eo.dispatch(no,{userEvent:"input.paste",scrollIntoView:!0})}observers.scroll=eo=>{eo.inputState.lastScrollTop=eo.scrollDOM.scrollTop,eo.inputState.lastScrollLeft=eo.scrollDOM.scrollLeft};handlers.keydown=(eo,to)=>(eo.inputState.setSelectionOrigin("select"),to.keyCode==27&&(eo.inputState.lastEscPress=Date.now()),!1);observers.touchstart=(eo,to)=>{eo.inputState.lastTouchTime=Date.now(),eo.inputState.setSelectionOrigin("select.pointer")};observers.touchmove=eo=>{eo.inputState.setSelectionOrigin("select.pointer")};handlers.mousedown=(eo,to)=>{if(eo.observer.flush(),eo.inputState.lastTouchTime>Date.now()-2e3)return!1;let ro=null;for(let no of eo.state.facet(mouseSelectionStyle))if(ro=no(eo,to),ro)break;if(!ro&&to.button==0&&(ro=basicMouseSelection(eo,to)),ro){let no=!eo.hasFocus;eo.inputState.startMouseSelection(new MouseSelection(eo,to,ro,no)),no&&eo.observer.ignore(()=>focusPreventScroll(eo.contentDOM));let oo=eo.inputState.mouseSelection;if(oo)return oo.start(to),oo.dragging===!1}return!1};function rangeForClick(eo,to,ro,no){if(no==1)return EditorSelection.cursor(to,ro);if(no==2)return groupAt(eo.state,to,ro);{let oo=LineView.find(eo.docView,to),io=eo.state.doc.lineAt(oo?oo.posAtEnd:to),so=oo?oo.posAtStart:io.from,ao=oo?oo.posAtEnd:io.to;return aoeo>=to.top&&eo<=to.bottom,inside=(eo,to,ro)=>insideY(to,ro)&&eo>=ro.left&&eo<=ro.right;function findPositionSide(eo,to,ro,no){let oo=LineView.find(eo.docView,to);if(!oo)return 1;let io=to-oo.posAtStart;if(io==0)return 1;if(io==oo.length)return-1;let so=oo.coordsAt(io,-1);if(so&&inside(ro,no,so))return-1;let ao=oo.coordsAt(io,1);return ao&&inside(ro,no,ao)?1:so&&insideY(no,so)?-1:1}function queryPos(eo,to){let ro=eo.posAtCoords({x:to.clientX,y:to.clientY},!1);return{pos:ro,bias:findPositionSide(eo,ro,to.clientX,to.clientY)}}const BadMouseDetail=browser.ie&&browser.ie_version<=11;let lastMouseDown=null,lastMouseDownCount=0,lastMouseDownTime=0;function getClickType(eo){if(!BadMouseDetail)return eo.detail;let to=lastMouseDown,ro=lastMouseDownTime;return lastMouseDown=eo,lastMouseDownTime=Date.now(),lastMouseDownCount=!to||ro>Date.now()-400&&Math.abs(to.clientX-eo.clientX)<2&&Math.abs(to.clientY-eo.clientY)<2?(lastMouseDownCount+1)%3:1}function basicMouseSelection(eo,to){let ro=queryPos(eo,to),no=getClickType(to),oo=eo.state.selection;return{update(io){io.docChanged&&(ro.pos=io.changes.mapPos(ro.pos),oo=oo.map(io.changes))},get(io,so,ao){let lo=queryPos(eo,io),uo,co=rangeForClick(eo,lo.pos,lo.bias,no);if(ro.pos!=lo.pos&&!so){let fo=rangeForClick(eo,ro.pos,ro.bias,no),ho=Math.min(fo.from,co.from),po=Math.max(fo.to,co.to);co=ho1&&(uo=removeRangeAround(oo,lo.pos))?uo:ao?oo.addRange(co):EditorSelection.create([co])}}}function removeRangeAround(eo,to){for(let ro=0;ro=to)return EditorSelection.create(eo.ranges.slice(0,ro).concat(eo.ranges.slice(ro+1)),eo.mainIndex==ro?0:eo.mainIndex-(eo.mainIndex>ro?1:0))}return null}handlers.dragstart=(eo,to)=>{let{selection:{main:ro}}=eo.state;if(to.target.draggable){let oo=eo.docView.nearest(to.target);if(oo&&oo.isWidget){let io=oo.posAtStart,so=io+oo.length;(io>=ro.to||so<=ro.from)&&(ro=EditorSelection.range(io,so))}}let{inputState:no}=eo;return no.mouseSelection&&(no.mouseSelection.dragging=!0),no.draggedContent=ro,to.dataTransfer&&(to.dataTransfer.setData("Text",eo.state.sliceDoc(ro.from,ro.to)),to.dataTransfer.effectAllowed="copyMove"),!1};handlers.dragend=eo=>(eo.inputState.draggedContent=null,!1);function dropText(eo,to,ro,no){if(!ro)return;let oo=eo.posAtCoords({x:to.clientX,y:to.clientY},!1),{draggedContent:io}=eo.inputState,so=no&&io&&dragMovesSelection(eo,to)?{from:io.from,to:io.to}:null,ao={from:oo,insert:ro},lo=eo.state.changes(so?[so,ao]:ao);eo.focus(),eo.dispatch({changes:lo,selection:{anchor:lo.mapPos(oo,-1),head:lo.mapPos(oo,1)},userEvent:so?"move.drop":"input.drop"}),eo.inputState.draggedContent=null}handlers.drop=(eo,to)=>{if(!to.dataTransfer)return!1;if(eo.state.readOnly)return!0;let ro=to.dataTransfer.files;if(ro&&ro.length){let no=Array(ro.length),oo=0,io=()=>{++oo==ro.length&&dropText(eo,to,no.filter(so=>so!=null).join(eo.state.lineBreak),!1)};for(let so=0;so{/[\x00-\x08\x0e-\x1f]{2}/.test(ao.result)||(no[so]=ao.result),io()},ao.readAsText(ro[so])}return!0}else{let no=to.dataTransfer.getData("Text");if(no)return dropText(eo,to,no,!0),!0}return!1};handlers.paste=(eo,to)=>{if(eo.state.readOnly)return!0;eo.observer.flush();let ro=brokenClipboardAPI?null:to.clipboardData;return ro?(doPaste(eo,ro.getData("text/plain")||ro.getData("text/uri-list")),!0):(capturePaste(eo),!1)};function captureCopy(eo,to){let ro=eo.dom.parentNode;if(!ro)return;let no=ro.appendChild(document.createElement("textarea"));no.style.cssText="position: fixed; left: -10000px; top: 10px",no.value=to,no.focus(),no.selectionEnd=to.length,no.selectionStart=0,setTimeout(()=>{no.remove(),eo.focus()},50)}function copiedRange(eo){let to=[],ro=[],no=!1;for(let oo of eo.selection.ranges)oo.empty||(to.push(eo.sliceDoc(oo.from,oo.to)),ro.push(oo));if(!to.length){let oo=-1;for(let{from:io}of eo.selection.ranges){let so=eo.doc.lineAt(io);so.number>oo&&(to.push(so.text),ro.push({from:so.from,to:Math.min(eo.doc.length,so.to+1)})),oo=so.number}no=!0}return{text:to.join(eo.lineBreak),ranges:ro,linewise:no}}let lastLinewiseCopy=null;handlers.copy=handlers.cut=(eo,to)=>{let{text:ro,ranges:no,linewise:oo}=copiedRange(eo.state);if(!ro&&!oo)return!1;lastLinewiseCopy=oo?ro:null,to.type=="cut"&&!eo.state.readOnly&&eo.dispatch({changes:no,scrollIntoView:!0,userEvent:"delete.cut"});let io=brokenClipboardAPI?null:to.clipboardData;return io?(io.clearData(),io.setData("text/plain",ro),!0):(captureCopy(eo,ro),!1)};const isFocusChange=Annotation.define();function focusChangeTransaction(eo,to){let ro=[];for(let no of eo.facet(focusChangeEffect)){let oo=no(eo,to);oo&&ro.push(oo)}return ro?eo.update({effects:ro,annotations:isFocusChange.of(!0)}):null}function updateForFocusChange(eo){setTimeout(()=>{let to=eo.hasFocus;if(to!=eo.inputState.notifiedFocused){let ro=focusChangeTransaction(eo.state,to);ro?eo.dispatch(ro):eo.update([])}},10)}observers.focus=eo=>{eo.inputState.lastFocusTime=Date.now(),!eo.scrollDOM.scrollTop&&(eo.inputState.lastScrollTop||eo.inputState.lastScrollLeft)&&(eo.scrollDOM.scrollTop=eo.inputState.lastScrollTop,eo.scrollDOM.scrollLeft=eo.inputState.lastScrollLeft),updateForFocusChange(eo)};observers.blur=eo=>{eo.observer.clearSelectionRange(),updateForFocusChange(eo)};observers.compositionstart=observers.compositionupdate=eo=>{eo.inputState.compositionFirstChange==null&&(eo.inputState.compositionFirstChange=!0),eo.inputState.composing<0&&(eo.inputState.composing=0,eo.docView.maybeCreateCompositionBarrier()&&(eo.update([]),eo.docView.clearCompositionBarrier()))};observers.compositionend=eo=>{eo.inputState.composing=-1,eo.inputState.compositionEndedAt=Date.now(),eo.inputState.compositionPendingKey=!0,eo.inputState.compositionPendingChange=eo.observer.pendingRecords().length>0,eo.inputState.compositionFirstChange=null,browser.chrome&&browser.android?eo.observer.flushSoon():eo.inputState.compositionPendingChange?Promise.resolve().then(()=>eo.observer.flush()):setTimeout(()=>{eo.inputState.composing<0&&eo.docView.hasComposition&&eo.update([])},50)};observers.contextmenu=eo=>{eo.inputState.lastContextMenu=Date.now()};handlers.beforeinput=(eo,to)=>{var ro;let no;if(browser.chrome&&browser.android&&(no=PendingKeys.find(oo=>oo.inputType==to.inputType))&&(eo.observer.delayAndroidKey(no.key,no.keyCode),no.key=="Backspace"||no.key=="Delete")){let oo=((ro=window.visualViewport)===null||ro===void 0?void 0:ro.height)||0;setTimeout(()=>{var io;(((io=window.visualViewport)===null||io===void 0?void 0:io.height)||0)>oo+10&&eo.hasFocus&&(eo.contentDOM.blur(),eo.focus())},100)}return browser.ios&&to.inputType=="deleteContentForward"&&eo.observer.flushSoon(),browser.safari&&to.inputType=="insertText"&&eo.inputState.composing>=0&&setTimeout(()=>observers.compositionend(eo,to),20),!1};const appliedFirefoxHack=new Set;function firefoxCopyCutHack(eo){appliedFirefoxHack.has(eo)||(appliedFirefoxHack.add(eo),eo.addEventListener("copy",()=>{}),eo.addEventListener("cut",()=>{}))}const wrappingWhiteSpace=["pre-wrap","normal","pre-line","break-spaces"];class HeightOracle{constructor(to){this.lineWrapping=to,this.doc=Text$1.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(to,ro){let no=this.doc.lineAt(ro).number-this.doc.lineAt(to).number+1;return this.lineWrapping&&(no+=Math.max(0,Math.ceil((ro-to-no*this.lineLength*.5)/this.lineLength))),this.lineHeight*no}heightForLine(to){return this.lineWrapping?(1+Math.max(0,Math.ceil((to-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(to){return this.doc=to,this}mustRefreshForWrapping(to){return wrappingWhiteSpace.indexOf(to)>-1!=this.lineWrapping}mustRefreshForHeights(to){let ro=!1;for(let no=0;no-1,lo=Math.round(ro)!=Math.round(this.lineHeight)||this.lineWrapping!=ao;if(this.lineWrapping=ao,this.lineHeight=ro,this.charWidth=no,this.textHeight=oo,this.lineLength=io,lo){this.heightSamples={};for(let uo=0;uo0}set outdated(to){this.flags=(to?2:0)|this.flags&-3}setHeight(to,ro){this.height!=ro&&(Math.abs(this.height-ro)>Epsilon&&(to.heightChanged=!0),this.height=ro)}replace(to,ro,no){return HeightMap.of(no)}decomposeLeft(to,ro){ro.push(this)}decomposeRight(to,ro){ro.push(this)}applyChanges(to,ro,no,oo){let io=this,so=no.doc;for(let ao=oo.length-1;ao>=0;ao--){let{fromA:lo,toA:uo,fromB:co,toB:fo}=oo[ao],ho=io.lineAt(lo,QueryType$1.ByPosNoHeight,no.setDoc(ro),0,0),po=ho.to>=uo?ho:io.lineAt(uo,QueryType$1.ByPosNoHeight,no,0,0);for(fo+=po.to-uo,uo=po.to;ao>0&&ho.from<=oo[ao-1].toA;)lo=oo[ao-1].fromA,co=oo[ao-1].fromB,ao--,loio*2){let ao=to[ro-1];ao.break?to.splice(--ro,1,ao.left,null,ao.right):to.splice(--ro,1,ao.left,ao.right),no+=1+ao.break,oo-=ao.size}else if(io>oo*2){let ao=to[no];ao.break?to.splice(no,1,ao.left,null,ao.right):to.splice(no,1,ao.left,ao.right),no+=2+ao.break,io-=ao.size}else break;else if(oo=io&&so(this.blockAt(0,no,oo,io))}updateHeight(to,ro=0,no=!1,oo){return oo&&oo.from<=ro&&oo.more&&this.setHeight(to,oo.heights[oo.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class HeightMapText extends HeightMapBlock{constructor(to,ro){super(to,ro,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(to,ro,no,oo){return new BlockInfo(oo,this.length,no,this.height,this.breaks)}replace(to,ro,no){let oo=no[0];return no.length==1&&(oo instanceof HeightMapText||oo instanceof HeightMapGap&&oo.flags&4)&&Math.abs(this.length-oo.length)<10?(oo instanceof HeightMapGap?oo=new HeightMapText(oo.length,this.height):oo.height=this.height,this.outdated||(oo.outdated=!1),oo):HeightMap.of(no)}updateHeight(to,ro=0,no=!1,oo){return oo&&oo.from<=ro&&oo.more?this.setHeight(to,oo.heights[oo.index++]):(no||this.outdated)&&this.setHeight(to,Math.max(this.widgetHeight,to.heightForLine(this.length-this.collapsed))+this.breaks*to.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class HeightMapGap extends HeightMap{constructor(to){super(to,0)}heightMetrics(to,ro){let no=to.doc.lineAt(ro).number,oo=to.doc.lineAt(ro+this.length).number,io=oo-no+1,so,ao=0;if(to.lineWrapping){let lo=Math.min(this.height,to.lineHeight*io);so=lo/io,this.length>io+1&&(ao=(this.height-lo)/(this.length-io-1))}else so=this.height/io;return{firstLine:no,lastLine:oo,perLine:so,perChar:ao}}blockAt(to,ro,no,oo){let{firstLine:io,lastLine:so,perLine:ao,perChar:lo}=this.heightMetrics(ro,oo);if(ro.lineWrapping){let uo=oo+(to0){let io=no[no.length-1];io instanceof HeightMapGap?no[no.length-1]=new HeightMapGap(io.length+oo):no.push(null,new HeightMapGap(oo-1))}if(to>0){let io=no[0];io instanceof HeightMapGap?no[0]=new HeightMapGap(to+io.length):no.unshift(new HeightMapGap(to-1),null)}return HeightMap.of(no)}decomposeLeft(to,ro){ro.push(new HeightMapGap(to-1),null)}decomposeRight(to,ro){ro.push(null,new HeightMapGap(this.length-to-1))}updateHeight(to,ro=0,no=!1,oo){let io=ro+this.length;if(oo&&oo.from<=ro+this.length&&oo.more){let so=[],ao=Math.max(ro,oo.from),lo=-1;for(oo.from>ro&&so.push(new HeightMapGap(oo.from-ro-1).updateHeight(to,ro));ao<=io&&oo.more;){let co=to.doc.lineAt(ao).length;so.length&&so.push(null);let fo=oo.heights[oo.index++];lo==-1?lo=fo:Math.abs(fo-lo)>=Epsilon&&(lo=-2);let ho=new HeightMapText(co,fo);ho.outdated=!1,so.push(ho),ao+=co+1}ao<=io&&so.push(null,new HeightMapGap(io-ao).updateHeight(to,ao));let uo=HeightMap.of(so);return(lo<0||Math.abs(uo.height-this.height)>=Epsilon||Math.abs(lo-this.heightMetrics(to,ro).perLine)>=Epsilon)&&(to.heightChanged=!0),uo}else(no||this.outdated)&&(this.setHeight(to,to.heightForGap(ro,ro+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class HeightMapBranch extends HeightMap{constructor(to,ro,no){super(to.length+ro+no.length,to.height+no.height,ro|(to.outdated||no.outdated?2:0)),this.left=to,this.right=no,this.size=to.size+no.size}get break(){return this.flags&1}blockAt(to,ro,no,oo){let io=no+this.left.height;return toao))return uo;let co=ro==QueryType$1.ByPosNoHeight?QueryType$1.ByPosNoHeight:QueryType$1.ByPos;return lo?uo.join(this.right.lineAt(ao,co,no,so,ao)):this.left.lineAt(ao,co,no,oo,io).join(uo)}forEachLine(to,ro,no,oo,io,so){let ao=oo+this.left.height,lo=io+this.left.length+this.break;if(this.break)to=lo&&this.right.forEachLine(to,ro,no,ao,lo,so);else{let uo=this.lineAt(lo,QueryType$1.ByPos,no,oo,io);to=to&&uo.from<=ro&&so(uo),ro>uo.to&&this.right.forEachLine(uo.to+1,ro,no,ao,lo,so)}}replace(to,ro,no){let oo=this.left.length+this.break;if(rothis.left.length)return this.balanced(this.left,this.right.replace(to-oo,ro-oo,no));let io=[];to>0&&this.decomposeLeft(to,io);let so=io.length;for(let ao of no)io.push(ao);if(to>0&&mergeGaps(io,so-1),ro=no&&ro.push(null)),to>no&&this.right.decomposeLeft(to-no,ro)}decomposeRight(to,ro){let no=this.left.length,oo=no+this.break;if(to>=oo)return this.right.decomposeRight(to-oo,ro);to2*ro.size||ro.size>2*to.size?HeightMap.of(this.break?[to,null,ro]:[to,ro]):(this.left=to,this.right=ro,this.height=to.height+ro.height,this.outdated=to.outdated||ro.outdated,this.size=to.size+ro.size,this.length=to.length+this.break+ro.length,this)}updateHeight(to,ro=0,no=!1,oo){let{left:io,right:so}=this,ao=ro+io.length+this.break,lo=null;return oo&&oo.from<=ro+io.length&&oo.more?lo=io=io.updateHeight(to,ro,no,oo):io.updateHeight(to,ro,no),oo&&oo.from<=ao+so.length&&oo.more?lo=so=so.updateHeight(to,ao,no,oo):so.updateHeight(to,ao,no),lo?this.balanced(io,so):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function mergeGaps(eo,to){let ro,no;eo[to]==null&&(ro=eo[to-1])instanceof HeightMapGap&&(no=eo[to+1])instanceof HeightMapGap&&eo.splice(to-1,3,new HeightMapGap(ro.length+1+no.length))}const relevantWidgetHeight=5;class NodeBuilder{constructor(to,ro){this.pos=to,this.oracle=ro,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=to}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(to,ro){if(this.lineStart>-1){let no=Math.min(ro,this.lineEnd),oo=this.nodes[this.nodes.length-1];oo instanceof HeightMapText?oo.length+=no-this.pos:(no>this.pos||!this.isCovered)&&this.nodes.push(new HeightMapText(no-this.pos,-1)),this.writtenTo=no,ro>no&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=ro}point(to,ro,no){if(to=relevantWidgetHeight)&&this.addLineDeco(oo,io,so)}else ro>to&&this.span(to,ro);this.lineEnd>-1&&this.lineEnd-1)return;let{from:to,to:ro}=this.oracle.doc.lineAt(this.pos);this.lineStart=to,this.lineEnd=ro,this.writtenToto&&this.nodes.push(new HeightMapText(this.pos-to,-1)),this.writtenTo=this.pos}blankContent(to,ro){let no=new HeightMapGap(ro-to);return this.oracle.doc.lineAt(to).to==ro&&(no.flags|=4),no}ensureLine(){this.enterLine();let to=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(to instanceof HeightMapText)return to;let ro=new HeightMapText(0,-1);return this.nodes.push(ro),ro}addBlock(to){this.enterLine();let ro=to.deco;ro&&ro.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(to),this.writtenTo=this.pos=this.pos+to.length,ro&&ro.endSide>0&&(this.covering=to)}addLineDeco(to,ro,no){let oo=this.ensureLine();oo.length+=no,oo.collapsed+=no,oo.widgetHeight=Math.max(oo.widgetHeight,to),oo.breaks+=ro,this.writtenTo=this.pos=this.pos+no}finish(to){let ro=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(ro instanceof HeightMapText)&&!this.isCovered?this.nodes.push(new HeightMapText(0,-1)):(this.writtenToco.clientHeight||co.scrollWidth>co.clientWidth)&&fo.overflow!="visible"){let ho=co.getBoundingClientRect();io=Math.max(io,ho.left),so=Math.min(so,ho.right),ao=Math.max(ao,ho.top),lo=uo==eo.parentNode?ho.bottom:Math.min(lo,ho.bottom)}uo=fo.position=="absolute"||fo.position=="fixed"?co.offsetParent:co.parentNode}else if(uo.nodeType==11)uo=uo.host;else break;return{left:io-ro.left,right:Math.max(io,so)-ro.left,top:ao-(ro.top+to),bottom:Math.max(ao,lo)-(ro.top+to)}}function fullPixelRange(eo,to){let ro=eo.getBoundingClientRect();return{left:0,right:ro.right-ro.left,top:to,bottom:ro.bottom-(ro.top+to)}}class LineGap{constructor(to,ro,no){this.from=to,this.to=ro,this.size=no}static same(to,ro){if(to.length!=ro.length)return!1;for(let no=0;notypeof no!="function"&&no.class=="cm-lineWrapping");this.heightOracle=new HeightOracle(ro),this.stateDeco=to.facet(decorations).filter(no=>typeof no!="function"),this.heightMap=HeightMap.empty().applyChanges(this.stateDeco,Text$1.empty,this.heightOracle.setDoc(to.doc),[new ChangedRange(0,0,0,to.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Decoration.set(this.lineGaps.map(no=>no.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let to=[this.viewport],{main:ro}=this.state.selection;for(let no=0;no<=1;no++){let oo=no?ro.head:ro.anchor;if(!to.some(({from:io,to:so})=>oo>=io&&oo<=so)){let{from:io,to:so}=this.lineBlockAt(oo);to.push(new Viewport(io,so))}}this.viewports=to.sort((no,oo)=>no.from-oo.from),this.scaler=this.heightMap.height<=7e6?IdScaler:new BigScaler(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,to=>{this.viewportLines.push(this.scaler.scale==1?to:scaleBlock(to,this.scaler))})}update(to,ro=null){this.state=to.state;let no=this.stateDeco;this.stateDeco=this.state.facet(decorations).filter(co=>typeof co!="function");let oo=to.changedRanges,io=ChangedRange.extendWithRanges(oo,heightRelevantDecoChanges(no,this.stateDeco,to?to.changes:ChangeSet.empty(this.state.doc.length))),so=this.heightMap.height,ao=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,to.startState.doc,this.heightOracle.setDoc(this.state.doc),io),this.heightMap.height!=so&&(to.flags|=2),ao?(this.scrollAnchorPos=to.changes.mapPos(ao.from,-1),this.scrollAnchorHeight=ao.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let lo=io.length?this.mapViewport(this.viewport,to.changes):this.viewport;(ro&&(ro.range.headlo.to)||!this.viewportIsAppropriate(lo))&&(lo=this.getViewport(0,ro));let uo=!to.changes.empty||to.flags&2||lo.from!=this.viewport.from||lo.to!=this.viewport.to;this.viewport=lo,this.updateForViewport(),uo&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,to.changes))),to.flags|=this.computeVisibleRanges(),ro&&(this.scrollTarget=ro),!this.mustEnforceCursorAssoc&&to.selectionSet&&to.view.lineWrapping&&to.state.selection.main.empty&&to.state.selection.main.assoc&&!to.state.facet(nativeSelectionHidden)&&(this.mustEnforceCursorAssoc=!0)}measure(to){let ro=to.contentDOM,no=window.getComputedStyle(ro),oo=this.heightOracle,io=no.whiteSpace;this.defaultTextDirection=no.direction=="rtl"?Direction.RTL:Direction.LTR;let so=this.heightOracle.mustRefreshForWrapping(io),ao=ro.getBoundingClientRect(),lo=so||this.mustMeasureContent||this.contentDOMHeight!=ao.height;this.contentDOMHeight=ao.height,this.mustMeasureContent=!1;let uo=0,co=0;if(ao.width&&ao.height){let{scaleX:So,scaleY:To}=getScale(ro,ao);(So>.005&&Math.abs(this.scaleX-So)>.005||To>.005&&Math.abs(this.scaleY-To)>.005)&&(this.scaleX=So,this.scaleY=To,uo|=8,so=lo=!0)}let fo=(parseInt(no.paddingTop)||0)*this.scaleY,ho=(parseInt(no.paddingBottom)||0)*this.scaleY;(this.paddingTop!=fo||this.paddingBottom!=ho)&&(this.paddingTop=fo,this.paddingBottom=ho,uo|=10),this.editorWidth!=to.scrollDOM.clientWidth&&(oo.lineWrapping&&(lo=!0),this.editorWidth=to.scrollDOM.clientWidth,uo|=8);let po=to.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=po&&(this.scrollAnchorHeight=-1,this.scrollTop=po),this.scrolledToBottom=isScrolledToBottom(to.scrollDOM);let go=(this.printing?fullPixelRange:visiblePixelRange)(ro,this.paddingTop),vo=go.top-this.pixelViewport.top,bo=go.bottom-this.pixelViewport.bottom;this.pixelViewport=go;let xo=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(xo!=this.inView&&(this.inView=xo,xo&&(lo=!0)),!this.inView&&!this.scrollTarget)return 0;let _o=ao.width;if((this.contentDOMWidth!=_o||this.editorHeight!=to.scrollDOM.clientHeight)&&(this.contentDOMWidth=ao.width,this.editorHeight=to.scrollDOM.clientHeight,uo|=8),lo){let So=to.docView.measureVisibleLineHeights(this.viewport);if(oo.mustRefreshForHeights(So)&&(so=!0),so||oo.lineWrapping&&Math.abs(_o-this.contentDOMWidth)>oo.charWidth){let{lineHeight:To,charWidth:wo,textHeight:Co}=to.docView.measureTextSize();so=To>0&&oo.refresh(io,To,wo,Co,_o/wo,So),so&&(to.docView.minWidth=0,uo|=8)}vo>0&&bo>0?co=Math.max(vo,bo):vo<0&&bo<0&&(co=Math.min(vo,bo)),oo.heightChanged=!1;for(let To of this.viewports){let wo=To.from==this.viewport.from?So:to.docView.measureVisibleLineHeights(To);this.heightMap=(so?HeightMap.empty().applyChanges(this.stateDeco,Text$1.empty,this.heightOracle,[new ChangedRange(0,0,0,to.state.doc.length)]):this.heightMap).updateHeight(oo,0,so,new MeasuredHeights(To.from,wo))}oo.heightChanged&&(uo|=2)}let Eo=!this.viewportIsAppropriate(this.viewport,co)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return Eo&&(this.viewport=this.getViewport(co,this.scrollTarget)),this.updateForViewport(),(uo&2||Eo)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(so?[]:this.lineGaps,to)),uo|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,to.docView.enforceCursorAssoc()),uo}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(to,ro){let no=.5-Math.max(-.5,Math.min(.5,to/1e3/2)),oo=this.heightMap,io=this.heightOracle,{visibleTop:so,visibleBottom:ao}=this,lo=new Viewport(oo.lineAt(so-no*1e3,QueryType$1.ByHeight,io,0,0).from,oo.lineAt(ao+(1-no)*1e3,QueryType$1.ByHeight,io,0,0).to);if(ro){let{head:uo}=ro.range;if(uolo.to){let co=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),fo=oo.lineAt(uo,QueryType$1.ByPos,io,0,0),ho;ro.y=="center"?ho=(fo.top+fo.bottom)/2-co/2:ro.y=="start"||ro.y=="nearest"&&uo=ao+Math.max(10,Math.min(no,250)))&&oo>so-2*1e3&&io>1,so=oo<<1;if(this.defaultTextDirection!=Direction.LTR&&!no)return[];let ao=[],lo=(uo,co,fo,ho)=>{if(co-uouo&&bobo.from>=fo.from&&bo.to<=fo.to&&Math.abs(bo.from-uo)bo.fromxo));if(!vo){if(cobo.from<=co&&bo.to>=co)){let bo=ro.moveToLineBoundary(EditorSelection.cursor(co),!1,!0).head;bo>uo&&(co=bo)}vo=new LineGap(uo,co,this.gapSize(fo,uo,co,ho))}ao.push(vo)};for(let uo of this.viewportLines){if(uo.lengthuo.from&&lo(uo.from,ho,uo,co),poro.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let to=this.stateDeco;this.lineGaps.length&&(to=to.concat(this.lineGapDeco));let ro=[];RangeSet.spans(to,this.viewport.from,this.viewport.to,{span(oo,io){ro.push({from:oo,to:io})},point(){}},20);let no=ro.length!=this.visibleRanges.length||this.visibleRanges.some((oo,io)=>oo.from!=ro[io].from||oo.to!=ro[io].to);return this.visibleRanges=ro,no?4:0}lineBlockAt(to){return to>=this.viewport.from&&to<=this.viewport.to&&this.viewportLines.find(ro=>ro.from<=to&&ro.to>=to)||scaleBlock(this.heightMap.lineAt(to,QueryType$1.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(to){return scaleBlock(this.heightMap.lineAt(this.scaler.fromDOM(to),QueryType$1.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(to){let ro=this.lineBlockAtHeight(to+8);return ro.from>=this.viewport.from||this.viewportLines[0].top-to>200?ro:this.viewportLines[0]}elementAtHeight(to){return scaleBlock(this.heightMap.blockAt(this.scaler.fromDOM(to),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Viewport{constructor(to,ro){this.from=to,this.to=ro}}function lineStructure(eo,to,ro){let no=[],oo=eo,io=0;return RangeSet.spans(ro,eo,to,{span(){},point(so,ao){so>oo&&(no.push({from:oo,to:so}),io+=so-oo),oo=ao}},20),oo=1)return to[to.length-1].to;let no=Math.floor(eo*ro);for(let oo=0;;oo++){let{from:io,to:so}=to[oo],ao=so-io;if(no<=ao)return io+no;no-=ao}}function findFraction(eo,to){let ro=0;for(let{from:no,to:oo}of eo.ranges){if(to<=oo){ro+=to-no;break}ro+=oo-no}return ro/eo.total}function find(eo,to){for(let ro of eo)if(to(ro))return ro}const IdScaler={toDOM(eo){return eo},fromDOM(eo){return eo},scale:1};class BigScaler{constructor(to,ro,no){let oo=0,io=0,so=0;this.viewports=no.map(({from:ao,to:lo})=>{let uo=ro.lineAt(ao,QueryType$1.ByPos,to,0,0).top,co=ro.lineAt(lo,QueryType$1.ByPos,to,0,0).bottom;return oo+=co-uo,{from:ao,to:lo,top:uo,bottom:co,domTop:0,domBottom:0}}),this.scale=(7e6-oo)/(ro.height-oo);for(let ao of this.viewports)ao.domTop=so+(ao.top-io)*this.scale,so=ao.domBottom=ao.domTop+(ao.bottom-ao.top),io=ao.bottom}toDOM(to){for(let ro=0,no=0,oo=0;;ro++){let io=roscaleBlock(oo,to)):eo._content)}const theme=Facet.define({combine:eo=>eo.join(" ")}),darkTheme=Facet.define({combine:eo=>eo.indexOf(!0)>-1}),baseThemeID=StyleModule.newName(),baseLightID=StyleModule.newName(),baseDarkID=StyleModule.newName(),lightDarkIDs={"&light":"."+baseLightID,"&dark":"."+baseDarkID};function buildTheme(eo,to,ro){return new StyleModule(to,{finish(no){return/&/.test(no)?no.replace(/&\w*/,oo=>{if(oo=="&")return eo;if(!ro||!ro[oo])throw new RangeError(`Unsupported selector: ${oo}`);return ro[oo]}):eo+" "+no}})}const baseTheme$1$2=buildTheme("."+baseThemeID,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},lightDarkIDs),LineBreakPlaceholder="￿";class DOMReader{constructor(to,ro){this.points=to,this.text="",this.lineSeparator=ro.facet(EditorState.lineSeparator)}append(to){this.text+=to}lineBreak(){this.text+=LineBreakPlaceholder}readRange(to,ro){if(!to)return this;let no=to.parentNode;for(let oo=to;;){this.findPointBefore(no,oo);let io=this.text.length;this.readNode(oo);let so=oo.nextSibling;if(so==ro)break;let ao=ContentView.get(oo),lo=ContentView.get(so);(ao&&lo?ao.breakAfter:(ao?ao.breakAfter:isBlockElement(oo))||isBlockElement(so)&&(oo.nodeName!="BR"||oo.cmIgnore)&&this.text.length>io)&&this.lineBreak(),oo=so}return this.findPointBefore(no,ro),this}readTextNode(to){let ro=to.nodeValue;for(let no of this.points)no.node==to&&(no.pos=this.text.length+Math.min(no.offset,ro.length));for(let no=0,oo=this.lineSeparator?null:/\r\n?|\n/g;;){let io=-1,so=1,ao;if(this.lineSeparator?(io=ro.indexOf(this.lineSeparator,no),so=this.lineSeparator.length):(ao=oo.exec(ro))&&(io=ao.index,so=ao[0].length),this.append(ro.slice(no,io<0?ro.length:io)),io<0)break;if(this.lineBreak(),so>1)for(let lo of this.points)lo.node==to&&lo.pos>this.text.length&&(lo.pos-=so-1);no=io+so}}readNode(to){if(to.cmIgnore)return;let ro=ContentView.get(to),no=ro&&ro.overrideDOMText;if(no!=null){this.findPointInside(to,no.length);for(let oo=no.iter();!oo.next().done;)oo.lineBreak?this.lineBreak():this.append(oo.value)}else to.nodeType==3?this.readTextNode(to):to.nodeName=="BR"?to.nextSibling&&this.lineBreak():to.nodeType==1&&this.readRange(to.firstChild,null)}findPointBefore(to,ro){for(let no of this.points)no.node==to&&to.childNodes[no.offset]==ro&&(no.pos=this.text.length)}findPointInside(to,ro){for(let no of this.points)(to.nodeType==3?no.node==to:to.contains(no.node))&&(no.pos=this.text.length+(isAtEnd(to,no.node,no.offset)?ro:0))}}function isAtEnd(eo,to,ro){for(;;){if(!to||ro-1)this.newSel=null;else if(ro>-1&&(this.bounds=to.docView.domBoundsAround(ro,no,0))){let ao=io||so?[]:selectionPoints(to),lo=new DOMReader(ao,to.state);lo.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=lo.text,this.newSel=selectionFromPoints(ao,this.bounds.from)}else{let ao=to.observer.selectionRange,lo=io&&io.node==ao.focusNode&&io.offset==ao.focusOffset||!contains(to.contentDOM,ao.focusNode)?to.state.selection.main.head:to.docView.posFromDOM(ao.focusNode,ao.focusOffset),uo=so&&so.node==ao.anchorNode&&so.offset==ao.anchorOffset||!contains(to.contentDOM,ao.anchorNode)?to.state.selection.main.anchor:to.docView.posFromDOM(ao.anchorNode,ao.anchorOffset),co=to.viewport;if((browser.ios||browser.chrome)&&to.state.selection.main.empty&&lo!=uo&&(co.from>0||co.toDate.now()-100?eo.inputState.lastKeyCode:-1;if(to.bounds){let{from:so,to:ao}=to.bounds,lo=oo.from,uo=null;(io===8||browser.android&&to.text.length=oo.from&&ro.to<=oo.to&&(ro.from!=oo.from||ro.to!=oo.to)&&oo.to-oo.from-(ro.to-ro.from)<=4?ro={from:oo.from,to:oo.to,insert:eo.state.doc.slice(oo.from,ro.from).append(ro.insert).append(eo.state.doc.slice(ro.to,oo.to))}:(browser.mac||browser.android)&&ro&&ro.from==ro.to&&ro.from==oo.head-1&&/^\. ?$/.test(ro.insert.toString())&&eo.contentDOM.getAttribute("autocorrect")=="off"?(no&&ro.insert.length==2&&(no=EditorSelection.single(no.main.anchor-1,no.main.head-1)),ro={from:oo.from,to:oo.to,insert:Text$1.of([" "])}):browser.chrome&&ro&&ro.from==ro.to&&ro.from==oo.head&&ro.insert.toString()==` + `&&eo.lineWrapping&&(no&&(no=EditorSelection.single(no.main.anchor-1,no.main.head-1)),ro={from:oo.from,to:oo.to,insert:Text$1.of([" "])}),ro){if(browser.ios&&eo.inputState.flushIOSKey(ro)||browser.android&&(ro.to==oo.to&&(ro.from==oo.from||ro.from==oo.from-1&&eo.state.sliceDoc(ro.from,oo.from)==" ")&&ro.insert.length==1&&ro.insert.lines==2&&dispatchKey(eo.contentDOM,"Enter",13)||(ro.from==oo.from-1&&ro.to==oo.to&&ro.insert.length==0||io==8&&ro.insert.lengthoo.head)&&dispatchKey(eo.contentDOM,"Backspace",8)||ro.from==oo.from&&ro.to==oo.to+1&&ro.insert.length==0&&dispatchKey(eo.contentDOM,"Delete",46)))return!0;let so=ro.insert.toString();eo.inputState.composing>=0&&eo.inputState.composing++;let ao,lo=()=>ao||(ao=applyDefaultInsert(eo,ro,no));return eo.state.facet(inputHandler$1).some(uo=>uo(eo,ro.from,ro.to,so,lo))||eo.dispatch(lo()),!0}else if(no&&!no.main.eq(oo)){let so=!1,ao="select";return eo.inputState.lastSelectionTime>Date.now()-50&&(eo.inputState.lastSelectionOrigin=="select"&&(so=!0),ao=eo.inputState.lastSelectionOrigin),eo.dispatch({selection:no,scrollIntoView:so,userEvent:ao}),!0}else return!1}function applyDefaultInsert(eo,to,ro){let no,oo=eo.state,io=oo.selection.main;if(to.from>=io.from&&to.to<=io.to&&to.to-to.from>=(io.to-io.from)/3&&(!ro||ro.main.empty&&ro.main.from==to.from+to.insert.length)&&eo.inputState.composing<0){let ao=io.fromto.to?oo.sliceDoc(to.to,io.to):"";no=oo.replaceSelection(eo.state.toText(ao+to.insert.sliceString(0,void 0,eo.state.lineBreak)+lo))}else{let ao=oo.changes(to),lo=ro&&ro.main.to<=ao.newLength?ro.main:void 0;if(oo.selection.ranges.length>1&&eo.inputState.composing>=0&&to.to<=io.to&&to.to>=io.to-10){let uo=eo.state.sliceDoc(to.from,to.to),co,fo=ro&&findCompositionNode(eo,ro.main.head);if(fo){let go=to.insert.length-(to.to-to.from);co={from:fo.from,to:fo.to-go}}else co=eo.state.doc.lineAt(io.head);let ho=io.to-to.to,po=io.to-io.from;no=oo.changeByRange(go=>{if(go.from==io.from&&go.to==io.to)return{changes:ao,range:lo||go.map(ao)};let vo=go.to-ho,bo=vo-uo.length;if(go.to-go.from!=po||eo.state.sliceDoc(bo,vo)!=uo||go.to>=co.from&&go.from<=co.to)return{range:go};let xo=oo.changes({from:bo,to:vo,insert:to.insert}),_o=go.to-io.to;return{changes:xo,range:lo?EditorSelection.range(Math.max(0,lo.anchor+_o),Math.max(0,lo.head+_o)):go.map(xo)}})}else no={changes:ao,selection:lo&&oo.selection.replaceRange(lo)}}let so="input.type";return(eo.composing||eo.inputState.compositionPendingChange&&eo.inputState.compositionEndedAt>Date.now()-50)&&(eo.inputState.compositionPendingChange=!1,so+=".compose",eo.inputState.compositionFirstChange&&(so+=".start",eo.inputState.compositionFirstChange=!1)),oo.update(no,{userEvent:so,scrollIntoView:!0})}function findDiff(eo,to,ro,no){let oo=Math.min(eo.length,to.length),io=0;for(;io0&&ao>0&&eo.charCodeAt(so-1)==to.charCodeAt(ao-1);)so--,ao--;if(no=="end"){let lo=Math.max(0,io-Math.min(so,ao));ro-=so+lo-io}if(so=so?io-ro:0;io-=lo,ao=io+(ao-so),so=io}else if(ao=ao?io-ro:0;io-=lo,so=io+(so-ao),ao=io}return{from:io,toA:so,toB:ao}}function selectionPoints(eo){let to=[];if(eo.root.activeElement!=eo.contentDOM)return to;let{anchorNode:ro,anchorOffset:no,focusNode:oo,focusOffset:io}=eo.observer.selectionRange;return ro&&(to.push(new DOMPoint(ro,no)),(oo!=ro||io!=no)&&to.push(new DOMPoint(oo,io))),to}function selectionFromPoints(eo,to){if(eo.length==0)return null;let ro=eo[0].pos,no=eo.length==2?eo[1].pos:ro;return ro>-1&&no>-1?EditorSelection.single(ro+to,no+to):null}const observeOptions={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},useCharData=browser.ie&&browser.ie_version<=11;class DOMObserver{constructor(to){this.view=to,this.active=!1,this.selectionRange=new DOMSelectionState,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=to.contentDOM,this.observer=new MutationObserver(ro=>{for(let no of ro)this.queue.push(no);(browser.ie&&browser.ie_version<=11||browser.ios&&to.composing)&&ro.some(no=>no.type=="childList"&&no.removedNodes.length||no.type=="characterData"&&no.oldValue.length>no.target.nodeValue.length)?this.flushSoon():this.flush()}),useCharData&&(this.onCharData=ro=>{this.queue.push({target:ro.target,type:"characterData",oldValue:ro.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var ro;((ro=this.view.docView)===null||ro===void 0?void 0:ro.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),ro.length>0&&ro[ro.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(ro=>{ro.length>0&&ro[ro.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(to){this.view.inputState.runHandlers("scroll",to),this.intersecting&&this.view.measure()}onScroll(to){this.intersecting&&this.flush(!1),this.onScrollChanged(to)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(to){to.type=="change"&&!to.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(to){if(this.gapIntersection&&(to.length!=this.gaps.length||this.gaps.some((ro,no)=>ro!=to[no]))){this.gapIntersection.disconnect();for(let ro of to)this.gapIntersection.observe(ro);this.gaps=to}}onSelectionChange(to){let ro=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:no}=this,oo=this.selectionRange;if(no.state.facet(editable)?no.root.activeElement!=this.dom:!hasSelection(no.dom,oo))return;let io=oo.anchorNode&&no.docView.nearest(oo.anchorNode);if(io&&io.ignoreEvent(to)){ro||(this.selectionChanged=!1);return}(browser.ie&&browser.ie_version<=11||browser.android&&browser.chrome)&&!no.state.selection.main.empty&&oo.focusNode&&isEquivalentPosition(oo.focusNode,oo.focusOffset,oo.anchorNode,oo.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:to}=this,ro=browser.safari&&to.root.nodeType==11&&deepActiveElement(this.dom.ownerDocument)==this.dom&&safariSelectionRangeHack(this.view)||getSelection(to.root);if(!ro||this.selectionRange.eq(ro))return!1;let no=hasSelection(this.dom,ro);return no&&!this.selectionChanged&&to.inputState.lastFocusTime>Date.now()-200&&to.inputState.lastTouchTime{let io=this.delayedAndroidKey;io&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=io.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&io.force&&dispatchKey(this.dom,io.key,io.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(oo)}(!this.delayedAndroidKey||to=="Enter")&&(this.delayedAndroidKey={key:to,keyCode:ro,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let to of this.observer.takeRecords())this.queue.push(to);return this.queue}processRecords(){let to=this.pendingRecords();to.length&&(this.queue=[]);let ro=-1,no=-1,oo=!1;for(let io of to){let so=this.readMutation(io);so&&(so.typeOver&&(oo=!0),ro==-1?{from:ro,to:no}=so:(ro=Math.min(so.from,ro),no=Math.max(so.to,no)))}return{from:ro,to:no,typeOver:oo}}readChange(){let{from:to,to:ro,typeOver:no}=this.processRecords(),oo=this.selectionChanged&&hasSelection(this.dom,this.selectionRange);if(to<0&&!oo)return null;to>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let io=new DOMChange(this.view,to,ro,no);return this.view.docView.domChanged={newSel:io.newSel?io.newSel.main:null},io}flush(to=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;to&&this.readSelectionRange();let ro=this.readChange();if(!ro)return this.view.requestMeasure(),!1;let no=this.view.state,oo=applyDOMChange(this.view,ro);return this.view.state==no&&this.view.update([]),oo}readMutation(to){let ro=this.view.docView.nearest(to.target);if(!ro||ro.ignoreMutation(to))return null;if(ro.markDirty(to.type=="attributes"),to.type=="attributes"&&(ro.flags|=4),to.type=="childList"){let no=findChild(ro,to.previousSibling||to.target.previousSibling,-1),oo=findChild(ro,to.nextSibling||to.target.nextSibling,1);return{from:no?ro.posAfter(no):ro.posAtStart,to:oo?ro.posBefore(oo):ro.posAtEnd,typeOver:!1}}else return to.type=="characterData"?{from:ro.posAtStart,to:ro.posAtEnd,typeOver:to.target.nodeValue==to.oldValue}:null}setWindow(to){to!=this.win&&(this.removeWindowListeners(this.win),this.win=to,this.addWindowListeners(this.win))}addWindowListeners(to){to.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):to.addEventListener("beforeprint",this.onPrint),to.addEventListener("scroll",this.onScroll),to.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(to){to.removeEventListener("scroll",this.onScroll),to.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):to.removeEventListener("beforeprint",this.onPrint),to.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var to,ro,no;this.stop(),(to=this.intersection)===null||to===void 0||to.disconnect(),(ro=this.gapIntersection)===null||ro===void 0||ro.disconnect(),(no=this.resizeScroll)===null||no===void 0||no.disconnect();for(let oo of this.scrollTargets)oo.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function findChild(eo,to,ro){for(;to;){let no=ContentView.get(to);if(no&&no.parent==eo)return no;let oo=to.parentNode;to=oo!=eo.dom?oo:ro>0?to.nextSibling:to.previousSibling}return null}function safariSelectionRangeHack(eo){let to=null;function ro(lo){lo.preventDefault(),lo.stopImmediatePropagation(),to=lo.getTargetRanges()[0]}if(eo.contentDOM.addEventListener("beforeinput",ro,!0),eo.dom.ownerDocument.execCommand("indent"),eo.contentDOM.removeEventListener("beforeinput",ro,!0),!to)return null;let no=to.startContainer,oo=to.startOffset,io=to.endContainer,so=to.endOffset,ao=eo.docView.domAtPos(eo.state.selection.main.anchor);return isEquivalentPosition(ao.node,ao.offset,io,so)&&([no,oo,io,so]=[io,so,no,oo]),{anchorNode:no,anchorOffset:oo,focusNode:io,focusOffset:so}}class EditorView{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(to={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),to.parent&&to.parent.appendChild(this.dom);let{dispatch:ro}=to;this.dispatchTransactions=to.dispatchTransactions||ro&&(no=>no.forEach(oo=>ro(oo,this)))||(no=>this.update(no)),this.dispatch=this.dispatch.bind(this),this._root=to.root||getRoot(to.parent)||document,this.viewState=new ViewState(to.state||EditorState.create(to)),to.scrollTo&&to.scrollTo.is(scrollIntoView$1)&&(this.viewState.scrollTarget=to.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(viewPlugin).map(no=>new PluginInstance(no));for(let no of this.plugins)no.update(this);this.observer=new DOMObserver(this),this.inputState=new InputState(this),this.inputState.ensureHandlers(this.plugins),this.docView=new DocView(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...to){let ro=to.length==1&&to[0]instanceof Transaction?to:to.length==1&&Array.isArray(to[0])?to[0]:[this.state.update(...to)];this.dispatchTransactions(ro,this)}update(to){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let ro=!1,no=!1,oo,io=this.state;for(let ho of to){if(ho.startState!=io)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");io=ho.state}if(this.destroyed){this.viewState.state=io;return}let so=this.hasFocus,ao=0,lo=null;to.some(ho=>ho.annotation(isFocusChange))?(this.inputState.notifiedFocused=so,ao=1):so!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=so,lo=focusChangeTransaction(io,so),lo||(ao=1));let uo=this.observer.delayedAndroidKey,co=null;if(uo?(this.observer.clearDelayedAndroidKey(),co=this.observer.readChange(),(co&&!this.state.doc.eq(io.doc)||!this.state.selection.eq(io.selection))&&(co=null)):this.observer.clear(),io.facet(EditorState.phrases)!=this.state.facet(EditorState.phrases))return this.setState(io);oo=ViewUpdate.create(this,io,to),oo.flags|=ao;let fo=this.viewState.scrollTarget;try{this.updateState=2;for(let ho of to){if(fo&&(fo=fo.map(ho.changes)),ho.scrollIntoView){let{main:po}=ho.state.selection;fo=new ScrollTarget(po.empty?po:EditorSelection.cursor(po.head,po.head>po.anchor?-1:1))}for(let po of ho.effects)po.is(scrollIntoView$1)&&(fo=po.value.clip(this.state))}this.viewState.update(oo,fo),this.bidiCache=CachedOrder.update(this.bidiCache,oo.changes),oo.empty||(this.updatePlugins(oo),this.inputState.update(oo)),ro=this.docView.update(oo),this.state.facet(styleModule)!=this.styleModules&&this.mountStyles(),no=this.updateAttrs(),this.showAnnouncements(to),this.docView.updateSelection(ro,to.some(ho=>ho.isUserEvent("select.pointer")))}finally{this.updateState=0}if(oo.startState.facet(theme)!=oo.state.facet(theme)&&(this.viewState.mustMeasureContent=!0),(ro||no||fo||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),ro&&this.docViewUpdate(),!oo.empty)for(let ho of this.state.facet(updateListener))try{ho(oo)}catch(po){logException(this.state,po,"update listener")}(lo||co)&&Promise.resolve().then(()=>{lo&&this.state==lo.startState&&this.dispatch(lo),co&&!applyDOMChange(this,co)&&uo.force&&dispatchKey(this.contentDOM,uo.key,uo.keyCode)})}setState(to){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=to;return}this.updateState=2;let ro=this.hasFocus;try{for(let no of this.plugins)no.destroy(this);this.viewState=new ViewState(to),this.plugins=to.facet(viewPlugin).map(no=>new PluginInstance(no)),this.pluginMap.clear();for(let no of this.plugins)no.update(this);this.docView.destroy(),this.docView=new DocView(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}ro&&this.focus(),this.requestMeasure()}updatePlugins(to){let ro=to.startState.facet(viewPlugin),no=to.state.facet(viewPlugin);if(ro!=no){let oo=[];for(let io of no){let so=ro.indexOf(io);if(so<0)oo.push(new PluginInstance(io));else{let ao=this.plugins[so];ao.mustUpdate=to,oo.push(ao)}}for(let io of this.plugins)io.mustUpdate!=to&&io.destroy(this);this.plugins=oo,this.pluginMap.clear()}else for(let oo of this.plugins)oo.mustUpdate=to;for(let oo=0;oo-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,to&&this.observer.forceFlush();let ro=null,no=this.scrollDOM,oo=no.scrollTop*this.scaleY,{scrollAnchorPos:io,scrollAnchorHeight:so}=this.viewState;Math.abs(oo-this.viewState.scrollTop)>1&&(so=-1),this.viewState.scrollAnchorHeight=-1;try{for(let ao=0;;ao++){if(so<0)if(isScrolledToBottom(no))io=-1,so=this.viewState.heightMap.height;else{let po=this.viewState.scrollAnchorAt(oo);io=po.from,so=po.top}this.updateState=1;let lo=this.viewState.measure(this);if(!lo&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(ao>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let uo=[];lo&4||([this.measureRequests,uo]=[uo,this.measureRequests]);let co=uo.map(po=>{try{return po.read(this)}catch(go){return logException(this.state,go),BadMeasure}}),fo=ViewUpdate.create(this,this.state,[]),ho=!1;fo.flags|=lo,ro?ro.flags|=lo:ro=fo,this.updateState=2,fo.empty||(this.updatePlugins(fo),this.inputState.update(fo),this.updateAttrs(),ho=this.docView.update(fo),ho&&this.docViewUpdate());for(let po=0;po1||go<-1){oo=oo+go,no.scrollTop=oo/this.scaleY,so=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(ro&&!ro.empty)for(let ao of this.state.facet(updateListener))ao(ro)}get themeClasses(){return baseThemeID+" "+(this.state.facet(darkTheme)?baseDarkID:baseLightID)+" "+this.state.facet(theme)}updateAttrs(){let to=attrsFromFacet(this,editorAttributes,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),ro={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(editable)?"true":"false",class:"cm-content",style:`${browser.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(ro["aria-readonly"]="true"),attrsFromFacet(this,contentAttributes,ro);let no=this.observer.ignore(()=>{let oo=updateAttrs(this.contentDOM,this.contentAttrs,ro),io=updateAttrs(this.dom,this.editorAttrs,to);return oo||io});return this.editorAttrs=to,this.contentAttrs=ro,no}showAnnouncements(to){let ro=!0;for(let no of to)for(let oo of no.effects)if(oo.is(EditorView.announce)){ro&&(this.announceDOM.textContent=""),ro=!1;let io=this.announceDOM.appendChild(document.createElement("div"));io.textContent=oo.value}}mountStyles(){this.styleModules=this.state.facet(styleModule);let to=this.state.facet(EditorView.cspNonce);StyleModule.mount(this.root,this.styleModules.concat(baseTheme$1$2).reverse(),to?{nonce:to}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(to){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),to){if(this.measureRequests.indexOf(to)>-1)return;if(to.key!=null){for(let ro=0;rono.spec==to)||null),ro&&ro.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(to){return this.readMeasured(),this.viewState.elementAtHeight(to)}lineBlockAtHeight(to){return this.readMeasured(),this.viewState.lineBlockAtHeight(to)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(to){return this.viewState.lineBlockAt(to)}get contentHeight(){return this.viewState.contentHeight}moveByChar(to,ro,no){return skipAtoms(this,to,moveByChar(this,to,ro,no))}moveByGroup(to,ro){return skipAtoms(this,to,moveByChar(this,to,ro,no=>byGroup(this,to.head,no)))}visualLineSide(to,ro){let no=this.bidiSpans(to),oo=this.textDirectionAt(to.from),io=no[ro?no.length-1:0];return EditorSelection.cursor(io.side(ro,oo)+to.from,io.forward(!ro,oo)?1:-1)}moveToLineBoundary(to,ro,no=!0){return moveToLineBoundary(this,to,ro,no)}moveVertically(to,ro,no){return skipAtoms(this,to,moveVertically(this,to,ro,no))}domAtPos(to){return this.docView.domAtPos(to)}posAtDOM(to,ro=0){return this.docView.posFromDOM(to,ro)}posAtCoords(to,ro=!0){return this.readMeasured(),posAtCoords(this,to,ro)}coordsAtPos(to,ro=1){this.readMeasured();let no=this.docView.coordsAt(to,ro);if(!no||no.left==no.right)return no;let oo=this.state.doc.lineAt(to),io=this.bidiSpans(oo),so=io[BidiSpan.find(io,to-oo.from,-1,ro)];return flattenRect(no,so.dir==Direction.LTR==ro>0)}coordsForChar(to){return this.readMeasured(),this.docView.coordsForChar(to)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(to){return!this.state.facet(perLineTextDirection)||tothis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(to))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(to){if(to.length>MaxBidiLine)return trivialOrder(to.length);let ro=this.textDirectionAt(to.from),no;for(let io of this.bidiCache)if(io.from==to.from&&io.dir==ro&&(io.fresh||isolatesEq(io.isolates,no=getIsolatedRanges(this,to))))return io.order;no||(no=getIsolatedRanges(this,to));let oo=computeOrder(to.text,ro,no);return this.bidiCache.push(new CachedOrder(to.from,to.to,ro,no,!0,oo)),oo}get hasFocus(){var to;return(this.dom.ownerDocument.hasFocus()||browser.safari&&((to=this.inputState)===null||to===void 0?void 0:to.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{focusPreventScroll(this.contentDOM),this.docView.updateSelection()})}setRoot(to){this._root!=to&&(this._root=to,this.observer.setWindow((to.nodeType==9?to:to.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let to of this.plugins)to.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(to,ro={}){return scrollIntoView$1.of(new ScrollTarget(typeof to=="number"?EditorSelection.cursor(to):to,ro.y,ro.x,ro.yMargin,ro.xMargin))}scrollSnapshot(){let{scrollTop:to,scrollLeft:ro}=this.scrollDOM,no=this.viewState.scrollAnchorAt(to);return scrollIntoView$1.of(new ScrollTarget(EditorSelection.cursor(no.from),"start","start",no.top-to,ro,!0))}static domEventHandlers(to){return ViewPlugin.define(()=>({}),{eventHandlers:to})}static domEventObservers(to){return ViewPlugin.define(()=>({}),{eventObservers:to})}static theme(to,ro){let no=StyleModule.newName(),oo=[theme.of(no),styleModule.of(buildTheme(`.${no}`,to))];return ro&&ro.dark&&oo.push(darkTheme.of(!0)),oo}static baseTheme(to){return Prec.lowest(styleModule.of(buildTheme("."+baseThemeID,to,lightDarkIDs)))}static findFromDOM(to){var ro;let no=to.querySelector(".cm-content"),oo=no&&ContentView.get(no)||ContentView.get(to);return((ro=oo==null?void 0:oo.rootView)===null||ro===void 0?void 0:ro.view)||null}}EditorView.styleModule=styleModule;EditorView.inputHandler=inputHandler$1;EditorView.scrollHandler=scrollHandler;EditorView.focusChangeEffect=focusChangeEffect;EditorView.perLineTextDirection=perLineTextDirection;EditorView.exceptionSink=exceptionSink;EditorView.updateListener=updateListener;EditorView.editable=editable;EditorView.mouseSelectionStyle=mouseSelectionStyle;EditorView.dragMovesSelection=dragMovesSelection$1;EditorView.clickAddsSelectionRange=clickAddsSelectionRange;EditorView.decorations=decorations;EditorView.outerDecorations=outerDecorations;EditorView.atomicRanges=atomicRanges;EditorView.bidiIsolatedRanges=bidiIsolatedRanges;EditorView.scrollMargins=scrollMargins;EditorView.darkTheme=darkTheme;EditorView.cspNonce=Facet.define({combine:eo=>eo.length?eo[0]:""});EditorView.contentAttributes=contentAttributes;EditorView.editorAttributes=editorAttributes;EditorView.lineWrapping=EditorView.contentAttributes.of({class:"cm-lineWrapping"});EditorView.announce=StateEffect.define();const MaxBidiLine=4096,BadMeasure={};class CachedOrder{constructor(to,ro,no,oo,io,so){this.from=to,this.to=ro,this.dir=no,this.isolates=oo,this.fresh=io,this.order=so}static update(to,ro){if(ro.empty&&!to.some(io=>io.fresh))return to;let no=[],oo=to.length?to[to.length-1].dir:Direction.LTR;for(let io=Math.max(0,to.length-10);io=0;oo--){let io=no[oo],so=typeof io=="function"?io(eo):io;so&&combineAttrs(so,ro)}return ro}const currentPlatform=browser.mac?"mac":browser.windows?"win":browser.linux?"linux":"key";function normalizeKeyName(eo,to){const ro=eo.split(/-(?!$)/);let no=ro[ro.length-1];no=="Space"&&(no=" ");let oo,io,so,ao;for(let lo=0;lono.concat(oo),[]))),ro}function runScopeHandlers(eo,to,ro){return runHandlers(getKeymap(eo.state),to,eo,ro)}let storedPrefix=null;const PrefixTimeout=4e3;function buildKeymap(eo,to=currentPlatform){let ro=Object.create(null),no=Object.create(null),oo=(so,ao)=>{let lo=no[so];if(lo==null)no[so]=ao;else if(lo!=ao)throw new Error("Key binding "+so+" is used both as a regular binding and as a multi-stroke prefix")},io=(so,ao,lo,uo,co)=>{var fo,ho;let po=ro[so]||(ro[so]=Object.create(null)),go=ao.split(/ (?!$)/).map(xo=>normalizeKeyName(xo,to));for(let xo=1;xo{let So=storedPrefix={view:Eo,prefix:_o,scope:so};return setTimeout(()=>{storedPrefix==So&&(storedPrefix=null)},PrefixTimeout),!0}]})}let vo=go.join(" ");oo(vo,!1);let bo=po[vo]||(po[vo]={preventDefault:!1,stopPropagation:!1,run:((ho=(fo=po._any)===null||fo===void 0?void 0:fo.run)===null||ho===void 0?void 0:ho.slice())||[]});lo&&bo.run.push(lo),uo&&(bo.preventDefault=!0),co&&(bo.stopPropagation=!0)};for(let so of eo){let ao=so.scope?so.scope.split(" "):["editor"];if(so.any)for(let uo of ao){let co=ro[uo]||(ro[uo]=Object.create(null));co._any||(co._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let fo in co)co[fo].run.push(so.any)}let lo=so[to]||so.key;if(lo)for(let uo of ao)io(uo,lo,so.run,so.preventDefault,so.stopPropagation),so.shift&&io(uo,"Shift-"+lo,so.shift,so.preventDefault,so.stopPropagation)}return ro}function runHandlers(eo,to,ro,no){let oo=keyName(to),io=codePointAt(oo,0),so=codePointSize(io)==oo.length&&oo!=" ",ao="",lo=!1,uo=!1,co=!1;storedPrefix&&storedPrefix.view==ro&&storedPrefix.scope==no&&(ao=storedPrefix.prefix+" ",modifierCodes.indexOf(to.keyCode)<0&&(uo=!0,storedPrefix=null));let fo=new Set,ho=bo=>{if(bo){for(let xo of bo.run)if(!fo.has(xo)&&(fo.add(xo),xo(ro,to)))return bo.stopPropagation&&(co=!0),!0;bo.preventDefault&&(bo.stopPropagation&&(co=!0),uo=!0)}return!1},po=eo[no],go,vo;return po&&(ho(po[ao+modifiers(oo,to,!so)])?lo=!0:so&&(to.altKey||to.metaKey||to.ctrlKey)&&!(browser.windows&&to.ctrlKey&&to.altKey)&&(go=base[to.keyCode])&&go!=oo?(ho(po[ao+modifiers(go,to,!0)])||to.shiftKey&&(vo=shift[to.keyCode])!=oo&&vo!=go&&ho(po[ao+modifiers(vo,to,!1)]))&&(lo=!0):so&&to.shiftKey&&ho(po[ao+modifiers(oo,to,!0)])&&(lo=!0),!lo&&ho(po._any)&&(lo=!0)),uo&&(lo=!0),lo&&co&&to.stopPropagation(),lo}class RectangleMarker{constructor(to,ro,no,oo,io){this.className=to,this.left=ro,this.top=no,this.width=oo,this.height=io}draw(){let to=document.createElement("div");return to.className=this.className,this.adjust(to),to}update(to,ro){return ro.className!=this.className?!1:(this.adjust(to),!0)}adjust(to){to.style.left=this.left+"px",to.style.top=this.top+"px",this.width!=null&&(to.style.width=this.width+"px"),to.style.height=this.height+"px"}eq(to){return this.left==to.left&&this.top==to.top&&this.width==to.width&&this.height==to.height&&this.className==to.className}static forRange(to,ro,no){if(no.empty){let oo=to.coordsAtPos(no.head,no.assoc||1);if(!oo)return[];let io=getBase(to);return[new RectangleMarker(ro,oo.left-io.left,oo.top-io.top,null,oo.bottom-oo.top)]}else return rectanglesForRange(to,ro,no)}}function getBase(eo){let to=eo.scrollDOM.getBoundingClientRect();return{left:(eo.textDirection==Direction.LTR?to.left:to.right-eo.scrollDOM.clientWidth*eo.scaleX)-eo.scrollDOM.scrollLeft*eo.scaleX,top:to.top-eo.scrollDOM.scrollTop*eo.scaleY}}function wrappedLine(eo,to,ro){let no=EditorSelection.cursor(to);return{from:Math.max(ro.from,eo.moveToLineBoundary(no,!1,!0).from),to:Math.min(ro.to,eo.moveToLineBoundary(no,!0,!0).from),type:BlockType.Text}}function rectanglesForRange(eo,to,ro){if(ro.to<=eo.viewport.from||ro.from>=eo.viewport.to)return[];let no=Math.max(ro.from,eo.viewport.from),oo=Math.min(ro.to,eo.viewport.to),io=eo.textDirection==Direction.LTR,so=eo.contentDOM,ao=so.getBoundingClientRect(),lo=getBase(eo),uo=so.querySelector(".cm-line"),co=uo&&window.getComputedStyle(uo),fo=ao.left+(co?parseInt(co.paddingLeft)+Math.min(0,parseInt(co.textIndent)):0),ho=ao.right-(co?parseInt(co.paddingRight):0),po=blockAt(eo,no),go=blockAt(eo,oo),vo=po.type==BlockType.Text?po:null,bo=go.type==BlockType.Text?go:null;if(vo&&(eo.lineWrapping||po.widgetLineBreaks)&&(vo=wrappedLine(eo,no,vo)),bo&&(eo.lineWrapping||go.widgetLineBreaks)&&(bo=wrappedLine(eo,oo,bo)),vo&&bo&&vo.from==bo.from)return _o(Eo(ro.from,ro.to,vo));{let To=vo?Eo(ro.from,null,vo):So(po,!1),wo=bo?Eo(null,ro.to,bo):So(go,!0),Co=[];return(vo||po).to<(bo||go).from-(vo&&bo?1:0)||po.widgetLineBreaks>1&&To.bottom+eo.defaultLineHeight/2Mo&&jo.from=$o)break;Uo>Fo&&No(Math.max(qo,Fo),To==null&&qo<=Mo,Math.min(Uo,$o),wo==null&&Uo>=Do,Ho.dir)}if(Fo=Lo.to+1,Fo>=$o)break}return Ro.length==0&&No(Mo,To==null,Do,wo==null,eo.textDirection),{top:Oo,bottom:Ao,horizontal:Ro}}function So(To,wo){let Co=ao.top+(wo?To.top:To.bottom);return{top:Co,bottom:Co,horizontal:[]}}}function sameMarker(eo,to){return eo.constructor==to.constructor&&eo.eq(to)}class LayerView{constructor(to,ro){this.view=to,this.layer=ro,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=to.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),ro.above&&this.dom.classList.add("cm-layer-above"),ro.class&&this.dom.classList.add(ro.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(to.state),to.requestMeasure(this.measureReq),ro.mount&&ro.mount(this.dom,to)}update(to){to.startState.facet(layerOrder)!=to.state.facet(layerOrder)&&this.setOrder(to.state),(this.layer.update(to,this.dom)||to.geometryChanged)&&(this.scale(),to.view.requestMeasure(this.measureReq))}docViewUpdate(to){this.layer.updateOnDocViewUpdate!==!1&&to.requestMeasure(this.measureReq)}setOrder(to){let ro=0,no=to.facet(layerOrder);for(;ro!sameMarker(ro,this.drawn[no]))){let ro=this.dom.firstChild,no=0;for(let oo of to)oo.update&&ro&&oo.constructor&&this.drawn[no].constructor&&oo.update(ro,this.drawn[no])?(ro=ro.nextSibling,no++):this.dom.insertBefore(oo.draw(),ro);for(;ro;){let oo=ro.nextSibling;ro.remove(),ro=oo}this.drawn=to}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const layerOrder=Facet.define();function layer(eo){return[ViewPlugin.define(to=>new LayerView(to,eo)),layerOrder.of(eo)]}const CanHidePrimary=!browser.ios,selectionConfig=Facet.define({combine(eo){return combineConfig(eo,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(to,ro)=>Math.min(to,ro),drawRangeCursor:(to,ro)=>to||ro})}});function drawSelection(eo={}){return[selectionConfig.of(eo),cursorLayer,selectionLayer,hideNativeSelection,nativeSelectionHidden.of(!0)]}function configChanged(eo){return eo.startState.facet(selectionConfig)!=eo.state.facet(selectionConfig)}const cursorLayer=layer({above:!0,markers(eo){let{state:to}=eo,ro=to.facet(selectionConfig),no=[];for(let oo of to.selection.ranges){let io=oo==to.selection.main;if(oo.empty?!io||CanHidePrimary:ro.drawRangeCursor){let so=io?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",ao=oo.empty?oo:EditorSelection.cursor(oo.head,oo.head>oo.anchor?-1:1);for(let lo of RectangleMarker.forRange(eo,so,ao))no.push(lo)}}return no},update(eo,to){eo.transactions.some(no=>no.selection)&&(to.style.animationName=to.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let ro=configChanged(eo);return ro&&setBlinkRate(eo.state,to),eo.docChanged||eo.selectionSet||ro},mount(eo,to){setBlinkRate(to.state,eo)},class:"cm-cursorLayer"});function setBlinkRate(eo,to){to.style.animationDuration=eo.facet(selectionConfig).cursorBlinkRate+"ms"}const selectionLayer=layer({above:!1,markers(eo){return eo.state.selection.ranges.map(to=>to.empty?[]:RectangleMarker.forRange(eo,"cm-selectionBackground",to)).reduce((to,ro)=>to.concat(ro))},update(eo,to){return eo.docChanged||eo.selectionSet||eo.viewportChanged||configChanged(eo)},class:"cm-selectionLayer"}),themeSpec={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};CanHidePrimary&&(themeSpec[".cm-line"].caretColor="transparent !important",themeSpec[".cm-content"]={caretColor:"transparent !important"});const hideNativeSelection=Prec.highest(EditorView.theme(themeSpec)),setDropCursorPos=StateEffect.define({map(eo,to){return eo==null?null:to.mapPos(eo)}}),dropCursorPos=StateField.define({create(){return null},update(eo,to){return eo!=null&&(eo=to.changes.mapPos(eo)),to.effects.reduce((ro,no)=>no.is(setDropCursorPos)?no.value:ro,eo)}}),drawDropCursor=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(eo){var to;let ro=eo.state.field(dropCursorPos);ro==null?this.cursor!=null&&((to=this.cursor)===null||to===void 0||to.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(eo.startState.field(dropCursorPos)!=ro||eo.docChanged||eo.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:eo}=this,to=eo.state.field(dropCursorPos),ro=to!=null&&eo.coordsAtPos(to);if(!ro)return null;let no=eo.scrollDOM.getBoundingClientRect();return{left:ro.left-no.left+eo.scrollDOM.scrollLeft*eo.scaleX,top:ro.top-no.top+eo.scrollDOM.scrollTop*eo.scaleY,height:ro.bottom-ro.top}}drawCursor(eo){if(this.cursor){let{scaleX:to,scaleY:ro}=this.view;eo?(this.cursor.style.left=eo.left/to+"px",this.cursor.style.top=eo.top/ro+"px",this.cursor.style.height=eo.height/ro+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(eo){this.view.state.field(dropCursorPos)!=eo&&this.view.dispatch({effects:setDropCursorPos.of(eo)})}},{eventObservers:{dragover(eo){this.setDropPos(this.view.posAtCoords({x:eo.clientX,y:eo.clientY}))},dragleave(eo){(eo.target==this.view.contentDOM||!this.view.contentDOM.contains(eo.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function dropCursor(){return[dropCursorPos,drawDropCursor]}function iterMatches(eo,to,ro,no,oo){to.lastIndex=0;for(let io=eo.iterRange(ro,no),so=ro,ao;!io.next().done;so+=io.value.length)if(!io.lineBreak)for(;ao=to.exec(io.value);)oo(so+ao.index,ao)}function matchRanges(eo,to){let ro=eo.visibleRanges;if(ro.length==1&&ro[0].from==eo.viewport.from&&ro[0].to==eo.viewport.to)return ro;let no=[];for(let{from:oo,to:io}of ro)oo=Math.max(eo.state.doc.lineAt(oo).from,oo-to),io=Math.min(eo.state.doc.lineAt(io).to,io+to),no.length&&no[no.length-1].to>=oo?no[no.length-1].to=io:no.push({from:oo,to:io});return no}class MatchDecorator{constructor(to){const{regexp:ro,decoration:no,decorate:oo,boundary:io,maxLength:so=1e3}=to;if(!ro.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=ro,oo)this.addMatch=(ao,lo,uo,co)=>oo(co,uo,uo+ao[0].length,ao,lo);else if(typeof no=="function")this.addMatch=(ao,lo,uo,co)=>{let fo=no(ao,lo,uo);fo&&co(uo,uo+ao[0].length,fo)};else if(no)this.addMatch=(ao,lo,uo,co)=>co(uo,uo+ao[0].length,no);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=io,this.maxLength=so}createDeco(to){let ro=new RangeSetBuilder,no=ro.add.bind(ro);for(let{from:oo,to:io}of matchRanges(to,this.maxLength))iterMatches(to.state.doc,this.regexp,oo,io,(so,ao)=>this.addMatch(ao,to,so,no));return ro.finish()}updateDeco(to,ro){let no=1e9,oo=-1;return to.docChanged&&to.changes.iterChanges((io,so,ao,lo)=>{lo>to.view.viewport.from&&ao1e3?this.createDeco(to.view):oo>-1?this.updateRange(to.view,ro.map(to.changes),no,oo):ro}updateRange(to,ro,no,oo){for(let io of to.visibleRanges){let so=Math.max(io.from,no),ao=Math.min(io.to,oo);if(ao>so){let lo=to.state.doc.lineAt(so),uo=lo.tolo.from;so--)if(this.boundary.test(lo.text[so-1-lo.from])){co=so;break}for(;aoho.push(xo.range(vo,bo));if(lo==uo)for(this.regexp.lastIndex=co-lo.from;(po=this.regexp.exec(lo.text))&&po.indexthis.addMatch(bo,to,vo,go));ro=ro.update({filterFrom:co,filterTo:fo,filter:(vo,bo)=>vofo,add:ho})}}return ro}}const UnicodeRegexpSupport=/x/.unicode!=null?"gu":"g",Specials=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,UnicodeRegexpSupport),Names={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let _supportsTabSize=null;function supportsTabSize(){var eo;if(_supportsTabSize==null&&typeof document<"u"&&document.body){let to=document.body.style;_supportsTabSize=((eo=to.tabSize)!==null&&eo!==void 0?eo:to.MozTabSize)!=null}return _supportsTabSize||!1}const specialCharConfig=Facet.define({combine(eo){let to=combineConfig(eo,{render:null,specialChars:Specials,addSpecialChars:null});return(to.replaceTabs=!supportsTabSize())&&(to.specialChars=new RegExp(" |"+to.specialChars.source,UnicodeRegexpSupport)),to.addSpecialChars&&(to.specialChars=new RegExp(to.specialChars.source+"|"+to.addSpecialChars.source,UnicodeRegexpSupport)),to}});function highlightSpecialChars(eo={}){return[specialCharConfig.of(eo),specialCharPlugin()]}let _plugin=null;function specialCharPlugin(){return _plugin||(_plugin=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.decorations=Decoration.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(eo.state.facet(specialCharConfig)),this.decorations=this.decorator.createDeco(eo)}makeDecorator(eo){return new MatchDecorator({regexp:eo.specialChars,decoration:(to,ro,no)=>{let{doc:oo}=ro.state,io=codePointAt(to[0],0);if(io==9){let so=oo.lineAt(no),ao=ro.state.tabSize,lo=countColumn(so.text,ao,no-so.from);return Decoration.replace({widget:new TabWidget((ao-lo%ao)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[io]||(this.decorationCache[io]=Decoration.replace({widget:new SpecialCharWidget(eo,io)}))},boundary:eo.replaceTabs?void 0:/[^]/})}update(eo){let to=eo.state.facet(specialCharConfig);eo.startState.facet(specialCharConfig)!=to?(this.decorator=this.makeDecorator(to),this.decorations=this.decorator.createDeco(eo.view)):this.decorations=this.decorator.updateDeco(eo,this.decorations)}},{decorations:eo=>eo.decorations}))}const DefaultPlaceholder="•";function placeholder$1(eo){return eo>=32?DefaultPlaceholder:eo==10?"␤":String.fromCharCode(9216+eo)}class SpecialCharWidget extends WidgetType{constructor(to,ro){super(),this.options=to,this.code=ro}eq(to){return to.code==this.code}toDOM(to){let ro=placeholder$1(this.code),no=to.state.phrase("Control character")+" "+(Names[this.code]||"0x"+this.code.toString(16)),oo=this.options.render&&this.options.render(this.code,no,ro);if(oo)return oo;let io=document.createElement("span");return io.textContent=ro,io.title=no,io.setAttribute("aria-label",no),io.className="cm-specialChar",io}ignoreEvent(){return!1}}class TabWidget extends WidgetType{constructor(to){super(),this.width=to}eq(to){return to.width==this.width}toDOM(){let to=document.createElement("span");return to.textContent=" ",to.className="cm-tab",to.style.width=this.width+"px",to}ignoreEvent(){return!1}}function highlightActiveLine(){return activeLineHighlighter}const lineDeco=Decoration.line({class:"cm-activeLine"}),activeLineHighlighter=ViewPlugin.fromClass(class{constructor(eo){this.decorations=this.getDeco(eo)}update(eo){(eo.docChanged||eo.selectionSet)&&(this.decorations=this.getDeco(eo.view))}getDeco(eo){let to=-1,ro=[];for(let no of eo.state.selection.ranges){let oo=eo.lineBlockAt(no.head);oo.from>to&&(ro.push(lineDeco.range(oo.from)),to=oo.from)}return Decoration.set(ro)}},{decorations:eo=>eo.decorations});class Placeholder extends WidgetType{constructor(to){super(),this.content=to}toDOM(){let to=document.createElement("span");return to.className="cm-placeholder",to.style.pointerEvents="none",to.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?to.setAttribute("aria-label","placeholder "+this.content):to.setAttribute("aria-hidden","true"),to}coordsAt(to){let ro=to.firstChild?clientRectsFor(to.firstChild):[];if(!ro.length)return null;let no=window.getComputedStyle(to.parentNode),oo=flattenRect(ro[0],no.direction!="rtl"),io=parseInt(no.lineHeight);return oo.bottom-oo.top>io*1.5?{left:oo.left,right:oo.right,top:oo.top,bottom:oo.top+io}:oo}ignoreEvent(){return!1}}function placeholder(eo){return ViewPlugin.fromClass(class{constructor(to){this.view=to,this.placeholder=eo?Decoration.set([Decoration.widget({widget:new Placeholder(eo),side:1}).range(0)]):Decoration.none}get decorations(){return this.view.state.doc.length?Decoration.none:this.placeholder}},{decorations:to=>to.decorations})}const MaxOff=2e3;function rectangleFor(eo,to,ro){let no=Math.min(to.line,ro.line),oo=Math.max(to.line,ro.line),io=[];if(to.off>MaxOff||ro.off>MaxOff||to.col<0||ro.col<0){let so=Math.min(to.off,ro.off),ao=Math.max(to.off,ro.off);for(let lo=no;lo<=oo;lo++){let uo=eo.doc.line(lo);uo.length<=ao&&io.push(EditorSelection.range(uo.from+so,uo.to+ao))}}else{let so=Math.min(to.col,ro.col),ao=Math.max(to.col,ro.col);for(let lo=no;lo<=oo;lo++){let uo=eo.doc.line(lo),co=findColumn(uo.text,so,eo.tabSize,!0);if(co<0)io.push(EditorSelection.cursor(uo.to));else{let fo=findColumn(uo.text,ao,eo.tabSize);io.push(EditorSelection.range(uo.from+co,uo.from+fo))}}}return io}function absoluteColumn(eo,to){let ro=eo.coordsAtPos(eo.viewport.from);return ro?Math.round(Math.abs((ro.left-to)/eo.defaultCharacterWidth)):-1}function getPos(eo,to){let ro=eo.posAtCoords({x:to.clientX,y:to.clientY},!1),no=eo.state.doc.lineAt(ro),oo=ro-no.from,io=oo>MaxOff?-1:oo==no.length?absoluteColumn(eo,to.clientX):countColumn(no.text,eo.state.tabSize,ro-no.from);return{line:no.number,col:io,off:oo}}function rectangleSelectionStyle(eo,to){let ro=getPos(eo,to),no=eo.state.selection;return ro?{update(oo){if(oo.docChanged){let io=oo.changes.mapPos(oo.startState.doc.line(ro.line).from),so=oo.state.doc.lineAt(io);ro={line:so.number,col:ro.col,off:Math.min(ro.off,so.length)},no=no.map(oo.changes)}},get(oo,io,so){let ao=getPos(eo,oo);if(!ao)return no;let lo=rectangleFor(eo.state,ro,ao);return lo.length?so?EditorSelection.create(lo.concat(no.ranges)):EditorSelection.create(lo):no}}:null}function rectangularSelection(eo){let to=(eo==null?void 0:eo.eventFilter)||(ro=>ro.altKey&&ro.button==0);return EditorView.mouseSelectionStyle.of((ro,no)=>to(no)?rectangleSelectionStyle(ro,no):null)}const keys={Alt:[18,eo=>!!eo.altKey],Control:[17,eo=>!!eo.ctrlKey],Shift:[16,eo=>!!eo.shiftKey],Meta:[91,eo=>!!eo.metaKey]},showCrosshair={style:"cursor: crosshair"};function crosshairCursor(eo={}){let[to,ro]=keys[eo.key||"Alt"],no=ViewPlugin.fromClass(class{constructor(oo){this.view=oo,this.isDown=!1}set(oo){this.isDown!=oo&&(this.isDown=oo,this.view.update([]))}},{eventObservers:{keydown(oo){this.set(oo.keyCode==to||ro(oo))},keyup(oo){(oo.keyCode==to||!ro(oo))&&this.set(!1)},mousemove(oo){this.set(ro(oo))}}});return[no,EditorView.contentAttributes.of(oo=>{var io;return!((io=oo.plugin(no))===null||io===void 0)&&io.isDown?showCrosshair:null})]}const Outside="-10000px";class TooltipViewManager{constructor(to,ro,no,oo){this.facet=ro,this.createTooltipView=no,this.removeTooltipView=oo,this.input=to.state.facet(ro),this.tooltips=this.input.filter(so=>so);let io=null;this.tooltipViews=this.tooltips.map(so=>io=no(so,io))}update(to,ro){var no;let oo=to.state.facet(this.facet),io=oo.filter(lo=>lo);if(oo===this.input){for(let lo of this.tooltipViews)lo.update&&lo.update(to);return!1}let so=[],ao=ro?[]:null;for(let lo=0;loro[uo]=lo),ro.length=ao.length),this.input=oo,this.tooltips=io,this.tooltipViews=so,!0}}function windowSpace(eo){let{win:to}=eo;return{top:0,left:0,bottom:to.innerHeight,right:to.innerWidth}}const tooltipConfig=Facet.define({combine:eo=>{var to,ro,no;return{position:browser.ios?"absolute":((to=eo.find(oo=>oo.position))===null||to===void 0?void 0:to.position)||"fixed",parent:((ro=eo.find(oo=>oo.parent))===null||ro===void 0?void 0:ro.parent)||null,tooltipSpace:((no=eo.find(oo=>oo.tooltipSpace))===null||no===void 0?void 0:no.tooltipSpace)||windowSpace}}}),knownHeight=new WeakMap,tooltipPlugin=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let to=eo.state.facet(tooltipConfig);this.position=to.position,this.parent=to.parent,this.classes=eo.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new TooltipViewManager(eo,showTooltip,(ro,no)=>this.createTooltip(ro,no),ro=>{this.resizeObserver&&this.resizeObserver.unobserve(ro.dom),ro.dom.remove()}),this.above=this.manager.tooltips.map(ro=>!!ro.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(ro=>{Date.now()>this.lastTransaction-50&&ro.length>0&&ro[ro.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),eo.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let eo of this.manager.tooltipViews)this.intersectionObserver.observe(eo.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(eo){eo.transactions.length&&(this.lastTransaction=Date.now());let to=this.manager.update(eo,this.above);to&&this.observeIntersection();let ro=to||eo.geometryChanged,no=eo.state.facet(tooltipConfig);if(no.position!=this.position&&!this.madeAbsolute){this.position=no.position;for(let oo of this.manager.tooltipViews)oo.dom.style.position=this.position;ro=!0}if(no.parent!=this.parent){this.parent&&this.container.remove(),this.parent=no.parent,this.createContainer();for(let oo of this.manager.tooltipViews)this.container.appendChild(oo.dom);ro=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);ro&&this.maybeMeasure()}createTooltip(eo,to){let ro=eo.create(this.view),no=to?to.dom:null;if(ro.dom.classList.add("cm-tooltip"),eo.arrow&&!ro.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let oo=document.createElement("div");oo.className="cm-tooltip-arrow",ro.dom.insertBefore(oo,no)}return ro.dom.style.position=this.position,ro.dom.style.top=Outside,ro.dom.style.left="0px",this.container.insertBefore(ro.dom,no),ro.mount&&ro.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(ro.dom),ro}destroy(){var eo,to,ro;this.view.win.removeEventListener("resize",this.measureSoon);for(let no of this.manager.tooltipViews)no.dom.remove(),(eo=no.destroy)===null||eo===void 0||eo.call(no);this.parent&&this.container.remove(),(to=this.resizeObserver)===null||to===void 0||to.disconnect(),(ro=this.intersectionObserver)===null||ro===void 0||ro.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let eo=this.view.dom.getBoundingClientRect(),to=1,ro=1,no=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:oo}=this.manager.tooltipViews[0];if(browser.gecko)no=oo.offsetParent!=this.container.ownerDocument.body;else if(oo.style.top==Outside&&oo.style.left=="0px"){let io=oo.getBoundingClientRect();no=Math.abs(io.top+1e4)>1||Math.abs(io.left)>1}}if(no||this.position=="absolute")if(this.parent){let oo=this.parent.getBoundingClientRect();oo.width&&oo.height&&(to=oo.width/this.parent.offsetWidth,ro=oo.height/this.parent.offsetHeight)}else({scaleX:to,scaleY:ro}=this.view.viewState);return{editor:eo,parent:this.parent?this.container.getBoundingClientRect():eo,pos:this.manager.tooltips.map((oo,io)=>{let so=this.manager.tooltipViews[io];return so.getCoords?so.getCoords(oo.pos):this.view.coordsAtPos(oo.pos)}),size:this.manager.tooltipViews.map(({dom:oo})=>oo.getBoundingClientRect()),space:this.view.state.facet(tooltipConfig).tooltipSpace(this.view),scaleX:to,scaleY:ro,makeAbsolute:no}}writeMeasure(eo){var to;if(eo.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let ao of this.manager.tooltipViews)ao.dom.style.position="absolute"}let{editor:ro,space:no,scaleX:oo,scaleY:io}=eo,so=[];for(let ao=0;ao=Math.min(ro.bottom,no.bottom)||fo.rightMath.min(ro.right,no.right)+.1){co.style.top=Outside;continue}let po=lo.arrow?uo.dom.querySelector(".cm-tooltip-arrow"):null,go=po?7:0,vo=ho.right-ho.left,bo=(to=knownHeight.get(uo))!==null&&to!==void 0?to:ho.bottom-ho.top,xo=uo.offset||noOffset,_o=this.view.textDirection==Direction.LTR,Eo=ho.width>no.right-no.left?_o?no.left:no.right-ho.width:_o?Math.min(fo.left-(po?14:0)+xo.x,no.right-vo):Math.max(no.left,fo.left-vo+(po?14:0)-xo.x),So=this.above[ao];!lo.strictSide&&(So?fo.top-(ho.bottom-ho.top)-xo.yno.bottom)&&So==no.bottom-fo.bottom>fo.top-no.top&&(So=this.above[ao]=!So);let To=(So?fo.top-no.top:no.bottom-fo.bottom)-go;if(ToEo&&Oo.topwo&&(wo=So?Oo.top-bo-2-go:Oo.bottom+go+2);if(this.position=="absolute"?(co.style.top=(wo-eo.parent.top)/io+"px",co.style.left=(Eo-eo.parent.left)/oo+"px"):(co.style.top=wo/io+"px",co.style.left=Eo/oo+"px"),po){let Oo=fo.left+(_o?xo.x:-xo.x)-(Eo+14-7);po.style.left=Oo/oo+"px"}uo.overlap!==!0&&so.push({left:Eo,top:wo,right:Co,bottom:wo+bo}),co.classList.toggle("cm-tooltip-above",So),co.classList.toggle("cm-tooltip-below",!So),uo.positioned&&uo.positioned(eo.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let eo of this.manager.tooltipViews)eo.dom.style.top=Outside}},{eventObservers:{scroll(){this.maybeMeasure()}}}),baseTheme$5=EditorView.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),noOffset={x:0,y:0},showTooltip=Facet.define({enables:[tooltipPlugin,baseTheme$5]}),showHoverTooltip=Facet.define({combine:eo=>eo.reduce((to,ro)=>to.concat(ro),[])});class HoverTooltipHost{static create(to){return new HoverTooltipHost(to)}constructor(to){this.view=to,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new TooltipViewManager(to,showHoverTooltip,(ro,no)=>this.createHostedView(ro,no),ro=>ro.dom.remove())}createHostedView(to,ro){let no=to.create(this.view);return no.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(no.dom,ro?ro.dom.nextSibling:this.dom.firstChild),this.mounted&&no.mount&&no.mount(this.view),no}mount(to){for(let ro of this.manager.tooltipViews)ro.mount&&ro.mount(to);this.mounted=!0}positioned(to){for(let ro of this.manager.tooltipViews)ro.positioned&&ro.positioned(to)}update(to){this.manager.update(to)}destroy(){var to;for(let ro of this.manager.tooltipViews)(to=ro.destroy)===null||to===void 0||to.call(ro)}passProp(to){let ro;for(let no of this.manager.tooltipViews){let oo=no[to];if(oo!==void 0){if(ro===void 0)ro=oo;else if(ro!==oo)return}}return ro}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const showHoverTooltipHost=showTooltip.compute([showHoverTooltip],eo=>{let to=eo.facet(showHoverTooltip);return to.length===0?null:{pos:Math.min(...to.map(ro=>ro.pos)),end:Math.max(...to.map(ro=>{var no;return(no=ro.end)!==null&&no!==void 0?no:ro.pos})),create:HoverTooltipHost.create,above:to[0].above,arrow:to.some(ro=>ro.arrow)}});class HoverPlugin{constructor(to,ro,no,oo,io){this.view=to,this.source=ro,this.field=no,this.setHover=oo,this.hoverTime=io,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:to.dom,time:0},this.checkHover=this.checkHover.bind(this),to.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),to.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let to=Date.now()-this.lastMove.time;toao.bottom||ro.xao.right+to.defaultCharacterWidth)return;let lo=to.bidiSpans(to.state.doc.lineAt(oo)).find(co=>co.from<=oo&&co.to>=oo),uo=lo&&lo.dir==Direction.RTL?-1:1;io=ro.x{this.pending==ao&&(this.pending=null,lo&&!(Array.isArray(lo)&&!lo.length)&&to.dispatch({effects:this.setHover.of(Array.isArray(lo)?lo:[lo])}))},lo=>logException(to.state,lo,"hover tooltip"))}else so&&!(Array.isArray(so)&&!so.length)&&to.dispatch({effects:this.setHover.of(Array.isArray(so)?so:[so])})}get tooltip(){let to=this.view.plugin(tooltipPlugin),ro=to?to.manager.tooltips.findIndex(no=>no.create==HoverTooltipHost.create):-1;return ro>-1?to.manager.tooltipViews[ro]:null}mousemove(to){var ro,no;this.lastMove={x:to.clientX,y:to.clientY,target:to.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:oo,tooltip:io}=this;if(oo.length&&io&&!isInTooltip(io.dom,to)||this.pending){let{pos:so}=oo[0]||this.pending,ao=(no=(ro=oo[0])===null||ro===void 0?void 0:ro.end)!==null&&no!==void 0?no:so;(so==ao?this.view.posAtCoords(this.lastMove)!=so:!isOverRange(this.view,so,ao,to.clientX,to.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(to){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:ro}=this;if(ro.length){let{tooltip:no}=this;no&&no.dom.contains(to.relatedTarget)?this.watchTooltipLeave(no.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(to){let ro=no=>{to.removeEventListener("mouseleave",ro),this.active.length&&!this.view.dom.contains(no.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};to.addEventListener("mouseleave",ro)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const tooltipMargin=4;function isInTooltip(eo,to){let ro=eo.getBoundingClientRect();return to.clientX>=ro.left-tooltipMargin&&to.clientX<=ro.right+tooltipMargin&&to.clientY>=ro.top-tooltipMargin&&to.clientY<=ro.bottom+tooltipMargin}function isOverRange(eo,to,ro,no,oo,io){let so=eo.scrollDOM.getBoundingClientRect(),ao=eo.documentTop+eo.documentPadding.top+eo.contentHeight;if(so.left>no||so.rightoo||Math.min(so.bottom,ao)=to&&lo<=ro}function hoverTooltip(eo,to={}){let ro=StateEffect.define(),no=StateField.define({create(){return[]},update(oo,io){if(oo.length&&(to.hideOnChange&&(io.docChanged||io.selection)?oo=[]:to.hideOn&&(oo=oo.filter(so=>!to.hideOn(io,so))),io.docChanged)){let so=[];for(let ao of oo){let lo=io.changes.mapPos(ao.pos,-1,MapMode.TrackDel);if(lo!=null){let uo=Object.assign(Object.create(null),ao);uo.pos=lo,uo.end!=null&&(uo.end=io.changes.mapPos(uo.end)),so.push(uo)}}oo=so}for(let so of io.effects)so.is(ro)&&(oo=so.value),so.is(closeHoverTooltipEffect)&&(oo=[]);return oo},provide:oo=>showHoverTooltip.from(oo)});return[no,ViewPlugin.define(oo=>new HoverPlugin(oo,eo,no,ro,to.hoverTime||300)),showHoverTooltipHost]}function getTooltip(eo,to){let ro=eo.plugin(tooltipPlugin);if(!ro)return null;let no=ro.manager.tooltips.indexOf(to);return no<0?null:ro.manager.tooltipViews[no]}const closeHoverTooltipEffect=StateEffect.define(),panelConfig=Facet.define({combine(eo){let to,ro;for(let no of eo)to=to||no.topContainer,ro=ro||no.bottomContainer;return{topContainer:to,bottomContainer:ro}}});function getPanel(eo,to){let ro=eo.plugin(panelPlugin),no=ro?ro.specs.indexOf(to):-1;return no>-1?ro.panels[no]:null}const panelPlugin=ViewPlugin.fromClass(class{constructor(eo){this.input=eo.state.facet(showPanel),this.specs=this.input.filter(ro=>ro),this.panels=this.specs.map(ro=>ro(eo));let to=eo.state.facet(panelConfig);this.top=new PanelGroup(eo,!0,to.topContainer),this.bottom=new PanelGroup(eo,!1,to.bottomContainer),this.top.sync(this.panels.filter(ro=>ro.top)),this.bottom.sync(this.panels.filter(ro=>!ro.top));for(let ro of this.panels)ro.dom.classList.add("cm-panel"),ro.mount&&ro.mount()}update(eo){let to=eo.state.facet(panelConfig);this.top.container!=to.topContainer&&(this.top.sync([]),this.top=new PanelGroup(eo.view,!0,to.topContainer)),this.bottom.container!=to.bottomContainer&&(this.bottom.sync([]),this.bottom=new PanelGroup(eo.view,!1,to.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let ro=eo.state.facet(showPanel);if(ro!=this.input){let no=ro.filter(lo=>lo),oo=[],io=[],so=[],ao=[];for(let lo of no){let uo=this.specs.indexOf(lo),co;uo<0?(co=lo(eo.view),ao.push(co)):(co=this.panels[uo],co.update&&co.update(eo)),oo.push(co),(co.top?io:so).push(co)}this.specs=no,this.panels=oo,this.top.sync(io),this.bottom.sync(so);for(let lo of ao)lo.dom.classList.add("cm-panel"),lo.mount&&lo.mount()}else for(let no of this.panels)no.update&&no.update(eo)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:eo=>EditorView.scrollMargins.of(to=>{let ro=to.plugin(eo);return ro&&{top:ro.top.scrollMargin(),bottom:ro.bottom.scrollMargin()}})});class PanelGroup{constructor(to,ro,no){this.view=to,this.top=ro,this.container=no,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(to){for(let ro of this.panels)ro.destroy&&to.indexOf(ro)<0&&ro.destroy();this.panels=to,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let ro=this.container||this.view.dom;ro.insertBefore(this.dom,this.top?ro.firstChild:null)}let to=this.dom.firstChild;for(let ro of this.panels)if(ro.dom.parentNode==this.dom){for(;to!=ro.dom;)to=rm(to);to=to.nextSibling}else this.dom.insertBefore(ro.dom,to);for(;to;)to=rm(to)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let to of this.classes.split(" "))to&&this.container.classList.remove(to);for(let to of(this.classes=this.view.themeClasses).split(" "))to&&this.container.classList.add(to)}}}function rm(eo){let to=eo.nextSibling;return eo.remove(),to}const showPanel=Facet.define({enables:panelPlugin});class GutterMarker extends RangeValue{compare(to){return this==to||this.constructor==to.constructor&&this.eq(to)}eq(to){return!1}destroy(to){}}GutterMarker.prototype.elementClass="";GutterMarker.prototype.toDOM=void 0;GutterMarker.prototype.mapMode=MapMode.TrackBefore;GutterMarker.prototype.startSide=GutterMarker.prototype.endSide=-1;GutterMarker.prototype.point=!0;const gutterLineClass=Facet.define(),defaults$1={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>RangeSet.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},activeGutters=Facet.define();function gutter(eo){return[gutters(),activeGutters.of(Object.assign(Object.assign({},defaults$1),eo))]}const unfixGutters=Facet.define({combine:eo=>eo.some(to=>to)});function gutters(eo){let to=[gutterView];return eo&&eo.fixed===!1&&to.push(unfixGutters.of(!0)),to}const gutterView=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.prevViewport=eo.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=eo.state.facet(activeGutters).map(to=>new SingleGutterView(eo,to));for(let to of this.gutters)this.dom.appendChild(to.dom);this.fixed=!eo.state.facet(unfixGutters),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),eo.scrollDOM.insertBefore(this.dom,eo.contentDOM)}update(eo){if(this.updateGutters(eo)){let to=this.prevViewport,ro=eo.view.viewport,no=Math.min(to.to,ro.to)-Math.max(to.from,ro.from);this.syncGutters(no<(ro.to-ro.from)*.8)}eo.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(unfixGutters)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=eo.view.viewport}syncGutters(eo){let to=this.dom.nextSibling;eo&&this.dom.remove();let ro=RangeSet.iter(this.view.state.facet(gutterLineClass),this.view.viewport.from),no=[],oo=this.gutters.map(io=>new UpdateContext(io,this.view.viewport,-this.view.documentPadding.top));for(let io of this.view.viewportLineBlocks)if(no.length&&(no=[]),Array.isArray(io.type)){let so=!0;for(let ao of io.type)if(ao.type==BlockType.Text&&so){advanceCursor(ro,no,ao.from);for(let lo of oo)lo.line(this.view,ao,no);so=!1}else if(ao.widget)for(let lo of oo)lo.widget(this.view,ao)}else if(io.type==BlockType.Text){advanceCursor(ro,no,io.from);for(let so of oo)so.line(this.view,io,no)}else if(io.widget)for(let so of oo)so.widget(this.view,io);for(let io of oo)io.finish();eo&&this.view.scrollDOM.insertBefore(this.dom,to)}updateGutters(eo){let to=eo.startState.facet(activeGutters),ro=eo.state.facet(activeGutters),no=eo.docChanged||eo.heightChanged||eo.viewportChanged||!RangeSet.eq(eo.startState.facet(gutterLineClass),eo.state.facet(gutterLineClass),eo.view.viewport.from,eo.view.viewport.to);if(to==ro)for(let oo of this.gutters)oo.update(eo)&&(no=!0);else{no=!0;let oo=[];for(let io of ro){let so=to.indexOf(io);so<0?oo.push(new SingleGutterView(this.view,io)):(this.gutters[so].update(eo),oo.push(this.gutters[so]))}for(let io of this.gutters)io.dom.remove(),oo.indexOf(io)<0&&io.destroy();for(let io of oo)this.dom.appendChild(io.dom);this.gutters=oo}return no}destroy(){for(let eo of this.gutters)eo.destroy();this.dom.remove()}},{provide:eo=>EditorView.scrollMargins.of(to=>{let ro=to.plugin(eo);return!ro||ro.gutters.length==0||!ro.fixed?null:to.textDirection==Direction.LTR?{left:ro.dom.offsetWidth*to.scaleX}:{right:ro.dom.offsetWidth*to.scaleX}})});function asArray(eo){return Array.isArray(eo)?eo:[eo]}function advanceCursor(eo,to,ro){for(;eo.value&&eo.from<=ro;)eo.from==ro&&to.push(eo.value),eo.next()}class UpdateContext{constructor(to,ro,no){this.gutter=to,this.height=no,this.i=0,this.cursor=RangeSet.iter(to.markers,ro.from)}addElement(to,ro,no){let{gutter:oo}=this,io=(ro.top-this.height)/to.scaleY,so=ro.height/to.scaleY;if(this.i==oo.elements.length){let ao=new GutterElement(to,so,io,no);oo.elements.push(ao),oo.dom.appendChild(ao.dom)}else oo.elements[this.i].update(to,so,io,no);this.height=ro.bottom,this.i++}line(to,ro,no){let oo=[];advanceCursor(this.cursor,oo,ro.from),no.length&&(oo=oo.concat(no));let io=this.gutter.config.lineMarker(to,ro,oo);io&&oo.unshift(io);let so=this.gutter;oo.length==0&&!so.config.renderEmptyElements||this.addElement(to,ro,oo)}widget(to,ro){let no=this.gutter.config.widgetMarker(to,ro.widget,ro);no&&this.addElement(to,ro,[no])}finish(){let to=this.gutter;for(;to.elements.length>this.i;){let ro=to.elements.pop();to.dom.removeChild(ro.dom),ro.destroy()}}}class SingleGutterView{constructor(to,ro){this.view=to,this.config=ro,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let no in ro.domEventHandlers)this.dom.addEventListener(no,oo=>{let io=oo.target,so;if(io!=this.dom&&this.dom.contains(io)){for(;io.parentNode!=this.dom;)io=io.parentNode;let lo=io.getBoundingClientRect();so=(lo.top+lo.bottom)/2}else so=oo.clientY;let ao=to.lineBlockAtHeight(so-to.documentTop);ro.domEventHandlers[no](to,ao,oo)&&oo.preventDefault()});this.markers=asArray(ro.markers(to)),ro.initialSpacer&&(this.spacer=new GutterElement(to,0,0,[ro.initialSpacer(to)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(to){let ro=this.markers;if(this.markers=asArray(this.config.markers(to.view)),this.spacer&&this.config.updateSpacer){let oo=this.config.updateSpacer(this.spacer.markers[0],to);oo!=this.spacer.markers[0]&&this.spacer.update(to.view,0,0,[oo])}let no=to.view.viewport;return!RangeSet.eq(this.markers,ro,no.from,no.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(to):!1)}destroy(){for(let to of this.elements)to.destroy()}}class GutterElement{constructor(to,ro,no,oo){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(to,ro,no,oo)}update(to,ro,no,oo){this.height!=ro&&(this.height=ro,this.dom.style.height=ro+"px"),this.above!=no&&(this.dom.style.marginTop=(this.above=no)?no+"px":""),sameMarkers(this.markers,oo)||this.setMarkers(to,oo)}setMarkers(to,ro){let no="cm-gutterElement",oo=this.dom.firstChild;for(let io=0,so=0;;){let ao=so,lo=ioio(ao,lo,uo)||so(ao,lo,uo):so}return no}})}});class NumberMarker extends GutterMarker{constructor(to){super(),this.number=to}eq(to){return this.number==to.number}toDOM(){return document.createTextNode(this.number)}}function formatNumber(eo,to){return eo.state.facet(lineNumberConfig).formatNumber(to,eo.state)}const lineNumberGutter=activeGutters.compute([lineNumberConfig],eo=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(to){return to.state.facet(lineNumberMarkers)},lineMarker(to,ro,no){return no.some(oo=>oo.toDOM)?null:new NumberMarker(formatNumber(to,to.state.doc.lineAt(ro.from).number))},widgetMarker:()=>null,lineMarkerChange:to=>to.startState.facet(lineNumberConfig)!=to.state.facet(lineNumberConfig),initialSpacer(to){return new NumberMarker(formatNumber(to,maxLineNumber(to.state.doc.lines)))},updateSpacer(to,ro){let no=formatNumber(ro.view,maxLineNumber(ro.view.state.doc.lines));return no==to.number?to:new NumberMarker(no)},domEventHandlers:eo.facet(lineNumberConfig).domEventHandlers}));function lineNumbers(eo={}){return[lineNumberConfig.of(eo),gutters(),lineNumberGutter]}function maxLineNumber(eo){let to=9;for(;to{let to=[],ro=-1;for(let no of eo.selection.ranges){let oo=eo.doc.lineAt(no.head).from;oo>ro&&(ro=oo,to.push(activeLineGutterMarker.range(oo)))}return RangeSet.of(to)});function highlightActiveLineGutter(){return activeLineGutterHighlighter}const DefaultBufferLength=1024;let nextPropID=0,Range$1=class{constructor(to,ro){this.from=to,this.to=ro}};class NodeProp{constructor(to={}){this.id=nextPropID++,this.perNode=!!to.perNode,this.deserialize=to.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(to){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof to!="function"&&(to=NodeType.match(to)),ro=>{let no=to(ro);return no===void 0?null:[this,no]}}}NodeProp.closedBy=new NodeProp({deserialize:eo=>eo.split(" ")});NodeProp.openedBy=new NodeProp({deserialize:eo=>eo.split(" ")});NodeProp.group=new NodeProp({deserialize:eo=>eo.split(" ")});NodeProp.isolate=new NodeProp({deserialize:eo=>{if(eo&&eo!="rtl"&&eo!="ltr"&&eo!="auto")throw new RangeError("Invalid value for isolate: "+eo);return eo||"auto"}});NodeProp.contextHash=new NodeProp({perNode:!0});NodeProp.lookAhead=new NodeProp({perNode:!0});NodeProp.mounted=new NodeProp({perNode:!0});class MountedTree{constructor(to,ro,no){this.tree=to,this.overlay=ro,this.parser=no}static get(to){return to&&to.props&&to.props[NodeProp.mounted.id]}}const noProps=Object.create(null);class NodeType{constructor(to,ro,no,oo=0){this.name=to,this.props=ro,this.id=no,this.flags=oo}static define(to){let ro=to.props&&to.props.length?Object.create(null):noProps,no=(to.top?1:0)|(to.skipped?2:0)|(to.error?4:0)|(to.name==null?8:0),oo=new NodeType(to.name||"",ro,to.id,no);if(to.props){for(let io of to.props)if(Array.isArray(io)||(io=io(oo)),io){if(io[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");ro[io[0].id]=io[1]}}return oo}prop(to){return this.props[to.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(to){if(typeof to=="string"){if(this.name==to)return!0;let ro=this.prop(NodeProp.group);return ro?ro.indexOf(to)>-1:!1}return this.id==to}static match(to){let ro=Object.create(null);for(let no in to)for(let oo of no.split(" "))ro[oo]=to[no];return no=>{for(let oo=no.prop(NodeProp.group),io=-1;io<(oo?oo.length:0);io++){let so=ro[io<0?no.name:oo[io]];if(so)return so}}}}NodeType.none=new NodeType("",Object.create(null),0,8);class NodeSet{constructor(to){this.types=to;for(let ro=0;ro0;for(let lo=this.cursor(so|IterMode.IncludeAnonymous);;){let uo=!1;if(lo.from<=io&&lo.to>=oo&&(!ao&&lo.type.isAnonymous||ro(lo)!==!1)){if(lo.firstChild())continue;uo=!0}for(;uo&&no&&(ao||!lo.type.isAnonymous)&&no(lo),!lo.nextSibling();){if(!lo.parent())return;uo=!0}}}prop(to){return to.perNode?this.props?this.props[to.id]:void 0:this.type.prop(to)}get propValues(){let to=[];if(this.props)for(let ro in this.props)to.push([+ro,this.props[ro]]);return to}balance(to={}){return this.children.length<=8?this:balanceRange(NodeType.none,this.children,this.positions,0,this.children.length,0,this.length,(ro,no,oo)=>new Tree(this.type,ro,no,oo,this.propValues),to.makeTree||((ro,no,oo)=>new Tree(NodeType.none,ro,no,oo)))}static build(to){return buildTree(to)}}Tree.empty=new Tree(NodeType.none,[],[],0);class FlatBufferCursor{constructor(to,ro){this.buffer=to,this.index=ro}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new FlatBufferCursor(this.buffer,this.index)}}class TreeBuffer{constructor(to,ro,no){this.buffer=to,this.length=ro,this.set=no}get type(){return NodeType.none}toString(){let to=[];for(let ro=0;ro0));lo=so[lo+3]);return ao}slice(to,ro,no){let oo=this.buffer,io=new Uint16Array(ro-to),so=0;for(let ao=to,lo=0;ao=to&&roto;case 1:return ro<=to&&no>to;case 2:return no>to;case 4:return!0}}function resolveNode(eo,to,ro,no){for(var oo;eo.from==eo.to||(ro<1?eo.from>=to:eo.from>to)||(ro>-1?eo.to<=to:eo.to0?ao.length:-1;to!=uo;to+=ro){let co=ao[to],fo=lo[to]+so.from;if(checkSide(oo,no,fo,fo+co.length)){if(co instanceof TreeBuffer){if(io&IterMode.ExcludeBuffers)continue;let ho=co.findChild(0,co.buffer.length,ro,no-fo,oo);if(ho>-1)return new BufferNode(new BufferContext(so,co,to,fo),null,ho)}else if(io&IterMode.IncludeAnonymous||!co.type.isAnonymous||hasChild(co)){let ho;if(!(io&IterMode.IgnoreMounts)&&(ho=MountedTree.get(co))&&!ho.overlay)return new TreeNode(ho.tree,fo,to,so);let po=new TreeNode(co,fo,to,so);return io&IterMode.IncludeAnonymous||!po.type.isAnonymous?po:po.nextChild(ro<0?co.children.length-1:0,ro,no,oo)}}}if(io&IterMode.IncludeAnonymous||!so.type.isAnonymous||(so.index>=0?to=so.index+ro:to=ro<0?-1:so._parent._tree.children.length,so=so._parent,!so))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(to){return this.nextChild(0,1,to,2)}childBefore(to){return this.nextChild(this._tree.children.length-1,-1,to,-2)}enter(to,ro,no=0){let oo;if(!(no&IterMode.IgnoreOverlays)&&(oo=MountedTree.get(this._tree))&&oo.overlay){let io=to-this.from;for(let{from:so,to:ao}of oo.overlay)if((ro>0?so<=io:so=io:ao>io))return new TreeNode(oo.tree,oo.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,to,ro,no)}nextSignificantParent(){let to=this;for(;to.type.isAnonymous&&to._parent;)to=to._parent;return to}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function getChildren(eo,to,ro,no){let oo=eo.cursor(),io=[];if(!oo.firstChild())return io;if(ro!=null){for(let so=!1;!so;)if(so=oo.type.is(ro),!oo.nextSibling())return io}for(;;){if(no!=null&&oo.type.is(no))return io;if(oo.type.is(to)&&io.push(oo.node),!oo.nextSibling())return no==null?io:[]}}function matchNodeContext(eo,to,ro=to.length-1){for(let no=eo.parent;ro>=0;no=no.parent){if(!no)return!1;if(!no.type.isAnonymous){if(to[ro]&&to[ro]!=no.name)return!1;ro--}}return!0}class BufferContext{constructor(to,ro,no,oo){this.parent=to,this.buffer=ro,this.index=no,this.start=oo}}class BufferNode extends BaseNode{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(to,ro,no){super(),this.context=to,this._parent=ro,this.index=no,this.type=to.buffer.set.types[to.buffer.buffer[no]]}child(to,ro,no){let{buffer:oo}=this.context,io=oo.findChild(this.index+4,oo.buffer[this.index+3],to,ro-this.context.start,no);return io<0?null:new BufferNode(this.context,this,io)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(to){return this.child(1,to,2)}childBefore(to){return this.child(-1,to,-2)}enter(to,ro,no=0){if(no&IterMode.ExcludeBuffers)return null;let{buffer:oo}=this.context,io=oo.findChild(this.index+4,oo.buffer[this.index+3],ro>0?1:-1,to-this.context.start,ro);return io<0?null:new BufferNode(this.context,this,io)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(to){return this._parent?null:this.context.parent.nextChild(this.context.index+to,to,0,4)}get nextSibling(){let{buffer:to}=this.context,ro=to.buffer[this.index+3];return ro<(this._parent?to.buffer[this._parent.index+3]:to.buffer.length)?new BufferNode(this.context,this._parent,ro):this.externalSibling(1)}get prevSibling(){let{buffer:to}=this.context,ro=this._parent?this._parent.index+4:0;return this.index==ro?this.externalSibling(-1):new BufferNode(this.context,this._parent,to.findChild(ro,this.index,-1,0,4))}get tree(){return null}toTree(){let to=[],ro=[],{buffer:no}=this.context,oo=this.index+4,io=no.buffer[this.index+3];if(io>oo){let so=no.buffer[this.index+1];to.push(no.slice(oo,io,so)),ro.push(0)}return new Tree(this.type,to,ro,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function iterStack(eo){if(!eo.length)return null;let to=0,ro=eo[0];for(let io=1;ioro.from||so.to=to){let ao=new TreeNode(so.tree,so.overlay[0].from+io.from,-1,io);(oo||(oo=[no])).push(resolveNode(ao,to,ro,!1))}}return oo?iterStack(oo):no}class TreeCursor{get name(){return this.type.name}constructor(to,ro=0){if(this.mode=ro,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,to instanceof TreeNode)this.yieldNode(to);else{this._tree=to.context.parent,this.buffer=to.context;for(let no=to._parent;no;no=no._parent)this.stack.unshift(no.index);this.bufferNode=to,this.yieldBuf(to.index)}}yieldNode(to){return to?(this._tree=to,this.type=to.type,this.from=to.from,this.to=to.to,!0):!1}yieldBuf(to,ro){this.index=to;let{start:no,buffer:oo}=this.buffer;return this.type=ro||oo.set.types[oo.buffer[to]],this.from=no+oo.buffer[to+1],this.to=no+oo.buffer[to+2],!0}yield(to){return to?to instanceof TreeNode?(this.buffer=null,this.yieldNode(to)):(this.buffer=to.context,this.yieldBuf(to.index,to.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(to,ro,no){if(!this.buffer)return this.yield(this._tree.nextChild(to<0?this._tree._tree.children.length-1:0,to,ro,no,this.mode));let{buffer:oo}=this.buffer,io=oo.findChild(this.index+4,oo.buffer[this.index+3],to,ro-this.buffer.start,no);return io<0?!1:(this.stack.push(this.index),this.yieldBuf(io))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(to){return this.enterChild(1,to,2)}childBefore(to){return this.enterChild(-1,to,-2)}enter(to,ro,no=this.mode){return this.buffer?no&IterMode.ExcludeBuffers?!1:this.enterChild(1,to,ro):this.yield(this._tree.enter(to,ro,no))}parent(){if(!this.buffer)return this.yieldNode(this.mode&IterMode.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let to=this.mode&IterMode.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(to)}sibling(to){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+to,to,0,4,this.mode)):!1;let{buffer:ro}=this.buffer,no=this.stack.length-1;if(to<0){let oo=no<0?0:this.stack[no]+4;if(this.index!=oo)return this.yieldBuf(ro.findChild(oo,this.index,-1,0,4))}else{let oo=ro.buffer[this.index+3];if(oo<(no<0?ro.buffer.length:ro.buffer[this.stack[no]+3]))return this.yieldBuf(oo)}return no<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+to,to,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(to){let ro,no,{buffer:oo}=this;if(oo){if(to>0){if(this.index-1)for(let io=ro+to,so=to<0?-1:no._tree.children.length;io!=so;io+=to){let ao=no._tree.children[io];if(this.mode&IterMode.IncludeAnonymous||ao instanceof TreeBuffer||!ao.type.isAnonymous||hasChild(ao))return!1}return!0}move(to,ro){if(ro&&this.enterChild(to,0,4))return!0;for(;;){if(this.sibling(to))return!0;if(this.atLastNode(to)||!this.parent())return!1}}next(to=!0){return this.move(1,to)}prev(to=!0){return this.move(-1,to)}moveTo(to,ro=0){for(;(this.from==this.to||(ro<1?this.from>=to:this.from>to)||(ro>-1?this.to<=to:this.to=0;){for(let so=to;so;so=so._parent)if(so.index==oo){if(oo==this.index)return so;ro=so,no=io+1;break e}oo=this.stack[--io]}for(let oo=no;oo=0;io--){if(io<0)return matchNodeContext(this.node,to,oo);let so=no[ro.buffer[this.stack[io]]];if(!so.isAnonymous){if(to[oo]&&to[oo]!=so.name)return!1;oo--}}return!0}}function hasChild(eo){return eo.children.some(to=>to instanceof TreeBuffer||!to.type.isAnonymous||hasChild(to))}function buildTree(eo){var to;let{buffer:ro,nodeSet:no,maxBufferLength:oo=DefaultBufferLength,reused:io=[],minRepeatType:so=no.types.length}=eo,ao=Array.isArray(ro)?new FlatBufferCursor(ro,ro.length):ro,lo=no.types,uo=0,co=0;function fo(To,wo,Co,Oo,Ao,Ro){let{id:No,start:Mo,end:Do,size:jo}=ao,Fo=co;for(;jo<0;)if(ao.next(),jo==-1){let Uo=io[No];Co.push(Uo),Oo.push(Mo-To);return}else if(jo==-3){uo=No;return}else if(jo==-4){co=No;return}else throw new RangeError(`Unrecognized record size: ${jo}`);let $o=lo[No],Lo,Ho,qo=Mo-To;if(Do-Mo<=oo&&(Ho=bo(ao.pos-wo,Ao))){let Uo=new Uint16Array(Ho.size-Ho.skip),Yo=ao.pos-Ho.size,Zo=Uo.length;for(;ao.pos>Yo;)Zo=xo(Ho.start,Uo,Zo);Lo=new TreeBuffer(Uo,Do-Ho.start,no),qo=Ho.start-To}else{let Uo=ao.pos-jo;ao.next();let Yo=[],Zo=[],_s=No>=so?No:-1,Ss=0,As=Do;for(;ao.pos>Uo;)_s>=0&&ao.id==_s&&ao.size>=0?(ao.end<=As-oo&&(go(Yo,Zo,Mo,Ss,ao.end,As,_s,Fo),Ss=Yo.length,As=ao.end),ao.next()):Ro>2500?ho(Mo,Uo,Yo,Zo):fo(Mo,Uo,Yo,Zo,_s,Ro+1);if(_s>=0&&Ss>0&&Ss-1&&Ss>0){let Ns=po($o);Lo=balanceRange($o,Yo,Zo,0,Yo.length,0,Do-Mo,Ns,Ns)}else Lo=vo($o,Yo,Zo,Do-Mo,Fo-Do)}Co.push(Lo),Oo.push(qo)}function ho(To,wo,Co,Oo){let Ao=[],Ro=0,No=-1;for(;ao.pos>wo;){let{id:Mo,start:Do,end:jo,size:Fo}=ao;if(Fo>4)ao.next();else{if(No>-1&&Do=0;jo-=3)Mo[Fo++]=Ao[jo],Mo[Fo++]=Ao[jo+1]-Do,Mo[Fo++]=Ao[jo+2]-Do,Mo[Fo++]=Fo;Co.push(new TreeBuffer(Mo,Ao[2]-Do,no)),Oo.push(Do-To)}}function po(To){return(wo,Co,Oo)=>{let Ao=0,Ro=wo.length-1,No,Mo;if(Ro>=0&&(No=wo[Ro])instanceof Tree){if(!Ro&&No.type==To&&No.length==Oo)return No;(Mo=No.prop(NodeProp.lookAhead))&&(Ao=Co[Ro]+No.length+Mo)}return vo(To,wo,Co,Oo,Ao)}}function go(To,wo,Co,Oo,Ao,Ro,No,Mo){let Do=[],jo=[];for(;To.length>Oo;)Do.push(To.pop()),jo.push(wo.pop()+Co-Ao);To.push(vo(no.types[No],Do,jo,Ro-Ao,Mo-Ro)),wo.push(Ao-Co)}function vo(To,wo,Co,Oo,Ao=0,Ro){if(uo){let No=[NodeProp.contextHash,uo];Ro=Ro?[No].concat(Ro):[No]}if(Ao>25){let No=[NodeProp.lookAhead,Ao];Ro=Ro?[No].concat(Ro):[No]}return new Tree(To,wo,Co,Oo,Ro)}function bo(To,wo){let Co=ao.fork(),Oo=0,Ao=0,Ro=0,No=Co.end-oo,Mo={size:0,start:0,skip:0};e:for(let Do=Co.pos-To;Co.pos>Do;){let jo=Co.size;if(Co.id==wo&&jo>=0){Mo.size=Oo,Mo.start=Ao,Mo.skip=Ro,Ro+=4,Oo+=4,Co.next();continue}let Fo=Co.pos-jo;if(jo<0||Fo=so?4:0,Lo=Co.start;for(Co.next();Co.pos>Fo;){if(Co.size<0)if(Co.size==-3)$o+=4;else break e;else Co.id>=so&&($o+=4);Co.next()}Ao=Lo,Oo+=jo,Ro+=$o}return(wo<0||Oo==To)&&(Mo.size=Oo,Mo.start=Ao,Mo.skip=Ro),Mo.size>4?Mo:void 0}function xo(To,wo,Co){let{id:Oo,start:Ao,end:Ro,size:No}=ao;if(ao.next(),No>=0&&Oo4){let Do=ao.pos-(No-4);for(;ao.pos>Do;)Co=xo(To,wo,Co)}wo[--Co]=Mo,wo[--Co]=Ro-To,wo[--Co]=Ao-To,wo[--Co]=Oo}else No==-3?uo=Oo:No==-4&&(co=Oo);return Co}let _o=[],Eo=[];for(;ao.pos>0;)fo(eo.start||0,eo.bufferStart||0,_o,Eo,-1,0);let So=(to=eo.length)!==null&&to!==void 0?to:_o.length?Eo[0]+_o[0].length:0;return new Tree(lo[eo.topID],_o.reverse(),Eo.reverse(),So)}const nodeSizeCache=new WeakMap;function nodeSize(eo,to){if(!eo.isAnonymous||to instanceof TreeBuffer||to.type!=eo)return 1;let ro=nodeSizeCache.get(to);if(ro==null){ro=1;for(let no of to.children){if(no.type!=eo||!(no instanceof Tree)){ro=1;break}ro+=nodeSize(eo,no)}nodeSizeCache.set(to,ro)}return ro}function balanceRange(eo,to,ro,no,oo,io,so,ao,lo){let uo=0;for(let go=no;go=co)break;wo+=Co}if(Eo==So+1){if(wo>co){let Co=go[So];po(Co.children,Co.positions,0,Co.children.length,vo[So]+_o);continue}fo.push(go[So])}else{let Co=vo[Eo-1]+go[Eo-1].length-To;fo.push(balanceRange(eo,go,vo,So,Eo,To,Co,null,lo))}ho.push(To+_o-io)}}return po(to,ro,no,oo,0),(ao||lo)(fo,ho,so)}class NodeWeakMap{constructor(){this.map=new WeakMap}setBuffer(to,ro,no){let oo=this.map.get(to);oo||this.map.set(to,oo=new Map),oo.set(ro,no)}getBuffer(to,ro){let no=this.map.get(to);return no&&no.get(ro)}set(to,ro){to instanceof BufferNode?this.setBuffer(to.context.buffer,to.index,ro):to instanceof TreeNode&&this.map.set(to.tree,ro)}get(to){return to instanceof BufferNode?this.getBuffer(to.context.buffer,to.index):to instanceof TreeNode?this.map.get(to.tree):void 0}cursorSet(to,ro){to.buffer?this.setBuffer(to.buffer.buffer,to.index,ro):this.map.set(to.tree,ro)}cursorGet(to){return to.buffer?this.getBuffer(to.buffer.buffer,to.index):this.map.get(to.tree)}}class TreeFragment{constructor(to,ro,no,oo,io=!1,so=!1){this.from=to,this.to=ro,this.tree=no,this.offset=oo,this.open=(io?1:0)|(so?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(to,ro=[],no=!1){let oo=[new TreeFragment(0,to.length,to,0,!1,no)];for(let io of ro)io.to>to.length&&oo.push(io);return oo}static applyChanges(to,ro,no=128){if(!ro.length)return to;let oo=[],io=1,so=to.length?to[0]:null;for(let ao=0,lo=0,uo=0;;ao++){let co=ao=no)for(;so&&so.from=ho.from||fo<=ho.to||uo){let po=Math.max(ho.from,lo)-uo,go=Math.min(ho.to,fo)-uo;ho=po>=go?null:new TreeFragment(po,go,ho.tree,ho.offset+uo,ao>0,!!co)}if(ho&&oo.push(ho),so.to>fo)break;so=ionew Range$1(oo.from,oo.to)):[new Range$1(0,0)]:[new Range$1(0,to.length)],this.createParse(to,ro||[],no)}parse(to,ro,no){let oo=this.startParse(to,ro,no);for(;;){let io=oo.advance();if(io)return io}}}class StringInput{constructor(to){this.string=to}get length(){return this.string.length}chunk(to){return this.string.slice(to)}get lineChunks(){return!1}read(to,ro){return this.string.slice(to,ro)}}new NodeProp({perNode:!0});let nextTagID=0;class Tag{constructor(to,ro,no){this.set=to,this.base=ro,this.modified=no,this.id=nextTagID++}static define(to){if(to!=null&&to.base)throw new Error("Can not derive from a modified tag");let ro=new Tag([],null,[]);if(ro.set.push(ro),to)for(let no of to.set)ro.set.push(no);return ro}static defineModifier(){let to=new Modifier;return ro=>ro.modified.indexOf(to)>-1?ro:Modifier.get(ro.base||ro,ro.modified.concat(to).sort((no,oo)=>no.id-oo.id))}}let nextModifierID=0;class Modifier{constructor(){this.instances=[],this.id=nextModifierID++}static get(to,ro){if(!ro.length)return to;let no=ro[0].instances.find(ao=>ao.base==to&&sameArray(ro,ao.modified));if(no)return no;let oo=[],io=new Tag(oo,to,ro);for(let ao of ro)ao.instances.push(io);let so=powerSet(ro);for(let ao of to.set)if(!ao.modified.length)for(let lo of so)oo.push(Modifier.get(ao,lo));return io}}function sameArray(eo,to){return eo.length==to.length&&eo.every((ro,no)=>ro==to[no])}function powerSet(eo){let to=[[]];for(let ro=0;rono.length-ro.length)}function styleTags(eo){let to=Object.create(null);for(let ro in eo){let no=eo[ro];Array.isArray(no)||(no=[no]);for(let oo of ro.split(" "))if(oo){let io=[],so=2,ao=oo;for(let fo=0;;){if(ao=="..."&&fo>0&&fo+3==oo.length){so=1;break}let ho=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(ao);if(!ho)throw new RangeError("Invalid path: "+oo);if(io.push(ho[0]=="*"?"":ho[0][0]=='"'?JSON.parse(ho[0]):ho[0]),fo+=ho[0].length,fo==oo.length)break;let po=oo[fo++];if(fo==oo.length&&po=="!"){so=0;break}if(po!="/")throw new RangeError("Invalid path: "+oo);ao=oo.slice(fo)}let lo=io.length-1,uo=io[lo];if(!uo)throw new RangeError("Invalid path: "+oo);let co=new Rule(no,so,lo>0?io.slice(0,lo):null);to[uo]=co.sort(to[uo])}}return ruleNodeProp.add(to)}const ruleNodeProp=new NodeProp;class Rule{constructor(to,ro,no,oo){this.tags=to,this.mode=ro,this.context=no,this.next=oo}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(to){return!to||to.depth{let so=oo;for(let ao of io)for(let lo of ao.set){let uo=ro[lo.id];if(uo){so=so?so+" "+uo:uo;break}}return so},scope:no}}function highlightTags(eo,to){let ro=null;for(let no of eo){let oo=no.style(to);oo&&(ro=ro?ro+" "+oo:oo)}return ro}function highlightTree(eo,to,ro,no=0,oo=eo.length){let io=new HighlightBuilder(no,Array.isArray(to)?to:[to],ro);io.highlightRange(eo.cursor(),no,oo,"",io.highlighters),io.flush(oo)}class HighlightBuilder{constructor(to,ro,no){this.at=to,this.highlighters=ro,this.span=no,this.class=""}startSpan(to,ro){ro!=this.class&&(this.flush(to),to>this.at&&(this.at=to),this.class=ro)}flush(to){to>this.at&&this.class&&this.span(this.at,to,this.class)}highlightRange(to,ro,no,oo,io){let{type:so,from:ao,to:lo}=to;if(ao>=no||lo<=ro)return;so.isTop&&(io=this.highlighters.filter(po=>!po.scope||po.scope(so)));let uo=oo,co=getStyleTags(to)||Rule.empty,fo=highlightTags(io,co.tags);if(fo&&(uo&&(uo+=" "),uo+=fo,co.mode==1&&(oo+=(oo?" ":"")+fo)),this.startSpan(Math.max(ro,ao),uo),co.opaque)return;let ho=to.tree&&to.tree.prop(NodeProp.mounted);if(ho&&ho.overlay){let po=to.node.enter(ho.overlay[0].from+ao,1),go=this.highlighters.filter(bo=>!bo.scope||bo.scope(ho.tree.type)),vo=to.firstChild();for(let bo=0,xo=ao;;bo++){let _o=bo=Eo||!to.nextSibling())););if(!_o||Eo>no)break;xo=_o.to+ao,xo>ro&&(this.highlightRange(po.cursor(),Math.max(ro,_o.from+ao),Math.min(no,xo),"",go),this.startSpan(Math.min(no,xo),uo))}vo&&to.parent()}else if(to.firstChild()){ho&&(oo="");do if(!(to.to<=ro)){if(to.from>=no)break;this.highlightRange(to,ro,no,oo,io),this.startSpan(Math.min(no,to.to),uo)}while(to.nextSibling());to.parent()}}}function getStyleTags(eo){let to=eo.type.prop(ruleNodeProp);for(;to&&to.context&&!eo.matchContext(to.context);)to=to.next;return to||null}const t=Tag.define,comment=t(),name=t(),typeName=t(name),propertyName=t(name),literal=t(),string=t(literal),number=t(literal),content=t(),heading=t(content),keyword=t(),operator=t(),punctuation=t(),bracket=t(punctuation),meta=t(),tags={comment,lineComment:t(comment),blockComment:t(comment),docComment:t(comment),name,variableName:t(name),typeName,tagName:t(typeName),propertyName,attributeName:t(propertyName),className:t(name),labelName:t(name),namespace:t(name),macroName:t(name),literal,string,docString:t(string),character:t(string),attributeValue:t(string),number,integer:t(number),float:t(number),bool:t(literal),regexp:t(literal),escape:t(literal),color:t(literal),url:t(literal),keyword,self:t(keyword),null:t(keyword),atom:t(keyword),unit:t(keyword),modifier:t(keyword),operatorKeyword:t(keyword),controlKeyword:t(keyword),definitionKeyword:t(keyword),moduleKeyword:t(keyword),operator,derefOperator:t(operator),arithmeticOperator:t(operator),logicOperator:t(operator),bitwiseOperator:t(operator),compareOperator:t(operator),updateOperator:t(operator),definitionOperator:t(operator),typeOperator:t(operator),controlOperator:t(operator),punctuation,separator:t(punctuation),bracket,angleBracket:t(bracket),squareBracket:t(bracket),paren:t(bracket),brace:t(bracket),content,heading,heading1:t(heading),heading2:t(heading),heading3:t(heading),heading4:t(heading),heading5:t(heading),heading6:t(heading),contentSeparator:t(content),list:t(content),quote:t(content),emphasis:t(content),strong:t(content),link:t(content),monospace:t(content),strikethrough:t(content),inserted:t(),deleted:t(),changed:t(),invalid:t(),meta,documentMeta:t(meta),annotation:t(meta),processingInstruction:t(meta),definition:Tag.defineModifier(),constant:Tag.defineModifier(),function:Tag.defineModifier(),standard:Tag.defineModifier(),local:Tag.defineModifier(),special:Tag.defineModifier()};tagHighlighter([{tag:tags.link,class:"tok-link"},{tag:tags.heading,class:"tok-heading"},{tag:tags.emphasis,class:"tok-emphasis"},{tag:tags.strong,class:"tok-strong"},{tag:tags.keyword,class:"tok-keyword"},{tag:tags.atom,class:"tok-atom"},{tag:tags.bool,class:"tok-bool"},{tag:tags.url,class:"tok-url"},{tag:tags.labelName,class:"tok-labelName"},{tag:tags.inserted,class:"tok-inserted"},{tag:tags.deleted,class:"tok-deleted"},{tag:tags.literal,class:"tok-literal"},{tag:tags.string,class:"tok-string"},{tag:tags.number,class:"tok-number"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],class:"tok-string2"},{tag:tags.variableName,class:"tok-variableName"},{tag:tags.local(tags.variableName),class:"tok-variableName tok-local"},{tag:tags.definition(tags.variableName),class:"tok-variableName tok-definition"},{tag:tags.special(tags.variableName),class:"tok-variableName2"},{tag:tags.definition(tags.propertyName),class:"tok-propertyName tok-definition"},{tag:tags.typeName,class:"tok-typeName"},{tag:tags.namespace,class:"tok-namespace"},{tag:tags.className,class:"tok-className"},{tag:tags.macroName,class:"tok-macroName"},{tag:tags.propertyName,class:"tok-propertyName"},{tag:tags.operator,class:"tok-operator"},{tag:tags.comment,class:"tok-comment"},{tag:tags.meta,class:"tok-meta"},{tag:tags.invalid,class:"tok-invalid"},{tag:tags.punctuation,class:"tok-punctuation"}]);var _a;const languageDataProp=new NodeProp;function defineLanguageFacet(eo){return Facet.define({combine:eo?to=>to.concat(eo):void 0})}const sublanguageProp=new NodeProp;class Language{constructor(to,ro,no=[],oo=""){this.data=to,this.name=oo,EditorState.prototype.hasOwnProperty("tree")||Object.defineProperty(EditorState.prototype,"tree",{get(){return syntaxTree(this)}}),this.parser=ro,this.extension=[language.of(this),EditorState.languageData.of((io,so,ao)=>{let lo=topNodeAt(io,so,ao),uo=lo.type.prop(languageDataProp);if(!uo)return[];let co=io.facet(uo),fo=lo.type.prop(sublanguageProp);if(fo){let ho=lo.resolve(so-lo.from,ao);for(let po of fo)if(po.test(ho,io)){let go=io.facet(po.facet);return po.type=="replace"?go:go.concat(co)}}return co})].concat(no)}isActiveAt(to,ro,no=-1){return topNodeAt(to,ro,no).type.prop(languageDataProp)==this.data}findRegions(to){let ro=to.facet(language);if((ro==null?void 0:ro.data)==this.data)return[{from:0,to:to.doc.length}];if(!ro||!ro.allowsNesting)return[];let no=[],oo=(io,so)=>{if(io.prop(languageDataProp)==this.data){no.push({from:so,to:so+io.length});return}let ao=io.prop(NodeProp.mounted);if(ao){if(ao.tree.prop(languageDataProp)==this.data){if(ao.overlay)for(let lo of ao.overlay)no.push({from:lo.from+so,to:lo.to+so});else no.push({from:so,to:so+io.length});return}else if(ao.overlay){let lo=no.length;if(oo(ao.tree,ao.overlay[0].from+so),no.length>lo)return}}for(let lo=0;lono.isTop?ro:void 0)]}),to.name)}configure(to,ro){return new LRLanguage(this.data,this.parser.configure(to),ro||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function syntaxTree(eo){let to=eo.field(Language.state,!1);return to?to.tree:Tree.empty}class DocInput{constructor(to){this.doc=to,this.cursorPos=0,this.string="",this.cursor=to.iter()}get length(){return this.doc.length}syncTo(to){return this.string=this.cursor.next(to-this.cursorPos).value,this.cursorPos=to+this.string.length,this.cursorPos-this.string.length}chunk(to){return this.syncTo(to),this.string}get lineChunks(){return!0}read(to,ro){let no=this.cursorPos-this.string.length;return to=this.cursorPos?this.doc.sliceString(to,ro):this.string.slice(to-no,ro-no)}}let currentContext=null;class ParseContext{constructor(to,ro,no=[],oo,io,so,ao,lo){this.parser=to,this.state=ro,this.fragments=no,this.tree=oo,this.treeLen=io,this.viewport=so,this.skipped=ao,this.scheduleOn=lo,this.parse=null,this.tempSkipped=[]}static create(to,ro,no){return new ParseContext(to,ro,[],Tree.empty,0,no,[],null)}startParse(){return this.parser.startParse(new DocInput(this.state.doc),this.fragments)}work(to,ro){return ro!=null&&ro>=this.state.doc.length&&(ro=void 0),this.tree!=Tree.empty&&this.isDone(ro??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var no;if(typeof to=="number"){let oo=Date.now()+to;to=()=>Date.now()>oo}for(this.parse||(this.parse=this.startParse()),ro!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>ro)&&ro=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>to)&&this.parse.stopAt(to),this.withContext(()=>{for(;!(ro=this.parse.advance()););}),this.treeLen=to,this.tree=ro,this.fragments=this.withoutTempSkipped(TreeFragment.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(to){let ro=currentContext;currentContext=this;try{return to()}finally{currentContext=ro}}withoutTempSkipped(to){for(let ro;ro=this.tempSkipped.pop();)to=cutFragments(to,ro.from,ro.to);return to}changes(to,ro){let{fragments:no,tree:oo,treeLen:io,viewport:so,skipped:ao}=this;if(this.takeTree(),!to.empty){let lo=[];if(to.iterChangedRanges((uo,co,fo,ho)=>lo.push({fromA:uo,toA:co,fromB:fo,toB:ho})),no=TreeFragment.applyChanges(no,lo),oo=Tree.empty,io=0,so={from:to.mapPos(so.from,-1),to:to.mapPos(so.to,1)},this.skipped.length){ao=[];for(let uo of this.skipped){let co=to.mapPos(uo.from,1),fo=to.mapPos(uo.to,-1);coto.from&&(this.fragments=cutFragments(this.fragments,oo,io),this.skipped.splice(no--,1))}return this.skipped.length>=ro?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(to,ro){this.skipped.push({from:to,to:ro})}static getSkippingParser(to){return new class extends Parser{createParse(ro,no,oo){let io=oo[0].from,so=oo[oo.length-1].to;return{parsedPos:io,advance(){let lo=currentContext;if(lo){for(let uo of oo)lo.tempSkipped.push(uo);to&&(lo.scheduleOn=lo.scheduleOn?Promise.all([lo.scheduleOn,to]):to)}return this.parsedPos=so,new Tree(NodeType.none,[],[],so-io)},stoppedAt:null,stopAt(){}}}}}isDone(to){to=Math.min(to,this.state.doc.length);let ro=this.fragments;return this.treeLen>=to&&ro.length&&ro[0].from==0&&ro[0].to>=to}static get(){return currentContext}}function cutFragments(eo,to,ro){return TreeFragment.applyChanges(eo,[{fromA:to,toA:ro,fromB:to,toB:ro}])}class LanguageState{constructor(to){this.context=to,this.tree=to.tree}apply(to){if(!to.docChanged&&this.tree==this.context.tree)return this;let ro=this.context.changes(to.changes,to.state),no=this.context.treeLen==to.startState.doc.length?void 0:Math.max(to.changes.mapPos(this.context.treeLen),ro.viewport.to);return ro.work(20,no)||ro.takeTree(),new LanguageState(ro)}static init(to){let ro=Math.min(3e3,to.doc.length),no=ParseContext.create(to.facet(language).parser,to,{from:0,to:ro});return no.work(20,ro)||no.takeTree(),new LanguageState(no)}}Language.state=StateField.define({create:LanguageState.init,update(eo,to){for(let ro of to.effects)if(ro.is(Language.setState))return ro.value;return to.startState.facet(language)!=to.state.facet(language)?LanguageState.init(to.state):eo.apply(to)}});let requestIdle=eo=>{let to=setTimeout(()=>eo(),500);return()=>clearTimeout(to)};typeof requestIdleCallback<"u"&&(requestIdle=eo=>{let to=-1,ro=setTimeout(()=>{to=requestIdleCallback(eo,{timeout:400})},100);return()=>to<0?clearTimeout(ro):cancelIdleCallback(to)});const isInputPending=typeof navigator<"u"&&(!((_a=navigator.scheduling)===null||_a===void 0)&&_a.isInputPending)?()=>navigator.scheduling.isInputPending():null,parseWorker=ViewPlugin.fromClass(class{constructor(to){this.view=to,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(to){let ro=this.view.state.field(Language.state).context;(ro.updateViewport(to.view.viewport)||this.view.viewport.to>ro.treeLen)&&this.scheduleWork(),(to.docChanged||to.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(ro)}scheduleWork(){if(this.working)return;let{state:to}=this.view,ro=to.field(Language.state);(ro.tree!=ro.context.tree||!ro.context.isDone(to.doc.length))&&(this.working=requestIdle(this.work))}work(to){this.working=null;let ro=Date.now();if(this.chunkEndoo+1e3,lo=io.context.work(()=>isInputPending&&isInputPending()||Date.now()>so,oo+(ao?0:1e5));this.chunkBudget-=Date.now()-ro,(lo||this.chunkBudget<=0)&&(io.context.takeTree(),this.view.dispatch({effects:Language.setState.of(new LanguageState(io.context))})),this.chunkBudget>0&&!(lo&&!ao)&&this.scheduleWork(),this.checkAsyncSchedule(io.context)}checkAsyncSchedule(to){to.scheduleOn&&(this.workScheduled++,to.scheduleOn.then(()=>this.scheduleWork()).catch(ro=>logException(this.view.state,ro)).then(()=>this.workScheduled--),to.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),language=Facet.define({combine(eo){return eo.length?eo[0]:null},enables:eo=>[Language.state,parseWorker,EditorView.contentAttributes.compute([eo],to=>{let ro=to.facet(eo);return ro&&ro.name?{"data-language":ro.name}:{}})]});class LanguageSupport{constructor(to,ro=[]){this.language=to,this.support=ro,this.extension=[to,ro]}}const indentService=Facet.define(),indentUnit=Facet.define({combine:eo=>{if(!eo.length)return" ";let to=eo[0];if(!to||/\S/.test(to)||Array.from(to).some(ro=>ro!=to[0]))throw new Error("Invalid indent unit: "+JSON.stringify(eo[0]));return to}});function getIndentUnit(eo){let to=eo.facet(indentUnit);return to.charCodeAt(0)==9?eo.tabSize*to.length:to.length}function indentString(eo,to){let ro="",no=eo.tabSize,oo=eo.facet(indentUnit)[0];if(oo==" "){for(;to>=no;)ro+=" ",to-=no;oo=" "}for(let io=0;io=to?syntaxIndentation(eo,ro,to):null}class IndentContext{constructor(to,ro={}){this.state=to,this.options=ro,this.unit=getIndentUnit(to)}lineAt(to,ro=1){let no=this.state.doc.lineAt(to),{simulateBreak:oo,simulateDoubleBreak:io}=this.options;return oo!=null&&oo>=no.from&&oo<=no.to?io&&oo==to?{text:"",from:to}:(ro<0?oo-1&&(io+=so-this.countColumn(no,no.search(/\S|$/))),io}countColumn(to,ro=to.length){return countColumn(to,this.state.tabSize,ro)}lineIndent(to,ro=1){let{text:no,from:oo}=this.lineAt(to,ro),io=this.options.overrideIndentation;if(io){let so=io(oo);if(so>-1)return so}return this.countColumn(no,no.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const indentNodeProp=new NodeProp;function syntaxIndentation(eo,to,ro){let no=to.resolveStack(ro),oo=no.node.enterUnfinishedNodesBefore(ro);if(oo!=no.node){let io=[];for(let so=oo;so!=no.node;so=so.parent)io.push(so);for(let so=io.length-1;so>=0;so--)no={node:io[so],next:no}}return indentFor(no,eo,ro)}function indentFor(eo,to,ro){for(let no=eo;no;no=no.next){let oo=indentStrategy(no.node);if(oo)return oo(TreeIndentContext.create(to,ro,no))}return 0}function ignoreClosed(eo){return eo.pos==eo.options.simulateBreak&&eo.options.simulateDoubleBreak}function indentStrategy(eo){let to=eo.type.prop(indentNodeProp);if(to)return to;let ro=eo.firstChild,no;if(ro&&(no=ro.type.prop(NodeProp.closedBy))){let oo=eo.lastChild,io=oo&&no.indexOf(oo.name)>-1;return so=>delimitedStrategy(so,!0,1,void 0,io&&!ignoreClosed(so)?oo.from:void 0)}return eo.parent==null?topIndent$1:null}function topIndent$1(){return 0}class TreeIndentContext extends IndentContext{constructor(to,ro,no){super(to.state,to.options),this.base=to,this.pos=ro,this.context=no}get node(){return this.context.node}static create(to,ro,no){return new TreeIndentContext(to,ro,no)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(to){let ro=this.state.doc.lineAt(to.from);for(;;){let no=to.resolve(ro.from);for(;no.parent&&no.parent.from==no.from;)no=no.parent;if(isParent(no,to))break;ro=this.state.doc.lineAt(no.from)}return this.lineIndent(ro.from)}continue(){return indentFor(this.context.next,this.base,this.pos)}}function isParent(eo,to){for(let ro=to;ro;ro=ro.parent)if(eo==ro)return!0;return!1}function bracketedAligned(eo){let to=eo.node,ro=to.childAfter(to.from),no=to.lastChild;if(!ro)return null;let oo=eo.options.simulateBreak,io=eo.state.doc.lineAt(ro.from),so=oo==null||oo<=io.from?io.to:Math.min(io.to,oo);for(let ao=ro.to;;){let lo=to.childAfter(ao);if(!lo||lo==no)return null;if(!lo.type.isSkipped)return lo.fromdelimitedStrategy(no,to,ro,eo)}function delimitedStrategy(eo,to,ro,no,oo){let io=eo.textAfter,so=io.match(/^\s*/)[0].length,ao=no&&io.slice(so,so+no.length)==no||oo==eo.pos+so,lo=to?bracketedAligned(eo):null;return lo?ao?eo.column(lo.from):eo.column(lo.to):eo.baseIndent+(ao?0:eo.unit*ro)}const DontIndentBeyond=200;function indentOnInput(){return EditorState.transactionFilter.of(eo=>{if(!eo.docChanged||!eo.isUserEvent("input.type")&&!eo.isUserEvent("input.complete"))return eo;let to=eo.startState.languageDataAt("indentOnInput",eo.startState.selection.main.head);if(!to.length)return eo;let ro=eo.newDoc,{head:no}=eo.newSelection.main,oo=ro.lineAt(no);if(no>oo.from+DontIndentBeyond)return eo;let io=ro.sliceString(oo.from,no);if(!to.some(uo=>uo.test(io)))return eo;let{state:so}=eo,ao=-1,lo=[];for(let{head:uo}of so.selection.ranges){let co=so.doc.lineAt(uo);if(co.from==ao)continue;ao=co.from;let fo=getIndentation(so,co.from);if(fo==null)continue;let ho=/^\s*/.exec(co.text)[0],po=indentString(so,fo);ho!=po&&lo.push({from:co.from,to:co.from+ho.length,insert:po})}return lo.length?[eo,{changes:lo,sequential:!0}]:eo})}const foldService=Facet.define(),foldNodeProp=new NodeProp;function foldInside(eo){let to=eo.firstChild,ro=eo.lastChild;return to&&to.toro)continue;if(io&&ao.from=to&&uo.to>ro&&(io=uo)}}return io}function isUnfinished(eo){let to=eo.lastChild;return to&&to.to==eo.to&&to.type.isError}function foldable(eo,to,ro){for(let no of eo.facet(foldService)){let oo=no(eo,to,ro);if(oo)return oo}return syntaxFolding(eo,to,ro)}function mapRange(eo,to){let ro=to.mapPos(eo.from,1),no=to.mapPos(eo.to,-1);return ro>=no?void 0:{from:ro,to:no}}const foldEffect=StateEffect.define({map:mapRange}),unfoldEffect=StateEffect.define({map:mapRange});function selectedLines(eo){let to=[];for(let{head:ro}of eo.state.selection.ranges)to.some(no=>no.from<=ro&&no.to>=ro)||to.push(eo.lineBlockAt(ro));return to}const foldState=StateField.define({create(){return Decoration.none},update(eo,to){eo=eo.map(to.changes);for(let ro of to.effects)if(ro.is(foldEffect)&&!foldExists(eo,ro.value.from,ro.value.to)){let{preparePlaceholder:no}=to.state.facet(foldConfig),oo=no?Decoration.replace({widget:new PreparedFoldWidget(no(to.state,ro.value))}):foldWidget;eo=eo.update({add:[oo.range(ro.value.from,ro.value.to)]})}else ro.is(unfoldEffect)&&(eo=eo.update({filter:(no,oo)=>ro.value.from!=no||ro.value.to!=oo,filterFrom:ro.value.from,filterTo:ro.value.to}));if(to.selection){let ro=!1,{head:no}=to.selection.main;eo.between(no,no,(oo,io)=>{oono&&(ro=!0)}),ro&&(eo=eo.update({filterFrom:no,filterTo:no,filter:(oo,io)=>io<=no||oo>=no}))}return eo},provide:eo=>EditorView.decorations.from(eo),toJSON(eo,to){let ro=[];return eo.between(0,to.doc.length,(no,oo)=>{ro.push(no,oo)}),ro},fromJSON(eo){if(!Array.isArray(eo)||eo.length%2)throw new RangeError("Invalid JSON for fold state");let to=[];for(let ro=0;ro{(!oo||oo.from>io)&&(oo={from:io,to:so})}),oo}function foldExists(eo,to,ro){let no=!1;return eo.between(to,to,(oo,io)=>{oo==to&&io==ro&&(no=!0)}),no}function maybeEnable(eo,to){return eo.field(foldState,!1)?to:to.concat(StateEffect.appendConfig.of(codeFolding()))}const foldCode=eo=>{for(let to of selectedLines(eo)){let ro=foldable(eo.state,to.from,to.to);if(ro)return eo.dispatch({effects:maybeEnable(eo.state,[foldEffect.of(ro),announceFold(eo,ro)])}),!0}return!1},unfoldCode=eo=>{if(!eo.state.field(foldState,!1))return!1;let to=[];for(let ro of selectedLines(eo)){let no=findFold(eo.state,ro.from,ro.to);no&&to.push(unfoldEffect.of(no),announceFold(eo,no,!1))}return to.length&&eo.dispatch({effects:to}),to.length>0};function announceFold(eo,to,ro=!0){let no=eo.state.doc.lineAt(to.from).number,oo=eo.state.doc.lineAt(to.to).number;return EditorView.announce.of(`${eo.state.phrase(ro?"Folded lines":"Unfolded lines")} ${no} ${eo.state.phrase("to")} ${oo}.`)}const foldAll=eo=>{let{state:to}=eo,ro=[];for(let no=0;no{let to=eo.state.field(foldState,!1);if(!to||!to.size)return!1;let ro=[];return to.between(0,eo.state.doc.length,(no,oo)=>{ro.push(unfoldEffect.of({from:no,to:oo}))}),eo.dispatch({effects:ro}),!0},foldKeymap=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:foldCode},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:unfoldCode},{key:"Ctrl-Alt-[",run:foldAll},{key:"Ctrl-Alt-]",run:unfoldAll}],defaultConfig={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},foldConfig=Facet.define({combine(eo){return combineConfig(eo,defaultConfig)}});function codeFolding(eo){let to=[foldState,baseTheme$1$1];return eo&&to.push(foldConfig.of(eo)),to}function widgetToDOM(eo,to){let{state:ro}=eo,no=ro.facet(foldConfig),oo=so=>{let ao=eo.lineBlockAt(eo.posAtDOM(so.target)),lo=findFold(eo.state,ao.from,ao.to);lo&&eo.dispatch({effects:unfoldEffect.of(lo)}),so.preventDefault()};if(no.placeholderDOM)return no.placeholderDOM(eo,oo,to);let io=document.createElement("span");return io.textContent=no.placeholderText,io.setAttribute("aria-label",ro.phrase("folded code")),io.title=ro.phrase("unfold"),io.className="cm-foldPlaceholder",io.onclick=oo,io}const foldWidget=Decoration.replace({widget:new class extends WidgetType{toDOM(eo){return widgetToDOM(eo,null)}}});class PreparedFoldWidget extends WidgetType{constructor(to){super(),this.value=to}eq(to){return this.value==to.value}toDOM(to){return widgetToDOM(to,this.value)}}const foldGutterDefaults={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class FoldMarker extends GutterMarker{constructor(to,ro){super(),this.config=to,this.open=ro}eq(to){return this.config==to.config&&this.open==to.open}toDOM(to){if(this.config.markerDOM)return this.config.markerDOM(this.open);let ro=document.createElement("span");return ro.textContent=this.open?this.config.openText:this.config.closedText,ro.title=to.state.phrase(this.open?"Fold line":"Unfold line"),ro}}function foldGutter(eo={}){let to=Object.assign(Object.assign({},foldGutterDefaults),eo),ro=new FoldMarker(to,!0),no=new FoldMarker(to,!1),oo=ViewPlugin.fromClass(class{constructor(so){this.from=so.viewport.from,this.markers=this.buildMarkers(so)}update(so){(so.docChanged||so.viewportChanged||so.startState.facet(language)!=so.state.facet(language)||so.startState.field(foldState,!1)!=so.state.field(foldState,!1)||syntaxTree(so.startState)!=syntaxTree(so.state)||to.foldingChanged(so))&&(this.markers=this.buildMarkers(so.view))}buildMarkers(so){let ao=new RangeSetBuilder;for(let lo of so.viewportLineBlocks){let uo=findFold(so.state,lo.from,lo.to)?no:foldable(so.state,lo.from,lo.to)?ro:null;uo&&ao.add(lo.from,lo.from,uo)}return ao.finish()}}),{domEventHandlers:io}=to;return[oo,gutter({class:"cm-foldGutter",markers(so){var ao;return((ao=so.plugin(oo))===null||ao===void 0?void 0:ao.markers)||RangeSet.empty},initialSpacer(){return new FoldMarker(to,!1)},domEventHandlers:Object.assign(Object.assign({},io),{click:(so,ao,lo)=>{if(io.click&&io.click(so,ao,lo))return!0;let uo=findFold(so.state,ao.from,ao.to);if(uo)return so.dispatch({effects:unfoldEffect.of(uo)}),!0;let co=foldable(so.state,ao.from,ao.to);return co?(so.dispatch({effects:foldEffect.of(co)}),!0):!1}})}),codeFolding()]}const baseTheme$1$1=EditorView.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class HighlightStyle{constructor(to,ro){this.specs=to;let no;function oo(ao){let lo=StyleModule.newName();return(no||(no=Object.create(null)))["."+lo]=ao,lo}const io=typeof ro.all=="string"?ro.all:ro.all?oo(ro.all):void 0,so=ro.scope;this.scope=so instanceof Language?ao=>ao.prop(languageDataProp)==so.data:so?ao=>ao==so:void 0,this.style=tagHighlighter(to.map(ao=>({tag:ao.tag,class:ao.class||oo(Object.assign({},ao,{tag:null}))})),{all:io}).style,this.module=no?new StyleModule(no):null,this.themeType=ro.themeType}static define(to,ro){return new HighlightStyle(to,ro||{})}}const highlighterFacet=Facet.define(),fallbackHighlighter=Facet.define({combine(eo){return eo.length?[eo[0]]:null}});function getHighlighters(eo){let to=eo.facet(highlighterFacet);return to.length?to:eo.facet(fallbackHighlighter)}function syntaxHighlighting(eo,to){let ro=[treeHighlighter],no;return eo instanceof HighlightStyle&&(eo.module&&ro.push(EditorView.styleModule.of(eo.module)),no=eo.themeType),to!=null&&to.fallback?ro.push(fallbackHighlighter.of(eo)):no?ro.push(highlighterFacet.computeN([EditorView.darkTheme],oo=>oo.facet(EditorView.darkTheme)==(no=="dark")?[eo]:[])):ro.push(highlighterFacet.of(eo)),ro}class TreeHighlighter{constructor(to){this.markCache=Object.create(null),this.tree=syntaxTree(to.state),this.decorations=this.buildDeco(to,getHighlighters(to.state)),this.decoratedTo=to.viewport.to}update(to){let ro=syntaxTree(to.state),no=getHighlighters(to.state),oo=no!=getHighlighters(to.startState),{viewport:io}=to.view,so=to.changes.mapPos(this.decoratedTo,1);ro.length=io.to?(this.decorations=this.decorations.map(to.changes),this.decoratedTo=so):(ro!=this.tree||to.viewportChanged||oo)&&(this.tree=ro,this.decorations=this.buildDeco(to.view,no),this.decoratedTo=io.to)}buildDeco(to,ro){if(!ro||!this.tree.length)return Decoration.none;let no=new RangeSetBuilder;for(let{from:oo,to:io}of to.visibleRanges)highlightTree(this.tree,ro,(so,ao,lo)=>{no.add(so,ao,this.markCache[lo]||(this.markCache[lo]=Decoration.mark({class:lo})))},oo,io);return no.finish()}}const treeHighlighter=Prec.high(ViewPlugin.fromClass(TreeHighlighter,{decorations:eo=>eo.decorations})),defaultHighlightStyle=HighlightStyle.define([{tag:tags.meta,color:"#404740"},{tag:tags.link,textDecoration:"underline"},{tag:tags.heading,textDecoration:"underline",fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strong,fontWeight:"bold"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.keyword,color:"#708"},{tag:[tags.atom,tags.bool,tags.url,tags.contentSeparator,tags.labelName],color:"#219"},{tag:[tags.literal,tags.inserted],color:"#164"},{tag:[tags.string,tags.deleted],color:"#a11"},{tag:[tags.regexp,tags.escape,tags.special(tags.string)],color:"#e40"},{tag:tags.definition(tags.variableName),color:"#00f"},{tag:tags.local(tags.variableName),color:"#30a"},{tag:[tags.typeName,tags.namespace],color:"#085"},{tag:tags.className,color:"#167"},{tag:[tags.special(tags.variableName),tags.macroName],color:"#256"},{tag:tags.definition(tags.propertyName),color:"#00c"},{tag:tags.comment,color:"#940"},{tag:tags.invalid,color:"#f00"}]),baseTheme$4=EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),DefaultScanDist=1e4,DefaultBrackets="()[]{}",bracketMatchingConfig=Facet.define({combine(eo){return combineConfig(eo,{afterCursor:!0,brackets:DefaultBrackets,maxScanDistance:DefaultScanDist,renderMatch:defaultRenderMatch})}}),matchingMark=Decoration.mark({class:"cm-matchingBracket"}),nonmatchingMark=Decoration.mark({class:"cm-nonmatchingBracket"});function defaultRenderMatch(eo){let to=[],ro=eo.matched?matchingMark:nonmatchingMark;return to.push(ro.range(eo.start.from,eo.start.to)),eo.end&&to.push(ro.range(eo.end.from,eo.end.to)),to}const bracketMatchingState=StateField.define({create(){return Decoration.none},update(eo,to){if(!to.docChanged&&!to.selection)return eo;let ro=[],no=to.state.facet(bracketMatchingConfig);for(let oo of to.state.selection.ranges){if(!oo.empty)continue;let io=matchBrackets(to.state,oo.head,-1,no)||oo.head>0&&matchBrackets(to.state,oo.head-1,1,no)||no.afterCursor&&(matchBrackets(to.state,oo.head,1,no)||oo.headEditorView.decorations.from(eo)}),bracketMatchingUnique=[bracketMatchingState,baseTheme$4];function bracketMatching(eo={}){return[bracketMatchingConfig.of(eo),bracketMatchingUnique]}const bracketMatchingHandle=new NodeProp;function matchingNodes(eo,to,ro){let no=eo.prop(to<0?NodeProp.openedBy:NodeProp.closedBy);if(no)return no;if(eo.name.length==1){let oo=ro.indexOf(eo.name);if(oo>-1&&oo%2==(to<0?1:0))return[ro[oo+to]]}return null}function findHandle(eo){let to=eo.type.prop(bracketMatchingHandle);return to?to(eo.node):eo}function matchBrackets(eo,to,ro,no={}){let oo=no.maxScanDistance||DefaultScanDist,io=no.brackets||DefaultBrackets,so=syntaxTree(eo),ao=so.resolveInner(to,ro);for(let lo=ao;lo;lo=lo.parent){let uo=matchingNodes(lo.type,ro,io);if(uo&&lo.from0?to>=co.from&&toco.from&&to<=co.to))return matchMarkedBrackets(eo,to,ro,lo,co,uo,io)}}return matchPlainBrackets(eo,to,ro,so,ao.type,oo,io)}function matchMarkedBrackets(eo,to,ro,no,oo,io,so){let ao=no.parent,lo={from:oo.from,to:oo.to},uo=0,co=ao==null?void 0:ao.cursor();if(co&&(ro<0?co.childBefore(no.from):co.childAfter(no.to)))do if(ro<0?co.to<=no.from:co.from>=no.to){if(uo==0&&io.indexOf(co.type.name)>-1&&co.from0)return null;let uo={from:ro<0?to-1:to,to:ro>0?to+1:to},co=eo.doc.iterRange(to,ro>0?eo.doc.length:0),fo=0;for(let ho=0;!co.next().done&&ho<=io;){let po=co.value;ro<0&&(ho+=po.length);let go=to+ho*ro;for(let vo=ro>0?0:po.length-1,bo=ro>0?po.length:-1;vo!=bo;vo+=ro){let xo=so.indexOf(po[vo]);if(!(xo<0||no.resolveInner(go+vo,1).type!=oo))if(xo%2==0==ro>0)fo++;else{if(fo==1)return{start:uo,end:{from:go+vo,to:go+vo+1},matched:xo>>1==lo>>1};fo--}}ro>0&&(ho+=po.length)}return co.done?{start:uo,matched:!1}:null}const noTokens=Object.create(null),typeArray=[NodeType.none],warned=[],byTag=Object.create(null),defaultTable=Object.create(null);for(let[eo,to]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])defaultTable[eo]=createTokenType(noTokens,to);function warnForPart(eo,to){warned.indexOf(eo)>-1||(warned.push(eo),console.warn(to))}function createTokenType(eo,to){let ro=[];for(let ao of to.split(" ")){let lo=[];for(let uo of ao.split(".")){let co=eo[uo]||tags[uo];co?typeof co=="function"?lo.length?lo=lo.map(co):warnForPart(uo,`Modifier ${uo} used at start of tag`):lo.length?warnForPart(uo,`Tag ${uo} used as modifier`):lo=Array.isArray(co)?co:[co]:warnForPart(uo,`Unknown highlighting tag ${uo}`)}for(let uo of lo)ro.push(uo)}if(!ro.length)return 0;let no=to.replace(/ /g,"_"),oo=no+" "+ro.map(ao=>ao.id),io=byTag[oo];if(io)return io.id;let so=byTag[oo]=NodeType.define({id:typeArray.length,name:no,props:[styleTags({[no]:ro})]});return typeArray.push(so),so.id}Direction.RTL,Direction.LTR;class CompletionContext{constructor(to,ro,no){this.state=to,this.pos=ro,this.explicit=no,this.abortListeners=[]}tokenBefore(to){let ro=syntaxTree(this.state).resolveInner(this.pos,-1);for(;ro&&to.indexOf(ro.name)<0;)ro=ro.parent;return ro?{from:ro.from,to:this.pos,text:this.state.sliceDoc(ro.from,this.pos),type:ro.type}:null}matchBefore(to){let ro=this.state.doc.lineAt(this.pos),no=Math.max(ro.from,this.pos-250),oo=ro.text.slice(no-ro.from,this.pos-ro.from),io=oo.search(ensureAnchor(to,!1));return io<0?null:{from:no+io,to:this.pos,text:oo.slice(io)}}get aborted(){return this.abortListeners==null}addEventListener(to,ro){to=="abort"&&this.abortListeners&&this.abortListeners.push(ro)}}function toSet(eo){let to=Object.keys(eo).join(""),ro=/\w/.test(to);return ro&&(to=to.replace(/\w/g,"")),`[${ro?"\\w":""}${to.replace(/[^\w\s]/g,"\\$&")}]`}function prefixMatch(eo){let to=Object.create(null),ro=Object.create(null);for(let{label:oo}of eo){to[oo[0]]=!0;for(let io=1;iotypeof oo=="string"?{label:oo}:oo),[ro,no]=to.every(oo=>/^\w+$/.test(oo.label))?[/\w*$/,/\w+$/]:prefixMatch(to);return oo=>{let io=oo.matchBefore(no);return io||oo.explicit?{from:io?io.from:oo.pos,options:to,validFor:ro}:null}}function ifNotIn(eo,to){return ro=>{for(let no=syntaxTree(ro.state).resolveInner(ro.pos,-1);no;no=no.parent){if(eo.indexOf(no.name)>-1)return null;if(no.type.isTop)break}return to(ro)}}let Option$1=class{constructor(to,ro,no,oo){this.completion=to,this.source=ro,this.match=no,this.score=oo}};function cur(eo){return eo.selection.main.from}function ensureAnchor(eo,to){var ro;let{source:no}=eo,oo=to&&no[0]!="^",io=no[no.length-1]!="$";return!oo&&!io?eo:new RegExp(`${oo?"^":""}(?:${no})${io?"$":""}`,(ro=eo.flags)!==null&&ro!==void 0?ro:eo.ignoreCase?"i":"")}const pickedCompletion=Annotation.define();function insertCompletionText(eo,to,ro,no){let{main:oo}=eo.selection,io=ro-oo.from,so=no-oo.from;return Object.assign(Object.assign({},eo.changeByRange(ao=>ao!=oo&&ro!=no&&eo.sliceDoc(ao.from+io,ao.from+so)!=eo.sliceDoc(ro,no)?{range:ao}:{changes:{from:ao.from+io,to:no==oo.from?ao.to:ao.from+so,insert:to},range:EditorSelection.cursor(ao.from+io+to.length)})),{scrollIntoView:!0,userEvent:"input.complete"})}const SourceCache=new WeakMap;function asSource(eo){if(!Array.isArray(eo))return eo;let to=SourceCache.get(eo);return to||SourceCache.set(eo,to=completeFromList(eo)),to}const startCompletionEffect=StateEffect.define(),closeCompletionEffect=StateEffect.define();class FuzzyMatcher{constructor(to){this.pattern=to,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let ro=0;ro=48&&To<=57||To>=97&&To<=122?2:To>=65&&To<=90?1:0:(wo=fromCodePoint(To))!=wo.toLowerCase()?1:wo!=wo.toUpperCase()?2:0;(!_o||Co==1&&bo||So==0&&Co!=0)&&(ro[fo]==To||no[fo]==To&&(ho=!0)?so[fo++]=_o:so.length&&(xo=!1)),So=Co,_o+=codePointSize(To)}return fo==lo&&so[0]==0&&xo?this.result(-100+(ho?-200:0),so,to):po==lo&&go==0?this.ret(-200-to.length+(vo==to.length?0:-100),[0,vo]):ao>-1?this.ret(-700-to.length,[ao,ao+this.pattern.length]):po==lo?this.ret(-900-to.length,[go,vo]):fo==lo?this.result(-100+(ho?-200:0)+-700+(xo?0:-1100),so,to):ro.length==2?null:this.result((oo[0]?-700:0)+-200+-1100,oo,to)}result(to,ro,no){let oo=[],io=0;for(let so of ro){let ao=so+(this.astral?codePointSize(codePointAt(no,so)):1);io&&oo[io-1]==so?oo[io-1]=ao:(oo[io++]=so,oo[io++]=ao)}return this.ret(to-no.length,oo)}}class StrictMatcher{constructor(to){this.pattern=to,this.matched=[],this.score=0,this.folded=to.toLowerCase()}match(to){if(to.length"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:defaultPositionInfo,filterStrict:!1,compareCompletions:(to,ro)=>to.label.localeCompare(ro.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(to,ro)=>to&&ro,closeOnBlur:(to,ro)=>to&&ro,icons:(to,ro)=>to&&ro,tooltipClass:(to,ro)=>no=>joinClass(to(no),ro(no)),optionClass:(to,ro)=>no=>joinClass(to(no),ro(no)),addToOptions:(to,ro)=>to.concat(ro),filterStrict:(to,ro)=>to||ro})}});function joinClass(eo,to){return eo?to?eo+" "+to:eo:to}function defaultPositionInfo(eo,to,ro,no,oo,io){let so=eo.textDirection==Direction.RTL,ao=so,lo=!1,uo="top",co,fo,ho=to.left-oo.left,po=oo.right-to.right,go=no.right-no.left,vo=no.bottom-no.top;if(ao&&ho=vo||_o>to.top?co=ro.bottom-to.top:(uo="bottom",co=to.bottom-ro.top)}let bo=(to.bottom-to.top)/io.offsetHeight,xo=(to.right-to.left)/io.offsetWidth;return{style:`${uo}: ${co/bo}px; max-width: ${fo/xo}px`,class:"cm-completionInfo-"+(lo?so?"left-narrow":"right-narrow":ao?"left":"right")}}function optionContent(eo){let to=eo.addToOptions.slice();return eo.icons&&to.push({render(ro){let no=document.createElement("div");return no.classList.add("cm-completionIcon"),ro.type&&no.classList.add(...ro.type.split(/\s+/g).map(oo=>"cm-completionIcon-"+oo)),no.setAttribute("aria-hidden","true"),no},position:20}),to.push({render(ro,no,oo,io){let so=document.createElement("span");so.className="cm-completionLabel";let ao=ro.displayLabel||ro.label,lo=0;for(let uo=0;uolo&&so.appendChild(document.createTextNode(ao.slice(lo,co)));let ho=so.appendChild(document.createElement("span"));ho.appendChild(document.createTextNode(ao.slice(co,fo))),ho.className="cm-completionMatchedText",lo=fo}return loro.position-no.position).map(ro=>ro.render)}function rangeAroundSelected(eo,to,ro){if(eo<=ro)return{from:0,to:eo};if(to<0&&(to=0),to<=eo>>1){let oo=Math.floor(to/ro);return{from:oo*ro,to:(oo+1)*ro}}let no=Math.floor((eo-to)/ro);return{from:eo-(no+1)*ro,to:eo-no*ro}}class CompletionTooltip{constructor(to,ro,no){this.view=to,this.stateField=ro,this.applyCompletion=no,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:lo=>this.placeInfo(lo),key:this},this.space=null,this.currentClass="";let oo=to.state.field(ro),{options:io,selected:so}=oo.open,ao=to.state.facet(completionConfig);this.optionContent=optionContent(ao),this.optionClass=ao.optionClass,this.tooltipClass=ao.tooltipClass,this.range=rangeAroundSelected(io.length,so,ao.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(to.state),this.dom.addEventListener("mousedown",lo=>{let{options:uo}=to.state.field(ro).open;for(let co=lo.target,fo;co&&co!=this.dom;co=co.parentNode)if(co.nodeName=="LI"&&(fo=/-(\d+)$/.exec(co.id))&&+fo[1]{let uo=to.state.field(this.stateField,!1);uo&&uo.tooltip&&to.state.facet(completionConfig).closeOnBlur&&lo.relatedTarget!=to.contentDOM&&to.dispatch({effects:closeCompletionEffect.of(null)})}),this.showOptions(io,oo.id)}mount(){this.updateSel()}showOptions(to,ro){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(to,ro,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(to){var ro;let no=to.state.field(this.stateField),oo=to.startState.field(this.stateField);if(this.updateTooltipClass(to.state),no!=oo){let{options:io,selected:so,disabled:ao}=no.open;(!oo.open||oo.open.options!=io)&&(this.range=rangeAroundSelected(io.length,so,to.state.facet(completionConfig).maxRenderedOptions),this.showOptions(io,no.id)),this.updateSel(),ao!=((ro=oo.open)===null||ro===void 0?void 0:ro.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!ao)}}updateTooltipClass(to){let ro=this.tooltipClass(to);if(ro!=this.currentClass){for(let no of this.currentClass.split(" "))no&&this.dom.classList.remove(no);for(let no of ro.split(" "))no&&this.dom.classList.add(no);this.currentClass=ro}}positioned(to){this.space=to,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let to=this.view.state.field(this.stateField),ro=to.open;if((ro.selected>-1&&ro.selected=this.range.to)&&(this.range=rangeAroundSelected(ro.options.length,ro.selected,this.view.state.facet(completionConfig).maxRenderedOptions),this.showOptions(ro.options,to.id)),this.updateSelectedOption(ro.selected)){this.destroyInfo();let{completion:no}=ro.options[ro.selected],{info:oo}=no;if(!oo)return;let io=typeof oo=="string"?document.createTextNode(oo):oo(no);if(!io)return;"then"in io?io.then(so=>{so&&this.view.state.field(this.stateField,!1)==to&&this.addInfoPane(so,no)}).catch(so=>logException(this.view.state,so,"completion info")):this.addInfoPane(io,no)}}addInfoPane(to,ro){this.destroyInfo();let no=this.info=document.createElement("div");if(no.className="cm-tooltip cm-completionInfo",to.nodeType!=null)no.appendChild(to),this.infoDestroy=null;else{let{dom:oo,destroy:io}=to;no.appendChild(oo),this.infoDestroy=io||null}this.dom.appendChild(no),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(to){let ro=null;for(let no=this.list.firstChild,oo=this.range.from;no;no=no.nextSibling,oo++)no.nodeName!="LI"||!no.id?oo--:oo==to?no.hasAttribute("aria-selected")||(no.setAttribute("aria-selected","true"),ro=no):no.hasAttribute("aria-selected")&&no.removeAttribute("aria-selected");return ro&&scrollIntoView(this.list,ro),ro}measureInfo(){let to=this.dom.querySelector("[aria-selected]");if(!to||!this.info)return null;let ro=this.dom.getBoundingClientRect(),no=this.info.getBoundingClientRect(),oo=to.getBoundingClientRect(),io=this.space;if(!io){let so=this.dom.ownerDocument.defaultView||window;io={left:0,top:0,right:so.innerWidth,bottom:so.innerHeight}}return oo.top>Math.min(io.bottom,ro.bottom)-10||oo.bottomno.from||no.from==0))if(io=ho,typeof uo!="string"&&uo.header)oo.appendChild(uo.header(uo));else{let po=oo.appendChild(document.createElement("completion-section"));po.textContent=ho}}const co=oo.appendChild(document.createElement("li"));co.id=ro+"-"+so,co.setAttribute("role","option");let fo=this.optionClass(ao);fo&&(co.className=fo);for(let ho of this.optionContent){let po=ho(ao,this.view.state,this.view,lo);po&&co.appendChild(po)}}return no.from&&oo.classList.add("cm-completionListIncompleteTop"),no.tonew CompletionTooltip(ro,eo,to)}function scrollIntoView(eo,to){let ro=eo.getBoundingClientRect(),no=to.getBoundingClientRect(),oo=ro.height/eo.offsetHeight;no.topro.bottom&&(eo.scrollTop+=(no.bottom-ro.bottom)/oo)}function score(eo){return(eo.boost||0)*100+(eo.apply?10:0)+(eo.info?5:0)+(eo.type?1:0)}function sortOptions(eo,to){let ro=[],no=null,oo=uo=>{ro.push(uo);let{section:co}=uo.completion;if(co){no||(no=[]);let fo=typeof co=="string"?co:co.name;no.some(ho=>ho.name==fo)||no.push(typeof co=="string"?{name:fo}:co)}},io=to.facet(completionConfig);for(let uo of eo)if(uo.hasResult()){let co=uo.result.getMatch;if(uo.result.filter===!1)for(let fo of uo.result.options)oo(new Option$1(fo,uo.source,co?co(fo):[],1e9-ro.length));else{let fo=to.sliceDoc(uo.from,uo.to),ho,po=io.filterStrict?new StrictMatcher(fo):new FuzzyMatcher(fo);for(let go of uo.result.options)if(ho=po.match(go.label)){let vo=go.displayLabel?co?co(go,ho.matched):[]:ho.matched;oo(new Option$1(go,uo.source,vo,ho.score+(go.boost||0)))}}}if(no){let uo=Object.create(null),co=0,fo=(ho,po)=>{var go,vo;return((go=ho.rank)!==null&&go!==void 0?go:1e9)-((vo=po.rank)!==null&&vo!==void 0?vo:1e9)||(ho.namefo.score-co.score||lo(co.completion,fo.completion))){let co=uo.completion;!ao||ao.label!=co.label||ao.detail!=co.detail||ao.type!=null&&co.type!=null&&ao.type!=co.type||ao.apply!=co.apply||ao.boost!=co.boost?so.push(uo):score(uo.completion)>score(ao)&&(so[so.length-1]=uo),ao=uo.completion}return so}class CompletionDialog{constructor(to,ro,no,oo,io,so){this.options=to,this.attrs=ro,this.tooltip=no,this.timestamp=oo,this.selected=io,this.disabled=so}setSelected(to,ro){return to==this.selected||to>=this.options.length?this:new CompletionDialog(this.options,makeAttrs(ro,to),this.tooltip,this.timestamp,to,this.disabled)}static build(to,ro,no,oo,io){let so=sortOptions(to,ro);if(!so.length)return oo&&to.some(lo=>lo.state==1)?new CompletionDialog(oo.options,oo.attrs,oo.tooltip,oo.timestamp,oo.selected,!0):null;let ao=ro.facet(completionConfig).selectOnOpen?0:-1;if(oo&&oo.selected!=ao&&oo.selected!=-1){let lo=oo.options[oo.selected].completion;for(let uo=0;uouo.hasResult()?Math.min(lo,uo.from):lo,1e8),create:createTooltip,above:io.aboveCursor},oo?oo.timestamp:Date.now(),ao,!1)}map(to){return new CompletionDialog(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:to.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class CompletionState{constructor(to,ro,no){this.active=to,this.id=ro,this.open=no}static start(){return new CompletionState(none$1,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(to){let{state:ro}=to,no=ro.facet(completionConfig),io=(no.override||ro.languageDataAt("autocomplete",cur(ro)).map(asSource)).map(ao=>(this.active.find(uo=>uo.source==ao)||new ActiveSource(ao,this.active.some(uo=>uo.state!=0)?1:0)).update(to,no));io.length==this.active.length&&io.every((ao,lo)=>ao==this.active[lo])&&(io=this.active);let so=this.open;so&&to.docChanged&&(so=so.map(to.changes)),to.selection||io.some(ao=>ao.hasResult()&&to.changes.touchesRange(ao.from,ao.to))||!sameResults(io,this.active)?so=CompletionDialog.build(io,ro,this.id,so,no):so&&so.disabled&&!io.some(ao=>ao.state==1)&&(so=null),!so&&io.every(ao=>ao.state!=1)&&io.some(ao=>ao.hasResult())&&(io=io.map(ao=>ao.hasResult()?new ActiveSource(ao.source,0):ao));for(let ao of to.effects)ao.is(setSelectedEffect)&&(so=so&&so.setSelected(ao.value,this.id));return io==this.active&&so==this.open?this:new CompletionState(io,this.id,so)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:baseAttrs}}function sameResults(eo,to){if(eo==to)return!0;for(let ro=0,no=0;;){for(;ro-1&&(ro["aria-activedescendant"]=eo+"-"+to),ro}const none$1=[];function getUserEvent(eo){return eo.isUserEvent("input.type")?"input":eo.isUserEvent("delete.backward")?"delete":null}class ActiveSource{constructor(to,ro,no=-1){this.source=to,this.state=ro,this.explicitPos=no}hasResult(){return!1}update(to,ro){let no=getUserEvent(to),oo=this;no?oo=oo.handleUserEvent(to,no,ro):to.docChanged?oo=oo.handleChange(to):to.selection&&oo.state!=0&&(oo=new ActiveSource(oo.source,0));for(let io of to.effects)if(io.is(startCompletionEffect))oo=new ActiveSource(oo.source,1,io.value?cur(to.state):-1);else if(io.is(closeCompletionEffect))oo=new ActiveSource(oo.source,0);else if(io.is(setActiveEffect))for(let so of io.value)so.source==oo.source&&(oo=so);return oo}handleUserEvent(to,ro,no){return ro=="delete"||!no.activateOnTyping?this.map(to.changes):new ActiveSource(this.source,1)}handleChange(to){return to.changes.touchesRange(cur(to.startState))?new ActiveSource(this.source,0):this.map(to.changes)}map(to){return to.empty||this.explicitPos<0?this:new ActiveSource(this.source,this.state,to.mapPos(this.explicitPos))}}class ActiveResult extends ActiveSource{constructor(to,ro,no,oo,io){super(to,2,ro),this.result=no,this.from=oo,this.to=io}hasResult(){return!0}handleUserEvent(to,ro,no){var oo;let io=this.result;io.map&&!to.changes.empty&&(io=io.map(io,to.changes));let so=to.changes.mapPos(this.from),ao=to.changes.mapPos(this.to,1),lo=cur(to.state);if((this.explicitPos<0?lo<=so:loao||!io||ro=="delete"&&cur(to.startState)==this.from)return new ActiveSource(this.source,ro=="input"&&no.activateOnTyping?1:0);let uo=this.explicitPos<0?-1:to.changes.mapPos(this.explicitPos);return checkValid(io.validFor,to.state,so,ao)?new ActiveResult(this.source,uo,io,so,ao):io.update&&(io=io.update(io,so,ao,new CompletionContext(to.state,lo,uo>=0)))?new ActiveResult(this.source,uo,io,io.from,(oo=io.to)!==null&&oo!==void 0?oo:cur(to.state)):new ActiveSource(this.source,1,uo)}handleChange(to){return to.changes.touchesRange(this.from,this.to)?new ActiveSource(this.source,0):this.map(to.changes)}map(to){return to.empty?this:(this.result.map?this.result.map(this.result,to):this.result)?new ActiveResult(this.source,this.explicitPos<0?-1:to.mapPos(this.explicitPos),this.result,to.mapPos(this.from),to.mapPos(this.to,1)):new ActiveSource(this.source,0)}}function checkValid(eo,to,ro,no){if(!eo)return!1;let oo=to.sliceDoc(ro,no);return typeof eo=="function"?eo(oo,ro,no,to):ensureAnchor(eo,!0).test(oo)}const setActiveEffect=StateEffect.define({map(eo,to){return eo.map(ro=>ro.map(to))}}),setSelectedEffect=StateEffect.define(),completionState=StateField.define({create(){return CompletionState.start()},update(eo,to){return eo.update(to)},provide:eo=>[showTooltip.from(eo,to=>to.tooltip),EditorView.contentAttributes.from(eo,to=>to.attrs)]});function applyCompletion(eo,to){const ro=to.completion.apply||to.completion.label;let no=eo.state.field(completionState).active.find(oo=>oo.source==to.source);return no instanceof ActiveResult?(typeof ro=="string"?eo.dispatch(Object.assign(Object.assign({},insertCompletionText(eo.state,ro,no.from,no.to)),{annotations:pickedCompletion.of(to.completion)})):ro(eo,to.completion,no.from,no.to),!0):!1}const createTooltip=completionTooltip(completionState,applyCompletion);function moveCompletionSelection(eo,to="option"){return ro=>{let no=ro.state.field(completionState,!1);if(!no||!no.open||no.open.disabled||Date.now()-no.open.timestamp-1?no.open.selected+oo*(eo?1:-1):eo?0:so-1;return ao<0?ao=to=="page"?0:so-1:ao>=so&&(ao=to=="page"?so-1:0),ro.dispatch({effects:setSelectedEffect.of(ao)}),!0}}const acceptCompletion=eo=>{let to=eo.state.field(completionState,!1);return eo.state.readOnly||!to||!to.open||to.open.selected<0||to.open.disabled||Date.now()-to.open.timestampeo.state.field(completionState,!1)?(eo.dispatch({effects:startCompletionEffect.of(!0)}),!0):!1,closeCompletion=eo=>{let to=eo.state.field(completionState,!1);return!to||!to.active.some(ro=>ro.state!=0)?!1:(eo.dispatch({effects:closeCompletionEffect.of(null)}),!0)};class RunningQuery{constructor(to,ro){this.active=to,this.context=ro,this.time=Date.now(),this.updates=[],this.done=void 0}}const MaxUpdateCount=50,MinAbortTime=1e3,completionPlugin=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let to of eo.state.field(completionState).active)to.state==1&&this.startQuery(to)}update(eo){let to=eo.state.field(completionState);if(!eo.selectionSet&&!eo.docChanged&&eo.startState.field(completionState)==to)return;let ro=eo.transactions.some(oo=>(oo.selection||oo.docChanged)&&!getUserEvent(oo));for(let oo=0;ooMaxUpdateCount&&Date.now()-io.time>MinAbortTime){for(let so of io.context.abortListeners)try{so()}catch(ao){logException(this.view.state,ao)}io.context.abortListeners=null,this.running.splice(oo--,1)}else io.updates.push(...eo.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),eo.transactions.some(oo=>oo.effects.some(io=>io.is(startCompletionEffect)))&&(this.pendingStart=!0);let no=this.pendingStart?50:eo.state.facet(completionConfig).activateOnTypingDelay;if(this.debounceUpdate=to.active.some(oo=>oo.state==1&&!this.running.some(io=>io.active.source==oo.source))?setTimeout(()=>this.startUpdate(),no):-1,this.composing!=0)for(let oo of eo.transactions)getUserEvent(oo)=="input"?this.composing=2:this.composing==2&&oo.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:eo}=this.view,to=eo.field(completionState);for(let ro of to.active)ro.state==1&&!this.running.some(no=>no.active.source==ro.source)&&this.startQuery(ro)}startQuery(eo){let{state:to}=this.view,ro=cur(to),no=new CompletionContext(to,ro,eo.explicitPos==ro),oo=new RunningQuery(eo,no);this.running.push(oo),Promise.resolve(eo.source(no)).then(io=>{oo.context.aborted||(oo.done=io||null,this.scheduleAccept())},io=>{this.view.dispatch({effects:closeCompletionEffect.of(null)}),logException(this.view.state,io)})}scheduleAccept(){this.running.every(eo=>eo.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(completionConfig).updateSyncTime))}accept(){var eo;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let to=[],ro=this.view.state.facet(completionConfig);for(let no=0;noso.source==oo.active.source);if(io&&io.state==1)if(oo.done==null){let so=new ActiveSource(oo.active.source,0);for(let ao of oo.updates)so=so.update(ao,ro);so.state!=1&&to.push(so)}else this.startQuery(io)}to.length&&this.view.dispatch({effects:setActiveEffect.of(to)})}},{eventHandlers:{blur(eo){let to=this.view.state.field(completionState,!1);if(to&&to.tooltip&&this.view.state.facet(completionConfig).closeOnBlur){let ro=to.open&&getTooltip(this.view,to.open.tooltip);(!ro||!ro.dom.contains(eo.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:closeCompletionEffect.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:startCompletionEffect.of(!1)}),20),this.composing=0}}}),windows=typeof navigator=="object"&&/Win/.test(navigator.platform),commitCharacters=Prec.highest(EditorView.domEventHandlers({keydown(eo,to){let ro=to.state.field(completionState,!1);if(!ro||!ro.open||ro.open.disabled||ro.open.selected<0||eo.key.length>1||eo.ctrlKey&&!(windows&&eo.altKey)||eo.metaKey)return!1;let no=ro.open.options[ro.open.selected],oo=ro.active.find(so=>so.source==no.source),io=no.completion.commitCharacters||oo.result.commitCharacters;return io&&io.indexOf(eo.key)>-1&&applyCompletion(to,no),!1}})),baseTheme$3=EditorView.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class FieldPos{constructor(to,ro,no,oo){this.field=to,this.line=ro,this.from=no,this.to=oo}}class FieldRange{constructor(to,ro,no){this.field=to,this.from=ro,this.to=no}map(to){let ro=to.mapPos(this.from,-1,MapMode.TrackDel),no=to.mapPos(this.to,1,MapMode.TrackDel);return ro==null||no==null?null:new FieldRange(this.field,ro,no)}}class Snippet{constructor(to,ro){this.lines=to,this.fieldPositions=ro}instantiate(to,ro){let no=[],oo=[ro],io=to.doc.lineAt(ro),so=/^\s*/.exec(io.text)[0];for(let lo of this.lines){if(no.length){let uo=so,co=/^\t*/.exec(lo)[0].length;for(let fo=0;fonew FieldRange(lo.field,oo[lo.line]+lo.from,oo[lo.line]+lo.to));return{text:no,ranges:ao}}static parse(to){let ro=[],no=[],oo=[],io;for(let so of to.split(/\r\n?|\n/)){for(;io=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(so);){let ao=io[1]?+io[1]:null,lo=io[2]||io[3]||"",uo=-1;for(let co=0;co=uo&&fo.field++}oo.push(new FieldPos(uo,no.length,io.index,io.index+lo.length)),so=so.slice(0,io.index)+lo+so.slice(io.index+io[0].length)}for(let ao;ao=/\\([{}])/.exec(so);){so=so.slice(0,ao.index)+ao[1]+so.slice(ao.index+ao[0].length);for(let lo of oo)lo.line==no.length&&lo.from>ao.index&&(lo.from--,lo.to--)}no.push(so)}return new Snippet(no,oo)}}let fieldMarker=Decoration.widget({widget:new class extends WidgetType{toDOM(){let eo=document.createElement("span");return eo.className="cm-snippetFieldPosition",eo}ignoreEvent(){return!1}}}),fieldRange=Decoration.mark({class:"cm-snippetField"});class ActiveSnippet{constructor(to,ro){this.ranges=to,this.active=ro,this.deco=Decoration.set(to.map(no=>(no.from==no.to?fieldMarker:fieldRange).range(no.from,no.to)))}map(to){let ro=[];for(let no of this.ranges){let oo=no.map(to);if(!oo)return null;ro.push(oo)}return new ActiveSnippet(ro,this.active)}selectionInsideField(to){return to.ranges.every(ro=>this.ranges.some(no=>no.field==this.active&&no.from<=ro.from&&no.to>=ro.to))}}const setActive=StateEffect.define({map(eo,to){return eo&&eo.map(to)}}),moveToField=StateEffect.define(),snippetState=StateField.define({create(){return null},update(eo,to){for(let ro of to.effects){if(ro.is(setActive))return ro.value;if(ro.is(moveToField)&&eo)return new ActiveSnippet(eo.ranges,ro.value)}return eo&&to.docChanged&&(eo=eo.map(to.changes)),eo&&to.selection&&!eo.selectionInsideField(to.selection)&&(eo=null),eo},provide:eo=>EditorView.decorations.from(eo,to=>to?to.deco:Decoration.none)});function fieldSelection(eo,to){return EditorSelection.create(eo.filter(ro=>ro.field==to).map(ro=>EditorSelection.range(ro.from,ro.to)))}function snippet(eo){let to=Snippet.parse(eo);return(ro,no,oo,io)=>{let{text:so,ranges:ao}=to.instantiate(ro.state,oo),lo={changes:{from:oo,to:io,insert:Text$1.of(so)},scrollIntoView:!0,annotations:no?[pickedCompletion.of(no),Transaction.userEvent.of("input.complete")]:void 0};if(ao.length&&(lo.selection=fieldSelection(ao,0)),ao.some(uo=>uo.field>0)){let uo=new ActiveSnippet(ao,0),co=lo.effects=[setActive.of(uo)];ro.state.field(snippetState,!1)===void 0&&co.push(StateEffect.appendConfig.of([snippetState,addSnippetKeymap,snippetPointerHandler,baseTheme$3]))}ro.dispatch(ro.state.update(lo))}}function moveField(eo){return({state:to,dispatch:ro})=>{let no=to.field(snippetState,!1);if(!no||eo<0&&no.active==0)return!1;let oo=no.active+eo,io=eo>0&&!no.ranges.some(so=>so.field==oo+eo);return ro(to.update({selection:fieldSelection(no.ranges,oo),effects:setActive.of(io?null:new ActiveSnippet(no.ranges,oo)),scrollIntoView:!0})),!0}}const clearSnippet=({state:eo,dispatch:to})=>eo.field(snippetState,!1)?(to(eo.update({effects:setActive.of(null)})),!0):!1,nextSnippetField=moveField(1),prevSnippetField=moveField(-1),defaultSnippetKeymap=[{key:"Tab",run:nextSnippetField,shift:prevSnippetField},{key:"Escape",run:clearSnippet}],snippetKeymap=Facet.define({combine(eo){return eo.length?eo[0]:defaultSnippetKeymap}}),addSnippetKeymap=Prec.highest(keymap.compute([snippetKeymap],eo=>eo.facet(snippetKeymap)));function snippetCompletion(eo,to){return Object.assign(Object.assign({},to),{apply:snippet(eo)})}const snippetPointerHandler=EditorView.domEventHandlers({mousedown(eo,to){let ro=to.state.field(snippetState,!1),no;if(!ro||(no=to.posAtCoords({x:eo.clientX,y:eo.clientY}))==null)return!1;let oo=ro.ranges.find(io=>io.from<=no&&io.to>=no);return!oo||oo.field==ro.active?!1:(to.dispatch({selection:fieldSelection(ro.ranges,oo.field),effects:setActive.of(ro.ranges.some(io=>io.field>oo.field)?new ActiveSnippet(ro.ranges,oo.field):null),scrollIntoView:!0}),!0)}}),defaults={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},closeBracketEffect=StateEffect.define({map(eo,to){let ro=to.mapPos(eo,-1,MapMode.TrackAfter);return ro??void 0}}),closedBracket=new class extends RangeValue{};closedBracket.startSide=1;closedBracket.endSide=-1;const bracketState=StateField.define({create(){return RangeSet.empty},update(eo,to){if(eo=eo.map(to.changes),to.selection){let ro=to.state.doc.lineAt(to.selection.main.head);eo=eo.update({filter:no=>no>=ro.from&&no<=ro.to})}for(let ro of to.effects)ro.is(closeBracketEffect)&&(eo=eo.update({add:[closedBracket.range(ro.value,ro.value+1)]}));return eo}});function closeBrackets(){return[inputHandler,bracketState]}const definedClosing="()[]{}<>";function closing(eo){for(let to=0;to{if((android?eo.composing:eo.compositionStarted)||eo.state.readOnly)return!1;let oo=eo.state.selection.main;if(no.length>2||no.length==2&&codePointSize(codePointAt(no,0))==1||to!=oo.from||ro!=oo.to)return!1;let io=insertBracket(eo.state,no);return io?(eo.dispatch(io),!0):!1}),deleteBracketPair=({state:eo,dispatch:to})=>{if(eo.readOnly)return!1;let no=config(eo,eo.selection.main.head).brackets||defaults.brackets,oo=null,io=eo.changeByRange(so=>{if(so.empty){let ao=prevChar(eo.doc,so.head);for(let lo of no)if(lo==ao&&nextChar(eo.doc,so.head)==closing(codePointAt(lo,0)))return{changes:{from:so.head-lo.length,to:so.head+lo.length},range:EditorSelection.cursor(so.head-lo.length)}}return{range:oo=so}});return oo||to(eo.update(io,{scrollIntoView:!0,userEvent:"delete.backward"})),!oo},closeBracketsKeymap=[{key:"Backspace",run:deleteBracketPair}];function insertBracket(eo,to){let ro=config(eo,eo.selection.main.head),no=ro.brackets||defaults.brackets;for(let oo of no){let io=closing(codePointAt(oo,0));if(to==oo)return io==oo?handleSame(eo,oo,no.indexOf(oo+oo+oo)>-1,ro):handleOpen(eo,oo,io,ro.before||defaults.before);if(to==io&&closedBracketAt(eo,eo.selection.main.from))return handleClose(eo,oo,io)}return null}function closedBracketAt(eo,to){let ro=!1;return eo.field(bracketState).between(0,eo.doc.length,no=>{no==to&&(ro=!0)}),ro}function nextChar(eo,to){let ro=eo.sliceString(to,to+2);return ro.slice(0,codePointSize(codePointAt(ro,0)))}function prevChar(eo,to){let ro=eo.sliceString(to-2,to);return codePointSize(codePointAt(ro,0))==ro.length?ro:ro.slice(1)}function handleOpen(eo,to,ro,no){let oo=null,io=eo.changeByRange(so=>{if(!so.empty)return{changes:[{insert:to,from:so.from},{insert:ro,from:so.to}],effects:closeBracketEffect.of(so.to+to.length),range:EditorSelection.range(so.anchor+to.length,so.head+to.length)};let ao=nextChar(eo.doc,so.head);return!ao||/\s/.test(ao)||no.indexOf(ao)>-1?{changes:{insert:to+ro,from:so.head},effects:closeBracketEffect.of(so.head+to.length),range:EditorSelection.cursor(so.head+to.length)}:{range:oo=so}});return oo?null:eo.update(io,{scrollIntoView:!0,userEvent:"input.type"})}function handleClose(eo,to,ro){let no=null,oo=eo.changeByRange(io=>io.empty&&nextChar(eo.doc,io.head)==ro?{changes:{from:io.head,to:io.head+ro.length,insert:ro},range:EditorSelection.cursor(io.head+ro.length)}:no={range:io});return no?null:eo.update(oo,{scrollIntoView:!0,userEvent:"input.type"})}function handleSame(eo,to,ro,no){let oo=no.stringPrefixes||defaults.stringPrefixes,io=null,so=eo.changeByRange(ao=>{if(!ao.empty)return{changes:[{insert:to,from:ao.from},{insert:to,from:ao.to}],effects:closeBracketEffect.of(ao.to+to.length),range:EditorSelection.range(ao.anchor+to.length,ao.head+to.length)};let lo=ao.head,uo=nextChar(eo.doc,lo),co;if(uo==to){if(nodeStart(eo,lo))return{changes:{insert:to+to,from:lo},effects:closeBracketEffect.of(lo+to.length),range:EditorSelection.cursor(lo+to.length)};if(closedBracketAt(eo,lo)){let ho=ro&&eo.sliceDoc(lo,lo+to.length*3)==to+to+to?to+to+to:to;return{changes:{from:lo,to:lo+ho.length,insert:ho},range:EditorSelection.cursor(lo+ho.length)}}}else{if(ro&&eo.sliceDoc(lo-2*to.length,lo)==to+to&&(co=canStartStringAt(eo,lo-2*to.length,oo))>-1&&nodeStart(eo,co))return{changes:{insert:to+to+to+to,from:lo},effects:closeBracketEffect.of(lo+to.length),range:EditorSelection.cursor(lo+to.length)};if(eo.charCategorizer(lo)(uo)!=CharCategory.Word&&canStartStringAt(eo,lo,oo)>-1&&!probablyInString(eo,lo,to,oo))return{changes:{insert:to+to,from:lo},effects:closeBracketEffect.of(lo+to.length),range:EditorSelection.cursor(lo+to.length)}}return{range:io=ao}});return io?null:eo.update(so,{scrollIntoView:!0,userEvent:"input.type"})}function nodeStart(eo,to){let ro=syntaxTree(eo).resolveInner(to+1);return ro.parent&&ro.from==to}function probablyInString(eo,to,ro,no){let oo=syntaxTree(eo).resolveInner(to,-1),io=no.reduce((so,ao)=>Math.max(so,ao.length),0);for(let so=0;so<5;so++){let ao=eo.sliceDoc(oo.from,Math.min(oo.to,oo.from+ro.length+io)),lo=ao.indexOf(ro);if(!lo||lo>-1&&no.indexOf(ao.slice(0,lo))>-1){let co=oo.firstChild;for(;co&&co.from==oo.from&&co.to-co.from>ro.length+lo;){if(eo.sliceDoc(co.to-ro.length,co.to)==ro)return!1;co=co.firstChild}return!0}let uo=oo.to==to&&oo.parent;if(!uo)break;oo=uo}return!1}function canStartStringAt(eo,to,ro){let no=eo.charCategorizer(to);if(no(eo.sliceDoc(to-1,to))!=CharCategory.Word)return to;for(let oo of ro){let io=to-oo.length;if(eo.sliceDoc(io,to)==oo&&no(eo.sliceDoc(io-1,io))!=CharCategory.Word)return io}return-1}function autocompletion(eo={}){return[commitCharacters,completionState,completionConfig.of(eo),completionPlugin,completionKeymapExt,baseTheme$3]}const completionKeymap=[{key:"Ctrl-Space",run:startCompletion},{key:"Escape",run:closeCompletion},{key:"ArrowDown",run:moveCompletionSelection(!0)},{key:"ArrowUp",run:moveCompletionSelection(!1)},{key:"PageDown",run:moveCompletionSelection(!0,"page")},{key:"PageUp",run:moveCompletionSelection(!1,"page")},{key:"Enter",run:acceptCompletion}],completionKeymapExt=Prec.highest(keymap.computeN([completionConfig],eo=>eo.facet(completionConfig).defaultKeymap?[completionKeymap]:[]));var define_process_env_default={};class Stack{constructor(to,ro,no,oo,io,so,ao,lo,uo,co=0,fo){this.p=to,this.stack=ro,this.state=no,this.reducePos=oo,this.pos=io,this.score=so,this.buffer=ao,this.bufferBase=lo,this.curContext=uo,this.lookAhead=co,this.parent=fo}toString(){return`[${this.stack.filter((to,ro)=>ro%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(to,ro,no=0){let oo=to.parser.context;return new Stack(to,[],ro,no,no,0,[],0,oo?new StackContext(oo,oo.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(to,ro){this.stack.push(this.state,ro,this.bufferBase+this.buffer.length),this.state=to}reduce(to){var ro;let no=to>>19,oo=to&65535,{parser:io}=this.p,so=io.dynamicPrecedence(oo);if(so&&(this.score+=so),no==0){this.pushState(io.getGoto(this.state,oo,!0),this.reducePos),oo=2e3&&!(!((ro=this.p.parser.nodeSet.types[oo])===null||ro===void 0)&&ro.isAnonymous)&&(lo==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=uo):this.p.lastBigReductionSizeao;)this.stack.pop();this.reduceContext(oo,lo)}storeNode(to,ro,no,oo=4,io=!1){if(to==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&so.buffer[ao-4]==0&&so.buffer[ao-1]>-1){if(ro==no)return;if(so.buffer[ao-2]>=ro){so.buffer[ao-2]=no;return}}}if(!io||this.pos==no)this.buffer.push(to,ro,no,oo);else{let so=this.buffer.length;if(so>0&&this.buffer[so-4]!=0)for(;so>0&&this.buffer[so-2]>no;)this.buffer[so]=this.buffer[so-4],this.buffer[so+1]=this.buffer[so-3],this.buffer[so+2]=this.buffer[so-2],this.buffer[so+3]=this.buffer[so-1],so-=4,oo>4&&(oo-=4);this.buffer[so]=to,this.buffer[so+1]=ro,this.buffer[so+2]=no,this.buffer[so+3]=oo}}shift(to,ro,no,oo){if(to&131072)this.pushState(to&65535,this.pos);else if(to&262144)this.pos=oo,this.shiftContext(ro,no),ro<=this.p.parser.maxNode&&this.buffer.push(ro,no,oo,4);else{let io=to,{parser:so}=this.p;(oo>this.pos||ro<=so.maxNode)&&(this.pos=oo,so.stateFlag(io,1)||(this.reducePos=oo)),this.pushState(io,no),this.shiftContext(ro,no),ro<=so.maxNode&&this.buffer.push(ro,no,oo,4)}}apply(to,ro,no,oo){to&65536?this.reduce(to):this.shift(to,ro,no,oo)}useNode(to,ro){let no=this.p.reused.length-1;(no<0||this.p.reused[no]!=to)&&(this.p.reused.push(to),no++);let oo=this.pos;this.reducePos=this.pos=oo+to.length,this.pushState(ro,oo),this.buffer.push(no,oo,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,to,this,this.p.stream.reset(this.pos-to.length)))}split(){let to=this,ro=to.buffer.length;for(;ro>0&&to.buffer[ro-2]>to.reducePos;)ro-=4;let no=to.buffer.slice(ro),oo=to.bufferBase+ro;for(;to&&oo==to.bufferBase;)to=to.parent;return new Stack(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,no,oo,this.curContext,this.lookAhead,to)}recoverByDelete(to,ro){let no=to<=this.p.parser.maxNode;no&&this.storeNode(to,this.pos,ro,4),this.storeNode(0,this.pos,ro,no?8:4),this.pos=this.reducePos=ro,this.score-=190}canShift(to){for(let ro=new SimulatedStack(this);;){let no=this.p.parser.stateSlot(ro.state,4)||this.p.parser.hasAction(ro.state,to);if(no==0)return!1;if(!(no&65536))return!0;ro.reduce(no)}}recoverByInsert(to){if(this.stack.length>=300)return[];let ro=this.p.parser.nextStates(this.state);if(ro.length>8||this.stack.length>=120){let oo=[];for(let io=0,so;iolo&1&&ao==so)||oo.push(ro[io],so)}ro=oo}let no=[];for(let oo=0;oo>19,oo=ro&65535,io=this.stack.length-no*3;if(io<0||to.getGoto(this.stack[io],oo,!1)<0){let so=this.findForcedReduction();if(so==null)return!1;ro=so}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(ro),!0}findForcedReduction(){let{parser:to}=this.p,ro=[],no=(oo,io)=>{if(!ro.includes(oo))return ro.push(oo),to.allActions(oo,so=>{if(!(so&393216))if(so&65536){let ao=(so>>19)-io;if(ao>1){let lo=so&65535,uo=this.stack.length-ao*3;if(uo>=0&&to.getGoto(this.stack[uo],lo,!1)>=0)return ao<<19|65536|lo}}else{let ao=no(so,io+1);if(ao!=null)return ao}})};return no(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:to}=this.p;return to.data[to.stateSlot(this.state,1)]==65535&&!to.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(to){if(this.state!=to.state||this.stack.length!=to.stack.length)return!1;for(let ro=0;rothis.lookAhead&&(this.emitLookAhead(),this.lookAhead=to)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class StackContext{constructor(to,ro){this.tracker=to,this.context=ro,this.hash=to.strict?to.hash(ro):0}}class SimulatedStack{constructor(to){this.start=to,this.state=to.state,this.stack=to.stack,this.base=this.stack.length}reduce(to){let ro=to&65535,no=to>>19;no==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(no-1)*3;let oo=this.start.p.parser.getGoto(this.stack[this.base-3],ro,!0);this.state=oo}}class StackBufferCursor{constructor(to,ro,no){this.stack=to,this.pos=ro,this.index=no,this.buffer=to.buffer,this.index==0&&this.maybeNext()}static create(to,ro=to.bufferBase+to.buffer.length){return new StackBufferCursor(to,ro,ro-to.bufferBase)}maybeNext(){let to=this.stack.parent;to!=null&&(this.index=this.stack.bufferBase-to.bufferBase,this.stack=to,this.buffer=to.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new StackBufferCursor(this.stack,this.pos,this.index)}}function decodeArray(eo,to=Uint16Array){if(typeof eo!="string")return eo;let ro=null;for(let no=0,oo=0;no=92&&so--,so>=34&&so--;let lo=so-32;if(lo>=46&&(lo-=46,ao=!0),io+=lo,ao)break;io*=46}ro?ro[oo++]=io:ro=new to(io)}return ro}class CachedToken{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const nullToken=new CachedToken;class InputStream{constructor(to,ro){this.input=to,this.ranges=ro,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=nullToken,this.rangeIndex=0,this.pos=this.chunkPos=ro[0].from,this.range=ro[0],this.end=ro[ro.length-1].to,this.readNext()}resolveOffset(to,ro){let no=this.range,oo=this.rangeIndex,io=this.pos+to;for(;iono.to:io>=no.to;){if(oo==this.ranges.length-1)return null;let so=this.ranges[++oo];io+=so.from-no.to,no=so}return io}clipPos(to){if(to>=this.range.from&&toto)return Math.max(to,ro.from);return this.end}peek(to){let ro=this.chunkOff+to,no,oo;if(ro>=0&&ro=this.chunk2Pos&&noao.to&&(this.chunk2=this.chunk2.slice(0,ao.to-no)),oo=this.chunk2.charCodeAt(0)}}return no>=this.token.lookAhead&&(this.token.lookAhead=no+1),oo}acceptToken(to,ro=0){let no=ro?this.resolveOffset(ro,-1):this.pos;if(no==null||no=this.chunk2Pos&&this.posthis.range.to?to.slice(0,this.range.to-this.pos):to,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(to=1){for(this.chunkOff+=to;this.pos+to>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();to-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=to,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(to,ro){if(ro?(this.token=ro,ro.start=to,ro.lookAhead=to+1,ro.value=ro.extended=-1):this.token=nullToken,this.pos!=to){if(this.pos=to,to==this.end)return this.setDone(),this;for(;to=this.range.to;)this.range=this.ranges[++this.rangeIndex];to>=this.chunkPos&&to=this.chunkPos&&ro<=this.chunkPos+this.chunk.length)return this.chunk.slice(to-this.chunkPos,ro-this.chunkPos);if(to>=this.chunk2Pos&&ro<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(to-this.chunk2Pos,ro-this.chunk2Pos);if(to>=this.range.from&&ro<=this.range.to)return this.input.read(to,ro);let no="";for(let oo of this.ranges){if(oo.from>=ro)break;oo.to>to&&(no+=this.input.read(Math.max(oo.from,to),Math.min(oo.to,ro)))}return no}}class TokenGroup{constructor(to,ro){this.data=to,this.id=ro}token(to,ro){let{parser:no}=ro.p;readToken(this.data,to,ro,this.id,no.data,no.tokenPrecTable)}}TokenGroup.prototype.contextual=TokenGroup.prototype.fallback=TokenGroup.prototype.extend=!1;TokenGroup.prototype.fallback=TokenGroup.prototype.extend=!1;class ExternalTokenizer{constructor(to,ro={}){this.token=to,this.contextual=!!ro.contextual,this.fallback=!!ro.fallback,this.extend=!!ro.extend}}function readToken(eo,to,ro,no,oo,io){let so=0,ao=1<0){let go=eo[po];if(lo.allows(go)&&(to.token.value==-1||to.token.value==go||overrides(go,to.token.value,oo,io))){to.acceptToken(go);break}}let co=to.next,fo=0,ho=eo[so+2];if(to.next<0&&ho>fo&&eo[uo+ho*3-3]==65535){so=eo[uo+ho*3-1];continue e}for(;fo>1,go=uo+po+(po<<1),vo=eo[go],bo=eo[go+1]||65536;if(co=bo)fo=po+1;else{so=eo[go+2],to.advance();continue e}}break}}function findOffset(eo,to,ro){for(let no=to,oo;(oo=eo[no])!=65535;no++)if(oo==ro)return no-to;return-1}function overrides(eo,to,ro,no){let oo=findOffset(ro,no,to);return oo<0||findOffset(ro,no,eo)to)&&!no.type.isError)return ro<0?Math.max(0,Math.min(no.to-1,to-25)):Math.min(eo.length,Math.max(no.from+1,to+25));if(ro<0?no.prevSibling():no.nextSibling())break;if(!no.parent())return ro<0?0:eo.length}}class FragmentCursor{constructor(to,ro){this.fragments=to,this.nodeSet=ro,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let to=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(to){for(this.safeFrom=to.openStart?cutAt(to.tree,to.from+to.offset,1)-to.offset:to.from,this.safeTo=to.openEnd?cutAt(to.tree,to.to+to.offset,-1)-to.offset:to.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(to.tree),this.start.push(-to.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(to){if(toto)return this.nextStart=so,null;if(io instanceof Tree){if(so==to){if(so=Math.max(this.safeFrom,to)&&(this.trees.push(io),this.start.push(so),this.index.push(0))}else this.index[ro]++,this.nextStart=so+io.length}}}class TokenCache{constructor(to,ro){this.stream=ro,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=to.tokenizers.map(no=>new CachedToken)}getActions(to){let ro=0,no=null,{parser:oo}=to.p,{tokenizers:io}=oo,so=oo.stateSlot(to.state,3),ao=to.curContext?to.curContext.hash:0,lo=0;for(let uo=0;uofo.end+25&&(lo=Math.max(fo.lookAhead,lo)),fo.value!=0)){let ho=ro;if(fo.extended>-1&&(ro=this.addActions(to,fo.extended,fo.end,ro)),ro=this.addActions(to,fo.value,fo.end,ro),!co.extend&&(no=fo,ro>ho))break}}for(;this.actions.length>ro;)this.actions.pop();return lo&&to.setLookAhead(lo),!no&&to.pos==this.stream.end&&(no=new CachedToken,no.value=to.p.parser.eofTerm,no.start=no.end=to.pos,ro=this.addActions(to,no.value,no.end,ro)),this.mainToken=no,this.actions}getMainToken(to){if(this.mainToken)return this.mainToken;let ro=new CachedToken,{pos:no,p:oo}=to;return ro.start=no,ro.end=Math.min(no+1,oo.stream.end),ro.value=no==oo.stream.end?oo.parser.eofTerm:0,ro}updateCachedToken(to,ro,no){let oo=this.stream.clipPos(no.pos);if(ro.token(this.stream.reset(oo,to),no),to.value>-1){let{parser:io}=no.p;for(let so=0;so=0&&no.p.parser.dialect.allows(ao>>1)){ao&1?to.extended=ao>>1:to.value=ao>>1;break}}}else to.value=0,to.end=this.stream.clipPos(oo+1)}putAction(to,ro,no,oo){for(let io=0;ioto.bufferLength*4?new FragmentCursor(no,to.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let to=this.stacks,ro=this.minStackPos,no=this.stacks=[],oo,io;if(this.bigReductionCount>300&&to.length==1){let[so]=to;for(;so.forceReduce()&&so.stack.length&&so.stack[so.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let so=0;soro)no.push(ao);else{if(this.advanceStack(ao,no,to))continue;{oo||(oo=[],io=[]),oo.push(ao);let lo=this.tokens.getMainToken(ao);io.push(lo.value,lo.end)}}break}}if(!no.length){let so=oo&&findFinished(oo);if(so)return verbose&&console.log("Finish with "+this.stackID(so)),this.stackToTree(so);if(this.parser.strict)throw verbose&&oo&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+ro);this.recovering||(this.recovering=5)}if(this.recovering&&oo){let so=this.stoppedAt!=null&&oo[0].pos>this.stoppedAt?oo[0]:this.runRecovery(oo,io,no);if(so)return verbose&&console.log("Force-finish "+this.stackID(so)),this.stackToTree(so.forceAll())}if(this.recovering){let so=this.recovering==1?1:this.recovering*3;if(no.length>so)for(no.sort((ao,lo)=>lo.score-ao.score);no.length>so;)no.pop();no.some(ao=>ao.reducePos>ro)&&this.recovering--}else if(no.length>1){e:for(let so=0;so500&&uo.buffer.length>500)if((ao.score-uo.score||ao.buffer.length-uo.buffer.length)>0)no.splice(lo--,1);else{no.splice(so--,1);continue e}}}no.length>12&&no.splice(12,no.length-12)}this.minStackPos=no[0].pos;for(let so=1;so ":"";if(this.stoppedAt!=null&&oo>this.stoppedAt)return to.forceReduce()?to:null;if(this.fragments){let uo=to.curContext&&to.curContext.tracker.strict,co=uo?to.curContext.hash:0;for(let fo=this.fragments.nodeAt(oo);fo;){let ho=this.parser.nodeSet.types[fo.type.id]==fo.type?io.getGoto(to.state,fo.type.id):-1;if(ho>-1&&fo.length&&(!uo||(fo.prop(NodeProp.contextHash)||0)==co))return to.useNode(fo,ho),verbose&&console.log(so+this.stackID(to)+` (via reuse of ${io.getName(fo.type.id)})`),!0;if(!(fo instanceof Tree)||fo.children.length==0||fo.positions[0]>0)break;let po=fo.children[0];if(po instanceof Tree&&fo.positions[0]==0)fo=po;else break}}let ao=io.stateSlot(to.state,4);if(ao>0)return to.reduce(ao),verbose&&console.log(so+this.stackID(to)+` (via always-reduce ${io.getName(ao&65535)})`),!0;if(to.stack.length>=8400)for(;to.stack.length>6e3&&to.forceReduce(););let lo=this.tokens.getActions(to);for(let uo=0;uooo?ro.push(go):no.push(go)}return!1}advanceFully(to,ro){let no=to.pos;for(;;){if(!this.advanceStack(to,null,null))return!1;if(to.pos>no)return pushStackDedup(to,ro),!0}}runRecovery(to,ro,no){let oo=null,io=!1;for(let so=0;so ":"";if(ao.deadEnd&&(io||(io=!0,ao.restart(),verbose&&console.log(co+this.stackID(ao)+" (restarted)"),this.advanceFully(ao,no))))continue;let fo=ao.split(),ho=co;for(let po=0;fo.forceReduce()&&po<10&&(verbose&&console.log(ho+this.stackID(fo)+" (via force-reduce)"),!this.advanceFully(fo,no));po++)verbose&&(ho=this.stackID(fo)+" -> ");for(let po of ao.recoverByInsert(lo))verbose&&console.log(co+this.stackID(po)+" (via recover-insert)"),this.advanceFully(po,no);this.stream.end>ao.pos?(uo==ao.pos&&(uo++,lo=0),ao.recoverByDelete(lo,uo),verbose&&console.log(co+this.stackID(ao)+` (via recover-delete ${this.parser.getName(lo)})`),pushStackDedup(ao,no)):(!oo||oo.scoreeo;class ContextTracker{constructor(to){this.start=to.start,this.shift=to.shift||id,this.reduce=to.reduce||id,this.reuse=to.reuse||id,this.hash=to.hash||(()=>0),this.strict=to.strict!==!1}}class LRParser extends Parser{constructor(to){if(super(),this.wrappers=[],to.version!=14)throw new RangeError(`Parser version (${to.version}) doesn't match runtime version (14)`);let ro=to.nodeNames.split(" ");this.minRepeatTerm=ro.length;for(let ao=0;aoto.topRules[ao][1]),oo=[];for(let ao=0;ao=0)io(co,lo,ao[uo++]);else{let fo=ao[uo+-co];for(let ho=-co;ho>0;ho--)io(ao[uo++],lo,fo);uo++}}}this.nodeSet=new NodeSet(ro.map((ao,lo)=>NodeType.define({name:lo>=this.minRepeatTerm?void 0:ao,id:lo,props:oo[lo],top:no.indexOf(lo)>-1,error:lo==0,skipped:to.skippedNodes&&to.skippedNodes.indexOf(lo)>-1}))),to.propSources&&(this.nodeSet=this.nodeSet.extend(...to.propSources)),this.strict=!1,this.bufferLength=DefaultBufferLength;let so=decodeArray(to.tokenData);this.context=to.context,this.specializerSpecs=to.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let ao=0;aotypeof ao=="number"?new TokenGroup(so,ao):ao),this.topRules=to.topRules,this.dialects=to.dialects||{},this.dynamicPrecedences=to.dynamicPrecedences||null,this.tokenPrecTable=to.tokenPrec,this.termNames=to.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(to,ro,no){let oo=new Parse(this,to,ro,no);for(let io of this.wrappers)oo=io(oo,to,ro,no);return oo}getGoto(to,ro,no=!1){let oo=this.goto;if(ro>=oo[0])return-1;for(let io=oo[ro+1];;){let so=oo[io++],ao=so&1,lo=oo[io++];if(ao&&no)return lo;for(let uo=io+(so>>1);io0}validAction(to,ro){return!!this.allActions(to,no=>no==ro?!0:null)}allActions(to,ro){let no=this.stateSlot(to,4),oo=no?ro(no):void 0;for(let io=this.stateSlot(to,1);oo==null;io+=3){if(this.data[io]==65535)if(this.data[io+1]==1)io=pair(this.data,io+2);else break;oo=ro(pair(this.data,io+1))}return oo}nextStates(to){let ro=[];for(let no=this.stateSlot(to,1);;no+=3){if(this.data[no]==65535)if(this.data[no+1]==1)no=pair(this.data,no+2);else break;if(!(this.data[no+2]&1)){let oo=this.data[no+1];ro.some((io,so)=>so&1&&io==oo)||ro.push(this.data[no],oo)}}return ro}configure(to){let ro=Object.assign(Object.create(LRParser.prototype),this);if(to.props&&(ro.nodeSet=this.nodeSet.extend(...to.props)),to.top){let no=this.topRules[to.top];if(!no)throw new RangeError(`Invalid top rule name ${to.top}`);ro.top=no}return to.tokenizers&&(ro.tokenizers=this.tokenizers.map(no=>{let oo=to.tokenizers.find(io=>io.from==no);return oo?oo.to:no})),to.specializers&&(ro.specializers=this.specializers.slice(),ro.specializerSpecs=this.specializerSpecs.map((no,oo)=>{let io=to.specializers.find(ao=>ao.from==no.external);if(!io)return no;let so=Object.assign(Object.assign({},no),{external:io.to});return ro.specializers[oo]=getSpecializer(so),so})),to.contextTracker&&(ro.context=to.contextTracker),to.dialect&&(ro.dialect=this.parseDialect(to.dialect)),to.strict!=null&&(ro.strict=to.strict),to.wrap&&(ro.wrappers=ro.wrappers.concat(to.wrap)),to.bufferLength!=null&&(ro.bufferLength=to.bufferLength),ro}hasWrappers(){return this.wrappers.length>0}getName(to){return this.termNames?this.termNames[to]:String(to<=this.maxNode&&this.nodeSet.types[to].name||to)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(to){let ro=this.dynamicPrecedences;return ro==null?0:ro[to]||0}parseDialect(to){let ro=Object.keys(this.dialects),no=ro.map(()=>!1);if(to)for(let io of to.split(" ")){let so=ro.indexOf(io);so>=0&&(no[so]=!0)}let oo=null;for(let io=0;iono)&&ro.p.parser.stateFlag(ro.state,2)&&(!to||to.scoreeo.external(ro,no)<<1|to}return eo.get}const printKeyword=1,indent=194,dedent=195,newline$1=196,blankLineStart=197,newlineBracketed=198,eof=199,stringContent=200,Escape=2,replacementStart=3,stringEnd=201,ParenL=24,ParenthesizedExpression=25,TupleExpression=49,ComprehensionExpression=50,BracketL=55,ArrayExpression=56,ArrayComprehensionExpression=57,BraceL=59,DictionaryExpression=60,DictionaryComprehensionExpression=61,SetExpression=62,SetComprehensionExpression=63,ArgList=65,subscript=238,String$1=71,stringStart=241,stringStartD=242,stringStartL=243,stringStartLD=244,stringStartR=245,stringStartRD=246,stringStartRL=247,stringStartRLD=248,FormatString=72,stringStartF=249,stringStartFD=250,stringStartFL=251,stringStartFLD=252,stringStartFR=253,stringStartFRD=254,stringStartFRL=255,stringStartFRLD=256,FormatReplacement=73,nestedFormatReplacement=77,importList=264,TypeParamList=112,ParamList=130,SequencePattern=151,MappingPattern=152,PatternArgList=155,newline=10,carriageReturn=13,space=32,tab=9,hash=35,parenOpen=40,dot=46,braceOpen=123,braceClose=125,singleQuote=39,doubleQuote=34,backslash=92,letter_o=111,letter_x=120,letter_N=78,letter_u=117,letter_U=85,bracketed=new Set([ParenthesizedExpression,TupleExpression,ComprehensionExpression,importList,ArgList,ParamList,ArrayExpression,ArrayComprehensionExpression,subscript,SetExpression,SetComprehensionExpression,FormatString,FormatReplacement,nestedFormatReplacement,DictionaryExpression,DictionaryComprehensionExpression,SequencePattern,MappingPattern,PatternArgList,TypeParamList]);function isLineBreak(eo){return eo==newline||eo==carriageReturn}function isHex(eo){return eo>=48&&eo<=57||eo>=65&&eo<=70||eo>=97&&eo<=102}const newlines=new ExternalTokenizer((eo,to)=>{let ro;if(eo.next<0)eo.acceptToken(eof);else if(to.context.flags&cx_Bracketed)isLineBreak(eo.next)&&eo.acceptToken(newlineBracketed,1);else if(((ro=eo.peek(-1))<0||isLineBreak(ro))&&to.canShift(blankLineStart)){let no=0;for(;eo.next==space||eo.next==tab;)eo.advance(),no++;(eo.next==newline||eo.next==carriageReturn||eo.next==hash)&&eo.acceptToken(blankLineStart,-no)}else isLineBreak(eo.next)&&eo.acceptToken(newline$1,1)},{contextual:!0}),indentation=new ExternalTokenizer((eo,to)=>{let ro=to.context;if(ro.flags)return;let no=eo.peek(-1);if(no==newline||no==carriageReturn){let oo=0,io=0;for(;;){if(eo.next==space)oo++;else if(eo.next==tab)oo+=8-oo%8;else break;eo.advance(),io++}oo!=ro.indent&&eo.next!=newline&&eo.next!=carriageReturn&&eo.next!=hash&&(oo[eo,to|cx_String])),trackIndent=new ContextTracker({start:topIndent,reduce(eo,to,ro,no){return eo.flags&cx_Bracketed&&bracketed.has(to)||(to==String$1||to==FormatString)&&eo.flags&cx_String?eo.parent:eo},shift(eo,to,ro,no){return to==indent?new Context(eo,countIndent(no.read(no.pos,ro.pos)),0):to==dedent?eo.parent:to==ParenL||to==BracketL||to==BraceL||to==replacementStart?new Context(eo,0,cx_Bracketed):stringFlags.has(to)?new Context(eo,0,stringFlags.get(to)|eo.flags&cx_Bracketed):eo},hash(eo){return eo.hash}}),legacyPrint=new ExternalTokenizer(eo=>{for(let to=0;to<5;to++){if(eo.next!="print".charCodeAt(to))return;eo.advance()}if(!/\w/.test(String.fromCharCode(eo.next)))for(let to=0;;to++){let ro=eo.peek(to);if(!(ro==space||ro==tab)){ro!=parenOpen&&ro!=dot&&ro!=newline&&ro!=carriageReturn&&ro!=hash&&eo.acceptToken(printKeyword);return}}}),strings=new ExternalTokenizer((eo,to)=>{let{flags:ro}=to.context,no=ro&cx_DoubleQuote?doubleQuote:singleQuote,oo=(ro&cx_Long)>0,io=!(ro&cx_Raw),so=(ro&cx_Format)>0,ao=eo.pos;for(;!(eo.next<0);)if(so&&eo.next==braceOpen)if(eo.peek(1)==braceOpen)eo.advance(2);else{if(eo.pos==ao){eo.acceptToken(replacementStart,1);return}break}else if(io&&eo.next==backslash){if(eo.pos==ao){eo.advance();let lo=eo.next;lo>=0&&(eo.advance(),skipEscape(eo,lo)),eo.acceptToken(Escape);return}break}else if(eo.next==no&&(!oo||eo.peek(1)==no&&eo.peek(2)==no)){if(eo.pos==ao){eo.acceptToken(stringEnd,oo?3:1);return}break}else if(eo.next==newline){if(oo)eo.advance();else if(eo.pos==ao){eo.acceptToken(stringEnd);return}break}else eo.advance();eo.pos>ao&&eo.acceptToken(stringContent)});function skipEscape(eo,to){if(to==letter_o)for(let ro=0;ro<2&&eo.next>=48&&eo.next<=55;ro++)eo.advance();else if(to==letter_x)for(let ro=0;ro<2&&isHex(eo.next);ro++)eo.advance();else if(to==letter_u)for(let ro=0;ro<4&&isHex(eo.next);ro++)eo.advance();else if(to==letter_U)for(let ro=0;ro<8&&isHex(eo.next);ro++)eo.advance();else if(to==letter_N&&eo.next==braceOpen){for(eo.advance();eo.next>=0&&eo.next!=braceClose&&eo.next!=singleQuote&&eo.next!=doubleQuote&&eo.next!=newline;)eo.advance();eo.next==braceClose&&eo.advance()}}const pythonHighlighting=styleTags({'async "*" "**" FormatConversion FormatSpec':tags.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":tags.controlKeyword,"in not and or is del":tags.operatorKeyword,"from def class global nonlocal lambda":tags.definitionKeyword,import:tags.moduleKeyword,"with as print":tags.keyword,Boolean:tags.bool,None:tags.null,VariableName:tags.variableName,"CallExpression/VariableName":tags.function(tags.variableName),"FunctionDefinition/VariableName":tags.function(tags.definition(tags.variableName)),"ClassDefinition/VariableName":tags.definition(tags.className),PropertyName:tags.propertyName,"CallExpression/MemberExpression/PropertyName":tags.function(tags.propertyName),Comment:tags.lineComment,Number:tags.number,String:tags.string,FormatString:tags.special(tags.string),Escape:tags.escape,UpdateOp:tags.updateOperator,"ArithOp!":tags.arithmeticOperator,BitOp:tags.bitwiseOperator,CompareOp:tags.compareOperator,AssignOp:tags.definitionOperator,Ellipsis:tags.punctuation,At:tags.meta,"( )":tags.paren,"[ ]":tags.squareBracket,"{ }":tags.brace,".":tags.derefOperator,", ;":tags.separator}),spec_identifier={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},parser=LRParser.deserialize({version:14,states:"##pO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO1XQdO'#EfO3rQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO3}QdO'#EyO4UQdO'#FOO4aQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4fQdO'#F[P4mOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO4xQdO'#DoOOQS,5:Y,5:YO5]QdO'#HdOOQS,5:],5:]O5jQ!fO,5:]O5oQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8_QdO,59bO8dQdO,59bO8kQdO,59jO8rQdO'#HTO9xQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:aQdO,59aO'vQdO,59aO:oQdO,59aOOQS,59y,59yO:tQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;SQdO,5:QO;XQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;jQdO,5:UO;oQdO,5:WOOOW'#Fy'#FyO;tOWO,5:aOOQS,5:a,5:aOOOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!.mQtO1G.|O!.tQtO1G.|O1lQdO1G.|O!/aQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!/hQdO1G/eO!/xQdO1G/eO!0QQdO1G/fO'vQdO'#H[O!0VQdO'#H[O!0[QtO1G.{O!0lQdO,59iO!1rQdO,5=zO!2SQdO,5=zO!2[QdO1G/mO!2aQtO1G/mOOQS1G/l1G/lO!2qQdO,5=uO!3hQdO,5=uO0rQdO1G/qO!4VQdO1G/sO!4[QtO1G/sO!4lQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!4|QdO'#HxO0rQdO'#HxO!5_QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!5mQ#xO1G2zO!6^QtO1G2zO'vQdO,5iOOQS1G1`1G1`O!7^QdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!7cQdO'#FrO!7nQdO,59oO!7vQdO1G/XO!8QQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!8qQdO'#GtOOQS,5lO!:sQdO,5>lO!;RQdO,5>hO!;iQdO,5>hO!;zQdO'#EpO0rQdO1G0tO!oO!D_QdO,5>oO!DgQtO,5>oO0rQdO1G1PO!DqQdO1G1PO4aQdO1G1UO!!_QdO1G1WOOQV,5;a,5;aO!DvQfO,5;aO!D{QgO1G1QO!H|QdO'#GZO4aQdO1G1QO4aQdO1G1QO!I^QdO,5>pO!IkQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!IsQdO'#FSO!JUQ!fO1G1WO!J^QdO1G1WOOQV1G1]1G1]O4aQdO1G1]O!JcQdO1G1]O!JkQdO'#F^OOQV1G1b1G1bO!!rQtO1G1bPOOO1G2v1G2vP!JpOSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!JuQdO,5=|O!KYQdO,5=|OOQS1G/u1G/uO!KbQdO,5>PO!KrQdO,5>PO!KzQdO,5>PO!L_QdO,5>PO!LoQdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!7vQdO7+$pO!NbQdO1G.|O!NiQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO!NpQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO# QQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO# VQdO7+%PO# _QdO7+%QO# dQdO1G3fOOQS7+%X7+%XO# tQdO1G3fO# |QdO7+%XOOQS,5<_,5<_O'vQdO,5<_O#!RQdO1G3aOOQS-E9q-E9qO#!xQdO7+%]OOQS7+%_7+%_O##WQdO1G3aO##uQdO7+%_O##zQdO1G3gO#$[QdO1G3gO#$dQdO7+%]O#$iQdO,5>dO#%SQdO,5>dO#%SQdO,5>dOOQS'#Dx'#DxO#%eO&jO'#DzO#%pO`O'#HyOOOW1G3}1G3}O#%uQdO1G3}O#%}QdO1G3}O#&YQ#xO7+(fO#&yQtO1G2UP#'dQdO'#GOOOQS,5e,5>eOOOW7+)i7+)iO#=gQdO7+)iO#=oQdO1G2zO#>YQdO1G2zP'vQdO'#FuO0rQdO<kQdO,5>kO#>|QdO,5>kO1XQdO,5>kO#?_QdO,5>jOOQS<mO#?rQdO,5>mOOQS1G0v1G0vOOQS<rO#IXQdO,5>rOOQS,5>r,5>rO#IdQdO,5>qO#IuQdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<VAN>VO#MUQdO<cAN>cO0rQdO1G1|O#MfQtO1G1|P#MpQdO'#FvOOQS1G2R1G2RP#M}QdO'#F{O#N[QdO7+)jO#NuQdO,5>gOOOO-E9z-E9zOOOW<tO$4^QdO,5>tO1XQdO,5vO$'zQdO,5>vOOQS1G1p1G1pO$8UQtO,5<[OOQU7+'P7+'PO$*WQdO1G/iO$'zQdO,5wO$8dQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$'zQdO'#GdO$8lQdO1G4bO$8vQdO1G4bO$9OQdO1G4bOOQS7+%T7+%TO$9^QdO1G1tO$9lQtO'#FaO$9sQdO,5<}OOQS,5<},5<}O$:RQdO1G4cOOQS-E:a-E:aO$'zQdO,5<|O$:YQdO,5<|O$:_QdO7+)|OOQS-E:`-E:`O$:iQdO7+)|O$'zQdO,5PPP>S>t>wPP'Z'ZPP?WPP'Z'ZPP'Z'Z'Z'Z'Z?[@U'ZP@XP@_DfHSHWPHZHeHi'ZPPPHlHu'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPH{IXIaPIhInPIhPIhIhPPPIhPK|PLVLaLgK|PIhLpPIhPLwL}PMRMgNUNoMRMRNu! SMRMRMRMR! h! n! q! v! y!!T!!Z!!g!!y!#P!#Z!#a!#}!$T!$Z!$e!$k!$q!%T!%_!%e!%k!%q!%{!&R!&X!&_!&e!&o!&u!'P!'V!'`!'f!'u!'}!(X!(`PPPPPPPPPPP!(f!(i!(o!(x!)S!)_PPPPPPPPPPPP!.R!/g!3g!6wPP!7P!7`!7i!8b!8X!8k!8q!8t!8w!8z!9S!9sPPPPPPPPPPPPPPPPP!9v!9z!:QP!:f!:j!:v!;S!;Y!;c!;f!;i!;o!;u!;{!_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[legacyPrint,indentation,newlines,strings,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:eo=>spec_identifier[eo]||-1}],tokenPrec:7646}),cache=new NodeWeakMap,ScopeNodes=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function defID(eo){return(to,ro,no)=>{if(no)return!1;let oo=to.node.getChild("VariableName");return oo&&ro(oo,eo),!0}}const gatherCompletions={FunctionDefinition:defID("function"),ClassDefinition:defID("class"),ForStatement(eo,to,ro){if(ro){for(let no=eo.node.firstChild;no;no=no.nextSibling)if(no.name=="VariableName")to(no,"variable");else if(no.name=="in")break}},ImportStatement(eo,to){var ro,no;let{node:oo}=eo,io=((ro=oo.firstChild)===null||ro===void 0?void 0:ro.name)=="from";for(let so=oo.getChild("import");so;so=so.nextSibling)so.name=="VariableName"&&((no=so.nextSibling)===null||no===void 0?void 0:no.name)!="as"&&to(so,io?"variable":"namespace")},AssignStatement(eo,to){for(let ro=eo.node.firstChild;ro;ro=ro.nextSibling)if(ro.name=="VariableName")to(ro,"variable");else if(ro.name==":"||ro.name=="AssignOp")break},ParamList(eo,to){for(let ro=null,no=eo.node.firstChild;no;no=no.nextSibling)no.name=="VariableName"&&(!ro||!/\*|AssignOp/.test(ro.name))&&to(no,"variable"),ro=no},CapturePattern:defID("variable"),AsPattern:defID("variable"),__proto__:null};function getScope(eo,to){let ro=cache.get(to);if(ro)return ro;let no=[],oo=!0;function io(so,ao){let lo=eo.sliceString(so.from,so.to);no.push({label:lo,type:ao})}return to.cursor(IterMode.IncludeAnonymous).iterate(so=>{if(so.name){let ao=gatherCompletions[so.name];if(ao&&ao(so,io,oo)||!oo&&ScopeNodes.has(so.name))return!1;oo=!1}else if(so.to-so.from>8192){for(let ao of getScope(eo,so.node))no.push(ao);return!1}}),cache.set(to,no),no}const Identifier=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,dontComplete=["String","FormatString","Comment","PropertyName"];function localCompletionSource(eo){let to=syntaxTree(eo.state).resolveInner(eo.pos,-1);if(dontComplete.indexOf(to.name)>-1)return null;let ro=to.name=="VariableName"||to.to-to.from<20&&Identifier.test(eo.state.sliceDoc(to.from,to.to));if(!ro&&!eo.explicit)return null;let no=[];for(let oo=to;oo;oo=oo.parent)ScopeNodes.has(oo.name)&&(no=no.concat(getScope(eo.state.doc,oo)));return{options:no,from:ro?to.from:eo.pos,validFor:Identifier}}const globals=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(eo=>({label:eo,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(eo=>({label:eo,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(eo=>({label:eo,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(eo=>({label:eo,type:"function"}))),snippets=[snippetCompletion("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),snippetCompletion("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),snippetCompletion("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),snippetCompletion("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),snippetCompletion(`if \${}: + +`,{label:"if",detail:"block",type:"keyword"}),snippetCompletion("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),snippetCompletion("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),snippetCompletion("import ${module}",{label:"import",detail:"statement",type:"keyword"}),snippetCompletion("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],globalCompletion=ifNotIn(dontComplete,completeFromList(globals.concat(snippets)));function indentBody(eo,to){let ro=eo.baseIndentFor(to),no=eo.lineAt(eo.pos,-1),oo=no.from+no.text.length;return/^\s*($|#)/.test(no.text)&&eo.node.toro?null:ro+eo.unit}const pythonLanguage=LRLanguage.define({name:"python",parser:parser.configure({props:[indentNodeProp.add({Body:eo=>{var to;return(to=indentBody(eo,eo.node))!==null&&to!==void 0?to:eo.continue()},IfStatement:eo=>/^\s*(else:|elif )/.test(eo.textAfter)?eo.baseIndent:eo.continue(),"ForStatement WhileStatement":eo=>/^\s*else:/.test(eo.textAfter)?eo.baseIndent:eo.continue(),TryStatement:eo=>/^\s*(except |finally:|else:)/.test(eo.textAfter)?eo.baseIndent:eo.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":delimitedIndent({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":delimitedIndent({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":delimitedIndent({closing:"]"}),"String FormatString":()=>null,Script:eo=>{if(eo.pos+/\s*/.exec(eo.textAfter)[0].length>=eo.node.to){let to=null;for(let ro=eo.node,no=ro.to;ro=ro.lastChild,!(!ro||ro.to!=no);)ro.type.name=="Body"&&(to=ro);if(to){let ro=indentBody(eo,to);if(ro!=null)return ro}}return eo.continue()}}),foldNodeProp.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":foldInside,Body:(eo,to)=>({from:eo.from+1,to:eo.to-(eo.to==to.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});function python(){return new LanguageSupport(pythonLanguage,[pythonLanguage.data.of({autocomplete:localCompletionSource}),pythonLanguage.data.of({autocomplete:globalCompletion})])}var createTheme=eo=>{var{theme:to,settings:ro={},styles:no=[]}=eo,oo={".cm-gutters":{}},io={};ro.background&&(io.backgroundColor=ro.background),ro.backgroundImage&&(io.backgroundImage=ro.backgroundImage),ro.foreground&&(io.color=ro.foreground),(ro.background||ro.foreground)&&(oo["&"]=io),ro.fontFamily&&(oo["&.cm-editor .cm-scroller"]={fontFamily:ro.fontFamily}),ro.gutterBackground&&(oo[".cm-gutters"].backgroundColor=ro.gutterBackground),ro.gutterForeground&&(oo[".cm-gutters"].color=ro.gutterForeground),ro.gutterBorder&&(oo[".cm-gutters"].borderRightColor=ro.gutterBorder),ro.caret&&(oo[".cm-content"]={caretColor:ro.caret},oo[".cm-cursor, .cm-dropCursor"]={borderLeftColor:ro.caret});var so={};ro.gutterActiveForeground&&(so.color=ro.gutterActiveForeground),ro.lineHighlight&&(oo[".cm-activeLine"]={backgroundColor:ro.lineHighlight},so.backgroundColor=ro.lineHighlight),oo[".cm-activeLineGutter"]=so,ro.selection&&(oo["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:ro.selection+" !important"}),ro.selectionMatch&&(oo["& .cm-selectionMatch"]={backgroundColor:ro.selectionMatch});var ao=EditorView.theme(oo,{dark:to==="dark"}),lo=HighlightStyle.define(no),uo=[ao,syntaxHighlighting(lo)];return uo},defaultSettingsVscodeDark={background:"#1e1e1e",foreground:"#9cdcfe",caret:"#c6c6c6",selection:"#6199ff2f",selectionMatch:"#72a1ff59",lineHighlight:"#ffffff0f",gutterBackground:"#1e1e1e",gutterForeground:"#838383",gutterActiveForeground:"#fff",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace'};function vscodeDarkInit(eo){var{theme:to="dark",settings:ro={},styles:no=[]}=eo||{};return createTheme({theme:to,settings:_extends$c({},defaultSettingsVscodeDark,ro),styles:[{tag:[tags.keyword,tags.operatorKeyword,tags.modifier,tags.color,tags.constant(tags.name),tags.standard(tags.name),tags.standard(tags.tagName),tags.special(tags.brace),tags.atom,tags.bool,tags.special(tags.variableName)],color:"#569cd6"},{tag:[tags.controlKeyword,tags.moduleKeyword],color:"#c586c0"},{tag:[tags.name,tags.deleted,tags.character,tags.macroName,tags.propertyName,tags.variableName,tags.labelName,tags.definition(tags.name)],color:"#9cdcfe"},{tag:tags.heading,fontWeight:"bold",color:"#9cdcfe"},{tag:[tags.typeName,tags.className,tags.tagName,tags.number,tags.changed,tags.annotation,tags.self,tags.namespace],color:"#4ec9b0"},{tag:[tags.function(tags.variableName),tags.function(tags.propertyName)],color:"#dcdcaa"},{tag:[tags.number],color:"#b5cea8"},{tag:[tags.operator,tags.punctuation,tags.separator,tags.url,tags.escape,tags.regexp],color:"#d4d4d4"},{tag:[tags.regexp],color:"#d16969"},{tag:[tags.special(tags.string),tags.processingInstruction,tags.string,tags.inserted],color:"#ce9178"},{tag:[tags.angleBracket],color:"#808080"},{tag:tags.strong,fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:[tags.meta,tags.comment],color:"#6a9955"},{tag:tags.link,color:"#6a9955",textDecoration:"underline"},{tag:tags.invalid,color:"#ff0000"},...no]})}var vscodeDark=vscodeDarkInit();function _extends(){return _extends=Object.assign?Object.assign.bind():function(eo){for(var to=1;to=0)&&(ro[oo]=eo[oo]);return ro}const toggleComment=eo=>{let{state:to}=eo,ro=to.doc.lineAt(to.selection.main.from),no=getConfig(eo.state,ro.from);return no.line?toggleLineComment(eo):no.block?toggleBlockCommentByLine(eo):!1};function command(eo,to){return({state:ro,dispatch:no})=>{if(ro.readOnly)return!1;let oo=eo(to,ro);return oo?(no(ro.update(oo)),!0):!1}}const toggleLineComment=command(changeLineComment,0),toggleBlockComment=command(changeBlockComment,0),toggleBlockCommentByLine=command((eo,to)=>changeBlockComment(eo,to,selectedLineRanges(to)),0);function getConfig(eo,to){let ro=eo.languageDataAt("commentTokens",to);return ro.length?ro[0]:{}}const SearchMargin=50;function findBlockComment(eo,{open:to,close:ro},no,oo){let io=eo.sliceDoc(no-SearchMargin,no),so=eo.sliceDoc(oo,oo+SearchMargin),ao=/\s*$/.exec(io)[0].length,lo=/^\s*/.exec(so)[0].length,uo=io.length-ao;if(io.slice(uo-to.length,uo)==to&&so.slice(lo,lo+ro.length)==ro)return{open:{pos:no-ao,margin:ao&&1},close:{pos:oo+lo,margin:lo&&1}};let co,fo;oo-no<=2*SearchMargin?co=fo=eo.sliceDoc(no,oo):(co=eo.sliceDoc(no,no+SearchMargin),fo=eo.sliceDoc(oo-SearchMargin,oo));let ho=/^\s*/.exec(co)[0].length,po=/\s*$/.exec(fo)[0].length,go=fo.length-po-ro.length;return co.slice(ho,ho+to.length)==to&&fo.slice(go,go+ro.length)==ro?{open:{pos:no+ho+to.length,margin:/\s/.test(co.charAt(ho+to.length))?1:0},close:{pos:oo-po-ro.length,margin:/\s/.test(fo.charAt(go-1))?1:0}}:null}function selectedLineRanges(eo){let to=[];for(let ro of eo.selection.ranges){let no=eo.doc.lineAt(ro.from),oo=ro.to<=no.to?no:eo.doc.lineAt(ro.to),io=to.length-1;io>=0&&to[io].to>no.from?to[io].to=oo.to:to.push({from:no.from+/^\s*/.exec(no.text)[0].length,to:oo.to})}return to}function changeBlockComment(eo,to,ro=to.selection.ranges){let no=ro.map(io=>getConfig(to,io.from).block);if(!no.every(io=>io))return null;let oo=ro.map((io,so)=>findBlockComment(to,no[so],io.from,io.to));if(eo!=2&&!oo.every(io=>io))return{changes:to.changes(ro.map((io,so)=>oo[so]?[]:[{from:io.from,insert:no[so].open+" "},{from:io.to,insert:" "+no[so].close}]))};if(eo!=1&&oo.some(io=>io)){let io=[];for(let so=0,ao;sooo&&(io==so||so>fo.from)){oo=fo.from;let ho=/^\s*/.exec(fo.text)[0].length,po=ho==fo.length,go=fo.text.slice(ho,ho+uo.length)==uo?ho:-1;hoio.comment<0&&(!io.empty||io.single))){let io=[];for(let{line:ao,token:lo,indent:uo,empty:co,single:fo}of no)(fo||!co)&&io.push({from:ao.from+uo,insert:lo+" "});let so=to.changes(io);return{changes:so,selection:to.selection.map(so,1)}}else if(eo!=1&&no.some(io=>io.comment>=0)){let io=[];for(let{line:so,comment:ao,token:lo}of no)if(ao>=0){let uo=so.from+ao,co=uo+lo.length;so.text[co-so.from]==" "&&co++,io.push({from:uo,to:co})}return{changes:io}}return null}const fromHistory=Annotation.define(),isolateHistory=Annotation.define(),invertedEffects=Facet.define(),historyConfig=Facet.define({combine(eo){return combineConfig(eo,{minDepth:100,newGroupDelay:500,joinToEvent:(to,ro)=>ro},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(to,ro)=>(no,oo)=>to(no,oo)||ro(no,oo)})}}),historyField_=StateField.define({create(){return HistoryState.empty},update(eo,to){let ro=to.state.facet(historyConfig),no=to.annotation(fromHistory);if(no){let lo=HistEvent.fromTransaction(to,no.selection),uo=no.side,co=uo==0?eo.undone:eo.done;return lo?co=updateBranch(co,co.length,ro.minDepth,lo):co=addSelection(co,to.startState.selection),new HistoryState(uo==0?no.rest:co,uo==0?co:no.rest)}let oo=to.annotation(isolateHistory);if((oo=="full"||oo=="before")&&(eo=eo.isolate()),to.annotation(Transaction.addToHistory)===!1)return to.changes.empty?eo:eo.addMapping(to.changes.desc);let io=HistEvent.fromTransaction(to),so=to.annotation(Transaction.time),ao=to.annotation(Transaction.userEvent);return io?eo=eo.addChanges(io,so,ao,ro,to):to.selection&&(eo=eo.addSelection(to.startState.selection,so,ao,ro.newGroupDelay)),(oo=="full"||oo=="after")&&(eo=eo.isolate()),eo},toJSON(eo){return{done:eo.done.map(to=>to.toJSON()),undone:eo.undone.map(to=>to.toJSON())}},fromJSON(eo){return new HistoryState(eo.done.map(HistEvent.fromJSON),eo.undone.map(HistEvent.fromJSON))}});function history(eo={}){return[historyField_,historyConfig.of(eo),EditorView.domEventHandlers({beforeinput(to,ro){let no=to.inputType=="historyUndo"?undo:to.inputType=="historyRedo"?redo:null;return no?(to.preventDefault(),no(ro)):!1}})]}function cmd(eo,to){return function({state:ro,dispatch:no}){if(!to&&ro.readOnly)return!1;let oo=ro.field(historyField_,!1);if(!oo)return!1;let io=oo.pop(eo,ro,to);return io?(no(io),!0):!1}}const undo=cmd(0,!1),redo=cmd(1,!1),undoSelection=cmd(0,!0),redoSelection=cmd(1,!0);class HistEvent{constructor(to,ro,no,oo,io){this.changes=to,this.effects=ro,this.mapped=no,this.startSelection=oo,this.selectionsAfter=io}setSelAfter(to){return new HistEvent(this.changes,this.effects,this.mapped,this.startSelection,to)}toJSON(){var to,ro,no;return{changes:(to=this.changes)===null||to===void 0?void 0:to.toJSON(),mapped:(ro=this.mapped)===null||ro===void 0?void 0:ro.toJSON(),startSelection:(no=this.startSelection)===null||no===void 0?void 0:no.toJSON(),selectionsAfter:this.selectionsAfter.map(oo=>oo.toJSON())}}static fromJSON(to){return new HistEvent(to.changes&&ChangeSet.fromJSON(to.changes),[],to.mapped&&ChangeDesc.fromJSON(to.mapped),to.startSelection&&EditorSelection.fromJSON(to.startSelection),to.selectionsAfter.map(EditorSelection.fromJSON))}static fromTransaction(to,ro){let no=none;for(let oo of to.startState.facet(invertedEffects)){let io=oo(to);io.length&&(no=no.concat(io))}return!no.length&&to.changes.empty?null:new HistEvent(to.changes.invert(to.startState.doc),no,void 0,ro||to.startState.selection,none)}static selection(to){return new HistEvent(void 0,none,void 0,void 0,to)}}function updateBranch(eo,to,ro,no){let oo=to+1>ro+20?to-ro-1:0,io=eo.slice(oo,to);return io.push(no),io}function isAdjacent(eo,to){let ro=[],no=!1;return eo.iterChangedRanges((oo,io)=>ro.push(oo,io)),to.iterChangedRanges((oo,io,so,ao)=>{for(let lo=0;lo=uo&&so<=co&&(no=!0)}}),no}function eqSelectionShape(eo,to){return eo.ranges.length==to.ranges.length&&eo.ranges.filter((ro,no)=>ro.empty!=to.ranges[no].empty).length===0}function conc(eo,to){return eo.length?to.length?eo.concat(to):eo:to}const none=[],MaxSelectionsPerEvent=200;function addSelection(eo,to){if(eo.length){let ro=eo[eo.length-1],no=ro.selectionsAfter.slice(Math.max(0,ro.selectionsAfter.length-MaxSelectionsPerEvent));return no.length&&no[no.length-1].eq(to)?eo:(no.push(to),updateBranch(eo,eo.length-1,1e9,ro.setSelAfter(no)))}else return[HistEvent.selection([to])]}function popSelection(eo){let to=eo[eo.length-1],ro=eo.slice();return ro[eo.length-1]=to.setSelAfter(to.selectionsAfter.slice(0,to.selectionsAfter.length-1)),ro}function addMappingToBranch(eo,to){if(!eo.length)return eo;let ro=eo.length,no=none;for(;ro;){let oo=mapEvent(eo[ro-1],to,no);if(oo.changes&&!oo.changes.empty||oo.effects.length){let io=eo.slice(0,ro);return io[ro-1]=oo,io}else to=oo.mapped,ro--,no=oo.selectionsAfter}return no.length?[HistEvent.selection(no)]:none}function mapEvent(eo,to,ro){let no=conc(eo.selectionsAfter.length?eo.selectionsAfter.map(ao=>ao.map(to)):none,ro);if(!eo.changes)return HistEvent.selection(no);let oo=eo.changes.map(to),io=to.mapDesc(eo.changes,!0),so=eo.mapped?eo.mapped.composeDesc(io):io;return new HistEvent(oo,StateEffect.mapEffects(eo.effects,to),so,eo.startSelection.map(io),no)}const joinableUserEvent=/^(input\.type|delete)($|\.)/;class HistoryState{constructor(to,ro,no=0,oo=void 0){this.done=to,this.undone=ro,this.prevTime=no,this.prevUserEvent=oo}isolate(){return this.prevTime?new HistoryState(this.done,this.undone):this}addChanges(to,ro,no,oo,io){let so=this.done,ao=so[so.length-1];return ao&&ao.changes&&!ao.changes.empty&&to.changes&&(!no||joinableUserEvent.test(no))&&(!ao.selectionsAfter.length&&ro-this.prevTime0&&ro-this.prevTimero.empty?eo.moveByChar(ro,to):rangeEnd(ro,to))}function ltrAtCursor(eo){return eo.textDirectionAt(eo.state.selection.main.head)==Direction.LTR}const cursorCharLeft=eo=>cursorByChar(eo,!ltrAtCursor(eo)),cursorCharRight=eo=>cursorByChar(eo,ltrAtCursor(eo));function cursorByGroup(eo,to){return moveSel(eo,ro=>ro.empty?eo.moveByGroup(ro,to):rangeEnd(ro,to))}const cursorGroupLeft=eo=>cursorByGroup(eo,!ltrAtCursor(eo)),cursorGroupRight=eo=>cursorByGroup(eo,ltrAtCursor(eo));function interestingNode(eo,to,ro){if(to.type.prop(ro))return!0;let no=to.to-to.from;return no&&(no>2||/[^\s,.;:]/.test(eo.sliceDoc(to.from,to.to)))||to.firstChild}function moveBySyntax(eo,to,ro){let no=syntaxTree(eo).resolveInner(to.head),oo=ro?NodeProp.closedBy:NodeProp.openedBy;for(let lo=to.head;;){let uo=ro?no.childAfter(lo):no.childBefore(lo);if(!uo)break;interestingNode(eo,uo,oo)?no=uo:lo=ro?uo.to:uo.from}let io=no.type.prop(oo),so,ao;return io&&(so=ro?matchBrackets(eo,no.from,1):matchBrackets(eo,no.to,-1))&&so.matched?ao=ro?so.end.to:so.end.from:ao=ro?no.to:no.from,EditorSelection.cursor(ao,ro?-1:1)}const cursorSyntaxLeft=eo=>moveSel(eo,to=>moveBySyntax(eo.state,to,!ltrAtCursor(eo))),cursorSyntaxRight=eo=>moveSel(eo,to=>moveBySyntax(eo.state,to,ltrAtCursor(eo)));function cursorByLine(eo,to){return moveSel(eo,ro=>{if(!ro.empty)return rangeEnd(ro,to);let no=eo.moveVertically(ro,to);return no.head!=ro.head?no:eo.moveToLineBoundary(ro,to)})}const cursorLineUp=eo=>cursorByLine(eo,!1),cursorLineDown=eo=>cursorByLine(eo,!0);function pageInfo(eo){let to=eo.scrollDOM.clientHeightso.empty?eo.moveVertically(so,to,ro.height):rangeEnd(so,to));if(oo.eq(no.selection))return!1;let io;if(ro.selfScroll){let so=eo.coordsAtPos(no.selection.main.head),ao=eo.scrollDOM.getBoundingClientRect(),lo=ao.top+ro.marginTop,uo=ao.bottom-ro.marginBottom;so&&so.top>lo&&so.bottomcursorByPage(eo,!1),cursorPageDown=eo=>cursorByPage(eo,!0);function moveByLineBoundary(eo,to,ro){let no=eo.lineBlockAt(to.head),oo=eo.moveToLineBoundary(to,ro);if(oo.head==to.head&&oo.head!=(ro?no.to:no.from)&&(oo=eo.moveToLineBoundary(to,ro,!1)),!ro&&oo.head==no.from&&no.length){let io=/^\s*/.exec(eo.state.sliceDoc(no.from,Math.min(no.from+100,no.to)))[0].length;io&&to.head!=no.from+io&&(oo=EditorSelection.cursor(no.from+io))}return oo}const cursorLineBoundaryForward=eo=>moveSel(eo,to=>moveByLineBoundary(eo,to,!0)),cursorLineBoundaryBackward=eo=>moveSel(eo,to=>moveByLineBoundary(eo,to,!1)),cursorLineBoundaryLeft=eo=>moveSel(eo,to=>moveByLineBoundary(eo,to,!ltrAtCursor(eo))),cursorLineBoundaryRight=eo=>moveSel(eo,to=>moveByLineBoundary(eo,to,ltrAtCursor(eo))),cursorLineStart=eo=>moveSel(eo,to=>EditorSelection.cursor(eo.lineBlockAt(to.head).from,1)),cursorLineEnd=eo=>moveSel(eo,to=>EditorSelection.cursor(eo.lineBlockAt(to.head).to,-1));function toMatchingBracket(eo,to,ro){let no=!1,oo=updateSel(eo.selection,io=>{let so=matchBrackets(eo,io.head,-1)||matchBrackets(eo,io.head,1)||io.head>0&&matchBrackets(eo,io.head-1,1)||io.headtoMatchingBracket(eo,to,!1);function extendSel(eo,to){let ro=updateSel(eo.state.selection,no=>{let oo=to(no);return EditorSelection.range(no.anchor,oo.head,oo.goalColumn,oo.bidiLevel||void 0)});return ro.eq(eo.state.selection)?!1:(eo.dispatch(setSel(eo.state,ro)),!0)}function selectByChar(eo,to){return extendSel(eo,ro=>eo.moveByChar(ro,to))}const selectCharLeft=eo=>selectByChar(eo,!ltrAtCursor(eo)),selectCharRight=eo=>selectByChar(eo,ltrAtCursor(eo));function selectByGroup(eo,to){return extendSel(eo,ro=>eo.moveByGroup(ro,to))}const selectGroupLeft=eo=>selectByGroup(eo,!ltrAtCursor(eo)),selectGroupRight=eo=>selectByGroup(eo,ltrAtCursor(eo)),selectSyntaxLeft=eo=>extendSel(eo,to=>moveBySyntax(eo.state,to,!ltrAtCursor(eo))),selectSyntaxRight=eo=>extendSel(eo,to=>moveBySyntax(eo.state,to,ltrAtCursor(eo)));function selectByLine(eo,to){return extendSel(eo,ro=>eo.moveVertically(ro,to))}const selectLineUp=eo=>selectByLine(eo,!1),selectLineDown=eo=>selectByLine(eo,!0);function selectByPage(eo,to){return extendSel(eo,ro=>eo.moveVertically(ro,to,pageInfo(eo).height))}const selectPageUp=eo=>selectByPage(eo,!1),selectPageDown=eo=>selectByPage(eo,!0),selectLineBoundaryForward=eo=>extendSel(eo,to=>moveByLineBoundary(eo,to,!0)),selectLineBoundaryBackward=eo=>extendSel(eo,to=>moveByLineBoundary(eo,to,!1)),selectLineBoundaryLeft=eo=>extendSel(eo,to=>moveByLineBoundary(eo,to,!ltrAtCursor(eo))),selectLineBoundaryRight=eo=>extendSel(eo,to=>moveByLineBoundary(eo,to,ltrAtCursor(eo))),selectLineStart=eo=>extendSel(eo,to=>EditorSelection.cursor(eo.lineBlockAt(to.head).from)),selectLineEnd=eo=>extendSel(eo,to=>EditorSelection.cursor(eo.lineBlockAt(to.head).to)),cursorDocStart=({state:eo,dispatch:to})=>(to(setSel(eo,{anchor:0})),!0),cursorDocEnd=({state:eo,dispatch:to})=>(to(setSel(eo,{anchor:eo.doc.length})),!0),selectDocStart=({state:eo,dispatch:to})=>(to(setSel(eo,{anchor:eo.selection.main.anchor,head:0})),!0),selectDocEnd=({state:eo,dispatch:to})=>(to(setSel(eo,{anchor:eo.selection.main.anchor,head:eo.doc.length})),!0),selectAll=({state:eo,dispatch:to})=>(to(eo.update({selection:{anchor:0,head:eo.doc.length},userEvent:"select"})),!0),selectLine=({state:eo,dispatch:to})=>{let ro=selectedLineBlocks(eo).map(({from:no,to:oo})=>EditorSelection.range(no,Math.min(oo+1,eo.doc.length)));return to(eo.update({selection:EditorSelection.create(ro),userEvent:"select"})),!0},selectParentSyntax=({state:eo,dispatch:to})=>{let ro=updateSel(eo.selection,no=>{var oo;let io=syntaxTree(eo).resolveStack(no.from,1);for(let so=io;so;so=so.next){let{node:ao}=so;if((ao.from=no.to||ao.to>no.to&&ao.from<=no.from)&&(!((oo=ao.parent)===null||oo===void 0)&&oo.parent))return EditorSelection.range(ao.to,ao.from)}return no});return to(setSel(eo,ro)),!0},simplifySelection=({state:eo,dispatch:to})=>{let ro=eo.selection,no=null;return ro.ranges.length>1?no=EditorSelection.create([ro.main]):ro.main.empty||(no=EditorSelection.create([EditorSelection.cursor(ro.main.head)])),no?(to(setSel(eo,no)),!0):!1};function deleteBy(eo,to){if(eo.state.readOnly)return!1;let ro="delete.selection",{state:no}=eo,oo=no.changeByRange(io=>{let{from:so,to:ao}=io;if(so==ao){let lo=to(io);loso&&(ro="delete.forward",lo=skipAtomic(eo,lo,!0)),so=Math.min(so,lo),ao=Math.max(ao,lo)}else so=skipAtomic(eo,so,!1),ao=skipAtomic(eo,ao,!0);return so==ao?{range:io}:{changes:{from:so,to:ao},range:EditorSelection.cursor(so,sooo(eo)))no.between(to,to,(oo,io)=>{ooto&&(to=ro?io:oo)});return to}const deleteByChar=(eo,to)=>deleteBy(eo,ro=>{let no=ro.from,{state:oo}=eo,io=oo.doc.lineAt(no),so,ao;if(!to&&no>io.from&&nodeleteByChar(eo,!1),deleteCharForward=eo=>deleteByChar(eo,!0),deleteByGroup=(eo,to)=>deleteBy(eo,ro=>{let no=ro.head,{state:oo}=eo,io=oo.doc.lineAt(no),so=oo.charCategorizer(no);for(let ao=null;;){if(no==(to?io.to:io.from)){no==ro.head&&io.number!=(to?oo.doc.lines:1)&&(no+=to?1:-1);break}let lo=findClusterBreak(io.text,no-io.from,to)+io.from,uo=io.text.slice(Math.min(no,lo)-io.from,Math.max(no,lo)-io.from),co=so(uo);if(ao!=null&&co!=ao)break;(uo!=" "||no!=ro.head)&&(ao=co),no=lo}return no}),deleteGroupBackward=eo=>deleteByGroup(eo,!1),deleteGroupForward=eo=>deleteByGroup(eo,!0),deleteToLineEnd=eo=>deleteBy(eo,to=>{let ro=eo.lineBlockAt(to.head).to;return to.headdeleteBy(eo,to=>{let ro=eo.moveToLineBoundary(to,!1).head;return to.head>ro?ro:Math.max(0,to.head-1)}),deleteLineBoundaryForward=eo=>deleteBy(eo,to=>{let ro=eo.moveToLineBoundary(to,!0).head;return to.head{if(eo.readOnly)return!1;let ro=eo.changeByRange(no=>({changes:{from:no.from,to:no.to,insert:Text$1.of(["",""])},range:EditorSelection.cursor(no.from)}));return to(eo.update(ro,{scrollIntoView:!0,userEvent:"input"})),!0},transposeChars=({state:eo,dispatch:to})=>{if(eo.readOnly)return!1;let ro=eo.changeByRange(no=>{if(!no.empty||no.from==0||no.from==eo.doc.length)return{range:no};let oo=no.from,io=eo.doc.lineAt(oo),so=oo==io.from?oo-1:findClusterBreak(io.text,oo-io.from,!1)+io.from,ao=oo==io.to?oo+1:findClusterBreak(io.text,oo-io.from,!0)+io.from;return{changes:{from:so,to:ao,insert:eo.doc.slice(oo,ao).append(eo.doc.slice(so,oo))},range:EditorSelection.cursor(ao)}});return ro.changes.empty?!1:(to(eo.update(ro,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function selectedLineBlocks(eo){let to=[],ro=-1;for(let no of eo.selection.ranges){let oo=eo.doc.lineAt(no.from),io=eo.doc.lineAt(no.to);if(!no.empty&&no.to==io.from&&(io=eo.doc.lineAt(no.to-1)),ro>=oo.number){let so=to[to.length-1];so.to=io.to,so.ranges.push(no)}else to.push({from:oo.from,to:io.to,ranges:[no]});ro=io.number+1}return to}function moveLine(eo,to,ro){if(eo.readOnly)return!1;let no=[],oo=[];for(let io of selectedLineBlocks(eo)){if(ro?io.to==eo.doc.length:io.from==0)continue;let so=eo.doc.lineAt(ro?io.to+1:io.from-1),ao=so.length+1;if(ro){no.push({from:io.to,to:so.to},{from:io.from,insert:so.text+eo.lineBreak});for(let lo of io.ranges)oo.push(EditorSelection.range(Math.min(eo.doc.length,lo.anchor+ao),Math.min(eo.doc.length,lo.head+ao)))}else{no.push({from:so.from,to:io.from},{from:io.to,insert:eo.lineBreak+so.text});for(let lo of io.ranges)oo.push(EditorSelection.range(lo.anchor-ao,lo.head-ao))}}return no.length?(to(eo.update({changes:no,scrollIntoView:!0,selection:EditorSelection.create(oo,eo.selection.mainIndex),userEvent:"move.line"})),!0):!1}const moveLineUp=({state:eo,dispatch:to})=>moveLine(eo,to,!1),moveLineDown=({state:eo,dispatch:to})=>moveLine(eo,to,!0);function copyLine(eo,to,ro){if(eo.readOnly)return!1;let no=[];for(let oo of selectedLineBlocks(eo))ro?no.push({from:oo.from,insert:eo.doc.slice(oo.from,oo.to)+eo.lineBreak}):no.push({from:oo.to,insert:eo.lineBreak+eo.doc.slice(oo.from,oo.to)});return to(eo.update({changes:no,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const copyLineUp=({state:eo,dispatch:to})=>copyLine(eo,to,!1),copyLineDown=({state:eo,dispatch:to})=>copyLine(eo,to,!0),deleteLine=eo=>{if(eo.state.readOnly)return!1;let{state:to}=eo,ro=to.changes(selectedLineBlocks(to).map(({from:oo,to:io})=>(oo>0?oo--:ioeo.moveVertically(oo,!0)).map(ro);return eo.dispatch({changes:ro,selection:no,scrollIntoView:!0,userEvent:"delete.line"}),!0};function isBetweenBrackets(eo,to){if(/\(\)|\[\]|\{\}/.test(eo.sliceDoc(to-1,to+1)))return{from:to,to};let ro=syntaxTree(eo).resolveInner(to),no=ro.childBefore(to),oo=ro.childAfter(to),io;return no&&oo&&no.to<=to&&oo.from>=to&&(io=no.type.prop(NodeProp.closedBy))&&io.indexOf(oo.name)>-1&&eo.doc.lineAt(no.to).from==eo.doc.lineAt(oo.from).from&&!/\S/.test(eo.sliceDoc(no.to,oo.from))?{from:no.to,to:oo.from}:null}const insertNewlineAndIndent=newlineAndIndent(!1),insertBlankLine=newlineAndIndent(!0);function newlineAndIndent(eo){return({state:to,dispatch:ro})=>{if(to.readOnly)return!1;let no=to.changeByRange(oo=>{let{from:io,to:so}=oo,ao=to.doc.lineAt(io),lo=!eo&&io==so&&isBetweenBrackets(to,io);eo&&(io=so=(so<=ao.to?ao:to.doc.lineAt(so)).to);let uo=new IndentContext(to,{simulateBreak:io,simulateDoubleBreak:!!lo}),co=getIndentation(uo,io);for(co==null&&(co=countColumn(/^\s*/.exec(to.doc.lineAt(io).text)[0],to.tabSize));soao.from&&io{let oo=[];for(let so=no.from;so<=no.to;){let ao=eo.doc.lineAt(so);ao.number>ro&&(no.empty||no.to>ao.from)&&(to(ao,oo,no),ro=ao.number),so=ao.to+1}let io=eo.changes(oo);return{changes:oo,range:EditorSelection.range(io.mapPos(no.anchor,1),io.mapPos(no.head,1))}})}const indentSelection=({state:eo,dispatch:to})=>{if(eo.readOnly)return!1;let ro=Object.create(null),no=new IndentContext(eo,{overrideIndentation:io=>{let so=ro[io];return so??-1}}),oo=changeBySelectedLine(eo,(io,so,ao)=>{let lo=getIndentation(no,io.from);if(lo==null)return;/\S/.test(io.text)||(lo=0);let uo=/^\s*/.exec(io.text)[0],co=indentString(eo,lo);(uo!=co||ao.fromeo.readOnly?!1:(to(eo.update(changeBySelectedLine(eo,(ro,no)=>{no.push({from:ro.from,insert:eo.facet(indentUnit)})}),{userEvent:"input.indent"})),!0),indentLess=({state:eo,dispatch:to})=>eo.readOnly?!1:(to(eo.update(changeBySelectedLine(eo,(ro,no)=>{let oo=/^\s*/.exec(ro.text)[0];if(!oo)return;let io=countColumn(oo,eo.tabSize),so=0,ao=indentString(eo,Math.max(0,io-getIndentUnit(eo)));for(;so({mac:eo.key,run:eo.run,shift:eo.shift}))),defaultKeymap=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:cursorSyntaxLeft,shift:selectSyntaxLeft},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:cursorSyntaxRight,shift:selectSyntaxRight},{key:"Alt-ArrowUp",run:moveLineUp},{key:"Shift-Alt-ArrowUp",run:copyLineUp},{key:"Alt-ArrowDown",run:moveLineDown},{key:"Shift-Alt-ArrowDown",run:copyLineDown},{key:"Escape",run:simplifySelection},{key:"Mod-Enter",run:insertBlankLine},{key:"Alt-l",mac:"Ctrl-l",run:selectLine},{key:"Mod-i",run:selectParentSyntax,preventDefault:!0},{key:"Mod-[",run:indentLess},{key:"Mod-]",run:indentMore},{key:"Mod-Alt-\\",run:indentSelection},{key:"Shift-Mod-k",run:deleteLine},{key:"Shift-Mod-\\",run:cursorMatchingBracket},{key:"Mod-/",run:toggleComment},{key:"Alt-A",run:toggleBlockComment}].concat(standardKeymap),indentWithTab={key:"Tab",run:indentMore,shift:indentLess};function crelt(){var eo=arguments[0];typeof eo=="string"&&(eo=document.createElement(eo));var to=1,ro=arguments[1];if(ro&&typeof ro=="object"&&ro.nodeType==null&&!Array.isArray(ro)){for(var no in ro)if(Object.prototype.hasOwnProperty.call(ro,no)){var oo=ro[no];typeof oo=="string"?eo.setAttribute(no,oo):oo!=null&&(eo[no]=oo)}to++}for(;toeo.normalize("NFKD"):eo=>eo;class SearchCursor{constructor(to,ro,no=0,oo=to.length,io,so){this.test=so,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=to.iterRange(no,oo),this.bufferStart=no,this.normalize=io?ao=>io(basicNormalize(ao)):basicNormalize,this.query=this.normalize(ro)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return codePointAt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let to=this.peek();if(to<0)return this.done=!0,this;let ro=fromCodePoint(to),no=this.bufferStart+this.bufferPos;this.bufferPos+=codePointSize(to);let oo=this.normalize(ro);for(let io=0,so=no;;io++){let ao=oo.charCodeAt(io),lo=this.match(ao,so,this.bufferPos+this.bufferStart);if(io==oo.length-1){if(lo)return this.value=lo,this;break}so==no&&iothis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let to=this.matchPos-this.curLineStart;;){this.re.lastIndex=to;let ro=this.matchPos<=this.to&&this.re.exec(this.curLine);if(ro){let no=this.curLineStart+ro.index,oo=no+ro[0].length;if(this.matchPos=toCharEnd(this.text,oo+(no==oo?1:0)),no==this.curLineStart+this.curLine.length&&this.nextLine(),(nothis.value.to)&&(!this.test||this.test(no,oo,ro)))return this.value={from:no,to:oo,match:ro},this;to=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=no||oo.to<=ro){let ao=new FlattenedDoc(ro,to.sliceString(ro,no));return flattened.set(to,ao),ao}if(oo.from==ro&&oo.to==no)return oo;let{text:io,from:so}=oo;return so>ro&&(io=to.sliceString(ro,so)+io,so=ro),oo.to=this.to?this.to:this.text.lineAt(to).to}next(){for(;;){let to=this.re.lastIndex=this.matchPos-this.flat.from,ro=this.re.exec(this.flat.text);if(ro&&!ro[0]&&ro.index==to&&(this.re.lastIndex=to+1,ro=this.re.exec(this.flat.text)),ro){let no=this.flat.from+ro.index,oo=no+ro[0].length;if((this.flat.to>=this.to||ro.index+ro[0].length<=this.flat.text.length-10)&&(!this.test||this.test(no,oo,ro)))return this.value={from:no,to:oo,match:ro},this.matchPos=toCharEnd(this.text,oo+(no==oo?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=FlattenedDoc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(RegExpCursor.prototype[Symbol.iterator]=MultilineRegExpCursor.prototype[Symbol.iterator]=function(){return this});function validRegExp(eo){try{return new RegExp(eo,baseFlags),!0}catch{return!1}}function toCharEnd(eo,to){if(to>=eo.length)return to;let ro=eo.lineAt(to),no;for(;to=56320&&no<57344;)to++;return to}function createLineDialog(eo){let to=String(eo.state.doc.lineAt(eo.state.selection.main.head).number),ro=crelt("input",{class:"cm-textfield",name:"line",value:to}),no=crelt("form",{class:"cm-gotoLine",onkeydown:io=>{io.keyCode==27?(io.preventDefault(),eo.dispatch({effects:dialogEffect.of(!1)}),eo.focus()):io.keyCode==13&&(io.preventDefault(),oo())},onsubmit:io=>{io.preventDefault(),oo()}},crelt("label",eo.state.phrase("Go to line"),": ",ro)," ",crelt("button",{class:"cm-button",type:"submit"},eo.state.phrase("go")));function oo(){let io=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(ro.value);if(!io)return;let{state:so}=eo,ao=so.doc.lineAt(so.selection.main.head),[,lo,uo,co,fo]=io,ho=co?+co.slice(1):0,po=uo?+uo:ao.number;if(uo&&fo){let bo=po/100;lo&&(bo=bo*(lo=="-"?-1:1)+ao.number/so.doc.lines),po=Math.round(so.doc.lines*bo)}else uo&&lo&&(po=po*(lo=="-"?-1:1)+ao.number);let go=so.doc.line(Math.max(1,Math.min(so.doc.lines,po))),vo=EditorSelection.cursor(go.from+Math.max(0,Math.min(ho,go.length)));eo.dispatch({effects:[dialogEffect.of(!1),EditorView.scrollIntoView(vo.from,{y:"center"})],selection:vo}),eo.focus()}return{dom:no}}const dialogEffect=StateEffect.define(),dialogField=StateField.define({create(){return!0},update(eo,to){for(let ro of to.effects)ro.is(dialogEffect)&&(eo=ro.value);return eo},provide:eo=>showPanel.from(eo,to=>to?createLineDialog:null)}),gotoLine=eo=>{let to=getPanel(eo,createLineDialog);if(!to){let ro=[dialogEffect.of(!0)];eo.state.field(dialogField,!1)==null&&ro.push(StateEffect.appendConfig.of([dialogField,baseTheme$1])),eo.dispatch({effects:ro}),to=getPanel(eo,createLineDialog)}return to&&to.dom.querySelector("input").select(),!0},baseTheme$1=EditorView.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),defaultHighlightOptions={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},highlightConfig=Facet.define({combine(eo){return combineConfig(eo,defaultHighlightOptions,{highlightWordAroundCursor:(to,ro)=>to||ro,minSelectionLength:Math.min,maxMatches:Math.min})}});function highlightSelectionMatches(eo){let to=[defaultTheme,matchHighlighter];return eo&&to.push(highlightConfig.of(eo)),to}const matchDeco=Decoration.mark({class:"cm-selectionMatch"}),mainMatchDeco=Decoration.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function insideWordBoundaries(eo,to,ro,no){return(ro==0||eo(to.sliceDoc(ro-1,ro))!=CharCategory.Word)&&(no==to.doc.length||eo(to.sliceDoc(no,no+1))!=CharCategory.Word)}function insideWord(eo,to,ro,no){return eo(to.sliceDoc(ro,ro+1))==CharCategory.Word&&eo(to.sliceDoc(no-1,no))==CharCategory.Word}const matchHighlighter=ViewPlugin.fromClass(class{constructor(eo){this.decorations=this.getDeco(eo)}update(eo){(eo.selectionSet||eo.docChanged||eo.viewportChanged)&&(this.decorations=this.getDeco(eo.view))}getDeco(eo){let to=eo.state.facet(highlightConfig),{state:ro}=eo,no=ro.selection;if(no.ranges.length>1)return Decoration.none;let oo=no.main,io,so=null;if(oo.empty){if(!to.highlightWordAroundCursor)return Decoration.none;let lo=ro.wordAt(oo.head);if(!lo)return Decoration.none;so=ro.charCategorizer(oo.head),io=ro.sliceDoc(lo.from,lo.to)}else{let lo=oo.to-oo.from;if(lo200)return Decoration.none;if(to.wholeWords){if(io=ro.sliceDoc(oo.from,oo.to),so=ro.charCategorizer(oo.head),!(insideWordBoundaries(so,ro,oo.from,oo.to)&&insideWord(so,ro,oo.from,oo.to)))return Decoration.none}else if(io=ro.sliceDoc(oo.from,oo.to),!io)return Decoration.none}let ao=[];for(let lo of eo.visibleRanges){let uo=new SearchCursor(ro.doc,io,lo.from,lo.to);for(;!uo.next().done;){let{from:co,to:fo}=uo.value;if((!so||insideWordBoundaries(so,ro,co,fo))&&(oo.empty&&co<=oo.from&&fo>=oo.to?ao.push(mainMatchDeco.range(co,fo)):(co>=oo.to||fo<=oo.from)&&ao.push(matchDeco.range(co,fo)),ao.length>to.maxMatches))return Decoration.none}}return Decoration.set(ao)}},{decorations:eo=>eo.decorations}),defaultTheme=EditorView.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),selectWord=({state:eo,dispatch:to})=>{let{selection:ro}=eo,no=EditorSelection.create(ro.ranges.map(oo=>eo.wordAt(oo.head)||EditorSelection.cursor(oo.head)),ro.mainIndex);return no.eq(ro)?!1:(to(eo.update({selection:no})),!0)};function findNextOccurrence(eo,to){let{main:ro,ranges:no}=eo.selection,oo=eo.wordAt(ro.head),io=oo&&oo.from==ro.from&&oo.to==ro.to;for(let so=!1,ao=new SearchCursor(eo.doc,to,no[no.length-1].to);;)if(ao.next(),ao.done){if(so)return null;ao=new SearchCursor(eo.doc,to,0,Math.max(0,no[no.length-1].from-1)),so=!0}else{if(so&&no.some(lo=>lo.from==ao.value.from))continue;if(io){let lo=eo.wordAt(ao.value.from);if(!lo||lo.from!=ao.value.from||lo.to!=ao.value.to)continue}return ao.value}}const selectNextOccurrence=({state:eo,dispatch:to})=>{let{ranges:ro}=eo.selection;if(ro.some(io=>io.from===io.to))return selectWord({state:eo,dispatch:to});let no=eo.sliceDoc(ro[0].from,ro[0].to);if(eo.selection.ranges.some(io=>eo.sliceDoc(io.from,io.to)!=no))return!1;let oo=findNextOccurrence(eo,no);return oo?(to(eo.update({selection:eo.selection.addRange(EditorSelection.range(oo.from,oo.to),!1),effects:EditorView.scrollIntoView(oo.to)})),!0):!1},searchConfigFacet=Facet.define({combine(eo){return combineConfig(eo,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:to=>new SearchPanel(to),scrollToMatch:to=>EditorView.scrollIntoView(to)})}});class SearchQuery{constructor(to){this.search=to.search,this.caseSensitive=!!to.caseSensitive,this.literal=!!to.literal,this.regexp=!!to.regexp,this.replace=to.replace||"",this.valid=!!this.search&&(!this.regexp||validRegExp(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!to.wholeWord}unquote(to){return this.literal?to:to.replace(/\\([nrt\\])/g,(ro,no)=>no=="n"?` +`:no=="r"?"\r":no=="t"?" ":"\\")}eq(to){return this.search==to.search&&this.replace==to.replace&&this.caseSensitive==to.caseSensitive&&this.regexp==to.regexp&&this.wholeWord==to.wholeWord}create(){return this.regexp?new RegExpQuery(this):new StringQuery(this)}getCursor(to,ro=0,no){let oo=to.doc?to:EditorState.create({doc:to});return no==null&&(no=oo.doc.length),this.regexp?regexpCursor(this,oo,ro,no):stringCursor(this,oo,ro,no)}}class QueryType{constructor(to){this.spec=to}}function stringCursor(eo,to,ro,no){return new SearchCursor(to.doc,eo.unquoted,ro,no,eo.caseSensitive?void 0:oo=>oo.toLowerCase(),eo.wholeWord?stringWordTest(to.doc,to.charCategorizer(to.selection.main.head)):void 0)}function stringWordTest(eo,to){return(ro,no,oo,io)=>((io>ro||io+oo.length=ro)return null;oo.push(no.value)}return oo}highlight(to,ro,no,oo){let io=stringCursor(this.spec,to,Math.max(0,ro-this.spec.unquoted.length),Math.min(no+this.spec.unquoted.length,to.doc.length));for(;!io.next().done;)oo(io.value.from,io.value.to)}}function regexpCursor(eo,to,ro,no){return new RegExpCursor(to.doc,eo.search,{ignoreCase:!eo.caseSensitive,test:eo.wholeWord?regexpWordTest(to.charCategorizer(to.selection.main.head)):void 0},ro,no)}function charBefore(eo,to){return eo.slice(findClusterBreak(eo,to,!1),to)}function charAfter(eo,to){return eo.slice(to,findClusterBreak(eo,to))}function regexpWordTest(eo){return(to,ro,no)=>!no[0].length||(eo(charBefore(no.input,no.index))!=CharCategory.Word||eo(charAfter(no.input,no.index))!=CharCategory.Word)&&(eo(charAfter(no.input,no.index+no[0].length))!=CharCategory.Word||eo(charBefore(no.input,no.index+no[0].length))!=CharCategory.Word)}class RegExpQuery extends QueryType{nextMatch(to,ro,no){let oo=regexpCursor(this.spec,to,no,to.doc.length).next();return oo.done&&(oo=regexpCursor(this.spec,to,0,ro).next()),oo.done?null:oo.value}prevMatchInRange(to,ro,no){for(let oo=1;;oo++){let io=Math.max(ro,no-oo*1e4),so=regexpCursor(this.spec,to,io,no),ao=null;for(;!so.next().done;)ao=so.value;if(ao&&(io==ro||ao.from>io+10))return ao;if(io==ro)return null}}prevMatch(to,ro,no){return this.prevMatchInRange(to,0,ro)||this.prevMatchInRange(to,no,to.doc.length)}getReplacement(to){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(ro,no)=>no=="$"?"$":no=="&"?to.match[0]:no!="0"&&+no=ro)return null;oo.push(no.value)}return oo}highlight(to,ro,no,oo){let io=regexpCursor(this.spec,to,Math.max(0,ro-250),Math.min(no+250,to.doc.length));for(;!io.next().done;)oo(io.value.from,io.value.to)}}const setSearchQuery=StateEffect.define(),togglePanel$1=StateEffect.define(),searchState=StateField.define({create(eo){return new SearchState(defaultQuery(eo).create(),null)},update(eo,to){for(let ro of to.effects)ro.is(setSearchQuery)?eo=new SearchState(ro.value.create(),eo.panel):ro.is(togglePanel$1)&&(eo=new SearchState(eo.query,ro.value?createSearchPanel:null));return eo},provide:eo=>showPanel.from(eo,to=>to.panel)});class SearchState{constructor(to,ro){this.query=to,this.panel=ro}}const matchMark=Decoration.mark({class:"cm-searchMatch"}),selectedMatchMark=Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),searchHighlighter=ViewPlugin.fromClass(class{constructor(eo){this.view=eo,this.decorations=this.highlight(eo.state.field(searchState))}update(eo){let to=eo.state.field(searchState);(to!=eo.startState.field(searchState)||eo.docChanged||eo.selectionSet||eo.viewportChanged)&&(this.decorations=this.highlight(to))}highlight({query:eo,panel:to}){if(!to||!eo.spec.valid)return Decoration.none;let{view:ro}=this,no=new RangeSetBuilder;for(let oo=0,io=ro.visibleRanges,so=io.length;ooio[oo+1].from-2*250;)lo=io[++oo].to;eo.highlight(ro.state,ao,lo,(uo,co)=>{let fo=ro.state.selection.ranges.some(ho=>ho.from==uo&&ho.to==co);no.add(uo,co,fo?selectedMatchMark:matchMark)})}return no.finish()}},{decorations:eo=>eo.decorations});function searchCommand(eo){return to=>{let ro=to.state.field(searchState,!1);return ro&&ro.query.spec.valid?eo(to,ro):openSearchPanel(to)}}const findNext=searchCommand((eo,{query:to})=>{let{to:ro}=eo.state.selection.main,no=to.nextMatch(eo.state,ro,ro);if(!no)return!1;let oo=EditorSelection.single(no.from,no.to),io=eo.state.facet(searchConfigFacet);return eo.dispatch({selection:oo,effects:[announceMatch(eo,no),io.scrollToMatch(oo.main,eo)],userEvent:"select.search"}),selectSearchInput(eo),!0}),findPrevious=searchCommand((eo,{query:to})=>{let{state:ro}=eo,{from:no}=ro.selection.main,oo=to.prevMatch(ro,no,no);if(!oo)return!1;let io=EditorSelection.single(oo.from,oo.to),so=eo.state.facet(searchConfigFacet);return eo.dispatch({selection:io,effects:[announceMatch(eo,oo),so.scrollToMatch(io.main,eo)],userEvent:"select.search"}),selectSearchInput(eo),!0}),selectMatches=searchCommand((eo,{query:to})=>{let ro=to.matchAll(eo.state,1e3);return!ro||!ro.length?!1:(eo.dispatch({selection:EditorSelection.create(ro.map(no=>EditorSelection.range(no.from,no.to))),userEvent:"select.search.matches"}),!0)}),selectSelectionMatches=({state:eo,dispatch:to})=>{let ro=eo.selection;if(ro.ranges.length>1||ro.main.empty)return!1;let{from:no,to:oo}=ro.main,io=[],so=0;for(let ao=new SearchCursor(eo.doc,eo.sliceDoc(no,oo));!ao.next().done;){if(io.length>1e3)return!1;ao.value.from==no&&(so=io.length),io.push(EditorSelection.range(ao.value.from,ao.value.to))}return to(eo.update({selection:EditorSelection.create(io,so),userEvent:"select.search.matches"})),!0},replaceNext=searchCommand((eo,{query:to})=>{let{state:ro}=eo,{from:no,to:oo}=ro.selection.main;if(ro.readOnly)return!1;let io=to.nextMatch(ro,no,no);if(!io)return!1;let so=[],ao,lo,uo=[];if(io.from==no&&io.to==oo&&(lo=ro.toText(to.getReplacement(io)),so.push({from:io.from,to:io.to,insert:lo}),io=to.nextMatch(ro,io.from,io.to),uo.push(EditorView.announce.of(ro.phrase("replaced match on line $",ro.doc.lineAt(no).number)+"."))),io){let co=so.length==0||so[0].from>=io.to?0:io.to-io.from-lo.length;ao=EditorSelection.single(io.from-co,io.to-co),uo.push(announceMatch(eo,io)),uo.push(ro.facet(searchConfigFacet).scrollToMatch(ao.main,eo))}return eo.dispatch({changes:so,selection:ao,effects:uo,userEvent:"input.replace"}),!0}),replaceAll=searchCommand((eo,{query:to})=>{if(eo.state.readOnly)return!1;let ro=to.matchAll(eo.state,1e9).map(oo=>{let{from:io,to:so}=oo;return{from:io,to:so,insert:to.getReplacement(oo)}});if(!ro.length)return!1;let no=eo.state.phrase("replaced $ matches",ro.length)+".";return eo.dispatch({changes:ro,effects:EditorView.announce.of(no),userEvent:"input.replace.all"}),!0});function createSearchPanel(eo){return eo.state.facet(searchConfigFacet).createPanel(eo)}function defaultQuery(eo,to){var ro,no,oo,io,so;let ao=eo.selection.main,lo=ao.empty||ao.to>ao.from+100?"":eo.sliceDoc(ao.from,ao.to);if(to&&!lo)return to;let uo=eo.facet(searchConfigFacet);return new SearchQuery({search:((ro=to==null?void 0:to.literal)!==null&&ro!==void 0?ro:uo.literal)?lo:lo.replace(/\n/g,"\\n"),caseSensitive:(no=to==null?void 0:to.caseSensitive)!==null&&no!==void 0?no:uo.caseSensitive,literal:(oo=to==null?void 0:to.literal)!==null&&oo!==void 0?oo:uo.literal,regexp:(io=to==null?void 0:to.regexp)!==null&&io!==void 0?io:uo.regexp,wholeWord:(so=to==null?void 0:to.wholeWord)!==null&&so!==void 0?so:uo.wholeWord})}function getSearchInput(eo){let to=getPanel(eo,createSearchPanel);return to&&to.dom.querySelector("[main-field]")}function selectSearchInput(eo){let to=getSearchInput(eo);to&&to==eo.root.activeElement&&to.select()}const openSearchPanel=eo=>{let to=eo.state.field(searchState,!1);if(to&&to.panel){let ro=getSearchInput(eo);if(ro&&ro!=eo.root.activeElement){let no=defaultQuery(eo.state,to.query.spec);no.valid&&eo.dispatch({effects:setSearchQuery.of(no)}),ro.focus(),ro.select()}}else eo.dispatch({effects:[togglePanel$1.of(!0),to?setSearchQuery.of(defaultQuery(eo.state,to.query.spec)):StateEffect.appendConfig.of(searchExtensions)]});return!0},closeSearchPanel=eo=>{let to=eo.state.field(searchState,!1);if(!to||!to.panel)return!1;let ro=getPanel(eo,createSearchPanel);return ro&&ro.dom.contains(eo.root.activeElement)&&eo.focus(),eo.dispatch({effects:togglePanel$1.of(!1)}),!0},searchKeymap=[{key:"Mod-f",run:openSearchPanel,scope:"editor search-panel"},{key:"F3",run:findNext,shift:findPrevious,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:findNext,shift:findPrevious,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:closeSearchPanel,scope:"editor search-panel"},{key:"Mod-Shift-l",run:selectSelectionMatches},{key:"Mod-Alt-g",run:gotoLine},{key:"Mod-d",run:selectNextOccurrence,preventDefault:!0}];class SearchPanel{constructor(to){this.view=to;let ro=this.query=to.state.field(searchState).query.spec;this.commit=this.commit.bind(this),this.searchField=crelt("input",{value:ro.search,placeholder:phrase(to,"Find"),"aria-label":phrase(to,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=crelt("input",{value:ro.replace,placeholder:phrase(to,"Replace"),"aria-label":phrase(to,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=crelt("input",{type:"checkbox",name:"case",form:"",checked:ro.caseSensitive,onchange:this.commit}),this.reField=crelt("input",{type:"checkbox",name:"re",form:"",checked:ro.regexp,onchange:this.commit}),this.wordField=crelt("input",{type:"checkbox",name:"word",form:"",checked:ro.wholeWord,onchange:this.commit});function no(oo,io,so){return crelt("button",{class:"cm-button",name:oo,onclick:io,type:"button"},so)}this.dom=crelt("div",{onkeydown:oo=>this.keydown(oo),class:"cm-search"},[this.searchField,no("next",()=>findNext(to),[phrase(to,"next")]),no("prev",()=>findPrevious(to),[phrase(to,"previous")]),no("select",()=>selectMatches(to),[phrase(to,"all")]),crelt("label",null,[this.caseField,phrase(to,"match case")]),crelt("label",null,[this.reField,phrase(to,"regexp")]),crelt("label",null,[this.wordField,phrase(to,"by word")]),...to.state.readOnly?[]:[crelt("br"),this.replaceField,no("replace",()=>replaceNext(to),[phrase(to,"replace")]),no("replaceAll",()=>replaceAll(to),[phrase(to,"replace all")])],crelt("button",{name:"close",onclick:()=>closeSearchPanel(to),"aria-label":phrase(to,"close"),type:"button"},["×"])])}commit(){let to=new SearchQuery({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});to.eq(this.query)||(this.query=to,this.view.dispatch({effects:setSearchQuery.of(to)}))}keydown(to){runScopeHandlers(this.view,to,"search-panel")?to.preventDefault():to.keyCode==13&&to.target==this.searchField?(to.preventDefault(),(to.shiftKey?findPrevious:findNext)(this.view)):to.keyCode==13&&to.target==this.replaceField&&(to.preventDefault(),replaceNext(this.view))}update(to){for(let ro of to.transactions)for(let no of ro.effects)no.is(setSearchQuery)&&!no.value.eq(this.query)&&this.setQuery(no.value)}setQuery(to){this.query=to,this.searchField.value=to.search,this.replaceField.value=to.replace,this.caseField.checked=to.caseSensitive,this.reField.checked=to.regexp,this.wordField.checked=to.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(searchConfigFacet).top}}function phrase(eo,to){return eo.state.phrase(to)}const AnnounceMargin=30,Break=/[\s\.,:;?!]/;function announceMatch(eo,{from:to,to:ro}){let no=eo.state.doc.lineAt(to),oo=eo.state.doc.lineAt(ro).to,io=Math.max(no.from,to-AnnounceMargin),so=Math.min(oo,ro+AnnounceMargin),ao=eo.state.sliceDoc(io,so);if(io!=no.from){for(let lo=0;loao.length-AnnounceMargin;lo--)if(!Break.test(ao[lo-1])&&Break.test(ao[lo])){ao=ao.slice(0,lo);break}}return EditorView.announce.of(`${eo.state.phrase("current match")}. ${ao} ${eo.state.phrase("on line")} ${no.number}.`)}const baseTheme$2=EditorView.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),searchExtensions=[searchState,Prec.low(searchHighlighter),baseTheme$2];class SelectedDiagnostic{constructor(to,ro,no){this.from=to,this.to=ro,this.diagnostic=no}}class LintState{constructor(to,ro,no){this.diagnostics=to,this.panel=ro,this.selected=no}static init(to,ro,no){let oo=to,io=no.facet(lintConfig).markerFilter;io&&(oo=io(oo,no));let so=Decoration.set(oo.map(ao=>ao.from==ao.to||ao.from==ao.to-1&&no.doc.lineAt(ao.from).to==ao.from?Decoration.widget({widget:new DiagnosticWidget(ao),diagnostic:ao}).range(ao.from):Decoration.mark({attributes:{class:"cm-lintRange cm-lintRange-"+ao.severity+(ao.markClass?" "+ao.markClass:"")},diagnostic:ao,inclusive:!0}).range(ao.from,ao.to)),!0);return new LintState(so,ro,findDiagnostic(so))}}function findDiagnostic(eo,to=null,ro=0){let no=null;return eo.between(ro,1e9,(oo,io,{spec:so})=>{if(!(to&&so.diagnostic!=to))return no=new SelectedDiagnostic(oo,io,so.diagnostic),!1}),no}function hideTooltip(eo,to){let ro=eo.startState.doc.lineAt(to.pos);return!!(eo.effects.some(no=>no.is(setDiagnosticsEffect))||eo.changes.touchesRange(ro.from,ro.to))}function maybeEnableLint(eo,to){return eo.field(lintState,!1)?to:to.concat(StateEffect.appendConfig.of(lintExtensions))}const setDiagnosticsEffect=StateEffect.define(),togglePanel=StateEffect.define(),movePanelSelection=StateEffect.define(),lintState=StateField.define({create(){return new LintState(Decoration.none,null,null)},update(eo,to){if(to.docChanged){let ro=eo.diagnostics.map(to.changes),no=null;if(eo.selected){let oo=to.changes.mapPos(eo.selected.from,1);no=findDiagnostic(ro,eo.selected.diagnostic,oo)||findDiagnostic(ro,null,oo)}eo=new LintState(ro,eo.panel,no)}for(let ro of to.effects)ro.is(setDiagnosticsEffect)?eo=LintState.init(ro.value,eo.panel,to.state):ro.is(togglePanel)?eo=new LintState(eo.diagnostics,ro.value?LintPanel.open:null,eo.selected):ro.is(movePanelSelection)&&(eo=new LintState(eo.diagnostics,eo.panel,ro.value));return eo},provide:eo=>[showPanel.from(eo,to=>to.panel),EditorView.decorations.from(eo,to=>to.diagnostics)]}),activeMark=Decoration.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function lintTooltip(eo,to,ro){let{diagnostics:no}=eo.state.field(lintState),oo=[],io=2e8,so=0;no.between(to-(ro<0?1:0),to+(ro>0?1:0),(lo,uo,{spec:co})=>{to>=lo&&to<=uo&&(lo==uo||(to>lo||ro>0)&&(torenderDiagnostic(eo,ro,!1)))}const openLintPanel=eo=>{let to=eo.state.field(lintState,!1);(!to||!to.panel)&&eo.dispatch({effects:maybeEnableLint(eo.state,[togglePanel.of(!0)])});let ro=getPanel(eo,LintPanel.open);return ro&&ro.dom.querySelector(".cm-panel-lint ul").focus(),!0},closeLintPanel=eo=>{let to=eo.state.field(lintState,!1);return!to||!to.panel?!1:(eo.dispatch({effects:togglePanel.of(!1)}),!0)},nextDiagnostic=eo=>{let to=eo.state.field(lintState,!1);if(!to)return!1;let ro=eo.state.selection.main,no=to.diagnostics.iter(ro.to+1);return!no.value&&(no=to.diagnostics.iter(0),!no.value||no.from==ro.from&&no.to==ro.to)?!1:(eo.dispatch({selection:{anchor:no.from,head:no.to},scrollIntoView:!0}),!0)},lintKeymap=[{key:"Mod-Shift-m",run:openLintPanel,preventDefault:!0},{key:"F8",run:nextDiagnostic}],lintConfig=Facet.define({combine(eo){return Object.assign({sources:eo.map(to=>to.source).filter(to=>to!=null)},combineConfig(eo.map(to=>to.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(to,ro)=>to?ro?no=>to(no)||ro(no):to:ro}))}});function assignKeys(eo){let to=[];if(eo)e:for(let{name:ro}of eo){for(let no=0;noio.toLowerCase()==oo.toLowerCase())){to.push(oo);continue e}}to.push("")}return to}function renderDiagnostic(eo,to,ro){var no;let oo=ro?assignKeys(to.actions):[];return crelt("li",{class:"cm-diagnostic cm-diagnostic-"+to.severity},crelt("span",{class:"cm-diagnosticText"},to.renderMessage?to.renderMessage():to.message),(no=to.actions)===null||no===void 0?void 0:no.map((io,so)=>{let ao=!1,lo=ho=>{if(ho.preventDefault(),ao)return;ao=!0;let po=findDiagnostic(eo.state.field(lintState).diagnostics,to);po&&io.apply(eo,po.from,po.to)},{name:uo}=io,co=oo[so]?uo.indexOf(oo[so]):-1,fo=co<0?uo:[uo.slice(0,co),crelt("u",uo.slice(co,co+1)),uo.slice(co+1)];return crelt("button",{type:"button",class:"cm-diagnosticAction",onclick:lo,onmousedown:lo,"aria-label":` Action: ${uo}${co<0?"":` (access key "${oo[so]})"`}.`},fo)}),to.source&&crelt("div",{class:"cm-diagnosticSource"},to.source))}class DiagnosticWidget extends WidgetType{constructor(to){super(),this.diagnostic=to}eq(to){return to.diagnostic==this.diagnostic}toDOM(){return crelt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class PanelItem{constructor(to,ro){this.diagnostic=ro,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=renderDiagnostic(to,ro,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class LintPanel{constructor(to){this.view=to,this.items=[];let ro=oo=>{if(oo.keyCode==27)closeLintPanel(this.view),this.view.focus();else if(oo.keyCode==38||oo.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(oo.keyCode==40||oo.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(oo.keyCode==36)this.moveSelection(0);else if(oo.keyCode==35)this.moveSelection(this.items.length-1);else if(oo.keyCode==13)this.view.focus();else if(oo.keyCode>=65&&oo.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:io}=this.items[this.selectedIndex],so=assignKeys(io.actions);for(let ao=0;ao{for(let io=0;iocloseLintPanel(this.view)},"×")),this.update()}get selectedIndex(){let to=this.view.state.field(lintState).selected;if(!to)return-1;for(let ro=0;ro{let uo=-1,co;for(let fo=no;fono&&(this.items.splice(no,uo-no),oo=!0)),ro&&co.diagnostic==ro.diagnostic?co.dom.hasAttribute("aria-selected")||(co.dom.setAttribute("aria-selected","true"),io=co):co.dom.hasAttribute("aria-selected")&&co.dom.removeAttribute("aria-selected"),no++});no({sel:io.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:so,panel:ao})=>{let lo=ao.height/this.list.offsetHeight;so.topao.bottom&&(this.list.scrollTop+=(so.bottom-ao.bottom)/lo)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),oo&&this.sync()}sync(){let to=this.list.firstChild;function ro(){let no=to;to=no.nextSibling,no.remove()}for(let no of this.items)if(no.dom.parentNode==this.list){for(;to!=no.dom;)ro();to=no.dom.nextSibling}else this.list.insertBefore(no.dom,to);for(;to;)ro()}moveSelection(to){if(this.selectedIndex<0)return;let ro=this.view.state.field(lintState),no=findDiagnostic(ro.diagnostics,this.items[to].diagnostic);no&&this.view.dispatch({selection:{anchor:no.from,head:no.to},scrollIntoView:!0,effects:movePanelSelection.of(no)})}static open(to){return new LintPanel(to)}}function svg(eo,to='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(eo)}')`}function underline(eo){return svg(``,'width="6" height="3"')}const baseTheme=EditorView.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:underline("#d11")},".cm-lintRange-warning":{backgroundImage:underline("orange")},".cm-lintRange-info":{backgroundImage:underline("#999")},".cm-lintRange-hint":{backgroundImage:underline("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),lintExtensions=[lintState,EditorView.decorations.compute([lintState],eo=>{let{selected:to,panel:ro}=eo.field(lintState);return!to||!ro||to.from==to.to?Decoration.none:Decoration.set([activeMark.range(to.from,to.to)])}),hoverTooltip(lintTooltip,{hideOn:hideTooltip}),baseTheme];var basicSetup=function eo(to){to===void 0&&(to={});var{crosshairCursor:ro=!1}=to,no=[];to.closeBracketsKeymap!==!1&&(no=no.concat(closeBracketsKeymap)),to.defaultKeymap!==!1&&(no=no.concat(defaultKeymap)),to.searchKeymap!==!1&&(no=no.concat(searchKeymap)),to.historyKeymap!==!1&&(no=no.concat(historyKeymap)),to.foldKeymap!==!1&&(no=no.concat(foldKeymap)),to.completionKeymap!==!1&&(no=no.concat(completionKeymap)),to.lintKeymap!==!1&&(no=no.concat(lintKeymap));var oo=[];return to.lineNumbers!==!1&&oo.push(lineNumbers()),to.highlightActiveLineGutter!==!1&&oo.push(highlightActiveLineGutter()),to.highlightSpecialChars!==!1&&oo.push(highlightSpecialChars()),to.history!==!1&&oo.push(history()),to.foldGutter!==!1&&oo.push(foldGutter()),to.drawSelection!==!1&&oo.push(drawSelection()),to.dropCursor!==!1&&oo.push(dropCursor()),to.allowMultipleSelections!==!1&&oo.push(EditorState.allowMultipleSelections.of(!0)),to.indentOnInput!==!1&&oo.push(indentOnInput()),to.syntaxHighlighting!==!1&&oo.push(syntaxHighlighting(defaultHighlightStyle,{fallback:!0})),to.bracketMatching!==!1&&oo.push(bracketMatching()),to.closeBrackets!==!1&&oo.push(closeBrackets()),to.autocompletion!==!1&&oo.push(autocompletion()),to.rectangularSelection!==!1&&oo.push(rectangularSelection()),ro!==!1&&oo.push(crosshairCursor()),to.highlightActiveLine!==!1&&oo.push(highlightActiveLine()),to.highlightSelectionMatches!==!1&&oo.push(highlightSelectionMatches()),to.tabSize&&typeof to.tabSize=="number"&&oo.push(indentUnit.of(" ".repeat(to.tabSize))),oo.concat([keymap.of(no.flat())]).filter(Boolean)};const chalky="#e5c07b",coral="#e06c75",cyan="#56b6c2",invalid="#ffffff",ivory="#abb2bf",stone="#7d8799",malibu="#61afef",sage="#98c379",whiskey="#d19a66",violet="#c678dd",darkBackground="#21252b",highlightBackground="#2c313a",background="#282c34",tooltipBackground="#353a42",selection="#3E4451",cursor="#528bff",oneDarkTheme=EditorView.theme({"&":{color:ivory,backgroundColor:background},".cm-content":{caretColor:cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:selection},".cm-panels":{backgroundColor:darkBackground,color:ivory},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:background,color:stone,border:"none"},".cm-activeLineGutter":{backgroundColor:highlightBackground},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:tooltipBackground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:tooltipBackground,borderBottomColor:tooltipBackground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:highlightBackground,color:ivory}}},{dark:!0}),oneDarkHighlightStyle=HighlightStyle.define([{tag:tags.keyword,color:violet},{tag:[tags.name,tags.deleted,tags.character,tags.propertyName,tags.macroName],color:coral},{tag:[tags.function(tags.variableName),tags.labelName],color:malibu},{tag:[tags.color,tags.constant(tags.name),tags.standard(tags.name)],color:whiskey},{tag:[tags.definition(tags.name),tags.separator],color:ivory},{tag:[tags.typeName,tags.className,tags.number,tags.changed,tags.annotation,tags.modifier,tags.self,tags.namespace],color:chalky},{tag:[tags.operator,tags.operatorKeyword,tags.url,tags.escape,tags.regexp,tags.link,tags.special(tags.string)],color:cyan},{tag:[tags.meta,tags.comment],color:stone},{tag:tags.strong,fontWeight:"bold"},{tag:tags.emphasis,fontStyle:"italic"},{tag:tags.strikethrough,textDecoration:"line-through"},{tag:tags.link,color:stone,textDecoration:"underline"},{tag:tags.heading,fontWeight:"bold",color:coral},{tag:[tags.atom,tags.bool,tags.special(tags.variableName)],color:whiskey},{tag:[tags.processingInstruction,tags.string,tags.inserted],color:sage},{tag:tags.invalid,color:invalid}]),oneDark=[oneDarkTheme,syntaxHighlighting(oneDarkHighlightStyle)];var defaultLightThemeOption=EditorView.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),getDefaultExtensions=function eo(to){to===void 0&&(to={});var{indentWithTab:ro=!0,editable:no=!0,readOnly:oo=!1,theme:io="light",placeholder:so="",basicSetup:ao=!0}=to,lo=[];switch(ro&&lo.unshift(keymap.of([indentWithTab])),ao&&(typeof ao=="boolean"?lo.unshift(basicSetup()):lo.unshift(basicSetup(ao))),so&&lo.unshift(placeholder(so)),io){case"light":lo.push(defaultLightThemeOption);break;case"dark":lo.push(oneDark);break;case"none":break;default:lo.push(io);break}return no===!1&&lo.push(EditorView.editable.of(!1)),oo&&lo.push(EditorState.readOnly.of(!0)),[...lo]},getStatistics=eo=>({line:eo.state.doc.lineAt(eo.state.selection.main.from),lineCount:eo.state.doc.lines,lineBreak:eo.state.lineBreak,length:eo.state.doc.length,readOnly:eo.state.readOnly,tabSize:eo.state.tabSize,selection:eo.state.selection,selectionAsSingle:eo.state.selection.asSingle().main,ranges:eo.state.selection.ranges,selectionCode:eo.state.sliceDoc(eo.state.selection.main.from,eo.state.selection.main.to),selections:eo.state.selection.ranges.map(to=>eo.state.sliceDoc(to.from,to.to)),selectedText:eo.state.selection.ranges.some(to=>!to.empty)}),External=Annotation.define(),emptyExtensions=[];function useCodeMirror(eo){var{value:to,selection:ro,onChange:no,onStatistics:oo,onCreateEditor:io,onUpdate:so,extensions:ao=emptyExtensions,autoFocus:lo,theme:uo="light",height:co=null,minHeight:fo=null,maxHeight:ho=null,width:po=null,minWidth:go=null,maxWidth:vo=null,placeholder:bo="",editable:xo=!0,readOnly:_o=!1,indentWithTab:Eo=!0,basicSetup:So=!0,root:To,initialState:wo}=eo,[Co,Oo]=reactExports.useState(),[Ao,Ro]=reactExports.useState(),[No,Mo]=reactExports.useState(),Do=EditorView.theme({"&":{height:co,minHeight:fo,maxHeight:ho,width:po,minWidth:go,maxWidth:vo},"& .cm-scroller":{height:"100% !important"}}),jo=EditorView.updateListener.of(Lo=>{if(Lo.docChanged&&typeof no=="function"&&!Lo.transactions.some(Uo=>Uo.annotation(External))){var Ho=Lo.state.doc,qo=Ho.toString();no(qo,Lo)}oo&&oo(getStatistics(Lo))}),Fo=getDefaultExtensions({theme:uo,editable:xo,readOnly:_o,placeholder:bo,indentWithTab:Eo,basicSetup:So}),$o=[jo,Do,...Fo];return so&&typeof so=="function"&&$o.push(EditorView.updateListener.of(so)),$o=$o.concat(ao),reactExports.useEffect(()=>{if(Co&&!No){var Lo={doc:to,selection:ro,extensions:$o},Ho=wo?EditorState.fromJSON(wo.json,Lo,wo.fields):EditorState.create(Lo);if(Mo(Ho),!Ao){var qo=new EditorView({state:Ho,parent:Co,root:To});Ro(qo),io&&io(qo,Ho)}}return()=>{Ao&&(Mo(void 0),Ro(void 0))}},[Co,No]),reactExports.useEffect(()=>Oo(eo.container),[eo.container]),reactExports.useEffect(()=>()=>{Ao&&(Ao.destroy(),Ro(void 0))},[Ao]),reactExports.useEffect(()=>{lo&&Ao&&Ao.focus()},[lo,Ao]),reactExports.useEffect(()=>{Ao&&Ao.dispatch({effects:StateEffect.reconfigure.of($o)})},[uo,ao,co,fo,ho,po,go,vo,bo,xo,_o,Eo,So,no,so]),reactExports.useEffect(()=>{if(to!==void 0){var Lo=Ao?Ao.state.doc.toString():"";Ao&&to!==Lo&&Ao.dispatch({changes:{from:0,to:Lo.length,insert:to||""},annotations:[External.of(!0)]})}},[to,Ao]),{state:No,setState:Mo,view:Ao,setView:Ro,container:Co,setContainer:Oo}}var _excluded=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],ReactCodeMirror=reactExports.forwardRef((eo,to)=>{var{className:ro,value:no="",selection:oo,extensions:io=[],onChange:so,onStatistics:ao,onCreateEditor:lo,onUpdate:uo,autoFocus:co,theme:fo="light",height:ho,minHeight:po,maxHeight:go,width:vo,minWidth:bo,maxWidth:xo,basicSetup:_o,placeholder:Eo,indentWithTab:So,editable:To,readOnly:wo,root:Co,initialState:Oo}=eo,Ao=_objectWithoutPropertiesLoose(eo,_excluded),Ro=reactExports.useRef(null),{state:No,view:Mo,container:Do}=useCodeMirror({container:Ro.current,root:Co,value:no,autoFocus:co,theme:fo,height:ho,minHeight:po,maxHeight:go,width:vo,minWidth:bo,maxWidth:xo,basicSetup:_o,placeholder:Eo,indentWithTab:So,editable:To,readOnly:wo,selection:oo,onChange:so,onStatistics:ao,onCreateEditor:lo,onUpdate:uo,extensions:io,initialState:Oo});if(reactExports.useImperativeHandle(to,()=>({editor:Ro.current,state:No,view:Mo}),[Ro,Do,No,Mo]),typeof no!="string")throw new Error("value must be typeof string but got "+typeof no);var jo=typeof fo=="string"?"cm-theme-"+fo:"cm-theme";return jsxRuntimeExports.jsx("div",_extends({ref:Ro,className:""+jo+(ro?" "+ro:"")},Ao))});ReactCodeMirror.displayName="CodeMirror";const TraceFilterInput=({hash:eo,setHash:to})=>{const ro=useClasses$7(),oo=useIsDark()?vscodeDark:void 0,io="filter condition (UI ONLY! NOT implement yet)",[so,ao]=reactExports.useState(eo.filter??""),lo=reactExports.useDeferredValue(so);reactExports.useEffect(()=>{to({filter:lo})},[lo]);const uo=fo=>{so.length>0?ao(`${so} and ${fo}`):ao(fo)},co=so!=="";return jsxRuntimeExports.jsx("div",{className:ro.wrapper,children:jsxRuntimeExports.jsxs("div",{className:ro.field,children:[jsxRuntimeExports.jsx(Search20Regular,{className:ro.searchIcon}),jsxRuntimeExports.jsx(ReactCodeMirror,{basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,defaultKeymap:!1},className:ro.input,height:"36px",width:"100%",value:so,onChange:ao,editable:!0,placeholder:io,extensions,theme:oo}),jsxRuntimeExports.jsx(DismissCircle20Regular,{className:ro.dismissIcon,style:{visibility:co?"visible":"hidden"},onClick:()=>ao("")}),jsxRuntimeExports.jsx(Divider$2,{vertical:!0,className:ro.divider}),jsxRuntimeExports.jsxs(Popover,{positioning:"below-end",withArrow:!0,children:[jsxRuntimeExports.jsx(PopoverTrigger,{disableButtonEnhancement:!0,children:jsxRuntimeExports.jsx(AddCircle20Regular,{className:ro.addIcon})}),jsxRuntimeExports.jsx(PopoverSurface,{tabIndex:-1,children:jsxRuntimeExports.jsx(FilterConditions,{onAddCondition:uo})})]})]})})};function FilterConditions(eo){const{onAddCondition:to}=eo,ro=useClasses$7();return jsxRuntimeExports.jsxs("div",{className:ro.conditionsWrapper,children:[jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by span_type",initialSnippet:"span_type == 'LLM'",onAddFilterConditionSnippet:to},"span_type"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by total_token",initialSnippet:"total_token > 1000",onAddFilterConditionSnippet:to},"total_token"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by user_metrics",initialSnippet:"user_metrics['Hallucination'].label == 'hallucinated'",onAddFilterConditionSnippet:to},"user_metrics"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by evaluation score",initialSnippet:"user_metrics['Hallucination'].score < 1",onAddFilterConditionSnippet:to},"eval_score"),jsxRuntimeExports.jsx(FilterConditionRow,{label:"filter by start_time",initialSnippet:'start_time > "2024/03/12 22:38:35"',onAddFilterConditionSnippet:to},"start_time")]})}function FilterConditionRow(eo){const{initialSnippet:to,onAddFilterConditionSnippet:ro}=eo,[no,oo]=reactExports.useState(to),io=useClasses$7(),ao=useIsDark()?vscodeDark:void 0;return jsxRuntimeExports.jsxs("div",{className:io.conditionWrapper,children:[jsxRuntimeExports.jsx(Text$2,{size:300,weight:"semibold",children:eo.label}),jsxRuntimeExports.jsxs("div",{className:io.conditionRow,children:[jsxRuntimeExports.jsx("div",{className:io.conditionField,children:jsxRuntimeExports.jsx(ReactCodeMirror,{value:no,basicSetup:{lineNumbers:!1,foldGutter:!1,bracketMatching:!0,syntaxHighlighting:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1},className:io.conditionInput,editable:!0,extensions:[python()],onChange:oo,theme:ao})}),jsxRuntimeExports.jsx(Button$2,{title:"Add to filter condition",onClick:()=>ro(no),icon:jsxRuntimeExports.jsx(AddCircle20Regular,{}),size:"large"})]})]})}const extensions=[keymap.of([{key:"Enter",run:eo=>!0}]),python(),autocompletion({override:[filterConditionCompletions]})];function filterConditionCompletions(eo){const to=eo.matchBefore(/\w*/);return!to||to.from===to.to&&!eo.explicit?null:{from:to.from,options:[{label:"span_type",type:"variable",info:"The span_type variant: CHAIN, LLM, RETRIEVER, TOOL, etc."},{label:"total_token",type:"variable",info:"The total_token: total number of tokens."},{label:"start_time",type:"variable",info:"The start_time: start time of the span."}]}}const useClasses$7=makeStyles({wrapper:{width:"calc(100% - 280px)"},field:{display:"flex",alignItems:"center",...shorthands.flex(1),...shorthands.padding("1px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1),...shorthands.borderRadius("4px")},searchIcon:{...shorthands.margin("0","8px")},dismissIcon:{cursor:"pointer"},addIcon:{marginRight:"8px",cursor:"pointer"},input:{width:"100%",overflowX:"auto",backgroundColor:"red","& .cm-focused":{outlineStyle:"none"},"& .cm-content":{...shorthands.padding("8px",0)}},divider:{...shorthands.flex("none"),...shorthands.padding(0,"8px")},conditionsWrapper:{display:"flex",flexDirection:"column",width:"500px",...shorthands.gap("20px"),...shorthands.padding("4px")},conditionWrapper:{display:"flex",flexDirection:"column"},conditionField:{display:"flex",alignItems:"center",...shorthands.flex(1),...shorthands.padding("1px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1),...shorthands.borderRadius("4px")},conditionRow:{display:"flex",alignItems:"center",marginTop:"4px",...shorthands.gap("8px")},conditionInput:{...shorthands.flex(1),"& .cm-focused":{outlineStyle:"none"},"& .cm-content":{...shorthands.padding("8px",0)}}}),TraceFilter=({hash:eo,setHash:to})=>{const ro=useClasses$6(),no=useTableColumnNames(),[oo,io]=[useTableHiddenColumnKeys(),useSetTableHiddenColumnKeys()],so=useTraceListShowMetrics(),ao=reactExports.useMemo(()=>[...no.normalColumns,...no.evaluationColumns].filter(co=>!oo.includes(co.key)).map(co=>co.key),[oo,no]),lo=(uo,co)=>{const{optionValue:fo}=co;fo&&io(oo.includes(fo)?oo.filter(ho=>ho!==fo):[...oo,fo])};return jsxRuntimeExports.jsxs("div",{className:ro.wrapper,children:[eo&&to?jsxRuntimeExports.jsx(TraceFilterInput,{hash:eo,setHash:to}):jsxRuntimeExports.jsx(Input,{className:ro.filter,disabled:!0,placeholder:"NOT implement yet"}),jsxRuntimeExports.jsx(Combobox,{multiselect:!0,placeholder:"Columns Filter",selectedOptions:ao,onOptionSelect:lo,children:jsxRuntimeExports.jsxs("div",{className:ro.popUp,children:[jsxRuntimeExports.jsx(OptionGroup,{label:"Trace Info",children:no.normalColumns.map(uo=>jsxRuntimeExports.jsx(Option$3,{value:uo.key,children:uo.name},uo.key))}),so&&jsxRuntimeExports.jsx(OptionGroup,{label:"Metrics",children:no.evaluationColumns.map(uo=>jsxRuntimeExports.jsx(Option$3,{value:uo.key,text:"123"+uo.name,children:jsxRuntimeExports.jsx(Tooltip,{relationship:"label",content:uo.name,children:jsxRuntimeExports.jsx("span",{className:ro.optionText,children:uo.name})})},uo.key))})]})})]})},useClasses$6=makeStyles({wrapper:{display:"flex",width:"100%",...shorthands.gap("1rem"),...shorthands.margin(tokens.spacingVerticalM)},filter:{flexGrow:1},popUp:{overflowX:"hidden"},optionText:{display:"block",width:"90%",...shorthands.overflow("hidden"),textOverflow:"ellipsis",whiteSpace:"nowrap"}}),useDebugFunctions=()=>{const eo=useGetAllTraces(),to=useGetAllSpans(),ro=useSelectedTrace(),no=useSpansOfSelectedTrace();reactExports.useEffect(()=>{window.printTracesAndSpans=()=>{const oo=eo();console.log("traces",oo);const io=to();console.log("spans",io)},window.printSelectedTrace=()=>{console.log("selectedTrace",ro)},window.printSpansOfSelectedTrace=()=>{console.log("spansOfSelectedTrace",no)}},[eo,to,ro,no])},useOnClickTraceRow=()=>{const eo=useSetSelectedTraceId();return reactExports.useCallback((to,ro)=>{eo(to==null?void 0:to.trace_id)},[eo])};function useResolvedElement(eo,to){var ro=reactExports.useRef(null),no=reactExports.useRef(null);no.current=to;var oo=reactExports.useRef(null);reactExports.useEffect(function(){io()});var io=reactExports.useCallback(function(){var so=oo.current,ao=no.current,lo=so||(ao?ao instanceof Element?ao:ao.current:null);ro.current&&ro.current.element===lo&&ro.current.subscriber===eo||(ro.current&&ro.current.cleanup&&ro.current.cleanup(),ro.current={element:lo,subscriber:eo,cleanup:lo?eo(lo):void 0})},[eo]);return reactExports.useEffect(function(){return function(){ro.current&&ro.current.cleanup&&(ro.current.cleanup(),ro.current=null)}},[]),reactExports.useCallback(function(so){oo.current=so,io()},[io])}function extractSize(eo,to,ro){return eo[to]?eo[to][0]?eo[to][0][ro]:eo[to][ro]:to==="contentBoxSize"?eo.contentRect[ro==="inlineSize"?"width":"height"]:void 0}function useResizeObserver(eo){eo===void 0&&(eo={});var to=eo.onResize,ro=reactExports.useRef(void 0);ro.current=to;var no=eo.round||Math.round,oo=reactExports.useRef(),io=reactExports.useState({width:void 0,height:void 0}),so=io[0],ao=io[1],lo=reactExports.useRef(!1);reactExports.useEffect(function(){return lo.current=!1,function(){lo.current=!0}},[]);var uo=reactExports.useRef({width:void 0,height:void 0}),co=useResolvedElement(reactExports.useCallback(function(fo){return(!oo.current||oo.current.box!==eo.box||oo.current.round!==no)&&(oo.current={box:eo.box,round:no,instance:new ResizeObserver(function(ho){var po=ho[0],go=eo.box==="border-box"?"borderBoxSize":eo.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",vo=extractSize(po,go,"inlineSize"),bo=extractSize(po,go,"blockSize"),xo=vo?no(vo):void 0,_o=bo?no(bo):void 0;if(uo.current.width!==xo||uo.current.height!==_o){var Eo={width:xo,height:_o};uo.current.width=xo,uo.current.height=_o,ro.current?ro.current(Eo):lo.current||ao(Eo)}})}),oo.current.instance.observe(fo,{box:eo.box}),function(){oo.current&&oo.current.instance.unobserve(fo)}},[eo.box,no]),eo.ref);return reactExports.useMemo(function(){return{ref:co,width:so.width,height:so.height}},[co,so.width,so.height])}const genStatusChecker=eo=>to=>to===void 0?!1:to.toLowerCase()===eo.toLowerCase(),checkStatus=(eo,to)=>eo===void 0?!1:eo.toLowerCase()===to.toLowerCase(),useTraceListRows=()=>{const eo=useTraces();return reactExports.useMemo(()=>eo.map(to=>convertToTraceListRow(to)),[eo])},BASIC_WIDTH=200,getColumnChildrenCount=eo=>eo.children?eo==null?void 0:eo.children.reduce((to,ro)=>to+getColumnChildrenCount(ro),0):eo.minWidth??BASIC_WIDTH,useTraceListColumns=()=>{const{ref:eo,width:to}=useResizeObserver(),ro=useClasses$5(),no=useTraceListRows(),oo=useOnClickTraceRow(),io=useSetTableColumnNames(),so=useTableHiddenColumnKeys(),ao=useLocStrings(),lo=useTraceListColumnModifier(),uo=useSortableColumns(),co=reactExports.useMemo(()=>genStatusChecker("running"),[]),[fo,ho]=React.useState([]);return reactExports.useEffect(()=>{const po=[{key:"kind",name:ao.Kind,minWidth:120,maxWidth:200,renderCell:({row:Ao})=>co(Ao.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(KindText,{kind:Ao.kind})},{key:"name",name:ao.Name,minWidth:150,maxWidth:300,renderCell:({row:Ao})=>co(Ao.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(Tooltip,{content:Ao.name??"",relationship:"label",children:jsxRuntimeExports.jsx("span",{className:ro.nameCell,title:Ao.name,onClick:()=>{oo(Ao,"name")},children:Ao.name})})},{key:"input",name:ao.Input,minWidth:300,renderCell:({row:Ao})=>co(Ao.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TraceListJsonCell,{jsonObject:Ao.inputs})},{key:"output",name:ao.Output,minWidth:300,renderCell:({row:Ao})=>co(Ao.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TraceListJsonCell,{jsonObject:Ao.outputs})},{key:"start_time",name:ao.Start_time,minWidth:150,maxWidth:300,renderCell:({row:Ao})=>jsxRuntimeExports.jsx(TextCellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:Ao.start_time})})},{key:"end_time",name:ao.End_time,minWidth:150,maxWidth:300,renderCell:({row:Ao})=>co(Ao.status)?jsxRuntimeExports.jsx(CellSkeleton,{height:40}):jsxRuntimeExports.jsx(TextCellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:Ao.end_time})})},{key:"latency",name:ao.Latency,minWidth:120,renderCell:({row:Ao})=>co(Ao.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:Ao.start_time,endTimeISOString:Ao.end_time})})},{key:"total_tokens",name:ao.Total_tokens,minWidth:120,renderCell:({row:Ao})=>co(Ao.status)?jsxRuntimeExports.jsx(CellSkeleton,{}):jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(SummaryToken,{trace:Ao})})},{key:"status",name:ao.Status,minWidth:120,renderCell:({row:Ao})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(StatusText,{statusCode:Ao.status})})}],go=[];no.forEach(Ao=>{Object.entries(Ao.evaluations??{}).forEach(([Ro])=>{!go.includes(Ro)&&Ro&&go.push(Ro)})});const vo=go.map(Ao=>{const Ro=[],No=[];return no.forEach(Mo=>{var Fo;const Do=(Fo=Mo.evaluations)==null?void 0:Fo[Ao];if(!Do||!Do.outputs)return;const jo=Do.outputs;Object.keys(jo).forEach($o=>{const Lo=jo[$o];!Ro.includes($o)&&Lo!==null&&(Ro.push($o),No.push({key:`evaluation-${Ao}-${$o}-value`,name:$o,renderCell:({row:Ho})=>{var Yo,Zo,_s;if(co(Ho.status))return jsxRuntimeExports.jsx(CellSkeleton,{});let qo;const Uo=(_s=(Zo=(Yo=Ho==null?void 0:Ho.evaluations)==null?void 0:Yo[Ao])==null?void 0:Zo.outputs)==null?void 0:_s[$o];return Uo===void 0?qo="N/A":typeof Uo=="number"?qo=formatNumber$1(Uo):qo=`${Uo}`,qo}}))})}),{name:Ao,key:`evaluation-${Ao}`,children:No}});let bo=[...po,{key:"evaluations",name:"Metrics",minWidth:450,children:vo}];bo=lo?lo(bo,no):bo;const xo=bo.filter(Ao=>Ao.key!=="evaluations"),_o=bo.find(Ao=>Ao.key==="evaluations");io({normalColumns:xo.map(Ao=>({name:Ao.name,key:Ao.key})).filter(Ao=>!UN_FILTERABLE_COLUMNS.includes(Ao.name)),evaluationColumns:_o.children.map(Ao=>({name:Ao.name,key:Ao.key}))});const Eo=xo.filter(Ao=>!so.includes(Ao.key)),So={..._o,children:_o.children.filter(Ao=>!so.includes(Ao.key))},To=[...Eo,So],wo=bo.reduce((Ao,Ro)=>Ao+getColumnChildrenCount(Ro),0),Co=Ao=>{if(Ao.children)return{...Ao,children:Ao.children.map(Co)};const Ro=Ao.minWidth??BASIC_WIDTH,No=to?(to-24)/wo*Ro:200;return{...Ao,width:No,minWidth:No}},Oo=To.map(Co).map(Ao=>{const Ro=Ao.key;return Ro?{...Ao,key:Ao.key,sortable:!!(Ro&&uo.includes(Ro))}:Ao});ho(Oo)},[no,oo,ro.nameCell,lo,so,ao,io,uo,to,co]),{columns:fo,ref:eo}},useClasses$5=makeStyles({typeBadge:{...shorthands.padding(tokens.spacingVerticalXXS,tokens.spacingHorizontalS)},latencyWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"center","> svg":{marginRight:"5px"}},nameCell:{color:tokens.colorBrandForeground1,fontWeight:tokens.fontWeightSemibold,":hover":{...shorthands.textDecoration("underline")}}}),UN_FILTERABLE_COLUMNS=["Kind","Name"];function TraceList({onRowClick:eo,className:to}){const ro=useClasses$4(),no=useTraceListRows(),{columns:oo,ref:io}=useTraceListColumns(),so=useTraceListViewStatus(),ao=useTraceListLoadingComponent(),lo=useTraceListErrorComponent(),uo=useIsDark();useDebugFunctions();const co=useSortColumn(),fo=useSetSortColumn(),ho=co?[co]:[],po=useOnClickTraceRow(),go=reactExports.useCallback(vo=>{const{row:bo,column:xo}=vo;po(bo,xo.key),eo==null||eo(bo)},[po,eo]);return so===ViewStatus.error?jsxRuntimeExports.jsx(lo,{}):so===ViewStatus.loading?jsxRuntimeExports.jsx(ao,{}):jsxRuntimeExports.jsx("div",{ref:io,className:ro.root,children:jsxRuntimeExports.jsx(DataGrid$1$1,{className:`${ro.grid} ${to??""} ${uo?"rdg-dark":"rdg-light"}`,renderers:{noRowsFallback:jsxRuntimeExports.jsxs("div",{style:{textAlign:"center",gridColumn:"1/-1",display:"flex",alignItems:"center",justifyContent:"center"},children:[jsxRuntimeExports.jsx(TextBulletListSquareWarning24Regular,{}),jsxRuntimeExports.jsx(Text$2,{style:{paddingLeft:"1rem"},children:"No traces found."})]})},rowClass:()=>ro.row,columns:oo,rows:no,headerRowHeight:26,rowHeight:80,onCellClick:go,defaultColumnOptions:{resizable:!0},sortColumns:ho,onSortColumnsChange:vo=>{var bo;fo((bo=vo.slice(-1))==null?void 0:bo[0])}})})}const useClasses$4=makeStyles({root:{display:"flex",flexDirection:"column",flexGrow:1},grid:{},row:{cursor:"pointer"}}),DefaultDetailContainer=({isOpen:eo,setIsOpen:to,header:ro=null,content:no})=>jsxRuntimeExports.jsxs(OverlayDrawer,{position:"end",style:{width:"calc(100% - 48px)"},open:eo,onOpenChange:(oo,io)=>to(io.open),children:[ro,jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"calc(100vh - 40px)"},children:no})]});makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},divider:{flexGrow:0,...shorthands.margin("16px",0)},grid:{flexGrow:1}});makeStyles({wrapper:{display:"flex",flexDirection:"column",justifyContent:"space-between",...shorthands.flex(0,0,"auto")},horizontal:{flexDirection:"row",alignItems:"center",...shorthands.flex(0,0,"auto")},title:{color:tokens.colorNeutralForeground2,marginBottom:tokens.spacingVerticalXS},data:{color:tokens.colorNeutralForeground1},tagsWrapper:{display:"flex",flexDirection:"row",...shorthands.gap("0.5rem")},tagsWrapperHorizontal:{flexDirection:"column"},timeWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"center","> svg":{marginRight:"5px"}},scoreWrapper:{display:"flex",flexDirection:"row",alignItems:"center","> :first-child":{marginRight:"8px"}}});const defaultLocStrings=new Proxy({},{get:(eo,to)=>to.replace(/_/g," ")}),RegistryWrapper=createRegistry({name:"TraceView"}),Provider=({isDark:eo=!1,viewModel:to,children:ro,locStrings:no=defaultLocStrings,TraceListLoading:oo,TraceListError:io,TraceDetailLoading:so,TraceDetailError:ao})=>{const lo=React.useCallback(uo=>{uo.register(TraceViewModelToken,{useValue:to}),oo&&uo.register(traceListLoadingInjectionToken,{useValue:oo}),io&&uo.register(traceListErrorInjectionToken,{useValue:io}),so&&uo.register(traceDetailLoadingInjectionToken,{useValue:so}),ao&&uo.register(traceDetailErrorInjectionToken,{useValue:ao}),no&&uo.register(locStringsInjectionToken,{useValue:no})},[]);return jsxRuntimeExports.jsx(TraceViewThemeContext.Provider,{value:eo,children:jsxRuntimeExports.jsx(RegistryWrapper,{onInitialize:lo,children:ro})})},ThemeContext=reactExports.createContext({});ThemeContext.displayName="ThemeContext";const ThemeContextProvider=({children:eo})=>{const[to,ro]=reactExports.useState("light");return reactExports.useEffect(()=>{const no=window.matchMedia("(prefers-color-scheme: dark)");ro(no.matches?"dark":"light");const oo=io=>{ro(io.matches?"dark":"light")};return no.addEventListener("change",oo),()=>{no.removeEventListener("change",oo)}},[]),jsxRuntimeExports.jsx(ThemeContext.Provider,{value:{theme:to,setTheme:ro},children:eo})},token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(eo,to){try{return[decodeURIComponent(eo.join(""))]}catch{}if(eo.length===1)return eo;to=to||1;const ro=eo.slice(0,to),no=eo.slice(to);return Array.prototype.concat.call([],decodeComponents(ro),decodeComponents(no))}function decode$1(eo){try{return decodeURIComponent(eo)}catch{let to=eo.match(singleMatcher)||[];for(let ro=1;roeo==null,strictUriEncode=eo=>encodeURIComponent(eo).replaceAll(/[!'()*]/g,to=>`%${to.charCodeAt(0).toString(16).toUpperCase()}`),encodeFragmentIdentifier=Symbol("encodeFragmentIdentifier");function encoderForArrayFormat(eo){switch(eo.arrayFormat){case"index":return to=>(ro,no)=>{const oo=ro.length;return no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),"[",oo,"]"].join("")]:[...ro,[encode(to,eo),"[",encode(oo,eo),"]=",encode(no,eo)].join("")]};case"bracket":return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),"[]"].join("")]:[...ro,[encode(to,eo),"[]=",encode(no,eo)].join("")];case"colon-list-separator":return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,[encode(to,eo),":list="].join("")]:[...ro,[encode(to,eo),":list=",encode(no,eo)].join("")];case"comma":case"separator":case"bracket-separator":{const to=eo.arrayFormat==="bracket-separator"?"[]=":"=";return ro=>(no,oo)=>oo===void 0||eo.skipNull&&oo===null||eo.skipEmptyString&&oo===""?no:(oo=oo===null?"":oo,no.length===0?[[encode(ro,eo),to,encode(oo,eo)].join("")]:[[no,encode(oo,eo)].join(eo.arrayFormatSeparator)])}default:return to=>(ro,no)=>no===void 0||eo.skipNull&&no===null||eo.skipEmptyString&&no===""?ro:no===null?[...ro,encode(to,eo)]:[...ro,[encode(to,eo),"=",encode(no,eo)].join("")]}}function parserForArrayFormat(eo){let to;switch(eo.arrayFormat){case"index":return(ro,no,oo)=>{if(to=/\[(\d*)]$/.exec(ro),ro=ro.replace(/\[\d*]$/,""),!to){oo[ro]=no;return}oo[ro]===void 0&&(oo[ro]={}),oo[ro][to[1]]=no};case"bracket":return(ro,no,oo)=>{if(to=/(\[])$/.exec(ro),ro=ro.replace(/\[]$/,""),!to){oo[ro]=no;return}if(oo[ro]===void 0){oo[ro]=[no];return}oo[ro]=[...oo[ro],no]};case"colon-list-separator":return(ro,no,oo)=>{if(to=/(:list)$/.exec(ro),ro=ro.replace(/:list$/,""),!to){oo[ro]=no;return}if(oo[ro]===void 0){oo[ro]=[no];return}oo[ro]=[...oo[ro],no]};case"comma":case"separator":return(ro,no,oo)=>{const io=typeof no=="string"&&no.includes(eo.arrayFormatSeparator),so=typeof no=="string"&&!io&&decode(no,eo).includes(eo.arrayFormatSeparator);no=so?decode(no,eo):no;const ao=io||so?no.split(eo.arrayFormatSeparator).map(lo=>decode(lo,eo)):no===null?no:decode(no,eo);oo[ro]=ao};case"bracket-separator":return(ro,no,oo)=>{const io=/(\[])$/.test(ro);if(ro=ro.replace(/\[]$/,""),!io){oo[ro]=no&&decode(no,eo);return}const so=no===null?[]:no.split(eo.arrayFormatSeparator).map(ao=>decode(ao,eo));if(oo[ro]===void 0){oo[ro]=so;return}oo[ro]=[...oo[ro],...so]};default:return(ro,no,oo)=>{if(oo[ro]===void 0){oo[ro]=no;return}oo[ro]=[...[oo[ro]].flat(),no]}}}function validateArrayFormatSeparator(eo){if(typeof eo!="string"||eo.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function encode(eo,to){return to.encode?to.strict?strictUriEncode(eo):encodeURIComponent(eo):eo}function decode(eo,to){return to.decode?decodeUriComponent(eo):eo}function keysSorter(eo){return Array.isArray(eo)?eo.sort():typeof eo=="object"?keysSorter(Object.keys(eo)).sort((to,ro)=>Number(to)-Number(ro)).map(to=>eo[to]):eo}function removeHash(eo){const to=eo.indexOf("#");return to!==-1&&(eo=eo.slice(0,to)),eo}function getHash(eo){let to="";const ro=eo.indexOf("#");return ro!==-1&&(to=eo.slice(ro)),to}function parseValue(eo,to){return to.parseNumbers&&!Number.isNaN(Number(eo))&&typeof eo=="string"&&eo.trim()!==""?eo=Number(eo):to.parseBooleans&&eo!==null&&(eo.toLowerCase()==="true"||eo.toLowerCase()==="false")&&(eo=eo.toLowerCase()==="true"),eo}function extract(eo){eo=removeHash(eo);const to=eo.indexOf("?");return to===-1?"":eo.slice(to+1)}function parse(eo,to){to={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...to},validateArrayFormatSeparator(to.arrayFormatSeparator);const ro=parserForArrayFormat(to),no=Object.create(null);if(typeof eo!="string"||(eo=eo.trim().replace(/^[?#&]/,""),!eo))return no;for(const oo of eo.split("&")){if(oo==="")continue;const io=to.decode?oo.replaceAll("+"," "):oo;let[so,ao]=splitOnFirst(io,"=");so===void 0&&(so=io),ao=ao===void 0?null:["comma","separator","bracket-separator"].includes(to.arrayFormat)?ao:decode(ao,to),ro(decode(so,to),ao,no)}for(const[oo,io]of Object.entries(no))if(typeof io=="object"&&io!==null)for(const[so,ao]of Object.entries(io))io[so]=parseValue(ao,to);else no[oo]=parseValue(io,to);return to.sort===!1?no:(to.sort===!0?Object.keys(no).sort():Object.keys(no).sort(to.sort)).reduce((oo,io)=>{const so=no[io];return oo[io]=so&&typeof so=="object"&&!Array.isArray(so)?keysSorter(so):so,oo},Object.create(null))}function stringify(eo,to){if(!eo)return"";to={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...to},validateArrayFormatSeparator(to.arrayFormatSeparator);const ro=so=>to.skipNull&&isNullOrUndefined(eo[so])||to.skipEmptyString&&eo[so]==="",no=encoderForArrayFormat(to),oo={};for(const[so,ao]of Object.entries(eo))ro(so)||(oo[so]=ao);const io=Object.keys(oo);return to.sort!==!1&&io.sort(to.sort),io.map(so=>{const ao=eo[so];return ao===void 0?"":ao===null?encode(so,to):Array.isArray(ao)?ao.length===0&&to.arrayFormat==="bracket-separator"?encode(so,to)+"[]":ao.reduce(no(so),[]).join("&"):encode(so,to)+"="+encode(ao,to)}).filter(so=>so.length>0).join("&")}function parseUrl(eo,to){var oo;to={decode:!0,...to};let[ro,no]=splitOnFirst(eo,"#");return ro===void 0&&(ro=eo),{url:((oo=ro==null?void 0:ro.split("?"))==null?void 0:oo[0])??"",query:parse(extract(eo),to),...to&&to.parseFragmentIdentifier&&no?{fragmentIdentifier:decode(no,to)}:{}}}function stringifyUrl(eo,to){to={encode:!0,strict:!0,[encodeFragmentIdentifier]:!0,...to};const ro=removeHash(eo.url).split("?")[0]||"",no=extract(eo.url),oo={...parse(no,{sort:!1}),...eo.query};let io=stringify(oo,to);io&&(io=`?${io}`);let so=getHash(eo.url);if(typeof eo.fragmentIdentifier=="string"){const ao=new URL(ro);ao.hash=eo.fragmentIdentifier,so=to[encodeFragmentIdentifier]?ao.hash:`#${eo.fragmentIdentifier}`}return`${ro}${io}${so}`}function pick(eo,to,ro){ro={parseFragmentIdentifier:!0,[encodeFragmentIdentifier]:!1,...ro};const{url:no,query:oo,fragmentIdentifier:io}=parseUrl(eo,ro);return stringifyUrl({url:no,query:includeKeys(oo,to),fragmentIdentifier:io},ro)}function exclude(eo,to,ro){const no=Array.isArray(to)?oo=>!to.includes(oo):(oo,io)=>!to(oo,io);return pick(eo,no,ro)}const queryString=Object.freeze(Object.defineProperty({__proto__:null,exclude,extract,parse,parseUrl,pick,stringify,stringifyUrl},Symbol.toStringTag,{value:"Module"}));function useHashObject(){const[eo,to]=reactExports.useState(()=>queryString.parse(window.location.hash.substring(1))),ro=reactExports.useCallback(no=>{to(oo=>{const io={...oo,...no},so=queryString.stringify(io);return window.location.hash=so,io})},[]);return reactExports.useEffect(()=>{const no=()=>{to(queryString.parse(window.location.hash.substring(1)))};return window.addEventListener("hashchange",no),()=>window.removeEventListener("hashchange",no)},[]),[eo,ro]}function genLocalUrlParamsWithHash(eo){return isNotNullOrUndefined(eo)?isNotNullOrUndefined(eo.session)?`session=${eo.session}`:isNotNullOrUndefined(eo.collection)?`session=${eo.collection}`:isNotNullOrUndefined(eo.experiment)?`experiment=${eo.experiment}`:isNotNullOrUndefined(eo.run)?`run=${eo.run}`:isNotNullOrUndefined(eo.trace)?`trace_ids=${eo.trace}`:"":""}function isNotNullOrUndefined(eo){return eo!=null}const getSummariesSignature=eo=>eo.flatMap(no=>[`${no.line_run_id}_${no.status}`,...Object.values(no.evaluations??[]).map(oo=>`${oo.trace_id}_${oo.status}`)]).sort().join(","),useLocalFetchSummaries=(eo,to)=>{const ro=useTraceViewModel(),[no,oo]=reactExports.useState(!0),io=useLocalFetchSummariesFunc(eo);reactExports.useEffect(()=>{no&&ro.setTraceListStatus(ViewStatus.loading),io().finally(()=>{no&&(oo(!1),ro.setTraceListStatus(ViewStatus.loaded))});let so;return to&&(so=setInterval(io,TRACE_POLLING_GAP)),()=>{so&&clearInterval(so)}},[io,to])},useLocalFetchSummary=()=>{const eo=useTraceViewModel();return reactExports.useCallback(async ro=>fetch(`${LOCAL_URL_PREFIX}/v1.0/LineRuns/list?trace_ids=${ro}`).then(no=>no.json()).then(no=>{no&&(eo.appendTraces(no),eo.setTraceListStatus(ViewStatus.loaded))}).catch(no=>{eo.setTraceListStatus(ViewStatus.error),eo.appendTraces([]),console.error("Error:",no)}),[eo])},useLocalFetchSummariesFunc=eo=>{const to=useTraceViewModel(),[ro,no]=reactExports.useState(void 0),oo=reactExports.useMemo(()=>{const so=genLocalUrlParamsWithHash(eo);return so!==""?`?${so}`:""},[eo]);return reactExports.useCallback(async()=>fetch(`${LOCAL_URL_PREFIX}/v1.0/LineRuns/list${oo}`).then(so=>so.json()).then(so=>{if(!so&&Array.isArray(so))throw new Error("No new traces");const ao=getSummariesSignature(so);(ro===void 0||ao!==ro)&&(no(ao),to.traces$.clear(),to.appendTraces(so))}).catch(so=>{to.setTraceListStatus(ViewStatus.error),to.appendTraces([]),console.error("Error:",so)}),[oo,to])},useLocalRefreshTraces=eo=>{const to=useTraceViewModel(),ro=useLocalFetchSummariesFunc(eo);return reactExports.useCallback(()=>{to.setTraceListStatus(ViewStatus.loading),ro().then(()=>{to.setTraceListStatus(ViewStatus.loaded)})},[ro,to])},useLocalFetchRunningTraces=()=>{const eo=useTraces(),to=useLocalFetchSummary(),ro=eo.filter(no=>checkStatus(no.status,"running")).map(no=>no.trace_id).filter(no=>no!==void 0);reactExports.useEffect(()=>{let no;return ro.length>0&&(no=setInterval(()=>{ro.forEach(oo=>to(oo))},RUNNING_TRACE_POLLING_GAP)),()=>{no&&clearInterval(no)}},[to,ro])},useLocalTraceDetailDidOpen=eo=>{const to=useTraceViewModel(),ro=useLocalFetchSummary(),no=useFetchLocalSpans();return reactExports.useCallback(async io=>{if(!io)return;let so=to.getTraceById(io);so||(await ro(io),so=to.getTraceById(io));const ao=[io,...Object.values((so==null?void 0:so.evaluations)??[]).map(lo=>lo.trace_id)].filter(lo=>lo!==void 0);eo({uiTraceId:io}),to.setTraceDetailStatus(ViewStatus.loading),no(ao)},[to])},useLocalOnTraceDetailClose=eo=>reactExports.useCallback(()=>{eo({uiTraceId:void 0})},[eo]),useFetchLocalSpans=()=>{const eo=useTraceViewModel();return reactExports.useCallback(ro=>{fetch(`${LOCAL_URL_PREFIX}/v1.0/Spans/list?trace_ids=${ro.join(",")}&lazy_load=${eo.isLazyLoadSpan}`).then(no=>no.json()).then(no=>{eo.appendSpans(no),eo.setTraceDetailStatus(ViewStatus.loaded)}).catch(no=>{console.error("Error:",no),eo.setTraceDetailStatus(ViewStatus.error)})},[eo])},useLocalOnRefreshSpans=()=>{const eo=useLocalFetchSummary(),to=useFetchLocalSpans();return reactExports.useCallback((no,oo)=>{const io=[no,...Object.values((oo==null?void 0:oo.evaluations)??[]).map(so=>so.trace_id)].filter(so=>so!==void 0);eo(no),to(io)},[to,eo])},fetchSpanEvent=eo=>fetch(`${LOCAL_URL_PREFIX}/v1.0/Spans/Event/${eo}`).then(to=>to.json()).then(to=>({status:"success",data:to})).catch(to=>({status:"error",error:to})),ThemeSwitcher=({style:eo,labelName:to})=>{const ro=useLocStrings(),{theme:no,setTheme:oo}=reactExports.useContext(ThemeContext);return jsxRuntimeExports.jsx(Switch,{label:to||ro["Dark Theme"],labelPosition:"before",checked:no==="dark",onChange:(io,so)=>oo(so.checked?"dark":"light"),style:eo})},LocalCommonHeader=({isStreaming:eo,onIsStreamingChange:to,streamLabelName:ro,slot:no,showRefresh:oo=!1})=>{const io=useClasses$3(),so=useLocStrings(),ao=useTraceViewModel();return jsxRuntimeExports.jsxs("div",{className:io.root,children:[jsxRuntimeExports.jsxs("div",{className:io.wrapper,children:[jsxRuntimeExports.jsx("div",{className:io.main}),oo&&jsxRuntimeExports.jsx(Tooltip,{content:so["Refresh Data"],relationship:"description",children:jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Refresh",icon:jsxRuntimeExports.jsx(ArrowClockwise16Regular,{}),onClick:()=>ao.refreshTraces()})}),jsxRuntimeExports.jsx(StreamSwitcher,{isStreaming:eo,onIsStreamingChange:to,labelName:ro}),jsxRuntimeExports.jsx(ThemeSwitcher,{})]}),no]})},useClasses$3=makeStyles({root:{display:"flex",flexDirection:"column",width:"100%"},wrapper:{display:"flex",...shorthands.padding(tokens.spacingVerticalXXS,tokens.spacingHorizontalL)},main:{...shorthands.flex(1)}}),LocalOverallMetric=({hash:eo})=>{var ao;const[[to,ro],no]=reactExports.useState([void 0,void 0]),oo=useClasses$2(),io=useTraces(),so=(()=>{if(isNotNullOrUndefined(eo.run)){const lo=eo.run.split(",");if(lo.length===1)return lo[0]}})();return reactExports.useEffect(()=>{so&&Promise.allSettled([fetch(`${LOCAL_URL_PREFIX}/v1.0/Runs/${so}`).then(lo=>lo.json()),fetch(`${LOCAL_URL_PREFIX}/v1.0/Runs/${so}/metrics`).then(lo=>lo.json())]).then(lo=>{lo.some(uo=>uo.status==="rejected")?no([void 0,void 0]):no(lo.map(uo=>uo.value))})},[so]),so&&to&&ro?jsxRuntimeExports.jsxs("div",{className:oo.wrapper,children:[jsxRuntimeExports.jsx("div",{className:oo.title,children:so}),jsxRuntimeExports.jsxs("div",{className:oo.blockListWrapper,children:[jsxRuntimeExports.jsx(InfoBlock,{title:"Total traces:",value:io.length}),isNotNullOrUndefined(to.status)&&jsxRuntimeExports.jsx(InfoBlock,{title:"Status:",value:to.status,slot:jsxRuntimeExports.jsx(StatusText,{statusCode:to.status,showText:!0,size:UISize.small})}),isNotNullOrUndefined(to==null?void 0:to.created_on)&&jsxRuntimeExports.jsx(InfoBlock,{title:"Create on:",value:timeFormat(to.created_on)}),((ao=to==null?void 0:to.properties)==null?void 0:ao.system_metrics)&&jsxRuntimeExports.jsx(SystemMetrics,{systemMetrics:to.properties.system_metrics}),isNotNullOrUndefined(ro)&&Object.keys(ro).length>0&&jsxRuntimeExports.jsx(Metrics,{metrics:ro})]})]}):null},InfoBlock=({title:eo,slot:to,value:ro})=>{const no=useClasses$2();return jsxRuntimeExports.jsxs("div",{className:no.blockWrapper,children:[jsxRuntimeExports.jsx("div",{className:no.blockTitle,children:eo}),to||jsxRuntimeExports.jsx("div",{className:no.blockValue,children:ro.toString()})]})},SYSTEM_METRICS_NAME_MAP={completion_tokens:"Completion tokens",duration:"Duration",prompt_tokens:"Prompt tokens",total_tokens:"Total tokens"},SystemMetrics=({systemMetrics:eo})=>{const to=useClasses$2();return jsxRuntimeExports.jsx(InfoBlock,{title:"System metrics:",slot:jsxRuntimeExports.jsxs("div",{className:to.metricsWrapper,children:[jsxRuntimeExports.jsx("div",{className:to.metricsItemRow,children:["prompt_tokens","total_tokens"].map(ro=>jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${SYSTEM_METRICS_NAME_MAP[ro]}: ${eo[ro].toString()}`},ro))}),jsxRuntimeExports.jsx("div",{className:to.metricsItemRow,children:["completion_tokens","duration"].map(ro=>jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${SYSTEM_METRICS_NAME_MAP[ro]}: ${eo[ro].toString()}`},ro))})]})})},Metrics=({metrics:eo})=>{const to=useClasses$2();return jsxRuntimeExports.jsx(InfoBlock,{title:"Metrics:",slot:jsxRuntimeExports.jsx("div",{className:to.metricsItemColumn,children:Object.entries(eo).map(([ro,no])=>jsxRuntimeExports.jsx("span",{className:to.metricsItem,children:`${ro}: ${no.toString()}`},ro))})})},useClasses$2=makeStyles({wrapper:{display:"flex",flexDirection:"column",boxSizing:"border-box",...shorthands.gap("6px"),...shorthands.borderRadius("4px"),...shorthands.margin("0","24px"),...shorthands.padding("16px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke2)},title:{fontSize:"16px",fontWeight:600,lineHeight:"22px"},blockListWrapper:{display:"flex",...shorthands.gap("24px")},blockWrapper:{display:"flex",flexDirection:"column",...shorthands.gap("4px")},blockTitle:{fontSize:"12px",fontWeight:"600",lineHeight:"16px"},blockValue:{fontSize:"14px",lineHeight:"20px",fontWeight:"400"},metricsWrapper:{display:"flex",flexDirection:"column",...shorthands.gap("8px")},metricsItemRow:{display:"flex",...shorthands.gap("8px")},metricsItemColumn:{display:"flex",flexDirection:"column",...shorthands.gap("8px")},metricsItem:{fontSize:"12px",lineHeight:"16px",fontWeight:"400",...shorthands.padding("4px","8px"),...shorthands.borderRadius("4px"),...shorthands.border("1px","solid",tokens.colorNeutralStroke1)}}),LocalTraceView=eo=>{const{viewModel:to,isDark:ro}=eo;return jsxRuntimeExports.jsx(Provider,{viewModel:to,isDark:ro,children:jsxRuntimeExports.jsx(TraceViewContent,{...eo})})},TraceViewContent=({hash:eo,setHash:to})=>{const ro=useClasses$1(),no=useIsTraceDetailOpen(),oo=useSetIsTraceDetailOpen(),io=useTraceViewModel(),[so,ao]=reactExports.useState(!1),[lo,uo]=React.useState(!1),[co,fo]=React.useState(!1),ho=useSelectedTrace(),po=useLocalFetchSummary(),go=useFetchLocalSpans();useLocalFetchSummaries(eo,so),useLocalFetchRunningTraces();const vo=useLocalTraceDetailDidOpen(to),bo=useLocalOnTraceDetailClose(to),xo=useLocalRefreshTraces(eo),_o=useLocalOnRefreshSpans();return reactExports.useEffect(()=>{io.traceDetailDidOpen(vo),io.traceDetailDidClose(bo),io.setOnRefreshTraces(xo),io.onRefreshSpans(_o)},[_o,xo,bo,vo,io]),reactExports.useEffect(()=>{let Eo;return lo&&no&&ho&&co&&(Eo=setInterval(()=>{const So=[ho==null?void 0:ho.trace_id,...Object.values((ho==null?void 0:ho.evaluations)??[]).map(To=>To.trace_id)].filter(To=>To!==void 0);go(So),ho.trace_id&&po(ho.trace_id)},SPAN_POLLING_GAP)),()=>{Eo&&clearInterval(Eo)}},[co,ho,no,io,lo,po,go]),reactExports.useEffect(()=>{no&&ho&&(checkStatus(ho.status,"Running")?uo(!0):uo(!1))},[po,no,ho]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:ro.wrapper,children:[jsxRuntimeExports.jsx(LocalCommonHeader,{isStreaming:so,onIsStreamingChange:ao,showRefresh:!0,slot:jsxRuntimeExports.jsx(LocalOverallMetric,{hash:eo})}),jsxRuntimeExports.jsx(TraceFilter,{hash:eo,setHash:to}),jsxRuntimeExports.jsx(TraceList,{className:ro.grid,onRowClick:()=>{oo(!0)}})]}),jsxRuntimeExports.jsx(DefaultDetailContainer,{isOpen:no,setIsOpen:oo,header:jsxRuntimeExports.jsx(TraceDetailHeader,{setIsTraceDetailOpen:oo,showStreamSwitch:lo,isStreaming:co,onIsStreamingChange:fo}),content:jsxRuntimeExports.jsx(TraceDetail,{})})]})},useClasses$1=makeStyles({header:{display:"flex",width:"100%"},wrapper:{display:"flex",flexDirection:"column",height:"100%"},divider:{flexGrow:0,...shorthands.margin("16px",0)},grid:{flexGrow:1}});window.TraceView_Version="20240401.4-main";const TraceViewApp=()=>{const[eo,to]=useHashObject(),ro=useClasses(),no=React.useMemo(()=>new TraceViewModel({spanConfig:{fetchSpanEvent}}),[]);return reactExports.useEffect(()=>{isNotNullOrUndefined(eo.uiTraceId)&&no.setTraceDetailOpen(!0,eo.uiTraceId)},[no,eo.uiTraceId]),jsxRuntimeExports.jsx(ThemeContextProvider,{children:jsxRuntimeExports.jsx(ThemeContext.Consumer,{children:({theme:oo})=>{const io=oo==="dark";return jsxRuntimeExports.jsxs(FluentProvider,{theme:io?webDarkTheme:webLightTheme,style:{height:"100%",width:"100%"},children:[jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:` + html, + body { + height: 100%; + width: 100%; + padding: 0; + margin: 0; + box-sizing: border-box; + overflow: hidden; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", + "Droid Sans", "Helvetica Neue", sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + #root { + height: 100%; + width: 100%; + display: flex; + } + `}}),jsxRuntimeExports.jsx("div",{className:ro.wrapper,children:jsxRuntimeExports.jsx(LocalTraceView,{viewModel:no,hash:eo,setHash:to,isDark:io})})]})}})})},useClasses=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"}});client.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(TraceViewApp,{}))});export default Yw(); diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/static/chat_index.html b/src/promptflow-devkit/promptflow/_sdk/_service/static/chat_index.html new file mode 100644 index 00000000000..6983a09a1e5 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/static/chat_index.html @@ -0,0 +1,23 @@ + + + + + Chat + + + + + + + + +
+ + + diff --git a/src/promptflow-devkit/promptflow/_sdk/_service/static/index.html b/src/promptflow-devkit/promptflow/_sdk/_service/static/index.html new file mode 100644 index 00000000000..f61929b7841 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_service/static/index.html @@ -0,0 +1,16 @@ + + + + + + + + + Trace View + + + + +
+ + diff --git a/src/promptflow/promptflow/_sdk/_service/swagger.json b/src/promptflow-devkit/promptflow/_sdk/_service/swagger.json similarity index 60% rename from src/promptflow/promptflow/_sdk/_service/swagger.json rename to src/promptflow-devkit/promptflow/_sdk/_service/swagger.json index 4ef82f0ef0a..0b2d12f02fb 100644 --- a/src/promptflow/promptflow/_sdk/_service/swagger.json +++ b/src/promptflow-devkit/promptflow/_sdk/_service/swagger.json @@ -5,9 +5,6 @@ "/Connections/": { "get": { "responses": { - "403": { - "description": "This service is available for local user only, please specify X-Remote-User in headers." - }, "200": { "description": "Success", "schema": { @@ -16,6 +13,9 @@ "$ref": "#/definitions/Connection" } } + }, + "403": { + "description": "This service is available for local user only, please specify X-Remote-User in headers." } }, "description": "List all connection", @@ -61,14 +61,14 @@ ], "put": { "responses": { - "403": { - "description": "This service is available for local user only, please specify X-Remote-User in headers." - }, "200": { "description": "Connection details", "schema": { "$ref": "#/definitions/ConnectionDict" } + }, + "403": { + "description": "This service is available for local user only, please specify X-Remote-User in headers." } }, "description": "Update connection", @@ -87,16 +87,34 @@ "Connections" ] }, - "get": { + "delete": { "responses": { + "204": { + "description": "Delete connection", + "schema": { + "$ref": "#/definitions/ConnectionDict" + } + }, "403": { "description": "This service is available for local user only, please specify X-Remote-User in headers." - }, + } + }, + "description": "Delete connection", + "operationId": "delete_connection", + "tags": [ + "Connections" + ] + }, + "get": { + "responses": { "200": { "description": "Connection details", "schema": { "$ref": "#/definitions/ConnectionDict" } + }, + "403": { + "description": "This service is available for local user only, please specify X-Remote-User in headers." } }, "description": "Get connection", @@ -112,28 +130,16 @@ "Connections" ] }, - "delete": { - "responses": { - "403": { - "description": "This service is available for local user only, please specify X-Remote-User in headers." - } - }, - "description": "Delete connection", - "operationId": "delete_connection", - "tags": [ - "Connections" - ] - }, "post": { "responses": { - "403": { - "description": "This service is available for local user only, please specify X-Remote-User in headers." - }, "200": { "description": "Connection details", "schema": { "$ref": "#/definitions/ConnectionDict" } + }, + "403": { + "description": "This service is available for local user only, please specify X-Remote-User in headers." } }, "description": "Create connection", @@ -164,14 +170,14 @@ ], "get": { "responses": { - "403": { - "description": "This service is available for local user only, please specify X-Remote-User in headers." - }, "200": { "description": "Connection details with secret", "schema": { "$ref": "#/definitions/ConnectionDict" } + }, + "403": { + "description": "This service is available for local user only, please specify X-Remote-User in headers." } }, "description": "Get connection with secret", @@ -188,6 +194,129 @@ ] } }, + "/Experiments/": { + "get": { + "responses": { + "200": { + "description": "Experiments", + "schema": { + "$ref": "#/definitions/ExperimentList" + } + } + }, + "description": "List all experiments", + "operationId": "get_experiment_list", + "tags": [ + "Experiments" + ] + } + }, + "/Flows/get": { + "get": { + "responses": { + "200": { + "description": "Return flow yaml as json", + "schema": { + "$ref": "#/definitions/FlowDict" + } + } + }, + "description": "Return flow yaml as json", + "operationId": "get_flow_get", + "tags": [ + "Flows" + ] + } + }, + "/Flows/test": { + "post": { + "responses": { + "200": { + "description": "Flow test", + "schema": { + "$ref": "#/definitions/FlowDict" + } + } + }, + "description": "Flow test", + "operationId": "post_flow_test", + "parameters": [ + { + "name": "payload", + "required": true, + "in": "body", + "schema": { + "$ref": "#/definitions/FlowTest" + } + } + ], + "tags": [ + "Flows" + ] + } + }, + "/Flows/ux_inputs": { + "get": { + "responses": { + "200": { + "description": "Get the file content of file UX_INPUTS_JSON", + "schema": { + "$ref": "#/definitions/FlowDict" + } + } + }, + "description": "Get the file content of file UX_INPUTS_JSON", + "operationId": "get_flow_ux_inputs", + "tags": [ + "Flows" + ] + }, + "post": { + "responses": { + "200": { + "description": "Set the file content of file UX_INPUTS_JSON", + "schema": { + "$ref": "#/definitions/FlowDict" + } + } + }, + "description": "Set the file content of file UX_INPUTS_JSON", + "operationId": "post_flow_ux_inputs", + "parameters": [ + { + "name": "payload", + "required": true, + "in": "body", + "schema": { + "$ref": "#/definitions/FlowUxInput" + } + } + ], + "tags": [ + "Flows" + ] + } + }, + "/LineRuns/list": { + "get": { + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/LineRun" + } + } + } + }, + "description": "List line runs", + "operationId": "get_line_runs", + "tags": [ + "LineRuns" + ] + } + }, "/Runs/": { "get": { "responses": { @@ -277,6 +406,21 @@ "Runs" ] }, + "delete": { + "responses": { + "204": { + "description": "Delete run", + "schema": { + "$ref": "#/definitions/RunDict" + } + } + }, + "description": "Delete run", + "operationId": "delete_run", + "tags": [ + "Runs" + ] + }, "get": { "responses": { "200": { @@ -502,11 +646,31 @@ ] } }, + "/Spans/list": { + "get": { + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Span" + } + } + } + }, + "description": "List spans", + "operationId": "get_spans", + "tags": [ + "Spans" + ] + } + }, "/Telemetries/": { "post": { "responses": { - "403": { - "description": "Telemetry is disabled or X-Remote-User is not set.", + "200": { + "description": "Create telemetry record", "headers": { "x-ms-promptflow-request-id": { "type": "string" @@ -521,8 +685,8 @@ } } }, - "200": { - "description": "Create telemetry record", + "403": { + "description": "Telemetry is disabled or X-Remote-User is not set.", "headers": { "x-ms-promptflow-request-id": { "type": "string" @@ -546,6 +710,63 @@ "Telemetries" ] } + }, + "/ui/chat": { + "get": { + "responses": { + "200": { + "description": "Success" + } + }, + "operationId": "get_chat_ui", + "tags": [ + "ui" + ] + } + }, + "/ui/media": { + "get": { + "responses": { + "200": { + "description": "Get image url", + "schema": { + "type": "string" + } + } + }, + "description": "Get image url", + "operationId": "get_media_view", + "tags": [ + "ui" + ] + } + }, + "/ui/media_save": { + "post": { + "responses": { + "200": { + "description": "Save image", + "schema": { + "type": "string" + } + } + }, + "description": "Save image", + "operationId": "post_media_save", + "parameters": [ + { + "name": "payload", + "required": true, + "in": "body", + "schema": { + "$ref": "#/definitions/MediaSave" + } + } + ], + "tags": [ + "ui" + ] + } } }, "info": { @@ -570,6 +791,26 @@ { "name": "Telemetries", "description": "Telemetry Management" + }, + { + "name": "Spans", + "description": "Spans Management" + }, + { + "name": "LineRuns", + "description": "Line runs management" + }, + { + "name": "ui", + "description": "UI" + }, + { + "name": "Flows", + "description": "Flows Management" + }, + { + "name": "Experiments", + "description": "Experiments Management" } ], "definitions": { @@ -724,6 +965,283 @@ } }, "type": "object" + }, + "Span": { + "required": [ + "attributes", + "context", + "kind", + "name", + "resource" + ], + "properties": { + "name": { + "type": "string" + }, + "context": { + "$ref": "#/definitions/Context" + }, + "kind": { + "type": "string" + }, + "parent_id": { + "type": "string" + }, + "start_time": { + "type": "string", + "format": "date-time" + }, + "end_time": { + "type": "string", + "format": "date-time" + }, + "status": { + "$ref": "#/definitions/Status" + }, + "attributes": { + "type": "object" + }, + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/Event" + } + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/Link" + } + }, + "resource": { + "$ref": "#/definitions/Resource" + } + }, + "type": "object" + }, + "Context": { + "required": [ + "span_id", + "trace_id", + "trace_state" + ], + "properties": { + "trace_id": { + "type": "string" + }, + "span_id": { + "type": "string" + }, + "trace_state": { + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "required": [ + "status_code" + ], + "properties": { + "status_code": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "type": "object" + }, + "Event": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "attributes": { + "type": "object" + } + }, + "type": "object" + }, + "Link": { + "properties": { + "context": { + "$ref": "#/definitions/Context" + }, + "attributes": { + "type": "object" + } + }, + "type": "object" + }, + "Resource": { + "required": [ + "attributes" + ], + "properties": { + "attributes": { + "type": "object" + }, + "schema_url": { + "type": "string" + } + }, + "type": "object" + }, + "LineRun": { + "required": [ + "end_time", + "inputs", + "kind", + "latency", + "line_run_id", + "name", + "outputs", + "root_span_id", + "start_time", + "status", + "trace_id" + ], + "properties": { + "line_run_id": { + "type": "string" + }, + "trace_id": { + "type": "string" + }, + "root_span_id": { + "type": "string" + }, + "inputs": { + "type": "object" + }, + "outputs": { + "type": "object" + }, + "start_time": { + "type": "string", + "format": "date-time" + }, + "end_time": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string" + }, + "latency": { + "type": "string" + }, + "name": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "cumulative_token_count": { + "$ref": "#/definitions/CumulativeTokenCount" + }, + "evaluations": { + "type": "object" + } + }, + "type": "object" + }, + "CumulativeTokenCount": { + "properties": { + "completion": { + "type": "integer" + }, + "prompt": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "type": "object" + }, + "MediaSave": { + "required": [ + "base64_data", + "extension" + ], + "properties": { + "base64_data": { + "type": "string", + "description": "Image base64 encoded data." + }, + "extension": { + "type": "string", + "description": "Image file extension." + } + }, + "type": "object" + }, + "FlowTest": { + "properties": { + "node": { + "type": "string", + "description": "If specified it will only test this node, else it will test the flow." + }, + "variant": { + "type": "string", + "description": "Node & variant name in format of ${node_name.variant_name}, will use default variant if not specified." + }, + "output_path": { + "type": "string", + "description": "Output path of flow" + }, + "experiment": { + "type": "string", + "description": "Path of experiment template" + }, + "inputs": { + "$ref": "#/definitions/FlowDict" + }, + "environment_variables": { + "$ref": "#/definitions/FlowDict" + } + }, + "type": "object" + }, + "FlowDict": { + "additionalProperties": true, + "type": "object" + }, + "FlowUxInput": { + "required": [ + "flow", + "ux_inputs" + ], + "properties": { + "flow": { + "type": "string", + "description": "Path to flow directory." + }, + "ux_inputs": { + "description": "Flow ux inputs", + "allOf": [ + { + "$ref": "#/definitions/FlowDict" + } + ] + } + }, + "type": "object" + }, + "ExperimentList": { + "type": "array", + "items": { + "$ref": "#/definitions/ExperimentDict" + } } }, "responses": { @@ -737,4 +1255,4 @@ "description": "When any error occurs on the server, return a formatted error message" } } -} +} \ No newline at end of file diff --git a/src/promptflow/promptflow/tracing/contracts/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_service/utils/__init__.py similarity index 100% rename from src/promptflow/promptflow/tracing/contracts/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/_service/utils/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_service/utils/utils.py b/src/promptflow-devkit/promptflow/_sdk/_service/utils/utils.py similarity index 75% rename from src/promptflow/promptflow/_sdk/_service/utils/utils.py rename to src/promptflow-devkit/promptflow/_sdk/_service/utils/utils.py index 1cdafa39912..cc9f744748c 100644 --- a/src/promptflow/promptflow/_sdk/_service/utils/utils.py +++ b/src/promptflow-devkit/promptflow/_sdk/_service/utils/utils.py @@ -1,11 +1,14 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +import base64 import getpass import hashlib import os +import platform import re import socket +import subprocess import sys import time from dataclasses import InitVar, dataclass, field @@ -17,6 +20,7 @@ import requests from flask import abort, make_response, request +from promptflow._constants import PF_RUN_AS_BUILT_BINARY from promptflow._sdk._constants import ( DEFAULT_ENCODING, HOME_PROMPT_FLOW_DIR, @@ -60,7 +64,7 @@ def get_current_env_pfs_file(file_name): def get_port_from_config(create_if_not_exists=False): - if sys.executable.endswith("pfcli.exe"): + if is_run_from_built_binary(): port_file_path = HOME_PROMPT_FLOW_DIR / PF_SERVICE_PORT_FILE port_file_path.touch(mode=read_write_by_user(), exist_ok=True) else: @@ -79,7 +83,7 @@ def get_port_from_config(create_if_not_exists=False): def dump_port_to_config(port): - if sys.executable.endswith("pfcli.exe"): + if is_run_from_built_binary(): port_file_path = HOME_PROMPT_FLOW_DIR / PF_SERVICE_PORT_FILE port_file_path.touch(mode=read_write_by_user(), exist_ok=True) else: @@ -95,6 +99,9 @@ def dump_port_to_config(port): def is_port_in_use(port: int): with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: + # OS will wait for timeout when connecting to an unused port, so it will take about 2s. Set timeout here to + # avoid long waiting time + s.settimeout(0.1) return s.connect_ex(("localhost", port)) == 0 @@ -105,13 +112,24 @@ def get_random_port(): def _get_process_by_port(port): - for proc in psutil.process_iter(["pid", "connections", "create_time"]): - try: - for connection in proc.connections(): - if connection.laddr.port == port: - return proc - except psutil.AccessDenied: - pass + if platform.system() == "Windows": + command = f"netstat -ano | findstr :{port}" + result = subprocess.run(command, shell=True, capture_output=True, text=True) + if result.returncode == 0: + output = result.stdout.strip() + lines = output.split("\n") + for line in lines: + if "LISTENING" in line: + pid = line.split()[-1] # get the PID + return psutil.Process(int(pid)) + else: # Linux and macOS + command = f"lsof -i :{port} -sTCP:LISTEN | awk 'NR>1 {{print $2}}'" + result = subprocess.run(command, shell=True, capture_output=True, text=True) + if result.returncode == 0: + output = result.stdout.strip() + pid = output.split("\n")[0] # get the first PID + if pid != "": + return psutil.Process(int(pid)) def kill_exist_service(port): @@ -125,7 +143,7 @@ def get_started_service_info(port): service_info = {} proc = _get_process_by_port(port) if proc: - create_time = proc.info["create_time"] + create_time = proc.create_time() process_uptime = datetime.now() - datetime.fromtimestamp(create_time) service_info["create_time"] = str(datetime.fromtimestamp(create_time)) service_info["uptime"] = str(process_uptime) @@ -158,9 +176,8 @@ def is_pfs_service_healthy(pfs_port) -> bool: return is_healthy except Exception: # pylint: disable=broad-except pass - logger.warning( - f"Promptflow service can't be reached through port {pfs_port}, will try to start/force restart " - f"promptflow service." + logger.debug( + f"Promptflow service can't be reached through port {pfs_port}, will try to (force) start promptflow service." ) return False @@ -206,7 +223,7 @@ def __post_init__(self, exception): self.target = exception.target self.module = exception.module self.reference_code = exception.reference_code - self.inner_exception = exception.inner_exception + self.inner_exception = str(exception.inner_exception) self.additional_info = exception.additional_info self.error_codes = exception.error_codes else: @@ -231,13 +248,42 @@ def __post_init__(self, exception, status_code): def build_pfs_user_agent(): - extra_agent = f"local_pfs/{VERSION}" - if request.user_agent.string: - return f"{request.user_agent.string} {extra_agent}" - return extra_agent + user_agent = request.user_agent.string + user_agent_for_local_pfs = f"local_pfs/{VERSION}" + if user_agent: + return f"{user_agent} {user_agent_for_local_pfs}" + return user_agent_for_local_pfs -def get_client_from_request() -> "PFClient": +def get_client_from_request(*, connection_provider=None) -> "PFClient": + """ + Build a PFClient instance based on current request in local PFS. + + User agent may be different for each request. + """ from promptflow._sdk._pf_client import PFClient - return PFClient(user_agent=build_pfs_user_agent()) + user_agent = build_pfs_user_agent() + + if connection_provider: + pf_client = PFClient(connection_provider=connection_provider, user_agent_override=user_agent) + else: + pf_client = PFClient(user_agent_override=user_agent) + return pf_client + + +def is_run_from_built_binary(): + """ + Use this function to trigger behavior difference between calling from promptflow sdk/cli and built binary. + + Allow customer to use environment variable to control the triggering. + """ + return sys.executable.endswith("pfcli.exe") or os.environ.get(PF_RUN_AS_BUILT_BINARY, "").lower() == "true" + + +def encrypt_flow_path(flow_path): + return base64.urlsafe_b64encode(flow_path.encode()).decode() + + +def decrypt_flow_path(encrypted_flow_path): + return base64.urlsafe_b64decode(encrypted_flow_path).decode() diff --git a/src/promptflow-devkit/promptflow/_sdk/_serving/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_serving/__init__.py new file mode 100644 index 00000000000..29a4fcd3278 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_serving/__init__.py @@ -0,0 +1,5 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/src/promptflow-devkit/promptflow/_sdk/_serving/app.py b/src/promptflow-devkit/promptflow/_sdk/_serving/app.py new file mode 100644 index 00000000000..3857bdae9a3 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_serving/app.py @@ -0,0 +1,8 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from promptflow.core._serving.app import create_app + +# Keep this for backward compatibility, will be removed after runtime is updated +create_app = create_app diff --git a/src/promptflow/promptflow/_sdk/_telemetry/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_telemetry/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_telemetry/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/_telemetry/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_telemetry/activity.py b/src/promptflow-devkit/promptflow/_sdk/_telemetry/activity.py similarity index 87% rename from src/promptflow/promptflow/_sdk/_telemetry/activity.py rename to src/promptflow-devkit/promptflow/_sdk/_telemetry/activity.py index 0ffda098cbf..b21ee3f8811 100644 --- a/src/promptflow/promptflow/_sdk/_telemetry/activity.py +++ b/src/promptflow-devkit/promptflow/_sdk/_telemetry/activity.py @@ -10,7 +10,7 @@ from typing import Any, Dict from promptflow._sdk._telemetry.telemetry import TelemetryMixin -from promptflow._sdk._utils import ClientUserAgentUtil +from promptflow._utils.user_agent_utils import ClientUserAgentUtil from promptflow.exceptions import _ErrorInfo @@ -105,6 +105,7 @@ def log_activity( activity_name, activity_type=ActivityType.INTERNALCALL, custom_dimensions=None, + user_agent=None, ): """Log an activity. @@ -121,12 +122,16 @@ def log_activity( :type activity_type: str :param custom_dimensions: The custom properties of the activity. :type custom_dimensions: dict + :param user_agent: Specify user agent. If not specified, the user agent will be got from OperationContext. + :type user_agent: str :return: None """ if not custom_dimensions: custom_dimensions = {} - user_agent = ClientUserAgentUtil.get_user_agent() + # provided user agent will be respected even if it's "" + if user_agent is None: + user_agent = ClientUserAgentUtil.get_user_agent() request_id = request_id_context.get() if not request_id: # public function call @@ -179,12 +184,12 @@ def log_activity( raise exception -def extract_telemetry_info(self): +def extract_telemetry_info(self, *args, **kwargs): """Extract pf telemetry info from given telemetry mix-in instance.""" result = {} try: if isinstance(self, TelemetryMixin): - return self._get_telemetry_values() + return self._get_telemetry_values(*args, **kwargs) except Exception: pass return result @@ -233,10 +238,25 @@ def wrapper(self, *args, **kwargs): logger = get_telemetry_logger() - custom_dimensions.update(extract_telemetry_info(self)) + if "activity_name" not in kwargs: + custom_dimensions.update(extract_telemetry_info(self, *args, **kwargs, activity_name=activity_name)) + else: + custom_dimensions.update(extract_telemetry_info(self, *args, **kwargs)) + + if isinstance(self, TelemetryMixin): + user_agent = self._get_user_agent_override() + else: + user_agent = None + # update activity name according to kwargs. _activity_name = update_activity_name(activity_name, kwargs=kwargs) - with log_activity(logger, _activity_name, activity_type, custom_dimensions): + with log_activity( + logger=logger, + activity_name=_activity_name, + activity_type=activity_type, + custom_dimensions=custom_dimensions, + user_agent=user_agent, + ): if _activity_name in HINT_ACTIVITY_NAME: hint_for_update() # set check_latest_version as deamon thread to avoid blocking main thread diff --git a/src/promptflow/promptflow/_sdk/_telemetry/logging_handler.py b/src/promptflow-devkit/promptflow/_sdk/_telemetry/logging_handler.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_telemetry/logging_handler.py rename to src/promptflow-devkit/promptflow/_sdk/_telemetry/logging_handler.py diff --git a/src/promptflow/promptflow/_sdk/_telemetry/telemetry.py b/src/promptflow-devkit/promptflow/_sdk/_telemetry/telemetry.py similarity index 76% rename from src/promptflow/promptflow/_sdk/_telemetry/telemetry.py rename to src/promptflow-devkit/promptflow/_sdk/_telemetry/telemetry.py index 5abd5a483b0..ce05ba30039 100644 --- a/src/promptflow/promptflow/_sdk/_telemetry/telemetry.py +++ b/src/promptflow-devkit/promptflow/_sdk/_telemetry/telemetry.py @@ -2,7 +2,9 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import logging +from typing import Optional +from promptflow._constants import USER_AGENT_OVERRIDE_KEY from promptflow._sdk._configuration import Configuration PROMPTFLOW_LOGGER_NAMESPACE = "promptflow._sdk._telemetry" @@ -10,17 +12,28 @@ class TelemetryMixin(object): def __init__(self, **kwargs): + self._user_agent_override = kwargs.pop(USER_AGENT_OVERRIDE_KEY, None) + # Need to call init for potential parent, otherwise it won't be initialized. + # TODO: however, object.__init__() takes exactly one argument (the instance to initialize), so this will fail + # if there are any kwargs left. super().__init__(**kwargs) def _get_telemetry_values(self, *args, **kwargs): # pylint: disable=unused-argument - """Return the telemetry values of object. + """Return the telemetry values of object, will be set as custom_dimensions in telemetry. :return: The telemetry values :rtype: Dict """ return {} + def _get_user_agent_override(self) -> Optional[str]: + """If we have a bonded user agent passed in via the constructor, return it. + + Telemetries from this object will use this user agent and ignore the one from OperationContext. + """ + return self._user_agent_override + class WorkspaceTelemetryMixin(TelemetryMixin): def __init__(self, subscription_id, resource_group_name, workspace_name, **kwargs): @@ -31,7 +44,7 @@ def __init__(self, subscription_id, resource_group_name, workspace_name, **kwarg super().__init__(**kwargs) def _get_telemetry_values(self, *args, **kwargs): # pylint: disable=unused-argument - """Return the telemetry values of run operations. + """Return the telemetry values of object, will be set as custom_dimensions in telemetry. :return: The telemetry values :rtype: Dict diff --git a/src/promptflow-devkit/promptflow/_sdk/_tracing.py b/src/promptflow-devkit/promptflow/_sdk/_tracing.py new file mode 100644 index 00000000000..0d7f43c3003 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/_tracing.py @@ -0,0 +1,244 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import json +import os +import typing +import urllib.parse + +from opentelemetry import trace +from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter +from opentelemetry.sdk.environment_variables import OTEL_EXPORTER_OTLP_ENDPOINT +from opentelemetry.sdk.resources import Resource +from opentelemetry.sdk.trace import TracerProvider +from opentelemetry.sdk.trace.export import BatchSpanProcessor + +from promptflow._cli._pf.entry import entry +from promptflow._constants import ( + OTEL_RESOURCE_SERVICE_NAME, + SpanAttributeFieldName, + SpanResourceAttributesFieldName, + TraceEnvironmentVariableName, +) +from promptflow._sdk._configuration import Configuration +from promptflow._sdk._constants import ( + PF_SERVICE_HOUR_TIMEOUT, + PF_TRACE_CONTEXT, + PF_TRACE_CONTEXT_ATTR, + AzureMLWorkspaceTriad, + ContextAttributeKey, +) +from promptflow._sdk._service.utils.utils import get_port_from_config, is_pfs_service_healthy, is_port_in_use +from promptflow._sdk._utils import extract_workspace_triad_from_trace_provider +from promptflow._utils.logger_utils import get_cli_sdk_logger +from promptflow.tracing._integrations._openai_injector import inject_openai_api +from promptflow.tracing._operation_context import OperationContext +from promptflow.tracing._start_trace import _force_set_tracer_provider, _is_tracer_provider_set + +logger = get_cli_sdk_logger() + + +def get_ws_tracing_base_url(ws_triad: AzureMLWorkspaceTriad) -> str: + return ( + "https://int.ml.azure.com/prompts/trace/list" + f"?wsid=/subscriptions/{ws_triad.subscription_id}" + f"/resourceGroups/{ws_triad.resource_group_name}" + "/providers/Microsoft.MachineLearningServices" + f"/workspaces/{ws_triad.workspace_name}" + ) + + +def _inject_attrs_to_op_ctx(attrs: typing.Dict[str, str]) -> None: + if len(attrs) == 0: + return + logger.debug("Inject attributes %s to context", attrs) + op_ctx = OperationContext.get_instance() + for attr_key, attr_value in attrs.items(): + op_ctx._add_otel_attributes(attr_key, attr_value) + + +def _invoke_pf_svc() -> str: + port = get_port_from_config(create_if_not_exists=True) + port = str(port) + cmd_args = ["service", "start", "--port", port] + hint_stop_message = ( + f"You can stop the Prompt flow Tracing Server with the following command:'\033[1m pf service stop\033[0m'.\n" + f"Alternatively, if no requests are made within {PF_SERVICE_HOUR_TIMEOUT} " + f"hours, it will automatically stop." + ) + if is_port_in_use(int(port)): + if not is_pfs_service_healthy(port): + cmd_args.append("--force") + else: + print("Prompt flow Tracing Server has started...") + print(hint_stop_message) + return port + print("Starting Prompt flow Tracing Server...") + entry(cmd_args) + logger.debug("Prompt flow service is serving on port %s", port) + print(hint_stop_message) + return port + + +def _get_ws_triad_from_pf_config() -> typing.Optional[AzureMLWorkspaceTriad]: + ws_arm_id = Configuration.get_instance().get_trace_provider() + return extract_workspace_triad_from_trace_provider(ws_arm_id) if ws_arm_id is not None else None + + +# priority: run > experiment > collection +# for run(s) in experiment, we should print url with run(s) as it is more specific; +# and url with experiment should be printed at the beginning of experiment start. +def _print_tracing_url_from_local( + pfs_port: str, + collection: typing.Optional[str], + exp: typing.Optional[str] = None, + run: typing.Optional[str] = None, +) -> None: + url = f"http://localhost:{pfs_port}/v1.0/ui/traces/" + if run is not None: + url += f"?#run={run}" + elif exp is not None: + url += f"?#experiment={exp}" + elif collection is not None: + url += f"?#collection={collection}" + print(f"You can view the traces from local: {url}") + + +def _print_tracing_url_from_azure_portal( + ws_triad: typing.Optional[AzureMLWorkspaceTriad], + collection: typing.Optional[str], + exp: typing.Optional[str] = None, + run: typing.Optional[str] = None, +) -> None: + if ws_triad is None: + return + url = get_ws_tracing_base_url(ws_triad) + query = None + if run is not None: + query = '{"batchRunId":"' + run + '"}' + elif exp is not None: + # not consider experiment for now + pass + elif collection is not None: + # will update this once portal finalize the url + query = '{"sessionId":"' + collection + '"}' + # urllib.parse.quote to encode the query parameter + if query is not None: + url += f"&searchText={urllib.parse.quote(query)}" + print(f"You can view the traces in cloud from Azure portal: {url}") + + +def _inject_res_attrs_to_environ( + pfs_port: str, + collection: typing.Optional[str], + exp: typing.Optional[str] = None, + ws_triad: typing.Optional[AzureMLWorkspaceTriad] = None, +) -> None: + if collection is not None: + os.environ[TraceEnvironmentVariableName.COLLECTION] = collection + if exp is not None: + os.environ[TraceEnvironmentVariableName.EXPERIMENT] = exp + if ws_triad is not None: + os.environ[TraceEnvironmentVariableName.SUBSCRIPTION_ID] = ws_triad.subscription_id + os.environ[TraceEnvironmentVariableName.RESOURCE_GROUP_NAME] = ws_triad.resource_group_name + os.environ[TraceEnvironmentVariableName.WORKSPACE_NAME] = ws_triad.workspace_name + # we will not overwrite the value if it is already set + if OTEL_EXPORTER_OTLP_ENDPOINT not in os.environ: + os.environ[OTEL_EXPORTER_OTLP_ENDPOINT] = f"http://localhost:{pfs_port}/v1/traces" + + +def _create_or_merge_res( + collection: typing.Optional[str], + collection_id: typing.Optional[str] = None, + exp: typing.Optional[str] = None, + ws_triad: typing.Optional[AzureMLWorkspaceTriad] = None, +) -> Resource: + res_attrs = dict() + if collection is not None: + res_attrs[SpanResourceAttributesFieldName.COLLECTION] = collection + if collection_id is not None: + res_attrs[SpanResourceAttributesFieldName.COLLECTION_ID] = collection_id + if _is_tracer_provider_set(): + tracer_provider: TracerProvider = trace.get_tracer_provider() + for attr_key, attr_value in tracer_provider.resource.attributes.items(): + res_attrs[attr_key] = attr_value + res_attrs[SpanResourceAttributesFieldName.SERVICE_NAME] = OTEL_RESOURCE_SERVICE_NAME + if exp is not None: + res_attrs[SpanResourceAttributesFieldName.EXPERIMENT_NAME] = exp + if ws_triad is not None: + res_attrs[SpanResourceAttributesFieldName.SUBSCRIPTION_ID] = ws_triad.subscription_id + res_attrs[SpanResourceAttributesFieldName.RESOURCE_GROUP_NAME] = ws_triad.resource_group_name + res_attrs[SpanResourceAttributesFieldName.WORKSPACE_NAME] = ws_triad.workspace_name + return Resource(attributes=res_attrs) + + +def start_trace_with_devkit( + collection: typing.Optional[str], + attrs: typing.Optional[typing.Dict[str, str]] = None, + run: typing.Optional[str] = None, +) -> None: + # honor and set attributes if user has specified + if isinstance(attrs, dict): + _inject_attrs_to_op_ctx(attrs) + + # experiment related attributes, pass from environment + env_tracing_ctx = os.environ.get(PF_TRACE_CONTEXT, None) + logger.debug("Read tracing context from environment: %s", env_tracing_ctx) + env_attrs = dict(json.loads(env_tracing_ctx)).get(PF_TRACE_CONTEXT_ATTR) if env_tracing_ctx else dict() + exp = env_attrs.get(ContextAttributeKey.EXPERIMENT, None) + ref_line_run_id = env_attrs.get(ContextAttributeKey.REFERENCED_LINE_RUN_ID, None) + op_ctx = OperationContext.get_instance() + # remove `referenced.line_run_id` from context to avoid stale value set by previous node + if ref_line_run_id is None: + op_ctx._remove_otel_attributes(SpanAttributeFieldName.REFERENCED_LINE_RUN_ID) + else: + op_ctx._add_otel_attributes(SpanAttributeFieldName.REFERENCED_LINE_RUN_ID, ref_line_run_id) + + # local to cloud feature + ws_triad = _get_ws_triad_from_pf_config() + # invoke prompt flow service + pfs_port = _invoke_pf_svc() + + _inject_res_attrs_to_environ(pfs_port=pfs_port, collection=collection, exp=exp, ws_triad=ws_triad) + # instrument openai and setup exporter to pfs here for flex mode + inject_openai_api() + setup_exporter_to_pfs() + # print tracing url(s) + _print_tracing_url_from_local(pfs_port=pfs_port, collection=collection, exp=exp, run=run) + _print_tracing_url_from_azure_portal(ws_triad=ws_triad, collection=collection, exp=exp, run=run) + + +def setup_exporter_to_pfs() -> None: + # get resource attributes from environment + # For local trace, collection is the only identifier for name and id + # For cloud trace, we use collection here as name and collection_id for id + collection = os.getenv(TraceEnvironmentVariableName.COLLECTION, None) + # Only used for runtime + collection_id = os.getenv(TraceEnvironmentVariableName.COLLECTION_ID, None) + exp = os.getenv(TraceEnvironmentVariableName.EXPERIMENT, None) + # local to cloud scenario: workspace triad in resource.attributes + workspace_triad = None + subscription_id = os.getenv(TraceEnvironmentVariableName.SUBSCRIPTION_ID, None) + resource_group_name = os.getenv(TraceEnvironmentVariableName.RESOURCE_GROUP_NAME, None) + workspace_name = os.getenv(TraceEnvironmentVariableName.WORKSPACE_NAME, None) + if all([subscription_id, resource_group_name, workspace_name]): + workspace_triad = AzureMLWorkspaceTriad( + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + ) + # create resource, or merge to existing resource + res = _create_or_merge_res(collection=collection, collection_id=collection_id, exp=exp, ws_triad=workspace_triad) + tracer_provider = TracerProvider(resource=res) + # get OTLP endpoint from environment + endpoint = os.getenv(OTEL_EXPORTER_OTLP_ENDPOINT) + if endpoint is not None: + # create OTLP span exporter if endpoint is set + otlp_span_exporter = OTLPSpanExporter(endpoint=endpoint) + tracer_provider.add_span_processor(BatchSpanProcessor(otlp_span_exporter)) + # set tracer provider + if _is_tracer_provider_set(): + _force_set_tracer_provider(tracer_provider) + else: + trace.set_tracer_provider(tracer_provider) diff --git a/src/promptflow/promptflow/_sdk/_user_agent.py b/src/promptflow-devkit/promptflow/_sdk/_user_agent.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_user_agent.py rename to src/promptflow-devkit/promptflow/_sdk/_user_agent.py diff --git a/src/promptflow/promptflow/_sdk/_utils.py b/src/promptflow-devkit/promptflow/_sdk/_utils.py similarity index 68% rename from src/promptflow/promptflow/_sdk/_utils.py rename to src/promptflow-devkit/promptflow/_sdk/_utils.py index f1b6f6f6a5c..2253c506c9c 100644 --- a/src/promptflow/promptflow/_sdk/_utils.py +++ b/src/promptflow-devkit/promptflow/_sdk/_utils.py @@ -4,8 +4,8 @@ import collections import datetime import hashlib +import importlib import json -import multiprocessing import os import platform import re @@ -18,9 +18,10 @@ from contextlib import contextmanager from enum import Enum from functools import partial +from inspect import isfunction from os import PathLike from pathlib import Path -from typing import Any, Dict, List, Optional, Set, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union from urllib.parse import urlparse import keyring @@ -32,13 +33,11 @@ from marshmallow import ValidationError import promptflow -from promptflow._constants import EXTENSION_UA, PF_NO_INTERACTIVE_LOGIN, PF_USER_AGENT, USER_AGENT +from promptflow._constants import ENABLE_MULTI_CONTAINER_KEY, EXTENSION_UA, FlowLanguage from promptflow._sdk._constants import ( AZURE_WORKSPACE_REGEX_FORMAT, DAG_FILE_NAME, DEFAULT_ENCODING, - FLOW_META_JSON, - FLOW_META_JSON_GEN_TIMEOUT, FLOW_TOOLS_JSON, FLOW_TOOLS_JSON_GEN_TIMEOUT, HOME_PROMPT_FLOW_DIR, @@ -56,31 +55,26 @@ VARIANTS, AzureMLWorkspaceTriad, CommonYamlFields, - ConnectionProvider, ) from promptflow._sdk._errors import ( DecryptConnectionError, - GenerateFlowMetaJsonError, GenerateFlowToolsJsonError, StoreConnectionEncryptionKeyError, UnsecureConnectionError, ) from promptflow._sdk._vendor import IgnoreFile, get_ignore_file, get_upload_files_from_folder from promptflow._utils.context_utils import _change_working_dir, inject_sys_path -from promptflow._utils.dataclass_serializer import serialize from promptflow._utils.logger_utils import get_cli_sdk_logger -from promptflow._utils.utils import _match_reference +from promptflow._utils.user_agent_utils import ClientUserAgentUtil from promptflow._utils.yaml_utils import dump_yaml, load_yaml, load_yaml_string from promptflow.contracts.tool import ToolType -from promptflow.exceptions import ErrorTarget, UserErrorException +from promptflow.core._utils import generate_flow_meta as _generate_flow_meta +from promptflow.core._utils import get_used_connection_names_from_dict, update_dict_value_with_connections +from promptflow.exceptions import ErrorTarget, UserErrorException, ValidationException logger = get_cli_sdk_logger() -def snake_to_camel(name): - return re.sub(r"(?:^|_)([a-z])", lambda x: x.group(1).upper(), name) - - def find_type_in_override(params_override: Optional[list] = None) -> Optional[str]: params_override = params_override or [] for override in params_override: @@ -194,144 +188,7 @@ def load_from_dict(schema: Any, data: Dict, context: Dict, additional_message: s return schema(context=context).load(data, **kwargs) except ValidationError as e: pretty_error = json.dumps(e.normalized_messages(), indent=2) - raise ValidationError(decorate_validation_error(schema, pretty_error, additional_message)) - - -def strip_quotation(value): - """ - To avoid escaping chars in command args, args will be surrounded in quotas. - Need to remove the pair of quotation first. - """ - if value.startswith('"') and value.endswith('"'): - return value[1:-1] - elif value.startswith("'") and value.endswith("'"): - return value[1:-1] - else: - return value - - -def parse_variant(variant: str) -> Tuple[str, str]: - variant_regex = r"\${([^.]+).([^}]+)}" - match = re.match(variant_regex, strip_quotation(variant)) - if match: - return match.group(1), match.group(2) - else: - error = ValueError( - f"Invalid variant format: {variant}, variant should be in format of ${{TUNING_NODE.VARIANT}}" - ) - raise UserErrorException( - target=ErrorTarget.CONTROL_PLANE_SDK, - message=str(error), - error=error, - ) - - -# !!! Attention!!!: Please make sure you have contact with PRS team before changing the interface. -def get_used_connection_names_from_environment_variables(): - """The function will get all potential related connection names from current environment variables. - for example, if part of env var is - { - "ENV_VAR_1": "${my_connection.key}", - "ENV_VAR_2": "${my_connection.key2}", - "ENV_VAR_3": "${my_connection2.key}", - } - The function will return {"my_connection", "my_connection2"}. - """ - return get_used_connection_names_from_dict(os.environ) - - -def get_used_connection_names_from_dict(connection_dict: dict): - connection_names = set() - for key, val in connection_dict.items(): - connection_name, _ = _match_reference(val) - if connection_name: - connection_names.add(connection_name) - - return connection_names - - -# !!! Attention!!!: Please make sure you have contact with PRS team before changing the interface. -def update_environment_variables_with_connections(built_connections): - """The function will result env var value ${my_connection.key} to the real connection keys.""" - return update_dict_value_with_connections(built_connections, os.environ) - - -def _match_env_reference(val: str): - try: - val = val.strip() - m = re.match(r"^\$\{env:(.+)}$", val) - if not m: - return None - name = m.groups()[0] - return name - except Exception: - # for exceptions when val is not a string, return - return None - - -def override_connection_config_with_environment_variable(connections: Dict[str, dict]): - """ - The function will use relevant environment variable to override connection configurations. For instance, if there - is a custom connection named 'custom_connection' with a configuration key called 'chat_deployment_name,' the - function will attempt to retrieve 'chat_deployment_name' from the environment variable - 'CUSTOM_CONNECTION_CHAT_DEPLOYMENT_NAME' by default. If the environment variable is not set, it will use the - original value as a fallback. - """ - for connection_name, connection in connections.items(): - values = connection.get("value", {}) - for key, val in values.items(): - connection_name = connection_name.replace(" ", "_") - env_name = f"{connection_name}_{key}".upper() - if env_name not in os.environ: - continue - values[key] = os.environ[env_name] - logger.info(f"Connection {connection_name}'s {key} is overridden with environment variable {env_name}") - return connections - - -def resolve_connections_environment_variable_reference(connections: Dict[str, dict]): - """The function will resolve connection secrets env var reference like api_key: ${env:KEY}""" - for connection in connections.values(): - values = connection.get("value", {}) - for key, val in values.items(): - if not _match_env_reference(val): - continue - env_name = _match_env_reference(val) - if env_name not in os.environ: - raise UserErrorException(f"Environment variable {env_name} is not found.") - values[key] = os.environ[env_name] - return connections - - -def update_dict_value_with_connections(built_connections, connection_dict: dict): - for key, val in connection_dict.items(): - connection_name, connection_key = _match_reference(val) - if connection_name is None: - continue - if connection_name not in built_connections: - continue - if connection_key not in built_connections[connection_name]["value"]: - continue - connection_dict[key] = built_connections[connection_name]["value"][connection_key] - - -def in_jupyter_notebook() -> bool: - """ - Checks if user is using a Jupyter Notebook. This is necessary because logging is not allowed in - non-Jupyter contexts. - - Adapted from https://stackoverflow.com/a/22424821 - """ - try: # cspell:ignore ipython - from IPython import get_ipython - - if "IPKernelApp" not in get_ipython().config: - return False - except ImportError: - return False - except AttributeError: - return False - return True + raise ValidationException(decorate_validation_error(schema, pretty_error, additional_message)) def render_jinja_template(template_path, *, trim_blocks=True, keep_trailing_newline=True, **kwargs): @@ -439,7 +296,7 @@ def additional_includes_copy(src, relative_path, target_dir): with tempfile.TemporaryDirectory() as temp_dir: shutil.copytree(code_path.resolve().as_posix(), temp_dir, dirs_exist_ok=True) for item in _get_additional_includes(yaml_path): - src_path = Path(item) + src_path = Path(str(item)) if not src_path.is_absolute(): src_path = (code_path / item).resolve() @@ -451,9 +308,7 @@ def additional_includes_copy(src, relative_path, target_dir): if not src_path.exists(): error = ValueError(f"Unable to find additional include {item}") raise UserErrorException( - target=ErrorTarget.CONTROL_PLANE_SDK, - message=str(error), - error=error, + target=ErrorTarget.CONTROL_PLANE_SDK, message=str(error), error=error, privacy_info=[item] ) additional_includes_copy(src_path, relative_path=src_path.name, target_dir=temp_dir) @@ -775,62 +630,6 @@ def generate_flow_tools_json( return flow_tools -class ClientUserAgentUtil: - """SDK/CLI side user agent utilities.""" - - @classmethod - def _get_context(cls): - from promptflow._core.operation_context import OperationContext - - return OperationContext.get_instance() - - @classmethod - def get_user_agent(cls): - from promptflow._core.operation_context import OperationContext - - context = cls._get_context() - # directly get from context since client side won't need promptflow/xxx. - return context.get(OperationContext.USER_AGENT_KEY, "").strip() - - @classmethod - def append_user_agent(cls, user_agent: Optional[str]): - if not user_agent: - return - context = cls._get_context() - context.append_user_agent(user_agent) - - @classmethod - def update_user_agent_from_env_var(cls): - # this is for backward compatibility: we should use PF_USER_AGENT in newer versions. - for env_name in [USER_AGENT, PF_USER_AGENT]: - if env_name in os.environ: - cls.append_user_agent(os.environ[env_name]) - - @classmethod - def update_user_agent_from_config(cls): - """Update user agent from config. 1p customer will set it. We'll add PFCustomer_ as prefix.""" - from promptflow._sdk._configuration import Configuration - - config = Configuration.get_instance() - user_agent = config.get_user_agent() - if user_agent: - cls.append_user_agent(user_agent) - - -def setup_user_agent_to_operation_context(user_agent): - """Setup user agent to OperationContext. - For calls from extension, ua will be like: prompt-flow-extension/ promptflow-cli/ promptflow-sdk/ - For calls from CLI, ua will be like: promptflow-cli/ promptflow-sdk/ - For calls from SDK, ua will be like: promptflow-sdk/ - For 1p customer call which set user agent in config, ua will be like: PFCustomer_XXX/ - """ - # add user added UA after SDK/CLI - ClientUserAgentUtil.append_user_agent(user_agent) - ClientUserAgentUtil.update_user_agent_from_env_var() - ClientUserAgentUtil.update_user_agent_from_config() - return ClientUserAgentUtil.get_user_agent() - - def call_from_extension() -> bool: """Return true if current request is from extension.""" ClientUserAgentUtil.update_user_agent_from_env_var() @@ -865,29 +664,6 @@ def is_template(path: str): ) -def get_local_connections_from_executable( - executable, client, connections_to_ignore: List[str] = None, connections_to_add: List[str] = None -): - """Get local connections from executable. - - executable: The executable flow object. - client: Local client to get connections. - connections_to_ignore: The connection names to ignore when getting connections. - connections_to_add: The connection names to add when getting connections. - """ - - connection_names = executable.get_connection_names() - if connections_to_add: - connection_names.update(connections_to_add) - connections_to_ignore = connections_to_ignore or [] - result = {} - for n in connection_names: - if n not in connections_to_ignore: - conn = client.connections.get(name=n, with_secrets=True) - result[n] = conn._to_execution_connection_dict() - return result - - def _generate_connections_dir(): # Get Python executable path python_path = sys.executable @@ -928,45 +704,6 @@ def refresh_connections_dir(connection_spec_files, connection_template_yamls): dump_yaml(yaml_data, f) -def dump_flow_result(flow_folder, prefix, flow_result=None, node_result=None, custom_path=None): - """Dump flow result for extension. - - :param flow_folder: The flow folder. - :param prefix: The file prefix. - :param flow_result: The flow result returned by exec_line. - :param node_result: The node result when test node returned by load_and_exec_node. - :param custom_path: The custom path to dump flow result. - """ - if flow_result: - flow_serialize_result = { - "flow_runs": [serialize(flow_result.run_info)], - "node_runs": [serialize(run) for run in flow_result.node_run_infos.values()], - } - else: - flow_serialize_result = { - "flow_runs": [], - "node_runs": [serialize(node_result)], - } - - dump_folder = Path(flow_folder) / PROMPT_FLOW_DIR_NAME if custom_path is None else Path(custom_path) - dump_folder.mkdir(parents=True, exist_ok=True) - - with open(dump_folder / f"{prefix}.detail.json", "w", encoding=DEFAULT_ENCODING) as f: - json.dump(flow_serialize_result, f, indent=2, ensure_ascii=False) - if node_result: - metrics = flow_serialize_result["node_runs"][0]["metrics"] - output = flow_serialize_result["node_runs"][0]["output"] - else: - metrics = flow_serialize_result["flow_runs"][0]["metrics"] - output = flow_serialize_result["flow_runs"][0]["output"] - if metrics: - with open(dump_folder / f"{prefix}.metrics.json", "w", encoding=DEFAULT_ENCODING) as f: - json.dump(metrics, f, indent=2, ensure_ascii=False) - if output: - with open(dump_folder / f"{prefix}.output.json", "w", encoding=DEFAULT_ENCODING) as f: - json.dump(output, f, indent=2, ensure_ascii=False) - - def read_write_by_user(): return stat.S_IRUSR | stat.S_IWUSR @@ -982,20 +719,10 @@ def remove_empty_element_from_dict(obj: dict) -> dict: return new_dict -def is_github_codespaces(): - # Ref: - # https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace - return os.environ.get("CODESPACES", None) == "true" - - -def interactive_credential_disabled(): - return os.environ.get(PF_NO_INTERACTIVE_LOGIN, "false").lower() == "true" - - -def is_from_cli(): - from promptflow._cli._user_agent import USER_AGENT as CLI_UA - - return CLI_UA in ClientUserAgentUtil.get_user_agent() +def is_multi_container_enabled(): + if ENABLE_MULTI_CONTAINER_KEY in os.environ: + return os.environ[ENABLE_MULTI_CONTAINER_KEY].lower() == "true" + return None def is_url(value: Union[PathLike, str]) -> bool: @@ -1045,41 +772,6 @@ def parse_remote_flow_pattern(flow: object) -> str: return flow_name -def get_connection_operation(connection_provider: str, credential=None, user_agent: str = None): - """ - Get connection operation based on connection provider. - This function will be called by PFClient, so please do not refer to PFClient in this function. - - :param connection_provider: Connection provider, e.g. local, azureml, azureml://subscriptions..., etc. - :type connection_provider: str - :param credential: Credential when remote provider, default to chained credential DefaultAzureCredential. - :type credential: object - :param user_agent: User Agent - :type user_agent: str - """ - if connection_provider == ConnectionProvider.LOCAL.value: - from promptflow._sdk.operations._connection_operations import ConnectionOperations - - logger.debug("PFClient using local connection operations.") - connection_operation = ConnectionOperations() - elif connection_provider.startswith(ConnectionProvider.AZUREML.value): - from promptflow._sdk.operations._local_azure_connection_operations import LocalAzureConnectionOperations - - logger.debug(f"PFClient using local azure connection operations with credential {credential}.") - if user_agent is None: - connection_operation = LocalAzureConnectionOperations(connection_provider, credential=credential) - else: - connection_operation = LocalAzureConnectionOperations(connection_provider, user_agent=user_agent) - else: - error = ValueError(f"Unsupported connection provider: {connection_provider}") - raise UserErrorException( - target=ErrorTarget.CONTROL_PLANE_SDK, - message=str(error), - error=error, - ) - return connection_operation - - # extract open read/write as partial to centralize the encoding read_open = partial(open, mode="r", encoding=DEFAULT_ENCODING) write_open = partial(open, mode="w", encoding=DEFAULT_ENCODING) @@ -1153,11 +845,10 @@ def gen_uuid_by_compute_info() -> Union[str, None]: return str(uuid.uuid4()) -def convert_time_unix_nano_to_timestamp(time_unix_nano: str) -> str: +def convert_time_unix_nano_to_timestamp(time_unix_nano: str) -> datetime.datetime: nanoseconds = int(time_unix_nano) seconds = nanoseconds / 1_000_000_000 - timestamp = datetime.datetime.utcfromtimestamp(seconds) - return timestamp.isoformat() + return datetime.datetime.utcfromtimestamp(seconds) def parse_kv_from_pb_attribute(attribute: Dict) -> Tuple[str, str]: @@ -1202,86 +893,6 @@ def _generate_meta_from_file(working_dir, source_path, entry, meta_dict, excepti exception_list.append(str(e)) -def _generate_flow_meta( - flow_directory: Path, - source_path: str, - entry: str, - timeout: int, - *, - load_in_subprocess: bool = True, -) -> Dict[str, dict]: - """Generate tool meta from files. - - :param flow_directory: flow directory - :param tools: tool list - :param raise_error: whether raise error when generate meta failed - :param timeout: timeout for generate meta - :param include_errors_in_output: whether include errors in output - :param load_in_subprocess: whether load tool meta with subprocess to prevent system path disturb. Default is True. - If set to False, will load tool meta in sync mode and timeout need to be handled outside current process. - :return: tool meta dict - """ - if load_in_subprocess: - # use multiprocess generate to avoid system path disturb - manager = multiprocessing.Manager() - meta_dict = manager.dict() - exception_list = manager.list() - p = multiprocessing.Process( - target=_generate_meta_from_file, args=(flow_directory, source_path, entry, meta_dict, exception_list) - ) - p.start() - p.join(timeout=timeout) - if p.is_alive(): - logger.warning(f"Generate meta timeout after {timeout} seconds, terminate the process.") - p.terminate() - p.join() - else: - meta_dict, exception_list = {}, [] - - # There is no built-in method to forcefully stop a running thread/coroutine in Python - # because abruptly stopping a thread can cause issues like resource leaks, - # deadlocks, or inconsistent states. - # Caller needs to handle the timeout outside current process. - logger.warning( - "Generate meta in current process and timeout won't take effect. " - "Please handle timeout manually outside current process." - ) - _generate_meta_from_file(flow_directory, source_path, entry, meta_dict, exception_list) - # directly raise error if failed to generate meta - if len(exception_list) > 0: - error_message = "Generate meta failed, detail error:\n" + str(exception_list) - raise GenerateFlowMetaJsonError(error_message) - return dict(meta_dict) - - -def generate_flow_meta( - flow_directory: Union[str, Path], - source_path: str, - entry: str, - dump: bool = True, - timeout: int = FLOW_META_JSON_GEN_TIMEOUT, - load_in_subprocess: bool = True, -) -> dict: - """Generate flow.json for a flow directory.""" - - flow_meta = _generate_flow_meta( - flow_directory=flow_directory, - source_path=source_path, - entry=entry, - timeout=timeout, - load_in_subprocess=load_in_subprocess, - ) - - if dump: - # dump as flow.tools.json - promptflow_folder = flow_directory / PROMPT_FLOW_DIR_NAME - promptflow_folder.mkdir(exist_ok=True) - with open(promptflow_folder / FLOW_META_JSON, mode="w", encoding=DEFAULT_ENCODING) as f: - json.dump(flow_meta, f, indent=4) - - return flow_meta - - def extract_workspace_triad_from_trace_provider(trace_provider: str) -> AzureMLWorkspaceTriad: match = re.match(AZURE_WORKSPACE_REGEX_FORMAT, trace_provider) if not match or len(match.groups()) != 5: @@ -1303,3 +914,85 @@ def overwrite_null_std_logger(): sys.stdout = open(os.devnull, "w") if sys.stderr is None: sys.stderr = sys.stdout + + +@contextmanager +def generate_yaml_entry(entry: Union[str, PathLike, Callable], code: Path = None): + """Generate yaml entry to run.""" + from promptflow._proxy import ProxyFactory + + executor_proxy = ProxyFactory().get_executor_proxy_cls(FlowLanguage.Python) + if callable(entry) or executor_proxy.is_flex_flow_entry(entry=entry): + with create_temp_flex_flow_yaml(entry, code) as flow_yaml_path: + yield flow_yaml_path + else: + if code: + logger.warning(f"Specify code {code} is only supported for Python flex flow entry, ignoring it.") + yield entry + + +@contextmanager +def create_temp_flex_flow_yaml(entry: Union[str, PathLike, Callable], code: Path = None): + """Create a temporary flow.dag.yaml in code folder""" + logger.info("Create temporary entry for flex flow.") + if callable(entry): + entry = callable_to_entry_string(entry) + if not code: + code = Path.cwd() + logger.warning(f"Code path is not specified, use current working directory: {code.as_posix()}") + else: + code = Path(code) + if not code.exists(): + raise UserErrorException(f"Code path {code.as_posix()} does not exist.") + flow_yaml_path = code / DAG_FILE_NAME + existing_content = None + + try: + if flow_yaml_path.exists(): + logger.warning(f"Found existing {flow_yaml_path.as_posix()}, will not respect it in runtime.") + with open(flow_yaml_path, "r", encoding=DEFAULT_ENCODING) as f: + existing_content = f.read() + with open(flow_yaml_path, "w", encoding=DEFAULT_ENCODING) as f: + dump_yaml({"entry": entry}, f) + yield flow_yaml_path + finally: + # delete the file or recover the content + if flow_yaml_path.exists(): + if existing_content: + with open(flow_yaml_path, "w", encoding=DEFAULT_ENCODING) as f: + f.write(existing_content) + else: + try: + flow_yaml_path.unlink() + except Exception as e: + logger.warning(f"Failed to delete generated: {flow_yaml_path.as_posix()}, error: {e}") + + +def callable_to_entry_string(callable_obj: Callable) -> str: + """Convert callable object to entry string.""" + if not isfunction(callable_obj): + raise UserErrorException(f"{callable_obj} is not function, only function is supported.") + + try: + module_str = callable_obj.__module__ + func_str = callable_obj.__name__ + except AttributeError as e: + raise UserErrorException( + f"Failed to convert {callable_obj} to entry, please make sure it has __module__ and __name__" + ) from e + + # check if callable can be imported from module + module = importlib.import_module(module_str) + func = getattr(module, func_str, None) + if not func: + raise UserErrorException( + f"Failed to import {callable_obj} from module {module}, please make sure it's a global function." + ) + + return f"{module_str}:{func_str}" + + +generate_flow_meta = _generate_flow_meta +# DO NOT remove the following line, it's used by the runtime imports from _sdk/_utils directly +get_used_connection_names_from_dict = get_used_connection_names_from_dict +update_dict_value_with_connections = update_dict_value_with_connections diff --git a/src/promptflow/promptflow/_sdk/_vendor/__init__.py b/src/promptflow-devkit/promptflow/_sdk/_vendor/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_vendor/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/_vendor/__init__.py diff --git a/src/promptflow/promptflow/_sdk/_vendor/_asset_utils.py b/src/promptflow-devkit/promptflow/_sdk/_vendor/_asset_utils.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_vendor/_asset_utils.py rename to src/promptflow-devkit/promptflow/_sdk/_vendor/_asset_utils.py diff --git a/src/promptflow/promptflow/_sdk/_vendor/_pathspec.py b/src/promptflow-devkit/promptflow/_sdk/_vendor/_pathspec.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_vendor/_pathspec.py rename to src/promptflow-devkit/promptflow/_sdk/_vendor/_pathspec.py diff --git a/src/promptflow/promptflow/_sdk/_visualize_functions.py b/src/promptflow-devkit/promptflow/_sdk/_visualize_functions.py similarity index 100% rename from src/promptflow/promptflow/_sdk/_visualize_functions.py rename to src/promptflow-devkit/promptflow/_sdk/_visualize_functions.py diff --git a/src/promptflow/promptflow/_sdk/data/docker/Dockerfile.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/docker/Dockerfile.jinja2 similarity index 100% rename from src/promptflow/promptflow/_sdk/data/docker/Dockerfile.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/docker/Dockerfile.jinja2 diff --git a/src/promptflow/promptflow/_sdk/data/docker/README.md b/src/promptflow-devkit/promptflow/_sdk/data/docker/README.md similarity index 100% rename from src/promptflow/promptflow/_sdk/data/docker/README.md rename to src/promptflow-devkit/promptflow/_sdk/data/docker/README.md diff --git a/src/promptflow/promptflow/_sdk/data/docker/runit/promptflow-serve/finish.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/docker/runit/promptflow-serve/finish.jinja2 similarity index 84% rename from src/promptflow/promptflow/_sdk/data/docker/runit/promptflow-serve/finish.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/docker/runit/promptflow-serve/finish.jinja2 index b0961c27f9d..2724feee4f0 100644 --- a/src/promptflow/promptflow/_sdk/data/docker/runit/promptflow-serve/finish.jinja2 +++ b/src/promptflow-devkit/promptflow/_sdk/data/docker/runit/promptflow-serve/finish.jinja2 @@ -10,4 +10,4 @@ while pgrep gunicorn >/dev/null; do sleep 1 done -echo "$(date -uIns) - Stopped all Gunicorn processes" \ No newline at end of file +echo "$(date -uIns) - Stopped all Gunicorn processes" diff --git a/src/promptflow/promptflow/_sdk/data/docker/runit/promptflow-serve/run.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/docker/runit/promptflow-serve/run.jinja2 similarity index 93% rename from src/promptflow/promptflow/_sdk/data/docker/runit/promptflow-serve/run.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/docker/runit/promptflow-serve/run.jinja2 index fde584c9e29..3ae52985eff 100644 --- a/src/promptflow/promptflow/_sdk/data/docker/runit/promptflow-serve/run.jinja2 +++ b/src/promptflow-devkit/promptflow/_sdk/data/docker/runit/promptflow-serve/run.jinja2 @@ -15,4 +15,4 @@ pf connection create --file /{{ connection_yaml_path }} {% endfor %} echo "start promptflow serving with worker_num: 8, worker_threads: 1" cd /flow -gunicorn -w 8 --threads 1 -b "0.0.0.0:8080" --timeout 300 "promptflow._sdk._serving.app:create_app()" \ No newline at end of file +gunicorn -w 8 --threads 1 -b "0.0.0.0:8080" --timeout 300 "promptflow.core._serving.app:create_app()" diff --git a/src/promptflow/promptflow/_sdk/data/docker/start.sh.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/docker/start.sh.jinja2 similarity index 100% rename from src/promptflow/promptflow/_sdk/data/docker/start.sh.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/docker/start.sh.jinja2 diff --git a/src/promptflow/promptflow/_sdk/data/docker_csharp/Dockerfile.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/Dockerfile.jinja2 similarity index 100% rename from src/promptflow/promptflow/_sdk/data/docker_csharp/Dockerfile.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/Dockerfile.jinja2 diff --git a/src/promptflow/promptflow/_sdk/data/docker_csharp/README.md b/src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/README.md similarity index 100% rename from src/promptflow/promptflow/_sdk/data/docker_csharp/README.md rename to src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/README.md diff --git a/src/promptflow/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/finish.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/finish.jinja2 similarity index 53% rename from src/promptflow/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/finish.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/finish.jinja2 index 893917dbc93..f558ebb2b45 100644 --- a/src/promptflow/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/finish.jinja2 +++ b/src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/finish.jinja2 @@ -1,4 +1,4 @@ #!/bin/bash echo "$(date -uIns) - promptflow-serve/finish $@" -echo "$(date -uIns) - Stopped all Gunicorn processes" \ No newline at end of file +echo "$(date -uIns) - Stopped all Gunicorn processes" diff --git a/src/promptflow/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/run.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/run.jinja2 similarity index 87% rename from src/promptflow/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/run.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/run.jinja2 index 6b26d0ac782..4168008ce2f 100644 --- a/src/promptflow/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/run.jinja2 +++ b/src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/runit/promptflow-serve/run.jinja2 @@ -2,4 +2,4 @@ echo "start promptflow serving" cd /flow -dotnet Promptflow.dll --port "8080" --yaml_path "flow.dag.yaml" --assembly_folder "." --connection_folder_path "../connections" --log_path "" --serving \ No newline at end of file +dotnet Promptflow.dll --port "8080" --yaml_path "flow.dag.yaml" --assembly_folder "." --connection_folder_path "../connections" --log_path "" --serving diff --git a/src/promptflow/promptflow/_sdk/data/docker_csharp/start.sh.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/start.sh.jinja2 similarity index 100% rename from src/promptflow/promptflow/_sdk/data/docker_csharp/start.sh.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/docker_csharp/start.sh.jinja2 diff --git a/src/promptflow/promptflow/_sdk/data/executable/README.md b/src/promptflow-devkit/promptflow/_sdk/data/executable/README.md similarity index 100% rename from src/promptflow/promptflow/_sdk/data/executable/README.md rename to src/promptflow-devkit/promptflow/_sdk/data/executable/README.md diff --git a/src/promptflow/promptflow/_sdk/data/executable/app.py b/src/promptflow-devkit/promptflow/_sdk/data/executable/app.py similarity index 100% rename from src/promptflow/promptflow/_sdk/data/executable/app.py rename to src/promptflow-devkit/promptflow/_sdk/data/executable/app.py diff --git a/src/promptflow/promptflow/_sdk/data/executable/app.spec.jinja2 b/src/promptflow-devkit/promptflow/_sdk/data/executable/app.spec.jinja2 similarity index 100% rename from src/promptflow/promptflow/_sdk/data/executable/app.spec.jinja2 rename to src/promptflow-devkit/promptflow/_sdk/data/executable/app.spec.jinja2 diff --git a/src/promptflow/promptflow/_sdk/data/executable/logo.png b/src/promptflow-devkit/promptflow/_sdk/data/executable/logo.png similarity index 100% rename from src/promptflow/promptflow/_sdk/data/executable/logo.png rename to src/promptflow-devkit/promptflow/_sdk/data/executable/logo.png diff --git a/src/promptflow/promptflow/_sdk/data/executable/main.py b/src/promptflow-devkit/promptflow/_sdk/data/executable/main.py similarity index 66% rename from src/promptflow/promptflow/_sdk/data/executable/main.py rename to src/promptflow-devkit/promptflow/_sdk/data/executable/main.py index 06970baf82f..a322b7a1fdb 100644 --- a/src/promptflow/promptflow/_sdk/data/executable/main.py +++ b/src/promptflow-devkit/promptflow/_sdk/data/executable/main.py @@ -10,13 +10,12 @@ from streamlit_quill import st_quill from utils import dict_iter_render_message, parse_image_content, parse_list_from_html, render_single_dict_message -from promptflow import load_flow from promptflow._constants import STREAMING_ANIMATION_TIME -from promptflow._sdk._submitter.utils import resolve_generator, resolve_generator_output_with_cache -from promptflow._sdk._utils import dump_flow_result -from promptflow._utils.multimedia_utils import convert_multimedia_data_to_base64, persist_multimedia_data - -invoker = None +from promptflow._sdk._orchestrator import TestSubmitter +from promptflow._sdk._orchestrator.utils import resolve_generator, resolve_generator_output_with_cache +from promptflow._utils.flow_utils import dump_flow_result +from promptflow._utils.multimedia_utils import BasicMultimediaProcessor +from promptflow.client import load_flow def start(): @@ -46,15 +45,18 @@ def get_chat_history_from_session(): def post_process_dump_result(response, session_state_history, *, generator_record): response = resolve_generator(response, generator_record) # Get base64 for multi modal object + # Just use BasicMultimediaProcessor to keep the original logic here. + # TODO: Add support for other multimedia types + multimedia_processor = BasicMultimediaProcessor() resolved_outputs = { - k: convert_multimedia_data_to_base64(v, with_type=True, dict_type=True) for k, v in response.output.items() + k: multimedia_processor.convert_multimedia_data_to_base64_dict(v) for k, v in response.output.items() } st.session_state.messages.append(("assistant", resolved_outputs)) session_state_history.update({"outputs": response.output}) st.session_state.history.append(session_state_history) if is_chat_flow: dump_path = Path(flow_path).parent - response.output = persist_multimedia_data( + response.output = multimedia_processor.persist_multimedia_data( response.output, base_dir=dump_path, sub_dir=Path(".promptflow/output") ) dump_flow_result(flow_folder=dump_path, flow_result=response, prefix="chat") @@ -71,55 +73,45 @@ def submit(**kwargs) -> None: render_message("user", kwargs) # Force append chat history to kwargs if is_chat_flow: - response = run_flow({chat_history_input_name: get_chat_history_from_session(), **kwargs}) - else: - response = run_flow(kwargs) - - if response.run_info.status.value == "Failed": - raise Exception(response.run_info.error) - - if is_streaming: - # Display assistant response in chat message container + kwargs[chat_history_input_name] = get_chat_history_from_session() + + flow = load_flow(flow_path) + with TestSubmitter(flow=flow, flow_context=flow.context).init(stream_output=is_streaming) as submitter: + # can't exit the context manager before the generator is fully consumed + response = submitter.flow_test(inputs=kwargs, allow_generator_output=is_streaming) + + if response.run_info.status.value == "Failed": + raise Exception(response.run_info.error) + + if is_streaming: + # Display assistant response in chat message container + with container: + with st.chat_message("assistant"): + message_placeholder = st.empty() + full_response = f"{chat_output_name}: " + prefix_length = len(full_response) + chat_output = response.output[chat_output_name] + if isinstance(chat_output, GeneratorType): + # Simulate stream of response with milliseconds delay + for chunk in resolve_generator_output_with_cache( + chat_output, generator_record, generator_key=f"run.outputs.{chat_output_name}" + ): + # there should be no extra spaces between adjacent chunks? + full_response += chunk + time.sleep(STREAMING_ANIMATION_TIME) + # Add a blinking cursor to simulate typing + message_placeholder.markdown(full_response + "▌") + message_placeholder.markdown(full_response) + response.output[chat_output_name] = full_response[prefix_length:] + post_process_dump_result(response, session_state_history, generator_record=generator_record) + return + + # generator in response has been fully consumed here + resolved_outputs = post_process_dump_result( + response, session_state_history, generator_record=generator_record + ) with container: - with st.chat_message("assistant"): - message_placeholder = st.empty() - full_response = f"{chat_output_name}: " - prefix_length = len(full_response) - chat_output = response.output[chat_output_name] - if isinstance(chat_output, GeneratorType): - # Simulate stream of response with milliseconds delay - for chunk in resolve_generator_output_with_cache( - chat_output, generator_record, generator_key=f"run.outputs.{chat_output_name}" - ): - # there should be no extra spaces between adjacent chunks? - full_response += chunk - time.sleep(STREAMING_ANIMATION_TIME) - # Add a blinking cursor to simulate typing - message_placeholder.markdown(full_response + "▌") - message_placeholder.markdown(full_response) - response.output[chat_output_name] = full_response[prefix_length:] - post_process_dump_result(response, session_state_history, generator_record=generator_record) - return - - resolved_outputs = post_process_dump_result(response, session_state_history, generator_record=generator_record) - with container: - render_message("assistant", resolved_outputs) - - def run_flow(data: dict) -> dict: - global invoker - if not invoker: - if flow_path: - flow = Path(flow_path) - else: - flow = Path(__file__).parent / "flow" - if flow.is_dir(): - os.chdir(flow) - else: - os.chdir(flow.parent) - invoker = load_flow(flow) - invoker.context.streaming = is_streaming - result = invoker.invoke(data) - return result + render_message("assistant", resolved_outputs) image = Image.open(Path(__file__).parent / "logo.png") st.set_page_config( @@ -203,12 +195,24 @@ def run_flow(data: dict) -> dict: st.rerun() +def resolve_flow_path(_from_config): + if _from_config: + result = Path(_from_config) + else: + result = Path(__file__).parent / "flow" + if result.is_dir(): + os.chdir(result) + else: + os.chdir(result.parent) + return result + + if __name__ == "__main__": with open(Path(__file__).parent / "config.json", "r") as f: config = json.load(f) is_chat_flow = config["is_chat_flow"] chat_history_input_name = config["chat_history_input_name"] - flow_path = config["flow_path"] + flow_path = resolve_flow_path(config["flow_path"]) flow_name = config["flow_name"] flow_inputs = config["flow_inputs"] label = config["label"] diff --git a/src/promptflow/promptflow/_sdk/data/executable/utils.py b/src/promptflow-devkit/promptflow/_sdk/data/executable/utils.py similarity index 97% rename from src/promptflow/promptflow/_sdk/data/executable/utils.py rename to src/promptflow-devkit/promptflow/_sdk/data/executable/utils.py index c62c283a75b..838a2e39409 100644 --- a/src/promptflow/promptflow/_sdk/data/executable/utils.py +++ b/src/promptflow-devkit/promptflow/_sdk/data/executable/utils.py @@ -5,7 +5,7 @@ import streamlit as st from bs4 import BeautifulSoup, NavigableString, Tag -from promptflow._utils.multimedia_utils import MIME_PATTERN, is_multimedia_dict +from promptflow._utils.multimedia_utils import MIME_PATTERN, BasicMultimediaProcessor def show_image(image, key=None): @@ -79,7 +79,7 @@ def list_iter_render_message(message_items): def dict_iter_render_message(message_items): - if is_multimedia_dict(message_items): + if BasicMultimediaProcessor.is_multimedia_dict(message_items): key = list(message_items.keys())[0] value = message_items[key] show_image(value, key) diff --git a/src/promptflow/promptflow/_sdk/data/visualize.j2 b/src/promptflow-devkit/promptflow/_sdk/data/visualize.j2 similarity index 100% rename from src/promptflow/promptflow/_sdk/data/visualize.j2 rename to src/promptflow-devkit/promptflow/_sdk/data/visualize.j2 diff --git a/src/promptflow/promptflow/_sdk/entities/__init__.py b/src/promptflow-devkit/promptflow/_sdk/entities/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/entities/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/entities/__init__.py diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/__init__.py b/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/__init__.py new file mode 100644 index 00000000000..1c6a05164f8 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/__init__.py @@ -0,0 +1,4 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_group.py b/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_group.py new file mode 100644 index 00000000000..138112199fa --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_group.py @@ -0,0 +1,236 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import time +from collections import Counter +from itertools import cycle +from typing import Any, Dict, List, Optional + +from promptflow._sdk._constants import STOP_SIGNAL, ChatGroupSpeakOrder +from promptflow._sdk._errors import ChatGroupError +from promptflow._sdk.entities._chat_group._chat_role import ChatRole +from promptflow._utils.logger_utils import get_cli_sdk_logger + +logger = get_cli_sdk_logger() + + +class ChatGroup: + """Chat group entity, can invoke a multi-turn conversation with multiple chat roles. + + :param roles: List of chat roles in the chat group. + :type roles: List[ChatRole] + :param speak_order: Speak order of the chat group. Default to be sequential which is the order of the roles list. + :type speak_order: ChatGroupSpeakOrder + :param max_turns: Maximum turns of the chat group. Default to be None which means no limit. + :type max_turns: Optional[int] + :param max_tokens: Maximum tokens of the chat group. Default to be None which means no limit. + :type max_tokens: Optional[int] + :param max_time: Maximum time of the chat group. Default to be None which means no limit. + :type max_time: Optional[int] + :param stop_signal: Stop signal of the chat group. Default to be "[STOP]". + :type stop_signal: Optional[str] + :param entry_role: Entry role of the chat group. Default to be None which means the first role in the roles list. + Only meaningful when speak order is not sequential. + """ + + def __init__( + self, + roles: List[ChatRole], + speak_order: ChatGroupSpeakOrder = ChatGroupSpeakOrder.SEQUENTIAL, + max_turns: Optional[int] = None, + max_tokens: Optional[int] = None, + max_time: Optional[int] = None, + stop_signal: Optional[str] = STOP_SIGNAL, + entry_role: Optional[ChatRole] = None, + ): + self._roles = roles + self._speak_order = speak_order + self._roles_dict, self._speak_order_list = self._prepare_roles(roles, entry_role, speak_order) + self._max_turns, self._max_tokens, self._max_time = self._validate_int_parameters( + max_turns, max_tokens, max_time + ) + self._stop_signal = stop_signal + self._entry_role = entry_role + self._conversation_history = [] + + @property + def conversation_history(self): + return self._conversation_history + + def _prepare_roles(self, roles: List[ChatRole], entry_role: ChatRole, speak_order: ChatGroupSpeakOrder): + """Prepare roles""" + logger.info("Preparing roles in chat group.") + # check roles is a non-empty list of ChatRole + if not isinstance(roles, list) or len(roles) == 0 or not all(isinstance(role, ChatRole) for role in roles): + raise ChatGroupError(f"Agents should be a non-empty list of ChatRole. Got {roles!r} instead.") + + # check entry_role is in roles + if entry_role is not None and entry_role not in roles: + raise ChatGroupError(f"Entry role {entry_role.role} is not in roles list {roles!r}.") + + # check if there is duplicate role name + role_names = [role.role for role in roles] + if len(role_names) != len(set(role_names)): + counter = Counter(role_names) + duplicate_roles = [role for role in counter if counter[role] > 1] + raise ChatGroupError(f"Duplicate roles are not allowed: {duplicate_roles!r}.") + + speak_order_list = self._get_speak_order(roles, entry_role, speak_order) + roles_dict = {role.role: role for role in roles} + return roles_dict, cycle(speak_order_list) + + def _get_speak_order( + self, roles: List[ChatRole], entry_role: Optional[ChatRole], speak_order: ChatGroupSpeakOrder + ) -> List[str]: + """Calculate speak order""" + if speak_order == ChatGroupSpeakOrder.SEQUENTIAL: + if entry_role: + logger.warn( + f"Entry role {entry_role.role!r} is ignored when speak order is sequential. " + f"The first role in the list will be the entry role: {roles[0].role!r}." + ) + + speak_order_list = [role.role for role in roles] + logger.info(f"Role speak order is {speak_order_list!r}.") + return speak_order_list + else: + raise NotImplementedError(f"Speak order {speak_order.value!r} is not supported yet.") + + @staticmethod + def _validate_int_parameters(max_turns: int, max_tokens: int, max_time: int): + """Validate int parameters""" + logger.debug("Validating integer parameters for chat group.") + if max_turns is not None and not isinstance(max_turns, int): + raise ChatGroupError(f"max_turns should be an integer. Got {type(max_turns)!r} instead.") + if max_tokens is not None and not isinstance(max_tokens, int): + raise ChatGroupError(f"max_tokens should be an integer. Got {type(max_tokens)!r} instead.") + if max_time is not None and not isinstance(max_time, int): + raise ChatGroupError(f"max_time should be an integer. Got {type(max_time)!r} instead.") + + logger.info( + f"Chat group maximum turns: {max_turns!r}, maximum tokens: {max_tokens!r}, maximum time: {max_time!r}." + ) + return max_turns, max_tokens, max_time + + def invoke(self): + """Invoke the chat group""" + logger.info("Invoking chat group.") + + chat_round = 0 + chat_token = 0 + chat_start_time = time.time() + self._conversation_history = [] + while True: + chat_round += 1 + + # select current role and run + current_role = self._select_role() + logger.info(f"[Round {chat_round}] Chat role {current_role.role!r} is speaking.") + role_input_values = self._get_role_input_values(current_role) + # TODO: Hide flow-invoker and executor log for execution + result = current_role.invoke(**role_input_values) + logger.info(f"[Round {chat_round}] Chat role {current_role.role!r} result: {result!r}.") + + # post process after role's invocation + self._update_information_with_result(current_role, result) + # TODO: Get used token from result and update chat_token + + # check if the chat group should continue + continue_chat = self._check_continue_condition(chat_round, chat_token, chat_start_time) + if not continue_chat: + logger.info( + f"Chat group stops at round {chat_round!r}, token cost {chat_token!r}, " + f"time cost {round(time.time() - chat_start_time, 2)} seconds." + ) + break + + def _select_role(self) -> ChatRole: + """Select next role""" + if self._speak_order == ChatGroupSpeakOrder.LLM: + return self._predict_next_role_with_llm() + next_role_name = next(self._speak_order_list) + return self._roles_dict[next_role_name] + + def _get_role_input_values(self, role: ChatRole) -> Dict[str, Any]: + """Get role input values""" + input_values = {} + for key in role.inputs: + role_input = role.inputs[key] + value = role_input.get("value", None) + # only conversation history binding needs to be processed here, other values are specified when + # initializing the chat role. + if value == "${parent.conversation_history}": + value = self._conversation_history + elif isinstance(value, str) and value.startswith("${"): + raise ChatGroupError(f"Unresolved input value {value!r} for role {role.role!r}.") + input_values[key] = value + logger.debug(f"Input values for role {role.role!r}: {input_values!r}") + return input_values + + def _update_information_with_result(self, role: ChatRole, result: dict) -> None: + """Update information with result""" + logger.debug(f"Updating chat group information with result from role {role.role!r}: {result!r}.") + + # 1. update group chat history + self._update_conversation_history(role, result) + + # 2. Update the role output value + for key, value in result.items(): + if key in role.outputs: + role.outputs[key]["value"] = value + + def _update_conversation_history(self, role: ChatRole, result: dict) -> None: + """Update conversation history""" + self._conversation_history.append((role.role, result)) + + def _check_continue_condition(self, chat_round: int, chat_token: int, chat_start_time: float) -> bool: + continue_chat = True + time_cost = time.time() - chat_start_time + + # 1. check if the chat round reaches the maximum + if self._max_turns is not None and chat_round >= self._max_turns: + logger.warn(f"Chat round {chat_round!r} reaches the maximum {self._max_turns!r}.") + continue_chat = False + + # 2. check if the chat token reaches the maximum + if self._max_tokens is not None and chat_token >= self._max_tokens: + logger.warn(f"Chat token {chat_token!r} reaches the maximum {self._max_tokens!r}.") + continue_chat = False + + # 3. check if the chat time reaches the maximum + if self._max_time is not None and time_cost >= self._max_time: + logger.warn(f"Chat time reaches the maximum {self._max_time!r} seconds.") + continue_chat = False + + # TODO: How to apply stop signal since a role can have multiple outputs? + if continue_chat: + logger.info( + f"Chat group continues at round {chat_round!r}, " + f"token cost {chat_token!r}, time cost {round(time_cost, 2)!r} seconds." + ) + return continue_chat + + def _predict_next_role_with_llm(self) -> ChatRole: + """Predict next role for non-deterministic speak order.""" + raise NotImplementedError(f"Speak order {self._speak_order} is not supported yet.") + + @classmethod + def _from_node(cls, node: "ChatGroupNode", context: "ExperimentTemplateTestContext"): + """Create a chat group from a chat group node.""" + logger.debug(f"Creating chat group instance from chat group node {node.name!r}...") + roles = [ChatRole(flow=role.pop("path"), **role) for role in node.roles] + chat_group = cls( + roles=roles, + max_turns=node.max_turns, + max_tokens=node.max_tokens, + max_time=node.max_time, + stop_signal=node.stop_signal, + ) + logger.debug(f"Updating role inputs for chat group {node.name!r}.") + chat_group._update_role_inputs(context) + return chat_group + + def _update_role_inputs(self, context: "ExperimentTemplateTestContext"): + """Update role inputs with context.""" + for role in self._roles: + role._update_inputs_from_data_and_inputs(data=context.test_data, inputs=context.test_inputs) diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_group_io.py b/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_group_io.py new file mode 100644 index 00000000000..91c96ca333f --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_group_io.py @@ -0,0 +1,37 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from collections import UserDict +from typing import Any + +from promptflow._sdk._errors import UnexpectedAttributeError + + +class AttrDict(UserDict): + def __init__(self, inputs: dict, **kwargs: Any): + super().__init__(**inputs, **kwargs) + + def __getattr__(self, item: Any): + return self.__getitem__(item) + + def __getitem__(self, item: Any): + if item not in self: + raise UnexpectedAttributeError(f"Invalid attribute {item!r}, expected one of {list(self.keys())}.") + res = super().__getitem__(item) + return res + + +class ChatRoleInputs(AttrDict): + """Chat role inputs""" + + +class ChatRoleOutputs(AttrDict): + """Chat role outputs""" + + +class ChatGroupInputs(AttrDict): + """Chat group inputs""" + + +class ChatGroupOutputs(AttrDict): + """Chat group outputs""" diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_role.py b/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_role.py new file mode 100644 index 00000000000..34d272a8b05 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_chat_group/_chat_role.py @@ -0,0 +1,121 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from os import PathLike +from pathlib import Path +from typing import Dict, Optional, Union + +from promptflow._sdk._constants import DAG_FILE_NAME +from promptflow._sdk._errors import ChatRoleError +from promptflow._sdk._load_functions import load_flow +from promptflow._sdk.entities._chat_group._chat_group_io import ChatRoleInputs, ChatRoleOutputs +from promptflow._utils.logger_utils import get_cli_sdk_logger +from promptflow._utils.yaml_utils import load_yaml + +logger = get_cli_sdk_logger() + + +class ChatRole: + """Chat role entity, used in a chat group to participate in a multi-turn conversation. + + :param flow: Path to the flow file. + :type flow: Union[str, PathLike] + :param role: Role of the chat role. e.g. assistant, user, etc. + :type role: str + :param name: Name of the chat role. If not provided, it will be the flow folder name. + :type name: Optional[str] + :param inputs: Inputs value for the chat role. + :type inputs: Optional[Dict] + """ + + def __init__(self, flow: Union[str, PathLike], role: str, inputs: Optional[Dict] = None, **kwargs): + self._role = role + self._flow, self._flow_object = self._validate_flow(flow) + self._inputs, self._outputs = self._build_role_io(flow, inputs) + logger.info(f"Created chat role {self.role!r} with flow {self._flow.as_posix()!r}") + + @property + def role(self): + """Role of the chat role""" + return self._role + + @property + def inputs(self): + """Inputs of the chat role""" + return self._inputs + + @property + def outputs(self): + """Outputs of the chat role""" + return self._outputs + + def _validate_flow(self, flow: Union[str, PathLike]): + """Validate flow""" + logger.debug(f"Validating chat role flow source {flow!r}") + flow_path = Path(flow).resolve() + try: + flow_object = load_flow(flow_path) + except Exception as e: + raise ChatRoleError(f"Failed to create chat role {self.role!r} due to: {str(e)}.") from e + return flow_path, flow_object + + def _build_role_io(self, flow: Union[str, PathLike], inputs_value: Dict = None): + """Build role io""" + logger.debug(f"Building io for chat role {self.role!r}.") + flow_dict = load_yaml(Path(flow) / DAG_FILE_NAME) + inputs = flow_dict.get("inputs", {}) + for key in inputs: + # fill the inputs with the provided values + # TODO: Shall we check the value type here or leave it to executor? + inputs[key]["value"] = inputs_value.get(key, None) + # current reference is an in-flow reference, not needed here + inputs[key].pop("reference", None) + outputs = flow_dict.get("outputs", {}) + for key in outputs: + # current reference is an in-flow reference, not needed here + outputs[key].pop("reference", None) + + # check for ignored inputs + ignored_keys = set(inputs_value.keys()) - set(inputs.keys()) + if ignored_keys: + logger.warning( + f"Ignoring inputs {ignored_keys!r} for chat role {self.role!r}, " + f"expected one of {list(inputs.keys())!r}." + ) + + # check for missing inputs + missing_keys = [] + for key in inputs: + if inputs[key].get("value") is None and inputs[key].get("default") is None: + missing_keys.append(key) + if missing_keys: + logger.warning( + f"Missing inputs {missing_keys!r} for chat role {self.role!r}. These inputs does not have provided " + f"value or default value." + ) + return ChatRoleInputs(inputs), ChatRoleOutputs(outputs) + + def _update_inputs_from_data_and_inputs(self, data: Dict, inputs: Dict): + """Update inputs from data and inputs from experiment""" + data_prefix = "${data." + inputs_prefix = "${inputs." + for key in self._inputs: + current_input = self._inputs[key] + value = current_input["value"] + if isinstance(value, str): + if value.startswith(data_prefix): + stripped_value = value.replace(data_prefix, "").replace("}", "") + data_name, col_name = stripped_value.split(".") + if data_name in data and col_name in data[data_name]: + current_input["value"] = data[data_name][col_name] + elif value.startswith(inputs_prefix): + input_name = value.replace(inputs_prefix, "").replace("}", "") + if input_name in inputs and input_name in inputs: + current_input["value"] = inputs[input_name] + + def invoke(self, *args, **kwargs): + """Invoke chat role""" + if args: + raise ChatRoleError(f"Chat role invoke does not accept positional arguments, got {args!r} instead.") + result = self._flow_object(**kwargs) or {} + return result diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_connection.py b/src/promptflow-devkit/promptflow/_sdk/entities/_connection.py new file mode 100644 index 00000000000..1c07966b543 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_connection.py @@ -0,0 +1,539 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import abc +import importlib +import json +from os import PathLike +from pathlib import Path +from typing import Dict, Union + +from marshmallow import INCLUDE + +from promptflow._constants import ConnectionType, CustomStrongTypeConnectionConfigs +from promptflow._sdk._constants import ( + BASE_PATH_CONTEXT_KEY, + PARAMS_OVERRIDE_KEY, + SCHEMA_KEYS_CONTEXT_CONFIG_KEY, + SCHEMA_KEYS_CONTEXT_SECRET_KEY, + SCRUBBED_VALUE, + SCRUBBED_VALUE_USER_INPUT, + ConfigValueType, +) +from promptflow._sdk._errors import SDKError, UnsecureConnectionError +from promptflow._sdk._orm.connection import Connection as ORMConnection +from promptflow._sdk._utils import ( + decrypt_secret_value, + encrypt_secret_value, + find_type_in_override, + print_yellow_warning, +) +from promptflow._sdk.entities._yaml_translatable import YAMLTranslatableMixin +from promptflow._sdk.schemas._connection import ( + AzureContentSafetyConnectionSchema, + AzureOpenAIConnectionSchema, + CognitiveSearchConnectionSchema, + CustomConnectionSchema, + CustomStrongTypeConnectionSchema, + FormRecognizerConnectionSchema, + OpenAIConnectionSchema, + QdrantConnectionSchema, + SerpConnectionSchema, + ServerlessConnectionSchema, + WeaviateConnectionSchema, +) +from promptflow._utils.logger_utils import LoggerFactory +from promptflow._utils.utils import snake_to_camel +from promptflow.contracts.types import Secret +from promptflow.core._connection import AzureContentSafetyConnection as _CoreAzureContentSafetyConnection +from promptflow.core._connection import AzureOpenAIConnection as _CoreAzureOpenAIConnection +from promptflow.core._connection import CognitiveSearchConnection as _CoreCognitiveSearchConnection +from promptflow.core._connection import CustomConnection as _CoreCustomConnection +from promptflow.core._connection import CustomStrongTypeConnection as _CoreCustomStrongTypeConnection +from promptflow.core._connection import FormRecognizerConnection as _CoreFormRecognizerConnection +from promptflow.core._connection import OpenAIConnection as _CoreOpenAIConnection +from promptflow.core._connection import QdrantConnection as _CoreQdrantConnection +from promptflow.core._connection import SerpConnection as _CoreSerpConnection +from promptflow.core._connection import ServerlessConnection as _CoreServerlessConnection +from promptflow.core._connection import WeaviateConnection as _CoreWeaviateConnection +from promptflow.core._connection import _Connection as _CoreConnection +from promptflow.core._connection import _StrongTypeConnection as _CoreStrongTypeConnection +from promptflow.exceptions import UserErrorException, ValidationException + +logger = LoggerFactory.get_logger(name=__name__) +PROMPTFLOW_CONNECTIONS = "promptflow.connections" + + +class _Connection(_CoreConnection, YAMLTranslatableMixin): + SUPPORTED_TYPES = {} + + @classmethod + def _casting_type(cls, typ): + type_dict = { + "azure_open_ai": ConnectionType.AZURE_OPEN_AI.value, + "open_ai": ConnectionType.OPEN_AI.value, + } + + if typ in type_dict: + return type_dict.get(typ) + return snake_to_camel(typ) + + @classmethod + def _is_user_input_value(cls, value): + """The value will prompt user to input in cli for both create and update.""" + return value == SCRUBBED_VALUE_USER_INPUT + + def _validate_and_encrypt_secrets(self): + encrypt_secrets = {} + invalid_secrets = [] + for k, v in self.secrets.items(): + # In sdk experience, if v is not scrubbed, use it. + # If v is scrubbed, try to use the value in _secrets. + # If v is , raise error. + if self._is_scrubbed_value(v): + # Try to get the value not scrubbed. + v = self._secrets.get(k) + if self._is_scrubbed_value(v) or self._is_user_input_value(v): + # Can't find the original value or is , raise error. + invalid_secrets.append(k) + continue + encrypt_secrets[k] = encrypt_secret_value(v) + if invalid_secrets: + raise ValidationException( + f"Connection {self.name!r} secrets {invalid_secrets} value invalid, please fill them." + ) + return encrypt_secrets + + @classmethod + def _load_from_dict(cls, data: Dict, context: Dict, additional_message: str = None, **kwargs): + schema_cls = cls._get_schema_cls() + try: + loaded_data = schema_cls(context=context).load(data, **kwargs) + except Exception as e: + raise SDKError(f"Load connection failed with {str(e)}. f{(additional_message or '')}.") + return cls(base_path=context[BASE_PATH_CONTEXT_KEY], **loaded_data) + + def _to_dict(self) -> Dict: + schema_cls = self._get_schema_cls() + return schema_cls(context={BASE_PATH_CONTEXT_KEY: "./"}).dump(self) + + @classmethod + # pylint: disable=unused-argument + def _resolve_cls_and_type(cls, data, params_override=None): + type_in_override = find_type_in_override(params_override) + type_str = type_in_override or data.get("type") + if type_str is None: + raise ValidationException("type is required for connection.") + type_str = cls._casting_type(type_str) + type_cls = cls.SUPPORTED_TYPES.get(type_str) + if type_cls is None: + raise ValidationException( + f"Connection type {type_str!r} is not supported. " + f"Supported types are: {list(cls.SUPPORTED_TYPES.keys())}" + ) + return type_cls, type_str + + @abc.abstractmethod + def _to_orm_object(self) -> ORMConnection: + pass + + @classmethod + def _from_mt_rest_object(cls, mt_rest_obj) -> "_Connection": + type_cls, _ = cls._resolve_cls_and_type(data={"type": mt_rest_obj.connection_type}) + obj = type_cls._from_mt_rest_object(mt_rest_obj) + return obj + + @classmethod + def _from_orm_object_with_secrets(cls, orm_object: ORMConnection): + # !!! Attention !!!: Do not use this function to user facing api, use _from_orm_object to remove secrets. + type_cls, _ = cls._resolve_cls_and_type(data={"type": orm_object.connectionType}) + obj = type_cls._from_orm_object_with_secrets(orm_object) + return obj + + @classmethod + def _from_orm_object(cls, orm_object: ORMConnection): + """This function will create a connection object then scrub secrets.""" + type_cls, _ = cls._resolve_cls_and_type(data={"type": orm_object.connectionType}) + obj = type_cls._from_orm_object_with_secrets(orm_object) + # Note: we may can't get secret keys for custom connection from MT + obj.secrets = {k: SCRUBBED_VALUE for k in obj.secrets} + return obj + + @classmethod + def _load( + cls, + data: Dict = None, + yaml_path: Union[PathLike, str] = None, + params_override: list = None, + **kwargs, + ) -> "_Connection": + """Load a connection object from a yaml file. + + :param cls: Indicates that this is a class method. + :type cls: class + :param data: Data Dictionary, defaults to None + :type data: Dict, optional + :param yaml_path: YAML Path, defaults to None + :type yaml_path: Union[PathLike, str], optional + :param params_override: Fields to overwrite on top of the yaml file. + Format is [{"field1": "value1"}, {"field2": "value2"}], defaults to None + :type params_override: List[Dict], optional + :param kwargs: A dictionary of additional configuration parameters. + :type kwargs: dict + :raises Exception: An exception + :return: Loaded a connection object. + :rtype: ~promptflow._sdk.entities._connection._Connection + """ + data = data or {} + params_override = params_override or [] + context = { + BASE_PATH_CONTEXT_KEY: Path(yaml_path).parent if yaml_path else Path("../../azure/_entities/"), + PARAMS_OVERRIDE_KEY: params_override, + } + connection_type, type_str = cls._resolve_cls_and_type(data, params_override) + connection = connection_type._load_from_dict( + data=data, + context=context, + unknown=INCLUDE, + additional_message=f"If you are trying to configure a job that is not of type {type_str}, please specify " + f"the correct connection type in the 'type' property.", + **kwargs, + ) + return connection + + +class _StrongTypeConnection(_CoreStrongTypeConnection, _Connection): + def _to_orm_object(self): + # Both keys & secrets will be stored in configs for strong type connection. + secrets = self._validate_and_encrypt_secrets() + return ORMConnection( + connectionName=self.name, + connectionType=self.type, + configs=json.dumps({**self.configs, **secrets}), + customConfigs="{}", + expiryTime=self.expiry_time, + createdDate=self.created_date, + lastModifiedDate=self.last_modified_date, + ) + + @classmethod + def _from_orm_object_with_secrets(cls, orm_object: ORMConnection): + # !!! Attention !!!: Do not use this function to user facing api, use _from_orm_object to remove secrets. + # Both keys & secrets will be stored in configs for strong type connection. + type_cls, _ = cls._resolve_cls_and_type(data={"type": orm_object.connectionType}) + obj = type_cls( + name=orm_object.connectionName, + expiry_time=orm_object.expiryTime, + created_date=orm_object.createdDate, + last_modified_date=orm_object.lastModifiedDate, + **json.loads(orm_object.configs), + ) + obj.secrets = {k: decrypt_secret_value(obj.name, v) for k, v in obj.secrets.items()} + obj._secrets = {**obj.secrets} + return obj + + @classmethod + def _from_mt_rest_object(cls, mt_rest_obj): + type_cls, _ = cls._resolve_cls_and_type(data={"type": mt_rest_obj.connection_type}) + configs = mt_rest_obj.configs or {} + # For not ARM strong type connection, e.g. OpenAI, api_key will not be returned, but is required argument. + # For ARM strong type connection, api_key will be None and missing when conn._to_dict(), so set a scrubbed one. + configs.update({"api_key": SCRUBBED_VALUE}) + obj = type_cls( + name=mt_rest_obj.connection_name, + expiry_time=mt_rest_obj.expiry_time, + created_date=mt_rest_obj.created_date, + last_modified_date=mt_rest_obj.last_modified_date, + **configs, + ) + return obj + + +class AzureOpenAIConnection(_CoreAzureOpenAIConnection, _StrongTypeConnection): + __doc__ = _CoreAzureOpenAIConnection.__doc__ + DATA_CLASS = _CoreAzureOpenAIConnection + + @classmethod + def _get_schema_cls(cls): + return AzureOpenAIConnectionSchema + + +class OpenAIConnection(_CoreOpenAIConnection, _StrongTypeConnection): + __doc__ = _CoreOpenAIConnection.__doc__ + DATA_CLASS = _CoreOpenAIConnection + + @classmethod + def _get_schema_cls(cls): + return OpenAIConnectionSchema + + +class ServerlessConnection(_CoreServerlessConnection, _StrongTypeConnection): + __doc__ = _CoreServerlessConnection.__doc__ + DATA_CLASS = _CoreServerlessConnection + + @classmethod + def _get_schema_cls(cls): + return ServerlessConnectionSchema + + +class SerpConnection(_CoreSerpConnection, _StrongTypeConnection): + __doc__ = _CoreSerpConnection.__doc__ + DATA_CLASS = _CoreSerpConnection + + @classmethod + def _get_schema_cls(cls): + return SerpConnectionSchema + + +class QdrantConnection(_CoreQdrantConnection, _StrongTypeConnection): + __doc__ = _CoreQdrantConnection.__doc__ + DATA_CLASS = _CoreQdrantConnection + + @classmethod + def _get_schema_cls(cls): + return QdrantConnectionSchema + + +class WeaviateConnection(_CoreWeaviateConnection, _StrongTypeConnection): + __doc__ = _CoreWeaviateConnection.__doc__ + DATA_CLASS = _CoreWeaviateConnection + + @classmethod + def _get_schema_cls(cls): + return WeaviateConnectionSchema + + +class CognitiveSearchConnection(_CoreCognitiveSearchConnection, _StrongTypeConnection): + __doc__ = _CoreCognitiveSearchConnection.__doc__ + DATA_CLASS = _CoreCognitiveSearchConnection + + @classmethod + def _get_schema_cls(cls): + return CognitiveSearchConnectionSchema + + +class AzureContentSafetyConnection(_CoreAzureContentSafetyConnection, _StrongTypeConnection): + __doc__ = _CoreAzureContentSafetyConnection.__doc__ + DATA_CLASS = _CoreAzureContentSafetyConnection + + @classmethod + def _get_schema_cls(cls): + return AzureContentSafetyConnectionSchema + + +class FormRecognizerConnection(_CoreFormRecognizerConnection, AzureContentSafetyConnection): + __doc__ = _CoreFormRecognizerConnection.__doc__ + DATA_CLASS = _CoreFormRecognizerConnection + + @classmethod + def _get_schema_cls(cls): + return FormRecognizerConnectionSchema + + +class CustomStrongTypeConnection(_CoreCustomStrongTypeConnection, _Connection): + __doc__ = _CoreCustomStrongTypeConnection.__doc__ + DATA_CLASS = _CoreCustomStrongTypeConnection + + def _to_orm_object(self) -> ORMConnection: + custom_connection = self._convert_to_custom() + return custom_connection._to_orm_object() + + def _convert_to_custom(self): + # update configs + self.configs.update({CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY: self.custom_type}) + self.configs.update({CustomStrongTypeConnectionConfigs.PROMPTFLOW_MODULE_KEY: self.module}) + if self.package and self.package_version: + self.configs.update({CustomStrongTypeConnectionConfigs.PROMPTFLOW_PACKAGE_KEY: self.package}) + self.configs.update( + {CustomStrongTypeConnectionConfigs.PROMPTFLOW_PACKAGE_VERSION_KEY: self.package_version} + ) + + custom_connection = CustomConnection(configs=self.configs, secrets=self.secrets, **self.kwargs) + return custom_connection + + @classmethod + def _get_custom_keys(cls, data: Dict): + # The data could be either from yaml or from DB. + # If from yaml, 'custom_type' and 'module' are outside the configs of data. + # If from DB, 'custom_type' and 'module' are within the configs of data. + if not data.get(CustomStrongTypeConnectionConfigs.TYPE) or not data.get( + CustomStrongTypeConnectionConfigs.MODULE + ): + if ( + not data["configs"][CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY] + or not data["configs"][CustomStrongTypeConnectionConfigs.PROMPTFLOW_MODULE_KEY] + ): + error = ValueError("custom_type and module are required for custom strong type connections.") + raise UserErrorException(message=str(error), error=error) + else: + m = data["configs"][CustomStrongTypeConnectionConfigs.PROMPTFLOW_MODULE_KEY] + custom_cls = data["configs"][CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY] + else: + m = data[CustomStrongTypeConnectionConfigs.MODULE] + custom_cls = data[CustomStrongTypeConnectionConfigs.TYPE] + + try: + module = importlib.import_module(m) + cls = getattr(module, custom_cls) + except ImportError: + error = ValueError( + f"Can't find module {m} in current environment. Please check the module is correctly configured." + ) + raise UserErrorException(message=str(error), error=error) + except AttributeError: + error = ValueError( + f"Can't find class {custom_cls} in module {m}. " + f"Please check the custom_type is correctly configured." + ) + raise UserErrorException(message=str(error), error=error) + + schema_configs = {} + schema_secrets = {} + + for k, v in cls.__annotations__.items(): + if v == Secret: + schema_secrets[k] = v + else: + schema_configs[k] = v + + return schema_configs, schema_secrets + + @classmethod + def _get_schema_cls(cls): + return CustomStrongTypeConnectionSchema + + @classmethod + def _load_from_dict(cls, data: Dict, context: Dict, additional_message: str = None, **kwargs): + schema_config_keys, schema_secret_keys = cls._get_custom_keys(data) + context[SCHEMA_KEYS_CONTEXT_CONFIG_KEY] = schema_config_keys + context[SCHEMA_KEYS_CONTEXT_SECRET_KEY] = schema_secret_keys + + return (super()._load_from_dict(data, context, additional_message, **kwargs))._convert_to_custom() + + +class CustomConnection(_CoreCustomConnection, _Connection): + __doc__ = _CoreCustomConnection.__doc__ + DATA_CLASS = _CoreCustomConnection + + @classmethod + def _get_schema_cls(cls): + return CustomConnectionSchema + + @classmethod + def _load_from_dict(cls, data: Dict, context: Dict, additional_message: str = None, **kwargs): + # If context has params_override, it means the data would be updated by overridden values. + # Provide CustomStrongTypeConnectionSchema if 'custom_type' in params_override, else CustomConnectionSchema. + # For example: + # If a user updates an existing connection by re-upserting a connection file, + # the 'data' from DB is CustomConnection, + # but 'params_override' would actually contain custom strong type connection data. + is_custom_strong_type = data.get(CustomStrongTypeConnectionConfigs.TYPE) or any( + CustomStrongTypeConnectionConfigs.TYPE in d for d in context.get(PARAMS_OVERRIDE_KEY, []) + ) + if is_custom_strong_type: + return CustomStrongTypeConnection._load_from_dict(data, context, additional_message, **kwargs) + + return super()._load_from_dict(data, context, additional_message, **kwargs) + + def _to_orm_object(self): + # Both keys & secrets will be set in custom configs with value type specified for custom connection. + if not self.secrets: + error = ValueError( + "Secrets is required for custom connection, " + "please use CustomConnection(configs={key1: val1}, secrets={key2: val2}) " + "to initialize custom connection." + ) + raise UserErrorException(message=str(error), error=error) + custom_configs = { + k: {"configValueType": ConfigValueType.STRING.value, "value": v} for k, v in self.configs.items() + } + encrypted_secrets = self._validate_and_encrypt_secrets() + custom_configs.update( + {k: {"configValueType": ConfigValueType.SECRET.value, "value": v} for k, v in encrypted_secrets.items()} + ) + + return ORMConnection( + connectionName=self.name, + connectionType=self.type, + configs="{}", + customConfigs=json.dumps(custom_configs), + expiryTime=self.expiry_time, + createdDate=self.created_date, + lastModifiedDate=self.last_modified_date, + ) + + @classmethod + def _from_orm_object_with_secrets(cls, orm_object: ORMConnection): + # !!! Attention !!!: Do not use this function to user facing api, use _from_orm_object to remove secrets. + # Both keys & secrets will be set in custom configs with value type specified for custom connection. + configs = { + k: v["value"] + for k, v in json.loads(orm_object.customConfigs).items() + if v["configValueType"] == ConfigValueType.STRING.value + } + + secrets = {} + unsecure_connection = False + custom_type = None + for k, v in json.loads(orm_object.customConfigs).items(): + if k == CustomStrongTypeConnectionConfigs.PROMPTFLOW_TYPE_KEY: + custom_type = v["value"] + continue + if not v["configValueType"] == ConfigValueType.SECRET.value: + continue + try: + secrets[k] = decrypt_secret_value(orm_object.connectionName, v["value"]) + except UnsecureConnectionError: + # This is to workaround old custom secrets that are not encrypted with Fernet. + unsecure_connection = True + secrets[k] = v["value"] + if unsecure_connection: + print_yellow_warning( + f"Warning: Please delete and re-create connection {orm_object.connectionName} " + "due to a security issue in the old sdk version." + ) + + return cls( + name=orm_object.connectionName, + configs=configs, + secrets=secrets, + custom_type=custom_type, + expiry_time=orm_object.expiryTime, + created_date=orm_object.createdDate, + last_modified_date=orm_object.lastModifiedDate, + ) + + @classmethod + def _from_mt_rest_object(cls, mt_rest_obj): + type_cls, _ = cls._resolve_cls_and_type(data={"type": mt_rest_obj.connection_type}) + if not mt_rest_obj.custom_configs: + mt_rest_obj.custom_configs = {} + configs = { + k: v.value + for k, v in mt_rest_obj.custom_configs.items() + if v.config_value_type == ConfigValueType.STRING.value + } + + secrets = { + k: v.value + for k, v in mt_rest_obj.custom_configs.items() + if v.config_value_type == ConfigValueType.SECRET.value + } + + return cls( + name=mt_rest_obj.connection_name, + configs=configs, + secrets=secrets, + expiry_time=mt_rest_obj.expiry_time, + created_date=mt_rest_obj.created_date, + last_modified_date=mt_rest_obj.last_modified_date, + ) + + +# Note: Do not import this from core connection. +# As we need the class here. +_Connection.SUPPORTED_TYPES = { + v.TYPE: v + for v in globals().values() + if isinstance(v, type) and issubclass(v, _Connection) and not v.__name__.startswith("_") +} diff --git a/src/promptflow/promptflow/_sdk/entities/_experiment.py b/src/promptflow-devkit/promptflow/_sdk/entities/_experiment.py similarity index 89% rename from src/promptflow/promptflow/_sdk/entities/_experiment.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_experiment.py index a457d42123b..23454270914 100644 --- a/src/promptflow/promptflow/_sdk/entities/_experiment.py +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_experiment.py @@ -27,6 +27,7 @@ from promptflow._sdk.entities._validation import MutableValidationResult, SchemaValidatableMixin from promptflow._sdk.entities._yaml_translatable import YAMLTranslatableMixin from promptflow._sdk.schemas._experiment import ( + ChatGroupSchema, CommandNodeSchema, ExperimentDataSchema, ExperimentInputSchema, @@ -128,7 +129,7 @@ def _save_snapshot(self, target): """Save flow source to experiment snapshot.""" # Resolve additional includes in flow from .._load_functions import load_flow - from .._submitter import remove_additional_includes + from .._orchestrator import remove_additional_includes Path(target).mkdir(parents=True, exist_ok=True) flow = load_flow(source=self.path) @@ -188,6 +189,51 @@ def _save_snapshot(self, target): self.code = saved_path.resolve().absolute().as_posix() +class ChatGroupNode(YAMLTranslatableMixin): + def __init__( + self, + name, + roles: List[Dict[str, Any]], + max_turns: Optional[int] = None, + max_tokens: Optional[int] = None, + max_time: Optional[int] = None, + stop_signal: Optional[str] = None, + code: Union[Path, str] = None, + **kwargs, + ): + self.type = ExperimentNodeType.CHAT_GROUP + self.name = name + self.roles = roles + self.max_turns = max_turns + self.max_tokens = max_tokens + self.max_time = max_time + self.stop_signal = stop_signal + self.code = code + + @classmethod + def _get_schema_cls(cls): + return ChatGroupSchema + + def _save_snapshot(self, target): + """Save chat group source to experiment snapshot.""" + target = Path(target).resolve() + logger.debug(f"Saving chat group node {self.name!r} snapshot to {target.as_posix()!r}.") + saved_path = target / self.name + saved_path.mkdir(parents=True, exist_ok=True) + + for role in self.roles: + role_path = Path(role["path"]).resolve() + if not role_path.exists(): + raise ExperimentValueError(f"Chat role path {role_path.as_posix()!r} does not exist.") + + if role_path.is_dir(): + shutil.copytree(src=role_path, dst=saved_path / role["role"]) + else: + shutil.copytree(src=role_path.parent, dst=saved_path / role["role"]) + + self.code = saved_path.resolve().as_posix() + + class ExperimentTemplate(YAMLTranslatableMixin, SchemaValidatableMixin): def __init__(self, nodes, description=None, data=None, inputs=None, **kwargs): self._base_path = kwargs.get(BASE_PATH_CONTEXT_KEY, Path(".")) @@ -366,6 +412,10 @@ def _from_orm_object(cls, obj: ORMExperiment) -> "Experiment": nodes.append( CommandNode._load_from_dict(node_dict, context=context, additional_message="Failed to load node.") ) + elif node_dict["type"] == ExperimentNodeType.CHAT_GROUP: + nodes.append( + ChatGroupNode._load_from_dict(node_dict, context=context, additional_message="Failed to load node.") + ) else: raise Exception(f"Unknown node type {node_dict['type']}") data = [ diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_flow/__init__.py b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/__init__.py new file mode 100644 index 00000000000..34476c44a97 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/__init__.py @@ -0,0 +1,9 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +from .base import FlowContext +from .dag import Flow +from .flex import FlexFlow + +__all__ = ["Flow", "FlexFlow", "FlowContext"] diff --git a/src/promptflow/promptflow/_sdk/operations/_flow_context_resolver.py b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/_flow_context_resolver.py similarity index 90% rename from src/promptflow/promptflow/_sdk/operations/_flow_context_resolver.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_flow/_flow_context_resolver.py index 5e771374714..a676e5c7310 100644 --- a/src/promptflow/promptflow/_sdk/operations/_flow_context_resolver.py +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/_flow_context_resolver.py @@ -7,11 +7,11 @@ from pathlib import Path from typing import Dict, Union +from promptflow._sdk._configuration import Configuration from promptflow._sdk._constants import NODES -from promptflow._sdk._utils import parse_variant from promptflow._sdk.entities import FlowContext from promptflow._sdk.entities._flow import Flow -from promptflow._utils.flow_utils import load_flow_dag +from promptflow._utils.flow_utils import load_flow_dag, parse_variant from promptflow._utils.yaml_utils import dump_yaml from promptflow.contracts.flow import Node from promptflow.exceptions import UserErrorException @@ -27,7 +27,7 @@ class FlowContextResolver: """Flow context resolver.""" def __init__(self, flow_path: PathLike): - from promptflow import PFClient + from promptflow._sdk._pf_client import PFClient self.flow_path, self.flow_dag = load_flow_dag(flow_path=Path(flow_path)) self.working_dir = Path(self.flow_path).parent.resolve() @@ -62,7 +62,7 @@ def _resolve(self, flow_context: FlowContext): def _resolve_variant(self, flow_context: FlowContext) -> "FlowContextResolver": """Resolve variant of the flow and store in-memory.""" # TODO: put all varint string parser here - from promptflow._sdk._submitter import overwrite_variant + from promptflow._sdk._orchestrator import overwrite_variant if not flow_context.variant: tuning_node, variant = None, None @@ -78,7 +78,7 @@ def _resolve_variant(self, flow_context: FlowContext) -> "FlowContextResolver": def _resolve_connections(self, flow_context: FlowContext) -> "FlowContextResolver": """Resolve connections of the flow and store in-memory.""" - from promptflow._sdk._submitter import overwrite_connections + from promptflow._sdk._orchestrator import overwrite_connections overwrite_connections( flow_dag=self.flow_dag, @@ -89,7 +89,7 @@ def _resolve_connections(self, flow_context: FlowContext) -> "FlowContextResolve def _resolve_overrides(self, flow_context: FlowContext) -> "FlowContextResolver": """Resolve overrides of the flow and store in-memory.""" - from promptflow._sdk._submitter import overwrite_flow + from promptflow._sdk._orchestrator import overwrite_flow overwrite_flow( flow_dag=self.flow_dag, @@ -114,7 +114,7 @@ def _resolve_connection_objs(self, flow_context: FlowContext): def _create_invoker( self, flow_context: FlowContext, is_async_call=False ) -> Union["FlowInvoker", "AsyncFlowInvoker"]: - from promptflow._sdk._serving.flow_invoker import AsyncFlowInvoker, FlowInvoker + from promptflow.core._serving.flow_invoker import AsyncFlowInvoker, FlowInvoker connections = self._resolve_connection_objs(flow_context=flow_context) # use updated flow dag to create new flow object for invoker @@ -125,6 +125,7 @@ def _create_invoker( with open(flow_file, "w") as fp: dump_yaml(self.flow_dag, fp) resolved_flow._path = flow_file.absolute().as_posix() + if is_async_call: return AsyncFlowInvoker( flow=resolved_flow, @@ -136,4 +137,5 @@ def _create_invoker( flow=resolved_flow, connections=connections, streaming=flow_context.streaming, + connection_provider=Configuration.get_instance().get_connection_provider(), ) diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_flow/base.py b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/base.py new file mode 100644 index 00000000000..254ca898134 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/base.py @@ -0,0 +1,254 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import json +from os import PathLike +from pathlib import Path +from typing import Union + +from promptflow._constants import DEFAULT_ENCODING +from promptflow._sdk.entities._validation import SchemaValidatableMixin +from promptflow._utils.flow_utils import is_flex_flow, resolve_flow_path +from promptflow._utils.yaml_utils import load_yaml_string +from promptflow.core._flow import AbstractFlowBase +from promptflow.exceptions import UserErrorException + + +class FlowContext: + """Flow context entity. the settings on this context will be applied to the flow when executing. + + :param connections: Connections for the flow. + :type connections: Optional[Dict[str, Dict]] + :param variant: Variant of the flow. + :type variant: Optional[str] + :param variant: Overrides of the flow. + :type variant: Optional[Dict[str, Dict]] + :param streaming: Whether the flow's output need to be return in streaming mode. + :type streaming: Optional[bool] + """ + + def __init__( + self, + *, + connections=None, + variant=None, + overrides=None, + streaming=None, + ): + self.connections, self._connection_objs = connections or {}, {} + self.variant = variant + self.overrides = overrides or {} + self.streaming = streaming + # TODO: introduce connection provider support + + def _resolve_connections(self): + # resolve connections and create placeholder for connection objects + for _, v in self.connections.items(): + if isinstance(v, dict): + for k, conn in v.items(): + # TODO: avoid this import + from promptflow.core._connection import _Connection + + if isinstance(conn, _Connection): # Core COnnection + name = self._get_connection_obj_name(conn) + v[k] = name + self._connection_objs[name] = conn + + @classmethod + def _get_connection_obj_name(cls, connection): + # create a unique connection name for connection obj + # will generate same name if connection has same content + connection_dict = dict(connection) + connection_name = f"connection_{hash(json.dumps(connection_dict, sort_keys=True))}" + return connection_name + + def _to_dict(self): + return { + "connections": self.connections, + "variant": self.variant, + "overrides": self.overrides, + "streaming": self.streaming, + } + + def __eq__(self, other): + if isinstance(other, FlowContext): + return self._to_dict() == other._to_dict() + return False + + def __hash__(self): + self._resolve_connections() + return hash(json.dumps(self._to_dict(), sort_keys=True)) + + +class FlowBase(AbstractFlowBase, SchemaValidatableMixin): + def __init__(self, *, data: dict, code: Path, path: Path, **kwargs): + self._context = FlowContext() + AbstractFlowBase.__init__(self, data=data, code=code, path=path, **kwargs) + # hash of flow's entry file, used to skip invoke if entry file is not changed + self._content_hash = kwargs.pop("content_hash", None) + + @property + def context(self) -> FlowContext: + return self._context + + @context.setter + def context(self, val): + if not isinstance(val, FlowContext): + raise UserErrorException("context must be a FlowContext object, got {type(val)} instead.") + self._context = val + + @property + def code(self) -> Path: + """Working directory of the flow.""" + return self._code + + @property + def path(self) -> Path: + """Flow file path. Can be script file or flow definition YAML file.""" + return self._path + + @classmethod + # pylint: disable=unused-argument + def _resolve_cls_and_type(cls, data, params_override): + """Resolve the class to use for deserializing the data. Return current class if no override is provided. + :param data: Data to deserialize. + :type data: dict + :param params_override: Parameters to override, defaults to None + :type params_override: typing.Optional[list] + :return: Class to use for deserializing the data & its "type". Type will be None if no override is provided. + :rtype: tuple[class, typing.Optional[str]] + """ + return cls, "flow" + + +class Flow(FlowBase): + """A Flow in the context of PromptFlow is a sequence of steps that define a task. + Each step in the flow could be a prompt that is sent to a language model, or simply a function task, + and the output of one step can be used as the input to the next. + Flows can be used to build complex applications with language models. + + Example: + + .. code-block:: python + + from promptflow.entities import Flow + flow = Flow.load(source="path/to/flow.dag.yaml") + result = flow(input_a=1, input_b=2) + + """ + + def __init__( + self, + code: Union[str, PathLike], + path: Union[str, PathLike], + dag: dict, + **kwargs, + ): + self.variant = kwargs.pop("variant", None) or {} + super().__init__(data=dag, code=code, path=path, **kwargs) + + @property + def environment_variables(self): + return self._data.get("environment_variables", {}) + + @classmethod + def _load(cls, path: Path, dag: dict, **kwargs): + return cls(code=path.parent, path=path, dag=dag, **kwargs) + + @classmethod + def _dispatch_flow_creation(cls, is_eager_flow, flow_path, data, content_hash, raise_error=True, **kwargs): + """Dispatch flow load to non-dag flow or async flow.""" + if is_eager_flow: + from .flex import FlexFlow + + return FlexFlow._load(path=flow_path, data=data, raise_error=raise_error, **kwargs) + else: + from .dag import Flow + + # TODO: schema validation and warning on unknown fields + return Flow._load(path=flow_path, dag=data, content_hash=content_hash, **kwargs) + + @classmethod + def _load_prepare(cls, source: Union[str, PathLike]): + source_path = Path(source) + if not source_path.exists(): + raise UserErrorException(f"Source {source_path.absolute().as_posix()} does not exist") + + flow_dir, flow_filename = resolve_flow_path(source_path, new=True) + flow_path = flow_dir / flow_filename + + if not flow_path.exists(): + raise UserErrorException(f"Flow file {flow_path.absolute().as_posix()} does not exist") + + if flow_path.suffix not in [".yaml", ".yml"]: + raise UserErrorException("Source must be a directory or a 'flow.dag.yaml' file") + return source_path, flow_path + + @classmethod + def load( + cls, + source: Union[str, PathLike], + raise_error=True, + **kwargs, + ) -> "Flow": + """ + Load flow from YAML file. + + :param source: The local yaml source of a flow. Must be a path to a local file. + If the source is a path, it will be open and read. + An exception is raised if the file does not exist. + :type source: Union[PathLike, str] + :param raise_error: Argument for non-dag flow raise validation error on unknown fields. + :type raise_error: bool + :return: A Flow object + :rtype: Flow + """ + _, flow_path = cls._load_prepare(source) + with open(flow_path, "r", encoding=DEFAULT_ENCODING) as f: + flow_content = f.read() + data = load_yaml_string(flow_content) + content_hash = hash(flow_content) + return cls._dispatch_flow_creation( + is_flex_flow(yaml_dict=data), flow_path, data, content_hash, raise_error=raise_error, **kwargs + ) + + def _init_executable(self): + from promptflow.contracts.flow import Flow as ExecutableFlow + + # for DAG flow, use data to init executable to improve performance + return ExecutableFlow._from_dict(flow_dag=self._data, working_dir=self.code) + + def __eq__(self, other): + if isinstance(other, Flow): + return self._content_hash == other._content_hash and self.context == other.context + return False + + def __hash__(self): + return hash(self.context) ^ self._content_hash + + def __call__(self, *args, **kwargs): + """Calling flow as a function, the inputs should be provided with key word arguments. + Returns the output of the flow. + The function call throws UserErrorException: if the flow is not valid or the inputs are not valid. + SystemErrorException: if the flow execution failed due to unexpected executor error. + + :param args: positional arguments are not supported. + :param kwargs: flow inputs with key word arguments. + :return: + """ + + if args: + raise UserErrorException("Flow can only be called with keyword arguments.") + + result = self.invoke(inputs=kwargs) + return result.output + + def invoke(self, inputs: dict) -> "LineResult": + """Invoke a flow and get a LineResult object.""" + from promptflow._sdk.entities._flow._flow_context_resolver import FlowContextResolver + + invoker = FlowContextResolver.resolve(flow=self) + result = invoker._invoke( + data=inputs, + ) + return result diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_flow/dag.py b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/dag.py new file mode 100644 index 00000000000..0593e46e34e --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/dag.py @@ -0,0 +1,158 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from pathlib import Path +from typing import Dict, Optional + +from marshmallow import Schema + +from promptflow._constants import FLOW_TOOLS_JSON, LANGUAGE_KEY, PROMPT_FLOW_DIR_NAME, FlowLanguage +from promptflow._sdk._constants import BASE_PATH_CONTEXT_KEY +from promptflow._utils.flow_utils import resolve_flow_path +from promptflow._utils.logger_utils import get_cli_sdk_logger +from promptflow._utils.yaml_utils import load_yaml +from promptflow.exceptions import ErrorTarget, UserErrorException + +from .base import Flow as FlowBase + +logger = get_cli_sdk_logger() + + +class Flow(FlowBase): + """A FlexFlow represents an non-dag flow, which uses codes to define the flow. + FlexFlow basically behave like a Flow, but its entry function should be provided in the flow.dag.yaml file. + Load of this non-dag flow is provided, but direct call of it will cause exceptions. + """ + + def __init__( + self, + path: Path, + code: Path, + dag: dict, + params_override: Optional[Dict] = None, + **kwargs, + ): + super().__init__(path=path, code=code, dag=dag, **kwargs) + + # TODO: this can be dangerous. path always point to the flow yaml file; code always point to the flow directory; + # but path may not under code (like a temp generated flow yaml file). + self._flow_dir, self._dag_file_name = resolve_flow_path(self.code) + self._executable = None + self._params_override = params_override + + # region properties + @property + def name(self) -> str: + return self._flow_dir.name + + @property + def flow_dag_path(self) -> Path: + return self._flow_dir / self._dag_file_name + + @property + def tools_meta_path(self) -> Path: + target_path = self._flow_dir / PROMPT_FLOW_DIR_NAME / FLOW_TOOLS_JSON + target_path.parent.mkdir(parents=True, exist_ok=True) + return target_path + + @property + def language(self) -> str: + return self._data.get(LANGUAGE_KEY, FlowLanguage.Python) + + @property + def additional_includes(self) -> list: + return self._data.get("additional_includes", []) + + @property + def display_name(self) -> str: + return self._data.get("display_name", self._flow_dir.name) + + # endregion + + # region SchemaValidatableMixin + @classmethod + def _create_schema_for_validation(cls, context) -> "Schema": + # import here to avoid circular import + from promptflow._sdk.schemas._flow import FlowSchema + + return FlowSchema(context=context) + + def _default_context(self) -> dict: + return {BASE_PATH_CONTEXT_KEY: self._flow_dir} + + def _create_validation_error(self, message, no_personal_data_message=None): + return UserErrorException( + message=message, + target=ErrorTarget.CONTROL_PLANE_SDK, + no_personal_data_message=no_personal_data_message, + ) + + def _dump_for_validation(self) -> Dict: + # Flow is read-only in control plane, so we always dump the flow from file + data = load_yaml(self.flow_dag_path) + if isinstance(self._params_override, dict): + data.update(self._params_override) + return data + + # endregion + + # region MLFlow model requirements + @property + def inputs(self): + # This is used for build mlflow model signature. + if not self._executable: + self._executable = self._init_executable() + return {k: v.type.value for k, v in self._executable.inputs.items()} + + @property + def outputs(self): + # This is used for build mlflow model signature. + if not self._executable: + self._executable = self._init_executable() + return {k: v.type.value for k, v in self._executable.outputs.items()} + + # endregion + + # region overrides: + def _init_executable(self, tuning_node=None, variant=None): + from promptflow._sdk._orchestrator import variant_overwrite_context + from promptflow.contracts.flow import Flow as ExecutableFlow + + if not tuning_node and not variant: + # for DAG flow, use data to init executable to improve performance + return super()._init_executable() + + # TODO: check if there is potential bug here + # this is a little wired: + # 1. the executable is created from a temp folder when there is additional includes + # 2. after the executable is returned, the temp folder is deleted + with variant_overwrite_context(self, tuning_node, variant) as flow: + + return ExecutableFlow.from_yaml(flow_file=flow.path, working_dir=flow.code) + + @classmethod + def _dispatch_flow_creation(cls, is_eager_flow, flow_path, data, content_hash, raise_error=True, **kwargs): + """Dispatch flow load to eager flow or async flow.""" + from .flex import FlexFlow + + if is_eager_flow: + return FlexFlow._load(path=flow_path, data=data, raise_error=raise_error, **kwargs) + else: + # TODO: schema validation and warning on unknown fields + return Flow._load(path=flow_path, dag=data, content_hash=content_hash, **kwargs) + + def invoke(self, inputs: dict) -> "LineResult": + """Invoke a flow and get a LineResult object.""" + from promptflow._sdk._orchestrator import TestSubmitter + + if self.language == FlowLanguage.CSharp: + # TODO 3033484: we shouldn't use context manager here for stream_output, as resource need to be released + # after the returned generator is fully consumed. If we use context manager here, the resource must be + # released before the generator is consumed. + with TestSubmitter(flow=self, flow_context=self.context).init( + stream_output=self.context.streaming + ) as submitter: + result = submitter.flow_test(inputs=inputs, allow_generator_output=self.context.streaming) + return result + else: + return super().invoke(inputs=inputs) diff --git a/src/promptflow/promptflow/_sdk/entities/_eager_flow.py b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/flex.py similarity index 71% rename from src/promptflow/promptflow/_sdk/entities/_eager_flow.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_flow/flex.py index 65c8a55a052..aae1451be7c 100644 --- a/src/promptflow/promptflow/_sdk/entities/_eager_flow.py +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_flow/flex.py @@ -7,14 +7,18 @@ from promptflow._constants import LANGUAGE_KEY, FlowLanguage from promptflow._sdk._constants import BASE_PATH_CONTEXT_KEY -from promptflow._sdk._utils import generate_flow_meta -from promptflow._sdk.entities._flow import FlowBase -from promptflow._sdk.entities._validation import SchemaValidatableMixin +from promptflow._utils.flow_utils import resolve_entry_file from promptflow.exceptions import ErrorTarget, UserErrorException +from .dag import Flow -class EagerFlow(FlowBase, SchemaValidatableMixin): - """This class is used to represent an eager flow.""" + +class FlexFlow(Flow): + """A FlexFlow represents a flow defined with codes directly. It doesn't involve a directed acyclic graph (DAG) + explicitly, but its entry function haven't been provided. + FlexFlow basically behave like a Flow. + Load of this non-dag flow is provided, but direct call of it will cause exceptions. + """ def __init__( self, @@ -31,10 +35,11 @@ def __init__( # entry function name self.entry = entry # entry file name - self.entry_file = self._resolve_entry_file(entry=entry, working_dir=code) - # TODO(2910062): support eager flow execution cache - super().__init__(data=data, path=path, code=code, content_hash=None, **kwargs) + self.entry_file = resolve_entry_file(entry=entry, working_dir=code) + # TODO(2910062): support non-dag flow execution cache + super().__init__(code=code, path=path, dag=data, content_hash=None, **kwargs) + # region properties @property def language(self) -> str: return self._data.get(LANGUAGE_KEY, FlowLanguage.Python) @@ -43,11 +48,16 @@ def language(self) -> str: def additional_includes(self) -> list: return self._data.get("additional_includes", []) + # endregion + + # region overrides @classmethod def _load(cls, path: Path, data: dict, raise_error=True, **kwargs): # raise validation error on unknown fields if raise_error: + # Abstract here. The actual validation is done in subclass. data = cls._create_schema_for_validation(context={BASE_PATH_CONTEXT_KEY: path.parent}).load(data) + entry = data.get("entry") code = path.parent @@ -55,11 +65,13 @@ def _load(cls, path: Path, data: dict, raise_error=True, **kwargs): raise UserErrorException(f"Entry function is not specified for flow {path}") return cls(path=path, code=code, entry=entry, data=data, **kwargs) + # endregion overrides + # region SchemaValidatableMixin @classmethod def _create_schema_for_validation(cls, context): # import here to avoid circular import - from ..schemas._flow import EagerFlowSchema + from promptflow._sdk.schemas._flow import EagerFlowSchema return EagerFlowSchema(context=context) @@ -77,7 +89,7 @@ def _dump_for_validation(self) -> Dict: # Flow is read-only in control plane, so we always dump the flow from file return self._data - # endregion + # endregion SchemaValidatableMixin @classmethod def _resolve_entry_file(cls, entry: str, working_dir: Path) -> Optional[str]: @@ -98,13 +110,20 @@ def _resolve_entry_file(cls, entry: str, working_dir: Path) -> Optional[str]: return None def _init_executable(self, **kwargs): + from promptflow._proxy import ProxyFactory from promptflow.contracts.flow import EagerFlow as ExecutableEagerFlow - # TODO(2991934): support environment variables here - meta_dict = generate_flow_meta( - flow_directory=self.code, - source_path=self.entry_file, - entry=self.entry, - dump=False, + meta_dict = ( + ProxyFactory() + .get_executor_proxy_cls(self.language) + .generate_flow_json( + flow_file=self.path, + working_dir=self.code, + dump=False, + ) ) return ExecutableEagerFlow.deserialize(meta_dict) + + def __call__(self, *args, **kwargs): + """Direct call of non-dag flow WILL cause exceptions.""" + raise UserErrorException("FlexFlow can not be called as a function.") diff --git a/src/promptflow/promptflow/_sdk/entities/_run.py b/src/promptflow-devkit/promptflow/_sdk/entities/_run.py similarity index 96% rename from src/promptflow/promptflow/_sdk/entities/_run.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_run.py index 6aca4d32ae0..6ba4fa5d867 100644 --- a/src/promptflow/promptflow/_sdk/entities/_run.py +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_run.py @@ -40,13 +40,13 @@ from promptflow._sdk._orm import RunInfo as ORMRun from promptflow._sdk._utils import ( _sanitize_python_variable_name, + is_multi_container_enabled, is_remote_uri, parse_remote_flow_pattern, - parse_variant, ) from promptflow._sdk.entities._yaml_translatable import YAMLTranslatableMixin from promptflow._sdk.schemas._run import RunSchema -from promptflow._utils.flow_utils import get_flow_lineage_id +from promptflow._utils.flow_utils import get_flow_lineage_id, parse_variant from promptflow._utils.logger_utils import get_cli_sdk_logger from promptflow.exceptions import UserErrorException @@ -69,7 +69,7 @@ class Run(YAMLTranslatableMixin): """Flow run entity. - :param flow: Path of the flow directory. + :param flow: Path of local flow entry or remote flow. :type flow: Path :param name: Name of the run. :type name: str @@ -101,6 +101,8 @@ class Run(YAMLTranslatableMixin): :type connections: Optional[Dict[str, Dict]] :param properties: Properties of the run. :type properties: Optional[Dict[str, Any]] + :param init: Class init arguments for callable class, only supported for flex flow. + :type init: Optional[Dict[str, Any]] :param kwargs: Additional keyword arguments. :type kwargs: Optional[dict] """ @@ -126,6 +128,7 @@ def __init__( connections: Optional[Dict[str, Dict]] = None, properties: Optional[Dict[str, Any]] = None, source: Optional[Union[Path, str]] = None, + init: Optional[Dict[str, Any]] = None, **kwargs, ): # !!! Caution !!!: Please update self._copy() if you add new fields to init @@ -164,7 +167,7 @@ def __init__( self.name = name or self._generate_run_name() experiment_name = kwargs.get("experiment_name", None) if self._run_source == RunInfoSources.LOCAL and not self._use_remote_flow: - self.flow = Path(flow).resolve().absolute() + self.flow = Path(str(flow)).resolve().absolute() flow_dir = self._get_flow_dir() # sanitize flow_dir to avoid invalid experiment name self._experiment_name = _sanitize_python_variable_name(flow_dir.name) @@ -187,6 +190,8 @@ def __init__( self._identity = kwargs.get("identity", {}) self._outputs = kwargs.get("outputs", None) self._command = kwargs.get("command", None) + if init: + self._properties[FlowRunProperties.INIT_KWARGS] = init @property def created_on(self) -> str: @@ -229,6 +234,10 @@ def properties(self) -> Dict[str, str]: **self._properties, } + @property + def init(self): + return self._properties.get(FlowRunProperties.INIT_KWARGS, None) + @classmethod def _from_orm_object(cls, obj: ORMRun) -> "Run": properties_json = json.loads(str(obj.properties)) @@ -303,6 +312,7 @@ def _from_run_history_entity(cls, run_entity: dict) -> "Run": start_time = run_entity.get("startTimeUtc", None) end_time = run_entity.get("endTimeUtc", None) duration = run_entity.get("duration", None) + resume_from = run_entity["properties"].get("azureml.promptflow.resume_from_run_id", None) return Run( name=run_entity["runId"], flow=Path(f"azureml://flows/{flow_name}"), @@ -319,6 +329,7 @@ def _from_run_history_entity(cls, run_entity: dict) -> "Run": is_archived=run_entity.get("archived", False), # TODO: Get archived status, depends on run history team error=run_entity.get("error", None), run_source=RunInfoSources.RUN_HISTORY, + resume_from=resume_from, portal_url=run_entity[RunDataKeys.PORTAL_URL], creation_context=run_entity["createdBy"], data=run_entity[RunDataKeys.DATA], @@ -589,6 +600,7 @@ def _to_rest_object(self): session_setup_mode=SessionSetupModeEnum.SYSTEM_WAIT, compute_name=compute_name, identity=identity_resource_id, + enable_multi_container=is_multi_container_enabled(), ) if str(self.flow).startswith(REMOTE_URI_PREFIX): @@ -642,7 +654,7 @@ def _validate_and_return_run_name(run: Union[str, "Run"]) -> str: def _validate_for_run_create_operation(self): """Validate run object for create operation.""" # check flow value - if Path(self.flow).is_dir(): + if Path(self.flow).is_dir() or Path(self.flow).is_file(): # local flow pass elif isinstance(self.flow, str) and self.flow.startswith(REMOTE_URI_PREFIX): @@ -743,3 +755,16 @@ def _copy(self, **kwargs): } logger.debug(f"Run init params: {init_params}") return Run(**init_params) + + @functools.cached_property + def _flow_type(self) -> str: + """Get flow type of run.""" + + from promptflow._constants import FlowType + from promptflow._sdk._load_functions import load_flow + from promptflow._sdk.entities._flow import FlexFlow + + flow_obj = load_flow(source=self.flow) + if isinstance(flow_obj, FlexFlow): + return FlowType.FLEX_FLOW + return FlowType.DAG_FLOW diff --git a/src/promptflow/promptflow/_sdk/entities/_run_inputs.py b/src/promptflow-devkit/promptflow/_sdk/entities/_run_inputs.py similarity index 100% rename from src/promptflow/promptflow/_sdk/entities/_run_inputs.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_run_inputs.py diff --git a/src/promptflow-devkit/promptflow/_sdk/entities/_trace.py b/src/promptflow-devkit/promptflow/_sdk/entities/_trace.py new file mode 100644 index 00000000000..ef58fb7b78d --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/entities/_trace.py @@ -0,0 +1,478 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import copy +import datetime +import json +import logging +import typing +import uuid +from dataclasses import asdict, dataclass + +from google.protobuf.json_format import MessageToJson +from opentelemetry.proto.trace.v1.trace_pb2 import Span as PBSpan + +from promptflow._constants import ( + RUNNING_LINE_RUN_STATUS, + SPAN_EVENTS_ATTRIBUTES_EVENT_ID, + SpanAttributeFieldName, + SpanContextFieldName, + SpanEventFieldName, + SpanFieldName, + SpanLinkFieldName, + SpanResourceAttributesFieldName, + SpanResourceFieldName, + SpanStatusFieldName, +) +from promptflow._sdk._constants import ( + SPAN_EVENTS_ATTRIBUTE_PAYLOAD, + SPAN_EVENTS_NAME_PF_INPUTS, + SPAN_EVENTS_NAME_PF_OUTPUT, + TRACE_DEFAULT_COLLECTION, + CumulativeTokenCountFieldName, +) +from promptflow._sdk._errors import LineRunNotFoundError +from promptflow._sdk._orm.trace import Event as ORMEvent +from promptflow._sdk._orm.trace import LineRun as ORMLineRun +from promptflow._sdk._orm.trace import Span as ORMSpan +from promptflow._sdk._utils import ( + convert_time_unix_nano_to_timestamp, + flatten_pb_attributes, + parse_otel_span_status_code, +) + + +class Event: + @staticmethod + def get(event_id: str) -> typing.Dict: + orm_event = ORMEvent.get(event_id) + return json.loads(orm_event.data) + + +class Span: + """Span is exactly the same as OpenTelemetry Span.""" + + def __init__( + self, + trace_id: str, + span_id: str, + name: str, + context: typing.Dict[str, str], + kind: str, + start_time: datetime.datetime, + end_time: datetime.datetime, + status: typing.Dict[str, str], + resource: typing.Dict, + parent_id: typing.Optional[str] = None, + attributes: typing.Optional[typing.Dict[str, str]] = None, + links: typing.Optional[typing.List] = None, + events: typing.Optional[typing.List] = None, + ): + self.trace_id = trace_id + self.span_id = span_id + self.name = name + self.context = copy.deepcopy(context) + self.kind = kind + self.parent_id = parent_id + self.start_time = start_time + self.end_time = end_time + self.status = copy.deepcopy(status) + self.attributes = copy.deepcopy(attributes) if attributes is not None else dict() + self.links = copy.deepcopy(links) if links is not None else list() + self.events = copy.deepcopy(events) if events is not None else list() + self.resource = copy.deepcopy(resource) + self._external_event_ids = list() + + def _persist(self) -> None: + # persist (create or update) line run + # line run should be persisted before events, where `events.attributes` will be updated inplace + self._persist_line_run() + # persist events to table `events` + # this operation will update `events.attributes` inplace + self._persist_events() + # persist span + self._to_orm_object().persist() + + def _persist_events(self) -> None: + # persist events to table `events` and update `events.attributes` inplace + for i in range(len(self.events)): + event_id = str(uuid.uuid4()) + event = self.events[i] + ORMEvent( + event_id=event_id, + trace_id=self.trace_id, + span_id=self.span_id, + data=json.dumps(event), + ).persist() + self.events[i][SpanEventFieldName.ATTRIBUTES] = {SPAN_EVENTS_ATTRIBUTES_EVENT_ID: event_id} + + def _load_events(self) -> None: + # load events from table `events` and update `events.attributes` inplace + events = [] + for i in range(len(self.events)): + event_id = self.events[i][SpanEventFieldName.ATTRIBUTES][SPAN_EVENTS_ATTRIBUTES_EVENT_ID] + self._external_event_ids.append(event_id) + events.append(Event.get(event_id=event_id)) + self.events = events + + def _persist_line_run(self) -> None: + # within a trace id, the line run will be created/updated in two cases: + # 1. first span: create, as we cannot identify the first span, so will use a try-catch + # 2. root span: update + if self.parent_id is None: + LineRun._from_root_span(self)._try_update() + else: + LineRun._from_non_root_span(self)._try_create() + + @staticmethod + def _from_orm_object(obj: ORMSpan) -> "Span": + return Span( + trace_id=obj.trace_id, + span_id=obj.span_id, + name=obj.name, + context=copy.deepcopy(obj.context), + kind=obj.kind, + parent_id=obj.parent_id, + start_time=obj.start_time, + end_time=obj.end_time, + status=copy.deepcopy(obj.status), + attributes=copy.deepcopy(obj.attributes), + links=copy.deepcopy(obj.links), + events=copy.deepcopy(obj.events), + resource=copy.deepcopy(obj.resource), + ) + + def _to_orm_object(self) -> ORMSpan: + return ORMSpan( + trace_id=self.trace_id, + span_id=self.span_id, + name=self.name, + context=copy.deepcopy(self.context), + kind=self.kind, + parent_id=self.parent_id, + start_time=self.start_time, + end_time=self.end_time, + status=copy.deepcopy(self.status), + attributes=copy.deepcopy(self.attributes) if len(self.attributes) > 0 else None, + links=copy.deepcopy(self.links) if len(self.links) > 0 else None, + events=copy.deepcopy(self.events) if len(self.events) > 0 else None, + resource=copy.deepcopy(self.resource), + ) + + @staticmethod + def _from_protobuf_events(obj: typing.List[PBSpan.Event]) -> typing.List[typing.Dict]: + events = [] + if len(obj) == 0: + return events + for pb_event in obj: + event_dict: dict = json.loads(MessageToJson(pb_event)) + event = { + SpanEventFieldName.NAME: pb_event.name, + # .isoformat() here to make this dumpable to JSON + SpanEventFieldName.TIMESTAMP: convert_time_unix_nano_to_timestamp(pb_event.time_unix_nano).isoformat(), + SpanEventFieldName.ATTRIBUTES: flatten_pb_attributes( + event_dict.get(SpanEventFieldName.ATTRIBUTES, dict()) + ), + } + events.append(event) + return events + + @staticmethod + def _from_protobuf_links(obj: typing.List[PBSpan.Link]) -> typing.List[typing.Dict]: + links = [] + if len(obj) == 0: + return links + for pb_link in obj: + link_dict: dict = json.loads(MessageToJson(pb_link)) + link = { + SpanLinkFieldName.CONTEXT: { + SpanContextFieldName.TRACE_ID: pb_link.trace_id.hex(), + SpanContextFieldName.SPAN_ID: pb_link.span_id.hex(), + SpanContextFieldName.TRACE_STATE: pb_link.trace_state, + }, + SpanLinkFieldName.ATTRIBUTES: flatten_pb_attributes( + link_dict.get(SpanLinkFieldName.ATTRIBUTES, dict()) + ), + } + links.append(link) + return links + + @staticmethod + def _from_protobuf_object(obj: PBSpan, resource: typing.Dict, logger: logging.Logger) -> "Span": + # Open Telemetry does not provide official way to parse Protocol Buffer Span object + # so we need to parse it manually relying on `MessageToJson` + # reference: https://github.com/open-telemetry/opentelemetry-python/issues/3700#issuecomment-2010704554 + span_dict: dict = json.loads(MessageToJson(obj)) + logger.debug("Received span: %s, resource: %s", json.dumps(span_dict), json.dumps(resource)) + span_id = obj.span_id.hex() + trace_id = obj.trace_id.hex() + parent_id = obj.parent_span_id.hex() + # we have observed in some scenarios, there is not `attributes` field + attributes = flatten_pb_attributes(span_dict.get(SpanFieldName.ATTRIBUTES, dict())) + links = Span._from_protobuf_links(obj.links) + events = Span._from_protobuf_events(obj.events) + + return Span( + trace_id=trace_id, + span_id=span_id, + name=obj.name, + context={ + SpanContextFieldName.TRACE_ID: trace_id, + SpanContextFieldName.SPAN_ID: span_id, + SpanContextFieldName.TRACE_STATE: obj.trace_state, + }, + kind=obj.kind, + parent_id=parent_id if parent_id else None, + start_time=convert_time_unix_nano_to_timestamp(obj.start_time_unix_nano), + end_time=convert_time_unix_nano_to_timestamp(obj.end_time_unix_nano), + status={ + SpanStatusFieldName.STATUS_CODE: parse_otel_span_status_code(obj.status.code), + SpanStatusFieldName.DESCRIPTION: obj.status.message, + }, + attributes=attributes, + links=links, + events=events, + resource=resource, + ) + + def _to_rest_object(self) -> typing.Dict: + rest_events = copy.deepcopy(self.events) + # `self._external_event_ids` is empty indicates: + # 1. span object is lazy load + # 2. no external events + # iterate `self.events` to move event id(s) to `external_event_data_uris` in this case + # following the large data contract + if len(self._external_event_ids) == 0: + rest_external_event_data_uris = list() + for i in range(len(rest_events)): + event_id = rest_events[i][SpanEventFieldName.ATTRIBUTES].pop(SPAN_EVENTS_ATTRIBUTES_EVENT_ID) + rest_external_event_data_uris.append(event_id) + else: + rest_external_event_data_uris = copy.deepcopy(self._external_event_ids) + return { + "name": self.name, + "context": copy.deepcopy(self.context), + "kind": self.kind, + "parent_id": self.parent_id, + "start_time": self.start_time.isoformat(), + "end_time": self.end_time.isoformat(), + "status": copy.deepcopy(self.status), + "attributes": copy.deepcopy(self.attributes), + "links": copy.deepcopy(self.links), + "events": rest_events, + "resource": copy.deepcopy(self.resource), + "external_event_data_uris": rest_external_event_data_uris, + } + + +@dataclass +class LineRun: + line_run_id: str + trace_id: str + root_span_id: typing.Optional[str] + inputs: typing.Optional[typing.Dict] + outputs: typing.Optional[typing.Dict] + start_time: datetime.datetime + end_time: typing.Optional[datetime.datetime] + status: str + duration: typing.Optional[float] + name: typing.Optional[str] + kind: str + collection: str + cumulative_token_count: typing.Optional[typing.Dict[str, int]] = None + parent_id: typing.Optional[str] = None + run: typing.Optional[str] = None + line_number: typing.Optional[int] = None + experiment: typing.Optional[str] = None + session_id: typing.Optional[str] = None + evaluations: typing.Optional[typing.Dict[str, "LineRun"]] = None + + @staticmethod + def _determine_line_run_id(span: Span) -> str: + # for test, use `attributes.line_run_id` + # for batch run and others, directly use `trace_id` + if SpanAttributeFieldName.LINE_RUN_ID in span.attributes: + return span.attributes[SpanAttributeFieldName.LINE_RUN_ID] + else: + return span.trace_id + + @staticmethod + def _determine_parent_id(span: Span) -> typing.Optional[str]: + # for test, `attributes.referenced.line_run_id` should be the parent id + # for batch run, we need to query line run with run name and line number + # otherwise, there will be no parent id + if SpanAttributeFieldName.REFERENCED_LINE_RUN_ID in span.attributes: + return span.attributes[SpanAttributeFieldName.REFERENCED_LINE_RUN_ID] + elif SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID in span.attributes: + line_run = ORMLineRun._get_with_run_and_line_number( + run=span.attributes[SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID], + line_number=span.attributes[SpanAttributeFieldName.LINE_NUMBER], + ) + return line_run.line_run_id if line_run is not None else None + else: + return None + + @staticmethod + def _parse_common_args(span: Span) -> typing.Dict: + line_run_id = LineRun._determine_line_run_id(span) + resource_attributes = dict(span.resource.get(SpanResourceFieldName.ATTRIBUTES, dict())) + collection = resource_attributes.get(SpanResourceAttributesFieldName.COLLECTION, TRACE_DEFAULT_COLLECTION) + experiment = resource_attributes.get(SpanResourceAttributesFieldName.EXPERIMENT_NAME, None) + run = span.attributes.get(SpanAttributeFieldName.BATCH_RUN_ID, None) + line_number = span.attributes.get(SpanAttributeFieldName.LINE_NUMBER, None) + session_id = span.attributes.get(SpanAttributeFieldName.SESSION_ID, None) + parent_id = LineRun._determine_parent_id(span) + return { + "line_run_id": line_run_id, + "trace_id": span.trace_id, + "start_time": span.start_time, + "collection": collection, + "parent_id": parent_id, + "run": run, + "line_number": line_number, + "experiment": experiment, + "session_id": session_id, + } + + @staticmethod + def _from_non_root_span(span: Span) -> "LineRun": + common_args = LineRun._parse_common_args(span) + return LineRun( + root_span_id=None, + inputs=None, + outputs=None, + end_time=None, + status=RUNNING_LINE_RUN_STATUS, + duration=None, + name=None, + kind=None, + **common_args, + ) + + @staticmethod + def _from_root_span(span: Span) -> "LineRun": + common_args = LineRun._parse_common_args(span) + # calculate `cumulative_token_count` + completion_token_count = int(span.attributes.get(SpanAttributeFieldName.COMPLETION_TOKEN_COUNT, 0)) + prompt_token_count = int(span.attributes.get(SpanAttributeFieldName.PROMPT_TOKEN_COUNT, 0)) + total_token_count = int(span.attributes.get(SpanAttributeFieldName.TOTAL_TOKEN_COUNT, 0)) + if total_token_count > 0: + cumulative_token_count = { + CumulativeTokenCountFieldName.COMPLETION: completion_token_count, + CumulativeTokenCountFieldName.PROMPT: prompt_token_count, + CumulativeTokenCountFieldName.TOTAL: total_token_count, + } + else: + cumulative_token_count = None + + return LineRun( + root_span_id=span.span_id, + inputs=LineRun._get_inputs_from_span(span), + outputs=LineRun._get_outputs_from_span(span), + end_time=span.end_time, + status=span.status[SpanStatusFieldName.STATUS_CODE], + duration=(span.end_time - span.start_time).total_seconds(), + name=span.name, + kind=span.attributes.get(SpanAttributeFieldName.SPAN_TYPE, span.kind), + cumulative_token_count=cumulative_token_count, + **common_args, + ) + + def _try_create(self) -> None: + # try to get via line run id first; if not found, create a new line run + try: + ORMLineRun.get(line_run_id=self.line_run_id) + except LineRunNotFoundError: + self._to_orm_object().persist() + + def _try_update(self) -> None: + # try to get first; need to create, instead of update, for trace with only one root span + try: + ORMLineRun.get(line_run_id=self.line_run_id) + self._to_orm_object()._update() + except LineRunNotFoundError: + self._to_orm_object().persist() + + @staticmethod + def _get_inputs_from_span(span: Span) -> typing.Optional[typing.Dict]: + for event in span.events: + if event[SpanEventFieldName.NAME] == SPAN_EVENTS_NAME_PF_INPUTS: + return json.loads(event[SpanEventFieldName.ATTRIBUTES][SPAN_EVENTS_ATTRIBUTE_PAYLOAD]) + return None + + @staticmethod + def _get_outputs_from_span(span: Span) -> typing.Optional[typing.Dict]: + for event in span.events: + if event[SpanEventFieldName.NAME] == SPAN_EVENTS_NAME_PF_OUTPUT: + return json.loads(event[SpanEventFieldName.ATTRIBUTES][SPAN_EVENTS_ATTRIBUTE_PAYLOAD]) + return None + + @staticmethod + def _from_orm_object(obj: ORMLineRun) -> "LineRun": + return LineRun( + line_run_id=obj.line_run_id, + trace_id=obj.trace_id, + root_span_id=obj.root_span_id, + inputs=copy.deepcopy(obj.inputs), + outputs=copy.deepcopy(obj.outputs), + start_time=obj.start_time, + end_time=obj.end_time, + status=obj.status, + duration=obj.duration, + name=obj.name, + kind=obj.kind, + cumulative_token_count=copy.deepcopy(obj.cumulative_token_count), + parent_id=obj.parent_id, + run=obj.run, + line_number=obj.line_number, + experiment=obj.experiment, + session_id=obj.session_id, + collection=obj.collection, + ) + + def _to_orm_object(self) -> ORMLineRun: + return ORMLineRun( + line_run_id=self.line_run_id, + trace_id=self.trace_id, + root_span_id=self.root_span_id, + inputs=copy.deepcopy(self.inputs), + outputs=copy.deepcopy(self.outputs), + start_time=self.start_time, + end_time=self.end_time, + status=self.status, + duration=self.duration, + name=self.name, + kind=self.kind, + cumulative_token_count=copy.deepcopy(self.cumulative_token_count), + parent_id=self.parent_id, + run=self.run, + line_number=self.line_number, + experiment=self.experiment, + session_id=self.session_id, + collection=self.collection, + ) + + def _append_evaluations(self, evaluations: typing.List["LineRun"]) -> None: + for evaluation in evaluations: + if self.evaluations is None: + self.evaluations = dict() + eval_name = evaluation.run if evaluation.run is not None else evaluation.name + self.evaluations[eval_name] = evaluation + + def _to_rest_object(self) -> typing.Dict: + # datetime.datetime is not JSON serializable, so we need to take care of this + # otherwise, Flask will raise and complain about this + # line run's start/end time, and (optional) evaluations start/end time + _self = copy.deepcopy(self) + _self.start_time = _self.start_time.isoformat() + _self.end_time = _self.end_time.isoformat() if self.end_time is not None else None + # evaluations + if _self.evaluations is not None: + for eval_name in _self.evaluations: + evaluation = _self.evaluations[eval_name] + _self.evaluations[eval_name].start_time = evaluation.start_time.isoformat() + _self.evaluations[eval_name].end_time = ( + evaluation.end_time.isoformat() if evaluation.end_time is not None else None + ) + return asdict(_self) diff --git a/src/promptflow/promptflow/_sdk/entities/_validation/__init__.py b/src/promptflow-devkit/promptflow/_sdk/entities/_validation/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/entities/_validation/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_validation/__init__.py diff --git a/src/promptflow/promptflow/_sdk/entities/_validation/core.py b/src/promptflow-devkit/promptflow/_sdk/entities/_validation/core.py similarity index 100% rename from src/promptflow/promptflow/_sdk/entities/_validation/core.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_validation/core.py diff --git a/src/promptflow/promptflow/_sdk/entities/_validation/schema.py b/src/promptflow-devkit/promptflow/_sdk/entities/_validation/schema.py similarity index 100% rename from src/promptflow/promptflow/_sdk/entities/_validation/schema.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_validation/schema.py diff --git a/src/promptflow/promptflow/_sdk/entities/_yaml_translatable.py b/src/promptflow-devkit/promptflow/_sdk/entities/_yaml_translatable.py similarity index 100% rename from src/promptflow/promptflow/_sdk/entities/_yaml_translatable.py rename to src/promptflow-devkit/promptflow/_sdk/entities/_yaml_translatable.py diff --git a/src/promptflow/promptflow/_sdk/operations/__init__.py b/src/promptflow-devkit/promptflow/_sdk/operations/__init__.py similarity index 100% rename from src/promptflow/promptflow/_sdk/operations/__init__.py rename to src/promptflow-devkit/promptflow/_sdk/operations/__init__.py diff --git a/src/promptflow/promptflow/_sdk/operations/_connection_operations.py b/src/promptflow-devkit/promptflow/_sdk/operations/_connection_operations.py similarity index 69% rename from src/promptflow/promptflow/_sdk/operations/_connection_operations.py rename to src/promptflow-devkit/promptflow/_sdk/operations/_connection_operations.py index 856805c8d59..5e5e5b77ccb 100644 --- a/src/promptflow/promptflow/_sdk/operations/_connection_operations.py +++ b/src/promptflow-devkit/promptflow/_sdk/operations/_connection_operations.py @@ -2,14 +2,17 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- from datetime import datetime -from typing import List +from typing import List, Type, TypeVar from promptflow._sdk._constants import MAX_LIST_CLI_RESULTS -from promptflow._sdk._errors import ConnectionNameNotSetError +from promptflow._sdk._errors import ConnectionClassNotFoundError, ConnectionNameNotSetError from promptflow._sdk._orm import Connection as ORMConnection from promptflow._sdk._telemetry import ActivityType, TelemetryMixin, monitor_operation from promptflow._sdk._utils import safe_parse_object_list -from promptflow._sdk.entities._connection import _Connection +from promptflow._sdk.entities._connection import CustomConnection, _Connection +from promptflow.connections import _Connection as _CoreConnection + +T = TypeVar("T", bound="_Connection") class ConnectionOperations(TelemetryMixin): @@ -70,8 +73,28 @@ def delete(self, name: str) -> None: """ ORMConnection.delete(name) + @classmethod + def _convert_core_connection_to_sdk_connection(cls, core_conn): + sdk_conn_mapping = _Connection.SUPPORTED_TYPES + sdk_conn_cls = sdk_conn_mapping.get(core_conn.type) + if sdk_conn_cls is None: + raise ConnectionClassNotFoundError( + f"Correspond sdk connection type not found for core connection type: {core_conn.type!r}, " + f"please install the latest 'promptflow-devkit' and 'promptflow-core'." + ) + common_args = { + "name": core_conn.name, + "module": core_conn.module, + "expiry_time": core_conn.expiry_time, + "created_date": core_conn.created_date, + "last_modified_date": core_conn.last_modified_date, + } + if sdk_conn_cls is CustomConnection: + return sdk_conn_cls(configs=core_conn.configs, secrets=core_conn.secrets, **common_args) + return sdk_conn_cls(**dict(core_conn), **common_args) + @monitor_operation(activity_name="pf.connections.create_or_update", activity_type=ActivityType.PUBLICAPI) - def create_or_update(self, connection: _Connection, **kwargs): + def create_or_update(self, connection: Type[_Connection], **kwargs): """Create or update a connection. :param connection: Run object to create or update. @@ -79,6 +102,8 @@ def create_or_update(self, connection: _Connection, **kwargs): """ if not connection.name: raise ConnectionNameNotSetError("Name is required to create or update connection.") + if isinstance(connection, _CoreConnection) and not isinstance(connection, _Connection): + connection = self._convert_core_connection_to_sdk_connection(connection) orm_object = connection._to_orm_object() now = datetime.now().isoformat() if orm_object.createdDate is None: diff --git a/src/promptflow/promptflow/_sdk/operations/_experiment_operations.py b/src/promptflow-devkit/promptflow/_sdk/operations/_experiment_operations.py similarity index 95% rename from src/promptflow/promptflow/_sdk/operations/_experiment_operations.py rename to src/promptflow-devkit/promptflow/_sdk/operations/_experiment_operations.py index 7499c62bb26..7b3fe2a8021 100644 --- a/src/promptflow/promptflow/_sdk/operations/_experiment_operations.py +++ b/src/promptflow-devkit/promptflow/_sdk/operations/_experiment_operations.py @@ -57,7 +57,7 @@ def get(self, name: str) -> Experiment: :return: experiment object retrieved from the database. :rtype: ~promptflow.entities.Experiment """ - from promptflow._sdk._submitter.experiment_orchestrator import ExperimentOrchestrator + from promptflow._sdk._orchestrator.experiment_orchestrator import ExperimentOrchestrator ExperimentOrchestrator.get_status(name) return Experiment._from_orm_object(ORMExperiment.get(name)) @@ -103,7 +103,7 @@ def start(self, experiment: Experiment, stream=False, inputs=None, **kwargs) -> :return: Experiment object started. :rtype: ~promptflow.entities.Experiment """ - from promptflow._sdk._submitter.experiment_orchestrator import ExperimentOrchestrator + from promptflow._sdk._orchestrator.experiment_orchestrator import ExperimentOrchestrator if experiment._source_path: # Update snapshot for anonymous experiment @@ -146,7 +146,7 @@ def stop(self, experiment: Experiment, **kwargs) -> Experiment: :return: Experiment object started. :rtype: ~promptflow.entities.Experiment """ - from promptflow._sdk._submitter.experiment_orchestrator import ExperimentOrchestrator + from promptflow._sdk._orchestrator.experiment_orchestrator import ExperimentOrchestrator ExperimentOrchestrator(self._client, experiment).stop() return self.get(experiment.name) @@ -166,7 +166,7 @@ def _test( :type environment_variables: dict """ from .._load_functions import _load_experiment_template - from .._submitter.experiment_orchestrator import ExperimentOrchestrator + from .._orchestrator.experiment_orchestrator import ExperimentOrchestrator experiment_template = _load_experiment_template(experiment) output_path = kwargs.get("output_path", None) diff --git a/src/promptflow/promptflow/_sdk/operations/_flow_operations.py b/src/promptflow-devkit/promptflow/_sdk/operations/_flow_operations.py similarity index 82% rename from src/promptflow/promptflow/_sdk/operations/_flow_operations.py rename to src/promptflow-devkit/promptflow/_sdk/operations/_flow_operations.py index 64a850192de..11fc2d5c38b 100644 --- a/src/promptflow/promptflow/_sdk/operations/_flow_operations.py +++ b/src/promptflow-devkit/promptflow/_sdk/operations/_flow_operations.py @@ -16,41 +16,38 @@ from promptflow._constants import FlowLanguage from promptflow._sdk._configuration import Configuration from promptflow._sdk._constants import ( - CHAT_HISTORY, DEFAULT_ENCODING, FLOW_META_JSON_GEN_TIMEOUT, FLOW_TOOLS_JSON_GEN_TIMEOUT, LOCAL_MGMT_DB_PATH, ) from promptflow._sdk._load_functions import load_flow -from promptflow._sdk._submitter import TestSubmitter -from promptflow._sdk._submitter.utils import SubmitterHelper +from promptflow._sdk._orchestrator import TestSubmitter +from promptflow._sdk._orchestrator.utils import SubmitterHelper from promptflow._sdk._telemetry import ActivityType, TelemetryMixin, monitor_operation from promptflow._sdk._utils import ( _get_additional_includes, _merge_local_code_and_additional_includes, copy_tree_respect_template_and_ignore_file, - dump_flow_result, - generate_flow_meta, generate_flow_tools_json, generate_random_string, + json_load, logger, - parse_variant, ) -from promptflow._sdk.entities._eager_flow import EagerFlow -from promptflow._sdk.entities._flow import Flow, FlowBase, ProtectedFlow +from promptflow._sdk.entities._flow import FlexFlow, Flow from promptflow._sdk.entities._validation import ValidationResult from promptflow._utils.context_utils import _change_working_dir +from promptflow._utils.flow_utils import dump_flow_result, is_executable_chat_flow, is_flex_flow, parse_variant from promptflow._utils.yaml_utils import dump_yaml, load_yaml -from promptflow.exceptions import UserErrorException +from promptflow.exceptions import ErrorTarget, UserErrorException class FlowOperations(TelemetryMixin): """FlowOperations.""" - def __init__(self, client): + def __init__(self, client, **kwargs): + super().__init__(**kwargs) self._client = client - super().__init__() @monitor_operation(activity_name="pf.flows.test", activity_type=ActivityType.PUBLICAPI) def test( @@ -86,6 +83,13 @@ def test( experiment = kwargs.pop("experiment", None) output_path = kwargs.get("output_path", None) if Configuration.get_instance().is_internal_features_enabled() and experiment: + if variant is not None or node is not None: + error = ValueError("--variant or --node is not supported experiment is specified.") + raise UserErrorException( + target=ErrorTarget.CONTROL_PLANE_SDK, + message=str(error), + error=error, + ) return self._client._experiments._test( flow=flow, inputs=inputs, @@ -102,7 +106,6 @@ def test( environment_variables=environment_variables, **kwargs, ) - dump_test_result = kwargs.get("dump_test_result", False) if dump_test_result: # Dump flow/node test info @@ -155,16 +158,14 @@ def _test( :param allow_generator_output: Whether return streaming output when flow has streaming output. :return: Executor result """ - from promptflow._sdk._load_functions import load_flow - inputs = inputs or {} output_path = kwargs.get("output_path", None) session = kwargs.pop("session", None) # Run id will be set in operation context and used for session run_id = kwargs.get("run_id", str(uuid.uuid4())) - flow: FlowBase = load_flow(flow) + flow = load_flow(flow) - if isinstance(flow, EagerFlow): + if isinstance(flow, FlexFlow): if variant or node: logger.warning("variant and node are not supported for eager flow, will be ignored") variant, node = None, None @@ -178,12 +179,13 @@ def _test( stream_output=stream_output, session=session, ) as submitter: - if isinstance(flow, EagerFlow): + if isinstance(flow, FlexFlow): # TODO(2897153): support chat eager flow + # set is chat flow to True to allow generator output is_chat_flow, chat_history_input_name = False, None flow_inputs, dependency_nodes_outputs = inputs, None else: - is_chat_flow, chat_history_input_name, _ = self._is_chat_flow(submitter.dataplane_flow) + is_chat_flow, chat_history_input_name, _ = is_executable_chat_flow(submitter.dataplane_flow) flow_inputs, dependency_nodes_outputs = submitter.resolve_data( node_name=node, inputs=inputs, chat_history_name=chat_history_input_name ) @@ -200,36 +202,6 @@ def _test( run_id=run_id, ) - @staticmethod - def _is_chat_flow(flow): - """ - Check if the flow is chat flow. - Check if chat_history in the flow input and only one chat input and - one chat output to determine if it is a chat flow. - """ - chat_inputs = [item for item in flow.inputs.values() if item.is_chat_input] - chat_outputs = [item for item in flow.outputs.values() if item.is_chat_output] - chat_history_input_name = next( - iter([input_name for input_name, value in flow.inputs.items() if value.is_chat_history]), None - ) - if ( - not chat_history_input_name - and CHAT_HISTORY in flow.inputs - and flow.inputs[CHAT_HISTORY].is_chat_history is not False - ): - chat_history_input_name = CHAT_HISTORY - is_chat_flow, error_msg = True, "" - if len(chat_inputs) != 1: - is_chat_flow = False - error_msg = "chat flow does not support multiple chat inputs" - elif len(chat_outputs) != 1: - is_chat_flow = False - error_msg = "chat flow does not support multiple chat outputs" - elif not chat_history_input_name: - is_chat_flow = False - error_msg = "chat_history is required in the inputs of chat flow" - return is_chat_flow, chat_history_input_name, error_msg - @monitor_operation(activity_name="pf.flows._chat", activity_type=ActivityType.INTERNALCALL) def _chat( self, @@ -251,14 +223,14 @@ def _chat( """ from promptflow._sdk._load_functions import load_flow - flow: FlowBase = load_flow(flow) + flow = load_flow(flow) flow.context.variant = variant with TestSubmitter(flow=flow, flow_context=flow.context, client=self._client).init( environment_variables=environment_variables, stream_log=False, # no need to stream log in chat mode ) as submitter: - is_chat_flow, chat_history_input_name, error_msg = self._is_chat_flow(submitter.dataplane_flow) + is_chat_flow, chat_history_input_name, error_msg = is_executable_chat_flow(submitter.dataplane_flow) if not is_chat_flow: raise UserErrorException(f"Only support chat flow in interactive mode, {error_msg}.") @@ -275,6 +247,89 @@ def _chat( show_step_output=kwargs.get("show_step_output", False), ) + def _test_with_ui( + self, + flow: Union[str, PathLike], + output_path: PathLike, + *, + inputs: dict = None, + variant: str = None, + node: str = None, + environment_variables: dict = None, + entry: str = None, + **kwargs, + ) -> dict: + """Test flow or node by http request. + + :param flow: path to flow directory to test + :type flow: Union[str, PathLike] + :param inputs: Input data for the flow test + :type inputs: dict + :param variant: Node & variant name in format of ${node_name.variant_name}, will use default variant + if not specified. + :type variant: str + :param node: If specified it will only test this node, else it will test the flow. + :type node: str + :param environment_variables: Environment variables to set by specifying a property path and value. + Example: {"key1": "${my_connection.api_key}", "key2"="value2"} + The value reference to connection keys will be resolved to the actual value, + and all environment variables specified will be set into os.environ. + :type environment_variables: dict + :return: The result of flow or node + :rtype: dict + """ + # TODO : it's not clear why we need this method, please help verify: + # 1. why we can't use test method directly + # 2. is _chat_with_ui still necessary + experiment = kwargs.pop("experiment", None) + if Configuration.get_instance().is_internal_features_enabled() and experiment: + result = self.test( + flow=flow, + inputs=inputs, + environment_variables=environment_variables, + variant=variant, + node=node, + allow_generator_output=kwargs.pop("allow_generator_output", False), + stream_output=kwargs.pop("stream_output", False), + experiment=experiment, + output_path=output_path, + ) + return_output = {} + for key in result: + detail_path = output_path / key / "flow.detail.json" + log_path = output_path / key / "flow.log" + detail_content = json_load(detail_path) + with open(log_path, "r") as file: + log_content = file.read() + return_output[key] = {"detail": detail_content, "log": log_content} + else: + self.test( + flow=flow, + inputs=inputs, + environment_variables=environment_variables, + variant=variant, + node=node, + allow_generator_output=False, + stream_output=False, + dump_test_result=True, + output_path=output_path, + ) + if node: + detail_path = output_path / f"flow-{node}.node.detail.json" + log_path = output_path / f"{node}.node.log" + else: + if variant: + tuning_node, node_variant = parse_variant(variant) + detail_path = output_path / f"flow-{tuning_node}-{node_variant}.detail.json" + else: + detail_path = output_path / "flow.detail.json" + log_path = output_path / "flow.log" + detail_content = json_load(detail_path) + with open(log_path, "r") as file: + log_content = file.read() + return_output = {"flow": {"detail": detail_content, "log": log_content}} + return return_output + @monitor_operation(activity_name="pf.flows._chat_with_ui", activity_type=ActivityType.INTERNALCALL) def _chat_with_ui(self, script, skip_open_browser: bool = False): try: @@ -402,14 +457,14 @@ def _export_flow_connections( that the flow involves no additional includes, symlink, or variant. :param output_dir: output directory to export connections """ - flow: FlowBase = load_flow(built_flow_dag_path) + flow = load_flow(built_flow_dag_path) with _change_working_dir(flow.code): if flow.language == FlowLanguage.CSharp: - from promptflow.batch import CSharpExecutorProxy + from promptflow._proxy._csharp_executor_proxy import CSharpExecutorProxy return self._migrate_connections( connection_names=SubmitterHelper.get_used_connection_names( - tools_meta=CSharpExecutorProxy.get_tool_metadata( + tools_meta=CSharpExecutorProxy.generate_flow_tools_json( flow_file=flow.flow_dag_path, working_dir=flow.code, ), @@ -437,7 +492,7 @@ def _build_flow( update_flow_tools_json: bool = True, ): # TODO: confirm if we need to import this - from promptflow._sdk._submitter import variant_overwrite_context + from promptflow._sdk._orchestrator import variant_overwrite_context flow_copy_target = Path(output) flow_copy_target.mkdir(parents=True, exist_ok=True) @@ -533,7 +588,7 @@ def _build_as_executable( if not value.is_chat_history } - is_chat_flow, chat_history_input_name, _ = self._is_chat_flow(executable) + is_chat_flow, chat_history_input_name, _ = is_executable_chat_flow(executable) chat_output_name = next( filter( lambda key: executable.outputs[key].is_chat_output, @@ -569,8 +624,11 @@ def _build_as_executable( def _run_pyinstaller(self, output_dir): with _change_working_dir(output_dir, mkdir=False): - subprocess.run(["pyinstaller", "app.spec"], check=True) - print("PyInstaller command executed successfully.") + try: + subprocess.run(["pyinstaller", "app.spec"], check=True) + print("PyInstaller command executed successfully.") + except FileNotFoundError as e: + raise UserErrorException(message_format="app.spec not found when run pyinstaller") from e @monitor_operation(activity_name="pf.flows.build", activity_type=ActivityType.PUBLICAPI) def build( @@ -600,7 +658,7 @@ def build( output_dir = Path(output).absolute() output_dir.mkdir(parents=True, exist_ok=True) - flow: FlowBase = load_flow(flow) + flow = load_flow(flow) is_csharp_flow = flow.language == FlowLanguage.CSharp if format not in ["docker", "executable"]: @@ -655,7 +713,7 @@ def build( @contextlib.contextmanager def _resolve_additional_includes(cls, flow_dag_path: Path) -> Iterable[Path]: # TODO: confirm if we need to import this - from promptflow._sdk._submitter import remove_additional_includes + from promptflow._sdk._orchestrator import remove_additional_includes # Eager flow may not contain a yaml file, skip resolving additional includes def is_yaml_file(file_path): @@ -684,12 +742,12 @@ def validate(self, flow: Union[str, PathLike], *, raise_error: bool = False, **k :rtype: ValidationResult """ - flow_entity: ProtectedFlow = load_flow(source=flow, raise_error=False) + flow_entity: Flow = load_flow(source=flow, raise_error=False) # TODO: put off this if we do path existence check in FlowSchema on fields other than additional_includes validation_result = flow_entity._validate() - if isinstance(flow_entity, ProtectedFlow): + if not isinstance(flow_entity, FlexFlow): # only DAG flow has tools meta source_path_mapping = {} flow_tools, tools_errors = self._generate_tools_meta( @@ -734,7 +792,7 @@ def _generate_tools_meta( This is a private interface for vscode extension, so do not change the interface unless necessary. Usage: - from promptflow import PFClient + from promptflow.client import PFClient PFClient().flows._generate_tools_meta(flow="flow.dag.yaml", source_name="convert_to_dict.py") :param flow: path to the flow directory or flow dag to export @@ -749,10 +807,10 @@ def _generate_tools_meta( :return: dict of tools meta and dict of tools errors :rtype: Tuple[dict, dict] """ - flow: FlowBase = load_flow(source=flow) - if not isinstance(flow, ProtectedFlow): + flow = load_flow(source=flow) + if is_flex_flow(yaml_dict=flow._data): # No tools meta for eager flow - return {}, {} + return {"package": {}, "code": {}}, {} with self._resolve_additional_includes(flow.flow_dag_path) as new_flow_dag_path: flow_tools = generate_flow_tools_json( @@ -814,7 +872,7 @@ def _generate_flow_meta( This is a private interface for vscode extension, so do not change the interface unless necessary. Usage: - from promptflow import PFClient + from promptflow.client import PFClient PFClient().flows._generate_flow_meta(flow="flow.dag.yaml") :param flow: path to the flow directory or flow dag to export @@ -829,17 +887,22 @@ def _generate_flow_meta( :return: dict of flow meta :rtype: Tuple[dict, dict] """ - flow: Union[ProtectedFlow, EagerFlow] = load_flow(source=flow) - if not isinstance(flow, EagerFlow): + flow: Union[Flow, FlexFlow] = load_flow(source=flow) + if not isinstance(flow, FlexFlow): # No flow meta for DAG flow return {} with self._resolve_additional_includes(flow.path) as new_flow_dag_path: - return generate_flow_meta( - flow_directory=new_flow_dag_path.parent, - source_path=flow.entry_file, - entry=flow.entry, - dump=dump, - timeout=timeout, - load_in_subprocess=load_in_subprocess, + from promptflow._proxy import ProxyFactory + + return ( + ProxyFactory() + .get_executor_proxy_cls(flow.language) + .generate_flow_json( + flow_file=new_flow_dag_path, + working_dir=new_flow_dag_path.parent, + dump=dump, + timeout=timeout, + load_in_subprocess=load_in_subprocess, + ) ) diff --git a/src/promptflow/promptflow/_sdk/operations/_local_azure_connection_operations.py b/src/promptflow-devkit/promptflow/_sdk/operations/_local_azure_connection_operations.py similarity index 85% rename from src/promptflow/promptflow/_sdk/operations/_local_azure_connection_operations.py rename to src/promptflow-devkit/promptflow/_sdk/operations/_local_azure_connection_operations.py index af2134c0b6a..ad09bb6191e 100644 --- a/src/promptflow/promptflow/_sdk/operations/_local_azure_connection_operations.py +++ b/src/promptflow-devkit/promptflow/_sdk/operations/_local_azure_connection_operations.py @@ -1,23 +1,28 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -import re import sys from typing import List -from promptflow._sdk._constants import AZURE_WORKSPACE_REGEX_FORMAT, MAX_LIST_CLI_RESULTS +from promptflow._sdk._constants import MAX_LIST_CLI_RESULTS from promptflow._sdk._telemetry import ActivityType, WorkspaceTelemetryMixin, monitor_operation -from promptflow._sdk._utils import interactive_credential_disabled, is_from_cli, is_github_codespaces, print_red_error +from promptflow._sdk._utils import print_red_error from promptflow._sdk.entities._connection import _Connection from promptflow._utils.credential_utils import get_default_azure_credential from promptflow._utils.logger_utils import get_cli_sdk_logger +from promptflow.core._connection_provider._utils import ( + extract_workspace, + interactive_credential_disabled, + is_from_cli, + is_github_codespaces, +) logger = get_cli_sdk_logger() class LocalAzureConnectionOperations(WorkspaceTelemetryMixin): def __init__(self, connection_provider, **kwargs): - self._subscription_id, self._resource_group, self._workspace_name = self._extract_workspace(connection_provider) + self._subscription_id, self._resource_group, self._workspace_name = extract_workspace(connection_provider) self._credential = kwargs.pop("credential", None) or self._get_credential() super().__init__( subscription_id=self._subscription_id, @@ -70,20 +75,6 @@ def _get_credential(cls): return credential return DefaultAzureCredential(exclude_interactive_browser_credential=False) - @classmethod - def _extract_workspace(cls, connection_provider): - match = re.match(AZURE_WORKSPACE_REGEX_FORMAT, connection_provider) - if not match or len(match.groups()) != 5: - raise ValueError( - "Malformed connection provider string, expected azureml://subscriptions//" - "resourceGroups//providers/Microsoft.MachineLearningServices/" - f"workspaces/, got {connection_provider}" - ) - subscription_id = match.group(1) - resource_group = match.group(3) - workspace_name = match.group(5) - return subscription_id, resource_group, workspace_name - @monitor_operation(activity_name="pf.connections.azure.list", activity_type=ActivityType.PUBLICAPI) def list( self, diff --git a/src/promptflow/promptflow/_sdk/operations/_local_storage_operations.py b/src/promptflow-devkit/promptflow/_sdk/operations/_local_storage_operations.py similarity index 87% rename from src/promptflow/promptflow/_sdk/operations/_local_storage_operations.py rename to src/promptflow-devkit/promptflow/_sdk/operations/_local_storage_operations.py index f5ea3e0204f..00b1d154c38 100644 --- a/src/promptflow/promptflow/_sdk/operations/_local_storage_operations.py +++ b/src/promptflow-devkit/promptflow/_sdk/operations/_local_storage_operations.py @@ -14,6 +14,7 @@ from filelock import FileLock +from promptflow._constants import OUTPUT_FILE_NAME, OutputsFolderName from promptflow._sdk._constants import ( HOME_PROMPT_FLOW_DIR, LINE_NUMBER, @@ -35,16 +36,11 @@ write_open, ) from promptflow._sdk.entities import Run -from promptflow._sdk.entities._eager_flow import EagerFlow -from promptflow._sdk.entities._flow import Flow -from promptflow._utils.dataclass_serializer import serialize +from promptflow._sdk.entities._flow import FlexFlow, Flow from promptflow._utils.exception_utils import PromptflowExceptionPresenter from promptflow._utils.logger_utils import LogContext, get_cli_sdk_logger -from promptflow._utils.multimedia_utils import ( - get_file_reference_encoder, - load_multimedia_data_recursively, - resolve_multimedia_data_recursively, -) +from promptflow._utils.multimedia_utils import MultimediaProcessor +from promptflow._utils.utils import prepare_folder from promptflow._utils.yaml_utils import load_yaml from promptflow.batch._result import BatchResult from promptflow.contracts.multimedia import Image @@ -54,6 +50,7 @@ from promptflow.contracts.run_mode import RunMode from promptflow.exceptions import UserErrorException from promptflow.storage import AbstractBatchRunStorage +from promptflow.tracing._utils import serialize logger = get_cli_sdk_logger() @@ -74,6 +71,7 @@ def get_logs(self) -> str: with read_open(self.file_path) as f: return f.read() + @classmethod def _get_execute_loggers_list(cls) -> List[logging.Logger]: result = super()._get_execute_loggers_list() result.append(logger) @@ -86,6 +84,7 @@ def get_initializer(self): run_mode=self.run_mode, credential_list=self.credential_list, stream=self.stream, + flow_logs_folder=self.flow_logs_folder, ) def __enter__(self): @@ -93,6 +92,8 @@ def __enter__(self): log_path.parent.mkdir(parents=True, exist_ok=True) if self.run_mode == RunMode.Batch: log_path.touch(exist_ok=True) + line_folder_path = Path(self.flow_logs_folder) + line_folder_path.mkdir(parents=True, exist_ok=True) else: if log_path.exists(): # for non batch run, clean up previous log content @@ -191,13 +192,16 @@ class LocalStorageOperations(AbstractBatchRunStorage): def __init__(self, run: Run, stream=False, run_mode=RunMode.Test): self._run = run - self.path = self._prepare_folder(self._run._output_path) + self.path = prepare_folder(self._run._output_path) self.logger = LoggerOperations( - file_path=self.path / LocalStorageFilenames.LOG, stream=stream, run_mode=run_mode + file_path=self.path / LocalStorageFilenames.LOG, + stream=stream, + run_mode=run_mode, + flow_logs_folder=self.path / LocalStorageFilenames.FLOW_LOGS_FOLDER, ) # snapshot - self._snapshot_folder_path = self._prepare_folder(self.path / LocalStorageFilenames.SNAPSHOT_FOLDER) + self._snapshot_folder_path = prepare_folder(self.path / LocalStorageFilenames.SNAPSHOT_FOLDER) self._dag_path = self._snapshot_folder_path / LocalStorageFilenames.DAG self._flow_tools_json_path = ( self._snapshot_folder_path / PROMPT_FLOW_DIR_NAME / LocalStorageFilenames.FLOW_TOOLS_JSON @@ -214,10 +218,10 @@ def __init__(self, run: Run, stream=False, run_mode=RunMode.Test): # for line run records, store per line # for normal node run records, store per node per line; # for reduce node run records, store centralized in 000000000.jsonl per node - self.outputs_folder = self._prepare_folder(self.path / "flow_outputs") - self._outputs_path = self.outputs_folder / "output.jsonl" # dumped by executor - self._node_infos_folder = self._prepare_folder(self.path / "node_artifacts") - self._run_infos_folder = self._prepare_folder(self.path / "flow_artifacts") + self.outputs_folder = prepare_folder(self.path / OutputsFolderName.FLOW_OUTPUTS) + self._outputs_path = self.outputs_folder / OUTPUT_FILE_NAME # dumped by executor + self._node_infos_folder = prepare_folder(self.path / OutputsFolderName.NODE_ARTIFACTS) + self._run_infos_folder = prepare_folder(self.path / OutputsFolderName.FLOW_ARTIFACTS) self._data_path = Path(run.data) if run.data is not None else None self._meta_path = self.path / LocalStorageFilenames.META @@ -235,7 +239,7 @@ def _calculate_eager_mode(cls, run: Run) -> bool: if run._run_source == RunInfoSources.LOCAL: try: flow_obj = load_flow(source=run.flow) - return isinstance(flow_obj, EagerFlow) + return isinstance(flow_obj, FlexFlow) except Exception as e: # For run with incomplete flow snapshot, ignore load flow error to make sure it can still show. logger.debug(f"Failed to load flow from {run.flow} due to {e}.") @@ -379,7 +383,7 @@ def load_metrics(self, *, parse_const_as_str: bool = False) -> Dict[str, Union[i def persist_node_run(self, run_info: NodeRunInfo) -> None: """Persist node run record to local storage.""" - node_folder = self._prepare_folder(self._node_infos_folder / run_info.node) + node_folder = prepare_folder(self._node_infos_folder / run_info.node) self._persist_run_multimedia(run_info, node_folder) node_run_record = NodeRunRecord.from_run_info(run_info) # for reduce nodes, the line_number is None, store the info in the 000000000.jsonl @@ -406,7 +410,8 @@ def _load_all_node_run_info(self, parse_const_as_str: bool = False) -> List[Dict new_runs = self._load_info_from_file(node_run_record_file, parse_const_as_str) node_run_infos.extend(new_runs) for new_run in new_runs: - new_run = resolve_multimedia_data_recursively(node_run_record_file, new_run) + multimedia_processor = MultimediaProcessor.create(new_run.get("message_format", "")) + new_run = multimedia_processor.resolve_multimedia_data_recursively(node_run_record_file, new_run) return node_run_infos def load_node_run_info_for_line(self, line_number: int = None) -> List[NodeRunInfo]: @@ -421,10 +426,11 @@ def load_node_run_info_for_line(self, line_number: int = None) -> List[NodeRunIn runs = self._load_info_from_file(node_run_record_file) if runs: run = runs[0] - run = resolve_multimedia_data_recursively(node_run_record_file, run) - run = load_multimedia_data_recursively(run) - run_info = NodeRunInfo.deserialize(run) - node_run_infos.append(run_info) + multimedia_processor = MultimediaProcessor.create(run.get("message_format", "")) + run = multimedia_processor.resolve_multimedia_data_recursively(node_run_record_file, run) + run = multimedia_processor.load_multimedia_data_recursively(run) + run_info = NodeRunInfo.deserialize(run) + node_run_infos.append(run_info) return node_run_infos def persist_flow_run(self, run_info: FlowRunInfo) -> None: @@ -443,7 +449,8 @@ def _load_all_flow_run_info(self, parse_const_as_str: bool = False) -> List[Dict new_runs = self._load_info_from_file(line_run_record_file, parse_const_as_str) flow_run_infos.extend(new_runs) for new_run in new_runs: - new_run = resolve_multimedia_data_recursively(line_run_record_file, new_run) + multimedia_processor = MultimediaProcessor.create(new_run.get("message_format", "")) + new_run = multimedia_processor.resolve_multimedia_data_recursively(line_run_record_file, new_run) return flow_run_infos def load_flow_run_info(self, line_number: int) -> FlowRunInfo: @@ -456,8 +463,9 @@ def load_flow_run_info(self, line_number: int) -> FlowRunInfo: if not run: return None - run = resolve_multimedia_data_recursively(self._run_infos_folder, run) - run = load_multimedia_data_recursively(run) + multimedia_processor = MultimediaProcessor.create(run.get("message_format", "")) + run = multimedia_processor.resolve_multimedia_data_recursively(self._run_infos_folder, run) + run = multimedia_processor.load_multimedia_data_recursively(run) run_info = FlowRunInfo.deserialize(run) return run_info @@ -469,25 +477,22 @@ def persist_result(self, result: Optional[BatchResult]) -> None: self.dump_metrics(result.metrics) def _persist_run_multimedia(self, run_info: Union[FlowRunInfo, NodeRunInfo], folder_path: Path): + multimedia_processor = MultimediaProcessor.create(run_info.message_format) if run_info.inputs: - run_info.inputs = self._serialize_multimedia(run_info.inputs, folder_path) + run_info.inputs = self._serialize_multimedia(multimedia_processor, run_info.inputs, folder_path) if run_info.output: - run_info.output = self._serialize_multimedia(run_info.output, folder_path) + run_info.output = self._serialize_multimedia(multimedia_processor, run_info.output, folder_path) run_info.result = None if run_info.api_calls: - run_info.api_calls = self._serialize_multimedia(run_info.api_calls, folder_path) + run_info.api_calls = self._serialize_multimedia(multimedia_processor, run_info.api_calls, folder_path) - def _serialize_multimedia(self, value, folder_path: Path, relative_path: Path = None): - pfbytes_file_reference_encoder = get_file_reference_encoder(folder_path, relative_path, use_absolute_path=True) + def _serialize_multimedia(self, multimedia_processor, value, folder_path: Path, relative_path: Path = None): + pfbytes_file_reference_encoder = multimedia_processor.get_file_reference_encoder( + folder_path, relative_path, use_absolute_path=True + ) serialization_funcs = {Image: partial(Image.serialize, **{"encoder": pfbytes_file_reference_encoder})} return serialize(value, serialization_funcs=serialization_funcs) - @staticmethod - def _prepare_folder(path: Union[str, Path]) -> Path: - path = Path(path) - path.mkdir(parents=True, exist_ok=True) - return path - @staticmethod def _outputs_padding(df: "DataFrame", inputs_line_numbers: List[int]) -> "DataFrame": import pandas as pd diff --git a/src/promptflow/promptflow/_sdk/operations/_run_operations.py b/src/promptflow-devkit/promptflow/_sdk/operations/_run_operations.py similarity index 96% rename from src/promptflow/promptflow/_sdk/operations/_run_operations.py rename to src/promptflow-devkit/promptflow/_sdk/operations/_run_operations.py index 9f81e5104ab..a00cef5a900 100644 --- a/src/promptflow/promptflow/_sdk/operations/_run_operations.py +++ b/src/promptflow-devkit/promptflow/_sdk/operations/_run_operations.py @@ -98,7 +98,7 @@ def create_or_update(self, run: Run, **kwargs) -> Run: # TODO: change to async stream = kwargs.pop("stream", False) try: - from promptflow._sdk._submitter import RunSubmitter + from promptflow._sdk._orchestrator import RunSubmitter created_run = RunSubmitter(client=self._client).submit(run=run, **kwargs) if stream: @@ -118,7 +118,7 @@ def _create_by_resume_from(self, resume_from: str, **kwargs) -> Run: """ logger.debug(f"Resume from {resume_from!r}, kwargs: {kwargs}") stream = kwargs.pop("stream", False) - from promptflow._sdk._submitter import RunSubmitter + from promptflow._sdk._orchestrator import RunSubmitter created_run = RunSubmitter(client=self._client).resume(resume_from=resume_from, **kwargs) if stream: @@ -435,3 +435,15 @@ def _get_local_storage(self, run: Union[str, Run]) -> LocalStorageOperations: if isinstance(run, str): run = self.get(name=run) return LocalStorageOperations(run) + + def _get_telemetry_values(self, *args, **kwargs): + activity_name = kwargs.get("activity_name", None) + telemetry_values = super()._get_telemetry_values(*args, **kwargs) + try: + if activity_name == "pf.runs.create_or_update": + run: Run = kwargs.get("run", None) or args[0] + telemetry_values["flow_type"] = run._flow_type + except Exception as e: + logger.error(f"Failed to get telemetry values: {str(e)}") + + return telemetry_values diff --git a/src/promptflow/promptflow/_sdk/operations/_tool_operations.py b/src/promptflow-devkit/promptflow/_sdk/operations/_tool_operations.py similarity index 100% rename from src/promptflow/promptflow/_sdk/operations/_tool_operations.py rename to src/promptflow-devkit/promptflow/_sdk/operations/_tool_operations.py diff --git a/src/promptflow-devkit/promptflow/_sdk/operations/_trace_operations.py b/src/promptflow-devkit/promptflow/_sdk/operations/_trace_operations.py new file mode 100644 index 00000000000..3f571cb5285 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/operations/_trace_operations.py @@ -0,0 +1,194 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import datetime +import typing + +from promptflow._sdk._constants import TRACE_DEFAULT_COLLECTION +from promptflow._sdk._orm.retry import sqlite_retry +from promptflow._sdk._orm.session import trace_mgmt_db_session +from promptflow._sdk._orm.trace import Event as ORMEvent +from promptflow._sdk._orm.trace import LineRun as ORMLineRun +from promptflow._sdk._orm.trace import Span as ORMSpan +from promptflow._sdk._telemetry import ActivityType, monitor_operation +from promptflow._sdk.entities._trace import Event, LineRun, Span +from promptflow._utils.logger_utils import get_cli_sdk_logger +from promptflow.exceptions import UserErrorException + + +class TraceOperations: + def __init__(self): + self._logger = get_cli_sdk_logger() + + def get_event(self, event_id: str) -> typing.Dict: + return Event.get(event_id=event_id) + + def get_span( + self, + span_id: str, + trace_id: typing.Optional[str] = None, + lazy_load: bool = True, + ) -> Span: + orm_span = ORMSpan.get(span_id=span_id, trace_id=trace_id) + span = Span._from_orm_object(orm_span) + if not lazy_load: + span._load_events() + return span + + def list_spans( + self, + trace_ids: typing.Union[str, typing.List[str]], + lazy_load: bool = True, + ) -> typing.List[Span]: + if isinstance(trace_ids, str): + trace_ids = [trace_ids] + orm_spans = ORMSpan.list(trace_ids=trace_ids) + spans = [] + for obj in orm_spans: + span = Span._from_orm_object(obj) + if not lazy_load: + span._load_events() + spans.append(span) + return spans + + def get_line_run(self, line_run_id: str) -> LineRun: + orm_line_run = ORMLineRun.get(line_run_id=line_run_id) + line_run = LineRun._from_orm_object(orm_line_run) + orm_eval_line_runs = ORMLineRun._get_children(line_run_id=line_run_id) + eval_line_runs = [LineRun._from_orm_object(obj) for obj in orm_eval_line_runs] + line_run._append_evaluations(eval_line_runs) + return line_run + + def list_line_runs( + self, + collection: typing.Optional[str] = None, + runs: typing.Optional[typing.Union[str, typing.List[str]]] = None, + experiments: typing.Optional[typing.Union[str, typing.List[str]]] = None, + trace_ids: typing.Optional[typing.Union[str, typing.List[str]]] = None, + ) -> typing.List[LineRun]: + # ensure runs, experiments, and trace_ids are list of string + if isinstance(runs, str): + runs = [runs] + if isinstance(experiments, str): + experiments = [experiments] + if isinstance(trace_ids, str): + trace_ids = [trace_ids] + + # currently we list parent line runs first, and query children for each + # this will query SQLite for N+1 times (N is the number of parent line runs) + # which is not efficient and is possible to optimize this + orm_line_runs = ORMLineRun.list( + collection=collection, + runs=runs, + experiments=experiments, + trace_ids=trace_ids, + ) + line_runs = [] + for obj in orm_line_runs: + line_run = LineRun._from_orm_object(obj) + orm_eval_line_runs = ORMLineRun._get_children(line_run_id=line_run.line_run_id) + eval_line_runs = [LineRun._from_orm_object(obj) for obj in orm_eval_line_runs] + line_run._append_evaluations(eval_line_runs) + line_runs.append(line_run) + return line_runs + + @monitor_operation(activity_name="pf.traces.delete", activity_type=ActivityType.PUBLICAPI) + def delete( + self, + run: typing.Optional[str] = None, + collection: typing.Optional[str] = None, + started_before: typing.Optional[typing.Union[str, datetime.datetime]] = None, + ) -> None: + """Delete traces permanently. + + Support delete according to: + - run + - non default collection + - collection combined with time as started before + + Examples: + - pf.traces.delete(run="name") + - pf.traces.delete(collection="collection") + - pf.traces.delete(collection="default", started_before="2024-03-19T15:17:23.807563") + + :param run: Name of the run. + :type run: Optional[str] + :param session: Id of the session. + :type session: Optional[str] + :param started_before: ISO 8601 format time string (e.g., "2024-03-19T15:17:23.807563"). + :type started_before: Optional[Union[str, datetime.datetime]] + """ + self._logger.debug( + "delete traces with parameters, run: %s, collection: %s, started_before: %s", + run, + collection, + started_before, + ) + self._validate_delete_query_params(run=run, collection=collection, started_before=started_before) + self._logger.debug("try to delete line run(s)...") + if isinstance(started_before, str): + started_before = datetime.datetime.fromisoformat(started_before) + self._delete_within_transaction(run=run, collection=collection, started_before=started_before) + + def _validate_delete_query_params( + self, + run: typing.Optional[str] = None, + collection: typing.Optional[str] = None, + started_before: typing.Optional[typing.Union[str, datetime.datetime]] = None, + ) -> None: + # valid delete queries: + # 1. run=xxx + # 2. collection=yyy + # 3. collection=zz, started_before=zz + # this function will directly return for valid cases + if run is not None and collection is None and started_before is None: + return + if collection is not None and run is None: + if started_before is not None: + # if `started_before` is a time string, need to ensure it's in valid ISO 8601 format + if isinstance(started_before, str): + try: + datetime.datetime.fromisoformat(started_before) + return + except ValueError: + pass + elif isinstance(started_before, datetime.datetime): + return + elif collection != TRACE_DEFAULT_COLLECTION: + return + error_message = ( + 'Valid delete queries: 1) specify `run`; 2) specify `collection` (not "default"); ' + "3) specify `collection` and `started_before` (ISO 8601)." + ) + raise UserErrorException(error_message) + + @sqlite_retry + def _delete_within_transaction( + self, + run: typing.Optional[str] = None, + collection: typing.Optional[str] = None, + started_before: typing.Optional[datetime.datetime] = None, + ) -> None: + # delete will occur across 3 tables: line_runs, spans and events + # which be done in a transaction + from sqlalchemy.orm import Query + + with trace_mgmt_db_session() as session: + # query line run first to get all trace ids + query: Query = session.query(ORMLineRun) + if run is not None: + query = query.filter(ORMLineRun.run == run) + if collection is not None: + query = query.filter(ORMLineRun.collection == collection) + if started_before is not None: + query = query.filter(ORMLineRun.start_time < started_before) + trace_ids = [line_run.trace_id for line_run in query.all()] + self._logger.debug("try to delete traces for trace_ids: %s", trace_ids) + # deletes happen + event_cnt = session.query(ORMEvent).filter(ORMEvent.trace_id.in_(trace_ids)).delete() + span_cnt = session.query(ORMSpan).filter(ORMSpan.trace_id.in_(trace_ids)).delete() + line_run_cnt = query.delete() + session.commit() + + self._logger.debug("deleted %d line runs, %d spans, and %d events", line_run_cnt, span_cnt, event_cnt) diff --git a/src/promptflow-devkit/promptflow/_sdk/schemas/__init__.py b/src/promptflow-devkit/promptflow/_sdk/schemas/__init__.py new file mode 100644 index 00000000000..29a4fcd3278 --- /dev/null +++ b/src/promptflow-devkit/promptflow/_sdk/schemas/__init__.py @@ -0,0 +1,5 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/src/promptflow/promptflow/_sdk/schemas/_base.py b/src/promptflow-devkit/promptflow/_sdk/schemas/_base.py similarity index 100% rename from src/promptflow/promptflow/_sdk/schemas/_base.py rename to src/promptflow-devkit/promptflow/_sdk/schemas/_base.py diff --git a/src/promptflow/promptflow/_sdk/schemas/_connection.py b/src/promptflow-devkit/promptflow/_sdk/schemas/_connection.py similarity index 96% rename from src/promptflow/promptflow/_sdk/schemas/_connection.py rename to src/promptflow-devkit/promptflow/_sdk/schemas/_connection.py index ce5a3325b0d..15f7babd9e0 100644 --- a/src/promptflow/promptflow/_sdk/schemas/_connection.py +++ b/src/promptflow-devkit/promptflow/_sdk/schemas/_connection.py @@ -5,13 +5,8 @@ from marshmallow import ValidationError, fields, post_load, pre_dump, validates -from promptflow._sdk._constants import ( - SCHEMA_KEYS_CONTEXT_CONFIG_KEY, - SCHEMA_KEYS_CONTEXT_SECRET_KEY, - ConnectionAuthMode, - ConnectionType, - CustomStrongTypeConnectionConfigs, -) +from promptflow._constants import ConnectionAuthMode, ConnectionType, CustomStrongTypeConnectionConfigs +from promptflow._sdk._constants import SCHEMA_KEYS_CONTEXT_CONFIG_KEY, SCHEMA_KEYS_CONTEXT_SECRET_KEY from promptflow._sdk.schemas._base import YamlFileSchema from promptflow._sdk.schemas._fields import StringTransformedEnum from promptflow._utils.utils import camel_to_snake diff --git a/src/promptflow/promptflow/_sdk/schemas/_experiment.py b/src/promptflow-devkit/promptflow/_sdk/schemas/_experiment.py similarity index 71% rename from src/promptflow/promptflow/_sdk/schemas/_experiment.py rename to src/promptflow-devkit/promptflow/_sdk/schemas/_experiment.py index ade762a7b00..e74a3d41d8f 100644 --- a/src/promptflow/promptflow/_sdk/schemas/_experiment.py +++ b/src/promptflow-devkit/promptflow/_sdk/schemas/_experiment.py @@ -1,7 +1,7 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -from marshmallow import fields, post_load, pre_load +from marshmallow import ValidationError, fields, post_load, pre_load from promptflow._sdk._constants import ExperimentNodeType from promptflow._sdk.schemas._base import PatchedSchemaMeta, YamlFileSchema @@ -44,6 +44,44 @@ def warning_unknown_fields(self, data, **kwargs): return data +class ChatRoleSchema(YamlFileSchema): + """Schema for chat role.""" + + role = fields.Str(required=True) + path = UnionField([LocalPathField(required=True), fields.Str(required=True)]) + inputs = fields.Dict(keys=fields.Str) + + +class ChatGroupSchema(YamlFileSchema): + """Schema for chat group.""" + + name = fields.Str(required=True) + type = StringTransformedEnum(allowed_values=ExperimentNodeType.CHAT_GROUP, required=True) + max_turns = fields.Int() + max_tokens = fields.Int() + max_time = fields.Int() + stop_signal = fields.Str() + roles = fields.List(NestedField(ChatRoleSchema)) + code = LocalPathField() # points to a folder in which the chat group is defined + + @post_load + def _validate_roles(self, data, **kwargs): + from collections import Counter + + roles = data.get("roles", []) + if not roles: + raise ValidationError("Chat group should have at least one role.") + + # check if there is duplicate role name + role_names = [role["role"] for role in roles] + if len(role_names) != len(set(role_names)): + counter = Counter(role_names) + duplicate_roles = [role for role in counter if counter[role] > 1] + raise ValidationError(f"Duplicate roles are not allowed: {duplicate_roles!r}.") + + return data + + class ExperimentDataSchema(metaclass=PatchedSchemaMeta): name = fields.Str(required=True) path = LocalPathField(required=True) @@ -64,6 +102,7 @@ class ExperimentTemplateSchema(YamlFileSchema): [ NestedField(CommandNodeSchema), NestedField(FlowNodeSchema), + NestedField(ChatGroupSchema), ] ), required=True, @@ -71,7 +110,7 @@ class ExperimentTemplateSchema(YamlFileSchema): @post_load def resolve_nodes(self, data, **kwargs): - from promptflow._sdk.entities._experiment import CommandNode, FlowNode + from promptflow._sdk.entities._experiment import ChatGroupNode, CommandNode, FlowNode nodes = data.get("nodes", []) resolved_nodes = [] @@ -85,6 +124,10 @@ def resolve_nodes(self, data, **kwargs): resolved_nodes.append( CommandNode._load_from_dict(data=node, context=self.context, additional_message="") ) + elif node_type == ExperimentNodeType.CHAT_GROUP: + resolved_nodes.append( + ChatGroupNode._load_from_dict(data=node, context=self.context, additional_message="") + ) else: raise ValueError(f"Unknown node type {node_type} for node {node}.") data["nodes"] = resolved_nodes diff --git a/src/promptflow/promptflow/_sdk/schemas/_fields.py b/src/promptflow-devkit/promptflow/_sdk/schemas/_fields.py similarity index 100% rename from src/promptflow/promptflow/_sdk/schemas/_fields.py rename to src/promptflow-devkit/promptflow/_sdk/schemas/_fields.py diff --git a/src/promptflow/promptflow/_sdk/schemas/_flow.py b/src/promptflow-devkit/promptflow/_sdk/schemas/_flow.py similarity index 80% rename from src/promptflow/promptflow/_sdk/schemas/_flow.py rename to src/promptflow-devkit/promptflow/_sdk/schemas/_flow.py index 4bafba06c98..06be3cecd9f 100644 --- a/src/promptflow/promptflow/_sdk/schemas/_flow.py +++ b/src/promptflow-devkit/promptflow/_sdk/schemas/_flow.py @@ -5,7 +5,7 @@ from marshmallow import ValidationError, fields, validate, validates_schema -from promptflow._constants import LANGUAGE_KEY, FlowLanguage +from promptflow._constants import LANGUAGE_KEY, FlowEntryRegex, FlowLanguage from promptflow._sdk._constants import FlowType from promptflow._sdk.schemas._base import PatchedSchemaMeta, YamlFileSchema from promptflow._sdk.schemas._fields import NestedField @@ -60,20 +60,6 @@ class FlowSchema(BaseFlowSchema): node_variants = fields.Dict(keys=fields.Str(), values=fields.Dict()) -class PythonEagerFlowEntry(fields.Str): - """Entry point for eager flow. For example: pkg.module:func""" - - default_error_messages = { - "invalid_entry": "Provided entry {entry} has incorrect format. " - "Python eager flow only support pkg.module:func format.", - } - - def _validate(self, value): - super()._validate(value) - if not re.match(r"^[a-zA-Z0-9_.]+:[a-zA-Z0-9_]+$", value): - raise self.make_error("invalid_entry", entry=value) - - class EagerFlowSchema(BaseFlowSchema): """Schema for eager flow.""" @@ -86,9 +72,9 @@ def validate_entry(self, data, **kwargs): language = data.get(LANGUAGE_KEY, FlowLanguage.Python) entry_regex = None if language == FlowLanguage.CSharp: - entry_regex = r"\((.+)\)[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+" + entry_regex = FlowEntryRegex.CSharp elif language == FlowLanguage.Python: - entry_regex = r"^[a-zA-Z0-9_.]+:[a-zA-Z0-9_]+$" + entry_regex = FlowEntryRegex.Python if entry_regex is not None and not re.match(entry_regex, data["entry"]): raise ValidationError(field_name="entry", message=f"Entry function {data['entry']} is not valid.") diff --git a/src/promptflow/promptflow/_sdk/schemas/_run.py b/src/promptflow-devkit/promptflow/_sdk/schemas/_run.py similarity index 99% rename from src/promptflow/promptflow/_sdk/schemas/_run.py rename to src/promptflow-devkit/promptflow/_sdk/schemas/_run.py index bf7e869ee30..7f339eba155 100644 --- a/src/promptflow/promptflow/_sdk/schemas/_run.py +++ b/src/promptflow-devkit/promptflow/_sdk/schemas/_run.py @@ -132,6 +132,8 @@ class RunSchema(YamlFileSchema): outputs = fields.Dict(key=fields.Str(), dump_only=True) # endregion: command node + init = fields.Dict(key=fields.Str()) + @post_load def resolve_dot_env_file(self, data, **kwargs): return _resolve_dot_env_file(data, **kwargs) diff --git a/src/promptflow/promptflow/tracing/_constants.py b/src/promptflow-devkit/promptflow/_version.py similarity index 75% rename from src/promptflow/promptflow/tracing/_constants.py rename to src/promptflow-devkit/promptflow/_version.py index 16538927ae4..68ee238ac5d 100644 --- a/src/promptflow/promptflow/tracing/_constants.py +++ b/src/promptflow-devkit/promptflow/_version.py @@ -2,4 +2,4 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- -PF_TRACING_SKIP_LOCAL_SETUP = "PF_TRACING_SKIP_LOCAL_SETUP" +VERSION = "0.0.1" diff --git a/src/promptflow/promptflow/batch/__init__.py b/src/promptflow-devkit/promptflow/batch/__init__.py similarity index 51% rename from src/promptflow/promptflow/batch/__init__.py rename to src/promptflow-devkit/promptflow/batch/__init__.py index 745a2d2f381..d28739ab43c 100644 --- a/src/promptflow/promptflow/batch/__init__.py +++ b/src/promptflow-devkit/promptflow/batch/__init__.py @@ -3,17 +3,10 @@ # --------------------------------------------------------- # flake8: noqa -from ._base_executor_proxy import AbstractExecutorProxy, APIBasedExecutorProxy from ._batch_engine import BatchEngine -from ._csharp_executor_proxy import CSharpExecutorProxy -from ._python_executor_proxy import PythonExecutorProxy from ._result import BatchResult __all__ = [ - "AbstractExecutorProxy", - "APIBasedExecutorProxy", "BatchEngine", - "CSharpExecutorProxy", - "PythonExecutorProxy", "BatchResult", ] diff --git a/src/promptflow/promptflow/batch/_batch_engine.py b/src/promptflow-devkit/promptflow/batch/_batch_engine.py similarity index 68% rename from src/promptflow/promptflow/batch/_batch_engine.py rename to src/promptflow-devkit/promptflow/batch/_batch_engine.py index a4c39412210..f0537e08449 100644 --- a/src/promptflow/promptflow/batch/_batch_engine.py +++ b/src/promptflow-devkit/promptflow/batch/_batch_engine.py @@ -5,13 +5,22 @@ import signal import threading import uuid +from copy import deepcopy from datetime import datetime from pathlib import Path -from typing import Any, Dict, List, Mapping, Optional - -from promptflow._constants import LANGUAGE_KEY, LINE_NUMBER_KEY, LINE_TIMEOUT_SEC, FlowLanguage +from typing import Any, Dict, List, Mapping, Optional, Type + +from promptflow._constants import ( + LANGUAGE_KEY, + LINE_NUMBER_KEY, + LINE_TIMEOUT_SEC, + OUTPUT_FILE_NAME, + FlowLanguage, + MessageFormatType, +) from promptflow._core._errors import ResumeCopyError, UnexpectedError -from promptflow._core.operation_context import OperationContext +from promptflow._proxy import AbstractExecutorProxy, ProxyFactory +from promptflow._proxy._python_executor_proxy import PythonExecutorProxy from promptflow._utils.async_utils import async_run_allowing_running_loop from promptflow._utils.context_utils import _change_working_dir from promptflow._utils.execution_utils import ( @@ -20,58 +29,49 @@ extract_aggregation_inputs, get_aggregation_inputs_properties, handle_line_failures, + set_batch_input_source_from_inputs_mapping, ) +from promptflow._utils.flow_utils import is_flex_flow from promptflow._utils.logger_utils import bulk_logger +from promptflow._utils.multimedia_utils import MultimediaProcessor from promptflow._utils.utils import ( - copy_file_except, dump_list_to_jsonl, get_int_env_var, - load_list_from_jsonl, log_progress, resolve_dir_to_absolute, transpose, ) from promptflow._utils.yaml_utils import load_yaml -from promptflow.batch._base_executor_proxy import AbstractExecutorProxy from promptflow.batch._batch_inputs_processor import BatchInputsProcessor -from promptflow.batch._csharp_executor_proxy import CSharpExecutorProxy from promptflow.batch._errors import BatchRunTimeoutError -from promptflow.batch._python_executor_proxy import PythonExecutorProxy from promptflow.batch._result import BatchResult from promptflow.contracts.flow import Flow -from promptflow.contracts.run_info import Status +from promptflow.contracts.run_info import FlowRunInfo, Status from promptflow.exceptions import ErrorTarget, PromptflowException from promptflow.executor._line_execution_process_pool import signal_handler from promptflow.executor._result import AggregationResult, LineResult from promptflow.executor.flow_validator import FlowValidator from promptflow.storage import AbstractBatchRunStorage, AbstractRunStorage +from promptflow.storage._run_storage import DefaultRunStorage -OUTPUT_FILE_NAME = "output.jsonl" DEFAULT_CONCURRENCY = 10 class BatchEngine: """This class is used to execute flows in batch mode""" - executor_proxy_classes: Mapping[str, AbstractExecutorProxy] = { - FlowLanguage.Python: PythonExecutorProxy, - FlowLanguage.CSharp: CSharpExecutorProxy, - } - @classmethod - def register_executor(cls, type: str, executor_proxy_cls: AbstractExecutorProxy): + def register_executor(cls, language: str, executor_proxy_cls: Type[AbstractExecutorProxy]): """Register a executor proxy class for a specific program language. - This method allows users to register a executor proxy class for a particular - programming language. The executor proxy class will be used when creating an instance - of the BatchEngine for flows written in the specified language. - - :param type: The flow program language of the executor proxy, - :type type: str - :param executor_proxy_cls: The executor proxy class to be registered. - :type executor_proxy_cls: ~promptflow.batch.AbstractExecutorProxy + this function is left to keep the compatibility with the old version promptflow-runtime; it will + redirect the registration to the ExecutorProxyFactory. """ - cls.executor_proxy_classes[type] = executor_proxy_cls + # TODO: remove this after we migrate to multi-container + ProxyFactory.register_executor( + language=language, + executor_proxy_cls=executor_proxy_cls, + ) def __init__( self, @@ -83,6 +83,7 @@ def __init__( batch_timeout_sec: Optional[int] = None, line_timeout_sec: Optional[int] = None, worker_count: Optional[int] = None, + init_kwargs: Optional[Dict[str, Any]] = None, **kwargs, ): """Create a new batch engine instance @@ -101,6 +102,8 @@ def __init__( :type line_timeout: Optional[int] :param worker_count: The concurrency limit of batch run :type worker_count: Optional[int] + :param init_kwargs: Class init arguments for callable class, only supported for flex flow. + :type init_kwargs: Optional[Dict[str, Any]] :param kwargs: The keyword arguments related to creating the executor proxy class :type kwargs: Any """ @@ -114,16 +117,28 @@ def __init__( self._flow = Flow.from_yaml(flow_file, working_dir=self._working_dir) FlowValidator.ensure_flow_valid_in_batch_mode(self._flow) + # eager flow does not support multimedia contract currently, just use basic format type. + self._message_format = self._flow.message_format if not self._is_eager_flow else MessageFormatType.BASIC + self._multimedia_processor = MultimediaProcessor.create(self._message_format) + self._connections = connections - self._storage = storage + self._storage = storage if storage else DefaultRunStorage(base_dir=self._working_dir) self._kwargs = kwargs self._batch_timeout_sec = batch_timeout_sec or get_int_env_var("PF_BATCH_TIMEOUT_SEC") self._line_timeout_sec = line_timeout_sec or get_int_env_var("PF_LINE_TIMEOUT_SEC", LINE_TIMEOUT_SEC) self._worker_count = worker_count or get_int_env_var("PF_WORKER_COUNT") + # update kwargs with worker_count and line_timeout_sec + self._kwargs.update( + { + "worker_count": self._worker_count, + "line_timeout_sec": self._line_timeout_sec, + } + ) # set it to True when the batch run is canceled self._is_canceled = False + self._init_kwargs = init_kwargs def run( self, @@ -163,13 +178,13 @@ def run( self._start_time = datetime.utcnow() with _change_working_dir(self._working_dir): # create executor proxy instance according to the flow program language - executor_proxy_cls = self.executor_proxy_classes[self._program_language] - self._executor_proxy: AbstractExecutorProxy = async_run_allowing_running_loop( - executor_proxy_cls.create, - self._flow_file, - self._working_dir, + self._executor_proxy = ProxyFactory().create_executor_proxy( + flow_file=self._flow_file, + working_dir=self._working_dir, connections=self._connections, storage=self._storage, + language=self._program_language, + init_kwargs=self._init_kwargs, **self._kwargs, ) try: @@ -186,19 +201,23 @@ def run( ) # set batch input source from input mapping - OperationContext.get_instance().set_batch_input_source_from_inputs_mapping(inputs_mapping) + set_batch_input_source_from_inputs_mapping(inputs_mapping) # if using eager flow, the self._flow is none, so we need to get inputs definition from executor inputs = self._executor_proxy.get_inputs_definition() if self._is_eager_flow else self._flow.inputs + # resolve input data from input dirs and apply inputs mapping - batch_input_processor = BatchInputsProcessor(self._working_dir, inputs, max_lines_count) + batch_input_processor = BatchInputsProcessor( + self._working_dir, inputs, max_lines_count, message_format=self._message_format + ) batch_inputs = batch_input_processor.process_batch_inputs(input_dirs, inputs_mapping) # resolve output dir output_dir = resolve_dir_to_absolute(self._working_dir, output_dir) + run_id = run_id or str(uuid.uuid4()) previous_run_results = None - if resume_from_run_storage and resume_from_run_output_dir: + if resume_from_run_storage: previous_run_results = self._copy_previous_run_result( - resume_from_run_storage, resume_from_run_output_dir, batch_inputs, output_dir + resume_from_run_storage, batch_inputs, output_dir, run_id ) # run flow in batch mode @@ -230,31 +249,43 @@ def run( def _copy_previous_run_result( self, resume_from_run_storage: AbstractBatchRunStorage, - resume_from_run_output_dir: Path, batch_inputs: List, output_dir: Path, + run_id: str, ) -> List[LineResult]: - """Duplicate the previous debug_info from resume_from_run_storage and output from resume_from_run_output_dir - to the storage of new run, + """Duplicate the previous debug_info from resume_from_run_storage to the storage of new run, return the list of previous line results for the usage of aggregation and summarization. """ - # Load the previous flow run output from output.jsonl - previous_run_output = load_list_from_jsonl(resume_from_run_output_dir / "output.jsonl") - previous_run_output_dict = { - each_line_output[LINE_NUMBER_KEY]: each_line_output for each_line_output in previous_run_output - } - - # Copy other files from resume_from_run_output_dir to output_dir in case there are images - copy_file_except(resume_from_run_output_dir, output_dir, "output.jsonl") - try: previous_run_results = [] + aggregation_nodes = {node.name for node in self._flow.nodes if node.aggregation} for i in range(len(batch_inputs)): - previous_run_info = resume_from_run_storage.load_flow_run_info(i) + previous_run_info: FlowRunInfo = resume_from_run_storage.load_flow_run_info(i) if previous_run_info and previous_run_info.status == Status.Completed: + # UI uses root_run_id to link the base path in datastore with the run_info of line. + # Thus the root_run_id needs to be the current batch run id. + previous_run_info.root_run_id = run_id + previous_run_info.parent_run_id = run_id + # Load previous node run info previous_node_run_infos = resume_from_run_storage.load_node_run_info_for_line(i) + + # In storage, aggregation nodes are persisted with filenames similar to regular nodes. + # Currently we read regular node run records by filename in the node artifacts folder, + # which may lead to load records of aggregation nodes at the same time, which is not intended. + # E.g, aggregation-node/000000000.jsonl will be treated as the node_run_info of the first line: + # node_artifacts/ + # ├─ non-aggregation-node/ + # │ ├─ 000000000.jsonl + # │ ├─ 000000001.jsonl + # │ ├─ 000000002.jsonl + # ├─ aggregation-node/ + # │ ├─ 000000000.jsonl + # So we filter out aggregation nodes since line records should not contain any info about them. + previous_node_run_infos = [ + run_info for run_info in previous_node_run_infos if run_info.node not in aggregation_nodes + ] previous_node_run_infos_dict = {node_run.node: node_run for node_run in previous_node_run_infos} previous_node_run_outputs = { node_info.node: node_info.output for node_info in previous_node_run_infos @@ -263,6 +294,12 @@ def _copy_previous_run_result( # Extract aggregation inputs for flow with aggregation node aggregation_inputs = extract_aggregation_inputs(self._flow, previous_node_run_outputs) + # Deepcopy to avoid modifying the original object when serializing image + previous_run_output = deepcopy(previous_run_info.output) + previous_run_output_in_line_result = self._multimedia_processor.persist_multimedia_data( + previous_run_output, output_dir + ) + # Persist previous run info and node run info self._storage.persist_flow_run(previous_run_info) for node_run_info in previous_node_run_infos: @@ -270,7 +307,7 @@ def _copy_previous_run_result( # Create LineResult object for previous line result previous_line_result = LineResult( - output=previous_run_output_dict[i], + output=previous_run_output_in_line_result, aggregation_inputs=aggregation_inputs, run_info=previous_run_info, node_run_infos=previous_node_run_infos_dict, @@ -303,10 +340,17 @@ async def _exec_in_task( # so we pass empty line results list and aggr results and update them in _exec so that when the batch # run is canceled we can get the current completed line results and aggr results. line_results: List[LineResult] = [] - line_results.extend(previous_line_results or []) aggr_result = AggregationResult({}, {}, {}) task = asyncio.create_task( - self._exec(line_results, aggr_result, batch_inputs, run_id, output_dir, raise_on_line_failure) + self._exec( + batch_inputs, + run_id, + output_dir, + raise_on_line_failure, + previous_line_results, + line_results, + aggr_result, + ) ) while not task.done(): # check whether the task is completed or canceled every 1s @@ -317,17 +361,52 @@ async def _exec_in_task( return BatchResult.create( self._start_time, datetime.utcnow(), line_results, aggr_result, status=Status.Canceled ) + if self._batch_timeout_expired(): + task.cancel() + ex = BatchRunTimeoutError( + message_format=( + "The batch run failed due to timeout [{batch_timeout_sec}s]. " + "Please adjust the timeout to a higher value." + ), + batch_timeout_sec=self._batch_timeout_sec, + target=ErrorTarget.BATCH, + ) + # summary some infos from line results and aggr results to batch result + return BatchResult.create(self._start_time, datetime.utcnow(), line_results, aggr_result, exception=ex) return task.result() async def _exec( self, - line_results: List[LineResult], - aggr_result: AggregationResult, batch_inputs: List[Dict[str, Any]], run_id: str = None, output_dir: Path = None, raise_on_line_failure: bool = False, + previous_line_results: List[LineResult] = None, + line_results: List[LineResult] = [], + aggr_result: AggregationResult = AggregationResult({}, {}, {}), ) -> BatchResult: + """ + Asynchronously execute batch processing of inputs with potential resumption from previous results, + and aggregate outputs accordingly. Empty list `line_results` and `aggr_result` is passed to ensure + their current state can be retrieved when batch run is canceled. + + :param batch_inputs: A list of dictionaries representing the inputs for all lines of the batch. + :type batch_inputs: List[Mapping[str, Any]] + :param run_id: An optional unique identifier for the run. If not provided, a new UUID will be generated. + :type run_id: Optional[str] + :param output_dir: An optional path to a directory where outputs will be persisted. + :type output_dir: Optional[Path] + :param raise_on_line_failure: A flag indicating whether to raise an exception on individual line failures. + :type raise_on_line_failure: bool + :param previous_line_results: An optional list of previous line results to resume from. + :type previous_line_results: Optional[List[~promptflow.executor._result.LineResult]] + :param line_results: An output parameter to be populated with the results of processing all lines in the batch. + :type line_results: List[~promptflow.executor._result.LineResult] + :param aggr_result: An output parameter to be populated with the aggregated results of all lines in the batch. + :type aggr_result: ~promptflow.executor._result.AggregationResult + :return: A `BatchResult` object containing information about the execution of the batch. + :rtype: ~promptflow.batch._result.BatchResult + """ # ensure executor health before execution await self._executor_proxy.ensure_executor_health() # apply default value in early stage, so we can use it both in line and aggregation nodes execution. @@ -337,16 +416,23 @@ async def _exec( apply_default_value_for_input(self._flow.inputs, each_line_input) for each_line_input in batch_inputs ] - existing_results_line_numbers = set([r.run_info.index for r in line_results]) - bulk_logger.info(f"Skipped the execution of {len(existing_results_line_numbers)} existing results.") - inputs_to_run = [input for input in batch_inputs if input[LINE_NUMBER_KEY] not in existing_results_line_numbers] + # if there are existing results resumed from previous run, we should skip the execution of these lines + if previous_line_results: + line_results.extend(previous_line_results) + existing_results_line_numbers = set([r.run_info.index for r in previous_line_results]) + bulk_logger.info(f"Skipped the execution of {len(existing_results_line_numbers)} existing results.") + inputs_to_run = [ + input for input in batch_inputs if input[LINE_NUMBER_KEY] not in existing_results_line_numbers + ] + else: + inputs_to_run = batch_inputs run_id = run_id or str(uuid.uuid4()) # execute lines is_timeout = False if isinstance(self._executor_proxy, PythonExecutorProxy): - results, is_timeout = self._executor_proxy._exec_batch( + results, is_timeout = await self._executor_proxy._exec_batch( inputs_to_run, output_dir, run_id, @@ -377,7 +463,11 @@ async def _exec( self._update_aggr_result(aggr_result, aggr_exec_result) else: ex = BatchRunTimeoutError( - message="The batch run failed due to timeout. Please adjust the timeout settings to a higher value.", + message_format=( + "The batch run failed due to timeout [{batch_timeout_sec}s]. " + "Please adjust the timeout to a higher value." + ), + batch_timeout_sec=self._batch_timeout_sec, target=ErrorTarget.BATCH, ) # summary some infos from line results and aggr results to batch result @@ -398,19 +488,22 @@ async def _exec_batch( total_lines = len(batch_inputs) completed_line = 0 + last_log_count = 0 while completed_line < total_lines: + # wait for any task to complete done, pending = await asyncio.wait(pending, return_when=asyncio.FIRST_COMPLETED) completed_line_results = [task.result() for task in done] + # persist node run infos and flow run info in line result to storage self._persist_run_info(completed_line_results) line_results.extend(completed_line_results) - log_progress( - self._start_time, - bulk_logger, - len(line_results), - total_lines, - last_log_count=completed_line, - ) + # update the progress log completed_line = len(line_results) + last_log_count = log_progress( + run_start_time=self._start_time, + total_count=total_lines, + current_count=completed_line, + last_log_count=last_log_count, + ) async def _exec_line_under_semaphore( self, @@ -500,6 +593,11 @@ def _check_eager_flow_and_language_from_yaml(self): return True, FlowLanguage.CSharp with open(flow_file, "r", encoding="utf-8") as fin: flow_dag = load_yaml(fin) - is_eager_flow = "entry" in flow_dag language = flow_dag.get(LANGUAGE_KEY, FlowLanguage.Python) - return is_eager_flow, language + return is_flex_flow(yaml_dict=flow_dag), language + + def _batch_timeout_expired(self) -> bool: + # Currently, local PythonExecutorProxy will handle the batch timeout by itself. + if self._batch_timeout_sec is None or isinstance(self._executor_proxy, PythonExecutorProxy): + return False + return (datetime.utcnow() - self._start_time).total_seconds() > self._batch_timeout_sec diff --git a/src/promptflow/promptflow/batch/_batch_inputs_processor.py b/src/promptflow-devkit/promptflow/batch/_batch_inputs_processor.py similarity index 95% rename from src/promptflow/promptflow/batch/_batch_inputs_processor.py rename to src/promptflow-devkit/promptflow/batch/_batch_inputs_processor.py index 523ee651ba1..a38840c5c31 100644 --- a/src/promptflow/promptflow/batch/_batch_inputs_processor.py +++ b/src/promptflow-devkit/promptflow/batch/_batch_inputs_processor.py @@ -5,12 +5,12 @@ from pathlib import Path from typing import Any, Dict, List, Mapping, Optional -from promptflow._constants import LINE_NUMBER_KEY +from promptflow._constants import LINE_NUMBER_KEY, MessageFormatType from promptflow._core._errors import UnexpectedError from promptflow._utils.inputs_mapping_utils import apply_inputs_mapping from promptflow._utils.load_data import load_data from promptflow._utils.logger_utils import logger -from promptflow._utils.multimedia_utils import resolve_multimedia_data_recursively +from promptflow._utils.multimedia_utils import MultimediaProcessor from promptflow._utils.utils import resolve_dir_to_absolute from promptflow.batch._errors import EmptyInputsData, InputMappingError from promptflow.contracts.flow import FlowInputDefinition @@ -22,11 +22,13 @@ def __init__( working_dir: Path, flow_inputs: Mapping[str, FlowInputDefinition], max_lines_count: Optional[int] = None, + message_format: str = MessageFormatType.BASIC, ): self._working_dir = working_dir self._max_lines_count = max_lines_count self._flow_inputs = flow_inputs self._default_inputs_mapping = {key: f"${{data.{key}}}" for key in flow_inputs} + self._multimedia_processor = MultimediaProcessor.create(message_format) def process_batch_inputs(self, input_dirs: Dict[str, str], inputs_mapping: Dict[str, str]): input_dicts = self._resolve_input_data(input_dirs) @@ -53,7 +55,7 @@ def _resolve_data_from_input_path(self, input_path: Path): result = [] if input_path.is_file(): result.extend( - resolve_multimedia_data_recursively( + self._multimedia_processor.resolve_multimedia_data_recursively( input_path.parent, load_data(local_path=input_path, max_rows_count=self._max_lines_count) ) ) @@ -61,7 +63,7 @@ def _resolve_data_from_input_path(self, input_path: Path): for input_file in input_path.rglob("*"): if input_file.is_file(): result.extend( - resolve_multimedia_data_recursively( + self._multimedia_processor.resolve_multimedia_data_recursively( input_file.parent, load_data(local_path=input_file, max_rows_count=self._max_lines_count) ) ) diff --git a/src/promptflow/promptflow/batch/_errors.py b/src/promptflow-devkit/promptflow/batch/_errors.py similarity index 100% rename from src/promptflow/promptflow/batch/_errors.py rename to src/promptflow-devkit/promptflow/batch/_errors.py diff --git a/src/promptflow/promptflow/batch/_result.py b/src/promptflow-devkit/promptflow/batch/_result.py similarity index 98% rename from src/promptflow/promptflow/batch/_result.py rename to src/promptflow-devkit/promptflow/batch/_result.py index 1569fb59b5d..e0c721e5cab 100644 --- a/src/promptflow/promptflow/batch/_result.py +++ b/src/promptflow-devkit/promptflow/batch/_result.py @@ -8,9 +8,9 @@ from typing import Any, List, Mapping from promptflow._utils.exception_utils import ExceptionPresenter, RootErrorCode -from promptflow._utils.openai_metrics_calculator import OpenAIMetricsCalculator from promptflow.contracts.run_info import RunInfo, Status from promptflow.executor._result import AggregationResult, LineResult +from promptflow.tracing._openai_utils import OpenAIMetricsCalculator @dataclass diff --git a/src/promptflow-devkit/promptflow/client/__init__.py b/src/promptflow-devkit/promptflow/client/__init__.py new file mode 100644 index 00000000000..b6b158838d1 --- /dev/null +++ b/src/promptflow-devkit/promptflow/client/__init__.py @@ -0,0 +1,11 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore + +# control plane sdk functions +from promptflow._sdk._load_functions import load_flow, load_run + +from .._sdk._pf_client import PFClient + +__all__ = ["PFClient", "load_run", "load_flow"] diff --git a/src/promptflow/promptflow/entities/__init__.py b/src/promptflow-devkit/promptflow/entities/__init__.py similarity index 100% rename from src/promptflow/promptflow/entities/__init__.py rename to src/promptflow-devkit/promptflow/entities/__init__.py diff --git a/src/promptflow/promptflow/operations/__init__.py b/src/promptflow-devkit/promptflow/operations/__init__.py similarity index 100% rename from src/promptflow/promptflow/operations/__init__.py rename to src/promptflow-devkit/promptflow/operations/__init__.py diff --git a/src/promptflow-devkit/pyproject.toml b/src/promptflow-devkit/pyproject.toml new file mode 100644 index 00000000000..5642ab958a1 --- /dev/null +++ b/src/promptflow-devkit/pyproject.toml @@ -0,0 +1,148 @@ +[tool.poetry] +name = "promptflow-devkit" +version = "1.0.0.dev0" +description = "Prompt flow devkit" +include = [ + "promptflow/_sdk/_service/static/*", + "promptflow/_sdk/_service/static/assets/*", + "promptflow/_cli/data/**/*", + "promptflow/_sdk/data/**/*", +] + +license = "MIT" + +authors = [ + "Microsoft Corporation " +] + +repository = "https://github.com/microsoft/promptflow" +homepage = "https://microsoft.github.io/promptflow/" + +readme = ["README.md"] +keywords = ["devkit"] + +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +packages = [ + { include = "promptflow" } +] + +[tool.poetry.urls] +"Bug Reports" = "https://github.com/microsoft/promptflow/issues" + +[tool.poetry.dependencies] +python = ">=3.8,<3.9.7 || >3.9.7,<3.13" +promptflow-core = "<2.0.0" +httpx = ">=0.25.1" # used to send http requests asynchronously +sqlalchemy = ">=1.4.48,<3.0.0" # sqlite requirements +pandas = ">=1.5.3,<3.0.0" # load data requirements +python-dotenv = ">=1.0.0,<2.0.0" # control plane sdk requirements, to load .env file +keyring = ">=24.2.0,<25.0.0" # control plane sdk requirements, to access system keyring service +pydash = ">=6.0.0,<8.0.0" # control plane sdk requirements, to support parameter overrides in schema. +cryptography = ">=42.0.4" # control plane sdk requirements to support connection encryption +colorama = ">=0.4.6,<0.5.0" # producing colored terminal text for testing chat flow +tabulate = ">=0.9.0,<1.0.0" # control plane sdk requirements, to print table in console +filelock = ">=3.4.0,<4.0.0" # control plane sdk requirements, to lock for multiprocessing +marshmallow = ">=3.5,<4.0.0" +gitpython = ">=3.1.24,<4.0.0" # used git info to generate flow id +strictyaml = ">=1.5.0,<2.0.0" # used to identify exact location of validation error +waitress = ">=2.1.2,<3.0.0" # used to serve local service +azure-monitor-opentelemetry-exporter = ">=1.0.0b21,<2.0.0" +pyarrow = ">=14.0.1,<15.0.0" # used to read parquet file with pandas.read_parquet +pillow = ">=10.1.0,<11.0.0" # used to generate icon data URI for package tool +opentelemetry-exporter-otlp-proto-http = ">=1.22.0,<2.0.0" # trace support +flask-restx = ">=1.2.0,<2.0.0" # PFS Swagger +flask-cors = ">=4.0.0,<5.0.0" # handle PFS CORS +pyinstaller = ">=5.13.2" +streamlit = ">=1.26.0" +streamlit-quill = "<0.1.0" +bs4 = "*" + +[tool.poetry.extras] +executable = [ + "pyarrow", + "pyinstaller", + "streamlit", + "streamlit-quill", + "bs4", +] +pyarrow = [ + "pyarrow", +] + +[tool.poetry.group.dev.dependencies] +pre-commit = "*" +import-linter = "*" + +[tool.poetry.group.test.dependencies] +pytest = "*" +pytest-cov = "*" +pytest-xdist = "*" +pytest-mock = "*" +pytest-asyncio = "*" +mock = "*" +ipykernel = ">=6.27.1" +papermill = ">=2.5.0" +keyrings-alt = "*" + +[build-system] +requires = ["poetry-core>=1.5.0"] +build-backend = "poetry.core.masonry.api" + +[tool.poetry.scripts] +pf = "promptflow._cli.pf:main" + +[tool.pytest.ini_options] +markers = [ + "unittest", +] +# junit - analyse and publish test results (https://github.com/EnricoMi/publish-unit-test-result-action) +# durations - list the slowest test durations +addopts = """ +--junit-xml=test-results.xml \ +--dist loadfile \ +--log-level=info \ +--log-format="%(asctime)s %(levelname)s %(message)s" \ +--log-date-format="[%Y-%m-%d %H:%M:%S]" \ +--durations=5 \ +-ra \ +-vv +""" +testpaths = ["tests"] + +[tool.coverage.run] +omit = [ + "__init__.py", +] + +[tool.black] +line-length = 120 + +[tool.importlinter] +root_package = "promptflow" +include_external_packages = "True" + +[[tool.importlinter.contracts]] +name = "Contract forbidden modules" +type = "forbidden" +source_modules = [ + "promptflow._cli", + "promptflow._internal", + "promptflow._proxy", + "promptflow._sdk", + "promptflow.batch", + "promptflow.client", + "promptflow.entities", + "promptflow.operations" +] +forbidden_modules = ["promptflow.azure"] diff --git a/src/promptflow-devkit/tests/unittests/test.py b/src/promptflow-devkit/tests/unittests/test.py new file mode 100644 index 00000000000..226a2ed4261 --- /dev/null +++ b/src/promptflow-devkit/tests/unittests/test.py @@ -0,0 +1,11 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import pytest + + +@pytest.mark.unittest +class TestStartTrace: + def test_import(self): + assert True diff --git a/src/promptflow-recording/README.md b/src/promptflow-recording/README.md new file mode 100644 index 00000000000..f7a2574217f --- /dev/null +++ b/src/promptflow-recording/README.md @@ -0,0 +1,3 @@ +# Prompt flow recording + +Prompt flow recording utilities for test use. diff --git a/src/promptflow-recording/promptflow/recording/__init__.py b/src/promptflow-recording/promptflow/recording/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/__init__.py b/src/promptflow-recording/promptflow/recording/azure/__init__.py similarity index 85% rename from src/promptflow/tests/sdk_cli_azure_test/recording_utilities/__init__.py rename to src/promptflow-recording/promptflow/recording/azure/__init__.py index aa7b0d94f75..0b7983ba99d 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/__init__.py +++ b/src/promptflow-recording/promptflow/recording/azure/__init__.py @@ -4,7 +4,7 @@ from .bases import PFAzureIntegrationTestRecording from .constants import SanitizedValues -from .utils import get_created_flow_name_from_flow_path, get_pf_client_for_replay, is_live, is_record, is_replay +from .utils import get_created_flow_name_from_flow_path, get_pf_client_for_replay from .variable_recorder import VariableRecorder __all__ = [ @@ -13,7 +13,4 @@ "VariableRecorder", "get_created_flow_name_from_flow_path", "get_pf_client_for_replay", - "is_live", - "is_record", - "is_replay", ] diff --git a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/bases.py b/src/promptflow-recording/promptflow/recording/azure/bases.py similarity index 97% rename from src/promptflow/tests/sdk_cli_azure_test/recording_utilities/bases.py rename to src/promptflow-recording/promptflow/recording/azure/bases.py index 80c19fbf83c..e764d7f0b8b 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/bases.py +++ b/src/promptflow-recording/promptflow/recording/azure/bases.py @@ -12,6 +12,7 @@ from vcr import matchers from vcr.request import Request +from ..record_mode import is_live, is_record, is_replay from .constants import FILTER_HEADERS, TEST_CLASSES_FOR_RUN_INTEGRATION_TEST_RECORDING, SanitizedValues from .processors import ( AzureMLExperimentIDProcessor, @@ -29,9 +30,6 @@ from .utils import ( is_httpx_response, is_json_payload_request, - is_live, - is_record, - is_replay, sanitize_automatic_runtime_request_path, sanitize_azure_workspace_triad, sanitize_file_share_flow_path, @@ -82,10 +80,8 @@ def from_test_case(test_class, test_func_name: str, **kwargs) -> "PFAzureIntegra ) def _get_recording_file(self) -> Path: - # recording files are expected to be located at "tests/test_configs/recordings" - # test file path should locate at "tests/sdk_cli_azure_test/e2etests" test_file_path = Path(inspect.getfile(self.test_class)).resolve() - recording_dir = (test_file_path.parent.parent.parent / "test_configs" / "recordings").resolve() + recording_dir = (Path(__file__).parent / "../../../recordings/azure").resolve() recording_dir.mkdir(exist_ok=True) test_file_name = test_file_path.stem @@ -250,7 +246,7 @@ def _drop_duplicate_recordings(self) -> None: run_data_requests = dict() log_content_requests = dict() for req, resp in self.cassette.data: - # run hisotry's rundata API + # run history's rundata API if str(req.path).endswith("/rundata"): body = req.body.decode("utf-8") body_dict = json.loads(body) diff --git a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/constants.py b/src/promptflow-recording/promptflow/recording/azure/constants.py similarity index 97% rename from src/promptflow/tests/sdk_cli_azure_test/recording_utilities/constants.py rename to src/promptflow-recording/promptflow/recording/azure/constants.py index 19c0d095cfc..2b227afab57 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/constants.py +++ b/src/promptflow-recording/promptflow/recording/azure/constants.py @@ -5,12 +5,6 @@ ENVIRON_TEST_MODE = "PROMPT_FLOW_TEST_MODE" -class TestMode: - LIVE = "live" - RECORD = "record" - REPLAY = "replay" - - FILTER_HEADERS = [ "aml-user-token", "authorization", diff --git a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/processors.py b/src/promptflow-recording/promptflow/recording/azure/processors.py similarity index 100% rename from src/promptflow/tests/sdk_cli_azure_test/recording_utilities/processors.py rename to src/promptflow-recording/promptflow/recording/azure/processors.py diff --git a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/utils.py b/src/promptflow-recording/promptflow/recording/azure/utils.py similarity index 95% rename from src/promptflow/tests/sdk_cli_azure_test/recording_utilities/utils.py rename to src/promptflow-recording/promptflow/recording/azure/utils.py index a436f2305ad..25528ae1d9d 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/utils.py +++ b/src/promptflow-recording/promptflow/recording/azure/utils.py @@ -3,7 +3,6 @@ # --------------------------------------------------------- import json -import os import re from dataclasses import dataclass from typing import Dict @@ -12,23 +11,7 @@ from azure.core.credentials import AccessToken from vcr.request import Request -from .constants import ENVIRON_TEST_MODE, SanitizedValues, TestMode - - -def get_test_mode_from_environ() -> str: - return os.getenv(ENVIRON_TEST_MODE, TestMode.LIVE) - - -def is_live() -> bool: - return get_test_mode_from_environ() == TestMode.LIVE - - -def is_record() -> bool: - return get_test_mode_from_environ() == TestMode.RECORD - - -def is_replay() -> bool: - return get_test_mode_from_environ() == TestMode.REPLAY +from .constants import SanitizedValues class FakeTokenCredential: diff --git a/src/promptflow/tests/sdk_cli_azure_test/recording_utilities/variable_recorder.py b/src/promptflow-recording/promptflow/recording/azure/variable_recorder.py similarity index 100% rename from src/promptflow/tests/sdk_cli_azure_test/recording_utilities/variable_recorder.py rename to src/promptflow-recording/promptflow/recording/azure/variable_recorder.py diff --git a/src/promptflow/tests/sdk_cli_test/recording_utilities/__init__.py b/src/promptflow-recording/promptflow/recording/local/__init__.py similarity index 87% rename from src/promptflow/tests/sdk_cli_test/recording_utilities/__init__.py rename to src/promptflow-recording/promptflow/recording/local/__init__.py index d9e9ede24af..f6c6b9e3b4d 100644 --- a/src/promptflow/tests/sdk_cli_test/recording_utilities/__init__.py +++ b/src/promptflow-recording/promptflow/recording/local/__init__.py @@ -6,9 +6,6 @@ RecordItemMissingException, RecordStorage, check_pydantic_v2, - is_live, - is_record, - is_replay, ) __all__ = [ @@ -21,9 +18,6 @@ "recording_array_reset", "inject_async_with_recording", "inject_sync_with_recording", - "is_live", - "is_record", - "is_replay", "delete_count_lock_file", "check_pydantic_v2", ] diff --git a/src/promptflow/tests/sdk_cli_test/recording_utilities/mock_tool.py b/src/promptflow-recording/promptflow/recording/local/mock_tool.py similarity index 77% rename from src/promptflow/tests/sdk_cli_test/recording_utilities/mock_tool.py rename to src/promptflow-recording/promptflow/recording/local/mock_tool.py index 56469c4cd03..fe94cea26a1 100644 --- a/src/promptflow/tests/sdk_cli_test/recording_utilities/mock_tool.py +++ b/src/promptflow-recording/promptflow/recording/local/mock_tool.py @@ -3,11 +3,10 @@ import os from pathlib import Path -from promptflow._core.tool import STREAMING_OPTION_PARAMETER_ATTR, ToolType -from promptflow._utils.utils import is_in_ci_pipeline from promptflow.tracing._tracer import _create_trace_from_function_call from promptflow.tracing.contracts.trace import TraceType +from ..record_mode import is_in_ci_pipeline from .record_storage import ( Counter, RecordFileMissingException, @@ -74,11 +73,25 @@ def call_func(func, args, kwargs): # Record mode will record item to record file elif is_record(): try: - # prevent recording the same item twice + """ + prevent recording the same item twice. Why? There might be data consistency issues + if we always override records even if it is exists. + For example, Flows with LLM nodes. Node2 and Node3 are the same with variants + Test 1: Node1--> Node2 + Test 2: Node1--> Node3 + If we record Test 1 and Test 2 sequentially, Test2 recording might alter Node1 item generated by + Test1 recording. This might leads to record not found when you replay Test1, since the input for + Node2 changed due to the override. + """ obj = RecordStorage.get_instance().get_record(input_dict) except (RecordItemMissingException, RecordFileMissingException): - # recording the item - obj = RecordStorage.get_instance().set_record(input_dict, func(*args, **kwargs)) + obj = None + try: + obj = func(*args, **kwargs) + except Exception as e: + # Set_record will raise Exception if the record is an Exception instance + RecordStorage.get_instance().set_record(input_dict, e) + obj = RecordStorage.get_instance().set_record(input_dict, obj) elif is_live() and is_in_ci_pipeline(): obj = Counter.get_instance().set_file_record_count(COUNT_RECORD, func(*args, **kwargs)) else: @@ -93,11 +106,25 @@ async def call_func_async(func, args, kwargs): # Record mode will record item to record file elif is_record(): try: - # prevent recording the same item twice + """ + prevent recording the same item twice. Why? There might be data consistency issues + if we always override records even if it is exists. + For example, Flows with LLM nodes. Node2 and Node3 are the same with variants + Test 1: Node1--> Node2 + Test 2: Node1--> Node3 + If we record Test 1 and Test 2 sequentially, Test2 recording might alter Node1 item generated by + Test1 recording. This might leads to record not found when you replay Test1, since the input for + Node2 changed due to the override. + """ obj = RecordStorage.get_instance().get_record(input_dict) except (RecordItemMissingException, RecordFileMissingException): - # recording the item - obj = RecordStorage.get_instance().set_record(input_dict, await func(*args, **kwargs)) + obj = None + try: + obj = await func(*args, **kwargs) + except Exception as e: + # Set_record will raise Exception if the record is an Exception instance + RecordStorage.get_instance().set_record(input_dict, e) + obj = RecordStorage.get_instance().set_record(input_dict, obj) elif is_live() and is_in_ci_pipeline(): obj = Counter.get_instance().set_file_record_count(COUNT_RECORD, await func(*args, **kwargs)) else: @@ -140,7 +167,7 @@ def tool_decorator(func): from promptflow.exceptions import UserErrorException def create_trace(func, args, kwargs): - return _create_trace_from_function_call(func, args=args, kwargs=kwargs, trace_type=TraceType.TOOL) + return _create_trace_from_function_call(func, args=args, kwargs=kwargs, trace_type=TraceType.FUNCTION) if inspect.iscoroutinefunction(func): @@ -177,6 +204,8 @@ def decorated_tool(*args, **kwargs): new_f = decorated_tool + from promptflow._core.tool import STREAMING_OPTION_PARAMETER_ATTR, ToolType + if type is not None and type not in [k.value for k in ToolType]: raise UserErrorException(f"Tool type {type} is not supported yet.") diff --git a/src/promptflow-recording/promptflow/recording/local/openai_inject_recording.py b/src/promptflow-recording/promptflow/recording/local/openai_inject_recording.py new file mode 100644 index 00000000000..3c43df79ccf --- /dev/null +++ b/src/promptflow-recording/promptflow/recording/local/openai_inject_recording.py @@ -0,0 +1,49 @@ +import functools + +from promptflow.tracing._integrations._openai_injector import ( + inject_function_async, + inject_function_sync, + inject_operation_headers, +) + +from .mock_tool import call_func, call_func_async + + +def inject_recording_async(f): + @functools.wraps(f) + async def wrapper(*args, **kwargs): + return await call_func_async(f, args, kwargs) + + return wrapper + + +def inject_recording_sync(f): + @functools.wraps(f) + def wrapper(*args, **kwargs): + return call_func(f, args, kwargs) + + return wrapper + + +def inject_async_with_recording(f, trace_type, name): + wrapper_fun = inject_operation_headers( + ( + inject_function_async( + args_to_ignore=["api_key", "headers", "extra_headers"], trace_type=trace_type, name=name + )(inject_recording_async(f)) + ) + ) + wrapper_fun._original = f + return wrapper_fun + + +def inject_sync_with_recording(f, trace_type, name): + wrapper_fun = inject_operation_headers( + ( + inject_function_sync( + args_to_ignore=["api_key", "headers", "extra_headers"], trace_type=trace_type, name=name + )(inject_recording_sync(f)) + ) + ) + wrapper_fun._original = f + return wrapper_fun diff --git a/src/promptflow/tests/sdk_cli_test/recording_utilities/record_storage.py b/src/promptflow-recording/promptflow/recording/local/record_storage.py similarity index 85% rename from src/promptflow/tests/sdk_cli_test/recording_utilities/record_storage.py rename to src/promptflow-recording/promptflow/recording/local/record_storage.py index d5bc5eab6dd..7a59247ca1e 100644 --- a/src/promptflow/tests/sdk_cli_test/recording_utilities/record_storage.py +++ b/src/promptflow-recording/promptflow/recording/local/record_storage.py @@ -2,34 +2,20 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import hashlib +import importlib import json import os import shelve +import traceback from pathlib import Path from typing import Dict, Iterator, Union from filelock import FileLock +from openai import NotFoundError -from promptflow._core.generator_proxy import GeneratorProxy -from promptflow.exceptions import PromptflowException +from promptflow.tracing.contracts.generator_proxy import GeneratorProxy -from .constants import ENVIRON_TEST_MODE, RecordMode - - -def get_test_mode_from_environ() -> str: - return os.getenv(ENVIRON_TEST_MODE, RecordMode.LIVE) - - -def is_record() -> bool: - return get_test_mode_from_environ() == RecordMode.RECORD - - -def is_replay() -> bool: - return get_test_mode_from_environ() == RecordMode.REPLAY - - -def is_live() -> bool: - return get_test_mode_from_environ() == RecordMode.LIVE +from ..record_mode import is_live, is_record, is_replay def check_pydantic_v2(): @@ -42,13 +28,13 @@ def check_pydantic_v2(): raise ImportError("pydantic is not installed, this is required component for openai recording.") -class RecordItemMissingException(PromptflowException): +class RecordItemMissingException(Exception): """Exception raised when record item missing.""" pass -class RecordFileMissingException(PromptflowException): +class RecordFileMissingException(Exception): """Exception raised when record file missing or invalid.""" pass @@ -184,17 +170,21 @@ def _recursive_create_hashable_args(self, item): if isinstance(item, list): return [self._recursive_create_hashable_args(i) for i in item] if isinstance(item, dict): - return {k: self._recursive_create_hashable_args(v) for k, v in item.items() if k != "extra_headers"} + return { + k: self._recursive_create_hashable_args(v) + for k, v in item.items() + if k != "extra_headers" and v is not None + } elif "module: promptflow.connections" in str(item) or "object at" in str(item): return [] else: return item @staticmethod - def _parse_output_generator(output): + def _parse_output(output): """ Special handling for generator type. Since pickle will not work for generator. - Returns the real list for reocrding, and create a generator for original output. + Returns the real list for recording, and create a generator for original output. Parse output has a simplified hypothesis: output is simple dict, list or generator, because a full schema of output is too heavy to handle. Example: {"answer": , "a": "b"}, @@ -208,14 +198,14 @@ def _parse_output_generator(output): for item in output.items(): k, v = item if type(v).__name__ == "generator": - vlist = list(v) + item_list = list(v) - def vgenerator(): - for vitem in vlist: - yield vitem + def item_generator(): + for internal_item in item_list: + yield internal_item - output_value[k] = vlist - output_generator[k] = vgenerator() + output_value[k] = item_list + output_generator[k] = item_generator() output_type = "dict[generator]" else: output_value[k] = v @@ -229,6 +219,18 @@ def generator(): output_generator = generator() output_type = "generator" + elif isinstance(output, Exception): + output_value = { + "module": output.__class__.__module__, + "message": str(output), + "type": type(output).__name__, + "args": getattr(output, "args", None), + "traceback": traceback.format_exc(), + "response": getattr(output, "response", None), + "body": getattr(output, "body", None), + } + output_generator = None + output_type = "Exception" else: output_value = output output_generator = None @@ -249,11 +251,11 @@ def _create_output_generator(output, output_type): for k, v in output.items(): if type(v).__name__ == "list": - def vgenerator(): + def item_generator(): for item in v: yield item - output_generator[k] = vgenerator() + output_generator[k] = item_generator() else: output_generator[k] = v elif output_type == "generator": @@ -292,6 +294,25 @@ def get_record(self, input_dict: Dict) -> object: output_type = line_record_pointer["output_type"] if "generator" in output_type: return RecordCache._create_output_generator(output, output_type) + elif "Exception" in output_type: + # Dynamically import the module + module = importlib.import_module(output["module"]) + + # Get the exception class + exception_class = getattr(module, output["type"], None) + + if exception_class is None: + raise ValueError(f"Exception type {output['type']} not found") + + # Reconstruct the exception + # Check if the exception class requires specific keyword arguments + if exception_class is NotFoundError: + exception_instance = exception_class( + output["message"], response=output["response"], body=output["body"] + ) + else: + exception_instance = exception_class(*output["args"]) + raise exception_instance else: return output @@ -312,7 +333,7 @@ def set_record(self, input_dict: Dict, output): # filter args, object at will not hash input_dict = self._recursive_create_hashable_args(input_dict) hash_value: str = hashlib.sha1(str(sorted(input_dict.items())).encode("utf-8")).hexdigest() - output_value, output_generator, output_type = RecordCache._parse_output_generator(output) + output_value, output_generator, output_type = RecordCache._parse_output(output) try: line_record_pointer = self.file_records_pointer[hash_value] @@ -329,8 +350,10 @@ def set_record(self, input_dict: Dict, output): # no writeback if "generator" in output_type: return output_generator + elif "Exception" in output_type: + raise output else: - return output_value + return output else: self.file_records_pointer[hash_value] = { "input": input_dict, @@ -342,8 +365,10 @@ def set_record(self, input_dict: Dict, output): if "generator" in output_type: return output_generator + elif "Exception" in output_type: + raise output else: - return output_value + return output class RecordStorage: @@ -427,7 +452,7 @@ def set_file_record_count(self, file, obj): Just count how many tokens are calculated. Different from openai_metric_calculator, this is directly returned from AOAI. """ - output_value, output_generator, output_type = RecordCache._parse_output_generator(obj) + output_value, output_generator, output_type = RecordCache._parse_output(obj) if "generator" in output_type: count = len(output_value) elif hasattr(output_value, "usage") and output_value.usage and output_value.usage.total_tokens: diff --git a/src/promptflow-recording/promptflow/recording/record_mode.py b/src/promptflow-recording/promptflow/recording/record_mode.py new file mode 100644 index 00000000000..66724498f7d --- /dev/null +++ b/src/promptflow-recording/promptflow/recording/record_mode.py @@ -0,0 +1,45 @@ +import os + +ENVIRON_TEST_MODE = "PROMPT_FLOW_TEST_MODE" + + +class RecordMode: + LIVE = "live" + RECORD = "record" + REPLAY = "replay" + + +def get_test_mode_from_environ() -> str: + return os.getenv(ENVIRON_TEST_MODE, RecordMode.LIVE) + + +def is_record() -> bool: + return get_test_mode_from_environ() == RecordMode.RECORD + + +def is_replay() -> bool: + return get_test_mode_from_environ() == RecordMode.REPLAY + + +def is_live() -> bool: + return get_test_mode_from_environ() == RecordMode.LIVE + + +def is_recording_enabled() -> bool: + return is_record() or is_replay() or is_live() + + +def is_in_ci_pipeline(): + if os.environ.get("IS_IN_CI_PIPELINE") == "true": + return True + return False + + +def check_pydantic_v2(): + try: + from importlib.metadata import version + + if version("pydantic") < "2.0.0": + raise ImportError("pydantic version is less than 2.0.0. Recording cannot work properly.") + except ImportError: + raise ImportError("pydantic is not installed, this is required component for openai recording.") diff --git a/src/promptflow-recording/pyproject.toml b/src/promptflow-recording/pyproject.toml new file mode 100644 index 00000000000..69836ddbf40 --- /dev/null +++ b/src/promptflow-recording/pyproject.toml @@ -0,0 +1,50 @@ +[tool.poetry] +name = "promptflow-recording" +version = "0.1.0b1" +description = "Prompt flow recording utilities" + +license = "MIT" + +authors = [ + "Microsoft Corporation " +] + +repository = "https://github.com/microsoft/promptflow" +homepage = "https://microsoft.github.io/promptflow/" + +readme = ["README.md"] +keywords = ["promptflow_recording"] + +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +packages = [ + { include = "promptflow" } +] + +[tool.poetry.urls] +"Bug Reports" = "https://github.com/microsoft/promptflow/issues" + +[tool.poetry.dependencies] +python = "<4.0,>=3.8" +vcrpy = ">=5.1" +promptflow-tracing = ">=0.1.0b1, <2.0.0" + +[tool.poetry.group.dev.dependencies] +pre-commit = "*" +import-linter = "*" + +[build-system] +requires = [ + "poetry-core>=1.5.0", +] +build-backend = "poetry.core.masonry.api" diff --git a/src/promptflow/tests/test_configs/recordings/test_arm_connection_operations_TestArmConnectionOperations_test_get_connection.yaml b/src/promptflow-recording/recordings/azure/test_arm_connection_operations_TestArmConnectionOperations_test_get_connection.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_arm_connection_operations_TestArmConnectionOperations_test_get_connection.yaml rename to src/promptflow-recording/recordings/azure/test_arm_connection_operations_TestArmConnectionOperations_test_get_connection.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_azure_cli_perf_TestAzureCliPerf_test_pfazure_run_create.yaml b/src/promptflow-recording/recordings/azure/test_azure_cli_perf_TestAzureCliPerf_test_pfazure_run_create.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_azure_cli_perf_TestAzureCliPerf_test_pfazure_run_create.yaml rename to src/promptflow-recording/recordings/azure/test_azure_cli_perf_TestAzureCliPerf_test_pfazure_run_create.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_azure_cli_perf_TestAzureCliPerf_test_pfazure_run_update.yaml b/src/promptflow-recording/recordings/azure/test_azure_cli_perf_TestAzureCliPerf_test_pfazure_run_update.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_azure_cli_perf_TestAzureCliPerf_test_pfazure_run_update.yaml rename to src/promptflow-recording/recordings/azure/test_azure_cli_perf_TestAzureCliPerf_test_pfazure_run_update.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_azure_cli_perf_TestAzureCliPerf_test_run_restore.yaml b/src/promptflow-recording/recordings/azure/test_azure_cli_perf_TestAzureCliPerf_test_run_restore.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_azure_cli_perf_TestAzureCliPerf_test_run_restore.yaml rename to src/promptflow-recording/recordings/azure/test_azure_cli_perf_TestAzureCliPerf_test_run_restore.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_cli_with_azure_TestCliWithAzure_test_basic_flow_run_bulk_without_env.yaml b/src/promptflow-recording/recordings/azure/test_cli_with_azure_TestCliWithAzure_test_basic_flow_run_bulk_without_env.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_cli_with_azure_TestCliWithAzure_test_basic_flow_run_bulk_without_env.yaml rename to src/promptflow-recording/recordings/azure/test_cli_with_azure_TestCliWithAzure_test_basic_flow_run_bulk_without_env.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_cli_with_azure_TestCliWithAzure_test_cli_telemetry.yaml b/src/promptflow-recording/recordings/azure/test_cli_with_azure_TestCliWithAzure_test_cli_telemetry.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_cli_with_azure_TestCliWithAzure_test_cli_telemetry.yaml rename to src/promptflow-recording/recordings/azure/test_cli_with_azure_TestCliWithAzure_test_cli_telemetry.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_cli_with_azure_TestCliWithAzure_test_run_file_with_set.yaml b/src/promptflow-recording/recordings/azure/test_cli_with_azure_TestCliWithAzure_test_run_file_with_set.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_cli_with_azure_TestCliWithAzure_test_run_file_with_set.yaml rename to src/promptflow-recording/recordings/azure/test_cli_with_azure_TestCliWithAzure_test_run_file_with_set.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_cli_with_azure_TestCliWithAzure_test_run_with_remote_data.yaml b/src/promptflow-recording/recordings/azure/test_cli_with_azure_TestCliWithAzure_test_run_with_remote_data.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_cli_with_azure_TestCliWithAzure_test_run_with_remote_data.yaml rename to src/promptflow-recording/recordings/azure/test_cli_with_azure_TestCliWithAzure_test_run_with_remote_data.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_connection_operations_TestConnectionOperations_test_connection_get_create_delete.yaml b/src/promptflow-recording/recordings/azure/test_connection_operations_TestConnectionOperations_test_connection_get_create_delete.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_connection_operations_TestConnectionOperations_test_connection_get_create_delete.yaml rename to src/promptflow-recording/recordings/azure/test_connection_operations_TestConnectionOperations_test_connection_get_create_delete.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_connection_operations_TestConnectionOperations_test_get_connection.yaml b/src/promptflow-recording/recordings/azure/test_connection_operations_TestConnectionOperations_test_get_connection.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_connection_operations_TestConnectionOperations_test_get_connection.yaml rename to src/promptflow-recording/recordings/azure/test_connection_operations_TestConnectionOperations_test_get_connection.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_connection_operations_TestConnectionOperations_test_list_connection_spec.yaml b/src/promptflow-recording/recordings/azure/test_connection_operations_TestConnectionOperations_test_list_connection_spec.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_connection_operations_TestConnectionOperations_test_list_connection_spec.yaml rename to src/promptflow-recording/recordings/azure/test_connection_operations_TestConnectionOperations_test_list_connection_spec.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_create_flow.yaml b/src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_create_flow.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_create_flow.yaml rename to src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_create_flow.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_get_flow.yaml b/src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_get_flow.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_get_flow.yaml rename to src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_get_flow.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_list_flows.yaml b/src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_list_flows.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_list_flows.yaml rename to src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_list_flows.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_list_flows_invalid_cases.yaml b/src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_list_flows_invalid_cases.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_list_flows_invalid_cases.yaml rename to src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_list_flows_invalid_cases.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_update_flow.yaml b/src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_update_flow.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_flow_operations_TestFlow_test_update_flow.yaml rename to src/promptflow-recording/recordings/azure/test_flow_operations_TestFlow_test_update_flow.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_auto_resolve_requirements.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_auto_resolve_requirements.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_auto_resolve_requirements.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_auto_resolve_requirements.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_automatic_runtime.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_automatic_runtime.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_automatic_runtime.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_automatic_runtime.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_automatic_runtime_with_managed_identity.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_automatic_runtime_with_managed_identity.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_automatic_runtime_with_managed_identity.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_automatic_runtime_with_managed_identity.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_automatic_runtime_with_resources.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_automatic_runtime_with_resources.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_automatic_runtime_with_resources.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_automatic_runtime_with_resources.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_automatic_runtime_with_user_identity.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_automatic_runtime_with_user_identity.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_automatic_runtime_with_user_identity.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_automatic_runtime_with_user_identity.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_basic_evaluation.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_basic_evaluation.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_basic_evaluation.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_basic_evaluation.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_basic_evaluation_without_data.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_basic_evaluation_without_data.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_basic_evaluation_without_data.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_basic_evaluation_without_data.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_cancel_run.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_cancel_run.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_cancel_run.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_cancel_run.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_default_run_display_name.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_default_run_display_name.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_default_run_display_name.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_default_run_display_name.yaml diff --git a/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_download_run.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_download_run.yaml new file mode 100644 index 00000000000..a19404e3d13 --- /dev/null +++ b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_download_run.yaml @@ -0,0 +1,4583 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000", + "name": "00000", "type": "Microsoft.MachineLearningServices/workspaces", "location": + "eastus", "tags": {}, "etag": null, "kind": "Default", "sku": {"name": "Basic", + "tier": "Basic"}, "properties": {"discoveryUrl": "https://eastus.api.azureml.ms/discovery"}}' + headers: + cache-control: + - no-cache + content-length: + - '3630' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.020' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores?count=30&isDefault=true&orderByAsc=false + response: + body: + string: '{"value": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", + "lastModifiedByType": "Application"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1372' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.069' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", + "lastModifiedByType": "Application"}}' + headers: + cache-control: + - no-cache + content-length: + - '1227' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.086' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets + response: + body: + string: '{"secretsType": "AccountKey", "key": "dGhpcyBpcyBmYWtlIGtleQ=="}' + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.075' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:39:40 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/LocalUpload/000000000000000000000000000000000000/webClassification3.jsonl + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '379' + content-md5: + - lI/pz9jzTQ7Td3RHPL7y7w== + content-type: + - application/octet-stream + last-modified: + - Mon, 06 Nov 2023 08:30:18 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Mon, 06 Nov 2023 08:30:18 GMT + x-ms-meta-name: + - 94331215-cf7f-452a-9f1a-1d276bc9b0e4 + x-ms-meta-upload_status: + - completed + x-ms-meta-version: + - 3f163752-edb0-4afc-a6f5-b0a670bd7c24 + x-ms-version: + - '2023-11-03' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:39:41 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/az-ml-artifacts/000000000000000000000000000000000000/webClassification3.jsonl + response: + body: + string: '' + headers: + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + vary: + - Origin + x-ms-error-code: + - BlobNotFound + x-ms-version: + - '2023-11-03' + status: + code: 404 + message: The specified blob does not exist. +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", + "lastModifiedByType": "Application"}}' + headers: + cache-control: + - no-cache + content-length: + - '1227' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.084' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets + response: + body: + string: '{"secretsType": "AccountKey", "key": "dGhpcyBpcyBmYWtlIGtleQ=="}' + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.086' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:39:45 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/LocalUpload/000000000000000000000000000000000000/hello-world/flow.dag.yaml + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '266' + content-md5: + - UZm3TyOoKWjSR23+Up6qUA== + content-type: + - application/octet-stream + last-modified: + - Fri, 08 Mar 2024 20:43:29 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Fri, 08 Mar 2024 20:43:29 GMT + x-ms-meta-name: + - b03f97dc-2031-4aef-b0fb-c57011d59435 + x-ms-meta-upload_status: + - completed + x-ms-meta-version: + - '1' + x-ms-version: + - '2023-11-03' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:39:46 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/az-ml-artifacts/000000000000000000000000000000000000/hello-world/flow.dag.yaml + response: + body: + string: '' + headers: + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + vary: + - Origin + x-ms-error-code: + - BlobNotFound + x-ms-version: + - '2023-11-03' + status: + code: 404 + message: The specified blob does not exist. +- request: + body: '{"flowDefinitionDataStoreName": "workspaceblobstore", "flowDefinitionBlobPath": + "LocalUpload/000000000000000000000000000000000000/hello-world/flow.dag.yaml", + "runId": "batch_run_name", "runDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "runExperimentName": "", "sessionId": "000000000000000000000000000000000000000000000000", + "sessionSetupMode": "SystemWait", "flowLineageId": "0000000000000000000000000000000000000000000000000000000000000000", + "runtimeName": "fake-runtime-name", "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/000000000000000000000000000000000000/webClassification3.jsonl"}, + "inputsMapping": {"name": "${data.url}"}, "connections": {}, "environmentVariables": + {}, "runDisplayNameGenerationType": "UserProvidedMacro"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Length: + - '806' + Content-Type: + - application/json + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/submit + response: + body: + string: '"batch_run_name"' + headers: + connection: + - keep-alive + content-length: + - '38' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-request-time: + - '4.273' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.183' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.160' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.176' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.160' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.174' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.160' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.276' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.303' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.221' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.187' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.156' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.201' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.168' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.177' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '952' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.236' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", + "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, + "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Azure OpenAI + GPT-4 Turbo with Vision", "type": "custom_llm", "inputs": {"connection": {"type": + ["AzureOpenAIConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 0}}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "dynamic_list": {"func_path": + "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": [{"name": + "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.", + "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", "function": + "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.4.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.4.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use OpenAI GPT-4V to leverage vision ability.", "module": "promptflow.tools.openai_gpt4v", + "class_name": "OpenAI", "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "hello_world.py", "type": "python", + "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "source": "hello_world.py", "function": + "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": + "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": + false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '27205' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.283' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", + "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, + "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Azure OpenAI + GPT-4 Turbo with Vision", "type": "custom_llm", "inputs": {"connection": {"type": + ["AzureOpenAIConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 0}}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "dynamic_list": {"func_path": + "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": [{"name": + "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.", + "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", "function": + "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.4.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.4.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use OpenAI GPT-4V to leverage vision ability.", "module": "promptflow.tools.openai_gpt4v", + "class_name": "OpenAI", "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "hello_world.py", "type": "python", + "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "source": "hello_world.py", "function": + "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": + "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": + false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '27205' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.252' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", + "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, + "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Azure OpenAI + GPT-4 Turbo with Vision", "type": "custom_llm", "inputs": {"connection": {"type": + ["AzureOpenAIConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 0}}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "dynamic_list": {"func_path": + "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": [{"name": + "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.", + "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", "function": + "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.4.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.4.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use OpenAI GPT-4V to leverage vision ability.", "module": "promptflow.tools.openai_gpt4v", + "class_name": "OpenAI", "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "hello_world.py", "type": "python", + "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "source": "hello_world.py", "function": + "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": + "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": + false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '27205' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.262' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", + "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, + "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Azure OpenAI + GPT-4 Turbo with Vision", "type": "custom_llm", "inputs": {"connection": {"type": + ["AzureOpenAIConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 0}}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "dynamic_list": {"func_path": + "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": [{"name": + "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.", + "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", "function": + "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.4.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.4.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use OpenAI GPT-4V to leverage vision ability.", "module": "promptflow.tools.openai_gpt4v", + "class_name": "OpenAI", "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "hello_world.py", "type": "python", + "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "source": "hello_world.py", "function": + "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": + "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": + false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '27205' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.265' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", + "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, + "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Azure OpenAI + GPT-4 Turbo with Vision", "type": "custom_llm", "inputs": {"connection": {"type": + ["AzureOpenAIConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 0}}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "dynamic_list": {"func_path": + "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": [{"name": + "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.", + "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", "function": + "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.4.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.4.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use OpenAI GPT-4V to leverage vision ability.", "module": "promptflow.tools.openai_gpt4v", + "class_name": "OpenAI", "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "hello_world.py", "type": "python", + "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "source": "hello_world.py", "function": + "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": + "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": + false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '27205' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.238' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", + "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, + "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Azure OpenAI + GPT-4 Turbo with Vision", "type": "custom_llm", "inputs": {"connection": {"type": + ["AzureOpenAIConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 0}}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "dynamic_list": {"func_path": + "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": [{"name": + "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.", + "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", "function": + "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.4.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.4.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use OpenAI GPT-4V to leverage vision ability.", "module": "promptflow.tools.openai_gpt4v", + "class_name": "OpenAI", "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "hello_world.py", "type": "python", + "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "source": "hello_world.py", "function": + "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": + "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": + false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '27205' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.378' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + User-Agent: + - python-requests/2.31.0 + method: POST + uri: https://eastus.api.azureml.ms/metric/v2.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/runs/batch_run_name/lastvalues + response: + body: + string: '{"value": [{"dataContainerId": "dcid.batch_run_name", "name": "__pf__.nodes.hello_world.completed", + "columns": {"__pf__.nodes.hello_world.completed": "Double"}, "properties": + {"uxMetricType": "azureml.v1.scalar", "dataLocation": null}, "namespace": + null, "standardSchemaId": null, "value": [{"metricId": "2fea77aa-70be-4b3c-b28f-3d62ed7bff02", + "createdUtc": "2024-03-13T08:44:26.539+00:00", "step": 0, "data": {"__pf__.nodes.hello_world.completed": + 3.0}}]}, {"dataContainerId": "dcid.batch_run_name", "name": "__pf__.lines.completed", + "columns": {"__pf__.lines.completed": "Double"}, "properties": {"uxMetricType": + "azureml.v1.scalar", "dataLocation": null}, "namespace": null, "standardSchemaId": + null, "value": [{"metricId": "cc2f98d0-8b17-4e21-ac41-28685f4d5658", "createdUtc": + "2024-03-13T08:44:26.937+00:00", "step": 0, "data": {"__pf__.lines.completed": + 3.0}}]}, {"dataContainerId": "dcid.batch_run_name", "name": "__pf__.lines.failed", + "columns": {"__pf__.lines.failed": "Double"}, "properties": {"uxMetricType": + "azureml.v1.scalar", "dataLocation": null}, "namespace": null, "standardSchemaId": + null, "value": [{"metricId": "88899526-d48b-4e62-88fd-6ddefc783742", "createdUtc": + "2024-03-13T08:44:27.367+00:00", "step": 0, "data": {"__pf__.lines.failed": + 0.0}}]}]}' + headers: + connection: + - keep-alive + content-length: + - '1891' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.062' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", + "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, + "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Azure OpenAI + GPT-4 Turbo with Vision", "type": "custom_llm", "inputs": {"connection": {"type": + ["AzureOpenAIConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 0}}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "dynamic_list": {"func_path": + "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": [{"name": + "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.", + "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", "function": + "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.4.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.4.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "seed": {"type": ["int"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 8}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 5}}, + "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 2}}, + "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}}, "description": + "Use OpenAI GPT-4V to leverage vision ability.", "module": "promptflow.tools.openai_gpt4v", + "class_name": "OpenAI", "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.4.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "hello_world.py", "type": "python", + "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "source": "hello_world.py", "function": + "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": + "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": + false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", + "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", + "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5", + "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '27205' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.226' + status: + code: 200 + message: OK +- request: + body: '{"value": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1"}' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate, br + connection: + - keep-alive + content-length: + - '171' + content-type: + - application/json + host: + - eastus.api.azureml.ms + user-agent: + - python-httpx/0.27.0 + method: POST + uri: https://eastus.api.azureml.ms/data/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/dataversion/getByAssetId + response: + content: '{"dataVersion": {"assetId": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1", + "dataContainerName": "azureml_batch_run_name_output_data_debug_info", "dataType": + "UriFolder", "dataUri": "azureml://subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/workspaces/00000/datastores/workspaceblobstore/paths/promptflow/PromptFlowArtifacts/batch_run_name/", + "versionId": "1", "mutableProps": {"dataExpiryTime": null, "description": null, + "tags": null, "isArchived": false, "stage": "Logged", "autoDeleteSetting": null}, + "referencedDataUris": null, "properties": null, "initialAssetId": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1", + "isRegistered": false, "runId": "batch_run_name", "originAssetId": null}, "entityMetadata": + {"etag": "\"2900823e-0000-0100-0000-65f1676c0000\"", "createdTime": "2024-03-13T08:44:28.9783357+00:00", + "modifiedTime": "2024-03-13T08:44:28.9882856+00:00", "createdBy": {"userObjectId": + "00000000-0000-0000-0000-000000000000", "userPuId": "10032000324F7449", "userIdp": + null, "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "Honglin + Du", "upn": "username@microsoft.com"}, "modifiedBy": null}, "legacyDatasetId": + "313e85d7-3d1e-4cce-a392-813fe5ebdd32", "isV2": true, "legacyDatasetType": null, + "legacyDataflowType": null, "legacyDataflow": null, "legacySavedDatasetId": + null, "putAssetLROResponseDto": null}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.034' + http_version: HTTP/1.1 + status_code: 200 +- request: + body: '{"snapshotOrAssetId": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5"}' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate, br + connection: + - keep-alive + content-length: + - '61' + content-type: + - application/json + host: + - eastus.api.azureml.ms + user-agent: + - python-httpx/0.27.0 + method: POST + uri: https://eastus.api.azureml.ms/content/v2.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/snapshots/sas + response: + content: '{"name": "", "hash": null, "type": "Directory", "timestamp": "0001-01-01T00:00:00+00:00", + "sasUrl": null, "absoluteUrl": null, "sizeBytes": 0, "sizeSet": false, "children": + {"flow.dag.yaml": {"name": "flow.dag.yaml", "hash": "5199B74F23A82968D2476DFE529EAA50", + "type": "File", "timestamp": "0001-01-01T00:00:00+00:00", "sasUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/batch_run_name/flow.dag.yaml?sv=2019-07-07&sr=b&sig=mcuAXCNkzCUywVxdBuYJrs7hO6bvMaBpVNikXIpWvh4%3D&st=2024-03-13T08%3A35%3A11Z&se=2024-03-13T16%3A45%3A11Z&sp=r&rscd=filename%3Dflow.dag.yaml", + "absoluteUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/batch_run_name/flow.dag.yaml", + "sizeBytes": 266, "sizeSet": true, "children": {}}, "hello_world.py": {"name": + "hello_world.py", "hash": "045378AFD5EC066939A963EAE5CDF40C", "type": "File", + "timestamp": "0001-01-01T00:00:00+00:00", "sasUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/batch_run_name/hello_world.py?sv=2019-07-07&sr=b&sig=%2BWDz2ika63t1D4HBP80UkxvIewn55OCelZLbKZCz7u8%3D&st=2024-03-13T08%3A35%3A11Z&se=2024-03-13T16%3A45%3A11Z&sp=r&rscd=filename%3Dhello_world.py", + "absoluteUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/batch_run_name/hello_world.py", + "sizeBytes": 176, "sizeSet": true, "children": {}}}}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.112' + http_version: HTTP/1.1 + status_code: 200 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:11 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/runs/batch_run_name/flow.dag.yaml + response: + body: + string: "inputs:\r\n name:\r\n type: string\r\n default: hod\r\noutputs:\r\n + \ result:\r\n type: string\r\n reference: ${hello_world.output}\r\nnodes:\r\n- + name: hello_world\r\n type: python\r\n source:\r\n type: code\r\n path: + hello_world.py\r\n inputs:\r\n name: ${inputs.name}\r\n" + headers: + accept-ranges: + - bytes + content-length: + - '266' + content-range: + - bytes 0-265/266 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:05 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - UZm3TyOoKWjSR23+Up6qUA== + x-ms-blob-type: + - BlockBlob + x-ms-copy-completion-time: + - Wed, 13 Mar 2024 08:44:05 GMT + x-ms-copy-id: + - 8792fd41-c4ac-438f-9fd0-75f030600b67 + x-ms-copy-progress: + - 266/266 + x-ms-copy-source: + - https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/LocalUpload/922d1eede3b291e1a7a5cb704ed3eeb7/hello-world/flow.dag.yaml + x-ms-copy-status: + - success + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:05 GMT + x-ms-meta-name: + - b03f97dc-2031-4aef-b0fb-c57011d59435 + x-ms-meta-upload_status: + - completed + x-ms-meta-version: + - '1' + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:11 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/runs/batch_run_name/hello_world.py + response: + body: + string: "import time\r\n\r\nfrom promptflow import tool\r\n\r\n\r\n@tool\r\ndef + hello_world(name: str) -> str:\r\n # Sleep for 1.2 seconds\r\n time.sleep(1.2)\r\n + \ return f\"Hello World {name}!\"\r\n" + headers: + accept-ranges: + - bytes + content-length: + - '176' + content-range: + - bytes 0-175/176 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:05 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - BFN4r9XsBmk5qWPq5c30DA== + x-ms-blob-type: + - BlockBlob + x-ms-copy-completion-time: + - Wed, 13 Mar 2024 08:44:05 GMT + x-ms-copy-id: + - 182c52ee-736e-4691-8c0f-9237ca91588f + x-ms-copy-progress: + - 176/176 + x-ms-copy-source: + - https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/LocalUpload/922d1eede3b291e1a7a5cb704ed3eeb7/hello-world/hello_world.py + x-ms-copy-status: + - success + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:05 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:09 GMT + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name?comp=list&prefix=promptflow%2FPromptFlowArtifacts%2Fbatch_run_name%2F&restype=container + response: + body: + string: "\uFEFFpromptflow/PromptFlowArtifacts/batch_run_name/promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts/000000000_000000024.jsonlWed, + 13 Mar 2024 08:44:24 GMTWed, 13 Mar 2024 08:44:24 + GMT0x8DC4339C905B9D05512application/octet-streamAppendBlobunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/flow_outputs/output.jsonlWed, + 13 Mar 2024 08:44:29 GMTWed, 13 Mar 2024 08:44:29 + GMT0x8DC4339CBC40E02267application/octet-streamRhzWn41vAT8bekG2OuHirg==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/instance_results.jsonlWed, + 13 Mar 2024 08:44:24 GMTWed, 13 Mar 2024 08:44:24 + GMT0x8DC4339C909D3EC597application/octet-streamAppendBlobunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/meta.jsonWed, + 13 Mar 2024 08:44:15 GMTWed, 13 Mar 2024 08:44:15 + GMT0x8DC4339C382891818application/octet-stream/u1NXUpgXMFDmZEw835qnw==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000000.jsonlWed, + 13 Mar 2024 08:44:24 GMTWed, 13 Mar 2024 08:44:24 + GMT0x8DC4339C8EF64C41281application/octet-streamX7Dda8zdobGRdfrWZWRihg==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000001.jsonlWed, + 13 Mar 2024 08:44:24 GMTWed, 13 Mar 2024 08:44:24 + GMT0x8DC4339C8E8DC6D1281application/octet-streamVHJp2pmSnqb6k6w6lspR3Q==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000002.jsonlWed, + 13 Mar 2024 08:44:24 GMTWed, 13 Mar 2024 08:44:24 + GMT0x8DC4339C900B66D1281application/octet-streamCbUEGjmYaiSQG1UUvfb+xA==BlockBlobHottrueunlockedavailabletrue" + headers: + content-type: + - application/xml + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + vary: + - Origin + x-ms-version: + - '2023-11-03' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:12 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts/000000000_000000024.jsonl + response: + body: + string: '{"line_number": 1, "run_info": {"run_id": "batch_run_name_1", "status": + "Completed", "error": null, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "line_number": 1}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "metrics": null, "request": null, "parent_run_id": "batch_run_name", "root_run_id": + "batch_run_name", "source_run_id": null, "flow_id": "default_flow_id", "start_time": + "2024-03-13T08:44:23.023856Z", "end_time": "2024-03-13T08:44:24.240836Z", + "index": 1, "api_calls": [{"name": "flow", "node_name": "flow", "type": "Flow", + "start_time": 1710319463.023856, "end_time": 1710319464.240836, "children": + [{"name": "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": + 1710319463.03124, "end_time": 1710319464.234362, "error": null, "children": + [], "node_name": "hello_world", "parent_id": "", "id": "e7d0ac4e-fecf-4e4b-88d1-3f7b7a71e9c2", + "system_metrics": {}}], "system_metrics": {"duration": 1.21698, "prompt_tokens": + 0, "completion_tokens": 0, "total_tokens": 0}, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "line_number": 1}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "error": null}], "variant_id": "", "name": "", "description": "", "tags": + null, "system_metrics": {"duration": 1.21698, "prompt_tokens": 0, "completion_tokens": + 0, "total_tokens": 0}, "result": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "upload_metrics": false}, "start_time": "2024-03-13T08:44:23.023856", "end_time": + "2024-03-13T08:44:24.240836", "name": "", "description": "", "status": "Completed", + "tags": null} + + {"line_number": 0, "run_info": {"run_id": "batch_run_name_0", "status": "Completed", + "error": null, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "line_number": 0}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "metrics": null, "request": null, "parent_run_id": "batch_run_name", "root_run_id": + "batch_run_name", "source_run_id": null, "flow_id": "default_flow_id", "start_time": + "2024-03-13T08:44:23.023052Z", "end_time": "2024-03-13T08:44:24.244426Z", + "index": 0, "api_calls": [{"name": "flow", "node_name": "flow", "type": "Flow", + "start_time": 1710319463.023052, "end_time": 1710319464.244426, "children": + [{"name": "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": + 1710319463.034291, "end_time": 1710319464.237185, "error": null, "children": + [], "node_name": "hello_world", "parent_id": "", "id": "913982e5-4992-401e-9408-c778963f75a5", + "system_metrics": {}}], "system_metrics": {"duration": 1.221374, "prompt_tokens": + 0, "completion_tokens": 0, "total_tokens": 0}, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "line_number": 0}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "error": null}], "variant_id": "", "name": "", "description": "", "tags": + null, "system_metrics": {"duration": 1.221374, "prompt_tokens": 0, "completion_tokens": + 0, "total_tokens": 0}, "result": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "upload_metrics": false}, "start_time": "2024-03-13T08:44:23.023052", "end_time": + "2024-03-13T08:44:24.244426", "name": "", "description": "", "status": "Completed", + "tags": null} + + {"line_number": 2, "run_info": {"run_id": "batch_run_name_2", "status": "Completed", + "error": null, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "line_number": 2}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "metrics": null, "request": null, "parent_run_id": "batch_run_name", "root_run_id": + "batch_run_name", "source_run_id": null, "flow_id": "default_flow_id", "start_time": + "2024-03-13T08:44:23.024656Z", "end_time": "2024-03-13T08:44:24.246126Z", + "index": 2, "api_calls": [{"name": "flow", "node_name": "flow", "type": "Flow", + "start_time": 1710319463.024656, "end_time": 1710319464.246126, "children": + [{"name": "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": + 1710319463.034395, "end_time": 1710319464.237248, "error": null, "children": + [], "node_name": "hello_world", "parent_id": "", "id": "73a1ded2-1110-41b9-b9ce-4c93a4ea36fb", + "system_metrics": {}}], "system_metrics": {"duration": 1.22147, "prompt_tokens": + 0, "completion_tokens": 0, "total_tokens": 0}, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "line_number": 2}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "error": null}], "variant_id": "", "name": "", "description": "", "tags": + null, "system_metrics": {"duration": 1.22147, "prompt_tokens": 0, "completion_tokens": + 0, "total_tokens": 0}, "result": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "upload_metrics": false}, "start_time": "2024-03-13T08:44:23.024656", "end_time": + "2024-03-13T08:44:24.246126", "name": "", "description": "", "status": "Completed", + "tags": null} + + ' + headers: + accept-ranges: + - bytes + content-length: + - '5512' + content-range: + - bytes 0-5511/5512 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:24 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-committed-block-count: + - '3' + x-ms-blob-type: + - AppendBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:24 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:12 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/flow_outputs/output.jsonl + response: + body: + string: '{"line_number": 0, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} + + {"line_number": 1, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} + + {"line_number": 2, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} + + ' + headers: + accept-ranges: + - bytes + content-length: + - '267' + content-range: + - bytes 0-266/267 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:29 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - RhzWn41vAT8bekG2OuHirg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:29 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:12 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/instance_results.jsonl + response: + body: + string: '{"line_number": 1, "status": "Completed", "inputs.name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "inputs.line_number": 1, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} + + {"line_number": 0, "status": "Completed", "inputs.name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "inputs.line_number": 0, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} + + {"line_number": 2, "status": "Completed", "inputs.name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", + "inputs.line_number": 2, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} + + ' + headers: + accept-ranges: + - bytes + content-length: + - '597' + content-range: + - bytes 0-596/597 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:24 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-committed-block-count: + - '3' + x-ms-blob-type: + - AppendBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:24 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:12 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/meta.json + response: + body: + string: '{"batch_size": 25}' + headers: + accept-ranges: + - bytes + content-length: + - '18' + content-range: + - bytes 0-17/18 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:15 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - /u1NXUpgXMFDmZEw835qnw== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:15 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:12 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000002.jsonl + response: + body: + string: '{"node_name": "hello_world", "line_number": 2, "run_info": {"node": + "hello_world", "flow_run_id": "batch_run_name", "run_id": "batch_run_name_hello_world_2", + "status": "Completed", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "metrics": + null, "error": null, "parent_run_id": "batch_run_name_2", "start_time": "2024-03-13T08:44:23.033474Z", + "end_time": "2024-03-13T08:44:24.238194Z", "index": 2, "api_calls": [{"name": + "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": + 1710319463.034395, "end_time": 1710319464.237248, "error": null, "children": + [], "node_name": "hello_world", "parent_id": "", "id": "73a1ded2-1110-41b9-b9ce-4c93a4ea36fb", + "system_metrics": {}}], "variant_id": "", "cached_run_id": null, "cached_flow_run_id": + null, "logs": {"stdout": "", "stderr": ""}, "system_metrics": {"duration": + 1.20472}, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "start_time": "2024-03-13T08:44:23.033474", "end_time": "2024-03-13T08:44:24.238194", + "status": "Completed"}' + headers: + accept-ranges: + - bytes + content-length: + - '1281' + content-range: + - bytes 0-1280/1281 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:24 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - CbUEGjmYaiSQG1UUvfb+xA== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:24 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:12 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000001.jsonl + response: + body: + string: '{"node_name": "hello_world", "line_number": 1, "run_info": {"node": + "hello_world", "flow_run_id": "batch_run_name", "run_id": "batch_run_name_hello_world_1", + "status": "Completed", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "metrics": + null, "error": null, "parent_run_id": "batch_run_name_1", "start_time": "2024-03-13T08:44:23.030155Z", + "end_time": "2024-03-13T08:44:24.235301Z", "index": 1, "api_calls": [{"name": + "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": + 1710319463.03124, "end_time": 1710319464.234362, "error": null, "children": + [], "node_name": "hello_world", "parent_id": "", "id": "e7d0ac4e-fecf-4e4b-88d1-3f7b7a71e9c2", + "system_metrics": {}}], "variant_id": "", "cached_run_id": null, "cached_flow_run_id": + null, "logs": {"stdout": "", "stderr": ""}, "system_metrics": {"duration": + 1.205146}, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "start_time": "2024-03-13T08:44:23.030155", "end_time": "2024-03-13T08:44:24.235301", + "status": "Completed"}' + headers: + accept-ranges: + - bytes + content-length: + - '1281' + content-range: + - bytes 0-1280/1281 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:24 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - VHJp2pmSnqb6k6w6lspR3Q== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:24 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 08:45:12 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000000.jsonl + response: + body: + string: '{"node_name": "hello_world", "line_number": 0, "run_info": {"node": + "hello_world", "flow_run_id": "batch_run_name", "run_id": "batch_run_name_hello_world_0", + "status": "Completed", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "metrics": + null, "error": null, "parent_run_id": "batch_run_name_0", "start_time": "2024-03-13T08:44:23.030490Z", + "end_time": "2024-03-13T08:44:24.238110Z", "index": 0, "api_calls": [{"name": + "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": + 1710319463.034291, "end_time": 1710319464.237185, "error": null, "children": + [], "node_name": "hello_world", "parent_id": "", "id": "913982e5-4992-401e-9408-c778963f75a5", + "system_metrics": {}}], "variant_id": "", "cached_run_id": null, "cached_flow_run_id": + null, "logs": {"stdout": "", "stderr": ""}, "system_metrics": {"duration": + 1.20762}, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, + "start_time": "2024-03-13T08:44:23.030490", "end_time": "2024-03-13T08:44:24.238110", + "status": "Completed"}' + headers: + accept-ranges: + - bytes + content-length: + - '1281' + content-range: + - bytes 0-1280/1281 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:44:24 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - X7Dda8zdobGRdfrWZWRihg== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 08:44:24 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: '{"runId": "batch_run_name", "selectRunMetadata": true, "selectRunDefinition": + true, "selectJobSpecification": true}' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate, br + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - eastus.api.azureml.ms + user-agent: + - python-httpx/0.27.0 + method: POST + uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata + response: + content: '{"runMetadata": {"runNumber": 1710319192, "rootRunId": "batch_run_name", + "createdUtc": "2024-03-13T08:39:52.2097359+00:00", "createdBy": {"userObjectId": + "00000000-0000-0000-0000-000000000000", "userPuId": "10032000324F7449", "userIdp": + null, "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "Honglin + Du", "upn": null}, "userId": "00000000-0000-0000-0000-000000000000", "token": + null, "tokenExpiryTimeUtc": null, "error": null, "warnings": null, "revision": + 6, "statusRevision": 3, "runUuid": "bc375de9-e008-40f2-a2d3-6ab1acc09ad0", "parentRunUuid": + null, "rootRunUuid": "bc375de9-e008-40f2-a2d3-6ab1acc09ad0", "lastStartTimeUtc": + null, "currentComputeTime": null, "computeDuration": "00:00:11.9663018", "effectiveStartTimeUtc": + null, "lastModifiedBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", + "userPuId": "10032000324F7449", "userIdp": null, "userAltSecId": null, "userIss": + "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", "userTenantId": + "00000000-0000-0000-0000-000000000000", "userName": "Honglin Du", "upn": "username@microsoft.com"}, + "lastModifiedUtc": "2024-03-13T08:44:27.9108527+00:00", "duration": "00:00:11.9663018", + "cancelationReason": null, "currentAttemptId": 1, "runId": "batch_run_name", + "parentRunId": null, "experimentId": "b1e733a1-2a5f-4c17-bc34-4d66d2858228", + "status": "Completed", "startTimeUtc": "2024-03-13T08:44:17.6823005+00:00", + "endTimeUtc": "2024-03-13T08:44:29.6486023+00:00", "scheduleId": null, "displayName": + "sdk-cli-test-fixture-batch-run-without-llm", "name": null, "dataContainerId": + "dcid.batch_run_name", "description": null, "hidden": false, "runType": "azureml.promptflow.FlowRun", + "runTypeV2": {"orchestrator": null, "traits": [], "attribution": "PromptFlow", + "computeType": null}, "properties": {"azureml.promptflow.runtime_name": "automatic", + "azureml.promptflow.runtime_version": "20240306.v5", "azureml.promptflow.definition_file_name": + "flow.dag.yaml", "azureml.promptflow.flow_lineage_id": "f19900c5ab3df0dabfcf927fec52c0305ae6271bf36dc3d4935bb9137e86252e", + "azureml.promptflow.flow_definition_datastore_name": "workspaceblobstore", "azureml.promptflow.flow_definition_blob_path": + "LocalUpload/922d1eede3b291e1a7a5cb704ed3eeb7/hello-world/flow.dag.yaml", "azureml.promptflow.input_data": + "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl", + "azureml.promptflow.inputs_mapping": "{\"name\":\"${data.url}\"}", "_azureml.evaluation_run": + "promptflow.BatchRun", "azureml.promptflow.session_id": "4a6867a952826a2a51729e6bb4bf21ac65b46eec3ae5ed10", + "azureml.promptflow.snapshot_id": "6f5e65d2-6446-4f71-a1fa-838ae87e6bd5", "azureml.promptflow.total_tokens": + "0", "_azureml.evaluate_artifacts": "[{\"path\": \"instance_results.jsonl\", + \"type\": \"table\"}]"}, "parameters": {}, "actionUris": {}, "scriptName": null, + "target": null, "uniqueChildRunComputeTargets": [], "tags": {}, "settings": + {}, "services": {}, "inputDatasets": [], "outputDatasets": [], "runDefinition": + null, "jobSpecification": null, "primaryMetricName": null, "createdFrom": null, + "cancelUri": null, "completeUri": null, "diagnosticsUri": null, "computeRequest": + null, "compute": null, "retainForLifetimeOfWorkspace": false, "queueingInfo": + null, "inputs": null, "outputs": {"debug_info": {"assetId": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1", + "type": "UriFolder"}, "flow_outputs": {"assetId": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_flow_outputs/versions/1", + "type": "UriFolder"}}}, "runDefinition": null, "jobSpecification": null, "systemSettings": + null}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.031' + http_version: HTTP/1.1 + status_code: 200 +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name/logContent + response: + body: + string: '"2024-03-13 08:44:08 +0000 86 promptflow-runtime INFO [batch_run_name] + Receiving v2 bulk run request e3ab1f8b-8b17-4c8b-ae58-efb3c27ab45c: {\"flow_id\": + \"batch_run_name\", \"flow_run_id\": \"batch_run_name\", \"flow_source\": + {\"flow_source_type\": 1, \"flow_source_info\": {\"snapshot_id\": \"6f5e65d2-6446-4f71-a1fa-838ae87e6bd5\"}, + \"flow_dag_file\": \"flow.dag.yaml\"}, \"log_path\": \"https://promptfloweast4063704120.blob.core.windows.net/azureml/ExperimentRun/dcid.batch_run_name/logs/azureml/executionlogs.txt?sv=2019-07-07&sr=b&sig=**data_scrubbed**&skoid=55b92eba-d7c7-4afd-ab76-7bb1cd345283&sktid=00000000-0000-0000-0000-000000000000&skt=2024-03-13T03%3A08%3A24Z&ske=2024-03-14T11%3A18%3A24Z&sks=b&skv=2019-07-07&st=2024-03-13T08%3A34%3A07Z&se=2024-03-13T16%3A44%3A07Z&sp=rcw\", + \"app_insights_instrumentation_key\": \"InstrumentationKey=**data_scrubbed**;IngestionEndpoint=https://eastus-6.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/\", + \"batch_timeout_sec\": 36000, \"data_inputs\": {\"data\": \"azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl\"}, + \"inputs_mapping\": {\"name\": \"${data.url}\"}, \"azure_storage_setting\": + {\"azure_storage_mode\": 1, \"storage_account_name\": \"promptfloweast4063704120\", + \"blob_container_name\": \"azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5\", + \"flow_artifacts_root_path\": \"promptflow/PromptFlowArtifacts/batch_run_name\", + \"blob_container_sas_token\": \"?sv=2019-07-07&sr=c&sig=**data_scrubbed**&skoid=55b92eba-d7c7-4afd-ab76-7bb1cd345283&sktid=00000000-0000-0000-0000-000000000000&skt=2024-03-13T08%3A44%3A07Z&ske=2024-03-20T08%3A44%3A07Z&sks=b&skv=2019-07-07&se=2024-03-20T08%3A44%3A07Z&sp=racwl\", + \"output_datastore_name\": \"workspaceblobstore\"}}\n2024-03-13 08:44:08 +0000 86 + promptflow-runtime INFO Runtime version: 20240306.v5. PromptFlow version: + 1.7.0rc2\n2024-03-13 08:44:08 +0000 86 promptflow-runtime INFO Updating + batch_run_name to Status.Preparing...\n2024-03-13 08:44:08 +0000 86 promptflow-runtime + INFO Downloading snapshot to /mnt/host/service/app/44361/requests/batch_run_name\n2024-03-13 + 08:44:08 +0000 86 promptflow-runtime INFO Get snapshot sas url for + 6f5e65d2-6446-4f71-a1fa-838ae87e6bd5.\n2024-03-13 08:44:08 +0000 86 promptflow-runtime + INFO Snapshot 6f5e65d2-6446-4f71-a1fa-838ae87e6bd5 contains 2 files.\n2024-03-13 + 08:44:08 +0000 86 promptflow-runtime INFO Download snapshot 6f5e65d2-6446-4f71-a1fa-838ae87e6bd5 + completed.\n2024-03-13 08:44:08 +0000 86 promptflow-runtime INFO Successfully + download snapshot to /mnt/host/service/app/44361/requests/batch_run_name\n2024-03-13 + 08:44:08 +0000 86 promptflow-runtime INFO About to execute a python + flow.\n2024-03-13 08:44:08 +0000 86 promptflow-runtime INFO Use spawn + method to start child process.\n2024-03-13 08:44:09 +0000 86 promptflow-runtime + INFO Starting to check process 141 status for run batch_run_name\n2024-03-13 + 08:44:09 +0000 86 promptflow-runtime INFO Start checking run status + for run batch_run_name\n2024-03-13 08:44:14 +0000 141 promptflow-runtime + INFO [86--141] Start processing flowV2......\n2024-03-13 08:44:14 +0000 141 + promptflow-runtime INFO Runtime version: 20240306.v5. PromptFlow version: + 1.7.0rc2\n2024-03-13 08:44:14 +0000 141 promptflow-runtime INFO Setting + mlflow tracking uri...\n2024-03-13 08:44:14 +0000 141 promptflow-runtime + INFO Validating ''AzureML Data Scientist'' user authentication...\n2024-03-13 + 08:44:15 +0000 141 promptflow-runtime INFO Successfully validated + ''AzureML Data Scientist'' user authentication.\n2024-03-13 08:44:15 +0000 141 + promptflow-runtime INFO Using AzureMLRunStorageV2\n2024-03-13 08:44:15 + +0000 141 promptflow-runtime INFO Setting mlflow tracking uri to ''azureml://eastus.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus''\n2024-03-13 + 08:44:15 +0000 141 promptflow-runtime INFO Initialized blob service + client.\n2024-03-13 08:44:15 +0000 141 promptflow-runtime INFO Blob + service client has api version: 2023-11-03\n2024-03-13 08:44:15 +0000 141 + promptflow-runtime INFO Setting mlflow tracking uri to ''azureml://eastus.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus''\n2024-03-13 + 08:44:17 +0000 141 promptflow-runtime INFO Resolve data from url finished + in 2.1435543020002115 seconds\n2024-03-13 08:44:17 +0000 141 promptflow-runtime + INFO Starting the aml run ''batch_run_name''...\n2024-03-13 08:44:17 +0000 141 + execution.bulk INFO Skipped the execution of 0 existing results.\n2024-03-13 + 08:44:17 +0000 141 execution.bulk INFO The timeout for the batch + run is 36000 seconds.\n2024-03-13 08:44:17 +0000 141 execution.bulk INFO Set + process count to 3 by taking the minimum value among the factors of {''default_worker_count'': + 4, ''row_count'': 3}.\n2024-03-13 08:44:23 +0000 141 execution.bulk INFO Process + name(ForkProcess-2:2:1)-Process id(276)-Line number(0) start execution.\n2024-03-13 + 08:44:23 +0000 141 execution.bulk INFO Process name(ForkProcess-2:2:3)-Process + id(287)-Line number(2) start execution.\n2024-03-13 08:44:23 +0000 141 + execution.bulk INFO Process name(ForkProcess-2:2:2)-Process id(284)-Line + number(1) start execution.\n2024-03-13 08:44:24 +0000 141 execution.bulk INFO Process + name(ForkProcess-2:2:2)-Process id(284)-Line number(1) completed.\n2024-03-13 + 08:44:24 +0000 141 execution.bulk INFO Process name(ForkProcess-2:2:1)-Process + id(276)-Line number(0) completed.\n2024-03-13 08:44:24 +0000 141 execution.bulk INFO Process + name(ForkProcess-2:2:3)-Process id(287)-Line number(2) completed.\n2024-03-13 + 08:44:25 +0000 141 execution.bulk INFO Finished 3 / 3 lines.\n2024-03-13 + 08:44:25 +0000 141 execution.bulk INFO Average execution time + for completed lines: 2.33 seconds. Estimated time for incomplete lines: 0.0 + seconds.\n2024-03-13 08:44:25 +0000 284 execution.bulk WARNING Error + occurred while shutting down tracer provider: ''ProxyTracerProvider'' object + has no attribute ''shutdown''\n2024-03-13 08:44:25 +0000 276 execution.bulk WARNING Error + occurred while shutting down tracer provider: ''ProxyTracerProvider'' object + has no attribute ''shutdown''\n2024-03-13 08:44:25 +0000 287 execution.bulk WARNING Error + occurred while shutting down tracer provider: ''ProxyTracerProvider'' object + has no attribute ''shutdown''\n2024-03-13 08:44:26 +0000 141 promptflow-runtime + INFO Post processing batch result...\n2024-03-13 08:44:27 +0000 141 + execution.bulk INFO Upload status summary metrics for run batch_run_name + finished in 1.3172062629996617 seconds\n2024-03-13 08:44:27 +0000 141 + promptflow-runtime INFO Successfully write run properties {\"azureml.promptflow.total_tokens\": + 0, \"_azureml.evaluate_artifacts\": \"[{\\\"path\\\": \\\"instance_results.jsonl\\\", + \\\"type\\\": \\\"table\\\"}]\"} with run id ''batch_run_name''\n2024-03-13 + 08:44:27 +0000 141 execution.bulk INFO Upload RH properties for + run batch_run_name finished in 0.06942473199978849 seconds\n2024-03-13 08:44:27 + +0000 141 promptflow-runtime INFO Creating unregistered output Asset + for Run batch_run_name...\n2024-03-13 08:44:29 +0000 141 promptflow-runtime + INFO Created debug_info Asset: azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1\n2024-03-13 + 08:44:29 +0000 141 promptflow-runtime INFO Creating unregistered output + Asset for Run batch_run_name...\n2024-03-13 08:44:29 +0000 141 promptflow-runtime + INFO Created flow_outputs output Asset: azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_flow_outputs/versions/1\n2024-03-13 + 08:44:29 +0000 141 promptflow-runtime INFO Creating Artifact for Run + batch_run_name...\n2024-03-13 08:44:29 +0000 141 promptflow-runtime INFO Created + instance_results.jsonl Artifact.\n2024-03-13 08:44:29 +0000 141 promptflow-runtime + INFO Patching batch_run_name...\n2024-03-13 08:44:29 +0000 141 promptflow-runtime + INFO Ending the aml run ''batch_run_name'' with status ''Completed''...\n"' + headers: + connection: + - keep-alive + content-length: + - '9155' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.516' + status: + code: 200 + message: OK +version: 1 diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_eager_flow_cancel.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_cancel.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_eager_flow_cancel.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_cancel.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_eager_flow_crud.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_crud.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_eager_flow_crud.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_crud.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_eager_flow_download.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_download.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_eager_flow_download.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_download.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_eager_flow_meta_generation.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_meta_generation.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_eager_flow_meta_generation.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_meta_generation.yaml diff --git a/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_run_without_yaml.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_run_without_yaml.yaml new file mode 100644 index 00000000000..7d81b0e4eef --- /dev/null +++ b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_eager_flow_run_without_yaml.yaml @@ -0,0 +1,1577 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000", + "name": "00000", "type": "Microsoft.MachineLearningServices/workspaces", "location": + "eastus", "tags": {}, "etag": null, "kind": "Default", "sku": {"name": "Basic", + "tier": "Basic"}, "properties": {"discoveryUrl": "https://eastus.api.azureml.ms/discovery"}}' + headers: + cache-control: + - no-cache + content-length: + - '3630' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.026' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores?count=30&isDefault=true&orderByAsc=false + response: + body: + string: '{"value": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", + "lastModifiedByType": "Application"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1372' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.056' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", + "lastModifiedByType": "Application"}}' + headers: + cache-control: + - no-cache + content-length: + - '1227' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.085' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets + response: + body: + string: '{"secretsType": "AccountKey", "key": "dGhpcyBpcyBmYWtlIGtleQ=="}' + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.196' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:00:25 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/LocalUpload/000000000000000000000000000000000000/simple_eager_flow_data.jsonl + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '25' + content-md5: + - zt1zN1V/HR5p7N0Sh5396w== + content-type: + - application/octet-stream + last-modified: + - Tue, 23 Jan 2024 06:27:00 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 23 Jan 2024 06:26:59 GMT + x-ms-meta-name: + - 1e376ce4-7c3b-4683-82ad-412f5cd23626 + x-ms-meta-upload_status: + - completed + x-ms-meta-version: + - 7e65351c-7e4b-4a4d-90f8-304eacdc36bc + x-ms-version: + - '2023-11-03' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:00:26 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/az-ml-artifacts/000000000000000000000000000000000000/simple_eager_flow_data.jsonl + response: + body: + string: '' + headers: + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + vary: + - Origin + x-ms-error-code: + - BlobNotFound + x-ms-version: + - '2023-11-03' + status: + code: 404 + message: The specified blob does not exist. +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", + "lastModifiedByType": "Application"}}' + headers: + cache-control: + - no-cache + content-length: + - '1227' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.072' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets + response: + body: + string: '{"secretsType": "AccountKey", "key": "dGhpcyBpcyBmYWtlIGtleQ=="}' + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.132' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:00:32 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/LocalUpload/000000000000000000000000000000000000/simple_without_yaml/.promptflow/flow.json + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '240' + content-md5: + - xzaVcbtpEfLsECGkzy+RKw== + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 08:22:37 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 08:22:36 GMT + x-ms-meta-name: + - 493061c0-0f9a-424a-9858-f835dfe58f5e + x-ms-meta-upload_status: + - completed + x-ms-meta-version: + - '1' + x-ms-version: + - '2023-11-03' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:00:33 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/az-ml-artifacts/000000000000000000000000000000000000/simple_without_yaml/.promptflow/flow.json + response: + body: + string: '' + headers: + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + vary: + - Origin + x-ms-error-code: + - BlobNotFound + x-ms-version: + - '2023-11-03' + status: + code: 404 + message: The specified blob does not exist. +- request: + body: '{"flowDefinitionDataStoreName": "workspaceblobstore", "flowDefinitionBlobPath": + "LocalUpload/000000000000000000000000000000000000/simple_without_yaml/flow.dag.yaml", + "runId": "name", "runDisplayName": "name", "runExperimentName": "", "sessionId": + "000000000000000000000000000000000000000000000000", "sessionSetupMode": "SystemWait", + "flowLineageId": "0000000000000000000000000000000000000000000000000000000000000000", + "runtimeName": "fake-runtime-name", "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/000000000000000000000000000000000000/simple_eager_flow_data.jsonl"}, + "inputsMapping": {}, "connections": {}, "environmentVariables": {}, "runDisplayNameGenerationType": + "UserProvidedMacro"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '799' + Content-Type: + - application/json + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/submit + response: + body: + string: '"name"' + headers: + connection: + - keep-alive + content-length: + - '38' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-request-time: + - '4.528' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", + "flowRunId": "name", "flowRunDisplayName": "name", "batchDataInput": {"dataUri": + "azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {}, "outputDatastoreName": "workspaceblobstore", "childRunBasePath": + "promptflow/PromptFlowArtifacts/name/flow_artifacts", "flowDagFileRelativePath": + "flow.dag.yaml", "flowSnapshotId": "d8987d37-16d4-441c-9c6c-b46b333f6e26", + "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '1028' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.197' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", + "flowRunId": "name", "flowRunDisplayName": "name", "batchDataInput": {"dataUri": + "azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {}, "outputDatastoreName": "workspaceblobstore", "childRunBasePath": + "promptflow/PromptFlowArtifacts/name/flow_artifacts", "flowDagFileRelativePath": + "flow.dag.yaml", "flowSnapshotId": "d8987d37-16d4-441c-9c6c-b46b333f6e26", + "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '1028' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.203' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", + "flowRunId": "name", "flowRunDisplayName": "name", "batchDataInput": {"dataUri": + "azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {}, "outputDatastoreName": "workspaceblobstore", "childRunBasePath": + "promptflow/PromptFlowArtifacts/name/flow_artifacts", "flowDagFileRelativePath": + "flow.dag.yaml", "flowSnapshotId": "d8987d37-16d4-441c-9c6c-b46b333f6e26", + "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '1028' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.177' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", + "flowRunId": "name", "flowRunDisplayName": "name", "batchDataInput": {"dataUri": + "azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {}, "outputDatastoreName": "workspaceblobstore", "childRunBasePath": + "promptflow/PromptFlowArtifacts/name/flow_artifacts", "flowDagFileRelativePath": + "flow.dag.yaml", "flowSnapshotId": "d8987d37-16d4-441c-9c6c-b46b333f6e26", + "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '1028' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.139' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", + "flowRunId": "name", "flowRunDisplayName": "name", "batchDataInput": {"dataUri": + "azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {}, "outputDatastoreName": "workspaceblobstore", "childRunBasePath": + "promptflow/PromptFlowArtifacts/name/flow_artifacts", "flowDagFileRelativePath": + "flow.dag.yaml", "flowSnapshotId": "d8987d37-16d4-441c-9c6c-b46b333f6e26", + "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '1028' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.169' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", + "flowRunId": "name", "flowRunDisplayName": "name", "batchDataInput": {"dataUri": + "azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {}, "outputDatastoreName": "workspaceblobstore", "childRunBasePath": + "promptflow/PromptFlowArtifacts/name/flow_artifacts", "flowDagFileRelativePath": + "flow.dag.yaml", "flowSnapshotId": "d8987d37-16d4-441c-9c6c-b46b333f6e26", + "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '1028' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.198' + status: + code: 200 + message: OK +- request: + body: '{}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + User-Agent: + - python-requests/2.31.0 + method: POST + uri: https://eastus.api.azureml.ms/metric/v2.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/runs/name/lastvalues + response: + body: + string: '{"value": [{"dataContainerId": "dcid.name", "name": "__pf__.lines.completed", + "columns": {"__pf__.lines.completed": "Double"}, "properties": {"uxMetricType": + "azureml.v1.scalar", "dataLocation": null}, "namespace": null, "standardSchemaId": + null, "value": [{"metricId": "686a2f3d-73a8-43ad-897c-b16da8b6d79a", "createdUtc": + "2024-03-13T09:00:55.783+00:00", "step": 0, "data": {"__pf__.lines.completed": + 1.0}}]}, {"dataContainerId": "dcid.name", "name": "__pf__.lines.failed", "columns": + {"__pf__.lines.failed": "Double"}, "properties": {"uxMetricType": "azureml.v1.scalar", + "dataLocation": null}, "namespace": null, "standardSchemaId": null, "value": + [{"metricId": "4871b64d-bf79-415a-92ed-2bd7bc1a6a38", "createdUtc": "2024-03-13T09:00:56.24+00:00", + "step": 0, "data": {"__pf__.lines.failed": 0.0}}]}]}' + headers: + connection: + - keep-alive + content-length: + - '1239' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.068' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name + response: + body: + string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", + "flowRunId": "name", "flowRunDisplayName": "name", "batchDataInput": {"dataUri": + "azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {}, "outputDatastoreName": "workspaceblobstore", "childRunBasePath": + "promptflow/PromptFlowArtifacts/name/flow_artifacts", "flowDagFileRelativePath": + "flow.dag.yaml", "flowSnapshotId": "d8987d37-16d4-441c-9c6c-b46b333f6e26", + "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '1028' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.174' + status: + code: 200 + message: OK +- request: + body: '{"value": "azureml://locations/eastus/workspaces/00000/data/azureml_name_output_data_debug_info/versions/1"}' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '171' + content-type: + - application/json + host: + - eastus.api.azureml.ms + user-agent: + - python-httpx/0.25.2 + method: POST + uri: https://eastus.api.azureml.ms/data/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/dataversion/getByAssetId + response: + content: '{"dataVersion": {"assetId": "azureml://locations/eastus/workspaces/00000/data/azureml_name_output_data_debug_info/versions/1", + "dataContainerName": "azureml_name_output_data_debug_info", "dataType": "UriFolder", + "dataUri": "azureml://subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/workspaces/00000/datastores/workspaceblobstore/paths/promptflow/PromptFlowArtifacts/name/", + "versionId": "1", "mutableProps": {"dataExpiryTime": null, "description": null, + "tags": null, "isArchived": false, "stage": "Logged", "autoDeleteSetting": null}, + "referencedDataUris": null, "properties": null, "initialAssetId": "azureml://locations/eastus/workspaces/00000/data/azureml_name_output_data_debug_info/versions/1", + "isRegistered": false, "runId": "name", "originAssetId": null}, "entityMetadata": + {"etag": "\"2900e964-0000-0100-0000-65f16b480000\"", "createdTime": "2024-03-13T09:00:56.8502993+00:00", + "modifiedTime": "2024-03-13T09:00:56.8611153+00:00", "createdBy": {"userObjectId": + "00000000-0000-0000-0000-000000000000", "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "18a66f5f-dbdf-4c17-9dd7-1634712a9cbe", + "upn": null}, "modifiedBy": null}, "legacyDatasetId": "a1b686fc-ec8c-4517-b6d0-518d6297af1a", + "isV2": true, "legacyDatasetType": null, "legacyDataflowType": null, "legacyDataflow": + null, "legacySavedDatasetId": null, "putAssetLROResponseDto": null}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.047' + http_version: HTTP/1.1 + status_code: 200 +- request: + body: '{"snapshotOrAssetId": "d8987d37-16d4-441c-9c6c-b46b333f6e26"}' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '61' + content-type: + - application/json + host: + - eastus.api.azureml.ms + user-agent: + - python-httpx/0.25.2 + method: POST + uri: https://eastus.api.azureml.ms/content/v2.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/snapshots/sas + response: + content: '{"name": "", "hash": null, "type": "Directory", "timestamp": "0001-01-01T00:00:00+00:00", + "sasUrl": null, "absoluteUrl": null, "sizeBytes": 0, "sizeSet": false, "children": + {".promptflow": {"name": ".promptflow", "hash": null, "type": "Directory", "timestamp": + "0001-01-01T00:00:00+00:00", "sasUrl": null, "absoluteUrl": null, "sizeBytes": + 0, "sizeSet": false, "children": {"flow.json": {"name": "flow.json", "hash": + "C7369571BB6911F2EC1021A4CF2F912B", "type": "File", "timestamp": "0001-01-01T00:00:00+00:00", + "sasUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/name/.promptflow/flow.json?sv=2019-07-07&sr=b&sig=5kfDN8nXxacX5s0CruJoqylMNJrzzDV3BX6aNp%2FUWOE%3D&st=2024-03-13T08%3A51%3A32Z&se=2024-03-13T17%3A01%3A32Z&sp=r&rscd=filename%3Dflow.json", + "absoluteUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/name/.promptflow/flow.json", + "sizeBytes": 240, "sizeSet": true, "children": {}}}}, "entry.py": {"name": "entry.py", + "hash": "D7A5F6B2BBE15737838235DA04756F5E", "type": "File", "timestamp": "0001-01-01T00:00:00+00:00", + "sasUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/name/entry.py?sv=2019-07-07&sr=b&sig=8K9%2BvmflfJClGQ9W60BYPgjYDSRuwmPFJgP2psP79bo%3D&st=2024-03-13T08%3A51%3A32Z&se=2024-03-13T17%3A01%3A32Z&sp=r&rscd=filename%3Dentry.py", + "absoluteUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/name/entry.py", + "sizeBytes": 292, "sizeSet": true, "children": {}}, "flow.dag.yaml": {"name": + "flow.dag.yaml", "hash": "8995B0C260367A0256D6435D6351214D", "type": "File", + "timestamp": "0001-01-01T00:00:00+00:00", "sasUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/name/flow.dag.yaml?sv=2019-07-07&sr=b&sig=nXVRu4YQoMRQr1pikDrruHQpxOOH0jKVyGQBvCGhg7M%3D&st=2024-03-13T08%3A51%3A32Z&se=2024-03-13T17%3A01%3A32Z&sp=r&rscd=filename%3Dflow.dag.yaml", + "absoluteUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/name/flow.dag.yaml", + "sizeBytes": 22, "sizeSet": true, "children": {}}}}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.077' + http_version: HTTP/1.1 + status_code: 200 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:01:30 GMT + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name?comp=list&prefix=promptflow%2FPromptFlowArtifacts%2Fname%2F&restype=container + response: + body: + string: "\uFEFFpromptflow/PromptFlowArtifacts/name/promptflow/PromptFlowArtifacts/name/flow_artifacts/000000000_000000024.jsonlWed, + 13 Mar 2024 09:00:53 GMTWed, 13 Mar 2024 09:00:53 + GMT0x8DC433C16A946AC1099application/octet-streamAppendBlobunlockedavailabletruepromptflow/PromptFlowArtifacts/name/flow_outputs/output.jsonlWed, + 13 Mar 2024 09:00:56 GMTWed, 13 Mar 2024 09:00:56 + GMT0x8DC433C18994C0135application/octet-stream/e0Zn1phO4FyeGCAse5gGw==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/name/instance_results.jsonlWed, + 13 Mar 2024 09:00:53 GMTWed, 13 Mar 2024 09:00:53 + GMT0x8DC433C16AEBED0113application/octet-streamAppendBlobunlockedavailabletruepromptflow/PromptFlowArtifacts/name/meta.jsonWed, + 13 Mar 2024 09:00:47 GMTWed, 13 Mar 2024 09:00:47 + GMT0x8DC433C12D92FB418application/octet-stream/u1NXUpgXMFDmZEw835qnw==BlockBlobHottrueunlockedavailabletrue" + headers: + content-type: + - application/xml + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + vary: + - Origin + x-ms-version: + - '2023-11-03' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:01:32 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/name/flow_artifacts/000000000_000000024.jsonl + response: + body: + string: '{"line_number": 0, "run_info": {"run_id": "name_0", "status": "Completed", + "error": null, "inputs": {"input_val": "input1", "line_number": 0}, "output": + {"output": null}, "metrics": null, "request": null, "parent_run_id": "name", + "root_run_id": "name", "source_run_id": null, "flow_id": "default_flow_id", + "start_time": "2024-03-13T09:00:53.664482Z", "end_time": "2024-03-13T09:00:53.667117Z", + "index": 0, "api_calls": [{"name": "my_flow", "type": "Function", "inputs": + {"input_val": "input1"}, "output": null, "start_time": 1710320453.665327, + "end_time": 1710320453.666638, "error": null, "children": [], "node_name": + null, "parent_id": "", "id": "28a2fdd0-9171-4045-b0fb-2aa1f4bab471"}], "variant_id": + "", "name": "", "description": "", "tags": null, "system_metrics": {"duration": + 0.002635}, "result": {"output": null}, "upload_metrics": false}, "start_time": + "2024-03-13T09:00:53.664482", "end_time": "2024-03-13T09:00:53.667117", "name": + "", "description": "", "status": "Completed", "tags": null} + + ' + headers: + accept-ranges: + - bytes + content-length: + - '1099' + content-range: + - bytes 0-1098/1099 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 09:00:53 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-committed-block-count: + - '1' + x-ms-blob-type: + - AppendBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 09:00:53 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:01:32 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/runs/name/flow.dag.yaml + response: + body: + string: "entry: entry:my_flow\r\n" + headers: + accept-ranges: + - bytes + content-length: + - '22' + content-range: + - bytes 0-21/22 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 09:00:40 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - iZWwwmA2egJW1kNdY1EhTQ== + x-ms-blob-type: + - BlockBlob + x-ms-copy-completion-time: + - Wed, 13 Mar 2024 09:00:40 GMT + x-ms-copy-id: + - 531e9bad-fec1-4bf0-bbd8-158bc5fb8ae6 + x-ms-copy-progress: + - 22/22 + x-ms-copy-source: + - https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/LocalUpload/680dc9f0189caa3336cc8797ee6665b3/simple_without_yaml/flow.dag.yaml + x-ms-copy-status: + - success + x-ms-creation-time: + - Wed, 13 Mar 2024 09:00:40 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:01:32 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/runs/name/.promptflow/flow.json + response: + body: + string: "{\r\n \"entry\": \"entry:my_flow\",\r\n \"function\": \"my_flow\",\r\n + \ \"inputs\": {\r\n \"input_val\": {\r\n \"type\": \"string\"\r\n + \ }\r\n },\r\n \"outputs\": {\r\n \"output\": {\r\n \"type\": + \"object\"\r\n }\r\n }\r\n}" + headers: + accept-ranges: + - bytes + content-length: + - '240' + content-range: + - bytes 0-239/240 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 09:00:40 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - xzaVcbtpEfLsECGkzy+RKw== + x-ms-blob-type: + - BlockBlob + x-ms-copy-completion-time: + - Wed, 13 Mar 2024 09:00:40 GMT + x-ms-copy-id: + - 9ab2ad8b-d923-4fc9-b618-7f0dc7f8a8f9 + x-ms-copy-progress: + - 240/240 + x-ms-copy-source: + - https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/LocalUpload/680dc9f0189caa3336cc8797ee6665b3/simple_without_yaml/.promptflow/flow.json + x-ms-copy-status: + - success + x-ms-creation-time: + - Wed, 13 Mar 2024 09:00:40 GMT + x-ms-meta-name: + - 493061c0-0f9a-424a-9858-f835dfe58f5e + x-ms-meta-upload_status: + - completed + x-ms-meta-version: + - '1' + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:01:32 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/runs/name/entry.py + response: + body: + string: "# ---------------------------------------------------------\r\n# Copyright + (c) Microsoft Corporation. All rights reserved.\r\n# ---------------------------------------------------------\r\n\r\ndef + my_flow(input_val: str):\r\n \"\"\"Simple flow without yaml.\"\"\"\r\n + \ print(f\"Hello world! {input_val}\")\r\n" + headers: + accept-ranges: + - bytes + content-length: + - '292' + content-range: + - bytes 0-291/292 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 09:00:40 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - 16X2srvhVzeDgjXaBHVvXg== + x-ms-blob-type: + - BlockBlob + x-ms-copy-completion-time: + - Wed, 13 Mar 2024 09:00:40 GMT + x-ms-copy-id: + - 3c9e27ef-4d00-4243-90a0-c4147039c23a + x-ms-copy-progress: + - 292/292 + x-ms-copy-source: + - https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/LocalUpload/680dc9f0189caa3336cc8797ee6665b3/simple_without_yaml/entry.py + x-ms-copy-status: + - success + x-ms-creation-time: + - Wed, 13 Mar 2024 09:00:40 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:01:32 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/name/meta.json + response: + body: + string: '{"batch_size": 25}' + headers: + accept-ranges: + - bytes + content-length: + - '18' + content-range: + - bytes 0-17/18 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 09:00:47 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - /u1NXUpgXMFDmZEw835qnw== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 09:00:47 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:01:32 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/name/instance_results.jsonl + response: + body: + string: '{"line_number": 0, "status": "Completed", "inputs.input_val": "input1", + "inputs.line_number": 0, "output": null} + + ' + headers: + accept-ranges: + - bytes + content-length: + - '113' + content-range: + - bytes 0-112/113 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 09:00:53 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-committed-block-count: + - '1' + x-ms-blob-type: + - AppendBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 09:00:53 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Wed, 13 Mar 2024 09:01:32 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2023-11-03' + method: GET + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/name/flow_outputs/output.jsonl + response: + body: + string: '{"line_number": 0, "output": null} + + ' + headers: + accept-ranges: + - bytes + content-length: + - '35' + content-range: + - bytes 0-34/35 + content-type: + - application/octet-stream + last-modified: + - Wed, 13 Mar 2024 09:00:56 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - /e0Zn1phO4FyeGCAse5gGw== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Wed, 13 Mar 2024 09:00:56 GMT + x-ms-version: + - '2023-11-03' + status: + code: 206 + message: Partial Content +- request: + body: '{"runId": "name", "selectRunMetadata": true, "selectRunDefinition": true, + "selectJobSpecification": true}' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '137' + content-type: + - application/json + host: + - eastus.api.azureml.ms + user-agent: + - python-httpx/0.25.2 + method: POST + uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata + response: + content: '{"runMetadata": {"runNumber": 1710320439, "rootRunId": "name", "createdUtc": + "2024-03-13T09:00:39.7215141+00:00", "createdBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", + "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", + "upn": null}, "userId": "00000000-0000-0000-0000-000000000000", "token": null, + "tokenExpiryTimeUtc": null, "error": null, "warnings": null, "revision": 6, + "statusRevision": 3, "runUuid": "606b4482-4091-4c72-9a70-eeb32487f8d2", "parentRunUuid": + null, "rootRunUuid": "606b4482-4091-4c72-9a70-eeb32487f8d2", "lastStartTimeUtc": + null, "currentComputeTime": null, "computeDuration": "00:00:11.6284660", "effectiveStartTimeUtc": + null, "lastModifiedBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", + "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "18a66f5f-dbdf-4c17-9dd7-1634712a9cbe", + "upn": null}, "lastModifiedUtc": "2024-03-13T09:00:56.6752317+00:00", "duration": + "00:00:11.6284660", "cancelationReason": null, "currentAttemptId": 1, "runId": + "name", "parentRunId": null, "experimentId": "74b7905c-2ac3-4f4e-8a8f-c198f448a197", + "status": "Completed", "startTimeUtc": "2024-03-13T09:00:48.886808+00:00", "endTimeUtc": + "2024-03-13T09:01:00.515274+00:00", "scheduleId": null, "displayName": "name", + "name": null, "dataContainerId": "dcid.name", "description": null, "hidden": + false, "runType": "azureml.promptflow.FlowRun", "runTypeV2": {"orchestrator": + null, "traits": [], "attribution": "PromptFlow", "computeType": null}, "properties": + {"azureml.promptflow.runtime_name": "automatic", "azureml.promptflow.runtime_version": + "20240306.v5", "azureml.promptflow.definition_file_name": "flow.dag.yaml", "azureml.promptflow.flow_lineage_id": + "0ec65ae456ae278328cff5cc1a8afd8caa4b8fcf7706e692f97cdfba31347886", "azureml.promptflow.flow_definition_datastore_name": + "workspaceblobstore", "azureml.promptflow.flow_definition_blob_path": "LocalUpload/680dc9f0189caa3336cc8797ee6665b3/simple_without_yaml/flow.dag.yaml", + "azureml.promptflow.input_data": "azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl", + "_azureml.evaluation_run": "promptflow.BatchRun", "azureml.promptflow.session_id": + "d99698cada9010a2c7ea798bb255eb2c2fe3d771895bbe0a", "azureml.promptflow.snapshot_id": + "d8987d37-16d4-441c-9c6c-b46b333f6e26", "azureml.promptflow.run_mode": "Eager", + "azureml.promptflow.total_tokens": "0", "_azureml.evaluate_artifacts": "[{\"path\": + \"instance_results.jsonl\", \"type\": \"table\"}]"}, "parameters": {}, "actionUris": + {}, "scriptName": null, "target": null, "uniqueChildRunComputeTargets": [], + "tags": {}, "settings": {}, "services": {}, "inputDatasets": [], "outputDatasets": + [], "runDefinition": null, "jobSpecification": null, "primaryMetricName": null, + "createdFrom": null, "cancelUri": null, "completeUri": null, "diagnosticsUri": + null, "computeRequest": null, "compute": null, "retainForLifetimeOfWorkspace": + false, "queueingInfo": null, "inputs": null, "outputs": {"debug_info": {"assetId": + "azureml://locations/eastus/workspaces/00000/data/azureml_name_output_data_debug_info/versions/1", + "type": "UriFolder"}, "flow_outputs": {"assetId": "azureml://locations/eastus/workspaces/00000/data/azureml_name_output_data_flow_outputs/versions/1", + "type": "UriFolder"}}}, "runDefinition": null, "jobSpecification": null, "systemSettings": + null}' + headers: + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.049' + http_version: HTTP/1.1 + status_code: 200 +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.10.13 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name/logContent + response: + body: + string: '"2024-03-13 09:00:41 +0000 92 promptflow-runtime INFO [name] + Receiving v2 bulk run request c315a941-7a52-4ac6-9d3f-a637c9a3c720: {\"flow_id\": + \"name\", \"flow_run_id\": \"name\", \"flow_source\": {\"flow_source_type\": + 1, \"flow_source_info\": {\"snapshot_id\": \"d8987d37-16d4-441c-9c6c-b46b333f6e26\"}, + \"flow_dag_file\": \"flow.dag.yaml\"}, \"log_path\": \"https://promptfloweast4063704120.blob.core.windows.net/azureml/ExperimentRun/dcid.name/logs/azureml/executionlogs.txt?sv=2019-07-07&sr=b&sig=**data_scrubbed**&skoid=55b92eba-d7c7-4afd-ab76-7bb1cd345283&sktid=00000000-0000-0000-0000-000000000000&skt=2024-03-13T08%3A50%3A38Z&ske=2024-03-14T17%3A00%3A38Z&sks=b&skv=2019-07-07&st=2024-03-13T08%3A50%3A40Z&se=2024-03-13T17%3A00%3A40Z&sp=rcw\", + \"app_insights_instrumentation_key\": \"InstrumentationKey=**data_scrubbed**;IngestionEndpoint=https://eastus-6.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/\", + \"batch_timeout_sec\": 36000, \"data_inputs\": {\"data\": \"azureml://datastores/workspaceblobstore/paths/LocalUpload/e62bc4d5a164939b21d42dd420469da7/simple_eager_flow_data.jsonl\"}, + \"azure_storage_setting\": {\"azure_storage_mode\": 1, \"storage_account_name\": + \"promptfloweast4063704120\", \"blob_container_name\": \"azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5\", + \"flow_artifacts_root_path\": \"promptflow/PromptFlowArtifacts/name\", \"blob_container_sas_token\": + \"?sv=2019-07-07&sr=c&sig=**data_scrubbed**&skoid=55b92eba-d7c7-4afd-ab76-7bb1cd345283&sktid=00000000-0000-0000-0000-000000000000&skt=2024-03-13T09%3A00%3A40Z&ske=2024-03-20T09%3A00%3A40Z&sks=b&skv=2019-07-07&se=2024-03-20T09%3A00%3A40Z&sp=racwl\", + \"output_datastore_name\": \"workspaceblobstore\"}}\n2024-03-13 09:00:41 +0000 92 + promptflow-runtime INFO Runtime version: 20240306.v5. PromptFlow version: + 1.7.0rc2\n2024-03-13 09:00:41 +0000 92 promptflow-runtime INFO Updating + name to Status.Preparing...\n2024-03-13 09:00:41 +0000 92 promptflow-runtime + INFO Downloading snapshot to /mnt/host/service/app/37743/requests/name\n2024-03-13 + 09:00:41 +0000 92 promptflow-runtime INFO Get snapshot sas url for + d8987d37-16d4-441c-9c6c-b46b333f6e26.\n2024-03-13 09:00:42 +0000 92 promptflow-runtime + INFO Snapshot d8987d37-16d4-441c-9c6c-b46b333f6e26 contains 3 files.\n2024-03-13 + 09:00:42 +0000 92 promptflow-runtime INFO Download snapshot d8987d37-16d4-441c-9c6c-b46b333f6e26 + completed.\n2024-03-13 09:00:42 +0000 92 promptflow-runtime INFO Successfully + download snapshot to /mnt/host/service/app/37743/requests/name\n2024-03-13 + 09:00:42 +0000 92 promptflow-runtime INFO About to execute a python + flow.\n2024-03-13 09:00:42 +0000 92 promptflow-runtime INFO Use spawn + method to start child process.\n2024-03-13 09:00:42 +0000 92 promptflow-runtime + INFO Starting to check process 293 status for run name\n2024-03-13 09:00:42 + +0000 92 promptflow-runtime INFO Start checking run status for run + name\n2024-03-13 09:00:46 +0000 293 promptflow-runtime INFO [92--293] + Start processing flowV2......\n2024-03-13 09:00:46 +0000 293 promptflow-runtime + INFO Runtime version: 20240306.v5. PromptFlow version: 1.7.0rc2\n2024-03-13 + 09:00:46 +0000 293 promptflow-runtime INFO Setting mlflow tracking + uri...\n2024-03-13 09:00:46 +0000 293 promptflow-runtime INFO Validating + ''AzureML Data Scientist'' user authentication...\n2024-03-13 09:00:46 +0000 293 + promptflow-runtime INFO Successfully validated ''AzureML Data Scientist'' + user authentication.\n2024-03-13 09:00:47 +0000 293 promptflow-runtime + INFO Using AzureMLRunStorageV2\n2024-03-13 09:00:47 +0000 293 promptflow-runtime + INFO Setting mlflow tracking uri to ''azureml://eastus.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus''\n2024-03-13 + 09:00:47 +0000 293 promptflow-runtime INFO Initialized blob service + client.\n2024-03-13 09:00:47 +0000 293 promptflow-runtime INFO Blob + service client has api version: 2023-11-03\n2024-03-13 09:00:47 +0000 293 + promptflow-runtime INFO Setting mlflow tracking uri to ''azureml://eastus.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus''\n2024-03-13 + 09:00:48 +0000 293 promptflow-runtime INFO Resolve data from url finished + in 1.2522469599999795 seconds\n2024-03-13 09:00:48 +0000 293 promptflow-runtime + INFO Starting the aml run ''name''...\n2024-03-13 09:00:49 +0000 293 + execution WARNING Starting run without column mapping may lead to + unexpected results. Please consult the following documentation for more information: + https://aka.ms/pf/column-mapping\n2024-03-13 09:00:49 +0000 293 execution.bulk INFO Skipped + the execution of 0 existing results.\n2024-03-13 09:00:49 +0000 293 execution.bulk INFO The + timeout for the batch run is 36000 seconds.\n2024-03-13 09:00:49 +0000 293 + execution.bulk INFO Set process count to 1 by taking the minimum value + among the factors of {''default_worker_count'': 4, ''row_count'': 1}.\n2024-03-13 + 09:00:53 +0000 293 execution.bulk INFO Process name(ForkProcess-2:2:1)-Process + id(365)-Line number(0) start execution.\n2024-03-13 09:00:53 +0000 293 + execution.bulk INFO Process name(ForkProcess-2:2:1)-Process id(365)-Line + number(0) completed.\n2024-03-13 09:00:54 +0000 293 execution.bulk INFO Finished + 1 / 1 lines.\n2024-03-13 09:00:54 +0000 293 execution.bulk INFO Average + execution time for completed lines: 5.0 seconds. Estimated time for incomplete + lines: 0.0 seconds.\n2024-03-13 09:00:54 +0000 365 execution.bulk WARNING Error + occurred while shutting down tracer provider: ''ProxyTracerProvider'' object + has no attribute ''shutdown''\n2024-03-13 09:00:55 +0000 293 promptflow-runtime + INFO Post processing batch result...\n2024-03-13 09:00:56 +0000 293 + execution.bulk INFO Upload status summary metrics for run name finished + in 0.8281193400000575 seconds\n2024-03-13 09:00:56 +0000 293 promptflow-runtime + INFO Successfully write run properties {\"azureml.promptflow.total_tokens\": + 0, \"_azureml.evaluate_artifacts\": \"[{\\\"path\\\": \\\"instance_results.jsonl\\\", + \\\"type\\\": \\\"table\\\"}]\"} with run id ''name''\n2024-03-13 09:00:56 + +0000 293 execution.bulk INFO Upload RH properties for run name + finished in 0.07297565199996825 seconds\n2024-03-13 09:00:56 +0000 293 + promptflow-runtime INFO Creating unregistered output Asset for Run name...\n2024-03-13 + 09:00:56 +0000 293 promptflow-runtime INFO Created debug_info Asset: + azureml://locations/eastus/workspaces/00000/data/azureml_name_output_data_debug_info/versions/1\n2024-03-13 + 09:00:56 +0000 293 promptflow-runtime INFO Creating unregistered output + Asset for Run name...\n2024-03-13 09:00:57 +0000 293 promptflow-runtime + INFO Created flow_outputs output Asset: azureml://locations/eastus/workspaces/00000/data/azureml_name_output_data_flow_outputs/versions/1\n2024-03-13 + 09:00:57 +0000 293 promptflow-runtime INFO Creating Artifact for Run + name...\n2024-03-13 09:01:00 +0000 293 promptflow-runtime INFO Created + instance_results.jsonl Artifact.\n2024-03-13 09:01:00 +0000 293 promptflow-runtime + INFO Patching name...\n2024-03-13 09:01:00 +0000 293 promptflow-runtime + INFO Ending the aml run ''name'' with status ''Completed''...\n"' + headers: + connection: + - keep-alive + content-length: + - '8434' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.379' + status: + code: 200 + message: OK +version: 1 diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_failed_run_to_dict_exclude.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_failed_run_to_dict_exclude.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_failed_run_to_dict_exclude.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_failed_run_to_dict_exclude.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_flow_id_in_submission.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_flow_id_in_submission.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_flow_id_in_submission.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_flow_id_in_submission.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_get_detail_against_partial_fail_run.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_get_detail_against_partial_fail_run.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_get_detail_against_partial_fail_run.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_get_detail_against_partial_fail_run.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_get_details_against_partial_completed_run.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_get_details_against_partial_completed_run.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_get_details_against_partial_completed_run.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_get_details_against_partial_completed_run.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_get_invalid_run_cases.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_get_invalid_run_cases.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_get_invalid_run_cases.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_get_invalid_run_cases.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_input_mapping_with_dict.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_input_mapping_with_dict.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_input_mapping_with_dict.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_input_mapping_with_dict.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_list_runs.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_list_runs.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_list_runs.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_list_runs.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_pf_run_with_env_var.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_pf_run_with_env_var.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_pf_run_with_env_var.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_pf_run_with_env_var.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_request_id_when_making_http_requests.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_request_id_when_making_http_requests.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_request_id_when_making_http_requests.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_request_id_when_making_http_requests.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_requirements_in_additional_includes.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_requirements_in_additional_includes.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_requirements_in_additional_includes.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_requirements_in_additional_includes.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk.yaml similarity index 53% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk.yaml index e925ad5d334..e57162bbe69 100644 --- a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk.yaml +++ b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk.yaml @@ -5,12 +5,12 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 response: @@ -32,14 +32,14 @@ interactions: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - - Accept-Encoding,Accept-Encoding + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-request-time: - - '0.027' + - '0.018' status: code: 200 message: OK @@ -49,12 +49,12 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores?count=30&isDefault=true&orderByAsc=false response: @@ -84,14 +84,14 @@ interactions: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - - Accept-Encoding,Accept-Encoding + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-request-time: - - '0.214' + - '0.556' status: code: 200 message: OK @@ -101,12 +101,12 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore response: @@ -136,14 +136,14 @@ interactions: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - - Accept-Encoding,Accept-Encoding + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-request-time: - - '0.066' + - '0.514' status: code: 200 message: OK @@ -153,14 +153,14 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive Content-Length: - '0' User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets response: @@ -179,14 +179,12 @@ interactions: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-request-time: - - '0.192' + - '0.184' status: code: 200 message: OK @@ -196,13 +194,13 @@ interactions: Accept: - application/xml Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) x-ms-date: - - Fri, 12 Jan 2024 08:39:26 GMT + - Wed, 13 Mar 2024 08:36:46 GMT x-ms-version: - '2023-11-03' method: HEAD @@ -246,13 +244,13 @@ interactions: Accept: - application/xml Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) x-ms-date: - - Fri, 12 Jan 2024 08:39:27 GMT + - Wed, 13 Mar 2024 08:36:48 GMT x-ms-version: - '2023-11-03' method: HEAD @@ -280,12 +278,12 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore response: @@ -315,14 +313,14 @@ interactions: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - - Accept-Encoding,Accept-Encoding + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-request-time: - - '0.093' + - '0.090' status: code: 200 message: OK @@ -332,14 +330,14 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive Content-Length: - '0' User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets response: @@ -358,14 +356,12 @@ interactions: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding + x-cache: + - CONFIG_NOCACHE x-content-type-options: - nosniff x-request-time: - - '0.081' + - '0.120' status: code: 200 message: OK @@ -375,13 +371,13 @@ interactions: Accept: - application/xml Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) x-ms-date: - - Fri, 12 Jan 2024 08:39:31 GMT + - Wed, 13 Mar 2024 08:36:51 GMT x-ms-version: - '2023-11-03' method: HEAD @@ -425,13 +421,13 @@ interactions: Accept: - application/xml Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) x-ms-date: - - Fri, 12 Jan 2024 08:39:32 GMT + - Wed, 13 Mar 2024 08:36:53 GMT x-ms-version: - '2023-11-03' method: HEAD @@ -457,25 +453,25 @@ interactions: body: '{"flowDefinitionDataStoreName": "workspaceblobstore", "flowDefinitionBlobPath": "LocalUpload/000000000000000000000000000000000000/web_classification/flow.dag.yaml", "runId": "name", "runDisplayName": "name", "runExperimentName": "", "nodeVariant": - "${summarize_text_content.variant_0}", "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/000000000000000000000000000000000000/webClassification1.jsonl"}, - "inputsMapping": {"url": "${data.url}"}, "connections": {}, "environmentVariables": - {}, "runtimeName": "fake-runtime-name", "sessionId": "000000000000000000000000000000000000000000000000", + "${summarize_text_content.variant_0}", "sessionId": "000000000000000000000000000000000000000000000000", "sessionSetupMode": "SystemWait", "flowLineageId": "0000000000000000000000000000000000000000000000000000000000000000", - "runDisplayNameGenerationType": "UserProvidedMacro"}' + "runtimeName": "fake-runtime-name", "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/000000000000000000000000000000000000/webClassification1.jsonl"}, + "inputsMapping": {"url": "${data.url}"}, "connections": {}, "environmentVariables": + {}, "runDisplayNameGenerationType": "UserProvidedMacro"}' headers: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive Content-Length: - - '873' + - '864' Content-Type: - application/json User-Agent: - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) + Python/3.9.18 (Windows-10-10.0.22631-SP0) method: POST uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/submit response: @@ -489,11 +485,11 @@ interactions: content-type: - application/json; charset=utf-8 strict-transport-security: - - max-age=15724800; includeSubDomains; preload + - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-request-time: - - '6.880' + - '13.164' status: code: 200 message: OK @@ -503,12 +499,12 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive User-Agent: - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) + Python/3.9.18 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name response: @@ -536,26 +532,54 @@ interactions: "1", "logit_bias": "", "text": "${fetch_text_content_from_url.output}"}, "tool": "summarize_text_content.jinja2", "reduce": false, "api": "chat", "provider": "AzureOpenAI", "connection": "azure_open_ai_connection", "module": "promptflow.tools.aoai"}], - "tools": [{"name": "Content Safety (Text Analyze)", "type": "python", "inputs": - {"connection": {"type": ["AzureContentSafetyConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "hate_category": - {"type": ["string"], "default": "medium_sensitivity", "enum": ["disable", - "low_sensitivity", "medium_sensitivity", "high_sensitivity"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "self_harm_category": - {"type": ["string"], "default": "medium_sensitivity", "enum": ["disable", - "low_sensitivity", "medium_sensitivity", "high_sensitivity"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "sexual_category": - {"type": ["string"], "default": "medium_sensitivity", "enum": ["disable", - "low_sensitivity", "medium_sensitivity", "high_sensitivity"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "text": {"type": - ["string"], "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "violence_category": {"type": ["string"], "default": "medium_sensitivity", + "tools": [{"name": "Azure OpenAI GPT-4 Turbo with Vision", "type": "custom_llm", + "inputs": {"connection": {"type": ["AzureOpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 0}}, "deployment_name": {"type": ["string"], "enabled_by": "connection", "dynamic_list": + {"func_path": "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": + [{"name": "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 5}}, "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 3}}}, + "description": "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI + vision ability.", "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", + "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.2.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}}, - "description": "Use Azure Content Safety to detect harmful content.", "module": - "promptflow.tools.azure_content_safety", "function": "analyze_text", "is_builtin": - true, "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.2.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, "deployment_name": @@ -566,77 +590,208 @@ interactions: "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", - "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}}, "description": "Use Open AI''s embedding model to create an embedding vector representing the input text.", "module": "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, - "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Open Source LLM", "type": "custom_llm", + "package": "promptflow-tools", "package_version": "1.2.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CustomConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "deployment_name": {"type": ["string"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "endpoint_name": - {"type": ["string"], "default": "-- please enter an endpoint name --", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_new_tokens": - {"type": ["int"], "default": 500, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model_kwargs": {"type": ["object"], "default": - "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default", "advanced": true}, "temperature": {"type": ["double"], "default": - 1.0, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "top_p": {"type": ["double"], "default": 1.0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default", "advanced": true}}, - "description": "Use an Open Source model from the Azure Model catalog, deployed - to an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": - "promptflow.tools.open_source_llm", "class_name": "OpenSourceLLM", "function": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", - "is_builtin": true, "package": "promptflow-tools", "package_version": "0.0.216", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.2.0rc1", "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "frequency_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_tokens": {"type": - ["int"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], - "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}, - "presence_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "stop": {"type": - ["list"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "temperature": {"type": ["double"], "default": 1, - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use OpenAI GPT-4V to leverage - vision ability.", "module": "promptflow.tools.openai_gpt4v", "class_name": - "OpenAI", "function": "chat", "is_builtin": true, "package": "promptflow-tools", - "package_version": "0.0.216", "default_prompt": "# system:\nAs an AI assistant, - your task involves interpreting images and responding to questions about the - image.\nRemember to provide accurate answers based on the information present - in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "Serp API", "type": - "python", "inputs": {"connection": {"type": ["SerpConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "engine": {"type": - ["string"], "default": "google", "enum": ["google", "bing"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "location": {"type": - ["string"], "default": "", "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "num": {"type": ["int"], "default": "10", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "query": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "safe": {"type": ["string"], "default": "off", - "enum": ["active", "off"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Serp API to obtain search - results from a specific search engine.", "module": "promptflow.tools.serpapi", - "class_name": "SerpAPI", "function": "search", "is_builtin": true, "package": - "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": false, - "tool_state": "stable"}, {"name": "Faiss Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "vector": {"type": ["list"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Search vector based query - from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 5}}, "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 3}}}, + "description": "Use OpenAI GPT-4V to leverage vision ability.", "module": + "promptflow.tools.openai_gpt4v", "class_name": "OpenAI", "function": "chat", + "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.2.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.2.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow-vectordb", "package_version": + "0.0.1", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector DB Lookup", "type": "python", + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": @@ -663,16 +818,16 @@ interactions: vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "query": {"type": ["object"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": - ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Search text or vector based query - from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "classify_with_llm.jinja2", "type": + false, "tool_state": "deprecated"}, {"name": "classify_with_llm.jinja2", "type": "prompt", "inputs": {"examples": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, "text_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": false, @@ -703,20 +858,20 @@ interactions: "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", "flowRunId": "name", "flowRunDisplayName": "name", "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "test-runtime-ci", + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "hod-ci", "inputsMapping": {"url": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", "childRunBasePath": "promptflow/PromptFlowArtifacts/name/flow_artifacts", - "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "f8f59233-47fa-48df-a9e1-fc6866b7597e", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "33e47f3a-be15-4250-bd03-15082ce96cb0", "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' headers: connection: - keep-alive content-length: - - '16239' + - '30261' content-type: - application/json; charset=utf-8 strict-transport-security: - - max-age=15724800; includeSubDomains; preload + - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked vary: @@ -724,7 +879,7 @@ interactions: x-content-type-options: - nosniff x-request-time: - - '0.210' + - '0.270' status: code: 200 message: OK @@ -735,7 +890,7 @@ interactions: Accept: - '*/*' Accept-Encoding: - - gzip, deflate + - gzip, deflate, br Connection: - keep-alive Content-Length: @@ -748,37 +903,36 @@ interactions: uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata response: body: - string: '{"runMetadata": {"runNumber": 1705048778, "rootRunId": "name", "createdUtc": - "2024-01-12T08:39:38.859607+00:00", "createdBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", - "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", - "upn": null}, "userId": "00000000-0000-0000-0000-000000000000", "token": null, - "tokenExpiryTimeUtc": null, "error": null, "warnings": null, "revision": 3, - "statusRevision": 1, "runUuid": "ead544d1-f5d3-4eb1-b931-ab04cd0e1b39", "parentRunUuid": - null, "rootRunUuid": "ead544d1-f5d3-4eb1-b931-ab04cd0e1b39", "lastStartTimeUtc": + string: '{"runMetadata": {"runNumber": 1710319022, "rootRunId": "name", "createdUtc": + "2024-03-13T08:37:02.0408389+00:00", "createdBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", + "userPuId": "10032000324F7449", "userIdp": null, "userAltSecId": null, "userIss": + "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", "userTenantId": + "00000000-0000-0000-0000-000000000000", "userName": "Honglin Du", "upn": null}, + "userId": "00000000-0000-0000-0000-000000000000", "token": null, "tokenExpiryTimeUtc": + null, "error": null, "warnings": null, "revision": 3, "statusRevision": 1, + "runUuid": "b8932d6b-0bbe-41be-994b-cf86bf1be136", "parentRunUuid": null, + "rootRunUuid": "b8932d6b-0bbe-41be-994b-cf86bf1be136", "lastStartTimeUtc": null, "currentComputeTime": "00:00:00", "computeDuration": null, "effectiveStartTimeUtc": null, "lastModifiedBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", - "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", - "upn": null}, "lastModifiedUtc": "2024-01-12T08:39:43.2026482+00:00", "duration": - null, "cancelationReason": null, "currentAttemptId": 1, "runId": "name", "parentRunId": + "userPuId": "10032000324F7449", "userIdp": null, "userAltSecId": null, "userIss": + "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", "userTenantId": + "00000000-0000-0000-0000-000000000000", "userName": "Honglin Du", "upn": null}, + "lastModifiedUtc": "2024-03-13T08:37:09.8840657+00:00", "duration": null, + "cancelationReason": null, "currentAttemptId": 1, "runId": "name", "parentRunId": null, "experimentId": "d30efbeb-f81d-4cfa-b5cc-a0570a049009", "status": "Preparing", "startTimeUtc": null, "endTimeUtc": null, "scheduleId": null, "displayName": "name", "name": null, "dataContainerId": "dcid.name", "description": null, "hidden": false, "runType": "azureml.promptflow.FlowRun", "runTypeV2": {"orchestrator": null, "traits": [], "attribution": "PromptFlow", "computeType": "AmlcDsi"}, - "properties": {"azureml.promptflow.runtime_name": "test-runtime-ci", "azureml.promptflow.runtime_version": - "20231204.v4", "azureml.promptflow.definition_file_name": "flow.dag.yaml", - "azureml.promptflow.session_id": "4dd8f4d5f44dfeb817d3438cf84bd739215d87afd9458597", - "azureml.promptflow.flow_lineage_id": "af1a6951de9be2ce13d3b58b23dbd8b6a0cd8fd4918ad9cb22b28fb8395fbcb0", + "properties": {"azureml.promptflow.runtime_name": "hod-ci", "azureml.promptflow.runtime_version": + "20240222.v3", "azureml.promptflow.definition_file_name": "flow.dag.yaml", + "azureml.promptflow.flow_lineage_id": "97280ab0e0bfee2b7b9a66a5e6391fa0f52550ecf78501ac8bd57d5e31eddfd6", "azureml.promptflow.node_variant": "${summarize_text_content.variant_0}", "azureml.promptflow.flow_definition_datastore_name": "workspaceblobstore", "azureml.promptflow.flow_definition_blob_path": "LocalUpload/a1fa6ef1ead7ff3ce76b36250f6f5461/web_classification/flow.dag.yaml", "azureml.promptflow.input_data": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl", "azureml.promptflow.inputs_mapping": "{\"url\":\"${data.url}\"}", "_azureml.evaluation_run": - "promptflow.BatchRun", "azureml.promptflow.snapshot_id": "f8f59233-47fa-48df-a9e1-fc6866b7597e"}, + "promptflow.BatchRun", "azureml.promptflow.snapshot_id": "33e47f3a-be15-4250-bd03-15082ce96cb0"}, "parameters": {}, "actionUris": {}, "scriptName": null, "target": null, "uniqueChildRunComputeTargets": [], "tags": {}, "settings": {}, "services": {}, "inputDatasets": [], "outputDatasets": [], "runDefinition": null, "jobSpecification": null, "primaryMetricName": @@ -790,11 +944,11 @@ interactions: connection: - keep-alive content-length: - - '4010' + - '3769' content-type: - application/json; charset=utf-8 strict-transport-security: - - max-age=15724800; includeSubDomains; preload + - max-age=31536000; includeSubDomains; preload transfer-encoding: - chunked vary: @@ -802,7 +956,7 @@ interactions: x-content-type-options: - nosniff x-request-time: - - '0.037' + - '0.057' status: code: 200 message: OK diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_from_yaml.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_from_yaml.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_from_yaml.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_from_yaml.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_not_exist.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_not_exist.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_not_exist.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_not_exist.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_with_registry_flow.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_with_registry_flow.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_with_registry_flow.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_with_registry_flow.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_with_registry_flow_automatic_runtime.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_with_registry_flow_automatic_runtime.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_with_registry_flow_automatic_runtime.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_with_registry_flow_automatic_runtime.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_with_remote_flow.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_with_remote_flow.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_with_remote_flow.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_with_remote_flow.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_without_retry.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_without_retry.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_bulk_without_retry.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_bulk_without_retry.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_data_not_provided.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_data_not_provided.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_data_not_provided.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_data_not_provided.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_display_name_with_macro.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_display_name_with_macro.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_display_name_with_macro.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_display_name_with_macro.yaml diff --git a/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_resume.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_resume.yaml new file mode 100644 index 00000000000..cceba1c6d5b --- /dev/null +++ b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_resume.yaml @@ -0,0 +1,1709 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.7 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000", + "name": "00000", "type": "Microsoft.MachineLearningServices/workspaces", "location": + "eastus", "tags": {}, "etag": null, "kind": "Default", "sku": {"name": "Basic", + "tier": "Basic"}, "properties": {"discoveryUrl": "https://eastus.api.azureml.ms/discovery"}}' + headers: + cache-control: + - no-cache + content-length: + - '3678' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.023' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.7 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/resume_from_run_using_automatic_runtime + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "fetch_text_content_from_url", "type": + "python", "source": {"type": "code", "path": "fetch_text_content_from_url.py"}, + "inputs": {"fetch_url": "${inputs.url}"}, "tool": "fetch_text_content_from_url.py", + "reduce": false}, {"name": "prepare_examples", "type": "python", "source": + {"type": "code", "path": "prepare_examples.py"}, "inputs": {}, "tool": "prepare_examples.py", + "reduce": false}, {"name": "classify_with_llm", "type": "llm", "source": {"type": + "code", "path": "classify_with_llm.jinja2"}, "inputs": {"deployment_name": + "gpt-35-turbo", "suffix": "", "max_tokens": "128", "temperature": "0.1", "top_p": + "1.0", "logprobs": "", "echo": "False", "stop": "", "presence_penalty": "0", + "frequency_penalty": "0", "best_of": "1", "logit_bias": "", "url": "${inputs.url}", + "examples": "${prepare_examples.output}", "text_content": "${summarize_text_content.output}"}, + "tool": "classify_with_llm.jinja2", "reduce": false, "api": "chat", "provider": + "AzureOpenAI", "connection": "azure_open_ai_connection", "module": "promptflow.tools.aoai"}, + {"name": "convert_to_dict", "type": "python", "source": {"type": "code", "path": + "convert_to_dict.py"}, "inputs": {"input_str": "${classify_with_llm.output}"}, + "tool": "convert_to_dict.py", "reduce": false}, {"name": "summarize_text_content", + "type": "llm", "source": {"type": "code", "path": "summarize_text_content.jinja2"}, + "inputs": {"deployment_name": "gpt-35-turbo", "suffix": "", "max_tokens": + "128", "temperature": "0.2", "top_p": "1.0", "logprobs": "", "echo": "False", + "stop": "", "presence_penalty": "0", "frequency_penalty": "0", "best_of": + "1", "logit_bias": "", "text": "${fetch_text_content_from_url.output}"}, "tool": + "summarize_text_content.jinja2", "reduce": false, "api": "chat", "provider": + "AzureOpenAI", "connection": "azure_open_ai_connection", "module": "promptflow.tools.aoai"}], + "tools": [{"name": "Azure OpenAI GPT-4 Turbo with Vision", "type": "custom_llm", + "inputs": {"connection": {"type": ["AzureOpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 0}}, "deployment_name": {"type": ["string"], "enabled_by": "connection", "dynamic_list": + {"func_path": "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": + [{"name": "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 5}}, "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 3}}}, + "description": "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI + vision ability.", "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", + "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.3.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.3.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.3.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.3.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 5}}, "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 3}}}, + "description": "Use OpenAI GPT-4V to leverage vision ability.", "module": + "promptflow.tools.openai_gpt4v", "class_name": "OpenAI", "function": "chat", + "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.3.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.3.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "classify_with_llm.jinja2", "type": + "prompt", "inputs": {"examples": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "text_content": + {"type": ["string"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "url": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "source": "classify_with_llm.jinja2", + "is_builtin": false, "enable_kwargs": false, "tool_state": "stable"}, {"name": + "convert_to_dict.py", "type": "python", "inputs": {"input_str": {"type": ["string"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}}, + "source": "convert_to_dict.py", "function": "convert_to_dict", "is_builtin": + false, "enable_kwargs": false, "tool_state": "stable"}, {"name": "fetch_text_content_from_url.py", + "type": "python", "inputs": {"fetch_url": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "source": "fetch_text_content_from_url.py", + "function": "fetch_text_content_from_url", "is_builtin": false, "enable_kwargs": + false, "tool_state": "stable"}, {"name": "prepare_examples.py", "type": "python", + "source": "prepare_examples.py", "function": "prepare_examples", "is_builtin": + false, "enable_kwargs": false, "tool_state": "stable"}, {"name": "summarize_text_content.jinja2", + "type": "prompt", "inputs": {"text": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "source": "summarize_text_content.jinja2", + "is_builtin": false, "enable_kwargs": false, "tool_state": "stable"}, {"name": + "summarize_text_content__variant_1.jinja2", "type": "prompt", "inputs": {"text": + {"type": ["string"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "source": "summarize_text_content__variant_1.jinja2", + "is_builtin": false, "enable_kwargs": false, "tool_state": "stable"}], "inputs": + {"url": {"type": "string", "default": "https://www.microsoft.com/en-us/d/xbox-wireless-controller-stellar-shift-special-edition/94fbjc7h0h6h", + "is_chat_input": false}}, "outputs": {"category": {"type": "string", "reference": + "${convert_to_dict.output.category}", "evaluation_only": false, "is_chat_output": + false}, "evidence": {"type": "string", "reference": "${convert_to_dict.output.evidence}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/resume_from_run_using_automatic_runtime/flowRuns/resume_from_run_using_automatic_runtime", + "flowRunId": "resume_from_run_using_automatic_runtime", "flowRunDisplayName": + "resume_from_run_using_automatic_runtime", "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"url": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/resume_from_run_using_automatic_runtime/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "49bba768-6848-48a7-bb40-fb7a9f4e0aec", + "sessionId": "efc1ebeee00db455c850ec7afec33a45b7106c97c7d48684", "studioPortalEndpoint": + "https://ml.azure.com/runs/resume_from_run_using_automatic_runtime?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '30345' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.297' + status: + code: 200 + message: OK +- request: + body: '{"runId": "name", "resumeFromRunId": "resume_from_run_using_automatic_runtime"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '111' + Content-Type: + - application/json + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.7 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/resume + response: + body: + string: '"name"' + headers: + connection: + - keep-alive + content-length: + - '38' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-request-time: + - '5.729' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown + Python/3.9.7 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name + response: + body: + string: '{"flowGraph": {"nodes": [{"name": "fetch_text_content_from_url", "type": + "python", "source": {"type": "code", "path": "fetch_text_content_from_url.py"}, + "inputs": {"fetch_url": "${inputs.url}"}, "tool": "fetch_text_content_from_url.py", + "reduce": false}, {"name": "prepare_examples", "type": "python", "source": + {"type": "code", "path": "prepare_examples.py"}, "inputs": {}, "tool": "prepare_examples.py", + "reduce": false}, {"name": "classify_with_llm", "type": "llm", "source": {"type": + "code", "path": "classify_with_llm.jinja2"}, "inputs": {"deployment_name": + "gpt-35-turbo", "suffix": "", "max_tokens": "128", "temperature": "0.1", "top_p": + "1.0", "logprobs": "", "echo": "False", "stop": "", "presence_penalty": "0", + "frequency_penalty": "0", "best_of": "1", "logit_bias": "", "url": "${inputs.url}", + "examples": "${prepare_examples.output}", "text_content": "${summarize_text_content.output}"}, + "tool": "classify_with_llm.jinja2", "reduce": false, "api": "chat", "provider": + "AzureOpenAI", "connection": "azure_open_ai_connection", "module": "promptflow.tools.aoai"}, + {"name": "convert_to_dict", "type": "python", "source": {"type": "code", "path": + "convert_to_dict.py"}, "inputs": {"input_str": "${classify_with_llm.output}"}, + "tool": "convert_to_dict.py", "reduce": false}, {"name": "summarize_text_content", + "type": "llm", "source": {"type": "code", "path": "summarize_text_content.jinja2"}, + "inputs": {"deployment_name": "gpt-35-turbo", "suffix": "", "max_tokens": + "128", "temperature": "0.2", "top_p": "1.0", "logprobs": "", "echo": "False", + "stop": "", "presence_penalty": "0", "frequency_penalty": "0", "best_of": + "1", "logit_bias": "", "text": "${fetch_text_content_from_url.output}"}, "tool": + "summarize_text_content.jinja2", "reduce": false, "api": "chat", "provider": + "AzureOpenAI", "connection": "azure_open_ai_connection", "module": "promptflow.tools.aoai"}], + "tools": [{"name": "Azure OpenAI GPT-4 Turbo with Vision", "type": "custom_llm", + "inputs": {"connection": {"type": ["AzureOpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 0}}, "deployment_name": {"type": ["string"], "enabled_by": "connection", "dynamic_list": + {"func_path": "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": + [{"name": "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 5}}, "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 3}}}, + "description": "Use Azure OpenAI GPT-4 Turbo with Vision to leverage AOAI + vision ability.", "module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", + "function": "chat", "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.3.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Content Safety (Text Analyze)", + "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", + "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": + ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "violence_category": {"type": ["string"], + "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", + "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "description": "Use Azure Content Safety to detect + harmful content.", "module": "promptflow.tools.azure_content_safety", "function": + "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.3.0rc1", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": + {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "deployment_name": + {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], + "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "capabilities": {"completion": false, "chat_completion": false, "embeddings": + true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": true, "is_multi_select": + false, "input_type": "default"}}, "description": "Use Open AI''s embedding + model to create an embedding vector representing the input text.", "module": + "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, + "package": "promptflow-tools", "package_version": "1.3.0rc1", "enable_kwargs": + false, "tool_state": "stable"}, {"name": "Open Model LLM", "type": "custom_llm", + "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "deployment_name": {"type": ["string"], "default": "", "dynamic_list": + {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", "func_kwargs": + [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "input_type": "default", "ui_hints": {"index": 1}}, "endpoint_name": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names"}, + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "max_new_tokens": {"type": ["int"], "default": + 500, "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "ui_hints": {"index": 4}}, "model_kwargs": {"type": ["object"], + "default": "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default", "advanced": true, "ui_hints": {"index": 6}}, "temperature": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "ui_hints": {"index": 3}}, "top_p": {"type": + ["double"], "default": 1.0, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default", "advanced": true, "ui_hints": {"index": 5}}}, + "description": "Use an open model from the Azure Model catalog, deployed to + an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "function": + "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.3.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", + "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 0}}, "frequency_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 7}}, "max_tokens": {"type": ["int"], "default": 512, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 4}}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], + "allow_manual_entry": true, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 1}}, "presence_penalty": {"type": ["double"], "default": + 0, "allow_manual_entry": false, "is_multi_select": false, "input_type": "default", + "ui_hints": {"index": 6}}, "stop": {"type": ["list"], "default": "", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 5}}, "temperature": {"type": ["double"], "default": 1, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default", "ui_hints": {"index": + 2}}, "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default", "ui_hints": {"index": 3}}}, + "description": "Use OpenAI GPT-4V to leverage vision ability.", "module": + "promptflow.tools.openai_gpt4v", "class_name": "OpenAI", "function": "chat", + "icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.3.0rc1", + "default_prompt": "# system:\nAs an AI assistant, your task involves interpreting + images and responding to questions about the image.\nRemember to provide accurate + answers based on the information present in the image.\n\n# user:\nCan you + tell me what the image depicts?\n![image]({{image_input}})\n", "enable_kwargs": + false, "tool_state": "preview"}, {"name": "Serp API", "type": "python", "inputs": + {"connection": {"type": ["SerpConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "engine": {"type": ["string"], "default": + "google", "enum": ["google", "bing"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "location": {"type": ["string"], "default": + "", "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "num": {"type": ["int"], "default": "10", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "safe": {"type": + ["string"], "default": "off", "enum": ["active", "off"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Use Serp API to obtain search results from a specific search engine.", "module": + "promptflow.tools.serpapi", "class_name": "SerpAPI", "function": "search", + "is_builtin": true, "package": "promptflow-tools", "package_version": "1.3.0rc1", + "enable_kwargs": false, "tool_state": "stable"}, {"name": "Index Lookup", + "type": "python", "inputs": {"acs_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_embedding_field": {"type": ["string"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "acs_index_connection": {"type": ["CognitiveSearchConnection"], + "enabled_by": "index_type", "enabled_by_value": ["Azure AI Search"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "acs_index_name": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "acs_metadata_field": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Azure AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "input_type": "uionly_hidden"}, "aoai_embedding_connection": {"type": + ["AzureOpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["Azure OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "embedding_deployment": {"type": ["string"], "enabled_by": + "embedding_type", "enabled_by_value": ["Azure OpenAI"], "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "embedding_model": {"type": ["string"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI", "Hugging Face"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "embedding_type": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search", "FAISS", "Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "faiss_index_path": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["FAISS"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "index_type": {"type": + ["string"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_asset_id": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Registered Index"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "mlindex_content": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": + false, "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default"}, "mlindex_path": {"type": ["string"], "enabled_by": "index_type", + "enabled_by_value": ["MLIndex file from path"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "oai_embedding_connection": + {"type": ["OpenAIConnection"], "enabled_by": "embedding_type", "enabled_by_value": + ["OpenAI"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "uionly_hidden"}, "pinecone_content_field": {"type": ["string"], "enabled_by": + "index_type", "enabled_by_value": ["Pinecone"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_index_connection": + {"type": ["PineconeConnection"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections"}, + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "pinecone_index_name": {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": + ["Pinecone"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "uionly_hidden"}, "pinecone_metadata_field": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Pinecone"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "uionly_hidden"}, + "queries": {"type": ["object"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "query_type": {"type": ["string"], "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "semantic_configuration": + {"type": ["string"], "enabled_by": "index_type", "enabled_by_value": ["Azure + AI Search"], "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "input_type": "uionly_hidden"}, "top_k": {"type": ["int"], "default": 3, "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search an AzureML Vector Index for relevant results using one or more text + queries.", "module": "promptflow_vectordb.tool.common_index_lookup", "function": + "search", "is_builtin": true, "package": "promptflow_vectordb", "package_version": + "0.2.4", "enable_kwargs": false, "tool_state": "preview"}, {"name": "Faiss + Index Lookup", "type": "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": + ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "vector": {"type": ["list"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "description": + "Search vector based query from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", + "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector DB Lookup", "type": "python", + "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": + ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": + ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "search_params": {"type": + ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", + "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": + ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": + "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}}, "description": "Search + vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "Vector Index Lookup", "type": + "python", "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, + "is_multi_select": false, "input_type": "default"}, "query": {"type": ["object"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, + "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": + false, "input_type": "default"}}, "description": "Search text or vector based + query from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", + "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, + "package": "promptflow_vectordb", "package_version": "0.2.4", "enable_kwargs": + false, "tool_state": "deprecated"}, {"name": "classify_with_llm.jinja2", "type": + "prompt", "inputs": {"examples": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}, "text_content": + {"type": ["string"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}, "url": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "source": "classify_with_llm.jinja2", + "is_builtin": false, "enable_kwargs": false, "tool_state": "stable"}, {"name": + "convert_to_dict.py", "type": "python", "inputs": {"input_str": {"type": ["string"], + "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}}, + "source": "convert_to_dict.py", "function": "convert_to_dict", "is_builtin": + false, "enable_kwargs": false, "tool_state": "stable"}, {"name": "fetch_text_content_from_url.py", + "type": "python", "inputs": {"fetch_url": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "source": "fetch_text_content_from_url.py", + "function": "fetch_text_content_from_url", "is_builtin": false, "enable_kwargs": + false, "tool_state": "stable"}, {"name": "prepare_examples.py", "type": "python", + "source": "prepare_examples.py", "function": "prepare_examples", "is_builtin": + false, "enable_kwargs": false, "tool_state": "stable"}, {"name": "summarize_text_content.jinja2", + "type": "prompt", "inputs": {"text": {"type": ["string"], "allow_manual_entry": + false, "is_multi_select": false, "input_type": "default"}}, "source": "summarize_text_content.jinja2", + "is_builtin": false, "enable_kwargs": false, "tool_state": "stable"}, {"name": + "summarize_text_content__variant_1.jinja2", "type": "prompt", "inputs": {"text": + {"type": ["string"], "allow_manual_entry": false, "is_multi_select": false, + "input_type": "default"}}, "source": "summarize_text_content__variant_1.jinja2", + "is_builtin": false, "enable_kwargs": false, "tool_state": "stable"}], "inputs": + {"url": {"type": "string", "default": "https://www.microsoft.com/en-us/d/xbox-wireless-controller-stellar-shift-special-edition/94fbjc7h0h6h", + "is_chat_input": false}}, "outputs": {"category": {"type": "string", "reference": + "${convert_to_dict.output.category}", "evaluation_only": false, "is_chat_output": + false}, "evidence": {"type": "string", "reference": "${convert_to_dict.output.evidence}", + "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": + "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", "flowRunId": + "name", "flowRunDisplayName": "resume_from_run_using_automatic_runtime", "batchDataInput": + {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl"}, + "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", + "inputsMapping": {"url": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", + "childRunBasePath": "promptflow/PromptFlowArtifacts/name/name/flow_artifacts", + "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "49bba768-6848-48a7-bb40-fb7a9f4e0aec", + "sessionId": "name", "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' + headers: + connection: + - keep-alive + content-length: + - '30355' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.249' + status: + code: 200 + message: OK +- request: + body: '{"runId": "resume_from_run_using_automatic_runtime", "selectRunMetadata": + true, "selectRunDefinition": true, "selectJobSpecification": true}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '140' + Content-Type: + - application/json + User-Agent: + - python-requests/2.31.0 + method: POST + uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata + response: + body: + string: '{"runMetadata": {"runNumber": 1709696102, "rootRunId": "resume_from_run_using_automatic_runtime", + "createdUtc": "2024-03-06T03:35:02.2728072+00:00", "createdBy": {"userObjectId": + "4e60fbf3-0338-41a8-bed5-fc341be556f8", "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", + "userWIds": null, "upn": null}, "userId": "4e60fbf3-0338-41a8-bed5-fc341be556f8", + "token": null, "tokenExpiryTimeUtc": null, "error": null, "warnings": null, + "revision": 6, "statusRevision": 3, "runUuid": "60c681e3-a7a8-4fa1-86de-c8ee18dbcb4b", + "parentRunUuid": null, "rootRunUuid": "60c681e3-a7a8-4fa1-86de-c8ee18dbcb4b", + "lastStartTimeUtc": null, "currentComputeTime": null, "computeDuration": "00:00:14.6727470", + "effectiveStartTimeUtc": null, "lastModifiedBy": {"userObjectId": "4e60fbf3-0338-41a8-bed5-fc341be556f8", + "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", + "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "18a66f5f-dbdf-4c17-9dd7-1634712a9cbe", + "userWIds": null, "upn": null}, "lastModifiedUtc": "2024-03-06T03:39:51.1066163+00:00", + "duration": "00:00:14.6727470", "cancelationReason": null, "currentAttemptId": + 1, "runId": "resume_from_run_using_automatic_runtime", "parentRunId": null, + "experimentId": "d30efbeb-f81d-4cfa-b5cc-a0570a049009", "status": "Completed", + "startTimeUtc": "2024-03-06T03:39:37.5807056+00:00", "endTimeUtc": "2024-03-06T03:39:52.2534526+00:00", + "scheduleId": null, "displayName": "resume_from_run_using_automatic_runtime", + "name": null, "dataContainerId": "dcid.resume_from_run_using_automatic_runtime", + "description": null, "hidden": false, "runType": "azureml.promptflow.FlowRun", + "runTypeV2": {"orchestrator": null, "traits": [], "attribution": "PromptFlow", + "computeType": null}, "properties": {"azureml.promptflow.runtime_name": "automatic", + "azureml.promptflow.runtime_version": "20240228.v3", "azureml.promptflow.definition_file_name": + "flow.dag.yaml", "azureml.promptflow.flow_lineage_id": "af1a6951de9be2ce13d3b58b23dbd8b6a0cd8fd4918ad9cb22b28fb8395fbcb0", + "azureml.promptflow.node_variant": "${summarize_text_content.variant_0}", + "azureml.promptflow.flow_definition_datastore_name": "workspaceblobstore", + "azureml.promptflow.flow_definition_blob_path": "LocalUpload/f00d5b9fd9b76194d14699c90d355cef/web_classification/flow.dag.yaml", + "azureml.promptflow.input_data": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl", + "azureml.promptflow.inputs_mapping": "{\"url\":\"${data.url}\"}", "_azureml.evaluation_run": + "promptflow.BatchRun", "azureml.promptflow.session_id": "efc1ebeee00db455c850ec7afec33a45b7106c97c7d48684", + "azureml.promptflow.snapshot_id": "49bba768-6848-48a7-bb40-fb7a9f4e0aec", + "azureml.promptflow.total_tokens": "821", "_azureml.evaluate_artifacts": "[{\"path\": + \"instance_results.jsonl\", \"type\": \"table\"}]"}, "parameters": {}, "actionUris": + {}, "scriptName": null, "target": null, "uniqueChildRunComputeTargets": [], + "tags": {}, "settings": {}, "services": {}, "inputDatasets": [], "outputDatasets": + [], "runDefinition": null, "jobSpecification": null, "primaryMetricName": + null, "createdFrom": null, "cancelUri": null, "completeUri": null, "diagnosticsUri": + null, "computeRequest": null, "compute": null, "retainForLifetimeOfWorkspace": + false, "queueingInfo": null, "inputs": null, "outputs": {"debug_info": {"assetId": + "azureml://locations/eastus/workspaces/00000/data/azureml_resume_from_run_using_automatic_runtime_output_data_debug_info/versions/1", + "type": "UriFolder"}, "flow_outputs": {"assetId": "azureml://locations/eastus/workspaces/00000/data/azureml_resume_from_run_using_automatic_runtime_output_data_flow_outputs/versions/1", + "type": "UriFolder"}}}, "runDefinition": null, "jobSpecification": null, "systemSettings": + null}' + headers: + connection: + - keep-alive + content-length: + - '4786' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.035' + status: + code: 200 + message: OK +- request: + body: '{"runId": "name", "selectRunMetadata": true, "selectRunDefinition": true, + "selectJobSpecification": true}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '137' + Content-Type: + - application/json + User-Agent: + - python-requests/2.31.0 + method: POST + uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata + response: + body: + string: '{"runMetadata": {"runNumber": 1711525896, "rootRunId": "name", "createdUtc": + "2024-03-27T07:51:36.2157958+00:00", "createdBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", + "userPuId": "10032000A251B112", "userIdp": null, "userAltSecId": null, "userIss": + "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", "userTenantId": + "00000000-0000-0000-0000-000000000000", "userName": "Brynn Yin", "userWIds": + null, "upn": null}, "userId": "00000000-0000-0000-0000-000000000000", "token": + null, "tokenExpiryTimeUtc": null, "error": null, "warnings": null, "revision": + 1, "statusRevision": 0, "runUuid": "b0147294-ad45-4715-a3e1-f6e8913d5481", + "parentRunUuid": null, "rootRunUuid": "b0147294-ad45-4715-a3e1-f6e8913d5481", + "lastStartTimeUtc": null, "currentComputeTime": "00:00:00", "computeDuration": + null, "effectiveStartTimeUtc": null, "lastModifiedBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", + "userPuId": "10032000A251B112", "userIdp": null, "userAltSecId": null, "userIss": + "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", "userTenantId": + "00000000-0000-0000-0000-000000000000", "userName": "Brynn Yin", "userWIds": + null, "upn": null}, "lastModifiedUtc": "2024-03-27T07:51:36.2157958+00:00", + "duration": null, "cancelationReason": null, "currentAttemptId": 1, "runId": + "name", "parentRunId": null, "experimentId": "d30efbeb-f81d-4cfa-b5cc-a0570a049009", + "status": "NotStarted", "startTimeUtc": null, "endTimeUtc": null, "scheduleId": + null, "displayName": "resume_from_run_using_automatic_runtime", "name": null, + "dataContainerId": "dcid.name", "description": null, "hidden": false, "runType": + "azureml.promptflow.FlowRun", "runTypeV2": {"orchestrator": null, "traits": + [], "attribution": "PromptFlow", "computeType": null}, "properties": {"azureml.promptflow.runtime_name": + "automatic", "azureml.promptflow.runtime_version": "20240319.v1", "azureml.promptflow.definition_file_name": + "flow.dag.yaml", "azureml.promptflow.flow_lineage_id": "af1a6951de9be2ce13d3b58b23dbd8b6a0cd8fd4918ad9cb22b28fb8395fbcb0", + "azureml.promptflow.node_variant": "${summarize_text_content.variant_0}", + "azureml.promptflow.flow_definition_datastore_name": "workspaceblobstore", + "azureml.promptflow.flow_definition_blob_path": "LocalUpload/f00d5b9fd9b76194d14699c90d355cef/web_classification/flow.dag.yaml", + "azureml.promptflow.input_data": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl", + "azureml.promptflow.inputs_mapping": "{\"url\":\"${data.url}\"}", "azureml.promptflow.session_id": + "name", "azureml.promptflow.snapshot_id": "49bba768-6848-48a7-bb40-fb7a9f4e0aec", + "azureml.promptflow.resume_from_run_id": "resume_from_run_using_automatic_runtime", + "_azureml.evaluation_run": "promptflow.BatchRun"}, "parameters": {}, "actionUris": + {}, "scriptName": null, "target": null, "uniqueChildRunComputeTargets": [], + "tags": {}, "settings": {}, "services": {}, "inputDatasets": [], "outputDatasets": + [], "runDefinition": null, "jobSpecification": null, "primaryMetricName": + null, "createdFrom": null, "cancelUri": null, "completeUri": null, "diagnosticsUri": + null, "computeRequest": null, "compute": null, "retainForLifetimeOfWorkspace": + false, "queueingInfo": null, "inputs": null, "outputs": null}, "runDefinition": + {"Nodes": [{"Name": "fetch_text_content_from_url", "Type": "python", "Source": + {"Type": "code", "Tool": null, "Path": "fetch_text_content_from_url.py"}, + "Inputs": {"fetch_url": "${inputs.url}"}, "Tool": "fetch_text_content_from_url.py", + "Reduce": false, "Activate": null, "Comment": null, "Api": null, "Provider": + null, "Connection": null, "Module": null}, {"Name": "prepare_examples", "Type": + "python", "Source": {"Type": "code", "Tool": null, "Path": "prepare_examples.py"}, + "Inputs": {}, "Tool": "prepare_examples.py", "Reduce": false, "Activate": + null, "Comment": null, "Api": null, "Provider": null, "Connection": null, + "Module": null}, {"Name": "classify_with_llm", "Type": "llm", "Source": {"Type": + "code", "Tool": null, "Path": "classify_with_llm.jinja2"}, "Inputs": {"deployment_name": + "gpt-35-turbo", "suffix": "", "max_tokens": "128", "temperature": "0.1", "top_p": + "1.0", "logprobs": "", "echo": "False", "stop": "", "presence_penalty": "0", + "frequency_penalty": "0", "best_of": "1", "logit_bias": "", "url": "${inputs.url}", + "examples": "${prepare_examples.output}", "text_content": "${summarize_text_content.output}"}, + "Tool": "classify_with_llm.jinja2", "Reduce": false, "Activate": null, "Comment": + null, "Api": "chat", "Provider": "AzureOpenAI", "Connection": "azure_open_ai_connection", + "Module": "promptflow.tools.aoai"}, {"Name": "convert_to_dict", "Type": "python", + "Source": {"Type": "code", "Tool": null, "Path": "convert_to_dict.py"}, "Inputs": + {"input_str": "${classify_with_llm.output}"}, "Tool": "convert_to_dict.py", + "Reduce": false, "Activate": null, "Comment": null, "Api": null, "Provider": + null, "Connection": null, "Module": null}, {"Name": "summarize_text_content", + "Type": "llm", "Source": {"Type": "code", "Tool": null, "Path": "summarize_text_content.jinja2"}, + "Inputs": {"deployment_name": "gpt-35-turbo", "suffix": "", "max_tokens": + "128", "temperature": "0.2", "top_p": "1.0", "logprobs": "", "echo": "False", + "stop": "", "presence_penalty": "0", "frequency_penalty": "0", "best_of": + "1", "logit_bias": "", "text": "${fetch_text_content_from_url.output}"}, "Tool": + "summarize_text_content.jinja2", "Reduce": false, "Activate": null, "Comment": + null, "Api": "chat", "Provider": "AzureOpenAI", "Connection": "azure_open_ai_connection", + "Module": "promptflow.tools.aoai"}], "Tools": [{"Name": "Azure OpenAI GPT-4 + Turbo with Vision", "Type": "custom_llm", "Inputs": {"connection": {"Name": + null, "Type": ["AzureOpenAIConnection"], "Default": null, "Description": null, + "Enum": null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": {"index": 0}, "filter_by": null}, "deployment_name": + {"Name": null, "Type": ["string"], "Default": null, "Description": null, "Enum": + null, "enabled_by": "connection", "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": {"func_path": + "promptflow.tools.aoai_gpt4v.list_deployment_names", "func_kwargs": [{"name": + "connection", "reference": "${inputs.connection}", "type": ["AzureOpenAIConnection"]}]}, + "allow_manual_entry": true, "is_multi_select": false, "generated_by": null, + "input_type": "default", "advanced": null, "ui_hints": {"index": 1}, "filter_by": + null}, "frequency_penalty": {"Name": null, "Type": ["double"], "Default": + 0, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 7}, "filter_by": null}, "max_tokens": {"Name": null, "Type": ["int"], + "Default": 512, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 4}, "filter_by": null}, "presence_penalty": {"Name": null, "Type": + ["double"], "Default": 0, "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 6}, "filter_by": null}, "stop": {"Name": null, "Type": ["list"], + "Default": "", "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 5}, "filter_by": null}, "temperature": {"Name": null, "Type": ["double"], + "Default": 1, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 2}, "filter_by": null}, "top_p": {"Name": null, "Type": ["double"], + "Default": 1, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 3}, "filter_by": null}}, "Outputs": null, "Description": "Use Azure + OpenAI GPT-4 Turbo with Vision to leverage AOAI vision ability.", "connection_type": + null, "Module": "promptflow.tools.aoai_gpt4v", "class_name": "AzureOpenAI", + "Source": null, "LkgCode": null, "Code": null, "Function": "chat", "action_type": + null, "provider_config": null, "function_config": null, "Icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "Category": null, "Tags": null, "is_builtin": true, "package": "promptflow-tools", + "package_version": "1.3.0rc1", "default_prompt": "# system:\nAs an AI assistant, + your task involves interpreting images and responding to questions about the + image.\nRemember to provide accurate answers based on the information present + in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", + "enable_kwargs": false, "deprecated_tools": null, "tool_state": "preview", + "groups": null}, {"Name": "Content Safety (Text Analyze)", "Type": "python", + "Inputs": {"connection": {"Name": null, "Type": ["AzureContentSafetyConnection"], + "Default": null, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "hate_category": {"Name": null, "Type": ["string"], + "Default": "medium_sensitivity", "Description": null, "Enum": ["disable", + "low_sensitivity", "medium_sensitivity", "high_sensitivity"], "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "self_harm_category": {"Name": null, "Type": ["string"], + "Default": "medium_sensitivity", "Description": null, "Enum": ["disable", + "low_sensitivity", "medium_sensitivity", "high_sensitivity"], "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "sexual_category": {"Name": null, "Type": ["string"], + "Default": "medium_sensitivity", "Description": null, "Enum": ["disable", + "low_sensitivity", "medium_sensitivity", "high_sensitivity"], "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "text": {"Name": null, "Type": ["string"], "Default": + null, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "violence_category": {"Name": null, "Type": ["string"], + "Default": "medium_sensitivity", "Description": null, "Enum": ["disable", + "low_sensitivity", "medium_sensitivity", "high_sensitivity"], "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}}, "Outputs": null, "Description": "Use Azure Content + Safety to detect harmful content.", "connection_type": null, "Module": "promptflow.tools.azure_content_safety", + "class_name": null, "Source": null, "LkgCode": null, "Code": null, "Function": + "analyze_text", "action_type": null, "provider_config": null, "function_config": + null, "Icon": null, "Category": null, "Tags": null, "is_builtin": true, "package": + "promptflow-tools", "package_version": "1.3.0rc1", "default_prompt": null, + "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], + "tool_state": "stable", "groups": null}, {"Name": "Embedding", "Type": "python", + "Inputs": {"connection": {"Name": null, "Type": ["AzureOpenAIConnection", + "OpenAIConnection"], "Default": null, "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "deployment_name": {"Name": null, "Type": ["string"], + "Default": null, "Description": null, "Enum": null, "enabled_by": "connection", + "enabled_by_type": ["AzureOpenAIConnection"], "enabled_by_value": null, "model_list": + ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], + "Capabilities": {"completion": false, "chat_completion": false, "embeddings": + true, "Include": null, "Exclude": null}, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "input": {"Name": + null, "Type": ["string"], "Default": null, "Description": null, "Enum": null, + "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, + "is_multi_select": false, "generated_by": null, "input_type": "default", "advanced": + null, "ui_hints": null, "filter_by": null}, "model": {"Name": null, "Type": + ["string"], "Default": null, "Description": null, "Enum": ["text-embedding-ada-002", + "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", + "enabled_by_type": ["OpenAIConnection"], "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": true, + "is_multi_select": false, "generated_by": null, "input_type": "default", "advanced": + null, "ui_hints": null, "filter_by": null}}, "Outputs": null, "Description": + "Use Open AI''s embedding model to create an embedding vector representing + the input text.", "connection_type": null, "Module": "promptflow.tools.embedding", + "class_name": null, "Source": null, "LkgCode": null, "Code": null, "Function": + "embedding", "action_type": null, "provider_config": null, "function_config": + null, "Icon": null, "Category": null, "Tags": null, "is_builtin": true, "package": + "promptflow-tools", "package_version": "1.3.0rc1", "default_prompt": null, + "enable_kwargs": false, "deprecated_tools": null, "tool_state": "stable", + "groups": null}, {"Name": "Open Model LLM", "Type": "custom_llm", "Inputs": + {"api": {"Name": null, "Type": ["string"], "Default": null, "Description": + null, "Enum": ["chat", "completion"], "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 2}, "filter_by": null}, "deployment_name": {"Name": null, "Type": + ["string"], "Default": "", "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_deployment_names", + "func_kwargs": [{"name": "endpoint", "optional": true, "reference": "${inputs.endpoint}", + "type": ["string"]}]}, "allow_manual_entry": true, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 1}, "filter_by": null}, "endpoint_name": {"Name": null, "Type": + ["string"], "Default": null, "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": {"func_path": "promptflow.tools.open_model_llm.list_endpoint_names", + "func_kwargs": null}, "allow_manual_entry": true, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 0}, "filter_by": null}, "max_new_tokens": {"Name": null, "Type": + ["int"], "Default": 500, "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 4}, "filter_by": null}, "model_kwargs": {"Name": null, "Type": ["object"], + "Default": "{}", "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": true, "ui_hints": + {"index": 6}, "filter_by": null}, "temperature": {"Name": null, "Type": ["double"], + "Default": 1.0, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 3}, "filter_by": null}, "top_p": {"Name": null, "Type": ["double"], + "Default": 1.0, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": true, "ui_hints": + {"index": 5}, "filter_by": null}}, "Outputs": null, "Description": "Use an + open model from the Azure Model catalog, deployed to an AzureML Online Endpoint + for LLM Chat or Completion API calls.", "connection_type": null, "Module": + "promptflow.tools.open_model_llm", "class_name": "OpenModelLLM", "Source": + null, "LkgCode": null, "Code": null, "Function": "call", "action_type": null, + "provider_config": null, "function_config": null, "Icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", + "Category": null, "Tags": null, "is_builtin": true, "package": "promptflow-tools", + "package_version": "1.3.0rc1", "default_prompt": null, "enable_kwargs": false, + "deprecated_tools": null, "tool_state": "stable", "groups": null}, {"Name": + "OpenAI GPT-4V", "Type": "custom_llm", "Inputs": {"connection": {"Name": null, + "Type": ["OpenAIConnection"], "Default": null, "Description": null, "Enum": + null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, + "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": {"index": 0}, "filter_by": null}, "frequency_penalty": + {"Name": null, "Type": ["double"], "Default": 0, "Description": null, "Enum": + null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, + "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": {"index": 7}, "filter_by": null}, "max_tokens": + {"Name": null, "Type": ["int"], "Default": 512, "Description": null, "Enum": + null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, + "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": {"index": 4}, "filter_by": null}, "model": {"Name": + null, "Type": ["string"], "Default": null, "Description": null, "Enum": ["gpt-4-vision-preview"], + "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": true, + "is_multi_select": false, "generated_by": null, "input_type": "default", "advanced": + null, "ui_hints": {"index": 1}, "filter_by": null}, "presence_penalty": {"Name": + null, "Type": ["double"], "Default": 0, "Description": null, "Enum": null, + "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, + "is_multi_select": false, "generated_by": null, "input_type": "default", "advanced": + null, "ui_hints": {"index": 6}, "filter_by": null}, "stop": {"Name": null, + "Type": ["list"], "Default": "", "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 5}, "filter_by": null}, "temperature": {"Name": null, "Type": ["double"], + "Default": 1, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 2}, "filter_by": null}, "top_p": {"Name": null, "Type": ["double"], + "Default": 1, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + {"index": 3}, "filter_by": null}}, "Outputs": null, "Description": "Use OpenAI + GPT-4V to leverage vision ability.", "connection_type": null, "Module": "promptflow.tools.openai_gpt4v", + "class_name": "OpenAI", "Source": null, "LkgCode": null, "Code": null, "Function": + "chat", "action_type": null, "provider_config": null, "function_config": null, + "Icon": {"dark": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA2ElEQVR4nJXSzW3CQBAF4DUSTjk+Al1AD0ikESslpBIEheRALhEpgAYSWV8OGUublf/yLuP3PPNmdndS+gdwXZrYDmh7fGE/W+wXbaYd8IYm4rxJPnZ0boI3wZcdJxs/n+AwV7DFK7aFyfQdYIMLPvES8YJNf5yp4jMeeEYdWh38gXOR35YGHe5xabvQdsHv6PLi8qV6gycc8YH3iMfQu6Lh4ASr+F5Hh3XwVWnQYzUkVlX1nccplAb1SN6Y/sfgmlK64VS8wimldIv/0yj2QLkHizG0iWP4AVAfQ34DVQONAAAAAElFTkSuQmCC", + "light": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAx0lEQVR4nJWSwQ2CQBBFX0jAcjgqXUgPJNiIsQQrIVCIFy8GC6ABDcGDX7Mus9n1Xz7zZ+fPsLPwH4bUg0dD2wMPcbR48Uxq4AKU4iSTDwZ1LhWXipN/B3V0J6hjBTvgLHZNonewBXrgDpzEvXSIjN0BE3AACmmF4kl5F6tNzcCoLpW0SvGovFvsb4oZ2AANcAOu4ka6axCcINN3rg654sww+CYsPD0OwjcozFNh/Qcd78tqVbCIW+n+Fky472Bh/Q6SYb1EEy8tDzd+9IsVPAAAAABJRU5ErkJggg=="}, + "Category": null, "Tags": null, "is_builtin": true, "package": "promptflow-tools", + "package_version": "1.3.0rc1", "default_prompt": "# system:\nAs an AI assistant, + your task involves interpreting images and responding to questions about the + image.\nRemember to provide accurate answers based on the information present + in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", + "enable_kwargs": false, "deprecated_tools": null, "tool_state": "preview", + "groups": null}, {"Name": "Serp API", "Type": "python", "Inputs": {"connection": + {"Name": null, "Type": ["SerpConnection"], "Default": null, "Description": + null, "Enum": null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "engine": {"Name": + null, "Type": ["string"], "Default": "google", "Description": null, "Enum": + ["google", "bing"], "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "location": {"Name": + null, "Type": ["string"], "Default": "", "Description": null, "Enum": null, + "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, + "is_multi_select": false, "generated_by": null, "input_type": "default", "advanced": + null, "ui_hints": null, "filter_by": null}, "num": {"Name": null, "Type": + ["int"], "Default": "10", "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "query": {"Name": null, "Type": ["string"], "Default": + null, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "safe": {"Name": null, "Type": ["string"], "Default": + "off", "Description": null, "Enum": ["active", "off"], "enabled_by": null, + "enabled_by_type": null, "enabled_by_value": null, "model_list": null, "Capabilities": + null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}}, "Outputs": null, "Description": "Use Serp API to + obtain search results from a specific search engine.", "connection_type": + null, "Module": "promptflow.tools.serpapi", "class_name": "SerpAPI", "Source": + null, "LkgCode": null, "Code": null, "Function": "search", "action_type": + null, "provider_config": null, "function_config": null, "Icon": null, "Category": + null, "Tags": null, "is_builtin": true, "package": "promptflow-tools", "package_version": + "1.3.0rc1", "default_prompt": null, "enable_kwargs": false, "deprecated_tools": + null, "tool_state": "stable", "groups": null}, {"Name": "Index Lookup", "Type": + "python", "Inputs": {"acs_content_field": {"Name": null, "Type": ["string"], + "Default": null, "Description": null, "Enum": null, "enabled_by": "index_type", + "enabled_by_type": null, "enabled_by_value": ["Azure AI Search"], "model_list": + null, "Capabilities": null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "uionly_hidden", "advanced": null, + "ui_hints": null, "filter_by": null}, "acs_embedding_field": {"Name": null, + "Type": ["string"], "Default": null, "Description": null, "Enum": null, "enabled_by": + "index_type", "enabled_by_type": null, "enabled_by_value": ["Azure AI Search"], + "model_list": null, "Capabilities": null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Collection(Edm.Single)", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "uionly_hidden", "advanced": null, + "ui_hints": null, "filter_by": null}, "acs_index_connection": {"Name": null, + "Type": ["CognitiveSearchConnection"], "Default": null, "Description": null, + "Enum": null, "enabled_by": "index_type", "enabled_by_type": null, "enabled_by_value": + ["Azure AI Search"], "model_list": null, "Capabilities": null, "dynamic_list": + null, "allow_manual_entry": false, "is_multi_select": false, "generated_by": + null, "input_type": "uionly_hidden", "advanced": null, "ui_hints": null, "filter_by": + null}, "acs_index_name": {"Name": null, "Type": ["string"], "Default": null, + "Description": null, "Enum": null, "enabled_by": "index_type", "enabled_by_type": + null, "enabled_by_value": ["Azure AI Search"], "model_list": null, "Capabilities": + null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_indices", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "generated_by": null, + "input_type": "uionly_hidden", "advanced": null, "ui_hints": null, "filter_by": + null}, "acs_metadata_field": {"Name": null, "Type": ["string"], "Default": + null, "Description": null, "Enum": null, "enabled_by": "index_type", "enabled_by_type": + null, "enabled_by_value": ["Azure AI Search"], "model_list": null, "Capabilities": + null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_fields", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}, {"default": "Edm.String", "name": "field_data_type", + "optional": false, "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "uionly_hidden", "advanced": null, + "ui_hints": null, "filter_by": null}, "aoai_embedding_connection": {"Name": + null, "Type": ["AzureOpenAIConnection"], "Default": null, "Description": null, + "Enum": null, "enabled_by": "embedding_type", "enabled_by_type": null, "enabled_by_value": + ["Azure OpenAI"], "model_list": null, "Capabilities": null, "dynamic_list": + null, "allow_manual_entry": false, "is_multi_select": false, "generated_by": + null, "input_type": "uionly_hidden", "advanced": null, "ui_hints": null, "filter_by": + null}, "embedding_deployment": {"Name": null, "Type": ["string"], "Default": + null, "Description": null, "Enum": null, "enabled_by": "embedding_type", "enabled_by_type": + null, "enabled_by_value": ["Azure OpenAI"], "model_list": null, "Capabilities": + null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_aoai_embedding_deployments", + "func_kwargs": [{"name": "aoai_connection", "optional": false, "reference": + "${inputs.aoai_embedding_connection}", "type": ["AzurOpenAIConnection"]}]}, + "allow_manual_entry": false, "is_multi_select": false, "generated_by": null, + "input_type": "uionly_hidden", "advanced": null, "ui_hints": null, "filter_by": + null}, "embedding_model": {"Name": null, "Type": ["string"], "Default": null, + "Description": null, "Enum": null, "enabled_by": "embedding_type", "enabled_by_type": + null, "enabled_by_value": ["OpenAI", "Hugging Face"], "model_list": null, + "Capabilities": null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_embedding_models", + "func_kwargs": [{"name": "embedding_type", "optional": false, "reference": + "${inputs.embedding_type}", "type": ["string"]}]}, "allow_manual_entry": false, + "is_multi_select": false, "generated_by": null, "input_type": "uionly_hidden", + "advanced": null, "ui_hints": null, "filter_by": null}, "embedding_type": + {"Name": null, "Type": ["string"], "Default": null, "Description": null, "Enum": + null, "enabled_by": "index_type", "enabled_by_type": null, "enabled_by_value": + ["Azure AI Search", "FAISS", "Pinecone"], "model_list": null, "Capabilities": + null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_embedding_types", + "func_kwargs": [{"name": "index_type", "optional": false, "reference": "${inputs.index_type}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "uionly_hidden", "advanced": null, "ui_hints": + null, "filter_by": null}, "faiss_index_path": {"Name": null, "Type": ["string"], + "Default": null, "Description": null, "Enum": null, "enabled_by": "index_type", + "enabled_by_type": null, "enabled_by_value": ["FAISS"], "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "uionly_hidden", "advanced": null, + "ui_hints": null, "filter_by": null}, "index_type": {"Name": null, "Type": + ["string"], "Default": null, "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_index_types", + "func_kwargs": null}, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "uionly_hidden", "advanced": null, "ui_hints": + null, "filter_by": null}, "mlindex_asset_id": {"Name": null, "Type": ["string"], + "Default": null, "Description": null, "Enum": null, "enabled_by": "index_type", + "enabled_by_type": null, "enabled_by_value": ["Registered Index"], "model_list": + null, "Capabilities": null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_registered_mlindices", + "func_kwargs": null}, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "uionly_hidden", "advanced": null, "ui_hints": + null, "filter_by": null}, "mlindex_content": {"Name": null, "Type": ["string"], + "Default": null, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.forward_mapping", + "func_kwargs": [{"name": "index_type", "reference": "${inputs.index_type}", + "type": ["string"]}, {"name": "mlindex_asset_id", "optional": true, "reference": + "${inputs.mlindex_asset_id}", "type": ["string"]}, {"name": "mlindex_path", + "optional": true, "reference": "${inputs.mlindex_path}", "type": ["string"]}, + {"name": "acs_index_connection", "optional": true, "reference": "${inputs.acs_index_connection}", + "type": ["CognitiveSearchConnection"]}, {"name": "acs_index_name", "optional": + true, "reference": "${inputs.acs_index_name}", "type": ["string"]}, {"name": + "acs_content_field", "optional": true, "reference": "${inputs.acs_content_field}", + "type": ["string"]}, {"name": "acs_embedding_field", "optional": true, "reference": + "${inputs.acs_embedding_field}", "type": ["string"]}, {"name": "acs_metadata_field", + "optional": true, "reference": "${inputs.acs_metadata_field}", "type": ["string"]}, + {"name": "semantic_configuration", "optional": true, "reference": "${inputs.semantic_configuration}", + "type": ["string"]}, {"name": "faiss_index_path", "optional": true, "reference": + "${inputs.faiss_index_path}", "type": ["string"]}, {"name": "pinecone_index_connection", + "optional": true, "reference": "${inputs.pinecone_index_connection}", "type": + ["string"]}, {"name": "pinecone_index_name", "optional": true, "reference": + "${inputs.pinecone_index_name}", "type": ["string"]}, {"name": "pinecone_content_field", + "optional": true, "reference": "${inputs.pinecone_content_field}", "type": + ["string"]}, {"name": "pinecone_metadata_field", "optional": true, "reference": + "${inputs.pinecone_metadata_field}", "type": ["string"]}, {"name": "embedding_type", + "optional": true, "reference": "${inputs.embedding_type}", "type": ["string"]}, + {"name": "aoai_embedding_connection", "optional": true, "reference": "${inputs.aoai_embedding_connection}", + "type": ["AzureOpenAIConnection"]}, {"name": "oai_embedding_connection", "optional": + true, "reference": "${inputs.oai_embedding_connection}", "type": ["string"]}, + {"name": "embedding_model", "optional": true, "reference": "${inputs.embedding_model}", + "type": ["string"]}, {"name": "embedding_deployment", "optional": true, "reference": + "${inputs.embedding_deployment}", "type": ["string"]}], "reverse_func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.reverse_mapping"}, "input_type": + "default", "advanced": null, "ui_hints": null, "filter_by": null}, "mlindex_path": + {"Name": null, "Type": ["string"], "Default": null, "Description": null, "Enum": + null, "enabled_by": "index_type", "enabled_by_type": null, "enabled_by_value": + ["MLIndex file from path"], "model_list": null, "Capabilities": null, "dynamic_list": + null, "allow_manual_entry": false, "is_multi_select": false, "generated_by": + null, "input_type": "uionly_hidden", "advanced": null, "ui_hints": null, "filter_by": + null}, "oai_embedding_connection": {"Name": null, "Type": ["OpenAIConnection"], + "Default": null, "Description": null, "Enum": null, "enabled_by": "embedding_type", + "enabled_by_type": null, "enabled_by_value": ["OpenAI"], "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "uionly_hidden", "advanced": null, + "ui_hints": null, "filter_by": null}, "pinecone_content_field": {"Name": null, + "Type": ["string"], "Default": null, "Description": null, "Enum": null, "enabled_by": + "index_type", "enabled_by_type": null, "enabled_by_value": ["Pinecone"], "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, + "is_multi_select": false, "generated_by": null, "input_type": "uionly_hidden", + "advanced": null, "ui_hints": null, "filter_by": null}, "pinecone_index_connection": + {"Name": null, "Type": ["PineconeConnection"], "Default": null, "Description": + null, "Enum": null, "enabled_by": "index_type", "enabled_by_type": null, "enabled_by_value": + ["Pinecone"], "model_list": null, "Capabilities": null, "dynamic_list": {"func_path": + "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_connections", + "func_kwargs": null}, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "uionly_hidden", "advanced": null, "ui_hints": + null, "filter_by": null}, "pinecone_index_name": {"Name": null, "Type": ["string"], + "Default": null, "Description": null, "Enum": null, "enabled_by": "index_type", + "enabled_by_type": null, "enabled_by_value": ["Pinecone"], "model_list": null, + "Capabilities": null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_pinecone_indices", + "func_kwargs": [{"name": "pinecone_connection_name", "optional": false, "reference": + "${inputs.pinecone_index_connection}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "uionly_hidden", + "advanced": null, "ui_hints": null, "filter_by": null}, "pinecone_metadata_field": + {"Name": null, "Type": ["string"], "Default": null, "Description": null, "Enum": + null, "enabled_by": "index_type", "enabled_by_type": null, "enabled_by_value": + ["Pinecone"], "model_list": null, "Capabilities": null, "dynamic_list": null, + "allow_manual_entry": false, "is_multi_select": false, "generated_by": null, + "input_type": "uionly_hidden", "advanced": null, "ui_hints": null, "filter_by": + null}, "queries": {"Name": null, "Type": ["object"], "Default": null, "Description": + null, "Enum": null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "query_type": {"Name": + null, "Type": ["string"], "Default": null, "Description": null, "Enum": null, + "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_available_query_types", + "func_kwargs": [{"name": "mlindex_content", "optional": false, "reference": + "${inputs.mlindex_content}", "type": ["string"]}]}, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "semantic_configuration": + {"Name": null, "Type": ["string"], "Default": null, "Description": null, "Enum": + null, "enabled_by": "index_type", "enabled_by_type": null, "enabled_by_value": + ["Azure AI Search"], "model_list": null, "Capabilities": null, "dynamic_list": + {"func_path": "promptflow_vectordb.tool.common_index_lookup_utils.list_acs_index_semantic_configurations", + "func_kwargs": [{"name": "acs_connection", "optional": false, "reference": + "${inputs.acs_index_connection}", "type": ["CognitiveSearchConnection"]}, + {"name": "acs_index_name", "optional": false, "reference": "${inputs.acs_index_name}", + "type": ["string"]}]}, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "uionly_hidden", "advanced": null, "ui_hints": + null, "filter_by": null}, "top_k": {"Name": null, "Type": ["int"], "Default": + 3, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}}, "Outputs": null, "Description": "Search an AzureML + Vector Index for relevant results using one or more text queries.", "connection_type": + null, "Module": "promptflow_vectordb.tool.common_index_lookup", "class_name": + null, "Source": null, "LkgCode": null, "Code": null, "Function": "search", + "action_type": null, "provider_config": null, "function_config": null, "Icon": + null, "Category": null, "Tags": null, "is_builtin": true, "package": "promptflow_vectordb", + "package_version": "0.2.4", "default_prompt": null, "enable_kwargs": false, + "deprecated_tools": null, "tool_state": "preview", "groups": null}, {"Name": + "Faiss Index Lookup", "Type": "python", "Inputs": {"path": {"Name": null, + "Type": ["string"], "Default": null, "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "top_k": {"Name": null, "Type": ["int"], "Default": + "3", "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "vector": {"Name": null, "Type": ["list"], "Default": + null, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}}, "Outputs": null, "Description": "Search vector + based query from the FAISS index file.", "connection_type": null, "Module": + "promptflow_vectordb.tool.faiss_index_lookup", "class_name": "FaissIndexLookup", + "Source": null, "LkgCode": null, "Code": null, "Function": "search", "action_type": + null, "provider_config": null, "function_config": null, "Icon": null, "Category": + null, "Tags": null, "is_builtin": true, "package": "promptflow_vectordb", + "package_version": "0.2.4", "default_prompt": null, "enable_kwargs": false, + "deprecated_tools": null, "tool_state": "deprecated", "groups": null}, {"Name": + "Vector DB Lookup", "Type": "python", "Inputs": {"class_name": {"Name": null, + "Type": ["string"], "Default": null, "Description": null, "Enum": null, "enabled_by": + "connection", "enabled_by_type": ["WeaviateConnection"], "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "collection_name": + {"Name": null, "Type": ["string"], "Default": null, "Description": null, "Enum": + null, "enabled_by": "connection", "enabled_by_type": ["QdrantConnection"], + "enabled_by_value": null, "model_list": null, "Capabilities": null, "dynamic_list": + null, "allow_manual_entry": false, "is_multi_select": false, "generated_by": + null, "input_type": "default", "advanced": null, "ui_hints": null, "filter_by": + null}, "connection": {"Name": null, "Type": ["CognitiveSearchConnection", + "QdrantConnection", "WeaviateConnection"], "Default": null, "Description": + null, "Enum": null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "index_name": {"Name": + null, "Type": ["string"], "Default": null, "Description": null, "Enum": null, + "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], + "enabled_by_value": null, "model_list": null, "Capabilities": null, "dynamic_list": + null, "allow_manual_entry": false, "is_multi_select": false, "generated_by": + null, "input_type": "default", "advanced": null, "ui_hints": null, "filter_by": + null}, "search_filters": {"Name": null, "Type": ["object"], "Default": null, + "Description": null, "Enum": null, "enabled_by": "connection", "enabled_by_type": + ["CognitiveSearchConnection", "QdrantConnection"], "enabled_by_value": null, + "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "search_params": {"Name": + null, "Type": ["object"], "Default": null, "Description": null, "Enum": null, + "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", + "QdrantConnection"], "enabled_by_value": null, "model_list": null, "Capabilities": + null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "text_field": {"Name": null, "Type": ["string"], + "Default": null, "Description": null, "Enum": null, "enabled_by": "connection", + "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], + "enabled_by_value": null, "model_list": null, "Capabilities": null, "dynamic_list": + null, "allow_manual_entry": false, "is_multi_select": false, "generated_by": + null, "input_type": "default", "advanced": null, "ui_hints": null, "filter_by": + null}, "top_k": {"Name": null, "Type": ["int"], "Default": "3", "Description": + null, "Enum": null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "vector": {"Name": + null, "Type": ["list"], "Default": null, "Description": null, "Enum": null, + "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, + "is_multi_select": false, "generated_by": null, "input_type": "default", "advanced": + null, "ui_hints": null, "filter_by": null}, "vector_field": {"Name": null, + "Type": ["string"], "Default": null, "Description": null, "Enum": null, "enabled_by": + "connection", "enabled_by_type": ["CognitiveSearchConnection"], "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}}, "Outputs": null, + "Description": "Search vector based query from existing Vector Database.", + "connection_type": null, "Module": "promptflow_vectordb.tool.vector_db_lookup", + "class_name": "VectorDBLookup", "Source": null, "LkgCode": null, "Code": null, + "Function": "search", "action_type": null, "provider_config": null, "function_config": + null, "Icon": null, "Category": null, "Tags": null, "is_builtin": true, "package": + "promptflow_vectordb", "package_version": "0.2.4", "default_prompt": null, + "enable_kwargs": false, "deprecated_tools": null, "tool_state": "deprecated", + "groups": null}, {"Name": "Vector Index Lookup", "Type": "python", "Inputs": + {"path": {"Name": null, "Type": ["string"], "Default": null, "Description": + null, "Enum": null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}, "query": {"Name": + null, "Type": ["object"], "Default": null, "Description": null, "Enum": null, + "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, + "is_multi_select": false, "generated_by": null, "input_type": "default", "advanced": + null, "ui_hints": null, "filter_by": null}, "top_k": {"Name": null, "Type": + ["int"], "Default": "3", "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}}, "Outputs": null, "Description": "Search text or + vector based query from AzureML Vector Index.", "connection_type": null, "Module": + "promptflow_vectordb.tool.vector_index_lookup", "class_name": "VectorIndexLookup", + "Source": null, "LkgCode": null, "Code": null, "Function": "search", "action_type": + null, "provider_config": null, "function_config": null, "Icon": null, "Category": + null, "Tags": null, "is_builtin": true, "package": "promptflow_vectordb", + "package_version": "0.2.4", "default_prompt": null, "enable_kwargs": false, + "deprecated_tools": null, "tool_state": "deprecated", "groups": null}, {"Name": + "classify_with_llm.jinja2", "Type": "prompt", "Inputs": {"examples": {"Name": + null, "Type": ["string"], "Default": null, "Description": null, "Enum": null, + "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, "model_list": + null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, + "is_multi_select": false, "generated_by": null, "input_type": "default", "advanced": + null, "ui_hints": null, "filter_by": null}, "text_content": {"Name": null, + "Type": ["string"], "Default": null, "Description": null, "Enum": null, "enabled_by": + null, "enabled_by_type": null, "enabled_by_value": null, "model_list": null, + "Capabilities": null, "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": + false, "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}, "url": {"Name": null, "Type": ["string"], "Default": + null, "Description": null, "Enum": null, "enabled_by": null, "enabled_by_type": + null, "enabled_by_value": null, "model_list": null, "Capabilities": null, + "dynamic_list": null, "allow_manual_entry": false, "is_multi_select": false, + "generated_by": null, "input_type": "default", "advanced": null, "ui_hints": + null, "filter_by": null}}, "Outputs": null, "Description": null, "connection_type": + null, "Module": null, "class_name": null, "Source": "classify_with_llm.jinja2", + "LkgCode": null, "Code": null, "Function": null, "action_type": null, "provider_config": + null, "function_config": null, "Icon": null, "Category": null, "Tags": null, + "is_builtin": false, "package": null, "package_version": null, "default_prompt": + null, "enable_kwargs": false, "deprecated_tools": null, "tool_state": "stable", + "groups": null}, {"Name": "convert_to_dict.py", "Type": "python", "Inputs": + {"input_str": {"Name": null, "Type": ["string"], "Default": null, "Description": + null, "Enum": null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}}, "Outputs": null, + "Description": null, "connection_type": null, "Module": null, "class_name": + null, "Source": "convert_to_dict.py", "LkgCode": null, "Code": null, "Function": + "convert_to_dict", "action_type": null, "provider_config": null, "function_config": + null, "Icon": null, "Category": null, "Tags": null, "is_builtin": false, "package": + null, "package_version": null, "default_prompt": null, "enable_kwargs": false, + "deprecated_tools": null, "tool_state": "stable", "groups": null}, {"Name": + "fetch_text_content_from_url.py", "Type": "python", "Inputs": {"fetch_url": + {"Name": null, "Type": ["string"], "Default": null, "Description": null, "Enum": + null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, + "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}}, "Outputs": null, + "Description": null, "connection_type": null, "Module": null, "class_name": + null, "Source": "fetch_text_content_from_url.py", "LkgCode": null, "Code": + null, "Function": "fetch_text_content_from_url", "action_type": null, "provider_config": + null, "function_config": null, "Icon": null, "Category": null, "Tags": null, + "is_builtin": false, "package": null, "package_version": null, "default_prompt": + null, "enable_kwargs": false, "deprecated_tools": null, "tool_state": "stable", + "groups": null}, {"Name": "prepare_examples.py", "Type": "python", "Inputs": + null, "Outputs": null, "Description": null, "connection_type": null, "Module": + null, "class_name": null, "Source": "prepare_examples.py", "LkgCode": null, + "Code": null, "Function": "prepare_examples", "action_type": null, "provider_config": + null, "function_config": null, "Icon": null, "Category": null, "Tags": null, + "is_builtin": false, "package": null, "package_version": null, "default_prompt": + null, "enable_kwargs": false, "deprecated_tools": null, "tool_state": "stable", + "groups": null}, {"Name": "summarize_text_content.jinja2", "Type": "prompt", + "Inputs": {"text": {"Name": null, "Type": ["string"], "Default": null, "Description": + null, "Enum": null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": + null, "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}}, "Outputs": null, + "Description": null, "connection_type": null, "Module": null, "class_name": + null, "Source": "summarize_text_content.jinja2", "LkgCode": null, "Code": + null, "Function": null, "action_type": null, "provider_config": null, "function_config": + null, "Icon": null, "Category": null, "Tags": null, "is_builtin": false, "package": + null, "package_version": null, "default_prompt": null, "enable_kwargs": false, + "deprecated_tools": null, "tool_state": "stable", "groups": null}, {"Name": + "summarize_text_content__variant_1.jinja2", "Type": "prompt", "Inputs": {"text": + {"Name": null, "Type": ["string"], "Default": null, "Description": null, "Enum": + null, "enabled_by": null, "enabled_by_type": null, "enabled_by_value": null, + "model_list": null, "Capabilities": null, "dynamic_list": null, "allow_manual_entry": + false, "is_multi_select": false, "generated_by": null, "input_type": "default", + "advanced": null, "ui_hints": null, "filter_by": null}}, "Outputs": null, + "Description": null, "connection_type": null, "Module": null, "class_name": + null, "Source": "summarize_text_content__variant_1.jinja2", "LkgCode": null, + "Code": null, "Function": null, "action_type": null, "provider_config": null, + "function_config": null, "Icon": null, "Category": null, "Tags": null, "is_builtin": + false, "package": null, "package_version": null, "default_prompt": null, "enable_kwargs": + false, "deprecated_tools": null, "tool_state": "stable", "groups": null}], + "Codes": null, "Inputs": {"url": {"name": null, "type": "string", "default": + "https://www.microsoft.com/en-us/d/xbox-wireless-controller-stellar-shift-special-edition/94fbjc7h0h6h", + "description": null, "is_chat_input": false, "is_chat_history": null}}, "Outputs": + {"category": {"name": null, "type": "string", "description": null, "reference": + "${convert_to_dict.output.category}", "evaluation_only": false, "is_chat_output": + false}, "evidence": {"name": null, "type": "string", "description": null, + "reference": "${convert_to_dict.output.evidence}", "evaluation_only": false, + "is_chat_output": false}}}, "jobSpecification": null, "systemSettings": null}' + headers: + connection: + - keep-alive + content-length: + - '97917' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-request-time: + - '0.041' + status: + code: 200 + message: OK +version: 1 diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_submission_exception.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_submission_exception.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_submission_exception.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_submission_exception.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_compute_instance_session.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_compute_instance_session.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_compute_instance_session.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_compute_instance_session.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_compute_instance_session_yml.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_compute_instance_session_yml.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_compute_instance_session_yml.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_compute_instance_session_yml.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_connection_overwrite.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_connection_overwrite.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_connection_overwrite.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_connection_overwrite.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_env_overwrite.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_env_overwrite.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_env_overwrite.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_env_overwrite.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_environment_variables.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_environment_variables.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_environment_variables.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_environment_variables.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_environment_variables_run_yaml.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_environment_variables_run_yaml.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_environment_variables_run_yaml.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_environment_variables_run_yaml.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_remote_data.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_remote_data.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_with_remote_data.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_with_remote_data.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_without_dump.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_without_dump.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_without_dump.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_run_without_dump.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_session_id_with_different_env.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_session_id_with_different_env.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_session_id_with_different_env.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_session_id_with_different_env.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_show_metrics.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_show_metrics.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_show_metrics.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_show_metrics.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_show_run.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_show_run.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_show_run.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_show_run.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_show_run_details.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_show_run_details.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_show_run_details.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_show_run_details.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_stream_failed_run_logs.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_stream_failed_run_logs.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_stream_failed_run_logs.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_stream_failed_run_logs.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_stream_invalid_run_logs.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_stream_invalid_run_logs.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_stream_invalid_run_logs.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_stream_invalid_run_logs.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_stream_run_logs.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_stream_run_logs.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_stream_run_logs.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_stream_run_logs.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_tools_json_ignored.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_tools_json_ignored.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_tools_json_ignored.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_tools_json_ignored.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_update_run.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_update_run.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_update_run.yaml rename to src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_update_run.yaml diff --git a/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_wrong_workspace_type.yaml b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_wrong_workspace_type.yaml new file mode 100644 index 00000000000..e665bad3d43 --- /dev/null +++ b/src/promptflow-recording/recordings/azure/test_run_operations_TestFlowRun_test_wrong_workspace_type.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000", + "name": "00000", "type": "Microsoft.MachineLearningServices/workspaces", "location": + "eastus", "tags": {}, "etag": null, "kind": "Default", "sku": {"name": "Basic", + "tier": "Basic"}, "properties": {"discoveryUrl": "https://eastus.api.azureml.ms/discovery"}}' + headers: + cache-control: + - no-cache + content-length: + - '3630' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.024' + status: + code: 200 + message: OK +version: 1 diff --git a/src/promptflow/tests/test_configs/recordings/test_telemetry_TestTelemetry_test_custom_event.yaml b/src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_custom_event.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_telemetry_TestTelemetry_test_custom_event.yaml rename to src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_custom_event.yaml diff --git a/src/promptflow/tests/test_configs/recordings/test_telemetry_TestTelemetry_test_inner_function_call.yaml b/src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_inner_function_call.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_telemetry_TestTelemetry_test_inner_function_call.yaml rename to src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_inner_function_call.yaml diff --git a/src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_run_yaml_type.yaml b/src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_run_yaml_type.yaml new file mode 100644 index 00000000000..d0fa2a91255 --- /dev/null +++ b/src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_run_yaml_type.yaml @@ -0,0 +1,402 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000", + "name": "00000", "type": "Microsoft.MachineLearningServices/workspaces", "location": + "eastus2euap", "tags": {}, "etag": null, "kind": "Default", "sku": {"name": + "Basic", "tier": "Basic"}, "properties": {"discoveryUrl": "https://eastus.api.azureml.ms/discovery"}}' + headers: + cache-control: + - no-cache + content-length: + - '3649' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.043' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores?count=30&isDefault=true&orderByAsc=false + response: + body: + string: '{"value": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-09-22T05:26:30.7527337+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2024-01-10T09:29:14.5412854+00:00", "lastModifiedBy": "Philip Gao", "lastModifiedByType": + "User"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1345' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.611' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-09-22T05:26:30.7527337+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2024-01-10T09:29:14.5412854+00:00", "lastModifiedBy": "Philip Gao", "lastModifiedByType": + "User"}}' + headers: + cache-control: + - no-cache + content-length: + - '1200' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.062' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets + response: + body: + string: '{"secretsType": "AccountKey", "key": "dGhpcyBpcyBmYWtlIGtleQ=="}' + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.170' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Tue, 12 Mar 2024 07:38:17 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/LocalUpload/000000000000000000000000000000000000/print_input_flow.jsonl + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '56' + content-md5: + - I/k2vLbQ+WkABQncQUd5Rg== + content-type: + - application/octet-stream + last-modified: + - Tue, 26 Dec 2023 03:34:26 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 26 Dec 2023 03:34:26 GMT + x-ms-meta-name: + - 489008dc-84bd-4bee-82db-0bb80f7ad272 + x-ms-meta-upload_status: + - completed + x-ms-meta-version: + - b7185e71-1e33-43b7-b8be-43bdd40e6731 + x-ms-version: + - '2023-11-03' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.19.0 Python/3.9.18 (Windows-10-10.0.22631-SP0) + x-ms-date: + - Tue, 12 Mar 2024 07:38:18 GMT + x-ms-version: + - '2023-11-03' + method: HEAD + uri: https://fake_account_name.blob.core.windows.net/fake-container-name/az-ml-artifacts/000000000000000000000000000000000000/print_input_flow.jsonl + response: + body: + string: '' + headers: + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + vary: + - Origin + x-ms-error-code: + - BlobNotFound + x-ms-version: + - '2023-11-03' + status: + code: 404 + message: The specified blob does not exist. +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore + response: + body: + string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", + "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", + "properties": {"description": null, "tags": null, "properties": null, "isDefault": + true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": + null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": + "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", + "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": + "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, + "systemData": {"createdAt": "2023-09-22T05:26:30.7527337+00:00", "createdBy": + "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": + "2024-01-10T09:29:14.5412854+00:00", "lastModifiedBy": "Philip Gao", "lastModifiedByType": + "User"}}' + headers: + cache-control: + - no-cache + content-length: + - '1200' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.068' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - promptflow-sdk/0.0.1 azure-ai-ml/1.13.0 azsdk-python-mgmt-machinelearningservices/0.1.0 + Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets + response: + body: + string: '{"secretsType": "AccountKey", "key": "dGhpcyBpcyBmYWtlIGtleQ=="}' + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-request-time: + - '0.065' + status: + code: 200 + message: OK +- request: + body: '[null]' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '6' + Content-Type: + - application/json + User-Agent: + - azsdk-python-azuremonitorclient/unknown Python/3.9.18 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://dc.services.visualstudio.com/v2.1/track + response: + body: + string: '{"itemsReceived": 0, "itemsAccepted": 0, "appId": null, "errors": []}' + headers: + content-type: + - application/json; charset=utf-8 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/promptflow/tests/test_configs/recordings/test_telemetry_TestTelemetry_test_sdk_telemetry_ua.yaml b/src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_sdk_telemetry_ua.yaml similarity index 100% rename from src/promptflow/tests/test_configs/recordings/test_telemetry_TestTelemetry_test_sdk_telemetry_ua.yaml rename to src/promptflow-recording/recordings/azure/test_telemetry_TestTelemetry_test_sdk_telemetry_ua.yaml diff --git a/src/promptflow-recording/recordings/local/executor_node_cache.shelve.bak b/src/promptflow-recording/recordings/local/executor_node_cache.shelve.bak new file mode 100644 index 00000000000..32349d105f9 --- /dev/null +++ b/src/promptflow-recording/recordings/local/executor_node_cache.shelve.bak @@ -0,0 +1,54 @@ +'5f3cec876019a3516ad01ca9bcbb1d6c9591a74c', (0, 2309) +'2099eee58cd39735bbcd938b495796ff447a17d3', (2560, 157) +'38141182f6399a7f596d73107dcbd121501219a2', (3072, 133) +'fdfd9c386e1b07379506da59509512fcde3a2fc6', (3584, 2231) +'3017c80cde2268206d17c30f1c6dd3a16d9867f9', (6144, 2191) +'51eede8148bd49256c917c8e5663247b87c976e9', (8704, 4271) +'84abeb41abe29286414f4376694521e76617a7cf', (13312, 4570) +'c8fcd047770466d76018d8b9656c18b7a87a9dcf', (17920, 2255) +'8304ac0af7a3e04c1ef9d9e34dba81abfe3ba211', (20480, 5219) +'26362f74d29264a83042aecd52b775fc13912631', (26112, 5368) +'e8e1674ac83858d73f1a1e8262ea56438b147139', (31744, 294) +'d0e237933cdc902b96e9e944745c3eb9b1f12407', (32256, 283) +'f1150fae34eb9648bd121fe55558d1525bd0254b', (32768, 542) +'5c272a0b426134732f42f67767096f8792c41ebc', (33792, 283) +'933e076838f15c00e80794240ad2c1a0f75941d5', (34304, 542) +'1b014d42608391bf3548202e097decd8166a2510', (35328, 283) +'e1735237514ffb84070e84fd11523c0cc93760be', (35840, 542) +'95e5e2c9dc4a106736c70b22cc5ed86aa0b04312', (36864, 283) +'48d6d474193f747fdcca28cba96092258198d4d7', (37376, 542) +'b24cdd82dc74eeccc80b3fa2c499d4c0a26f63ad', (38400, 3361) +'79b019d7c272dbdfc8264e8e42b2c88d7aa7c951', (41984, 2192) +'a349156be51c5a57fec0a191a86b0ac325182e2b', (44544, 5109) +'860566a0617883a0d15824f4d3d937711077a750', (49664, 5440) +'9e373617b4d40bb1ac3d8fadb323aae24957fd71', (55296, 128) +'cf605817e44b7ed8ce00f3ff58e7f21fac99e0c7', (55808, 128) +'dbf9f54b3da5ae9e3b946dcf7d195b8dc3ed1415', (56320, 128) +'64685e19a6bdd72a9e002093cf2e3c1393eeaa51', (56832, 128) +'b5e83f63387d282a57ed97e5ffd046924d1e0a02', (57344, 4365) +'57db20fbcc7e86f9effb33cdd00850d8b86258f7', (61952, 289) +'97bf39858b6395b0e9c6676143d777d912197c18', (62464, 548) +'3c3df2f48ea517ad935af2317bf4cf9c695f4bd3', (63488, 2160) +'8c3cbe09f920c842fce5bc9e4ee254ac559ada3b', (66048, 279) +'1ff794a0c436dac94abb52ba035199a77dc2c6df', (66560, 1822) +'65d5cd602532b66149a484a14ee76d36669a94a7', (68608, 10541) +'a45e28cb72572050138c19265926fc6e33a69f21', (79360, 175) +'b24d8ba91cd37366f094b9639ac62abf6959d061', (79872, 2197) +'eab8f6fef5b132782cc63fb2c52593538d423f08', (82432, 4495) +'d1026d4d409f2734806bfd7461598705f0f02e58', (87040, 4835) +'e5b5eaa6e92bdad0b061d1b5fde61e569a661a29', (92160, 2311) +'ef38300dd5c59e99d68f95a12a9beb32bdee32bf', (94720, 2351) +'730e04ba60759eb79c0db0059a55a0d188323533', (97280, 2279) +'053a7ba4b0940da18d0857ec4f6d8b527e485dd8', (99840, 2278) +'63d81777218235d6a415720bf8c4d9263ddff3e6', (102400, 2409) +'349da7d95a34054754a6ee3c991ccea907b11658', (104960, 2432) +'4db719dc04b938e6cc977f5870bb14b97241c0b4', (107520, 5742) +'f4f563f0b2610973f5ba75e3784d178bad1efe48', (119296, 1631) +'b75211be0f183bda2048a62d7c9be3412f14b264', (121344, 9495) +'c9775462bf698743415361acf2f970617074ec45', (132096, 1459) +'16fcc5fb6e93c9ef8b107620d8067fd19b491a29', (133632, 1807) +'f2707e7ba1b59a2aefb18e024762af77054b1522', (135680, 15435) +'ad585ee1806aae44c095f4b3e473e472bb8be141', (151552, 1622) +'ea48203d881e43bd9e027a19525ba88816c9a639', (153600, 14573) +'e53962d6670e3c446a659b93e8ff5900f82bce76', (168448, 14568) +'c6604890d3723b578cc9098cad1c56522a78df6f', (183296, 1822) diff --git a/src/promptflow-recording/recordings/local/executor_node_cache.shelve.dat b/src/promptflow-recording/recordings/local/executor_node_cache.shelve.dat new file mode 100644 index 00000000000..cbdeebb63b4 Binary files /dev/null and b/src/promptflow-recording/recordings/local/executor_node_cache.shelve.dat differ diff --git a/src/promptflow-recording/recordings/local/executor_node_cache.shelve.dir b/src/promptflow-recording/recordings/local/executor_node_cache.shelve.dir new file mode 100644 index 00000000000..32349d105f9 --- /dev/null +++ b/src/promptflow-recording/recordings/local/executor_node_cache.shelve.dir @@ -0,0 +1,54 @@ +'5f3cec876019a3516ad01ca9bcbb1d6c9591a74c', (0, 2309) +'2099eee58cd39735bbcd938b495796ff447a17d3', (2560, 157) +'38141182f6399a7f596d73107dcbd121501219a2', (3072, 133) +'fdfd9c386e1b07379506da59509512fcde3a2fc6', (3584, 2231) +'3017c80cde2268206d17c30f1c6dd3a16d9867f9', (6144, 2191) +'51eede8148bd49256c917c8e5663247b87c976e9', (8704, 4271) +'84abeb41abe29286414f4376694521e76617a7cf', (13312, 4570) +'c8fcd047770466d76018d8b9656c18b7a87a9dcf', (17920, 2255) +'8304ac0af7a3e04c1ef9d9e34dba81abfe3ba211', (20480, 5219) +'26362f74d29264a83042aecd52b775fc13912631', (26112, 5368) +'e8e1674ac83858d73f1a1e8262ea56438b147139', (31744, 294) +'d0e237933cdc902b96e9e944745c3eb9b1f12407', (32256, 283) +'f1150fae34eb9648bd121fe55558d1525bd0254b', (32768, 542) +'5c272a0b426134732f42f67767096f8792c41ebc', (33792, 283) +'933e076838f15c00e80794240ad2c1a0f75941d5', (34304, 542) +'1b014d42608391bf3548202e097decd8166a2510', (35328, 283) +'e1735237514ffb84070e84fd11523c0cc93760be', (35840, 542) +'95e5e2c9dc4a106736c70b22cc5ed86aa0b04312', (36864, 283) +'48d6d474193f747fdcca28cba96092258198d4d7', (37376, 542) +'b24cdd82dc74eeccc80b3fa2c499d4c0a26f63ad', (38400, 3361) +'79b019d7c272dbdfc8264e8e42b2c88d7aa7c951', (41984, 2192) +'a349156be51c5a57fec0a191a86b0ac325182e2b', (44544, 5109) +'860566a0617883a0d15824f4d3d937711077a750', (49664, 5440) +'9e373617b4d40bb1ac3d8fadb323aae24957fd71', (55296, 128) +'cf605817e44b7ed8ce00f3ff58e7f21fac99e0c7', (55808, 128) +'dbf9f54b3da5ae9e3b946dcf7d195b8dc3ed1415', (56320, 128) +'64685e19a6bdd72a9e002093cf2e3c1393eeaa51', (56832, 128) +'b5e83f63387d282a57ed97e5ffd046924d1e0a02', (57344, 4365) +'57db20fbcc7e86f9effb33cdd00850d8b86258f7', (61952, 289) +'97bf39858b6395b0e9c6676143d777d912197c18', (62464, 548) +'3c3df2f48ea517ad935af2317bf4cf9c695f4bd3', (63488, 2160) +'8c3cbe09f920c842fce5bc9e4ee254ac559ada3b', (66048, 279) +'1ff794a0c436dac94abb52ba035199a77dc2c6df', (66560, 1822) +'65d5cd602532b66149a484a14ee76d36669a94a7', (68608, 10541) +'a45e28cb72572050138c19265926fc6e33a69f21', (79360, 175) +'b24d8ba91cd37366f094b9639ac62abf6959d061', (79872, 2197) +'eab8f6fef5b132782cc63fb2c52593538d423f08', (82432, 4495) +'d1026d4d409f2734806bfd7461598705f0f02e58', (87040, 4835) +'e5b5eaa6e92bdad0b061d1b5fde61e569a661a29', (92160, 2311) +'ef38300dd5c59e99d68f95a12a9beb32bdee32bf', (94720, 2351) +'730e04ba60759eb79c0db0059a55a0d188323533', (97280, 2279) +'053a7ba4b0940da18d0857ec4f6d8b527e485dd8', (99840, 2278) +'63d81777218235d6a415720bf8c4d9263ddff3e6', (102400, 2409) +'349da7d95a34054754a6ee3c991ccea907b11658', (104960, 2432) +'4db719dc04b938e6cc977f5870bb14b97241c0b4', (107520, 5742) +'f4f563f0b2610973f5ba75e3784d178bad1efe48', (119296, 1631) +'b75211be0f183bda2048a62d7c9be3412f14b264', (121344, 9495) +'c9775462bf698743415361acf2f970617074ec45', (132096, 1459) +'16fcc5fb6e93c9ef8b107620d8067fd19b491a29', (133632, 1807) +'f2707e7ba1b59a2aefb18e024762af77054b1522', (135680, 15435) +'ad585ee1806aae44c095f4b3e473e472bb8be141', (151552, 1622) +'ea48203d881e43bd9e027a19525ba88816c9a639', (153600, 14573) +'e53962d6670e3c446a659b93e8ff5900f82bce76', (168448, 14568) +'c6604890d3723b578cc9098cad1c56522a78df6f', (183296, 1822) diff --git a/src/promptflow-recording/recordings/local/node_cache.shelve.bak b/src/promptflow-recording/recordings/local/node_cache.shelve.bak new file mode 100644 index 00000000000..fe2bee8f373 --- /dev/null +++ b/src/promptflow-recording/recordings/local/node_cache.shelve.bak @@ -0,0 +1,78 @@ +'aadb0707e9a62b00df9d0d3fecb709ece90a8b67', (0, 2261) +'cd53657c05cd3a1fb97f187747689f084fbfe439', (2560, 4375) +'d775a380981c5ff7345b645856ffb4974b14dcf2', (7168, 4777) +'3a5aa3d2a6c43615554064dc175f00bc8917c73e', (12288, 4785) +'0304f9ccf7ab8521173b43b526b26412208148b1', (17408, 509) +'db5797df473300683a876a0b5e9cdd7083c3d1b4', (17920, 1994) +'eea8e9626a2ad3706637b8c470691f2a73917e0c', (19968, 538) +'48630647ce1d569a771821ebf38fac16b75a8bae', (20992, 2276) +'19ece57bbaa2b310047d724e0a76bfe1198dd0c5', (23552, 4315) +'70f4fea54805e642e98208d6704425432e00d46d', (28160, 3033) +'1dcda5e5693889105ed93be129e5689a57883036', (31232, 5281) +'79b019d7c272dbdfc8264e8e42b2c88d7aa7c951', (36864, 2189) +'ce4065d7d6d8f1abab486b7fd9ba418c584ae930', (39424, 54804) +'d6f326cdd6b592d383675a75cd607ba8d979d3de', (94720, 4750) +'ead9751f11bc2db068f915f8cd6a798e5d417ee1', (99840, 2224) +'90e7b637f88d5ff8a781be0ca4c1682885c17e4a', (102400, 522) +'040867c7c8455768a7c84cb908f74732c88696ff', (103424, 5901) +'55238d5bfc1b512c174ce8f92ac5a34c143afbd0', (109568, 2325) +'8e7a226b9ac1566c1073d892a04883a9813a8ee6', (112128, 7262) +'ebbc96011faea150acbc3a5004a7a55834711f7a', (119808, 4558) +'fe04f6a9237fc60af117b2b3fd79eabae61f1809', (124416, 4429) +'3a8481f91d548f426fca10b789f511b8bb0c286d', (129024, 4368) +'2e01fc102cc9346c33caa7945ede7dba3622d712', (133632, 1777) +'2c2c8e9b4662215a00c7119e987a6b0049829e2b', (135680, 503) +'b60cd95d2c2cb608125a8d6cadfc830790eb4140', (136192, 4809) +'06cb40fa425bb0eacfda21d542144882ab0d4c2b', (141312, 4910) +'1d23ee6f7ab6e4bb1bbf338af00f70c9bf9d4c04', (146432, 2286) +'1419ad1005708e45b5be5265dfb86294d5568687', (148992, 1991) +'a3273c3e6d4e0ec25968bb223e962ed33f482cdc', (151040, 535) +'0c80b0d68f36a163fa223aa4cab0a0fb0094546c', (152064, 4230) +'f7079b0b769d766a5e82a3974fb5f681df26c67c', (156672, 4069) +'3936d688d89e10af38f3fb96212d4b232f32cdfd', (160768, 2042) +'a2df0b2cd19b719ea21d216c2b8a13d7e4ed9203', (162816, 586) +'136410920f9a71d2cc41ed4ac2c6a43ac7e80770', (163840, 4764) +'62ba454de5828dd04f058cd71cf0bd243f427bf2', (168960, 2573) +'a14dc485f384620f455bebfba257f07e54e87011', (172032, 4629) +'c8fcd047770466d76018d8b9656c18b7a87a9dcf', (177152, 2255) +'d32004842e1a6752e3f7b08e532e46290ef35a39', (179712, 10747) +'8ee88079e0887b5ace44e682d314963d16863940', (190464, 3912) +'03b04c445e78777c9e7bc56e57854baa9a4a509f', (194560, 4303) +'683f3abbccfab892e1013d2314d6837c0d51c724', (199168, 4305) +'d41772e8a1ce4ab82a1aabb635a7fd82d9317db6', (203776, 4328) +'a099a90626930c0d6c988957b1baccd5689fa1a6', (208384, 2861) +'2c89af11794bf4443069cd4745e9c56f293555af', (211968, 5309) +'024082b6c196500a2914e177a4f02af1d1e17b27', (217600, 4315) +'5ccf7a8b10f20168e31475f1765159bd5e17d579', (222208, 2282) +'306986e1053671de518922e747d044b4c9b8ca2a', (224768, 4077) +'ab3c789da615a90a68f183597d9ae96cc0317998', (228864, 4552) +'5c2ef83820e13a27afdff39c0f3a365934e3684b', (233472, 1752) +'f0218a466bb8dba6b2e6ad27670c8538f5dd4d98', (235520, 279) +'e1191443c40984b6af07b4ef0c4bbb34a033adad', (236032, 2283) +'b22eddaacb91c88e520e42c1ad66b35bb8d17618', (238592, 2380) +'f786a0d820131f72dc802d60c1a778e2e4b7953a', (241152, 57401) +'0ed5617f6e2ea3093542b8de2497e9283581253b', (299008, 7719) +'8cf128af83ea2aaf4a09890690ab16f3bb347bb3', (307200, 309) +'343332ff6b96d3b1baac23c4e8394a6a965f84b1', (307712, 327) +'740b85e35ddecf84a6aeaec23e4dbce955be2ab6', (308224, 2257) +'0a120d452e2e316923fa975fc716539b94faf5be', (310784, 4876) +'66f0bce1c572bcd7a5ea1973af02e6508c2c006d', (315904, 1937) +'8304ac0af7a3e04c1ef9d9e34dba81abfe3ba211', (327168, 5243) +'42744df4b6b58816c404897aa06957a8e4554c86', (322560, 4493) +'66b62b83dbef38d5ad021acbe15d4e3a93cd21f6', (332800, 5395) +'52b9e8907f873d01597eedf889d9f8d56b1f7fac', (338432, 5392) +'a30804ecfecf0d4f43ce012ce3c9520ee7255901', (344064, 4069) +'b9bcb73bbe85960e4f492c6b60fd2584de421f91', (348160, 325) +'71d8e363eeac4e3334679f505225acd75ef5607b', (348672, 414) +'e86cb445b6fd5c7ac664953d9ff006a4e9285d22', (349184, 4531) +'dbf350596085a5cd5aa1be0709da430507bf06f3', (353792, 1922) +'05a77a24b6a04713e8035183d5bcbe516a7c6201', (355840, 2190) +'f982607f0b16462076e95b085628f125a9ce13fd', (358400, 4018) +'7f6b2e7803bfbecbf55a8d5eba3cd51fd9d3c672', (362496, 11456) +'e9aa82ac7a0a8b507f6882b04757cd67ff7130b4', (374272, 11427) +'c373d6c5f4798042dc85d13fb6bd8fae74a128fc', (386048, 1923) +'d5233d057cbc48471693b779d752dc01c0dca2ad', (388096, 3960) +'351e77abed00fa8e8a5387db88fbce07e922dd22', (392192, 2308) +'afebacc90db07fbf98ecfcc2d951f704cb5a208f', (394752, 2835) +'faa4d363016d7b1da890039f888df72e59b534bc', (397824, 148) +'e5a68e8e2335d0ba17ddb720c8a36fdaa5237cf7', (398336, 163) diff --git a/src/promptflow-recording/recordings/local/node_cache.shelve.dat b/src/promptflow-recording/recordings/local/node_cache.shelve.dat new file mode 100644 index 00000000000..93404798252 Binary files /dev/null and b/src/promptflow-recording/recordings/local/node_cache.shelve.dat differ diff --git a/src/promptflow-recording/recordings/local/node_cache.shelve.dir b/src/promptflow-recording/recordings/local/node_cache.shelve.dir new file mode 100644 index 00000000000..fe2bee8f373 --- /dev/null +++ b/src/promptflow-recording/recordings/local/node_cache.shelve.dir @@ -0,0 +1,78 @@ +'aadb0707e9a62b00df9d0d3fecb709ece90a8b67', (0, 2261) +'cd53657c05cd3a1fb97f187747689f084fbfe439', (2560, 4375) +'d775a380981c5ff7345b645856ffb4974b14dcf2', (7168, 4777) +'3a5aa3d2a6c43615554064dc175f00bc8917c73e', (12288, 4785) +'0304f9ccf7ab8521173b43b526b26412208148b1', (17408, 509) +'db5797df473300683a876a0b5e9cdd7083c3d1b4', (17920, 1994) +'eea8e9626a2ad3706637b8c470691f2a73917e0c', (19968, 538) +'48630647ce1d569a771821ebf38fac16b75a8bae', (20992, 2276) +'19ece57bbaa2b310047d724e0a76bfe1198dd0c5', (23552, 4315) +'70f4fea54805e642e98208d6704425432e00d46d', (28160, 3033) +'1dcda5e5693889105ed93be129e5689a57883036', (31232, 5281) +'79b019d7c272dbdfc8264e8e42b2c88d7aa7c951', (36864, 2189) +'ce4065d7d6d8f1abab486b7fd9ba418c584ae930', (39424, 54804) +'d6f326cdd6b592d383675a75cd607ba8d979d3de', (94720, 4750) +'ead9751f11bc2db068f915f8cd6a798e5d417ee1', (99840, 2224) +'90e7b637f88d5ff8a781be0ca4c1682885c17e4a', (102400, 522) +'040867c7c8455768a7c84cb908f74732c88696ff', (103424, 5901) +'55238d5bfc1b512c174ce8f92ac5a34c143afbd0', (109568, 2325) +'8e7a226b9ac1566c1073d892a04883a9813a8ee6', (112128, 7262) +'ebbc96011faea150acbc3a5004a7a55834711f7a', (119808, 4558) +'fe04f6a9237fc60af117b2b3fd79eabae61f1809', (124416, 4429) +'3a8481f91d548f426fca10b789f511b8bb0c286d', (129024, 4368) +'2e01fc102cc9346c33caa7945ede7dba3622d712', (133632, 1777) +'2c2c8e9b4662215a00c7119e987a6b0049829e2b', (135680, 503) +'b60cd95d2c2cb608125a8d6cadfc830790eb4140', (136192, 4809) +'06cb40fa425bb0eacfda21d542144882ab0d4c2b', (141312, 4910) +'1d23ee6f7ab6e4bb1bbf338af00f70c9bf9d4c04', (146432, 2286) +'1419ad1005708e45b5be5265dfb86294d5568687', (148992, 1991) +'a3273c3e6d4e0ec25968bb223e962ed33f482cdc', (151040, 535) +'0c80b0d68f36a163fa223aa4cab0a0fb0094546c', (152064, 4230) +'f7079b0b769d766a5e82a3974fb5f681df26c67c', (156672, 4069) +'3936d688d89e10af38f3fb96212d4b232f32cdfd', (160768, 2042) +'a2df0b2cd19b719ea21d216c2b8a13d7e4ed9203', (162816, 586) +'136410920f9a71d2cc41ed4ac2c6a43ac7e80770', (163840, 4764) +'62ba454de5828dd04f058cd71cf0bd243f427bf2', (168960, 2573) +'a14dc485f384620f455bebfba257f07e54e87011', (172032, 4629) +'c8fcd047770466d76018d8b9656c18b7a87a9dcf', (177152, 2255) +'d32004842e1a6752e3f7b08e532e46290ef35a39', (179712, 10747) +'8ee88079e0887b5ace44e682d314963d16863940', (190464, 3912) +'03b04c445e78777c9e7bc56e57854baa9a4a509f', (194560, 4303) +'683f3abbccfab892e1013d2314d6837c0d51c724', (199168, 4305) +'d41772e8a1ce4ab82a1aabb635a7fd82d9317db6', (203776, 4328) +'a099a90626930c0d6c988957b1baccd5689fa1a6', (208384, 2861) +'2c89af11794bf4443069cd4745e9c56f293555af', (211968, 5309) +'024082b6c196500a2914e177a4f02af1d1e17b27', (217600, 4315) +'5ccf7a8b10f20168e31475f1765159bd5e17d579', (222208, 2282) +'306986e1053671de518922e747d044b4c9b8ca2a', (224768, 4077) +'ab3c789da615a90a68f183597d9ae96cc0317998', (228864, 4552) +'5c2ef83820e13a27afdff39c0f3a365934e3684b', (233472, 1752) +'f0218a466bb8dba6b2e6ad27670c8538f5dd4d98', (235520, 279) +'e1191443c40984b6af07b4ef0c4bbb34a033adad', (236032, 2283) +'b22eddaacb91c88e520e42c1ad66b35bb8d17618', (238592, 2380) +'f786a0d820131f72dc802d60c1a778e2e4b7953a', (241152, 57401) +'0ed5617f6e2ea3093542b8de2497e9283581253b', (299008, 7719) +'8cf128af83ea2aaf4a09890690ab16f3bb347bb3', (307200, 309) +'343332ff6b96d3b1baac23c4e8394a6a965f84b1', (307712, 327) +'740b85e35ddecf84a6aeaec23e4dbce955be2ab6', (308224, 2257) +'0a120d452e2e316923fa975fc716539b94faf5be', (310784, 4876) +'66f0bce1c572bcd7a5ea1973af02e6508c2c006d', (315904, 1937) +'8304ac0af7a3e04c1ef9d9e34dba81abfe3ba211', (327168, 5243) +'42744df4b6b58816c404897aa06957a8e4554c86', (322560, 4493) +'66b62b83dbef38d5ad021acbe15d4e3a93cd21f6', (332800, 5395) +'52b9e8907f873d01597eedf889d9f8d56b1f7fac', (338432, 5392) +'a30804ecfecf0d4f43ce012ce3c9520ee7255901', (344064, 4069) +'b9bcb73bbe85960e4f492c6b60fd2584de421f91', (348160, 325) +'71d8e363eeac4e3334679f505225acd75ef5607b', (348672, 414) +'e86cb445b6fd5c7ac664953d9ff006a4e9285d22', (349184, 4531) +'dbf350596085a5cd5aa1be0709da430507bf06f3', (353792, 1922) +'05a77a24b6a04713e8035183d5bcbe516a7c6201', (355840, 2190) +'f982607f0b16462076e95b085628f125a9ce13fd', (358400, 4018) +'7f6b2e7803bfbecbf55a8d5eba3cd51fd9d3c672', (362496, 11456) +'e9aa82ac7a0a8b507f6882b04757cd67ff7130b4', (374272, 11427) +'c373d6c5f4798042dc85d13fb6bd8fae74a128fc', (386048, 1923) +'d5233d057cbc48471693b779d752dc01c0dca2ad', (388096, 3960) +'351e77abed00fa8e8a5387db88fbce07e922dd22', (392192, 2308) +'afebacc90db07fbf98ecfcc2d951f704cb5a208f', (394752, 2835) +'faa4d363016d7b1da890039f888df72e59b534bc', (397824, 148) +'e5a68e8e2335d0ba17ddb720c8a36fdaa5237cf7', (398336, 163) diff --git a/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.bak b/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.bak new file mode 100644 index 00000000000..601bfca9f7a --- /dev/null +++ b/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.bak @@ -0,0 +1,6 @@ +'1de9b52ec6d201d80db2fb1aa05af35e80798162', (0, 1247) +'283cc9b3bc509bb8142f911b17c9329008429000', (1536, 1064) +'196bb6cd9cd059b55b1814f88c4e434cbd74bda1', (3072, 4891) +'66d056201607853fc01f62af09392d013b0d2468', (8192, 6270) +'ea48203d881e43bd9e027a19525ba88816c9a639', (14848, 14393) +'e53962d6670e3c446a659b93e8ff5900f82bce76', (29696, 14391) diff --git a/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.dat b/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.dat new file mode 100644 index 00000000000..c67bfc7d5fa Binary files /dev/null and b/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.dat differ diff --git a/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.dir b/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.dir new file mode 100644 index 00000000000..601bfca9f7a --- /dev/null +++ b/src/promptflow-recording/recordings/local/tracing.node_cache.shelve.dir @@ -0,0 +1,6 @@ +'1de9b52ec6d201d80db2fb1aa05af35e80798162', (0, 1247) +'283cc9b3bc509bb8142f911b17c9329008429000', (1536, 1064) +'196bb6cd9cd059b55b1814f88c4e434cbd74bda1', (3072, 4891) +'66d056201607853fc01f62af09392d013b0d2468', (8192, 6270) +'ea48203d881e43bd9e027a19525ba88816c9a639', (14848, 14393) +'e53962d6670e3c446a659b93e8ff5900f82bce76', (29696, 14391) diff --git a/src/promptflow-recording/requirements.txt b/src/promptflow-recording/requirements.txt new file mode 100644 index 00000000000..e7011aaec93 --- /dev/null +++ b/src/promptflow-recording/requirements.txt @@ -0,0 +1,2 @@ +promptflow-tracing +vcr diff --git a/src/promptflow-tools/CHANGELOG.md b/src/promptflow-tools/CHANGELOG.md index 9a003501905..419e90ddee3 100644 --- a/src/promptflow-tools/CHANGELOG.md +++ b/src/promptflow-tools/CHANGELOG.md @@ -1,7 +1,53 @@ # Release History +## 1.4.0 (2024.03.26) + +### Features Added +- Enable token based auth in azure openai connection for tools. +- Add "seed" to LLM and GPT-Vision tool inputs. + +### Improvements +- Improve error message when LLM tool meets gpt-4-vision-preview model. + +### Bugs Fixed +- Set default values to workspace triad parameters of dynamic list function to avoid misleading errors when clicking tool input. + +## 1.3.0 (2024.03.01) + +### Improvements +- Disable openai built-in retry mechanism for better debuggability and real-time status updates. +- Refine the retry-after interval for openai retry error. + +## 1.2.0 (2024.02.07) + +### Features Added +- Support tool "Azure OpenAI GPT-4 Turbo with Vision" to auto list "deployment_name". + +### Improvements +- Match the promptflow-tools setup to promptflow setup. + +## 1.1.0 (2024.01.23) + +### Features Added +- Use ruamel.yaml instead of pyyaml in promptflow. + +## 1.0.3 (2024.01.08) + +### Features Added +- Add new tool "Azure OpenAI GPT-4 Turbo with Vision". +- Support "response_format" for azure openai chat api in LLM tool. + +## 1.0.1 (2023.12.13) + +### Features Added +- Support "response_format" for openai chat api in LLM tool. +- Add "allow_manual_entry" for embedding tool. + +### Improvements +- Handle all OpenSource\HuggingFace Models with the same MIR request format in 'Open Model LLM' tool. + ## 1.0.0 (2023.11.30) ### Features Added -- Support openai 1.x in promptflow-tools -- Add new tool "OpenAI GPT-4V" +- Support openai 1.x in promptflow-tools. +- Add new tool "OpenAI GPT-4V". diff --git a/src/promptflow-tools/connections.json.example b/src/promptflow-tools/connections.json.example index 8c17e8dde93..eff504ea6a8 100644 --- a/src/promptflow-tools/connections.json.example +++ b/src/promptflow-tools/connections.json.example @@ -9,6 +9,16 @@ }, "module": "promptflow.connections" }, + "azure_open_ai_connection_meid": { + "type": "AzureOpenAIConnection", + "value": { + "api_base": "aoai-api-endpoint", + "api_type": "azure", + "api_version": "2023-07-01-preview", + "auth_mode": "meid_token" + }, + "module": "promptflow.connections" + }, "serp_connection": { "type": "SerpConnection", "value": { diff --git a/src/promptflow-tools/promptflow/tools/aoai.py b/src/promptflow-tools/promptflow/tools/aoai.py index ef234a82e0c..1419a28707d 100644 --- a/src/promptflow-tools/promptflow/tools/aoai.py +++ b/src/promptflow-tools/promptflow/tools/aoai.py @@ -129,14 +129,9 @@ def chat( "top_p": float(top_p), "n": int(n), "stream": stream, - "stop": stop if stop else None, - "max_tokens": int(max_tokens) if max_tokens is not None and str(max_tokens).lower() != "inf" else None, "presence_penalty": float(presence_penalty), "frequency_penalty": float(frequency_penalty), - "logit_bias": logit_bias, "user": user, - "response_format": response_format, - "seed": seed, "extra_headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"} } if functions is not None: @@ -144,6 +139,18 @@ def chat( params["functions"] = functions params["function_call"] = process_function_call(function_call) + # to avoid vision model validation error for empty param values. + if stop: + params["stop"] = stop + if max_tokens is not None and str(max_tokens).lower() != "inf": + params["max_tokens"] = int(max_tokens) + if logit_bias: + params["logit_bias"] = logit_bias + if response_format: + params["response_format"] = response_format + if seed is not None: + params["seed"] = seed + completion = self._client.chat.completions.create(**params) return post_process_chat_api_response(completion, stream, functions) diff --git a/src/promptflow-tools/promptflow/tools/aoai_gpt4v.py b/src/promptflow-tools/promptflow/tools/aoai_gpt4v.py index cd67d633673..b2f4aaacff7 100644 --- a/src/promptflow-tools/promptflow/tools/aoai_gpt4v.py +++ b/src/promptflow-tools/promptflow/tools/aoai_gpt4v.py @@ -1,138 +1,34 @@ -from promptflow._internal import ToolProvider, tool -from promptflow.connections import AzureOpenAIConnection -from promptflow.contracts.types import PromptTemplate -from promptflow.exceptions import ErrorTarget, UserErrorException from typing import List, Dict from promptflow.tools.common import render_jinja_template, handle_openai_error, parse_chat, \ preprocess_template_string, find_referenced_image_set, convert_to_chat_list, init_azure_openai_client, \ - post_process_chat_api_response - - -GPT4V_VERSION = "vision-preview" - - -def _get_credential(): - from azure.identity import DefaultAzureCredential - from azure.ai.ml._azure_environments import _get_default_cloud_name, EndpointURLS, _get_cloud, AzureEnvironments - # Support sovereign cloud cases, like mooncake, fairfax. - cloud_name = _get_default_cloud_name() - if cloud_name != AzureEnvironments.ENV_DEFAULT: - cloud = _get_cloud(cloud=cloud_name) - authority = cloud.get(EndpointURLS.ACTIVE_DIRECTORY_ENDPOINT) - credential = DefaultAzureCredential(authority=authority, exclude_shared_token_cache_credential=True) - else: - credential = DefaultAzureCredential() - - return credential - - -def _parse_resource_id(resource_id): - # Resource id is connection's id in following format: - # "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.CognitiveServices/accounts/{account}" - split_parts = resource_id.split("/") - if len(split_parts) != 9: - raise ParseConnectionError( - f"Connection resourceId format invalid, cur resourceId is {resource_id}." - ) - sub, rg, account = split_parts[2], split_parts[4], split_parts[-1] - - return sub, rg, account - - -class Deployment: - def __init__( - self, - name: str, - model_name: str, - version: str - ): - self.name = name - self.model_name = model_name - self.version = version - - -class ListDeploymentsError(UserErrorException): - def __init__(self, msg, **kwargs): - super().__init__(msg, target=ErrorTarget.TOOL, **kwargs) - + post_process_chat_api_response, list_deployment_connections, build_deployment_dict, GPT4V_VERSION -class ParseConnectionError(ListDeploymentsError): - def __init__(self, msg, **kwargs): - super().__init__(msg, **kwargs) - - -def _build_deployment_dict(item) -> Deployment: - model = item.properties.model - return Deployment(item.name, model.name, model.version) +from promptflow._internal import ToolProvider, tool +from promptflow.connections import AzureOpenAIConnection +from promptflow.contracts.types import PromptTemplate def list_deployment_names( - subscription_id, - resource_group_name, - workspace_name, + subscription_id=None, + resource_group_name=None, + workspace_name=None, connection="" ) -> List[Dict[str, str]]: res = [] - try: - # Does not support dynamic list for local. - from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient - from promptflow.azure.operations._arm_connection_operations import \ - ArmConnectionOperations, OpenURLFailedUserError - except ImportError: - return res - # For local, subscription_id is None. Does not suppot dynamic list for local. - if not subscription_id: + deployment_collection = list_deployment_connections(subscription_id, resource_group_name, workspace_name, + connection) + if not deployment_collection: return res - try: - credential = _get_credential() - try: - # Currently, the param 'connection' is str, not AzureOpenAIConnection type. - conn = ArmConnectionOperations._build_connection_dict( - name=connection, - subscription_id=subscription_id, - resource_group_name=resource_group_name, - workspace_name=workspace_name, - credential=credential - ) - resource_id = conn.get("value").get('resource_id', "") - if not resource_id: - return res - conn_sub, conn_rg, conn_account = _parse_resource_id(resource_id) - except OpenURLFailedUserError: - return res - except ListDeploymentsError as e: - raise e - except Exception as e: - msg = f"Parsing connection with exception: {e}" - raise ListDeploymentsError(msg=msg) from e - - client = CognitiveServicesManagementClient( - credential=credential, - subscription_id=conn_sub, - ) - deployment_collection = client.deployments.list( - resource_group_name=conn_rg, - account_name=conn_account, - ) - - for item in deployment_collection: - deployment = _build_deployment_dict(item) - if deployment.version == GPT4V_VERSION: - cur_item = { - "value": deployment.name, - "display_value": deployment.name, - } - res.append(cur_item) - - except Exception as e: - if hasattr(e, 'status_code') and e.status_code == 403: - msg = f"Failed to list deployments due to permission issue: {e}" - raise ListDeploymentsError(msg=msg) from e - else: - msg = f"Failed to list deployments with exception: {e}" - raise ListDeploymentsError(msg=msg) from e + for item in deployment_collection: + deployment = build_deployment_dict(item) + if deployment.version == GPT4V_VERSION: + cur_item = { + "value": deployment.name, + "display_value": deployment.name, + } + res.append(cur_item) return res diff --git a/src/promptflow-tools/promptflow/tools/common.py b/src/promptflow-tools/promptflow/tools/common.py index 9e853fae518..4e3dd3ab901 100644 --- a/src/promptflow-tools/promptflow/tools/common.py +++ b/src/promptflow-tools/promptflow/tools/common.py @@ -1,19 +1,37 @@ import functools import json +import os import re import sys import time -from typing import List, Mapping +from typing import List, Mapping, Union from jinja2 import Template -from openai import APIConnectionError, APIStatusError, OpenAIError, RateLimitError, APITimeoutError +from openai import APIConnectionError, APIStatusError, OpenAIError, RateLimitError, APITimeoutError, BadRequestError from promptflow.tools.exception import ChatAPIInvalidRole, WrappedOpenAIError, LLMError, JinjaTemplateError, \ ExceedMaxRetryTimes, ChatAPIInvalidFunctions, FunctionCallNotSupportedInStreamMode, \ - ChatAPIFunctionRoleInvalidFormat, InvalidConnectionType -from promptflow.connections import AzureOpenAIConnection, OpenAIConnection + ChatAPIFunctionRoleInvalidFormat, InvalidConnectionType, ListDeploymentsError, ParseConnectionError + +from promptflow._cli._utils import get_workspace_triad_from_local +from promptflow.connections import AzureOpenAIConnection, OpenAIConnection, ServerlessConnection from promptflow.exceptions import SystemErrorException, UserErrorException +GPT4V_VERSION = "vision-preview" + + +class Deployment: + def __init__( + self, + name: str, + model_name: str, + version: str + ): + self.name = name + self.model_name = model_name + self.version = version + + class ChatInputList(list): """ ChatInputList is a list of ChatInput objects. It is used to override the __str__ method of list to return a string @@ -188,6 +206,134 @@ def generate_retry_interval(retry_count: int) -> float: return retry_interval +def build_deployment_dict(item) -> Deployment: + model = item.properties.model + return Deployment(item.name, model.name, model.version) + + +def _parse_resource_id(resource_id): + # Resource id is connection's id in following format: + # "/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.CognitiveServices/accounts/{account}" + split_parts = resource_id.split("/") + if len(split_parts) != 9: + raise ParseConnectionError( + f"Connection resourceId format invalid, cur resourceId is {resource_id}." + ) + sub, rg, account = split_parts[2], split_parts[4], split_parts[-1] + + return sub, rg, account + + +def _get_credential(): + from azure.identity import DefaultAzureCredential + from azure.ai.ml._azure_environments import _get_default_cloud_name, EndpointURLS, _get_cloud, AzureEnvironments + # Support sovereign cloud cases, like mooncake, fairfax. + cloud_name = _get_default_cloud_name() + if cloud_name != AzureEnvironments.ENV_DEFAULT: + cloud = _get_cloud(cloud=cloud_name) + authority = cloud.get(EndpointURLS.ACTIVE_DIRECTORY_ENDPOINT) + credential = DefaultAzureCredential(authority=authority, exclude_shared_token_cache_credential=True) + else: + credential = DefaultAzureCredential() + + return credential + + +def get_workspace_triad(): + # If flow is submitted from cloud, runtime will save the workspace triad to environment + if 'AZUREML_ARM_SUBSCRIPTION' in os.environ and 'AZUREML_ARM_RESOURCEGROUP' in os.environ \ + and 'AZUREML_ARM_WORKSPACE_NAME' in os.environ: + return os.environ["AZUREML_ARM_SUBSCRIPTION"], os.environ["AZUREML_ARM_RESOURCEGROUP"], \ + os.environ["AZUREML_ARM_WORKSPACE_NAME"] + else: + # If flow is submitted from local, it will get workspace triad from your azure cloud config file + # If this config file isn't set up, it will return None. + workspace_triad = get_workspace_triad_from_local() + return workspace_triad.subscription_id, workspace_triad.resource_group_name, workspace_triad.workspace_name + + +def list_deployment_connections( + subscription_id=None, + resource_group_name=None, + workspace_name=None, + connection="", +): + try: + # Do not support dynamic list if azure packages are not installed. + from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient + from promptflow.azure.operations._arm_connection_operations import \ + ArmConnectionOperations, OpenURLFailedUserError + except ImportError: + return None + + # Do not support dynamic list if the workspace triple is set in the local. + if not subscription_id or not resource_group_name or not workspace_name: + return None + + try: + credential = _get_credential() + try: + # Currently, the param 'connection' is str, not AzureOpenAIConnection type. + conn = ArmConnectionOperations._build_connection_dict( + name=connection, + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + credential=credential + ) + resource_id = conn.get("value").get('resource_id', "") + if not resource_id: + return None + conn_sub, conn_rg, conn_account = _parse_resource_id(resource_id) + except OpenURLFailedUserError: + return None + except ListDeploymentsError as e: + raise e + except Exception as e: + msg = f"Parsing connection with exception: {e}" + raise ListDeploymentsError(msg=msg) from e + + client = CognitiveServicesManagementClient( + credential=credential, + subscription_id=conn_sub, + ) + return client.deployments.list( + resource_group_name=conn_rg, + account_name=conn_account, + ) + except Exception as e: + if hasattr(e, 'status_code') and e.status_code == 403: + msg = f"Failed to list deployments due to permission issue: {e}" + raise ListDeploymentsError(msg=msg) from e + else: + msg = f"Failed to list deployments with exception: {e}" + raise ListDeploymentsError(msg=msg) from e + + +def refine_extra_fields_not_permitted_error(connection, deployment_name, model): + tsg = "Please kindly avoid using vision model in LLM tool, " \ + "because vision model cannot work with some chat api parameters. " \ + "You can change to use tool 'Azure OpenAI GPT-4 Turbo with Vision' " \ + "or 'OpenAI GPT-4V' for vision model." + try: + if isinstance(connection, AzureOpenAIConnection): + subscription_id, resource_group, workspace_name = get_workspace_triad() + if subscription_id and resource_group and workspace_name: + deployment_collection = list_deployment_connections(subscription_id, resource_group, workspace_name, + connection.name) + for item in deployment_collection: + if deployment_name == item.name: + if item.properties.model.version in [GPT4V_VERSION]: + return tsg + elif isinstance(connection, OpenAIConnection) and model in ["gpt-4-vision-preview"]: + return tsg + except Exception as e: + print(f"Exception occurs when refine extra fields not permitted error for llm: " + f"{type(e).__name__}: {str(e)}", file=sys.stderr) + + return None + + # TODO(2971352): revisit this tries=100 when there is any change to the 10min timeout logic def handle_openai_error(tries: int = 100): """ @@ -212,6 +358,19 @@ def wrapper(*args, **kwargs): # Handle retriable exception, please refer to # https://platform.openai.com/docs/guides/error-codes/api-errors print(f"Exception occurs: {type(e).__name__}: {str(e)}", file=sys.stderr) + # Vision model does not support all chat api parameters, e.g. response_format and function_call. + # Recommend user to use vision model in vision tools, rather than LLM tool. + # Related issue https://github.com/microsoft/promptflow/issues/1683 + if isinstance(e, BadRequestError) and "extra fields not permitted" in str(e).lower(): + refined_error_message = \ + refine_extra_fields_not_permitted_error(args[0].connection, + kwargs.get("deployment_name", ""), + kwargs.get("model", "")) + if refined_error_message: + raise LLMError(message=f"{str(e)} {refined_error_message}") + else: + raise WrappedOpenAIError(e) + if isinstance(e, APIConnectionError) and not isinstance(e, APITimeoutError) \ and "connection aborted" not in str(e).lower(): raise WrappedOpenAIError(e) @@ -383,19 +542,7 @@ def normalize_connection_config(connection): ensuring it is compatible and standardized for use. """ if isinstance(connection, AzureOpenAIConnection): - use_key_auth = True - try: - from promptflow._sdk._constants import ConnectionAuthMode - if connection.auth_mode == ConnectionAuthMode.MEID_TOKEN: - use_key_auth = False - except ImportError as e: - if "cannot import name 'ConnectionAuthMode' from 'promptflow._sdk._constants'" in str(e): - print("Failed to import ConnectionAuthMode, use key auth by default.") - pass - else: - raise e - - if use_key_auth: + if connection.api_key: return { # disable OpenAI's built-in retry mechanism by using our own retry # for better debuggability and real-time status updates. @@ -418,13 +565,24 @@ def normalize_connection_config(connection): "organization": connection.organization, "base_url": connection.base_url } + elif isinstance(connection, ServerlessConnection): + suffix = "/v1" + base_url = connection.api_base + if not base_url.endswith(suffix): + # append "/v1" to ServerlessConnection api_base so that it can directly use the OpenAI SDK. + base_url += suffix + return { + "max_retries": 0, + "api_key": connection.api_key, + "base_url": base_url + } else: error_message = f"Not Support connection type '{type(connection).__name__}'. " \ f"Connection type should be in [AzureOpenAIConnection, OpenAIConnection]." raise InvalidConnectionType(message=error_message) -def init_openai_client(connection: OpenAIConnection): +def init_openai_client(connection: Union[OpenAIConnection, ServerlessConnection]): try: from openai import OpenAI as OpenAIClient except ImportError as e: diff --git a/src/promptflow-tools/promptflow/tools/exception.py b/src/promptflow-tools/promptflow/tools/exception.py index 260684f9a29..54ba9b67a62 100644 --- a/src/promptflow-tools/promptflow/tools/exception.py +++ b/src/promptflow-tools/promptflow/tools/exception.py @@ -53,6 +53,11 @@ def to_openai_error_message(e: Exception) -> str: "'gpt-4-1106-preview'. You can refer to " \ "https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/json-mode?tabs=python." return f"OpenAI API hits {ex_type}: {msg}" + elif "Principal does not have access to API/Operation" in error_message: + msg = "Principal does not have access to API/Operation. If you are using azure openai connection, " \ + "please make sure you have proper role assignment on your azure openai resource. You can refer to " \ + "https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/role-based-access-control" + return f"OpenAI API hits {ex_type}: {msg}" else: return f"OpenAI API hits {ex_type}: {error_message} [{openai_error_code_ref_message}]" @@ -193,3 +198,13 @@ class AzureContentSafetySystemError(SystemErrorException): def __init__(self, **kwargs): super().__init__(**kwargs, target=ErrorTarget.TOOL) + + +class ListDeploymentsError(UserErrorException): + def __init__(self, msg, **kwargs): + super().__init__(msg, target=ErrorTarget.TOOL, **kwargs) + + +class ParseConnectionError(ListDeploymentsError): + def __init__(self, msg, **kwargs): + super().__init__(msg, **kwargs) diff --git a/src/promptflow-tools/promptflow/tools/open_model_llm.py b/src/promptflow-tools/promptflow/tools/open_model_llm.py index 74b1b2088f0..e2c1edf585f 100644 --- a/src/promptflow-tools/promptflow/tools/open_model_llm.py +++ b/src/promptflow-tools/promptflow/tools/open_model_llm.py @@ -521,11 +521,15 @@ def parse_endpoint_connection_type(endpoint_connection_name: str) -> Tuple[str, return (endpoint_connection_details[0].lower(), endpoint_connection_details[1]) -def list_endpoint_names(subscription_id: str, - resource_group_name: str, - workspace_name: str, +def list_endpoint_names(subscription_id: str = None, + resource_group_name: str = None, + workspace_name: str = None, return_endpoint_url: bool = False, force_refresh: bool = False) -> List[Dict[str, Union[str, int, float, list, Dict]]]: + # return an empty list if workspace triad is not available. + if not subscription_id or not resource_group_name or not workspace_name: + return [] + cache_file_path = None try: with tempfile.NamedTemporaryFile(delete=False) as temp_file: @@ -598,10 +602,14 @@ def list_endpoint_names(subscription_id: str, return list_of_endpoints -def list_deployment_names(subscription_id: str, - resource_group_name: str, - workspace_name: str, +def list_deployment_names(subscription_id: str = None, + resource_group_name: str = None, + workspace_name: str = None, endpoint: str = None) -> List[Dict[str, Union[str, int, float, list, Dict]]]: + # return an empty list if workspace triad is not available. + if not subscription_id or not resource_group_name or not workspace_name: + return [] + deployment_default_list = [{ "value": DEPLOYMENT_DEFAULT, "display_value": DEPLOYMENT_DEFAULT, diff --git a/src/promptflow-tools/promptflow/tools/openai.py b/src/promptflow-tools/promptflow/tools/openai.py index fccc8187f0c..64f453c4d37 100644 --- a/src/promptflow-tools/promptflow/tools/openai.py +++ b/src/promptflow-tools/promptflow/tools/openai.py @@ -1,4 +1,5 @@ from enum import Enum +from typing import Union from promptflow.tools.common import render_jinja_template, handle_openai_error, \ parse_chat, to_bool, validate_functions, process_function_call, \ post_process_chat_api_response, init_openai_client @@ -6,7 +7,7 @@ # Avoid circular dependencies: Use import 'from promptflow._internal' instead of 'from promptflow' # since the code here is in promptflow namespace as well from promptflow._internal import ToolProvider, tool, register_apis -from promptflow.connections import OpenAIConnection +from promptflow.connections import OpenAIConnection, ServerlessConnection from promptflow.contracts.types import PromptTemplate @@ -22,7 +23,7 @@ class Engine(str, Enum): class OpenAI(ToolProvider): - def __init__(self, connection: OpenAIConnection): + def __init__(self, connection: Union[OpenAIConnection, ServerlessConnection]): super().__init__() self._client = init_openai_client(connection) @@ -122,14 +123,10 @@ def chat( "top_p": float(top_p), "n": int(n), "stream": stream, - "stop": stop if stop else None, "max_tokens": int(max_tokens) if max_tokens is not None and str(max_tokens).lower() != "inf" else None, "presence_penalty": float(presence_penalty), "frequency_penalty": float(frequency_penalty), - "logit_bias": logit_bias, "user": user, - "response_format": response_format, - "seed": seed, } if functions is not None: @@ -137,6 +134,18 @@ def chat( params["functions"] = functions params["function_call"] = process_function_call(function_call) + # to avoid vision model validation error for empty param values. + if stop: + params["stop"] = stop + if max_tokens is not None and str(max_tokens).lower() != "inf": + params["max_tokens"] = int(max_tokens) + if logit_bias: + params["logit_bias"] = logit_bias + if response_format: + params["response_format"] = response_format + if seed is not None: + params["seed"] = seed + completion = self._client.chat.completions.create(**params) return post_process_chat_api_response(completion, stream, functions) diff --git a/src/promptflow-tools/promptflow/version.txt b/src/promptflow-tools/promptflow/version.txt index 7b49cf1d819..af63e4ae48b 100644 --- a/src/promptflow-tools/promptflow/version.txt +++ b/src/promptflow-tools/promptflow/version.txt @@ -1 +1 @@ -VERSION = "1.3.0" +VERSION = "1.4.0" diff --git a/src/promptflow-tools/tests/conftest.py b/src/promptflow-tools/tests/conftest.py index 5e0375c2950..f3a1b7e225d 100644 --- a/src/promptflow-tools/tests/conftest.py +++ b/src/promptflow-tools/tests/conftest.py @@ -13,6 +13,7 @@ from promptflow.connections import CustomConnection, OpenAIConnection, SerpConnection from promptflow.contracts.multimedia import Image from promptflow.tools.aoai import AzureOpenAI +from promptflow.tools.aoai_gpt4v import AzureOpenAI as AzureOpenAIVision PROMOTFLOW_ROOT = Path(__file__).absolute().parents[1] CONNECTION_FILE = (PROMOTFLOW_ROOT / "connections.json").resolve().absolute().as_posix() @@ -32,12 +33,23 @@ def azure_open_ai_connection(): return ConnectionManager().get("azure_open_ai_connection") +@pytest.fixture +def azure_open_ai_connection_meid(): + return ConnectionManager().get("azure_open_ai_connection_meid") + + @pytest.fixture def aoai_provider(azure_open_ai_connection) -> AzureOpenAI: aoai_provider = AzureOpenAI(azure_open_ai_connection) return aoai_provider +@pytest.fixture +def aoai_vision_provider(azure_open_ai_connection) -> AzureOpenAIVision: + aoai_provider = AzureOpenAIVision(azure_open_ai_connection) + return aoai_provider + + @pytest.fixture def open_ai_connection(): return ConnectionManager().get("open_ai_connection") diff --git a/src/promptflow-tools/tests/test_aoai.py b/src/promptflow-tools/tests/test_aoai.py index a231da987e6..73abe56bf18 100644 --- a/src/promptflow-tools/tests/test_aoai.py +++ b/src/promptflow-tools/tests/test_aoai.py @@ -257,3 +257,15 @@ def test_aoai_chat_with_response_format_text_mode( response_format={"type": "text"} ) assert "Product X".lower() in result.lower() + + def test_aoai_with_vision_model(self, azure_open_ai_connection): + # The issue https://github.com/microsoft/promptflow/issues/1683 is fixed + result = chat( + connection=azure_open_ai_connection, + prompt="user:\nhello", + deployment_name="gpt-4v", + stop=None, + logit_bias={} + ) + + assert "Hello".lower() in result.lower() diff --git a/src/promptflow-tools/tests/test_aoai_gptv.py b/src/promptflow-tools/tests/test_aoai_gptv.py index d7c0c4d4c01..e47c6e7999d 100644 --- a/src/promptflow-tools/tests/test_aoai_gptv.py +++ b/src/promptflow-tools/tests/test_aoai_gptv.py @@ -1,210 +1,14 @@ import pytest from unittest.mock import patch -from promptflow.tools.aoai_gpt4v import AzureOpenAI, ListDeploymentsError, ParseConnectionError, \ - _parse_resource_id, list_deployment_names, GPT4V_VERSION - - -DEFAULT_SUBSCRIPTION_ID = "sub" -DEFAULT_RESOURCE_GROUP_NAME = "rg" -DEFAULT_WORKSPACE_NAME = "ws" -DEFAULT_ACCOUNT = "account" -DEFAULT_CONNECTION = "conn" - - -class CustomException(Exception): - def __init__(self, message, status_code): - super().__init__(message) - self.status_code = status_code - - -class Model: - def __init__(self, name, version): - self.name = name - self.version = version - - -class Properties: - def __init__(self, name, version): - self.model = Model(name, version) - - -class Deployment: - def __init__(self, name, model_name, version): - self.name = name - self.properties = Properties(model_name, version) - - -@pytest.fixture -def azure_openai_provider(azure_open_ai_connection) -> AzureOpenAI: - return AzureOpenAI(azure_open_ai_connection) - - -def mock_build_connection_dict_func1(**kwargs): - from promptflow.azure.operations._arm_connection_operations import OpenURLFailedUserError - - raise OpenURLFailedUserError - - -def mock_build_connection_dict_func2(**kwargs): - return {"value" : {"resource_id": "abc"}} - - -def mock_build_connection_dict_func3(**kwargs): - resource_id = ( - f"/subscriptions/{DEFAULT_SUBSCRIPTION_ID}/resourceGroups/{DEFAULT_RESOURCE_GROUP_NAME}" - f"/providers/Microsoft.CognitiveServices/accounts/{DEFAULT_ACCOUNT}" - ) - return {"value" : {"resource_id": resource_id}} - - -def test_parse_resource_id(): - sub = "dummy_sub" - rg = "dummy_rg" - account = "dummy_account" - resource_id = ( - f"/subscriptions/{sub}/resourceGroups/{rg}/providers/" - f"Microsoft.CognitiveServices/accounts/{account}" - ) - parsed_sub, parsed_rg, parsed_account = _parse_resource_id(resource_id) - assert sub == parsed_sub and rg == parsed_rg and account == parsed_account - - -@pytest.mark.parametrize( - "resource_id, error_message", - [ - ("", "Connection resourceId format invalid, cur resourceId is "), - ("a/b/c/d", "Connection resourceId format invalid, cur resourceId is a/b/c/d"), - ], - ) -def test_parse_resource_id_with_error(resource_id, error_message): - with pytest.raises(ParseConnectionError, match=error_message): - _parse_resource_id(resource_id) - - -def test_list_deployment_names_with_conn_error(monkeypatch): - from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations - - monkeypatch.setattr( - ArmConnectionOperations, - "_build_connection_dict", - mock_build_connection_dict_func1 - ) - res = list_deployment_names( - DEFAULT_SUBSCRIPTION_ID, - DEFAULT_RESOURCE_GROUP_NAME, - DEFAULT_WORKSPACE_NAME, - DEFAULT_CONNECTION - ) - assert res == [] - - -def test_list_deployment_names_with_wrong_connection_id(monkeypatch): - from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations - - monkeypatch.setattr( - ArmConnectionOperations, - "_build_connection_dict", - mock_build_connection_dict_func2 - ) - with pytest.raises(ListDeploymentsError): - list_deployment_names( - DEFAULT_SUBSCRIPTION_ID, - DEFAULT_RESOURCE_GROUP_NAME, - DEFAULT_WORKSPACE_NAME, - DEFAULT_CONNECTION - ) - - -def test_list_deployment_names_with_permission_issue(monkeypatch): - from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations - - monkeypatch.setattr( - ArmConnectionOperations, - "_build_connection_dict", - mock_build_connection_dict_func3 - ) - with patch('azure.mgmt.cognitiveservices.CognitiveServicesManagementClient') as mock: - mock.side_effect = CustomException("", 403) - with pytest.raises(ListDeploymentsError) as excinfo: - list_deployment_names( - DEFAULT_SUBSCRIPTION_ID, - DEFAULT_RESOURCE_GROUP_NAME, - DEFAULT_WORKSPACE_NAME, - DEFAULT_CONNECTION - ) - assert "Failed to list deployments due to permission issue" in str(excinfo.value) - - -def test_list_deployment_names(monkeypatch): - from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations - from azure.ai.ml._azure_environments import AzureEnvironments - - monkeypatch.setattr( - ArmConnectionOperations, - "_build_connection_dict", - mock_build_connection_dict_func3 - ) - with ( - patch('azure.ai.ml._azure_environments._get_default_cloud_name') as mock_cloud_name, - patch('azure.mgmt.cognitiveservices.CognitiveServicesManagementClient') as mock - ): - mock_cloud_name.return_value = AzureEnvironments.ENV_DEFAULT - instance = mock.return_value - instance.deployments.list.return_value = { - Deployment("deployment1", "model1", GPT4V_VERSION), - Deployment("deployment2", "model2", "version2") - } - res = list_deployment_names( - DEFAULT_SUBSCRIPTION_ID, - DEFAULT_RESOURCE_GROUP_NAME, - DEFAULT_WORKSPACE_NAME, - DEFAULT_CONNECTION - ) - assert len(res) == 1 - assert res[0].get("value") == "deployment1" - assert res[0].get("display_value") == "deployment1" - - -def test_list_deployment_names_sovereign_credential(monkeypatch): - from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations - from azure.ai.ml._azure_environments import AzureEnvironments - - monkeypatch.setattr( - ArmConnectionOperations, - "_build_connection_dict", - mock_build_connection_dict_func3 - ) - with ( - patch('azure.ai.ml._azure_environments._get_default_cloud_name') as mock_cloud_name, - patch('azure.ai.ml._azure_environments._get_cloud') as mock_cloud, - patch('azure.identity.DefaultAzureCredential') as mock_cre, - patch('azure.mgmt.cognitiveservices.CognitiveServicesManagementClient') as mock - ): - mock_cloud_name.return_value = AzureEnvironments.ENV_CHINA - cloud = mock_cloud.return_value - cloud.get.return_value = "authority" - mock_cre.return_value = "credential" - instance = mock.return_value - instance.deployments.list.return_value = { - Deployment("deployment1", "model1", GPT4V_VERSION), - Deployment("deployment2", "model2", "version2") - } - res = list_deployment_names( - DEFAULT_SUBSCRIPTION_ID, - DEFAULT_RESOURCE_GROUP_NAME, - DEFAULT_WORKSPACE_NAME, - DEFAULT_CONNECTION - ) - assert len(res) == 1 - assert res[0].get("value") == "deployment1" - assert res[0].get("display_value") == "deployment1" +from promptflow.tools.aoai_gpt4v import list_deployment_names +from tests.utils import Deployment @pytest.mark.usefixtures("use_secrets_config_file") class TestAzureOpenAIGPT4V: - def test_openai_gpt4v_chat(self, azure_openai_provider, example_prompt_template_with_image, example_image): - result = azure_openai_provider.chat( + def test_openai_gpt4v_chat(self, aoai_vision_provider, example_prompt_template_with_image, example_image): + result = aoai_vision_provider.chat( prompt=example_prompt_template_with_image, deployment_name="gpt-4v", max_tokens=480, @@ -215,10 +19,10 @@ def test_openai_gpt4v_chat(self, azure_openai_provider, example_prompt_template_ ) assert "10" == result # verify if openai built-in retry mechanism is disabled - assert azure_openai_provider._client.max_retries == 0 + assert aoai_vision_provider._client.max_retries == 0 - def test_openai_gpt4v_stream_chat(self, azure_openai_provider, example_prompt_template_with_image, example_image): - result = azure_openai_provider.chat( + def test_openai_gpt4v_stream_chat(self, aoai_vision_provider, example_prompt_template_with_image, example_image): + result = aoai_vision_provider.chat( prompt=example_prompt_template_with_image, deployment_name="gpt-4v", max_tokens=480, @@ -235,10 +39,10 @@ def test_openai_gpt4v_stream_chat(self, azure_openai_provider, example_prompt_te break assert "10" == answer - def test_correctly_pass_params(self, azure_openai_provider, example_prompt_template_with_image, example_image): + def test_correctly_pass_params(self, aoai_vision_provider, example_prompt_template_with_image, example_image): seed_value = 123 - with patch.object(azure_openai_provider._client.chat.completions, 'create') as mock_create: - azure_openai_provider.chat( + with patch.object(aoai_vision_provider._client.chat.completions, 'create') as mock_create: + aoai_vision_provider.chat( prompt=example_prompt_template_with_image, deployment_name="gpt-4v", max_tokens=480, @@ -250,3 +54,15 @@ def test_correctly_pass_params(self, azure_openai_provider, example_prompt_templ mock_create.assert_called_once() called_with_params = mock_create.call_args[1] assert called_with_params['seed'] == seed_value + + def test_list_deployment_names(self): + with patch('promptflow.tools.aoai_gpt4v.list_deployment_connections') as mock_list: + mock_list.return_value = { + Deployment("deployment1", "model1", "vision-preview"), + Deployment("deployment2", "model2", "version2") + } + + res = list_deployment_names("sub", "rg", "ws", "con") + assert len(res) == 1 + assert res[0].get("value") == "deployment1" + assert res[0].get("display_value") == "deployment1" diff --git a/src/promptflow-tools/tests/test_common.py b/src/promptflow-tools/tests/test_common.py index 098f1e1a6ab..8a0032bff46 100644 --- a/src/promptflow-tools/tests/test_common.py +++ b/src/promptflow-tools/tests/test_common.py @@ -1,10 +1,38 @@ -import pytest +from unittest.mock import patch -from promptflow.connections import AzureOpenAIConnection, OpenAIConnection -from promptflow.contracts.multimedia import Image +import pytest from promptflow.tools.common import ChatAPIInvalidFunctions, validate_functions, process_function_call, \ parse_chat, find_referenced_image_set, preprocess_template_string, convert_to_chat_list, ChatInputList, \ + ParseConnectionError, _parse_resource_id, list_deployment_connections, \ normalize_connection_config +from promptflow.tools.exception import ListDeploymentsError + +from promptflow.connections import AzureOpenAIConnection, OpenAIConnection +from promptflow.contracts.multimedia import Image +from tests.utils import CustomException, Deployment + +DEFAULT_SUBSCRIPTION_ID = "sub" +DEFAULT_RESOURCE_GROUP_NAME = "rg" +DEFAULT_WORKSPACE_NAME = "ws" +DEFAULT_ACCOUNT = "account" +DEFAULT_CONNECTION = "conn" + + +def mock_build_connection_dict_func1(**kwargs): + from promptflow.azure.operations._arm_connection_operations import OpenURLFailedUserError + raise OpenURLFailedUserError + + +def mock_build_connection_dict_func2(**kwargs): + return {"value": {"resource_id": "abc"}} + + +def mock_build_connection_dict_func3(**kwargs): + resource_id = ( + f"/subscriptions/{DEFAULT_SUBSCRIPTION_ID}/resourceGroups/{DEFAULT_RESOURCE_GROUP_NAME}" + f"/providers/Microsoft.CognitiveServices/accounts/{DEFAULT_ACCOUNT}" + ) + return {"value": {"resource_id": resource_id}} class TestCommon: @@ -155,6 +183,138 @@ def test_convert_to_chat_list(self, input_data, expected_output): actual_result = convert_to_chat_list(input_data) assert actual_result == expected_output + def test_parse_resource_id(self): + sub = "dummy_sub" + rg = "dummy_rg" + account = "dummy_account" + resource_id = ( + f"/subscriptions/{sub}/resourceGroups/{rg}/providers/" + f"Microsoft.CognitiveServices/accounts/{account}" + ) + parsed_sub, parsed_rg, parsed_account = _parse_resource_id(resource_id) + assert sub == parsed_sub and rg == parsed_rg and account == parsed_account + + @pytest.mark.parametrize( + "resource_id, error_message", + [ + ("", "Connection resourceId format invalid, cur resourceId is "), + ("a/b/c/d", "Connection resourceId format invalid, cur resourceId is a/b/c/d"), + ], + ) + def test_parse_resource_id_with_error(self, resource_id, error_message): + with pytest.raises(ParseConnectionError, match=error_message): + _parse_resource_id(resource_id) + + def test_list_deployment_connections_with_conn_error(self, monkeypatch): + from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations + + monkeypatch.setattr( + ArmConnectionOperations, + "_build_connection_dict", + mock_build_connection_dict_func1 + ) + res = list_deployment_connections( + DEFAULT_SUBSCRIPTION_ID, + DEFAULT_RESOURCE_GROUP_NAME, + DEFAULT_WORKSPACE_NAME, + DEFAULT_CONNECTION + ) + assert res is None + + def test_list_deployment_connections_with_wrong_connection_id(self, monkeypatch): + from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations + + monkeypatch.setattr( + ArmConnectionOperations, + "_build_connection_dict", + mock_build_connection_dict_func2 + ) + with pytest.raises(ListDeploymentsError): + list_deployment_connections( + DEFAULT_SUBSCRIPTION_ID, + DEFAULT_RESOURCE_GROUP_NAME, + DEFAULT_WORKSPACE_NAME, + DEFAULT_CONNECTION, + ) + + def test_list_deployment_connections_with_permission_issue(self, monkeypatch): + from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations + + monkeypatch.setattr( + ArmConnectionOperations, + "_build_connection_dict", + mock_build_connection_dict_func3 + ) + with patch('azure.mgmt.cognitiveservices.CognitiveServicesManagementClient') as mock: + mock.side_effect = CustomException("", 403) + with pytest.raises(ListDeploymentsError) as excinfo: + list_deployment_connections( + DEFAULT_SUBSCRIPTION_ID, + DEFAULT_RESOURCE_GROUP_NAME, + DEFAULT_WORKSPACE_NAME, + DEFAULT_CONNECTION, + ) + assert "Failed to list deployments due to permission issue" in str(excinfo.value) + + def test_list_deployment_connections(self, monkeypatch): + from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations + from azure.ai.ml._azure_environments import AzureEnvironments + + monkeypatch.setattr( + ArmConnectionOperations, + "_build_connection_dict", + mock_build_connection_dict_func3 + ) + with ( + patch('azure.ai.ml._azure_environments._get_default_cloud_name') as mock_cloud_name, + patch('azure.mgmt.cognitiveservices.CognitiveServicesManagementClient') as mock + ): + mock_cloud_name.return_value = AzureEnvironments.ENV_DEFAULT + instance = mock.return_value + instance.deployments.list.return_value = { + Deployment("deployment1", "model1", "vision-preview"), + Deployment("deployment2", "model2", "version2") + } + res = list_deployment_connections( + DEFAULT_SUBSCRIPTION_ID, + DEFAULT_RESOURCE_GROUP_NAME, + DEFAULT_WORKSPACE_NAME, + DEFAULT_CONNECTION + ) + assert len(res) == 2 + + def test_list_deployment_connections_sovereign_credential(self, monkeypatch): + from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations + from azure.ai.ml._azure_environments import AzureEnvironments + + monkeypatch.setattr( + ArmConnectionOperations, + "_build_connection_dict", + mock_build_connection_dict_func3 + ) + with ( + patch('azure.ai.ml._azure_environments._get_default_cloud_name') as mock_cloud_name, + patch('azure.ai.ml._azure_environments._get_cloud') as mock_cloud, + patch('azure.identity.DefaultAzureCredential') as mock_cre, + patch('azure.mgmt.cognitiveservices.CognitiveServicesManagementClient') as mock + ): + mock_cloud_name.return_value = AzureEnvironments.ENV_CHINA + cloud = mock_cloud.return_value + cloud.get.return_value = "authority" + mock_cre.return_value = "credential" + instance = mock.return_value + instance.deployments.list.return_value = { + Deployment("deployment1", "model1", "vision-preview"), + Deployment("deployment2", "model2", "version2") + } + res = list_deployment_connections( + DEFAULT_SUBSCRIPTION_ID, + DEFAULT_RESOURCE_GROUP_NAME, + DEFAULT_WORKSPACE_NAME, + DEFAULT_CONNECTION + ) + assert len(res) == 2 + @pytest.mark.parametrize( "input_data, expected_output", [ diff --git a/src/promptflow-tools/tests/test_handle_openai_error.py b/src/promptflow-tools/tests/test_handle_openai_error.py index 6ffb41cbd49..1dfe46442b9 100644 --- a/src/promptflow-tools/tests/test_handle_openai_error.py +++ b/src/promptflow-tools/tests/test_handle_openai_error.py @@ -1,5 +1,6 @@ import httpx import pytest +from unittest.mock import patch from jinja2.exceptions import TemplateSyntaxError from openai import ( APIConnectionError, @@ -17,6 +18,7 @@ from pytest_mock import MockerFixture from promptflow.exceptions import UserErrorException +from tests.utils import Deployment @pytest.mark.usefixtures("use_secrets_config_file") @@ -301,3 +303,33 @@ def test_aoai_invalid_max_tokens( ) assert error_message in exc_info.value.message assert exc_info.value.error_codes == error_codes.split("/") + + @pytest.mark.skip("Skip this before we figure out how to make token provider work on github action") + def test_authentication_fail_for_aoai_meid_token_connection(self, azure_open_ai_connection_meid): + prompt_template = "please complete this sentence: world war II " + raw_message = ( + "please make sure you have proper role assignment on your azure openai resource" + ) + error_codes = "UserError/OpenAIError/AuthenticationError" + with pytest.raises(WrappedOpenAIError) as exc_info: + chat(azure_open_ai_connection_meid, prompt=f"user:\n{prompt_template}", deployment_name="gpt-35-turbo") + assert raw_message in exc_info.value.message + assert exc_info.value.error_codes == error_codes.split("/") + + def test_aoai_with_vision_model_extra_fields_error(self, azure_open_ai_connection): + with ( + patch('promptflow.tools.common.get_workspace_triad') as mock_get, + patch('promptflow.tools.common.list_deployment_connections') as mock_list, + pytest.raises(LLMError) as exc_info + ): + mock_get.return_value = ("sub", "rg", "ws") + mock_list.return_value = { + Deployment("gpt-4v", "model1", "vision-preview"), + Deployment("deployment2", "model2", "version2") + } + + chat(connection=azure_open_ai_connection, prompt="user:\nhello", deployment_name="gpt-4v", + response_format={"type": "text"}) + + assert "extra fields not permitted" in exc_info.value.message + assert "Please kindly avoid using vision model in LLM tool" in exc_info.value.message diff --git a/src/promptflow-tools/tests/test_open_model_llm.py b/src/promptflow-tools/tests/test_open_model_llm.py index 89d12e3981c..80a44066d0b 100644 --- a/src/promptflow-tools/tests/test_open_model_llm.py +++ b/src/promptflow-tools/tests/test_open_model_llm.py @@ -102,6 +102,7 @@ def completion_endpoints_provider(endpoints_provider: Dict[str, List[str]]) -> D return completion_endpoints +@pytest.mark.skip("Skipping - requires new test resources") @pytest.mark.usefixtures("use_secrets_config_file") class TestOpenModelLLM: stateless_os_llm = OpenModelLLM() diff --git a/src/promptflow-tools/tests/utils.py b/src/promptflow-tools/tests/utils.py index 21cd90232ef..ce9dc7fd2b3 100644 --- a/src/promptflow-tools/tests/utils.py +++ b/src/promptflow-tools/tests/utils.py @@ -11,6 +11,29 @@ def __getattr__(self, item): return super().__getattribute__(item) +class Deployment: + def __init__(self, name, model_name, version): + self.name = name + self.properties = Properties(model_name, version) + + +class CustomException(Exception): + def __init__(self, message, status_code): + super().__init__(message) + self.status_code = status_code + + +class Model: + def __init__(self, name, version): + self.name = name + self.version = version + + +class Properties: + def __init__(self, name, version): + self.model = Model(name, version) + + def is_json_serializable(data, function_name): try: json.dumps(data) diff --git a/src/promptflow-tracing/README.md b/src/promptflow-tracing/README.md new file mode 100644 index 00000000000..ae8fee2ee63 --- /dev/null +++ b/src/promptflow-tracing/README.md @@ -0,0 +1,23 @@ +# Prompt flow tracing + +[![Python package](https://img.shields.io/pypi/v/promptflow-tracing)](https://pypi.org/project/promptflow-tracing/) +[![SDK](https://img.shields.io/badge/SDK-reference-blue)](https://microsoft.github.io/promptflow/reference/python-library-reference/promptflow-tracing/promptflow.tracing.html) +[![License: MIT](https://img.shields.io/github/license/microsoft/promptflow)](https://github.com/microsoft/promptflow/blob/main/LICENSE) + +## Introduction + +The `promptflow-tracing` package offers tracing capabilities to capture and illustrate the internal execution processes of both DAG flow and Flex flow. It is designed to be compatible with [OpenTelemetry](https://opentelemetry.io/). This makes it a valuable tool for Flex flow developers who use various frameworks (such as langchain, semantic kernel, OpenAI, and various agents) to build LLM-based applications. By using promptflow-tracing, developers can achieve comprehensive observability of their LLM applications. + +# Release History + +## 1.0.0 (2024.03.21) + +- Compatible with promptflow 1.7.0. + +## 0.1.0b2 (2024.03.18) + +- First preview version. + +## 0.1.0b1 (2024.03.08) + +- Stub version in PyPI. diff --git a/src/promptflow/promptflow/tracing/__init__.py b/src/promptflow-tracing/promptflow/tracing/__init__.py similarity index 79% rename from src/promptflow/promptflow/tracing/__init__.py rename to src/promptflow-tracing/promptflow/tracing/__init__.py index f3c7fc9506b..d2cb2ebf088 100644 --- a/src/promptflow/promptflow/tracing/__init__.py +++ b/src/promptflow-tracing/promptflow/tracing/__init__.py @@ -6,5 +6,6 @@ from ._start_trace import start_trace from ._trace import trace +from ._version import __version__ -__all__ = ["start_trace", "trace"] +__all__ = ["__version__", "start_trace", "trace"] diff --git a/src/promptflow-tracing/promptflow/tracing/_constants.py b/src/promptflow-tracing/promptflow/tracing/_constants.py new file mode 100644 index 00000000000..6535957ef99 --- /dev/null +++ b/src/promptflow-tracing/promptflow/tracing/_constants.py @@ -0,0 +1,13 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + + +class ResourceAttributesFieldName: + SERVICE_NAME = "service.name" + COLLECTION = "collection" + + +RESOURCE_ATTRIBUTES_SERVICE_NAME = "promptflow" + +PF_TRACING_SKIP_LOCAL_SETUP_ENVIRON = "PF_TRACING_SKIP_LOCAL_SETUP" diff --git a/src/promptflow-tracing/promptflow/tracing/_integrations/__init__.py b/src/promptflow-tracing/promptflow/tracing/_integrations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/promptflow/promptflow/tracing/_openai_injector.py b/src/promptflow-tracing/promptflow/tracing/_integrations/_openai_injector.py similarity index 75% rename from src/promptflow/promptflow/tracing/_openai_injector.py rename to src/promptflow-tracing/promptflow/tracing/_integrations/_openai_injector.py index f9946ef5407..5faa7630830 100644 --- a/src/promptflow/promptflow/tracing/_openai_injector.py +++ b/src/promptflow-tracing/promptflow/tracing/_integrations/_openai_injector.py @@ -12,27 +12,25 @@ import openai -from promptflow._core.operation_context import OperationContext - -from ._trace import _traced_async, _traced_sync -from .contracts.trace import TraceType - +from .._operation_context import OperationContext +from .._trace import _traced_async, _traced_sync +from ..contracts.trace import TraceType USER_AGENT_HEADER = "x-ms-useragent" PROMPTFLOW_HEADER = "ms-azure-ai-promptflow" IS_LEGACY_OPENAI = version("openai").startswith("0.") -def inject_function_async(args_to_ignore=None, trace_type=TraceType.LLM): +def inject_function_async(args_to_ignore=None, trace_type=TraceType.LLM, name=None): def decorator(func): - return _traced_async(func, args_to_ignore=args_to_ignore, trace_type=trace_type) + return _traced_async(func, args_to_ignore=args_to_ignore, trace_type=trace_type, name=name) return decorator -def inject_function_sync(args_to_ignore=None, trace_type=TraceType.LLM): +def inject_function_sync(args_to_ignore=None, trace_type=TraceType.LLM, name=None): def decorator(func): - return _traced_sync(func, args_to_ignore=args_to_ignore, trace_type=trace_type) + return _traced_sync(func, args_to_ignore=args_to_ignore, trace_type=trace_type, name=name) return decorator @@ -46,6 +44,7 @@ def get_aoai_telemetry_headers() -> dict: Returns: A dictionary of http headers. """ + # get promptflow info from operation context operation_context = OperationContext.get_instance() tracking_info = operation_context._get_tracking_info() @@ -91,60 +90,67 @@ def wrapper(*args, **kwargs): return wrapper -def inject_async(f, trace_type): +def inject_async(f, trace_type, name): wrapper_fun = inject_operation_headers( - (inject_function_async(["api_key", "headers", "extra_headers"], trace_type)(f)) + (inject_function_async(["api_key", "headers", "extra_headers"], trace_type, name)(f)) ) wrapper_fun._original = f return wrapper_fun -def inject_sync(f, trace_type): +def inject_sync(f, trace_type, name): wrapper_fun = inject_operation_headers( - (inject_function_sync(["api_key", "headers", "extra_headers"], trace_type)(f)) + (inject_function_sync(["api_key", "headers", "extra_headers"], trace_type, name)(f)) ) wrapper_fun._original = f return wrapper_fun +def _legacy_openai_apis(): + sync_apis = ( + ("openai", "Completion", "create", TraceType.LLM, "openai_completion_legacy"), + ("openai", "ChatCompletion", "create", TraceType.LLM, "openai_chat_legacy"), + ("openai", "Embedding", "create", TraceType.EMBEDDING, "openai_embedding_legacy"), + ) + async_apis = ( + ("openai", "Completion", "acreate", TraceType.LLM, "openai_completion_legacy"), + ("openai", "ChatCompletion", "acreate", TraceType.LLM, "openai_chat_legacy"), + ("openai", "Embedding", "acreate", TraceType.EMBEDDING, "openai_embedding_legacy"), + ) + return sync_apis, async_apis + + +def _openai_apis(): + sync_apis = ( + ("openai.resources.chat", "Completions", "create", TraceType.LLM, "openai_chat"), + ("openai.resources", "Completions", "create", TraceType.LLM, "openai_completion"), + ("openai.resources", "Embeddings", "create", TraceType.EMBEDDING, "openai_embeddings"), + ) + async_apis = ( + ("openai.resources.chat", "AsyncCompletions", "create", TraceType.LLM, "openai_chat_async"), + ("openai.resources", "AsyncCompletions", "create", TraceType.LLM, "openai_completion_async"), + ("openai.resources", "AsyncEmbeddings", "create", TraceType.EMBEDDING, "openai_embeddings_async"), + ) + return sync_apis, async_apis + + def _openai_api_list(): if IS_LEGACY_OPENAI: - sync_apis = ( - ("openai", "Completion", "create", TraceType.LLM), - ("openai", "ChatCompletion", "create", TraceType.LLM), - ("openai", "Embedding", "create", TraceType.EMBEDDING), - ) - - async_apis = ( - ("openai", "Completion", "acreate", TraceType.LLM), - ("openai", "ChatCompletion", "acreate", TraceType.LLM), - ("openai", "Embedding", "acreate", TraceType.EMBEDDING), - ) + sync_apis, async_apis = _legacy_openai_apis() else: - sync_apis = ( - ("openai.resources.chat", "Completions", "create", TraceType.LLM), - ("openai.resources", "Completions", "create", TraceType.LLM), - ("openai.resources", "Embeddings", "create", TraceType.EMBEDDING), - ) - - async_apis = ( - ("openai.resources.chat", "AsyncCompletions", "create", TraceType.LLM), - ("openai.resources", "AsyncCompletions", "create", TraceType.LLM), - ("openai.resources", "AsyncEmbeddings", "create", TraceType.EMBEDDING), - ) - + sync_apis, async_apis = _openai_apis() yield sync_apis, inject_sync yield async_apis, inject_async def _generate_api_and_injector(apis): for apis, injector in apis: - for module_name, class_name, method_name, trace_type in apis: + for module_name, class_name, method_name, trace_type, name in apis: try: module = importlib.import_module(module_name) api = getattr(module, class_name) if hasattr(api, method_name): - yield api, method_name, trace_type, injector + yield api, method_name, trace_type, injector, name except AttributeError as e: # Log the attribute exception with the missing class information logging.warning( @@ -177,10 +183,10 @@ def inject_openai_api(): 2. Updates the openai api configs from environment variables. """ - for api, method, trace_type, injector in available_openai_apis_and_injectors(): + for api, method, trace_type, injector, name in available_openai_apis_and_injectors(): # Check if the create method of the openai_api class has already been modified if not hasattr(getattr(api, method), "_original"): - setattr(api, method, injector(getattr(api, method), trace_type)) + setattr(api, method, injector(getattr(api, method), trace_type, name)) if IS_LEGACY_OPENAI: # For the openai versions lower than 1.0.0, it reads api configs from environment variables only at @@ -199,6 +205,6 @@ def recover_openai_api(): """This function restores the original create methods of the OpenAI API classes by assigning them back from the _original attributes of the modified methods. """ - for api, method, _, _ in available_openai_apis_and_injectors(): + for api, method, _, _, _ in available_openai_apis_and_injectors(): if hasattr(getattr(api, method), "_original"): setattr(api, method, getattr(getattr(api, method), "_original")) diff --git a/src/promptflow/promptflow/_utils/openai_metrics_calculator.py b/src/promptflow-tracing/promptflow/tracing/_openai_utils.py similarity index 71% rename from src/promptflow/promptflow/_utils/openai_metrics_calculator.py rename to src/promptflow-tracing/promptflow/tracing/_openai_utils.py index 7bf269ad1de..c0ea789b229 100644 --- a/src/promptflow/promptflow/_utils/openai_metrics_calculator.py +++ b/src/promptflow-tracing/promptflow/tracing/_openai_utils.py @@ -1,8 +1,7 @@ import tiktoken +from abc import ABC, abstractmethod from importlib.metadata import version -from promptflow.exceptions import UserErrorException - IS_LEGACY_OPENAI = version("openai").startswith("0.") @@ -39,6 +38,7 @@ def _need_collect_metrics(self, api_call: dict): return True def _get_openai_metrics_for_signal_api(self, api_call: dict): + inputs = api_call.get("inputs") output = api_call.get("output") if isinstance(output, dict): usage = output.get("usage") @@ -57,23 +57,23 @@ def _get_openai_metrics_for_signal_api(self, api_call: dict): # https://github.com/openai/openai-python/blob/main/src/openai/resources/chat/completions.py # https://github.com/openai/openai-python/blob/main/src/openai/resources/completions.py if ( - name == "openai.api_resources.chat_completion.ChatCompletion.create" - or name == "openai.resources.chat.completions.Completions.create" # openai v1 + name == "openai_chat_legacy" + or name == "openai_chat" # openai v1 ): - return self._get_openai_metrics_for_chat_api(api_call) + return self.get_openai_metrics_for_chat_api(inputs, output) elif ( - name == "openai.api_resources.completion.Completion.create" - or name == "openai.resources.completions.Completions.create" # openai v1 + name == "openai_completion_legacy" + or name == "openai_completion" # openai v1 ): - return self._get_openai_metrics_for_completion_api(api_call) + return self.get_openai_metrics_for_completion_api(inputs, output) else: - raise CalculatingMetricsError(f"Calculating metrics for api {name} is not supported.") + self._log_warning(f"Calculating metrics for api {name} is not supported.") def _try_get_model(self, inputs, output): if IS_LEGACY_OPENAI: api_type = inputs.get("api_type") if not api_type: - raise CalculatingMetricsError("Cannot calculate metrics for none or empty api_type.") + self._log_warning("Cannot calculate metrics for none or empty api_type.") if api_type == "azure": model = inputs.get("engine") else: @@ -82,19 +82,21 @@ def _try_get_model(self, inputs, output): if isinstance(output, dict): model = output.get("model") else: - model = output[0].model if len(output) > 0 and hasattr(output[0], "model") else None + model = None + for chunk in output: + if hasattr(chunk, "model"): + model = chunk.model + break if not model: model = inputs.get("model") if not model: - raise CalculatingMetricsError( + raise self._log_warning( "Cannot get a valid model to calculate metrics. " "Please specify a engine for AzureOpenAI API or a model for OpenAI API." ) return model - def _get_openai_metrics_for_chat_api(self, api_call): - inputs = api_call.get("inputs") - output = api_call.get("output") + def get_openai_metrics_for_chat_api(self, inputs, output): metrics = {} enc, tokens_per_message, tokens_per_name = self._get_encoding_for_chat_api(self._try_get_model(inputs, output)) metrics["prompt_tokens"] = self._get_prompt_tokens_from_messages( @@ -124,7 +126,7 @@ def _get_encoding_for_chat_api(self, model): tokens_per_message = 3 tokens_per_name = 1 else: - raise CalculatingMetricsError(f"Calculating metrics for model {model} is not supported.") + self._log_warning(f"Calculating metrics for model {model} is not supported.") return enc, tokens_per_message, tokens_per_name def _get_prompt_tokens_from_messages(self, messages, enc, tokens_per_message, tokens_per_name): @@ -151,10 +153,8 @@ def _get_completion_tokens_for_chat_api(self, output, enc): completion_tokens += len(enc.encode(content)) return completion_tokens - def _get_openai_metrics_for_completion_api(self, api_call: dict): + def get_openai_metrics_for_completion_api(self, inputs, output): metrics = {} - inputs = api_call.get("inputs") - output = api_call.get("output") enc = self._get_encoding_for_completion_api(self._try_get_model(inputs, output)) metrics["prompt_tokens"] = 0 prompt = inputs.get("prompt") @@ -201,7 +201,63 @@ def _log_warning(self, msg): self._logger.warning(msg) -class CalculatingMetricsError(UserErrorException): - """The exception that is raised when calculating metrics failed.""" +class OpenAIResponseParser(ABC): + def __init__(self, response, is_chat): + self._response = response + self._is_chat = is_chat + + @property + def model(self): + for item in self._response: + if hasattr(item, "model"): + return item.model + return None + + @property + def is_chat(self): + return self._is_chat + + @staticmethod + def init_parser(response): + if IS_LEGACY_OPENAI: + return None + + from openai.types.chat.chat_completion_chunk import ChatCompletionChunk + from openai.types.completion import Completion + + if response and isinstance(response[0], ChatCompletionChunk): + return OpenAIChatResponseParser(response, True) + elif response and isinstance(response[0], Completion): + return OpenAICompletionResponseParser(response, False) + else: + raise NotImplementedError("Only support 'ChatCompletionChunk' and 'Completion' response.") + + @abstractmethod + def get_generated_message(self): + pass + + +class OpenAIChatResponseParser(OpenAIResponseParser): + def __init__(self, response, is_chat): + super().__init__(response, is_chat) + + def get_generated_message(self): + chunks = [] + role = "assistant" + for item in self._response: + if item.choices and item.choices[0].delta.content: + chunks.append(item.choices[0].delta.content) + role = item.choices[0].delta.role or role + return {"content": "".join(chunks), "role": role} if chunks else None + + +class OpenAICompletionResponseParser(OpenAIResponseParser): + def __init__(self, response, is_chat): + super().__init__(response, is_chat) - pass + def get_generated_message(self): + chunks = [] + for item in self._response: + if item.choices and item.choices[0].text: + chunks.append(item.choices[0].text) + return "".join(chunks) if chunks else None diff --git a/src/promptflow/promptflow/_core/operation_context.py b/src/promptflow-tracing/promptflow/tracing/_operation_context.py similarity index 67% rename from src/promptflow/promptflow/_core/operation_context.py rename to src/promptflow-tracing/promptflow/tracing/_operation_context.py index 6bb146c5bdc..ecde2f094cb 100644 --- a/src/promptflow/promptflow/_core/operation_context.py +++ b/src/promptflow-tracing/promptflow/tracing/_operation_context.py @@ -3,9 +3,9 @@ # --------------------------------------------------------- import copy from contextvars import ContextVar -from typing import Dict, Mapping +from typing import Dict -from promptflow._version import VERSION +from ._version import VERSION class OperationContext(Dict): @@ -18,13 +18,18 @@ class OperationContext(Dict): """ _CONTEXT_KEY = "operation_context" - _OTEL_ATTRIBUTES = "_otel_attributes" _current_context = ContextVar(_CONTEXT_KEY, default=None) USER_AGENT_KEY = "user_agent" REQUEST_ID_KEY = "request_id" - _DEFAULT_TRACKING_KEYS = {"run_mode", "root_run_id", "flow_id", "batch_input_source"} + _DEFAULT_TRACING_KEYS = "_default_tracing_keys" + _OTEL_ATTRIBUTES = "_otel_attributes" _TRACKING_KEYS = "_tracking_keys" + def copy(self): + ctx = OperationContext(self) + ctx[OperationContext._OTEL_ATTRIBUTES] = copy.copy(self._get_otel_attributes()) + return ctx + def _add_otel_attributes(self, key, value): attributes = self.get(OperationContext._OTEL_ATTRIBUTES, {}) attributes[key] = value @@ -60,10 +65,14 @@ def get_instance(cls): # create a new instance and set it in the current context instance = OperationContext() cls._current_context.set(instance) - if cls._TRACKING_KEYS not in instance: - instance[cls._TRACKING_KEYS] = copy.copy(cls._DEFAULT_TRACKING_KEYS) + if cls._TRACKING_KEYS not in instance and cls._DEFAULT_TRACING_KEYS in instance: + instance[cls._TRACKING_KEYS] = copy.copy(instance[cls._DEFAULT_TRACING_KEYS]) return instance + @classmethod + def set_instance(cls, instance): + cls._current_context.set(instance) + def __setattr__(self, name, value): """Set the attribute. @@ -128,7 +137,7 @@ def get_user_agent(self): def parts(): if OperationContext.USER_AGENT_KEY in self: yield self.get(OperationContext.USER_AGENT_KEY) - yield f"promptflow/{VERSION}" + yield f"promptflow-tracing/{VERSION}" # strip to avoid leading or trailing spaces, which may cause error when sending request ua = " ".join(parts()).strip() @@ -144,6 +153,9 @@ def append_user_agent(self, user_agent: str): user_agent (str): The user agent information to append. """ if OperationContext.USER_AGENT_KEY in self: + # TODO: this judgement can be wrong when an user agent is a substring of another, + # e.g. "Mozilla/5.0" and "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" + # however, changing this code may impact existing logic, so won't change it now if user_agent not in self.user_agent: self.user_agent = f"{self.user_agent.strip()} {user_agent.strip()}" else: @@ -154,47 +166,14 @@ def get_request_id(self): return self.get(OperationContext.REQUEST_ID_KEY) return "unknown" - def set_batch_input_source_from_inputs_mapping(self, inputs_mapping: Mapping[str, str]): - """Infer the batch input source from the input mapping and set it in the OperationContext instance. - - This method analyzes the `inputs_mapping` to ascertain the origin of the inputs for a batch operation. - The `inputs_mapping` should be a dictionary with keys representing input names and values specifying the sources - of these inputs. Inputs can originate from direct data or from the outputs of a previous run. - - The `inputs_mapping` is dictated entirely by the external caller. For more details on column mapping, refer to - https://aka.ms/pf/column-mapping. The mapping can include references to both the inputs and outputs of previous - runs, using a reserved source name 'run' to indicate such references. However, this method specifically checks - for references to outputs of previous runs, which are denoted by values starting with "${run.outputs". When such - a reference is found, the `batch_input_source` attribute of the OperationContext instance is set to "Run" to - reflect that the batch operation is utilizing outputs from a prior run. - - If no values in the `inputs_mapping` start with "${run.outputs", it is inferred that the inputs do not derive - from a previous run, and the `batch_input_source` is set to "Data". - - Examples of `inputs_mapping`: - - Referencing a previous run's output: - {'input1': '${run.outputs.some_output}', 'input2': 'direct_data'} - In this case, 'input1' is sourced from a prior run's output, and 'input2' is from direct data. - The `batch_input_source` would be set to "Run". - - - Sourcing directly from data: - {'input1': 'data_source1', 'input2': 'data_source2'} - Since no values start with "${run.outputs", the `batch_input_source` is set to "Data". - - Args: - inputs_mapping (Mapping[str, str]): A dictionary mapping input names to their sources, where the sources - can be either direct data or outputs from a previous run. The structure and content of this mapping are - entirely under the control of the external caller. - - Returns: - None - """ - if inputs_mapping and any( - isinstance(value, str) and value.startswith("${run.outputs") for value in inputs_mapping.values() - ): - self.batch_input_source = "Run" + def set_default_tracing_keys(self, keys: set): + self[self._DEFAULT_TRACING_KEYS] = keys + if not hasattr(self, self._TRACKING_KEYS): + self[self._TRACKING_KEYS] = copy.copy(keys) else: - self.batch_input_source = "Data" + for key in keys: + if key not in self[self._TRACKING_KEYS]: + self[self._TRACKING_KEYS].add(key) def get_context_dict(self): """Get the context dictionary. @@ -209,5 +188,5 @@ def get_context_dict(self): return dict(self) def _get_tracking_info(self): - keys = getattr(self, self._TRACKING_KEYS, self._DEFAULT_TRACKING_KEYS) + keys = getattr(self, self._TRACKING_KEYS, getattr(self, self._DEFAULT_TRACING_KEYS, [])) return {k: v for k, v in self.items() if k in keys} diff --git a/src/promptflow-tracing/promptflow/tracing/_start_trace.py b/src/promptflow-tracing/promptflow/tracing/_start_trace.py new file mode 100644 index 00000000000..98790855de9 --- /dev/null +++ b/src/promptflow-tracing/promptflow/tracing/_start_trace.py @@ -0,0 +1,109 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import os +import typing + +from opentelemetry import trace +from opentelemetry.sdk.environment_variables import OTEL_EXPORTER_OTLP_ENDPOINT +from opentelemetry.sdk.resources import Resource +from opentelemetry.sdk.trace import TracerProvider + +from ._constants import ( + PF_TRACING_SKIP_LOCAL_SETUP_ENVIRON, + RESOURCE_ATTRIBUTES_SERVICE_NAME, + ResourceAttributesFieldName, +) +from ._integrations._openai_injector import inject_openai_api + + +def start_trace( + *, + resource_attributes: typing.Optional[dict] = None, + collection: typing.Optional[str] = None, + **kwargs, +): + """Promptflow instrumentation. + + Instrument `openai`, and set tracer provider for current process. + + :param resource_attributes: Specify the resource attributes for current process. + :type resource_attributes: typing.Optional[dict] + :param collection: Specify the collection for current tracing. + :type collection: typing.Optional[str] + """ + + # When PF_TRACING_SKIP_LOCAL_SETUP_ENVIRON is set to true, the start_trace should be skipped. + # An example is that user call start_trace at cloud mode. Nothing should happen. + if _skip_tracing_local_setup(): + return + + # prepare resource.attributes and set tracer provider + res_attrs = {ResourceAttributesFieldName.SERVICE_NAME: RESOURCE_ATTRIBUTES_SERVICE_NAME} + if collection is not None: + res_attrs[ResourceAttributesFieldName.COLLECTION] = collection + if isinstance(resource_attributes, dict): + for attr_key, attr_value in resource_attributes.items(): + res_attrs[attr_key] = attr_value + _set_tracer_provider(res_attrs) + + if _is_devkit_installed(): + from promptflow._sdk._tracing import start_trace_with_devkit + + start_trace_with_devkit( + collection=collection, + attrs=kwargs.get("attributes", None), + run=kwargs.get("run", None), + ) + + +def setup_exporter_from_environ() -> None: + + # openai instrumentation + inject_openai_api() + + # Ignore all the setup if the endpoint is not set + endpoint = os.getenv(OTEL_EXPORTER_OTLP_ENDPOINT) + if not endpoint: + return + + if _is_devkit_installed(): + from promptflow._sdk._tracing import setup_exporter_to_pfs + + setup_exporter_to_pfs() + + +def _skip_tracing_local_setup() -> bool: + return str(os.getenv(PF_TRACING_SKIP_LOCAL_SETUP_ENVIRON, "false")).lower() == "true" + + +def _is_tracer_provider_set() -> bool: + return isinstance(trace.get_tracer_provider(), TracerProvider) + + +def _force_set_tracer_provider(tracer_provider: TracerProvider) -> None: + from opentelemetry.trace import _TRACER_PROVIDER_SET_ONCE + + with _TRACER_PROVIDER_SET_ONCE._lock: + _TRACER_PROVIDER_SET_ONCE._done = False + + trace.set_tracer_provider(tracer_provider) + + +def _set_tracer_provider(res_attrs: typing.Dict[str, str]) -> None: + res = Resource(attributes=res_attrs) + tracer_provider = TracerProvider(resource=res) + if _is_tracer_provider_set(): + _force_set_tracer_provider(tracer_provider) + else: + trace.set_tracer_provider(tracer_provider) + + +def _is_devkit_installed() -> bool: + try: + from promptflow._sdk._tracing import setup_exporter_to_pfs, start_trace_with_devkit # noqa: F401 + + return True + except ImportError: + return False diff --git a/src/promptflow/promptflow/_core/thread_local_singleton.py b/src/promptflow-tracing/promptflow/tracing/_thread_local_singleton.py similarity index 100% rename from src/promptflow/promptflow/_core/thread_local_singleton.py rename to src/promptflow-tracing/promptflow/tracing/_thread_local_singleton.py diff --git a/src/promptflow/promptflow/tracing/_trace.py b/src/promptflow-tracing/promptflow/tracing/_trace.py similarity index 66% rename from src/promptflow/promptflow/tracing/_trace.py rename to src/promptflow-tracing/promptflow/tracing/_trace.py index 3f11c874434..180d308ecd3 100644 --- a/src/promptflow/promptflow/tracing/_trace.py +++ b/src/promptflow-tracing/promptflow/tracing/_trace.py @@ -12,19 +12,17 @@ from typing import Callable, List, Optional import opentelemetry.trace as otel_trace +from opentelemetry.sdk.trace import ReadableSpan from opentelemetry.trace import Link -from opentelemetry.trace.status import StatusCode from opentelemetry.trace.span import NonRecordingSpan -from opentelemetry.sdk.trace import ReadableSpan - -from promptflow._core.generator_proxy import GeneratorProxy -from promptflow._core.operation_context import OperationContext -from promptflow._utils.dataclass_serializer import serialize -from promptflow._utils.tool_utils import get_inputs_for_prompt_template, get_prompt_param_name_from_func +from opentelemetry.trace.status import StatusCode -from .._utils.utils import default_json_encoder -from ._tracer import _create_trace_from_function_call, get_node_name_from_context, Tracer -from .contracts.trace import TraceType +from ._openai_utils import OpenAIMetricsCalculator, OpenAIResponseParser +from ._operation_context import OperationContext +from ._tracer import Tracer, _create_trace_from_function_call, get_node_name_from_context +from ._utils import get_input_names_for_prompt_template, get_prompt_param_name_from_func, serialize +from .contracts.generator_proxy import GeneratorProxy +from .contracts.trace import Trace, TraceType IS_LEGACY_OPENAI = version("openai").startswith("0.") @@ -45,6 +43,16 @@ def collect_openai_tokens(self, span, output): with self._lock: self._span_id_to_tokens[span_id] = tokens + def collect_openai_tokens_for_streaming(self, span, inputs, output, is_chat): + span_id = span.get_span_context().span_id + calculator = OpenAIMetricsCalculator() + if is_chat: + tokens = calculator.get_openai_metrics_for_chat_api(inputs, output) + else: + tokens = calculator.get_openai_metrics_for_completion_api(inputs, output) + with self._lock: + self._span_id_to_tokens[span_id] = tokens + def collect_openai_tokens_for_parent_span(self, span): tokens = self.try_get_openai_tokens(span.get_span_context().span_id) if tokens: @@ -77,13 +85,13 @@ def enrich_span_with_context(span): logging.warning(f"Failed to enrich span with context: {e}") -def enrich_span_with_trace(span, trace): +def enrich_span_with_trace(span, trace: Trace): try: span.set_attributes( { "framework": "promptflow", "span_type": trace.type.value, - "function": trace.name, + "function": trace.function, } ) node_name = get_node_name_from_context() @@ -101,9 +109,12 @@ def enrich_span_with_prompt_info(span, func, kwargs): prompt_tpl_param_name = get_prompt_param_name_from_func(func) if prompt_tpl_param_name is not None: prompt_tpl = kwargs.get(prompt_tpl_param_name) - prompt_vars = {key: kwargs.get(key) for key in get_inputs_for_prompt_template(prompt_tpl) if key in kwargs} + prompt_vars = { + name: kwargs.get(name) for name in get_input_names_for_prompt_template(prompt_tpl) if name in kwargs + } prompt_info = {"prompt.template": prompt_tpl, "prompt.variables": serialize_attribute(prompt_vars)} span.set_attributes(prompt_info) + span.add_event("promptflow.prompt.template", {"payload": serialize_attribute(prompt_info)}) except Exception as e: logging.warning(f"Failed to enrich span with prompt info: {e}") @@ -112,6 +123,7 @@ def enrich_span_with_input(span, input): try: serialized_input = serialize_attribute(input) span.set_attribute("inputs", serialized_input) + span.add_event("promptflow.function.inputs", {"payload": serialized_input}) except Exception as e: logging.warning(f"Failed to enrich span with input: {e}") @@ -120,16 +132,21 @@ def enrich_span_with_input(span, input): def enrich_span_with_trace_type(span, inputs, output, trace_type): if trace_type == TraceType.LLM: + # Handle the non-streaming output of LLM, the streaming output will be handled in traced_generator. token_collector.collect_openai_tokens(span, output) - enrich_span_with_llm_model(span, output) + enrich_span_with_llm_output(span, output) elif trace_type == TraceType.EMBEDDING: token_collector.collect_openai_tokens(span, output) enrich_span_with_embedding(span, inputs, output) enrich_span_with_openai_tokens(span, trace_type) - return enrich_span_with_output(span, output) + enrich_span_with_output(span, output) + # If the output is a generator, while the span is a valid span, we will trace the generator. + if isinstance(output, Iterator) and not isinstance(span, NonRecordingSpan): + output = traced_generator(span, inputs, output) + return output -def traced_generator(generator, original_span: ReadableSpan): +def traced_generator(original_span: ReadableSpan, inputs, generator): context = original_span.get_span_context() link = Link(context) # If start_trace is not called, the name of the original_span will be empty. @@ -137,43 +154,53 @@ def traced_generator(generator, original_span: ReadableSpan): f"Iterated({original_span.name})", links=[link], ) as span: - span.set_attributes(original_span.attributes) + enrich_span_with_original_attributes(span, original_span.attributes) + # Enrich the new span with input before generator iteration to prevent loss of input information. + # The input is as an event within this span. + enrich_span_with_input(span, inputs) generator_proxy = GeneratorProxy(generator) yield from generator_proxy generator_output = generator_proxy.items - # Enrich LLM span for openai steaming message - # TODO: Enrich LLM token count for streaming scenario + # Enrich LLM span for OpenAI streaming output if original_span.attributes["span_type"] == "LLM" and not IS_LEGACY_OPENAI: from openai.types.chat.chat_completion_chunk import ChatCompletionChunk - chunks = [] - role = "assistant" - for item in generator_output: - if not isinstance(item, ChatCompletionChunk): - continue - if item.choices and item.choices[0].delta.content: - chunks.append(item.choices[0].delta.content) - role = item.choices[0].delta.role or role - if chunks: - text = "".join(chunks) - message = {"content": text, "role": role} - span.set_attribute("llm.generated_message", serialize_attribute(message)) - serialized_output = serialize_attribute(generator_output) - span.set_attribute("output", serialized_output) + from openai.types.completion import Completion + + if generator_output and isinstance(generator_output[0], (ChatCompletionChunk, Completion)): + parser = OpenAIResponseParser.init_parser(generator_output) + enrich_span_with_llm(span, parser.model, parser.get_generated_message()) + token_collector.collect_openai_tokens_for_streaming(span, inputs, generator_output, parser.is_chat) + enrich_span_with_openai_tokens(span, TraceType(original_span.attributes["span_type"])) + enrich_span_with_output(span, serialize_attribute(generator_output)) + span.set_status(StatusCode.OK) + token_collector.collect_openai_tokens_for_parent_span(span) + + +def enrich_span_with_original_attributes(span, attributes): + try: + span.set_attributes(attributes) + except Exception as e: + logging.warning(f"Failed to enrich span with original attributes: {e}") + + +def enrich_span_with_llm(span, model, generated_message): + try: + span.set_attribute("llm.response.model", model) + span.set_attribute("llm.generated_message", serialize_attribute(generated_message)) + span.add_event("promptflow.llm.generated_message", {"payload": serialize_attribute(generated_message)}) + except Exception as e: + logging.warning(f"Failed to enrich span with llm: {e}") def enrich_span_with_output(span, output): try: serialized_output = serialize_attribute(output) span.set_attribute("output", serialized_output) - # If the output is a generator, while the span is a valid span, we will trace the generator. - if isinstance(output, Iterator) and not isinstance(span, NonRecordingSpan): - output = traced_generator(output, span) + span.add_event("promptflow.function.output", {"payload": serialized_output}) except Exception as e: logging.warning(f"Failed to enrich span with output: {e}") - return output - def enrich_span_with_openai_tokens(span, trace_type): try: @@ -181,7 +208,7 @@ def enrich_span_with_openai_tokens(span, trace_type): if tokens: span_tokens = {f"__computed__.cumulative_token_count.{k.split('_')[0]}": v for k, v in tokens.items()} if trace_type in [TraceType.LLM, TraceType.EMBEDDING]: - llm_tokens = {f"{trace_type.value.lower()}.token_count.{k.split('_')[0]}": v for k, v in tokens.items()} + llm_tokens = {f"llm.usage.{k}": v for k, v in tokens.items()} span_tokens.update(llm_tokens) span.set_attributes(span_tokens) except Exception as e: @@ -193,7 +220,7 @@ def enrich_span_with_embedding(span, inputs, output): try: if isinstance(output, CreateEmbeddingResponse): - span.set_attribute("embedding.model", output.model) + span.set_attribute("llm.response.model", output.model) embeddings = [] input_list = [emb_input] if _is_single_input(emb_input := inputs["input"]) else emb_input for emb in output.data: @@ -205,6 +232,7 @@ def enrich_span_with_embedding(span, inputs, output): } ) span.set_attribute("embedding.embeddings", serialize_attribute(embeddings)) + span.add_event("promptflow.embedding.embeddings", {"payload": serialize_attribute(embeddings)}) except Exception as e: logging.warning(f"Failed to enrich span with embedding: {e}") @@ -212,25 +240,29 @@ def enrich_span_with_embedding(span, inputs, output): def _is_single_input(embedding_inputs): # OpenAI Embedding API accepts a single string/tokenized string or a list of string/tokenized string as input. # For the single string/tokenized string case, we should return true, otherwise return false. - if (isinstance(embedding_inputs, str)): + if isinstance(embedding_inputs, str): # input is a string return True - elif (isinstance(embedding_inputs, list) and all(isinstance(i, int) for i in embedding_inputs)): + elif isinstance(embedding_inputs, list) and all(isinstance(i, int) for i in embedding_inputs): # input is a token array return True return False -def enrich_span_with_llm_model(span, output): - try: - if not IS_LEGACY_OPENAI: - from openai.types.chat.chat_completion import ChatCompletion - from openai.types.completion import Completion +def enrich_span_with_llm_output(span, output): + if not IS_LEGACY_OPENAI: + from openai.types.chat.chat_completion import ChatCompletion + from openai.types.completion import Completion - if isinstance(output, (ChatCompletion, Completion)): - span.set_attribute("llm.model", output.model) - except Exception as e: - logging.warning(f"Failed to enrich span with llm model: {e}") + if isinstance(output, (ChatCompletion, Completion)): + model = output.model if isinstance(output, (ChatCompletion, Completion)) else None + if isinstance(output, ChatCompletion): + generated_message = output.choices[0].message + elif isinstance(output, Completion): + generated_message = output.choices[0].text + else: + generated_message = None + enrich_span_with_llm(span, model, generated_message) def serialize_attribute(value): @@ -238,7 +270,12 @@ def serialize_attribute(value): try: serializable = Tracer.to_serializable(value) serialized_value = serialize(serializable) - return json.dumps(serialized_value, indent=2, default=default_json_encoder) + try: + from promptflow._utils.utils import default_json_encoder + + return json.dumps(serialized_value, indent=2, default=default_json_encoder) + except ImportError: + return json.dumps(serialized_value, indent=2) except Exception as e: logging.warning(f"Failed to serialize attribute: {e}") return None @@ -264,7 +301,11 @@ def _traced( def _traced_async( - func: Callable = None, *, args_to_ignore: Optional[List[str]] = None, trace_type=TraceType.FUNCTION + func: Callable = None, + *, + args_to_ignore: Optional[List[str]] = None, + trace_type=TraceType.FUNCTION, + name: Optional[str] = None, ) -> Callable: """ Decorator that adds tracing to an asynchronous function. @@ -274,6 +315,7 @@ def _traced_async( args_to_ignore (Optional[List[str]], optional): A list of argument names to be ignored in the trace. Defaults to None. trace_type (TraceType, optional): The type of the trace. Defaults to TraceType.FUNCTION. + name (str, optional): The name of the trace, will set to func name if not provided. Returns: Callable: The traced function. @@ -281,15 +323,22 @@ def _traced_async( def create_trace(func, args, kwargs): return _create_trace_from_function_call( - func, args=args, kwargs=kwargs, args_to_ignore=args_to_ignore, trace_type=trace_type + func, + args=args, + kwargs=kwargs, + args_to_ignore=args_to_ignore, + trace_type=trace_type, + name=name, ) @functools.wraps(func) async def wrapped(*args, **kwargs): trace = create_trace(func, args, kwargs) - # Fall back to trace.name if we can't get node name for better view. - span_name = get_node_name_from_context() or trace.name if trace_type == TraceType.TOOL else trace.name + # For node span we set the span name to node name, otherwise we use the function name. + span_name = get_node_name_from_context(used_for_span_name=True) or trace.name with open_telemetry_tracer.start_as_current_span(span_name) as span: + # Store otel trace id in context for correlation + OperationContext.get_instance()["otel_trace_id"] = f"{span.get_span_context().trace_id:032x}" enrich_span_with_trace(span, trace) enrich_span_with_prompt_info(span, func, kwargs) @@ -314,7 +363,13 @@ async def wrapped(*args, **kwargs): return wrapped -def _traced_sync(func: Callable = None, *, args_to_ignore=None, trace_type=TraceType.FUNCTION) -> Callable: +def _traced_sync( + func: Callable = None, + *, + args_to_ignore: Optional[List[str]] = None, + trace_type=TraceType.FUNCTION, + name: Optional[str] = None, +) -> Callable: """ Decorator that adds tracing to a synchronous function. @@ -323,6 +378,8 @@ def _traced_sync(func: Callable = None, *, args_to_ignore=None, trace_type=Trace args_to_ignore (Optional[List[str]], optional): A list of argument names to be ignored in the trace. Defaults to None. trace_type (TraceType, optional): The type of the trace. Defaults to TraceType.FUNCTION. + name (str, optional): The name of the trace, will set to func name if not provided. + Returns: Callable: The traced function. @@ -330,15 +387,22 @@ def _traced_sync(func: Callable = None, *, args_to_ignore=None, trace_type=Trace def create_trace(func, args, kwargs): return _create_trace_from_function_call( - func, args=args, kwargs=kwargs, args_to_ignore=args_to_ignore, trace_type=trace_type + func, + args=args, + kwargs=kwargs, + args_to_ignore=args_to_ignore, + trace_type=trace_type, + name=name, ) @functools.wraps(func) def wrapped(*args, **kwargs): trace = create_trace(func, args, kwargs) - # Fall back to trace.name if we can't get node name for better view. - span_name = get_node_name_from_context() or trace.name if trace_type == TraceType.TOOL else trace.name + # For node span we set the span name to node name, otherwise we use the function name. + span_name = get_node_name_from_context(used_for_span_name=True) or trace.name with open_telemetry_tracer.start_as_current_span(span_name) as span: + # Store otel trace id in context for correlation + OperationContext.get_instance()["otel_trace_id"] = f"{span.get_span_context().trace_id:032x}" enrich_span_with_trace(span, trace) enrich_span_with_prompt_info(span, func, kwargs) diff --git a/src/promptflow/promptflow/tracing/_tracer.py b/src/promptflow-tracing/promptflow/tracing/_tracer.py similarity index 76% rename from src/promptflow/promptflow/tracing/_tracer.py rename to src/promptflow-tracing/promptflow/tracing/_tracer.py index 041070284e9..b31d9ee731a 100644 --- a/src/promptflow/promptflow/tracing/_tracer.py +++ b/src/promptflow-tracing/promptflow/tracing/_tracer.py @@ -1,5 +1,5 @@ -import json import inspect +import json import logging import uuid from collections.abc import Iterator @@ -7,12 +7,9 @@ from datetime import datetime from typing import Dict, List, Optional -from promptflow._core.generator_proxy import GeneratorProxy, generate_from_proxy -from promptflow._core.thread_local_singleton import ThreadLocalSingleton -from promptflow._utils.dataclass_serializer import serialize -from promptflow.contracts.tool import ConnectionType - -from .._utils.utils import default_json_encoder +from ._thread_local_singleton import ThreadLocalSingleton +from ._utils import serialize +from .contracts.generator_proxy import GeneratorProxy, generate_from_proxy from .contracts.trace import Trace, TraceType @@ -23,6 +20,7 @@ class Tracer(ThreadLocalSingleton): def __init__(self, run_id, node_name: Optional[str] = None): self._run_id = run_id self._node_name = node_name + self._is_node_span_created = False self._traces = [] self._current_trace_id = ContextVar("current_trace_id", default="") self._id_to_trace: Dict[str, Trace] = {} @@ -31,8 +29,6 @@ def __init__(self, run_id, node_name: Optional[str] = None): def start_tracing(cls, run_id, node_name: Optional[str] = None): current_run_id = cls.current_run_id() if current_run_id is not None: - msg = f"Try to start tracing for run {run_id} but {current_run_id} is already active." - logging.warning(msg) return tracer = cls(run_id, node_name) tracer._activate_in_context() @@ -69,7 +65,12 @@ def to_serializable(obj): return obj try: obj = serialize(obj) - json.dumps(obj, default=default_json_encoder) + try: + from promptflow._utils.utils import default_json_encoder + + json.dumps(obj, default=default_json_encoder) + except ImportError: + json.dumps(obj) except Exception: # We don't want to fail the whole function call because of a serialization error, # so we simply convert it to str if it cannot be serialized. @@ -136,7 +137,7 @@ def _format_error(error: Exception) -> dict: def _create_trace_from_function_call( - f, *, args=None, kwargs=None, args_to_ignore: Optional[List[str]] = None, trace_type=TraceType.FUNCTION + f, *, args=None, kwargs=None, args_to_ignore: Optional[List[str]] = None, trace_type=TraceType.FUNCTION, name=None, ): """ Creates a trace object from a function call. @@ -148,6 +149,7 @@ def _create_trace_from_function_call( args_to_ignore (Optional[List[str]], optional): A list of argument names to be ignored in the trace. Defaults to None. trace_type (TraceType, optional): The type of the trace. Defaults to TraceType.FUNCTION. + name (str, optional): The name of the trace. Defaults to None. Returns: Trace: The created trace object. @@ -158,30 +160,47 @@ def _create_trace_from_function_call( sig = inspect.signature(f).parameters all_kwargs = {**{k: v for k, v in zip(sig.keys(), args)}, **kwargs} - all_kwargs = { - k: ConnectionType.serialize_conn(v) if ConnectionType.is_connection_value(v) else v - for k, v in all_kwargs.items() - } + try: + # We have removed the dependency of tracing on promptflow, so need to check if the ConnectionType is + # available before using it. + from promptflow.contracts.tool import ConnectionType + + all_kwargs = { + k: ConnectionType.serialize_conn(v) if ConnectionType.is_connection_value(v) else v + for k, v in all_kwargs.items() + } + except ImportError: + pass + # TODO: put parameters in self to inputs for builtin tools all_kwargs.pop("self", None) for key in args_to_ignore: all_kwargs.pop(key, None) - name = f.__qualname__ + function = f.__qualname__ if trace_type in [TraceType.LLM, TraceType.EMBEDDING] and f.__module__: - name = f"{f.__module__}.{name}" + function = f"{f.__module__}.{function}" return Trace( - name=name, + name=name or function, # Use the function name as the trace name if not provided type=trace_type, start_time=datetime.utcnow().timestamp(), inputs=all_kwargs, children=[], + function=function, ) -def get_node_name_from_context(): +def get_node_name_from_context(used_for_span_name=False): tracer = Tracer.active_instance() if tracer is not None: - return tracer._node_name + if used_for_span_name: + # Since only the direct children of flow span should have the node name as span name, we need to check if + # the node span is created, if created, the current span is not a node span, its name should bet set to + # function name. + if not tracer._is_node_span_created: + tracer._is_node_span_created = True + return tracer._node_name + else: + return tracer._node_name return None diff --git a/src/promptflow-tracing/promptflow/tracing/_utils.py b/src/promptflow-tracing/promptflow/tracing/_utils.py new file mode 100644 index 00000000000..59862461aeb --- /dev/null +++ b/src/promptflow-tracing/promptflow/tracing/_utils.py @@ -0,0 +1,90 @@ +import re +from dataclasses import fields, is_dataclass +from datetime import datetime +from enum import Enum +from typing import Callable, Dict + +from .contracts.generator_proxy import GeneratorProxy + + +def serialize(value: object, remove_null: bool = False, serialization_funcs: Dict[type, Callable] = None) -> dict: + if serialization_funcs: + for cls, f in serialization_funcs.items(): + if isinstance(value, cls): + return f(value) + if isinstance(value, datetime): + return value.isoformat() + "Z" + if isinstance(value, Enum): + return value.value + if isinstance(value, list): + return [serialize(v, remove_null, serialization_funcs) for v in value] + if isinstance(value, GeneratorProxy): + # TODO: The current implementation of the serialize function is not self-explanatory, as value.items is mutable + # whereas the serialize function should deal with a fixed object. We should rename the function to + # to_serializable to better reflect its purpose. + return value.items + try: + from promptflow.contracts.tool import ConnectionType + + # Note that custom connection check should before dict check + if ConnectionType.is_connection_value(value): + return ConnectionType.serialize_conn(value) + except ImportError: + pass + if isinstance(value, dict): + return {k: serialize(v, remove_null, serialization_funcs) for k, v in value.items()} + if is_dataclass(value): + if hasattr(value, "serialize"): + result = value.serialize() + else: + result = { + f.name: serialize(getattr(value, f.name), remove_null, serialization_funcs) for f in fields(value) + } + if not remove_null: + return result + null_keys = [k for k, v in result.items() if v is None] + for k in null_keys: + result.pop(k) + return result + try: + from pydantic import BaseModel + + if isinstance(value, BaseModel): # Handle pydantic model, which is used in langchain + return value.dict() + except ImportError: + # Ignore ImportError if pydantic is not installed + pass + return value + + +def get_input_names_for_prompt_template(template_str): + try: + # We need to parse jinja template only when the promptflow is installed and run flow with PromptTemplate + # type input, so using try-catch to avoid the dependency of jinja2 when it's not needed. + from jinja2 import Environment, meta + except ImportError: + return [] + + input_names = [] + env = Environment() + template = env.parse(template_str) + input_names.extend(sorted(meta.find_undeclared_variables(template), key=lambda x: template_str.find(x))) + + # currently we only support image type + pattern = r"\!\[(\s*image\s*)\]\(\{\{\s*([^{}]+)\s*\}\}\)" + matches = re.finditer(pattern, template_str) + for match in matches: + input_names.append(match.group(2).strip()) + + return input_names + + +def get_prompt_param_name_from_func(f): + """Get the param name of prompt template on provider.""" + + try: + from promptflow.contracts.types import PromptTemplate + + return next((k for k, annotation in f.__annotations__.items() if annotation == PromptTemplate), None) + except ImportError: + return None diff --git a/src/promptflow-tracing/promptflow/tracing/_version.py b/src/promptflow-tracing/promptflow/tracing/_version.py new file mode 100644 index 00000000000..c965b88b2d0 --- /dev/null +++ b/src/promptflow-tracing/promptflow/tracing/_version.py @@ -0,0 +1,9 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import importlib.metadata + +__version__ = importlib.metadata.version("promptflow-tracing") + +VERSION: str = __version__ diff --git a/src/promptflow-tracing/promptflow/tracing/contracts/__init__.py b/src/promptflow-tracing/promptflow/tracing/contracts/__init__.py new file mode 100644 index 00000000000..29a4fcd3278 --- /dev/null +++ b/src/promptflow-tracing/promptflow/tracing/contracts/__init__.py @@ -0,0 +1,5 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/src/promptflow/promptflow/_core/generator_proxy.py b/src/promptflow-tracing/promptflow/tracing/contracts/generator_proxy.py similarity index 100% rename from src/promptflow/promptflow/_core/generator_proxy.py rename to src/promptflow-tracing/promptflow/tracing/contracts/generator_proxy.py diff --git a/src/promptflow/promptflow/tracing/contracts/trace.py b/src/promptflow-tracing/promptflow/tracing/contracts/trace.py similarity index 97% rename from src/promptflow/promptflow/tracing/contracts/trace.py rename to src/promptflow-tracing/promptflow/tracing/contracts/trace.py index 249090389c1..3003967314a 100644 --- a/src/promptflow/promptflow/tracing/contracts/trace.py +++ b/src/promptflow-tracing/promptflow/tracing/contracts/trace.py @@ -11,7 +11,6 @@ class TraceType(str, Enum): """An enumeration class to represent different types of traces.""" LLM = "LLM" - TOOL = "Tool" FUNCTION = "Function" LANGCHAIN = "LangChain" FLOW = "Flow" @@ -53,3 +52,4 @@ class Trace: node_name: Optional[str] = None # The node name of the trace, used for flow level trace parent_id: str = "" # The parent trace id of the trace id: str = "" # The trace id + function: str = "" # The function name of the trace diff --git a/src/promptflow-tracing/pyproject.toml b/src/promptflow-tracing/pyproject.toml new file mode 100644 index 00000000000..67acd49a49e --- /dev/null +++ b/src/promptflow-tracing/pyproject.toml @@ -0,0 +1,114 @@ +[build-system] +requires = ["poetry-core>=1.5.0"] +build-backend = "poetry.core.masonry.api" + +# poetry +[tool.poetry] +name = "promptflow-tracing" +version = "1.1.0.dev0" +description = "Prompt flow tracing" +license = "MIT" +authors = [ + "Microsoft Corporation " +] +repository = "https://github.com/microsoft/promptflow" +homepage = "https://microsoft.github.io/promptflow/" +readme = ["README.md"] +keywords = ["telemetry"] +classifiers = [ + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +packages = [ + { include = "promptflow" } +] + +[tool.poetry.urls] +"Bug Reports" = "https://github.com/microsoft/promptflow/issues" + +# dependencies +[tool.poetry.dependencies] +python = "<4.0,>=3.8" +openai = "*" # API injector for OpenAI traces +opentelemetry-sdk = ">=1.22.0,<2.0.0" # Open Telemetry dependency +tiktoken = ">=0.4.0" # get OpenAI token count for streaming scenario + +[tool.poetry.group.dev.dependencies] +pre-commit = "*" +import-linter = "*" + +[tool.poetry.group.test.dependencies] +pytest = "*" +pytest-asyncio = "*" +pytest-cov = "*" +pytest-mock = "*" +pytest-xdist = "*" + +# test: pytest and coverage +[tool.pytest.ini_options] +markers = [ + "unittest", + "e2etest", +] +# junit - analyse and publish test results (https://github.com/EnricoMi/publish-unit-test-result-action) +# durations - list the slowest test durations +addopts = """ +--junit-xml=test-results.xml \ +--dist loadfile \ +--log-level=info \ +--log-format="%(asctime)s %(levelname)s %(message)s" \ +--log-date-format="[%Y-%m-%d %H:%M:%S]" \ +--durations=5 \ +-ra \ +-vv +""" +env = [ +] +testpaths = ["tests"] + +[tool.coverage.run] +concurrency = ["multiprocessing"] +source = ["promptflow"] +omit = [ + "__init__.py", +] + +[tool.black] +line-length = 120 + +# import linter +# reference: https://pypi.org/project/import-linter/ +[tool.importlinter] +root_package = "promptflow" +include_external_packages = "True" + +[[tool.importlinter.contracts]] +name = "Contract forbidden modules" +type = "forbidden" +source_modules = ["promptflow.tracing"] +forbidden_modules = [ + "promptflow.core", + "promptflow._core", + "promptflow._utils", + "promptflow.connections", + "promptflow.contracts", + "promptflow.executor", + "promptflow.integrations", + "promptflow.storage", + "promptflow._cli", + "promptflow._internal", + "promptflow._proxy", + "promptflow._sdk", + "promptflow.batch", + "promptflow.client", + "promptflow.entities", + "promptflow.operations", + "promptflow.azure" +] diff --git a/src/promptflow-tracing/tests/__init__.py b/src/promptflow-tracing/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/promptflow-tracing/tests/conftest.py b/src/promptflow-tracing/tests/conftest.py new file mode 100644 index 00000000000..a5e1b3ad787 --- /dev/null +++ b/src/promptflow-tracing/tests/conftest.py @@ -0,0 +1,136 @@ +import json +import multiprocessing +from pathlib import Path +from unittest.mock import patch + +import pytest +from pytest_mock import MockerFixture + +from promptflow.tracing._integrations._openai_injector import inject_openai_api + +try: + from promptflow.recording.local import recording_array_reset + from promptflow.recording.record_mode import is_in_ci_pipeline, is_live, is_record, is_replay +except ImportError: + # Run test in empty mode if promptflow-recording is not installed + def recording_array_reset(): + pass + + def is_in_ci_pipeline(): + return False + + def is_live(): + return False + + def is_record(): + return False + + def is_replay(): + return False + + +from .utils import _run_in_subprocess + +RECORDINGS_TEST_CONFIGS_ROOT = Path(__file__).parent.parent.parent / "promptflow-recording/recordings/local" + + +def pytest_configure(): + pytest.is_live = is_live() + pytest.is_record = is_record() + pytest.is_replay = is_replay() + pytest.is_in_ci_pipeline = is_in_ci_pipeline() + + +@pytest.fixture +def dev_connections() -> dict: + with open( + file=(Path(__file__).parent.parent / "connections.json").resolve().absolute().as_posix(), + mode="r", + ) as f: + return json.load(f) + + +# ==================== Recording injection ==================== +# To inject patches in subprocesses, add new mock method in setup_recording_injection_if_enabled +# in fork mode, this is automatically enabled. +# in spawn mode, we need to declare recording in each process separately. + +SpawnProcess = multiprocessing.get_context("spawn").Process + + +class MockSpawnProcess(SpawnProcess): + def __init__(self, group=None, target=None, *args, **kwargs): + if target == _run_in_subprocess: + target = _run_in_subprocess_with_recording + super().__init__(group, target, *args, **kwargs) + + +@pytest.fixture +def recording_injection(mocker: MockerFixture): + original_process_class = multiprocessing.get_context("spawn").Process + multiprocessing.get_context("spawn").Process = MockSpawnProcess + if "spawn" == multiprocessing.get_start_method(): + multiprocessing.Process = MockSpawnProcess + + patches = setup_recording_injection_if_enabled() + + try: + yield + finally: + if pytest.is_replay or pytest.is_record: + from promptflow.recording.local import RecordStorage + + RecordStorage.get_instance().delete_lock_file() + if pytest.is_live: + from promptflow.recording.local import delete_count_lock_file + + delete_count_lock_file() + recording_array_reset() + + multiprocessing.get_context("spawn").Process = original_process_class + if "spawn" == multiprocessing.get_start_method(): + multiprocessing.Process = original_process_class + + for patcher in patches: + patcher.stop() + + +def setup_recording_injection_if_enabled(): + patches = [] + + def start_patches(patch_targets): + for target, mock_func in patch_targets.items(): + patcher = patch(target, mock_func) + patches.append(patcher) + patcher.start() + + if is_replay() or is_record(): + from promptflow.recording.local import RecordStorage, inject_async_with_recording, inject_sync_with_recording + from promptflow.recording.record_mode import check_pydantic_v2 + + check_pydantic_v2() + file_path = RECORDINGS_TEST_CONFIGS_ROOT / "tracing.node_cache.shelve" + RecordStorage.get_instance(file_path) + + patch_targets = { + "promptflow.tracing._integrations._openai_injector.inject_sync": inject_sync_with_recording, + "promptflow.tracing._integrations._openai_injector.inject_async": inject_async_with_recording, + } + start_patches(patch_targets) + + if is_live() and is_in_ci_pipeline(): + from promptflow.recording.local import inject_async_with_recording, inject_sync_with_recording + + patch_targets = { + "promptflow.tracing._integrations._openai_injector.inject_sync": inject_sync_with_recording, + "promptflow.tracing._integrations._openai_injector.inject_async": inject_async_with_recording, + } + start_patches(patch_targets) + + inject_openai_api() + return patches + + +def _run_in_subprocess_with_recording(queue, func, args, kwargs): + setup_recording_injection_if_enabled() + return _run_in_subprocess(queue, func, args, kwargs) diff --git a/src/promptflow-tracing/tests/e2etests/__init__.py b/src/promptflow-tracing/tests/e2etests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/promptflow-tracing/tests/e2etests/simple_functions.py b/src/promptflow-tracing/tests/e2etests/simple_functions.py new file mode 100644 index 00000000000..85301b8f89d --- /dev/null +++ b/src/promptflow-tracing/tests/e2etests/simple_functions.py @@ -0,0 +1,88 @@ +import asyncio +from time import sleep +from typing import Union + +from openai import AsyncAzureOpenAI, AzureOpenAI + +from promptflow.tracing._trace import trace + + +@trace +def is_valid_name(name): + sleep(0.5) + return len(name) > 0 + + +@trace +def get_user_name(user_id): + sleep(0.5) + user_name = f"User {user_id}" + if not is_valid_name(user_name): + raise ValueError(f"Invalid user name: {user_name}") + + return user_name + + +@trace +def format_greeting(user_name): + sleep(0.5) + return f"Hello, {user_name}!" + + +@trace +def greetings(user_id): + user_name = get_user_name(user_id) + greeting = format_greeting(user_name) + return greeting + + +@trace +async def dummy_llm(prompt: str, model: str): + await asyncio.sleep(0.5) + return "dummy_output" + + +@trace +async def dummy_llm_tasks_async(prompt: str, models: list): + tasks = [] + for model in models: + tasks.append(asyncio.create_task(dummy_llm(prompt, model))) + done, _ = await asyncio.wait(tasks, return_when=asyncio.ALL_COMPLETED) + return [task.result() for task in done] + + +@trace +def openai_chat(connection: dict, prompt: str, stream: bool = False): + client = AzureOpenAI(**connection) + + messages = [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": prompt}] + response = client.chat.completions.create(model="gpt-35-turbo", messages=messages, stream=stream) + + if stream: + def generator(): + for chunk in response: + if chunk.choices: + yield chunk.choices[0].delta.content or "" + return "".join(generator()) + return response.choices[0].message.content or "" + + +@trace +def openai_completion(connection: dict, prompt: str, stream: bool = False): + client = AzureOpenAI(**connection) + response = client.completions.create(model="text-ada-001", prompt=prompt, stream=stream) + + if stream: + def generator(): + for chunk in response: + if chunk.choices: + yield chunk.choices[0].text or "" + return "".join(generator()) + return response.choices[0].text or "" + + +@trace +async def openai_embedding_async(connection: dict, input: Union[str, list]): + client = AsyncAzureOpenAI(**connection) + resp = await client.embeddings.create(model="text-embedding-ada-002", input=input) + return resp.data[0].embedding diff --git a/src/promptflow-tracing/tests/e2etests/test_tracing.py b/src/promptflow-tracing/tests/e2etests/test_tracing.py new file mode 100644 index 00000000000..f5a0ce28d34 --- /dev/null +++ b/src/promptflow-tracing/tests/e2etests/test_tracing.py @@ -0,0 +1,298 @@ +import asyncio +import json + +import pytest +from opentelemetry.trace.status import StatusCode + +from promptflow.tracing._integrations._openai_injector import inject_openai_api +from promptflow.tracing.contracts.trace import TraceType + +from ..utils import execute_function_in_subprocess, prepare_memory_exporter +from .simple_functions import dummy_llm_tasks_async, greetings, openai_chat, openai_completion, openai_embedding_async + +LLM_FUNCTION_NAMES = [ + "openai.resources.chat.completions.Completions.create", + "openai.resources.completions.Completions.create", + "openai.resources.chat.completions.AsyncCompletions.create", + "openai.resources.completions.AsyncCompletions.create", +] + +EMBEDDING_FUNCTION_NAMES = [ + "openai.resources.embeddings.Embeddings.create", + "openai.resources.embeddings.AsyncEmbeddings.create", +] + +LLM_TOKEN_NAMES = [ + "llm.usage.prompt_tokens", + "llm.usage.completion_tokens", + "llm.usage.total_tokens", + "llm.response.model", +] + +EMBEDDING_TOKEN_NAMES = [ + "llm.usage.prompt_tokens", + "llm.usage.total_tokens", + "llm.response.model", +] + +CUMULATIVE_LLM_TOKEN_NAMES = [ + "__computed__.cumulative_token_count.prompt", + "__computed__.cumulative_token_count.completion", + "__computed__.cumulative_token_count.total", +] + +CUMULATIVE_EMBEDDING_TOKEN_NAMES = [ + "__computed__.cumulative_token_count.prompt", + "__computed__.cumulative_token_count.total", +] + + +@pytest.mark.usefixtures("dev_connections", "recording_injection") +@pytest.mark.e2etest +class TestTracing: + @pytest.mark.parametrize( + "func, inputs, expected_span_length", + [ + (greetings, {"user_id": 1}, 4), + (dummy_llm_tasks_async, {"prompt": "Hello", "models": ["model_1", "model_1"]}, 3), + ], + ) + def test_otel_trace(self, func, inputs, expected_span_length): + execute_function_in_subprocess(self.assert_otel_trace, func, inputs, expected_span_length) + + def assert_otel_trace(self, func, inputs, expected_span_length): + exporter = prepare_memory_exporter() + + result = self.run_func(func, inputs) + assert isinstance(result, (str, list)) + span_list = exporter.get_finished_spans() + self.validate_span_list(span_list, expected_span_length) + + def assert_otel_traces_with_prompt(self, func, inputs): + memory_exporter = prepare_memory_exporter() + + result = self.run_func(func, inputs) + assert result == "Hello world!" + + span_list = memory_exporter.get_finished_spans() + for span in span_list: + assert span.status.status_code == StatusCode.OK + assert isinstance(span.name, str) + if span.attributes.get("function", "") == "render_prompt_template": + assert "prompt.template" in span.attributes + assert span.attributes["prompt.template"] == inputs["prompt"] + assert "prompt.variables" in span.attributes + for var in inputs: + if var == "prompt": + continue + assert var in span.attributes["prompt.variables"] + + @pytest.mark.parametrize( + "func, inputs, expected_span_length", + [ + (openai_chat, {"prompt": "Hello"}, 2), + (openai_completion, {"prompt": "Hello"}, 2), + (openai_chat, {"prompt": "Hello", "stream": True}, 3), + (openai_completion, {"prompt": "Hello", "stream": True}, 3), + ], + ) + def test_otel_trace_with_llm(self, dev_connections, func, inputs, expected_span_length): + execute_function_in_subprocess( + self.assert_otel_trace_with_llm, dev_connections, func, inputs, expected_span_length + ) + + def assert_otel_trace_with_llm(self, dev_connections, func, inputs, expected_span_length): + inject_openai_api() + exporter = prepare_memory_exporter() + + inputs = self.add_azure_connection_to_inputs(inputs, dev_connections) + is_stream = inputs.get("stream", False) + result = self.run_func(func, inputs) + assert isinstance(result, str) + span_list = exporter.get_finished_spans() + self.validate_span_list(span_list, expected_span_length) + # We updated the OpenAI tokens (prompt_token/completion_token/total_token) to the span attributes + # for llm and embedding traces, and aggregate them to the parent span. Use this function to validate + # the openai tokens are correctly set. + self.validate_openai_tokens(span_list, is_stream) + + @pytest.mark.parametrize( + "func, inputs, expected_span_length", + [ + (openai_embedding_async, {"input": "Hello"}, 2), + # [9906] is the tokenized version of "Hello" + (openai_embedding_async, {"input": [9906]}, 2), + ], + ) + def test_otel_trace_with_embedding( + self, + dev_connections, + func, + inputs, + expected_span_length, + ): + execute_function_in_subprocess( + self.assert_otel_traces_with_embedding, dev_connections, func, inputs, expected_span_length + ) + + def assert_otel_traces_with_embedding(self, dev_connections, func, inputs, expected_span_length): + inject_openai_api() + memory_exporter = prepare_memory_exporter() + + inputs = self.add_azure_connection_to_inputs(inputs, dev_connections) + result = self.run_func(func, inputs) + assert isinstance(result, list) + + span_list = memory_exporter.get_finished_spans() + self.validate_span_list(span_list, expected_span_length) + self.validate_openai_tokens(span_list) + for span in span_list: + if span.attributes.get("function", "") in EMBEDDING_FUNCTION_NAMES: + msg = f"Span attributes is not expected: {span.attributes}" + assert "ada" in span.attributes.get("llm.response.model", ""), msg + embeddings = span.attributes.get("embedding.embeddings", "") + assert "embedding.vector" in embeddings, msg + assert "embedding.text" in embeddings, msg + if isinstance(inputs["input"], list): + # If the input is a token array, which is list of int, the attribute should contains + # the length of the token array ''. + assert "dimensional token" in embeddings, msg + else: + # If the input is a string, the attribute should contains the original input string. + assert inputs["input"] in embeddings, msg + + def test_otel_trace_with_multiple_functions(self): + execute_function_in_subprocess(self.assert_otel_traces_with_multiple_functions) + + def assert_otel_traces_with_multiple_functions(self): + memory_exporter = prepare_memory_exporter() + + result = self.run_func(greetings, {"user_id": 1}) + assert isinstance(result, str) + result = self.run_func(dummy_llm_tasks_async, {"prompt": "Hello", "models": ["model_1", "model_1"]}) + assert isinstance(result, list) + + span_list = memory_exporter.get_finished_spans() + assert len(span_list) == 7, f"Got {len(span_list)} spans." # 4 + 3 spans in total + root_spans = [span for span in span_list if span.parent is None] + assert len(root_spans) == 2, f"Expected 2 root spans, got {len(root_spans)}" + assert root_spans[0].attributes["function"] == "greetings" + assert root_spans[1].attributes["function"] == "dummy_llm_tasks_async" + assert root_spans[1] == span_list[-1] # It should be the last span + sub_level_span = span_list[-2] # It should be the second last span + expected_values = { + "framework": "promptflow", + "span_type": "Function", + } + for span in span_list: + for k, v in expected_values.items(): + assert span.attributes[k] == v, f"span.attributes[{k}] = {span.attributes[k]}, expected: {v}" + assert ( + sub_level_span.parent.span_id == root_spans[1].context.span_id + ) # sub_level_span is a child of the second root span + + def run_func(self, func, inputs): + if asyncio.iscoroutinefunction(func): + return asyncio.run(func(**inputs)) + else: + return func(**inputs) + + def add_azure_connection_to_inputs(self, inputs, dev_connections): + conn_name = "azure_open_ai_connection" + if conn_name not in dev_connections: + raise ValueError(f"Connection '{conn_name}' not found in dev connections.") + conn_dict = { + "api_key": dev_connections[conn_name]["value"]["api_key"], + "azure_endpoint": dev_connections[conn_name]["value"]["api_base"], + "api_version": dev_connections[conn_name]["value"]["api_version"], + } + inputs["connection"] = conn_dict + return inputs + + def validate_span_list(self, span_list, expected_span_length): + assert len(span_list) == expected_span_length, f"Got {len(span_list)} spans." + root_spans = [span for span in span_list if span.parent is None] + assert len(root_spans) == 1 + root_span = root_spans[0] + for span in span_list: + assert span.status.status_code == StatusCode.OK + assert isinstance(span.name, str) + assert span.attributes["framework"] == "promptflow" + if span.attributes.get("function", "") in LLM_FUNCTION_NAMES: + expected_span_type = TraceType.LLM + elif span.attributes.get("function", "") in EMBEDDING_FUNCTION_NAMES: + expected_span_type = TraceType.EMBEDDING + else: + expected_span_type = TraceType.FUNCTION + msg = f"span_type: {span.attributes['span_type']}, expected: {expected_span_type}" + assert span.attributes["span_type"] == expected_span_type, msg + if span != root_span: # Non-root spans should have a parent + assert span.attributes["function"] + inputs = json.loads(span.attributes["inputs"]) + output = json.loads(span.attributes["output"]) + assert isinstance(inputs, dict) + assert output is not None + + self.validate_inputs_output_event(span) + + def validate_inputs_output_event(self, span): + event_names = {event.name for event in span.events} + required_names = {"promptflow.function.inputs", "promptflow.function.output"} + + missing_names = required_names - event_names + assert not missing_names, f"Missing required events: {', '.join(missing_names)}" + + for event in span.events: + if event.name in required_names: + assert "payload" in event.attributes, f"Event {event.name} does not have a payload attribute." + try: + json.loads(event.attributes["payload"]) + except json.JSONDecodeError: + assert ( + False + ), f"Failed to parse payload for event {event.name}. Payload: {event.attributes['payload']}" + + def validate_openai_tokens(self, span_list, is_stream=False): + span_dict = {span.context.span_id: span for span in span_list} + expected_tokens = {} + for span in span_list: + tokens = None + # Validate the openai tokens are correctly set in the llm trace. + if self._is_llm_span_with_tokens(span, is_stream): + for token_name in LLM_TOKEN_NAMES + CUMULATIVE_LLM_TOKEN_NAMES: + assert token_name in span.attributes + tokens = {token_name: span.attributes[token_name] for token_name in CUMULATIVE_LLM_TOKEN_NAMES} + # Validate the openai tokens are correctly set in the embedding trace. + if span.attributes.get("function", "") in EMBEDDING_FUNCTION_NAMES: + for token_name in EMBEDDING_TOKEN_NAMES + CUMULATIVE_EMBEDDING_TOKEN_NAMES: + assert token_name in span.attributes + tokens = {token_name: span.attributes[token_name] for token_name in CUMULATIVE_EMBEDDING_TOKEN_NAMES} + # Aggregate the tokens to the parent span. + if tokens is not None: + current_span_id = span.context.span_id + while True: + if current_span_id in expected_tokens: + expected_tokens[current_span_id] = { + key: expected_tokens[current_span_id][key] + tokens[key] for key in tokens + } + else: + expected_tokens[current_span_id] = tokens + parent_cxt = getattr(span_dict[current_span_id], "parent", None) + if parent_cxt is None: + break + current_span_id = parent_cxt.span_id + # Validate the aggregated tokens are correctly set in the parent span. + for span in span_list: + span_id = span.context.span_id + if span_id in expected_tokens: + for token_name in expected_tokens[span_id]: + assert span.attributes[token_name] == expected_tokens[span_id][token_name] + + def _is_llm_span_with_tokens(self, span, is_stream): + # For streaming mode, there are two spans for openai api call, one is the original span, and the other + # is the iterated span, which name is "Iterated()", we should check the iterated span + # in streaming mode. + if is_stream: + return span.attributes.get("function", "") in LLM_FUNCTION_NAMES and span.name.startswith("Iterated(") + else: + return span.attributes.get("function", "") in LLM_FUNCTION_NAMES diff --git a/src/promptflow/tests/executor/unittests/_core/test_generator_proxy.py b/src/promptflow-tracing/tests/unittests/test_generator_proxy.py similarity index 94% rename from src/promptflow/tests/executor/unittests/_core/test_generator_proxy.py rename to src/promptflow-tracing/tests/unittests/test_generator_proxy.py index 6ed5fe2e0c6..de8435f8fc1 100644 --- a/src/promptflow/tests/executor/unittests/_core/test_generator_proxy.py +++ b/src/promptflow-tracing/tests/unittests/test_generator_proxy.py @@ -1,6 +1,6 @@ import pytest -from promptflow._core.generator_proxy import GeneratorProxy, generate_from_proxy +from promptflow.tracing.contracts.generator_proxy import GeneratorProxy, generate_from_proxy def generator(): diff --git a/src/promptflow-tracing/tests/unittests/test_openai_injector.py b/src/promptflow-tracing/tests/unittests/test_openai_injector.py new file mode 100644 index 00000000000..723b6158a91 --- /dev/null +++ b/src/promptflow-tracing/tests/unittests/test_openai_injector.py @@ -0,0 +1,452 @@ +import json +import logging +from importlib.metadata import version +from types import GeneratorType +from unittest.mock import MagicMock, patch + +import openai +import pytest + +from promptflow.tracing._integrations._openai_injector import ( + USER_AGENT_HEADER, + PROMPTFLOW_HEADER, + _generate_api_and_injector, + _openai_api_list, + get_aoai_telemetry_headers, + inject_async, + inject_openai_api, + inject_operation_headers, + inject_sync, + recover_openai_api, + _legacy_openai_apis, + _openai_apis, +) +from promptflow.tracing._operation_context import OperationContext +from promptflow.tracing._tracer import Tracer +from promptflow.tracing._version import VERSION +from promptflow.tracing.contracts.trace import TraceType + +IS_LEGACY_OPENAI = version("openai").startswith("0.") + + +# Mock classes and functions for test +class MockAPI: + def create(self): + pass + + +@pytest.mark.unittest +def test_inject_operation_headers_sync(): + @inject_operation_headers + def f(**kwargs): + return kwargs + + if IS_LEGACY_OPENAI: + headers = "headers" + kwargs_1 = {"headers": {"a": 1, "b": 2}} + kwargs_2 = {"headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"}} + else: + headers = "extra_headers" + kwargs_1 = {"extra_headers": {"a": 1, "b": 2}} + kwargs_2 = {"extra_headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"}} + + injected_headers = get_aoai_telemetry_headers() + assert f(a=1, b=2) == {"a": 1, "b": 2, headers: injected_headers} + + merged_headers = {**injected_headers, "a": 1, "b": 2} + assert f(**kwargs_1) == {headers: merged_headers} + + aoai_tools_headers = injected_headers.copy() + aoai_tools_headers.update({"ms-azure-ai-promptflow-called-from": "aoai-tool"}) + assert f(**kwargs_2) == {headers: aoai_tools_headers} + + +@pytest.mark.unittest +@pytest.mark.asyncio +async def test_inject_operation_headers_async(): + @inject_operation_headers + async def f(**kwargs): + return kwargs + + if IS_LEGACY_OPENAI: + headers = "headers" + kwargs_1 = {"headers": {"a": 1, "b": 2}} + kwargs_2 = {"headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"}} + else: + headers = "extra_headers" + kwargs_1 = {"extra_headers": {"a": 1, "b": 2}} + kwargs_2 = {"extra_headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"}} + + injected_headers = get_aoai_telemetry_headers() + assert await f(a=1, b=2) == {"a": 1, "b": 2, headers: injected_headers} + + merged_headers = {**injected_headers, "a": 1, "b": 2} + assert await f(**kwargs_1) == {headers: merged_headers} + + aoai_tools_headers = injected_headers.copy() + aoai_tools_headers.update({"ms-azure-ai-promptflow-called-from": "aoai-tool"}) + assert await f(**kwargs_2) == {headers: aoai_tools_headers} + + +@pytest.mark.unittest +def test_aoai_call_inject(): + if IS_LEGACY_OPENAI: + headers = "headers" + apis = ["openai.Completion.create", "openai.ChatCompletion.create", "openai.Embedding.create"] + else: + headers = "extra_headers" + apis = [ + "openai.resources.Completions.create", + "openai.resources.chat.Completions.create", + "openai.resources.Embeddings.create", + ] + + def mock_aoai(**kwargs): + return kwargs.get(headers) + + with patch(apis[0], new=mock_aoai), patch(apis[1], new=mock_aoai), patch(apis[2], new=mock_aoai): + inject_openai_api() + injected_headers = get_aoai_telemetry_headers() + + if IS_LEGACY_OPENAI: + return_headers_1 = openai.Completion.create(headers=None) + return_headers_2 = openai.ChatCompletion.create(headers="abc") + return_headers_3 = openai.Embedding.create(headers=1) + else: + return_headers_1 = openai.resources.Completions.create(extra_headers=None) + return_headers_2 = openai.resources.chat.Completions.create(extra_headers="abc") + return_headers_3 = openai.resources.Embeddings.create(extra_headers=1) + + assert return_headers_1 is not None + assert injected_headers.items() <= return_headers_1.items() + + assert return_headers_2 is not None + assert injected_headers.items() <= return_headers_2.items() + + assert return_headers_3 is not None + assert injected_headers.items() <= return_headers_3.items() + + +@pytest.mark.unittest +def test_get_aoai_telemetry_headers(): + # create a mock operation context + mock_operation_context = OperationContext.get_instance() + mock_operation_context.set_default_tracing_keys({"flow_id", "root_run_id"}) + mock_operation_context.user_agent = "test-user-agent" + mock_operation_context.update( + { + "flow_id": "test-flow-id", + "root_run_id": "test-root-run-id", + } + ) + + # patch the OperationContext.get_instance method to return the mock operation context + with patch("promptflow.tracing._operation_context.OperationContext.get_instance") as mock_get_instance: + mock_get_instance.return_value = mock_operation_context + + # call the function under test and get the headers + headers = get_aoai_telemetry_headers() + + assert USER_AGENT_HEADER in headers + assert PROMPTFLOW_HEADER in headers + + for key in headers.keys(): + assert "_" not in key + + # assert that the headers are correct + ua = f"test-user-agent promptflow-tracing/{VERSION}" + assert headers[USER_AGENT_HEADER] == ua + promptflow_headers = json.loads(headers[PROMPTFLOW_HEADER]) + assert promptflow_headers["flow_id"] == "test-flow-id" + assert promptflow_headers["root_run_id"] == "test-root-run-id" + + context = OperationContext.get_instance() + context.dummy_key = "dummy_value" + headers = get_aoai_telemetry_headers() + promptflow_headers = json.loads(headers[PROMPTFLOW_HEADER]) + assert "dummy_key" not in promptflow_headers # not default telemetry + + context._tracking_keys.add("dummy_key") + headers = get_aoai_telemetry_headers() + promptflow_headers = json.loads(headers[PROMPTFLOW_HEADER]) + assert promptflow_headers["dummy_key"] == "dummy_value" # telemetry key inserted + + +@pytest.mark.unittest +def test_openai_generator_proxy_sync(): + def mock_openai(**kwargs): + # check if args has a stream parameter + if "stream" in kwargs and kwargs["stream"]: + # stream parameter is true, yield a string + def generator(): + yield "This is a yielded string" + + return generator() + else: + # stream parameter is false or not given, return a string + return "This is a returned string" + + if IS_LEGACY_OPENAI: + apis = ["openai.Completion.create", "openai.ChatCompletion.create", "openai.Embedding.create"] + else: + apis = [ + "openai.resources.Completions.create", + "openai.resources.chat.Completions.create", + "openai.resources.Embeddings.create", + ] + + with patch(apis[0], new=mock_openai), patch(apis[1], new=mock_openai), patch(apis[2], new=mock_openai): + Tracer.start_tracing("mock_run_id") + inject_openai_api() + + if IS_LEGACY_OPENAI: + return_string = openai.Completion.create(stream=False) + return_generator = openai.Completion.create(stream=True) + else: + return_string = openai.resources.Completions.create(stream=False) + return_generator = openai.resources.Completions.create(stream=True) + + assert return_string == "This is a returned string" + assert isinstance(return_generator, GeneratorType) + + for _ in return_generator: + pass + + traces = Tracer.end_tracing() + assert len(traces) == 2 + for trace in traces: + assert trace["type"] == "LLM" + if trace["inputs"]["stream"]: + assert trace["output"] == ["This is a yielded string"] + else: + assert trace["output"] == "This is a returned string" + + +@pytest.mark.unittest +@pytest.mark.asyncio +async def test_openai_generator_proxy_async(): + async def mock_openai(**kwargs): + # check if args has a stream parameter + if "stream" in kwargs and kwargs["stream"]: + # stream parameter is true, yield a string + def generator(): + yield "This is a yielded string" + + return generator() + else: + # stream parameter is false or not given, return a string + return "This is a returned string" + + if IS_LEGACY_OPENAI: + apis = ["openai.Completion.acreate", "openai.ChatCompletion.acreate", "openai.Embedding.acreate"] + else: + apis = [ + "openai.resources.AsyncCompletions.create", + "openai.resources.chat.AsyncCompletions.create", + "openai.resources.AsyncEmbeddings.create", + ] + + with patch(apis[0], new=mock_openai), patch(apis[1], new=mock_openai), patch(apis[2], new=mock_openai): + Tracer.start_tracing("mock_run_id") + inject_openai_api() + + if IS_LEGACY_OPENAI: + return_string = await openai.Completion.acreate(stream=False) + return_generator = await openai.Completion.acreate(stream=True) + else: + return_string = await openai.resources.AsyncCompletions.create(stream=False) + return_generator = await openai.resources.AsyncCompletions.create(stream=True) + + assert return_string == "This is a returned string" + assert isinstance(return_generator, GeneratorType) + + for _ in return_generator: + pass + + traces = Tracer.end_tracing() + assert len(traces) == 2 + for trace in traces: + assert trace["type"] == "LLM" + if trace["inputs"]["stream"]: + assert trace["output"] == ["This is a yielded string"] + else: + assert trace["output"] == "This is a returned string" + + +# The new generator-based test function +@pytest.mark.parametrize( + "is_legacy, expected_apis_with_injectors", + [ + ( + False, + [ + ( + _openai_apis()[0], + inject_sync, + ), + ( + _openai_apis()[1], + inject_async, + ), + ], + ), + ( + True, + [ + ( + _legacy_openai_apis()[0], + inject_sync, + ), + ( + _legacy_openai_apis()[1], + inject_async, + ), + ], + ), + ], +) +def test_api_list(is_legacy, expected_apis_with_injectors): + with patch("promptflow.tracing._integrations._openai_injector.IS_LEGACY_OPENAI", is_legacy): + # Using list comprehension to get all items from the generator + actual_apis_with_injectors = list(_openai_api_list()) + # Assert that the actual list matches the expected list + assert actual_apis_with_injectors == expected_apis_with_injectors + + +@pytest.mark.parametrize( + "apis_with_injectors, expected_output, expected_logs", + [ + ( + [((("MockModule", "MockAPI", "create", TraceType.LLM, "Mock.create"),), inject_sync)], + [(MockAPI, "create", TraceType.LLM, inject_sync, "Mock.create")], + [], + ), + ( + [((("MockModule", "MockAPI", "create", TraceType.LLM, "Mock.acreate"),), inject_async)], + [(MockAPI, "create", TraceType.LLM, inject_async, "Mock.acreate")], + [], + ), + ], +) +def test_generate_api_and_injector(apis_with_injectors, expected_output, expected_logs, caplog): + with patch("importlib.import_module", return_value=MagicMock(MockAPI=MockAPI)) as mock_import_module: + # Capture the logs + with caplog.at_level(logging.WARNING): + # Run the generator and collect the output + result = list(_generate_api_and_injector(apis_with_injectors)) + + # Check if the logs match the expected logs + assert len(caplog.records) == len(expected_logs) + for record, expected_message in zip(caplog.records, expected_logs): + assert expected_message in record.message + + # Check if the result matches the expected output + assert result == expected_output + + mock_import_module.assert_called_with("MockModule") + + +def test_generate_api_and_injector_attribute_error_logging(caplog): + apis = [ + ((("NonExistentModule", "NonExistentAPI", "create", TraceType.LLM, "create"),), MagicMock()), + ( + ( + ( + "MockModuleMissingMethod", + "MockAPIMissingMethod", + "missing_method", + "missing_trace_type", + "missing_name", + ), + ), + MagicMock(), + ), + ] + + # Set up the side effect for the mock + def import_module_effect(name): + if name == "MockModuleMissingMethod": + module = MagicMock() + delattr(module, "MockAPIMissingMethod") # Use delattr to remove the attribute + return module + else: + raise ModuleNotFoundError(f"No module named '{name}'") + + with patch("importlib.import_module") as mock_import_module: + mock_import_module.side_effect = import_module_effect + with caplog.at_level(logging.WARNING): + list(_generate_api_and_injector(apis)) + + assert len(caplog.records) == 2 + assert "An unexpected error occurred" in caplog.records[0].message + assert "NonExistentModule" in caplog.records[0].message + assert "does not have the class" in caplog.records[1].message + assert "MockAPIMissingMethod" in caplog.records[1].message + + # Verify that `importlib.import_module` was called with correct module names + mock_import_module.assert_any_call("NonExistentModule") + mock_import_module.assert_any_call("MockModuleMissingMethod") + + +@pytest.mark.unittest +def test_inject_and_recover_openai_api(): + class FakeAPIWithoutOriginal: + @staticmethod + def create(): + pass + + class FakeAPIWithOriginal: + @staticmethod + def create(): + pass + + def dummy_api(): + pass + + # Real injector function that adds an _original attribute + def injector(f, trace_type, name): + def wrapper_fun(*args, **kwargs): + return f(*args, **kwargs) + + wrapper_fun._original = f + return wrapper_fun + + # Set an _original attribute for the create method of FakeAPIWithOriginal + FakeAPIWithOriginal.create._original = dummy_api + + # Store the original create methods before injection + original_api_without_original = FakeAPIWithoutOriginal.create + original_api_with_original = FakeAPIWithOriginal.create + + # Mock the generator function to yield our mocked api and method + with patch( + "promptflow.tracing._integrations._openai_injector.available_openai_apis_and_injectors", + return_value=[ + (FakeAPIWithoutOriginal, "create", TraceType.LLM, injector, "create"), + (FakeAPIWithOriginal, "create", TraceType.LLM, injector, "create"), + ], + ): + # Call the function to inject the APIs + inject_openai_api() + + # Check that the _original attribute was set for the method that didn't have it + assert hasattr(FakeAPIWithoutOriginal.create, "_original") + # Ensure the _original attribute points to the correct original method + assert FakeAPIWithoutOriginal.create._original is original_api_without_original + + # Check that the injector was not applied again to the method that already had an _original attribute + # The _original attribute should still point to the mock, not the original method + assert getattr(FakeAPIWithOriginal.create, "_original") is not FakeAPIWithOriginal.create + # The original method should remain unchanged + assert FakeAPIWithOriginal.create is original_api_with_original + + # Call the function to recover the APIs + recover_openai_api() + + # Check that the _original attribute was removed for the method that didn't have it + assert not hasattr(FakeAPIWithoutOriginal.create, "_original") + assert not hasattr(FakeAPIWithOriginal.create, "_original") + + # The original methods should be restored + assert FakeAPIWithoutOriginal.create is original_api_without_original + assert FakeAPIWithOriginal.create is dummy_api diff --git a/src/promptflow-tracing/tests/unittests/test_operation_context.py b/src/promptflow-tracing/tests/unittests/test_operation_context.py new file mode 100644 index 00000000000..5aff5e40593 --- /dev/null +++ b/src/promptflow-tracing/tests/unittests/test_operation_context.py @@ -0,0 +1,118 @@ +import threading + +import pytest + +from promptflow.tracing._operation_context import OperationContext +from promptflow.tracing._version import VERSION + + +def run_test_with_new_context(assert_func): + context = OperationContext.get_instance() + assert_func(context) + context.set_instance(None) + + +@pytest.mark.unittest +class TestOperationContext: + def test_copy_and_set_instance(self): + def assert_context(context): + original_context = context + original_context._add_otel_attributes("test_key", "test_value") + context_copy = original_context.copy() + OperationContext.set_instance(context_copy) + context = OperationContext.get_instance() + context._add_otel_attributes("test_key2", "test_value2") + assert context._get_otel_attributes() == {"test_key": "test_value", "test_key2": "test_value2"} + assert original_context._get_otel_attributes() == {"test_key": "test_value"} + + run_test_with_new_context(assert_context) + + def test_user_agent(self): + def assert_context(context): + context.append_user_agent("test_agent/0.0.1") + context.append_user_agent("test_agent/0.0.2") + assert context.get_user_agent() == f"test_agent/0.0.1 test_agent/0.0.2 promptflow-tracing/{VERSION}" + + run_test_with_new_context(assert_context) + + def test_get_request_id(self): + def assert_context(context): + assert context.get_request_id() == "unknown" + context["request_id"] = "test_request_id" + assert context.get_request_id() == "test_request_id" + + run_test_with_new_context(assert_context) + + def test_context_dict(self): + def assert_context(context): + context.test_key = "test_value" + context.test_key2 = "test_value2" + context_dict = context.get_context_dict() + assert context_dict["test_key"] == "test_value" + assert context_dict["test_key2"] == "test_value2" + run_test_with_new_context(assert_context) + + def test_setattr(self): + def assert_context(context): + # 1. Normal case + context.test_key = "test_value" + assert context["test_key"] == "test_value" + # 2. Non-primitive type value + context.test_key = [1, 2, 3] + assert context["test_key"] == [1, 2, 3] + run_test_with_new_context(assert_context) + + def test_getattr(self): + def assert_context(context): + # 1. Normal case + context["test_key"] = "test_value" + assert context.test_key == "test_value" + # 2. Non-existent key + with pytest.raises(AttributeError): + context.non_exist_key + run_test_with_new_context(assert_context) + + def test_delattr(self): + def assert_context(context): + # 1. Normal case + context.test_key = "test_value" + del context.test_key + assert "test_key" not in context + # 2. Non-existent key + with pytest.raises(AttributeError): + del context.non_exist_key + run_test_with_new_context(assert_context) + + def test_default_tracing_keys(self): + def assert_context(context): + context.set_default_tracing_keys({"test_key", "test_key2"}) + assert context._tracking_keys == {"test_key", "test_key2"} + context.set_default_tracing_keys({"test_key3"}) + assert context._tracking_keys == {"test_key", "test_key2", "test_key3"} + run_test_with_new_context(assert_context) + + def test_get_instance(self): + context1 = OperationContext.get_instance() + context2 = OperationContext.get_instance() + assert context1 is context2 + + def test_different_thread_have_different_instance(self): + # create a list to store the OperationContext instances from each thread + instances = [] + + # define a function that gets the OperationContext instance and appends it to the list + def get_instance(): + instance = OperationContext.get_instance() + instances.append(instance) + + # create two threads and run the function in each thread + thread1 = threading.Thread(target=get_instance) + thread2 = threading.Thread(target=get_instance) + thread1.start() + thread2.start() + thread1.join() + thread2.join() + + # assert that the list has two elements and they are different objects + assert len(instances) == 2 + assert instances[0] is not instances[1] diff --git a/src/promptflow-tracing/tests/unittests/test_start_trace.py b/src/promptflow-tracing/tests/unittests/test_start_trace.py new file mode 100644 index 00000000000..78f36383b02 --- /dev/null +++ b/src/promptflow-tracing/tests/unittests/test_start_trace.py @@ -0,0 +1,57 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import uuid + +import pytest +from opentelemetry import trace +from opentelemetry.sdk.trace import TracerProvider +from pytest_mock import MockerFixture + +import promptflow.tracing._start_trace +from promptflow.tracing import start_trace +from promptflow.tracing._constants import ( + PF_TRACING_SKIP_LOCAL_SETUP_ENVIRON, + RESOURCE_ATTRIBUTES_SERVICE_NAME, + ResourceAttributesFieldName, +) + + +@pytest.mark.unittest +class TestStartTrace: + def test_tracer_provider_after_start_trace(self) -> None: + start_trace() + tracer_provider = trace.get_tracer_provider() + assert isinstance(tracer_provider, TracerProvider) + attrs = tracer_provider.resource.attributes + assert attrs[ResourceAttributesFieldName.SERVICE_NAME] == RESOURCE_ATTRIBUTES_SERVICE_NAME + assert ResourceAttributesFieldName.COLLECTION not in attrs + + def test_tracer_provider_overwritten(self) -> None: + trace.set_tracer_provider(TracerProvider()) + old_tracer_provider = trace.get_tracer_provider() + start_trace() + new_tracer_provider = trace.get_tracer_provider() + assert id(old_tracer_provider) != id(new_tracer_provider) + + def test_tracer_provider_resource_attributes(self) -> None: + collection = str(uuid.uuid4()) + res_attrs = {"attr1": "value1", "attr2": "value2"} + start_trace(resource_attributes=res_attrs, collection=collection) + tracer_provider: TracerProvider = trace.get_tracer_provider() + attrs = tracer_provider.resource.attributes + assert attrs[ResourceAttributesFieldName.COLLECTION] == collection + assert attrs["attr1"] == "value1" + assert attrs["attr2"] == "value2" + + def test_skip_tracing_local_setup(self, monkeypatch: pytest.MonkeyPatch, mocker: MockerFixture) -> None: + spy = mocker.spy(promptflow.tracing._start_trace, "_is_devkit_installed") + # configured environ to skip local setup + with monkeypatch.context() as m: + m.setenv(PF_TRACING_SKIP_LOCAL_SETUP_ENVIRON, "true") + start_trace() + assert spy.call_count == 0 + # no environ, should call local setup once + start_trace() + assert spy.call_count == 1 diff --git a/src/promptflow-tracing/tests/unittests/test_trace.py b/src/promptflow-tracing/tests/unittests/test_trace.py new file mode 100644 index 00000000000..273974c8a65 --- /dev/null +++ b/src/promptflow-tracing/tests/unittests/test_trace.py @@ -0,0 +1,286 @@ +import json +import time +from enum import Enum +from unittest.mock import patch + +import pytest +from openai.types.create_embedding_response import CreateEmbeddingResponse, Embedding, Usage + +from promptflow.tracing._operation_context import OperationContext +from promptflow.tracing._trace import ( + TokenCollector, + enrich_span_with_context, + enrich_span_with_embedding, + enrich_span_with_input, + enrich_span_with_llm, + enrich_span_with_openai_tokens, + enrich_span_with_prompt_info, + enrich_span_with_trace, + serialize_attribute, +) +from promptflow.tracing.contracts.trace import TraceType + + +class MockSpan: + def __init__(self, span_context, parent=None, raise_exception_for_attr=False): + self.span_context = span_context + self.name = "mock_span" + self.parent = parent + self.raise_exception_for_attr = raise_exception_for_attr + self.attributes = {} + self.events = [] + + def get_span_context(self): + return self.span_context + + def set_attribute(self, key, value): + if not self.raise_exception_for_attr: + self.attributes[key] = value + else: + raise Exception("Dummy Error") + + def set_attributes(self, attributes): + if not self.raise_exception_for_attr: + self.attributes.update(attributes) + else: + raise Exception("Dummy Error") + + def add_event(self, name: str, attributes=None, timestamp=None): + self.events.append(MockEvent(name, attributes, timestamp)) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + return False + + +class MockEvent: + def __init__(self, name, attributes, timestamp=None): + self.name = name + self.attributes = attributes + self.timestamp = timestamp or int(time.time()) + + +class MockSpanContext: + def __init__(self, span_id): + self.span_id = span_id + + +class MockOutput: + def __init__(self, prompt_tokens, completion_token, total_tokens): + self.usage = MockUsage(prompt_tokens, completion_token, total_tokens) + + +class MockUsage: + def __init__(self, prompt_tokens, completion_token, total_tokens): + self.prompt_tokens = prompt_tokens + self.completion_token = completion_token + self.total_tokens = total_tokens + + def dict(self): + return { + "prompt_tokens": self.prompt_tokens, + "completion_token": self.completion_token, + "total_tokens": self.total_tokens, + } + + +class MockTrace: + def __init__(self, function, type): + self.function = function + self.type = type + + +class MockTraceType(Enum): + TYPE_1 = "type_1" + + +@pytest.mark.unittest +def test_token_collector(): + """ + 1 + / | + 2 3 + | + 4 + """ + token_collector = TokenCollector() + span_1 = MockSpan(MockSpanContext(1)) + span_2 = MockSpan(MockSpanContext(2), parent=span_1.span_context) + span_3 = MockSpan(MockSpanContext(3), parent=span_1.span_context) + span_4 = MockSpan(MockSpanContext(4), parent=span_2.span_context) + + output_3 = MockOutput(7, 13, 20) + output_4 = MockOutput(17, 13, 30) + token_collector.collect_openai_tokens(span_3, output_3) + token_collector.collect_openai_tokens_for_parent_span(span_3) + token_collector.collect_openai_tokens(span_4, output_4) + token_collector.collect_openai_tokens_for_parent_span(span_4) + token_collector.collect_openai_tokens_for_parent_span(span_2) + token_collector.collect_openai_tokens_for_parent_span(span_1) + assert token_collector._span_id_to_tokens == { + 1: {"prompt_tokens": 24, "completion_token": 26, "total_tokens": 50}, + 2: {"prompt_tokens": 17, "completion_token": 13, "total_tokens": 30}, + 3: {"prompt_tokens": 7, "completion_token": 13, "total_tokens": 20}, + 4: {"prompt_tokens": 17, "completion_token": 13, "total_tokens": 30}, + } + + +@pytest.mark.unittest +def test_enrich_span_with_context(caplog): + with patch.object(OperationContext, "_get_otel_attributes", return_value={"test_key": "test_value"}): + # Normal case + span = MockSpan(MockSpanContext(1)) + enrich_span_with_context(span) + assert span.attributes == {"test_key": "test_value"} + + # Raise exception when update attributes + span = MockSpan(MockSpanContext(1), raise_exception_for_attr=True) + enrich_span_with_context(span) + assert caplog.records[0].levelname == "WARNING" + assert "Failed to enrich span with context" in caplog.text + + +@pytest.mark.unittest +def test_enrich_span_with_trace(caplog): + with patch("promptflow.tracing._trace.get_node_name_from_context", return_value="test_node_name"): + # Normal case + span = MockSpan(MockSpanContext(1)) + trace = MockTrace("test_trace", MockTraceType.TYPE_1) + enrich_span_with_trace(span, trace) + assert span.attributes == { + "framework": "promptflow", + "span_type": "type_1", + "function": "test_trace", + "node_name": "test_node_name", + } + + # Raise exception when update attributes + span = MockSpan(MockSpanContext(1), raise_exception_for_attr=True) + enrich_span_with_trace(span, trace) + assert caplog.records[0].levelname == "WARNING" + assert "Failed to enrich span with trace" in caplog.text + + +@pytest.mark.unittest +def test_enrich_span_with_prompt_info(caplog): + with patch("promptflow.tracing._trace.get_prompt_param_name_from_func", return_value="prompt_tpl"), patch( + "promptflow.tracing._trace.get_input_names_for_prompt_template", return_value=["input_1", "input_2"] + ): + test_prompt_args = {"prompt_tpl": "prompt_tpl", "input_1": "value_1", "input_2": "value_2"} + expected_prompt_info = { + "prompt.template": "prompt_tpl", + "prompt.variables": '{\n "input_1": "value_1",\n "input_2": "value_2"\n}', + } + + # Normal case + span = MockSpan(MockSpanContext(1)) + enrich_span_with_prompt_info(span, None, test_prompt_args) + + assert span.attributes == expected_prompt_info + assert span.events[0].name == "promptflow.prompt.template" + assert span.events[0].attributes == {"payload": serialize_attribute(expected_prompt_info)} + + # Raise exception when update attributes + span = MockSpan(MockSpanContext(1), raise_exception_for_attr=True) + enrich_span_with_prompt_info(span, None, test_prompt_args) + + assert caplog.records[0].levelname == "WARNING" + assert "Failed to enrich span with prompt info" in caplog.text + + +@pytest.mark.unittest +def test_enrich_span_with_input(caplog): + # Normal case + span = MockSpan(MockSpanContext(1)) + enrich_span_with_input(span, "input") + assert span.attributes == {"inputs": '"input"'} + + # Raise exception when update attributes + span = MockSpan(MockSpanContext(1), raise_exception_for_attr=True) + enrich_span_with_input(span, "input") + assert caplog.records[0].levelname == "WARNING" + assert "Failed to enrich span with input" in caplog.text + + +@pytest.mark.unittest +def test_enrich_span_with_openai_tokens(caplog): + tokens = {"prompt_tokens": 10, "completion_token": 20, "total_tokens": 30} + cumulative_tokens = {f"__computed__.cumulative_token_count.{k.split('_')[0]}": v for k, v in tokens.items()} + llm_tokens = {f"llm.usage.{k}": v for k, v in tokens.items()} + llm_tokens.update(cumulative_tokens) + with patch("promptflow.tracing._trace.token_collector.try_get_openai_tokens", return_value=tokens): + # Normal case + span = MockSpan(MockSpanContext(1)) + enrich_span_with_openai_tokens(span, TraceType.FUNCTION) + assert span.attributes == cumulative_tokens + + # LLM case + span = MockSpan(MockSpanContext(1)) + enrich_span_with_openai_tokens(span, TraceType.LLM) + assert span.attributes == llm_tokens + + # Embedding case + span = MockSpan(MockSpanContext(1)) + enrich_span_with_openai_tokens(span, TraceType.EMBEDDING) + assert span.attributes == llm_tokens + + # Raise exception when update attributes + span = MockSpan(MockSpanContext(1), raise_exception_for_attr=True) + enrich_span_with_openai_tokens(span, TraceType.FUNCTION) + assert caplog.records[0].levelname == "WARNING" + assert "Failed to enrich span with openai tokens" in caplog.text + + +@pytest.mark.unittest +def test_enrich_span_with_llm(): + span = MockSpan(MockSpanContext(1)) + model = "test_model" + generated_message = "test_message" + + enrich_span_with_llm(span, model, generated_message) + + span.attributes == { + "llm.response.model": model, + "llm.generated_message": generated_message, + } + span.events[0].name == "promptflow.llm.generated_message" + span.events[0].attributes == {"payload": serialize_attribute(generated_message)} + + +@pytest.mark.unittest +def test_enrich_span_with_embedding(): + span = MockSpan(MockSpanContext(1)) + test_inputs = {"input": "test"} + test_embedding = Embedding(index=0, embedding=[0.1, 0.2, 0.3], object="embedding") + usage = Usage(prompt_tokens=10, total_tokens=20) + test_response = CreateEmbeddingResponse(model="gpt-3", data=[test_embedding], object="list", usage=usage) + + expected_embedding = [{"embedding.vector": "<3 dimensional vector>", "embedding.text": "test"}] + expected_attributes = { + "llm.response.model": "gpt-3", + "embedding.embeddings": serialize_attribute(expected_embedding), + } + + enrich_span_with_embedding(span, test_inputs, test_response) + + assert span.attributes == expected_attributes + assert span.events[0].name == "promptflow.embedding.embeddings" + assert span.events[0].attributes == {"payload": serialize_attribute(expected_embedding)} + + +@pytest.mark.unittest +def test_serialize_attribute_with_serializable_data(): + data = {"key": "value"} + result = serialize_attribute(data) + assert result == json.dumps(data, indent=2) + + +@pytest.mark.unittest +def test_serialize_attribute_with_non_serializable_data(): + class NonSerializable: + pass + + data = NonSerializable() + assert serialize_attribute(data) == json.dumps(str(data)) diff --git a/src/promptflow-tracing/tests/unittests/test_utils.py b/src/promptflow-tracing/tests/unittests/test_utils.py new file mode 100644 index 00000000000..c962657fad4 --- /dev/null +++ b/src/promptflow-tracing/tests/unittests/test_utils.py @@ -0,0 +1,85 @@ +from dataclasses import dataclass +from datetime import datetime +from enum import Enum + +import pytest + +from promptflow.tracing._utils import get_input_names_for_prompt_template, get_prompt_param_name_from_func, serialize +from promptflow.tracing.contracts.generator_proxy import GeneratorProxy + + +class DummyEnum(Enum): + ITEM = "Item" + + +@pytest.mark.unittest +@pytest.mark.parametrize( + "value, expected", + [ + (datetime(2023, 9, 4), "2023-09-04T00:00:00Z"), + (DummyEnum.ITEM, "Item"), + ([1, 2, 3], [1, 2, 3]), + ({"a": 1, "b": 2}, {"a": 1, "b": 2}), + (1, 1), + ("a", "a"), + ], +) +def test_serialize(value, expected): + assert serialize(value) == expected + + +@pytest.mark.unittest +def test_serialize_dataclass(): + @dataclass + class DummyDataClass: + item: str + optional_item: str = None + + @dataclass + class DataClassWithSerialize: + item: str + + def serialize(self): + return f"The item is {self.item}." + + assert serialize(DummyDataClass("text", "text")) == {"item": "text", "optional_item": "text"} + assert serialize(DummyDataClass("text")) == {"item": "text", "optional_item": None} + assert serialize(DummyDataClass("text"), remove_null=True) == {"item": "text"} + assert serialize(DataClassWithSerialize("text")) == "The item is text." + + +@pytest.mark.unittest +def test_serialize_with_serialization_funcs(): + class DummyClass: + def __init__(self, item): + self.item = item + + def serialize(self): + return {"item": self.item} + + serialization_funcs = {DummyClass: DummyClass.serialize} + assert serialize(DummyClass("test"), serialization_funcs=serialization_funcs) == {"item": "test"} + + +@pytest.mark.unittest +def test_serialize_generator(): + def generator(): + for i in range(3): + yield i + + g = GeneratorProxy(generator()) + next(g), next(g), next(g) + assert serialize(g) == [0, 1, 2] + + +@pytest.mark.unittest +def test_get_input_names_for_prompt_template(): + assert get_input_names_for_prompt_template("{{input}}") == [] + + +@pytest.mark.unittest +def test_get_prompt_param_name_from_func(): + def dummy_func(input: str): + pass + + assert get_prompt_param_name_from_func(dummy_func) is None diff --git a/src/promptflow-tracing/tests/utils.py b/src/promptflow-tracing/tests/utils.py new file mode 100644 index 00000000000..550d95a088c --- /dev/null +++ b/src/promptflow-tracing/tests/utils.py @@ -0,0 +1,40 @@ +import traceback +from multiprocessing import Queue, get_context + +from opentelemetry.sdk.trace import TracerProvider +from opentelemetry.sdk.trace.export import SimpleSpanProcessor +from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter +from opentelemetry.trace import set_tracer_provider + + +def execute_function_in_subprocess(func, *args, **kwargs): + """ + Execute a function in a new process and return any exception that occurs. + Replace pickle with dill for better serialization capabilities. + """ + ctx = get_context("spawn") + error_queue = ctx.Queue() + process = ctx.Process(target=_run_in_subprocess, args=(error_queue, func, args, kwargs)) + process.start() + process.join() # Wait for the process to finish + + if not error_queue.empty(): + err, stacktrace_str = error_queue.get() + raise Exception(f"An error occurred in the subprocess: {err}\nStacktrace:\n{stacktrace_str}") + assert process.exitcode == 0, f"Subprocess exited with code {process.exitcode}" + + +def _run_in_subprocess(error_queue: Queue, func, args, kwargs): + try: + func(*args, **kwargs) + except BaseException as e: + error_queue.put((repr(e), traceback.format_exc())) + + +def prepare_memory_exporter(): + provider = TracerProvider() + exporter = InMemorySpanExporter() + processor = SimpleSpanProcessor(exporter) + provider.add_span_processor(processor) + set_tracer_provider(provider) + return exporter diff --git a/src/promptflow/CHANGELOG.md b/src/promptflow/CHANGELOG.md index 8aa946ad81f..3ddc1792999 100644 --- a/src/promptflow/CHANGELOG.md +++ b/src/promptflow/CHANGELOG.md @@ -1,22 +1,32 @@ # Release History -## 1.7.0 (Upcoming) +## 1.8.0 (Upcoming) ### Features Added - -- [SDK/CLI] Create a run with `resume_from`, note that only run created with `promptflow>=1.7.0` can be used as the value of `resume_from`: +- [SDK/CLI] Create a run with `resume_from`, note that only run created with `promptflow>=1.8.0` can be used as the value of `resume_from`: - CLI: Support `pf run create --resume-from ` to create a run resume from another run. - SDK: Support `pf.run(resume_from=)` to create a run resume from another run. - [SDK/CLI][azure] Create a run with `resume_from`. - CLI: Support `pfazure run create --resume-from ` to create a run resume from another run. - - SDK: Support `pf.run(resume_from=)` to create a run resume from another run. -- [SDK] Support flow exectue as async function: `load_flow(, is_async_call=True)` will return an async callable flow object. + - SDK: Support `p.run(resume_from=)` to create a run resume from another run. + +## 1.7.0 (2024.03.25) + +### NOTICES +- Import warnings will be printed when importing from `promptflow` namespace, please use imports from new namespaces + suggested in the warning message. + +### Features Added +- [Batch] Added per-line logging for batch runs, stored under the `flow_logs` folder. - [SDK/CLI] Support `AzureOpenAIConnection.from_env` and `OpenAIConnection.from_env`. Reach more details [here](https://microsoft.github.io/promptflow/how-to-guides/manage-connections.html#load-from-environment-variables). ### Bugs Fixed - [SDK/CLI] environment variable `PF_HOME_DIRECTORY` doesn't work for run details & logs. +- [SDK/CLI] Support override hard coded "deployment_name" and "model". +- [SDK] `connection.provider` config doesn't work when calling flow as a function. +- [SDK/CLI] Support override unprovided connection inputs in nodes. ## 1.6.0 (2024.03.01) diff --git a/src/promptflow/MANIFEST.in b/src/promptflow/MANIFEST.in index 298b1e48280..e69de29bb2d 100644 --- a/src/promptflow/MANIFEST.in +++ b/src/promptflow/MANIFEST.in @@ -1,6 +0,0 @@ -include promptflow/azure/resources/* -include promptflow/_sdk/_serving/static/* -include promptflow/_sdk/_service/static/* -include promptflow/_sdk/_service/templates/* -recursive-include promptflow/_cli/data * -recursive-include promptflow/_sdk/data * diff --git a/src/promptflow/pf b/src/promptflow/pf deleted file mode 100644 index 0447b972c1d..00000000000 --- a/src/promptflow/pf +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python - -import sys -import os - -if os.environ.get('PF_INSTALLER') is None: - os.environ['PF_INSTALLER'] = 'PIP' - -os.execl(sys.executable, sys.executable, '-m', 'promptflow._cli._pf.entry', *sys.argv[1:]) diff --git a/src/promptflow/pf.bat b/src/promptflow/pf.bat deleted file mode 100644 index 81105d54505..00000000000 --- a/src/promptflow/pf.bat +++ /dev/null @@ -1,10 +0,0 @@ -@echo off -setlocal - -SET PF_INSTALLER=PIP - -IF EXIST "%~dp0\python.exe" ( - "%~dp0\python.exe" -m promptflow._cli._pf.entry %* -) ELSE ( - python -m promptflow._cli._pf.entry %* -) diff --git a/src/promptflow/promptflow/__init__.py b/src/promptflow/promptflow/__init__.py index 38344b20407..202dc5cb06b 100644 --- a/src/promptflow/promptflow/__init__.py +++ b/src/promptflow/promptflow/__init__.py @@ -3,20 +3,58 @@ # --------------------------------------------------------- __path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore -from promptflow._core.metric_logger import log_metric +import logging +from typing import Any -# flake8: noqa -from promptflow._core.tool import ToolProvider, tool +# Note: Keep old import ensure import order +# Keep old import as hidden to let __getattr__ works +from promptflow._core.metric_logger import log_metric as _log_metric +from promptflow._core.tool import ToolProvider as _ToolProvider +from promptflow._core.tool import tool as _tool # control plane sdk functions -from promptflow._sdk._load_functions import load_flow, load_run +from promptflow._sdk._load_functions import load_flow as _load_flow +from promptflow._sdk._load_functions import load_run as _load_run +from promptflow._sdk._pf_client import PFClient as _PFClient -from ._sdk._pf_client import PFClient +# flake8: noqa from ._version import VERSION -# backward compatibility -log_flow_metric = log_metric - __version__ = VERSION -__all__ = ["PFClient", "load_flow", "load_run", "log_metric", "ToolProvider", "tool"] +_core_attr = ["log_metric", "ToolProvider", "tool"] +_client_attr = ["PFClient", "load_flow", "load_run"] +_imported_attr = {} + + +def _log_warning(name, target_module, target_name=None) -> Any: + target_name = name if not target_name else target_name + legacy_import = f"from promptflow import {name}" + new_import = f"from promptflow.{target_module} import {target_name}" + logging.warning(f"{legacy_import!r} is deprecated and will be removed in the future. Use {new_import!r} instead.") + + +def __getattr__(name): + if name in _imported_attr: + return _imported_attr[name] + if name in _core_attr: + from promptflow.core import ToolProvider, log_metric, tool + + _log_warning(name, "core") + _imported_attr[name] = locals()[name] + return _imported_attr[name] + if name in _client_attr: + # control plane sdk functions + from promptflow.client import PFClient, load_flow, load_run + + _log_warning(name, "client") + _imported_attr[name] = locals()[name] + return _imported_attr[name] + if name == "log_flow_metric": + # backward compatibility + from promptflow.core import log_metric + + _log_warning(name, "core", "log_metric") + _imported_attr[name] = log_metric + return _imported_attr[name] + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/src/promptflow/promptflow/_cli/data/entry_flow/requirements_txt b/src/promptflow/promptflow/_cli/data/entry_flow/requirements_txt deleted file mode 100644 index 2201c932fb3..00000000000 --- a/src/promptflow/promptflow/_cli/data/entry_flow/requirements_txt +++ /dev/null @@ -1 +0,0 @@ -promptflow \ No newline at end of file diff --git a/src/promptflow/promptflow/_sdk/_orm/trace.py b/src/promptflow/promptflow/_sdk/_orm/trace.py deleted file mode 100644 index a42eb1844b5..00000000000 --- a/src/promptflow/promptflow/_sdk/_orm/trace.py +++ /dev/null @@ -1,130 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -import copy -import typing - -from sqlalchemy import TEXT, Column, Index, text -from sqlalchemy.exc import IntegrityError -from sqlalchemy.orm import Query, declarative_base - -from promptflow._sdk._constants import SPAN_TABLENAME, TRACE_LIST_DEFAULT_LIMIT - -from .retry import sqlite_retry -from .session import trace_mgmt_db_session - -Base = declarative_base() - - -class Span(Base): - __tablename__ = SPAN_TABLENAME - - name = Column(TEXT, nullable=False) - trace_id = Column(TEXT, nullable=False) - span_id = Column(TEXT, primary_key=True) - parent_span_id = Column(TEXT, nullable=True) - span_type = Column(TEXT, nullable=False) # Function/Tool/Flow/LLM/LangChain... - session_id = Column(TEXT, nullable=False) - content = Column(TEXT) # JSON string - # prompt flow concepts - path = Column(TEXT, nullable=True) - run = Column(TEXT, nullable=True) - experiment = Column(TEXT, nullable=True) - - __table_args__ = ( - Index("idx_span_name", "name"), - Index("idx_span_span_type", "span_type"), - Index("idx_span_session_id", "session_id"), - Index("idx_span_run", "run"), - Index("idx_span_experiment", "experiment"), - ) - - @sqlite_retry - def persist(self) -> None: - with trace_mgmt_db_session() as session: - try: - session.add(self) - session.commit() - except IntegrityError as e: - # ignore "sqlite3.IntegrityError: UNIQUE constraint failed" - # according to OTLP 1.1.0: https://opentelemetry.io/docs/specs/otlp/#duplicate-data - # there might be duplicate data, we silently ignore it here - if "UNIQUE constraint failed" not in str(e): - raise - - @staticmethod - @sqlite_retry - def list( - session_id: typing.Optional[str] = None, - trace_ids: typing.Optional[typing.List[str]] = None, - ) -> typing.List["Span"]: - with trace_mgmt_db_session() as session: - stmt: Query = session.query(Span) - if session_id is not None: - stmt = stmt.filter(Span.session_id == session_id) - if trace_ids is not None: - stmt = stmt.filter(Span.trace_id.in_(trace_ids)) - stmt = stmt.order_by(text("json_extract(span.content, '$.start_time') asc")) - if session_id is None and trace_ids is None: - stmt = stmt.limit(TRACE_LIST_DEFAULT_LIMIT) - return [span for span in stmt.all()] - - @staticmethod - def list_with_runs(runs: typing.List[str]) -> typing.List["Span"]: - with trace_mgmt_db_session() as session: - stmt: Query = session.query(Span) - runs_string = "" - for run in runs: - runs_string += f"'{run}'," - runs_string = runs_string[:-1] # remove the last comma - stmt = stmt.filter( - text( - "(parent_span_id is null OR parent_span_id = '') AND " - f"(json_extract(json_extract(span.content, '$.attributes'), '$.batch_run_id') in ({runs_string}) OR " # noqa: E501 - f"json_extract(json_extract(span.content, '$.attributes'), '$.\"referenced.batch_run_id\"') in ({runs_string}))" # noqa: E501 - ) - ) - stmt = stmt.order_by( - Span.trace_id, - text("json_extract(span.content, '$.start_time') asc"), - ) - return [span for span in stmt.all()] - - -class LineRun: - """Line run is an abstraction of spans, which is not persisted in the database.""" - - @staticmethod - def list( - session_id: typing.Optional[str] = None, - experiments: typing.Optional[typing.List[str]] = None, - ) -> typing.List[typing.List[Span]]: - with trace_mgmt_db_session() as session: - stmt: Query = session.query(Span) - if session_id is not None: - stmt = stmt.filter(Span.session_id == session_id) - if experiments is not None: - stmt = stmt.filter(Span.experiment.in_(experiments)) - stmt = stmt.order_by( - Span.trace_id, - text("json_extract(span.content, '$.start_time') asc"), - ) - if session_id is None and experiments is None: - stmt = stmt.limit(TRACE_LIST_DEFAULT_LIMIT) - line_runs = [] - current_spans: typing.List[Span] = [] - span: Span - for span in stmt.all(): - if len(current_spans) == 0: - current_spans.append(span) - continue - current_trace_id = current_spans[0].trace_id - if span.trace_id == current_trace_id: - current_spans.append(span) - continue - line_runs.append(copy.deepcopy(current_spans)) - current_spans = [span] - if len(current_spans) > 0: - line_runs.append(copy.deepcopy(current_spans)) - return line_runs diff --git a/src/promptflow/promptflow/_sdk/_service/apis/collector.py b/src/promptflow/promptflow/_sdk/_service/apis/collector.py deleted file mode 100644 index dfe90b90d4a..00000000000 --- a/src/promptflow/promptflow/_sdk/_service/apis/collector.py +++ /dev/null @@ -1,112 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -# this file is different from other files in this folder -# functions (APIs) defined in this file follows OTLP 1.1.0 -# https://opentelemetry.io/docs/specs/otlp/#otlphttp-request -# to provide OTLP/HTTP endpoint as OTEL collector - -import json -import traceback -from datetime import datetime - -from flask import current_app, request -from google.protobuf.json_format import MessageToJson -from opentelemetry.proto.collector.trace.v1.trace_service_pb2 import ExportTraceServiceRequest - -from promptflow._constants import ( - CosmosDBContainerName, - SpanFieldName, - SpanResourceAttributesFieldName, - SpanResourceFieldName, -) -from promptflow._sdk._utils import parse_kv_from_pb_attribute -from promptflow._sdk.entities._trace import Span -from promptflow._utils.thread_utils import ThreadWithContextVars - - -def trace_collector(): - content_type = request.headers.get("Content-Type") - # binary protobuf encoding - if "application/x-protobuf" in content_type: - traces_request = ExportTraceServiceRequest() - traces_request.ParseFromString(request.data) - all_spans = [] - for resource_span in traces_request.resource_spans: - resource_attributes = dict() - for attribute in resource_span.resource.attributes: - attribute_dict = json.loads(MessageToJson(attribute)) - attr_key, attr_value = parse_kv_from_pb_attribute(attribute_dict) - resource_attributes[attr_key] = attr_value - resource = { - SpanResourceFieldName.ATTRIBUTES: resource_attributes, - SpanResourceFieldName.SCHEMA_URL: resource_span.schema_url, - } - for scope_span in resource_span.scope_spans: - for span in scope_span.spans: - # TODO: persist with batch - span = Span._from_protobuf_object(span, resource=resource) - span._persist() - all_spans.append(span) - - # Create a new thread to write trace to cosmosdb to avoid blocking the main thread - ThreadWithContextVars(target=_try_write_trace_to_cosmosdb, args=(all_spans,)).start() - return "Traces received", 200 - - # JSON protobuf encoding - elif "application/json" in content_type: - raise NotImplementedError - - -def _try_write_trace_to_cosmosdb(all_spans): - if not all_spans: - return - try: - span_resource = all_spans[0]._content.get(SpanFieldName.RESOURCE, {}) - resource_attributes = span_resource.get(SpanResourceFieldName.ATTRIBUTES, {}) - subscription_id = resource_attributes.get(SpanResourceAttributesFieldName.SUBSCRIPTION_ID, None) - resource_group_name = resource_attributes.get(SpanResourceAttributesFieldName.RESOURCE_GROUP_NAME, None) - workspace_name = resource_attributes.get(SpanResourceAttributesFieldName.WORKSPACE_NAME, None) - if subscription_id is None or resource_group_name is None or workspace_name is None: - current_app.logger.debug("Cannot find workspace info in span resource, skip writing trace to cosmosdb.") - return - - current_app.logger.info(f"Start writing trace to cosmosdb, total spans count: {len(all_spans)}.") - start_time = datetime.now() - from promptflow._sdk._service.app import CREATED_BY_FOR_LOCAL_TO_CLOUD_TRACE - from promptflow.azure._storage.cosmosdb.client import get_client - from promptflow.azure._storage.cosmosdb.span import Span as SpanCosmosDB - from promptflow.azure._storage.cosmosdb.summary import Summary - - # Load span and summary clients first time may slow. - # So, we load 2 client in parallel for warm up. - span_thread = ThreadWithContextVars( - target=get_client, args=(CosmosDBContainerName.SPAN, subscription_id, resource_group_name, workspace_name) - ) - span_thread.start() - - get_client(CosmosDBContainerName.LINE_SUMMARY, subscription_id, resource_group_name, workspace_name) - - span_thread.join() - - for span in all_spans: - span_client = get_client(CosmosDBContainerName.SPAN, subscription_id, resource_group_name, workspace_name) - result = SpanCosmosDB(span, CREATED_BY_FOR_LOCAL_TO_CLOUD_TRACE).persist(span_client) - # None means the span already exists, then we don't need to persist the summary also. - if result is not None: - line_summary_client = get_client( - CosmosDBContainerName.LINE_SUMMARY, subscription_id, resource_group_name, workspace_name - ) - Summary(span, CREATED_BY_FOR_LOCAL_TO_CLOUD_TRACE).persist(line_summary_client) - current_app.logger.info( - ( - f"Finish writing trace to cosmosdb, total spans count: {len(all_spans)}." - f" Duration {datetime.now() - start_time}." - ) - ) - - except Exception as e: - stack_trace = traceback.format_exc() - current_app.logger.error(f"Failed to write trace to cosmosdb: {e}, stack trace is {stack_trace}") - return diff --git a/src/promptflow/promptflow/_sdk/_service/apis/ui.py b/src/promptflow/promptflow/_sdk/_service/apis/ui.py deleted file mode 100644 index e3fa05eb978..00000000000 --- a/src/promptflow/promptflow/_sdk/_service/apis/ui.py +++ /dev/null @@ -1,18 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -from flask import Response, render_template, url_for - -from promptflow._sdk._service import Namespace, Resource - -api = Namespace("ui", description="UI") - - -@api.route("/traces") -class TraceUI(Resource): - def get(self): - return Response( - render_template("index.html", url_for=url_for), - mimetype="text/html", - ) diff --git a/src/promptflow/promptflow/_sdk/_service/entry.py b/src/promptflow/promptflow/_sdk/_service/entry.py deleted file mode 100644 index 5514224e977..00000000000 --- a/src/promptflow/promptflow/_sdk/_service/entry.py +++ /dev/null @@ -1,227 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- -import argparse -import json -import logging -import os -import platform -import subprocess -import sys - -import waitress - -from promptflow._cli._utils import _get_cli_activity_name, cli_exception_and_telemetry_handler -from promptflow._constants import PF_NO_INTERACTIVE_LOGIN -from promptflow._sdk._constants import LOGGER_NAME, PF_SERVICE_DEBUG, PF_SERVICE_WORKER_NUM -from promptflow._sdk._service.app import create_app -from promptflow._sdk._service.utils.utils import ( - check_pfs_service_status, - dump_port_to_config, - get_port_from_config, - get_started_service_info, - is_port_in_use, - kill_exist_service, -) -from promptflow._sdk._utils import get_promptflow_sdk_version, print_pf_version -from promptflow._utils.logger_utils import get_cli_sdk_logger # noqa: E402 -from promptflow.exceptions import UserErrorException - -logger = get_cli_sdk_logger() - - -def get_app(environ, start_response): - app, _ = create_app() - if os.environ.get(PF_SERVICE_DEBUG) == "true": - app.logger.setLevel(logging.DEBUG) - else: - app.logger.setLevel(logging.INFO) - return app.wsgi_app(environ, start_response) - - -def add_start_service_action(subparsers): - """Add action to start pfs.""" - start_pfs_parser = subparsers.add_parser( - "start", - description="Start promptflow service.", - help="pfs start", - ) - start_pfs_parser.add_argument("-p", "--port", type=int, help="port of the promptflow service") - start_pfs_parser.add_argument( - "--force", - action="store_true", - help="If the port is used, the existing service will be terminated and restart a new service.", - ) - start_pfs_parser.add_argument( - "-d", - "--debug", - action="store_true", - help="The flag to turn on debug mode for pfs.", - ) - start_pfs_parser.set_defaults(action="start") - - -def add_stop_service_action(subparsers): - """Add action to stop pfs.""" - stop_pfs_parser = subparsers.add_parser( - "stop", - description="Stop promptflow service.", - help="pfs stop", - ) - stop_pfs_parser.set_defaults(action="stop") - - -def add_show_status_action(subparsers): - """Add action to show pfs status.""" - show_status_parser = subparsers.add_parser( - "show-status", - description="Display the started promptflow service info.", - help="pfs show-status", - ) - show_status_parser.set_defaults(action="show-status") - - -def start_service(args): - # User Agent will be set based on header in request, so not set globally here. - os.environ[PF_NO_INTERACTIVE_LOGIN] = "true" - port = args.port - if args.debug: - os.environ[PF_SERVICE_DEBUG] = "true" - - def validate_port(port, force_start): - if is_port_in_use(port): - if force_start: - logger.warning(f"Force restart the service on the port {port}.") - kill_exist_service(port) - else: - logger.warning(f"Service port {port} is used.") - raise UserErrorException(f"Service port {port} is used.") - - if port: - dump_port_to_config(port) - validate_port(port, args.force) - else: - port = get_port_from_config(create_if_not_exists=True) - validate_port(port, args.force) - - if sys.executable.endswith("pfcli.exe"): - # For msi installer, use sdk api to start pfs since it's not supported to invoke waitress by cli directly - # after packaged by Pyinstaller. - app, _ = create_app() - if os.environ.get(PF_SERVICE_DEBUG) == "true": - app.logger.setLevel(logging.DEBUG) - else: - app.logger.setLevel(logging.INFO) - print(f"Start Prompt Flow Service on http://localhost:{port}, version: {get_promptflow_sdk_version()}") - waitress.serve(app, host="127.0.0.1", port=port, threads=PF_SERVICE_WORKER_NUM) - else: - # Start a pfs process using detach mode. It will start a new process and create a new app. So we use environment - # variable to pass the debug mode, since it will inherit parent process environment variable. - if platform.system() == "Windows": - try: - import win32api - import win32con - import win32process - except ImportError as ex: - raise UserErrorException( - f"Please install pywin32 by 'pip install pywin32' and retry. prompt flow " - f"service start depends on pywin32.. {ex}" - ) - command = ( - f"waitress-serve --listen=127.0.0.1:{port} --threads={PF_SERVICE_WORKER_NUM} " - "promptflow._sdk._service.entry:get_app" - ) - startupinfo = win32process.STARTUPINFO() - startupinfo.dwFlags |= win32process.STARTF_USESHOWWINDOW - startupinfo.wShowWindow = win32con.SW_HIDE - process_attributes = None - thread_attributes = None - inherit_handles = False - creation_flags = win32con.CREATE_NEW_PROCESS_GROUP | win32con.DETACHED_PROCESS - environment = None - current_directory = None - process_handle, thread_handle, process_id, thread_id = win32process.CreateProcess( - None, - command, - process_attributes, - thread_attributes, - inherit_handles, - creation_flags, - environment, - current_directory, - startupinfo, - ) - - win32api.CloseHandle(process_handle) - win32api.CloseHandle(thread_handle) - else: - # Set host to localhost, only allow request from localhost. - cmd = ["waitress-serve", f"--listen=127.0.0.1:{port}", "promptflow._sdk._service.entry:get_app"] - subprocess.Popen(cmd, stdout=subprocess.DEVNULL, start_new_session=True) - is_healthy = check_pfs_service_status(port) - if is_healthy: - print(f"Start Prompt Flow Service on http://localhost:{port}, version: {get_promptflow_sdk_version()}") - else: - logger.warning(f"Pfs service start failed in {port}.") - - -def stop_service(): - port = get_port_from_config() - if port is not None: - kill_exist_service(port) - print(f"Pfs service stop in {port}.") - - -def main(): - command_args = sys.argv[1:] - if len(command_args) == 1 and command_args[0] == "version": - version_dict = {"promptflow": get_promptflow_sdk_version()} - return json.dumps(version_dict, ensure_ascii=False, indent=2, sort_keys=True, separators=(",", ": ")) + "\n" - if len(command_args) == 0: - command_args.append("-h") - entry(command_args) - - -def entry(command_args): - parser = argparse.ArgumentParser( - prog="pfs", - formatter_class=argparse.RawDescriptionHelpFormatter, - description="Prompt Flow Service", - ) - - parser.add_argument( - "-v", "--version", dest="version", action="store_true", help="show current PromptflowService version and exit" - ) - subparsers = parser.add_subparsers() - add_start_service_action(subparsers) - add_show_status_action(subparsers) - add_stop_service_action(subparsers) - - args = parser.parse_args(command_args) - - activity_name = _get_cli_activity_name(cli=parser.prog, args=args) - cli_exception_and_telemetry_handler(run_command, activity_name)(args) - - -def run_command(args): - if args.version: - print_pf_version() - return - elif args.action == "show-status": - port = get_port_from_config() - status = get_started_service_info(port) - if status: - print(status) - return - else: - logger = logging.getLogger(LOGGER_NAME) - logger.warning("Promptflow service is not started.") - sys.exit(1) - elif args.action == "start": - start_service(args) - elif args.action == "stop": - stop_service() - - -if __name__ == "__main__": - main() diff --git a/src/promptflow/promptflow/_sdk/_service/pfsvc.py b/src/promptflow/promptflow/_sdk/_service/pfsvc.py deleted file mode 100644 index c5ee19e7e93..00000000000 --- a/src/promptflow/promptflow/_sdk/_service/pfsvc.py +++ /dev/null @@ -1,56 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- -from promptflow._sdk._service.entry import main -import sys - -import win32serviceutil # ServiceFramework and commandline helper -import win32service # Events -import servicemanager # Simple setup and logging - - -class PromptFlowService: - """Silly little application stub""" - - def stop(self): - """Stop the service""" - self.running = False - - def run(self): - """Main service loop. This is where work is done!""" - self.running = True - while self.running: - main() # Important work - servicemanager.LogInfoMsg("Service running...") - - -class PromptFlowServiceFramework(win32serviceutil.ServiceFramework): - _svc_name_ = "PromptFlowService" - _svc_display_name_ = "Prompt Flow Service" - - def SvcStop(self): - """Stop the service""" - self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) - self.service_impl.stop() - self.ReportServiceStatus(win32service.SERVICE_STOPPED) - - def SvcDoRun(self): - """Start the service; does not return until stopped""" - self.ReportServiceStatus(win32service.SERVICE_START_PENDING) - self.service_impl = PromptFlowService() - self.ReportServiceStatus(win32service.SERVICE_RUNNING) - # Run the service - self.service_impl.run() - - -def init(): - if len(sys.argv) == 1: - servicemanager.Initialize() - servicemanager.PrepareToHostSingle(PromptFlowServiceFramework) - servicemanager.StartServiceCtrlDispatcher() - else: - win32serviceutil.HandleCommandLine(PromptFlowServiceFramework) - - -if __name__ == "__main__": - init() diff --git a/src/promptflow/promptflow/_sdk/_service/static/TraceViewPage.min.js b/src/promptflow/promptflow/_sdk/_service/static/TraceViewPage.min.js deleted file mode 100644 index 166fb655336..00000000000 --- a/src/promptflow/promptflow/_sdk/_service/static/TraceViewPage.min.js +++ /dev/null @@ -1,2222 +0,0 @@ -(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('@layer rdg.MeasuringCell{.m1l09lto7-0-0-beta-39{contain:strict;grid-row:1;visibility:hidden}}@layer rdg.Cell{.c1wupbe7-0-0-beta-39{position:relative;padding-block:0;padding-inline:8px;border-inline-end:1px solid var(--rdg-border-color);border-block-end:1px solid var(--rdg-border-color);grid-row-start:var(--rdg-grid-row-start);background-color:inherit;white-space:nowrap;overflow:clip;text-overflow:ellipsis;outline:none}.c1wupbe7-0-0-beta-39[aria-selected=true]{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}}@layer rdg.Cell{.cd0kgiy7-0-0-beta-39{position:sticky;z-index:1}}@layer rdg.Cell{.c1730fa47-0-0-beta-39{box-shadow:calc(2px * var(--rdg-sign)) 0 5px -2px #8888884d}}@layer rdg.CheckboxLabel{.c1hs68w07-0-0-beta-39{cursor:pointer;display:flex;align-items:center;justify-content:center;position:absolute;top:0;right:0;bottom:0;left:0;margin-inline-end:1px}}@layer rdg.CheckboxInput{.cojpd0n7-0-0-beta-39{all:unset}}@layer rdg.CheckboxIcon{.cwsfieb7-0-0-beta-39{content:"";inline-size:20px;block-size:20px;border:2px solid var(--rdg-border-color);background-color:var(--rdg-background-color)}.cojpd0n7-0-0-beta-39:checked+.cwsfieb7-0-0-beta-39{background-color:var(--rdg-checkbox-color);outline:4px solid var(--rdg-background-color);outline-offset:-6px}.cojpd0n7-0-0-beta-39:focus+.cwsfieb7-0-0-beta-39{border-color:var(--rdg-checkbox-focus-color)}}@layer rdg.CheckboxLabel{.c1fgadbl7-0-0-beta-39{cursor:default}.c1fgadbl7-0-0-beta-39 .cwsfieb7-0-0-beta-39{border-color:var(--rdg-checkbox-disabled-border-color);background-color:var(--rdg-checkbox-disabled-background-color)}}@layer rdg.GroupCellContent{.g1w3c5217-0-0-beta-39{outline:none}}@layer rdg.GroupCellCaret{.cm5tyhw7-0-0-beta-39{margin-inline-start:4px;stroke:currentColor;stroke-width:1.5px;fill:transparent;vertical-align:middle}.cm5tyhw7-0-0-beta-39>path{transition:d .1s}}@layer rdg.DragHandle{.cadd3bp7-0-0-beta-39{--rdg-drag-handle-size: 8px;z-index:0;cursor:move;inline-size:var(--rdg-drag-handle-size);block-size:var(--rdg-drag-handle-size);background-color:var(--rdg-selection-color);place-self:end}.cadd3bp7-0-0-beta-39:hover{--rdg-drag-handle-size: 16px;border:2px solid var(--rdg-selection-color);background-color:var(--rdg-background-color)}}@layer rdg.DragHandle{.ccmuez27-0-0-beta-39{z-index:1;position:sticky}}@layer rdg.EditCell{.c1tngyp17-0-0-beta-39{padding:0}}@layer rdg.SortableHeaderCell{.hizp7y17-0-0-beta-39{display:flex}}@layer rdg.SortableHeaderCellName{.h14cojrm7-0-0-beta-39{flex-grow:1;overflow:clip;text-overflow:ellipsis}}@layer rdg.HeaderCell{.celq7o97-0-0-beta-39{cursor:pointer}}@layer rdg.HeaderCell{.ceqw94e7-0-0-beta-39{touch-action:none}}@layer rdg.HeaderCell{.r12jy2ca7-0-0-beta-39{cursor:col-resize;position:absolute;inset-block-start:0;inset-inline-end:0;inset-block-end:0;inline-size:10px}}.c1j3os1p7-0-0-beta-39{opacity:.5}.c1ui3nad7-0-0-beta-39{background-color:var(--rdg-header-draggable-background-color)}@layer rdg.Row{.r1otpg647-0-0-beta-39{display:contents;line-height:var(--rdg-row-height);background-color:var(--rdg-background-color)}.r1otpg647-0-0-beta-39:hover{background-color:var(--rdg-row-hover-background-color)}.r1otpg647-0-0-beta-39[aria-selected=true]{background-color:var(--rdg-row-selected-background-color)}.r1otpg647-0-0-beta-39[aria-selected=true]:hover{background-color:var(--rdg-row-selected-hover-background-color)}}@layer rdg.FocusSink{.rel5gk27-0-0-beta-39{outline:2px solid var(--rdg-selection-color);outline-offset:-2px}}@layer rdg.FocusSink{.r1qymf1z7-0-0-beta-39:before{content:"";display:inline-block;height:100%;position:sticky;inset-inline-start:0;border-inline-start:2px solid var(--rdg-selection-color)}}@layer rdg.HeaderRow{.h197vzie7-0-0-beta-39{display:contents;line-height:var(--rdg-header-row-height);background-color:var(--rdg-header-background-color);font-weight:700}.h197vzie7-0-0-beta-39>.c1wupbe7-0-0-beta-39{z-index:2;position:sticky}.h197vzie7-0-0-beta-39>.cd0kgiy7-0-0-beta-39{z-index:3}}@layer rdg.Cell{.ccpfvsn7-0-0-beta-39{background-color:#ccf}}@layer rdg.Cell{.c1bmg16t7-0-0-beta-39{background-color:#ccf}.c1bmg16t7-0-0-beta-39.ccpfvsn7-0-0-beta-39{background-color:#99f}}@layer rdg.SortIcon{.a1mygwml7-0-0-beta-39{fill:currentColor}.a1mygwml7-0-0-beta-39>path{transition:d .1s}}@layer rdg{@layer Defaults,FocusSink,CheckboxInput,CheckboxIcon,CheckboxLabel,Cell,HeaderCell,SummaryCell,EditCell,Row,HeaderRow,SummaryRow,GroupedRow,Root;@layer Defaults{.r104f42s7-0-0-beta-39 *,.r104f42s7-0-0-beta-39 *:before,.r104f42s7-0-0-beta-39 *:after{box-sizing:inherit}}@layer Root{.r104f42s7-0-0-beta-39{--rdg-color: #000;--rdg-border-color: #ddd;--rdg-summary-border-color: #aaa;--rdg-background-color: hsl(0deg 0% 100%);--rdg-header-background-color: hsl(0deg 0% 97.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 90.5%);--rdg-row-hover-background-color: hsl(0deg 0% 96%);--rdg-row-selected-background-color: hsl(207deg 76% 92%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 88%);--rdg-checkbox-color: hsl(207deg 100% 29%);--rdg-checkbox-focus-color: hsl(207deg 100% 69%);--rdg-checkbox-disabled-border-color: #ccc;--rdg-checkbox-disabled-background-color: #ddd;--rdg-selection-color: #66afe9;--rdg-font-size: 14px;display:grid;color-scheme:var(--rdg-color-scheme, light dark);contain:content;content-visibility:auto;block-size:350px;border:1px solid var(--rdg-border-color);box-sizing:border-box;overflow:auto;background-color:var(--rdg-background-color);color:var(--rdg-color);font-size:var(--rdg-font-size)}.r104f42s7-0-0-beta-39:before{content:"";grid-column:1/-1;grid-row:1/-1}.r104f42s7-0-0-beta-39.rdg-dark{--rdg-color-scheme: dark;--rdg-color: #ddd;--rdg-border-color: #444;--rdg-summary-border-color: #555;--rdg-background-color: hsl(0deg 0% 13%);--rdg-header-background-color: hsl(0deg 0% 10.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);--rdg-row-hover-background-color: hsl(0deg 0% 9%);--rdg-row-selected-background-color: hsl(207deg 76% 42%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);--rdg-checkbox-color: hsl(207deg 100% 79%);--rdg-checkbox-focus-color: hsl(207deg 100% 89%);--rdg-checkbox-disabled-border-color: #000;--rdg-checkbox-disabled-background-color: #333}.r104f42s7-0-0-beta-39.rdg-light{--rdg-color-scheme: light}@media (prefers-color-scheme: dark){.r104f42s7-0-0-beta-39:not(.rdg-light){--rdg-color: #ddd;--rdg-border-color: #444;--rdg-summary-border-color: #555;--rdg-background-color: hsl(0deg 0% 13%);--rdg-header-background-color: hsl(0deg 0% 10.5%);--rdg-header-draggable-background-color: hsl(0deg 0% 17.5%);--rdg-row-hover-background-color: hsl(0deg 0% 9%);--rdg-row-selected-background-color: hsl(207deg 76% 42%);--rdg-row-selected-hover-background-color: hsl(207deg 76% 38%);--rdg-checkbox-color: hsl(207deg 100% 79%);--rdg-checkbox-focus-color: hsl(207deg 100% 89%);--rdg-checkbox-disabled-border-color: #000;--rdg-checkbox-disabled-background-color: #333}}}}@layer rdg.Root{.v7ly7s7-0-0-beta-39{-webkit-user-select:none;user-select:none}.v7ly7s7-0-0-beta-39 .r1otpg647-0-0-beta-39{cursor:move}}@layer rdg.FocusSink{.fc4f4zb7-0-0-beta-39{grid-column:1/-1;pointer-events:none;z-index:1}}@layer rdg.FocusSink{.fq51q037-0-0-beta-39{z-index:3}}@layer rdg.SummaryCell{.s1n3hxke7-0-0-beta-39{inset-block-start:var(--rdg-summary-row-top);inset-block-end:var(--rdg-summary-row-bottom)}}@layer rdg.SummaryRow{.snfqesz7-0-0-beta-39{line-height:var(--rdg-summary-row-height)}.snfqesz7-0-0-beta-39>.c1wupbe7-0-0-beta-39{position:sticky}}@layer rdg.SummaryRow{.t1jijrjz7-0-0-beta-39>.c1wupbe7-0-0-beta-39{z-index:2}.t1jijrjz7-0-0-beta-39>.cd0kgiy7-0-0-beta-39{z-index:3}}@layer rdg.SummaryRow{.t14bmecc7-0-0-beta-39>.c1wupbe7-0-0-beta-39{border-block-end:2px solid var(--rdg-summary-border-color)}}@layer rdg.SummaryRow{.b1odhhml7-0-0-beta-39>.c1wupbe7-0-0-beta-39{border-block-start:2px solid var(--rdg-summary-border-color)}}@layer rdg.GroupedRow{.gyxx7e97-0-0-beta-39:not([aria-selected=true]){background-color:var(--rdg-header-background-color)}.gyxx7e97-0-0-beta-39>.c1wupbe7-0-0-beta-39:not(:last-child):not(.c1730fa47-0-0-beta-39){border-inline-end:none}}@layer rdg.TextEditor{.tlmcuo07-0-0-beta-39{-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;inline-size:100%;block-size:100%;padding-block:0;padding-inline:6px;border:2px solid #ccc;vertical-align:top;color:var(--rdg-color);background-color:var(--rdg-background-color);font-family:inherit;font-size:var(--rdg-font-size)}.tlmcuo07-0-0-beta-39:focus{border-color:var(--rdg-selection-color);outline:none}.tlmcuo07-0-0-beta-39::placeholder{color:#999;opacity:1}}.json-view{display:block;color:#4d4d4d;text-align:left;--json-property: #009033;--json-index: #676dff;--json-number: #676dff;--json-string: #b2762e;--json-boolean: #dc155e;--json-null: #dc155e}.json-view .json-view--property{color:var(--json-property)}.json-view .json-view--index{color:var(--json-index)}.json-view .json-view--number{color:var(--json-number)}.json-view .json-view--string{color:var(--json-string)}.json-view .json-view--boolean{color:var(--json-boolean)}.json-view .json-view--null{color:var(--json-null)}.json-view .jv-indent{padding-left:1em}.json-view .jv-chevron{display:inline-block;vertical-align:-20%;cursor:pointer;opacity:.4;width:1em;height:1em}:is(.json-view .jv-chevron:hover,.json-view .jv-size:hover+.jv-chevron){opacity:.8}.json-view .jv-size{cursor:pointer;opacity:.4;font-size:.875em;font-style:italic;margin-left:.5em;vertical-align:-5%;line-height:1}.json-view :is(.json-view--copy,.json-view--edit),.json-view .json-view--link svg{display:none;width:1em;height:1em;margin-left:.25em;cursor:pointer}.json-view .json-view--input{width:120px;margin-left:.25em;border-radius:4px;border:1px solid currentColor;padding:0 4px;font-size:87.5%;line-height:1.25;background:transparent}.json-view .json-view--deleting{outline:1px solid #da0000;background-color:#da000011;text-decoration-line:line-through}:is(.json-view:hover,.json-view--pair:hover)>:is(.json-view--copy,.json-view--edit),:is(.json-view:hover,.json-view--pair:hover)>.json-view--link svg{display:inline-block}.json-view .jv-button{background:transparent;outline:none;border:none;cursor:pointer}.json-view .cursor-pointer{cursor:pointer}.json-view svg{vertical-align:-10%}.jv-size-chevron~svg{vertical-align:-16%}.json-view_a11y{color:#545454;--json-property: #aa5d00;--json-index: #007299;--json-number: #007299;--json-string: #008000;--json-boolean: #d91e18;--json-null: #d91e18}.json-view_github{color:#005cc5;--json-property: #005cc5;--json-index: #005cc5;--json-number: #005cc5;--json-string: #032f62;--json-boolean: #005cc5;--json-null: #005cc5}.json-view_vscode{color:#005cc5;--json-property: #0451a5;--json-index: #0000ff;--json-number: #0000ff;--json-string: #a31515;--json-boolean: #0000ff;--json-null: #0000ff}.json-view_atom{color:#383a42;--json-property: #e45649;--json-index: #986801;--json-number: #986801;--json-string: #50a14f;--json-boolean: #0184bc;--json-null: #0184bc}.json-view_winter-is-coming{color:#0431fa;--json-property: #3a9685;--json-index: #ae408b;--json-number: #ae408b;--json-string: #8123a9;--json-boolean: #0184bc;--json-null: #0184bc}:is(.dark .json-view,.dark.json-view){color:#d1d1d1;--json-property: #009033;--json-index: #5d75f2;--json-number: #5d75f2;--json-string: #c57e29;--json-boolean: #e4407b;--json-null: #e4407b}:is(.dark .json-view_a11y,.dark.json-view_a11y){color:#d1d1d1;--json-property: #ffd700;--json-index: #00e0e0;--json-number: #00e0e0;--json-string: #abe338;--json-boolean: #ffa07a;--json-null: #ffa07a}:is(.dark .json-view_github,.dark.json-view_github){color:#79b8ff;--json-property: #79b8ff;--json-index: #79b8ff;--json-number: #79b8ff;--json-string: #9ecbff;--json-boolean: #79b8ff;--json-null: #79b8ff}:is(.dark .json-view_vscode,.dark.json-view_vscode){color:orchid;--json-property: #9cdcfe;--json-index: #b5cea8;--json-number: #b5cea8;--json-string: #ce9178;--json-boolean: #569cd6;--json-null: #569cd6}:is(.dark .json-view_atom,.dark.json-view_atom){color:#abb2bf;--json-property: #e06c75;--json-index: #d19a66;--json-number: #d19a66;--json-string: #98c379;--json-boolean: #56b6c2;--json-null: #56b6c2}:is(.dark .json-view_winter-is-coming,.dark.json-view_winter-is-coming){color:#a7dbf7;--json-property: #91dacd;--json-index: #8dec95;--json-number: #8dec95;--json-string: #e0aff5;--json-boolean: #f29fd8;--json-null: #f29fd8}.json-view .json-view--string{word-break:break-all}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); -var iR=Object.defineProperty;var aR=(zp,$f,Hp)=>$f in zp?iR(zp,$f,{enumerable:!0,configurable:!0,writable:!0,value:Hp}):zp[$f]=Hp;var Cn=(zp,$f,Hp)=>(aR(zp,typeof $f!="symbol"?$f+"":$f,Hp),Hp);(function(){"use strict";function _mergeNamespaces(S,C){for(var R=0;RO[I]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(S){return S&&S.__esModule&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S}var jsxRuntime$1={exports:{}},reactJsxRuntime_development={},react={exports:{}},react_development={exports:{}};react_development.exports;var hasRequiredReact_development;function requireReact_development(){return hasRequiredReact_development||(hasRequiredReact_development=1,function(S,C){var R={};/** - * @license React - * react.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */R.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var O="18.2.0",I=Symbol.for("react.element"),N=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),V=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),pe=Symbol.for("react.offscreen"),me=Symbol.iterator,xe="@@iterator";function Ae(Et){if(Et===null||typeof Et!="object")return null;var Zt=me&&Et[me]||Et[xe];return typeof Zt=="function"?Zt:null}var ge={current:null},Te={transition:null},we={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},ke={current:null},Be={},Ie=null;function je(Et){Ie=Et}Be.setExtraStackFrame=function(Et){Ie=Et},Be.getCurrentStack=null,Be.getStackAddendum=function(){var Et="";Ie&&(Et+=Ie);var Zt=Be.getCurrentStack;return Zt&&(Et+=Zt()||""),Et};var Ke=!1,Je=!1,Xe=!1,ot=!1,tt=!1,Ue={ReactCurrentDispatcher:ge,ReactCurrentBatchConfig:Te,ReactCurrentOwner:ke};Ue.ReactDebugCurrentFrame=Be,Ue.ReactCurrentActQueue=we;function et(Et){{for(var Zt=arguments.length,$r=new Array(Zt>1?Zt-1:0),Nr=1;Nr1?Zt-1:0),Nr=1;Nr1){for(var Uo=Array(Pi),Wi=0;Wi1){for(var si=Array(Wi),fa=0;fa is not supported and will be removed in a future major release. Did you mean to render instead?")),Zt.Provider},set:function(Pn){Zt.Provider=Pn}},_currentValue:{get:function(){return Zt._currentValue},set:function(Pn){Zt._currentValue=Pn}},_currentValue2:{get:function(){return Zt._currentValue2},set:function(Pn){Zt._currentValue2=Pn}},_threadCount:{get:function(){return Zt._threadCount},set:function(Pn){Zt._threadCount=Pn}},Consumer:{get:function(){return $r||($r=!0,dt("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),Zt.Consumer}},displayName:{get:function(){return Zt.displayName},set:function(Pn){mn||(et("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Pn),mn=!0)}}}),Zt.Consumer=Xn}return Zt._currentRenderer=null,Zt._currentRenderer2=null,Zt}var vi=-1,ca=0,Go=1,di=2;function Qi(Et){if(Et._status===vi){var Zt=Et._result,$r=Zt();if($r.then(function(Xn){if(Et._status===ca||Et._status===vi){var Pn=Et;Pn._status=Go,Pn._result=Xn}},function(Xn){if(Et._status===ca||Et._status===vi){var Pn=Et;Pn._status=di,Pn._result=Xn}}),Et._status===vi){var Nr=Et;Nr._status=ca,Nr._result=$r}}if(Et._status===Go){var mn=Et._result;return mn===void 0&&dt(`lazy: Expected the result of a dynamic import() call. Instead received: %s - -Your code should look like: - const MyComponent = lazy(() => import('./MyComponent')) - -Did you accidentally put curly braces around the import?`,mn),"default"in mn||dt(`lazy: Expected the result of a dynamic import() call. Instead received: %s - -Your code should look like: - const MyComponent = lazy(() => import('./MyComponent'))`,mn),mn.default}else throw Et._result}function Oa(Et){var Zt={_status:vi,_result:Et},$r={$$typeof:oe,_payload:Zt,_init:Qi};{var Nr,mn;Object.defineProperties($r,{defaultProps:{configurable:!0,get:function(){return Nr},set:function(Xn){dt("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Nr=Xn,Object.defineProperty($r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return mn},set:function(Xn){dt("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),mn=Xn,Object.defineProperty($r,"propTypes",{enumerable:!0})}}})}return $r}function gs(Et){Et!=null&&Et.$$typeof===J?dt("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof Et!="function"?dt("forwardRef requires a render function but was given %s.",Et===null?"null":typeof Et):Et.length!==0&&Et.length!==2&&dt("forwardRef render functions accept exactly two parameters: props and ref. %s",Et.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),Et!=null&&(Et.defaultProps!=null||Et.propTypes!=null)&&dt("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var Zt={$$typeof:K,render:Et};{var $r;Object.defineProperty(Zt,"displayName",{enumerable:!1,configurable:!0,get:function(){return $r},set:function(Nr){$r=Nr,!Et.name&&!Et.displayName&&(Et.displayName=Nr)}})}return Zt}var Dt;Dt=Symbol.for("react.module.reference");function St(Et){return!!(typeof Et=="string"||typeof Et=="function"||Et===L||Et===j||tt||Et===B||Et===W||Et===X||ot||Et===pe||Ke||Je||Xe||typeof Et=="object"&&Et!==null&&(Et.$$typeof===oe||Et.$$typeof===J||Et.$$typeof===F||Et.$$typeof===V||Et.$$typeof===K||Et.$$typeof===Dt||Et.getModuleId!==void 0))}function wt(Et,Zt){St(Et)||dt("memo: The first argument must be a component. Instead received: %s",Et===null?"null":typeof Et);var $r={$$typeof:J,type:Et,compare:Zt===void 0?null:Zt};{var Nr;Object.defineProperty($r,"displayName",{enumerable:!1,configurable:!0,get:function(){return Nr},set:function(mn){Nr=mn,!Et.name&&!Et.displayName&&(Et.displayName=mn)}})}return $r}function yt(){var Et=ge.current;return Et===null&&dt(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: -1. You might have mismatching versions of React and the renderer (such as React DOM) -2. You might be breaking the Rules of Hooks -3. You might have more than one copy of React in the same app -See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),Et}function Rt(Et){var Zt=yt();if(Et._context!==void 0){var $r=Et._context;$r.Consumer===Et?dt("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):$r.Provider===Et&&dt("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return Zt.useContext(Et)}function Nt(Et){var Zt=yt();return Zt.useState(Et)}function Yt(Et,Zt,$r){var Nr=yt();return Nr.useReducer(Et,Zt,$r)}function lr(Et){var Zt=yt();return Zt.useRef(Et)}function vr(Et,Zt){var $r=yt();return $r.useEffect(Et,Zt)}function Qt(Et,Zt){var $r=yt();return $r.useInsertionEffect(Et,Zt)}function Ar(Et,Zt){var $r=yt();return $r.useLayoutEffect(Et,Zt)}function un(Et,Zt){var $r=yt();return $r.useCallback(Et,Zt)}function po(Et,Zt){var $r=yt();return $r.useMemo(Et,Zt)}function In(Et,Zt,$r){var Nr=yt();return Nr.useImperativeHandle(Et,Zt,$r)}function xo(Et,Zt){{var $r=yt();return $r.useDebugValue(Et,Zt)}}function Vn(){var Et=yt();return Et.useTransition()}function Ro(Et){var Zt=yt();return Zt.useDeferredValue(Et)}function Nn(){var Et=yt();return Et.useId()}function so(Et,Zt,$r){var Nr=yt();return Nr.useSyncExternalStore(Et,Zt,$r)}var Ei=0,Ji,mi,ks,Li,hl,Is,ea;function fi(){}fi.__reactDisabledLog=!0;function aa(){{if(Ei===0){Ji=console.log,mi=console.info,ks=console.warn,Li=console.error,hl=console.group,Is=console.groupCollapsed,ea=console.groupEnd;var Et={configurable:!0,enumerable:!0,value:fi,writable:!0};Object.defineProperties(console,{info:Et,log:Et,warn:Et,error:Et,group:Et,groupCollapsed:Et,groupEnd:Et})}Ei++}}function ta(){{if(Ei--,Ei===0){var Et={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ct({},Et,{value:Ji}),info:Ct({},Et,{value:mi}),warn:Ct({},Et,{value:ks}),error:Ct({},Et,{value:Li}),group:Ct({},Et,{value:hl}),groupCollapsed:Ct({},Et,{value:Is}),groupEnd:Ct({},Et,{value:ea})})}Ei<0&&dt("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $a=Ue.ReactCurrentDispatcher,ii;function ts(Et,Zt,$r){{if(ii===void 0)try{throw Error()}catch(mn){var Nr=mn.stack.trim().match(/\n( *(at )?)/);ii=Nr&&Nr[1]||""}return` -`+ii+Et}}var as=!1,Ns;{var Ds=typeof WeakMap=="function"?WeakMap:Map;Ns=new Ds}function ga(Et,Zt){if(!Et||as)return"";{var $r=Ns.get(Et);if($r!==void 0)return $r}var Nr;as=!0;var mn=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Xn;Xn=$a.current,$a.current=null,aa();try{if(Zt){var Pn=function(){throw Error()};if(Object.defineProperty(Pn.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Pn,[])}catch(gi){Nr=gi}Reflect.construct(Et,[],Pn)}else{try{Pn.call()}catch(gi){Nr=gi}Et.call(Pn.prototype)}}else{try{throw Error()}catch(gi){Nr=gi}Et()}}catch(gi){if(gi&&Nr&&typeof gi.stack=="string"){for(var Io=gi.stack.split(` -`),Jo=Nr.stack.split(` -`),Pi=Io.length-1,Uo=Jo.length-1;Pi>=1&&Uo>=0&&Io[Pi]!==Jo[Uo];)Uo--;for(;Pi>=1&&Uo>=0;Pi--,Uo--)if(Io[Pi]!==Jo[Uo]){if(Pi!==1||Uo!==1)do if(Pi--,Uo--,Uo<0||Io[Pi]!==Jo[Uo]){var Wi=` -`+Io[Pi].replace(" at new "," at ");return Et.displayName&&Wi.includes("")&&(Wi=Wi.replace("",Et.displayName)),typeof Et=="function"&&Ns.set(Et,Wi),Wi}while(Pi>=1&&Uo>=0);break}}}finally{as=!1,$a.current=Xn,ta(),Error.prepareStackTrace=mn}var si=Et?Et.displayName||Et.name:"",fa=si?ts(si):"";return typeof Et=="function"&&Ns.set(Et,fa),fa}function vs(Et,Zt,$r){return ga(Et,!1)}function Xl(Et){var Zt=Et.prototype;return!!(Zt&&Zt.isReactComponent)}function Qn(Et,Zt,$r){if(Et==null)return"";if(typeof Et=="function")return ga(Et,Xl(Et));if(typeof Et=="string")return ts(Et);switch(Et){case W:return ts("Suspense");case X:return ts("SuspenseList")}if(typeof Et=="object")switch(Et.$$typeof){case K:return vs(Et.render);case J:return Qn(Et.type,Zt,$r);case oe:{var Nr=Et,mn=Nr._payload,Xn=Nr._init;try{return Qn(Xn(mn),Zt,$r)}catch{}}}return""}var va={},ma=Ue.ReactDebugCurrentFrame;function Ys(Et){if(Et){var Zt=Et._owner,$r=Qn(Et.type,Et._source,Zt?Zt.type:null);ma.setExtraStackFrame($r)}else ma.setExtraStackFrame(null)}function Ms(Et,Zt,$r,Nr,mn){{var Xn=Function.call.bind(pn);for(var Pn in Et)if(Xn(Et,Pn)){var Io=void 0;try{if(typeof Et[Pn]!="function"){var Jo=Error((Nr||"React class")+": "+$r+" type `"+Pn+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Et[Pn]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Jo.name="Invariant Violation",Jo}Io=Et[Pn](Zt,Pn,Nr,$r,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Pi){Io=Pi}Io&&!(Io instanceof Error)&&(Ys(mn),dt("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Nr||"React class",$r,Pn,typeof Io),Ys(null)),Io instanceof Error&&!(Io.message in va)&&(va[Io.message]=!0,Ys(mn),dt("Failed %s type: %s",$r,Io.message),Ys(null))}}}function Qo(Et){if(Et){var Zt=Et._owner,$r=Qn(Et.type,Et._source,Zt?Zt.type:null);je($r)}else je(null)}var Ls;Ls=!1;function Ol(){if(ke.current){var Et=Tn(ke.current.type);if(Et)return` - -Check the render method of \``+Et+"`."}return""}function qn(Et){if(Et!==void 0){var Zt=Et.fileName.replace(/^.*[\\\/]/,""),$r=Et.lineNumber;return` - -Check your code at `+Zt+":"+$r+"."}return""}function Xs(Et){return Et!=null?qn(Et.__source):""}var yi={};function Zs(Et){var Zt=Ol();if(!Zt){var $r=typeof Et=="string"?Et:Et.displayName||Et.name;$r&&(Zt=` - -Check the top-level render call using <`+$r+">.")}return Zt}function Ya(Et,Zt){if(!(!Et._store||Et._store.validated||Et.key!=null)){Et._store.validated=!0;var $r=Zs(Zt);if(!yi[$r]){yi[$r]=!0;var Nr="";Et&&Et._owner&&Et._owner!==ke.current&&(Nr=" It was passed a child from "+Tn(Et._owner.type)+"."),Qo(Et),dt('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$r,Nr),Qo(null)}}}function Zl(Et,Zt){if(typeof Et=="object"){if(tr(Et))for(var $r=0;$r",mn=" Did you accidentally export a JSX literal instead of a component?"):Pn=typeof Et,dt("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Pn,mn)}var Io=Or.apply(this,arguments);if(Io==null)return Io;if(Nr)for(var Jo=2;Jo10&&et("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),Nr._updatedFibers.clear()}}}var So=!1,To=null;function Kn(Et){if(To===null)try{var Zt=("require"+Math.random()).slice(0,7),$r=S&&S[Zt];To=$r.call(S,"timers").setImmediate}catch{To=function(mn){So===!1&&(So=!0,typeof MessageChannel>"u"&&dt("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Xn=new MessageChannel;Xn.port1.onmessage=mn,Xn.port2.postMessage(void 0)}}return To(Et)}var zn=0,ai=!1;function wi(Et){{var Zt=zn;zn++,we.current===null&&(we.current=[]);var $r=we.isBatchingLegacy,Nr;try{if(we.isBatchingLegacy=!0,Nr=Et(),!$r&&we.didScheduleLegacyUpdate){var mn=we.current;mn!==null&&(we.didScheduleLegacyUpdate=!1,Ql(mn))}}catch(si){throw ra(Zt),si}finally{we.isBatchingLegacy=$r}if(Nr!==null&&typeof Nr=="object"&&typeof Nr.then=="function"){var Xn=Nr,Pn=!1,Io={then:function(si,fa){Pn=!0,Xn.then(function(gi){ra(Zt),zn===0?rs(gi,si,fa):si(gi)},function(gi){ra(Zt),fa(gi)})}};return!ai&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){Pn||(ai=!0,dt("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),Io}else{var Jo=Nr;if(ra(Zt),zn===0){var Pi=we.current;Pi!==null&&(Ql(Pi),we.current=null);var Uo={then:function(si,fa){we.current===null?(we.current=[],rs(Jo,si,fa)):si(Jo)}};return Uo}else{var Wi={then:function(si,fa){si(Jo)}};return Wi}}}}function ra(Et){Et!==zn-1&&dt("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),zn=Et}function rs(Et,Zt,$r){{var Nr=we.current;if(Nr!==null)try{Ql(Nr),Kn(function(){Nr.length===0?(we.current=null,Zt(Et)):rs(Et,Zt,$r)})}catch(mn){$r(mn)}else Zt(Et)}}var Xa=!1;function Ql(Et){if(!Xa){Xa=!0;var Zt=0;try{for(;Zt1?St-1:0),yt=1;yt=1&&Ar>=0&&lr[Qt]!==vr[Ar];)Ar--;for(;Qt>=1&&Ar>=0;Qt--,Ar--)if(lr[Qt]!==vr[Ar]){if(Qt!==1||Ar!==1)do if(Qt--,Ar--,Ar<0||lr[Qt]!==vr[Ar]){var un=` -`+lr[Qt].replace(" at new "," at ");return Dt.displayName&&un.includes("")&&(un=un.replace("",Dt.displayName)),typeof Dt=="function"&&Ht.set(Dt,un),un}while(Qt>=1&&Ar>=0);break}}}finally{It=!1,Pt.current=Nt,Gt(),Error.prepareStackTrace=Rt}var po=Dt?Dt.displayName||Dt.name:"",In=po?bt(po):"";return typeof Dt=="function"&&Ht.set(Dt,In),In}function tr(Dt,St,wt){return Kt(Dt,!1)}function wr(Dt){var St=Dt.prototype;return!!(St&&St.isReactComponent)}function xr(Dt,St,wt){if(Dt==null)return"";if(typeof Dt=="function")return Kt(Dt,wr(Dt));if(typeof Dt=="string")return bt(Dt);switch(Dt){case V:return bt("Suspense");case K:return bt("SuspenseList")}if(typeof Dt=="object")switch(Dt.$$typeof){case F:return tr(Dt.render);case W:return xr(Dt.type,St,wt);case X:{var yt=Dt,Rt=yt._payload,Nt=yt._init;try{return xr(Nt(Rt),St,wt)}catch{}}}return""}var Vr=Object.prototype.hasOwnProperty,bn={},Bn=xe.ReactDebugCurrentFrame;function An(Dt){if(Dt){var St=Dt._owner,wt=xr(Dt.type,Dt._source,St?St.type:null);Bn.setExtraStackFrame(wt)}else Bn.setExtraStackFrame(null)}function Tn(Dt,St,wt,yt,Rt){{var Nt=Function.call.bind(Vr);for(var Yt in Dt)if(Nt(Dt,Yt)){var lr=void 0;try{if(typeof Dt[Yt]!="function"){var vr=Error((yt||"React class")+": "+wt+" type `"+Yt+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Dt[Yt]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw vr.name="Invariant Violation",vr}lr=Dt[Yt](St,Yt,yt,wt,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Qt){lr=Qt}lr&&!(lr instanceof Error)&&(An(Rt),Ae("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",yt||"React class",wt,Yt,typeof lr),An(null)),lr instanceof Error&&!(lr.message in bn)&&(bn[lr.message]=!0,An(Rt),Ae("Failed %s type: %s",wt,lr.message),An(null))}}}var pn=Array.isArray;function Mn(Dt){return pn(Dt)}function bo(Dt){{var St=typeof Symbol=="function"&&Symbol.toStringTag,wt=St&&Dt[Symbol.toStringTag]||Dt.constructor.name||"Object";return wt}}function mr(Dt){try{return sr(Dt),!1}catch{return!0}}function sr(Dt){return""+Dt}function Ut(Dt){if(mr(Dt))return Ae("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",bo(Dt)),sr(Dt)}var nr=xe.ReactCurrentOwner,Ir={key:!0,ref:!0,__self:!0,__source:!0},jr,Rr,fr;fr={};function Or(Dt){if(Vr.call(Dt,"ref")){var St=Object.getOwnPropertyDescriptor(Dt,"ref").get;if(St&&St.isReactWarning)return!1}return Dt.ref!==void 0}function Jr(Dt){if(Vr.call(Dt,"key")){var St=Object.getOwnPropertyDescriptor(Dt,"key").get;if(St&&St.isReactWarning)return!1}return Dt.key!==void 0}function nn(Dt,St){if(typeof Dt.ref=="string"&&nr.current&&St&&nr.current.stateNode!==St){var wt=ot(nr.current.type);fr[wt]||(Ae('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',ot(nr.current.type),Dt.ref),fr[wt]=!0)}}function hn(Dt,St){{var wt=function(){jr||(jr=!0,Ae("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",St))};wt.isReactWarning=!0,Object.defineProperty(Dt,"key",{get:wt,configurable:!0})}}function Gn(Dt,St){{var wt=function(){Rr||(Rr=!0,Ae("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",St))};wt.isReactWarning=!0,Object.defineProperty(Dt,"ref",{get:wt,configurable:!0})}}var Zn=function(Dt,St,wt,yt,Rt,Nt,Yt){var lr={$$typeof:R,type:Dt,key:St,ref:wt,props:Yt,_owner:Nt};return lr._store={},Object.defineProperty(lr._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(lr,"_self",{configurable:!1,enumerable:!1,writable:!1,value:yt}),Object.defineProperty(lr,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Rt}),Object.freeze&&(Object.freeze(lr.props),Object.freeze(lr)),lr};function Eo(Dt,St,wt,yt,Rt){{var Nt,Yt={},lr=null,vr=null;wt!==void 0&&(Ut(wt),lr=""+wt),Jr(St)&&(Ut(St.key),lr=""+St.key),Or(St)&&(vr=St.ref,nn(St,Rt));for(Nt in St)Vr.call(St,Nt)&&!Ir.hasOwnProperty(Nt)&&(Yt[Nt]=St[Nt]);if(Dt&&Dt.defaultProps){var Qt=Dt.defaultProps;for(Nt in Qt)Yt[Nt]===void 0&&(Yt[Nt]=Qt[Nt])}if(lr||vr){var Ar=typeof Dt=="function"?Dt.displayName||Dt.name||"Unknown":Dt;lr&&hn(Yt,Ar),vr&&Gn(Yt,Ar)}return Zn(Dt,lr,vr,Rt,yt,nr.current,Yt)}}var vo=xe.ReactCurrentOwner,Fo=xe.ReactDebugCurrentFrame;function Ln(Dt){if(Dt){var St=Dt._owner,wt=xr(Dt.type,Dt._source,St?St.type:null);Fo.setExtraStackFrame(wt)}else Fo.setExtraStackFrame(null)}var xn;xn=!1;function Ko(Dt){return typeof Dt=="object"&&Dt!==null&&Dt.$$typeof===R}function ao(){{if(vo.current){var Dt=ot(vo.current.type);if(Dt)return` - -Check the render method of \``+Dt+"`."}return""}}function zo(Dt){{if(Dt!==void 0){var St=Dt.fileName.replace(/^.*[\\\/]/,""),wt=Dt.lineNumber;return` - -Check your code at `+St+":"+wt+"."}return""}}var fo={};function Wn(Dt){{var St=ao();if(!St){var wt=typeof Dt=="string"?Dt:Dt.displayName||Dt.name;wt&&(St=` - -Check the top-level render call using <`+wt+">.")}return St}}function wn(Dt,St){{if(!Dt._store||Dt._store.validated||Dt.key!=null)return;Dt._store.validated=!0;var wt=Wn(St);if(fo[wt])return;fo[wt]=!0;var yt="";Dt&&Dt._owner&&Dt._owner!==vo.current&&(yt=" It was passed a child from "+ot(Dt._owner.type)+"."),Ln(Dt),Ae('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',wt,yt),Ln(null)}}function cn(Dt,St){{if(typeof Dt!="object")return;if(Mn(Dt))for(var wt=0;wt",lr=" Did you accidentally export a JSX literal instead of a component?"):Qt=typeof Dt,Ae("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Qt,lr)}var Ar=Eo(Dt,St,wt,Rt,Nt);if(Ar==null)return Ar;if(Yt){var un=St.children;if(un!==void 0)if(yt)if(Mn(un)){for(var po=0;po0;){var hn=nn-1>>>1,Gn=fr[hn];if(V(Gn,Or)>0)fr[hn]=Or,fr[nn]=Gn,nn=hn;else return}}function F(fr,Or,Jr){for(var nn=Jr,hn=fr.length,Gn=hn>>>1;nnJr&&(!fr||An()));){var nn=ot.callback;if(typeof nn=="function"){ot.callback=null,tt=ot.priorityLevel;var hn=ot.expirationTime<=Jr,Gn=nn(hn);Jr=S.unstable_now(),typeof Gn=="function"?ot.callback=Gn:ot===L(Ke)&&B(Ke),ht(Jr)}else B(Ke);ot=L(Ke)}if(ot!==null)return!0;var Zn=L(Je);return Zn!==null&&nr(Ct,Zn.startTime-Jr),!1}function Gt(fr,Or){switch(fr){case K:case W:case X:case J:case oe:break;default:fr=X}var Jr=tt;tt=fr;try{return Or()}finally{tt=Jr}}function Pt(fr){var Or;switch(tt){case K:case W:case X:Or=X;break;default:Or=tt;break}var Jr=tt;tt=Or;try{return fr()}finally{tt=Jr}}function Vt(fr){var Or=tt;return function(){var Jr=tt;tt=Or;try{return fr.apply(this,arguments)}finally{tt=Jr}}}function bt(fr,Or,Jr){var nn=S.unstable_now(),hn;if(typeof Jr=="object"&&Jr!==null){var Gn=Jr.delay;typeof Gn=="number"&&Gn>0?hn=nn+Gn:hn=nn}else hn=nn;var Zn;switch(fr){case K:Zn=we;break;case W:Zn=ke;break;case oe:Zn=je;break;case J:Zn=Ie;break;case X:default:Zn=Be;break}var Eo=hn+Zn,vo={id:Xe++,callback:Or,priorityLevel:fr,startTime:hn,expirationTime:Eo,sortIndex:-1};return hn>nn?(vo.sortIndex=hn,N(Je,vo),L(Ke)===null&&vo===L(Je)&&(dt?Ir():dt=!0,nr(Ct,hn-nn))):(vo.sortIndex=Eo,N(Ke,vo),!et&&!Ue&&(et=!0,Ut($t))),vo}function It(){}function Ht(){!et&&!Ue&&(et=!0,Ut($t))}function kt(){return L(Ke)}function Kt(fr){fr.callback=null}function tr(){return tt}var wr=!1,xr=null,Vr=-1,bn=I,Bn=-1;function An(){var fr=S.unstable_now()-Bn;return!(fr125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}fr>0?bn=Math.floor(1e3/fr):bn=I}var Mn=function(){if(xr!==null){var fr=S.unstable_now();Bn=fr;var Or=!0,Jr=!0;try{Jr=xr(Or,fr)}finally{Jr?bo():(wr=!1,xr=null)}}else wr=!1},bo;if(typeof lt=="function")bo=function(){lt(Mn)};else if(typeof MessageChannel<"u"){var mr=new MessageChannel,sr=mr.port2;mr.port1.onmessage=Mn,bo=function(){sr.postMessage(null)}}else bo=function(){gt(Mn,0)};function Ut(fr){xr=fr,wr||(wr=!0,bo())}function nr(fr,Or){Vr=gt(function(){fr(S.unstable_now())},Or)}function Ir(){Qe(Vr),Vr=-1}var jr=Tn,Rr=null;S.unstable_IdlePriority=oe,S.unstable_ImmediatePriority=K,S.unstable_LowPriority=J,S.unstable_NormalPriority=X,S.unstable_Profiling=Rr,S.unstable_UserBlockingPriority=W,S.unstable_cancelCallback=Kt,S.unstable_continueExecution=Ht,S.unstable_forceFrameRate=pn,S.unstable_getCurrentPriorityLevel=tr,S.unstable_getFirstCallbackNode=kt,S.unstable_next=Pt,S.unstable_pauseExecution=It,S.unstable_requestPaint=jr,S.unstable_runWithPriority=Gt,S.unstable_scheduleCallback=bt,S.unstable_shouldYield=An,S.unstable_wrapCallback=Vt,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(scheduler_development)),scheduler_development}var scheduler_production_min={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var hasRequiredScheduler_production_min;function requireScheduler_production_min(){return hasRequiredScheduler_production_min||(hasRequiredScheduler_production_min=1,function(S){function C(dt,gt){var Qe=dt.length;dt.push(gt);e:for(;0>>1,ht=dt[lt];if(0>>1;ltI(Lt,Qe))GtI(Pt,Lt)?(dt[lt]=Pt,dt[Gt]=Qe,lt=Gt):(dt[lt]=Lt,dt[$t]=Qe,lt=$t);else if(GtI(Pt,Qe))dt[lt]=Pt,dt[Gt]=Qe,lt=Gt;else break e}}return gt}function I(dt,gt){var Qe=dt.sortIndex-gt.sortIndex;return Qe!==0?Qe:dt.id-gt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var N=performance;S.unstable_now=function(){return N.now()}}else{var L=Date,B=L.now();S.unstable_now=function(){return L.now()-B}}var j=[],F=[],V=1,K=null,W=3,X=!1,J=!1,oe=!1,pe=typeof setTimeout=="function"?setTimeout:null,me=typeof clearTimeout=="function"?clearTimeout:null,xe=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ae(dt){for(var gt=R(F);gt!==null;){if(gt.callback===null)O(F);else if(gt.startTime<=dt)O(F),gt.sortIndex=gt.expirationTime,C(j,gt);else break;gt=R(F)}}function ge(dt){if(oe=!1,Ae(dt),!J)if(R(j)!==null)J=!0,Ue(Te);else{var gt=R(F);gt!==null&&et(ge,gt.startTime-dt)}}function Te(dt,gt){J=!1,oe&&(oe=!1,me(Be),Be=-1),X=!0;var Qe=W;try{for(Ae(gt),K=R(j);K!==null&&(!(K.expirationTime>gt)||dt&&!Ke());){var lt=K.callback;if(typeof lt=="function"){K.callback=null,W=K.priorityLevel;var ht=lt(K.expirationTime<=gt);gt=S.unstable_now(),typeof ht=="function"?K.callback=ht:K===R(j)&&O(j),Ae(gt)}else O(j);K=R(j)}if(K!==null)var Ct=!0;else{var $t=R(F);$t!==null&&et(ge,$t.startTime-gt),Ct=!1}return Ct}finally{K=null,W=Qe,X=!1}}var we=!1,ke=null,Be=-1,Ie=5,je=-1;function Ke(){return!(S.unstable_now()-jedt||125lt?(dt.sortIndex=Qe,C(F,dt),R(j)===null&&dt===R(F)&&(oe?(me(Be),Be=-1):oe=!0,et(ge,Qe-lt))):(dt.sortIndex=ht,C(j,dt),J||X||(J=!0,Ue(Te))),dt},S.unstable_shouldYield=Ke,S.unstable_wrapCallback=function(dt){var gt=W;return function(){var Qe=W;W=gt;try{return dt.apply(this,arguments)}finally{W=Qe}}}}(scheduler_production_min)),scheduler_production_min}var hasRequiredScheduler;function requireScheduler(){if(hasRequiredScheduler)return scheduler.exports;hasRequiredScheduler=1;var S={};return S.NODE_ENV==="production"?scheduler.exports=requireScheduler_production_min():scheduler.exports=requireScheduler_development(),scheduler.exports}var hasRequiredReactDom_development;function requireReactDom_development(){if(hasRequiredReactDom_development)return reactDom_development;hasRequiredReactDom_development=1;var S={};/** - * @license React - * react-dom.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */return S.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var C=requireReact(),R=requireScheduler(),O=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=!1;function N(G){I=G}function L(G){if(!I){for(var U=arguments.length,ue=new Array(U>1?U-1:0),ve=1;ve1?U-1:0),ve=1;ve2&&(G[0]==="o"||G[0]==="O")&&(G[1]==="n"||G[1]==="N")}function Eo(G,U,ue,ve){if(ue!==null&&ue.type===mr)return!1;switch(typeof U){case"function":case"symbol":return!0;case"boolean":{if(ve)return!1;if(ue!==null)return!ue.acceptsBooleans;var Re=G.toLowerCase().slice(0,5);return Re!=="data-"&&Re!=="aria-"}default:return!1}}function vo(G,U,ue,ve){if(U===null||typeof U>"u"||Eo(G,U,ue,ve))return!0;if(ve)return!1;if(ue!==null)switch(ue.type){case nr:return!U;case Ir:return U===!1;case jr:return isNaN(U);case Rr:return isNaN(U)||U<1}return!1}function Fo(G){return xn.hasOwnProperty(G)?xn[G]:null}function Ln(G,U,ue,ve,Re,qe,rt){this.acceptsBooleans=U===Ut||U===nr||U===Ir,this.attributeName=ve,this.attributeNamespace=Re,this.mustUseProperty=ue,this.propertyName=G,this.type=U,this.sanitizeURL=qe,this.removeEmptyString=rt}var xn={},Ko=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Ko.forEach(function(G){xn[G]=new Ln(G,mr,!1,G,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(G){var U=G[0],ue=G[1];xn[U]=new Ln(U,sr,!1,ue,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(G){xn[G]=new Ln(G,Ut,!1,G.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(G){xn[G]=new Ln(G,Ut,!1,G,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(G){xn[G]=new Ln(G,nr,!1,G.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(G){xn[G]=new Ln(G,nr,!0,G,null,!1,!1)}),["capture","download"].forEach(function(G){xn[G]=new Ln(G,Ir,!1,G,null,!1,!1)}),["cols","rows","size","span"].forEach(function(G){xn[G]=new Ln(G,Rr,!1,G,null,!1,!1)}),["rowSpan","start"].forEach(function(G){xn[G]=new Ln(G,jr,!1,G.toLowerCase(),null,!1,!1)});var ao=/[\-\:]([a-z])/g,zo=function(G){return G[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(G){var U=G.replace(ao,zo);xn[U]=new Ln(U,sr,!1,G,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(G){var U=G.replace(ao,zo);xn[U]=new Ln(U,sr,!1,G,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(G){var U=G.replace(ao,zo);xn[U]=new Ln(U,sr,!1,G,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(G){xn[G]=new Ln(G,sr,!1,G.toLowerCase(),null,!1,!1)});var fo="xlinkHref";xn[fo]=new Ln("xlinkHref",sr,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(G){xn[G]=new Ln(G,sr,!1,G.toLowerCase(),null,!0,!0)});var Wn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,wn=!1;function cn(G){!wn&&Wn.test(G)&&(wn=!0,B("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(G)))}function vi(G,U,ue,ve){if(ve.mustUseProperty){var Re=ve.propertyName;return G[Re]}else{Bn(ue,U),ve.sanitizeURL&&cn(""+ue);var qe=ve.attributeName,rt=null;if(ve.type===Ir){if(G.hasAttribute(qe)){var pt=G.getAttribute(qe);return pt===""?!0:vo(U,ue,ve,!1)?pt:pt===""+ue?ue:pt}}else if(G.hasAttribute(qe)){if(vo(U,ue,ve,!1))return G.getAttribute(qe);if(ve.type===nr)return ue;rt=G.getAttribute(qe)}return vo(U,ue,ve,!1)?rt===null?ue:rt:rt===""+ue?ue:rt}}function ca(G,U,ue,ve){{if(!Gn(U))return;if(!G.hasAttribute(U))return ue===void 0?void 0:null;var Re=G.getAttribute(U);return Bn(ue,U),Re===""+ue?ue:Re}}function Go(G,U,ue,ve){var Re=Fo(U);if(!Zn(U,Re,ve)){if(vo(U,ue,Re,ve)&&(ue=null),ve||Re===null){if(Gn(U)){var qe=U;ue===null?G.removeAttribute(qe):(Bn(ue,U),G.setAttribute(qe,""+ue))}return}var rt=Re.mustUseProperty;if(rt){var pt=Re.propertyName;if(ue===null){var _t=Re.type;G[pt]=_t===nr?!1:""}else G[pt]=ue;return}var Mt=Re.attributeName,zt=Re.attributeNamespace;if(ue===null)G.removeAttribute(Mt);else{var hr=Re.type,pr;hr===nr||hr===Ir&&ue===!0?pr="":(Bn(ue,Mt),pr=""+ue,Re.sanitizeURL&&cn(pr.toString())),zt?G.setAttributeNS(zt,Mt,pr):G.setAttribute(Mt,pr)}}}var di=Symbol.for("react.element"),Qi=Symbol.for("react.portal"),Oa=Symbol.for("react.fragment"),gs=Symbol.for("react.strict_mode"),Dt=Symbol.for("react.profiler"),St=Symbol.for("react.provider"),wt=Symbol.for("react.context"),yt=Symbol.for("react.forward_ref"),Rt=Symbol.for("react.suspense"),Nt=Symbol.for("react.suspense_list"),Yt=Symbol.for("react.memo"),lr=Symbol.for("react.lazy"),vr=Symbol.for("react.scope"),Qt=Symbol.for("react.debug_trace_mode"),Ar=Symbol.for("react.offscreen"),un=Symbol.for("react.legacy_hidden"),po=Symbol.for("react.cache"),In=Symbol.for("react.tracing_marker"),xo=Symbol.iterator,Vn="@@iterator";function Ro(G){if(G===null||typeof G!="object")return null;var U=xo&&G[xo]||G[Vn];return typeof U=="function"?U:null}var Nn=Object.assign,so=0,Ei,Ji,mi,ks,Li,hl,Is;function ea(){}ea.__reactDisabledLog=!0;function fi(){{if(so===0){Ei=console.log,Ji=console.info,mi=console.warn,ks=console.error,Li=console.group,hl=console.groupCollapsed,Is=console.groupEnd;var G={configurable:!0,enumerable:!0,value:ea,writable:!0};Object.defineProperties(console,{info:G,log:G,warn:G,error:G,group:G,groupCollapsed:G,groupEnd:G})}so++}}function aa(){{if(so--,so===0){var G={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Nn({},G,{value:Ei}),info:Nn({},G,{value:Ji}),warn:Nn({},G,{value:mi}),error:Nn({},G,{value:ks}),group:Nn({},G,{value:Li}),groupCollapsed:Nn({},G,{value:hl}),groupEnd:Nn({},G,{value:Is})})}so<0&&B("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ta=O.ReactCurrentDispatcher,$a;function ii(G,U,ue){{if($a===void 0)try{throw Error()}catch(Re){var ve=Re.stack.trim().match(/\n( *(at )?)/);$a=ve&&ve[1]||""}return` -`+$a+G}}var ts=!1,as;{var Ns=typeof WeakMap=="function"?WeakMap:Map;as=new Ns}function Ds(G,U){if(!G||ts)return"";{var ue=as.get(G);if(ue!==void 0)return ue}var ve;ts=!0;var Re=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var qe;qe=ta.current,ta.current=null,fi();try{if(U){var rt=function(){throw Error()};if(Object.defineProperty(rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(rt,[])}catch(Lr){ve=Lr}Reflect.construct(G,[],rt)}else{try{rt.call()}catch(Lr){ve=Lr}G.call(rt.prototype)}}else{try{throw Error()}catch(Lr){ve=Lr}G()}}catch(Lr){if(Lr&&ve&&typeof Lr.stack=="string"){for(var pt=Lr.stack.split(` -`),_t=ve.stack.split(` -`),Mt=pt.length-1,zt=_t.length-1;Mt>=1&&zt>=0&&pt[Mt]!==_t[zt];)zt--;for(;Mt>=1&&zt>=0;Mt--,zt--)if(pt[Mt]!==_t[zt]){if(Mt!==1||zt!==1)do if(Mt--,zt--,zt<0||pt[Mt]!==_t[zt]){var hr=` -`+pt[Mt].replace(" at new "," at ");return G.displayName&&hr.includes("")&&(hr=hr.replace("",G.displayName)),typeof G=="function"&&as.set(G,hr),hr}while(Mt>=1&&zt>=0);break}}}finally{ts=!1,ta.current=qe,aa(),Error.prepareStackTrace=Re}var pr=G?G.displayName||G.name:"",Mr=pr?ii(pr):"";return typeof G=="function"&&as.set(G,Mr),Mr}function ga(G,U,ue){return Ds(G,!0)}function vs(G,U,ue){return Ds(G,!1)}function Xl(G){var U=G.prototype;return!!(U&&U.isReactComponent)}function Qn(G,U,ue){if(G==null)return"";if(typeof G=="function")return Ds(G,Xl(G));if(typeof G=="string")return ii(G);switch(G){case Rt:return ii("Suspense");case Nt:return ii("SuspenseList")}if(typeof G=="object")switch(G.$$typeof){case yt:return vs(G.render);case Yt:return Qn(G.type,U,ue);case lr:{var ve=G,Re=ve._payload,qe=ve._init;try{return Qn(qe(Re),U,ue)}catch{}}}return""}function va(G){switch(G._debugOwner&&G._debugOwner.type,G._debugSource,G.tag){case J:return ii(G.type);case Ie:return ii("Lazy");case we:return ii("Suspense");case Je:return ii("SuspenseList");case F:case K:case Be:return vs(G.type);case ge:return vs(G.type.render);case V:return ga(G.type);default:return""}}function ma(G){try{var U="",ue=G;do U+=va(ue),ue=ue.return;while(ue);return U}catch(ve){return` -Error generating stack: `+ve.message+` -`+ve.stack}}function Ys(G,U,ue){var ve=G.displayName;if(ve)return ve;var Re=U.displayName||U.name||"";return Re!==""?ue+"("+Re+")":ue}function Ms(G){return G.displayName||"Context"}function Qo(G){if(G==null)return null;if(typeof G.tag=="number"&&B("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof G=="function")return G.displayName||G.name||null;if(typeof G=="string")return G;switch(G){case Oa:return"Fragment";case Qi:return"Portal";case Dt:return"Profiler";case gs:return"StrictMode";case Rt:return"Suspense";case Nt:return"SuspenseList"}if(typeof G=="object")switch(G.$$typeof){case wt:var U=G;return Ms(U)+".Consumer";case St:var ue=G;return Ms(ue._context)+".Provider";case yt:return Ys(G,G.render,"ForwardRef");case Yt:var ve=G.displayName||null;return ve!==null?ve:Qo(G.type)||"Memo";case lr:{var Re=G,qe=Re._payload,rt=Re._init;try{return Qo(rt(qe))}catch{return null}}}return null}function Ls(G,U,ue){var ve=U.displayName||U.name||"";return G.displayName||(ve!==""?ue+"("+ve+")":ue)}function Ol(G){return G.displayName||"Context"}function qn(G){var U=G.tag,ue=G.type;switch(U){case Ue:return"Cache";case xe:var ve=ue;return Ol(ve)+".Consumer";case Ae:var Re=ue;return Ol(Re._context)+".Provider";case Ke:return"DehydratedFragment";case ge:return Ls(ue,ue.render,"ForwardRef");case pe:return"Fragment";case J:return ue;case X:return"Portal";case W:return"Root";case oe:return"Text";case Ie:return Qo(ue);case me:return ue===gs?"StrictMode":"Mode";case ot:return"Offscreen";case Te:return"Profiler";case Xe:return"Scope";case we:return"Suspense";case Je:return"SuspenseList";case et:return"TracingMarker";case V:case F:case je:case K:case ke:case Be:if(typeof ue=="function")return ue.displayName||ue.name||null;if(typeof ue=="string")return ue;break}return null}var Xs=O.ReactDebugCurrentFrame,yi=null,Zs=!1;function Ya(){{if(yi===null)return null;var G=yi._debugOwner;if(G!==null&&typeof G<"u")return qn(G)}return null}function Zl(){return yi===null?"":ma(yi)}function Ki(){Xs.getCurrentStack=null,yi=null,Zs=!1}function $i(G){Xs.getCurrentStack=G===null?null:Zl,yi=G,Zs=!1}function Ku(){return yi}function da(G){Zs=G}function ss(G){return""+G}function Ur(G){switch(typeof G){case"boolean":case"number":case"string":case"undefined":return G;case"object":return bo(G),G;default:return""}}var gn={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function So(G,U){gn[U.type]||U.onChange||U.onInput||U.readOnly||U.disabled||U.value==null||B("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),U.onChange||U.readOnly||U.disabled||U.checked==null||B("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function To(G){var U=G.type,ue=G.nodeName;return ue&&ue.toLowerCase()==="input"&&(U==="checkbox"||U==="radio")}function Kn(G){return G._valueTracker}function zn(G){G._valueTracker=null}function ai(G){var U="";return G&&(To(G)?U=G.checked?"true":"false":U=G.value),U}function wi(G){var U=To(G)?"checked":"value",ue=Object.getOwnPropertyDescriptor(G.constructor.prototype,U);bo(G[U]);var ve=""+G[U];if(!(G.hasOwnProperty(U)||typeof ue>"u"||typeof ue.get!="function"||typeof ue.set!="function")){var Re=ue.get,qe=ue.set;Object.defineProperty(G,U,{configurable:!0,get:function(){return Re.call(this)},set:function(pt){bo(pt),ve=""+pt,qe.call(this,pt)}}),Object.defineProperty(G,U,{enumerable:ue.enumerable});var rt={getValue:function(){return ve},setValue:function(pt){bo(pt),ve=""+pt},stopTracking:function(){zn(G),delete G[U]}};return rt}}function ra(G){Kn(G)||(G._valueTracker=wi(G))}function rs(G){if(!G)return!1;var U=Kn(G);if(!U)return!0;var ue=U.getValue(),ve=ai(G);return ve!==ue?(U.setValue(ve),!0):!1}function Xa(G){if(G=G||(typeof document<"u"?document:void 0),typeof G>"u")return null;try{return G.activeElement||G.body}catch{return G.body}}var Ql=!1,Jl=!1,Uu=!1,Ui=!1;function Oc(G){var U=G.type==="checkbox"||G.type==="radio";return U?G.checked!=null:G.value!=null}function Et(G,U){var ue=G,ve=U.checked,Re=Nn({},U,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:ve??ue._wrapperState.initialChecked});return Re}function Zt(G,U){So("input",U),U.checked!==void 0&&U.defaultChecked!==void 0&&!Jl&&(B("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Ya()||"A component",U.type),Jl=!0),U.value!==void 0&&U.defaultValue!==void 0&&!Ql&&(B("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",Ya()||"A component",U.type),Ql=!0);var ue=G,ve=U.defaultValue==null?"":U.defaultValue;ue._wrapperState={initialChecked:U.checked!=null?U.checked:U.defaultChecked,initialValue:Ur(U.value!=null?U.value:ve),controlled:Oc(U)}}function $r(G,U){var ue=G,ve=U.checked;ve!=null&&Go(ue,"checked",ve,!1)}function Nr(G,U){var ue=G;{var ve=Oc(U);!ue._wrapperState.controlled&&ve&&!Ui&&(B("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Ui=!0),ue._wrapperState.controlled&&!ve&&!Uu&&(B("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),Uu=!0)}$r(G,U);var Re=Ur(U.value),qe=U.type;if(Re!=null)qe==="number"?(Re===0&&ue.value===""||ue.value!=Re)&&(ue.value=ss(Re)):ue.value!==ss(Re)&&(ue.value=ss(Re));else if(qe==="submit"||qe==="reset"){ue.removeAttribute("value");return}U.hasOwnProperty("value")?Io(ue,U.type,Re):U.hasOwnProperty("defaultValue")&&Io(ue,U.type,Ur(U.defaultValue)),U.checked==null&&U.defaultChecked!=null&&(ue.defaultChecked=!!U.defaultChecked)}function mn(G,U,ue){var ve=G;if(U.hasOwnProperty("value")||U.hasOwnProperty("defaultValue")){var Re=U.type,qe=Re==="submit"||Re==="reset";if(qe&&(U.value===void 0||U.value===null))return;var rt=ss(ve._wrapperState.initialValue);ue||rt!==ve.value&&(ve.value=rt),ve.defaultValue=rt}var pt=ve.name;pt!==""&&(ve.name=""),ve.defaultChecked=!ve.defaultChecked,ve.defaultChecked=!!ve._wrapperState.initialChecked,pt!==""&&(ve.name=pt)}function Xn(G,U){var ue=G;Nr(ue,U),Pn(ue,U)}function Pn(G,U){var ue=U.name;if(U.type==="radio"&&ue!=null){for(var ve=G;ve.parentNode;)ve=ve.parentNode;Bn(ue,"name");for(var Re=ve.querySelectorAll("input[name="+JSON.stringify(""+ue)+'][type="radio"]'),qe=0;qe.")))}):U.dangerouslySetInnerHTML!=null&&(Uo||(Uo=!0,B("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")))),U.selected!=null&&!Jo&&(B("Use the `defaultValue` or `value` props on must be a scalar value if `multiple` is false.%s",ue,kl())}}}}function ya(G,U,ue,ve){var Re=G.options;if(U){for(var qe=ue,rt={},pt=0;pt.");var ve=Nn({},U,{value:void 0,defaultValue:void 0,children:ss(ue._wrapperState.initialValue)});return ve}function xd(G,U){var ue=G;So("textarea",U),U.value!==void 0&&U.defaultValue!==void 0&&!rd&&(B("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",Ya()||"A component"),rd=!0);var ve=U.value;if(ve==null){var Re=U.children,qe=U.defaultValue;if(Re!=null){B("Use the `defaultValue` or `value` props instead of setting children on - -`,textFieldTemplate=(S,C)=>html$4` - -`,disabledCursor="not-allowed",hidden=":host([hidden]){display:none}";function display(S){return`${hidden}:host{display:${S}}`}const focusVisible=canUseFocusVisible()?"focus-visible":"focus",reservedReactProperties=new Set(["children","localName","ref","style","className"]),emptyProps=Object.freeze(Object.create(null)),DEFAULT_CACHE_NAME="_default",wrappersCache=new Map;function setRef(S,C){typeof S=="function"?S(C):S.current=C}function getTagName(S,C){if(!C.name){const R=FASTElementDefinition.forType(S);if(R)C.name=R.name;else throw new Error("React wrappers must wrap a FASTElement or be configured with a name.")}return C.name}function getElementEvents(S){return S.events||(S.events={})}function keyIsValid(S,C,R){return reservedReactProperties.has(R)?(console.warn(`${getTagName(S,C)} contains property ${R} which is a React reserved property. It will be used by React and not set on the element.`),!1):!0}function getElementKeys(S,C){if(!C.keys)if(C.properties)C.keys=new Set(C.properties.concat(Object.keys(getElementEvents(C))));else{const R=new Set(Object.keys(getElementEvents(C))),O=Observable$1.getAccessors(S.prototype);if(O.length>0)for(const I of O)keyIsValid(S,C,I.name)&&R.add(I.name);else for(const I in S.prototype)!(I in HTMLElement.prototype)&&keyIsValid(S,C,I)&&R.add(I);C.keys=R}return C.keys}function provideReactWrapper(S,C){let R=[];const O={register(N,...L){R.forEach(B=>B.register(N,...L)),R=[]}};function I(N,L={}){var B,j;N instanceof FoundationElementRegistry&&(C?C.register(N):R.push(N),N=N.type);const F=wrappersCache.get(N);if(F){const W=F.get((B=L.name)!==null&&B!==void 0?B:DEFAULT_CACHE_NAME);if(W)return W}class V extends S.Component{constructor(){super(...arguments),this._element=null}_updateElement(X){const J=this._element;if(J===null)return;const oe=this.props,pe=X||emptyProps,me=getElementEvents(L);for(const xe in this._elementProps){const Ae=oe[xe],ge=me[xe];if(ge===void 0)J[xe]=Ae;else{const Te=pe[xe];if(Ae===Te)continue;Te!==void 0&&J.removeEventListener(ge,Te),Ae!==void 0&&J.addEventListener(ge,Ae)}}}componentDidMount(){this._updateElement()}componentDidUpdate(X){this._updateElement(X)}render(){const X=this.props.__forwardedRef;(this._ref===void 0||this._userRef!==X)&&(this._ref=xe=>{this._element===null&&(this._element=xe),X!==null&&setRef(X,xe),this._userRef=X});const J={ref:this._ref},oe=this._elementProps={},pe=getElementKeys(N,L),me=this.props;for(const xe in me){const Ae=me[xe];pe.has(xe)?oe[xe]=Ae:J[xe==="className"?"class":xe]=Ae}return S.createElement(getTagName(N,L),J)}}const K=S.forwardRef((W,X)=>S.createElement(V,Object.assign(Object.assign({},W),{__forwardedRef:X}),W==null?void 0:W.children));return wrappersCache.has(N)||wrappersCache.set(N,new Map),wrappersCache.get(N).set((j=L.name)!==null&&j!==void 0?j:DEFAULT_CACHE_NAME,K),K}return{wrap:I,registry:O}}function provideVSCodeDesignSystem(S){return DesignSystem.getOrCreate(S).withPrefix("vscode")}function initThemeChangeListener(S){window.addEventListener("load",()=>{new MutationObserver(()=>{applyCurrentTheme(S)}).observe(document.body,{attributes:!0,attributeFilter:["class"]}),applyCurrentTheme(S)})}function applyCurrentTheme(S){const C=getComputedStyle(document.body),R=document.querySelector("body");if(R){const O=R.getAttribute("data-vscode-theme-kind");for(const[I,N]of S){let L=C.getPropertyValue(I).toString();if(O==="vscode-high-contrast")L.length===0&&N.name.includes("background")&&(L="transparent"),N.name==="button-icon-hover-background"&&(L="transparent");else if(O==="vscode-high-contrast-light"){if(L.length===0&&N.name.includes("background"))switch(N.name){case"button-primary-hover-background":L="#0F4A85";break;case"button-secondary-hover-background":L="transparent";break;case"button-icon-hover-background":L="transparent";break}}else N.name==="contrast-active-border"&&(L="transparent");N.setValueFor(R,L)}}}const tokenMappings=new Map;let isThemeListenerInitialized=!1;function create$4(S,C){const R=DesignToken.create(S);if(C){if(C.includes("--fake-vscode-token")){const O="id"+Math.random().toString(16).slice(2);C=`${C}-${O}`}tokenMappings.set(C,R)}return isThemeListenerInitialized||(initThemeChangeListener(tokenMappings),isThemeListenerInitialized=!0),R}const background=create$4("background","--vscode-editor-background").withDefault("#1e1e1e"),borderWidth=create$4("border-width").withDefault(1),contrastActiveBorder=create$4("contrast-active-border","--vscode-contrastActiveBorder").withDefault("#f38518");create$4("contrast-border","--vscode-contrastBorder").withDefault("#6fc3df");const cornerRadius=create$4("corner-radius").withDefault(0),cornerRadiusRound=create$4("corner-radius-round").withDefault(2),designUnit=create$4("design-unit").withDefault(4),disabledOpacity=create$4("disabled-opacity").withDefault(.4),focusBorder=create$4("focus-border","--vscode-focusBorder").withDefault("#007fd4"),fontFamily=create$4("font-family","--vscode-font-family").withDefault("-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol");create$4("font-weight","--vscode-font-weight").withDefault("400");const foreground=create$4("foreground","--vscode-foreground").withDefault("#cccccc"),inputHeight=create$4("input-height").withDefault("26"),inputMinWidth=create$4("input-min-width").withDefault("100px"),typeRampBaseFontSize=create$4("type-ramp-base-font-size","--vscode-font-size").withDefault("13px"),typeRampBaseLineHeight=create$4("type-ramp-base-line-height").withDefault("normal"),typeRampMinus1FontSize=create$4("type-ramp-minus1-font-size").withDefault("11px"),typeRampMinus1LineHeight=create$4("type-ramp-minus1-line-height").withDefault("16px");create$4("type-ramp-minus2-font-size").withDefault("9px"),create$4("type-ramp-minus2-line-height").withDefault("16px"),create$4("type-ramp-plus1-font-size").withDefault("16px"),create$4("type-ramp-plus1-line-height").withDefault("24px");const scrollbarWidth=create$4("scrollbarWidth").withDefault("10px"),scrollbarHeight=create$4("scrollbarHeight").withDefault("10px"),scrollbarSliderBackground=create$4("scrollbar-slider-background","--vscode-scrollbarSlider-background").withDefault("#79797966"),scrollbarSliderHoverBackground=create$4("scrollbar-slider-hover-background","--vscode-scrollbarSlider-hoverBackground").withDefault("#646464b3"),scrollbarSliderActiveBackground=create$4("scrollbar-slider-active-background","--vscode-scrollbarSlider-activeBackground").withDefault("#bfbfbf66"),badgeBackground=create$4("badge-background","--vscode-badge-background").withDefault("#4d4d4d"),badgeForeground=create$4("badge-foreground","--vscode-badge-foreground").withDefault("#ffffff"),buttonBorder=create$4("button-border","--vscode-button-border").withDefault("transparent"),buttonIconBackground=create$4("button-icon-background").withDefault("transparent"),buttonIconCornerRadius=create$4("button-icon-corner-radius").withDefault("5px"),buttonIconFocusBorderOffset=create$4("button-icon-outline-offset").withDefault(0),buttonIconHoverBackground=create$4("button-icon-hover-background","--fake-vscode-token").withDefault("rgba(90, 93, 94, 0.31)"),buttonIconPadding=create$4("button-icon-padding").withDefault("3px"),buttonPrimaryBackground=create$4("button-primary-background","--vscode-button-background").withDefault("#0e639c"),buttonPrimaryForeground=create$4("button-primary-foreground","--vscode-button-foreground").withDefault("#ffffff"),buttonPrimaryHoverBackground=create$4("button-primary-hover-background","--vscode-button-hoverBackground").withDefault("#1177bb"),buttonSecondaryBackground=create$4("button-secondary-background","--vscode-button-secondaryBackground").withDefault("#3a3d41"),buttonSecondaryForeground=create$4("button-secondary-foreground","--vscode-button-secondaryForeground").withDefault("#ffffff"),buttonSecondaryHoverBackground=create$4("button-secondary-hover-background","--vscode-button-secondaryHoverBackground").withDefault("#45494e"),buttonPaddingHorizontal=create$4("button-padding-horizontal").withDefault("11px"),buttonPaddingVertical=create$4("button-padding-vertical").withDefault("4px"),checkboxBackground=create$4("checkbox-background","--vscode-checkbox-background").withDefault("#3c3c3c"),checkboxBorder=create$4("checkbox-border","--vscode-checkbox-border").withDefault("#3c3c3c"),checkboxCornerRadius=create$4("checkbox-corner-radius").withDefault(3);create$4("checkbox-foreground","--vscode-checkbox-foreground").withDefault("#f0f0f0");const listActiveSelectionBackground=create$4("list-active-selection-background","--vscode-list-activeSelectionBackground").withDefault("#094771"),listActiveSelectionForeground=create$4("list-active-selection-foreground","--vscode-list-activeSelectionForeground").withDefault("#ffffff"),listHoverBackground=create$4("list-hover-background","--vscode-list-hoverBackground").withDefault("#2a2d2e"),dividerBackground=create$4("divider-background","--vscode-settings-dropdownListBorder").withDefault("#454545"),dropdownBackground=create$4("dropdown-background","--vscode-dropdown-background").withDefault("#3c3c3c"),dropdownBorder=create$4("dropdown-border","--vscode-dropdown-border").withDefault("#3c3c3c");create$4("dropdown-foreground","--vscode-dropdown-foreground").withDefault("#f0f0f0");const dropdownListMaxHeight=create$4("dropdown-list-max-height").withDefault("200px"),inputBackground=create$4("input-background","--vscode-input-background").withDefault("#3c3c3c"),inputForeground=create$4("input-foreground","--vscode-input-foreground").withDefault("#cccccc");create$4("input-placeholder-foreground","--vscode-input-placeholderForeground").withDefault("#cccccc");const linkActiveForeground=create$4("link-active-foreground","--vscode-textLink-activeForeground").withDefault("#3794ff"),linkForeground=create$4("link-foreground","--vscode-textLink-foreground").withDefault("#3794ff"),progressBackground=create$4("progress-background","--vscode-progressBar-background").withDefault("#0e70c0"),panelTabActiveBorder=create$4("panel-tab-active-border","--vscode-panelTitle-activeBorder").withDefault("#e7e7e7"),panelTabActiveForeground=create$4("panel-tab-active-foreground","--vscode-panelTitle-activeForeground").withDefault("#e7e7e7"),panelTabForeground=create$4("panel-tab-foreground","--vscode-panelTitle-inactiveForeground").withDefault("#e7e7e799");create$4("panel-view-background","--vscode-panel-background").withDefault("#1e1e1e"),create$4("panel-view-border","--vscode-panel-border").withDefault("#80808059");const tagCornerRadius=create$4("tag-corner-radius").withDefault("2px"),badgeStyles=(S,C)=>css$1` - ${display("inline-block")} :host { - box-sizing: border-box; - font-family: ${fontFamily}; - font-size: ${typeRampMinus1FontSize}; - line-height: ${typeRampMinus1LineHeight}; - text-align: center; - } - .control { - align-items: center; - background-color: ${badgeBackground}; - border: calc(${borderWidth} * 1px) solid ${buttonBorder}; - border-radius: 11px; - box-sizing: border-box; - color: ${badgeForeground}; - display: flex; - height: calc(${designUnit} * 4px); - justify-content: center; - min-width: calc(${designUnit} * 4px + 2px); - min-height: calc(${designUnit} * 4px + 2px); - padding: 3px 6px; - } -`;class Badge extends Badge$1{connectedCallback(){super.connectedCallback(),this.circular||(this.circular=!0)}}const vsCodeBadge=Badge.compose({baseName:"badge",template:badgeTemplate,styles:badgeStyles}),BaseButtonStyles=css$1` - ${display("inline-flex")} :host { - outline: none; - font-family: ${fontFamily}; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - color: ${buttonPrimaryForeground}; - background: ${buttonPrimaryBackground}; - border-radius: calc(${cornerRadiusRound} * 1px); - fill: currentColor; - cursor: pointer; - } - .control { - background: transparent; - height: inherit; - flex-grow: 1; - box-sizing: border-box; - display: inline-flex; - justify-content: center; - align-items: center; - padding: ${buttonPaddingVertical} ${buttonPaddingHorizontal}; - white-space: wrap; - outline: none; - text-decoration: none; - border: calc(${borderWidth} * 1px) solid ${buttonBorder}; - color: inherit; - border-radius: inherit; - fill: inherit; - cursor: inherit; - font-family: inherit; - } - :host(:hover) { - background: ${buttonPrimaryHoverBackground}; - } - :host(:active) { - background: ${buttonPrimaryBackground}; - } - .control:${focusVisible} { - outline: calc(${borderWidth} * 1px) solid ${focusBorder}; - outline-offset: calc(${borderWidth} * 2px); - } - .control::-moz-focus-inner { - border: 0; - } - :host([disabled]) { - opacity: ${disabledOpacity}; - background: ${buttonPrimaryBackground}; - cursor: ${disabledCursor}; - } - .content { - display: flex; - } - .start { - display: flex; - } - ::slotted(svg), - ::slotted(span) { - width: calc(${designUnit} * 4px); - height: calc(${designUnit} * 4px); - } - .start { - margin-inline-end: 8px; - } -`,PrimaryButtonStyles=css$1` - :host([appearance='primary']) { - background: ${buttonPrimaryBackground}; - color: ${buttonPrimaryForeground}; - } - :host([appearance='primary']:hover) { - background: ${buttonPrimaryHoverBackground}; - } - :host([appearance='primary']:active) .control:active { - background: ${buttonPrimaryBackground}; - } - :host([appearance='primary']) .control:${focusVisible} { - outline: calc(${borderWidth} * 1px) solid ${focusBorder}; - outline-offset: calc(${borderWidth} * 2px); - } - :host([appearance='primary'][disabled]) { - background: ${buttonPrimaryBackground}; - } -`,SecondaryButtonStyles=css$1` - :host([appearance='secondary']) { - background: ${buttonSecondaryBackground}; - color: ${buttonSecondaryForeground}; - } - :host([appearance='secondary']:hover) { - background: ${buttonSecondaryHoverBackground}; - } - :host([appearance='secondary']:active) .control:active { - background: ${buttonSecondaryBackground}; - } - :host([appearance='secondary']) .control:${focusVisible} { - outline: calc(${borderWidth} * 1px) solid ${focusBorder}; - outline-offset: calc(${borderWidth} * 2px); - } - :host([appearance='secondary'][disabled]) { - background: ${buttonSecondaryBackground}; - } -`,IconButtonStyles=css$1` - :host([appearance='icon']) { - background: ${buttonIconBackground}; - border-radius: ${buttonIconCornerRadius}; - color: ${foreground}; - } - :host([appearance='icon']:hover) { - background: ${buttonIconHoverBackground}; - outline: 1px dotted ${contrastActiveBorder}; - outline-offset: -1px; - } - :host([appearance='icon']) .control { - padding: ${buttonIconPadding}; - border: none; - } - :host([appearance='icon']:active) .control:active { - background: ${buttonIconHoverBackground}; - } - :host([appearance='icon']) .control:${focusVisible} { - outline: calc(${borderWidth} * 1px) solid ${focusBorder}; - outline-offset: ${buttonIconFocusBorderOffset}; - } - :host([appearance='icon'][disabled]) { - background: ${buttonIconBackground}; - } -`,buttonStyles=(S,C)=>css$1` - ${BaseButtonStyles} - ${PrimaryButtonStyles} - ${SecondaryButtonStyles} - ${IconButtonStyles} -`;class Button extends Button$1{connectedCallback(){if(super.connectedCallback(),!this.appearance){const C=this.getAttribute("appearance");this.appearance=C}}attributeChangedCallback(C,R,O){C==="appearance"&&O==="icon"&&(this.getAttribute("aria-label")||(this.ariaLabel="Icon Button")),C==="aria-label"&&(this.ariaLabel=O),C==="disabled"&&(this.disabled=O!==null)}}__decorate$1([attr],Button.prototype,"appearance",void 0);const vsCodeButton=Button.compose({baseName:"button",template:buttonTemplate,styles:buttonStyles,shadowOptions:{delegatesFocus:!0}}),checkboxStyles=(S,C)=>css$1` - ${display("inline-flex")} :host { - align-items: center; - outline: none; - margin: calc(${designUnit} * 1px) 0; - user-select: none; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - } - .control { - position: relative; - width: calc(${designUnit} * 4px + 2px); - height: calc(${designUnit} * 4px + 2px); - box-sizing: border-box; - border-radius: calc(${checkboxCornerRadius} * 1px); - border: calc(${borderWidth} * 1px) solid ${checkboxBorder}; - background: ${checkboxBackground}; - outline: none; - cursor: pointer; - } - .label { - font-family: ${fontFamily}; - color: ${foreground}; - padding-inline-start: calc(${designUnit} * 2px + 2px); - margin-inline-end: calc(${designUnit} * 2px + 2px); - cursor: pointer; - } - .label__hidden { - display: none; - visibility: hidden; - } - .checked-indicator { - width: 100%; - height: 100%; - display: block; - fill: ${foreground}; - opacity: 0; - pointer-events: none; - } - .indeterminate-indicator { - border-radius: 2px; - background: ${foreground}; - position: absolute; - top: 50%; - left: 50%; - width: 50%; - height: 50%; - transform: translate(-50%, -50%); - opacity: 0; - } - :host(:enabled) .control:hover { - background: ${checkboxBackground}; - border-color: ${checkboxBorder}; - } - :host(:enabled) .control:active { - background: ${checkboxBackground}; - border-color: ${focusBorder}; - } - :host(:${focusVisible}) .control { - border: calc(${borderWidth} * 1px) solid ${focusBorder}; - } - :host(.disabled) .label, - :host(.readonly) .label, - :host(.readonly) .control, - :host(.disabled) .control { - cursor: ${disabledCursor}; - } - :host(.checked:not(.indeterminate)) .checked-indicator, - :host(.indeterminate) .indeterminate-indicator { - opacity: 1; - } - :host(.disabled) { - opacity: ${disabledOpacity}; - } -`;class Checkbox extends Checkbox$1{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Checkbox")}}const vsCodeCheckbox=Checkbox.compose({baseName:"checkbox",template:checkboxTemplate,styles:checkboxStyles,checkedIndicator:` - - - - `,indeterminateIndicator:` -
- `}),dataGridStyles=(S,C)=>css$1` - :host { - display: flex; - position: relative; - flex-direction: column; - width: 100%; - } -`,dataGridRowStyles=(S,C)=>css$1` - :host { - display: grid; - padding: calc((${designUnit} / 4) * 1px) 0; - box-sizing: border-box; - width: 100%; - background: transparent; - } - :host(.header) { - } - :host(.sticky-header) { - background: ${background}; - position: sticky; - top: 0; - } - :host(:hover) { - background: ${listHoverBackground}; - outline: 1px dotted ${contrastActiveBorder}; - outline-offset: -1px; - } -`,dataGridCellStyles=(S,C)=>css$1` - :host { - padding: calc(${designUnit} * 1px) calc(${designUnit} * 3px); - color: ${foreground}; - opacity: 1; - box-sizing: border-box; - font-family: ${fontFamily}; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - font-weight: 400; - border: solid calc(${borderWidth} * 1px) transparent; - border-radius: calc(${cornerRadius} * 1px); - white-space: wrap; - overflow-wrap: anywhere; - } - :host(.column-header) { - font-weight: 600; - } - :host(:${focusVisible}), - :host(:focus), - :host(:active) { - background: ${listActiveSelectionBackground}; - border: solid calc(${borderWidth} * 1px) ${focusBorder}; - color: ${listActiveSelectionForeground}; - outline: none; - } - :host(:${focusVisible}) ::slotted(*), - :host(:focus) ::slotted(*), - :host(:active) ::slotted(*) { - color: ${listActiveSelectionForeground} !important; - } -`;class DataGrid extends DataGrid$1{connectedCallback(){super.connectedCallback(),this.getAttribute("aria-label")||this.setAttribute("aria-label","Data Grid")}}const vsCodeDataGrid=DataGrid.compose({baseName:"data-grid",baseClass:DataGrid$1,template:dataGridTemplate,styles:dataGridStyles});class DataGridRow extends DataGridRow$1{}const vsCodeDataGridRow=DataGridRow.compose({baseName:"data-grid-row",baseClass:DataGridRow$1,template:dataGridRowTemplate,styles:dataGridRowStyles});class DataGridCell extends DataGridCell$1{}const vsCodeDataGridCell=DataGridCell.compose({baseName:"data-grid-cell",baseClass:DataGridCell$1,template:dataGridCellTemplate,styles:dataGridCellStyles}),dividerStyles=(S,C)=>css$1` - ${display("block")} :host { - border: none; - border-top: calc(${borderWidth} * 1px) solid ${dividerBackground}; - box-sizing: content-box; - height: 0; - margin: calc(${designUnit} * 1px) 0; - width: 100%; - } -`;class Divider extends Divider$1{}const vsCodeDivider=Divider.compose({baseName:"divider",template:dividerTemplate,styles:dividerStyles}),dropdownStyles=(S,C)=>css$1` - ${display("inline-flex")} :host { - background: ${dropdownBackground}; - border-radius: calc(${cornerRadiusRound} * 1px); - box-sizing: border-box; - color: ${foreground}; - contain: contents; - font-family: ${fontFamily}; - height: calc(${inputHeight} * 1px); - position: relative; - user-select: none; - min-width: ${inputMinWidth}; - outline: none; - vertical-align: top; - } - .control { - align-items: center; - box-sizing: border-box; - border: calc(${borderWidth} * 1px) solid ${dropdownBorder}; - border-radius: calc(${cornerRadiusRound} * 1px); - cursor: pointer; - display: flex; - font-family: inherit; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - min-height: 100%; - padding: 2px 6px 2px 8px; - width: 100%; - } - .listbox { - background: ${dropdownBackground}; - border: calc(${borderWidth} * 1px) solid ${focusBorder}; - border-radius: calc(${cornerRadiusRound} * 1px); - box-sizing: border-box; - display: inline-flex; - flex-direction: column; - left: 0; - max-height: ${dropdownListMaxHeight}; - padding: 0; - overflow-y: auto; - position: absolute; - width: 100%; - z-index: 1; - } - .listbox[hidden] { - display: none; - } - :host(:${focusVisible}) .control { - border-color: ${focusBorder}; - } - :host(:not([disabled]):hover) { - background: ${dropdownBackground}; - border-color: ${dropdownBorder}; - } - :host(:${focusVisible}) ::slotted([aria-selected="true"][role="option"]:not([disabled])) { - background: ${listActiveSelectionBackground}; - border: calc(${borderWidth} * 1px) solid transparent; - color: ${listActiveSelectionForeground}; - } - :host([disabled]) { - cursor: ${disabledCursor}; - opacity: ${disabledOpacity}; - } - :host([disabled]) .control { - cursor: ${disabledCursor}; - user-select: none; - } - :host([disabled]:hover) { - background: ${dropdownBackground}; - color: ${foreground}; - fill: currentcolor; - } - :host(:not([disabled])) .control:active { - border-color: ${focusBorder}; - } - :host(:empty) .listbox { - display: none; - } - :host([open]) .control { - border-color: ${focusBorder}; - } - :host([open][position='above']) .listbox { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - } - :host([open][position='below']) .listbox { - border-top-left-radius: 0; - border-top-right-radius: 0; - } - :host([open][position='above']) .listbox { - bottom: calc(${inputHeight} * 1px); - } - :host([open][position='below']) .listbox { - top: calc(${inputHeight} * 1px); - } - .selected-value { - flex: 1 1 auto; - font-family: inherit; - overflow: hidden; - text-align: start; - text-overflow: ellipsis; - white-space: nowrap; - } - .indicator { - flex: 0 0 auto; - margin-inline-start: 1em; - } - slot[name='listbox'] { - display: none; - width: 100%; - } - :host([open]) slot[name='listbox'] { - display: flex; - position: absolute; - } - .end { - margin-inline-start: auto; - } - .start, - .end, - .indicator, - .select-indicator, - ::slotted(svg), - ::slotted(span) { - fill: currentcolor; - height: 1em; - min-height: calc(${designUnit} * 4px); - min-width: calc(${designUnit} * 4px); - width: 1em; - } - ::slotted([role='option']), - ::slotted(option) { - flex: 0 0 auto; - } -`;class Dropdown extends Select{}const vsCodeDropdown=Dropdown.compose({baseName:"dropdown",template:selectTemplate,styles:dropdownStyles,indicator:` - - - - `}),linkStyles=(S,C)=>css$1` - ${display("inline-flex")} :host { - background: transparent; - box-sizing: border-box; - color: ${linkForeground}; - cursor: pointer; - fill: currentcolor; - font-family: ${fontFamily}; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - outline: none; - } - .control { - background: transparent; - border: calc(${borderWidth} * 1px) solid transparent; - border-radius: calc(${cornerRadius} * 1px); - box-sizing: border-box; - color: inherit; - cursor: inherit; - fill: inherit; - font-family: inherit; - height: inherit; - padding: 0; - outline: none; - text-decoration: none; - word-break: break-word; - } - .control::-moz-focus-inner { - border: 0; - } - :host(:hover) { - color: ${linkActiveForeground}; - } - :host(:hover) .content { - text-decoration: underline; - } - :host(:active) { - background: transparent; - color: ${linkActiveForeground}; - } - :host(:${focusVisible}) .control, - :host(:focus) .control { - border: calc(${borderWidth} * 1px) solid ${focusBorder}; - } -`;class Link extends Anchor{}const vsCodeLink=Link.compose({baseName:"link",template:anchorTemplate,styles:linkStyles,shadowOptions:{delegatesFocus:!0}}),optionStyles=(S,C)=>css$1` - ${display("inline-flex")} :host { - font-family: var(--body-font); - border-radius: ${cornerRadius}; - border: calc(${borderWidth} * 1px) solid transparent; - box-sizing: border-box; - color: ${foreground}; - cursor: pointer; - fill: currentcolor; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - margin: 0; - outline: none; - overflow: hidden; - padding: 0 calc((${designUnit} / 2) * 1px) - calc((${designUnit} / 4) * 1px); - user-select: none; - white-space: nowrap; - } - :host(:${focusVisible}) { - border-color: ${focusBorder}; - background: ${listActiveSelectionBackground}; - color: ${foreground}; - } - :host([aria-selected='true']) { - background: ${listActiveSelectionBackground}; - border: calc(${borderWidth} * 1px) solid transparent; - color: ${listActiveSelectionForeground}; - } - :host(:active) { - background: ${listActiveSelectionBackground}; - color: ${listActiveSelectionForeground}; - } - :host(:not([aria-selected='true']):hover) { - background: ${listActiveSelectionBackground}; - border: calc(${borderWidth} * 1px) solid transparent; - color: ${listActiveSelectionForeground}; - } - :host(:not([aria-selected='true']):active) { - background: ${listActiveSelectionBackground}; - color: ${foreground}; - } - :host([disabled]) { - cursor: ${disabledCursor}; - opacity: ${disabledOpacity}; - } - :host([disabled]:hover) { - background-color: inherit; - } - .content { - grid-column-start: 2; - justify-self: start; - overflow: hidden; - text-overflow: ellipsis; - } -`;let Option$1=class extends ListboxOption{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Option")}};const vsCodeOption=Option$1.compose({baseName:"option",template:listboxOptionTemplate,styles:optionStyles}),panelsStyles=(S,C)=>css$1` - ${display("grid")} :host { - box-sizing: border-box; - font-family: ${fontFamily}; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - color: ${foreground}; - grid-template-columns: auto 1fr auto; - grid-template-rows: auto 1fr; - overflow-x: auto; - } - .tablist { - display: grid; - grid-template-rows: auto auto; - grid-template-columns: auto; - column-gap: calc(${designUnit} * 8px); - position: relative; - width: max-content; - align-self: end; - padding: calc(${designUnit} * 1px) calc(${designUnit} * 1px) 0; - box-sizing: border-box; - } - .start, - .end { - align-self: center; - } - .activeIndicator { - grid-row: 2; - grid-column: 1; - width: 100%; - height: calc((${designUnit} / 4) * 1px); - justify-self: center; - background: ${panelTabActiveForeground}; - margin: 0; - border-radius: calc(${cornerRadius} * 1px); - } - .activeIndicatorTransition { - transition: transform 0.01s linear; - } - .tabpanel { - grid-row: 2; - grid-column-start: 1; - grid-column-end: 4; - position: relative; - } -`,panelTabStyles=(S,C)=>css$1` - ${display("inline-flex")} :host { - box-sizing: border-box; - font-family: ${fontFamily}; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - height: calc(${designUnit} * 7px); - padding: calc(${designUnit} * 1px) 0; - color: ${panelTabForeground}; - fill: currentcolor; - border-radius: calc(${cornerRadius} * 1px); - border: solid calc(${borderWidth} * 1px) transparent; - align-items: center; - justify-content: center; - grid-row: 1; - cursor: pointer; - } - :host(:hover) { - color: ${panelTabActiveForeground}; - fill: currentcolor; - } - :host(:active) { - color: ${panelTabActiveForeground}; - fill: currentcolor; - } - :host([aria-selected='true']) { - background: transparent; - color: ${panelTabActiveForeground}; - fill: currentcolor; - } - :host([aria-selected='true']:hover) { - background: transparent; - color: ${panelTabActiveForeground}; - fill: currentcolor; - } - :host([aria-selected='true']:active) { - background: transparent; - color: ${panelTabActiveForeground}; - fill: currentcolor; - } - :host(:${focusVisible}) { - outline: none; - border: solid calc(${borderWidth} * 1px) ${panelTabActiveBorder}; - } - :host(:focus) { - outline: none; - } - ::slotted(vscode-badge) { - margin-inline-start: calc(${designUnit} * 2px); - } -`,panelViewStyles=(S,C)=>css$1` - ${display("flex")} :host { - color: inherit; - background-color: transparent; - border: solid calc(${borderWidth} * 1px) transparent; - box-sizing: border-box; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - padding: 10px calc((${designUnit} + 2) * 1px); - } -`;class Panels extends Tabs{connectedCallback(){super.connectedCallback(),this.orientation&&(this.orientation=TabsOrientation.horizontal),this.getAttribute("aria-label")||this.setAttribute("aria-label","Panels")}}const vsCodePanels=Panels.compose({baseName:"panels",template:tabsTemplate,styles:panelsStyles});class PanelTab extends Tab{connectedCallback(){super.connectedCallback(),this.disabled&&(this.disabled=!1),this.textContent&&this.setAttribute("aria-label",this.textContent)}}const vsCodePanelTab=PanelTab.compose({baseName:"panel-tab",template:tabTemplate,styles:panelTabStyles});class PanelView extends TabPanel{}const vsCodePanelView=PanelView.compose({baseName:"panel-view",template:tabPanelTemplate,styles:panelViewStyles}),progressRingStyles=(S,C)=>css$1` - ${display("flex")} :host { - align-items: center; - outline: none; - height: calc(${designUnit} * 7px); - width: calc(${designUnit} * 7px); - margin: 0; - } - .progress { - height: 100%; - width: 100%; - } - .background { - fill: none; - stroke: transparent; - stroke-width: calc(${designUnit} / 2 * 1px); - } - .indeterminate-indicator-1 { - fill: none; - stroke: ${progressBackground}; - stroke-width: calc(${designUnit} / 2 * 1px); - stroke-linecap: square; - transform-origin: 50% 50%; - transform: rotate(-90deg); - transition: all 0.2s ease-in-out; - animation: spin-infinite 2s linear infinite; - } - @keyframes spin-infinite { - 0% { - stroke-dasharray: 0.01px 43.97px; - transform: rotate(0deg); - } - 50% { - stroke-dasharray: 21.99px 21.99px; - transform: rotate(450deg); - } - 100% { - stroke-dasharray: 0.01px 43.97px; - transform: rotate(1080deg); - } - } -`;class ProgressRing extends BaseProgress{connectedCallback(){super.connectedCallback(),this.paused&&(this.paused=!1),this.setAttribute("aria-label","Loading"),this.setAttribute("aria-live","assertive"),this.setAttribute("role","alert")}attributeChangedCallback(C,R,O){C==="value"&&this.removeAttribute("value")}}const vsCodeProgressRing=ProgressRing.compose({baseName:"progress-ring",template:progressRingTemplate,styles:progressRingStyles,indeterminateIndicator:` - - - - - `}),radioGroupStyles=(S,C)=>css$1` - ${display("flex")} :host { - align-items: flex-start; - margin: calc(${designUnit} * 1px) 0; - flex-direction: column; - } - .positioning-region { - display: flex; - flex-wrap: wrap; - } - :host([orientation='vertical']) .positioning-region { - flex-direction: column; - } - :host([orientation='horizontal']) .positioning-region { - flex-direction: row; - } - ::slotted([slot='label']) { - color: ${foreground}; - font-size: ${typeRampBaseFontSize}; - margin: calc(${designUnit} * 1px) 0; - } -`;class RadioGroup extends RadioGroup$1{connectedCallback(){super.connectedCallback();const C=this.querySelector("label");if(C){const R="radio-group-"+Math.random().toString(16).slice(2);C.setAttribute("id",R),this.setAttribute("aria-labelledby",R)}}}const vsCodeRadioGroup=RadioGroup.compose({baseName:"radio-group",template:radioGroupTemplate,styles:radioGroupStyles}),radioStyles=(S,C)=>css$1` - ${display("inline-flex")} :host { - align-items: center; - flex-direction: row; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - margin: calc(${designUnit} * 1px) 0; - outline: none; - position: relative; - transition: all 0.2s ease-in-out; - user-select: none; - } - .control { - background: ${checkboxBackground}; - border-radius: 999px; - border: calc(${borderWidth} * 1px) solid ${checkboxBorder}; - box-sizing: border-box; - cursor: pointer; - height: calc(${designUnit} * 4px); - position: relative; - outline: none; - width: calc(${designUnit} * 4px); - } - .label { - color: ${foreground}; - cursor: pointer; - font-family: ${fontFamily}; - margin-inline-end: calc(${designUnit} * 2px + 2px); - padding-inline-start: calc(${designUnit} * 2px + 2px); - } - .label__hidden { - display: none; - visibility: hidden; - } - .control, - .checked-indicator { - flex-shrink: 0; - } - .checked-indicator { - background: ${foreground}; - border-radius: 999px; - display: inline-block; - inset: calc(${designUnit} * 1px); - opacity: 0; - pointer-events: none; - position: absolute; - } - :host(:not([disabled])) .control:hover { - background: ${checkboxBackground}; - border-color: ${checkboxBorder}; - } - :host(:not([disabled])) .control:active { - background: ${checkboxBackground}; - border-color: ${focusBorder}; - } - :host(:${focusVisible}) .control { - border: calc(${borderWidth} * 1px) solid ${focusBorder}; - } - :host([aria-checked='true']) .control { - background: ${checkboxBackground}; - border: calc(${borderWidth} * 1px) solid ${checkboxBorder}; - } - :host([aria-checked='true']:not([disabled])) .control:hover { - background: ${checkboxBackground}; - border: calc(${borderWidth} * 1px) solid ${checkboxBorder}; - } - :host([aria-checked='true']:not([disabled])) .control:active { - background: ${checkboxBackground}; - border: calc(${borderWidth} * 1px) solid ${focusBorder}; - } - :host([aria-checked="true"]:${focusVisible}:not([disabled])) .control { - border: calc(${borderWidth} * 1px) solid ${focusBorder}; - } - :host([disabled]) .label, - :host([readonly]) .label, - :host([readonly]) .control, - :host([disabled]) .control { - cursor: ${disabledCursor}; - } - :host([aria-checked='true']) .checked-indicator { - opacity: 1; - } - :host([disabled]) { - opacity: ${disabledOpacity}; - } -`;class Radio extends Radio$1{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Radio")}}const vsCodeRadio=Radio.compose({baseName:"radio",template:radioTemplate,styles:radioStyles,checkedIndicator:` -
- `}),tagStyles=(S,C)=>css$1` - ${display("inline-block")} :host { - box-sizing: border-box; - font-family: ${fontFamily}; - font-size: ${typeRampMinus1FontSize}; - line-height: ${typeRampMinus1LineHeight}; - } - .control { - background-color: ${badgeBackground}; - border: calc(${borderWidth} * 1px) solid ${buttonBorder}; - border-radius: ${tagCornerRadius}; - color: ${badgeForeground}; - padding: calc(${designUnit} * 0.5px) calc(${designUnit} * 1px); - text-transform: uppercase; - } -`;class Tag extends Badge$1{connectedCallback(){super.connectedCallback(),this.circular&&(this.circular=!1)}}const vsCodeTag=Tag.compose({baseName:"tag",template:badgeTemplate,styles:tagStyles}),textAreaStyles=(S,C)=>css$1` - ${display("inline-block")} :host { - font-family: ${fontFamily}; - outline: none; - user-select: none; - } - .control { - box-sizing: border-box; - position: relative; - color: ${inputForeground}; - background: ${inputBackground}; - border-radius: calc(${cornerRadiusRound} * 1px); - border: calc(${borderWidth} * 1px) solid ${dropdownBorder}; - font: inherit; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - padding: calc(${designUnit} * 2px + 1px); - width: 100%; - min-width: ${inputMinWidth}; - resize: none; - } - .control:hover:enabled { - background: ${inputBackground}; - border-color: ${dropdownBorder}; - } - .control:active:enabled { - background: ${inputBackground}; - border-color: ${focusBorder}; - } - .control:hover, - .control:${focusVisible}, - .control:disabled, - .control:active { - outline: none; - } - .control::-webkit-scrollbar { - width: ${scrollbarWidth}; - height: ${scrollbarHeight}; - } - .control::-webkit-scrollbar-corner { - background: ${inputBackground}; - } - .control::-webkit-scrollbar-thumb { - background: ${scrollbarSliderBackground}; - } - .control::-webkit-scrollbar-thumb:hover { - background: ${scrollbarSliderHoverBackground}; - } - .control::-webkit-scrollbar-thumb:active { - background: ${scrollbarSliderActiveBackground}; - } - :host(:focus-within:not([disabled])) .control { - border-color: ${focusBorder}; - } - :host([resize='both']) .control { - resize: both; - } - :host([resize='horizontal']) .control { - resize: horizontal; - } - :host([resize='vertical']) .control { - resize: vertical; - } - .label { - display: block; - color: ${foreground}; - cursor: pointer; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - margin-bottom: 2px; - } - .label__hidden { - display: none; - visibility: hidden; - } - :host([disabled]) .label, - :host([readonly]) .label, - :host([readonly]) .control, - :host([disabled]) .control { - cursor: ${disabledCursor}; - } - :host([disabled]) { - opacity: ${disabledOpacity}; - } - :host([disabled]) .control { - border-color: ${dropdownBorder}; - } -`;class TextArea extends TextArea$1{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Text area")}}const vsCodeTextArea=TextArea.compose({baseName:"text-area",template:textAreaTemplate,styles:textAreaStyles,shadowOptions:{delegatesFocus:!0}}),textFieldStyles=(S,C)=>css$1` - ${display("inline-block")} :host { - font-family: ${fontFamily}; - outline: none; - user-select: none; - } - .root { - box-sizing: border-box; - position: relative; - display: flex; - flex-direction: row; - color: ${inputForeground}; - background: ${inputBackground}; - border-radius: calc(${cornerRadiusRound} * 1px); - border: calc(${borderWidth} * 1px) solid ${dropdownBorder}; - height: calc(${inputHeight} * 1px); - min-width: ${inputMinWidth}; - } - .control { - -webkit-appearance: none; - font: inherit; - background: transparent; - border: 0; - color: inherit; - height: calc(100% - (${designUnit} * 1px)); - width: 100%; - margin-top: auto; - margin-bottom: auto; - border: none; - padding: 0 calc(${designUnit} * 2px + 1px); - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - } - .control:hover, - .control:${focusVisible}, - .control:disabled, - .control:active { - outline: none; - } - .label { - display: block; - color: ${foreground}; - cursor: pointer; - font-size: ${typeRampBaseFontSize}; - line-height: ${typeRampBaseLineHeight}; - margin-bottom: 2px; - } - .label__hidden { - display: none; - visibility: hidden; - } - .start, - .end { - display: flex; - margin: auto; - fill: currentcolor; - } - ::slotted(svg), - ::slotted(span) { - width: calc(${designUnit} * 4px); - height: calc(${designUnit} * 4px); - } - .start { - margin-inline-start: calc(${designUnit} * 2px); - } - .end { - margin-inline-end: calc(${designUnit} * 2px); - } - :host(:hover:not([disabled])) .root { - background: ${inputBackground}; - border-color: ${dropdownBorder}; - } - :host(:active:not([disabled])) .root { - background: ${inputBackground}; - border-color: ${focusBorder}; - } - :host(:focus-within:not([disabled])) .root { - border-color: ${focusBorder}; - } - :host([disabled]) .label, - :host([readonly]) .label, - :host([readonly]) .control, - :host([disabled]) .control { - cursor: ${disabledCursor}; - } - :host([disabled]) { - opacity: ${disabledOpacity}; - } - :host([disabled]) .control { - border-color: ${dropdownBorder}; - } -`;class TextField extends TextField$1{connectedCallback(){super.connectedCallback(),this.textContent?this.setAttribute("aria-label",this.textContent):this.setAttribute("aria-label","Text field")}}const vsCodeTextField=TextField.compose({baseName:"text-field",template:textFieldTemplate,styles:textFieldStyles,shadowOptions:{delegatesFocus:!0}}),{wrap:wrap$1}=provideReactWrapper(React,provideVSCodeDesignSystem());wrap$1(vsCodeBadge(),{name:"vscode-badge"}),wrap$1(vsCodeButton(),{name:"vscode-button"}),wrap$1(vsCodeCheckbox(),{name:"vscode-checkbox",events:{onChange:"change"}}),wrap$1(vsCodeDataGrid(),{name:"vscode-data-grid"}),wrap$1(vsCodeDataGridCell(),{name:"vscode-data-grid-cell"}),wrap$1(vsCodeDataGridRow(),{name:"vscode-data-grid-row"}),wrap$1(vsCodeDivider(),{name:"vscode-divider"}),wrap$1(vsCodeDropdown(),{name:"vscode-dropdown",events:{onChange:"change"}}),wrap$1(vsCodeLink(),{name:"vscode-link"}),wrap$1(vsCodeOption(),{name:"vscode-option"}),wrap$1(vsCodePanels(),{name:"vscode-panels",events:{onChange:"change"}}),wrap$1(vsCodePanelTab(),{name:"vscode-panel-tab"}),wrap$1(vsCodePanelView(),{name:"vscode-panel-view"});const VSCodeProgressRing=wrap$1(vsCodeProgressRing(),{name:"vscode-progress-ring"});wrap$1(vsCodeRadio(),{name:"vscode-radio",events:{onChange:"change"}}),wrap$1(vsCodeRadioGroup(),{name:"vscode-radio-group",events:{onChange:"change"}}),wrap$1(vsCodeTag(),{name:"vscode-tag"}),wrap$1(vsCodeTextArea(),{name:"vscode-text-area",events:{onChange:"change",onInput:"input"}}),wrap$1(vsCodeTextField(),{name:"vscode-text-field",events:{onChange:"change",onInput:"input"}});const Loading=({isFullPage:S=!1,style:C={}})=>{const R=S?{...C,height:"100vh",width:"100%"}:{...C};return jsxRuntimeExports.jsx(Stack$1,{horizontalAlign:"center",verticalAlign:"center",verticalFill:!0,style:R,children:jsxRuntimeExports.jsx(VSCodeProgressRing,{})})};memoizeFunction((S,C)=>mergeStyleSets({root:mergeStyles$1({display:"flex",flexDirection:"row",alignItems:"center",height:"30px",background:"var(--background)",width:"100%",...C&&{position:"fixed",top:0,zIndex:100}},S),buttonGroup:{display:"flex",flexDirection:"row",height:"30px"},searchField:{marginRight:"100px",selectors:{"div.root":{height:"30px"}}}}));var toggleSelection=function(){var S=document.getSelection();if(!S.rangeCount)return function(){};for(var C=document.activeElement,R=[],O=0;O"u"){R&&console.warn("unable to use e.clipboardData"),R&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var K=clipboardToIE11Formatting[C.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(K,S)}else V.clipboardData.clearData(),V.clipboardData.setData(C.format,S);C.onCopy&&(V.preventDefault(),C.onCopy(V.clipboardData))}),document.body.appendChild(B),N.selectNodeContents(B),L.addRange(N);var F=document.execCommand("copy");if(!F)throw new Error("copy command was unsuccessful");j=!0}catch(V){R&&console.error("unable to copy using execCommand: ",V),R&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(C.format||"text",S),C.onCopy&&C.onCopy(window.clipboardData),j=!0}catch(K){R&&console.error("unable to copy using clipboardData: ",K),R&&console.error("falling back to prompt"),O=format$2("message"in C?C.message:defaultMessage),window.prompt(O,S)}}finally{L&&(typeof L.removeRange=="function"?L.removeRange(N):L.removeAllRanges()),B&&document.body.removeChild(B),I()}return j}var copyToClipboard=copy$3;const copy$4=getDefaultExportFromCjs(copyToClipboard);var main={exports:{}};(function(S,C){(function(R,O){S.exports=O(requireReact())})(commonjsGlobal,function(R){return function(O){var I={};function N(L){if(I[L])return I[L].exports;var B=I[L]={i:L,l:!1,exports:{}};return O[L].call(B.exports,B,B.exports,N),B.l=!0,B.exports}return N.m=O,N.c=I,N.d=function(L,B,j){N.o(L,B)||Object.defineProperty(L,B,{enumerable:!0,get:j})},N.r=function(L){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(L,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(L,"__esModule",{value:!0})},N.t=function(L,B){if(1&B&&(L=N(L)),8&B||4&B&&typeof L=="object"&&L&&L.__esModule)return L;var j=Object.create(null);if(N.r(j),Object.defineProperty(j,"default",{enumerable:!0,value:L}),2&B&&typeof L!="string")for(var F in L)N.d(j,F,(function(V){return L[V]}).bind(null,F));return j},N.n=function(L){var B=L&&L.__esModule?function(){return L.default}:function(){return L};return N.d(B,"a",B),B},N.o=function(L,B){return Object.prototype.hasOwnProperty.call(L,B)},N.p="",N(N.s=48)}([function(O,I){O.exports=R},function(O,I){var N=O.exports={version:"2.6.12"};typeof __e=="number"&&(__e=N)},function(O,I,N){var L=N(26)("wks"),B=N(17),j=N(3).Symbol,F=typeof j=="function";(O.exports=function(V){return L[V]||(L[V]=F&&j[V]||(F?j:B)("Symbol."+V))}).store=L},function(O,I){var N=O.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=N)},function(O,I,N){O.exports=!N(8)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(O,I){var N={}.hasOwnProperty;O.exports=function(L,B){return N.call(L,B)}},function(O,I,N){var L=N(7),B=N(16);O.exports=N(4)?function(j,F,V){return L.f(j,F,B(1,V))}:function(j,F,V){return j[F]=V,j}},function(O,I,N){var L=N(10),B=N(35),j=N(23),F=Object.defineProperty;I.f=N(4)?Object.defineProperty:function(V,K,W){if(L(V),K=j(K,!0),L(W),B)try{return F(V,K,W)}catch{}if("get"in W||"set"in W)throw TypeError("Accessors not supported!");return"value"in W&&(V[K]=W.value),V}},function(O,I){O.exports=function(N){try{return!!N()}catch{return!0}}},function(O,I,N){var L=N(40),B=N(22);O.exports=function(j){return L(B(j))}},function(O,I,N){var L=N(11);O.exports=function(B){if(!L(B))throw TypeError(B+" is not an object!");return B}},function(O,I){O.exports=function(N){return typeof N=="object"?N!==null:typeof N=="function"}},function(O,I){O.exports={}},function(O,I,N){var L=N(39),B=N(27);O.exports=Object.keys||function(j){return L(j,B)}},function(O,I){O.exports=!0},function(O,I,N){var L=N(3),B=N(1),j=N(53),F=N(6),V=N(5),K=function(W,X,J){var oe,pe,me,xe=W&K.F,Ae=W&K.G,ge=W&K.S,Te=W&K.P,we=W&K.B,ke=W&K.W,Be=Ae?B:B[X]||(B[X]={}),Ie=Be.prototype,je=Ae?L:ge?L[X]:(L[X]||{}).prototype;for(oe in Ae&&(J=X),J)(pe=!xe&&je&&je[oe]!==void 0)&&V(Be,oe)||(me=pe?je[oe]:J[oe],Be[oe]=Ae&&typeof je[oe]!="function"?J[oe]:we&&pe?j(me,L):ke&&je[oe]==me?function(Ke){var Je=function(Xe,ot,tt){if(this instanceof Ke){switch(arguments.length){case 0:return new Ke;case 1:return new Ke(Xe);case 2:return new Ke(Xe,ot)}return new Ke(Xe,ot,tt)}return Ke.apply(this,arguments)};return Je.prototype=Ke.prototype,Je}(me):Te&&typeof me=="function"?j(Function.call,me):me,Te&&((Be.virtual||(Be.virtual={}))[oe]=me,W&K.R&&Ie&&!Ie[oe]&&F(Ie,oe,me)))};K.F=1,K.G=2,K.S=4,K.P=8,K.B=16,K.W=32,K.U=64,K.R=128,O.exports=K},function(O,I){O.exports=function(N,L){return{enumerable:!(1&N),configurable:!(2&N),writable:!(4&N),value:L}}},function(O,I){var N=0,L=Math.random();O.exports=function(B){return"Symbol(".concat(B===void 0?"":B,")_",(++N+L).toString(36))}},function(O,I,N){var L=N(22);O.exports=function(B){return Object(L(B))}},function(O,I){I.f={}.propertyIsEnumerable},function(O,I,N){var L=N(52)(!0);N(34)(String,"String",function(B){this._t=String(B),this._i=0},function(){var B,j=this._t,F=this._i;return F>=j.length?{value:void 0,done:!0}:(B=L(j,F),this._i+=B.length,{value:B,done:!1})})},function(O,I){var N=Math.ceil,L=Math.floor;O.exports=function(B){return isNaN(B=+B)?0:(B>0?L:N)(B)}},function(O,I){O.exports=function(N){if(N==null)throw TypeError("Can't call method on "+N);return N}},function(O,I,N){var L=N(11);O.exports=function(B,j){if(!L(B))return B;var F,V;if(j&&typeof(F=B.toString)=="function"&&!L(V=F.call(B))||typeof(F=B.valueOf)=="function"&&!L(V=F.call(B))||!j&&typeof(F=B.toString)=="function"&&!L(V=F.call(B)))return V;throw TypeError("Can't convert object to primitive value")}},function(O,I){var N={}.toString;O.exports=function(L){return N.call(L).slice(8,-1)}},function(O,I,N){var L=N(26)("keys"),B=N(17);O.exports=function(j){return L[j]||(L[j]=B(j))}},function(O,I,N){var L=N(1),B=N(3),j=B["__core-js_shared__"]||(B["__core-js_shared__"]={});(O.exports=function(F,V){return j[F]||(j[F]=V!==void 0?V:{})})("versions",[]).push({version:L.version,mode:N(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(O,I){O.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(O,I,N){var L=N(7).f,B=N(5),j=N(2)("toStringTag");O.exports=function(F,V,K){F&&!B(F=K?F:F.prototype,j)&&L(F,j,{configurable:!0,value:V})}},function(O,I,N){N(62);for(var L=N(3),B=N(6),j=N(12),F=N(2)("toStringTag"),V="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),K=0;Kdocument.F=Object<\/script>"),W.close(),K=W.F;J--;)delete K.prototype[j[J]];return K()};O.exports=Object.create||function(W,X){var J;return W!==null?(V.prototype=L(W),J=new V,V.prototype=null,J[F]=W):J=K(),X===void 0?J:B(J,X)}},function(O,I,N){var L=N(5),B=N(9),j=N(57)(!1),F=N(25)("IE_PROTO");O.exports=function(V,K){var W,X=B(V),J=0,oe=[];for(W in X)W!=F&&L(X,W)&&oe.push(W);for(;K.length>J;)L(X,W=K[J++])&&(~j(oe,W)||oe.push(W));return oe}},function(O,I,N){var L=N(24);O.exports=Object("z").propertyIsEnumerable(0)?Object:function(B){return L(B)=="String"?B.split(""):Object(B)}},function(O,I,N){var L=N(39),B=N(27).concat("length","prototype");I.f=Object.getOwnPropertyNames||function(j){return L(j,B)}},function(O,I,N){var L=N(24),B=N(2)("toStringTag"),j=L(function(){return arguments}())=="Arguments";O.exports=function(F){var V,K,W;return F===void 0?"Undefined":F===null?"Null":typeof(K=function(X,J){try{return X[J]}catch{}}(V=Object(F),B))=="string"?K:j?L(V):(W=L(V))=="Object"&&typeof V.callee=="function"?"Arguments":W}},function(O,I){var N;N=function(){return this}();try{N=N||new Function("return this")()}catch{typeof window=="object"&&(N=window)}O.exports=N},function(O,I){var N=/-?\d+(\.\d+)?%?/g;O.exports=function(L){return L.match(N)}},function(O,I,N){Object.defineProperty(I,"__esModule",{value:!0}),I.getBase16Theme=I.createStyling=I.invertTheme=void 0;var L=pe(N(49)),B=pe(N(76)),j=pe(N(81)),F=pe(N(89)),V=pe(N(93)),K=function(Ie){if(Ie&&Ie.__esModule)return Ie;var je={};if(Ie!=null)for(var Ke in Ie)Object.prototype.hasOwnProperty.call(Ie,Ke)&&(je[Ke]=Ie[Ke]);return je.default=Ie,je}(N(94)),W=pe(N(132)),X=pe(N(133)),J=pe(N(138)),oe=N(139);function pe(Ie){return Ie&&Ie.__esModule?Ie:{default:Ie}}var me=K.default,xe=(0,F.default)(me),Ae=(0,J.default)(X.default,oe.rgb2yuv,function(Ie){var je,Ke=(0,j.default)(Ie,3),Je=Ke[0],Xe=Ke[1],ot=Ke[2];return[(je=Je,je<.25?1:je<.5?.9-je:1.1-je),Xe,ot]},oe.yuv2rgb,W.default),ge=function(Ie){return function(je){return{className:[je.className,Ie.className].filter(Boolean).join(" "),style:(0,B.default)({},je.style||{},Ie.style||{})}}},Te=function(Ie,je){var Ke=(0,F.default)(je);for(var Je in Ie)Ke.indexOf(Je)===-1&&Ke.push(Je);return Ke.reduce(function(Xe,ot){return Xe[ot]=function(tt,Ue){if(tt===void 0)return Ue;if(Ue===void 0)return tt;var et=tt===void 0?"undefined":(0,L.default)(tt),dt=Ue===void 0?"undefined":(0,L.default)(Ue);switch(et){case"string":switch(dt){case"string":return[Ue,tt].filter(Boolean).join(" ");case"object":return ge({className:tt,style:Ue});case"function":return function(gt){for(var Qe=arguments.length,lt=Array(Qe>1?Qe-1:0),ht=1;ht1?Qe-1:0),ht=1;ht1?Qe-1:0),ht=1;ht1?Qe-1:0),ht=1;ht1?Qe-1:0),ht=1;ht2?Ke-2:0),Xe=2;Xe3?je-3:0),Je=3;Je1&&arguments[1]!==void 0?arguments[1]:{},ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},tt=Xe.defaultBase16,Ue=tt===void 0?me:tt,et=Xe.base16Themes,dt=et===void 0?null:et,gt=Be(ot,dt);gt&&(ot=(0,B.default)({},gt,ot));var Qe=xe.reduce(function($t,Lt){return $t[Lt]=ot[Lt]||Ue[Lt],$t},{}),lt=(0,F.default)(ot).reduce(function($t,Lt){return xe.indexOf(Lt)===-1&&($t[Lt]=ot[Lt]),$t},{}),ht=Ie(Qe),Ct=Te(lt,ht);return(0,V.default)(we,2).apply(void 0,[Ct].concat(Ke))},3),I.getBase16Theme=function(Ie,je){if(Ie&&Ie.extend&&(Ie=Ie.extend),typeof Ie=="string"){var Ke=Ie.split(":"),Je=(0,j.default)(Ke,2),Xe=Je[0],ot=Je[1];Ie=(je||{})[Xe]||K[Xe],ot==="inverted"&&(Ie=ke(Ie))}return Ie&&Ie.hasOwnProperty("base00")?Ie:void 0})},function(O,I,N){var L,B=typeof Reflect=="object"?Reflect:null,j=B&&typeof B.apply=="function"?B.apply:function(ge,Te,we){return Function.prototype.apply.call(ge,Te,we)};L=B&&typeof B.ownKeys=="function"?B.ownKeys:Object.getOwnPropertySymbols?function(ge){return Object.getOwnPropertyNames(ge).concat(Object.getOwnPropertySymbols(ge))}:function(ge){return Object.getOwnPropertyNames(ge)};var F=Number.isNaN||function(ge){return ge!=ge};function V(){V.init.call(this)}O.exports=V,O.exports.once=function(ge,Te){return new Promise(function(we,ke){function Be(){Ie!==void 0&&ge.removeListener("error",Ie),we([].slice.call(arguments))}var Ie;Te!=="error"&&(Ie=function(je){ge.removeListener(Te,Be),ke(je)},ge.once("error",Ie)),ge.once(Te,Be)})},V.EventEmitter=V,V.prototype._events=void 0,V.prototype._eventsCount=0,V.prototype._maxListeners=void 0;var K=10;function W(ge){if(typeof ge!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ge)}function X(ge){return ge._maxListeners===void 0?V.defaultMaxListeners:ge._maxListeners}function J(ge,Te,we,ke){var Be,Ie,je,Ke;if(W(we),(Ie=ge._events)===void 0?(Ie=ge._events=Object.create(null),ge._eventsCount=0):(Ie.newListener!==void 0&&(ge.emit("newListener",Te,we.listener?we.listener:we),Ie=ge._events),je=Ie[Te]),je===void 0)je=Ie[Te]=we,++ge._eventsCount;else if(typeof je=="function"?je=Ie[Te]=ke?[we,je]:[je,we]:ke?je.unshift(we):je.push(we),(Be=X(ge))>0&&je.length>Be&&!je.warned){je.warned=!0;var Je=new Error("Possible EventEmitter memory leak detected. "+je.length+" "+String(Te)+" listeners added. Use emitter.setMaxListeners() to increase limit");Je.name="MaxListenersExceededWarning",Je.emitter=ge,Je.type=Te,Je.count=je.length,Ke=Je,console&&console.warn&&console.warn(Ke)}return ge}function oe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function pe(ge,Te,we){var ke={fired:!1,wrapFn:void 0,target:ge,type:Te,listener:we},Be=oe.bind(ke);return Be.listener=we,ke.wrapFn=Be,Be}function me(ge,Te,we){var ke=ge._events;if(ke===void 0)return[];var Be=ke[Te];return Be===void 0?[]:typeof Be=="function"?we?[Be.listener||Be]:[Be]:we?function(Ie){for(var je=new Array(Ie.length),Ke=0;Ke0&&(Ie=Te[0]),Ie instanceof Error)throw Ie;var je=new Error("Unhandled error."+(Ie?" ("+Ie.message+")":""));throw je.context=Ie,je}var Ke=Be[ge];if(Ke===void 0)return!1;if(typeof Ke=="function")j(Ke,this,Te);else{var Je=Ke.length,Xe=Ae(Ke,Je);for(we=0;we=0;Ie--)if(we[Ie]===Te||we[Ie].listener===Te){je=we[Ie].listener,Be=Ie;break}if(Be<0)return this;Be===0?we.shift():function(Ke,Je){for(;Je+1=0;ke--)this.removeListener(ge,Te[ke]);return this},V.prototype.listeners=function(ge){return me(this,ge,!0)},V.prototype.rawListeners=function(ge){return me(this,ge,!1)},V.listenerCount=function(ge,Te){return typeof ge.listenerCount=="function"?ge.listenerCount(Te):xe.call(ge,Te)},V.prototype.listenerCount=xe,V.prototype.eventNames=function(){return this._eventsCount>0?L(this._events):[]}},function(O,I,N){O.exports.Dispatcher=N(140)},function(O,I,N){O.exports=N(142)},function(O,I,N){I.__esModule=!0;var L=F(N(50)),B=F(N(65)),j=typeof B.default=="function"&&typeof L.default=="symbol"?function(V){return typeof V}:function(V){return V&&typeof B.default=="function"&&V.constructor===B.default&&V!==B.default.prototype?"symbol":typeof V};function F(V){return V&&V.__esModule?V:{default:V}}I.default=typeof B.default=="function"&&j(L.default)==="symbol"?function(V){return V===void 0?"undefined":j(V)}:function(V){return V&&typeof B.default=="function"&&V.constructor===B.default&&V!==B.default.prototype?"symbol":V===void 0?"undefined":j(V)}},function(O,I,N){O.exports={default:N(51),__esModule:!0}},function(O,I,N){N(20),N(29),O.exports=N(30).f("iterator")},function(O,I,N){var L=N(21),B=N(22);O.exports=function(j){return function(F,V){var K,W,X=String(B(F)),J=L(V),oe=X.length;return J<0||J>=oe?j?"":void 0:(K=X.charCodeAt(J))<55296||K>56319||J+1===oe||(W=X.charCodeAt(J+1))<56320||W>57343?j?X.charAt(J):K:j?X.slice(J,J+2):W-56320+(K-55296<<10)+65536}}},function(O,I,N){var L=N(54);O.exports=function(B,j,F){if(L(B),j===void 0)return B;switch(F){case 1:return function(V){return B.call(j,V)};case 2:return function(V,K){return B.call(j,V,K)};case 3:return function(V,K,W){return B.call(j,V,K,W)}}return function(){return B.apply(j,arguments)}}},function(O,I){O.exports=function(N){if(typeof N!="function")throw TypeError(N+" is not a function!");return N}},function(O,I,N){var L=N(38),B=N(16),j=N(28),F={};N(6)(F,N(2)("iterator"),function(){return this}),O.exports=function(V,K,W){V.prototype=L(F,{next:B(1,W)}),j(V,K+" Iterator")}},function(O,I,N){var L=N(7),B=N(10),j=N(13);O.exports=N(4)?Object.defineProperties:function(F,V){B(F);for(var K,W=j(V),X=W.length,J=0;X>J;)L.f(F,K=W[J++],V[K]);return F}},function(O,I,N){var L=N(9),B=N(58),j=N(59);O.exports=function(F){return function(V,K,W){var X,J=L(V),oe=B(J.length),pe=j(W,oe);if(F&&K!=K){for(;oe>pe;)if((X=J[pe++])!=X)return!0}else for(;oe>pe;pe++)if((F||pe in J)&&J[pe]===K)return F||pe||0;return!F&&-1}}},function(O,I,N){var L=N(21),B=Math.min;O.exports=function(j){return j>0?B(L(j),9007199254740991):0}},function(O,I,N){var L=N(21),B=Math.max,j=Math.min;O.exports=function(F,V){return(F=L(F))<0?B(F+V,0):j(F,V)}},function(O,I,N){var L=N(3).document;O.exports=L&&L.documentElement},function(O,I,N){var L=N(5),B=N(18),j=N(25)("IE_PROTO"),F=Object.prototype;O.exports=Object.getPrototypeOf||function(V){return V=B(V),L(V,j)?V[j]:typeof V.constructor=="function"&&V instanceof V.constructor?V.constructor.prototype:V instanceof Object?F:null}},function(O,I,N){var L=N(63),B=N(64),j=N(12),F=N(9);O.exports=N(34)(Array,"Array",function(V,K){this._t=F(V),this._i=0,this._k=K},function(){var V=this._t,K=this._k,W=this._i++;return!V||W>=V.length?(this._t=void 0,B(1)):B(0,K=="keys"?W:K=="values"?V[W]:[W,V[W]])},"values"),j.Arguments=j.Array,L("keys"),L("values"),L("entries")},function(O,I){O.exports=function(){}},function(O,I){O.exports=function(N,L){return{value:L,done:!!N}}},function(O,I,N){O.exports={default:N(66),__esModule:!0}},function(O,I,N){N(67),N(73),N(74),N(75),O.exports=N(1).Symbol},function(O,I,N){var L=N(3),B=N(5),j=N(4),F=N(15),V=N(37),K=N(68).KEY,W=N(8),X=N(26),J=N(28),oe=N(17),pe=N(2),me=N(30),xe=N(31),Ae=N(69),ge=N(70),Te=N(10),we=N(11),ke=N(18),Be=N(9),Ie=N(23),je=N(16),Ke=N(38),Je=N(71),Xe=N(72),ot=N(32),tt=N(7),Ue=N(13),et=Xe.f,dt=tt.f,gt=Je.f,Qe=L.Symbol,lt=L.JSON,ht=lt&<.stringify,Ct=pe("_hidden"),$t=pe("toPrimitive"),Lt={}.propertyIsEnumerable,Gt=X("symbol-registry"),Pt=X("symbols"),Vt=X("op-symbols"),bt=Object.prototype,It=typeof Qe=="function"&&!!ot.f,Ht=L.QObject,kt=!Ht||!Ht.prototype||!Ht.prototype.findChild,Kt=j&&W(function(){return Ke(dt({},"a",{get:function(){return dt(this,"a",{value:7}).a}})).a!=7})?function(Ut,nr,Ir){var jr=et(bt,nr);jr&&delete bt[nr],dt(Ut,nr,Ir),jr&&Ut!==bt&&dt(bt,nr,jr)}:dt,tr=function(Ut){var nr=Pt[Ut]=Ke(Qe.prototype);return nr._k=Ut,nr},wr=It&&typeof Qe.iterator=="symbol"?function(Ut){return typeof Ut=="symbol"}:function(Ut){return Ut instanceof Qe},xr=function(Ut,nr,Ir){return Ut===bt&&xr(Vt,nr,Ir),Te(Ut),nr=Ie(nr,!0),Te(Ir),B(Pt,nr)?(Ir.enumerable?(B(Ut,Ct)&&Ut[Ct][nr]&&(Ut[Ct][nr]=!1),Ir=Ke(Ir,{enumerable:je(0,!1)})):(B(Ut,Ct)||dt(Ut,Ct,je(1,{})),Ut[Ct][nr]=!0),Kt(Ut,nr,Ir)):dt(Ut,nr,Ir)},Vr=function(Ut,nr){Te(Ut);for(var Ir,jr=Ae(nr=Be(nr)),Rr=0,fr=jr.length;fr>Rr;)xr(Ut,Ir=jr[Rr++],nr[Ir]);return Ut},bn=function(Ut){var nr=Lt.call(this,Ut=Ie(Ut,!0));return!(this===bt&&B(Pt,Ut)&&!B(Vt,Ut))&&(!(nr||!B(this,Ut)||!B(Pt,Ut)||B(this,Ct)&&this[Ct][Ut])||nr)},Bn=function(Ut,nr){if(Ut=Be(Ut),nr=Ie(nr,!0),Ut!==bt||!B(Pt,nr)||B(Vt,nr)){var Ir=et(Ut,nr);return!Ir||!B(Pt,nr)||B(Ut,Ct)&&Ut[Ct][nr]||(Ir.enumerable=!0),Ir}},An=function(Ut){for(var nr,Ir=gt(Be(Ut)),jr=[],Rr=0;Ir.length>Rr;)B(Pt,nr=Ir[Rr++])||nr==Ct||nr==K||jr.push(nr);return jr},Tn=function(Ut){for(var nr,Ir=Ut===bt,jr=gt(Ir?Vt:Be(Ut)),Rr=[],fr=0;jr.length>fr;)!B(Pt,nr=jr[fr++])||Ir&&!B(bt,nr)||Rr.push(Pt[nr]);return Rr};It||(V((Qe=function(){if(this instanceof Qe)throw TypeError("Symbol is not a constructor!");var Ut=oe(arguments.length>0?arguments[0]:void 0),nr=function(Ir){this===bt&&nr.call(Vt,Ir),B(this,Ct)&&B(this[Ct],Ut)&&(this[Ct][Ut]=!1),Kt(this,Ut,je(1,Ir))};return j&&kt&&Kt(bt,Ut,{configurable:!0,set:nr}),tr(Ut)}).prototype,"toString",function(){return this._k}),Xe.f=Bn,tt.f=xr,N(41).f=Je.f=An,N(19).f=bn,ot.f=Tn,j&&!N(14)&&V(bt,"propertyIsEnumerable",bn,!0),me.f=function(Ut){return tr(pe(Ut))}),F(F.G+F.W+F.F*!It,{Symbol:Qe});for(var pn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Mn=0;pn.length>Mn;)pe(pn[Mn++]);for(var bo=Ue(pe.store),mr=0;bo.length>mr;)xe(bo[mr++]);F(F.S+F.F*!It,"Symbol",{for:function(Ut){return B(Gt,Ut+="")?Gt[Ut]:Gt[Ut]=Qe(Ut)},keyFor:function(Ut){if(!wr(Ut))throw TypeError(Ut+" is not a symbol!");for(var nr in Gt)if(Gt[nr]===Ut)return nr},useSetter:function(){kt=!0},useSimple:function(){kt=!1}}),F(F.S+F.F*!It,"Object",{create:function(Ut,nr){return nr===void 0?Ke(Ut):Vr(Ke(Ut),nr)},defineProperty:xr,defineProperties:Vr,getOwnPropertyDescriptor:Bn,getOwnPropertyNames:An,getOwnPropertySymbols:Tn});var sr=W(function(){ot.f(1)});F(F.S+F.F*sr,"Object",{getOwnPropertySymbols:function(Ut){return ot.f(ke(Ut))}}),lt&&F(F.S+F.F*(!It||W(function(){var Ut=Qe();return ht([Ut])!="[null]"||ht({a:Ut})!="{}"||ht(Object(Ut))!="{}"})),"JSON",{stringify:function(Ut){for(var nr,Ir,jr=[Ut],Rr=1;arguments.length>Rr;)jr.push(arguments[Rr++]);if(Ir=nr=jr[1],(we(nr)||Ut!==void 0)&&!wr(Ut))return ge(nr)||(nr=function(fr,Or){if(typeof Ir=="function"&&(Or=Ir.call(this,fr,Or)),!wr(Or))return Or}),jr[1]=nr,ht.apply(lt,jr)}}),Qe.prototype[$t]||N(6)(Qe.prototype,$t,Qe.prototype.valueOf),J(Qe,"Symbol"),J(Math,"Math",!0),J(L.JSON,"JSON",!0)},function(O,I,N){var L=N(17)("meta"),B=N(11),j=N(5),F=N(7).f,V=0,K=Object.isExtensible||function(){return!0},W=!N(8)(function(){return K(Object.preventExtensions({}))}),X=function(oe){F(oe,L,{value:{i:"O"+ ++V,w:{}}})},J=O.exports={KEY:L,NEED:!1,fastKey:function(oe,pe){if(!B(oe))return typeof oe=="symbol"?oe:(typeof oe=="string"?"S":"P")+oe;if(!j(oe,L)){if(!K(oe))return"F";if(!pe)return"E";X(oe)}return oe[L].i},getWeak:function(oe,pe){if(!j(oe,L)){if(!K(oe))return!0;if(!pe)return!1;X(oe)}return oe[L].w},onFreeze:function(oe){return W&&J.NEED&&K(oe)&&!j(oe,L)&&X(oe),oe}}},function(O,I,N){var L=N(13),B=N(32),j=N(19);O.exports=function(F){var V=L(F),K=B.f;if(K)for(var W,X=K(F),J=j.f,oe=0;X.length>oe;)J.call(F,W=X[oe++])&&V.push(W);return V}},function(O,I,N){var L=N(24);O.exports=Array.isArray||function(B){return L(B)=="Array"}},function(O,I,N){var L=N(9),B=N(41).f,j={}.toString,F=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];O.exports.f=function(V){return F&&j.call(V)=="[object Window]"?function(K){try{return B(K)}catch{return F.slice()}}(V):B(L(V))}},function(O,I,N){var L=N(19),B=N(16),j=N(9),F=N(23),V=N(5),K=N(35),W=Object.getOwnPropertyDescriptor;I.f=N(4)?W:function(X,J){if(X=j(X),J=F(J,!0),K)try{return W(X,J)}catch{}if(V(X,J))return B(!L.f.call(X,J),X[J])}},function(O,I){},function(O,I,N){N(31)("asyncIterator")},function(O,I,N){N(31)("observable")},function(O,I,N){I.__esModule=!0;var L,B=N(77),j=(L=B)&&L.__esModule?L:{default:L};I.default=j.default||function(F){for(var V=1;Vme;)for(var ge,Te=K(arguments[me++]),we=xe?B(Te).concat(xe(Te)):B(Te),ke=we.length,Be=0;ke>Be;)ge=we[Be++],L&&!Ae.call(Te,ge)||(oe[ge]=Te[ge]);return oe}:W},function(O,I,N){I.__esModule=!0;var L=j(N(82)),B=j(N(85));function j(F){return F&&F.__esModule?F:{default:F}}I.default=function(F,V){if(Array.isArray(F))return F;if((0,L.default)(Object(F)))return function(K,W){var X=[],J=!0,oe=!1,pe=void 0;try{for(var me,xe=(0,B.default)(K);!(J=(me=xe.next()).done)&&(X.push(me.value),!W||X.length!==W);J=!0);}catch(Ae){oe=!0,pe=Ae}finally{try{!J&&xe.return&&xe.return()}finally{if(oe)throw pe}}return X}(F,V);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(O,I,N){O.exports={default:N(83),__esModule:!0}},function(O,I,N){N(29),N(20),O.exports=N(84)},function(O,I,N){var L=N(42),B=N(2)("iterator"),j=N(12);O.exports=N(1).isIterable=function(F){var V=Object(F);return V[B]!==void 0||"@@iterator"in V||j.hasOwnProperty(L(V))}},function(O,I,N){O.exports={default:N(86),__esModule:!0}},function(O,I,N){N(29),N(20),O.exports=N(87)},function(O,I,N){var L=N(10),B=N(88);O.exports=N(1).getIterator=function(j){var F=B(j);if(typeof F!="function")throw TypeError(j+" is not iterable!");return L(F.call(j))}},function(O,I,N){var L=N(42),B=N(2)("iterator"),j=N(12);O.exports=N(1).getIteratorMethod=function(F){if(F!=null)return F[B]||F["@@iterator"]||j[L(F)]}},function(O,I,N){O.exports={default:N(90),__esModule:!0}},function(O,I,N){N(91),O.exports=N(1).Object.keys},function(O,I,N){var L=N(18),B=N(13);N(92)("keys",function(){return function(j){return B(L(j))}})},function(O,I,N){var L=N(15),B=N(1),j=N(8);O.exports=function(F,V){var K=(B.Object||{})[F]||Object[F],W={};W[F]=V(K),L(L.S+L.F*j(function(){K(1)}),"Object",W)}},function(O,I,N){(function(L){var B=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],j=/^\s+|\s+$/g,F=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,V=/\{\n\/\* \[wrapped with (.+)\] \*/,K=/,? & /,W=/^[-+]0x[0-9a-f]+$/i,X=/^0b[01]+$/i,J=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,pe=/^(?:0|[1-9]\d*)$/,me=parseInt,xe=typeof L=="object"&&L&&L.Object===Object&&L,Ae=typeof self=="object"&&self&&self.Object===Object&&self,ge=xe||Ae||Function("return this")();function Te(mr,sr,Ut){switch(Ut.length){case 0:return mr.call(sr);case 1:return mr.call(sr,Ut[0]);case 2:return mr.call(sr,Ut[0],Ut[1]);case 3:return mr.call(sr,Ut[0],Ut[1],Ut[2])}return mr.apply(sr,Ut)}function we(mr,sr){return!!(mr&&mr.length)&&function(Ut,nr,Ir){if(nr!=nr)return function(fr,Or,Jr,nn){for(var hn=fr.length,Gn=Jr+(nn?1:-1);nn?Gn--:++Gn-1}function ke(mr){return mr!=mr}function Be(mr,sr){for(var Ut=mr.length,nr=0;Ut--;)mr[Ut]===sr&&nr++;return nr}function Ie(mr,sr){for(var Ut=-1,nr=mr.length,Ir=0,jr=[];++Ut2?Ke:void 0);function Lt(mr){return pn(mr)?lt(mr):{}}function Gt(mr){return!(!pn(mr)||function(sr){return!!Ue&&Ue in sr}(mr))&&(function(sr){var Ut=pn(sr)?gt.call(sr):"";return Ut=="[object Function]"||Ut=="[object GeneratorFunction]"}(mr)||function(sr){var Ut=!1;if(sr!=null&&typeof sr.toString!="function")try{Ut=!!(sr+"")}catch{}return Ut}(mr)?Qe:J).test(function(sr){if(sr!=null){try{return et.call(sr)}catch{}try{return sr+""}catch{}}return""}(mr))}function Pt(mr,sr,Ut,nr){for(var Ir=-1,jr=mr.length,Rr=Ut.length,fr=-1,Or=sr.length,Jr=ht(jr-Rr,0),nn=Array(Or+Jr),hn=!nr;++fr1&&xn.reverse(),nn&&Or1?"& ":"")+sr[nr],sr=sr.join(Ut>2?", ":" "),mr.replace(F,`{ -/* [wrapped with `+sr+`] */ -`)}function Vr(mr,sr){return!!(sr=sr??9007199254740991)&&(typeof mr=="number"||pe.test(mr))&&mr>-1&&mr%1==0&&mr1&&j--,V=6*j<1?L+6*(B-L)*j:2*j<1?B:3*j<2?L+(B-L)*(2/3-j)*6:L,F[J]=255*V;return F}},function(O,I,N){(function(L){var B=typeof L=="object"&&L&&L.Object===Object&&L,j=typeof self=="object"&&self&&self.Object===Object&&self,F=B||j||Function("return this")();function V(Ie,je,Ke){switch(Ke.length){case 0:return Ie.call(je);case 1:return Ie.call(je,Ke[0]);case 2:return Ie.call(je,Ke[0],Ke[1]);case 3:return Ie.call(je,Ke[0],Ke[1],Ke[2])}return Ie.apply(je,Ke)}function K(Ie,je){for(var Ke=-1,Je=je.length,Xe=Ie.length;++Ke-1&&Xe%1==0&&Xe<=9007199254740991}(Je.length)&&!function(Xe){var ot=function(tt){var Ue=typeof tt;return!!tt&&(Ue=="object"||Ue=="function")}(Xe)?J.call(Xe):"";return ot=="[object Function]"||ot=="[object GeneratorFunction]"}(Je)}(Ke)}(je)&&X.call(je,"callee")&&(!pe.call(je,"callee")||J.call(je)=="[object Arguments]")}(Ie)||!!(me&&Ie&&Ie[me])}var ge=Array.isArray,Te,we,ke,Be=(we=function(Ie){var je=(Ie=function Je(Xe,ot,tt,Ue,et){var dt=-1,gt=Xe.length;for(tt||(tt=Ae),et||(et=[]);++dt0&&tt(Qe)?ot>1?Je(Qe,ot-1,tt,Ue,et):K(et,Qe):Ue||(et[et.length]=Qe)}return et}(Ie,1)).length,Ke=je;for(Te;Ke--;)if(typeof Ie[Ke]!="function")throw new TypeError("Expected a function");return function(){for(var Je=0,Xe=je?Ie[Je].apply(this,arguments):arguments[0];++Je2?j-2:0),V=2;V"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var yt,Rt=J(St);if(wt){var Nt=J(this).constructor;yt=Reflect.construct(Rt,arguments,Nt)}else yt=Rt.apply(this,arguments);return me(this,yt)}}N.r(I);var Ae=N(0),ge=N.n(Ae);function Te(){var St=this.constructor.getDerivedStateFromProps(this.props,this.state);St!=null&&this.setState(St)}function we(St){this.setState((function(wt){var yt=this.constructor.getDerivedStateFromProps(St,wt);return yt??null}).bind(this))}function ke(St,wt){try{var yt=this.props,Rt=this.state;this.props=St,this.state=wt,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(yt,Rt)}finally{this.props=yt,this.state=Rt}}function Be(St){var wt=St.prototype;if(!wt||!wt.isReactComponent)throw new Error("Can only polyfill class components");if(typeof St.getDerivedStateFromProps!="function"&&typeof wt.getSnapshotBeforeUpdate!="function")return St;var yt=null,Rt=null,Nt=null;if(typeof wt.componentWillMount=="function"?yt="componentWillMount":typeof wt.UNSAFE_componentWillMount=="function"&&(yt="UNSAFE_componentWillMount"),typeof wt.componentWillReceiveProps=="function"?Rt="componentWillReceiveProps":typeof wt.UNSAFE_componentWillReceiveProps=="function"&&(Rt="UNSAFE_componentWillReceiveProps"),typeof wt.componentWillUpdate=="function"?Nt="componentWillUpdate":typeof wt.UNSAFE_componentWillUpdate=="function"&&(Nt="UNSAFE_componentWillUpdate"),yt!==null||Rt!==null||Nt!==null){var Yt=St.displayName||St.name,lr=typeof St.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. - -`+Yt+" uses "+lr+" but also contains the following legacy lifecycles:"+(yt!==null?` - `+yt:"")+(Rt!==null?` - `+Rt:"")+(Nt!==null?` - `+Nt:"")+` - -The above lifecycles should be removed. Learn more about this warning here: -https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof St.getDerivedStateFromProps=="function"&&(wt.componentWillMount=Te,wt.componentWillReceiveProps=we),typeof wt.getSnapshotBeforeUpdate=="function"){if(typeof wt.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");wt.componentWillUpdate=ke;var vr=wt.componentDidUpdate;wt.componentDidUpdate=function(Qt,Ar,un){var po=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:un;vr.call(this,Qt,Ar,po)}}return St}function Ie(St,wt){if(St==null)return{};var yt,Rt,Nt=function(lr,vr){if(lr==null)return{};var Qt,Ar,un={},po=Object.keys(lr);for(Ar=0;Ar=0||(un[Qt]=lr[Qt]);return un}(St,wt);if(Object.getOwnPropertySymbols){var Yt=Object.getOwnPropertySymbols(St);for(Rt=0;Rt=0||Object.prototype.propertyIsEnumerable.call(St,yt)&&(Nt[yt]=St[yt])}return Nt}function je(St){var wt=function(yt){return{}.toString.call(yt).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(St);return wt==="number"&&(wt=isNaN(St)?"nan":(0|St)!=St?"float":"integer"),wt}Te.__suppressDeprecationWarning=!0,we.__suppressDeprecationWarning=!0,ke.__suppressDeprecationWarning=!0;var Ke={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},Je={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"},Xe={white:"#fff",black:"#000",transparent:"rgba(1, 1, 1, 0)",globalFontFamily:"monospace",globalCursor:"default",indentBlockWidth:"5px",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyBorderRadius:"3px",keyColonWeight:"bold",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",keyValPaddingHover:"3px 5px 3px 4px",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedFontWeight:"bold",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px"},ot=N(45),tt=function(St){var wt=function(yt){return{backgroundColor:yt.base00,ellipsisColor:yt.base09,braceColor:yt.base07,expandedIcon:yt.base0D,collapsedIcon:yt.base0E,keyColor:yt.base07,arrayKeyColor:yt.base0C,objectSize:yt.base04,copyToClipboard:yt.base0F,copyToClipboardCheck:yt.base0D,objectBorder:yt.base02,dataTypes:{boolean:yt.base0E,date:yt.base0D,float:yt.base0B,function:yt.base0D,integer:yt.base0F,string:yt.base09,nan:yt.base08,null:yt.base0A,undefined:yt.base05,regexp:yt.base0A,background:yt.base02},editVariable:{editIcon:yt.base0E,cancelIcon:yt.base09,removeIcon:yt.base09,addIcon:yt.base0E,checkIcon:yt.base0E,background:yt.base01,color:yt.base0A,border:yt.base07},addKeyModal:{background:yt.base05,border:yt.base04,color:yt.base0A,labelColor:yt.base01},validationFailure:{background:yt.base09,iconColor:yt.base01,fontColor:yt.base01}}}(St);return{"app-container":{fontFamily:Xe.globalFontFamily,cursor:Xe.globalCursor,backgroundColor:wt.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:wt.ellipsisColor,fontSize:Xe.ellipsisFontSize,lineHeight:Xe.ellipsisLineHeight,cursor:Xe.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:Xe.braceCursor,fontWeight:Xe.braceFontWeight,color:wt.braceColor},"expanded-icon":{color:wt.expandedIcon},"collapsed-icon":{color:wt.collapsedIcon},colon:{display:"inline-block",margin:Xe.keyMargin,color:wt.keyColor,verticalAlign:"top"},objectKeyVal:function(yt,Rt){return{style:j({paddingTop:Xe.keyValPaddingTop,paddingRight:Xe.keyValPaddingRight,paddingBottom:Xe.keyValPaddingBottom,borderLeft:Xe.keyValBorderLeft+" "+wt.objectBorder,":hover":{paddingLeft:Rt.paddingLeft-1+"px",borderLeft:Xe.keyValBorderHover+" "+wt.objectBorder}},Rt)}},"object-key-val-no-border":{padding:Xe.keyValPadding},"pushed-content":{marginLeft:Xe.pushedContentMarginLeft},variableValue:function(yt,Rt){return{style:j({display:"inline-block",paddingRight:Xe.variableValuePaddingRight,position:"relative"},Rt)}},"object-name":{display:"inline-block",color:wt.keyColor,letterSpacing:Xe.keyLetterSpacing,fontStyle:Xe.keyFontStyle,verticalAlign:Xe.keyVerticalAlign,opacity:Xe.keyOpacity,":hover":{opacity:Xe.keyOpacityHover}},"array-key":{display:"inline-block",color:wt.arrayKeyColor,letterSpacing:Xe.keyLetterSpacing,fontStyle:Xe.keyFontStyle,verticalAlign:Xe.keyVerticalAlign,opacity:Xe.keyOpacity,":hover":{opacity:Xe.keyOpacityHover}},"object-size":{color:wt.objectSize,borderRadius:Xe.objectSizeBorderRadius,fontStyle:Xe.objectSizeFontStyle,margin:Xe.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:Xe.dataTypeFontSize,marginRight:Xe.dataTypeMarginRight,opacity:Xe.datatypeOpacity},boolean:{display:"inline-block",color:wt.dataTypes.boolean},date:{display:"inline-block",color:wt.dataTypes.date},"date-value":{marginLeft:Xe.dateValueMarginLeft},float:{display:"inline-block",color:wt.dataTypes.float},function:{display:"inline-block",color:wt.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:wt.dataTypes.integer},string:{display:"inline-block",color:wt.dataTypes.string},nan:{display:"inline-block",color:wt.dataTypes.nan,fontSize:Xe.nanFontSize,fontWeight:Xe.nanFontWeight,backgroundColor:wt.dataTypes.background,padding:Xe.nanPadding,borderRadius:Xe.nanBorderRadius},null:{display:"inline-block",color:wt.dataTypes.null,fontSize:Xe.nullFontSize,fontWeight:Xe.nullFontWeight,backgroundColor:wt.dataTypes.background,padding:Xe.nullPadding,borderRadius:Xe.nullBorderRadius},undefined:{display:"inline-block",color:wt.dataTypes.undefined,fontSize:Xe.undefinedFontSize,padding:Xe.undefinedPadding,borderRadius:Xe.undefinedBorderRadius,backgroundColor:wt.dataTypes.background},regexp:{display:"inline-block",color:wt.dataTypes.regexp},"copy-to-clipboard":{cursor:Xe.clipboardCursor},"copy-icon":{color:wt.copyToClipboard,fontSize:Xe.iconFontSize,marginRight:Xe.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:wt.copyToClipboardCheck,marginLeft:Xe.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:Xe.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:Xe.metaDataPadding},"icon-container":{display:"inline-block",width:Xe.iconContainerWidth},tooltip:{padding:Xe.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:wt.editVariable.removeIcon,cursor:Xe.iconCursor,fontSize:Xe.iconFontSize,marginRight:Xe.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:wt.editVariable.addIcon,cursor:Xe.iconCursor,fontSize:Xe.iconFontSize,marginRight:Xe.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:wt.editVariable.editIcon,cursor:Xe.iconCursor,fontSize:Xe.iconFontSize,marginRight:Xe.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:Xe.iconCursor,color:wt.editVariable.checkIcon,fontSize:Xe.iconFontSize,paddingRight:Xe.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:Xe.iconCursor,color:wt.editVariable.cancelIcon,fontSize:Xe.iconFontSize,paddingRight:Xe.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:Xe.editInputMinWidth,borderRadius:Xe.editInputBorderRadius,backgroundColor:wt.editVariable.background,color:wt.editVariable.color,padding:Xe.editInputPadding,marginRight:Xe.editInputMarginRight,fontFamily:Xe.editInputFontFamily},"detected-row":{paddingTop:Xe.detectedRowPaddingTop},"key-modal-request":{position:Xe.addKeyCoverPosition,top:Xe.addKeyCoverPositionPx,left:Xe.addKeyCoverPositionPx,right:Xe.addKeyCoverPositionPx,bottom:Xe.addKeyCoverPositionPx,backgroundColor:Xe.addKeyCoverBackground},"key-modal":{width:Xe.addKeyModalWidth,backgroundColor:wt.addKeyModal.background,marginLeft:Xe.addKeyModalMargin,marginRight:Xe.addKeyModalMargin,padding:Xe.addKeyModalPadding,borderRadius:Xe.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:wt.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:wt.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:wt.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:wt.addKeyModal.labelColor,fontSize:Xe.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:wt.editVariable.addIcon,fontSize:Xe.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:wt.ellipsisColor,fontSize:Xe.ellipsisFontSize,lineHeight:Xe.ellipsisLineHeight,cursor:Xe.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:wt.validationFailure.fontColor,backgroundColor:wt.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:wt.validationFailure.iconColor,fontSize:Xe.iconFontSize,transform:"rotate(45deg)"}}};function Ue(St,wt,yt){return St||console.error("theme has not been set"),function(Rt){var Nt=Ke;return Rt!==!1&&Rt!=="none"||(Nt=Je),Object(ot.createStyling)(tt,{defaultBase16:Nt})(Rt)}(St)(wt,yt)}var et=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=(Rt.rjvId,Rt.type_name),Yt=Rt.displayDataTypes,lr=Rt.theme;return Yt?ge.a.createElement("span",Object.assign({className:"data-type-label"},Ue(lr,"data-type-label")),Nt):null}}]),yt}(ge.a.PureComponent),dt=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props;return ge.a.createElement("div",Ue(Rt.theme,"boolean"),ge.a.createElement(et,Object.assign({type_name:"bool"},Rt)),Rt.value?"true":"false")}}]),yt}(ge.a.PureComponent),gt=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props;return ge.a.createElement("div",Ue(Rt.theme,"date"),ge.a.createElement(et,Object.assign({type_name:"date"},Rt)),ge.a.createElement("span",Object.assign({className:"date-value"},Ue(Rt.theme,"date-value")),Rt.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}]),yt}(ge.a.PureComponent),Qe=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props;return ge.a.createElement("div",Ue(Rt.theme,"float"),ge.a.createElement(et,Object.assign({type_name:"float"},Rt)),this.props.value)}}]),yt}(ge.a.PureComponent);function lt(St,wt){(wt==null||wt>St.length)&&(wt=St.length);for(var yt=0,Rt=new Array(wt);yt"u"||St[Symbol.iterator]==null){if(Array.isArray(St)||(yt=ht(St))||wt&&St&&typeof St.length=="number"){yt&&(St=yt);var Rt=0,Nt=function(){};return{s:Nt,n:function(){return Rt>=St.length?{done:!0}:{done:!1,value:St[Rt++]}},e:function(Qt){throw Qt},f:Nt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Yt,lr=!0,vr=!1;return{s:function(){yt=St[Symbol.iterator]()},n:function(){var Qt=yt.next();return lr=Qt.done,Qt},e:function(Qt){vr=!0,Yt=Qt},f:function(){try{lr||yt.return==null||yt.return()}finally{if(vr)throw Yt}}}}function $t(St){return function(wt){if(Array.isArray(wt))return lt(wt)}(St)||function(wt){if(typeof Symbol<"u"&&Symbol.iterator in Object(wt))return Array.from(wt)}(St)||ht(St)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var Lt=N(46),Gt=new(N(47)).Dispatcher,Pt=new(function(St){X(yt,St);var wt=xe(yt);function yt(){var Rt;F(this,yt);for(var Nt=arguments.length,Yt=new Array(Nt),lr=0;lrNt&&(vr.style.cursor="pointer",this.state.collapsed&&(lr=ge.a.createElement("span",null,lr.substring(0,Nt),ge.a.createElement("span",Ue(Yt,"ellipsis")," ...")))),ge.a.createElement("div",Ue(Yt,"string"),ge.a.createElement(et,Object.assign({type_name:"string"},Rt)),ge.a.createElement("span",Object.assign({className:"string-value"},vr,{onClick:this.toggleCollapsed}),'"',lr,'"'))}}]),yt}(ge.a.PureComponent),wr=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){return ge.a.createElement("div",Ue(this.props.theme,"undefined"),"undefined")}}]),yt}(ge.a.PureComponent);function xr(){return(xr=Object.assign||function(St){for(var wt=1;wt=0||(ks[Ji]=so[Ji]);return ks}(St,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),un,po=Ar.value!==void 0,In=Object(Ae.useRef)(null),xo=An(In,wt),Vn=Object(Ae.useRef)(0),Ro=Object(Ae.useRef)(),Nn=function(){var so=In.current,Ei=yt&&Ro.current?Ro.current:function(Li){var hl=window.getComputedStyle(Li);if(hl===null)return null;var Is,ea=(Is=hl,mr.reduce(function(aa,ta){return aa[ta]=Is[ta],aa},{})),fi=ea.boxSizing;return fi===""?null:(sr&&fi==="border-box"&&(ea.width=parseFloat(ea.width)+parseFloat(ea.borderRightWidth)+parseFloat(ea.borderLeftWidth)+parseFloat(ea.paddingRight)+parseFloat(ea.paddingLeft)+"px"),{sizingStyle:ea,paddingSize:parseFloat(ea.paddingBottom)+parseFloat(ea.paddingTop),borderSize:parseFloat(ea.borderBottomWidth)+parseFloat(ea.borderTopWidth)})}(so);if(Ei){Ro.current=Ei;var Ji=function(Li,hl,Is,ea){Is===void 0&&(Is=1),ea===void 0&&(ea=1/0),Mn||((Mn=document.createElement("textarea")).setAttribute("tab-index","-1"),Mn.setAttribute("aria-hidden","true"),pn(Mn)),Mn.parentNode===null&&document.body.appendChild(Mn);var fi=Li.paddingSize,aa=Li.borderSize,ta=Li.sizingStyle,$a=ta.boxSizing;Object.keys(ta).forEach(function(Ds){var ga=Ds;Mn.style[ga]=ta[ga]}),pn(Mn),Mn.value=hl;var ii=function(Ds,ga){var vs=Ds.scrollHeight;return ga.sizingStyle.boxSizing==="border-box"?vs+ga.borderSize:vs-ga.paddingSize}(Mn,Li);Mn.value="x";var ts=Mn.scrollHeight-fi,as=ts*Is;$a==="border-box"&&(as=as+fi+aa),ii=Math.max(as,ii);var Ns=ts*ea;return $a==="border-box"&&(Ns=Ns+fi+aa),[ii=Math.min(Ns,ii),ts]}(Ei,so.value||so.placeholder||"x",Nt,Rt),mi=Ji[0],ks=Ji[1];Vn.current!==mi&&(Vn.current=mi,so.style.setProperty("height",mi+"px","important"),Qt(mi,{rowHeight:ks}))}};return Object(Ae.useLayoutEffect)(Nn),un=bn(Nn),Object(Ae.useLayoutEffect)(function(){var so=function(Ei){un.current(Ei)};return window.addEventListener("resize",so),function(){window.removeEventListener("resize",so)}},[]),Object(Ae.createElement)("textarea",xr({},Ar,{onChange:function(so){po||Nn(),lr(so)},ref:xo}))},nr=Object(Ae.forwardRef)(Ut);function Ir(St){St=St.trim();try{if((St=JSON.stringify(JSON.parse(St)))[0]==="[")return jr("array",JSON.parse(St));if(St[0]==="{")return jr("object",JSON.parse(St));if(St.match(/\-?\d+\.\d+/)&&St.match(/\-?\d+\.\d+/)[0]===St)return jr("float",parseFloat(St));if(St.match(/\-?\d+e-\d+/)&&St.match(/\-?\d+e-\d+/)[0]===St)return jr("float",Number(St));if(St.match(/\-?\d+/)&&St.match(/\-?\d+/)[0]===St)return jr("integer",parseInt(St));if(St.match(/\-?\d+e\+\d+/)&&St.match(/\-?\d+e\+\d+/)[0]===St)return jr("integer",Number(St))}catch{}switch(St=St.toLowerCase()){case"undefined":return jr("undefined",void 0);case"nan":return jr("nan",NaN);case"null":return jr("null",null);case"true":return jr("boolean",!0);case"false":return jr("boolean",!1);default:if(St=Date.parse(St))return jr("date",new Date(St))}return jr(!1,null)}function jr(St,wt){return{type:St,value:wt}}var Rr=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",Object.assign({},xn(Nt),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),ge.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}]),yt}(ge.a.PureComponent),fr=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",Object.assign({},xn(Nt),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),ge.a.createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}]),yt}(ge.a.PureComponent),Or=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]),lr=xn(Nt).style;return ge.a.createElement("span",Yt,ge.a.createElement("svg",{fill:lr.color,width:lr.height,height:lr.width,style:lr,viewBox:"0 0 1792 1792"},ge.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),yt}(ge.a.PureComponent),Jr=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]),lr=xn(Nt).style;return ge.a.createElement("span",Yt,ge.a.createElement("svg",{fill:lr.color,width:lr.height,height:lr.width,style:lr,viewBox:"0 0 1792 1792"},ge.a.createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}]),yt}(ge.a.PureComponent),nn=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",{style:j(j({},xn(Nt).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},ge.a.createElement("path",{d:"M0 14l6-6-6-6z"})))}}]),yt}(ge.a.PureComponent),hn=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",{style:j(j({},xn(Nt).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},ge.a.createElement("path",{d:"M0 5l6 6 6-6z"})))}}]),yt}(ge.a.PureComponent),Gn=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",Object.assign({},xn(Nt),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),ge.a.createElement("g",null,ge.a.createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}]),yt}(ge.a.PureComponent),Zn=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",Object.assign({},xn(Nt),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),ge.a.createElement("g",null,ge.a.createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),yt}(ge.a.PureComponent),Eo=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",Object.assign({},xn(Nt),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),ge.a.createElement("g",null,ge.a.createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),yt}(ge.a.PureComponent),vo=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",Object.assign({},xn(Nt),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),ge.a.createElement("g",null,ge.a.createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}]),yt}(ge.a.PureComponent),Fo=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",Object.assign({},xn(Nt),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),ge.a.createElement("g",null,ge.a.createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}]),yt}(ge.a.PureComponent),Ln=function(St){X(yt,St);var wt=xe(yt);function yt(){return F(this,yt),wt.apply(this,arguments)}return K(yt,[{key:"render",value:function(){var Rt=this.props,Nt=Rt.style,Yt=Ie(Rt,["style"]);return ge.a.createElement("span",Yt,ge.a.createElement("svg",Object.assign({},xn(Nt),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),ge.a.createElement("g",null,ge.a.createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}]),yt}(ge.a.PureComponent);function xn(St){return St||(St={}),{style:j(j({verticalAlign:"middle"},St),{},{color:St.color?St.color:"#000000",height:"1em",width:"1em"})}}var Ko=function(St){X(yt,St);var wt=xe(yt);function yt(Rt){var Nt;return F(this,yt),(Nt=wt.call(this,Rt)).copiedTimer=null,Nt.handleCopy=function(){var Yt=document.createElement("textarea"),lr=Nt.props,vr=lr.clickCallback,Qt=lr.src,Ar=lr.namespace;Yt.innerHTML=JSON.stringify(Nt.clipboardValue(Qt),null," "),document.body.appendChild(Yt),Yt.select(),document.execCommand("copy"),document.body.removeChild(Yt),Nt.copiedTimer=setTimeout(function(){Nt.setState({copied:!1})},5500),Nt.setState({copied:!0},function(){typeof vr=="function"&&vr({src:Qt,namespace:Ar,name:Ar[Ar.length-1]})})},Nt.getClippyIcon=function(){var Yt=Nt.props.theme;return Nt.state.copied?ge.a.createElement("span",null,ge.a.createElement(Gn,Object.assign({className:"copy-icon"},Ue(Yt,"copy-icon"))),ge.a.createElement("span",Ue(Yt,"copy-icon-copied"),"✔")):ge.a.createElement(Gn,Object.assign({className:"copy-icon"},Ue(Yt,"copy-icon")))},Nt.clipboardValue=function(Yt){switch(je(Yt)){case"function":case"regexp":return Yt.toString();default:return Yt}},Nt.state={copied:!1},Nt}return K(yt,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var Rt=this.props,Nt=(Rt.src,Rt.theme),Yt=Rt.hidden,lr=Rt.rowHovered,vr=Ue(Nt,"copy-to-clipboard").style,Qt="inline";return Yt&&(Qt="none"),ge.a.createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:lr?"inline-block":"none"}},ge.a.createElement("span",{style:j(j({},vr),{},{display:Qt}),onClick:this.handleCopy},this.getClippyIcon()))}}]),yt}(ge.a.PureComponent),ao=function(St){X(yt,St);var wt=xe(yt);function yt(Rt){var Nt;return F(this,yt),(Nt=wt.call(this,Rt)).getEditIcon=function(){var Yt=Nt.props,lr=Yt.variable,vr=Yt.theme;return ge.a.createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:Nt.state.hovered?"inline-block":"none"}},ge.a.createElement(Fo,Object.assign({className:"click-to-edit-icon"},Ue(vr,"editVarIcon"),{onClick:function(){Nt.prepopInput(lr)}})))},Nt.prepopInput=function(Yt){if(Nt.props.onEdit!==!1){var lr=function(Qt){var Ar;switch(je(Qt)){case"undefined":Ar="undefined";break;case"nan":Ar="NaN";break;case"string":Ar=Qt;break;case"date":case"function":case"regexp":Ar=Qt.toString();break;default:try{Ar=JSON.stringify(Qt,null," ")}catch{Ar=""}}return Ar}(Yt.value),vr=Ir(lr);Nt.setState({editMode:!0,editValue:lr,parsedInput:{type:vr.type,value:vr.value}})}},Nt.getRemoveIcon=function(){var Yt=Nt.props,lr=Yt.variable,vr=Yt.namespace,Qt=Yt.theme,Ar=Yt.rjvId;return ge.a.createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:Nt.state.hovered?"inline-block":"none"}},ge.a.createElement(Zn,Object.assign({className:"click-to-remove-icon"},Ue(Qt,"removeVarIcon"),{onClick:function(){Gt.dispatch({name:"VARIABLE_REMOVED",rjvId:Ar,data:{name:lr.name,namespace:vr,existing_value:lr.value,variable_removed:!0}})}})))},Nt.getValue=function(Yt,lr){var vr=!lr&&Yt.type,Qt=pe(Nt).props;switch(vr){case!1:return Nt.getEditInput();case"string":return ge.a.createElement(tr,Object.assign({value:Yt.value},Qt));case"integer":return ge.a.createElement(kt,Object.assign({value:Yt.value},Qt));case"float":return ge.a.createElement(Qe,Object.assign({value:Yt.value},Qt));case"boolean":return ge.a.createElement(dt,Object.assign({value:Yt.value},Qt));case"function":return ge.a.createElement(bt,Object.assign({value:Yt.value},Qt));case"null":return ge.a.createElement(Ht,Qt);case"nan":return ge.a.createElement(It,Qt);case"undefined":return ge.a.createElement(wr,Qt);case"date":return ge.a.createElement(gt,Object.assign({value:Yt.value},Qt));case"regexp":return ge.a.createElement(Kt,Object.assign({value:Yt.value},Qt));default:return ge.a.createElement("div",{className:"object-value"},JSON.stringify(Yt.value))}},Nt.getEditInput=function(){var Yt=Nt.props.theme,lr=Nt.state.editValue;return ge.a.createElement("div",null,ge.a.createElement(nr,Object.assign({type:"text",inputRef:function(vr){return vr&&vr.focus()},value:lr,className:"variable-editor",onChange:function(vr){var Qt=vr.target.value,Ar=Ir(Qt);Nt.setState({editValue:Qt,parsedInput:{type:Ar.type,value:Ar.value}})},onKeyDown:function(vr){switch(vr.key){case"Escape":Nt.setState({editMode:!1,editValue:""});break;case"Enter":(vr.ctrlKey||vr.metaKey)&&Nt.submitEdit(!0)}vr.stopPropagation()},placeholder:"update this value",minRows:2},Ue(Yt,"edit-input"))),ge.a.createElement("div",Ue(Yt,"edit-icon-container"),ge.a.createElement(Zn,Object.assign({className:"edit-cancel"},Ue(Yt,"cancel-icon"),{onClick:function(){Nt.setState({editMode:!1,editValue:""})}})),ge.a.createElement(Ln,Object.assign({className:"edit-check string-value"},Ue(Yt,"check-icon"),{onClick:function(){Nt.submitEdit()}})),ge.a.createElement("div",null,Nt.showDetected())))},Nt.submitEdit=function(Yt){var lr=Nt.props,vr=lr.variable,Qt=lr.namespace,Ar=lr.rjvId,un=Nt.state,po=un.editValue,In=un.parsedInput,xo=po;Yt&&In.type&&(xo=In.value),Nt.setState({editMode:!1}),Gt.dispatch({name:"VARIABLE_UPDATED",rjvId:Ar,data:{name:vr.name,namespace:Qt,existing_value:vr.value,new_value:xo,variable_removed:!1}})},Nt.showDetected=function(){var Yt=Nt.props,lr=Yt.theme,vr=(Yt.variable,Yt.namespace,Yt.rjvId,Nt.state.parsedInput),Qt=(vr.type,vr.value,Nt.getDetectedInput());if(Qt)return ge.a.createElement("div",null,ge.a.createElement("div",Ue(lr,"detected-row"),Qt,ge.a.createElement(Ln,{className:"edit-check detected",style:j({verticalAlign:"top",paddingLeft:"3px"},Ue(lr,"check-icon").style),onClick:function(){Nt.submitEdit(!0)}})))},Nt.getDetectedInput=function(){var Yt=Nt.state.parsedInput,lr=Yt.type,vr=Yt.value,Qt=pe(Nt).props,Ar=Qt.theme;if(lr!==!1)switch(lr.toLowerCase()){case"object":return ge.a.createElement("span",null,ge.a.createElement("span",{style:j(j({},Ue(Ar,"brace").style),{},{cursor:"default"})},"{"),ge.a.createElement("span",{style:j(j({},Ue(Ar,"ellipsis").style),{},{cursor:"default"})},"..."),ge.a.createElement("span",{style:j(j({},Ue(Ar,"brace").style),{},{cursor:"default"})},"}"));case"array":return ge.a.createElement("span",null,ge.a.createElement("span",{style:j(j({},Ue(Ar,"brace").style),{},{cursor:"default"})},"["),ge.a.createElement("span",{style:j(j({},Ue(Ar,"ellipsis").style),{},{cursor:"default"})},"..."),ge.a.createElement("span",{style:j(j({},Ue(Ar,"brace").style),{},{cursor:"default"})},"]"));case"string":return ge.a.createElement(tr,Object.assign({value:vr},Qt));case"integer":return ge.a.createElement(kt,Object.assign({value:vr},Qt));case"float":return ge.a.createElement(Qe,Object.assign({value:vr},Qt));case"boolean":return ge.a.createElement(dt,Object.assign({value:vr},Qt));case"function":return ge.a.createElement(bt,Object.assign({value:vr},Qt));case"null":return ge.a.createElement(Ht,Qt);case"nan":return ge.a.createElement(It,Qt);case"undefined":return ge.a.createElement(wr,Qt);case"date":return ge.a.createElement(gt,Object.assign({value:new Date(vr)},Qt))}},Nt.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},Nt}return K(yt,[{key:"render",value:function(){var Rt=this,Nt=this.props,Yt=Nt.variable,lr=Nt.singleIndent,vr=Nt.type,Qt=Nt.theme,Ar=Nt.namespace,un=Nt.indentWidth,po=Nt.enableClipboard,In=Nt.onEdit,xo=Nt.onDelete,Vn=Nt.onSelect,Ro=Nt.displayArrayKey,Nn=Nt.quotesOnKeys,so=this.state.editMode;return ge.a.createElement("div",Object.assign({},Ue(Qt,"objectKeyVal",{paddingLeft:un*lr}),{onMouseEnter:function(){return Rt.setState(j(j({},Rt.state),{},{hovered:!0}))},onMouseLeave:function(){return Rt.setState(j(j({},Rt.state),{},{hovered:!1}))},className:"variable-row",key:Yt.name}),vr=="array"?Ro?ge.a.createElement("span",Object.assign({},Ue(Qt,"array-key"),{key:Yt.name+"_"+Ar}),Yt.name,ge.a.createElement("div",Ue(Qt,"colon"),":")):null:ge.a.createElement("span",null,ge.a.createElement("span",Object.assign({},Ue(Qt,"object-name"),{className:"object-key",key:Yt.name+"_"+Ar}),!!Nn&&ge.a.createElement("span",{style:{verticalAlign:"top"}},'"'),ge.a.createElement("span",{style:{display:"inline-block"}},Yt.name),!!Nn&&ge.a.createElement("span",{style:{verticalAlign:"top"}},'"')),ge.a.createElement("span",Ue(Qt,"colon"),":")),ge.a.createElement("div",Object.assign({className:"variable-value",onClick:Vn===!1&&In===!1?null:function(Ei){var Ji=$t(Ar);(Ei.ctrlKey||Ei.metaKey)&&In!==!1?Rt.prepopInput(Yt):Vn!==!1&&(Ji.shift(),Vn(j(j({},Yt),{},{namespace:Ji})))}},Ue(Qt,"variableValue",{cursor:Vn===!1?"default":"pointer"})),this.getValue(Yt,so)),po?ge.a.createElement(Ko,{rowHovered:this.state.hovered,hidden:so,src:Yt.value,clickCallback:po,theme:Qt,namespace:[].concat($t(Ar),[Yt.name])}):null,In!==!1&&so==0?this.getEditIcon():null,xo!==!1&&so==0?this.getRemoveIcon():null)}}]),yt}(ge.a.PureComponent),zo=function(St){X(yt,St);var wt=xe(yt);function yt(){var Rt;F(this,yt);for(var Nt=arguments.length,Yt=new Array(Nt),lr=0;lr0?po:null,namespace:un.splice(0,un.length-1),existing_value:In,variable_removed:!1,key_name:null};je(In)==="object"?Gt.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:xo,data:Ro}):Gt.dispatch({name:"VARIABLE_ADDED",rjvId:xo,data:j(j({},Ro),{},{new_value:[].concat($t(In),[null])})})}})))},Rt.getRemoveObject=function(vr){var Qt=Rt.props,Ar=Qt.theme,un=(Qt.hover,Qt.namespace),po=Qt.name,In=Qt.src,xo=Qt.rjvId;if(un.length!==1)return ge.a.createElement("span",{className:"click-to-remove",style:{display:vr?"inline-block":"none"}},ge.a.createElement(Zn,Object.assign({className:"click-to-remove-icon"},Ue(Ar,"removeVarIcon"),{onClick:function(){Gt.dispatch({name:"VARIABLE_REMOVED",rjvId:xo,data:{name:po,namespace:un.splice(0,un.length-1),existing_value:In,variable_removed:!0}})}})))},Rt.render=function(){var vr=Rt.props,Qt=vr.theme,Ar=vr.onDelete,un=vr.onAdd,po=vr.enableClipboard,In=vr.src,xo=vr.namespace,Vn=vr.rowHovered;return ge.a.createElement("div",Object.assign({},Ue(Qt,"object-meta-data"),{className:"object-meta-data",onClick:function(Ro){Ro.stopPropagation()}}),Rt.getObjectSize(),po?ge.a.createElement(Ko,{rowHovered:Vn,clickCallback:po,src:In,theme:Qt,namespace:xo}):null,un!==!1?Rt.getAddAttribute(Vn):null,Ar!==!1?Rt.getRemoveObject(Vn):null)},Rt}return yt}(ge.a.PureComponent);function fo(St){var wt=St.parent_type,yt=St.namespace,Rt=St.quotesOnKeys,Nt=St.theme,Yt=St.jsvRoot,lr=St.name,vr=St.displayArrayKey,Qt=St.name?St.name:"";return!Yt||lr!==!1&&lr!==null?wt=="array"?vr?ge.a.createElement("span",Object.assign({},Ue(Nt,"array-key"),{key:yt}),ge.a.createElement("span",{className:"array-key"},Qt),ge.a.createElement("span",Ue(Nt,"colon"),":")):ge.a.createElement("span",null):ge.a.createElement("span",Object.assign({},Ue(Nt,"object-name"),{key:yt}),ge.a.createElement("span",{className:"object-key"},Rt&&ge.a.createElement("span",{style:{verticalAlign:"top"}},'"'),ge.a.createElement("span",null,Qt),Rt&&ge.a.createElement("span",{style:{verticalAlign:"top"}},'"')),ge.a.createElement("span",Ue(Nt,"colon"),":")):ge.a.createElement("span",null)}function Wn(St){var wt=St.theme;switch(St.iconStyle){case"triangle":return ge.a.createElement(hn,Object.assign({},Ue(wt,"expanded-icon"),{className:"expanded-icon"}));case"square":return ge.a.createElement(Or,Object.assign({},Ue(wt,"expanded-icon"),{className:"expanded-icon"}));default:return ge.a.createElement(Rr,Object.assign({},Ue(wt,"expanded-icon"),{className:"expanded-icon"}))}}function wn(St){var wt=St.theme;switch(St.iconStyle){case"triangle":return ge.a.createElement(nn,Object.assign({},Ue(wt,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return ge.a.createElement(Jr,Object.assign({},Ue(wt,"collapsed-icon"),{className:"collapsed-icon"}));default:return ge.a.createElement(fr,Object.assign({},Ue(wt,"collapsed-icon"),{className:"collapsed-icon"}))}}var cn=function(St){X(yt,St);var wt=xe(yt);function yt(Rt){var Nt;return F(this,yt),(Nt=wt.call(this,Rt)).toggleCollapsed=function(Yt){var lr=[];for(var vr in Nt.state.expanded)lr.push(Nt.state.expanded[vr]);lr[Yt]=!lr[Yt],Nt.setState({expanded:lr})},Nt.state={expanded:[]},Nt}return K(yt,[{key:"getExpandedIcon",value:function(Rt){var Nt=this.props,Yt=Nt.theme,lr=Nt.iconStyle;return this.state.expanded[Rt]?ge.a.createElement(Wn,{theme:Yt,iconStyle:lr}):ge.a.createElement(wn,{theme:Yt,iconStyle:lr})}},{key:"render",value:function(){var Rt=this,Nt=this.props,Yt=Nt.src,lr=Nt.groupArraysAfterLength,vr=(Nt.depth,Nt.name),Qt=Nt.theme,Ar=Nt.jsvRoot,un=Nt.namespace,po=(Nt.parent_type,Ie(Nt,["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace","parent_type"])),In=0,xo=5*this.props.indentWidth;Ar||(In=5*this.props.indentWidth);var Vn=lr,Ro=Math.ceil(Yt.length/Vn);return ge.a.createElement("div",Object.assign({className:"object-key-val"},Ue(Qt,Ar?"jsv-root":"objectKeyVal",{paddingLeft:In})),ge.a.createElement(fo,this.props),ge.a.createElement("span",null,ge.a.createElement(zo,Object.assign({size:Yt.length},this.props))),$t(Array(Ro)).map(function(Nn,so){return ge.a.createElement("div",Object.assign({key:so,className:"object-key-val array-group"},Ue(Qt,"objectKeyVal",{marginLeft:6,paddingLeft:xo})),ge.a.createElement("span",Ue(Qt,"brace-row"),ge.a.createElement("div",Object.assign({className:"icon-container"},Ue(Qt,"icon-container"),{onClick:function(Ei){Rt.toggleCollapsed(so)}}),Rt.getExpandedIcon(so)),Rt.state.expanded[so]?ge.a.createElement(Go,Object.assign({key:vr+so,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:Vn,index_offset:so*Vn,src:Yt.slice(so*Vn,so*Vn+Vn),namespace:un,type:"array",parent_type:"array_group",theme:Qt},po)):ge.a.createElement("span",Object.assign({},Ue(Qt,"brace"),{onClick:function(Ei){Rt.toggleCollapsed(so)},className:"array-group-brace"}),"[",ge.a.createElement("div",Object.assign({},Ue(Qt,"array-group-meta-data"),{className:"array-group-meta-data"}),ge.a.createElement("span",Object.assign({className:"object-size"},Ue(Qt,"object-size")),so*Vn," - ",so*Vn+Vn>Yt.length?Yt.length:so*Vn+Vn)),"]")))}))}}]),yt}(ge.a.PureComponent),vi=function(St){X(yt,St);var wt=xe(yt);function yt(Rt){var Nt;F(this,yt),(Nt=wt.call(this,Rt)).toggleCollapsed=function(){Nt.setState({expanded:!Nt.state.expanded},function(){Vt.set(Nt.props.rjvId,Nt.props.namespace,"expanded",Nt.state.expanded)})},Nt.getObjectContent=function(lr,vr,Qt){return ge.a.createElement("div",{className:"pushed-content object-container"},ge.a.createElement("div",Object.assign({className:"object-content"},Ue(Nt.props.theme,"pushed-content")),Nt.renderObjectContents(vr,Qt)))},Nt.getEllipsis=function(){return Nt.state.size===0?null:ge.a.createElement("div",Object.assign({},Ue(Nt.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:Nt.toggleCollapsed}),"...")},Nt.getObjectMetaData=function(lr){var vr=Nt.props,Qt=(vr.rjvId,vr.theme,Nt.state),Ar=Qt.size,un=Qt.hovered;return ge.a.createElement(zo,Object.assign({rowHovered:un,size:Ar},Nt.props))},Nt.renderObjectContents=function(lr,vr){var Qt,Ar=Nt.props,un=Ar.depth,po=Ar.parent_type,In=Ar.index_offset,xo=Ar.groupArraysAfterLength,Vn=Ar.namespace,Ro=Nt.state.object_type,Nn=[],so=Object.keys(lr||{});return Nt.props.sortKeys&&Ro!=="array"&&(so=so.sort()),so.forEach(function(Ei){if(Qt=new ca(Ei,lr[Ei]),po==="array_group"&&In&&(Qt.name=parseInt(Qt.name)+In),lr.hasOwnProperty(Ei))if(Qt.type==="object")Nn.push(ge.a.createElement(Go,Object.assign({key:Qt.name,depth:un+1,name:Qt.name,src:Qt.value,namespace:Vn.concat(Qt.name),parent_type:Ro},vr)));else if(Qt.type==="array"){var Ji=Go;xo&&Qt.value.length>xo&&(Ji=cn),Nn.push(ge.a.createElement(Ji,Object.assign({key:Qt.name,depth:un+1,name:Qt.name,src:Qt.value,namespace:Vn.concat(Qt.name),type:"array",parent_type:Ro},vr)))}else Nn.push(ge.a.createElement(ao,Object.assign({key:Qt.name+"_"+Vn,variable:Qt,singleIndent:5,namespace:Vn,type:Nt.props.type},vr)))}),Nn};var Yt=yt.getState(Rt);return Nt.state=j(j({},Yt),{},{prevProps:{}}),Nt}return K(yt,[{key:"getBraceStart",value:function(Rt,Nt){var Yt=this,lr=this.props,vr=lr.src,Qt=lr.theme,Ar=lr.iconStyle;if(lr.parent_type==="array_group")return ge.a.createElement("span",null,ge.a.createElement("span",Ue(Qt,"brace"),Rt==="array"?"[":"{"),Nt?this.getObjectMetaData(vr):null);var un=Nt?Wn:wn;return ge.a.createElement("span",null,ge.a.createElement("span",Object.assign({onClick:function(po){Yt.toggleCollapsed()}},Ue(Qt,"brace-row")),ge.a.createElement("div",Object.assign({className:"icon-container"},Ue(Qt,"icon-container")),ge.a.createElement(un,{theme:Qt,iconStyle:Ar})),ge.a.createElement(fo,this.props),ge.a.createElement("span",Ue(Qt,"brace"),Rt==="array"?"[":"{")),Nt?this.getObjectMetaData(vr):null)}},{key:"render",value:function(){var Rt=this,Nt=this.props,Yt=Nt.depth,lr=Nt.src,vr=(Nt.namespace,Nt.name,Nt.type,Nt.parent_type),Qt=Nt.theme,Ar=Nt.jsvRoot,un=Nt.iconStyle,po=Ie(Nt,["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle"]),In=this.state,xo=In.object_type,Vn=In.expanded,Ro={};return Ar||vr==="array_group"?vr==="array_group"&&(Ro.borderLeft=0,Ro.display="inline"):Ro.paddingLeft=5*this.props.indentWidth,ge.a.createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return Rt.setState(j(j({},Rt.state),{},{hovered:!0}))},onMouseLeave:function(){return Rt.setState(j(j({},Rt.state),{},{hovered:!1}))}},Ue(Qt,Ar?"jsv-root":"objectKeyVal",Ro)),this.getBraceStart(xo,Vn),Vn?this.getObjectContent(Yt,lr,j({theme:Qt,iconStyle:un},po)):this.getEllipsis(),ge.a.createElement("span",{className:"brace-row"},ge.a.createElement("span",{style:j(j({},Ue(Qt,"brace").style),{},{paddingLeft:Vn?"3px":"0px"})},xo==="array"?"]":"}"),Vn?null:this.getObjectMetaData(lr)))}}],[{key:"getDerivedStateFromProps",value:function(Rt,Nt){var Yt=Nt.prevProps;return Rt.src!==Yt.src||Rt.collapsed!==Yt.collapsed||Rt.name!==Yt.name||Rt.namespace!==Yt.namespace||Rt.rjvId!==Yt.rjvId?j(j({},yt.getState(Rt)),{},{prevProps:Rt}):null}}]),yt}(ge.a.PureComponent);vi.getState=function(St){var wt=Object.keys(St.src).length,yt=(St.collapsed===!1||St.collapsed!==!0&&St.collapsed>St.depth)&&(!St.shouldCollapse||St.shouldCollapse({name:St.name,src:St.src,type:je(St.src),namespace:St.namespace})===!1)&&wt!==0;return{expanded:Vt.get(St.rjvId,St.namespace,"expanded",yt),object_type:St.type==="array"?"array":"object",parent_type:St.type==="array"?"array":"object",size:wt,hovered:!1}};var ca=function St(wt,yt){F(this,St),this.name=wt,this.value=yt,this.type=je(yt)};Be(vi);var Go=vi,di=function(St){X(yt,St);var wt=xe(yt);function yt(){var Rt;F(this,yt);for(var Nt=arguments.length,Yt=new Array(Nt),lr=0;lrvr.groupArraysAfterLength&&(Ar=cn),ge.a.createElement("div",{className:"pretty-json-container object-container"},ge.a.createElement("div",{className:"object-content"},ge.a.createElement(Ar,Object.assign({namespace:Qt,depth:0,jsvRoot:!0},vr))))},Rt}return yt}(ge.a.PureComponent),Qi=function(St){X(yt,St);var wt=xe(yt);function yt(Rt){var Nt;return F(this,yt),(Nt=wt.call(this,Rt)).closeModal=function(){Gt.dispatch({rjvId:Nt.props.rjvId,name:"RESET"})},Nt.submit=function(){Nt.props.submit(Nt.state.input)},Nt.state={input:Rt.input?Rt.input:""},Nt}return K(yt,[{key:"render",value:function(){var Rt=this,Nt=this.props,Yt=Nt.theme,lr=Nt.rjvId,vr=Nt.isValid,Qt=this.state.input,Ar=vr(Qt);return ge.a.createElement("div",Object.assign({className:"key-modal-request"},Ue(Yt,"key-modal-request"),{onClick:this.closeModal}),ge.a.createElement("div",Object.assign({},Ue(Yt,"key-modal"),{onClick:function(un){un.stopPropagation()}}),ge.a.createElement("div",Ue(Yt,"key-modal-label"),"Key Name:"),ge.a.createElement("div",{style:{position:"relative"}},ge.a.createElement("input",Object.assign({},Ue(Yt,"key-modal-input"),{className:"key-modal-input",ref:function(un){return un&&un.focus()},spellCheck:!1,value:Qt,placeholder:"...",onChange:function(un){Rt.setState({input:un.target.value})},onKeyPress:function(un){Ar&&un.key==="Enter"?Rt.submit():un.key==="Escape"&&Rt.closeModal()}})),Ar?ge.a.createElement(Ln,Object.assign({},Ue(Yt,"key-modal-submit"),{className:"key-modal-submit",onClick:function(un){return Rt.submit()}})):null),ge.a.createElement("span",Ue(Yt,"key-modal-cancel"),ge.a.createElement(vo,Object.assign({},Ue(Yt,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Gt.dispatch({rjvId:lr,name:"RESET"})}})))))}}]),yt}(ge.a.PureComponent),Oa=function(St){X(yt,St);var wt=xe(yt);function yt(){var Rt;F(this,yt);for(var Nt=arguments.length,Yt=new Array(Nt),lr=0;lr=0)&&(R[I]=S[I]);return R}function _objectWithoutProperties$g(S,C){if(S==null)return{};var R=_objectWithoutPropertiesLoose$g(S,C),O,I;if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(S);for(I=0;I=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _slicedToArray$d(S,C){return _arrayWithHoles$e(S)||_iterableToArrayLimit$d(S,C)||_unsupportedIterableToArray$l(S,C)||_nonIterableRest$e()}function _arrayWithHoles$e(S){if(Array.isArray(S))return S}function _iterableToArrayLimit$d(S,C){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(S)))){var R=[],O=!0,I=!1,N=void 0;try{for(var L=S[Symbol.iterator](),B;!(O=(B=L.next()).done)&&(R.push(B.value),!(C&&R.length===C));O=!0);}catch(j){I=!0,N=j}finally{try{!O&&L.return!=null&&L.return()}finally{if(I)throw N}}return R}}function _unsupportedIterableToArray$l(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$l(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$l(S,C)}}function _arrayLikeToArray$l(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R=S.length?S.apply(this,I):function(){for(var L=arguments.length,B=new Array(L),j=0;j1&&arguments[1]!==void 0?arguments[1]:{};validators$1.initial(S),validators$1.handler(C);var R={current:S},O=curry$2(didStateUpdate)(R,C),I=curry$2(updateState)(R),N=curry$2(validators$1.changes)(S),L=curry$2(extractChanges)(R);function B(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(V){return V};return validators$1.selector(F),F(R.current)}function j(F){compose$2(O,I,N,L)(F)}return[B,j]}function extractChanges(S,C){return isFunction(C)?C(S.current):C}function updateState(S,C){return S.current=_objectSpread2(_objectSpread2({},S.current),C),C}function didStateUpdate(S,C,R){return isFunction(C)?C(S.current):Object.keys(R).forEach(function(O){var I;return(I=C[O])===null||I===void 0?void 0:I.call(C,S.current[O])}),R}var index$1={create:create$3},config$2={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function curry$1(S){return function C(){for(var R=this,O=arguments.length,I=new Array(O),N=0;N=S.length?S.apply(this,I):function(){for(var L=arguments.length,B=new Array(L),j=0;j{O.current=!1}:S,C)}var l=he;function D(){}function h(S,C,R,O){return De(S,O)||be(S,C,R,O)}function De(S,C){return S.editor.getModel(te(S,C))}function be(S,C,R,O){return S.editor.createModel(C,R,O?te(S,O):void 0)}function te(S,C){return S.Uri.parse(C)}function Oe({original:S,modified:C,language:R,originalLanguage:O,modifiedLanguage:I,originalModelPath:N,modifiedModelPath:L,keepCurrentOriginalModel:B=!1,keepCurrentModifiedModel:j=!1,theme:F="light",loading:V="Loading...",options:K={},height:W="100%",width:X="100%",className:J,wrapperProps:oe={},beforeMount:pe=D,onMount:me=D}){let[xe,Ae]=reactExports.useState(!1),[ge,Te]=reactExports.useState(!0),we=reactExports.useRef(null),ke=reactExports.useRef(null),Be=reactExports.useRef(null),Ie=reactExports.useRef(me),je=reactExports.useRef(pe),Ke=reactExports.useRef(!1);k$1(()=>{let tt=loader.init();return tt.then(Ue=>(ke.current=Ue)&&Te(!1)).catch(Ue=>(Ue==null?void 0:Ue.type)!=="cancelation"&&console.error("Monaco initialization: error:",Ue)),()=>we.current?ot():tt.cancel()}),l(()=>{if(we.current&&ke.current){let tt=we.current.getOriginalEditor(),Ue=h(ke.current,S||"",O||R||"text",N||"");Ue!==tt.getModel()&&tt.setModel(Ue)}},[N],xe),l(()=>{if(we.current&&ke.current){let tt=we.current.getModifiedEditor(),Ue=h(ke.current,C||"",I||R||"text",L||"");Ue!==tt.getModel()&&tt.setModel(Ue)}},[L],xe),l(()=>{let tt=we.current.getModifiedEditor();tt.getOption(ke.current.editor.EditorOption.readOnly)?tt.setValue(C||""):C!==tt.getValue()&&(tt.executeEdits("",[{range:tt.getModel().getFullModelRange(),text:C||"",forceMoveMarkers:!0}]),tt.pushUndoStop())},[C],xe),l(()=>{var tt,Ue;(Ue=(tt=we.current)==null?void 0:tt.getModel())==null||Ue.original.setValue(S||"")},[S],xe),l(()=>{let{original:tt,modified:Ue}=we.current.getModel();ke.current.editor.setModelLanguage(tt,O||R||"text"),ke.current.editor.setModelLanguage(Ue,I||R||"text")},[R,O,I],xe),l(()=>{var tt;(tt=ke.current)==null||tt.editor.setTheme(F)},[F],xe),l(()=>{var tt;(tt=we.current)==null||tt.updateOptions(K)},[K],xe);let Je=reactExports.useCallback(()=>{var et;if(!ke.current)return;je.current(ke.current);let tt=h(ke.current,S||"",O||R||"text",N||""),Ue=h(ke.current,C||"",I||R||"text",L||"");(et=we.current)==null||et.setModel({original:tt,modified:Ue})},[R,C,I,S,O,N,L]),Xe=reactExports.useCallback(()=>{var tt;!Ke.current&&Be.current&&(we.current=ke.current.editor.createDiffEditor(Be.current,{automaticLayout:!0,...K}),Je(),(tt=ke.current)==null||tt.editor.setTheme(F),Ae(!0),Ke.current=!0)},[K,F,Je]);reactExports.useEffect(()=>{xe&&Ie.current(we.current,ke.current)},[xe]),reactExports.useEffect(()=>{!ge&&!xe&&Xe()},[ge,xe,Xe]);function ot(){var Ue,et,dt,gt;let tt=(Ue=we.current)==null?void 0:Ue.getModel();B||((et=tt==null?void 0:tt.original)==null||et.dispose()),j||((dt=tt==null?void 0:tt.modified)==null||dt.dispose()),(gt=we.current)==null||gt.dispose()}return React.createElement(H,{width:X,height:W,isEditorReady:xe,loading:V,_ref:Be,className:J,wrapperProps:oe})}var ie=Oe;reactExports.memo(ie);function He(S){let C=reactExports.useRef();return reactExports.useEffect(()=>{C.current=S},[S]),C.current}var se=He,_=new Map;function Ve({defaultValue:S,defaultLanguage:C,defaultPath:R,value:O,language:I,path:N,theme:L="light",line:B,loading:j="Loading...",options:F={},overrideServices:V={},saveViewState:K=!0,keepCurrentModel:W=!1,width:X="100%",height:J="100%",className:oe,wrapperProps:pe={},beforeMount:me=D,onMount:xe=D,onChange:Ae,onValidate:ge=D}){let[Te,we]=reactExports.useState(!1),[ke,Be]=reactExports.useState(!0),Ie=reactExports.useRef(null),je=reactExports.useRef(null),Ke=reactExports.useRef(null),Je=reactExports.useRef(xe),Xe=reactExports.useRef(me),ot=reactExports.useRef(),tt=reactExports.useRef(O),Ue=se(N),et=reactExports.useRef(!1),dt=reactExports.useRef(!1);k$1(()=>{let lt=loader.init();return lt.then(ht=>(Ie.current=ht)&&Be(!1)).catch(ht=>(ht==null?void 0:ht.type)!=="cancelation"&&console.error("Monaco initialization: error:",ht)),()=>je.current?Qe():lt.cancel()}),l(()=>{var ht,Ct,$t,Lt;let lt=h(Ie.current,S||O||"",C||I||"",N||R||"");lt!==((ht=je.current)==null?void 0:ht.getModel())&&(K&&_.set(Ue,(Ct=je.current)==null?void 0:Ct.saveViewState()),($t=je.current)==null||$t.setModel(lt),K&&((Lt=je.current)==null||Lt.restoreViewState(_.get(N))))},[N],Te),l(()=>{var lt;(lt=je.current)==null||lt.updateOptions(F)},[F],Te),l(()=>{!je.current||O===void 0||(je.current.getOption(Ie.current.editor.EditorOption.readOnly)?je.current.setValue(O):O!==je.current.getValue()&&(dt.current=!0,je.current.executeEdits("",[{range:je.current.getModel().getFullModelRange(),text:O,forceMoveMarkers:!0}]),je.current.pushUndoStop(),dt.current=!1))},[O],Te),l(()=>{var ht,Ct;let lt=(ht=je.current)==null?void 0:ht.getModel();lt&&I&&((Ct=Ie.current)==null||Ct.editor.setModelLanguage(lt,I))},[I],Te),l(()=>{var lt;B!==void 0&&((lt=je.current)==null||lt.revealLine(B))},[B],Te),l(()=>{var lt;(lt=Ie.current)==null||lt.editor.setTheme(L)},[L],Te);let gt=reactExports.useCallback(()=>{var lt;if(!(!Ke.current||!Ie.current)&&!et.current){Xe.current(Ie.current);let ht=N||R,Ct=h(Ie.current,O||S||"",C||I||"",ht||"");je.current=(lt=Ie.current)==null?void 0:lt.editor.create(Ke.current,{model:Ct,automaticLayout:!0,...F},V),K&&je.current.restoreViewState(_.get(ht)),Ie.current.editor.setTheme(L),B!==void 0&&je.current.revealLine(B),we(!0),et.current=!0}},[S,C,R,O,I,N,F,V,K,L,B]);reactExports.useEffect(()=>{Te&&Je.current(je.current,Ie.current)},[Te]),reactExports.useEffect(()=>{!ke&&!Te&>()},[ke,Te,gt]),tt.current=O,reactExports.useEffect(()=>{var lt,ht;Te&&Ae&&((lt=ot.current)==null||lt.dispose(),ot.current=(ht=je.current)==null?void 0:ht.onDidChangeModelContent(Ct=>{dt.current||Ae(je.current.getValue(),Ct)}))},[Te,Ae]),reactExports.useEffect(()=>{if(Te){let lt=Ie.current.editor.onDidChangeMarkers(ht=>{var $t;let Ct=($t=je.current.getModel())==null?void 0:$t.uri;if(Ct&&ht.find(Lt=>Lt.path===Ct.path)){let Lt=Ie.current.editor.getModelMarkers({resource:Ct});ge==null||ge(Lt)}});return()=>{lt==null||lt.dispose()}}return()=>{}},[Te,ge]);function Qe(){var lt,ht;(lt=ot.current)==null||lt.dispose(),W?K&&_.set(N,je.current.saveViewState()):(ht=je.current.getModel())==null||ht.dispose(),je.current.dispose()}return React.createElement(H,{width:X,height:J,isEditorReady:Te,loading:j,_ref:Ke,className:oe,wrapperProps:pe})}var fe=Ve,de=reactExports.memo(fe),Ft=de;const JinjaSyntaxHighlighter=({value:S,theme:C})=>jsxRuntimeExports.jsx(Ft,{value:S,theme:C,options:{readOnly:!0,minimap:{enabled:!1}},defaultLanguage:"jinja2",onMount:(R,O)=>{O.languages.register({id:"jinja2"}),O.languages.setLanguageConfiguration("jinja2",{comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["{","}"]],folding:{markers:{start:/\{%\s*(block|for|if)/,end:/\{%\s*end(block|for|if)/}}}),O.languages.setMonarchTokensProvider("jinja2",{tokenizer:{root:[[/\{\{/,"delimiter"],[/\}\}/,"delimiter"],[/\{#/,"comment"],[/#\}/,"comment"],[/\{%/,"control"],[/%\}/,"control"],[/\b(if|else|elif|endif|for|endfor|set|extends|include|block|endblock|macro|endmacro)\b/,"keyword"],[/\b(length|list|lower|upper|trim|truncate|replace|round|urlencode|urlize)\b/,"filter"],[/\b(\+|-|\*|\/|%|\*\*|\/\/)\b/,"operator"],[/\b(\d+|\d*\.\d+)\b/,"number"],[/(^user:|^# user:|^system:|^# system:|^assistant:|^# assistant:)/,"keyword"]]}})}}),locStringsInjectionToken=createInjectionToken("locStrings",{}),useLocStrings=()=>{const[S]=useInjected(locStringsInjectionToken);return S},parseTraceOutput=S=>{var R;const C=(R=S==null?void 0:S.attributes)==null?void 0:R.output;if(typeof C=="string")try{const O=JSON.parse(C);if(typeof O.usage=="string")try{O.usage=JSON.parse(O.usage)}catch{O.usage={}}return O}catch{return C}return C},convertToTraceListRow=S=>{var R,O,I;const C=S.end_time&&S.start_time?Date.parse(S.end_time)-Date.parse(S.start_time):0;return{...S,latency:C,total_tokens:((R=S==null?void 0:S.cumulative_token_count)==null?void 0:R.total)??0,prompt_tokens:((O=S==null?void 0:S.cumulative_token_count)==null?void 0:O.prompt)??0,completion_tokens:((I=S==null?void 0:S.cumulative_token_count)==null?void 0:I.completion)??0}};var _a;const initialTableColumnNames={normalColumns:[],evaluationColumns:[]};var ViewStatus=(S=>(S.loading="loading",S.loaded="loaded",S.error="error",S))(ViewStatus||{});const c0=class c0{constructor(){this.selectedSpanId$=new State$1(void 0),this.selectedTraceId$=new State$1(void 0),this.spans$=new ObservableMap,this.traces$=new ObservableOrderedMap,this.tableColumnNames$=new State$1(initialTableColumnNames),this.tableHiddenColumnNames$=new State$1([]),this.isTraceDetailOpen$=new State$1(!1),this.isGanttChartOpen$=new State$1(!1),this.traceListStatus$=new State$1("loading"),this.traceDetailStatus$=new State$1("loading"),this.selectedTraceId$.subscribe(C=>{var R;C&&((R=this.traceDetailDidOpenCallback)==null||R.call(this,C))})}traceDetailDidOpen(C){this.traceDetailDidOpenCallback=C}clear(){this.traces$.clear(),this.spans$.clear()}appendTraces(C){C.forEach(R=>{R.trace_id!==void 0&&this.traces$.set(R.trace_id,R)})}appendSpans(C){C.forEach(R=>{var L,B;const O=(L=R==null?void 0:R.context)==null?void 0:L.trace_id,I=(B=R==null?void 0:R.context)==null?void 0:B.span_id;if(!O||!I)return;const N=this.spans$.get(O)||new ObservableOrderedMap;this.spans$.set(O,N.set(I,R))})}toggleIsGanttChartOpen(){this.isGanttChartOpen$.setState(!this.isGanttChartOpen$.getSnapshot())}getTraceById(C){return this.traces$.get(C)}setTraceListStatus(C){this.traceListStatus$.setState(C)}setTraceDetailStatus(C){this.traceDetailStatus$.setState(C)}};_a=SINGLETON,c0[_a]=!0;let TraceViewModel=c0;const TraceViewModelToken=createInjectionToken("TraceViewModel",new TraceViewModel),useTraceViewModel=()=>{const[S]=useInjected(TraceViewModelToken);return S},useSelectedSpanId=()=>{const S=useTraceViewModel();return useState(S.selectedSpanId$)},useSelectedSpan=()=>{var O;const S=useTraceViewModel(),C=useSelectedSpanId(),R=useSelectedTraceId();if(!(!C||!R))return(O=S.spans$.get(R))==null?void 0:O.get(C)},useParentSpanOfSelectedSpan=()=>{var O;const S=useTraceViewModel(),C=useSelectedTraceId(),R=useSelectedSpan();if(!(!R||!C||!R.parent_id))return(O=S.spans$.get(C))==null?void 0:O.get(R.parent_id)},useSetSelectedSpanId=()=>useSetState(useTraceViewModel().selectedSpanId$),useSelectedTraceId=()=>useState(useTraceViewModel().selectedTraceId$),useSetSelectedTraceId=()=>useSetState(useTraceViewModel().selectedTraceId$),useSelectedTrace=()=>{const S=useTraceViewModel(),C=useSelectedTraceId();return C?S.traces$.value.find(R=>R.trace_id===C):void 0},useSpansOfSelectedTrace=()=>{const S=useTraceViewModel(),C=useSelectedTraceId(),R=useState(S.spans$.get(C??"")??new ObservableOrderedMap);return Array.from(R.values())},useTraces=()=>Array.from(useState(useTraceViewModel().traces$).values()),useParseTraceOutput=S=>reactExports.useMemo(()=>parseTraceOutput(S),[S]),useEvaluationSpansOfSelectedSpan=()=>{const S=useTraceViewModel(),C=[],R=useSelectedTrace();return R?(Object.keys(R.evaluations??[]).forEach(O=>{var N,L;const I=(N=R==null?void 0:R.evaluations)==null?void 0:N[O];if(I){const B=Array.from(((L=S.spans$.get(I.trace_id??""))==null?void 0:L.getState().values())??[]);C.push({evaluationName:I.display_name??O,evaluationTraces:B})}}),C):[]},useRootSpanIdOfSelectedSpans=()=>{const S=useSelectedTrace();return S==null?void 0:S.root_span_id},useTableColumnNames=()=>useState(useTraceViewModel().tableColumnNames$),useSetTableColumnNames=()=>useSetState(useTraceViewModel().tableColumnNames$),useTableHiddenColumnNames=()=>useState(useTraceViewModel().tableHiddenColumnNames$),useSetTableHiddenColumnNames=()=>useSetState(useTraceViewModel().tableHiddenColumnNames$),useTraceDetailRefreshKey=()=>{const S=useTraceViewModel(),C=useSelectedTraceId(),R=useState(S.spans$),O=Array.from(useState(R.get(C??"")??new ObservableOrderedMap).keys());return`${C}-${O.join("-")}`},useIsGanttChartOpen=()=>useState(useTraceViewModel().isGanttChartOpen$),traceDetailErrorInjectionToken=createInjectionToken("traceDetailErrorInjectionToken",()=>{const S=useLocStrings();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:S.Failed_to_load_trace})}),traceDetailLoadingInjectionToken=createInjectionToken("traceDetailLoadingInjectionToken",Loading),traceListErrorInjectionToken=createInjectionToken("traceListErrorInjectionToken",()=>{const S=useLocStrings();return jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:S.Failed_to_load_traces})}),traceListLoadingInjectionToken=createInjectionToken("traceListLoadingInjectionToken",Loading),useTraceListViewStatus=()=>{const S=useTraceViewModel();return useState(S.traceListStatus$)},useTraceDetailViewStatus=()=>{const S=useTraceViewModel();return useState(S.traceDetailStatus$)},useTraceListLoadingComponent=()=>{const[S]=useInjected(traceListLoadingInjectionToken);return S},useTraceListErrorComponent=()=>{const[S]=useInjected(traceListErrorInjectionToken);return S},useTraceDetailLoadingComponent=()=>{const[S]=useInjected(traceDetailLoadingInjectionToken);return S},useTraceDetailErrorComponent=()=>{const[S]=useInjected(traceDetailErrorInjectionToken);return S},TREE_NODE_HEIGHT=58,TREE_NODE_WIDTH=400,TREE_NODE_PADDING=10,TREE_NODE_INDENT=48,sortTraceByStartTime=(S,C)=>S.start_time&&C.start_time?Date.parse(C.start_time)-Date.parse(S.start_time):1,defaultGetNodeX=({level:S})=>S*TREE_NODE_INDENT,defaultGetNodeWidth=()=>TREE_NODE_WIDTH,defaultGetNodeHeight=()=>TREE_NODE_HEIGHT,spansToGraphModel=(S,{rootSpanId:C,isEdgesHidden:R=!1,getNodeX:O=defaultGetNodeX,getNodeWidth:I=defaultGetNodeWidth,getNodeHeight:N=defaultGetNodeHeight})=>{const L=[],B=[],j=S.filter(K=>{var W;return((W=K==null?void 0:K.context)==null?void 0:W.span_id)===C}).sort((K,W)=>Date.parse(K.start_time??"")??0-Date.parse(W.start_time??"")??0),F=new Map;S.forEach(K=>{K.parent_id&&(F.has(K.parent_id)?F.get(K.parent_id).push(K):F.set(K.parent_id,[K]))});let V=0;return j.sort(sortTraceByStartTime).forEach(K=>{var X,J;const W=[{span:K,level:0}];for(;W.length>0;){const{span:oe,level:pe}=W.pop(),me=N({span:oe,level:pe,index:V});L.push({id:((X=oe==null?void 0:oe.context)==null?void 0:X.span_id)??"",width:I({span:oe,level:pe,index:V}),height:me,x:O({span:oe,level:pe,index:V}),y:V*(me+TREE_NODE_PADDING),ports:[{id:"port",name:"port",position:[0,.5]}]}),V++,(J=oe==null?void 0:oe.context)!=null&&J.span_id&&F.has(oe.context.span_id)&&F.get(oe.context.span_id).sort(sortTraceByStartTime).forEach(xe=>{var Ae,ge;!R&&((Ae=oe==null?void 0:oe.context)!=null&&Ae.span_id)&&((ge=xe==null?void 0:xe.context)!=null&&ge.span_id)&&B.push({id:`${oe.context.span_id}-${xe.context.span_id}`,source:oe.context.span_id,sourcePortId:"port",target:xe.context.span_id,targetPortId:"port"}),W.push({span:xe,level:pe+1})})}}),GraphModel.fromJSON({nodes:L,edges:B})};class EdgeConfig{render({x1:C,x2:R,y1:O,y2:I,model:N,data:L}){if(!L.nodes.get(N.source)||!L.nodes.get(N.target))return null;const F=C+30,V=R+20,K=O+10,W=`M ${F} ${K} L ${F} ${I} L ${V} ${I}`;return jsxRuntimeExports.jsx("path",{d:W,stroke:tokens.colorNeutralStrokeAccessible,strokeWidth:1,fill:"none"})}}const GanttTreeNode=({node:S})=>{const C=bitset.has(GraphNodeStatus.Selected)(S.status),R=bitset.has(GraphNodeStatus.Activated)(S.status);let O=tokens.colorNeutralStroke1,I=tokens.colorBrandBackground2,N=1;return C&&(O=tokens.colorBrandStroke2,N=2,I=tokens.colorBrandBackground2Pressed),R&&(I=tokens.colorBrandBackground2Hover),jsxRuntimeExports.jsx("foreignObject",{x:S.x,y:S.y,width:S.width,height:S.height,style:{border:`${N}px solid ${O}`,backgroundColor:I,borderRadius:10,paddingLeft:10},children:jsxRuntimeExports.jsx("div",{style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",cursor:"pointer"}})})};class GanttNodeConfig{constructor(C){this.options=C}render(C){const R=this.options.spans.find(O=>{var I;return((I=O==null?void 0:O.context)==null?void 0:I.span_id)===C.model.id});return R?jsxRuntimeExports.jsx(GanttTreeNode,{node:C.model,span:R}):null}getMinHeight(){return 0}getMinWidth(){return 0}}const GanttTimeline=({startMs:S,endMs:C})=>{const R=C-S,O=Math.pow(10,Math.floor(Math.log10(R))-1),I=Math.ceil(R/O),N=[],L=[];for(let B=0;BjsxRuntimeExports.jsx("div",{style:{width:"100%",height:"100%"},children:jsxRuntimeExports.jsx(ReactDagEditor,{state:S,dispatch:C,style:{height:"100%",flexGrow:1,display:"flex"},children:jsxRuntimeExports.jsx(Graph,{canvasMouseMode:CanvasMouseMode.Pan})})}),GanttView=()=>{var J;const S=useSpansOfSelectedTrace(),C=useSetSelectedSpanId(),R=useSelectedSpanId(),O=useRootSpanIdOfSelectedSpans(),I=oe=>(pe,me)=>(me&&me.type===GraphNodeEvent.Click&&C(me.node.id),oe(pe,me)),N=GraphConfigBuilder.default().registerNode(()=>new GanttNodeConfig({spans:S})).registerPort(()=>new PortConfig).registerEdge(()=>new EdgeConfig).build();previewMode.add(GraphFeatures.ClickNodeToSelect);const[B,j]=useGraphReducer({data:GraphModel.empty(),settings:{features:previewMode,graphConfig:N}},I),F=((J=B.viewport.rect)==null?void 0:J.width)||1200;let V=Number.MAX_SAFE_INTEGER,K=0;S.forEach(oe=>{const pe=Date.parse(oe.start_time??"");peK&&(K=me)});const W=reactExports.useCallback(({span:oe})=>F/(K-V)*(Date.parse(oe.start_time??"")-V),[K,F,V]),X=reactExports.useCallback(({span:oe})=>F/(K-V)*(Date.parse(oe.end_time??"")-Date.parse(oe.start_time??"")),[K,F,V]);return reactExports.useEffect(()=>{O&&(j({type:GraphCanvasEvent.SetData,data:spansToGraphModel(S,{rootSpanId:O,isEdgesHidden:!0,getNodeX:W,getNodeWidth:X,getNodeHeight:()=>24}).selectNodes(oe=>oe.id===O)}),C(O))},[]),reactExports.useEffect(()=>{R&&j({type:GraphNodeEvent.Select,nodes:[R]})},[R]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(GanttTimeline,{startMs:V,endMs:K}),jsxRuntimeExports.jsx(TreeGraph,{state:B,dispatch:j})]})},useNodeDetailClasses=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},headerWrapper:{display:"flex",boxSizing:"border-box",width:"100%",...shorthands.padding("12px","12px",0,"12px"),flexDirection:"row",alignItems:"center",...shorthands.gap("12px")},headerTitle:{flexGrow:1,flexShrink:1,...shorthands.overflow("hidden"),whiteSpace:"nowrap",textOverflow:"ellipsis"},headerItem:{display:"flex",alignItems:"center"},tabDivider:{...shorthands.flex("none"),...shorthands.padding(0,"12px")},content:{...shorthands.flex(1),...shorthands.padding("12px"),...shorthands.overflow("auto")},panels:{...shorthands.padding(0,"10px"),"& th":{textAlign:"left",...shorthands.padding(0,"30px",0,0)}},cardWrapper:{backgroundColor:tokens.colorNeutralBackground3},cardTitle:{fontSize:"16px",fontWeight:600},innerCardWrapper:{...shorthands.padding("16px"),...shorthands.border("1px","solid",tokens.colorNeutralForeground1),...shorthands.borderRadius("8px")}}),useRetrievalNodeDetailClasses=makeStyles({accordionHeader:{"& button":{...shorthands.padding(0),fontWeight:600}}}),getToolTypeFromSpan=S=>{var R;const C=(R=S==null?void 0:S.attributes)==null?void 0:R.span_type;return(C==null?void 0:C.split(".").pop())||"Tool"};function isObject$i(S){return Object.prototype.toString.call(S)==="[object Object]"}function objectSize(S){return Array.isArray(S)?S.length:isObject$i(S)?Object.keys(S).length:0}function stringifyForCopying(S,C){if(typeof S=="string")return S;try{return JSON.stringify(S,(R,O)=>{switch(typeof O){case"bigint":return String(O)+"n";case"number":case"boolean":case"object":case"string":return O;default:return String(O)}},C)}catch(R){return`${R.name}: ${R.message}`||"JSON.stringify failed"}}function isCollapsed(S,C,R,O,I,N){if(N&&N.collapsed!==void 0)return!!N.collapsed;if(typeof O=="boolean")return O;if(typeof O=="number"&&C>O)return!0;const L=objectSize(S);if(typeof O=="function"){const B=safeCall(O,[{node:S,depth:C,indexOrName:R,size:L}]);if(typeof B=="boolean")return B}return!!(Array.isArray(S)&&L>I||isObject$i(S)&&L>I)}function isCollapsed_largeArray(S,C,R,O,I,N){if(N&&N.collapsed!==void 0)return!!N.collapsed;if(typeof O=="boolean")return O;if(typeof O=="number"&&C>O)return!0;const L=Math.ceil(S.length/100);if(typeof O=="function"){const B=safeCall(O,[{node:S,depth:C,indexOrName:R,size:L}]);if(typeof B=="boolean")return B}return!!(Array.isArray(S)&&L>I||isObject$i(S)&&L>I)}function ifDisplay(S,C,R){return typeof S=="boolean"?S:!!(typeof S=="number"&&C>S||S==="collapsed"&&R||S==="expanded"&&!R)}function safeCall(S,C){try{return S(...C)}catch(R){reportError(R)}}function editableAdd(S){if(S===!0||isObject$i(S)&&S.add===!0)return!0}function editableEdit(S){if(S===!0||isObject$i(S)&&S.edit===!0)return!0}function editableDelete(S){if(S===!0||isObject$i(S)&&S.delete===!0)return!0}function isReactComponent(S){return typeof S=="function"}function customAdd(S){return!S||S.add===void 0||!!S.add}function customEdit(S){return!S||S.edit===void 0||!!S.edit}function customDelete(S){return!S||S.delete===void 0||!!S.delete}function customCopy(S){return!S||S.enableClipboard===void 0||!!S.enableClipboard}function customMatchesURL(S){return!S||S.matchesURL===void 0||!!S.matchesURL}function resolveEvalFailedNewValue(S,C){return S==="string"?C.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):C}var _path$8;function _extends$8$1(){return _extends$8$1=Object.assign?Object.assign.bind():function(S){for(var C=1;C{I.stopPropagation();const N=C(S);typeof N=="string"&&N&&navigator.clipboard.writeText(N),O(!0),setTimeout(()=>O(!1),3e3)},className:"json-view--copy"})}function NameValue({indexOrName:S,value:C,depth:R,parent:O,deleteHandle:I,editHandle:N}){return jsxRuntimeExports.jsxs("div",Object.assign({className:"json-view--pair"},{children:[jsxRuntimeExports.jsx("span",Object.assign({className:typeof S=="number"?"json-view--index":"json-view--property"},{children:S})),":"," ",jsxRuntimeExports.jsx(JsonNode,{node:C,depth:R+1,deleteHandle:I,editHandle:N,parent:O,indexOrName:S})]}))}var _path$5,_path2$4;function _extends$5$1(){return _extends$5$1=Object.assign?Object.assign.bind():function(S){for(var C=1;C{S[xe]=Ae,F&&F({newValue:Ae,oldValue:ge,depth:R,src:j,indexOrName:xe,parentType:"array"}),V&&V({type:"edit",depth:R,src:j,indexOrName:xe,parentType:"array"}),K()},[C,F,V,K]),pe=xe=>{S.splice(xe,1),K()},me=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!X&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>J(!0),className:"jv-size-chevron"},{children:[ifDisplay(W,R,X)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(C)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),!X&&B&&customCopy(N)&&jsxRuntimeExports.jsx(CopyButton$2,{node:C})]});return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{children:"["}),me,X?jsxRuntimeExports.jsxs("button",Object.assign({onClick:()=>J(!1),className:"jv-button"},{children:[L," ... ",L+C.length-1]})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:C.map((xe,Ae)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Ae+L,value:xe,depth:R,parent:C,deleteHandle:pe,editHandle:oe},String(O)+String(Ae)))})),jsxRuntimeExports.jsx("span",{children:"]"})]})}function LargeArray({node:S,depth:C,deleteHandle:R,indexOrName:O,customOptions:I}){const N=[];for(let Je=0;Je{xe(isCollapsed_largeArray(S,C,O,L,j,I))},[L,j]);const[Ae,ge]=reactExports.useState(!1),Te=()=>{ge(!1),R&&R(O),V&&V({value:S,depth:C,src:K,indexOrName:O,parentType:"array"}),J&&J({type:"delete",depth:C,src:K,indexOrName:O,parentType:"array"})},[we,ke]=reactExports.useState(!1),Be=()=>{const Je=S;Je.push(null),W&&W({indexOrName:Je.length-1,depth:C,src:K,parentType:"array"}),J&&J({type:"add",indexOrName:Je.length-1,depth:C,src:K,parentType:"array"}),oe()},Ie=Ae||we,je=()=>{ge(!1),ke(!1)},Ke=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!me&&!Ie&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>xe(!0),className:"jv-size-chevron"},{children:[ifDisplay(pe,C,me)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[S.length," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),Ie&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:we?Be:Te}),Ie&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:je}),!me&&!Ie&&B&&customCopy(I)&&jsxRuntimeExports.jsx(CopyButton$2,{node:S}),!me&&!Ie&&editableAdd(F)&&customAdd(I)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{Be()}}),!me&&!Ie&&editableDelete(F)&&customDelete(I)&&R&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>ge(!0)})]});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),Ke,me?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>xe(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:N.map((Je,Xe)=>jsxRuntimeExports.jsx(LargeArrayNode,{originNode:S,node:Je,depth:C,index:Xe,startIndex:Xe*100},String(O)+String(Xe)))})),jsxRuntimeExports.jsx("span",{children:"]"}),me&&ifDisplay(pe,C,me)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>xe(!1),className:"jv-size"},{children:[S.length," Items"]}))]})}function ObjectNode({node:S,depth:C,indexOrName:R,deleteHandle:O,customOptions:I}){if(Array.isArray(S)&&S.length>100)return jsxRuntimeExports.jsx(LargeArray,{node:S,depth:C,indexOrName:R,deleteHandle:O,customOptions:I});const{collapsed:N,enableClipboard:L,collapseObjectsAfterLength:B,editable:j,onDelete:F,src:V,onAdd:K,onEdit:W,onChange:X,forceUpdate:J,displaySize:oe}=reactExports.useContext(JsonViewContext),pe=isObject$i(S),[me,xe]=reactExports.useState(isCollapsed(S,C,R,N,B,I));reactExports.useEffect(()=>{xe(isCollapsed(S,C,R,N,B,I))},[N,B]);const Ae=reactExports.useCallback((Ue,et,dt)=>{Array.isArray(S)?S[+Ue]=et:S&&(S[Ue]=et),W&&W({newValue:et,oldValue:dt,depth:C,src:V,indexOrName:Ue,parentType:pe?"object":"array"}),X&&X({type:"edit",depth:C,src:V,indexOrName:Ue,parentType:pe?"object":"array"}),J()},[S,W,X,J]),ge=Ue=>{Array.isArray(S)?S.splice(+Ue,1):S&&delete S[Ue],J()},[Te,we]=reactExports.useState(!1),ke=()=>{we(!1),O&&O(R),F&&F({value:S,depth:C,src:V,indexOrName:R,parentType:pe?"object":"array"}),X&&X({type:"delete",depth:C,src:V,indexOrName:R,parentType:pe?"object":"array"})},[Be,Ie]=reactExports.useState(!1),je=reactExports.useRef(null),Ke=()=>{var Ue;if(pe){const et=(Ue=je.current)===null||Ue===void 0?void 0:Ue.value;et&&(S[et]=null,je.current&&(je.current.value=""),Ie(!1),K&&K({indexOrName:et,depth:C,src:V,parentType:"object"}),X&&X({type:"add",indexOrName:et,depth:C,src:V,parentType:"object"}))}else if(Array.isArray(S)){const et=S;et.push(null),K&&K({indexOrName:et.length-1,depth:C,src:V,parentType:"array"}),X&&X({type:"add",indexOrName:et.length-1,depth:C,src:V,parentType:"array"})}J()},Je=Ue=>{Ue.key==="Enter"?(Ue.preventDefault(),Ke()):Ue.key==="Escape"&&ot()},Xe=Te||Be,ot=()=>{we(!1),Ie(!1)},tt=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!me&&!Xe&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>xe(!0),className:"jv-size-chevron"},{children:[ifDisplay(oe,C,me)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(S)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),Be&&pe&&jsxRuntimeExports.jsx("input",{className:"json-view--input",placeholder:"property",ref:je,onKeyDown:Je}),Xe&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:Be?Ke:ke}),Xe&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:ot}),!me&&!Xe&&L&&customCopy(I)&&jsxRuntimeExports.jsx(CopyButton$2,{node:S}),!me&&!Xe&&editableAdd(j)&&customAdd(I)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{pe?(Ie(!0),setTimeout(()=>{var Ue;return(Ue=je.current)===null||Ue===void 0?void 0:Ue.focus()})):Ke()}}),!me&&!Xe&&editableDelete(j)&&customDelete(I)&&O&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>we(!0)})]});return Array.isArray(S)?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),tt,me?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>xe(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:S.map((Ue,et)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:et,value:Ue,depth:C,parent:S,deleteHandle:ge,editHandle:Ae},String(R)+String(et)))})),jsxRuntimeExports.jsx("span",{children:"]"}),me&&ifDisplay(oe,C,me)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>xe(!1),className:"jv-size"},{children:[objectSize(S)," Items"]}))]}):pe?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),tt,me?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>xe(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(S).map(([Ue,et])=>jsxRuntimeExports.jsx(NameValue,{indexOrName:Ue,value:et,depth:C,parent:S,deleteHandle:ge,editHandle:Ae},String(R)+String(Ue)))})),jsxRuntimeExports.jsx("span",{children:"}"}),me&&ifDisplay(oe,C,me)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>xe(!1),className:"jv-size"},{children:[objectSize(S)," Items"]}))]}):null}const LongString=React.forwardRef(({str:S,className:C,ctrlClick:R},O)=>{let{collapseStringMode:I,collapseStringsAfterLength:N}=reactExports.useContext(JsonViewContext);const[L,B]=reactExports.useState(!0);N=N>0?N:0;const j=S.replace(/\s+/g," "),F=V=>{(V.ctrlKey||V.metaKey)&&R?R(V):B(!L)};if(S.length<=N)return jsxRuntimeExports.jsxs("span",Object.assign({className:C,onClick:R},{children:['"',S,'"']}));if(I==="address")return S.length<=10?jsxRuntimeExports.jsxs("span",Object.assign({className:C,onClick:R},{children:['"',S,'"']})):jsxRuntimeExports.jsxs("span",Object.assign({onClick:F,className:C+" cursor-pointer"},{children:['"',L?j.slice(0,6)+"..."+j.slice(-4):S,'"']}));if(I==="directly")return jsxRuntimeExports.jsxs("span",Object.assign({onClick:F,className:C+" cursor-pointer"},{children:['"',L?j.slice(0,N)+"...":S,'"']}));if(I==="word"){let V=N,K=N+1,W=j,X=1;for(;;){if(/\W/.test(S[V])){W=S.slice(0,V);break}if(/\W/.test(S[K])){W=S.slice(0,K);break}if(X===6){W=S.slice(0,N);break}X++,V--,K++}return jsxRuntimeExports.jsxs("span",Object.assign({onClick:F,className:C+" cursor-pointer"},{children:['"',L?W+"...":S,'"']}))}return jsxRuntimeExports.jsxs("span",Object.assign({className:C},{children:['"',S,'"']}))});var _path$1;function _extends$1$1(){return _extends$1$1=Object.assign?Object.assign.bind():function(S){for(var C=1;C{setEditing(!0),setTimeout(()=>{var S,C;(S=window.getSelection())===null||S===void 0||S.selectAllChildren(valueRef.current),(C=valueRef.current)===null||C===void 0||C.focus()})},done=reactExports.useCallback(()=>{const newValue=valueRef.current.innerText;try{const evalValue=eval(newValue);editHandle&&editHandle(indexOrName,evalValue,node)}catch(S){const C=resolveEvalFailedNewValue(type,newValue);editHandle&&editHandle(indexOrName,C,node)}setEditing(!1)},[editHandle]),cancel=()=>{setEditing(!1),setDeleting(!1)},deleteHandle=()=>{setDeleting(!1),_deleteHandle&&_deleteHandle(indexOrName),onDelete&&onDelete({value:node,depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object"}),onChange&&onChange({depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object",type:"delete"})},handleKeyDown=reactExports.useCallback(S=>{S.key==="Enter"?(S.preventDefault(),done()):S.key==="Escape"&&cancel()},[done]),isEditing=editing||deleting,ctrlClick=!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle?S=>{(S.ctrlKey||S.metaKey)&&edit()}:void 0,Icons=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[isEditing&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:deleting?deleteHandle:done}),isEditing&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:cancel}),!isEditing&&enableClipboard&&customCopy(customReturn)&&jsxRuntimeExports.jsx(CopyButton$2,{node}),!isEditing&&matchesURL&&type==="string"&&urlRegExp.test(node)&&customMatchesURL(customReturn)&&jsxRuntimeExports.jsx("a",Object.assign({href:node,target:"_blank",className:"json-view--link"},{children:jsxRuntimeExports.jsx(SvgLink,{})})),!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle&&jsxRuntimeExports.jsx(SvgEdit,{className:"json-view--edit",onClick:edit}),!isEditing&&editableDelete(editable)&&customDelete(customReturn)&&_deleteHandle&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>setDeleting(!0)})]});let className="json-view--string";switch(typeof(customReturn==null?void 0:customReturn.className)=="string"&&(className+=" "+customReturn.className),type){case"number":case"bigint":className="json-view--number";break;case"boolean":className="json-view--boolean";break;case"object":className="json-view--null";break}deleting&&(className+=" json-view--deleting");let displayValue=String(node);type==="bigint"&&(displayValue+="n");const EditingElement=reactExports.useMemo(()=>jsxRuntimeExports.jsx("span",{contentEditable:!0,className,dangerouslySetInnerHTML:{__html:type==="string"?`"${displayValue}"`:displayValue},ref:valueRef,onKeyDown:handleKeyDown}),[displayValue,type,handleKeyDown]);return type==="string"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:node.length>collapseStringsAfterLength?jsxRuntimeExports.jsx(LongString,{str:node,ref:valueRef,className,ctrlClick}):jsxRuntimeExports.jsxs("span",Object.assign({className,onClick:ctrlClick},{children:['"',displayValue,'"']})),Icons]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:jsxRuntimeExports.jsx("span",Object.assign({className,onClick:ctrlClick},{children:displayValue})),Icons]})}}const defaultURLRegExp=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,JsonViewContext=reactExports.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",collapseObjectsAfterLength:20,collapsed:!1,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,matchesURL:!1,urlRegExp:defaultURLRegExp});function JsonView({src:S,collapseStringsAfterLength:C=99,collapseStringMode:R="directly",collapseObjectsAfterLength:O=99,collapsed:I,enableClipboard:N=!0,editable:L=!1,onEdit:B,onDelete:j,onAdd:F,onChange:V,dark:K=!1,theme:W="default",customizeNode:X,customizeCopy:J=stringifyForCopying,displaySize:oe,style:pe,className:me,matchesURL:xe=!1,urlRegExp:Ae=defaultURLRegExp}){const[ge,Te]=reactExports.useState(0),we=reactExports.useCallback(()=>Te(ke=>++ke),[]);return jsxRuntimeExports.jsx(JsonViewContext.Provider,Object.assign({value:{src:S,collapseStringsAfterLength:C,collapseStringMode:R,collapseObjectsAfterLength:O,collapsed:I,enableClipboard:N,editable:L,onEdit:B,onDelete:j,onAdd:F,onChange:V,forceUpdate:we,customizeNode:X,customizeCopy:J,displaySize:oe,matchesURL:xe,urlRegExp:Ae}},{children:jsxRuntimeExports.jsx("code",Object.assign({className:"json-view"+(K?" dark":"")+(W&&W!=="default"?" json-view_"+W:"")+(me?" "+me:""),style:pe},{children:jsxRuntimeExports.jsx(JsonNode,{node:S,depth:1})}))}))}const TraceViewThemeContext=reactExports.createContext(!1),useIsDark=()=>reactExports.useContext(TraceViewThemeContext),JsonNodeCard=({title:S,src:C,wrapperStyle:R={}})=>{let O="";if(typeof C=="string")try{O=JSON.parse(C)}catch{O=C}else typeof C=="object"&&(O=C);const I=useIsDark();return jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12,...R},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:S})})}),jsxRuntimeExports.jsx(JsonView,{src:O,theme:"vscode",dark:I})]})},DefaultNodeInfo=()=>{var C,R;const S=useSelectedSpan();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(JsonNodeCard,{title:"Input",src:(C=S==null?void 0:S.attributes)==null?void 0:C.inputs}),jsxRuntimeExports.jsx(JsonNodeCard,{title:"Output",src:(R=S==null?void 0:S.attributes)==null?void 0:R.output})]})},BlockquoteType="blockquote",BreakType="break",CodeType="code",DefinitionType="definition",DeleteType="delete",EmphasisType="emphasis",HeadingType="heading",HtmlType="html";var HtmlContentType;(function(S){S.CDATA="cdata",S.Closing="closing",S.Comment="comment",S.Declaration="declaration",S.Instruction="instruction",S.Open="open"})(HtmlContentType||(HtmlContentType={}));const ImageReferenceType="imageReference",ImageType$1="image",InlineCodeType="inlineCode",LinkReferenceType="linkReference",LinkType="link",ListItemType="listItem";var TaskStatus;(function(S){S.TODO="todo",S.DOING="doing",S.DONE="done"})(TaskStatus||(TaskStatus={}));const ListType="list",ParagraphType$1="paragraph",StrongType="strong",TableType="table",TextType$1="text",ThematicBreakType="thematicBreak";var AsciiCodePoint;(function(S){S[S.NUL=0]="NUL",S[S.SOH=1]="SOH",S[S.STX=2]="STX",S[S.ETX=3]="ETX",S[S.EOT=4]="EOT",S[S.ENQ=5]="ENQ",S[S.ACK=6]="ACK",S[S.BEL=7]="BEL",S[S.BS=8]="BS",S[S.HT=9]="HT",S[S.LF=10]="LF",S[S.VT=11]="VT",S[S.FF=12]="FF",S[S.CR=13]="CR",S[S.SO=14]="SO",S[S.SI=15]="SI",S[S.DLE=16]="DLE",S[S.DC1=17]="DC1",S[S.DC2=18]="DC2",S[S.DC3=19]="DC3",S[S.DC4=20]="DC4",S[S.NAK=21]="NAK",S[S.SYN=22]="SYN",S[S.ETB=23]="ETB",S[S.CAN=24]="CAN",S[S.EM=25]="EM",S[S.SUB=26]="SUB",S[S.ESC=27]="ESC",S[S.FS=28]="FS",S[S.GS=29]="GS",S[S.RS=30]="RS",S[S.US=31]="US",S[S.SPACE=32]="SPACE",S[S.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",S[S.DOUBLE_QUOTE=34]="DOUBLE_QUOTE",S[S.NUMBER_SIGN=35]="NUMBER_SIGN",S[S.DOLLAR_SIGN=36]="DOLLAR_SIGN",S[S.PERCENT_SIGN=37]="PERCENT_SIGN",S[S.AMPERSAND=38]="AMPERSAND",S[S.SINGLE_QUOTE=39]="SINGLE_QUOTE",S[S.OPEN_PARENTHESIS=40]="OPEN_PARENTHESIS",S[S.CLOSE_PARENTHESIS=41]="CLOSE_PARENTHESIS",S[S.ASTERISK=42]="ASTERISK",S[S.PLUS_SIGN=43]="PLUS_SIGN",S[S.COMMA=44]="COMMA",S[S.MINUS_SIGN=45]="MINUS_SIGN",S[S.DOT=46]="DOT",S[S.SLASH=47]="SLASH",S[S.DIGIT0=48]="DIGIT0",S[S.DIGIT1=49]="DIGIT1",S[S.DIGIT2=50]="DIGIT2",S[S.DIGIT3=51]="DIGIT3",S[S.DIGIT4=52]="DIGIT4",S[S.DIGIT5=53]="DIGIT5",S[S.DIGIT6=54]="DIGIT6",S[S.DIGIT7=55]="DIGIT7",S[S.DIGIT8=56]="DIGIT8",S[S.DIGIT9=57]="DIGIT9",S[S.COLON=58]="COLON",S[S.SEMICOLON=59]="SEMICOLON",S[S.OPEN_ANGLE=60]="OPEN_ANGLE",S[S.EQUALS_SIGN=61]="EQUALS_SIGN",S[S.CLOSE_ANGLE=62]="CLOSE_ANGLE",S[S.QUESTION_MARK=63]="QUESTION_MARK",S[S.AT_SIGN=64]="AT_SIGN",S[S.UPPERCASE_A=65]="UPPERCASE_A",S[S.UPPERCASE_B=66]="UPPERCASE_B",S[S.UPPERCASE_C=67]="UPPERCASE_C",S[S.UPPERCASE_D=68]="UPPERCASE_D",S[S.UPPERCASE_E=69]="UPPERCASE_E",S[S.UPPERCASE_F=70]="UPPERCASE_F",S[S.UPPERCASE_G=71]="UPPERCASE_G",S[S.UPPERCASE_H=72]="UPPERCASE_H",S[S.UPPERCASE_I=73]="UPPERCASE_I",S[S.UPPERCASE_J=74]="UPPERCASE_J",S[S.UPPERCASE_K=75]="UPPERCASE_K",S[S.UPPERCASE_L=76]="UPPERCASE_L",S[S.UPPERCASE_M=77]="UPPERCASE_M",S[S.UPPERCASE_N=78]="UPPERCASE_N",S[S.UPPERCASE_O=79]="UPPERCASE_O",S[S.UPPERCASE_P=80]="UPPERCASE_P",S[S.UPPERCASE_Q=81]="UPPERCASE_Q",S[S.UPPERCASE_R=82]="UPPERCASE_R",S[S.UPPERCASE_S=83]="UPPERCASE_S",S[S.UPPERCASE_T=84]="UPPERCASE_T",S[S.UPPERCASE_U=85]="UPPERCASE_U",S[S.UPPERCASE_V=86]="UPPERCASE_V",S[S.UPPERCASE_W=87]="UPPERCASE_W",S[S.UPPERCASE_X=88]="UPPERCASE_X",S[S.UPPERCASE_Y=89]="UPPERCASE_Y",S[S.UPPERCASE_Z=90]="UPPERCASE_Z",S[S.OPEN_BRACKET=91]="OPEN_BRACKET",S[S.BACKSLASH=92]="BACKSLASH",S[S.CLOSE_BRACKET=93]="CLOSE_BRACKET",S[S.CARET=94]="CARET",S[S.UNDERSCORE=95]="UNDERSCORE",S[S.BACKTICK=96]="BACKTICK",S[S.LOWERCASE_A=97]="LOWERCASE_A",S[S.LOWERCASE_B=98]="LOWERCASE_B",S[S.LOWERCASE_C=99]="LOWERCASE_C",S[S.LOWERCASE_D=100]="LOWERCASE_D",S[S.LOWERCASE_E=101]="LOWERCASE_E",S[S.LOWERCASE_F=102]="LOWERCASE_F",S[S.LOWERCASE_G=103]="LOWERCASE_G",S[S.LOWERCASE_H=104]="LOWERCASE_H",S[S.LOWERCASE_I=105]="LOWERCASE_I",S[S.LOWERCASE_J=106]="LOWERCASE_J",S[S.LOWERCASE_K=107]="LOWERCASE_K",S[S.LOWERCASE_L=108]="LOWERCASE_L",S[S.LOWERCASE_M=109]="LOWERCASE_M",S[S.LOWERCASE_N=110]="LOWERCASE_N",S[S.LOWERCASE_O=111]="LOWERCASE_O",S[S.LOWERCASE_P=112]="LOWERCASE_P",S[S.LOWERCASE_Q=113]="LOWERCASE_Q",S[S.LOWERCASE_R=114]="LOWERCASE_R",S[S.LOWERCASE_S=115]="LOWERCASE_S",S[S.LOWERCASE_T=116]="LOWERCASE_T",S[S.LOWERCASE_U=117]="LOWERCASE_U",S[S.LOWERCASE_V=118]="LOWERCASE_V",S[S.LOWERCASE_W=119]="LOWERCASE_W",S[S.LOWERCASE_X=120]="LOWERCASE_X",S[S.LOWERCASE_Y=121]="LOWERCASE_Y",S[S.LOWERCASE_Z=122]="LOWERCASE_Z",S[S.OPEN_BRACE=123]="OPEN_BRACE",S[S.VERTICAL_SLASH=124]="VERTICAL_SLASH",S[S.CLOSE_BRACE=125]="CLOSE_BRACE",S[S.TILDE=126]="TILDE",S[S.DELETE=127]="DELETE"})(AsciiCodePoint||(AsciiCodePoint={}));const foldingCaseCodeMap={µ:"μ",À:"à",Á:"á",Â:"â",Ã:"ã",Ä:"ä",Å:"å",Æ:"æ",Ç:"ç",È:"è",É:"é",Ê:"ê",Ë:"ë",Ì:"ì",Í:"í",Î:"î",Ï:"ï",Ð:"ð",Ñ:"ñ",Ò:"ò",Ó:"ó",Ô:"ô",Õ:"õ",Ö:"ö",Ø:"ø",Ù:"ù",Ú:"ú",Û:"û",Ü:"ü",Ý:"ý",Þ:"þ",Ā:"ā",Ă:"ă",Ą:"ą",Ć:"ć",Ĉ:"ĉ",Ċ:"ċ",Č:"č",Ď:"ď",Đ:"đ",Ē:"ē",Ĕ:"ĕ",Ė:"ė",Ę:"ę",Ě:"ě",Ĝ:"ĝ",Ğ:"ğ",Ġ:"ġ",Ģ:"ģ",Ĥ:"ĥ",Ħ:"ħ",Ĩ:"ĩ",Ī:"ī",Ĭ:"ĭ",Į:"į",IJ:"ij",Ĵ:"ĵ",Ķ:"ķ",Ĺ:"ĺ",Ļ:"ļ",Ľ:"ľ",Ŀ:"ŀ",Ł:"ł",Ń:"ń",Ņ:"ņ",Ň:"ň",Ŋ:"ŋ",Ō:"ō",Ŏ:"ŏ",Ő:"ő",Œ:"œ",Ŕ:"ŕ",Ŗ:"ŗ",Ř:"ř",Ś:"ś",Ŝ:"ŝ",Ş:"ş",Š:"š",Ţ:"ţ",Ť:"ť",Ŧ:"ŧ",Ũ:"ũ",Ū:"ū",Ŭ:"ŭ",Ů:"ů",Ű:"ű",Ų:"ų",Ŵ:"ŵ",Ŷ:"ŷ",Ÿ:"ÿ",Ź:"ź",Ż:"ż",Ž:"ž",ſ:"s",Ɓ:"ɓ",Ƃ:"ƃ",Ƅ:"ƅ",Ɔ:"ɔ",Ƈ:"ƈ",Ɖ:"ɖ",Ɗ:"ɗ",Ƌ:"ƌ",Ǝ:"ǝ",Ə:"ə",Ɛ:"ɛ",Ƒ:"ƒ",Ɠ:"ɠ",Ɣ:"ɣ",Ɩ:"ɩ",Ɨ:"ɨ",Ƙ:"ƙ",Ɯ:"ɯ",Ɲ:"ɲ",Ɵ:"ɵ",Ơ:"ơ",Ƣ:"ƣ",Ƥ:"ƥ",Ʀ:"ʀ",Ƨ:"ƨ",Ʃ:"ʃ",Ƭ:"ƭ",Ʈ:"ʈ",Ư:"ư",Ʊ:"ʊ",Ʋ:"ʋ",Ƴ:"ƴ",Ƶ:"ƶ",Ʒ:"ʒ",Ƹ:"ƹ",Ƽ:"ƽ",DŽ:"dž",Dž:"dž",LJ:"lj",Lj:"lj",NJ:"nj",Nj:"nj",Ǎ:"ǎ",Ǐ:"ǐ",Ǒ:"ǒ",Ǔ:"ǔ",Ǖ:"ǖ",Ǘ:"ǘ",Ǚ:"ǚ",Ǜ:"ǜ",Ǟ:"ǟ",Ǡ:"ǡ",Ǣ:"ǣ",Ǥ:"ǥ",Ǧ:"ǧ",Ǩ:"ǩ",Ǫ:"ǫ",Ǭ:"ǭ",Ǯ:"ǯ",DZ:"dz",Dz:"dz",Ǵ:"ǵ",Ƕ:"ƕ",Ƿ:"ƿ",Ǹ:"ǹ",Ǻ:"ǻ",Ǽ:"ǽ",Ǿ:"ǿ",Ȁ:"ȁ",Ȃ:"ȃ",Ȅ:"ȅ",Ȇ:"ȇ",Ȉ:"ȉ",Ȋ:"ȋ",Ȍ:"ȍ",Ȏ:"ȏ",Ȑ:"ȑ",Ȓ:"ȓ",Ȕ:"ȕ",Ȗ:"ȗ",Ș:"ș",Ț:"ț",Ȝ:"ȝ",Ȟ:"ȟ","Ƞ":"ƞ",Ȣ:"ȣ",Ȥ:"ȥ",Ȧ:"ȧ",Ȩ:"ȩ",Ȫ:"ȫ",Ȭ:"ȭ",Ȯ:"ȯ",Ȱ:"ȱ",Ȳ:"ȳ","Ⱥ":"ⱥ","Ȼ":"ȼ","Ƚ":"ƚ","Ⱦ":"ⱦ","Ɂ":"ɂ","Ƀ":"ƀ","Ʉ":"ʉ","Ʌ":"ʌ","Ɇ":"ɇ","Ɉ":"ɉ","Ɋ":"ɋ","Ɍ":"ɍ","Ɏ":"ɏ","ͅ":"ι","Ͱ":"ͱ","Ͳ":"ͳ","Ͷ":"ͷ","Ϳ":"ϳ",Ά:"ά",Έ:"έ",Ή:"ή",Ί:"ί",Ό:"ό",Ύ:"ύ",Ώ:"ώ",Α:"α",Β:"β",Γ:"γ",Δ:"δ",Ε:"ε",Ζ:"ζ",Η:"η",Θ:"θ",Ι:"ι",Κ:"κ",Λ:"λ",Μ:"μ",Ν:"ν",Ξ:"ξ",Ο:"ο",Π:"π",Ρ:"ρ",Σ:"σ",Τ:"τ",Υ:"υ",Φ:"φ",Χ:"χ",Ψ:"ψ",Ω:"ω",Ϊ:"ϊ",Ϋ:"ϋ",ς:"σ","Ϗ":"ϗ",ϐ:"β",ϑ:"θ",ϕ:"φ",ϖ:"π","Ϙ":"ϙ",Ϛ:"ϛ",Ϝ:"ϝ",Ϟ:"ϟ",Ϡ:"ϡ",Ϣ:"ϣ",Ϥ:"ϥ",Ϧ:"ϧ",Ϩ:"ϩ",Ϫ:"ϫ",Ϭ:"ϭ",Ϯ:"ϯ",ϰ:"κ",ϱ:"ρ","ϴ":"θ","ϵ":"ε","Ϸ":"ϸ","Ϲ":"ϲ","Ϻ":"ϻ","Ͻ":"ͻ","Ͼ":"ͼ","Ͽ":"ͽ",Ѐ:"ѐ",Ё:"ё",Ђ:"ђ",Ѓ:"ѓ",Є:"є",Ѕ:"ѕ",І:"і",Ї:"ї",Ј:"ј",Љ:"љ",Њ:"њ",Ћ:"ћ",Ќ:"ќ",Ѝ:"ѝ",Ў:"ў",Џ:"џ",А:"а",Б:"б",В:"в",Г:"г",Д:"д",Е:"е",Ж:"ж",З:"з",И:"и",Й:"й",К:"к",Л:"л",М:"м",Н:"н",О:"о",П:"п",Р:"р",С:"с",Т:"т",У:"у",Ф:"ф",Х:"х",Ц:"ц",Ч:"ч",Ш:"ш",Щ:"щ",Ъ:"ъ",Ы:"ы",Ь:"ь",Э:"э",Ю:"ю",Я:"я",Ѡ:"ѡ",Ѣ:"ѣ",Ѥ:"ѥ",Ѧ:"ѧ",Ѩ:"ѩ",Ѫ:"ѫ",Ѭ:"ѭ",Ѯ:"ѯ",Ѱ:"ѱ",Ѳ:"ѳ",Ѵ:"ѵ",Ѷ:"ѷ",Ѹ:"ѹ",Ѻ:"ѻ",Ѽ:"ѽ",Ѿ:"ѿ",Ҁ:"ҁ","Ҋ":"ҋ",Ҍ:"ҍ",Ҏ:"ҏ",Ґ:"ґ",Ғ:"ғ",Ҕ:"ҕ",Җ:"җ",Ҙ:"ҙ",Қ:"қ",Ҝ:"ҝ",Ҟ:"ҟ",Ҡ:"ҡ",Ң:"ң",Ҥ:"ҥ",Ҧ:"ҧ",Ҩ:"ҩ",Ҫ:"ҫ",Ҭ:"ҭ",Ү:"ү",Ұ:"ұ",Ҳ:"ҳ",Ҵ:"ҵ",Ҷ:"ҷ",Ҹ:"ҹ",Һ:"һ",Ҽ:"ҽ",Ҿ:"ҿ",Ӏ:"ӏ",Ӂ:"ӂ",Ӄ:"ӄ","Ӆ":"ӆ",Ӈ:"ӈ","Ӊ":"ӊ",Ӌ:"ӌ","Ӎ":"ӎ",Ӑ:"ӑ",Ӓ:"ӓ",Ӕ:"ӕ",Ӗ:"ӗ",Ә:"ә",Ӛ:"ӛ",Ӝ:"ӝ",Ӟ:"ӟ",Ӡ:"ӡ",Ӣ:"ӣ",Ӥ:"ӥ",Ӧ:"ӧ",Ө:"ө",Ӫ:"ӫ",Ӭ:"ӭ",Ӯ:"ӯ",Ӱ:"ӱ",Ӳ:"ӳ",Ӵ:"ӵ","Ӷ":"ӷ",Ӹ:"ӹ","Ӻ":"ӻ","Ӽ":"ӽ","Ӿ":"ӿ","Ԁ":"ԁ","Ԃ":"ԃ","Ԅ":"ԅ","Ԇ":"ԇ","Ԉ":"ԉ","Ԋ":"ԋ","Ԍ":"ԍ","Ԏ":"ԏ","Ԑ":"ԑ","Ԓ":"ԓ","Ԕ":"ԕ","Ԗ":"ԗ","Ԙ":"ԙ","Ԛ":"ԛ","Ԝ":"ԝ","Ԟ":"ԟ","Ԡ":"ԡ","Ԣ":"ԣ","Ԥ":"ԥ","Ԧ":"ԧ","Ԩ":"ԩ","Ԫ":"ԫ","Ԭ":"ԭ","Ԯ":"ԯ",Ա:"ա",Բ:"բ",Գ:"գ",Դ:"դ",Ե:"ե",Զ:"զ",Է:"է",Ը:"ը",Թ:"թ",Ժ:"ժ",Ի:"ի",Լ:"լ",Խ:"խ",Ծ:"ծ",Կ:"կ",Հ:"հ",Ձ:"ձ",Ղ:"ղ",Ճ:"ճ",Մ:"մ",Յ:"յ",Ն:"ն",Շ:"շ",Ո:"ո",Չ:"չ",Պ:"պ",Ջ:"ջ",Ռ:"ռ",Ս:"ս",Վ:"վ",Տ:"տ",Ր:"ր",Ց:"ց",Ւ:"ւ",Փ:"փ",Ք:"ք",Օ:"օ",Ֆ:"ֆ",Ⴀ:"ⴀ",Ⴁ:"ⴁ",Ⴂ:"ⴂ",Ⴃ:"ⴃ",Ⴄ:"ⴄ",Ⴅ:"ⴅ",Ⴆ:"ⴆ",Ⴇ:"ⴇ",Ⴈ:"ⴈ",Ⴉ:"ⴉ",Ⴊ:"ⴊ",Ⴋ:"ⴋ",Ⴌ:"ⴌ",Ⴍ:"ⴍ",Ⴎ:"ⴎ",Ⴏ:"ⴏ",Ⴐ:"ⴐ",Ⴑ:"ⴑ",Ⴒ:"ⴒ",Ⴓ:"ⴓ",Ⴔ:"ⴔ",Ⴕ:"ⴕ",Ⴖ:"ⴖ",Ⴗ:"ⴗ",Ⴘ:"ⴘ",Ⴙ:"ⴙ",Ⴚ:"ⴚ",Ⴛ:"ⴛ",Ⴜ:"ⴜ",Ⴝ:"ⴝ",Ⴞ:"ⴞ",Ⴟ:"ⴟ",Ⴠ:"ⴠ",Ⴡ:"ⴡ",Ⴢ:"ⴢ",Ⴣ:"ⴣ",Ⴤ:"ⴤ",Ⴥ:"ⴥ","Ⴧ":"ⴧ","Ⴭ":"ⴭ",Ḁ:"ḁ",Ḃ:"ḃ",Ḅ:"ḅ",Ḇ:"ḇ",Ḉ:"ḉ",Ḋ:"ḋ",Ḍ:"ḍ",Ḏ:"ḏ",Ḑ:"ḑ",Ḓ:"ḓ",Ḕ:"ḕ",Ḗ:"ḗ",Ḙ:"ḙ",Ḛ:"ḛ",Ḝ:"ḝ",Ḟ:"ḟ",Ḡ:"ḡ",Ḣ:"ḣ",Ḥ:"ḥ",Ḧ:"ḧ",Ḩ:"ḩ",Ḫ:"ḫ",Ḭ:"ḭ",Ḯ:"ḯ",Ḱ:"ḱ",Ḳ:"ḳ",Ḵ:"ḵ",Ḷ:"ḷ",Ḹ:"ḹ",Ḻ:"ḻ",Ḽ:"ḽ",Ḿ:"ḿ",Ṁ:"ṁ",Ṃ:"ṃ",Ṅ:"ṅ",Ṇ:"ṇ",Ṉ:"ṉ",Ṋ:"ṋ",Ṍ:"ṍ",Ṏ:"ṏ",Ṑ:"ṑ",Ṓ:"ṓ",Ṕ:"ṕ",Ṗ:"ṗ",Ṙ:"ṙ",Ṛ:"ṛ",Ṝ:"ṝ",Ṟ:"ṟ",Ṡ:"ṡ",Ṣ:"ṣ",Ṥ:"ṥ",Ṧ:"ṧ",Ṩ:"ṩ",Ṫ:"ṫ",Ṭ:"ṭ",Ṯ:"ṯ",Ṱ:"ṱ",Ṳ:"ṳ",Ṵ:"ṵ",Ṷ:"ṷ",Ṹ:"ṹ",Ṻ:"ṻ",Ṽ:"ṽ",Ṿ:"ṿ",Ẁ:"ẁ",Ẃ:"ẃ",Ẅ:"ẅ",Ẇ:"ẇ",Ẉ:"ẉ",Ẋ:"ẋ",Ẍ:"ẍ",Ẏ:"ẏ",Ẑ:"ẑ",Ẓ:"ẓ",Ẕ:"ẕ",ẛ:"ṡ",Ạ:"ạ",Ả:"ả",Ấ:"ấ",Ầ:"ầ",Ẩ:"ẩ",Ẫ:"ẫ",Ậ:"ậ",Ắ:"ắ",Ằ:"ằ",Ẳ:"ẳ",Ẵ:"ẵ",Ặ:"ặ",Ẹ:"ẹ",Ẻ:"ẻ",Ẽ:"ẽ",Ế:"ế",Ề:"ề",Ể:"ể",Ễ:"ễ",Ệ:"ệ",Ỉ:"ỉ",Ị:"ị",Ọ:"ọ",Ỏ:"ỏ",Ố:"ố",Ồ:"ồ",Ổ:"ổ",Ỗ:"ỗ",Ộ:"ộ",Ớ:"ớ",Ờ:"ờ",Ở:"ở",Ỡ:"ỡ",Ợ:"ợ",Ụ:"ụ",Ủ:"ủ",Ứ:"ứ",Ừ:"ừ",Ử:"ử",Ữ:"ữ",Ự:"ự",Ỳ:"ỳ",Ỵ:"ỵ",Ỷ:"ỷ",Ỹ:"ỹ","Ỻ":"ỻ","Ỽ":"ỽ","Ỿ":"ỿ",Ἀ:"ἀ",Ἁ:"ἁ",Ἂ:"ἂ",Ἃ:"ἃ",Ἄ:"ἄ",Ἅ:"ἅ",Ἆ:"ἆ",Ἇ:"ἇ",Ἐ:"ἐ",Ἑ:"ἑ",Ἒ:"ἒ",Ἓ:"ἓ",Ἔ:"ἔ",Ἕ:"ἕ",Ἠ:"ἠ",Ἡ:"ἡ",Ἢ:"ἢ",Ἣ:"ἣ",Ἤ:"ἤ",Ἥ:"ἥ",Ἦ:"ἦ",Ἧ:"ἧ",Ἰ:"ἰ",Ἱ:"ἱ",Ἲ:"ἲ",Ἳ:"ἳ",Ἴ:"ἴ",Ἵ:"ἵ",Ἶ:"ἶ",Ἷ:"ἷ",Ὀ:"ὀ",Ὁ:"ὁ",Ὂ:"ὂ",Ὃ:"ὃ",Ὄ:"ὄ",Ὅ:"ὅ",Ὑ:"ὑ",Ὓ:"ὓ",Ὕ:"ὕ",Ὗ:"ὗ",Ὠ:"ὠ",Ὡ:"ὡ",Ὢ:"ὢ",Ὣ:"ὣ",Ὤ:"ὤ",Ὥ:"ὥ",Ὦ:"ὦ",Ὧ:"ὧ",Ᾰ:"ᾰ",Ᾱ:"ᾱ",Ὰ:"ὰ",Ά:"ά",ι:"ι",Ὲ:"ὲ",Έ:"έ",Ὴ:"ὴ",Ή:"ή",Ῐ:"ῐ",Ῑ:"ῑ",Ὶ:"ὶ",Ί:"ί",Ῠ:"ῠ",Ῡ:"ῡ",Ὺ:"ὺ",Ύ:"ύ",Ῥ:"ῥ",Ὸ:"ὸ",Ό:"ό",Ὼ:"ὼ",Ώ:"ώ",Ω:"ω",K:"k",Å:"å","Ⅎ":"ⅎ","Ⅰ":"ⅰ","Ⅱ":"ⅱ","Ⅲ":"ⅲ","Ⅳ":"ⅳ","Ⅴ":"ⅴ","Ⅵ":"ⅵ","Ⅶ":"ⅶ","Ⅷ":"ⅷ","Ⅸ":"ⅸ","Ⅹ":"ⅹ","Ⅺ":"ⅺ","Ⅻ":"ⅻ","Ⅼ":"ⅼ","Ⅽ":"ⅽ","Ⅾ":"ⅾ","Ⅿ":"ⅿ","Ↄ":"ↄ","Ⓐ":"ⓐ","Ⓑ":"ⓑ","Ⓒ":"ⓒ","Ⓓ":"ⓓ","Ⓔ":"ⓔ","Ⓕ":"ⓕ","Ⓖ":"ⓖ","Ⓗ":"ⓗ","Ⓘ":"ⓘ","Ⓙ":"ⓙ","Ⓚ":"ⓚ","Ⓛ":"ⓛ","Ⓜ":"ⓜ","Ⓝ":"ⓝ","Ⓞ":"ⓞ","Ⓟ":"ⓟ","Ⓠ":"ⓠ","Ⓡ":"ⓡ","Ⓢ":"ⓢ","Ⓣ":"ⓣ","Ⓤ":"ⓤ","Ⓥ":"ⓥ","Ⓦ":"ⓦ","Ⓧ":"ⓧ","Ⓨ":"ⓨ","Ⓩ":"ⓩ","Ⰰ":"ⰰ","Ⰱ":"ⰱ","Ⰲ":"ⰲ","Ⰳ":"ⰳ","Ⰴ":"ⰴ","Ⰵ":"ⰵ","Ⰶ":"ⰶ","Ⰷ":"ⰷ","Ⰸ":"ⰸ","Ⰹ":"ⰹ","Ⰺ":"ⰺ","Ⰻ":"ⰻ","Ⰼ":"ⰼ","Ⰽ":"ⰽ","Ⰾ":"ⰾ","Ⰿ":"ⰿ","Ⱀ":"ⱀ","Ⱁ":"ⱁ","Ⱂ":"ⱂ","Ⱃ":"ⱃ","Ⱄ":"ⱄ","Ⱅ":"ⱅ","Ⱆ":"ⱆ","Ⱇ":"ⱇ","Ⱈ":"ⱈ","Ⱉ":"ⱉ","Ⱊ":"ⱊ","Ⱋ":"ⱋ","Ⱌ":"ⱌ","Ⱍ":"ⱍ","Ⱎ":"ⱎ","Ⱏ":"ⱏ","Ⱐ":"ⱐ","Ⱑ":"ⱑ","Ⱒ":"ⱒ","Ⱓ":"ⱓ","Ⱔ":"ⱔ","Ⱕ":"ⱕ","Ⱖ":"ⱖ","Ⱗ":"ⱗ","Ⱘ":"ⱘ","Ⱙ":"ⱙ","Ⱚ":"ⱚ","Ⱛ":"ⱛ","Ⱜ":"ⱜ","Ⱝ":"ⱝ","Ⱞ":"ⱞ","Ⱡ":"ⱡ","Ɫ":"ɫ","Ᵽ":"ᵽ","Ɽ":"ɽ","Ⱨ":"ⱨ","Ⱪ":"ⱪ","Ⱬ":"ⱬ","Ɑ":"ɑ","Ɱ":"ɱ","Ɐ":"ɐ","Ɒ":"ɒ","Ⱳ":"ⱳ","Ⱶ":"ⱶ","Ȿ":"ȿ","Ɀ":"ɀ","Ⲁ":"ⲁ","Ⲃ":"ⲃ","Ⲅ":"ⲅ","Ⲇ":"ⲇ","Ⲉ":"ⲉ","Ⲋ":"ⲋ","Ⲍ":"ⲍ","Ⲏ":"ⲏ","Ⲑ":"ⲑ","Ⲓ":"ⲓ","Ⲕ":"ⲕ","Ⲗ":"ⲗ","Ⲙ":"ⲙ","Ⲛ":"ⲛ","Ⲝ":"ⲝ","Ⲟ":"ⲟ","Ⲡ":"ⲡ","Ⲣ":"ⲣ","Ⲥ":"ⲥ","Ⲧ":"ⲧ","Ⲩ":"ⲩ","Ⲫ":"ⲫ","Ⲭ":"ⲭ","Ⲯ":"ⲯ","Ⲱ":"ⲱ","Ⲳ":"ⲳ","Ⲵ":"ⲵ","Ⲷ":"ⲷ","Ⲹ":"ⲹ","Ⲻ":"ⲻ","Ⲽ":"ⲽ","Ⲿ":"ⲿ","Ⳁ":"ⳁ","Ⳃ":"ⳃ","Ⳅ":"ⳅ","Ⳇ":"ⳇ","Ⳉ":"ⳉ","Ⳋ":"ⳋ","Ⳍ":"ⳍ","Ⳏ":"ⳏ","Ⳑ":"ⳑ","Ⳓ":"ⳓ","Ⳕ":"ⳕ","Ⳗ":"ⳗ","Ⳙ":"ⳙ","Ⳛ":"ⳛ","Ⳝ":"ⳝ","Ⳟ":"ⳟ","Ⳡ":"ⳡ","Ⳣ":"ⳣ","Ⳬ":"ⳬ","Ⳮ":"ⳮ","Ⳳ":"ⳳ","Ꙁ":"ꙁ","Ꙃ":"ꙃ","Ꙅ":"ꙅ","Ꙇ":"ꙇ","Ꙉ":"ꙉ","Ꙋ":"ꙋ","Ꙍ":"ꙍ","Ꙏ":"ꙏ","Ꙑ":"ꙑ","Ꙓ":"ꙓ","Ꙕ":"ꙕ","Ꙗ":"ꙗ","Ꙙ":"ꙙ","Ꙛ":"ꙛ","Ꙝ":"ꙝ","Ꙟ":"ꙟ","Ꙡ":"ꙡ","Ꙣ":"ꙣ","Ꙥ":"ꙥ","Ꙧ":"ꙧ","Ꙩ":"ꙩ","Ꙫ":"ꙫ","Ꙭ":"ꙭ","Ꚁ":"ꚁ","Ꚃ":"ꚃ","Ꚅ":"ꚅ","Ꚇ":"ꚇ","Ꚉ":"ꚉ","Ꚋ":"ꚋ","Ꚍ":"ꚍ","Ꚏ":"ꚏ","Ꚑ":"ꚑ","Ꚓ":"ꚓ","Ꚕ":"ꚕ","Ꚗ":"ꚗ","Ꚙ":"ꚙ","Ꚛ":"ꚛ","Ꜣ":"ꜣ","Ꜥ":"ꜥ","Ꜧ":"ꜧ","Ꜩ":"ꜩ","Ꜫ":"ꜫ","Ꜭ":"ꜭ","Ꜯ":"ꜯ","Ꜳ":"ꜳ","Ꜵ":"ꜵ","Ꜷ":"ꜷ","Ꜹ":"ꜹ","Ꜻ":"ꜻ","Ꜽ":"ꜽ","Ꜿ":"ꜿ","Ꝁ":"ꝁ","Ꝃ":"ꝃ","Ꝅ":"ꝅ","Ꝇ":"ꝇ","Ꝉ":"ꝉ","Ꝋ":"ꝋ","Ꝍ":"ꝍ","Ꝏ":"ꝏ","Ꝑ":"ꝑ","Ꝓ":"ꝓ","Ꝕ":"ꝕ","Ꝗ":"ꝗ","Ꝙ":"ꝙ","Ꝛ":"ꝛ","Ꝝ":"ꝝ","Ꝟ":"ꝟ","Ꝡ":"ꝡ","Ꝣ":"ꝣ","Ꝥ":"ꝥ","Ꝧ":"ꝧ","Ꝩ":"ꝩ","Ꝫ":"ꝫ","Ꝭ":"ꝭ","Ꝯ":"ꝯ","Ꝺ":"ꝺ","Ꝼ":"ꝼ","Ᵹ":"ᵹ","Ꝿ":"ꝿ","Ꞁ":"ꞁ","Ꞃ":"ꞃ","Ꞅ":"ꞅ","Ꞇ":"ꞇ","Ꞌ":"ꞌ","Ɥ":"ɥ","Ꞑ":"ꞑ","Ꞓ":"ꞓ","Ꞗ":"ꞗ","Ꞙ":"ꞙ","Ꞛ":"ꞛ","Ꞝ":"ꞝ","Ꞟ":"ꞟ","Ꞡ":"ꞡ","Ꞣ":"ꞣ","Ꞥ":"ꞥ","Ꞧ":"ꞧ","Ꞩ":"ꞩ","Ɦ":"ɦ","Ɜ":"ɜ","Ɡ":"ɡ","Ɬ":"ɬ","Ʞ":"ʞ","Ʇ":"ʇ",A:"a",B:"b",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",J:"j",K:"k",L:"l",M:"m",N:"n",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",U:"u",V:"v",W:"w",X:"x",Y:"y",Z:"z","𐐀":"𐐨","𐐁":"𐐩","𐐂":"𐐪","𐐃":"𐐫","𐐄":"𐐬","𐐅":"𐐭","𐐆":"𐐮","𐐇":"𐐯","𐐈":"𐐰","𐐉":"𐐱","𐐊":"𐐲","𐐋":"𐐳","𐐌":"𐐴","𐐍":"𐐵","𐐎":"𐐶","𐐏":"𐐷","𐐐":"𐐸","𐐑":"𐐹","𐐒":"𐐺","𐐓":"𐐻","𐐔":"𐐼","𐐕":"𐐽","𐐖":"𐐾","𐐗":"𐐿","𐐘":"𐑀","𐐙":"𐑁","𐐚":"𐑂","𐐛":"𐑃","𐐜":"𐑄","𐐝":"𐑅","𐐞":"𐑆","𐐟":"𐑇","𐐠":"𐑈","𐐡":"𐑉","𐐢":"𐑊","𐐣":"𐑋","𐐤":"𐑌","𐐥":"𐑍","𐐦":"𐑎","𐐧":"𐑏","𑢠":"𑣀","𑢡":"𑣁","𑢢":"𑣂","𑢣":"𑣃","𑢤":"𑣄","𑢥":"𑣅","𑢦":"𑣆","𑢧":"𑣇","𑢨":"𑣈","𑢩":"𑣉","𑢪":"𑣊","𑢫":"𑣋","𑢬":"𑣌","𑢭":"𑣍","𑢮":"𑣎","𑢯":"𑣏","𑢰":"𑣐","𑢱":"𑣑","𑢲":"𑣒","𑢳":"𑣓","𑢴":"𑣔","𑢵":"𑣕","𑢶":"𑣖","𑢷":"𑣗","𑢸":"𑣘","𑢹":"𑣙","𑢺":"𑣚","𑢻":"𑣛","𑢼":"𑣜","𑢽":"𑣝","𑢾":"𑣞","𑢿":"𑣟",ß:"ss",İ:"i̇",ʼn:"ʼn",ǰ:"ǰ",ΐ:"ΐ",ΰ:"ΰ",և:"եւ",ẖ:"ẖ",ẗ:"ẗ",ẘ:"ẘ",ẙ:"ẙ",ẚ:"aʾ","ẞ":"ss",ὐ:"ὐ",ὒ:"ὒ",ὔ:"ὔ",ὖ:"ὖ",ᾀ:"ἀι",ᾁ:"ἁι",ᾂ:"ἂι",ᾃ:"ἃι",ᾄ:"ἄι",ᾅ:"ἅι",ᾆ:"ἆι",ᾇ:"ἇι",ᾈ:"ἀι",ᾉ:"ἁι",ᾊ:"ἂι",ᾋ:"ἃι",ᾌ:"ἄι",ᾍ:"ἅι",ᾎ:"ἆι",ᾏ:"ἇι",ᾐ:"ἠι",ᾑ:"ἡι",ᾒ:"ἢι",ᾓ:"ἣι",ᾔ:"ἤι",ᾕ:"ἥι",ᾖ:"ἦι",ᾗ:"ἧι",ᾘ:"ἠι",ᾙ:"ἡι",ᾚ:"ἢι",ᾛ:"ἣι",ᾜ:"ἤι",ᾝ:"ἥι",ᾞ:"ἦι",ᾟ:"ἧι",ᾠ:"ὠι",ᾡ:"ὡι",ᾢ:"ὢι",ᾣ:"ὣι",ᾤ:"ὤι",ᾥ:"ὥι",ᾦ:"ὦι",ᾧ:"ὧι",ᾨ:"ὠι",ᾩ:"ὡι",ᾪ:"ὢι",ᾫ:"ὣι",ᾬ:"ὤι",ᾭ:"ὥι",ᾮ:"ὦι",ᾯ:"ὧι",ᾲ:"ὰι",ᾳ:"αι",ᾴ:"άι",ᾶ:"ᾶ",ᾷ:"ᾶι",ᾼ:"αι",ῂ:"ὴι",ῃ:"ηι",ῄ:"ήι",ῆ:"ῆ",ῇ:"ῆι",ῌ:"ηι",ῒ:"ῒ",ΐ:"ΐ",ῖ:"ῖ",ῗ:"ῗ",ῢ:"ῢ",ΰ:"ΰ",ῤ:"ῤ",ῦ:"ῦ",ῧ:"ῧ",ῲ:"ὼι",ῳ:"ωι",ῴ:"ώι",ῶ:"ῶ",ῷ:"ῶι",ῼ:"ωι",ff:"ff",fi:"fi",fl:"fl",ffi:"ffi",ffl:"ffl",ſt:"st",st:"st",ﬓ:"մն",ﬔ:"մե",ﬕ:"մի",ﬖ:"վն",ﬗ:"մխ"},entityReferences=[{key:[65,69,108,105,103,59],value:"Æ"},{key:[65,77,80,59],value:"&"},{key:[65,97,99,117,116,101,59],value:"Á"},{key:[65,98,114,101,118,101,59],value:"Ă"},{key:[65,99,105,114,99,59],value:"Â"},{key:[65,99,121,59],value:"А"},{key:[65,102,114,59],value:"𝔄"},{key:[65,103,114,97,118,101,59],value:"À"},{key:[65,108,112,104,97,59],value:"Α"},{key:[65,109,97,99,114,59],value:"Ā"},{key:[65,110,100,59],value:"⩓"},{key:[65,111,103,111,110,59],value:"Ą"},{key:[65,111,112,102,59],value:"𝔸"},{key:[65,112,112,108,121,70,117,110,99,116,105,111,110,59],value:"⁡"},{key:[65,114,105,110,103,59],value:"Å"},{key:[65,115,99,114,59],value:"𝒜"},{key:[65,115,115,105,103,110,59],value:"≔"},{key:[65,116,105,108,100,101,59],value:"Ã"},{key:[65,117,109,108,59],value:"Ä"},{key:[66,97,99,107,115,108,97,115,104,59],value:"∖"},{key:[66,97,114,118,59],value:"⫧"},{key:[66,97,114,119,101,100,59],value:"⌆"},{key:[66,99,121,59],value:"Б"},{key:[66,101,99,97,117,115,101,59],value:"∵"},{key:[66,101,114,110,111,117,108,108,105,115,59],value:"ℬ"},{key:[66,101,116,97,59],value:"Β"},{key:[66,102,114,59],value:"𝔅"},{key:[66,111,112,102,59],value:"𝔹"},{key:[66,114,101,118,101,59],value:"˘"},{key:[66,115,99,114,59],value:"ℬ"},{key:[66,117,109,112,101,113,59],value:"≎"},{key:[67,72,99,121,59],value:"Ч"},{key:[67,79,80,89,59],value:"©"},{key:[67,97,99,117,116,101,59],value:"Ć"},{key:[67,97,112,59],value:"⋒"},{key:[67,97,112,105,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59],value:"ⅅ"},{key:[67,97,121,108,101,121,115,59],value:"ℭ"},{key:[67,99,97,114,111,110,59],value:"Č"},{key:[67,99,101,100,105,108,59],value:"Ç"},{key:[67,99,105,114,99,59],value:"Ĉ"},{key:[67,99,111,110,105,110,116,59],value:"∰"},{key:[67,100,111,116,59],value:"Ċ"},{key:[67,101,100,105,108,108,97,59],value:"¸"},{key:[67,101,110,116,101,114,68,111,116,59],value:"·"},{key:[67,102,114,59],value:"ℭ"},{key:[67,104,105,59],value:"Χ"},{key:[67,105,114,99,108,101,68,111,116,59],value:"⊙"},{key:[67,105,114,99,108,101,77,105,110,117,115,59],value:"⊖"},{key:[67,105,114,99,108,101,80,108,117,115,59],value:"⊕"},{key:[67,105,114,99,108,101,84,105,109,101,115,59],value:"⊗"},{key:[67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∲"},{key:[67,108,111,115,101,67,117,114,108,121,68,111,117,98,108,101,81,117,111,116,101,59],value:"”"},{key:[67,108,111,115,101,67,117,114,108,121,81,117,111,116,101,59],value:"’"},{key:[67,111,108,111,110,59],value:"∷"},{key:[67,111,108,111,110,101,59],value:"⩴"},{key:[67,111,110,103,114,117,101,110,116,59],value:"≡"},{key:[67,111,110,105,110,116,59],value:"∯"},{key:[67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∮"},{key:[67,111,112,102,59],value:"ℂ"},{key:[67,111,112,114,111,100,117,99,116,59],value:"∐"},{key:[67,111,117,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∳"},{key:[67,114,111,115,115,59],value:"⨯"},{key:[67,115,99,114,59],value:"𝒞"},{key:[67,117,112,59],value:"⋓"},{key:[67,117,112,67,97,112,59],value:"≍"},{key:[68,68,59],value:"ⅅ"},{key:[68,68,111,116,114,97,104,100,59],value:"⤑"},{key:[68,74,99,121,59],value:"Ђ"},{key:[68,83,99,121,59],value:"Ѕ"},{key:[68,90,99,121,59],value:"Џ"},{key:[68,97,103,103,101,114,59],value:"‡"},{key:[68,97,114,114,59],value:"↡"},{key:[68,97,115,104,118,59],value:"⫤"},{key:[68,99,97,114,111,110,59],value:"Ď"},{key:[68,99,121,59],value:"Д"},{key:[68,101,108,59],value:"∇"},{key:[68,101,108,116,97,59],value:"Δ"},{key:[68,102,114,59],value:"𝔇"},{key:[68,105,97,99,114,105,116,105,99,97,108,65,99,117,116,101,59],value:"´"},{key:[68,105,97,99,114,105,116,105,99,97,108,68,111,116,59],value:"˙"},{key:[68,105,97,99,114,105,116,105,99,97,108,68,111,117,98,108,101,65,99,117,116,101,59],value:"˝"},{key:[68,105,97,99,114,105,116,105,99,97,108,71,114,97,118,101,59],value:"`"},{key:[68,105,97,99,114,105,116,105,99,97,108,84,105,108,100,101,59],value:"˜"},{key:[68,105,97,109,111,110,100,59],value:"⋄"},{key:[68,105,102,102,101,114,101,110,116,105,97,108,68,59],value:"ⅆ"},{key:[68,111,112,102,59],value:"𝔻"},{key:[68,111,116,59],value:"¨"},{key:[68,111,116,68,111,116,59],value:"⃜"},{key:[68,111,116,69,113,117,97,108,59],value:"≐"},{key:[68,111,117,98,108,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59],value:"∯"},{key:[68,111,117,98,108,101,68,111,116,59],value:"¨"},{key:[68,111,117,98,108,101,68,111,119,110,65,114,114,111,119,59],value:"⇓"},{key:[68,111,117,98,108,101,76,101,102,116,65,114,114,111,119,59],value:"⇐"},{key:[68,111,117,98,108,101,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⇔"},{key:[68,111,117,98,108,101,76,101,102,116,84,101,101,59],value:"⫤"},{key:[68,111,117,98,108,101,76,111,110,103,76,101,102,116,65,114,114,111,119,59],value:"⟸"},{key:[68,111,117,98,108,101,76,111,110,103,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⟺"},{key:[68,111,117,98,108,101,76,111,110,103,82,105,103,104,116,65,114,114,111,119,59],value:"⟹"},{key:[68,111,117,98,108,101,82,105,103,104,116,65,114,114,111,119,59],value:"⇒"},{key:[68,111,117,98,108,101,82,105,103,104,116,84,101,101,59],value:"⊨"},{key:[68,111,117,98,108,101,85,112,65,114,114,111,119,59],value:"⇑"},{key:[68,111,117,98,108,101,85,112,68,111,119,110,65,114,114,111,119,59],value:"⇕"},{key:[68,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59],value:"∥"},{key:[68,111,119,110,65,114,114,111,119,59],value:"↓"},{key:[68,111,119,110,65,114,114,111,119,66,97,114,59],value:"⤓"},{key:[68,111,119,110,65,114,114,111,119,85,112,65,114,114,111,119,59],value:"⇵"},{key:[68,111,119,110,66,114,101,118,101,59],value:"̑"},{key:[68,111,119,110,76,101,102,116,82,105,103,104,116,86,101,99,116,111,114,59],value:"⥐"},{key:[68,111,119,110,76,101,102,116,84,101,101,86,101,99,116,111,114,59],value:"⥞"},{key:[68,111,119,110,76,101,102,116,86,101,99,116,111,114,59],value:"↽"},{key:[68,111,119,110,76,101,102,116,86,101,99,116,111,114,66,97,114,59],value:"⥖"},{key:[68,111,119,110,82,105,103,104,116,84,101,101,86,101,99,116,111,114,59],value:"⥟"},{key:[68,111,119,110,82,105,103,104,116,86,101,99,116,111,114,59],value:"⇁"},{key:[68,111,119,110,82,105,103,104,116,86,101,99,116,111,114,66,97,114,59],value:"⥗"},{key:[68,111,119,110,84,101,101,59],value:"⊤"},{key:[68,111,119,110,84,101,101,65,114,114,111,119,59],value:"↧"},{key:[68,111,119,110,97,114,114,111,119,59],value:"⇓"},{key:[68,115,99,114,59],value:"𝒟"},{key:[68,115,116,114,111,107,59],value:"Đ"},{key:[69,78,71,59],value:"Ŋ"},{key:[69,84,72,59],value:"Ð"},{key:[69,97,99,117,116,101,59],value:"É"},{key:[69,99,97,114,111,110,59],value:"Ě"},{key:[69,99,105,114,99,59],value:"Ê"},{key:[69,99,121,59],value:"Э"},{key:[69,100,111,116,59],value:"Ė"},{key:[69,102,114,59],value:"𝔈"},{key:[69,103,114,97,118,101,59],value:"È"},{key:[69,108,101,109,101,110,116,59],value:"∈"},{key:[69,109,97,99,114,59],value:"Ē"},{key:[69,109,112,116,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"◻"},{key:[69,109,112,116,121,86,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"▫"},{key:[69,111,103,111,110,59],value:"Ę"},{key:[69,111,112,102,59],value:"𝔼"},{key:[69,112,115,105,108,111,110,59],value:"Ε"},{key:[69,113,117,97,108,59],value:"⩵"},{key:[69,113,117,97,108,84,105,108,100,101,59],value:"≂"},{key:[69,113,117,105,108,105,98,114,105,117,109,59],value:"⇌"},{key:[69,115,99,114,59],value:"ℰ"},{key:[69,115,105,109,59],value:"⩳"},{key:[69,116,97,59],value:"Η"},{key:[69,117,109,108,59],value:"Ë"},{key:[69,120,105,115,116,115,59],value:"∃"},{key:[69,120,112,111,110,101,110,116,105,97,108,69,59],value:"ⅇ"},{key:[70,99,121,59],value:"Ф"},{key:[70,102,114,59],value:"𝔉"},{key:[70,105,108,108,101,100,83,109,97,108,108,83,113,117,97,114,101,59],value:"◼"},{key:[70,105,108,108,101,100,86,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59],value:"▪"},{key:[70,111,112,102,59],value:"𝔽"},{key:[70,111,114,65,108,108,59],value:"∀"},{key:[70,111,117,114,105,101,114,116,114,102,59],value:"ℱ"},{key:[70,115,99,114,59],value:"ℱ"},{key:[71,74,99,121,59],value:"Ѓ"},{key:[71,84,59],value:">"},{key:[71,97,109,109,97,59],value:"Γ"},{key:[71,97,109,109,97,100,59],value:"Ϝ"},{key:[71,98,114,101,118,101,59],value:"Ğ"},{key:[71,99,101,100,105,108,59],value:"Ģ"},{key:[71,99,105,114,99,59],value:"Ĝ"},{key:[71,99,121,59],value:"Г"},{key:[71,100,111,116,59],value:"Ġ"},{key:[71,102,114,59],value:"𝔊"},{key:[71,103,59],value:"⋙"},{key:[71,111,112,102,59],value:"𝔾"},{key:[71,114,101,97,116,101,114,69,113,117,97,108,59],value:"≥"},{key:[71,114,101,97,116,101,114,69,113,117,97,108,76,101,115,115,59],value:"⋛"},{key:[71,114,101,97,116,101,114,70,117,108,108,69,113,117,97,108,59],value:"≧"},{key:[71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"⪢"},{key:[71,114,101,97,116,101,114,76,101,115,115,59],value:"≷"},{key:[71,114,101,97,116,101,114,83,108,97,110,116,69,113,117,97,108,59],value:"⩾"},{key:[71,114,101,97,116,101,114,84,105,108,100,101,59],value:"≳"},{key:[71,115,99,114,59],value:"𝒢"},{key:[71,116,59],value:"≫"},{key:[72,65,82,68,99,121,59],value:"Ъ"},{key:[72,97,99,101,107,59],value:"ˇ"},{key:[72,97,116,59],value:"^"},{key:[72,99,105,114,99,59],value:"Ĥ"},{key:[72,102,114,59],value:"ℌ"},{key:[72,105,108,98,101,114,116,83,112,97,99,101,59],value:"ℋ"},{key:[72,111,112,102,59],value:"ℍ"},{key:[72,111,114,105,122,111,110,116,97,108,76,105,110,101,59],value:"─"},{key:[72,115,99,114,59],value:"ℋ"},{key:[72,115,116,114,111,107,59],value:"Ħ"},{key:[72,117,109,112,68,111,119,110,72,117,109,112,59],value:"≎"},{key:[72,117,109,112,69,113,117,97,108,59],value:"≏"},{key:[73,69,99,121,59],value:"Е"},{key:[73,74,108,105,103,59],value:"IJ"},{key:[73,79,99,121,59],value:"Ё"},{key:[73,97,99,117,116,101,59],value:"Í"},{key:[73,99,105,114,99,59],value:"Î"},{key:[73,99,121,59],value:"И"},{key:[73,100,111,116,59],value:"İ"},{key:[73,102,114,59],value:"ℑ"},{key:[73,103,114,97,118,101,59],value:"Ì"},{key:[73,109,59],value:"ℑ"},{key:[73,109,97,99,114,59],value:"Ī"},{key:[73,109,97,103,105,110,97,114,121,73,59],value:"ⅈ"},{key:[73,109,112,108,105,101,115,59],value:"⇒"},{key:[73,110,116,59],value:"∬"},{key:[73,110,116,101,103,114,97,108,59],value:"∫"},{key:[73,110,116,101,114,115,101,99,116,105,111,110,59],value:"⋂"},{key:[73,110,118,105,115,105,98,108,101,67,111,109,109,97,59],value:"⁣"},{key:[73,110,118,105,115,105,98,108,101,84,105,109,101,115,59],value:"⁢"},{key:[73,111,103,111,110,59],value:"Į"},{key:[73,111,112,102,59],value:"𝕀"},{key:[73,111,116,97,59],value:"Ι"},{key:[73,115,99,114,59],value:"ℐ"},{key:[73,116,105,108,100,101,59],value:"Ĩ"},{key:[73,117,107,99,121,59],value:"І"},{key:[73,117,109,108,59],value:"Ï"},{key:[74,99,105,114,99,59],value:"Ĵ"},{key:[74,99,121,59],value:"Й"},{key:[74,102,114,59],value:"𝔍"},{key:[74,111,112,102,59],value:"𝕁"},{key:[74,115,99,114,59],value:"𝒥"},{key:[74,115,101,114,99,121,59],value:"Ј"},{key:[74,117,107,99,121,59],value:"Є"},{key:[75,72,99,121,59],value:"Х"},{key:[75,74,99,121,59],value:"Ќ"},{key:[75,97,112,112,97,59],value:"Κ"},{key:[75,99,101,100,105,108,59],value:"Ķ"},{key:[75,99,121,59],value:"К"},{key:[75,102,114,59],value:"𝔎"},{key:[75,111,112,102,59],value:"𝕂"},{key:[75,115,99,114,59],value:"𝒦"},{key:[76,74,99,121,59],value:"Љ"},{key:[76,84,59],value:"<"},{key:[76,97,99,117,116,101,59],value:"Ĺ"},{key:[76,97,109,98,100,97,59],value:"Λ"},{key:[76,97,110,103,59],value:"⟪"},{key:[76,97,112,108,97,99,101,116,114,102,59],value:"ℒ"},{key:[76,97,114,114,59],value:"↞"},{key:[76,99,97,114,111,110,59],value:"Ľ"},{key:[76,99,101,100,105,108,59],value:"Ļ"},{key:[76,99,121,59],value:"Л"},{key:[76,101,102,116,65,110,103,108,101,66,114,97,99,107,101,116,59],value:"⟨"},{key:[76,101,102,116,65,114,114,111,119,59],value:"←"},{key:[76,101,102,116,65,114,114,111,119,66,97,114,59],value:"⇤"},{key:[76,101,102,116,65,114,114,111,119,82,105,103,104,116,65,114,114,111,119,59],value:"⇆"},{key:[76,101,102,116,67,101,105,108,105,110,103,59],value:"⌈"},{key:[76,101,102,116,68,111,117,98,108,101,66,114,97,99,107,101,116,59],value:"⟦"},{key:[76,101,102,116,68,111,119,110,84,101,101,86,101,99,116,111,114,59],value:"⥡"},{key:[76,101,102,116,68,111,119,110,86,101,99,116,111,114,59],value:"⇃"},{key:[76,101,102,116,68,111,119,110,86,101,99,116,111,114,66,97,114,59],value:"⥙"},{key:[76,101,102,116,70,108,111,111,114,59],value:"⌊"},{key:[76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"↔"},{key:[76,101,102,116,82,105,103,104,116,86,101,99,116,111,114,59],value:"⥎"},{key:[76,101,102,116,84,101,101,59],value:"⊣"},{key:[76,101,102,116,84,101,101,65,114,114,111,119,59],value:"↤"},{key:[76,101,102,116,84,101,101,86,101,99,116,111,114,59],value:"⥚"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,59],value:"⊲"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧏"},{key:[76,101,102,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⊴"},{key:[76,101,102,116,85,112,68,111,119,110,86,101,99,116,111,114,59],value:"⥑"},{key:[76,101,102,116,85,112,84,101,101,86,101,99,116,111,114,59],value:"⥠"},{key:[76,101,102,116,85,112,86,101,99,116,111,114,59],value:"↿"},{key:[76,101,102,116,85,112,86,101,99,116,111,114,66,97,114,59],value:"⥘"},{key:[76,101,102,116,86,101,99,116,111,114,59],value:"↼"},{key:[76,101,102,116,86,101,99,116,111,114,66,97,114,59],value:"⥒"},{key:[76,101,102,116,97,114,114,111,119,59],value:"⇐"},{key:[76,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⇔"},{key:[76,101,115,115,69,113,117,97,108,71,114,101,97,116,101,114,59],value:"⋚"},{key:[76,101,115,115,70,117,108,108,69,113,117,97,108,59],value:"≦"},{key:[76,101,115,115,71,114,101,97,116,101,114,59],value:"≶"},{key:[76,101,115,115,76,101,115,115,59],value:"⪡"},{key:[76,101,115,115,83,108,97,110,116,69,113,117,97,108,59],value:"⩽"},{key:[76,101,115,115,84,105,108,100,101,59],value:"≲"},{key:[76,102,114,59],value:"𝔏"},{key:[76,108,59],value:"⋘"},{key:[76,108,101,102,116,97,114,114,111,119,59],value:"⇚"},{key:[76,109,105,100,111,116,59],value:"Ŀ"},{key:[76,111,110,103,76,101,102,116,65,114,114,111,119,59],value:"⟵"},{key:[76,111,110,103,76,101,102,116,82,105,103,104,116,65,114,114,111,119,59],value:"⟷"},{key:[76,111,110,103,82,105,103,104,116,65,114,114,111,119,59],value:"⟶"},{key:[76,111,110,103,108,101,102,116,97,114,114,111,119,59],value:"⟸"},{key:[76,111,110,103,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⟺"},{key:[76,111,110,103,114,105,103,104,116,97,114,114,111,119,59],value:"⟹"},{key:[76,111,112,102,59],value:"𝕃"},{key:[76,111,119,101,114,76,101,102,116,65,114,114,111,119,59],value:"↙"},{key:[76,111,119,101,114,82,105,103,104,116,65,114,114,111,119,59],value:"↘"},{key:[76,115,99,114,59],value:"ℒ"},{key:[76,115,104,59],value:"↰"},{key:[76,115,116,114,111,107,59],value:"Ł"},{key:[76,116,59],value:"≪"},{key:[77,97,112,59],value:"⤅"},{key:[77,99,121,59],value:"М"},{key:[77,101,100,105,117,109,83,112,97,99,101,59],value:" "},{key:[77,101,108,108,105,110,116,114,102,59],value:"ℳ"},{key:[77,102,114,59],value:"𝔐"},{key:[77,105,110,117,115,80,108,117,115,59],value:"∓"},{key:[77,111,112,102,59],value:"𝕄"},{key:[77,115,99,114,59],value:"ℳ"},{key:[77,117,59],value:"Μ"},{key:[78,74,99,121,59],value:"Њ"},{key:[78,97,99,117,116,101,59],value:"Ń"},{key:[78,99,97,114,111,110,59],value:"Ň"},{key:[78,99,101,100,105,108,59],value:"Ņ"},{key:[78,99,121,59],value:"Н"},{key:[78,101,103,97,116,105,118,101,77,101,100,105,117,109,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,84,104,105,99,107,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,84,104,105,110,83,112,97,99,101,59],value:"​"},{key:[78,101,103,97,116,105,118,101,86,101,114,121,84,104,105,110,83,112,97,99,101,59],value:"​"},{key:[78,101,115,116,101,100,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"≫"},{key:[78,101,115,116,101,100,76,101,115,115,76,101,115,115,59],value:"≪"},{key:[78,101,119,76,105,110,101,59],value:` -`},{key:[78,102,114,59],value:"𝔑"},{key:[78,111,66,114,101,97,107,59],value:"⁠"},{key:[78,111,110,66,114,101,97,107,105,110,103,83,112,97,99,101,59],value:" "},{key:[78,111,112,102,59],value:"ℕ"},{key:[78,111,116,59],value:"⫬"},{key:[78,111,116,67,111,110,103,114,117,101,110,116,59],value:"≢"},{key:[78,111,116,67,117,112,67,97,112,59],value:"≭"},{key:[78,111,116,68,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59],value:"∦"},{key:[78,111,116,69,108,101,109,101,110,116,59],value:"∉"},{key:[78,111,116,69,113,117,97,108,59],value:"≠"},{key:[78,111,116,69,113,117,97,108,84,105,108,100,101,59],value:"≂̸"},{key:[78,111,116,69,120,105,115,116,115,59],value:"∄"},{key:[78,111,116,71,114,101,97,116,101,114,59],value:"≯"},{key:[78,111,116,71,114,101,97,116,101,114,69,113,117,97,108,59],value:"≱"},{key:[78,111,116,71,114,101,97,116,101,114,70,117,108,108,69,113,117,97,108,59],value:"≧̸"},{key:[78,111,116,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"≫̸"},{key:[78,111,116,71,114,101,97,116,101,114,76,101,115,115,59],value:"≹"},{key:[78,111,116,71,114,101,97,116,101,114,83,108,97,110,116,69,113,117,97,108,59],value:"⩾̸"},{key:[78,111,116,71,114,101,97,116,101,114,84,105,108,100,101,59],value:"≵"},{key:[78,111,116,72,117,109,112,68,111,119,110,72,117,109,112,59],value:"≎̸"},{key:[78,111,116,72,117,109,112,69,113,117,97,108,59],value:"≏̸"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,59],value:"⋪"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧏̸"},{key:[78,111,116,76,101,102,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⋬"},{key:[78,111,116,76,101,115,115,59],value:"≮"},{key:[78,111,116,76,101,115,115,69,113,117,97,108,59],value:"≰"},{key:[78,111,116,76,101,115,115,71,114,101,97,116,101,114,59],value:"≸"},{key:[78,111,116,76,101,115,115,76,101,115,115,59],value:"≪̸"},{key:[78,111,116,76,101,115,115,83,108,97,110,116,69,113,117,97,108,59],value:"⩽̸"},{key:[78,111,116,76,101,115,115,84,105,108,100,101,59],value:"≴"},{key:[78,111,116,78,101,115,116,101,100,71,114,101,97,116,101,114,71,114,101,97,116,101,114,59],value:"⪢̸"},{key:[78,111,116,78,101,115,116,101,100,76,101,115,115,76,101,115,115,59],value:"⪡̸"},{key:[78,111,116,80,114,101,99,101,100,101,115,59],value:"⊀"},{key:[78,111,116,80,114,101,99,101,100,101,115,69,113,117,97,108,59],value:"⪯̸"},{key:[78,111,116,80,114,101,99,101,100,101,115,83,108,97,110,116,69,113,117,97,108,59],value:"⋠"},{key:[78,111,116,82,101,118,101,114,115,101,69,108,101,109,101,110,116,59],value:"∌"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,59],value:"⋫"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧐̸"},{key:[78,111,116,82,105,103,104,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⋭"},{key:[78,111,116,83,113,117,97,114,101,83,117,98,115,101,116,59],value:"⊏̸"},{key:[78,111,116,83,113,117,97,114,101,83,117,98,115,101,116,69,113,117,97,108,59],value:"⋢"},{key:[78,111,116,83,113,117,97,114,101,83,117,112,101,114,115,101,116,59],value:"⊐̸"},{key:[78,111,116,83,113,117,97,114,101,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⋣"},{key:[78,111,116,83,117,98,115,101,116,59],value:"⊂⃒"},{key:[78,111,116,83,117,98,115,101,116,69,113,117,97,108,59],value:"⊈"},{key:[78,111,116,83,117,99,99,101,101,100,115,59],value:"⊁"},{key:[78,111,116,83,117,99,99,101,101,100,115,69,113,117,97,108,59],value:"⪰̸"},{key:[78,111,116,83,117,99,99,101,101,100,115,83,108,97,110,116,69,113,117,97,108,59],value:"⋡"},{key:[78,111,116,83,117,99,99,101,101,100,115,84,105,108,100,101,59],value:"≿̸"},{key:[78,111,116,83,117,112,101,114,115,101,116,59],value:"⊃⃒"},{key:[78,111,116,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊉"},{key:[78,111,116,84,105,108,100,101,59],value:"≁"},{key:[78,111,116,84,105,108,100,101,69,113,117,97,108,59],value:"≄"},{key:[78,111,116,84,105,108,100,101,70,117,108,108,69,113,117,97,108,59],value:"≇"},{key:[78,111,116,84,105,108,100,101,84,105,108,100,101,59],value:"≉"},{key:[78,111,116,86,101,114,116,105,99,97,108,66,97,114,59],value:"∤"},{key:[78,115,99,114,59],value:"𝒩"},{key:[78,116,105,108,100,101,59],value:"Ñ"},{key:[78,117,59],value:"Ν"},{key:[79,69,108,105,103,59],value:"Œ"},{key:[79,97,99,117,116,101,59],value:"Ó"},{key:[79,99,105,114,99,59],value:"Ô"},{key:[79,99,121,59],value:"О"},{key:[79,100,98,108,97,99,59],value:"Ő"},{key:[79,102,114,59],value:"𝔒"},{key:[79,103,114,97,118,101,59],value:"Ò"},{key:[79,109,97,99,114,59],value:"Ō"},{key:[79,109,101,103,97,59],value:"Ω"},{key:[79,109,105,99,114,111,110,59],value:"Ο"},{key:[79,111,112,102,59],value:"𝕆"},{key:[79,112,101,110,67,117,114,108,121,68,111,117,98,108,101,81,117,111,116,101,59],value:"“"},{key:[79,112,101,110,67,117,114,108,121,81,117,111,116,101,59],value:"‘"},{key:[79,114,59],value:"⩔"},{key:[79,115,99,114,59],value:"𝒪"},{key:[79,115,108,97,115,104,59],value:"Ø"},{key:[79,116,105,108,100,101,59],value:"Õ"},{key:[79,116,105,109,101,115,59],value:"⨷"},{key:[79,117,109,108,59],value:"Ö"},{key:[79,118,101,114,66,97,114,59],value:"‾"},{key:[79,118,101,114,66,114,97,99,101,59],value:"⏞"},{key:[79,118,101,114,66,114,97,99,107,101,116,59],value:"⎴"},{key:[79,118,101,114,80,97,114,101,110,116,104,101,115,105,115,59],value:"⏜"},{key:[80,97,114,116,105,97,108,68,59],value:"∂"},{key:[80,99,121,59],value:"П"},{key:[80,102,114,59],value:"𝔓"},{key:[80,104,105,59],value:"Φ"},{key:[80,105,59],value:"Π"},{key:[80,108,117,115,77,105,110,117,115,59],value:"±"},{key:[80,111,105,110,99,97,114,101,112,108,97,110,101,59],value:"ℌ"},{key:[80,111,112,102,59],value:"ℙ"},{key:[80,114,59],value:"⪻"},{key:[80,114,101,99,101,100,101,115,59],value:"≺"},{key:[80,114,101,99,101,100,101,115,69,113,117,97,108,59],value:"⪯"},{key:[80,114,101,99,101,100,101,115,83,108,97,110,116,69,113,117,97,108,59],value:"≼"},{key:[80,114,101,99,101,100,101,115,84,105,108,100,101,59],value:"≾"},{key:[80,114,105,109,101,59],value:"″"},{key:[80,114,111,100,117,99,116,59],value:"∏"},{key:[80,114,111,112,111,114,116,105,111,110,59],value:"∷"},{key:[80,114,111,112,111,114,116,105,111,110,97,108,59],value:"∝"},{key:[80,115,99,114,59],value:"𝒫"},{key:[80,115,105,59],value:"Ψ"},{key:[81,85,79,84,59],value:'"'},{key:[81,102,114,59],value:"𝔔"},{key:[81,111,112,102,59],value:"ℚ"},{key:[81,115,99,114,59],value:"𝒬"},{key:[82,66,97,114,114,59],value:"⤐"},{key:[82,69,71,59],value:"®"},{key:[82,97,99,117,116,101,59],value:"Ŕ"},{key:[82,97,110,103,59],value:"⟫"},{key:[82,97,114,114,59],value:"↠"},{key:[82,97,114,114,116,108,59],value:"⤖"},{key:[82,99,97,114,111,110,59],value:"Ř"},{key:[82,99,101,100,105,108,59],value:"Ŗ"},{key:[82,99,121,59],value:"Р"},{key:[82,101,59],value:"ℜ"},{key:[82,101,118,101,114,115,101,69,108,101,109,101,110,116,59],value:"∋"},{key:[82,101,118,101,114,115,101,69,113,117,105,108,105,98,114,105,117,109,59],value:"⇋"},{key:[82,101,118,101,114,115,101,85,112,69,113,117,105,108,105,98,114,105,117,109,59],value:"⥯"},{key:[82,102,114,59],value:"ℜ"},{key:[82,104,111,59],value:"Ρ"},{key:[82,105,103,104,116,65,110,103,108,101,66,114,97,99,107,101,116,59],value:"⟩"},{key:[82,105,103,104,116,65,114,114,111,119,59],value:"→"},{key:[82,105,103,104,116,65,114,114,111,119,66,97,114,59],value:"⇥"},{key:[82,105,103,104,116,65,114,114,111,119,76,101,102,116,65,114,114,111,119,59],value:"⇄"},{key:[82,105,103,104,116,67,101,105,108,105,110,103,59],value:"⌉"},{key:[82,105,103,104,116,68,111,117,98,108,101,66,114,97,99,107,101,116,59],value:"⟧"},{key:[82,105,103,104,116,68,111,119,110,84,101,101,86,101,99,116,111,114,59],value:"⥝"},{key:[82,105,103,104,116,68,111,119,110,86,101,99,116,111,114,59],value:"⇂"},{key:[82,105,103,104,116,68,111,119,110,86,101,99,116,111,114,66,97,114,59],value:"⥕"},{key:[82,105,103,104,116,70,108,111,111,114,59],value:"⌋"},{key:[82,105,103,104,116,84,101,101,59],value:"⊢"},{key:[82,105,103,104,116,84,101,101,65,114,114,111,119,59],value:"↦"},{key:[82,105,103,104,116,84,101,101,86,101,99,116,111,114,59],value:"⥛"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,59],value:"⊳"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,66,97,114,59],value:"⧐"},{key:[82,105,103,104,116,84,114,105,97,110,103,108,101,69,113,117,97,108,59],value:"⊵"},{key:[82,105,103,104,116,85,112,68,111,119,110,86,101,99,116,111,114,59],value:"⥏"},{key:[82,105,103,104,116,85,112,84,101,101,86,101,99,116,111,114,59],value:"⥜"},{key:[82,105,103,104,116,85,112,86,101,99,116,111,114,59],value:"↾"},{key:[82,105,103,104,116,85,112,86,101,99,116,111,114,66,97,114,59],value:"⥔"},{key:[82,105,103,104,116,86,101,99,116,111,114,59],value:"⇀"},{key:[82,105,103,104,116,86,101,99,116,111,114,66,97,114,59],value:"⥓"},{key:[82,105,103,104,116,97,114,114,111,119,59],value:"⇒"},{key:[82,111,112,102,59],value:"ℝ"},{key:[82,111,117,110,100,73,109,112,108,105,101,115,59],value:"⥰"},{key:[82,114,105,103,104,116,97,114,114,111,119,59],value:"⇛"},{key:[82,115,99,114,59],value:"ℛ"},{key:[82,115,104,59],value:"↱"},{key:[82,117,108,101,68,101,108,97,121,101,100,59],value:"⧴"},{key:[83,72,67,72,99,121,59],value:"Щ"},{key:[83,72,99,121,59],value:"Ш"},{key:[83,79,70,84,99,121,59],value:"Ь"},{key:[83,97,99,117,116,101,59],value:"Ś"},{key:[83,99,59],value:"⪼"},{key:[83,99,97,114,111,110,59],value:"Š"},{key:[83,99,101,100,105,108,59],value:"Ş"},{key:[83,99,105,114,99,59],value:"Ŝ"},{key:[83,99,121,59],value:"С"},{key:[83,102,114,59],value:"𝔖"},{key:[83,104,111,114,116,68,111,119,110,65,114,114,111,119,59],value:"↓"},{key:[83,104,111,114,116,76,101,102,116,65,114,114,111,119,59],value:"←"},{key:[83,104,111,114,116,82,105,103,104,116,65,114,114,111,119,59],value:"→"},{key:[83,104,111,114,116,85,112,65,114,114,111,119,59],value:"↑"},{key:[83,105,103,109,97,59],value:"Σ"},{key:[83,109,97,108,108,67,105,114,99,108,101,59],value:"∘"},{key:[83,111,112,102,59],value:"𝕊"},{key:[83,113,114,116,59],value:"√"},{key:[83,113,117,97,114,101,59],value:"□"},{key:[83,113,117,97,114,101,73,110,116,101,114,115,101,99,116,105,111,110,59],value:"⊓"},{key:[83,113,117,97,114,101,83,117,98,115,101,116,59],value:"⊏"},{key:[83,113,117,97,114,101,83,117,98,115,101,116,69,113,117,97,108,59],value:"⊑"},{key:[83,113,117,97,114,101,83,117,112,101,114,115,101,116,59],value:"⊐"},{key:[83,113,117,97,114,101,83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊒"},{key:[83,113,117,97,114,101,85,110,105,111,110,59],value:"⊔"},{key:[83,115,99,114,59],value:"𝒮"},{key:[83,116,97,114,59],value:"⋆"},{key:[83,117,98,59],value:"⋐"},{key:[83,117,98,115,101,116,59],value:"⋐"},{key:[83,117,98,115,101,116,69,113,117,97,108,59],value:"⊆"},{key:[83,117,99,99,101,101,100,115,59],value:"≻"},{key:[83,117,99,99,101,101,100,115,69,113,117,97,108,59],value:"⪰"},{key:[83,117,99,99,101,101,100,115,83,108,97,110,116,69,113,117,97,108,59],value:"≽"},{key:[83,117,99,99,101,101,100,115,84,105,108,100,101,59],value:"≿"},{key:[83,117,99,104,84,104,97,116,59],value:"∋"},{key:[83,117,109,59],value:"∑"},{key:[83,117,112,59],value:"⋑"},{key:[83,117,112,101,114,115,101,116,59],value:"⊃"},{key:[83,117,112,101,114,115,101,116,69,113,117,97,108,59],value:"⊇"},{key:[83,117,112,115,101,116,59],value:"⋑"},{key:[84,72,79,82,78,59],value:"Þ"},{key:[84,82,65,68,69,59],value:"™"},{key:[84,83,72,99,121,59],value:"Ћ"},{key:[84,83,99,121,59],value:"Ц"},{key:[84,97,98,59],value:" "},{key:[84,97,117,59],value:"Τ"},{key:[84,99,97,114,111,110,59],value:"Ť"},{key:[84,99,101,100,105,108,59],value:"Ţ"},{key:[84,99,121,59],value:"Т"},{key:[84,102,114,59],value:"𝔗"},{key:[84,104,101,114,101,102,111,114,101,59],value:"∴"},{key:[84,104,101,116,97,59],value:"Θ"},{key:[84,104,105,99,107,83,112,97,99,101,59],value:"  "},{key:[84,104,105,110,83,112,97,99,101,59],value:" "},{key:[84,105,108,100,101,59],value:"∼"},{key:[84,105,108,100,101,69,113,117,97,108,59],value:"≃"},{key:[84,105,108,100,101,70,117,108,108,69,113,117,97,108,59],value:"≅"},{key:[84,105,108,100,101,84,105,108,100,101,59],value:"≈"},{key:[84,111,112,102,59],value:"𝕋"},{key:[84,114,105,112,108,101,68,111,116,59],value:"⃛"},{key:[84,115,99,114,59],value:"𝒯"},{key:[84,115,116,114,111,107,59],value:"Ŧ"},{key:[85,97,99,117,116,101,59],value:"Ú"},{key:[85,97,114,114,59],value:"↟"},{key:[85,97,114,114,111,99,105,114,59],value:"⥉"},{key:[85,98,114,99,121,59],value:"Ў"},{key:[85,98,114,101,118,101,59],value:"Ŭ"},{key:[85,99,105,114,99,59],value:"Û"},{key:[85,99,121,59],value:"У"},{key:[85,100,98,108,97,99,59],value:"Ű"},{key:[85,102,114,59],value:"𝔘"},{key:[85,103,114,97,118,101,59],value:"Ù"},{key:[85,109,97,99,114,59],value:"Ū"},{key:[85,110,100,101,114,66,97,114,59],value:"_"},{key:[85,110,100,101,114,66,114,97,99,101,59],value:"⏟"},{key:[85,110,100,101,114,66,114,97,99,107,101,116,59],value:"⎵"},{key:[85,110,100,101,114,80,97,114,101,110,116,104,101,115,105,115,59],value:"⏝"},{key:[85,110,105,111,110,59],value:"⋃"},{key:[85,110,105,111,110,80,108,117,115,59],value:"⊎"},{key:[85,111,103,111,110,59],value:"Ų"},{key:[85,111,112,102,59],value:"𝕌"},{key:[85,112,65,114,114,111,119,59],value:"↑"},{key:[85,112,65,114,114,111,119,66,97,114,59],value:"⤒"},{key:[85,112,65,114,114,111,119,68,111,119,110,65,114,114,111,119,59],value:"⇅"},{key:[85,112,68,111,119,110,65,114,114,111,119,59],value:"↕"},{key:[85,112,69,113,117,105,108,105,98,114,105,117,109,59],value:"⥮"},{key:[85,112,84,101,101,59],value:"⊥"},{key:[85,112,84,101,101,65,114,114,111,119,59],value:"↥"},{key:[85,112,97,114,114,111,119,59],value:"⇑"},{key:[85,112,100,111,119,110,97,114,114,111,119,59],value:"⇕"},{key:[85,112,112,101,114,76,101,102,116,65,114,114,111,119,59],value:"↖"},{key:[85,112,112,101,114,82,105,103,104,116,65,114,114,111,119,59],value:"↗"},{key:[85,112,115,105,59],value:"ϒ"},{key:[85,112,115,105,108,111,110,59],value:"Υ"},{key:[85,114,105,110,103,59],value:"Ů"},{key:[85,115,99,114,59],value:"𝒰"},{key:[85,116,105,108,100,101,59],value:"Ũ"},{key:[85,117,109,108,59],value:"Ü"},{key:[86,68,97,115,104,59],value:"⊫"},{key:[86,98,97,114,59],value:"⫫"},{key:[86,99,121,59],value:"В"},{key:[86,100,97,115,104,59],value:"⊩"},{key:[86,100,97,115,104,108,59],value:"⫦"},{key:[86,101,101,59],value:"⋁"},{key:[86,101,114,98,97,114,59],value:"‖"},{key:[86,101,114,116,59],value:"‖"},{key:[86,101,114,116,105,99,97,108,66,97,114,59],value:"∣"},{key:[86,101,114,116,105,99,97,108,76,105,110,101,59],value:"|"},{key:[86,101,114,116,105,99,97,108,83,101,112,97,114,97,116,111,114,59],value:"❘"},{key:[86,101,114,116,105,99,97,108,84,105,108,100,101,59],value:"≀"},{key:[86,101,114,121,84,104,105,110,83,112,97,99,101,59],value:" "},{key:[86,102,114,59],value:"𝔙"},{key:[86,111,112,102,59],value:"𝕍"},{key:[86,115,99,114,59],value:"𝒱"},{key:[86,118,100,97,115,104,59],value:"⊪"},{key:[87,99,105,114,99,59],value:"Ŵ"},{key:[87,101,100,103,101,59],value:"⋀"},{key:[87,102,114,59],value:"𝔚"},{key:[87,111,112,102,59],value:"𝕎"},{key:[87,115,99,114,59],value:"𝒲"},{key:[88,102,114,59],value:"𝔛"},{key:[88,105,59],value:"Ξ"},{key:[88,111,112,102,59],value:"𝕏"},{key:[88,115,99,114,59],value:"𝒳"},{key:[89,65,99,121,59],value:"Я"},{key:[89,73,99,121,59],value:"Ї"},{key:[89,85,99,121,59],value:"Ю"},{key:[89,97,99,117,116,101,59],value:"Ý"},{key:[89,99,105,114,99,59],value:"Ŷ"},{key:[89,99,121,59],value:"Ы"},{key:[89,102,114,59],value:"𝔜"},{key:[89,111,112,102,59],value:"𝕐"},{key:[89,115,99,114,59],value:"𝒴"},{key:[89,117,109,108,59],value:"Ÿ"},{key:[90,72,99,121,59],value:"Ж"},{key:[90,97,99,117,116,101,59],value:"Ź"},{key:[90,99,97,114,111,110,59],value:"Ž"},{key:[90,99,121,59],value:"З"},{key:[90,100,111,116,59],value:"Ż"},{key:[90,101,114,111,87,105,100,116,104,83,112,97,99,101,59],value:"​"},{key:[90,101,116,97,59],value:"Ζ"},{key:[90,102,114,59],value:"ℨ"},{key:[90,111,112,102,59],value:"ℤ"},{key:[90,115,99,114,59],value:"𝒵"},{key:[97,97,99,117,116,101,59],value:"á"},{key:[97,98,114,101,118,101,59],value:"ă"},{key:[97,99,59],value:"∾"},{key:[97,99,69,59],value:"∾̳"},{key:[97,99,100,59],value:"∿"},{key:[97,99,105,114,99,59],value:"â"},{key:[97,99,117,116,101,59],value:"´"},{key:[97,99,121,59],value:"а"},{key:[97,101,108,105,103,59],value:"æ"},{key:[97,102,59],value:"⁡"},{key:[97,102,114,59],value:"𝔞"},{key:[97,103,114,97,118,101,59],value:"à"},{key:[97,108,101,102,115,121,109,59],value:"ℵ"},{key:[97,108,101,112,104,59],value:"ℵ"},{key:[97,108,112,104,97,59],value:"α"},{key:[97,109,97,99,114,59],value:"ā"},{key:[97,109,97,108,103,59],value:"⨿"},{key:[97,109,112,59],value:"&"},{key:[97,110,100,59],value:"∧"},{key:[97,110,100,97,110,100,59],value:"⩕"},{key:[97,110,100,100,59],value:"⩜"},{key:[97,110,100,115,108,111,112,101,59],value:"⩘"},{key:[97,110,100,118,59],value:"⩚"},{key:[97,110,103,59],value:"∠"},{key:[97,110,103,101,59],value:"⦤"},{key:[97,110,103,108,101,59],value:"∠"},{key:[97,110,103,109,115,100,59],value:"∡"},{key:[97,110,103,109,115,100,97,97,59],value:"⦨"},{key:[97,110,103,109,115,100,97,98,59],value:"⦩"},{key:[97,110,103,109,115,100,97,99,59],value:"⦪"},{key:[97,110,103,109,115,100,97,100,59],value:"⦫"},{key:[97,110,103,109,115,100,97,101,59],value:"⦬"},{key:[97,110,103,109,115,100,97,102,59],value:"⦭"},{key:[97,110,103,109,115,100,97,103,59],value:"⦮"},{key:[97,110,103,109,115,100,97,104,59],value:"⦯"},{key:[97,110,103,114,116,59],value:"∟"},{key:[97,110,103,114,116,118,98,59],value:"⊾"},{key:[97,110,103,114,116,118,98,100,59],value:"⦝"},{key:[97,110,103,115,112,104,59],value:"∢"},{key:[97,110,103,115,116,59],value:"Å"},{key:[97,110,103,122,97,114,114,59],value:"⍼"},{key:[97,111,103,111,110,59],value:"ą"},{key:[97,111,112,102,59],value:"𝕒"},{key:[97,112,59],value:"≈"},{key:[97,112,69,59],value:"⩰"},{key:[97,112,97,99,105,114,59],value:"⩯"},{key:[97,112,101,59],value:"≊"},{key:[97,112,105,100,59],value:"≋"},{key:[97,112,111,115,59],value:"'"},{key:[97,112,112,114,111,120,59],value:"≈"},{key:[97,112,112,114,111,120,101,113,59],value:"≊"},{key:[97,114,105,110,103,59],value:"å"},{key:[97,115,99,114,59],value:"𝒶"},{key:[97,115,116,59],value:"*"},{key:[97,115,121,109,112,59],value:"≈"},{key:[97,115,121,109,112,101,113,59],value:"≍"},{key:[97,116,105,108,100,101,59],value:"ã"},{key:[97,117,109,108,59],value:"ä"},{key:[97,119,99,111,110,105,110,116,59],value:"∳"},{key:[97,119,105,110,116,59],value:"⨑"},{key:[98,78,111,116,59],value:"⫭"},{key:[98,97,99,107,99,111,110,103,59],value:"≌"},{key:[98,97,99,107,101,112,115,105,108,111,110,59],value:"϶"},{key:[98,97,99,107,112,114,105,109,101,59],value:"‵"},{key:[98,97,99,107,115,105,109,59],value:"∽"},{key:[98,97,99,107,115,105,109,101,113,59],value:"⋍"},{key:[98,97,114,118,101,101,59],value:"⊽"},{key:[98,97,114,119,101,100,59],value:"⌅"},{key:[98,97,114,119,101,100,103,101,59],value:"⌅"},{key:[98,98,114,107,59],value:"⎵"},{key:[98,98,114,107,116,98,114,107,59],value:"⎶"},{key:[98,99,111,110,103,59],value:"≌"},{key:[98,99,121,59],value:"б"},{key:[98,100,113,117,111,59],value:"„"},{key:[98,101,99,97,117,115,59],value:"∵"},{key:[98,101,99,97,117,115,101,59],value:"∵"},{key:[98,101,109,112,116,121,118,59],value:"⦰"},{key:[98,101,112,115,105,59],value:"϶"},{key:[98,101,114,110,111,117,59],value:"ℬ"},{key:[98,101,116,97,59],value:"β"},{key:[98,101,116,104,59],value:"ℶ"},{key:[98,101,116,119,101,101,110,59],value:"≬"},{key:[98,102,114,59],value:"𝔟"},{key:[98,105,103,99,97,112,59],value:"⋂"},{key:[98,105,103,99,105,114,99,59],value:"◯"},{key:[98,105,103,99,117,112,59],value:"⋃"},{key:[98,105,103,111,100,111,116,59],value:"⨀"},{key:[98,105,103,111,112,108,117,115,59],value:"⨁"},{key:[98,105,103,111,116,105,109,101,115,59],value:"⨂"},{key:[98,105,103,115,113,99,117,112,59],value:"⨆"},{key:[98,105,103,115,116,97,114,59],value:"★"},{key:[98,105,103,116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▽"},{key:[98,105,103,116,114,105,97,110,103,108,101,117,112,59],value:"△"},{key:[98,105,103,117,112,108,117,115,59],value:"⨄"},{key:[98,105,103,118,101,101,59],value:"⋁"},{key:[98,105,103,119,101,100,103,101,59],value:"⋀"},{key:[98,107,97,114,111,119,59],value:"⤍"},{key:[98,108,97,99,107,108,111,122,101,110,103,101,59],value:"⧫"},{key:[98,108,97,99,107,115,113,117,97,114,101,59],value:"▪"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,59],value:"▴"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▾"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"◂"},{key:[98,108,97,99,107,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"▸"},{key:[98,108,97,110,107,59],value:"␣"},{key:[98,108,107,49,50,59],value:"▒"},{key:[98,108,107,49,52,59],value:"░"},{key:[98,108,107,51,52,59],value:"▓"},{key:[98,108,111,99,107,59],value:"█"},{key:[98,110,101,59],value:"=⃥"},{key:[98,110,101,113,117,105,118,59],value:"≡⃥"},{key:[98,110,111,116,59],value:"⌐"},{key:[98,111,112,102,59],value:"𝕓"},{key:[98,111,116,59],value:"⊥"},{key:[98,111,116,116,111,109,59],value:"⊥"},{key:[98,111,119,116,105,101,59],value:"⋈"},{key:[98,111,120,68,76,59],value:"╗"},{key:[98,111,120,68,82,59],value:"╔"},{key:[98,111,120,68,108,59],value:"╖"},{key:[98,111,120,68,114,59],value:"╓"},{key:[98,111,120,72,59],value:"═"},{key:[98,111,120,72,68,59],value:"╦"},{key:[98,111,120,72,85,59],value:"╩"},{key:[98,111,120,72,100,59],value:"╤"},{key:[98,111,120,72,117,59],value:"╧"},{key:[98,111,120,85,76,59],value:"╝"},{key:[98,111,120,85,82,59],value:"╚"},{key:[98,111,120,85,108,59],value:"╜"},{key:[98,111,120,85,114,59],value:"╙"},{key:[98,111,120,86,59],value:"║"},{key:[98,111,120,86,72,59],value:"╬"},{key:[98,111,120,86,76,59],value:"╣"},{key:[98,111,120,86,82,59],value:"╠"},{key:[98,111,120,86,104,59],value:"╫"},{key:[98,111,120,86,108,59],value:"╢"},{key:[98,111,120,86,114,59],value:"╟"},{key:[98,111,120,98,111,120,59],value:"⧉"},{key:[98,111,120,100,76,59],value:"╕"},{key:[98,111,120,100,82,59],value:"╒"},{key:[98,111,120,100,108,59],value:"┐"},{key:[98,111,120,100,114,59],value:"┌"},{key:[98,111,120,104,59],value:"─"},{key:[98,111,120,104,68,59],value:"╥"},{key:[98,111,120,104,85,59],value:"╨"},{key:[98,111,120,104,100,59],value:"┬"},{key:[98,111,120,104,117,59],value:"┴"},{key:[98,111,120,109,105,110,117,115,59],value:"⊟"},{key:[98,111,120,112,108,117,115,59],value:"⊞"},{key:[98,111,120,116,105,109,101,115,59],value:"⊠"},{key:[98,111,120,117,76,59],value:"╛"},{key:[98,111,120,117,82,59],value:"╘"},{key:[98,111,120,117,108,59],value:"┘"},{key:[98,111,120,117,114,59],value:"└"},{key:[98,111,120,118,59],value:"│"},{key:[98,111,120,118,72,59],value:"╪"},{key:[98,111,120,118,76,59],value:"╡"},{key:[98,111,120,118,82,59],value:"╞"},{key:[98,111,120,118,104,59],value:"┼"},{key:[98,111,120,118,108,59],value:"┤"},{key:[98,111,120,118,114,59],value:"├"},{key:[98,112,114,105,109,101,59],value:"‵"},{key:[98,114,101,118,101,59],value:"˘"},{key:[98,114,118,98,97,114,59],value:"¦"},{key:[98,115,99,114,59],value:"𝒷"},{key:[98,115,101,109,105,59],value:"⁏"},{key:[98,115,105,109,59],value:"∽"},{key:[98,115,105,109,101,59],value:"⋍"},{key:[98,115,111,108,59],value:"\\"},{key:[98,115,111,108,98,59],value:"⧅"},{key:[98,115,111,108,104,115,117,98,59],value:"⟈"},{key:[98,117,108,108,59],value:"•"},{key:[98,117,108,108,101,116,59],value:"•"},{key:[98,117,109,112,59],value:"≎"},{key:[98,117,109,112,69,59],value:"⪮"},{key:[98,117,109,112,101,59],value:"≏"},{key:[98,117,109,112,101,113,59],value:"≏"},{key:[99,97,99,117,116,101,59],value:"ć"},{key:[99,97,112,59],value:"∩"},{key:[99,97,112,97,110,100,59],value:"⩄"},{key:[99,97,112,98,114,99,117,112,59],value:"⩉"},{key:[99,97,112,99,97,112,59],value:"⩋"},{key:[99,97,112,99,117,112,59],value:"⩇"},{key:[99,97,112,100,111,116,59],value:"⩀"},{key:[99,97,112,115,59],value:"∩︀"},{key:[99,97,114,101,116,59],value:"⁁"},{key:[99,97,114,111,110,59],value:"ˇ"},{key:[99,99,97,112,115,59],value:"⩍"},{key:[99,99,97,114,111,110,59],value:"č"},{key:[99,99,101,100,105,108,59],value:"ç"},{key:[99,99,105,114,99,59],value:"ĉ"},{key:[99,99,117,112,115,59],value:"⩌"},{key:[99,99,117,112,115,115,109,59],value:"⩐"},{key:[99,100,111,116,59],value:"ċ"},{key:[99,101,100,105,108,59],value:"¸"},{key:[99,101,109,112,116,121,118,59],value:"⦲"},{key:[99,101,110,116,59],value:"¢"},{key:[99,101,110,116,101,114,100,111,116,59],value:"·"},{key:[99,102,114,59],value:"𝔠"},{key:[99,104,99,121,59],value:"ч"},{key:[99,104,101,99,107,59],value:"✓"},{key:[99,104,101,99,107,109,97,114,107,59],value:"✓"},{key:[99,104,105,59],value:"χ"},{key:[99,105,114,59],value:"○"},{key:[99,105,114,69,59],value:"⧃"},{key:[99,105,114,99,59],value:"ˆ"},{key:[99,105,114,99,101,113,59],value:"≗"},{key:[99,105,114,99,108,101,97,114,114,111,119,108,101,102,116,59],value:"↺"},{key:[99,105,114,99,108,101,97,114,114,111,119,114,105,103,104,116,59],value:"↻"},{key:[99,105,114,99,108,101,100,82,59],value:"®"},{key:[99,105,114,99,108,101,100,83,59],value:"Ⓢ"},{key:[99,105,114,99,108,101,100,97,115,116,59],value:"⊛"},{key:[99,105,114,99,108,101,100,99,105,114,99,59],value:"⊚"},{key:[99,105,114,99,108,101,100,100,97,115,104,59],value:"⊝"},{key:[99,105,114,101,59],value:"≗"},{key:[99,105,114,102,110,105,110,116,59],value:"⨐"},{key:[99,105,114,109,105,100,59],value:"⫯"},{key:[99,105,114,115,99,105,114,59],value:"⧂"},{key:[99,108,117,98,115,59],value:"♣"},{key:[99,108,117,98,115,117,105,116,59],value:"♣"},{key:[99,111,108,111,110,59],value:":"},{key:[99,111,108,111,110,101,59],value:"≔"},{key:[99,111,108,111,110,101,113,59],value:"≔"},{key:[99,111,109,109,97,59],value:","},{key:[99,111,109,109,97,116,59],value:"@"},{key:[99,111,109,112,59],value:"∁"},{key:[99,111,109,112,102,110,59],value:"∘"},{key:[99,111,109,112,108,101,109,101,110,116,59],value:"∁"},{key:[99,111,109,112,108,101,120,101,115,59],value:"ℂ"},{key:[99,111,110,103,59],value:"≅"},{key:[99,111,110,103,100,111,116,59],value:"⩭"},{key:[99,111,110,105,110,116,59],value:"∮"},{key:[99,111,112,102,59],value:"𝕔"},{key:[99,111,112,114,111,100,59],value:"∐"},{key:[99,111,112,121,59],value:"©"},{key:[99,111,112,121,115,114,59],value:"℗"},{key:[99,114,97,114,114,59],value:"↵"},{key:[99,114,111,115,115,59],value:"✗"},{key:[99,115,99,114,59],value:"𝒸"},{key:[99,115,117,98,59],value:"⫏"},{key:[99,115,117,98,101,59],value:"⫑"},{key:[99,115,117,112,59],value:"⫐"},{key:[99,115,117,112,101,59],value:"⫒"},{key:[99,116,100,111,116,59],value:"⋯"},{key:[99,117,100,97,114,114,108,59],value:"⤸"},{key:[99,117,100,97,114,114,114,59],value:"⤵"},{key:[99,117,101,112,114,59],value:"⋞"},{key:[99,117,101,115,99,59],value:"⋟"},{key:[99,117,108,97,114,114,59],value:"↶"},{key:[99,117,108,97,114,114,112,59],value:"⤽"},{key:[99,117,112,59],value:"∪"},{key:[99,117,112,98,114,99,97,112,59],value:"⩈"},{key:[99,117,112,99,97,112,59],value:"⩆"},{key:[99,117,112,99,117,112,59],value:"⩊"},{key:[99,117,112,100,111,116,59],value:"⊍"},{key:[99,117,112,111,114,59],value:"⩅"},{key:[99,117,112,115,59],value:"∪︀"},{key:[99,117,114,97,114,114,59],value:"↷"},{key:[99,117,114,97,114,114,109,59],value:"⤼"},{key:[99,117,114,108,121,101,113,112,114,101,99,59],value:"⋞"},{key:[99,117,114,108,121,101,113,115,117,99,99,59],value:"⋟"},{key:[99,117,114,108,121,118,101,101,59],value:"⋎"},{key:[99,117,114,108,121,119,101,100,103,101,59],value:"⋏"},{key:[99,117,114,114,101,110,59],value:"¤"},{key:[99,117,114,118,101,97,114,114,111,119,108,101,102,116,59],value:"↶"},{key:[99,117,114,118,101,97,114,114,111,119,114,105,103,104,116,59],value:"↷"},{key:[99,117,118,101,101,59],value:"⋎"},{key:[99,117,119,101,100,59],value:"⋏"},{key:[99,119,99,111,110,105,110,116,59],value:"∲"},{key:[99,119,105,110,116,59],value:"∱"},{key:[99,121,108,99,116,121,59],value:"⌭"},{key:[100,65,114,114,59],value:"⇓"},{key:[100,72,97,114,59],value:"⥥"},{key:[100,97,103,103,101,114,59],value:"†"},{key:[100,97,108,101,116,104,59],value:"ℸ"},{key:[100,97,114,114,59],value:"↓"},{key:[100,97,115,104,59],value:"‐"},{key:[100,97,115,104,118,59],value:"⊣"},{key:[100,98,107,97,114,111,119,59],value:"⤏"},{key:[100,98,108,97,99,59],value:"˝"},{key:[100,99,97,114,111,110,59],value:"ď"},{key:[100,99,121,59],value:"д"},{key:[100,100,59],value:"ⅆ"},{key:[100,100,97,103,103,101,114,59],value:"‡"},{key:[100,100,97,114,114,59],value:"⇊"},{key:[100,100,111,116,115,101,113,59],value:"⩷"},{key:[100,101,103,59],value:"°"},{key:[100,101,108,116,97,59],value:"δ"},{key:[100,101,109,112,116,121,118,59],value:"⦱"},{key:[100,102,105,115,104,116,59],value:"⥿"},{key:[100,102,114,59],value:"𝔡"},{key:[100,104,97,114,108,59],value:"⇃"},{key:[100,104,97,114,114,59],value:"⇂"},{key:[100,105,97,109,59],value:"⋄"},{key:[100,105,97,109,111,110,100,59],value:"⋄"},{key:[100,105,97,109,111,110,100,115,117,105,116,59],value:"♦"},{key:[100,105,97,109,115,59],value:"♦"},{key:[100,105,101,59],value:"¨"},{key:[100,105,103,97,109,109,97,59],value:"ϝ"},{key:[100,105,115,105,110,59],value:"⋲"},{key:[100,105,118,59],value:"÷"},{key:[100,105,118,105,100,101,59],value:"÷"},{key:[100,105,118,105,100,101,111,110,116,105,109,101,115,59],value:"⋇"},{key:[100,105,118,111,110,120,59],value:"⋇"},{key:[100,106,99,121,59],value:"ђ"},{key:[100,108,99,111,114,110,59],value:"⌞"},{key:[100,108,99,114,111,112,59],value:"⌍"},{key:[100,111,108,108,97,114,59],value:"$"},{key:[100,111,112,102,59],value:"𝕕"},{key:[100,111,116,59],value:"˙"},{key:[100,111,116,101,113,59],value:"≐"},{key:[100,111,116,101,113,100,111,116,59],value:"≑"},{key:[100,111,116,109,105,110,117,115,59],value:"∸"},{key:[100,111,116,112,108,117,115,59],value:"∔"},{key:[100,111,116,115,113,117,97,114,101,59],value:"⊡"},{key:[100,111,117,98,108,101,98,97,114,119,101,100,103,101,59],value:"⌆"},{key:[100,111,119,110,97,114,114,111,119,59],value:"↓"},{key:[100,111,119,110,100,111,119,110,97,114,114,111,119,115,59],value:"⇊"},{key:[100,111,119,110,104,97,114,112,111,111,110,108,101,102,116,59],value:"⇃"},{key:[100,111,119,110,104,97,114,112,111,111,110,114,105,103,104,116,59],value:"⇂"},{key:[100,114,98,107,97,114,111,119,59],value:"⤐"},{key:[100,114,99,111,114,110,59],value:"⌟"},{key:[100,114,99,114,111,112,59],value:"⌌"},{key:[100,115,99,114,59],value:"𝒹"},{key:[100,115,99,121,59],value:"ѕ"},{key:[100,115,111,108,59],value:"⧶"},{key:[100,115,116,114,111,107,59],value:"đ"},{key:[100,116,100,111,116,59],value:"⋱"},{key:[100,116,114,105,59],value:"▿"},{key:[100,116,114,105,102,59],value:"▾"},{key:[100,117,97,114,114,59],value:"⇵"},{key:[100,117,104,97,114,59],value:"⥯"},{key:[100,119,97,110,103,108,101,59],value:"⦦"},{key:[100,122,99,121,59],value:"џ"},{key:[100,122,105,103,114,97,114,114,59],value:"⟿"},{key:[101,68,68,111,116,59],value:"⩷"},{key:[101,68,111,116,59],value:"≑"},{key:[101,97,99,117,116,101,59],value:"é"},{key:[101,97,115,116,101,114,59],value:"⩮"},{key:[101,99,97,114,111,110,59],value:"ě"},{key:[101,99,105,114,59],value:"≖"},{key:[101,99,105,114,99,59],value:"ê"},{key:[101,99,111,108,111,110,59],value:"≕"},{key:[101,99,121,59],value:"э"},{key:[101,100,111,116,59],value:"ė"},{key:[101,101,59],value:"ⅇ"},{key:[101,102,68,111,116,59],value:"≒"},{key:[101,102,114,59],value:"𝔢"},{key:[101,103,59],value:"⪚"},{key:[101,103,114,97,118,101,59],value:"è"},{key:[101,103,115,59],value:"⪖"},{key:[101,103,115,100,111,116,59],value:"⪘"},{key:[101,108,59],value:"⪙"},{key:[101,108,105,110,116,101,114,115,59],value:"⏧"},{key:[101,108,108,59],value:"ℓ"},{key:[101,108,115,59],value:"⪕"},{key:[101,108,115,100,111,116,59],value:"⪗"},{key:[101,109,97,99,114,59],value:"ē"},{key:[101,109,112,116,121,59],value:"∅"},{key:[101,109,112,116,121,115,101,116,59],value:"∅"},{key:[101,109,112,116,121,118,59],value:"∅"},{key:[101,109,115,112,49,51,59],value:" "},{key:[101,109,115,112,49,52,59],value:" "},{key:[101,109,115,112,59],value:" "},{key:[101,110,103,59],value:"ŋ"},{key:[101,110,115,112,59],value:" "},{key:[101,111,103,111,110,59],value:"ę"},{key:[101,111,112,102,59],value:"𝕖"},{key:[101,112,97,114,59],value:"⋕"},{key:[101,112,97,114,115,108,59],value:"⧣"},{key:[101,112,108,117,115,59],value:"⩱"},{key:[101,112,115,105,59],value:"ε"},{key:[101,112,115,105,108,111,110,59],value:"ε"},{key:[101,112,115,105,118,59],value:"ϵ"},{key:[101,113,99,105,114,99,59],value:"≖"},{key:[101,113,99,111,108,111,110,59],value:"≕"},{key:[101,113,115,105,109,59],value:"≂"},{key:[101,113,115,108,97,110,116,103,116,114,59],value:"⪖"},{key:[101,113,115,108,97,110,116,108,101,115,115,59],value:"⪕"},{key:[101,113,117,97,108,115,59],value:"="},{key:[101,113,117,101,115,116,59],value:"≟"},{key:[101,113,117,105,118,59],value:"≡"},{key:[101,113,117,105,118,68,68,59],value:"⩸"},{key:[101,113,118,112,97,114,115,108,59],value:"⧥"},{key:[101,114,68,111,116,59],value:"≓"},{key:[101,114,97,114,114,59],value:"⥱"},{key:[101,115,99,114,59],value:"ℯ"},{key:[101,115,100,111,116,59],value:"≐"},{key:[101,115,105,109,59],value:"≂"},{key:[101,116,97,59],value:"η"},{key:[101,116,104,59],value:"ð"},{key:[101,117,109,108,59],value:"ë"},{key:[101,117,114,111,59],value:"€"},{key:[101,120,99,108,59],value:"!"},{key:[101,120,105,115,116,59],value:"∃"},{key:[101,120,112,101,99,116,97,116,105,111,110,59],value:"ℰ"},{key:[101,120,112,111,110,101,110,116,105,97,108,101,59],value:"ⅇ"},{key:[102,97,108,108,105,110,103,100,111,116,115,101,113,59],value:"≒"},{key:[102,99,121,59],value:"ф"},{key:[102,101,109,97,108,101,59],value:"♀"},{key:[102,102,105,108,105,103,59],value:"ffi"},{key:[102,102,108,105,103,59],value:"ff"},{key:[102,102,108,108,105,103,59],value:"ffl"},{key:[102,102,114,59],value:"𝔣"},{key:[102,105,108,105,103,59],value:"fi"},{key:[102,106,108,105,103,59],value:"fj"},{key:[102,108,97,116,59],value:"♭"},{key:[102,108,108,105,103,59],value:"fl"},{key:[102,108,116,110,115,59],value:"▱"},{key:[102,110,111,102,59],value:"ƒ"},{key:[102,111,112,102,59],value:"𝕗"},{key:[102,111,114,97,108,108,59],value:"∀"},{key:[102,111,114,107,59],value:"⋔"},{key:[102,111,114,107,118,59],value:"⫙"},{key:[102,112,97,114,116,105,110,116,59],value:"⨍"},{key:[102,114,97,99,49,50,59],value:"½"},{key:[102,114,97,99,49,51,59],value:"⅓"},{key:[102,114,97,99,49,52,59],value:"¼"},{key:[102,114,97,99,49,53,59],value:"⅕"},{key:[102,114,97,99,49,54,59],value:"⅙"},{key:[102,114,97,99,49,56,59],value:"⅛"},{key:[102,114,97,99,50,51,59],value:"⅔"},{key:[102,114,97,99,50,53,59],value:"⅖"},{key:[102,114,97,99,51,52,59],value:"¾"},{key:[102,114,97,99,51,53,59],value:"⅗"},{key:[102,114,97,99,51,56,59],value:"⅜"},{key:[102,114,97,99,52,53,59],value:"⅘"},{key:[102,114,97,99,53,54,59],value:"⅚"},{key:[102,114,97,99,53,56,59],value:"⅝"},{key:[102,114,97,99,55,56,59],value:"⅞"},{key:[102,114,97,115,108,59],value:"⁄"},{key:[102,114,111,119,110,59],value:"⌢"},{key:[102,115,99,114,59],value:"𝒻"},{key:[103,69,59],value:"≧"},{key:[103,69,108,59],value:"⪌"},{key:[103,97,99,117,116,101,59],value:"ǵ"},{key:[103,97,109,109,97,59],value:"γ"},{key:[103,97,109,109,97,100,59],value:"ϝ"},{key:[103,97,112,59],value:"⪆"},{key:[103,98,114,101,118,101,59],value:"ğ"},{key:[103,99,105,114,99,59],value:"ĝ"},{key:[103,99,121,59],value:"г"},{key:[103,100,111,116,59],value:"ġ"},{key:[103,101,59],value:"≥"},{key:[103,101,108,59],value:"⋛"},{key:[103,101,113,59],value:"≥"},{key:[103,101,113,113,59],value:"≧"},{key:[103,101,113,115,108,97,110,116,59],value:"⩾"},{key:[103,101,115,59],value:"⩾"},{key:[103,101,115,99,99,59],value:"⪩"},{key:[103,101,115,100,111,116,59],value:"⪀"},{key:[103,101,115,100,111,116,111,59],value:"⪂"},{key:[103,101,115,100,111,116,111,108,59],value:"⪄"},{key:[103,101,115,108,59],value:"⋛︀"},{key:[103,101,115,108,101,115,59],value:"⪔"},{key:[103,102,114,59],value:"𝔤"},{key:[103,103,59],value:"≫"},{key:[103,103,103,59],value:"⋙"},{key:[103,105,109,101,108,59],value:"ℷ"},{key:[103,106,99,121,59],value:"ѓ"},{key:[103,108,59],value:"≷"},{key:[103,108,69,59],value:"⪒"},{key:[103,108,97,59],value:"⪥"},{key:[103,108,106,59],value:"⪤"},{key:[103,110,69,59],value:"≩"},{key:[103,110,97,112,59],value:"⪊"},{key:[103,110,97,112,112,114,111,120,59],value:"⪊"},{key:[103,110,101,59],value:"⪈"},{key:[103,110,101,113,59],value:"⪈"},{key:[103,110,101,113,113,59],value:"≩"},{key:[103,110,115,105,109,59],value:"⋧"},{key:[103,111,112,102,59],value:"𝕘"},{key:[103,114,97,118,101,59],value:"`"},{key:[103,115,99,114,59],value:"ℊ"},{key:[103,115,105,109,59],value:"≳"},{key:[103,115,105,109,101,59],value:"⪎"},{key:[103,115,105,109,108,59],value:"⪐"},{key:[103,116,59],value:">"},{key:[103,116,99,99,59],value:"⪧"},{key:[103,116,99,105,114,59],value:"⩺"},{key:[103,116,100,111,116,59],value:"⋗"},{key:[103,116,108,80,97,114,59],value:"⦕"},{key:[103,116,113,117,101,115,116,59],value:"⩼"},{key:[103,116,114,97,112,112,114,111,120,59],value:"⪆"},{key:[103,116,114,97,114,114,59],value:"⥸"},{key:[103,116,114,100,111,116,59],value:"⋗"},{key:[103,116,114,101,113,108,101,115,115,59],value:"⋛"},{key:[103,116,114,101,113,113,108,101,115,115,59],value:"⪌"},{key:[103,116,114,108,101,115,115,59],value:"≷"},{key:[103,116,114,115,105,109,59],value:"≳"},{key:[103,118,101,114,116,110,101,113,113,59],value:"≩︀"},{key:[103,118,110,69,59],value:"≩︀"},{key:[104,65,114,114,59],value:"⇔"},{key:[104,97,105,114,115,112,59],value:" "},{key:[104,97,108,102,59],value:"½"},{key:[104,97,109,105,108,116,59],value:"ℋ"},{key:[104,97,114,100,99,121,59],value:"ъ"},{key:[104,97,114,114,59],value:"↔"},{key:[104,97,114,114,99,105,114,59],value:"⥈"},{key:[104,97,114,114,119,59],value:"↭"},{key:[104,98,97,114,59],value:"ℏ"},{key:[104,99,105,114,99,59],value:"ĥ"},{key:[104,101,97,114,116,115,59],value:"♥"},{key:[104,101,97,114,116,115,117,105,116,59],value:"♥"},{key:[104,101,108,108,105,112,59],value:"…"},{key:[104,101,114,99,111,110,59],value:"⊹"},{key:[104,102,114,59],value:"𝔥"},{key:[104,107,115,101,97,114,111,119,59],value:"⤥"},{key:[104,107,115,119,97,114,111,119,59],value:"⤦"},{key:[104,111,97,114,114,59],value:"⇿"},{key:[104,111,109,116,104,116,59],value:"∻"},{key:[104,111,111,107,108,101,102,116,97,114,114,111,119,59],value:"↩"},{key:[104,111,111,107,114,105,103,104,116,97,114,114,111,119,59],value:"↪"},{key:[104,111,112,102,59],value:"𝕙"},{key:[104,111,114,98,97,114,59],value:"―"},{key:[104,115,99,114,59],value:"𝒽"},{key:[104,115,108,97,115,104,59],value:"ℏ"},{key:[104,115,116,114,111,107,59],value:"ħ"},{key:[104,121,98,117,108,108,59],value:"⁃"},{key:[104,121,112,104,101,110,59],value:"‐"},{key:[105,97,99,117,116,101,59],value:"í"},{key:[105,99,59],value:"⁣"},{key:[105,99,105,114,99,59],value:"î"},{key:[105,99,121,59],value:"и"},{key:[105,101,99,121,59],value:"е"},{key:[105,101,120,99,108,59],value:"¡"},{key:[105,102,102,59],value:"⇔"},{key:[105,102,114,59],value:"𝔦"},{key:[105,103,114,97,118,101,59],value:"ì"},{key:[105,105,59],value:"ⅈ"},{key:[105,105,105,105,110,116,59],value:"⨌"},{key:[105,105,105,110,116,59],value:"∭"},{key:[105,105,110,102,105,110,59],value:"⧜"},{key:[105,105,111,116,97,59],value:"℩"},{key:[105,106,108,105,103,59],value:"ij"},{key:[105,109,97,99,114,59],value:"ī"},{key:[105,109,97,103,101,59],value:"ℑ"},{key:[105,109,97,103,108,105,110,101,59],value:"ℐ"},{key:[105,109,97,103,112,97,114,116,59],value:"ℑ"},{key:[105,109,97,116,104,59],value:"ı"},{key:[105,109,111,102,59],value:"⊷"},{key:[105,109,112,101,100,59],value:"Ƶ"},{key:[105,110,59],value:"∈"},{key:[105,110,99,97,114,101,59],value:"℅"},{key:[105,110,102,105,110,59],value:"∞"},{key:[105,110,102,105,110,116,105,101,59],value:"⧝"},{key:[105,110,111,100,111,116,59],value:"ı"},{key:[105,110,116,59],value:"∫"},{key:[105,110,116,99,97,108,59],value:"⊺"},{key:[105,110,116,101,103,101,114,115,59],value:"ℤ"},{key:[105,110,116,101,114,99,97,108,59],value:"⊺"},{key:[105,110,116,108,97,114,104,107,59],value:"⨗"},{key:[105,110,116,112,114,111,100,59],value:"⨼"},{key:[105,111,99,121,59],value:"ё"},{key:[105,111,103,111,110,59],value:"į"},{key:[105,111,112,102,59],value:"𝕚"},{key:[105,111,116,97,59],value:"ι"},{key:[105,112,114,111,100,59],value:"⨼"},{key:[105,113,117,101,115,116,59],value:"¿"},{key:[105,115,99,114,59],value:"𝒾"},{key:[105,115,105,110,59],value:"∈"},{key:[105,115,105,110,69,59],value:"⋹"},{key:[105,115,105,110,100,111,116,59],value:"⋵"},{key:[105,115,105,110,115,59],value:"⋴"},{key:[105,115,105,110,115,118,59],value:"⋳"},{key:[105,115,105,110,118,59],value:"∈"},{key:[105,116,59],value:"⁢"},{key:[105,116,105,108,100,101,59],value:"ĩ"},{key:[105,117,107,99,121,59],value:"і"},{key:[105,117,109,108,59],value:"ï"},{key:[106,99,105,114,99,59],value:"ĵ"},{key:[106,99,121,59],value:"й"},{key:[106,102,114,59],value:"𝔧"},{key:[106,109,97,116,104,59],value:"ȷ"},{key:[106,111,112,102,59],value:"𝕛"},{key:[106,115,99,114,59],value:"𝒿"},{key:[106,115,101,114,99,121,59],value:"ј"},{key:[106,117,107,99,121,59],value:"є"},{key:[107,97,112,112,97,59],value:"κ"},{key:[107,97,112,112,97,118,59],value:"ϰ"},{key:[107,99,101,100,105,108,59],value:"ķ"},{key:[107,99,121,59],value:"к"},{key:[107,102,114,59],value:"𝔨"},{key:[107,103,114,101,101,110,59],value:"ĸ"},{key:[107,104,99,121,59],value:"х"},{key:[107,106,99,121,59],value:"ќ"},{key:[107,111,112,102,59],value:"𝕜"},{key:[107,115,99,114,59],value:"𝓀"},{key:[108,65,97,114,114,59],value:"⇚"},{key:[108,65,114,114,59],value:"⇐"},{key:[108,65,116,97,105,108,59],value:"⤛"},{key:[108,66,97,114,114,59],value:"⤎"},{key:[108,69,59],value:"≦"},{key:[108,69,103,59],value:"⪋"},{key:[108,72,97,114,59],value:"⥢"},{key:[108,97,99,117,116,101,59],value:"ĺ"},{key:[108,97,101,109,112,116,121,118,59],value:"⦴"},{key:[108,97,103,114,97,110,59],value:"ℒ"},{key:[108,97,109,98,100,97,59],value:"λ"},{key:[108,97,110,103,59],value:"⟨"},{key:[108,97,110,103,100,59],value:"⦑"},{key:[108,97,110,103,108,101,59],value:"⟨"},{key:[108,97,112,59],value:"⪅"},{key:[108,97,113,117,111,59],value:"«"},{key:[108,97,114,114,59],value:"←"},{key:[108,97,114,114,98,59],value:"⇤"},{key:[108,97,114,114,98,102,115,59],value:"⤟"},{key:[108,97,114,114,102,115,59],value:"⤝"},{key:[108,97,114,114,104,107,59],value:"↩"},{key:[108,97,114,114,108,112,59],value:"↫"},{key:[108,97,114,114,112,108,59],value:"⤹"},{key:[108,97,114,114,115,105,109,59],value:"⥳"},{key:[108,97,114,114,116,108,59],value:"↢"},{key:[108,97,116,59],value:"⪫"},{key:[108,97,116,97,105,108,59],value:"⤙"},{key:[108,97,116,101,59],value:"⪭"},{key:[108,97,116,101,115,59],value:"⪭︀"},{key:[108,98,97,114,114,59],value:"⤌"},{key:[108,98,98,114,107,59],value:"❲"},{key:[108,98,114,97,99,101,59],value:"{ "},{key:[108,98,114,97,99,107,59],value:"["},{key:[108,98,114,107,101,59],value:"⦋"},{key:[108,98,114,107,115,108,100,59],value:"⦏"},{key:[108,98,114,107,115,108,117,59],value:"⦍"},{key:[108,99,97,114,111,110,59],value:"ľ"},{key:[108,99,101,100,105,108,59],value:"ļ"},{key:[108,99,101,105,108,59],value:"⌈"},{key:[108,99,117,98,59],value:"{ "},{key:[108,99,121,59],value:"л"},{key:[108,100,99,97,59],value:"⤶"},{key:[108,100,113,117,111,59],value:"“"},{key:[108,100,113,117,111,114,59],value:"„"},{key:[108,100,114,100,104,97,114,59],value:"⥧"},{key:[108,100,114,117,115,104,97,114,59],value:"⥋"},{key:[108,100,115,104,59],value:"↲"},{key:[108,101,59],value:"≤"},{key:[108,101,102,116,97,114,114,111,119,59],value:"←"},{key:[108,101,102,116,97,114,114,111,119,116,97,105,108,59],value:"↢"},{key:[108,101,102,116,104,97,114,112,111,111,110,100,111,119,110,59],value:"↽"},{key:[108,101,102,116,104,97,114,112,111,111,110,117,112,59],value:"↼"},{key:[108,101,102,116,108,101,102,116,97,114,114,111,119,115,59],value:"⇇"},{key:[108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"↔"},{key:[108,101,102,116,114,105,103,104,116,97,114,114,111,119,115,59],value:"⇆"},{key:[108,101,102,116,114,105,103,104,116,104,97,114,112,111,111,110,115,59],value:"⇋"},{key:[108,101,102,116,114,105,103,104,116,115,113,117,105,103,97,114,114,111,119,59],value:"↭"},{key:[108,101,102,116,116,104,114,101,101,116,105,109,101,115,59],value:"⋋"},{key:[108,101,103,59],value:"⋚"},{key:[108,101,113,59],value:"≤"},{key:[108,101,113,113,59],value:"≦"},{key:[108,101,113,115,108,97,110,116,59],value:"⩽"},{key:[108,101,115,59],value:"⩽"},{key:[108,101,115,99,99,59],value:"⪨"},{key:[108,101,115,100,111,116,59],value:"⩿"},{key:[108,101,115,100,111,116,111,59],value:"⪁"},{key:[108,101,115,100,111,116,111,114,59],value:"⪃"},{key:[108,101,115,103,59],value:"⋚︀"},{key:[108,101,115,103,101,115,59],value:"⪓"},{key:[108,101,115,115,97,112,112,114,111,120,59],value:"⪅"},{key:[108,101,115,115,100,111,116,59],value:"⋖"},{key:[108,101,115,115,101,113,103,116,114,59],value:"⋚"},{key:[108,101,115,115,101,113,113,103,116,114,59],value:"⪋"},{key:[108,101,115,115,103,116,114,59],value:"≶"},{key:[108,101,115,115,115,105,109,59],value:"≲"},{key:[108,102,105,115,104,116,59],value:"⥼"},{key:[108,102,108,111,111,114,59],value:"⌊"},{key:[108,102,114,59],value:"𝔩"},{key:[108,103,59],value:"≶"},{key:[108,103,69,59],value:"⪑"},{key:[108,104,97,114,100,59],value:"↽"},{key:[108,104,97,114,117,59],value:"↼"},{key:[108,104,97,114,117,108,59],value:"⥪"},{key:[108,104,98,108,107,59],value:"▄"},{key:[108,106,99,121,59],value:"љ"},{key:[108,108,59],value:"≪"},{key:[108,108,97,114,114,59],value:"⇇"},{key:[108,108,99,111,114,110,101,114,59],value:"⌞"},{key:[108,108,104,97,114,100,59],value:"⥫"},{key:[108,108,116,114,105,59],value:"◺"},{key:[108,109,105,100,111,116,59],value:"ŀ"},{key:[108,109,111,117,115,116,59],value:"⎰"},{key:[108,109,111,117,115,116,97,99,104,101,59],value:"⎰"},{key:[108,110,69,59],value:"≨"},{key:[108,110,97,112,59],value:"⪉"},{key:[108,110,97,112,112,114,111,120,59],value:"⪉"},{key:[108,110,101,59],value:"⪇"},{key:[108,110,101,113,59],value:"⪇"},{key:[108,110,101,113,113,59],value:"≨"},{key:[108,110,115,105,109,59],value:"⋦"},{key:[108,111,97,110,103,59],value:"⟬"},{key:[108,111,97,114,114,59],value:"⇽"},{key:[108,111,98,114,107,59],value:"⟦"},{key:[108,111,110,103,108,101,102,116,97,114,114,111,119,59],value:"⟵"},{key:[108,111,110,103,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⟷"},{key:[108,111,110,103,109,97,112,115,116,111,59],value:"⟼"},{key:[108,111,110,103,114,105,103,104,116,97,114,114,111,119,59],value:"⟶"},{key:[108,111,111,112,97,114,114,111,119,108,101,102,116,59],value:"↫"},{key:[108,111,111,112,97,114,114,111,119,114,105,103,104,116,59],value:"↬"},{key:[108,111,112,97,114,59],value:"⦅"},{key:[108,111,112,102,59],value:"𝕝"},{key:[108,111,112,108,117,115,59],value:"⨭"},{key:[108,111,116,105,109,101,115,59],value:"⨴"},{key:[108,111,119,97,115,116,59],value:"∗"},{key:[108,111,119,98,97,114,59],value:"_"},{key:[108,111,122,59],value:"◊"},{key:[108,111,122,101,110,103,101,59],value:"◊"},{key:[108,111,122,102,59],value:"⧫"},{key:[108,112,97,114,59],value:"("},{key:[108,112,97,114,108,116,59],value:"⦓"},{key:[108,114,97,114,114,59],value:"⇆"},{key:[108,114,99,111,114,110,101,114,59],value:"⌟"},{key:[108,114,104,97,114,59],value:"⇋"},{key:[108,114,104,97,114,100,59],value:"⥭"},{key:[108,114,109,59],value:"‎"},{key:[108,114,116,114,105,59],value:"⊿"},{key:[108,115,97,113,117,111,59],value:"‹"},{key:[108,115,99,114,59],value:"𝓁"},{key:[108,115,104,59],value:"↰"},{key:[108,115,105,109,59],value:"≲"},{key:[108,115,105,109,101,59],value:"⪍"},{key:[108,115,105,109,103,59],value:"⪏"},{key:[108,115,113,98,59],value:"["},{key:[108,115,113,117,111,59],value:"‘"},{key:[108,115,113,117,111,114,59],value:"‚"},{key:[108,115,116,114,111,107,59],value:"ł"},{key:[108,116,59],value:"<"},{key:[108,116,99,99,59],value:"⪦"},{key:[108,116,99,105,114,59],value:"⩹"},{key:[108,116,100,111,116,59],value:"⋖"},{key:[108,116,104,114,101,101,59],value:"⋋"},{key:[108,116,105,109,101,115,59],value:"⋉"},{key:[108,116,108,97,114,114,59],value:"⥶"},{key:[108,116,113,117,101,115,116,59],value:"⩻"},{key:[108,116,114,80,97,114,59],value:"⦖"},{key:[108,116,114,105,59],value:"◃"},{key:[108,116,114,105,101,59],value:"⊴"},{key:[108,116,114,105,102,59],value:"◂"},{key:[108,117,114,100,115,104,97,114,59],value:"⥊"},{key:[108,117,114,117,104,97,114,59],value:"⥦"},{key:[108,118,101,114,116,110,101,113,113,59],value:"≨︀"},{key:[108,118,110,69,59],value:"≨︀"},{key:[109,68,68,111,116,59],value:"∺"},{key:[109,97,99,114,59],value:"¯"},{key:[109,97,108,101,59],value:"♂"},{key:[109,97,108,116,59],value:"✠"},{key:[109,97,108,116,101,115,101,59],value:"✠"},{key:[109,97,112,59],value:"↦"},{key:[109,97,112,115,116,111,59],value:"↦"},{key:[109,97,112,115,116,111,100,111,119,110,59],value:"↧"},{key:[109,97,112,115,116,111,108,101,102,116,59],value:"↤"},{key:[109,97,112,115,116,111,117,112,59],value:"↥"},{key:[109,97,114,107,101,114,59],value:"▮"},{key:[109,99,111,109,109,97,59],value:"⨩"},{key:[109,99,121,59],value:"м"},{key:[109,100,97,115,104,59],value:"—"},{key:[109,101,97,115,117,114,101,100,97,110,103,108,101,59],value:"∡"},{key:[109,102,114,59],value:"𝔪"},{key:[109,104,111,59],value:"℧"},{key:[109,105,99,114,111,59],value:"µ"},{key:[109,105,100,59],value:"∣"},{key:[109,105,100,97,115,116,59],value:"*"},{key:[109,105,100,99,105,114,59],value:"⫰"},{key:[109,105,100,100,111,116,59],value:"·"},{key:[109,105,110,117,115,59],value:"−"},{key:[109,105,110,117,115,98,59],value:"⊟"},{key:[109,105,110,117,115,100,59],value:"∸"},{key:[109,105,110,117,115,100,117,59],value:"⨪"},{key:[109,108,99,112,59],value:"⫛"},{key:[109,108,100,114,59],value:"…"},{key:[109,110,112,108,117,115,59],value:"∓"},{key:[109,111,100,101,108,115,59],value:"⊧"},{key:[109,111,112,102,59],value:"𝕞"},{key:[109,112,59],value:"∓"},{key:[109,115,99,114,59],value:"𝓂"},{key:[109,115,116,112,111,115,59],value:"∾"},{key:[109,117,59],value:"μ"},{key:[109,117,108,116,105,109,97,112,59],value:"⊸"},{key:[109,117,109,97,112,59],value:"⊸"},{key:[110,71,103,59],value:"⋙̸"},{key:[110,71,116,59],value:"≫⃒"},{key:[110,71,116,118,59],value:"≫̸"},{key:[110,76,101,102,116,97,114,114,111,119,59],value:"⇍"},{key:[110,76,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"⇎"},{key:[110,76,108,59],value:"⋘̸"},{key:[110,76,116,59],value:"≪⃒"},{key:[110,76,116,118,59],value:"≪̸"},{key:[110,82,105,103,104,116,97,114,114,111,119,59],value:"⇏"},{key:[110,86,68,97,115,104,59],value:"⊯"},{key:[110,86,100,97,115,104,59],value:"⊮"},{key:[110,97,98,108,97,59],value:"∇"},{key:[110,97,99,117,116,101,59],value:"ń"},{key:[110,97,110,103,59],value:"∠⃒"},{key:[110,97,112,59],value:"≉"},{key:[110,97,112,69,59],value:"⩰̸"},{key:[110,97,112,105,100,59],value:"≋̸"},{key:[110,97,112,111,115,59],value:"ʼn"},{key:[110,97,112,112,114,111,120,59],value:"≉"},{key:[110,97,116,117,114,59],value:"♮"},{key:[110,97,116,117,114,97,108,59],value:"♮"},{key:[110,97,116,117,114,97,108,115,59],value:"ℕ"},{key:[110,98,115,112,59],value:" "},{key:[110,98,117,109,112,59],value:"≎̸"},{key:[110,98,117,109,112,101,59],value:"≏̸"},{key:[110,99,97,112,59],value:"⩃"},{key:[110,99,97,114,111,110,59],value:"ň"},{key:[110,99,101,100,105,108,59],value:"ņ"},{key:[110,99,111,110,103,59],value:"≇"},{key:[110,99,111,110,103,100,111,116,59],value:"⩭̸"},{key:[110,99,117,112,59],value:"⩂"},{key:[110,99,121,59],value:"н"},{key:[110,100,97,115,104,59],value:"–"},{key:[110,101,59],value:"≠"},{key:[110,101,65,114,114,59],value:"⇗"},{key:[110,101,97,114,104,107,59],value:"⤤"},{key:[110,101,97,114,114,59],value:"↗"},{key:[110,101,97,114,114,111,119,59],value:"↗"},{key:[110,101,100,111,116,59],value:"≐̸"},{key:[110,101,113,117,105,118,59],value:"≢"},{key:[110,101,115,101,97,114,59],value:"⤨"},{key:[110,101,115,105,109,59],value:"≂̸"},{key:[110,101,120,105,115,116,59],value:"∄"},{key:[110,101,120,105,115,116,115,59],value:"∄"},{key:[110,102,114,59],value:"𝔫"},{key:[110,103,69,59],value:"≧̸"},{key:[110,103,101,59],value:"≱"},{key:[110,103,101,113,59],value:"≱"},{key:[110,103,101,113,113,59],value:"≧̸"},{key:[110,103,101,113,115,108,97,110,116,59],value:"⩾̸"},{key:[110,103,101,115,59],value:"⩾̸"},{key:[110,103,115,105,109,59],value:"≵"},{key:[110,103,116,59],value:"≯"},{key:[110,103,116,114,59],value:"≯"},{key:[110,104,65,114,114,59],value:"⇎"},{key:[110,104,97,114,114,59],value:"↮"},{key:[110,104,112,97,114,59],value:"⫲"},{key:[110,105,59],value:"∋"},{key:[110,105,115,59],value:"⋼"},{key:[110,105,115,100,59],value:"⋺"},{key:[110,105,118,59],value:"∋"},{key:[110,106,99,121,59],value:"њ"},{key:[110,108,65,114,114,59],value:"⇍"},{key:[110,108,69,59],value:"≦̸"},{key:[110,108,97,114,114,59],value:"↚"},{key:[110,108,100,114,59],value:"‥"},{key:[110,108,101,59],value:"≰"},{key:[110,108,101,102,116,97,114,114,111,119,59],value:"↚"},{key:[110,108,101,102,116,114,105,103,104,116,97,114,114,111,119,59],value:"↮"},{key:[110,108,101,113,59],value:"≰"},{key:[110,108,101,113,113,59],value:"≦̸"},{key:[110,108,101,113,115,108,97,110,116,59],value:"⩽̸"},{key:[110,108,101,115,59],value:"⩽̸"},{key:[110,108,101,115,115,59],value:"≮"},{key:[110,108,115,105,109,59],value:"≴"},{key:[110,108,116,59],value:"≮"},{key:[110,108,116,114,105,59],value:"⋪"},{key:[110,108,116,114,105,101,59],value:"⋬"},{key:[110,109,105,100,59],value:"∤"},{key:[110,111,112,102,59],value:"𝕟"},{key:[110,111,116,59],value:"¬"},{key:[110,111,116,105,110,59],value:"∉"},{key:[110,111,116,105,110,69,59],value:"⋹̸"},{key:[110,111,116,105,110,100,111,116,59],value:"⋵̸"},{key:[110,111,116,105,110,118,97,59],value:"∉"},{key:[110,111,116,105,110,118,98,59],value:"⋷"},{key:[110,111,116,105,110,118,99,59],value:"⋶"},{key:[110,111,116,110,105,59],value:"∌"},{key:[110,111,116,110,105,118,97,59],value:"∌"},{key:[110,111,116,110,105,118,98,59],value:"⋾"},{key:[110,111,116,110,105,118,99,59],value:"⋽"},{key:[110,112,97,114,59],value:"∦"},{key:[110,112,97,114,97,108,108,101,108,59],value:"∦"},{key:[110,112,97,114,115,108,59],value:"⫽⃥"},{key:[110,112,97,114,116,59],value:"∂̸"},{key:[110,112,111,108,105,110,116,59],value:"⨔"},{key:[110,112,114,59],value:"⊀"},{key:[110,112,114,99,117,101,59],value:"⋠"},{key:[110,112,114,101,59],value:"⪯̸"},{key:[110,112,114,101,99,59],value:"⊀"},{key:[110,112,114,101,99,101,113,59],value:"⪯̸"},{key:[110,114,65,114,114,59],value:"⇏"},{key:[110,114,97,114,114,59],value:"↛"},{key:[110,114,97,114,114,99,59],value:"⤳̸"},{key:[110,114,97,114,114,119,59],value:"↝̸"},{key:[110,114,105,103,104,116,97,114,114,111,119,59],value:"↛"},{key:[110,114,116,114,105,59],value:"⋫"},{key:[110,114,116,114,105,101,59],value:"⋭"},{key:[110,115,99,59],value:"⊁"},{key:[110,115,99,99,117,101,59],value:"⋡"},{key:[110,115,99,101,59],value:"⪰̸"},{key:[110,115,99,114,59],value:"𝓃"},{key:[110,115,104,111,114,116,109,105,100,59],value:"∤"},{key:[110,115,104,111,114,116,112,97,114,97,108,108,101,108,59],value:"∦"},{key:[110,115,105,109,59],value:"≁"},{key:[110,115,105,109,101,59],value:"≄"},{key:[110,115,105,109,101,113,59],value:"≄"},{key:[110,115,109,105,100,59],value:"∤"},{key:[110,115,112,97,114,59],value:"∦"},{key:[110,115,113,115,117,98,101,59],value:"⋢"},{key:[110,115,113,115,117,112,101,59],value:"⋣"},{key:[110,115,117,98,59],value:"⊄"},{key:[110,115,117,98,69,59],value:"⫅̸"},{key:[110,115,117,98,101,59],value:"⊈"},{key:[110,115,117,98,115,101,116,59],value:"⊂⃒"},{key:[110,115,117,98,115,101,116,101,113,59],value:"⊈"},{key:[110,115,117,98,115,101,116,101,113,113,59],value:"⫅̸"},{key:[110,115,117,99,99,59],value:"⊁"},{key:[110,115,117,99,99,101,113,59],value:"⪰̸"},{key:[110,115,117,112,59],value:"⊅"},{key:[110,115,117,112,69,59],value:"⫆̸"},{key:[110,115,117,112,101,59],value:"⊉"},{key:[110,115,117,112,115,101,116,59],value:"⊃⃒"},{key:[110,115,117,112,115,101,116,101,113,59],value:"⊉"},{key:[110,115,117,112,115,101,116,101,113,113,59],value:"⫆̸"},{key:[110,116,103,108,59],value:"≹"},{key:[110,116,105,108,100,101,59],value:"ñ"},{key:[110,116,108,103,59],value:"≸"},{key:[110,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"⋪"},{key:[110,116,114,105,97,110,103,108,101,108,101,102,116,101,113,59],value:"⋬"},{key:[110,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"⋫"},{key:[110,116,114,105,97,110,103,108,101,114,105,103,104,116,101,113,59],value:"⋭"},{key:[110,117,59],value:"ν"},{key:[110,117,109,59],value:"#"},{key:[110,117,109,101,114,111,59],value:"№"},{key:[110,117,109,115,112,59],value:" "},{key:[110,118,68,97,115,104,59],value:"⊭"},{key:[110,118,72,97,114,114,59],value:"⤄"},{key:[110,118,97,112,59],value:"≍⃒"},{key:[110,118,100,97,115,104,59],value:"⊬"},{key:[110,118,103,101,59],value:"≥⃒"},{key:[110,118,103,116,59],value:">⃒"},{key:[110,118,105,110,102,105,110,59],value:"⧞"},{key:[110,118,108,65,114,114,59],value:"⤂"},{key:[110,118,108,101,59],value:"≤⃒"},{key:[110,118,108,116,59],value:"<⃒"},{key:[110,118,108,116,114,105,101,59],value:"⊴⃒"},{key:[110,118,114,65,114,114,59],value:"⤃"},{key:[110,118,114,116,114,105,101,59],value:"⊵⃒"},{key:[110,118,115,105,109,59],value:"∼⃒"},{key:[110,119,65,114,114,59],value:"⇖"},{key:[110,119,97,114,104,107,59],value:"⤣"},{key:[110,119,97,114,114,59],value:"↖"},{key:[110,119,97,114,114,111,119,59],value:"↖"},{key:[110,119,110,101,97,114,59],value:"⤧"},{key:[111,83,59],value:"Ⓢ"},{key:[111,97,99,117,116,101,59],value:"ó"},{key:[111,97,115,116,59],value:"⊛"},{key:[111,99,105,114,59],value:"⊚"},{key:[111,99,105,114,99,59],value:"ô"},{key:[111,99,121,59],value:"о"},{key:[111,100,97,115,104,59],value:"⊝"},{key:[111,100,98,108,97,99,59],value:"ő"},{key:[111,100,105,118,59],value:"⨸"},{key:[111,100,111,116,59],value:"⊙"},{key:[111,100,115,111,108,100,59],value:"⦼"},{key:[111,101,108,105,103,59],value:"œ"},{key:[111,102,99,105,114,59],value:"⦿"},{key:[111,102,114,59],value:"𝔬"},{key:[111,103,111,110,59],value:"˛"},{key:[111,103,114,97,118,101,59],value:"ò"},{key:[111,103,116,59],value:"⧁"},{key:[111,104,98,97,114,59],value:"⦵"},{key:[111,104,109,59],value:"Ω"},{key:[111,105,110,116,59],value:"∮"},{key:[111,108,97,114,114,59],value:"↺"},{key:[111,108,99,105,114,59],value:"⦾"},{key:[111,108,99,114,111,115,115,59],value:"⦻"},{key:[111,108,105,110,101,59],value:"‾"},{key:[111,108,116,59],value:"⧀"},{key:[111,109,97,99,114,59],value:"ō"},{key:[111,109,101,103,97,59],value:"ω"},{key:[111,109,105,99,114,111,110,59],value:"ο"},{key:[111,109,105,100,59],value:"⦶"},{key:[111,109,105,110,117,115,59],value:"⊖"},{key:[111,111,112,102,59],value:"𝕠"},{key:[111,112,97,114,59],value:"⦷"},{key:[111,112,101,114,112,59],value:"⦹"},{key:[111,112,108,117,115,59],value:"⊕"},{key:[111,114,59],value:"∨"},{key:[111,114,97,114,114,59],value:"↻"},{key:[111,114,100,59],value:"⩝"},{key:[111,114,100,101,114,59],value:"ℴ"},{key:[111,114,100,101,114,111,102,59],value:"ℴ"},{key:[111,114,100,102,59],value:"ª"},{key:[111,114,100,109,59],value:"º"},{key:[111,114,105,103,111,102,59],value:"⊶"},{key:[111,114,111,114,59],value:"⩖"},{key:[111,114,115,108,111,112,101,59],value:"⩗"},{key:[111,114,118,59],value:"⩛"},{key:[111,115,99,114,59],value:"ℴ"},{key:[111,115,108,97,115,104,59],value:"ø"},{key:[111,115,111,108,59],value:"⊘"},{key:[111,116,105,108,100,101,59],value:"õ"},{key:[111,116,105,109,101,115,59],value:"⊗"},{key:[111,116,105,109,101,115,97,115,59],value:"⨶"},{key:[111,117,109,108,59],value:"ö"},{key:[111,118,98,97,114,59],value:"⌽"},{key:[112,97,114,59],value:"∥"},{key:[112,97,114,97,59],value:"¶"},{key:[112,97,114,97,108,108,101,108,59],value:"∥"},{key:[112,97,114,115,105,109,59],value:"⫳"},{key:[112,97,114,115,108,59],value:"⫽"},{key:[112,97,114,116,59],value:"∂"},{key:[112,99,121,59],value:"п"},{key:[112,101,114,99,110,116,59],value:"%"},{key:[112,101,114,105,111,100,59],value:"."},{key:[112,101,114,109,105,108,59],value:"‰"},{key:[112,101,114,112,59],value:"⊥"},{key:[112,101,114,116,101,110,107,59],value:"‱"},{key:[112,102,114,59],value:"𝔭"},{key:[112,104,105,59],value:"φ"},{key:[112,104,105,118,59],value:"ϕ"},{key:[112,104,109,109,97,116,59],value:"ℳ"},{key:[112,104,111,110,101,59],value:"☎"},{key:[112,105,59],value:"π"},{key:[112,105,116,99,104,102,111,114,107,59],value:"⋔"},{key:[112,105,118,59],value:"ϖ"},{key:[112,108,97,110,99,107,59],value:"ℏ"},{key:[112,108,97,110,99,107,104,59],value:"ℎ"},{key:[112,108,97,110,107,118,59],value:"ℏ"},{key:[112,108,117,115,59],value:"+"},{key:[112,108,117,115,97,99,105,114,59],value:"⨣"},{key:[112,108,117,115,98,59],value:"⊞"},{key:[112,108,117,115,99,105,114,59],value:"⨢"},{key:[112,108,117,115,100,111,59],value:"∔"},{key:[112,108,117,115,100,117,59],value:"⨥"},{key:[112,108,117,115,101,59],value:"⩲"},{key:[112,108,117,115,109,110,59],value:"±"},{key:[112,108,117,115,115,105,109,59],value:"⨦"},{key:[112,108,117,115,116,119,111,59],value:"⨧"},{key:[112,109,59],value:"±"},{key:[112,111,105,110,116,105,110,116,59],value:"⨕"},{key:[112,111,112,102,59],value:"𝕡"},{key:[112,111,117,110,100,59],value:"£"},{key:[112,114,59],value:"≺"},{key:[112,114,69,59],value:"⪳"},{key:[112,114,97,112,59],value:"⪷"},{key:[112,114,99,117,101,59],value:"≼"},{key:[112,114,101,59],value:"⪯"},{key:[112,114,101,99,59],value:"≺"},{key:[112,114,101,99,97,112,112,114,111,120,59],value:"⪷"},{key:[112,114,101,99,99,117,114,108,121,101,113,59],value:"≼"},{key:[112,114,101,99,101,113,59],value:"⪯"},{key:[112,114,101,99,110,97,112,112,114,111,120,59],value:"⪹"},{key:[112,114,101,99,110,101,113,113,59],value:"⪵"},{key:[112,114,101,99,110,115,105,109,59],value:"⋨"},{key:[112,114,101,99,115,105,109,59],value:"≾"},{key:[112,114,105,109,101,59],value:"′"},{key:[112,114,105,109,101,115,59],value:"ℙ"},{key:[112,114,110,69,59],value:"⪵"},{key:[112,114,110,97,112,59],value:"⪹"},{key:[112,114,110,115,105,109,59],value:"⋨"},{key:[112,114,111,100,59],value:"∏"},{key:[112,114,111,102,97,108,97,114,59],value:"⌮"},{key:[112,114,111,102,108,105,110,101,59],value:"⌒"},{key:[112,114,111,102,115,117,114,102,59],value:"⌓"},{key:[112,114,111,112,59],value:"∝"},{key:[112,114,111,112,116,111,59],value:"∝"},{key:[112,114,115,105,109,59],value:"≾"},{key:[112,114,117,114,101,108,59],value:"⊰"},{key:[112,115,99,114,59],value:"𝓅"},{key:[112,115,105,59],value:"ψ"},{key:[112,117,110,99,115,112,59],value:" "},{key:[113,102,114,59],value:"𝔮"},{key:[113,105,110,116,59],value:"⨌"},{key:[113,111,112,102,59],value:"𝕢"},{key:[113,112,114,105,109,101,59],value:"⁗"},{key:[113,115,99,114,59],value:"𝓆"},{key:[113,117,97,116,101,114,110,105,111,110,115,59],value:"ℍ"},{key:[113,117,97,116,105,110,116,59],value:"⨖"},{key:[113,117,101,115,116,59],value:"?"},{key:[113,117,101,115,116,101,113,59],value:"≟"},{key:[113,117,111,116,59],value:'"'},{key:[114,65,97,114,114,59],value:"⇛"},{key:[114,65,114,114,59],value:"⇒"},{key:[114,65,116,97,105,108,59],value:"⤜"},{key:[114,66,97,114,114,59],value:"⤏"},{key:[114,72,97,114,59],value:"⥤"},{key:[114,97,99,101,59],value:"∽̱"},{key:[114,97,99,117,116,101,59],value:"ŕ"},{key:[114,97,100,105,99,59],value:"√"},{key:[114,97,101,109,112,116,121,118,59],value:"⦳"},{key:[114,97,110,103,59],value:"⟩"},{key:[114,97,110,103,100,59],value:"⦒"},{key:[114,97,110,103,101,59],value:"⦥"},{key:[114,97,110,103,108,101,59],value:"⟩"},{key:[114,97,113,117,111,59],value:"»"},{key:[114,97,114,114,59],value:"→"},{key:[114,97,114,114,97,112,59],value:"⥵"},{key:[114,97,114,114,98,59],value:"⇥"},{key:[114,97,114,114,98,102,115,59],value:"⤠"},{key:[114,97,114,114,99,59],value:"⤳"},{key:[114,97,114,114,102,115,59],value:"⤞"},{key:[114,97,114,114,104,107,59],value:"↪"},{key:[114,97,114,114,108,112,59],value:"↬"},{key:[114,97,114,114,112,108,59],value:"⥅"},{key:[114,97,114,114,115,105,109,59],value:"⥴"},{key:[114,97,114,114,116,108,59],value:"↣"},{key:[114,97,114,114,119,59],value:"↝"},{key:[114,97,116,97,105,108,59],value:"⤚"},{key:[114,97,116,105,111,59],value:"∶"},{key:[114,97,116,105,111,110,97,108,115,59],value:"ℚ"},{key:[114,98,97,114,114,59],value:"⤍"},{key:[114,98,98,114,107,59],value:"❳"},{key:[114,98,114,97,99,101,59],value:" }"},{key:[114,98,114,97,99,107,59],value:"]"},{key:[114,98,114,107,101,59],value:"⦌"},{key:[114,98,114,107,115,108,100,59],value:"⦎"},{key:[114,98,114,107,115,108,117,59],value:"⦐"},{key:[114,99,97,114,111,110,59],value:"ř"},{key:[114,99,101,100,105,108,59],value:"ŗ"},{key:[114,99,101,105,108,59],value:"⌉"},{key:[114,99,117,98,59],value:" }"},{key:[114,99,121,59],value:"р"},{key:[114,100,99,97,59],value:"⤷"},{key:[114,100,108,100,104,97,114,59],value:"⥩"},{key:[114,100,113,117,111,59],value:"”"},{key:[114,100,113,117,111,114,59],value:"”"},{key:[114,100,115,104,59],value:"↳"},{key:[114,101,97,108,59],value:"ℜ"},{key:[114,101,97,108,105,110,101,59],value:"ℛ"},{key:[114,101,97,108,112,97,114,116,59],value:"ℜ"},{key:[114,101,97,108,115,59],value:"ℝ"},{key:[114,101,99,116,59],value:"▭"},{key:[114,101,103,59],value:"®"},{key:[114,102,105,115,104,116,59],value:"⥽"},{key:[114,102,108,111,111,114,59],value:"⌋"},{key:[114,102,114,59],value:"𝔯"},{key:[114,104,97,114,100,59],value:"⇁"},{key:[114,104,97,114,117,59],value:"⇀"},{key:[114,104,97,114,117,108,59],value:"⥬"},{key:[114,104,111,59],value:"ρ"},{key:[114,104,111,118,59],value:"ϱ"},{key:[114,105,103,104,116,97,114,114,111,119,59],value:"→"},{key:[114,105,103,104,116,97,114,114,111,119,116,97,105,108,59],value:"↣"},{key:[114,105,103,104,116,104,97,114,112,111,111,110,100,111,119,110,59],value:"⇁"},{key:[114,105,103,104,116,104,97,114,112,111,111,110,117,112,59],value:"⇀"},{key:[114,105,103,104,116,108,101,102,116,97,114,114,111,119,115,59],value:"⇄"},{key:[114,105,103,104,116,108,101,102,116,104,97,114,112,111,111,110,115,59],value:"⇌"},{key:[114,105,103,104,116,114,105,103,104,116,97,114,114,111,119,115,59],value:"⇉"},{key:[114,105,103,104,116,115,113,117,105,103,97,114,114,111,119,59],value:"↝"},{key:[114,105,103,104,116,116,104,114,101,101,116,105,109,101,115,59],value:"⋌"},{key:[114,105,110,103,59],value:"˚"},{key:[114,105,115,105,110,103,100,111,116,115,101,113,59],value:"≓"},{key:[114,108,97,114,114,59],value:"⇄"},{key:[114,108,104,97,114,59],value:"⇌"},{key:[114,108,109,59],value:"‏"},{key:[114,109,111,117,115,116,59],value:"⎱"},{key:[114,109,111,117,115,116,97,99,104,101,59],value:"⎱"},{key:[114,110,109,105,100,59],value:"⫮"},{key:[114,111,97,110,103,59],value:"⟭"},{key:[114,111,97,114,114,59],value:"⇾"},{key:[114,111,98,114,107,59],value:"⟧"},{key:[114,111,112,97,114,59],value:"⦆"},{key:[114,111,112,102,59],value:"𝕣"},{key:[114,111,112,108,117,115,59],value:"⨮"},{key:[114,111,116,105,109,101,115,59],value:"⨵"},{key:[114,112,97,114,59],value:")"},{key:[114,112,97,114,103,116,59],value:"⦔"},{key:[114,112,112,111,108,105,110,116,59],value:"⨒"},{key:[114,114,97,114,114,59],value:"⇉"},{key:[114,115,97,113,117,111,59],value:"›"},{key:[114,115,99,114,59],value:"𝓇"},{key:[114,115,104,59],value:"↱"},{key:[114,115,113,98,59],value:"]"},{key:[114,115,113,117,111,59],value:"’"},{key:[114,115,113,117,111,114,59],value:"’"},{key:[114,116,104,114,101,101,59],value:"⋌"},{key:[114,116,105,109,101,115,59],value:"⋊"},{key:[114,116,114,105,59],value:"▹"},{key:[114,116,114,105,101,59],value:"⊵"},{key:[114,116,114,105,102,59],value:"▸"},{key:[114,116,114,105,108,116,114,105,59],value:"⧎"},{key:[114,117,108,117,104,97,114,59],value:"⥨"},{key:[114,120,59],value:"℞"},{key:[115,97,99,117,116,101,59],value:"ś"},{key:[115,98,113,117,111,59],value:"‚"},{key:[115,99,59],value:"≻"},{key:[115,99,69,59],value:"⪴"},{key:[115,99,97,112,59],value:"⪸"},{key:[115,99,97,114,111,110,59],value:"š"},{key:[115,99,99,117,101,59],value:"≽"},{key:[115,99,101,59],value:"⪰"},{key:[115,99,101,100,105,108,59],value:"ş"},{key:[115,99,105,114,99,59],value:"ŝ"},{key:[115,99,110,69,59],value:"⪶"},{key:[115,99,110,97,112,59],value:"⪺"},{key:[115,99,110,115,105,109,59],value:"⋩"},{key:[115,99,112,111,108,105,110,116,59],value:"⨓"},{key:[115,99,115,105,109,59],value:"≿"},{key:[115,99,121,59],value:"с"},{key:[115,100,111,116,59],value:"⋅"},{key:[115,100,111,116,98,59],value:"⊡"},{key:[115,100,111,116,101,59],value:"⩦"},{key:[115,101,65,114,114,59],value:"⇘"},{key:[115,101,97,114,104,107,59],value:"⤥"},{key:[115,101,97,114,114,59],value:"↘"},{key:[115,101,97,114,114,111,119,59],value:"↘"},{key:[115,101,99,116,59],value:"§"},{key:[115,101,109,105,59],value:";"},{key:[115,101,115,119,97,114,59],value:"⤩"},{key:[115,101,116,109,105,110,117,115,59],value:"∖"},{key:[115,101,116,109,110,59],value:"∖"},{key:[115,101,120,116,59],value:"✶"},{key:[115,102,114,59],value:"𝔰"},{key:[115,102,114,111,119,110,59],value:"⌢"},{key:[115,104,97,114,112,59],value:"♯"},{key:[115,104,99,104,99,121,59],value:"щ"},{key:[115,104,99,121,59],value:"ш"},{key:[115,104,111,114,116,109,105,100,59],value:"∣"},{key:[115,104,111,114,116,112,97,114,97,108,108,101,108,59],value:"∥"},{key:[115,104,121,59],value:"­"},{key:[115,105,103,109,97,59],value:"σ"},{key:[115,105,103,109,97,102,59],value:"ς"},{key:[115,105,103,109,97,118,59],value:"ς"},{key:[115,105,109,59],value:"∼"},{key:[115,105,109,100,111,116,59],value:"⩪"},{key:[115,105,109,101,59],value:"≃"},{key:[115,105,109,101,113,59],value:"≃"},{key:[115,105,109,103,59],value:"⪞"},{key:[115,105,109,103,69,59],value:"⪠"},{key:[115,105,109,108,59],value:"⪝"},{key:[115,105,109,108,69,59],value:"⪟"},{key:[115,105,109,110,101,59],value:"≆"},{key:[115,105,109,112,108,117,115,59],value:"⨤"},{key:[115,105,109,114,97,114,114,59],value:"⥲"},{key:[115,108,97,114,114,59],value:"←"},{key:[115,109,97,108,108,115,101,116,109,105,110,117,115,59],value:"∖"},{key:[115,109,97,115,104,112,59],value:"⨳"},{key:[115,109,101,112,97,114,115,108,59],value:"⧤"},{key:[115,109,105,100,59],value:"∣"},{key:[115,109,105,108,101,59],value:"⌣"},{key:[115,109,116,59],value:"⪪"},{key:[115,109,116,101,59],value:"⪬"},{key:[115,109,116,101,115,59],value:"⪬︀"},{key:[115,111,102,116,99,121,59],value:"ь"},{key:[115,111,108,59],value:"/"},{key:[115,111,108,98,59],value:"⧄"},{key:[115,111,108,98,97,114,59],value:"⌿"},{key:[115,111,112,102,59],value:"𝕤"},{key:[115,112,97,100,101,115,59],value:"♠"},{key:[115,112,97,100,101,115,117,105,116,59],value:"♠"},{key:[115,112,97,114,59],value:"∥"},{key:[115,113,99,97,112,59],value:"⊓"},{key:[115,113,99,97,112,115,59],value:"⊓︀"},{key:[115,113,99,117,112,59],value:"⊔"},{key:[115,113,99,117,112,115,59],value:"⊔︀"},{key:[115,113,115,117,98,59],value:"⊏"},{key:[115,113,115,117,98,101,59],value:"⊑"},{key:[115,113,115,117,98,115,101,116,59],value:"⊏"},{key:[115,113,115,117,98,115,101,116,101,113,59],value:"⊑"},{key:[115,113,115,117,112,59],value:"⊐"},{key:[115,113,115,117,112,101,59],value:"⊒"},{key:[115,113,115,117,112,115,101,116,59],value:"⊐"},{key:[115,113,115,117,112,115,101,116,101,113,59],value:"⊒"},{key:[115,113,117,59],value:"□"},{key:[115,113,117,97,114,101,59],value:"□"},{key:[115,113,117,97,114,102,59],value:"▪"},{key:[115,113,117,102,59],value:"▪"},{key:[115,114,97,114,114,59],value:"→"},{key:[115,115,99,114,59],value:"𝓈"},{key:[115,115,101,116,109,110,59],value:"∖"},{key:[115,115,109,105,108,101,59],value:"⌣"},{key:[115,115,116,97,114,102,59],value:"⋆"},{key:[115,116,97,114,59],value:"☆"},{key:[115,116,97,114,102,59],value:"★"},{key:[115,116,114,97,105,103,104,116,101,112,115,105,108,111,110,59],value:"ϵ"},{key:[115,116,114,97,105,103,104,116,112,104,105,59],value:"ϕ"},{key:[115,116,114,110,115,59],value:"¯"},{key:[115,117,98,59],value:"⊂"},{key:[115,117,98,69,59],value:"⫅"},{key:[115,117,98,100,111,116,59],value:"⪽"},{key:[115,117,98,101,59],value:"⊆"},{key:[115,117,98,101,100,111,116,59],value:"⫃"},{key:[115,117,98,109,117,108,116,59],value:"⫁"},{key:[115,117,98,110,69,59],value:"⫋"},{key:[115,117,98,110,101,59],value:"⊊"},{key:[115,117,98,112,108,117,115,59],value:"⪿"},{key:[115,117,98,114,97,114,114,59],value:"⥹"},{key:[115,117,98,115,101,116,59],value:"⊂"},{key:[115,117,98,115,101,116,101,113,59],value:"⊆"},{key:[115,117,98,115,101,116,101,113,113,59],value:"⫅"},{key:[115,117,98,115,101,116,110,101,113,59],value:"⊊"},{key:[115,117,98,115,101,116,110,101,113,113,59],value:"⫋"},{key:[115,117,98,115,105,109,59],value:"⫇"},{key:[115,117,98,115,117,98,59],value:"⫕"},{key:[115,117,98,115,117,112,59],value:"⫓"},{key:[115,117,99,99,59],value:"≻"},{key:[115,117,99,99,97,112,112,114,111,120,59],value:"⪸"},{key:[115,117,99,99,99,117,114,108,121,101,113,59],value:"≽"},{key:[115,117,99,99,101,113,59],value:"⪰"},{key:[115,117,99,99,110,97,112,112,114,111,120,59],value:"⪺"},{key:[115,117,99,99,110,101,113,113,59],value:"⪶"},{key:[115,117,99,99,110,115,105,109,59],value:"⋩"},{key:[115,117,99,99,115,105,109,59],value:"≿"},{key:[115,117,109,59],value:"∑"},{key:[115,117,110,103,59],value:"♪"},{key:[115,117,112,49,59],value:"¹"},{key:[115,117,112,50,59],value:"²"},{key:[115,117,112,51,59],value:"³"},{key:[115,117,112,59],value:"⊃"},{key:[115,117,112,69,59],value:"⫆"},{key:[115,117,112,100,111,116,59],value:"⪾"},{key:[115,117,112,100,115,117,98,59],value:"⫘"},{key:[115,117,112,101,59],value:"⊇"},{key:[115,117,112,101,100,111,116,59],value:"⫄"},{key:[115,117,112,104,115,111,108,59],value:"⟉"},{key:[115,117,112,104,115,117,98,59],value:"⫗"},{key:[115,117,112,108,97,114,114,59],value:"⥻"},{key:[115,117,112,109,117,108,116,59],value:"⫂"},{key:[115,117,112,110,69,59],value:"⫌"},{key:[115,117,112,110,101,59],value:"⊋"},{key:[115,117,112,112,108,117,115,59],value:"⫀"},{key:[115,117,112,115,101,116,59],value:"⊃"},{key:[115,117,112,115,101,116,101,113,59],value:"⊇"},{key:[115,117,112,115,101,116,101,113,113,59],value:"⫆"},{key:[115,117,112,115,101,116,110,101,113,59],value:"⊋"},{key:[115,117,112,115,101,116,110,101,113,113,59],value:"⫌"},{key:[115,117,112,115,105,109,59],value:"⫈"},{key:[115,117,112,115,117,98,59],value:"⫔"},{key:[115,117,112,115,117,112,59],value:"⫖"},{key:[115,119,65,114,114,59],value:"⇙"},{key:[115,119,97,114,104,107,59],value:"⤦"},{key:[115,119,97,114,114,59],value:"↙"},{key:[115,119,97,114,114,111,119,59],value:"↙"},{key:[115,119,110,119,97,114,59],value:"⤪"},{key:[115,122,108,105,103,59],value:"ß"},{key:[116,97,114,103,101,116,59],value:"⌖"},{key:[116,97,117,59],value:"τ"},{key:[116,98,114,107,59],value:"⎴"},{key:[116,99,97,114,111,110,59],value:"ť"},{key:[116,99,101,100,105,108,59],value:"ţ"},{key:[116,99,121,59],value:"т"},{key:[116,100,111,116,59],value:"⃛"},{key:[116,101,108,114,101,99,59],value:"⌕"},{key:[116,102,114,59],value:"𝔱"},{key:[116,104,101,114,101,52,59],value:"∴"},{key:[116,104,101,114,101,102,111,114,101,59],value:"∴"},{key:[116,104,101,116,97,59],value:"θ"},{key:[116,104,101,116,97,115,121,109,59],value:"ϑ"},{key:[116,104,101,116,97,118,59],value:"ϑ"},{key:[116,104,105,99,107,97,112,112,114,111,120,59],value:"≈"},{key:[116,104,105,99,107,115,105,109,59],value:"∼"},{key:[116,104,105,110,115,112,59],value:" "},{key:[116,104,107,97,112,59],value:"≈"},{key:[116,104,107,115,105,109,59],value:"∼"},{key:[116,104,111,114,110,59],value:"þ"},{key:[116,105,108,100,101,59],value:"˜"},{key:[116,105,109,101,115,59],value:"×"},{key:[116,105,109,101,115,98,59],value:"⊠"},{key:[116,105,109,101,115,98,97,114,59],value:"⨱"},{key:[116,105,109,101,115,100,59],value:"⨰"},{key:[116,105,110,116,59],value:"∭"},{key:[116,111,101,97,59],value:"⤨"},{key:[116,111,112,59],value:"⊤"},{key:[116,111,112,98,111,116,59],value:"⌶"},{key:[116,111,112,99,105,114,59],value:"⫱"},{key:[116,111,112,102,59],value:"𝕥"},{key:[116,111,112,102,111,114,107,59],value:"⫚"},{key:[116,111,115,97,59],value:"⤩"},{key:[116,112,114,105,109,101,59],value:"‴"},{key:[116,114,97,100,101,59],value:"™"},{key:[116,114,105,97,110,103,108,101,59],value:"▵"},{key:[116,114,105,97,110,103,108,101,100,111,119,110,59],value:"▿"},{key:[116,114,105,97,110,103,108,101,108,101,102,116,59],value:"◃"},{key:[116,114,105,97,110,103,108,101,108,101,102,116,101,113,59],value:"⊴"},{key:[116,114,105,97,110,103,108,101,113,59],value:"≜"},{key:[116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"▹"},{key:[116,114,105,97,110,103,108,101,114,105,103,104,116,101,113,59],value:"⊵"},{key:[116,114,105,100,111,116,59],value:"◬"},{key:[116,114,105,101,59],value:"≜"},{key:[116,114,105,109,105,110,117,115,59],value:"⨺"},{key:[116,114,105,112,108,117,115,59],value:"⨹"},{key:[116,114,105,115,98,59],value:"⧍"},{key:[116,114,105,116,105,109,101,59],value:"⨻"},{key:[116,114,112,101,122,105,117,109,59],value:"⏢"},{key:[116,115,99,114,59],value:"𝓉"},{key:[116,115,99,121,59],value:"ц"},{key:[116,115,104,99,121,59],value:"ћ"},{key:[116,115,116,114,111,107,59],value:"ŧ"},{key:[116,119,105,120,116,59],value:"≬"},{key:[116,119,111,104,101,97,100,108,101,102,116,97,114,114,111,119,59],value:"↞"},{key:[116,119,111,104,101,97,100,114,105,103,104,116,97,114,114,111,119,59],value:"↠"},{key:[117,65,114,114,59],value:"⇑"},{key:[117,72,97,114,59],value:"⥣"},{key:[117,97,99,117,116,101,59],value:"ú"},{key:[117,97,114,114,59],value:"↑"},{key:[117,98,114,99,121,59],value:"ў"},{key:[117,98,114,101,118,101,59],value:"ŭ"},{key:[117,99,105,114,99,59],value:"û"},{key:[117,99,121,59],value:"у"},{key:[117,100,97,114,114,59],value:"⇅"},{key:[117,100,98,108,97,99,59],value:"ű"},{key:[117,100,104,97,114,59],value:"⥮"},{key:[117,102,105,115,104,116,59],value:"⥾"},{key:[117,102,114,59],value:"𝔲"},{key:[117,103,114,97,118,101,59],value:"ù"},{key:[117,104,97,114,108,59],value:"↿"},{key:[117,104,97,114,114,59],value:"↾"},{key:[117,104,98,108,107,59],value:"▀"},{key:[117,108,99,111,114,110,59],value:"⌜"},{key:[117,108,99,111,114,110,101,114,59],value:"⌜"},{key:[117,108,99,114,111,112,59],value:"⌏"},{key:[117,108,116,114,105,59],value:"◸"},{key:[117,109,97,99,114,59],value:"ū"},{key:[117,109,108,59],value:"¨"},{key:[117,111,103,111,110,59],value:"ų"},{key:[117,111,112,102,59],value:"𝕦"},{key:[117,112,97,114,114,111,119,59],value:"↑"},{key:[117,112,100,111,119,110,97,114,114,111,119,59],value:"↕"},{key:[117,112,104,97,114,112,111,111,110,108,101,102,116,59],value:"↿"},{key:[117,112,104,97,114,112,111,111,110,114,105,103,104,116,59],value:"↾"},{key:[117,112,108,117,115,59],value:"⊎"},{key:[117,112,115,105,59],value:"υ"},{key:[117,112,115,105,104,59],value:"ϒ"},{key:[117,112,115,105,108,111,110,59],value:"υ"},{key:[117,112,117,112,97,114,114,111,119,115,59],value:"⇈"},{key:[117,114,99,111,114,110,59],value:"⌝"},{key:[117,114,99,111,114,110,101,114,59],value:"⌝"},{key:[117,114,99,114,111,112,59],value:"⌎"},{key:[117,114,105,110,103,59],value:"ů"},{key:[117,114,116,114,105,59],value:"◹"},{key:[117,115,99,114,59],value:"𝓊"},{key:[117,116,100,111,116,59],value:"⋰"},{key:[117,116,105,108,100,101,59],value:"ũ"},{key:[117,116,114,105,59],value:"▵"},{key:[117,116,114,105,102,59],value:"▴"},{key:[117,117,97,114,114,59],value:"⇈"},{key:[117,117,109,108,59],value:"ü"},{key:[117,119,97,110,103,108,101,59],value:"⦧"},{key:[118,65,114,114,59],value:"⇕"},{key:[118,66,97,114,59],value:"⫨"},{key:[118,66,97,114,118,59],value:"⫩"},{key:[118,68,97,115,104,59],value:"⊨"},{key:[118,97,110,103,114,116,59],value:"⦜"},{key:[118,97,114,101,112,115,105,108,111,110,59],value:"ϵ"},{key:[118,97,114,107,97,112,112,97,59],value:"ϰ"},{key:[118,97,114,110,111,116,104,105,110,103,59],value:"∅"},{key:[118,97,114,112,104,105,59],value:"ϕ"},{key:[118,97,114,112,105,59],value:"ϖ"},{key:[118,97,114,112,114,111,112,116,111,59],value:"∝"},{key:[118,97,114,114,59],value:"↕"},{key:[118,97,114,114,104,111,59],value:"ϱ"},{key:[118,97,114,115,105,103,109,97,59],value:"ς"},{key:[118,97,114,115,117,98,115,101,116,110,101,113,59],value:"⊊︀"},{key:[118,97,114,115,117,98,115,101,116,110,101,113,113,59],value:"⫋︀"},{key:[118,97,114,115,117,112,115,101,116,110,101,113,59],value:"⊋︀"},{key:[118,97,114,115,117,112,115,101,116,110,101,113,113,59],value:"⫌︀"},{key:[118,97,114,116,104,101,116,97,59],value:"ϑ"},{key:[118,97,114,116,114,105,97,110,103,108,101,108,101,102,116,59],value:"⊲"},{key:[118,97,114,116,114,105,97,110,103,108,101,114,105,103,104,116,59],value:"⊳"},{key:[118,99,121,59],value:"в"},{key:[118,100,97,115,104,59],value:"⊢"},{key:[118,101,101,59],value:"∨"},{key:[118,101,101,98,97,114,59],value:"⊻"},{key:[118,101,101,101,113,59],value:"≚"},{key:[118,101,108,108,105,112,59],value:"⋮"},{key:[118,101,114,98,97,114,59],value:"|"},{key:[118,101,114,116,59],value:"|"},{key:[118,102,114,59],value:"𝔳"},{key:[118,108,116,114,105,59],value:"⊲"},{key:[118,110,115,117,98,59],value:"⊂⃒"},{key:[118,110,115,117,112,59],value:"⊃⃒"},{key:[118,111,112,102,59],value:"𝕧"},{key:[118,112,114,111,112,59],value:"∝"},{key:[118,114,116,114,105,59],value:"⊳"},{key:[118,115,99,114,59],value:"𝓋"},{key:[118,115,117,98,110,69,59],value:"⫋︀"},{key:[118,115,117,98,110,101,59],value:"⊊︀"},{key:[118,115,117,112,110,69,59],value:"⫌︀"},{key:[118,115,117,112,110,101,59],value:"⊋︀"},{key:[118,122,105,103,122,97,103,59],value:"⦚"},{key:[119,99,105,114,99,59],value:"ŵ"},{key:[119,101,100,98,97,114,59],value:"⩟"},{key:[119,101,100,103,101,59],value:"∧"},{key:[119,101,100,103,101,113,59],value:"≙"},{key:[119,101,105,101,114,112,59],value:"℘"},{key:[119,102,114,59],value:"𝔴"},{key:[119,111,112,102,59],value:"𝕨"},{key:[119,112,59],value:"℘"},{key:[119,114,59],value:"≀"},{key:[119,114,101,97,116,104,59],value:"≀"},{key:[119,115,99,114,59],value:"𝓌"},{key:[120,99,97,112,59],value:"⋂"},{key:[120,99,105,114,99,59],value:"◯"},{key:[120,99,117,112,59],value:"⋃"},{key:[120,100,116,114,105,59],value:"▽"},{key:[120,102,114,59],value:"𝔵"},{key:[120,104,65,114,114,59],value:"⟺"},{key:[120,104,97,114,114,59],value:"⟷"},{key:[120,105,59],value:"ξ"},{key:[120,108,65,114,114,59],value:"⟸"},{key:[120,108,97,114,114,59],value:"⟵"},{key:[120,109,97,112,59],value:"⟼"},{key:[120,110,105,115,59],value:"⋻"},{key:[120,111,100,111,116,59],value:"⨀"},{key:[120,111,112,102,59],value:"𝕩"},{key:[120,111,112,108,117,115,59],value:"⨁"},{key:[120,111,116,105,109,101,59],value:"⨂"},{key:[120,114,65,114,114,59],value:"⟹"},{key:[120,114,97,114,114,59],value:"⟶"},{key:[120,115,99,114,59],value:"𝓍"},{key:[120,115,113,99,117,112,59],value:"⨆"},{key:[120,117,112,108,117,115,59],value:"⨄"},{key:[120,117,116,114,105,59],value:"△"},{key:[120,118,101,101,59],value:"⋁"},{key:[120,119,101,100,103,101,59],value:"⋀"},{key:[121,97,99,117,116,101,59],value:"ý"},{key:[121,97,99,121,59],value:"я"},{key:[121,99,105,114,99,59],value:"ŷ"},{key:[121,99,121,59],value:"ы"},{key:[121,101,110,59],value:"¥"},{key:[121,102,114,59],value:"𝔶"},{key:[121,105,99,121,59],value:"ї"},{key:[121,111,112,102,59],value:"𝕪"},{key:[121,115,99,114,59],value:"𝓎"},{key:[121,117,99,121,59],value:"ю"},{key:[121,117,109,108,59],value:"ÿ"},{key:[122,97,99,117,116,101,59],value:"ź"},{key:[122,99,97,114,111,110,59],value:"ž"},{key:[122,99,121,59],value:"з"},{key:[122,100,111,116,59],value:"ż"},{key:[122,101,101,116,114,102,59],value:"ℨ"},{key:[122,101,116,97,59],value:"ζ"},{key:[122,102,114,59],value:"𝔷"},{key:[122,104,99,121,59],value:"ж"},{key:[122,105,103,114,97,114,114,59],value:"⇝"},{key:[122,111,112,102,59],value:"𝕫"},{key:[122,115,99,114,59],value:"𝓏"},{key:[122,119,106,59],value:"‍"},{key:[122,119,110,106,59],value:"‌"}];var UnicodePcCodePoint;(function(S){S[S.LOW_LINE=95]="LOW_LINE",S[S.UNDERTIE=8255]="UNDERTIE",S[S.CHARACTER_TIE=8256]="CHARACTER_TIE",S[S.INVERTED_UNDERTIE=8276]="INVERTED_UNDERTIE",S[S.PRESENTATION_FORM_FOR_VERTICAL_LOW_LINE=65075]="PRESENTATION_FORM_FOR_VERTICAL_LOW_LINE",S[S.PRESENTATION_FORM_FOR_VERTICAL_WAVY_LOW_LINE=65076]="PRESENTATION_FORM_FOR_VERTICAL_WAVY_LOW_LINE",S[S.DASHED_LOW_LINE=65101]="DASHED_LOW_LINE",S[S.CENTRELINE_LOW_LINE=65102]="CENTRELINE_LOW_LINE",S[S.WAVY_LOW_LINE=65103]="WAVY_LOW_LINE",S[S.FULLWIDTH_LOW_LINE=65343]="FULLWIDTH_LOW_LINE"})(UnicodePcCodePoint||(UnicodePcCodePoint={}));var UnicodePdCodePoint;(function(S){S[S.HYPHEN_MINUS=45]="HYPHEN_MINUS",S[S.ARMENIAN_HYPHEN=1418]="ARMENIAN_HYPHEN",S[S.HEBREW_PUNCTUATION_MAQAF=1470]="HEBREW_PUNCTUATION_MAQAF",S[S.CANADIAN_SYLLABICS_HYPHEN=5120]="CANADIAN_SYLLABICS_HYPHEN",S[S.MONGOLIAN_TODO_SOFT_HYPHEN=6150]="MONGOLIAN_TODO_SOFT_HYPHEN",S[S.HYPHEN=8208]="HYPHEN",S[S.NON_BREAKING_HYPHEN=8209]="NON_BREAKING_HYPHEN",S[S.FIGURE_DASH=8210]="FIGURE_DASH",S[S.EN_DASH=8211]="EN_DASH",S[S.EM_DASH=8212]="EM_DASH",S[S.HORIZONTAL_BAR=8213]="HORIZONTAL_BAR",S[S.DOUBLE_OBLIQUE_HYPHEN=11799]="DOUBLE_OBLIQUE_HYPHEN",S[S.HYPHEN_WITH_DIAERESIS=11802]="HYPHEN_WITH_DIAERESIS",S[S.TWO_EM_DASH=11834]="TWO_EM_DASH",S[S.THREE_EM_DASH=11835]="THREE_EM_DASH",S[S.DOUBLE_HYPHEN=11840]="DOUBLE_HYPHEN",S[S.WAVE_DASH=12316]="WAVE_DASH",S[S.WAVY_DASH=12336]="WAVY_DASH",S[S.KATAKANA_HIRAGANA_DOUBLE_HYPHEN=12448]="KATAKANA_HIRAGANA_DOUBLE_HYPHEN",S[S.PRESENTATION_FORM_FOR_VERTICAL_EM_DASH=65073]="PRESENTATION_FORM_FOR_VERTICAL_EM_DASH",S[S.PRESENTATION_FORM_FOR_VERTICAL_EN_DASH=65074]="PRESENTATION_FORM_FOR_VERTICAL_EN_DASH",S[S.SMALL_EM_DASH=65112]="SMALL_EM_DASH",S[S.SMALL_HYPHEN_MINUS=65123]="SMALL_HYPHEN_MINUS",S[S.FULLWIDTH_HYPHEN_MINUS=65293]="FULLWIDTH_HYPHEN_MINUS",S[S.YEZIDI_HYPHENATION_MARK=69293]="YEZIDI_HYPHENATION_MARK"})(UnicodePdCodePoint||(UnicodePdCodePoint={}));var UnicodePeCodePoint;(function(S){S[S.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",S[S.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",S[S.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",S[S.TIBETAN_MARK_GUG_RTAGS_GYAS=3899]="TIBETAN_MARK_GUG_RTAGS_GYAS",S[S.TIBETAN_MARK_ANG_KHANG_GYAS=3901]="TIBETAN_MARK_ANG_KHANG_GYAS",S[S.OGHAM_REVERSED_FEATHER_MARK=5788]="OGHAM_REVERSED_FEATHER_MARK",S[S.RIGHT_SQUARE_BRACKET_WITH_QUILL=8262]="RIGHT_SQUARE_BRACKET_WITH_QUILL",S[S.SUPERSCRIPT_RIGHT_PARENTHESIS=8318]="SUPERSCRIPT_RIGHT_PARENTHESIS",S[S.SUBSCRIPT_RIGHT_PARENTHESIS=8334]="SUBSCRIPT_RIGHT_PARENTHESIS",S[S.RIGHT_CEILING=8969]="RIGHT_CEILING",S[S.RIGHT_FLOOR=8971]="RIGHT_FLOOR",S[S.RIGHT_POINTING_ANGLE_BRACKET=9002]="RIGHT_POINTING_ANGLE_BRACKET",S[S.MEDIUM_RIGHT_PARENTHESIS_ORNAMENT=10089]="MEDIUM_RIGHT_PARENTHESIS_ORNAMENT",S[S.MEDIUM_FLATTENED_RIGHT_PARENTHESIS_ORNAMENT=10091]="MEDIUM_FLATTENED_RIGHT_PARENTHESIS_ORNAMENT",S[S.MEDIUM_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT=10093]="MEDIUM_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT",S[S.HEAVY_RIGHT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT=10095]="HEAVY_RIGHT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT",S[S.HEAVY_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT=10097]="HEAVY_RIGHT_POINTING_ANGLE_BRACKET_ORNAMENT",S[S.LIGHT_RIGHT_TORTOISE_SHELL_BRACKET_ORNAMENT=10099]="LIGHT_RIGHT_TORTOISE_SHELL_BRACKET_ORNAMENT",S[S.MEDIUM_RIGHT_CURLY_BRACKET_ORNAMENT=10101]="MEDIUM_RIGHT_CURLY_BRACKET_ORNAMENT",S[S.RIGHT_S_SHAPED_BAG_DELIMITER=10182]="RIGHT_S_SHAPED_BAG_DELIMITER",S[S.MATHEMATICAL_RIGHT_WHITE_SQUARE_BRACKET=10215]="MATHEMATICAL_RIGHT_WHITE_SQUARE_BRACKET",S[S.MATHEMATICAL_RIGHT_ANGLE_BRACKET=10217]="MATHEMATICAL_RIGHT_ANGLE_BRACKET",S[S.MATHEMATICAL_RIGHT_DOUBLE_ANGLE_BRACKET=10219]="MATHEMATICAL_RIGHT_DOUBLE_ANGLE_BRACKET",S[S.MATHEMATICAL_RIGHT_WHITE_TORTOISE_SHELL_BRACKET=10221]="MATHEMATICAL_RIGHT_WHITE_TORTOISE_SHELL_BRACKET",S[S.MATHEMATICAL_RIGHT_FLATTENED_PARENTHESIS=10223]="MATHEMATICAL_RIGHT_FLATTENED_PARENTHESIS",S[S.RIGHT_WHITE_CURLY_BRACKET=10628]="RIGHT_WHITE_CURLY_BRACKET",S[S.RIGHT_WHITE_PARENTHESIS=10630]="RIGHT_WHITE_PARENTHESIS",S[S.Z_NOTATION_RIGHT_IMAGE_BRACKET=10632]="Z_NOTATION_RIGHT_IMAGE_BRACKET",S[S.Z_NOTATION_RIGHT_BINDING_BRACKET=10634]="Z_NOTATION_RIGHT_BINDING_BRACKET",S[S.RIGHT_SQUARE_BRACKET_WITH_UNDERBAR=10636]="RIGHT_SQUARE_BRACKET_WITH_UNDERBAR",S[S.RIGHT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER=10638]="RIGHT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER",S[S.RIGHT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER=10640]="RIGHT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER",S[S.RIGHT_ANGLE_BRACKET_WITH_DOT=10642]="RIGHT_ANGLE_BRACKET_WITH_DOT",S[S.RIGHT_ARC_GREATER_THAN_BRACKET=10644]="RIGHT_ARC_GREATER_THAN_BRACKET",S[S.DOUBLE_RIGHT_ARC_LESS_THAN_BRACKET=10646]="DOUBLE_RIGHT_ARC_LESS_THAN_BRACKET",S[S.RIGHT_BLACK_TORTOISE_SHELL_BRACKET=10648]="RIGHT_BLACK_TORTOISE_SHELL_BRACKET",S[S.RIGHT_WIGGLY_FENCE=10713]="RIGHT_WIGGLY_FENCE",S[S.RIGHT_DOUBLE_WIGGLY_FENCE=10715]="RIGHT_DOUBLE_WIGGLY_FENCE",S[S.RIGHT_POINTING_CURVED_ANGLE_BRACKET=10749]="RIGHT_POINTING_CURVED_ANGLE_BRACKET",S[S.TOP_RIGHT_HALF_BRACKET=11811]="TOP_RIGHT_HALF_BRACKET",S[S.BOTTOM_RIGHT_HALF_BRACKET=11813]="BOTTOM_RIGHT_HALF_BRACKET",S[S.RIGHT_SIDEWAYS_U_BRACKET=11815]="RIGHT_SIDEWAYS_U_BRACKET",S[S.RIGHT_DOUBLE_PARENTHESIS=11817]="RIGHT_DOUBLE_PARENTHESIS",S[S.RIGHT_ANGLE_BRACKET=12297]="RIGHT_ANGLE_BRACKET",S[S.RIGHT_DOUBLE_ANGLE_BRACKET=12299]="RIGHT_DOUBLE_ANGLE_BRACKET",S[S.RIGHT_CORNER_BRACKET=12301]="RIGHT_CORNER_BRACKET",S[S.RIGHT_WHITE_CORNER_BRACKET=12303]="RIGHT_WHITE_CORNER_BRACKET",S[S.RIGHT_BLACK_LENTICULAR_BRACKET=12305]="RIGHT_BLACK_LENTICULAR_BRACKET",S[S.RIGHT_TORTOISE_SHELL_BRACKET=12309]="RIGHT_TORTOISE_SHELL_BRACKET",S[S.RIGHT_WHITE_LENTICULAR_BRACKET=12311]="RIGHT_WHITE_LENTICULAR_BRACKET",S[S.RIGHT_WHITE_TORTOISE_SHELL_BRACKET=12313]="RIGHT_WHITE_TORTOISE_SHELL_BRACKET",S[S.RIGHT_WHITE_SQUARE_BRACKET=12315]="RIGHT_WHITE_SQUARE_BRACKET",S[S.DOUBLE_PRIME_QUOTATION_MARK=12318]="DOUBLE_PRIME_QUOTATION_MARK",S[S.LOW_DOUBLE_PRIME_QUOTATION_MARK=12319]="LOW_DOUBLE_PRIME_QUOTATION_MARK",S[S.ORNATE_LEFT_PARENTHESIS=64830]="ORNATE_LEFT_PARENTHESIS",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_LENTICULAR_BRAKCET=65048]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_LENTICULAR_BRAKCET",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_PARENTHESIS=65078]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_PARENTHESIS",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CURLY_BRACKET=65080]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CURLY_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_TORTOISE_SHELL_BRACKET=65082]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_TORTOISE_SHELL_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_BLACK_LENTICULAR_BRACKET=65084]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_BLACK_LENTICULAR_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_DOUBLE_ANGLE_BRACKET=65086]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_DOUBLE_ANGLE_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_ANGLE_BRACKET=65088]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_ANGLE_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CORNER_BRACKET=65090]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_CORNER_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_CORNER_BRACKET=65092]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_WHITE_CORNER_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_RIGHT_SQUARE_BRACKET=65096]="PRESENTATION_FORM_FOR_VERTICAL_RIGHT_SQUARE_BRACKET",S[S.SMALL_RIGHT_PARENTHESIS=65114]="SMALL_RIGHT_PARENTHESIS",S[S.SMALL_RIGHT_CURLY_BRACKET=65116]="SMALL_RIGHT_CURLY_BRACKET",S[S.SMALL_RIGHT_TORTOISE_SHELL_BRACKET=65118]="SMALL_RIGHT_TORTOISE_SHELL_BRACKET",S[S.FULLWIDTH_RIGHT_PARENTHESIS=65289]="FULLWIDTH_RIGHT_PARENTHESIS",S[S.FULLWIDTH_RIGHT_SQUARE_BRACKET=65341]="FULLWIDTH_RIGHT_SQUARE_BRACKET",S[S.FULLWIDTH_RIGHT_CURLY_BRACKET=65373]="FULLWIDTH_RIGHT_CURLY_BRACKET",S[S.FULLWIDTH_RIGHT_WHITE_PARENTHESIS=65376]="FULLWIDTH_RIGHT_WHITE_PARENTHESIS",S[S.HALFWIDTH_RIGHT_CORNER_BRACKET=65379]="HALFWIDTH_RIGHT_CORNER_BRACKET"})(UnicodePeCodePoint||(UnicodePeCodePoint={}));var UnicodePfCodePoint;(function(S){S[S.RIGHT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK=187]="RIGHT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK",S[S.RIGHT_SINGLE_QUOTATION_MARK=8217]="RIGHT_SINGLE_QUOTATION_MARK",S[S.RIGHT_DOUBLE_QUOTATION_MARK=8221]="RIGHT_DOUBLE_QUOTATION_MARK",S[S.SINGLE_RIGHT_POINTING_ANGLE_QUOTATION_MARK=8250]="SINGLE_RIGHT_POINTING_ANGLE_QUOTATION_MARK",S[S.RIGHT_SUBSTITUTION_BRACKET=11779]="RIGHT_SUBSTITUTION_BRACKET",S[S.RIGHT_DOTTED_SUBSTITUTION_BRACKET=11781]="RIGHT_DOTTED_SUBSTITUTION_BRACKET",S[S.RIGHT_TRANSPOSITION_BRACKET=11786]="RIGHT_TRANSPOSITION_BRACKET",S[S.RIGHT_RAISED_OMISSION_BRACKET=11789]="RIGHT_RAISED_OMISSION_BRACKET",S[S.RIGHT_LOW_PARAPHRASE_BRACKET=11805]="RIGHT_LOW_PARAPHRASE_BRACKET",S[S.RIGHT_VERTICAL_BAR_WITH_QUILL=11809]="RIGHT_VERTICAL_BAR_WITH_QUILL"})(UnicodePfCodePoint||(UnicodePfCodePoint={}));var UnicodePiCodePoint;(function(S){S[S.LEFT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK=171]="LEFT_POINTING_DOUBLE_ANGLE_QUOTATION_MARK",S[S.LEFT_SINGLE_QUOTATION_MARK=8216]="LEFT_SINGLE_QUOTATION_MARK",S[S.SINGLE_HIGH_REVERSED_9_QUOTATION_MARK=8219]="SINGLE_HIGH_REVERSED_9_QUOTATION_MARK",S[S.LEFT_DOUBLE_QUOTATION_MARK=8220]="LEFT_DOUBLE_QUOTATION_MARK",S[S.DOUBLE_HIGH_REVERSED_9_QUOTATION_MARK=8223]="DOUBLE_HIGH_REVERSED_9_QUOTATION_MARK",S[S.SINGLE_LEFT_POINTING_ANGLE_QUOTATION_MARK=8249]="SINGLE_LEFT_POINTING_ANGLE_QUOTATION_MARK",S[S.LEFT_SUBSTITUTION_BRACKET=11778]="LEFT_SUBSTITUTION_BRACKET",S[S.LEFT_DOTTED_SUBSTITUTION_BRACKET=11780]="LEFT_DOTTED_SUBSTITUTION_BRACKET",S[S.LEFT_TRANSPOSITION_BRACKET=11785]="LEFT_TRANSPOSITION_BRACKET",S[S.LEFT_RAISED_OMISSION_BRACKET=11788]="LEFT_RAISED_OMISSION_BRACKET",S[S.LEFT_LOW_PARAPHRASE_BRACKET=11804]="LEFT_LOW_PARAPHRASE_BRACKET",S[S.LEFT_VERTICAL_BAR_WITH_QUILL=11808]="LEFT_VERTICAL_BAR_WITH_QUILL"})(UnicodePiCodePoint||(UnicodePiCodePoint={}));var UnicodePoCodePoint;(function(S){S[S.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",S[S.QUOTATION_MARK=34]="QUOTATION_MARK",S[S.NUMBER_SIGN=35]="NUMBER_SIGN",S[S.PERCENT_SIGN=37]="PERCENT_SIGN",S[S.AMPERSAND=38]="AMPERSAND",S[S.APOSTROPHE=39]="APOSTROPHE",S[S.ASTERISK=42]="ASTERISK",S[S.COMMA=44]="COMMA",S[S.FULL_STOP=46]="FULL_STOP",S[S.SOLIDUS=47]="SOLIDUS",S[S.COLON=58]="COLON",S[S.SEMICOLON=59]="SEMICOLON",S[S.QUESTION_MARK=63]="QUESTION_MARK",S[S.COMMERCIAL_AT=64]="COMMERCIAL_AT",S[S.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",S[S.INVERTED_EXCLAMATION_MARK=161]="INVERTED_EXCLAMATION_MARK",S[S.SECTION_SIGN=167]="SECTION_SIGN",S[S.PILCROW_SIGN=182]="PILCROW_SIGN",S[S.MIDDLE_DOT=183]="MIDDLE_DOT",S[S.INVERTED_QUESTION_MARK=191]="INVERTED_QUESTION_MARK",S[S.GREEK_QUESTION_MARK=894]="GREEK_QUESTION_MARK",S[S.GREEK_ANO_TELEIA=903]="GREEK_ANO_TELEIA",S[S.ARMENIAN_APOSTROPHE=1370]="ARMENIAN_APOSTROPHE",S[S.ARMENIAN_EMPHASIS_MARK=1371]="ARMENIAN_EMPHASIS_MARK",S[S.ARMENIAN_EXCLAMATION_MARK=1372]="ARMENIAN_EXCLAMATION_MARK",S[S.ARMENIAN_COMMA=1373]="ARMENIAN_COMMA",S[S.ARMENIAN_QUESTION_MARK=1374]="ARMENIAN_QUESTION_MARK",S[S.ARMENIAN_ABBREVIATION_MARK=1375]="ARMENIAN_ABBREVIATION_MARK",S[S.ARMENIAN_FULL_STOP=1417]="ARMENIAN_FULL_STOP",S[S.HEBREW_PUNCTUATION_PASEQ=1472]="HEBREW_PUNCTUATION_PASEQ",S[S.HEBREW_PUNCTUATION_SOF_PASUQ=1475]="HEBREW_PUNCTUATION_SOF_PASUQ",S[S.HEBREW_PUNCTUATION_NUN_HAFUKHA=1478]="HEBREW_PUNCTUATION_NUN_HAFUKHA",S[S.HEBREW_PUNCTUATION_GERESH=1523]="HEBREW_PUNCTUATION_GERESH",S[S.HEBREW_PUNCTUATION_GERSHAYIM=1524]="HEBREW_PUNCTUATION_GERSHAYIM",S[S.ARABIC_INDIC_PER_MILLE_SIGN=1545]="ARABIC_INDIC_PER_MILLE_SIGN",S[S.ARABIC_INDIC_PER_TEN_THOUSAND_SIGN=1546]="ARABIC_INDIC_PER_TEN_THOUSAND_SIGN",S[S.ARABIC_COMMA=1548]="ARABIC_COMMA",S[S.ARABIC_DATE_SEPARATOR=1549]="ARABIC_DATE_SEPARATOR",S[S.ARABIC_SEMICOLON=1563]="ARABIC_SEMICOLON",S[S.ARABIC_TRIPLE_DOT_PUNCTUATION_MARK=1566]="ARABIC_TRIPLE_DOT_PUNCTUATION_MARK",S[S.ARABIC_QUESTION_MARK=1567]="ARABIC_QUESTION_MARK",S[S.ARABIC_PERCENT_SIGN=1642]="ARABIC_PERCENT_SIGN",S[S.ARABIC_DECIMAL_SEPARATOR=1643]="ARABIC_DECIMAL_SEPARATOR",S[S.ARABIC_THOUSANDS_SEPARATOR=1644]="ARABIC_THOUSANDS_SEPARATOR",S[S.ARABIC_FIVE_POINTED_STAR=1645]="ARABIC_FIVE_POINTED_STAR",S[S.ARABIC_FULL_STOP=1748]="ARABIC_FULL_STOP",S[S.SYRIAC_END_OF_PARAGRAPH=1792]="SYRIAC_END_OF_PARAGRAPH",S[S.SYRIAC_SUPRALINEAR_FULL_STOP=1793]="SYRIAC_SUPRALINEAR_FULL_STOP",S[S.SYRIAC_SUBLINEAR_FULL_STOP=1794]="SYRIAC_SUBLINEAR_FULL_STOP",S[S.SYRIAC_SUPRALINEAR_COLON=1795]="SYRIAC_SUPRALINEAR_COLON",S[S.SYRIAC_SUBLINEAR_COLON=1796]="SYRIAC_SUBLINEAR_COLON",S[S.SYRIAC_HORIZONTAL_COLON=1797]="SYRIAC_HORIZONTAL_COLON",S[S.SYRIAC_COLON_SKEWED_LEFT=1798]="SYRIAC_COLON_SKEWED_LEFT",S[S.SYRIAC_COLON_SKEWED_RIGHT=1799]="SYRIAC_COLON_SKEWED_RIGHT",S[S.SYRIAC_SUPRALINEAR_COLON_SKEWED_LEFT=1800]="SYRIAC_SUPRALINEAR_COLON_SKEWED_LEFT",S[S.SYRIAC_SUBLINEAR_COLON_SKEWED_RIGHT=1801]="SYRIAC_SUBLINEAR_COLON_SKEWED_RIGHT",S[S.SYRIAC_CONTRACTION=1802]="SYRIAC_CONTRACTION",S[S.SYRIAC_HARKLEAN_OBELUS=1803]="SYRIAC_HARKLEAN_OBELUS",S[S.SYRIAC_HARKLEAN_METOBELUS=1804]="SYRIAC_HARKLEAN_METOBELUS",S[S.SYRIAC_HARKLEAN_ASTERISCUS=1805]="SYRIAC_HARKLEAN_ASTERISCUS",S[S.NKO_SYMBOL_GBAKURUNEN=2039]="NKO_SYMBOL_GBAKURUNEN",S[S.NKO_COMMA=2040]="NKO_COMMA",S[S.NKO_EXCLAMATION_MARK=2041]="NKO_EXCLAMATION_MARK",S[S.SAMARITAN_PUNCTUATION_NEQUDAA=2096]="SAMARITAN_PUNCTUATION_NEQUDAA",S[S.SAMARITAN_PUNCTUATION_AFSAAQ=2097]="SAMARITAN_PUNCTUATION_AFSAAQ",S[S.SAMARITAN_PUNCTUATION_ANGED=2098]="SAMARITAN_PUNCTUATION_ANGED",S[S.SAMARITAN_PUNCTUATION_BAU=2099]="SAMARITAN_PUNCTUATION_BAU",S[S.SAMARITAN_PUNCTUATION_ATMAAU=2100]="SAMARITAN_PUNCTUATION_ATMAAU",S[S.SAMARITAN_PUNCTUATION_SHIYYAALAA=2101]="SAMARITAN_PUNCTUATION_SHIYYAALAA",S[S.SAMARITAN_ABBREVIATION_MARK=2102]="SAMARITAN_ABBREVIATION_MARK",S[S.SAMARITAN_PUNCTUATION_MELODIC_QITSA=2103]="SAMARITAN_PUNCTUATION_MELODIC_QITSA",S[S.SAMARITAN_PUNCTUATION_ZIQAA=2104]="SAMARITAN_PUNCTUATION_ZIQAA",S[S.SAMARITAN_PUNCTUATION_QITSA=2105]="SAMARITAN_PUNCTUATION_QITSA",S[S.SAMARITAN_PUNCTUATION_ZAEF=2106]="SAMARITAN_PUNCTUATION_ZAEF",S[S.SAMARITAN_PUNCTUATION_TURU=2107]="SAMARITAN_PUNCTUATION_TURU",S[S.SAMARITAN_PUNCTUATION_ARKAANU=2108]="SAMARITAN_PUNCTUATION_ARKAANU",S[S.SAMARITAN_PUNCTUATION_SOF_MASHFAAT=2109]="SAMARITAN_PUNCTUATION_SOF_MASHFAAT",S[S.SAMARITAN_PUNCTUATION_ANNAAU=2110]="SAMARITAN_PUNCTUATION_ANNAAU",S[S.MANDAIC_PUNCTUATION=2142]="MANDAIC_PUNCTUATION",S[S.DEVANAGARI_DANDA=2404]="DEVANAGARI_DANDA",S[S.DEVANAGARI_DOUBLE_DANDA=2405]="DEVANAGARI_DOUBLE_DANDA",S[S.DEVANAGARI_ABBREVIATION_SIGN=2416]="DEVANAGARI_ABBREVIATION_SIGN",S[S.BENGALI_ABBREVIATION_SIGN=2557]="BENGALI_ABBREVIATION_SIGN",S[S.GURMUKHI_ABBREVIATION_SIGN=2678]="GURMUKHI_ABBREVIATION_SIGN",S[S.GUJARATI_ABBREVIATION_SIGN=2800]="GUJARATI_ABBREVIATION_SIGN",S[S.TELUGU_SIGN_SIDDHAM=3191]="TELUGU_SIGN_SIDDHAM",S[S.KANNADA_SIGN_SIDDHAM=3204]="KANNADA_SIGN_SIDDHAM",S[S.SINHALA_PUNCTUATION_KUNDDALIYA=3572]="SINHALA_PUNCTUATION_KUNDDALIYA",S[S.THAI_CHARACTER_FONGMAN=3663]="THAI_CHARACTER_FONGMAN",S[S.THAI_CHARACTER_ANGKHANKHU=3674]="THAI_CHARACTER_ANGKHANKHU",S[S.THAI_CHARACTER_KHOMUT=3675]="THAI_CHARACTER_KHOMUT",S[S.TIBETAN_MARK_INITIAL_YIG_MGO_MDUN_MA=3844]="TIBETAN_MARK_INITIAL_YIG_MGO_MDUN_MA",S[S.TIBETAN_MARK_CLOSING_YIG_MGO_SGAB_MA=3845]="TIBETAN_MARK_CLOSING_YIG_MGO_SGAB_MA",S[S.TIBETAN_MARK_CARET_YIG_MGO_PHUR_SHAD_MA=3846]="TIBETAN_MARK_CARET_YIG_MGO_PHUR_SHAD_MA",S[S.TIBETAN_MARK_YIG_MGO_TSHEG_SHAD_MA=3847]="TIBETAN_MARK_YIG_MGO_TSHEG_SHAD_MA",S[S.TIBETAN_MARK_SBRUL_SHAD=3848]="TIBETAN_MARK_SBRUL_SHAD",S[S.TIBETAN_MARK_BSKUR_YIG_MGO=3849]="TIBETAN_MARK_BSKUR_YIG_MGO",S[S.TIBETAN_MARK_BKA__SHOG_YIG_MGO=3850]="TIBETAN_MARK_BKA__SHOG_YIG_MGO",S[S.TIBETAN_MARK_INTERSYLLABIC_TSHEG=3851]="TIBETAN_MARK_INTERSYLLABIC_TSHEG",S[S.TIBETAN_MARK_DELIMITER_TSHEG_BSTAR=3852]="TIBETAN_MARK_DELIMITER_TSHEG_BSTAR",S[S.TIBETAN_MARK_SHAD=3853]="TIBETAN_MARK_SHAD",S[S.TIBETAN_MARK_NYIS_SHAD=3854]="TIBETAN_MARK_NYIS_SHAD",S[S.TIBETAN_MARK_TSHEG_SHAD=3855]="TIBETAN_MARK_TSHEG_SHAD",S[S.TIBETAN_MARK_NYIS_TSHEG_SHAD=3856]="TIBETAN_MARK_NYIS_TSHEG_SHAD",S[S.TIBETAN_MARK_RIN_CHEN_SPUNGS_SHAD=3857]="TIBETAN_MARK_RIN_CHEN_SPUNGS_SHAD",S[S.TIBETAN_MARK_RGYA_GRAM_SHAD=3858]="TIBETAN_MARK_RGYA_GRAM_SHAD",S[S.TIBETAN_MARK_GTER_TSHEG=3860]="TIBETAN_MARK_GTER_TSHEG",S[S.TIBETAN_MARK_PALUTA=3973]="TIBETAN_MARK_PALUTA",S[S.TIBETAN_MARK_BSKA__SHOG_GI_MGO_RGYAN=4048]="TIBETAN_MARK_BSKA__SHOG_GI_MGO_RGYAN",S[S.TIBETAN_MARK_MNYAM_YIG_GI_MGO_RGYAN=4049]="TIBETAN_MARK_MNYAM_YIG_GI_MGO_RGYAN",S[S.TIBETAN_MARK_NYIS_TSHEG=4050]="TIBETAN_MARK_NYIS_TSHEG",S[S.TIBETAN_MARK_INITIAL_BRDA_RNYING_YIG_MGO_MDUN_MA=4051]="TIBETAN_MARK_INITIAL_BRDA_RNYING_YIG_MGO_MDUN_MA",S[S.TIBETAN_MARK_CLOSING_BRDA_RNYING_YIG_MGO_SGAB_MA=4052]="TIBETAN_MARK_CLOSING_BRDA_RNYING_YIG_MGO_SGAB_MA",S[S.TIBETAN_MARK_LEADING_MCHAN_RTAGS=4057]="TIBETAN_MARK_LEADING_MCHAN_RTAGS",S[S.TIBETAN_MARK_TRAILING_MCHAN_RTAGS=4058]="TIBETAN_MARK_TRAILING_MCHAN_RTAGS",S[S.MYANMAR_SIGN_LITTLE_SECTION=4170]="MYANMAR_SIGN_LITTLE_SECTION",S[S.MYANMAR_SIGN_SECTION=4171]="MYANMAR_SIGN_SECTION",S[S.MYANMAR_SYMBOL_LOCATIVE=4172]="MYANMAR_SYMBOL_LOCATIVE",S[S.MYANMAR_SYMBOL_COMPLETED=4173]="MYANMAR_SYMBOL_COMPLETED",S[S.MYANMAR_SYMBOL_AFOREMENTIONED=4174]="MYANMAR_SYMBOL_AFOREMENTIONED",S[S.MYANMAR_SYMBOL_GENITIVE=4175]="MYANMAR_SYMBOL_GENITIVE",S[S.GEORGIAN_PARAGRAPH_SEPARATOR=4347]="GEORGIAN_PARAGRAPH_SEPARATOR",S[S.ETHIOPIC_SECTION_MARK=4960]="ETHIOPIC_SECTION_MARK",S[S.ETHIOPIC_WORDSPACE=4961]="ETHIOPIC_WORDSPACE",S[S.ETHIOPIC_FULL_STOP=4962]="ETHIOPIC_FULL_STOP",S[S.ETHIOPIC_COMMA=4963]="ETHIOPIC_COMMA",S[S.ETHIOPIC_SEMICOLON=4964]="ETHIOPIC_SEMICOLON",S[S.ETHIOPIC_COLON=4965]="ETHIOPIC_COLON",S[S.ETHIOPIC_PREFACE_COLON=4966]="ETHIOPIC_PREFACE_COLON",S[S.ETHIOPIC_QUESTION_MARK=4967]="ETHIOPIC_QUESTION_MARK",S[S.ETHIOPIC_PARAGRAPH_SEPARATOR=4968]="ETHIOPIC_PARAGRAPH_SEPARATOR",S[S.CANADIAN_SYLLABICS_FULL_STOP=5742]="CANADIAN_SYLLABICS_FULL_STOP",S[S.RUNIC_SINGLE_PUNCTUATION=5867]="RUNIC_SINGLE_PUNCTUATION",S[S.RUNIC_MULTIPLE_PUNCTUATION=5868]="RUNIC_MULTIPLE_PUNCTUATION",S[S.RUNIC_CROSS_PUNCTUATION=5869]="RUNIC_CROSS_PUNCTUATION",S[S.PHILIPPINE_SINGLE_PUNCTUATION=5941]="PHILIPPINE_SINGLE_PUNCTUATION",S[S.PHILIPPINE_DOUBLE_PUNCTUATION=5942]="PHILIPPINE_DOUBLE_PUNCTUATION",S[S.KHMER_SIGN_KHAN=6100]="KHMER_SIGN_KHAN",S[S.KHMER_SIGN_BARIYOOSAN=6101]="KHMER_SIGN_BARIYOOSAN",S[S.KHMER_SIGN_CAMNUC_PII_KUUH=6102]="KHMER_SIGN_CAMNUC_PII_KUUH",S[S.KHMER_SIGN_BEYYAL=6104]="KHMER_SIGN_BEYYAL",S[S.KHMER_SIGN_PHNAEK_MUAN=6105]="KHMER_SIGN_PHNAEK_MUAN",S[S.KHMER_SIGN_KOOMUUT=6106]="KHMER_SIGN_KOOMUUT",S[S.MONGOLIAN_BIRGA=6144]="MONGOLIAN_BIRGA",S[S.MONGOLIAN_ELLIPSIS=6145]="MONGOLIAN_ELLIPSIS",S[S.MONGOLIAN_COMMA=6146]="MONGOLIAN_COMMA",S[S.MONGOLIAN_FULL_STOP=6147]="MONGOLIAN_FULL_STOP",S[S.MONGOLIAN_COLON=6148]="MONGOLIAN_COLON",S[S.MONGOLIAN_FOUR_DOTS=6149]="MONGOLIAN_FOUR_DOTS",S[S.MONGOLIAN_SIBE_SYLLABLE_BOUNDARY_MARKER=6151]="MONGOLIAN_SIBE_SYLLABLE_BOUNDARY_MARKER",S[S.MONGOLIAN_MANCHU_COMMA=6152]="MONGOLIAN_MANCHU_COMMA",S[S.MONGOLIAN_MANCHU_FULL_STOP=6153]="MONGOLIAN_MANCHU_FULL_STOP",S[S.MONGOLIAN_NIRUGU=6154]="MONGOLIAN_NIRUGU",S[S.LIMBU_EXCLAMATION_MARK=6468]="LIMBU_EXCLAMATION_MARK",S[S.LIMBU_QUESTION_MARK=6469]="LIMBU_QUESTION_MARK",S[S.BUGINESE_PALLAWA=6686]="BUGINESE_PALLAWA",S[S.BUGINESE_END_OF_SECTION=6687]="BUGINESE_END_OF_SECTION",S[S.TAI_THAM_SIGN_WIANG=6816]="TAI_THAM_SIGN_WIANG",S[S.TAI_THAM_SIGN_WIANGWAAK=6817]="TAI_THAM_SIGN_WIANGWAAK",S[S.TAI_THAM_SIGN_SAWAN=6818]="TAI_THAM_SIGN_SAWAN",S[S.TAI_THAM_SIGN_KEOW=6819]="TAI_THAM_SIGN_KEOW",S[S.TAI_THAM_SIGN_HOY=6820]="TAI_THAM_SIGN_HOY",S[S.TAI_THAM_SIGN_DOKMAI=6821]="TAI_THAM_SIGN_DOKMAI",S[S.TAI_THAM_SIGN_REVERSED_ROTATED_RANA=6822]="TAI_THAM_SIGN_REVERSED_ROTATED_RANA",S[S.TAI_THAM_SIGN_KAAN=6824]="TAI_THAM_SIGN_KAAN",S[S.TAI_THAM_SIGN_KAANKUU=6825]="TAI_THAM_SIGN_KAANKUU",S[S.TAI_THAM_SIGN_SATKAAN=6826]="TAI_THAM_SIGN_SATKAAN",S[S.TAI_THAM_SIGN_SATKAANKUU=6827]="TAI_THAM_SIGN_SATKAANKUU",S[S.TAI_THAM_SIGN_HANG=6828]="TAI_THAM_SIGN_HANG",S[S.TAI_THAM_SIGN_CAANG=6829]="TAI_THAM_SIGN_CAANG",S[S.BALINESE_PANTI=7002]="BALINESE_PANTI",S[S.BALINESE_PAMADA=7003]="BALINESE_PAMADA",S[S.BALINESE_WINDU=7004]="BALINESE_WINDU",S[S.BALINESE_CARIK_PAMUNGKAH=7005]="BALINESE_CARIK_PAMUNGKAH",S[S.BALINESE_CARIK_SIKI=7006]="BALINESE_CARIK_SIKI",S[S.BALINESE_CARIK_PAREREN=7007]="BALINESE_CARIK_PAREREN",S[S.BALINESE_PAMENENG=7008]="BALINESE_PAMENENG",S[S.BATAK_SYMBOL_BINDU_NA_METEK=7164]="BATAK_SYMBOL_BINDU_NA_METEK",S[S.BATAK_SYMBOL_BINDU_PINARBORAS=7165]="BATAK_SYMBOL_BINDU_PINARBORAS",S[S.BATAK_SYMBOL_BINDU_JUDUL=7166]="BATAK_SYMBOL_BINDU_JUDUL",S[S.BATAK_SYMBOL_BINDU_PANGOLAT=7167]="BATAK_SYMBOL_BINDU_PANGOLAT",S[S.LEPCHA_PUNCTUATION_TA_ROL=7227]="LEPCHA_PUNCTUATION_TA_ROL",S[S.LEPCHA_PUNCTUATION_NYET_THYOOM_TA_ROL=7228]="LEPCHA_PUNCTUATION_NYET_THYOOM_TA_ROL",S[S.LEPCHA_PUNCTUATION_CER_WA=7229]="LEPCHA_PUNCTUATION_CER_WA",S[S.LEPCHA_PUNCTUATION_TSHOOK_CER_WA=7230]="LEPCHA_PUNCTUATION_TSHOOK_CER_WA",S[S.LEPCHA_PUNCTUATION_TSHOOK=7231]="LEPCHA_PUNCTUATION_TSHOOK",S[S.OL_CHIKI_PUNCTUATION_MUCAAD=7294]="OL_CHIKI_PUNCTUATION_MUCAAD",S[S.OL_CHIKI_PUNCTUATION_DOUBLE_MUCAAD=7295]="OL_CHIKI_PUNCTUATION_DOUBLE_MUCAAD",S[S.SUNDANESE_PUNCTUATION_BINDU_SURYA=7360]="SUNDANESE_PUNCTUATION_BINDU_SURYA",S[S.SUNDANESE_PUNCTUATION_BINDU_PANGLONG=7361]="SUNDANESE_PUNCTUATION_BINDU_PANGLONG",S[S.SUNDANESE_PUNCTUATION_BINDU_PURNAMA=7362]="SUNDANESE_PUNCTUATION_BINDU_PURNAMA",S[S.SUNDANESE_PUNCTUATION_BINDU_CAKRA=7363]="SUNDANESE_PUNCTUATION_BINDU_CAKRA",S[S.SUNDANESE_PUNCTUATION_BINDU_LEU_SATANGA=7364]="SUNDANESE_PUNCTUATION_BINDU_LEU_SATANGA",S[S.SUNDANESE_PUNCTUATION_BINDU_KA_SATANGA=7365]="SUNDANESE_PUNCTUATION_BINDU_KA_SATANGA",S[S.SUNDANESE_PUNCTUATION_BINDU_DA_SATANGA=7366]="SUNDANESE_PUNCTUATION_BINDU_DA_SATANGA",S[S.SUNDANESE_PUNCTUATION_BINDU_BA_SATANGA=7367]="SUNDANESE_PUNCTUATION_BINDU_BA_SATANGA",S[S.VEDIC_SIGN_NIHSHVASA=7379]="VEDIC_SIGN_NIHSHVASA",S[S.DOUBLE_VERTICAL_LINE=8214]="DOUBLE_VERTICAL_LINE",S[S.DOUBLE_LOW_LINE=8215]="DOUBLE_LOW_LINE",S[S.DAGGER=8224]="DAGGER",S[S.DOUBLE_DAGGER=8225]="DOUBLE_DAGGER",S[S.BULLET=8226]="BULLET",S[S.TRIANGULAR_BULLET=8227]="TRIANGULAR_BULLET",S[S.ONE_DOT_LEADER=8228]="ONE_DOT_LEADER",S[S.TWO_DOT_LEADER=8229]="TWO_DOT_LEADER",S[S.HORIZONTAL_ELLIPSIS=8230]="HORIZONTAL_ELLIPSIS",S[S.HYPHENATION_POINT=8231]="HYPHENATION_POINT",S[S.PER_MILLE_SIGN=8240]="PER_MILLE_SIGN",S[S.PER_TEN_THOUSAND_SIGN=8241]="PER_TEN_THOUSAND_SIGN",S[S.PRIME=8242]="PRIME",S[S.DOUBLE_PRIME=8243]="DOUBLE_PRIME",S[S.TRIPLE_PRIME=8244]="TRIPLE_PRIME",S[S.REVERSED_PRIME=8245]="REVERSED_PRIME",S[S.REVERSED_DOUBLE_PRIME=8246]="REVERSED_DOUBLE_PRIME",S[S.REVERSED_TRIPLE_PRIME=8247]="REVERSED_TRIPLE_PRIME",S[S.CARET=8248]="CARET",S[S.REFERENCE_MARK=8251]="REFERENCE_MARK",S[S.DOUBLE_EXCLAMATION_MARK=8252]="DOUBLE_EXCLAMATION_MARK",S[S.INTERROBANG=8253]="INTERROBANG",S[S.OVERLINE=8254]="OVERLINE",S[S.CARET_INSERTION_POINT=8257]="CARET_INSERTION_POINT",S[S.ASTERISM=8258]="ASTERISM",S[S.HYPHEN_BULLET=8259]="HYPHEN_BULLET",S[S.DOUBLE_QUESTION_MARK=8263]="DOUBLE_QUESTION_MARK",S[S.QUESTION_EXCLAMATION_MARK=8264]="QUESTION_EXCLAMATION_MARK",S[S.EXCLAMATION_QUESTION_MARK=8265]="EXCLAMATION_QUESTION_MARK",S[S.TIRONIAN_SIGN_ET=8266]="TIRONIAN_SIGN_ET",S[S.REVERSED_PILCROW_SIGN=8267]="REVERSED_PILCROW_SIGN",S[S.BLACK_LEFTWARDS_BULLET=8268]="BLACK_LEFTWARDS_BULLET",S[S.BLACK_RIGHTWARDS_BULLET=8269]="BLACK_RIGHTWARDS_BULLET",S[S.LOW_ASTERISK=8270]="LOW_ASTERISK",S[S.REVERSED_SEMICOLON=8271]="REVERSED_SEMICOLON",S[S.CLOSE_UP=8272]="CLOSE_UP",S[S.TWO_ASTERISKS_ALIGNED_VERTICALLY=8273]="TWO_ASTERISKS_ALIGNED_VERTICALLY",S[S.SWUNG_DASH=8275]="SWUNG_DASH",S[S.FLOWER_PUNCTUATION_MARK=8277]="FLOWER_PUNCTUATION_MARK",S[S.THREE_DOT_PUNCTUATION=8278]="THREE_DOT_PUNCTUATION",S[S.QUADRUPLE_PRIME=8279]="QUADRUPLE_PRIME",S[S.FOUR_DOT_PUNCTUATION=8280]="FOUR_DOT_PUNCTUATION",S[S.FIVE_DOT_PUNCTUATION=8281]="FIVE_DOT_PUNCTUATION",S[S.TWO_DOT_PUNCTUATION=8282]="TWO_DOT_PUNCTUATION",S[S.FOUR_DOT_MARK=8283]="FOUR_DOT_MARK",S[S.DOTTED_CROSS=8284]="DOTTED_CROSS",S[S.TRICOLON=8285]="TRICOLON",S[S.VERTICAL_FOUR_DOTS=8286]="VERTICAL_FOUR_DOTS",S[S.COPTIC_OLD_NUBIAN_FULL_STOP=11513]="COPTIC_OLD_NUBIAN_FULL_STOP",S[S.COPTIC_OLD_NUBIAN_DIRECT_QUESTION_MARK=11514]="COPTIC_OLD_NUBIAN_DIRECT_QUESTION_MARK",S[S.COPTIC_OLD_NUBIAN_INDIRECT_QUESTION_MARK=11515]="COPTIC_OLD_NUBIAN_INDIRECT_QUESTION_MARK",S[S.COPTIC_OLD_NUBIAN_VERSE_DIVIDER=11516]="COPTIC_OLD_NUBIAN_VERSE_DIVIDER",S[S.COPTIC_FULL_STOP=11518]="COPTIC_FULL_STOP",S[S.COPTIC_MORPHOLOGICAL_DIVIDER=11519]="COPTIC_MORPHOLOGICAL_DIVIDER",S[S.TIFINAGH_SEPARATOR_MARK=11632]="TIFINAGH_SEPARATOR_MARK",S[S.RIGHT_ANGLE_SUBSTITUTION_MARKER=11776]="RIGHT_ANGLE_SUBSTITUTION_MARKER",S[S.RIGHT_ANGLE_DOTTED_SUBSTITUTION_MARKER=11777]="RIGHT_ANGLE_DOTTED_SUBSTITUTION_MARKER",S[S.RAISED_INTERPOLATION_MARKER=11782]="RAISED_INTERPOLATION_MARKER",S[S.RAISED_DOTTED_INTERPOLATION_MARKER=11783]="RAISED_DOTTED_INTERPOLATION_MARKER",S[S.DOTTED_TRANSPOSITION_MARKER=11784]="DOTTED_TRANSPOSITION_MARKER",S[S.RAISED_SQUARE=11787]="RAISED_SQUARE",S[S.EDITORIAL_CORONIS=11790]="EDITORIAL_CORONIS",S[S.PARAGRAPHOS=11791]="PARAGRAPHOS",S[S.FORKED_PARAGRAPHOS=11792]="FORKED_PARAGRAPHOS",S[S.REVERSED_FORKED_PARAGRAPHOS=11793]="REVERSED_FORKED_PARAGRAPHOS",S[S.HYPODIASTOLE=11794]="HYPODIASTOLE",S[S.DOTTED_OBELOS=11795]="DOTTED_OBELOS",S[S.DOWNWARDS_ANCORA=11796]="DOWNWARDS_ANCORA",S[S.UPWARDS_ANCORA=11797]="UPWARDS_ANCORA",S[S.DOTTED_RIGHT_POINTING_ANGLE=11798]="DOTTED_RIGHT_POINTING_ANGLE",S[S.INVERTED_INTERROBANG=11800]="INVERTED_INTERROBANG",S[S.PALM_BRANCH=11801]="PALM_BRANCH",S[S.TILDE_WITH_RING_ABOVE=11803]="TILDE_WITH_RING_ABOVE",S[S.TILDE_WITH_DOT_ABOVE=11806]="TILDE_WITH_DOT_ABOVE",S[S.TILDE_WITH_DOT_BELOW=11807]="TILDE_WITH_DOT_BELOW",S[S.TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=11818]="TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",S[S.ONE_DOT_OVER_TWO_DOTS_PUNCTUATION=11819]="ONE_DOT_OVER_TWO_DOTS_PUNCTUATION",S[S.SQUARED_FOUR_DOT_PUNCTUATION=11820]="SQUARED_FOUR_DOT_PUNCTUATION",S[S.FIVE_DOT_MARK=11821]="FIVE_DOT_MARK",S[S.REVERSED_QUESTION_MARK=11822]="REVERSED_QUESTION_MARK",S[S.RING_POINT=11824]="RING_POINT",S[S.WORD_SEPARATOR_MIDDLE_DOT=11825]="WORD_SEPARATOR_MIDDLE_DOT",S[S.TURNED_COMMA=11826]="TURNED_COMMA",S[S.RAISED_DOT=11827]="RAISED_DOT",S[S.RAISED_COMMA=11828]="RAISED_COMMA",S[S.TURNED_SEMICOLON=11829]="TURNED_SEMICOLON",S[S.DAGGER_WITH_LEFT_GUARD=11830]="DAGGER_WITH_LEFT_GUARD",S[S.DAGGER_WITH_RIGHT_GUARD=11831]="DAGGER_WITH_RIGHT_GUARD",S[S.TURNED_DAGGER=11832]="TURNED_DAGGER",S[S.TOP_HALF_SECTION_SIGN=11833]="TOP_HALF_SECTION_SIGN",S[S.STENOGRAPHIC_FULL_STOP=11836]="STENOGRAPHIC_FULL_STOP",S[S.VERTICAL_SIX_DOTS=11837]="VERTICAL_SIX_DOTS",S[S.WIGGLY_VERTICAL_LINE=11838]="WIGGLY_VERTICAL_LINE",S[S.CAPITULUM=11839]="CAPITULUM",S[S.REVERSED_COMMA=11841]="REVERSED_COMMA",S[S.DASH_WITH_LEFT_UPTURN=11843]="DASH_WITH_LEFT_UPTURN",S[S.DOUBLE_SUSPENSION_MARK=11844]="DOUBLE_SUSPENSION_MARK",S[S.INVERTED_LOW_KAVYKA=11845]="INVERTED_LOW_KAVYKA",S[S.INVERTED_LOW_KAVYKA_WITH_KAVYKA_ABOVE=11846]="INVERTED_LOW_KAVYKA_WITH_KAVYKA_ABOVE",S[S.LOW_KAVYKA=11847]="LOW_KAVYKA",S[S.LOW_KAVYKA_WITH_DOT=11848]="LOW_KAVYKA_WITH_DOT",S[S.DOUBLE_STACKED_COMMA=11849]="DOUBLE_STACKED_COMMA",S[S.DOTTED_SOLIDUS=11850]="DOTTED_SOLIDUS",S[S.TRIPLE_DAGGER=11851]="TRIPLE_DAGGER",S[S.MEDIEVAL_COMMA=11852]="MEDIEVAL_COMMA",S[S.PARAGRAPHUS_MARK=11853]="PARAGRAPHUS_MARK",S[S.PUNCTUS_ELEVATUS_MARK=11854]="PUNCTUS_ELEVATUS_MARK",S[S.CORNISH_VERSE_DIVIDER=11855]="CORNISH_VERSE_DIVIDER",S[S.TIRONIAN_SIGN_CAPITAL_ET=11858]="TIRONIAN_SIGN_CAPITAL_ET",S[S.IDEOGRAPHIC_COMMA=12289]="IDEOGRAPHIC_COMMA",S[S.IDEOGRAPHIC_FULL_STOP=12290]="IDEOGRAPHIC_FULL_STOP",S[S.DITTO_MARK=12291]="DITTO_MARK",S[S.PART_ALTERNATION_MARK=12349]="PART_ALTERNATION_MARK",S[S.KATAKANA_MIDDLE_DOT=12539]="KATAKANA_MIDDLE_DOT",S[S.LISU_PUNCTUATION_COMMA=42238]="LISU_PUNCTUATION_COMMA",S[S.LISU_PUNCTUATION_FULL_STOP=42239]="LISU_PUNCTUATION_FULL_STOP",S[S.VAI_COMMA=42509]="VAI_COMMA",S[S.VAI_FULL_STOP=42510]="VAI_FULL_STOP",S[S.VAI_QUESTION_MARK=42511]="VAI_QUESTION_MARK",S[S.SLAVONIC_ASTERISK=42611]="SLAVONIC_ASTERISK",S[S.CYRILLIC_KAVYKA=42622]="CYRILLIC_KAVYKA",S[S.BAMUM_NJAEMLI=42738]="BAMUM_NJAEMLI",S[S.BAMUM_FULL_STOP=42739]="BAMUM_FULL_STOP",S[S.BAMUM_COLON=42740]="BAMUM_COLON",S[S.BAMUM_COMMA=42741]="BAMUM_COMMA",S[S.BAMUM_SEMICOLON=42742]="BAMUM_SEMICOLON",S[S.BAMUM_QUESTION_MARK=42743]="BAMUM_QUESTION_MARK",S[S.PHAGS_PA_SINGLE_HEAD_MARK=43124]="PHAGS_PA_SINGLE_HEAD_MARK",S[S.PHAGS_PA_DOUBLE_HEAD_MARK=43125]="PHAGS_PA_DOUBLE_HEAD_MARK",S[S.PHAGS_PA_MARK_SHAD=43126]="PHAGS_PA_MARK_SHAD",S[S.PHAGS_PA_MARK_DOUBLE_SHAD=43127]="PHAGS_PA_MARK_DOUBLE_SHAD",S[S.SAURASHTRA_DANDA=43214]="SAURASHTRA_DANDA",S[S.SAURASHTRA_DOUBLE_DANDA=43215]="SAURASHTRA_DOUBLE_DANDA",S[S.DEVANAGARI_SIGN_PUSHPIKA=43256]="DEVANAGARI_SIGN_PUSHPIKA",S[S.DEVANAGARI_GAP_FILLER=43257]="DEVANAGARI_GAP_FILLER",S[S.DEVANAGARI_CARET=43258]="DEVANAGARI_CARET",S[S.DEVANAGARI_SIGN_SIDDHAM=43260]="DEVANAGARI_SIGN_SIDDHAM",S[S.KAYAH_LI_SIGN_CWI=43310]="KAYAH_LI_SIGN_CWI",S[S.KAYAH_LI_SIGN_SHYA=43311]="KAYAH_LI_SIGN_SHYA",S[S.REJANG_SECTION_MARK=43359]="REJANG_SECTION_MARK",S[S.JAVANESE_LEFT_RERENGGAN=43457]="JAVANESE_LEFT_RERENGGAN",S[S.JAVANESE_RIGHT_RERENGGAN=43458]="JAVANESE_RIGHT_RERENGGAN",S[S.JAVANESE_PADA_ANDAP=43459]="JAVANESE_PADA_ANDAP",S[S.JAVANESE_PADA_MADYA=43460]="JAVANESE_PADA_MADYA",S[S.JAVANESE_PADA_LUHUR=43461]="JAVANESE_PADA_LUHUR",S[S.JAVANESE_PADA_WINDU=43462]="JAVANESE_PADA_WINDU",S[S.JAVANESE_PADA_PANGKAT=43463]="JAVANESE_PADA_PANGKAT",S[S.JAVANESE_PADA_LINGSA=43464]="JAVANESE_PADA_LINGSA",S[S.JAVANESE_PADA_LUNGSI=43465]="JAVANESE_PADA_LUNGSI",S[S.JAVANESE_PADA_ADEG=43466]="JAVANESE_PADA_ADEG",S[S.JAVANESE_PADA_ADEG_ADEG=43467]="JAVANESE_PADA_ADEG_ADEG",S[S.JAVANESE_PADA_PISELEH=43468]="JAVANESE_PADA_PISELEH",S[S.JAVANESE_TURNED_PADA_PISELEH=43469]="JAVANESE_TURNED_PADA_PISELEH",S[S.JAVANESE_PADA_TIRTA_TUMETES=43486]="JAVANESE_PADA_TIRTA_TUMETES",S[S.JAVANESE_PADA_ISEN_ISEN=43487]="JAVANESE_PADA_ISEN_ISEN",S[S.CHAM_PUNCTUATION_SPIRAL=43612]="CHAM_PUNCTUATION_SPIRAL",S[S.CHAM_PUNCTUATION_DANDA=43613]="CHAM_PUNCTUATION_DANDA",S[S.CHAM_PUNCTUATION_DOUBLE_DANDA=43614]="CHAM_PUNCTUATION_DOUBLE_DANDA",S[S.CHAM_PUNCTUATION_TRIPLE_DANDA=43615]="CHAM_PUNCTUATION_TRIPLE_DANDA",S[S.TAI_VIET_SYMBOL_HO_HOI=43742]="TAI_VIET_SYMBOL_HO_HOI",S[S.TAI_VIET_SYMBOL_KOI_KOI=43743]="TAI_VIET_SYMBOL_KOI_KOI",S[S.MEETEI_MAYEK_CHEIKHAN=43760]="MEETEI_MAYEK_CHEIKHAN",S[S.MEETEI_MAYEK_AHANG_KHUDAM=43761]="MEETEI_MAYEK_AHANG_KHUDAM",S[S.MEETEI_MAYEK_CHEIKHEI=44011]="MEETEI_MAYEK_CHEIKHEI",S[S.PRESENTATION_FORM_FOR_VERTICAL_COMMA=65040]="PRESENTATION_FORM_FOR_VERTICAL_COMMA",S[S.PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_COMMA=65041]="PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_COMMA",S[S.PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_FULL_STOP=65042]="PRESENTATION_FORM_FOR_VERTICAL_IDEOGRAPHIC_FULL_STOP",S[S.PRESENTATION_FORM_FOR_VERTICAL_COLON=65043]="PRESENTATION_FORM_FOR_VERTICAL_COLON",S[S.PRESENTATION_FORM_FOR_VERTICAL_SEMICOLON=65044]="PRESENTATION_FORM_FOR_VERTICAL_SEMICOLON",S[S.PRESENTATION_FORM_FOR_VERTICAL_EXCLAMATION_MARK=65045]="PRESENTATION_FORM_FOR_VERTICAL_EXCLAMATION_MARK",S[S.PRESENTATION_FORM_FOR_VERTICAL_QUESTION_MARK=65046]="PRESENTATION_FORM_FOR_VERTICAL_QUESTION_MARK",S[S.PRESENTATION_FORM_FOR_VERTICAL_HORIZONTAL_ELLIPSIS=65049]="PRESENTATION_FORM_FOR_VERTICAL_HORIZONTAL_ELLIPSIS",S[S.PRESENTATION_FORM_FOR_VERTICAL_TWO_DOT_LEADER=65072]="PRESENTATION_FORM_FOR_VERTICAL_TWO_DOT_LEADER",S[S.SESAME_DOT=65093]="SESAME_DOT",S[S.WHITE_SESAME_DOT=65094]="WHITE_SESAME_DOT",S[S.DASHED_OVERLINE=65097]="DASHED_OVERLINE",S[S.CENTRELINE_OVERLINE=65098]="CENTRELINE_OVERLINE",S[S.WAVY_OVERLINE=65099]="WAVY_OVERLINE",S[S.DOUBLE_WAVY_OVERLINE=65100]="DOUBLE_WAVY_OVERLINE",S[S.SMALL_COMMA=65104]="SMALL_COMMA",S[S.SMALL_IDEOGRAPHIC_COMMA=65105]="SMALL_IDEOGRAPHIC_COMMA",S[S.SMALL_FULL_STOP=65106]="SMALL_FULL_STOP",S[S.SMALL_SEMICOLON=65108]="SMALL_SEMICOLON",S[S.SMALL_COLON=65109]="SMALL_COLON",S[S.SMALL_QUESTION_MARK=65110]="SMALL_QUESTION_MARK",S[S.SMALL_EXCLAMATION_MARK=65111]="SMALL_EXCLAMATION_MARK",S[S.SMALL_NUMBER_SIGN=65119]="SMALL_NUMBER_SIGN",S[S.SMALL_AMPERSAND=65120]="SMALL_AMPERSAND",S[S.SMALL_ASTERISK=65121]="SMALL_ASTERISK",S[S.SMALL_REVERSE_SOLIDUS=65128]="SMALL_REVERSE_SOLIDUS",S[S.SMALL_PERCENT_SIGN=65130]="SMALL_PERCENT_SIGN",S[S.SMALL_COMMERCIAL_AT=65131]="SMALL_COMMERCIAL_AT",S[S.FULLWIDTH_EXCLAMATION_MARK=65281]="FULLWIDTH_EXCLAMATION_MARK",S[S.FULLWIDTH_QUOTATION_MARK=65282]="FULLWIDTH_QUOTATION_MARK",S[S.FULLWIDTH_NUMBER_SIGN=65283]="FULLWIDTH_NUMBER_SIGN",S[S.FULLWIDTH_PERCENT_SIGN=65285]="FULLWIDTH_PERCENT_SIGN",S[S.FULLWIDTH_AMPERSAND=65286]="FULLWIDTH_AMPERSAND",S[S.FULLWIDTH_APOSTROPHE=65287]="FULLWIDTH_APOSTROPHE",S[S.FULLWIDTH_ASTERISK=65290]="FULLWIDTH_ASTERISK",S[S.FULLWIDTH_COMMA=65292]="FULLWIDTH_COMMA",S[S.FULLWIDTH_FULL_STOP=65294]="FULLWIDTH_FULL_STOP",S[S.FULLWIDTH_SOLIDUS=65295]="FULLWIDTH_SOLIDUS",S[S.FULLWIDTH_COLON=65306]="FULLWIDTH_COLON",S[S.FULLWIDTH_SEMICOLON=65307]="FULLWIDTH_SEMICOLON",S[S.FULLWIDTH_QUESTION_MARK=65311]="FULLWIDTH_QUESTION_MARK",S[S.FULLWIDTH_COMMERCIAL_AT=65312]="FULLWIDTH_COMMERCIAL_AT",S[S.FULLWIDTH_REVERSE_SOLIDUS=65340]="FULLWIDTH_REVERSE_SOLIDUS",S[S.HALFWIDTH_IDEOGRAPHIC_FULL_STOP=65377]="HALFWIDTH_IDEOGRAPHIC_FULL_STOP",S[S.HALFWIDTH_IDEOGRAPHIC_COMMA=65380]="HALFWIDTH_IDEOGRAPHIC_COMMA",S[S.HALFWIDTH_KATAKANA_MIDDLE_DOT=65381]="HALFWIDTH_KATAKANA_MIDDLE_DOT",S[S.AEGEAN_WORD_SEPARATOR_LINE=65792]="AEGEAN_WORD_SEPARATOR_LINE",S[S.AEGEAN_WORD_SEPARATOR_DOT=65793]="AEGEAN_WORD_SEPARATOR_DOT",S[S.AEGEAN_CHECK_MARK=65794]="AEGEAN_CHECK_MARK",S[S.UGARITIC_WORD_DIVIDER=66463]="UGARITIC_WORD_DIVIDER",S[S.OLD_PERSIAN_WORD_DIVIDER=66512]="OLD_PERSIAN_WORD_DIVIDER",S[S.CAUCASIAN_ALBANIAN_CITATION_MARK=66927]="CAUCASIAN_ALBANIAN_CITATION_MARK",S[S.IMPERIAL_ARAMAIC_SECTION_SIGN=67671]="IMPERIAL_ARAMAIC_SECTION_SIGN",S[S.PHOENICIAN_WORD_SEPARATOR=67871]="PHOENICIAN_WORD_SEPARATOR",S[S.LYDIAN_TRIANGULAR_MARK=67903]="LYDIAN_TRIANGULAR_MARK",S[S.KHAROSHTHI_PUNCTUATION_DOT=68176]="KHAROSHTHI_PUNCTUATION_DOT",S[S.KHAROSHTHI_PUNCTUATION_SMALL_CIRCLE=68177]="KHAROSHTHI_PUNCTUATION_SMALL_CIRCLE",S[S.KHAROSHTHI_PUNCTUATION_CIRCLE=68178]="KHAROSHTHI_PUNCTUATION_CIRCLE",S[S.KHAROSHTHI_PUNCTUATION_CRESCENT_BAR=68179]="KHAROSHTHI_PUNCTUATION_CRESCENT_BAR",S[S.KHAROSHTHI_PUNCTUATION_MANGALAM=68180]="KHAROSHTHI_PUNCTUATION_MANGALAM",S[S.KHAROSHTHI_PUNCTUATION_LOTUS=68181]="KHAROSHTHI_PUNCTUATION_LOTUS",S[S.KHAROSHTHI_PUNCTUATION_DANDA=68182]="KHAROSHTHI_PUNCTUATION_DANDA",S[S.KHAROSHTHI_PUNCTUATION_DOUBLE_DANDA=68183]="KHAROSHTHI_PUNCTUATION_DOUBLE_DANDA",S[S.KHAROSHTHI_PUNCTUATION_LINES=68184]="KHAROSHTHI_PUNCTUATION_LINES",S[S.OLD_SOUTH_ARABIAN_NUMERIC_INDICATOR=68223]="OLD_SOUTH_ARABIAN_NUMERIC_INDICATOR",S[S.MANICHAEAN_PUNCTUATION_STAR=68336]="MANICHAEAN_PUNCTUATION_STAR",S[S.MANICHAEAN_PUNCTUATION_FLEURON=68337]="MANICHAEAN_PUNCTUATION_FLEURON",S[S.MANICHAEAN_PUNCTUATION_DOUBLE_DOT_WITHIN_DOT=68338]="MANICHAEAN_PUNCTUATION_DOUBLE_DOT_WITHIN_DOT",S[S.MANICHAEAN_PUNCTUATION_DOT_WITHIN_DOT=68339]="MANICHAEAN_PUNCTUATION_DOT_WITHIN_DOT",S[S.MANICHAEAN_PUNCTUATION_DOT=68340]="MANICHAEAN_PUNCTUATION_DOT",S[S.MANICHAEAN_PUNCTUATION_TWO_DOTS=68341]="MANICHAEAN_PUNCTUATION_TWO_DOTS",S[S.MANICHAEAN_PUNCTUATION_LINE_FILLER=68342]="MANICHAEAN_PUNCTUATION_LINE_FILLER",S[S.AVESTAN_ABBREVIATION_MARK=68409]="AVESTAN_ABBREVIATION_MARK",S[S.TINY_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68410]="TINY_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",S[S.SMALL_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68411]="SMALL_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",S[S.LARGE_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION=68412]="LARGE_TWO_DOTS_OVER_ONE_DOT_PUNCTUATION",S[S.LARGE_ONE_DOT_OVER_TWO_DOTS_PUNCTUATION=68413]="LARGE_ONE_DOT_OVER_TWO_DOTS_PUNCTUATION",S[S.LARGE_TWO_RINGS_OVER_ONE_RING_PUNCTUATION=68414]="LARGE_TWO_RINGS_OVER_ONE_RING_PUNCTUATION",S[S.LARGE_ONE_RING_OVER_TWO_RINGS_PUNCTUATION=68415]="LARGE_ONE_RING_OVER_TWO_RINGS_PUNCTUATION",S[S.PSALTER_PAHLAVI_SECTION_MARK=68505]="PSALTER_PAHLAVI_SECTION_MARK",S[S.PSALTER_PAHLAVI_TURNED_SECTION_MARK=68506]="PSALTER_PAHLAVI_TURNED_SECTION_MARK",S[S.PSALTER_PAHLAVI_FOUR_DOTS_WITH_CROSS=68507]="PSALTER_PAHLAVI_FOUR_DOTS_WITH_CROSS",S[S.PSALTER_PAHLAVI_FOUR_DOTS_WITH_DOT=68508]="PSALTER_PAHLAVI_FOUR_DOTS_WITH_DOT",S[S.SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS=69461]="SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS",S[S.SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS_WITH_DOTS=69462]="SOGDIAN_PUNCTUATION_TWO_VERTICAL_BARS_WITH_DOTS",S[S.SOGDIAN_PUNCTUATION_CIRCLE_WITH_DOT=69463]="SOGDIAN_PUNCTUATION_CIRCLE_WITH_DOT",S[S.SOGDIAN_PUNCTUATION_TWO_CIRCLES_WITH_DOTS=69464]="SOGDIAN_PUNCTUATION_TWO_CIRCLES_WITH_DOTS",S[S.SOGDIAN_PUNCTUATION_HALF_CIRCLE_WITH_DOT=69465]="SOGDIAN_PUNCTUATION_HALF_CIRCLE_WITH_DOT",S[S.BRAHMI_DANDA=69703]="BRAHMI_DANDA",S[S.BRAHMI_DOUBLE_DANDA=69704]="BRAHMI_DOUBLE_DANDA",S[S.BRAHMI_PUNCTUATION_DOT=69705]="BRAHMI_PUNCTUATION_DOT",S[S.BRAHMI_PUNCTUATION_DOUBLE_DOT=69706]="BRAHMI_PUNCTUATION_DOUBLE_DOT",S[S.BRAHMI_PUNCTUATION_LINE=69707]="BRAHMI_PUNCTUATION_LINE",S[S.BRAHMI_PUNCTUATION_CRESCENT_BAR=69708]="BRAHMI_PUNCTUATION_CRESCENT_BAR",S[S.BRAHMI_PUNCTUATION_LOTUS=69709]="BRAHMI_PUNCTUATION_LOTUS",S[S.KAITHI_ABBREVIATION_SIGN=69819]="KAITHI_ABBREVIATION_SIGN",S[S.KAITHI_ENUMERATION_SIGN=69820]="KAITHI_ENUMERATION_SIGN",S[S.KAITHI_SECTION_MARK=69822]="KAITHI_SECTION_MARK",S[S.KAITHI_DOUBLE_SECTION_MARK=69823]="KAITHI_DOUBLE_SECTION_MARK",S[S.KAITHI_DANDA=69824]="KAITHI_DANDA",S[S.KAITHI_DOUBLE_DANDA=69825]="KAITHI_DOUBLE_DANDA",S[S.CHAKMA_SECTION_MARK=69952]="CHAKMA_SECTION_MARK",S[S.CHAKMA_DANDA=69953]="CHAKMA_DANDA",S[S.CHAKMA_DOUBLE_DANDA=69954]="CHAKMA_DOUBLE_DANDA",S[S.CHAKMA_QUESTION_MARK=69955]="CHAKMA_QUESTION_MARK",S[S.MAHAJANI_ABBREVIATION_SIGN=70004]="MAHAJANI_ABBREVIATION_SIGN",S[S.MAHAJANI_SECTION_MARK=70005]="MAHAJANI_SECTION_MARK",S[S.SHARADA_DANDA=70085]="SHARADA_DANDA",S[S.SHARADA_DOUBLE_DANDA=70086]="SHARADA_DOUBLE_DANDA",S[S.SHARADA_ABBREVIATION_SIGN=70087]="SHARADA_ABBREVIATION_SIGN",S[S.SHARADA_SEPARATOR=70088]="SHARADA_SEPARATOR",S[S.SHARADA_SUTRA_MARK=70093]="SHARADA_SUTRA_MARK",S[S.SHARADA_SIGN_SIDDHAM=70107]="SHARADA_SIGN_SIDDHAM",S[S.SHARADA_CONTINUATION_SIGN=70109]="SHARADA_CONTINUATION_SIGN",S[S.SHARADA_SECTION_MARK_1=70110]="SHARADA_SECTION_MARK_1",S[S.SHARADA_SECTION_MARK_2=70111]="SHARADA_SECTION_MARK_2",S[S.KHOJKI_DANDA=70200]="KHOJKI_DANDA",S[S.KHOJKI_DOUBLE_DANDA=70201]="KHOJKI_DOUBLE_DANDA",S[S.KHOJKI_WORD_SEPARATOR=70202]="KHOJKI_WORD_SEPARATOR",S[S.KHOJKI_SECTION_MARK=70203]="KHOJKI_SECTION_MARK",S[S.KHOJKI_DOUBLE_SECTION_MARK=70204]="KHOJKI_DOUBLE_SECTION_MARK",S[S.KHOJKI_ABBREVIATION_SIGN=70205]="KHOJKI_ABBREVIATION_SIGN",S[S.MULTANI_SECTION_MARK=70313]="MULTANI_SECTION_MARK",S[S.NEWA_DANDA=70731]="NEWA_DANDA",S[S.NEWA_DOUBLE_DANDA=70732]="NEWA_DOUBLE_DANDA",S[S.NEWA_COMMA=70733]="NEWA_COMMA",S[S.NEWA_GAP_FILLER=70734]="NEWA_GAP_FILLER",S[S.NEWA_ABBREVIATION_SIGN=70735]="NEWA_ABBREVIATION_SIGN",S[S.NEWA_DOUBLE_COMMA=70746]="NEWA_DOUBLE_COMMA",S[S.NEWA_PLACEHOLDER_MARK=70747]="NEWA_PLACEHOLDER_MARK",S[S.NEWA_INSERTION_SIGN=70749]="NEWA_INSERTION_SIGN",S[S.TIRHUTA_ABBREVIATION_SIGN=70854]="TIRHUTA_ABBREVIATION_SIGN",S[S.SIDDHAM_SIGN_SIDDHAM=71105]="SIDDHAM_SIGN_SIDDHAM",S[S.SIDDHAM_DANDA=71106]="SIDDHAM_DANDA",S[S.SIDDHAM_DOUBLE_DANDA=71107]="SIDDHAM_DOUBLE_DANDA",S[S.SIDDHAM_SEPARATOR_DOT=71108]="SIDDHAM_SEPARATOR_DOT",S[S.SIDDHAM_SEPARATOR_BAR=71109]="SIDDHAM_SEPARATOR_BAR",S[S.SIDDHAM_REPETITION_MARK_1=71110]="SIDDHAM_REPETITION_MARK_1",S[S.SIDDHAM_REPETITION_MARK_2=71111]="SIDDHAM_REPETITION_MARK_2",S[S.SIDDHAM_REPETITION_MARK_3=71112]="SIDDHAM_REPETITION_MARK_3",S[S.SIDDHAM_END_OF_TEXT_MARK=71113]="SIDDHAM_END_OF_TEXT_MARK",S[S.SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_U_SHAPED_ORNAMENTS=71114]="SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_U_SHAPED_ORNAMENTS",S[S.SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_DOTTED_CRESCENTS=71115]="SIDDHAM_SECTION_MARK_WITH_TRIDENT_AND_DOTTED_CRESCENTS",S[S.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_CRESCENTS=71116]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_CRESCENTS",S[S.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_DOUBLE_CRESCENTS=71117]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_DOUBLE_CRESCENTS",S[S.SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_TRIPLE_CRESCENTS=71118]="SIDDHAM_SECTION_MARK_WITH_RAYS_AND_DOTTED_TRIPLE_CRESCENTS",S[S.SIDDHAM_SECTION_MARK_DOUBLE_RING=71119]="SIDDHAM_SECTION_MARK_DOUBLE_RING",S[S.SIDDHAM_SECTION_MARK_DOUBLE_RING_WITH_RAYS=71120]="SIDDHAM_SECTION_MARK_DOUBLE_RING_WITH_RAYS",S[S.SIDDHAM_SECTION_MARK_WITH_DOUBLE_CRESCENTS=71121]="SIDDHAM_SECTION_MARK_WITH_DOUBLE_CRESCENTS",S[S.SIDDHAM_SECTION_MARK_WITH_TRIPLE_CRESCENTS=71122]="SIDDHAM_SECTION_MARK_WITH_TRIPLE_CRESCENTS",S[S.SIDDHAM_SECTION_MARK_WITH_QUADRUPLE_CRESCENTS=71123]="SIDDHAM_SECTION_MARK_WITH_QUADRUPLE_CRESCENTS",S[S.SIDDHAM_SECTION_MARK_WITH_SEPTUPLE_CRESCENTS=71124]="SIDDHAM_SECTION_MARK_WITH_SEPTUPLE_CRESCENTS",S[S.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_RAYS=71125]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_RAYS",S[S.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_TWO_ENCLOSURES=71126]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_TWO_ENCLOSURES",S[S.SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_FOUR_ENCLOSURES=71127]="SIDDHAM_SECTION_MARK_WITH_CIRCLES_AND_FOUR_ENCLOSURES",S[S.MODI_DANDA=71233]="MODI_DANDA",S[S.MODI_DOUBLE_DANDA=71234]="MODI_DOUBLE_DANDA",S[S.MODI_ABBREVIATION_SIGN=71235]="MODI_ABBREVIATION_SIGN",S[S.MONGOLIAN_BIRGA_WITH_ORNAMENT=71264]="MONGOLIAN_BIRGA_WITH_ORNAMENT",S[S.MONGOLIAN_ROTATED_BIRGA=71265]="MONGOLIAN_ROTATED_BIRGA",S[S.MONGOLIAN_DOUBLE_BIRGA_WITH_ORNAMENT=71266]="MONGOLIAN_DOUBLE_BIRGA_WITH_ORNAMENT",S[S.MONGOLIAN_TRIPLE_BIRGA_WITH_ORNAMENT=71267]="MONGOLIAN_TRIPLE_BIRGA_WITH_ORNAMENT",S[S.MONGOLIAN_BIRGA_WITH_DOUBLE_ORNAMENT=71268]="MONGOLIAN_BIRGA_WITH_DOUBLE_ORNAMENT",S[S.MONGOLIAN_ROTATED_BIRGA_WITH_ORNAMENT=71269]="MONGOLIAN_ROTATED_BIRGA_WITH_ORNAMENT",S[S.MONGOLIAN_ROTATED_BIRGA_WITH_DOUBLE_ORNAMENT=71270]="MONGOLIAN_ROTATED_BIRGA_WITH_DOUBLE_ORNAMENT",S[S.MONGOLIAN_INVERTED_BIRGA=71271]="MONGOLIAN_INVERTED_BIRGA",S[S.MONGOLIAN_INVERTED_BIRGA_WITH_DOUBLE_ORNAMENT=71272]="MONGOLIAN_INVERTED_BIRGA_WITH_DOUBLE_ORNAMENT",S[S.MONGOLIAN_SWIRL_BIRGA=71273]="MONGOLIAN_SWIRL_BIRGA",S[S.MONGOLIAN_SWIRL_BIRGA_WITH_ORNAMENT=71274]="MONGOLIAN_SWIRL_BIRGA_WITH_ORNAMENT",S[S.MONGOLIAN_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT=71275]="MONGOLIAN_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT",S[S.MONGOLIAN_TURNED_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT=71276]="MONGOLIAN_TURNED_SWIRL_BIRGA_WITH_DOUBLE_ORNAMENT",S[S.AHOM_SIGN_SMALL_SECTION=71484]="AHOM_SIGN_SMALL_SECTION",S[S.AHOM_SIGN_SECTION=71485]="AHOM_SIGN_SECTION",S[S.AHOM_SIGN_RULAI=71486]="AHOM_SIGN_RULAI",S[S.DOGRA_ABBREVIATION_SIGN=71739]="DOGRA_ABBREVIATION_SIGN",S[S.DIVES_AKURU_DOUBLE_DANDA=72004]="DIVES_AKURU_DOUBLE_DANDA",S[S.DIVES_AKURU_GAP_FILLER=72005]="DIVES_AKURU_GAP_FILLER",S[S.DIVES_AKURU_END_OF_TEXT_MARK=72006]="DIVES_AKURU_END_OF_TEXT_MARK",S[S.NANDINAGARI_SIGN_SIDDHAM=72162]="NANDINAGARI_SIGN_SIDDHAM",S[S.ZANABAZAR_SQUARE_INITIAL_HEAD_MARK=72255]="ZANABAZAR_SQUARE_INITIAL_HEAD_MARK",S[S.ZANABAZAR_SQUARE_CLOSING_HEAD_MARK=72256]="ZANABAZAR_SQUARE_CLOSING_HEAD_MARK",S[S.ZANABAZAR_SQUARE_MARK_TSHEG=72257]="ZANABAZAR_SQUARE_MARK_TSHEG",S[S.ZANABAZAR_SQUARE_MARK_SHAD=72258]="ZANABAZAR_SQUARE_MARK_SHAD",S[S.ZANABAZAR_SQUARE_MARK_DOUBLE_SHAD=72259]="ZANABAZAR_SQUARE_MARK_DOUBLE_SHAD",S[S.ZANABAZAR_SQUARE_MARK_LONG_TSHEG=72260]="ZANABAZAR_SQUARE_MARK_LONG_TSHEG",S[S.ZANABAZAR_SQUARE_INITIAL_DOUBLE_LINED_HEAD_MARK=72261]="ZANABAZAR_SQUARE_INITIAL_DOUBLE_LINED_HEAD_MARK",S[S.ZANABAZAR_SQUARE_CLOSING_DOUBLE_LINED_HEAD_MARK=72262]="ZANABAZAR_SQUARE_CLOSING_DOUBLE_LINED_HEAD_MARK",S[S.SOYOMBO_MARK_TSHEG=72346]="SOYOMBO_MARK_TSHEG",S[S.SOYOMBO_MARK_SHAD=72347]="SOYOMBO_MARK_SHAD",S[S.SOYOMBO_MARK_DOUBLE_SHAD=72348]="SOYOMBO_MARK_DOUBLE_SHAD",S[S.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_TRIPLE_FLAME=72350]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_TRIPLE_FLAME",S[S.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_FLAME=72351]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN_AND_FLAME",S[S.SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN=72352]="SOYOMBO_HEAD_MARK_WITH_MOON_AND_SUN",S[S.SOYOMBO_TERMINAL_MARK_1=72353]="SOYOMBO_TERMINAL_MARK_1",S[S.SOYOMBO_TERMINAL_MARK_2=72354]="SOYOMBO_TERMINAL_MARK_2",S[S.BHAIKSUKI_DANDA=72769]="BHAIKSUKI_DANDA",S[S.BHAIKSUKI_DOUBLE_DANDA=72770]="BHAIKSUKI_DOUBLE_DANDA",S[S.BHAIKSUKI_WORD_SEPARATOR=72771]="BHAIKSUKI_WORD_SEPARATOR",S[S.BHAIKSUKI_GAP_FILLER_1=72772]="BHAIKSUKI_GAP_FILLER_1",S[S.BHAIKSUKI_GAP_FILLER_2=72773]="BHAIKSUKI_GAP_FILLER_2",S[S.MARCHEN_HEAD_MARK=72816]="MARCHEN_HEAD_MARK",S[S.MARCHEN_MARK_SHAD=72817]="MARCHEN_MARK_SHAD",S[S.MAKASAR_PASSIMBANG=73463]="MAKASAR_PASSIMBANG",S[S.MAKASAR_END_OF_SECTION=73464]="MAKASAR_END_OF_SECTION",S[S.TAMIL_PUNCTUATION_END_OF_TEXT=73727]="TAMIL_PUNCTUATION_END_OF_TEXT",S[S.CUNEIFORM_PUNCTUATION_SIGN_OLD_ASSYRIAN_WORD_DIVIDER=74864]="CUNEIFORM_PUNCTUATION_SIGN_OLD_ASSYRIAN_WORD_DIVIDER",S[S.CUNEIFORM_PUNCTUATION_SIGN_VERTICAL_COLON=74865]="CUNEIFORM_PUNCTUATION_SIGN_VERTICAL_COLON",S[S.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_COLON=74866]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_COLON",S[S.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_TRICOLON=74867]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_TRICOLON",S[S.CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_QUADCOLON=74868]="CUNEIFORM_PUNCTUATION_SIGN_DIAGONAL_QUADCOLON",S[S.MRO_DANDA=92782]="MRO_DANDA",S[S.MRO_DOUBLE_DANDA=92783]="MRO_DOUBLE_DANDA",S[S.BASSA_VAH_FULL_STOP=92917]="BASSA_VAH_FULL_STOP",S[S.PAHAWH_HMONG_SIGN_VOS_THOM=92983]="PAHAWH_HMONG_SIGN_VOS_THOM",S[S.PAHAWH_HMONG_SIGN_VOS_TSHAB_CEEB=92984]="PAHAWH_HMONG_SIGN_VOS_TSHAB_CEEB",S[S.PAHAWH_HMONG_SIGN_CIM_CHEEM=92985]="PAHAWH_HMONG_SIGN_CIM_CHEEM",S[S.PAHAWH_HMONG_SIGN_VOS_THIAB=92986]="PAHAWH_HMONG_SIGN_VOS_THIAB",S[S.PAHAWH_HMONG_SIGN_VOS_FEEM=92987]="PAHAWH_HMONG_SIGN_VOS_FEEM",S[S.PAHAWH_HMONG_SIGN_XAUS=92996]="PAHAWH_HMONG_SIGN_XAUS",S[S.MEDEFAIDRIN_COMMA=93847]="MEDEFAIDRIN_COMMA",S[S.MEDEFAIDRIN_FULL_STOP=93848]="MEDEFAIDRIN_FULL_STOP",S[S.MEDEFAIDRIN_SYMBOL_AIVA=93849]="MEDEFAIDRIN_SYMBOL_AIVA",S[S.MEDEFAIDRIN_EXCLAMATION_OH=93850]="MEDEFAIDRIN_EXCLAMATION_OH",S[S.OLD_CHINESE_HOOK_MARK=94178]="OLD_CHINESE_HOOK_MARK",S[S.DUPLOYAN_PUNCTUATION_CHINOOK_FULL_STOP=113823]="DUPLOYAN_PUNCTUATION_CHINOOK_FULL_STOP",S[S.SIGNWRITING_COMMA=121479]="SIGNWRITING_COMMA",S[S.SIGNWRITING_FULL_STOP=121480]="SIGNWRITING_FULL_STOP",S[S.SIGNWRITING_SEMICOLON=121481]="SIGNWRITING_SEMICOLON",S[S.SIGNWRITING_COLON=121482]="SIGNWRITING_COLON",S[S.SIGNWRITING_PARENTHESIS=121483]="SIGNWRITING_PARENTHESIS",S[S.ADLAM_INITIAL_EXCLAMATION_MARK=125278]="ADLAM_INITIAL_EXCLAMATION_MARK",S[S.ADLAM_INITIAL_QUESTION_MARK=125279]="ADLAM_INITIAL_QUESTION_MARK"})(UnicodePoCodePoint||(UnicodePoCodePoint={}));var UnicodePsCodePoint;(function(S){S[S.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",S[S.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",S[S.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",S[S.TIBETAN_MARK_GUG_RTAGS_GYON=3898]="TIBETAN_MARK_GUG_RTAGS_GYON",S[S.TIBETAN_MARK_ANG_KHANG_GYON=3900]="TIBETAN_MARK_ANG_KHANG_GYON",S[S.OGHAM_FEATHER_MARK=5787]="OGHAM_FEATHER_MARK",S[S.SINGLE_LOW_9_QUOTATION_MARK=8218]="SINGLE_LOW_9_QUOTATION_MARK",S[S.DOUBLE_LOW_9_QUOTATION_MARK=8222]="DOUBLE_LOW_9_QUOTATION_MARK",S[S.LEFT_SQUARE_BRACKET_WITH_QUILL=8261]="LEFT_SQUARE_BRACKET_WITH_QUILL",S[S.SUPERSCRIPT_LEFT_PARENTHESIS=8317]="SUPERSCRIPT_LEFT_PARENTHESIS",S[S.SUBSCRIPT_LEFT_PARENTHESIS=8333]="SUBSCRIPT_LEFT_PARENTHESIS",S[S.LEFT_CEILING=8968]="LEFT_CEILING",S[S.LEFT_FLOOR=8970]="LEFT_FLOOR",S[S.LEFT_POINTING_ANGLE_BRACKET=9001]="LEFT_POINTING_ANGLE_BRACKET",S[S.MEDIUM_LEFT_PARENTHESIS_ORNAMENT=10088]="MEDIUM_LEFT_PARENTHESIS_ORNAMENT",S[S.MEDIUM_FLATTENED_LEFT_PARENTHESIS_ORNAMENT=10090]="MEDIUM_FLATTENED_LEFT_PARENTHESIS_ORNAMENT",S[S.MEDIUM_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT=10092]="MEDIUM_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT",S[S.HEAVY_LEFT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT=10094]="HEAVY_LEFT_POINTING_ANGLE_QUOTATION_MARK_ORNAMENT",S[S.HEAVY_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT=10096]="HEAVY_LEFT_POINTING_ANGLE_BRACKET_ORNAMENT",S[S.LIGHT_LEFT_TORTOISE_SHELL_BRACKET_ORNAMENT=10098]="LIGHT_LEFT_TORTOISE_SHELL_BRACKET_ORNAMENT",S[S.MEDIUM_LEFT_CURLY_BRACKET_ORNAMENT=10100]="MEDIUM_LEFT_CURLY_BRACKET_ORNAMENT",S[S.LEFT_S_SHAPED_BAG_DELIMITER=10181]="LEFT_S_SHAPED_BAG_DELIMITER",S[S.MATHEMATICAL_LEFT_WHITE_SQUARE_BRACKET=10214]="MATHEMATICAL_LEFT_WHITE_SQUARE_BRACKET",S[S.MATHEMATICAL_LEFT_ANGLE_BRACKET=10216]="MATHEMATICAL_LEFT_ANGLE_BRACKET",S[S.MATHEMATICAL_LEFT_DOUBLE_ANGLE_BRACKET=10218]="MATHEMATICAL_LEFT_DOUBLE_ANGLE_BRACKET",S[S.MATHEMATICAL_LEFT_WHITE_TORTOISE_SHELL_BRACKET=10220]="MATHEMATICAL_LEFT_WHITE_TORTOISE_SHELL_BRACKET",S[S.MATHEMATICAL_LEFT_FLATTENED_PARENTHESIS=10222]="MATHEMATICAL_LEFT_FLATTENED_PARENTHESIS",S[S.LEFT_WHITE_CURLY_BRACKET=10627]="LEFT_WHITE_CURLY_BRACKET",S[S.LEFT_WHITE_PARENTHESIS=10629]="LEFT_WHITE_PARENTHESIS",S[S.Z_NOTATION_LEFT_IMAGE_BRACKET=10631]="Z_NOTATION_LEFT_IMAGE_BRACKET",S[S.Z_NOTATION_LEFT_BINDING_BRACKET=10633]="Z_NOTATION_LEFT_BINDING_BRACKET",S[S.LEFT_SQUARE_BRACKET_WITH_UNDERBAR=10635]="LEFT_SQUARE_BRACKET_WITH_UNDERBAR",S[S.LEFT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER=10637]="LEFT_SQUARE_BRACKET_WITH_TICK_IN_TOP_CORNER",S[S.LEFT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER=10639]="LEFT_SQUARE_BRACKET_WITH_TICK_IN_BOTTOM_CORNER",S[S.LEFT_ANGLE_BRACKET_WITH_DOT=10641]="LEFT_ANGLE_BRACKET_WITH_DOT",S[S.LEFT_ARC_LESS_THAN_BRACKET=10643]="LEFT_ARC_LESS_THAN_BRACKET",S[S.DOUBLE_LEFT_ARC_GREATER_THAN_BRACKET=10645]="DOUBLE_LEFT_ARC_GREATER_THAN_BRACKET",S[S.LEFT_BLACK_TORTOISE_SHELL_BRACKET=10647]="LEFT_BLACK_TORTOISE_SHELL_BRACKET",S[S.LEFT_WIGGLY_FENCE=10712]="LEFT_WIGGLY_FENCE",S[S.LEFT_DOUBLE_WIGGLY_FENCE=10714]="LEFT_DOUBLE_WIGGLY_FENCE",S[S.LEFT_POINTING_CURVED_ANGLE_BRACKET=10748]="LEFT_POINTING_CURVED_ANGLE_BRACKET",S[S.TOP_LEFT_HALF_BRACKET=11810]="TOP_LEFT_HALF_BRACKET",S[S.BOTTOM_LEFT_HALF_BRACKET=11812]="BOTTOM_LEFT_HALF_BRACKET",S[S.LEFT_SIDEWAYS_U_BRACKET=11814]="LEFT_SIDEWAYS_U_BRACKET",S[S.LEFT_DOUBLE_PARENTHESIS=11816]="LEFT_DOUBLE_PARENTHESIS",S[S.DOUBLE_LOW_REVERSED_9_QUOTATION_MARK=11842]="DOUBLE_LOW_REVERSED_9_QUOTATION_MARK",S[S.LEFT_ANGLE_BRACKET=12296]="LEFT_ANGLE_BRACKET",S[S.LEFT_DOUBLE_ANGLE_BRACKET=12298]="LEFT_DOUBLE_ANGLE_BRACKET",S[S.LEFT_CORNER_BRACKET=12300]="LEFT_CORNER_BRACKET",S[S.LEFT_WHITE_CORNER_BRACKET=12302]="LEFT_WHITE_CORNER_BRACKET",S[S.LEFT_BLACK_LENTICULAR_BRACKET=12304]="LEFT_BLACK_LENTICULAR_BRACKET",S[S.LEFT_TORTOISE_SHELL_BRACKET=12308]="LEFT_TORTOISE_SHELL_BRACKET",S[S.LEFT_WHITE_LENTICULAR_BRACKET=12310]="LEFT_WHITE_LENTICULAR_BRACKET",S[S.LEFT_WHITE_TORTOISE_SHELL_BRACKET=12312]="LEFT_WHITE_TORTOISE_SHELL_BRACKET",S[S.LEFT_WHITE_SQUARE_BRACKET=12314]="LEFT_WHITE_SQUARE_BRACKET",S[S.REVERSED_DOUBLE_PRIME_QUOTATION_MARK=12317]="REVERSED_DOUBLE_PRIME_QUOTATION_MARK",S[S.ORNATE_RIGHT_PARENTHESIS=64831]="ORNATE_RIGHT_PARENTHESIS",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_LENTICULAR_BRACKET=65047]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_LENTICULAR_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_PARENTHESIS=65077]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_PARENTHESIS",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_CURLY_BRACKET=65079]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_CURLY_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_TORTOISE_SHELL_BRACKET=65081]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_TORTOISE_SHELL_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_BLACK_LENTICULAR_BRACKET=65083]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_BLACK_LENTICULAR_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_DOUBLE_ANGLE_BRACKET=65085]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_DOUBLE_ANGLE_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_ANGLE_BRACKET=65087]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_ANGLE_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_CORNER_BRACKET=65089]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_CORNER_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_CORNER_BRACKET=65091]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_WHITE_CORNER_BRACKET",S[S.PRESENTATION_FORM_FOR_VERTICAL_LEFT_SQUARE_BRACKET=65095]="PRESENTATION_FORM_FOR_VERTICAL_LEFT_SQUARE_BRACKET",S[S.SMALL_LEFT_PARENTHESIS=65113]="SMALL_LEFT_PARENTHESIS",S[S.SMALL_LEFT_CURLY_BRACKET=65115]="SMALL_LEFT_CURLY_BRACKET",S[S.SMALL_LEFT_TORTOISE_SHELL_BRACKET=65117]="SMALL_LEFT_TORTOISE_SHELL_BRACKET",S[S.FULLWIDTH_LEFT_PARENTHESIS=65288]="FULLWIDTH_LEFT_PARENTHESIS",S[S.FULLWIDTH_LEFT_SQUARE_BRACKET=65339]="FULLWIDTH_LEFT_SQUARE_BRACKET",S[S.FULLWIDTH_LEFT_CURLY_BRACKET=65371]="FULLWIDTH_LEFT_CURLY_BRACKET",S[S.FULLWIDTH_LEFT_WHITE_PARENTHESIS=65375]="FULLWIDTH_LEFT_WHITE_PARENTHESIS",S[S.HALFWIDTH_LEFT_CORNER_BRACKET=65378]="HALFWIDTH_LEFT_CORNER_BRACKET"})(UnicodePsCodePoint||(UnicodePsCodePoint={}));var UnicodeZsCodePoint;(function(S){S[S.SPACE=32]="SPACE",S[S.NO_BREAK_SPACE=160]="NO_BREAK_SPACE",S[S.OGHAM_SPACE_MARK=5760]="OGHAM_SPACE_MARK",S[S.EN_QUAD=8192]="EN_QUAD",S[S.EM_QUAD=8193]="EM_QUAD",S[S.EN_SPACE=8194]="EN_SPACE",S[S.EM_SPACE=8195]="EM_SPACE",S[S.THREE_PER_EM_SPACE=8196]="THREE_PER_EM_SPACE",S[S.FOUR_PER_EM_SPACE=8197]="FOUR_PER_EM_SPACE",S[S.SIX_PER_EM_SPACE=8198]="SIX_PER_EM_SPACE",S[S.FIGURE_SPACE=8199]="FIGURE_SPACE",S[S.PUNCTUATION_SPACE=8200]="PUNCTUATION_SPACE",S[S.THIN_SPACE=8201]="THIN_SPACE",S[S.HAIR_SPACE=8202]="HAIR_SPACE",S[S.NARROW_NO_BREAK_SPACE=8239]="NARROW_NO_BREAK_SPACE",S[S.MEDIUM_MATHEMATICAL_SPACE=8287]="MEDIUM_MATHEMATICAL_SPACE",S[S.IDEOGRAPHIC_SPACE=12288]="IDEOGRAPHIC_SPACE"})(UnicodeZsCodePoint||(UnicodeZsCodePoint={}));var VirtualCodePoint;(function(S){S[S.LINE_END=-1]="LINE_END",S[S.SPACE=-2]="SPACE"})(VirtualCodePoint||(VirtualCodePoint={}));function createCodePointSearcher(S){const C=[...new Set(S)].sort((I,N)=>I-N),R=C.length;if(R<8)return[I=>{for(let N=0;NL+N);++N);O.push(L,L+N)}if(O.length*1.5{for(let L=0;L{let L=0,B=I;for(;L>>1;N{let N=0,L=R;for(;N>>1;Itypeof C=="number")}createCodePointSearcher([AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.CR,AsciiCodePoint.SPACE]);const[isAsciiPunctuationCharacter,asciiPunctuationCharacters]=createCodePointSearcher([AsciiCodePoint.EXCLAMATION_MARK,AsciiCodePoint.DOUBLE_QUOTE,AsciiCodePoint.NUMBER_SIGN,AsciiCodePoint.DOLLAR_SIGN,AsciiCodePoint.PERCENT_SIGN,AsciiCodePoint.AMPERSAND,AsciiCodePoint.SINGLE_QUOTE,AsciiCodePoint.OPEN_PARENTHESIS,AsciiCodePoint.CLOSE_PARENTHESIS,AsciiCodePoint.ASTERISK,AsciiCodePoint.PLUS_SIGN,AsciiCodePoint.COMMA,AsciiCodePoint.MINUS_SIGN,AsciiCodePoint.DOT,AsciiCodePoint.SLASH,AsciiCodePoint.COLON,AsciiCodePoint.SEMICOLON,AsciiCodePoint.OPEN_ANGLE,AsciiCodePoint.EQUALS_SIGN,AsciiCodePoint.CLOSE_ANGLE,AsciiCodePoint.QUESTION_MARK,AsciiCodePoint.AT_SIGN,AsciiCodePoint.OPEN_BRACKET,AsciiCodePoint.BACKSLASH,AsciiCodePoint.CLOSE_BRACKET,AsciiCodePoint.CARET,AsciiCodePoint.UNDERSCORE,AsciiCodePoint.BACKTICK,AsciiCodePoint.OPEN_BRACE,AsciiCodePoint.VERTICAL_SLASH,AsciiCodePoint.CLOSE_BRACE,AsciiCodePoint.TILDE]),isAsciiDigitCharacter=S=>S>=AsciiCodePoint.DIGIT0&&S<=AsciiCodePoint.DIGIT9,isAsciiLowerLetter=S=>S>=AsciiCodePoint.LOWERCASE_A&&S<=AsciiCodePoint.LOWERCASE_Z,isAsciiUpperLetter=S=>S>=AsciiCodePoint.UPPERCASE_A&&S<=AsciiCodePoint.UPPERCASE_Z,isAsciiLetter=S=>isAsciiLowerLetter(S)||isAsciiUpperLetter(S),isAlphanumeric=S=>isAsciiLowerLetter(S)||isAsciiUpperLetter(S)||isAsciiDigitCharacter(S),isAsciiCharacter=S=>S>=AsciiCodePoint.NUL&&S<=AsciiCodePoint.DELETE,[isAsciiControlCharacter,asciiControlCharacters]=createCodePointSearcher([AsciiCodePoint.NUL,AsciiCodePoint.SOH,AsciiCodePoint.STX,AsciiCodePoint.ETX,AsciiCodePoint.EOT,AsciiCodePoint.ENQ,AsciiCodePoint.ACK,AsciiCodePoint.BEL,AsciiCodePoint.BS,AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.CR,AsciiCodePoint.SO,AsciiCodePoint.SI,AsciiCodePoint.DLE,AsciiCodePoint.DC1,AsciiCodePoint.DC2,AsciiCodePoint.DC3,AsciiCodePoint.DC4,AsciiCodePoint.NAK,AsciiCodePoint.SYN,AsciiCodePoint.ETB,AsciiCodePoint.CAN,AsciiCodePoint.EM,AsciiCodePoint.SUB,AsciiCodePoint.ESC,AsciiCodePoint.FS,AsciiCodePoint.GS,AsciiCodePoint.RS,AsciiCodePoint.US,AsciiCodePoint.DELETE]),[isWhitespaceCharacter,whitespaceCharacters]=createCodePointSearcher([AsciiCodePoint.VT,AsciiCodePoint.FF,AsciiCodePoint.SPACE,VirtualCodePoint.SPACE,VirtualCodePoint.LINE_END]);AsciiCodePoint.SPACE,VirtualCodePoint.SPACE;const isSpaceCharacter=S=>S===AsciiCodePoint.SPACE||S===VirtualCodePoint.SPACE,isLineEnding=S=>S===VirtualCodePoint.LINE_END,[isPunctuationCharacter,punctuationCharacters]=createCodePointSearcher([...asciiPunctuationCharacters,...collectCodePointsFromEnum(UnicodePcCodePoint),...collectCodePointsFromEnum(UnicodePdCodePoint),...collectCodePointsFromEnum(UnicodePeCodePoint),...collectCodePointsFromEnum(UnicodePfCodePoint),...collectCodePointsFromEnum(UnicodePiCodePoint),...collectCodePointsFromEnum(UnicodePoCodePoint),...collectCodePointsFromEnum(UnicodePsCodePoint)]),isSpaceLike=S=>isSpaceCharacter(S)||isLineEnding(S),[isUnicodeWhitespaceCharacter,unicodeWhitespaceCharacters]=createCodePointSearcher([AsciiCodePoint.HT,AsciiCodePoint.LF,AsciiCodePoint.FF,AsciiCodePoint.CR,VirtualCodePoint.SPACE,VirtualCodePoint.LINE_END,...collectCodePointsFromEnum(UnicodeZsCodePoint)]);var UnicodeCodePoint;(function(S){S[S.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"})(UnicodeCodePoint||(UnicodeCodePoint={}));function createEntityReferenceTrie(){const S=(I,N)=>{if(I.length<=4){for(let j=0;j=N)return j;return I.length}let L=0,B=I.length;for(;L>>1;I[j].key{let L=C;for(const B of I){const j=S(L.children,B);if(j>=L.children.length){const V={key:B,children:[]};L.children.push(V),L=V;continue}let F=L.children[j];if(F.key===B){L=F;continue}F={key:B,children:[]},L.children.splice(j,0,F),L=F}L.value=N},search:(I,N,L)=>{let B=C;for(let j=N;j=B.children.length)return null;const K=B.children[V];if(K.key!==F)return null;if(K.value!=null)return{nextIndex:j+1,value:K.value};B=K}return null}}}const entityReferenceTrie=createEntityReferenceTrie();entityReferences.forEach(S=>entityReferenceTrie.insert(S.key,S.value));function eatEntityReference(S,C,R){if(C+1>=R)return null;const O=entityReferenceTrie.search(S,C,R);if(O!=null)return O;if(S[C].codePoint!==AsciiCodePoint.NUMBER_SIGN)return null;let I=0,N=C+1;if(S[N].codePoint===AsciiCodePoint.LOWERCASE_X||S[N].codePoint===AsciiCodePoint.UPPERCASE_X){N+=1;for(let B=1;B<=6&&N=AsciiCodePoint.UPPERCASE_A&&j<=AsciiCodePoint.UPPERCASE_F){I=(I<<4)+(j-AsciiCodePoint.UPPERCASE_A+10);continue}if(j>=AsciiCodePoint.LOWERCASE_A&&j<=AsciiCodePoint.LOWERCASE_F){I=(I<<4)+(j-AsciiCodePoint.LOWERCASE_A+10);continue}break}}else for(let B=1;B<=7&&N=R||S[N].codePoint!==AsciiCodePoint.SEMICOLON)return null;let L;try{I===0&&(I=UnicodeCodePoint.REPLACEMENT_CHARACTER),L=String.fromCodePoint(I)}catch{L=String.fromCodePoint(UnicodeCodePoint.REPLACEMENT_CHARACTER)}return{nextIndex:N+1,value:L}}function foldCase(S){return Array.from(S).map(C=>foldingCaseCodeMap[C]??C).join("")}(()=>{try{const S=new RegExp("\\p{Script=Han}|[\\u{3002}\\u{ff1f}\\u{ff01}\\u{ff0c}\\u{3001}\\u{ff1b}\\u{ff1a}\\u{201c}\\u{201d}\\u{2018}\\u{2019}\\u{ff08}\\u{ff09}\\u{300a}\\u{300b}\\u{3008}\\u{3009}\\u{3010}\\u{3011}\\u{300e}\\u{300f}\\u{300c}\\u{300d}\\u{fe43}\\u{fe44}\\u{3014}\\u{3015}\\u{2026}\\u{2014}\\u{ff5e}\\u{fe4f}\\u{ffe5}]","u").source,C=new RegExp(`(${S})\\n+(${S})`,"gu");return R=>R.replace(C,"$1$2")}catch{const S=/[\u{4E00}-\u{9FCC}\u{3400}-\u{4DB5}\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]|[\u{d840}-\u{d868}][\u{dc00}-\u{dfff}]|\u{d869}[\u{dc00}-\u{ded6}\u{df00}-\u{dfff}]|[\u{d86a}-\u{d86c}][\u{dc00}-\u{dfff}]|\u{d86d}[\u{dc00}-\u{df34}\u{df40}-\u{dfff}]|\u{d86e}[\u{dc00}-\u{dc1d}]/u.source,C=new RegExp(`(${S})\\n+(${S})`,"gu");return R=>R.replace(C,"$1$2")}})(),(()=>{try{const S=new RegExp("\\p{Script=Han}|[\\u{3002}\\u{ff1f}\\u{ff01}\\u{ff0c}\\u{3001}\\u{ff1b}\\u{ff1a}\\u{201c}\\u{201d}\\u{2018}\\u{2019}\\u{ff08}\\u{ff09}\\u{300a}\\u{300b}\\u{3008}\\u{3009}\\u{3010}\\u{3011}\\u{300e}\\u{300f}\\u{300c}\\u{300d}\\u{fe43}\\u{fe44}\\u{3014}\\u{3015}\\u{2026}\\u{2014}\\u{ff5e}\\u{fe4f}\\u{ffe5}]","u").source,C=new RegExp(`(${S})[\\s\\n]+(${S})`,"gu");return R=>R.replace(C,"$1$2")}catch{const S=/[\u{4E00}-\u{9FCC}\u{3400}-\u{4DB5}\u{FA0E}\u{FA0F}\u{FA11}\u{FA13}\u{FA14}\u{FA1F}\u{FA21}\u{FA23}\u{FA24}\u{FA27}-\u{FA29}]|[\u{d840}-\u{d868}][\u{dc00}-\u{dfff}]|\u{d869}[\u{dc00}-\u{ded6}\u{df00}-\u{dfff}]|[\u{d86a}-\u{d86c}][\u{dc00}-\u{dfff}]|\u{d86d}[\u{dc00}-\u{df34}\u{df40}-\u{dfff}]|\u{d86e}[\u{dc00}-\u{dc1d}]/u.source,C=new RegExp(`(${S})[\\s\\n]+(${S})`,"gu");return R=>R.replace(C,"$1$2")}})();function*createNodePointGenerator(S){let C=0,R=1,O=1;const I=typeof S=="string"?[S]:S;for(const N of I){const L=[];for(const F of N){const V=F.codePointAt(0);L.push(V)}const B=[],j=L.length;for(let F=0;F>2,F=L-N&3;for(let V=0;V>2,F=L-N&3;for(let V=0;V!0;if(S instanceof Function)return S;if(S.length===0)return()=>!1;if(S.length===1){const C=S[0];return R=>R.type===C}if(S.length===2){const[C,R]=S;return O=>O.type===C||O.type===R}return C=>{for(const R of S)if(C.type===R)return!0;return!1}}function traverseAst(S,C,R){const O=createNodeMatcher(C),I=N=>{const{children:L}=N;for(let B=0;B{const O={};traverseAst(S,C,L=>{const B=L;O[B.identifier]===void 0&&(O[B.identifier]=B)});const I=[];for(const L of R)O[L.identifier]===void 0&&(O[L.identifier]=L,I.push(L));return{root:I.length>0?{...S,children:S.children.concat(I)}:S,definitionMap:O}},astClasses=mergeStyleSets({root:{"--colorBgBlockquote":"none","--colorBgTableHead":"hsl(0deg, 0%, 94%)","--colorBgTableEvenRow":"hsl(0deg, 0%, 96%)","--colorBgTableOddRow":"hsl(0deg, 0%, 100%)","--colorBorderBlockquote":"hsl(210deg, 13%, 85%)","--colorBorderHeading":"hsl(0deg, 0%, 80%)","--colorBorderImage":"hsl(277deg, 19%, 47%)","--colorBorderTable":"hsl(220deg, 7%, 90%)","--colorBgCode":"#f5f7f9","--colorDelete":"hsl(210deg, 8%, 65%)","--colorHeading":"hsl(0deg, 0%, 25%)","--colorImageTitle":"hsl(0deg, 0%, 50%)","--colorInlineCode":"hsl(348deg, 60%, 47%)","--colorLink":"hsl(206deg, 53%, 47%)","--colorLinkActive":"hsl(206deg, 53%, 52%)","--colorLinkHover":"hsl(206deg, 53%, 52%)","--colorLinkVisited":"hsl(206deg, 53%, 47%)","--fontFamilyCode":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif","--fontFamilyHeading":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif"},rootDarken:{"&&":{"--colorBgBlockquote":"none","--colorBgTableHead":"hsl(200deg, 10%, 16%)","--colorBgTableEvenRow":"hsl(200deg, 10%, 16%)","--colorBgTableOddRow":"hsl(0deg, 0%, 9%)","--colorBorderBlockquote":"hsl(207deg, 7%, 45%)","--colorBorderHeading":"hsla(0deg, 0%, 30%, 0.8)","--colorBorderImage":"hsl(290deg, 15%, 49%)","--colorBorderTable":"hsl(0deg, 0%, 50%)","--colorBgCode":"hsl(0deg, 0%, 12%)","--colorDelete":"hsl(220deg, 5%, 68%)","--colorHeading":"hsl(0deg, 0%, 65%)","--colorImageTitle":"hsl(0deg, 0%, 50%)","--colorInlineCode":"hsl(348deg, 70%, 52%)","--colorLink":"hsl(207deg, 53%, 50%)","--colorLinkActive":"hsl(207deg, 53%, 50%)","--colorLinkHover":"hsl(207deg, 53%, 50%)","--colorLinkVisited":"hsl(207deg, 53%, 50%)","--fontFamilyCode":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif","--fontFamilyHeading":"Consolas, 'Source Code Pro', 'Roboto Mono', monospace, sans-serif"}},blockquote:{},break:{},code:{},delete:{},emphasis:{},heading:{},image:{},imageReference:{},inlineCode:{},link:{},linkReference:{},list:{},listItem:{},paragraph:{},strong:{},table:{},text:{},thematicBreak:{}}),NodeRendererContextType=React.createContext(null);NodeRendererContextType.displayName="NodeRendererContextType";const useNodeRendererContext=()=>React.useContext(NodeRendererContextType);function disposeAll(S){const C=[];for(const R of S)try{R.dispose()}catch(O){C.push(O)}if(C.length===1)throw C[0];if(C.length>1)throw new AggregateError(C,"Encountered errors while disposing")}class BatchDisposable{constructor(){Cn(this,"_disposed");Cn(this,"_disposables");this._disposed=!1,this._disposables=[]}get disposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;try{disposeAll(this._disposables)}finally{this._disposables.length=0}}}registerDisposable(C){C.disposed||(this._disposed?C.dispose():this._disposables.push(C))}}class Disposable{constructor(C){Cn(this,"_onDispose");Cn(this,"_disposed");this._onDispose=C,this._disposed=!1}static fromCallback(C){return new Disposable(C)}static fromUnsubscribable(C){return new Disposable(()=>C.unsubscribe())}get disposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._onDispose())}}function isDisposable(S){return S===null||typeof S!="object"?!1:typeof Reflect.get(S,"dispose")=="function"&&typeof Reflect.get(S,"disposed")=="boolean"}var ScheduleTransactionStatus;(function(S){S[S.NOT_STARTED=0]="NOT_STARTED",S[S.STARTED=1]="STARTED",S[S.COMPLETED=2]="COMPLETED"})(ScheduleTransactionStatus||(ScheduleTransactionStatus={}));function noop$2(...S){}const noopUnsubscribable={unsubscribe:noop$2};class Schedulable{constructor(C){Cn(this,"_scheduled");Cn(this,"_run");this._scheduled=!1,this._run=C}get scheduled(){return this._scheduled}schedule(){this._scheduled||(this._scheduled=!0,this._run())}}class Observable extends BatchDisposable{constructor(R,O={}){super();Cn(this,"equals");Cn(this,"_value");Cn(this,"_subscribers");this._value=R,this._subscribers=[],this.equals=O.equals??((I,N)=>Object.is(I,N))}dispose(){if(!this.disposed){super.dispose();const R=this._subscribers;this._subscribers=[];for(const O of R)O.complete()}}getSnapshot(){return this._value}subscribe(R){return this.disposed?(R.complete(),noopUnsubscribable):(this._subscribers.includes(R)||(this._subscribers=[...this._subscribers,R]),{unsubscribe:()=>{this._subscribers.includes(R)&&(this._subscribers=this._subscribers.filter(O=>O!==R))}})}next(R,O){if(this.disposed){console.warn("[Observable] Don't update a disposed observable. value:",R);return}const I=this._value;this.equals(R,I)||(this._value=R,this.notify(R,I,O))}notify(R,O,I){if(I){I.step(new Schedulable(()=>this.notifyImmediate(R,O)));return}this.notifyImmediate(R,O)}notifyImmediate(R,O){const I=this._subscribers;for(const N of I)N.next(R,O)}}class Ticker extends Observable{constructor(R,O={}){const I=new Set,N=Number(O.delay||0)||0,L=Math.max(0,Number(O.threshold||0)||0);super(R??0,{equals:(B,j)=>B===j});Cn(this,"_observes");Cn(this,"_delay");Cn(this,"_threshold");Cn(this,"_caller");this._observes=I,this._delay=N>=0?N:-1,this._threshold=L,this._caller=void 0}dispose(){this.disposed||(super.dispose(),this.flush(),this._observes.clear())}tick(R){this.next(this._value+1,R)}observe(R){if(this.disposed){console.warn("[Ticker.observe] the ticker has been disposed.");return}if(!this._observes.has(R)){const O=R.subscribe({next:()=>{I.disposed||this.tick()},complete:()=>I.dispose()}),I=Disposable.fromUnsubscribable(O);this._observes.add(R),this.registerDisposable(I)}}notify(R,O,I){if(I){this.flush(),I.step(new Schedulable(()=>this.notifyImmediate(R,O)));return}if(this._delay<0){this.notifyImmediate(R,O);return}const{_delay:N,_threshold:L,_caller:B}=this;let j=Date.now();const F=()=>this.notifyImmediate(R,O),V=setTimeout(()=>{this._caller=void 0,F()},N);B!==void 0&&(this._caller=void 0,clearTimeout(B.timer),B.createdAt+L<=j?B.call():j=B.createdAt),this._caller={timer:V,createdAt:j,call:F}}flush(){const R=this._caller;R!==void 0&&(this._caller=void 0,clearTimeout(R.timer),R.call())}}class Computed{constructor(C){Cn(this,"_observable");Cn(this,"getSnapshot",()=>this._observable.getSnapshot());Cn(this,"getServerSnapshot",()=>this._observable.getSnapshot());Cn(this,"subscribeStateChange",C=>{const R={next:()=>C(),complete:()=>{}},O=this._observable.subscribe(R),I=Disposable.fromUnsubscribable(O);return this._observable.registerDisposable(I),()=>I.dispose()});this._observable=C}static fromObservables(C,R,O){const I=new Ticker;for(const B of C)I.observe(B);const N=()=>{const B=C.map(j=>j.getSnapshot());return R(B)},L=new Observable(N(),O);return L.registerDisposable(I),I.subscribe({next:()=>{L.disposed||L.next(N())},complete:()=>L.dispose()}),new Computed(L)}get disposed(){return this._observable.disposed}dispose(){this._observable.disposed||this._observable.dispose()}registerDisposable(C){this._observable.registerDisposable(C)}subscribe(C){return this._observable.subscribe(C)}}class State extends Observable{constructor(){super(...arguments);Cn(this,"getSnapshot",()=>super.getSnapshot());Cn(this,"getServerSnapshot",()=>super.getSnapshot());Cn(this,"setState",R=>{const O=typeof R=="function"?R(this.getSnapshot()):R;super.next(O)});Cn(this,"subscribeStateChange",R=>{const O={next:()=>R(),complete:()=>{}},I=super.subscribe(O),N=Disposable.fromUnsubscribable(I);return this.registerDisposable(N),()=>N.dispose()})}}function isObservable(S){return S===null||typeof S!="object"?!1:typeof Reflect.get(S,"dispose")=="function"&&typeof Reflect.get(S,"disposed")=="boolean"&&typeof Reflect.get(S,"subscribe")=="function"&&typeof Reflect.get(S,"equals")=="function"&&typeof Reflect.get(S,"getSnapshot")=="function"&&typeof Reflect.get(S,"next")=="function"}class ViewModel extends BatchDisposable{constructor(){super();Cn(this,"_tickerMap");this._tickerMap=new Map}dispose(){this.disposed||(super.dispose(),Reflect.ownKeys(this).forEach(R=>{if(typeof R=="string"&&R.endsWith("$")){const O=this[R];isDisposable(O)&&O.dispose()}}))}ticker(R){const O=Array.from(new Set(R)).sort(),I=O.join("|");let N=this._tickerMap.get(I);if(N===void 0){const L=new Ticker;N={keys:O,ticker:L},this.registerDisposable(L),this._tickerMap.set(I,N);for(const B of O){const j=this[B];if(!isObservable(j)){console.warn("[ViewModel.ticker] not an observable, key:",B,"val:",j);continue}L.observe(j)}}return N}}class ReactMarkdownViewModel extends ViewModel{constructor(C){super(),this.preferCodeWrap$=new State(!1);const{definitionMap:R,rendererMap:O,showCodeLineno:I,themeScheme:N}=C;this.definitionMap$=new State(R),this.rendererMap$=new State(O),this.showCodeLineno$=new State(I),this.themeScheme$=new State(N)}}function isEqual$2(S,C){if(S===null||C===null||S===void 0||C===void 0)return S===C;if(typeof S!=typeof C)return!1;if(Object.is(S,C))return!0;if(typeof S=="object"){if(S.constructor!==C.constructor)return!1;if(Array.isArray(S)){if(S.length!==C.length)return!1;for(let O=0;O{I.value=O,I.getSnapshot=C,checkIfSnapshotChanged(I)&&N({inst:I})},[S,O,C]),reactExports.useEffect(()=>(checkIfSnapshotChanged(I)&&N({inst:I}),S(()=>{checkIfSnapshotChanged(I)&&N({inst:I})})),[S]),reactExports.useDebugValue(O),O}function checkIfSnapshotChanged(S){const C=S.getSnapshot,R=S.value;try{const O=C();return!Object.is(R,O)}catch{return!0}}function useSyncExternalStore$1(S,C,R){return C()}const canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",shim=canUseDOM?useSyncExternalStore$2:useSyncExternalStore$1,builtin=reactExports.useSyncExternalStore,useSyncExternalStore=builtin||shim;function useStateValue(S){const{getSnapshot:C,getServerSnapshot:R,subscribeStateChange:O}=S;return useSyncExternalStore(O,C,R)}const NodesRenderer=S=>{const{nodes:C}=S,{viewmodel:R}=useNodeRendererContext(),O=useStateValue(R.rendererMap$);return!Array.isArray(C)||C.length<=0?jsxRuntimeExports.jsx(React.Fragment,{}):jsxRuntimeExports.jsx(NodesRendererInner,{nodes:C,rendererMap:O})};class NodesRendererInner extends React.Component{shouldComponentUpdate(C){const R=this.props;return!lodashExports.isEqual(R.nodes,C.nodes)||R.rendererMap!==C.rendererMap}render(){const{nodes:C,rendererMap:R}=this.props;return jsxRuntimeExports.jsx(React.Fragment,{children:C.map((O,I)=>{const N=`${O.type}-${I}`,L=R[O.type]??R._fallback;return jsxRuntimeExports.jsx(L,{...O},N)})})}}var TokenizerType;(function(S){S.BLOCK="block",S.INLINE="inline"})(TokenizerType||(TokenizerType={}));var TokenizerPriority;(function(S){S[S.ATOMIC=10]="ATOMIC",S[S.FENCED_BLOCK=10]="FENCED_BLOCK",S[S.CONTAINING_BLOCK=10]="CONTAINING_BLOCK",S[S.INTERRUPTABLE_BLOCK=2]="INTERRUPTABLE_BLOCK",S[S.IMAGES=4]="IMAGES",S[S.LINKS=3]="LINKS",S[S.CONTAINING_INLINE=2]="CONTAINING_INLINE",S[S.SOFT_INLINE=1]="SOFT_INLINE",S[S.FALLBACK=-1]="FALLBACK"})(TokenizerPriority||(TokenizerPriority={}));class BaseInlineTokenizer{constructor(C){Cn(this,"type",TokenizerType.INLINE);Cn(this,"name");Cn(this,"priority");this.name=C.name,this.priority=C.priority}toString(){return this.name}}function*genFindDelimiter(S){let C=-1,R=null;for(;;){const[O,I]=yield R;C===I&&(R==null||R.startIndex>=O)||(C=I,R=S(O,I))}}class BaseBlockTokenizer{constructor(C){Cn(this,"type",TokenizerType.BLOCK);Cn(this,"name");Cn(this,"priority");this.name=C.name,this.priority=C.priority}extractPhrasingContentLines(C){return null}buildBlockToken(C,R){return null}toString(){return this.name}}function calcStartPoint(S,C){const{line:R,column:O,offset:I}=S[C];return{line:R,column:O,offset:I}}function calcEndPoint(S,C){const{line:R,column:O,offset:I}=S[C];return{line:R,column:O+1,offset:I+1}}function calcPositionFromPhrasingContentLines(S){const C=S[0],R=S[S.length-1];return{start:calcStartPoint(C.nodePoints,C.startIndex),end:calcEndPoint(R.nodePoints,R.endIndex-1)}}function mergeContentLinesFaithfully(S,C=0,R=S.length){if(C>=R||C<0||R>S.length)return[];const O=[];for(let I=C;I=R||C<0||R>S.length)return[];for(let j=C;j+1=0;--B){const j=I[B];if(!isWhitespaceCharacter(j.codePoint))break}for(let j=L;j<=B;++j)O.push(I[j]);return O}function encodeLinkDestination(S){let C=S;for(;;)try{const R=decodeURIComponent(C);if(R===C)break;C=R}catch{break}return encodeURI(C)}function resolveLabelToIdentifier(S){const C=S.trim().replace(/\s+/gu," ").toLowerCase();return foldCase(C)}function resolveLinkLabelAndIdentifier(S,C,R){const O=calcStringFromNodePoints(S,C,R,!0);if(O.length<=0)return null;const I=resolveLabelToIdentifier(O);return{label:O,identifier:I}}function eatLinkLabel(S,C,R){let O=C+1;const I=Math.min(O+1e3,R);for(;OC;--R){const O=S[R];if(O.firstNonWhitespaceIndexR?[]:S.slice(C,R+1)}var define_process_env_default$m={};const isProduction$1=define_process_env_default$m.NODE_ENV==="production",prefix$2="Invariant failed";function invariant$1(S,C){if(!S)throw isProduction$1?new Error(prefix$2):C==null?new Error(prefix$2+": "):new Error(prefix$2+": "+(C instanceof Function?C():C))}const createBlockContentProcessor=(S,C)=>{const R={_tokenizer:"root",nodeType:"root",position:{start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}},children:[]},O=[];O.push({hook:{isContainingBlock:!0},token:R});let I=0;const N=X=>{for(let J=I;J>=0;--J){const oe=O[J];oe.token.position.end={...X}}},L=(X,J)=>{if(J.length<=0)return null;const oe=S.filter(me=>me!==X),pe=createBlockContentProcessor(oe,C);for(const me of J)pe.consume(me);return pe},B=()=>{const X=O.pop();if(X!=null){if(O.length>0){const J=O[O.length-1];if(X.hook.onClose!=null){const oe=X.hook.onClose(X.token);if(oe!=null)switch(oe.status){case"closingAndRollback":{const pe=L(X.hook,oe.lines);if(pe==null)break;const me=pe.done();J.token.children.push(...me.children);break}case"failedAndRollback":{J.token.children.pop();const pe=L(X.hook,oe.lines);if(pe==null)break;const me=pe.done();J.token.children.push(...me.children);break}}}}return I>=O.length&&(I=O.length-1),X}},j=X=>{for(;O.length>X;)B()},F=(X,J,oe)=>{j(I+1),O[I].token.children.push(J),N(J.position.end),I+=1,O.push({hook:X,token:J}),oe&&B()},V=(X,J,oe)=>{const pe=L(X,J);if(pe==null)return!1;const me=pe.shallowSnapshot(),xe=me[0];xe.token.children!=null&&oe.token.children.push(...xe.token.children),N(xe.token.position.end);for(let Ae=1;Ae{const{nodePoints:J,startIndex:oe,endIndex:pe}=X;let{firstNonWhitespaceIndex:me,countOfPrecedeSpaces:xe,startIndex:Ae}=X;const ge=()=>({nodePoints:J,startIndex:Ae,endIndex:pe,firstNonWhitespaceIndex:me,countOfPrecedeSpaces:xe}),Te=(Ke,Je)=>{if(invariant$1(Ae<=Ke,`[DBTContext#moveForward] nextIndex(${Ke}) is behind i(${Ae}).`),Je){const Xe=calcEndPoint(J,Ke-1);N(Xe)}if(Ae!==Ke)for(Ae=Ke,xe=0,me=Ke;me{const{token:Xe}=O[I],ot=Ke.eatOpener(Je,Xe);if(ot==null)return!1;invariant$1(ot.nextIndex>Ae,`[consumeNewOpener] The marker of the new data node cannot be empty. - tokenizer(${ot.token._tokenizer})`),Te(ot.nextIndex,!1);const tt=ot.token;return tt._tokenizer=Ke.name,F(Ke,tt,!!ot.saturated),!0},ke=(Ke,Je)=>{if(Ke.eatAndInterruptPreviousSibling==null)return!1;const{hook:Xe,token:ot}=O[I],{token:tt}=O[I-1];if(Ke.priority<=Xe.priority)return!1;const Ue=Ke.eatAndInterruptPreviousSibling(Je,ot,tt);if(Ue==null)return!1;j(I),tt.children.pop(),Ue.remainingSibling!=null&&(Array.isArray(Ue.remainingSibling)?tt.children.push(...Ue.remainingSibling):tt.children.push(Ue.remainingSibling)),Te(Ue.nextIndex,!1);const et=Ue.token;return et._tokenizer=Ke.name,F(Ke,et,!!Ue.saturated),!0},Be=()=>{if(I=1,O.length<2)return;let{token:Ke}=O[I-1];for(;Aedt!==Xe&&ke(dt,ot)))break;const tt=Xe.eatContinuationText==null?{status:"notMatched"}:Xe.eatContinuationText(ot,Je.token,Ke);let Ue=!1,et=!1;switch(tt.status){case"failedAndRollback":{if(Ke.children.pop(),O.length=I,I-=1,tt.lines.length>0){const dt=O[I];if(V(Xe,tt.lines,dt)){et=!0;break}}Ue=!0;break}case"closingAndRollback":{if(j(I),tt.lines.length>0){const dt=O[I];if(V(Xe,tt.lines,dt)){et=!0;break}}Ue=!0;break}case"notMatched":{I-=1,Ue=!0;break}case"closing":{Te(tt.nextIndex,!0),I-=1,Ue=!0;break}case"opening":{Te(tt.nextIndex,!0);break}default:throw new TypeError(`[eatContinuationText] unexpected status (${tt.status}).`)}if(Ue)break;et||(I+=1,Ke=Je.token)}},Ie=()=>{if(!(Ae>=pe)){if(I=4)return}else I=O.length-1;for(;Ae{if(Ae>=pe||I+1>=O.length)return!1;const{hook:Ke,token:Je}=O[O.length-1];if(Ke.eatLazyContinuationText==null)return!1;const{token:Xe}=O[O.length-2],ot=ge(),tt=Ke.eatLazyContinuationText(ot,Je,Xe);switch(tt.status){case"notMatched":return!1;case"opening":return I=O.length-1,Te(tt.nextIndex,!0),I=O.length-1,!0;default:throw new TypeError(`[eatLazyContinuationText] unexpected status (${tt.status}).`)}};if(Be(),Ie(),je()||j(I+1),C!=null&&Ae=pe,`[IBlockContentProcessor] there is still unprocessed contents. startIndexOfLine(${oe}), endIndexOfLine(${pe})`)},done:()=>{for(;O.length>1;)B();return R},shallowSnapshot:()=>[...O]}},createSinglePriorityDelimiterProcessor=()=>{let S=0;const C=[],R=[],O=[],I=K=>{let W=K-1;for(;W>=0&&R[W].inactive;)W-=1;R.length=W+1},N=(K,W)=>{R.push({hook:K,delimiter:W,inactive:!1,tokenStackIndex:O.length})},L=(K,W)=>{if(R.length<=0)return null;let X=null;for(let J=R.length-1;J>=0;--J){if(X=R[J],X.inactive||X.hook!==K)continue;const oe=X.delimiter,pe=K.isDelimiterPair(oe,W,C);if(pe.paired)return oe;if(!pe.closer)return null}return null},B=(K,W)=>{if(R.length<=0)return W;let X,J=W,oe=[];for(let pe=R.length-1;pe>=0;--pe){const me=R[pe];if(me.hook!==K||me.inactive)continue;const xe=me.tokenStackIndex;for(xe0){for(const we of Te)we._tokenizer=K.name;oe.unshift(...Te)}X=void 0,me.inactive=!0}if(!Ae.closer){const Te=K.processSingleDelimiter(J);if(Te.length>0){for(const we of Te)we._tokenizer=K.name;oe.push(...Te)}J=void 0}break}const ge=K.processDelimiterPair(X,J,oe);{for(const Te of ge.tokens)Te._tokenizer==null&&(Te._tokenizer=K.name);oe=ge.tokens}X=ge.remainOpenerDelimiter,J=ge.remainCloserDelimiter,I(pe),pe=Math.min(pe,R.length),X!=null&&N(K,X)}if(J==null||J.type==="full")break}if(O.push(...oe),J==null)return null;if(J.type==="full"||J.type==="closer"){const pe=K.processSingleDelimiter(J);for(const me of pe)me._tokenizer=K.name,O.push(me);return null}return J};return{process:(K,W)=>{for(;S=W.endIndex)break;X.startIndex>=W.startIndex||O.push(X)}switch(W.type){case"opener":{N(K,W);break}case"both":{const X=B(K,W);X!=null&&N(K,X);break}case"closer":{B(K,W);break}case"full":{const X=K.processSingleDelimiter(W);for(const J of X)J._tokenizer=K.name,O.push(J);break}default:throw new TypeError(`Unexpected delimiter type(${W.type}) from ${K.name}.`)}},done:()=>{const K=[];for(const{delimiter:X,hook:J}of R){const oe=J.processSingleDelimiter(X);for(const pe of oe)pe._tokenizer=J.name,K.push(pe)}if(R.length=0,K.length>0){const X=mergeSortedTokenStack(O,K);O.length=0,O.push(...X)}return O.concat(C.slice(S))},reset:K=>{C.length=K.length;for(let W=0;W{if(S.length<=0)return C;if(C.length<=0)return S;const R=[];let O=0,I=0;for(;O{const R=(N,L,B)=>{let j=[],F=null;const V=[N,L];for(const W of B){const X=W.findDelimiter(V);if(X!=null){if(F!=null){if(X.startIndex>F)continue;X.startIndex1){let W=0;for(const X of j){const J=X.delimiter.type;if(J==="full")return{items:[X],nextIndex:X.delimiter.endIndex};(J==="both"||J==="closer")&&(W+=1)}if(W>1){let X=-1,J=-1;for(let pe=0;pe-1?[j[X]]:j.filter(pe=>pe.delimiter.type!=="closer"),nextIndex:K}}}return{items:j,nextIndex:K}},O=createSinglePriorityDelimiterProcessor();return{process:(N,L,B)=>{let j=N;for(let F=C;F{const O=[];for(let I=0;I{let W=L.process(F,V,K);return W=R(W,V,K),W}}),j=S[I].priority;for(;I{let R;const O=S.match(C);return{isDelimiterPair:()=>({paired:!0}),processDelimiterPair:(I,N,L)=>({tokens:L}),processSingleDelimiter:()=>[],...O,name:S.name,priority:S.priority,findDelimiter:I=>R.next(I).value,reset:()=>{R=O.findDelimiter(),R.next()}}};function createProcessor(S){const{inlineTokenizers:C,inlineTokenizerMap:R,blockTokenizers:O,blockTokenizerMap:I,blockFallbackTokenizer:N,inlineFallbackTokenizer:L,shouldReservePosition:B,presetDefinitions:j,presetFootnoteDefinitions:F,formatUrl:V}=S;let K=!1;const W=new Set,X=new Set;let J=[],oe=-1,pe=-1;const me=Object.freeze({matchBlockApi:{extractPhrasingLines:Ie,rollbackPhrasingLines:je,registerDefinitionIdentifier:et=>{K&&W.add(et)},registerFootnoteDefinitionIdentifier:et=>{K&&X.add(et)}},parseBlockApi:{shouldReservePosition:B,formatUrl:V,processInlines:ot,parseBlockTokens:Xe},matchInlineApi:{hasDefinition:et=>W.has(et),hasFootnoteDefinition:et=>X.has(et),getNodePoints:()=>J,getBlockStartIndex:()=>oe,getBlockEndIndex:()=>pe,resolveFallbackTokens:Ke},parseInlineApi:{shouldReservePosition:B,calcPosition:et=>({start:calcStartPoint(J,et.startIndex),end:calcEndPoint(J,et.endIndex-1)}),formatUrl:V,getNodePoints:()=>J,hasDefinition:et=>W.has(et),hasFootnoteDefinition:et=>X.has(et),parseInlineTokens:Ue}}),xe=O.map(et=>({...et.match(me.matchBlockApi),name:et.name,priority:et.priority})),Ae=new Map(Array.from(I.entries()).map(et=>[et[0],et[1].parse(me.parseBlockApi)])),ge=N?{...N.match(me.matchBlockApi),name:N.name,priority:N.priority}:null,Te=createProcessorHookGroups(C,me.matchInlineApi,Ke),we=new Map(Array.from(R.entries()).map(et=>[et[0],et[1].parse(me.parseInlineApi)])),ke=createPhrasingContentProcessor(Te,0);return{process:Be};function Be(et){W.clear(),X.clear(),K=!0;const dt=Je(et);K=!1;for(const lt of j)W.add(lt.identifier);for(const lt of F)X.add(lt.identifier);const gt=Xe(dt.children);return B?{type:"root",position:dt.position,children:gt}:{type:"root",children:gt}}function Ie(et){const dt=I.get(et._tokenizer);return(dt==null?void 0:dt.extractPhrasingContentLines(et))??null}function je(et,dt){if(dt!=null){const Qe=I.get(dt._tokenizer);if(Qe!==void 0&&Qe.buildBlockToken!=null){const lt=Qe.buildBlockToken(et,dt);if(lt!==null)return lt._tokenizer=Qe.name,[lt]}}return Je([et]).children}function Ke(et,dt,gt){if(L==null)return et;let Qe=dt;const lt=[];for(const ht of et){if(QeL.priority)break}N<0||N>=C.length?C.push(O):C.splice(N,0,O)}_unregisterTokenizer(C,R,O){var B,j;const I=typeof O=="string"?O:O.name;if(!R.delete(I))return;((B=this.blockFallbackTokenizer)==null?void 0:B.name)===I&&(this.blockFallbackTokenizer=null),((j=this.inlineFallbackTokenizer)==null?void 0:j.name)===I&&(this.inlineFallbackTokenizer=null);const L=C.findIndex(F=>F.name===I);L>=0&&C.splice(L,1)}}function eatEmailAddress(S,C,R){let O=C;for(;O=R||S[O].codePoint!==AsciiCodePoint.AT_SIGN||!isAlphanumeric(S[O+1].codePoint))return{valid:!1,nextIndex:O+1};for(O=eatAddressPart0(S,O+2,R);O+1=C?I+1:C}function eatAbsoluteUri(S,C,R){const O=eatAutolinkSchema(S,C,R);let{nextIndex:I}=O;if(!O.valid||I>=R||S[I].codePoint!==AsciiCodePoint.COLON)return{valid:!1,nextIndex:I};for(I+=1;I32?{valid:!1,nextIndex:O+1}:{valid:!0,nextIndex:O}}const helpers=[{contentType:"uri",eat:eatAbsoluteUri},{contentType:"email",eat:eatEmailAddress}],match$n=function(S){return{findDelimiter:()=>genFindDelimiter(C),processSingleDelimiter:R};function C(O,I){const N=S.getNodePoints();for(let L=O;LC.map(R=>{const O=S.getNodePoints();let I=calcStringFromNodePoints(O,R.startIndex+1,R.endIndex-1);R.contentType==="email"&&(I="mailto:"+I);const N=S.formatUrl(I),L=S.parseInlineTokens(R.children);return S.shouldReservePosition?{type:LinkType,position:S.calcPosition(R),url:N,children:L}:{type:LinkType,url:N,children:L}})}},uniqueName$j="@yozora/tokenizer-autolink";class AutolinkTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$j,priority:R.priority??TokenizerPriority.ATOMIC});Cn(this,"match",match$n);Cn(this,"parse",parse$k)}}const match$m=function(){return{isContainingBlock:!0,eatOpener:S,eatAndInterruptPreviousSibling:C,eatContinuationText:R};function S(O){if(O.countOfPrecedeSpaces>=4)return null;const{nodePoints:I,startIndex:N,endIndex:L,firstNonWhitespaceIndex:B}=O;if(B>=L||I[B].codePoint!==AsciiCodePoint.CLOSE_ANGLE)return null;let j=B+1;return j=4||F>=j||L[F].codePoint!==AsciiCodePoint.CLOSE_ANGLE?N.nodeType===BlockquoteType?{status:"opening",nextIndex:B}:{status:"notMatched"}:{status:"opening",nextIndex:F+1C.map(R=>{const O=S.parseBlockTokens(R.children);return S.shouldReservePosition?{type:BlockquoteType,position:R.position,children:O}:{type:BlockquoteType,children:O}})}},uniqueName$i="@yozora/tokenizer-blockquote";class BlockquoteTokenizer extends BaseBlockTokenizer{constructor(R={}){super({name:R.name??uniqueName$i,priority:R.priority??TokenizerPriority.CONTAINING_BLOCK});Cn(this,"match",match$m);Cn(this,"parse",parse$j)}}const uniqueName$h="@yozora/tokenizer-break";var BreakTokenMarkerType;(function(S){S.BACKSLASH="backslash",S.MORE_THAN_TWO_SPACES="more-than-two-spaces"})(BreakTokenMarkerType||(BreakTokenMarkerType={}));const match$l=function(S){return{findDelimiter:()=>genFindDelimiter(C),processSingleDelimiter:R};function C(O,I){const N=S.getNodePoints();for(let L=O+1;L=O&&N[V].codePoint===AsciiCodePoint.BACKSLASH;V-=1);L-V&1||(j=L-1,F=BreakTokenMarkerType.BACKSLASH);break}case AsciiCodePoint.SPACE:{let V=L-2;for(;V>=O&&N[V].codePoint===AsciiCodePoint.SPACE;V-=1);L-V>2&&(j=V+1,F=BreakTokenMarkerType.MORE_THAN_TWO_SPACES);break}}if(!(j==null||F==null))return{type:"full",markerType:F,startIndex:j,endIndex:L}}return null}function R(O){return[{nodeType:BreakType,startIndex:O.startIndex,endIndex:O.endIndex}]}},parse$i=function(S){return{parse:C=>C.map(R=>S.shouldReservePosition?{type:BreakType,position:S.calcPosition(R)}:{type:BreakType})}};class BreakTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$h,priority:R.priority??TokenizerPriority.SOFT_INLINE});Cn(this,"match",match$l);Cn(this,"parse",parse$i)}}function eatAndCollectLinkDestination(S,C,R,O){let I=C;O==null&&(O={saturated:!1,nodePoints:[],hasOpenAngleBracket:!1,openParensCount:0});const N=eatOptionalWhitespaces(S,I,R);if(N>=R)return{nextIndex:-1,state:O};if(O.nodePoints.length<=0){I=N;const L=S[I];L.codePoint===AsciiCodePoint.OPEN_ANGLE&&(I+=1,O.hasOpenAngleBracket=!0,O.nodePoints.push(L))}if(O.hasOpenAngleBracket){for(;I=R)return{nextIndex:-1,state:O};if(O.nodePoints.length<=0){I=N;const L=S[I];if(L.codePoint!==AsciiCodePoint.OPEN_BRACKET)return{nextIndex:-1,state:O};I+=1,O.nodePoints.push(L)}for(;I=R)return{nextIndex:-1,state:O};if(O.nodePoints.length<=0){I=N;const L=S[I];switch(L.codePoint){case AsciiCodePoint.DOUBLE_QUOTE:case AsciiCodePoint.SINGLE_QUOTE:case AsciiCodePoint.OPEN_PARENTHESIS:O.wrapSymbol=L.codePoint,O.nodePoints.push(L),I+=1;break;default:return{nextIndex:-1,state:O}}}if(O.wrapSymbol==null)return{nextIndex:-1,state:O};switch(O.wrapSymbol){case AsciiCodePoint.DOUBLE_QUOTE:case AsciiCodePoint.SINGLE_QUOTE:{for(;I=R||S[I+1].codePoint===VirtualCodePoint.LINE_END){O.nodePoints.push(L),O.saturated=!0;break}return{nextIndex:-1,state:O};default:O.nodePoints.push(L)}}break}}return{nextIndex:R,state:O}}const match$k=function(S){return{isContainingBlock:!1,eatOpener:C,eatContinuationText:R,onClose:O};function C(I){if(I.countOfPrecedeSpaces>=4)return null;const{nodePoints:N,startIndex:L,endIndex:B,firstNonWhitespaceIndex:j}=I;if(j>=B)return null;let F=j;const{nextIndex:V,state:K}=eatAndCollectLinkLabel(N,F,B,null);if(V<0)return null;const W=N[L].line,X=()=>({nodeType:DefinitionType,position:{start:calcStartPoint(N,L),end:calcEndPoint(N,B-1)},label:K,destination:null,title:null,lineNoOfLabel:W,lineNoOfDestination:-1,lineNoOfTitle:-1,lines:[I]});if(!K.saturated)return{token:X(),nextIndex:B};if(V<0||V+1>=B||N[V].codePoint!==AsciiCodePoint.COLON)return null;if(F=eatOptionalWhitespaces(N,V+1,B),F>=B)return{token:X(),nextIndex:B};const{nextIndex:J,state:oe}=eatAndCollectLinkDestination(N,F,B,null);if(J<0||!oe.saturated&&J!==B)return null;if(F=eatOptionalWhitespaces(N,J,B),F>=B){const Ae=X();return Ae.destination=oe,Ae.lineNoOfDestination=W,{token:Ae,nextIndex:B}}if(F===J)return null;const{nextIndex:pe,state:me}=eatAndCollectLinkTitle(N,F,B,null);if(pe>=0&&(F=pe),F=F||L[pe].codePoint!==AsciiCodePoint.COLON)return{status:"failedAndRollback",lines:N.lines};K=pe+1}if(N.destination==null){if(K=eatOptionalWhitespaces(L,K,F),K>=F)return{status:"failedAndRollback",lines:N.lines};const{nextIndex:pe,state:me}=eatAndCollectLinkDestination(L,K,F,null);if(pe<0||!me.saturated)return{status:"failedAndRollback",lines:N.lines};if(K=eatOptionalWhitespaces(L,pe,F),K>=F)return N.destination=me,N.lines.push(I),{status:"opening",nextIndex:F};N.lineNoOfDestination=V,N.lineNoOfTitle=V}N.lineNoOfTitle<0&&(N.lineNoOfTitle=V);const{nextIndex:W,state:X}=eatAndCollectLinkTitle(L,K,F,N.title);if(N.title=X,W<0||X.nodePoints.length<=0||X.saturated&&eatOptionalWhitespaces(L,W,F)C.map(R=>{const O=R._label,I=R._identifier,N=R.destination.nodePoints,L=N[0].codePoint===AsciiCodePoint.OPEN_ANGLE?calcEscapedStringFromNodePoints(N,1,N.length-1,!0):calcEscapedStringFromNodePoints(N,0,N.length,!0),B=S.formatUrl(L),j=R.title==null?void 0:calcEscapedStringFromNodePoints(R.title.nodePoints,1,R.title.nodePoints.length-1);return S.shouldReservePosition?{type:DefinitionType,position:R.position,identifier:I,label:O,url:B,title:j}:{type:DefinitionType,identifier:I,label:O,url:B,title:j}})}},uniqueName$g="@yozora/tokenizer-definition";class DefinitionTokenizer extends BaseBlockTokenizer{constructor(R={}){super({name:R.name??uniqueName$g,priority:R.priority??TokenizerPriority.ATOMIC});Cn(this,"match",match$k);Cn(this,"parse",parse$h)}}const match$j=function(S){return{findDelimiter:()=>genFindDelimiter(C),isDelimiterPair:R,processDelimiterPair:O};function C(I,N){const L=S.getNodePoints(),B=S.getBlockStartIndex(),j=S.getBlockEndIndex(),F=(K,W)=>{if(W===j)return!1;if(W===N)return!0;const X=L[W];if(isUnicodeWhitespaceCharacter(X.codePoint))return!1;if(!isPunctuationCharacter(X.codePoint)||K<=I)return!0;const J=L[K-1];return isUnicodeWhitespaceCharacter(J.codePoint)||isPunctuationCharacter(J.codePoint)},V=(K,W)=>{if(K===B)return!1;if(K===I)return!0;const X=L[K-1];if(isUnicodeWhitespaceCharacter(X.codePoint))return!1;if(!isPunctuationCharacter(X.codePoint)||W>=N)return!0;const J=L[W];return isUnicodeWhitespaceCharacter(J.codePoint)||isPunctuationCharacter(J.codePoint)};for(let K=I;KI&&!isPunctuationCharacter(L[X-1].codePoint)&&(me=!1);const ge=L[J];isPunctuationCharacter(ge.codePoint)||(xe=!1)}if(!me&&!xe)break;const Ae=J-X;return{type:me?xe?"both":"opener":"closer",startIndex:X,endIndex:J,thickness:Ae,originalThickness:Ae}}}}return null}function R(I,N){const L=S.getNodePoints();return L[I.startIndex].codePoint!==L[N.startIndex].codePoint||(I.type==="both"||N.type==="both")&&(I.originalThickness+N.originalThickness)%3===0&&I.originalThickness%3!==0?{paired:!1,opener:!0,closer:!0}:{paired:!0}}function O(I,N,L){let B=1;I.thickness>1&&N.thickness>1&&(B=2),L=S.resolveInternalTokens(L,I.endIndex,N.startIndex);const j={nodeType:B===1?EmphasisType:StrongType,startIndex:I.endIndex-B,endIndex:N.startIndex+B,thickness:B,children:L},F=I.thickness>B?{type:I.type,startIndex:I.startIndex,endIndex:I.endIndex-B,thickness:I.thickness-B,originalThickness:I.originalThickness}:void 0,V=N.thickness>B?{type:N.type,startIndex:N.startIndex+B,endIndex:N.endIndex,thickness:N.thickness-B,originalThickness:N.originalThickness}:void 0;return{tokens:[j],remainOpenerDelimiter:F,remainCloserDelimiter:V}}},parse$g=function(S){return{parse:C=>C.map(R=>{const O=S.parseInlineTokens(R.children);return S.shouldReservePosition?{type:R.nodeType,position:S.calcPosition(R),children:O}:{type:R.nodeType,children:O}})}},uniqueName$f="@yozora/tokenizer-emphasis";class EmphasisTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$f,priority:R.priority??TokenizerPriority.CONTAINING_INLINE});Cn(this,"match",match$j);Cn(this,"parse",parse$g)}}function match$i(S){const{nodeType:C,markers:R,markersRequired:O,checkInfoString:I}=this;return{isContainingBlock:!1,eatOpener:N,eatAndInterruptPreviousSibling:L,eatContinuationText:B};function N(j){if(j.countOfPrecedeSpaces>=4)return null;const{endIndex:F,firstNonWhitespaceIndex:V}=j;if(V+O-1>=F)return null;const{nodePoints:K,startIndex:W}=j,X=K[V].codePoint;if(R.indexOf(X)<0)return null;const J=eatOptionalCharacters(K,V+1,F,X),oe=J-V;if(oe=F.markerCount){for(;pe=W)return{status:"closing",nextIndex:W}}}const oe=Math.min(K+F.indent,X,W-1);return F.lines.push({nodePoints:V,startIndex:oe,endIndex:W,firstNonWhitespaceIndex:X,countOfPrecedeSpaces:J}),{status:"opening",nextIndex:W}}}class FencedBlockTokenizer extends BaseBlockTokenizer{constructor(R){super({name:R.name,priority:R.priority??TokenizerPriority.FENCED_BLOCK});Cn(this,"nodeType");Cn(this,"markers",[]);Cn(this,"markersRequired");Cn(this,"checkInfoString");Cn(this,"match",match$i);this.nodeType=R.nodeType,this.markers=R.markers,this.markersRequired=R.markersRequired,this.checkInfoString=R.checkInfoString}}const match$h=function(S){return{...match$i.call(this,S),isContainingBlock:!1}},parse$f=function(S){return{parse:C=>C.map(R=>{const O=R.infoString;let I=0;const N=[];for(;I0?L:null,meta:B.length>0?B:null,value:F}:{type:CodeType,lang:L.length>0?L:null,meta:B.length>0?B:null,value:F}})}},uniqueName$e="@yozora/tokenizer-fenced-code";class FencedCodeTokenizer extends FencedBlockTokenizer{constructor(R={}){super({name:R.name??uniqueName$e,priority:R.priority??TokenizerPriority.FENCED_BLOCK,nodeType:CodeType,markers:[AsciiCodePoint.BACKTICK,AsciiCodePoint.TILDE],markersRequired:3,checkInfoString:(O,I)=>{if(I===AsciiCodePoint.BACKTICK){for(const N of O)if(N.codePoint===AsciiCodePoint.BACKTICK)return!1}return!0}});Cn(this,"match",match$h);Cn(this,"parse",parse$f)}}const match$g=function(){return{isContainingBlock:!1,eatOpener:S,eatAndInterruptPreviousSibling:C};function S(R){if(R.countOfPrecedeSpaces>=4)return null;const{nodePoints:O,startIndex:I,endIndex:N,firstNonWhitespaceIndex:L}=R;if(L>=N||O[L].codePoint!==AsciiCodePoint.NUMBER_SIGN)return null;const B=eatOptionalCharacters(O,L+1,N,AsciiCodePoint.NUMBER_SIGN),j=B-L;if(j>6||B+1C.map(R=>{const{nodePoints:O,firstNonWhitespaceIndex:I,endIndex:N}=R.line;let[L,B]=calcTrimBoundaryOfCodePoints(O,I+R.depth,N),j=0;for(let X=B-1;X>=L&&O[X].codePoint===AsciiCodePoint.NUMBER_SIGN;--X)j+=1;if(j>0){let X=0,J=B-1-j;for(;J>=L;--J){const oe=O[J].codePoint;if(!isWhitespaceCharacter(oe))break;X+=1}(X>0||J=R)return null;const I=O;let N=S[O].codePoint;if(!isAsciiLetter(N)&&N!==AsciiCodePoint.UNDERSCORE&&N!==AsciiCodePoint.COLON)return null;for(O=I+1;OF&&(B.value={startIndex:F,endIndex:V});break}}if(B.value!=null)return{attribute:B,nextIndex:O}}return{attribute:B,nextIndex:L}}function eatHTMLTagName(S,C,R){if(C>=R||!isAsciiLetter(S[C].codePoint))return null;let O=C;for(;O=R)return R;const I=S[C].codePoint;return isWhitespaceCharacter(I)||I===AsciiCodePoint.CLOSE_ANGLE?C+1:null}function eatEndCondition1(S,C,R){for(let O=C;O=R||S[N].codePoint!==AsciiCodePoint.CLOSE_ANGLE){O+=1;continue}const B=calcStringFromNodePoints(S,I,N,!0).toLowerCase();if(includedTags$1.includes(B))return N}return null}function eatStartCondition2(S,C,R){const O=C;return O+2=R)return R;const I=S[C].codePoint;return isWhitespaceCharacter(I)||I===AsciiCodePoint.CLOSE_ANGLE?C+1:I===AsciiCodePoint.SLASH&&C+1=R)return null;let N=C;if(I){for(;N=R)return null;S[N].codePoint===AsciiCodePoint.SLASH&&(N+=1)}else N=eatOptionalWhitespaces(S,C,R);if(N>=R||S[N].codePoint!==AsciiCodePoint.CLOSE_ANGLE)return null;for(N+=1;N=4)return null;const{nodePoints:L,startIndex:B,endIndex:j,firstNonWhitespaceIndex:F}=N;if(F>=j||L[F].codePoint!==AsciiCodePoint.OPEN_ANGLE)return null;const V=F+1,K=O(L,V,j);if(K==null)return null;const{condition:W}=K;let X=!1;W!==6&&W!==7&&I(L,K.nextIndex,j,W)!=null&&(X=!0);const J=j;return{token:{nodeType:HtmlType,position:{start:calcStartPoint(L,B),end:calcEndPoint(L,J-1)},condition:W,lines:[N]},nextIndex:J,saturated:X}}function C(N,L){const B=S(N);if(B==null||B.token.condition===7)return null;const{token:j,nextIndex:F}=B;return{token:j,nextIndex:F,remainingSibling:L}}function R(N,L){const{nodePoints:B,endIndex:j,firstNonWhitespaceIndex:F}=N,V=I(B,F,j,L.condition);return V===-1?{status:"notMatched"}:(L.lines.push(N),V!=null?{status:"closing",nextIndex:j}:{status:"opening",nextIndex:j})}function O(N,L,B){let j=null;if(L>=B)return null;if(j=eatStartCondition2(N,L,B),j!=null)return{nextIndex:j,condition:2};if(j=eatStartCondition3(N,L,B),j!=null)return{nextIndex:j,condition:3};if(j=eatStartCondition4(N,L,B),j!=null)return{nextIndex:j,condition:4};if(j=eatStartCondition5(N,L,B),j!=null)return{nextIndex:j,condition:5};if(N[L].codePoint!==AsciiCodePoint.SLASH){const J=L,oe=eatHTMLTagName(N,J,B);if(oe==null)return null;const pe={startIndex:J,endIndex:oe},xe=calcStringFromNodePoints(N,pe.startIndex,pe.endIndex).toLowerCase();return j=eatStartCondition1(N,pe.endIndex,B,xe),j!=null?{nextIndex:j,condition:1}:(j=eatStartCondition6(N,pe.endIndex,B,xe),j!=null?{nextIndex:j,condition:6}:(j=eatStartCondition7(N,pe.endIndex,B,xe,!0),j!=null?{nextIndex:j,condition:7}:null))}const F=L+1,V=eatHTMLTagName(N,F,B);if(V==null)return null;const K={startIndex:F,endIndex:V},X=calcStringFromNodePoints(N,K.startIndex,K.endIndex).toLowerCase();return j=eatStartCondition6(N,K.endIndex,B,X),j!=null?{nextIndex:j,condition:6}:(j=eatStartCondition7(N,K.endIndex,B,X,!1),j!=null?{nextIndex:j,condition:7}:null)}function I(N,L,B,j){switch(j){case 1:return eatEndCondition1(N,L,B)==null?null:B;case 2:return eatEndCondition2(N,L,B)==null?null:B;case 3:return eatEndCondition3(N,L,B)==null?null:B;case 4:return eatEndCondition4(N,L,B)==null?null:B;case 5:return eatEndCondition5(N,L,B)==null?null:B;case 6:case 7:return eatOptionalWhitespaces(N,L,B)>=B?-1:null}}},parse$d=function(S){return{parse:C=>C.map(R=>{const O=mergeContentLinesFaithfully(R.lines);return S.shouldReservePosition?{type:"html",position:R.position,value:calcStringFromNodePoints(O)}:{type:"html",value:calcStringFromNodePoints(O)}})}},uniqueName$c="@yozora/tokenizer-html-block";class HtmlBlockTokenizer extends BaseBlockTokenizer{constructor(R={}){super({name:R.name??uniqueName$c,priority:R.priority??TokenizerPriority.ATOMIC});Cn(this,"match",match$f);Cn(this,"parse",parse$d)}}function eatHtmlInlineCDataDelimiter(S,C,R){let O=C;if(O+11>=R||S[O+1].codePoint!==AsciiCodePoint.EXCLAMATION_MARK||S[O+2].codePoint!==AsciiCodePoint.OPEN_BRACKET||S[O+3].codePoint!==AsciiCodePoint.UPPERCASE_C||S[O+4].codePoint!==AsciiCodePoint.UPPERCASE_D||S[O+5].codePoint!==AsciiCodePoint.UPPERCASE_A||S[O+6].codePoint!==AsciiCodePoint.UPPERCASE_T||S[O+7].codePoint!==AsciiCodePoint.UPPERCASE_A||S[O+8].codePoint!==AsciiCodePoint.OPEN_BRACKET)return null;const I=O+9;for(O=I;O=R)return null;if(S[O+1].codePoint===AsciiCodePoint.CLOSE_BRACKET&&S[O+2].codePoint===AsciiCodePoint.CLOSE_ANGLE)return{type:"full",startIndex:C,endIndex:O+3,htmlType:"cdata"}}return null}function eatHtmlInlineClosingDelimiter(S,C,R){let O=C;if(O+3>=R||S[O+1].codePoint!==AsciiCodePoint.SLASH)return null;const I=O+2,N=eatHTMLTagName(S,I,R);return N==null||(O=eatOptionalWhitespaces(S,N,R),O>=R||S[O].codePoint!==AsciiCodePoint.CLOSE_ANGLE)?null:{type:"full",startIndex:C,endIndex:O+1,htmlType:"closing",tagName:{startIndex:I,endIndex:N}}}function eatHtmlInlineCommentDelimiter(S,C,R){let O=C;if(O+6>=R||S[O+1].codePoint!==AsciiCodePoint.EXCLAMATION_MARK||S[O+2].codePoint!==AsciiCodePoint.MINUS_SIGN||S[O+3].codePoint!==AsciiCodePoint.MINUS_SIGN||S[O+4].codePoint===AsciiCodePoint.CLOSE_ANGLE||S[O+4].codePoint===AsciiCodePoint.MINUS_SIGN&&S[O+5].codePoint===AsciiCodePoint.CLOSE_ANGLE)return null;const I=O+4;for(O=I;O2||O+2>=R||S[O+2].codePoint!==AsciiCodePoint.CLOSE_ANGLE?null:{type:"full",startIndex:C,endIndex:O+3,htmlType:"comment"}}return null}function eatHtmlInlineDeclarationDelimiter(S,C,R){let O=C;if(O+4>=R||S[O+1].codePoint!==AsciiCodePoint.EXCLAMATION_MARK)return null;const I=O+2;for(O=I;O=R||!isWhitespaceCharacter(S[O].codePoint))return null;const N=O,L=O+1;for(O=L;O=R||S[O+1].codePoint!==AsciiCodePoint.QUESTION_MARK)return null;const I=O+2;for(O=I;O=R)return null;if(S[O+1].codePoint===AsciiCodePoint.CLOSE_ANGLE)return{type:"full",startIndex:C,endIndex:O+2,htmlType:"instruction"}}return null}function eatHtmlInlineTokenOpenDelimiter(S,C,R){let O=C;if(O+2>=R)return null;const I=O+1,N=eatHTMLTagName(S,I,R);if(N==null)return null;const L=[];for(O=N;O=R)return null;let B=!1;return S[O].codePoint===AsciiCodePoint.SLASH&&(O+=1,B=!0),O>=R||S[O].codePoint!==AsciiCodePoint.CLOSE_ANGLE?null:{type:"full",startIndex:C,endIndex:O+1,htmlType:"open",tagName:{startIndex:I,endIndex:N},attributes:L,selfClosed:B}}const match$e=function(S){return{findDelimiter:()=>genFindDelimiter(C),processSingleDelimiter:R};function C(O,I){const N=S.getNodePoints();for(let L=O;L=I));++L)switch(N[L].codePoint){case AsciiCodePoint.BACKSLASH:L+=1;break;case AsciiCodePoint.OPEN_ANGLE:{const j=tryToEatDelimiter(N,L,I);if(j!=null)return j;break}}return null}function R(O){return[{...O,nodeType:HtmlType}]}};function tryToEatDelimiter(S,C,R){let O=null;return O=eatHtmlInlineTokenOpenDelimiter(S,C,R),O!=null||(O=eatHtmlInlineClosingDelimiter(S,C,R),O!=null)||(O=eatHtmlInlineCommentDelimiter(S,C,R),O!=null)||(O=eatHtmlInlineInstructionDelimiter(S,C,R),O!=null)||(O=eatHtmlInlineDeclarationDelimiter(S,C,R),O!=null)||(O=eatHtmlInlineCDataDelimiter(S,C,R)),O}const parse$c=function(S){return{parse:C=>C.map(R=>{const{startIndex:O,endIndex:I}=R,N=S.getNodePoints(),L=calcStringFromNodePoints(N,O,I);return S.shouldReservePosition?{type:HtmlType,position:S.calcPosition(R),value:L}:{type:HtmlType,value:L}})}},uniqueName$b="@yozora/tokenizer-html-inline";class HtmlInlineTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$b,priority:R.priority??TokenizerPriority.ATOMIC});Cn(this,"match",match$e);Cn(this,"parse",parse$c)}}const checkBalancedBracketsStatus=(S,C,R,O)=>{let I=S,N=0;const L=()=>{switch(O[I].codePoint){case AsciiCodePoint.BACKSLASH:I+=1;break;case AsciiCodePoint.OPEN_BRACKET:N+=1;break;case AsciiCodePoint.CLOSE_BRACKET:N-=1;break}};for(const B of R)if(!(B.startIndexC)break;for(;I0?1:0};function eatLinkDestination(S,C,R){if(C>=R)return-1;let O=C;switch(S[O].codePoint){case AsciiCodePoint.OPEN_ANGLE:{for(O+=1;O=R)return-1;let O=C;const I=S[O].codePoint;switch(I){case AsciiCodePoint.DOUBLE_QUOTE:case AsciiCodePoint.SINGLE_QUOTE:{for(O+=1;ON.line+1)return-1;break}}}break}case AsciiCodePoint.OPEN_PARENTHESIS:{let N=1;for(O+=1;OL.line+1)return-1;break}case AsciiCodePoint.OPEN_PARENTHESIS:N+=1;break;case AsciiCodePoint.CLOSE_PARENTHESIS:if(N-=1,N===0)return O+1;break}}break}case AsciiCodePoint.CLOSE_PARENTHESIS:return O;default:return-1}return-1}const match$d=function(S){return{findDelimiter:()=>genFindDelimiter(C),isDelimiterPair:R,processDelimiterPair:O};function C(I,N){const L=S.getNodePoints(),B=S.getBlockEndIndex();for(let j=I;j=N||L[j+1].codePoint!==AsciiCodePoint.OPEN_PARENTHESIS)break;const V=eatOptionalWhitespaces(L,j+2,B),K=eatLinkDestination(L,V,B);if(K<0)break;const W=eatOptionalWhitespaces(L,K,B),X=eatLinkTitle(L,W,B);if(X<0)break;const J=j,oe=eatOptionalWhitespaces(L,X,B)+1;if(oe>B||L[oe-1].codePoint!==AsciiCodePoint.CLOSE_PARENTHESIS)break;return{type:"closer",startIndex:J,endIndex:oe,destinationContent:VC.map(R=>{const O=S.getNodePoints();let I="";if(R.destinationContent!=null){let{startIndex:j,endIndex:F}=R.destinationContent;O[j].codePoint===AsciiCodePoint.OPEN_ANGLE&&(j+=1,F-=1);const V=calcEscapedStringFromNodePoints(O,j,F,!0);I=S.formatUrl(V)}let N;if(R.titleContent!=null){const{startIndex:j,endIndex:F}=R.titleContent;N=calcEscapedStringFromNodePoints(O,j+1,F-1)}const L=S.parseInlineTokens(R.children);return S.shouldReservePosition?{type:LinkType,position:S.calcPosition(R),url:I,title:N,children:L}:{type:LinkType,url:I,title:N,children:L}})}},uniqueName$a="@yozora/tokenizer-link";class LinkTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$a,priority:R.priority??TokenizerPriority.LINKS});Cn(this,"match",match$d);Cn(this,"parse",parse$b)}}function calcImageAlt(S){return S.map(C=>C.value!=null?C.value:C.alt!=null?C.alt:C.children!=null?calcImageAlt(C.children):"").join("")}const match$c=function(S){return{findDelimiter:()=>genFindDelimiter(C),isDelimiterPair:R,processDelimiterPair:O};function C(I,N){const L=S.getNodePoints(),B=S.getBlockEndIndex();for(let j=I;j=N||L[j+1].codePoint!==AsciiCodePoint.OPEN_PARENTHESIS)break;const V=eatOptionalWhitespaces(L,j+2,B),K=eatLinkDestination(L,V,B);if(K<0)break;const W=eatOptionalWhitespaces(L,K,B),X=eatLinkTitle(L,W,B);if(X<0)break;const J=j,oe=eatOptionalWhitespaces(L,X,B)+1;if(oe>B||L[oe-1].codePoint!==AsciiCodePoint.CLOSE_PARENTHESIS)break;return{type:"closer",startIndex:J,endIndex:oe,destinationContent:VC.map(R=>{const O=S.getNodePoints();let I="";if(R.destinationContent!=null){let{startIndex:F,endIndex:V}=R.destinationContent;O[F].codePoint===AsciiCodePoint.OPEN_ANGLE&&(F+=1,V-=1);const K=calcEscapedStringFromNodePoints(O,F,V,!0);I=S.formatUrl(K)}const N=S.parseInlineTokens(R.children),L=calcImageAlt(N);let B;if(R.titleContent!=null){const{startIndex:F,endIndex:V}=R.titleContent;B=calcEscapedStringFromNodePoints(O,F+1,V-1)}return S.shouldReservePosition?{type:ImageType$1,position:S.calcPosition(R),url:I,alt:L,title:B}:{type:ImageType$1,url:I,alt:L,title:B}})}},uniqueName$9="@yozora/tokenizer-image";class ImageTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$9,priority:R.priority??TokenizerPriority.LINKS});Cn(this,"match",match$c);Cn(this,"parse",parse$a)}}const match$b=function(S){return{findDelimiter:()=>genFindDelimiter(C),isDelimiterPair:R,processDelimiterPair:O};function C(I,N){const L=S.getNodePoints();for(let B=I;B=N||L[B+1].codePoint!==AsciiCodePoint.OPEN_BRACKET)break;return{type:"opener",startIndex:B,endIndex:B+2,brackets:[]}}case AsciiCodePoint.CLOSE_BRACKET:{const F={type:"closer",startIndex:B,endIndex:B+1,brackets:[]};if(B+1>=N||L[B+1].codePoint!==AsciiCodePoint.OPEN_BRACKET)return F;const V=eatLinkLabel(L,B+1,N);return V.nextIndex<0?F:V.labelAndIdentifier==null?{type:"closer",startIndex:B,endIndex:V.nextIndex,brackets:[{startIndex:B+1,endIndex:V.nextIndex}]}:{type:"closer",startIndex:B,endIndex:V.nextIndex,brackets:[{startIndex:B+1,endIndex:V.nextIndex,label:V.labelAndIdentifier.label,identifier:V.labelAndIdentifier.identifier}]}}}return null}function R(I,N,L){const B=S.getNodePoints();switch(checkBalancedBracketsStatus(I.endIndex,N.startIndex,L,B)){case-1:return{paired:!1,opener:!1,closer:!0};case 0:return{paired:!0};case 1:return{paired:!1,opener:!0,closer:!1}}}function O(I,N,L){const B=S.getNodePoints(),j=N.brackets[0];if(j!=null&&j.identifier!=null)return S.hasDefinition(j.identifier)?{tokens:[{nodeType:ImageReferenceType,startIndex:I.startIndex,endIndex:j.endIndex,referenceType:"full",label:j.label,identifier:j.identifier,children:S.resolveInternalTokens(L,I.endIndex,N.startIndex)}]}:{tokens:L};const{nextIndex:F,labelAndIdentifier:V}=eatLinkLabel(B,I.endIndex-1,N.startIndex+1);return F===N.startIndex+1&&V!=null&&S.hasDefinition(V.identifier)?{tokens:[{nodeType:ImageReferenceType,startIndex:I.startIndex,endIndex:N.endIndex,referenceType:j==null?"shortcut":"collapsed",label:V.label,identifier:V.identifier,children:S.resolveInternalTokens(L,I.endIndex,N.startIndex)}]}:{tokens:L}}},parse$9=function(S){return{parse:C=>C.map(R=>{const{identifier:O,label:I,referenceType:N}=R,L=S.parseInlineTokens(R.children),B=calcImageAlt(L);return S.shouldReservePosition?{type:ImageReferenceType,position:S.calcPosition(R),identifier:O,label:I,referenceType:N,alt:B}:{type:ImageReferenceType,identifier:O,label:I,referenceType:N,alt:B}})}},uniqueName$8="@yozora/tokenizer-image-reference";class ImageReferenceTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$8,priority:R.priority??TokenizerPriority.LINKS});Cn(this,"match",match$b);Cn(this,"parse",parse$9)}}const match$a=function(){return{isContainingBlock:!1,eatOpener:S,eatContinuationText:C};function S(R){if(R.countOfPrecedeSpaces<4)return null;const{nodePoints:O,startIndex:I,firstNonWhitespaceIndex:N,endIndex:L}=R;let B=I+4;if(O[I].codePoint===AsciiCodePoint.SPACE&&O[I+3].codePoint===VirtualCodePoint.SPACE){let V=I+1;for(;VC.map(R=>{const{lines:O}=R;let I=0,N=O.length;for(;IV+1&&L.push({type:"opener",startIndex:V+1,endIndex:W}),V=W-1}break}case AsciiCodePoint.BACKTICK:{const W=V,X=eatOptionalCharacters(O,V+1,N,K);L.push({type:"both",startIndex:W,endIndex:X}),V=X-1;break}}}let B=0,j=-1,F=null;for(;B=V))continue;j=K;let W=null,X=null;for(;B=V&&oe.type!=="closer")break}if(B+1>=L.length)return;W=L[B];const J=W.endIndex-W.startIndex;for(let oe=B+1;oeC.map(R=>{const O=S.getNodePoints();let I=R.startIndex+R.thickness,N=R.endIndex-R.thickness,L=!0;for(let F=I;FgenFindDelimiter(C),isDelimiterPair:R,processDelimiterPair:O,processSingleDelimiter:I};function C(N,L){const B=S.getNodePoints();for(let j=N;j=L||B[j+1].codePoint!==AsciiCodePoint.OPEN_BRACKET)break;const V=eatLinkLabel(B,j+1,L);if(V.nextIndex===-1)return{type:"opener",startIndex:j+1,endIndex:j+2,brackets:[]};if(V.labelAndIdentifier==null){j=V.nextIndex-1;break}const K=[{startIndex:j+1,endIndex:V.nextIndex,label:V.labelAndIdentifier.label,identifier:V.labelAndIdentifier.identifier}],W={type:"closer",startIndex:j,endIndex:V.nextIndex,brackets:K};for(j=V.nextIndex;j=B.length)break;if(F+1C.map(R=>{const{identifier:O,label:I,referenceType:N}=R,L=S.parseInlineTokens(R.children);return S.shouldReservePosition?{type:LinkReferenceType,position:S.calcPosition(R),identifier:O,label:I,referenceType:N,children:L}:{type:LinkReferenceType,identifier:O,label:I,referenceType:N,children:L}})}},uniqueName$5="@yozora/tokenizer-link-reference";class LinkReferenceTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$5,priority:R.priority??TokenizerPriority.LINKS});Cn(this,"match",match$8);Cn(this,"parse",parse$6)}}const match$7=function(){const{emptyItemCouldNotInterruptedTypes:S,enableTaskListItem:C}=this;return{isContainingBlock:!0,eatOpener:R,eatAndInterruptPreviousSibling:O,eatContinuationText:I};function R(N){if(N.countOfPrecedeSpaces>=4)return null;const{nodePoints:L,startIndex:B,endIndex:j,firstNonWhitespaceIndex:F}=N;if(F>=j)return null;let V=!1,K=null,W,X,J=F,oe=L[J].codePoint;if(J+1F&&J-F<=9&&(oe===AsciiCodePoint.DOT||oe===AsciiCodePoint.CLOSE_PARENTHESIS)&&(J+=1,V=!0,K=oe)}if(V||(oe===AsciiCodePoint.PLUS_SIGN||oe===AsciiCodePoint.MINUS_SIGN||oe===AsciiCodePoint.ASTERISK)&&(J+=1,K=oe),K==null)return null;let pe=0,me=J;for(me4&&(me-=pe-1,pe=1),pe===0&&me=j){if(L.countOfTopBlankLine>=0&&(L.countOfTopBlankLine+=1,L.countOfTopBlankLine>1))return{status:"notMatched"}}else L.countOfTopBlankLine=-1;return{status:"opening",nextIndex:Math.min(B+L.indent,j-1)}}};function eatTaskStatus(S,C,R){let O=C;for(;O=R||S[O].codePoint!==AsciiCodePoint.OPEN_BRACKET||S[O+2].codePoint!==AsciiCodePoint.CLOSE_BRACKET||!isWhitespaceCharacter(S[O+3].codePoint))return{status:null,nextIndex:C};let I;switch(S[O+1].codePoint){case AsciiCodePoint.SPACE:I=TaskStatus.TODO;break;case AsciiCodePoint.MINUS_SIGN:I=TaskStatus.DOING;break;case AsciiCodePoint.LOWERCASE_X:case AsciiCodePoint.UPPERCASE_X:I=TaskStatus.DONE;break;default:return{status:null,nextIndex:C}}return{status:I,nextIndex:O+4}}const parse$5=function(S){return{parse:C=>{const R=[];let O=[];for(let N=0;N{if(S.length<=0)return null;let R=S.some(N=>{if(N.children==null||N.children.length<=1)return!1;let L=N.children[0].position;for(let B=1;B1){let N=S[0];for(let L=1;L{const L=C.parseBlockTokens(N.children),B=R?L:L.map(F=>F.type===ParagraphType$1?F.children:F).flat();return C.shouldReservePosition?{type:ListItemType,position:N.position,status:N.status,children:B}:{type:ListItemType,status:N.status,children:B}});return C.shouldReservePosition?{type:ListType,position:{start:{...S[0].position.start},end:{...S[S.length-1].position.end}},ordered:S[0].ordered,orderType:S[0].orderType,start:S[0].order,marker:S[0].marker,spread:R,children:O}:{type:ListType,ordered:S[0].ordered,orderType:S[0].orderType,start:S[0].order,marker:S[0].marker,spread:R,children:O}},uniqueName$4="@yozora/tokenizer-list";class ListTokenizer extends BaseBlockTokenizer{constructor(R={}){super({name:R.name??uniqueName$4,priority:R.priority??TokenizerPriority.CONTAINING_BLOCK});Cn(this,"enableTaskListItem");Cn(this,"emptyItemCouldNotInterruptedTypes");Cn(this,"match",match$7);Cn(this,"parse",parse$5);this.enableTaskListItem=R.enableTaskListItem??!1,this.emptyItemCouldNotInterruptedTypes=R.emptyItemCouldNotInterruptedTypes??[ParagraphType$1]}}const match$6=function(){return{isContainingBlock:!1,eatOpener:S,eatContinuationText:C,eatLazyContinuationText:R};function S(O){const{endIndex:I,firstNonWhitespaceIndex:N}=O;if(N>=I)return null;const L=[O],B=calcPositionFromPhrasingContentLines(L);return{token:{nodeType:ParagraphType$1,position:B,lines:L},nextIndex:I}}function C(O,I){const{endIndex:N,firstNonWhitespaceIndex:L}=O;return L>=N?{status:"notMatched"}:(I.lines.push(O),{status:"opening",nextIndex:N})}function R(O,I){return C(O,I)}},parse$4=function(S){return{parse:C=>{const R=[];for(const O of C){const I=mergeAndStripContentLines(O.lines),N=S.processInlines(I);if(N.length<=0)continue;const L=S.shouldReservePosition?{type:ParagraphType$1,position:O.position,children:N}:{type:ParagraphType$1,children:N};R.push(L)}return R}}},uniqueName$3="@yozora/tokenizer-paragraph";class ParagraphTokenizer extends BaseBlockTokenizer{constructor(R={}){super({name:R.name??uniqueName$3,priority:R.priority??TokenizerPriority.FALLBACK});Cn(this,"match",match$6);Cn(this,"parse",parse$4)}extractPhrasingContentLines(R){return R.lines}buildBlockToken(R){const O=trimBlankLines(R);if(O.length<=0)return null;const I=calcPositionFromPhrasingContentLines(O);return{nodeType:ParagraphType$1,lines:O,position:I}}}const match$5=function(S){return{isContainingBlock:!1,eatOpener:C,eatAndInterruptPreviousSibling:R};function C(){return null}function R(O,I){const{nodePoints:N,endIndex:L,firstNonWhitespaceIndex:B,countOfPrecedeSpaces:j}=O;if(j>=4||B>=L)return null;let F=null,V=!1;for(let J=B;JC.map(R=>{let O=1;switch(R.marker){case AsciiCodePoint.EQUALS_SIGN:O=1;break;case AsciiCodePoint.MINUS_SIGN:O=2;break}const I=mergeAndStripContentLines(R.lines),N=S.processInlines(I);return S.shouldReservePosition?{type:HeadingType,position:R.position,depth:O,children:N}:{type:HeadingType,depth:O,children:N}})}},uniqueName$2="@yozora/tokenizer-setext-heading";class SetextHeadingTokenizer extends BaseBlockTokenizer{constructor(R={}){super({name:R.name??uniqueName$2,priority:R.priority??TokenizerPriority.ATOMIC});Cn(this,"match",match$5);Cn(this,"parse",parse$3)}}const match$4=function(){return{findDelimiter:()=>genFindDelimiter((S,C)=>({type:"full",startIndex:S,endIndex:C})),processSingleDelimiter:S=>[{nodeType:TextType$1,startIndex:S.startIndex,endIndex:S.endIndex}]}},parse$2=function(S){return{parse:C=>C.map(R=>{const O=S.getNodePoints();let I=calcEscapedStringFromNodePoints(O,R.startIndex,R.endIndex);return I=stripSpaces(I),S.shouldReservePosition?{type:TextType$1,position:S.calcPosition(R),value:I}:{type:TextType$1,value:I}})}},_stripRegex=/[^\S\n]*\n[^\S\n]*/g,stripSpaces=S=>S.replace(_stripRegex,` -`),uniqueName$1="@yozora/tokenizer-text";class TextTokenizer extends BaseInlineTokenizer{constructor(R={}){super({name:R.name??uniqueName$1,priority:R.priority??TokenizerPriority.FALLBACK});Cn(this,"match",match$4);Cn(this,"parse",parse$2)}findAndHandleDelimiter(R,O){return{nodeType:TextType$1,startIndex:R,endIndex:O}}}const match$3=function(){return{isContainingBlock:!1,eatOpener:S,eatAndInterruptPreviousSibling:C};function S(R){if(R.countOfPrecedeSpaces>=4)return null;const{nodePoints:O,startIndex:I,endIndex:N,firstNonWhitespaceIndex:L}=R;if(L+2>=N)return null;let B,j=0,F=!0,V=!1;for(let W=L;WC.map(R=>S.shouldReservePosition?{type:ThematicBreakType,position:R.position}:{type:ThematicBreakType})}},uniqueName="@yozora/tokenizer-thematic-break";class ThematicBreakTokenizer extends BaseBlockTokenizer{constructor(R={}){super({name:R.name??uniqueName,priority:R.priority??TokenizerPriority.ATOMIC});Cn(this,"match",match$3);Cn(this,"parse",parse$1)}}class GfmParser extends DefaultParser{constructor(C={}){super({...C,blockFallbackTokenizer:C.blockFallbackTokenizer??new ParagraphTokenizer,inlineFallbackTokenizer:C.inlineFallbackTokenizer??new TextTokenizer}),this.useTokenizer(new IndentedCodeTokenizer).useTokenizer(new HtmlBlockTokenizer).useTokenizer(new SetextHeadingTokenizer).useTokenizer(new ThematicBreakTokenizer).useTokenizer(new BlockquoteTokenizer).useTokenizer(new ListTokenizer({enableTaskListItem:!1})).useTokenizer(new HeadingTokenizer).useTokenizer(new FencedCodeTokenizer).useTokenizer(new DefinitionTokenizer).useTokenizer(new HtmlInlineTokenizer).useTokenizer(new InlineCodeTokenizer).useTokenizer(new AutolinkTokenizer).useTokenizer(new BreakTokenizer).useTokenizer(new ImageTokenizer).useTokenizer(new ImageReferenceTokenizer).useTokenizer(new LinkTokenizer).useTokenizer(new LinkReferenceTokenizer).useTokenizer(new EmphasisTokenizer)}}const parser=new GfmParser({defaultParseOptions:{shouldReservePosition:!1}});class BlockquoteRenderer extends React.Component{shouldComponentUpdate(C){return this.props.children!==C.children}render(){const C=this.props.children;return jsxRuntimeExports.jsx("blockquote",{className:cls$b,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:C})})}}const cls$b=mergeStyles$1(astClasses.blockquote,{boxSizing:"border-box",padding:"0.625em 1em",borderLeft:"0.25em solid var(--colorBorderBlockquote)",margin:"0px 0px 1.25em 0px",background:"var(--colorBgBlockquote)",boxShadow:"0 1px 2px 0 hsla(0deg, 0%, 0%, 0.1)","> :last-child":{marginBottom:0}});class BreakRenderer extends React.Component{shouldComponentUpdate(){return!1}render(){return jsxRuntimeExports.jsx("br",{className:cls$a})}}const cls$a=mergeStyles$1(astClasses.break,{boxSizing:"border-box"});var prism={exports:{}};(function(S){var C=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @namespace - * @public - */var R=function(O){var I=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,N=0,L={},B={manual:O.Prism&&O.Prism.manual,disableWorkerMessageHandler:O.Prism&&O.Prism.disableWorkerMessageHandler,util:{encode:function xe(Ae){return Ae instanceof j?new j(Ae.type,xe(Ae.content),Ae.alias):Array.isArray(Ae)?Ae.map(xe):Ae.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(Te){var xe=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(Te.stack)||[])[1];if(xe){var Ae=document.getElementsByTagName("script");for(var ge in Ae)if(Ae[ge].src==xe)return Ae[ge]}return null}},isActive:function(xe,Ae,ge){for(var Te="no-"+Ae;xe;){var we=xe.classList;if(we.contains(Ae))return!0;if(we.contains(Te))return!1;xe=xe.parentElement}return!!ge}},languages:{plain:L,plaintext:L,text:L,txt:L,extend:function(xe,Ae){var ge=B.util.clone(B.languages[xe]);for(var Te in Ae)ge[Te]=Ae[Te];return ge},insertBefore:function(xe,Ae,ge,Te){Te=Te||B.languages;var we=Te[xe],ke={};for(var Be in we)if(we.hasOwnProperty(Be)){if(Be==Ae)for(var Ie in ge)ge.hasOwnProperty(Ie)&&(ke[Ie]=ge[Ie]);ge.hasOwnProperty(Be)||(ke[Be]=we[Be])}var je=Te[xe];return Te[xe]=ke,B.languages.DFS(B.languages,function(Ke,Je){Je===je&&Ke!=xe&&(this[Ke]=ke)}),ke},DFS:function xe(Ae,ge,Te,we){we=we||{};var ke=B.util.objId;for(var Be in Ae)if(Ae.hasOwnProperty(Be)){ge.call(Ae,Be,Ae[Be],Te||Be);var Ie=Ae[Be],je=B.util.type(Ie);je==="Object"&&!we[ke(Ie)]?(we[ke(Ie)]=!0,xe(Ie,ge,null,we)):je==="Array"&&!we[ke(Ie)]&&(we[ke(Ie)]=!0,xe(Ie,ge,Be,we))}}},plugins:{},highlightAll:function(xe,Ae){B.highlightAllUnder(document,xe,Ae)},highlightAllUnder:function(xe,Ae,ge){var Te={callback:ge,container:xe,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};B.hooks.run("before-highlightall",Te),Te.elements=Array.prototype.slice.apply(Te.container.querySelectorAll(Te.selector)),B.hooks.run("before-all-elements-highlight",Te);for(var we=0,ke;ke=Te.elements[we++];)B.highlightElement(ke,Ae===!0,Te.callback)},highlightElement:function(xe,Ae,ge){var Te=B.util.getLanguage(xe),we=B.languages[Te];B.util.setLanguage(xe,Te);var ke=xe.parentElement;ke&&ke.nodeName.toLowerCase()==="pre"&&B.util.setLanguage(ke,Te);var Be=xe.textContent,Ie={element:xe,language:Te,grammar:we,code:Be};function je(Je){Ie.highlightedCode=Je,B.hooks.run("before-insert",Ie),Ie.element.innerHTML=Ie.highlightedCode,B.hooks.run("after-highlight",Ie),B.hooks.run("complete",Ie),ge&&ge.call(Ie.element)}if(B.hooks.run("before-sanity-check",Ie),ke=Ie.element.parentElement,ke&&ke.nodeName.toLowerCase()==="pre"&&!ke.hasAttribute("tabindex")&&ke.setAttribute("tabindex","0"),!Ie.code){B.hooks.run("complete",Ie),ge&&ge.call(Ie.element);return}if(B.hooks.run("before-highlight",Ie),!Ie.grammar){je(B.util.encode(Ie.code));return}if(Ae&&O.Worker){var Ke=new Worker(B.filename);Ke.onmessage=function(Je){je(Je.data)},Ke.postMessage(JSON.stringify({language:Ie.language,code:Ie.code,immediateClose:!0}))}else je(B.highlight(Ie.code,Ie.grammar,Ie.language))},highlight:function(xe,Ae,ge){var Te={code:xe,grammar:Ae,language:ge};if(B.hooks.run("before-tokenize",Te),!Te.grammar)throw new Error('The language "'+Te.language+'" has no grammar.');return Te.tokens=B.tokenize(Te.code,Te.grammar),B.hooks.run("after-tokenize",Te),j.stringify(B.util.encode(Te.tokens),Te.language)},tokenize:function(xe,Ae){var ge=Ae.rest;if(ge){for(var Te in ge)Ae[Te]=ge[Te];delete Ae.rest}var we=new K;return W(we,we.head,xe),V(xe,we,Ae,we.head,0),J(we)},hooks:{all:{},add:function(xe,Ae){var ge=B.hooks.all;ge[xe]=ge[xe]||[],ge[xe].push(Ae)},run:function(xe,Ae){var ge=B.hooks.all[xe];if(!(!ge||!ge.length))for(var Te=0,we;we=ge[Te++];)we(Ae)}},Token:j};O.Prism=B;function j(xe,Ae,ge,Te){this.type=xe,this.content=Ae,this.alias=ge,this.length=(Te||"").length|0}j.stringify=function xe(Ae,ge){if(typeof Ae=="string")return Ae;if(Array.isArray(Ae)){var Te="";return Ae.forEach(function(je){Te+=xe(je,ge)}),Te}var we={type:Ae.type,content:xe(Ae.content,ge),tag:"span",classes:["token",Ae.type],attributes:{},language:ge},ke=Ae.alias;ke&&(Array.isArray(ke)?Array.prototype.push.apply(we.classes,ke):we.classes.push(ke)),B.hooks.run("wrap",we);var Be="";for(var Ie in we.attributes)Be+=" "+Ie+'="'+(we.attributes[Ie]||"").replace(/"/g,""")+'"';return"<"+we.tag+' class="'+we.classes.join(" ")+'"'+Be+">"+we.content+""};function F(xe,Ae,ge,Te){xe.lastIndex=Ae;var we=xe.exec(ge);if(we&&Te&&we[1]){var ke=we[1].length;we.index+=ke,we[0]=we[0].slice(ke)}return we}function V(xe,Ae,ge,Te,we,ke){for(var Be in ge)if(!(!ge.hasOwnProperty(Be)||!ge[Be])){var Ie=ge[Be];Ie=Array.isArray(Ie)?Ie:[Ie];for(var je=0;je=ke.reach);gt+=dt.value.length,dt=dt.next){var Qe=dt.value;if(Ae.length>xe.length)return;if(!(Qe instanceof j)){var lt=1,ht;if(ot){if(ht=F(et,gt,xe,Xe),!ht||ht.index>=xe.length)break;var Gt=ht.index,Ct=ht.index+ht[0].length,$t=gt;for($t+=dt.value.length;Gt>=$t;)dt=dt.next,$t+=dt.value.length;if($t-=dt.value.length,gt=$t,dt.value instanceof j)continue;for(var Lt=dt;Lt!==Ae.tail&&($tke.reach&&(ke.reach=It);var Ht=dt.prev;Vt&&(Ht=W(Ae,Ht,Vt),gt+=Vt.length),X(Ae,Ht,lt);var kt=new j(Be,Je?B.tokenize(Pt,Je):Pt,tt,Pt);if(dt=W(Ae,Ht,kt),bt&&W(Ae,dt,bt),lt>1){var Kt={cause:Be+","+je,reach:It};V(xe,Ae,ge,dt.prev,gt,Kt),ke&&Kt.reach>ke.reach&&(ke.reach=Kt.reach)}}}}}}function K(){var xe={value:null,prev:null,next:null},Ae={value:null,prev:xe,next:null};xe.next=Ae,this.head=xe,this.tail=Ae,this.length=0}function W(xe,Ae,ge){var Te=Ae.next,we={value:ge,prev:Ae,next:Te};return Ae.next=we,Te.prev=we,xe.length++,we}function X(xe,Ae,ge){for(var Te=Ae.next,we=0;we/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},R.languages.markup.tag.inside["attr-value"].inside.entity=R.languages.markup.entity,R.languages.markup.doctype.inside["internal-subset"].inside=R.languages.markup,R.hooks.add("wrap",function(O){O.type==="entity"&&(O.attributes.title=O.content.replace(/&/,"&"))}),Object.defineProperty(R.languages.markup.tag,"addInlined",{value:function(I,N){var L={};L["language-"+N]={pattern:/(^$)/i,lookbehind:!0,inside:R.languages[N]},L.cdata=/^$/i;var B={"included-cdata":{pattern://i,inside:L}};B["language-"+N]={pattern:/[\s\S]+/,inside:R.languages[N]};var j={};j[I]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return I}),"i"),lookbehind:!0,greedy:!0,inside:B},R.languages.insertBefore("markup","cdata",j)}}),Object.defineProperty(R.languages.markup.tag,"addAttribute",{value:function(O,I){R.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+O+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[I,"language-"+I],inside:R.languages[I]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),R.languages.html=R.languages.markup,R.languages.mathml=R.languages.markup,R.languages.svg=R.languages.markup,R.languages.xml=R.languages.extend("markup",{}),R.languages.ssml=R.languages.xml,R.languages.atom=R.languages.xml,R.languages.rss=R.languages.xml,function(O){var I=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;O.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+I.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+I.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+I.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+I.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:I,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},O.languages.css.atrule.inside.rest=O.languages.css;var N=O.languages.markup;N&&(N.tag.addInlined("style","css"),N.tag.addAttribute("style","css"))}(R),R.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},R.languages.javascript=R.languages.extend("clike",{"class-name":[R.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),R.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,R.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:R.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:R.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:R.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:R.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:R.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),R.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:R.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),R.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),R.languages.markup&&(R.languages.markup.tag.addInlined("script","javascript"),R.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),R.languages.js=R.languages.javascript,function(){if(typeof R>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var O="Loading…",I=function(oe,pe){return"✖ Error "+oe+" while fetching file: "+pe},N="✖ Error: File does not exist or is empty",L={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},B="data-src-status",j="loading",F="loaded",V="failed",K="pre[data-src]:not(["+B+'="'+F+'"]):not(['+B+'="'+j+'"])';function W(oe,pe,me){var xe=new XMLHttpRequest;xe.open("GET",oe,!0),xe.onreadystatechange=function(){xe.readyState==4&&(xe.status<400&&xe.responseText?pe(xe.responseText):xe.status>=400?me(I(xe.status,xe.statusText)):me(N))},xe.send(null)}function X(oe){var pe=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(oe||"");if(pe){var me=Number(pe[1]),xe=pe[2],Ae=pe[3];return xe?Ae?[me,Number(Ae)]:[me,void 0]:[me,me]}}R.hooks.add("before-highlightall",function(oe){oe.selector+=", "+K}),R.hooks.add("before-sanity-check",function(oe){var pe=oe.element;if(pe.matches(K)){oe.code="",pe.setAttribute(B,j);var me=pe.appendChild(document.createElement("CODE"));me.textContent=O;var xe=pe.getAttribute("data-src"),Ae=oe.language;if(Ae==="none"){var ge=(/\.(\w+)$/.exec(xe)||[,"none"])[1];Ae=L[ge]||ge}R.util.setLanguage(me,Ae),R.util.setLanguage(pe,Ae);var Te=R.plugins.autoloader;Te&&Te.loadLanguages(Ae),W(xe,function(we){pe.setAttribute(B,F);var ke=X(pe.getAttribute("data-range"));if(ke){var Be=we.split(/\r\n?|\n/g),Ie=ke[0],je=ke[1]==null?Be.length:ke[1];Ie<0&&(Ie+=Be.length),Ie=Math.max(0,Math.min(Ie-1,Be.length)),je<0&&(je+=Be.length),je=Math.max(0,Math.min(je,Be.length)),we=Be.slice(Ie,je).join(` -`),pe.hasAttribute("data-start")||pe.setAttribute("data-start",String(Ie+1))}me.textContent=we,R.highlightElement(me)},function(we){pe.setAttribute(B,V),me.textContent=we})}}),R.plugins.fileHighlight={highlight:function(pe){for(var me=(pe||document).querySelectorAll(K),xe=0,Ae;Ae=me[xe++];)R.highlightElement(Ae)}};var J=!1;R.fileHighlight=function(){J||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),J=!0),R.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(prism);var prismExports=prism.exports;const Prism=getDefaultExportFromCjs(prismExports);var define_process_env_default$l={};function sheetForTag(S){if(S.sheet)return S.sheet;for(var C=0;C0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position2||token(character)>3?"":" "}function escaping(S,C){for(;--C&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice$6(S,caret()+(C<6&&peek()==32&&next()==32))}function delimiter(S){for(;next();)switch(character){case S:return position;case 34:case 39:S!==34&&S!==39&&delimiter(character);break;case 40:S===41&&delimiter(S);break;case 92:next();break}return position}function commenter(S,C){for(;next()&&S+character!==57;)if(S+character===84&&peek()===47)break;return"/*"+slice$6(C,position-1)+"*"+from$6(S===47?S:next())}function identifier(S){for(;!token(peek());)next();return slice$6(S,position)}function compile(S){return dealloc(parse("",null,null,null,[""],S=alloc(S),0,[0],S))}function parse(S,C,R,O,I,N,L,B,j){for(var F=0,V=0,K=L,W=0,X=0,J=0,oe=1,pe=1,me=1,xe=0,Ae="",ge=I,Te=N,we=O,ke=Ae;pe;)switch(J=xe,xe=next()){case 40:if(J!=108&&charat(ke,K-1)==58){indexof(ke+=replace$2(delimit(xe),"&","&\f"),"&\f")!=-1&&(me=-1);break}case 34:case 39:case 91:ke+=delimit(xe);break;case 9:case 10:case 13:case 32:ke+=whitespace(J);break;case 92:ke+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append$1(comment(commenter(next(),caret()),C,R),j);break;default:ke+="/"}break;case 123*oe:B[F++]=strlen(ke)*me;case 125*oe:case 59:case 0:switch(xe){case 0:case 125:pe=0;case 59+V:me==-1&&(ke=replace$2(ke,/\f/g,"")),X>0&&strlen(ke)-K&&append$1(X>32?declaration(ke+";",O,R,K-1):declaration(replace$2(ke," ","")+";",O,R,K-2),j);break;case 59:ke+=";";default:if(append$1(we=ruleset(ke,C,R,F,V,I,B,Ae,ge=[],Te=[],K),N),xe===123)if(V===0)parse(ke,C,we,we,ge,N,K,B,Te);else switch(W===99&&charat(ke,3)===110?100:W){case 100:case 108:case 109:case 115:parse(S,we,we,O&&append$1(ruleset(S,we,we,0,0,I,B,Ae,I,ge=[],K),Te),I,Te,K,B,O?ge:Te);break;default:parse(ke,we,we,we,[""],Te,0,B,Te)}}F=V=X=0,oe=me=1,Ae=ke="",K=L;break;case 58:K=1+strlen(ke),X=J;default:if(oe<1){if(xe==123)--oe;else if(xe==125&&oe++==0&&prev()==125)continue}switch(ke+=from$6(xe),xe*oe){case 38:me=V>0?1:(ke+="\f",-1);break;case 44:B[F++]=(strlen(ke)-1)*me,me=1;break;case 64:peek()===45&&(ke+=delimit(next())),W=peek(),V=K=strlen(Ae=ke+=identifier(caret())),xe++;break;case 45:J===45&&strlen(ke)==2&&(oe=0)}}return N}function ruleset(S,C,R,O,I,N,L,B,j,F,V){for(var K=I-1,W=I===0?N:[""],X=sizeof(W),J=0,oe=0,pe=0;J0?W[me]+" "+xe:replace$2(xe,/&\f/g,W[me])))&&(j[pe++]=Ae);return node(S,C,R,I===0?RULESET:B,j,F,V)}function comment(S,C,R){return node(S,C,R,COMMENT,from$6(char()),substr(S,2,-2),0)}function declaration(S,C,R,O){return node(S,C,R,DECLARATION,substr(S,0,O),substr(S,O+1,-1),O)}function serialize(S,C){for(var R="",O=sizeof(S),I=0;I-1},createUnsafeSelectorsAlarm=function S(C){return function(R,O,I){if(!(R.type!=="rule"||C.compat)){var N=R.value.match(/(:first|:nth|:nth-last)-child/g);if(N){for(var L=!!R.parent,B=L?R.parent.children:I,j=B.length-1;j>=0;j--){var F=B[j];if(F.line=0;O--)if(!isImportRule(R[O]))return!0;return!1},nullifyElement=function S(C){C.type="",C.value="",C.return="",C.children="",C.props=""},incorrectImportAlarm=function S(C,R,O){isImportRule(C)&&(C.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),nullifyElement(C)):isPrependedWithRegularRules(R,O)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),nullifyElement(C)))};function prefix$1(S,C){switch(hash(S,C)){case 5103:return WEBKIT+"print-"+S+S;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+S+S;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+S+MOZ+S+MS+S+S;case 6828:case 4268:return WEBKIT+S+MS+S+S;case 6165:return WEBKIT+S+MS+"flex-"+S+S;case 5187:return WEBKIT+S+replace$2(S,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+S;case 5443:return WEBKIT+S+MS+"flex-item-"+replace$2(S,/flex-|-self/,"")+S;case 4675:return WEBKIT+S+MS+"flex-line-pack"+replace$2(S,/align-content|flex-|-self/,"")+S;case 5548:return WEBKIT+S+MS+replace$2(S,"shrink","negative")+S;case 5292:return WEBKIT+S+MS+replace$2(S,"basis","preferred-size")+S;case 6060:return WEBKIT+"box-"+replace$2(S,"-grow","")+WEBKIT+S+MS+replace$2(S,"grow","positive")+S;case 4554:return WEBKIT+replace$2(S,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+S;case 6187:return replace$2(replace$2(replace$2(S,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),S,"")+S;case 5495:case 3959:return replace$2(S,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$2(replace$2(S,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+S+S;case 4095:case 3583:case 4068:case 2532:return replace$2(S,/(.+)-inline(.+)/,WEBKIT+"$1$2")+S;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(S)-1-C>6)switch(charat(S,C+1)){case 109:if(charat(S,C+4)!==45)break;case 102:return replace$2(S,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(S,C+3)==108?"$3":"$2-$3"))+S;case 115:return~indexof(S,"stretch")?prefix$1(replace$2(S,"stretch","fill-available"),C)+S:S}break;case 4949:if(charat(S,C+1)!==115)break;case 6444:switch(charat(S,strlen(S)-3-(~indexof(S,"!important")&&10))){case 107:return replace$2(S,":",":"+WEBKIT)+S;case 101:return replace$2(S,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(S,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+S}break;case 5936:switch(charat(S,C+11)){case 114:return WEBKIT+S+MS+replace$2(S,/[svh]\w+-[tblr]{2}/,"tb")+S;case 108:return WEBKIT+S+MS+replace$2(S,/[svh]\w+-[tblr]{2}/,"tb-rl")+S;case 45:return WEBKIT+S+MS+replace$2(S,/[svh]\w+-[tblr]{2}/,"lr")+S}return WEBKIT+S+MS+S+S}return S}var prefixer=function S(C,R,O,I){if(C.length>-1&&!C.return)switch(C.type){case DECLARATION:C.return=prefix$1(C.value,C.length);break;case KEYFRAMES:return serialize([copy$2(C,{value:replace$2(C.value,"@","@"+WEBKIT)})],I);case RULESET:if(C.length)return combine(C.props,function(N){switch(match$2(N,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy$2(C,{props:[replace$2(N,/:(read-\w+)/,":"+MOZ+"$1")]})],I);case"::placeholder":return serialize([copy$2(C,{props:[replace$2(N,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy$2(C,{props:[replace$2(N,/:(plac\w+)/,":"+MOZ+"$1")]}),copy$2(C,{props:[replace$2(N,/:(plac\w+)/,MS+"input-$1")]})],I)}return""})}},defaultStylisPlugins=[prefixer],createCache=function S(C){var R=C.key;if(define_process_env_default$k.NODE_ENV!=="production"&&!R)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache. -If multiple caches share the same key they might "fight" for each other's style elements.`);if(R==="css"){var O=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(O,function(oe){var pe=oe.getAttribute("data-emotion");pe.indexOf(" ")!==-1&&(document.head.appendChild(oe),oe.setAttribute("data-s",""))})}var I=C.stylisPlugins||defaultStylisPlugins;if(define_process_env_default$k.NODE_ENV!=="production"&&/[^a-z-]/.test(R))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+R+'" was passed');var N={},L,B=[];L=C.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+R+' "]'),function(oe){for(var pe=oe.getAttribute("data-emotion").split(" "),me=1;me css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(define_process_env_default$j.NODE_ENV!=="production"){var B=[],j=R.replace(animationRegex,function(V,K,W){var X="animation"+B.length;return B.push("const "+X+" = keyframes`"+W.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+X+"}"});B.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(B,["`"+j+"`"]).join(` -`)+` - -You should wrap it with \`css\` like this: - -`+("css`"+j+"`"))}break}if(C==null)return R;var F=C[R];return F!==void 0?F:R}function createStringFromObject(S,C,R){var O="";if(Array.isArray(R))for(var I=0;INumber.isNaN(Number(S))).map(([S,C])=>[S,`var(${C})`])),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>/=$<%]+(?:\s(?:\s*[^\s>/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>/]+/,inside:{namespace:/^[^\s>/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(S){S.type==="entity"&&S.attributes&&(S.attributes.title=S.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function S(C,R){const O={};O["language-"+R]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[R]},O.cdata=/^$/i;const I={"included-cdata":{pattern://i,inside:O}};I["language-"+R]={pattern:/[\s\S]+/,inside:Prism.languages[R]};const N={};N[C]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return C}),"i"),lookbehind:!0,greedy:!0,inside:I},Prism.languages.insertBefore("markup","cdata",N)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(S,C){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+S+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[C,"language-"+C],inside:Prism.languages[C]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;const envVars="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",commandAfterHeredoc={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:void 0},insideString={bash:commandAfterHeredoc,environment:{pattern:RegExp("\\$"+envVars),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!/]|##?|%%?|\^\^?|,,?/,punctuation:/[[\]]/,environment:{pattern:RegExp("(\\{)"+envVars),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};Prism.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+envVars),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:insideString},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:commandAfterHeredoc}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:insideString},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:insideString.entity}}],environment:{pattern:RegExp("\\$?"+envVars),alias:"constant"},variable:insideString.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},commandAfterHeredoc.inside=Prism.languages.bash;const toBeCopied=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],inside$1=insideString.variable[1].inside;for(let S=0;S>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;const string$1=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+string$1.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+string$1.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+string$1.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+string$1.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:string$1,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css;const markup=Prism.languages.markup;markup&&(markup.tag.addInlined("style","css"),markup.tag.addAttribute("style","css"));const keyword=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,modName=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return keyword.source});Prism.languages.cpp=Prism.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return keyword.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),Prism.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return modName})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),Prism.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:Prism.languages.cpp}}}}),Prism.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),Prism.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:Prism.languages.extend("cpp",{})}}),Prism.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},Prism.languages.cpp["base-clause"]);const ID="(?:"+[/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,/<(?:[^<>]|(?!)*>/.source].join("|")+")",IDInside={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:Prism.languages.markup}};function withID(S,C){return RegExp(S.replace(//g,function(){return ID}),C)}Prism.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:withID(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)/.source,"i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:IDInside},"attr-value":{pattern:withID(/(=[ \t\r\n]*)/.source),lookbehind:!0,greedy:!0,inside:IDInside},"attr-name":{pattern:withID(/([[;, \t\r\n])(?=[ \t\r\n]*=)/.source),lookbehind:!0,greedy:!0,inside:IDInside},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:withID(/(^|[^-.\w\x80-\uFFFF\\])/.source),lookbehind:!0,greedy:!0,inside:IDInside},operator:/[=:]|-[->]/,punctuation:/[[\]{};,]/},Prism.languages.gv=Prism.languages.dot,Prism.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};const PREFIXES={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(PREFIXES).forEach(function(S){const C=PREFIXES[S],R=[];/^\w+$/.test(S)||R.push(/\w+/.exec(S)[0]),S==="diff"&&R.push("bold"),Prism.languages.diff[S]={pattern:RegExp("^(?:["+C+`].*(?:\r -?| -|(?![\\s\\S])))+`,"m"),alias:R,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(S)[0]}}}}),Object.defineProperty(Prism.languages.diff,"PREFIXES",{value:PREFIXES}),Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];const keywords=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,classNamePrefix=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,className={pattern:RegExp(/(^|[^\w.])/.source+classNamePrefix+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};if(Prism.languages.java=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[className,{pattern:RegExp(/(^|[^\w.])/.source+classNamePrefix+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:className.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+classNamePrefix+/[A-Z]\w*\b/.source),lookbehind:!0,inside:className.inside}],keyword:keywords,function:[Prism.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),Prism.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),Prism.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":className,keyword:keywords,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+classNamePrefix+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:className.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+classNamePrefix+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:className.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return keywords.source})),lookbehind:!0,inside:{punctuation:/\./}}}),Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup){const S=Prism.languages.markup;S.tag.addInlined("script","javascript"),S.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")}Prism.languages.js=Prism.languages.javascript,Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;const javascript=Prism.util.clone(Prism.languages.javascript),space=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,braces=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source;let spread=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function re$1(S,C){const R=S.replace(//g,()=>space).replace(//g,()=>braces).replace(//g,()=>spread);return RegExp(R,C)}spread=re$1(spread).source,Prism.languages.jsx=Prism.languages.extend("markup",javascript);const jsx=Prism.languages.jsx;jsx.tag.pattern=re$1(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),jsx.tag.inside.tag.pattern=/^<\/?[^\s>/]*/,jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,jsx.tag.inside.comment=javascript.comment,Prism.languages.insertBefore("inside","attr-name",{spread:{pattern:re$1(//.source),inside:Prism.languages.jsx}},jsx.tag),Prism.languages.insertBefore("inside","special-attr",{script:{pattern:re$1(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:Prism.languages.jsx}}},jsx.tag);const stringifyToken=function(S){return S?typeof S=="string"?S:typeof S.content=="string"?S.content:S.content.map(stringifyToken).join(""):""},walkTokens=function(S){const C=[];for(let R=0;R0&&C[C.length-1].tagName===stringifyToken(N[0].content[1])&&C.pop():N[N.length-1].content==="/>"||C.push({tagName:stringifyToken(N[0].content[1]),openedBraces:0}):C.length>0&&O.type==="punctuation"&&O.content==="{"?C[C.length-1].openedBraces+=1:C.length>0&&C[C.length-1].openedBraces>0&&O.type==="punctuation"&&O.content==="}"?C[C.length-1].openedBraces-=1:I=!0}if((I||typeof O=="string")&&C.length>0&&C[C.length-1].openedBraces===0){let N=stringifyToken(O);R0&&(typeof S[R-1]=="string"||S[R-1].type==="plain-text")&&(N=stringifyToken(S[R-1])+N,S.splice(R-1,1),R-=1),S[R]=new Prism.Token("plain-text",N,void 0,N)}typeof O!="string"&&O.content&&typeof O.content!="string"&&walkTokens(O.content)}};Prism.hooks.add("after-tokenize",function(S){S.language!=="jsx"&&S.language!=="tsx"||walkTokens(S.tokens)}),Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};const inner=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function createInline(S){const C=S.replace(//g,function(){return inner});return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+C+")")}const tableCell=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,tableRow=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return tableCell}),tableLine=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:Prism.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+tableRow+tableLine+"(?:"+tableRow+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+tableRow+tableLine+")(?:"+tableRow+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(tableCell),inside:Prism.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+tableRow+")"+tableLine+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+tableRow+"$"),inside:{"table-header":{pattern:RegExp(tableCell),alias:"important",inside:Prism.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[[\]!:]|[<>]/},alias:"url"},bold:{pattern:createInline(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:createInline(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:createInline(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:createInline(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(S){["url","bold","italic","strike","code-snippet"].forEach(function(C){if(S!==C){const R=Prism.languages.markdown;R[S].inside.content.inside[C]=R[C]}})}),Prism.hooks.add("after-tokenize",function(S){if(S.language!=="markdown"&&S.language!=="md")return;function C(R){if(!(!R||typeof R=="string"))for(let O=0,I=R.length;O",quot:'"'},fromCodePoint=String.fromCodePoint||String.fromCharCode;function textContent(S){let C=S.replace(tagPattern,"");return C=C.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(R,O){if(O=O.toLowerCase(),O[0]==="#"){let I;return O[1]==="x"?I=parseInt(O.slice(2),16):I=Number(O.slice(1)),fromCodePoint(I)}else{const I=KNOWN_ENTITY_NAMES[O];return I||R}}),C}Prism.languages.md=Prism.languages.markdown,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss,Prism.languages.sass=Prism.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),Prism.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete Prism.languages.sass.atrule;const variable=/\$[-\w]+|#\{\$[-\w]+\}/,operator=[/[+*/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];Prism.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable,operator}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable,operator,important:Prism.languages.sass.important}}}),delete Prism.languages.sass.property,delete Prism.languages.sass.important,Prism.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}}),Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const unit$1={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},number$3={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},inside={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:unit$1,number:number$3,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:unit$1,boolean:/\b(?:false|true)\b/,operator:[/~|[+!/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:number$3,punctuation:/[{}()[\];:,]/};inside.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:inside}},inside.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:inside}},Prism.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:inside}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:inside}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:inside}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:inside.interpolation}},rest:inside}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:inside.interpolation,comment:inside.comment,punctuation:/[{},]/}},func:inside.func,string:inside.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:inside.interpolation,punctuation:/[{}()[\];:.]/},Prism.languages.typescript=Prism.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),Prism.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[{*]|$))/),delete Prism.languages.typescript.parameter,delete Prism.languages.typescript["literal-property"];const typeInside=Prism.languages.extend("typescript",{});delete typeInside["class-name"],Prism.languages.typescript["class-name"].inside=typeInside,Prism.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:typeInside}}}}),Prism.languages.ts=Prism.languages.typescript;const typescript=Prism.util.clone(Prism.languages.typescript);Prism.languages.tsx=Prism.languages.extend("jsx",typescript),delete Prism.languages.tsx.parameter,delete Prism.languages.tsx["literal-property"];const tag$1=Prism.languages.tsx.tag;tag$1.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+tag$1.pattern.source+")",tag$1.pattern.flags),tag$1.lookbehind=!0,Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const anchorOrAlias=/[*&][^\s[\]{},]+/,tag=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,properties="(?:"+tag.source+"(?:[ ]+"+anchorOrAlias.source+")?|"+anchorOrAlias.source+"(?:[ ]+"+tag.source+")?)",plainKey=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,()=>/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source),string$2=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function createValuePattern(S,C){const R=(C||"").replace(/m/g,"")+"m",O=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return properties}).replace(/<>/g,function(){return S});return RegExp(O,R)}Prism.languages.yaml={scalar:{pattern:RegExp(/([-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return properties})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return properties}).replace(/<>/g,function(){return"(?:"+plainKey+"|"+string$2+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:createValuePattern(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:createValuePattern(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:createValuePattern(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:createValuePattern(string$2),lookbehind:!0,greedy:!0},number:{pattern:createValuePattern(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag,important:anchorOrAlias,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},Prism.languages.yml=Prism.languages.yaml;const vscDarkTheme={plain:{color:"#d4d4d4",backgroundColor:"#1e1e1e"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment","punctuation"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin"],style:{color:"rgb(79, 193, 255)"}},{types:["number","variable","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["operator"],style:{color:"rgb(212, 212, 212)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["tag","changed","function","keyword"],style:{color:"rgb(86, 156, 214)"}},{types:["attr-name"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value"],style:{color:"rgb(206, 145, 120)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}}]},vscLightTheme={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},vars={border:`1px solid var(${TokenNames.colorBorderCodeLineno}, hsla(0deg, 0%, 80%, 0.8))`,highlightBackground:`var(${TokenNames.colorBgCodeHighlight}, hsla(30deg, 90%, 50%, 0.3))`,fontSizeCode:`var(${CommonTokenNames.fontSizeCode}, 14px)`,lineHeightCode:`var(${CommonTokenNames.lineHeightCode}, 1.6)`},classes$2={container:css({MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",display:"flex",alignItems:"stretch",overflow:"hidden",width:"100%",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,padding:0,transition:"max-height 0.5s ease-in-out",tabSize:2,fontSmooth:"always",whiteSpace:"pre",wordBreak:"keep-all",wordSpacing:"normal",wordWrap:"normal"}),line:css({boxSizing:"border-box",display:"flex",minWidth:"fit-content",width:"100%",padding:"0 6px",letterSpacing:"inherit",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,height:vars.lineHeightCode,overflowWrap:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"inherit",wordBreak:"inherit",wordSpacing:"inherit",wordWrap:"inherit"}),linenoLine:css({justifyContent:"flex-end",padding:"0 4px"}),highlightLine:css({background:vars.highlightBackground,borderColor:"transparent"}),lineno:css({flex:"0 0 auto",overflow:"hidden",boxSizing:"border-box",padding:"0.5rem 0",cursor:"default",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode,userSelect:"none",textAlign:"right",borderRight:vars.border}),codes:css({flex:"1 1 auto",overflow:"overlay",boxSizing:"border-box",padding:"0.5rem 0",fontSize:vars.fontSizeCode,lineHeight:vars.lineHeightCode}),codeWrapper:css({minWidth:"100%",width:"fit-content"}),codeLine:css({boxSizing:"border-box",padding:"0 12px"})},languageMap={js:"javascript",ts:"typescript"},themeToDict=(S,C)=>{S=languageMap[S]??S;const{plain:R}=C,O=Object.create(null),I=C.styles.reduce((N,L)=>{const{types:B,style:j,languages:F}=L;if(F&&!F.includes(S))return N;for(const V of B){const K={...N[V],...j};N[V]=K}return N},O);return I.root=R,I.plain={...R,backgroundColor:void 0},I},newlineRegex=/\r\n|\r|\n/,normalizeEmptyLines=S=>{S.length===0?S.push({types:["plain"],content:` -`,empty:!0}):S.length===1&&S[0].content===""&&(S[0].content=` -`,S[0].empty=!0)},appendTypes=(S,C)=>{const R=S.length;return R>0&&S[R-1]===C?S:S.concat(C)},normalizeTokens=S=>{const C=[[]],R=[S],O=[0],I=[S.length];let N=[];const L=[N];for(let B=0;B>-1;--B){for(let j=0;(j=O[B]++)0?V:["plain"],F=W):(V=appendTypes(V,W.type),W.alias&&(V=appendTypes(V,W.alias)),F=W.content),typeof F!="string"){B+=1,C.push(V),R.push(F),O.push(0),I.push(F.length);continue}const X=F.split(newlineRegex),J=X.length;N.push({types:V,content:X[0]});for(let oe=1;oe{var N,L;const O=R.target;if(O==null)return;const{scrollTop:I}=O;(L=(N=this.linenoRef.current)==null?void 0:N.scrollTo)==null||L.call(N,0,I)});const O=themeToDict(R.language,R.theme),I=this.tokenize(R.code,R.language),N=R.showLineno?`${Math.max(2,String(I.length).length)*1.1}em`:void 0;this.state={linenoWidth:N,themeDict:O,tokens:I},this.linenoRef={current:null}}shouldComponentUpdate(R,O){const I=this.props,N=this.state;return N.linenoWidth!==O.linenoWidth||N.themeDict!==O.themeDict||N.tokens!==O.tokens||I.code!==R.code||I.codesRef!==R.codesRef||I.collapsed!==R.collapsed||I.language!==R.language||I.maxLines!==R.maxLines||I.showLineno!==R.showLineno||!isEqual$2(I.theme,R.theme)||!isEqual$2(I.highlightLinenos,R.highlightLinenos)}render(){const{linenoRef:R,onScroll:O}=this,{codesRef:I,collapsed:N,highlightLinenos:L,language:B,maxLines:j,showLineno:F=!0}=this.props,{linenoWidth:V,tokens:K}=this.state,W=K.length,X=j>0?Math.min(j,W):W,J={...this.state.themeDict.root,backgroundColor:"none",...N?{maxHeight:0}:{maxHeight:`calc(calc(${vars.lineHeightCode} * ${X+.8}) + 6px)`,minHeight:"100%"}};return React.createElement("div",{className:cx(classes$2.container,B?`prism-code language-${B}`:"prism-code"),style:J},F&&React.createElement("div",{key:"linenos",className:classes$2.lineno,style:{width:V},ref:R},React.createElement(HighlightLinenos,{countOfLines:W,highlightLinenos:L})),React.createElement("div",{key:"codes",ref:I,className:classes$2.codes,onScroll:O},React.createElement("div",{className:classes$2.codeWrapper},K.map((oe,pe)=>{const me=L.includes(pe+1),xe=this.getLineProps({line:oe});return React.createElement("div",{...xe,key:pe,className:cx(classes$2.line,classes$2.codeLine,me&&classes$2.highlightLine,xe.className)},oe.map((Ae,ge)=>React.createElement("span",{...this.getTokenProps({token:Ae}),key:ge})))}))))}componentDidMount(){var R,O;(O=(R=this.props).onLinenoWidthChange)==null||O.call(R,this.state.linenoWidth)}componentDidUpdate(R,O){var B,j;const I=this.props,N=this.state,L=I.language!==R.language||!isEqual$2(I.theme,R.theme)?themeToDict(I.language,I.theme):N.themeDict;if(I.code!==R.code||I.language!==R.language||L!==O.themeDict){const F=this.tokenize(I.code,I.language),V=I.showLineno?`${Math.max(2,String(F.length).length)*1.1}em`:void 0;this.setState({linenoWidth:V,themeDict:L,tokens:F})}N.linenoWidth!==O.linenoWidth&&((j=(B=this.props).onLinenoWidthChange)==null||j.call(B,N.linenoWidth))}tokenize(R,O){const I=O?Prism.languages[O]:void 0;if(I){const N={code:R,grammar:I,language:O,tokens:[]};return Prism.hooks.run("before-tokenize",N),N.tokens=Prism.tokenize(N.code,N.grammar),Prism.hooks.run("after-tokenize",N),normalizeTokens(N.tokens)}else return normalizeTokens([R])}getLineProps(R){const{themeDict:O}=this.state,{key:I,className:N,style:L,line:B,...j}=R,F={...j,className:"token-line",style:void 0,key:void 0};return O!==void 0&&(F.style=O.plain),L!==void 0&&(F.style=F.style!==void 0?{...F.style,...L}:L),I!==void 0&&(F.key=I),N&&(F.className+=` ${N}`),F}getStyleForToken({types:R,empty:O}){const{themeDict:I}=this.state,N=R.length;if(I===void 0)return;if(N===1&&R[0]==="plain")return O?{display:"inline-block"}:void 0;if(N===1&&!O)return I[R[0]];const L=O?{display:"inline-block"}:{};for(const B of R){const j=I[B];Object.assign(L,j)}return L}getTokenProps(R){const{key:O,className:I,style:N,token:L,...B}=R,j={...B,className:`token ${L.types.join(" ")}`,children:L.content,style:this.getStyleForToken(L),key:void 0};return N!==void 0&&(j.style=j.style!==void 0?{...j.style,...N}:N),O!==void 0&&(j.key=O),I&&(j.className+=` ${I}`),j}}Cn(HighlightContent,"displayName","HighlightContent"),Cn(HighlightContent,"propTypes",{code:PropTypes$1.string.isRequired,codesRef:PropTypes$1.any,collapsed:PropTypes$1.bool.isRequired,language:PropTypes$1.string.isRequired,maxLines:PropTypes$1.number.isRequired,showLineno:PropTypes$1.bool.isRequired,theme:PropTypes$1.object.isRequired,highlightLinenos:PropTypes$1.array.isRequired,onLinenoWidthChange:PropTypes$1.func});class CodeHighlighter extends React.PureComponent{render(){const{lang:C,value:R,darken:O=!0,highlightLinenos:I=[],maxLines:N=-1,collapsed:L=!1,showLineNo:B=!0,codesRef:j,onLinenoWidthChange:F}=this.props,V=this.props.theme??(O?vscDarkTheme:vscLightTheme);return React.createElement(HighlightContent,{code:R,codesRef:j,collapsed:L,highlightLinenos:I,language:C??"",maxLines:N,showLineno:B,theme:V,onLinenoWidthChange:F})}}Cn(CodeHighlighter,"displayName","YozoraCodeHighlighter"),Cn(CodeHighlighter,"propTypes",{codesRef:PropTypes$1.any,collapsed:PropTypes$1.bool,darken:PropTypes$1.bool,highlightLinenos:PropTypes$1.arrayOf(PropTypes$1.number),lang:PropTypes$1.string,maxLines:PropTypes$1.number,onLinenoWidthChange:PropTypes$1.func,showLineNo:PropTypes$1.bool,theme:PropTypes$1.any,value:PropTypes$1.string.isRequired});const CopyButton$1=S=>{const{className:C,delay:R=1500,calcContentForCopy:O}=S,[I,N]=React.useState(0),L=useStyles$d(),B=I!==0,j=()=>{if(I===0){N(1);try{const F=O();copy$4(F),N(2)}catch{N(3)}}};return React.useEffect(()=>{if(I===2||I===3){const F=setTimeout(()=>N(0),R);return()=>{F&&clearTimeout(F)}}},[I,R]),jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",className:mergeClasses(L.copyButton,C),disabled:B,as:"button",icon:I===0?jsxRuntimeExports.jsx(Copy20Regular,{}):jsxRuntimeExports.jsx(CopyArrowRight20Regular,{}),onClick:j})},useStyles$d=makeStyles({copyButton:{cursor:"pointer"}});class CodeRendererInner extends React.PureComponent{constructor(){super(...arguments),this.calcContentForCopy=()=>this.props.value}render(){const{calcContentForCopy:C}=this,{darken:R,lang:O,value:I,preferCodeWrap:N,showCodeLineno:L}=this.props;return jsxRuntimeExports.jsxs("code",{className:codeCls,"data-wrap":N,children:[jsxRuntimeExports.jsx(CodeHighlighter,{lang:O,value:I,collapsed:!1,showLineNo:L&&!N,darken:R}),jsxRuntimeExports.jsx("div",{className:copyBtnCls,children:jsxRuntimeExports.jsx(CopyButton$1,{calcContentForCopy:C})})]})}}const copyBtnCls=mergeStyles$1({position:"absolute",right:"4px",top:"4px",display:"none"}),codeCls=mergeStyles$1(astClasses.code,{position:"relative",display:"block",boxSizing:"border-box",borderRadius:"4px",margin:"0px 0px 1.25em 0px",backgroundColor:"var(--colorBgCode)",[`&:hover > .${copyBtnCls}`]:{display:"inline-block"},'&&[data-wrap="true"] > div':{whiteSpace:"pre-wrap",wordBreak:"keep-all"}}),CodeRenderer=S=>{const{lang:C}=S,R=S.value.replace(/[\r\n]+$/,""),{viewmodel:O}=useNodeRendererContext(),I=useStateValue(O.preferCodeWrap$),N=useStateValue(O.showCodeLineno$),B=useStateValue(O.themeScheme$)==="darken";return jsxRuntimeExports.jsx(CodeRendererInner,{darken:B,lang:C??"text",value:R,preferCodeWrap:I,showCodeLineno:N})};class DeleteRenderer extends React.Component{shouldComponentUpdate(C){return this.props.children!==C.children}render(){const C=this.props.children;return jsxRuntimeExports.jsx("del",{className:cls$9,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:C})})}}const cls$9=mergeStyles$1(astClasses.delete,{marginRight:"4px",color:"var(--colorDelete)",fontStyle:"italic",textDecoration:"line-through"});class EmphasisRenderer extends React.Component{shouldComponentUpdate(C){return this.props.children!==C.children}render(){const C=this.props.children;return jsxRuntimeExports.jsx("em",{className:cls$8,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:C})})}}const cls$8=mergeStyles$1(astClasses.emphasis,{fontStyle:"italic",margin:"0 6px 0 2px"});class HeadingRenderer extends React.Component{shouldComponentUpdate(C){const R=this.props;return R.depth!==C.depth||R.identifier!==C.identifier||R.children!==C.children||R.linkIcon!==C.linkIcon}render(){const{depth:C,identifier:R,children:O,linkIcon:I="¶"}=this.props,N=R==null?void 0:encodeURIComponent(R),L="h"+C,B=L,j=mergeStyles$1(astClasses.heading,classes$1.heading,classes$1[L]);return jsxRuntimeExports.jsxs(B,{id:N,className:j,children:[jsxRuntimeExports.jsx("p",{className:classes$1.content,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:O})}),R&&jsxRuntimeExports.jsx("a",{className:classes$1.anchor,href:"#"+N,children:I})]})}}const anchorCls=mergeStyles$1({flex:"0 0 3rem",paddingLeft:"0.5rem",color:"var(--colorLink)",opacity:0,transition:"color 0.2s ease-in-out, opacity 0.2s ease-in-out",userSelect:"none",textDecoration:"none","> svg":{overflow:"hidden",display:"inline-block",verticalAlign:"middle",fill:"currentColor"}}),classes$1=mergeStyleSets({heading:{display:"flex",alignItems:"center",justifyContent:"flex-start",padding:"0px",margin:"0px 0px 1.25em 0px",marginBottom:"1em",lineHeight:"1.25",fontFamily:"var(--fontFamilyHeading)",color:"var(--colorHeading)",[`&:active .${anchorCls}`]:{opacity:.8,color:"var(--colorLinkActive)"},[`&&:hover .${anchorCls}`]:{opacity:.8,color:"var(--colorLinkHover)"}},anchor:anchorCls,content:{flex:"0 1 auto",minWidth:0,margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre-wrap",lineHeight:"1.7"},h1:{padding:"0.3rem 0",borderBottom:"1px solid var(--colorBorderHeading)",fontSize:"2rem",fontStyle:"normal",fontWeight:500},h2:{padding:"0.3rem 0",borderBottom:"1px solid var(--colorBorderHeading)",fontSize:"1.5rem",fontStyle:"normal",fontWeight:500,marginBottom:"0.875rem"},h3:{fontSize:"1.25rem",fontStyle:"normal",fontWeight:500},h4:{fontSize:"1rem",fontStyle:"normal",fontWeight:500},h5:{fontSize:"0.875rem",fontStyle:"normal",fontWeight:500},h6:{fontSize:"0.85rem",fontStyle:"normal",fontWeight:500}});class ImageRendererInner extends React.Component{shouldComponentUpdate(C){const R=this.props;return R.src!==C.src||R.alt!==C.alt||R.title!==C.title||R.srcSet!==C.srcSet||R.sizes!==C.sizes||R.loading!==C.loading||R.className!==C.className}render(){const{src:C,alt:R,title:O,srcSet:I,sizes:N,loading:L,className:B}=this.props;return jsxRuntimeExports.jsxs("figure",{className:`${B} ${cls$7}`,children:[jsxRuntimeExports.jsx("img",{alt:R,src:C,title:O,srcSet:I,sizes:N,loading:L}),O&&jsxRuntimeExports.jsx("figcaption",{children:O})]})}}const cls$7=mergeStyles$1({boxSizing:"border-box",maxWidth:"80%",display:"flex",flexDirection:"column",alignItems:"center",margin:0,"> img":{flex:"1 0 auto",boxSizing:"border-box",maxWidth:"100%",border:"1px solid var(--colorBorderImage)",boxShadow:"0 0 20px 1px rgba(126, 125, 150, 0.6)"},"> figcaption":{textAlign:"center",fontStyle:"italic",fontSize:"1em",color:"var(--colorImageTitle)"}}),ImageRenderer=S=>{const{url:C,alt:R,title:O,srcSet:I,sizes:N,loading:L}=S;return jsxRuntimeExports.jsx(ImageRendererInner,{alt:R,src:C,title:O,srcSet:I,sizes:N,loading:L,className:astClasses.image})},ImageReferenceRenderer=S=>{const{viewmodel:C}=useNodeRendererContext(),R=useStateValue(C.definitionMap$),{alt:O,srcSet:I,sizes:N,loading:L}=S,B=R[S.identifier],j=(B==null?void 0:B.url)??"",F=B==null?void 0:B.title;return jsxRuntimeExports.jsx(ImageRendererInner,{alt:O,src:j,title:F,srcSet:I,sizes:N,loading:L,className:astClasses.imageReference})};class InlineCodeRenderer extends React.Component{shouldComponentUpdate(C){return this.props.value!==C.value}render(){return jsxRuntimeExports.jsx("code",{className:cls$6,children:this.props.value})}}const cls$6=mergeStyles$1(astClasses.inlineCode,{padding:"1px 4px",borderRadius:"4px",margin:0,background:"hsla(210deg, 15%, 60%, 0.15)",lineHeight:"1.375",color:"var(--colorInlineCode)",fontFamily:"var(--fontFamilyCode)",fontSize:"min(1rem, 18px)",fontWeight:500});class LinkRendererInner extends React.Component{shouldComponentUpdate(C){const R=this.props;return R.url!==C.url||R.title!==C.title||R.childNodes!==C.childNodes||R.className!==C.className}render(){const{url:C,title:R,childNodes:O,className:I}=this.props;return jsxRuntimeExports.jsx("a",{className:mergeStyles$1(cls$5,I),href:C,title:R,rel:"noopener, noreferrer",target:"_blank",children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:O})})}}const cls$5=mergeStyles$1({padding:"0.2rem 0",color:"var(--colorLink)",textDecoration:"none",background:"linear-gradient(90deg, hsla(358deg, 100%, 62%, 0.8), hsla(048deg, 100%, 50%, 0.8), hsla(196deg, 100%, 53%, 0.8))",backgroundSize:"0 3px",backgroundRepeat:"no-repeat",backgroundPosition:"50% 100%",transition:"all 0.3s ease-in-out","&:active":{color:"var(--colorLinkActive)"},"&&:hover":{color:"var(--colorLinkHover)",backgroundSize:"100% 3px",backgroundPositionX:0},"&:visited":{color:"var(--colorLinkVisited)"}}),LinkRenderer=S=>{const{url:C,title:R,children:O}=S;return jsxRuntimeExports.jsx(LinkRendererInner,{url:C,title:R,childNodes:O,className:astClasses.link})},LinkReferenceRenderer=S=>{const{viewmodel:C}=useNodeRendererContext(),O=useStateValue(C.definitionMap$)[S.identifier],I=(O==null?void 0:O.url)??"",N=O==null?void 0:O.title;return jsxRuntimeExports.jsx(LinkRendererInner,{url:I,title:N,childNodes:S.children,className:astClasses.linkReference})};class ListRenderer extends React.Component{shouldComponentUpdate(C){const R=this.props;return R.ordered!==C.ordered||R.orderType!==C.orderType||R.start!==C.start||R.children!==C.children}render(){const{ordered:C,orderType:R,start:O,children:I}=this.props;return C?jsxRuntimeExports.jsx("ol",{className:cls$4,type:R,start:O,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:I})}):jsxRuntimeExports.jsx("ul",{className:cls$4,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:I})})}}const cls$4=mergeStyles$1(astClasses.list,{padding:"0px",margin:"0 0 1em 2em",lineHeight:"2","> :last-child":{marginBottom:"0px"}});class ListItemRenderer extends React.Component{shouldComponentUpdate(C){return this.props.children!==C.children}render(){const C=this.props.children;return jsxRuntimeExports.jsx("li",{className:cls$3,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:C})})}}const cls$3=mergeStyles$1(astClasses.listItem,{position:"relative",padding:0,margin:0,"> :last-child":{marginBottom:0}});class ParagraphRenderer extends React.Component{shouldComponentUpdate(C){return this.props.children!==C.children}render(){const C=this.props.children;return C.some(O=>O.type===ImageType$1||O.type===ImageReferenceType)?jsxRuntimeExports.jsx("div",{className:paragraphDisplayCls,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:C})}):jsxRuntimeExports.jsx("p",{className:paragraphCls,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:C})})}}const paragraphCls=mergeStyles$1(astClasses.paragraph,{overflow:"hidden",padding:0,margin:"0px 0px 1.25em 0px",marginBottom:"1em",lineHeight:"1.8",hyphens:"auto",wordBreak:"normal",letterSpacing:"1px",overflowWrap:"break-word","> :last-child":{marginBottom:0}}),paragraphDisplayCls=mergeStyles$1(paragraphCls,{display:"flex",alignItems:"center",justifyContent:"center",padding:"1rem 0",margin:0});class StrongRenderer extends React.Component{shouldComponentUpdate(C){return this.props.children!==C.children}render(){const C=this.props.children;return jsxRuntimeExports.jsx("strong",{className:cls$2,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:C})})}}const cls$2=mergeStyles$1(astClasses.strong,{fontWeight:600});class TableRenderer extends React.Component{shouldComponentUpdate(C){const R=this.props;return!isEqual$2(R.columns,C.columns)||!isEqual$2(R.children,C.children)}render(){const{columns:C,children:R}=this.props,O=C.map(L=>L.align??void 0),[I,...N]=R.map(L=>L.children.map((B,j)=>jsxRuntimeExports.jsx(NodesRenderer,{nodes:B.children},j)));return jsxRuntimeExports.jsxs("table",{className:cls$1,children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsx("tr",{children:I.map((L,B)=>jsxRuntimeExports.jsx(Th,{align:O[B],children:L},B))})}),jsxRuntimeExports.jsx("tbody",{children:N.map((L,B)=>jsxRuntimeExports.jsx("tr",{children:L.map((j,F)=>jsxRuntimeExports.jsx("td",{align:O[F],children:j},F))},B))})]})}}class Th extends React.Component{constructor(C){super(C),this.ref={current:null}}shouldComponentUpdate(C){const R=this.props;return R.align!==C.align||R.children!==C.children}render(){const{align:C,children:R}=this.props;return jsxRuntimeExports.jsx("th",{ref:this.ref,align:C,children:R})}componentDidMount(){const C=this.ref.current;C&&C.setAttribute("title",C.innerText)}componentDidUpdate(){const C=this.ref.current;C&&C.setAttribute("title",C.innerText)}}const cls$1=mergeStyles$1(astClasses.table,{display:"block",overflow:"auto",width:"max-content",maxWidth:"100%",padding:0,borderCollapse:"collapse",borderRadius:"6px",borderSpacing:"0px",border:"1px solid var(--colorBorderTable)",margin:"0 auto 1.25em",lineHeight:"1.6","> thead":{backgroundColor:"var(--colorBgTableHead)",borderBottom:"1px solid #f0f0f0",th:{padding:"0.5rem 1rem",borderLeft:"1px solid var(--colorBorderTable)",wordBreak:"normal",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","&:first-child":{borderLeft:"none"}}},"> tbody":{tr:{borderTop:"1px solid var(--colorBorderTable)",backgroundColor:"var(--colorBgTableOddRow)"},"tr:nth-child(2n)":{backgroundColor:"var(--colorBgTableEvenRow)"},td:{padding:"0.5rem 1rem",borderLeft:"1px solid var(--colorBorderTable)","&:first-child":{borderLeft:"none"}}}});class TextRenderer extends React.Component{shouldComponentUpdate(C){return this.props.value!==C.value}render(){return jsxRuntimeExports.jsx(React.Fragment,{children:this.props.value})}}class ThematicBreakRenderer extends React.Component{shouldComponentUpdate(){return!1}render(){return jsxRuntimeExports.jsx("hr",{className:cls})}}const cls=mergeStyles$1(astClasses.thematicBreak,{boxSizing:"content-box",display:"block",height:0,width:"100%",padding:0,border:0,borderBottom:"1px solid #dadada",outline:0,margin:"1.5em 0px"});function buildNodeRendererMap(S){if(S==null)return defaultNodeRendererMap;let C=!1;const R={};for(const[O,I]of Object.entries(S))I&&I!==defaultNodeRendererMap[O]&&(C=!0,R[O]=I);return C?{...defaultNodeRendererMap,...R}:defaultNodeRendererMap}const defaultNodeRendererMap={[BlockquoteType]:BlockquoteRenderer,[BreakType]:BreakRenderer,[CodeType]:CodeRenderer,[DefinitionType]:()=>null,[DeleteType]:DeleteRenderer,[EmphasisType]:EmphasisRenderer,[HeadingType]:HeadingRenderer,[HtmlType]:()=>null,[ImageType$1]:ImageRenderer,[ImageReferenceType]:ImageReferenceRenderer,[InlineCodeType]:InlineCodeRenderer,[LinkType]:LinkRenderer,[LinkReferenceType]:LinkReferenceRenderer,[ListType]:ListRenderer,[ListItemType]:ListItemRenderer,[ParagraphType$1]:ParagraphRenderer,[StrongType]:StrongRenderer,[TableType]:TableRenderer,[TextType$1]:TextRenderer,[ThematicBreakType]:ThematicBreakRenderer,_fallback:function S(C,R){return console.warn(`Cannot find render for \`${C.type}\` type node with key \`${R}\`:`,C),null}},ReactMarkdown=S=>{const{presetDefinitionMap:C,customizedRendererMap:R,preferCodeWrap:O=!1,showCodeLineno:I=!0,text:N,themeScheme:L="lighten",className:B,style:j}=S,F=React.useMemo(()=>parser.parse(N),[N]),V=React.useMemo(()=>calcDefinitionMap(F).definitionMap,[F]),[K]=React.useState(()=>new ReactMarkdownViewModel({definitionMap:{...C,...V},rendererMap:buildNodeRendererMap(R),preferCodeWrap:O,showCodeLineno:I,themeScheme:L})),W=React.useMemo(()=>({viewmodel:K}),[K]),X=mergeClasses(rootCls,L==="darken"&&astClasses.rootDarken,B);return React.useEffect(()=>{K.preferCodeWrap$.next(O)},[K,O]),React.useEffect(()=>{K.showCodeLineno$.next(I)},[K,I]),React.useEffect(()=>{K.themeScheme$.next(L)},[K,L]),jsxRuntimeExports.jsx("div",{className:X,style:j,children:jsxRuntimeExports.jsx(NodeRendererContextType.Provider,{value:W,children:jsxRuntimeExports.jsx(NodesRenderer,{nodes:F.children})})})},rootCls=mergeStyles$1(astClasses.root,{wordBreak:"break-all",userSelect:"unset",[astClasses.listItem]:{[`> ${astClasses.list}`]:{marginLeft:"1.2em"}},"> :last-child":{marginBottom:0}}),MarkdownViewer=({content:S})=>{const C=useClasses$k(),[R,O]=reactExports.useState("preview"),I=reactExports.useCallback(L=>{O(L)},[]),N=useLocStrings();return S?jsxRuntimeExports.jsxs("div",{className:C.content,children:[jsxRuntimeExports.jsx("div",{className:C.groupWrapper,children:jsxRuntimeExports.jsxs("div",{className:C.buttonGroup,children:[jsxRuntimeExports.jsx(Button$2,{value:"preview",size:"small",appearance:R==="preview"?void 0:"transparent",onClick:()=>I("preview"),children:N.Preview}),jsxRuntimeExports.jsx(Button$2,{value:"raw",size:"small",appearance:R==="raw"?void 0:"transparent",onClick:()=>I("raw"),children:N.Raw})]})}),R==="preview"?jsxRuntimeExports.jsx(ReactMarkdown,{text:`${S}`}):null,R==="raw"?jsxRuntimeExports.jsx("div",{style:{marginTop:6},children:`${S}`}):null]}):jsxRuntimeExports.jsx(MessageBar,{intent:"info",children:N["No content"]})},useClasses$k=makeStyles({content:{wordBreak:"break-all",whiteSpace:"break-spaces",...shorthands.overflow("auto")},groupWrapper:{display:"flex",flexDirection:"row-reverse",marginBottom:"12px"},buttonGroup:{display:"inline-flex",...shorthands.borderRadius("5px"),backgroundColor:tokens.colorNeutralBackground5}}),EmbeddingNodeInfo=()=>{var I,N;const S=useSelectedSpan(),C=(I=S==null?void 0:S.attributes)==null?void 0:I["embedding.model"],R=JSON.parse(((N=S==null?void 0:S.attributes)==null?void 0:N["embedding.embeddings"])??"[]")??[],O=useLocStrings();return jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("span",{children:C})}),R.map((L,B)=>jsxRuntimeExports.jsxs(Card,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("i",{children:O.Embedded_text})}),L["embedding.text"]?jsxRuntimeExports.jsx(MarkdownViewer,{content:L["embedding.text"]}):null]},B))]})},CollapsibleTextArea=({children:S})=>{const[C,R]=reactExports.useState(!0),O=useClasses$j();return jsxRuntimeExports.jsxs("div",{className:O.wrapper,children:[jsxRuntimeExports.jsx(Button$2,{icon:C?jsxRuntimeExports.jsx(TextWrapOff16Regular,{}):jsxRuntimeExports.jsx(TextWrap16Regular,{}),onClick:()=>R(!C),size:"small"}),jsxRuntimeExports.jsx("pre",{className:`${C&&O.wrap} ${O.pre}`,children:S})]})},useClasses$j=makeStyles({wrapper:{width:"95%",height:"100%",paddingLeft:tokens.spacingHorizontalM,color:tokens.colorNeutralForeground1,display:"flex",flexDirection:"column"},wrap:{wordBreak:"break-all",whiteSpace:"pre-wrap"},pre:{marginTop:0}}),ErrorsTab=()=>{var j;const S=useClasses$i(),C=useSelectedSpan(),R=(C==null?void 0:C.events)??[],[O,I]=reactExports.useState((j=R[0])==null?void 0:j.name),N=R.find(F=>F.name===O),L=useIsDark(),B=useLocStrings();return jsxRuntimeExports.jsx(Card,{style:{height:"100%"},children:R.length===0?jsxRuntimeExports.jsxs("div",{className:S.emptyWrapper,children:[jsxRuntimeExports.jsx(ShieldCheckmark24Regular,{}),jsxRuntimeExports.jsxs(Text$2,{className:S.emptyText,children:[" ",B.No_Events_found]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx(TabList,{selectedValue:O,onTabSelect:(F,V)=>{I(V.value)},children:R.map(F=>jsxRuntimeExports.jsx(Tab$1,{value:F.name,children:F.name},F.name))})}),jsxRuntimeExports.jsx("div",{className:S.wrapper,children:N&&jsxRuntimeExports.jsx(JsonView,{src:N,collapseStringsAfterLength:1e4,theme:"vscode",dark:L,customizeNode:({node:F,indexOrName:V})=>{if(V==="exception.message"||V==="exception.stacktrace")return jsxRuntimeExports.jsx(CollapsibleTextArea,{children:F})}})})]})})},useClasses$i=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%",...shorthands.overflow("auto"),...shorthands.gap("8px")},grid:{flexGrow:1},emptyWrapper:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"},emptyText:{paddingTop:tokens.spacingVerticalM},exceptionText:{width:"100%",paddingLeft:tokens.spacingHorizontalM,color:tokens.colorNeutralForeground1,...shorthands.margin("0")}}),useEvaluationTracesListRow=S=>{const[C,R]=reactExports.useState([]),O=reactExports.useMemo(()=>{const B={};return S.forEach(j=>{var F;(F=j==null?void 0:j.context)!=null&&F.span_id&&(B[j.context.span_id]={...j,children:[],depth:0})}),S.forEach(j=>{var F;if(j.parent_id&&((F=j==null?void 0:j.context)!=null&&F.span_id)&&j.parent_id!==""){const V=B[j.parent_id],K=B[j.context.span_id];K.depth=V.depth+1,V.children.push(K)}}),Object.values(B).filter(j=>!j.parent_id)},[S]),I=reactExports.useCallback(B=>{if(C.includes(B)){const F=findRowById(B,O);if(!F)return;const K=(F.children?findAllDescendants(F):[]).map(X=>{var J;return(J=X==null?void 0:X.context)==null?void 0:J.span_id}).filter(X=>X!==void 0),W=C.filter(X=>X!==B).filter(X=>!K.includes(X));R(W)}else R([...C,B])},[C,O]),N=reactExports.useMemo(()=>{const B=j=>j.reduce((F,V)=>{var X,J;const W=((X=V==null?void 0:V.context)!=null&&X.span_id?C.includes((J=V==null?void 0:V.context)==null?void 0:J.span_id):!1)?B(V.children):[];return[...F,V,...W]},[]);return B(O)},[C,O]),L=reactExports.useCallback(B=>B?C.includes(B):!1,[C]);return{rows:N,toggleSubRows:I,isRowExpanded:L}},findAllDescendants=S=>{let C=[...S.children];return S.children.forEach(R=>{C=[...C,...findAllDescendants(R)]}),C},findRowById=(S,C)=>{var R;for(const O of C){if(((R=O==null?void 0:O.context)==null?void 0:R.span_id)===S)return O;const I=findRowById(S,O.children);if(I)return I}return null},CellExpander=({isExpanded:S=!1,onToggle:C})=>{const R=useClasses$h();return jsxRuntimeExports.jsx("div",{className:R.wrapper,onClick:()=>C&&C(!S),children:S?jsxRuntimeExports.jsx(ChevronDown16Filled,{}):jsxRuntimeExports.jsx(ChevronRight16Filled,{})})},useClasses$h=makeStyles({wrapper:{cursor:"pointer",display:"flex"}}),UNDEFINED_VALUE_PLACEHOLDER="N/A";function KindText({kind:S}){return jsxRuntimeExports.jsx(Badge$2,{appearance:"outline",size:"medium",children:S||UNDEFINED_VALUE_PLACEHOLDER})}function formatDecimal(S){return Math.abs(S=Math.round(S))>=1e21?S.toLocaleString("en").replace(/,/g,""):S.toString(10)}function formatDecimalParts(S,C){if((R=(S=C?S.toExponential(C-1):S.toExponential()).indexOf("e"))<0)return null;var R,O=S.slice(0,R);return[O.length>1?O[0]+O.slice(2):O,+S.slice(R+1)]}function exponent(S){return S=formatDecimalParts(Math.abs(S)),S?S[1]:NaN}function formatGroup(S,C){return function(R,O){for(var I=R.length,N=[],L=0,B=S[0],j=0;I>0&&B>0&&(j+B+1>O&&(B=Math.max(1,O-j)),N.push(R.substring(I-=B,I+B)),!((j+=B+1)>O));)B=S[L=(L+1)%S.length];return N.reverse().join(C)}}function formatNumerals(S){return function(C){return C.replace(/[0-9]/g,function(R){return S[+R]})}}var re=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(S){if(!(C=re.exec(S)))throw new Error("invalid format: "+S);var C;return new FormatSpecifier({fill:C[1],align:C[2],sign:C[3],symbol:C[4],zero:C[5],width:C[6],comma:C[7],precision:C[8]&&C[8].slice(1),trim:C[9],type:C[10]})}formatSpecifier.prototype=FormatSpecifier.prototype;function FormatSpecifier(S){this.fill=S.fill===void 0?" ":S.fill+"",this.align=S.align===void 0?">":S.align+"",this.sign=S.sign===void 0?"-":S.sign+"",this.symbol=S.symbol===void 0?"":S.symbol+"",this.zero=!!S.zero,this.width=S.width===void 0?void 0:+S.width,this.comma=!!S.comma,this.precision=S.precision===void 0?void 0:+S.precision,this.trim=!!S.trim,this.type=S.type===void 0?"":S.type+""}FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function formatTrim(S){e:for(var C=S.length,R=1,O=-1,I;R0&&(O=0);break}return O>0?S.slice(0,O)+S.slice(I+1):S}var prefixExponent;function formatPrefixAuto(S,C){var R=formatDecimalParts(S,C);if(!R)return S+"";var O=R[0],I=R[1],N=I-(prefixExponent=Math.max(-8,Math.min(8,Math.floor(I/3)))*3)+1,L=O.length;return N===L?O:N>L?O+new Array(N-L+1).join("0"):N>0?O.slice(0,N)+"."+O.slice(N):"0."+new Array(1-N).join("0")+formatDecimalParts(S,Math.max(0,C+N-1))[0]}function formatRounded(S,C){var R=formatDecimalParts(S,C);if(!R)return S+"";var O=R[0],I=R[1];return I<0?"0."+new Array(-I).join("0")+O:O.length>I+1?O.slice(0,I+1)+"."+O.slice(I+1):O+new Array(I-O.length+2).join("0")}const formatTypes={"%":(S,C)=>(S*100).toFixed(C),b:S=>Math.round(S).toString(2),c:S=>S+"",d:formatDecimal,e:(S,C)=>S.toExponential(C),f:(S,C)=>S.toFixed(C),g:(S,C)=>S.toPrecision(C),o:S=>Math.round(S).toString(8),p:(S,C)=>formatRounded(S*100,C),r:formatRounded,s:formatPrefixAuto,X:S=>Math.round(S).toString(16).toUpperCase(),x:S=>Math.round(S).toString(16)};function identity$4(S){return S}var map$2=Array.prototype.map,prefixes=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function formatLocale$1(S){var C=S.grouping===void 0||S.thousands===void 0?identity$4:formatGroup(map$2.call(S.grouping,Number),S.thousands+""),R=S.currency===void 0?"":S.currency[0]+"",O=S.currency===void 0?"":S.currency[1]+"",I=S.decimal===void 0?".":S.decimal+"",N=S.numerals===void 0?identity$4:formatNumerals(map$2.call(S.numerals,String)),L=S.percent===void 0?"%":S.percent+"",B=S.minus===void 0?"−":S.minus+"",j=S.nan===void 0?"NaN":S.nan+"";function F(K){K=formatSpecifier(K);var W=K.fill,X=K.align,J=K.sign,oe=K.symbol,pe=K.zero,me=K.width,xe=K.comma,Ae=K.precision,ge=K.trim,Te=K.type;Te==="n"?(xe=!0,Te="g"):formatTypes[Te]||(Ae===void 0&&(Ae=12),ge=!0,Te="g"),(pe||W==="0"&&X==="=")&&(pe=!0,W="0",X="=");var we=oe==="$"?R:oe==="#"&&/[boxX]/.test(Te)?"0"+Te.toLowerCase():"",ke=oe==="$"?O:/[%p]/.test(Te)?L:"",Be=formatTypes[Te],Ie=/[defgprs%]/.test(Te);Ae=Ae===void 0?6:/[gprs]/.test(Te)?Math.max(1,Math.min(21,Ae)):Math.max(0,Math.min(20,Ae));function je(Ke){var Je=we,Xe=ke,ot,tt,Ue;if(Te==="c")Xe=Be(Ke)+Xe,Ke="";else{Ke=+Ke;var et=Ke<0||1/Ke<0;if(Ke=isNaN(Ke)?j:Be(Math.abs(Ke),Ae),ge&&(Ke=formatTrim(Ke)),et&&+Ke==0&&J!=="+"&&(et=!1),Je=(et?J==="("?J:B:J==="-"||J==="("?"":J)+Je,Xe=(Te==="s"?prefixes[8+prefixExponent/3]:"")+Xe+(et&&J==="("?")":""),Ie){for(ot=-1,tt=Ke.length;++otUe||Ue>57){Xe=(Ue===46?I+Ke.slice(ot+1):Ke.slice(ot))+Xe,Ke=Ke.slice(0,ot);break}}}xe&&!pe&&(Ke=C(Ke,1/0));var dt=Je.length+Ke.length+Xe.length,gt=dt>1)+Je+Ke+Xe+gt.slice(dt);break;default:Ke=gt+Je+Ke+Xe;break}return N(Ke)}return je.toString=function(){return K+""},je}function V(K,W){var X=F((K=formatSpecifier(K),K.type="f",K)),J=Math.max(-8,Math.min(8,Math.floor(exponent(W)/3)))*3,oe=Math.pow(10,-J),pe=prefixes[8+J/3];return function(me){return X(oe*me)+pe}}return{format:F,formatPrefix:V}}var locale$1,format$1,formatPrefix;defaultLocale$1({thousands:",",grouping:[3],currency:["$",""]});function defaultLocale$1(S){return locale$1=formatLocale$1(S),format$1=locale$1.format,formatPrefix=locale$1.formatPrefix,locale$1}function precisionFixed(S){return Math.max(0,-exponent(Math.abs(S)))}function precisionPrefix(S,C){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(exponent(C)/3)))*3-exponent(Math.abs(S)))}function precisionRound(S,C){return S=Math.abs(S),C=Math.abs(C)-S,Math.max(0,exponent(C)-exponent(S))+1}function formatInt(S){return Math.abs(S)<1e6?format$1(",")(S):format$1("0.2s")(S)}function formatFloat(S){const C=Math.abs(S);return C===0?"0.00":C<.01?format$1(".2e")(S):C<1e3?format$1("0.2f")(S):format$1("0.2s")(S)}function formatNumber(S){return Number.isInteger(S)?formatInt(S):formatFloat(S)}function createNumberFormatter(S){return C=>typeof C!="number"?"--":S(C)}const intFormatter=createNumberFormatter(formatInt),floatFormatter=createNumberFormatter(formatFloat),numberFormatter=createNumberFormatter(formatNumber),timeFormat$1=S=>S?new Date(S).toLocaleString([],{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"--",LatencyText=({startTimeISOString:S,endTimeISOString:C,textSize:R,tipTextSize:O})=>{const I=useClasses$g(),N=S?new Date(S):void 0,L=C?new Date(C):void 0,B=N&&L?L.getTime()-N.getTime():void 0,j=reactExports.useMemo(()=>B===void 0?"N/A":B===0?"0 ms":B<10?formatFloat(B)+"ms":formatFloat(B/1e3)+"s",[B]);return jsxRuntimeExports.jsx(Tooltip$1,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Text$2,{size:O,weight:"bold",block:!0,children:"Start Time"}),jsxRuntimeExports.jsx(Text$2,{size:O,block:!0,children:timeFormat$1(S)}),jsxRuntimeExports.jsx(Text$2,{size:O,weight:"bold",block:!0,children:"End Time"}),jsxRuntimeExports.jsx(Text$2,{size:O,block:!0,children:timeFormat$1(C)})]}),relationship:"label",children:jsxRuntimeExports.jsxs("div",{className:I.wrapper,children:[jsxRuntimeExports.jsx(Clock20Regular,{}),jsxRuntimeExports.jsx(Text$2,{size:R,children:j})]})})},useClasses$g=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center","> svg":{marginRight:"5px"}}});function StatusText({statusCode:S,showText:C=!1,textSize:R,tooltipContent:O}){const I=useClasses$f(),[N,L]=reactExports.useMemo(()=>{switch(S==null?void 0:S.toLowerCase()){case"ok":return[jsxRuntimeExports.jsx(CheckmarkCircle20Regular,{},"ok"),tokens.colorPaletteGreenForeground1];case"error":return[jsxRuntimeExports.jsx(DismissCircle20Regular,{},"error"),tokens.colorPaletteRedForeground1];case"unset":return[jsxRuntimeExports.jsx(ErrorCircle20Regular,{},"unset"),tokens.colorPaletteYellowForeground1];default:return[UNDEFINED_VALUE_PLACEHOLDER,tokens.colorPaletteYellowForeground1]}},[S]);return jsxRuntimeExports.jsx(Tooltip$1,{content:O??S??"",relationship:"label",children:jsxRuntimeExports.jsxs("div",{className:I.wrapper,style:{color:L},children:[N,C&&jsxRuntimeExports.jsx(Text$2,{size:R,children:S})]})})}const useClasses$f=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"center","> svg":{marginRight:"5px"}}});function TimeText({time:S}){const C=timeFormat$1(S);return jsxRuntimeExports.jsx("time",{children:C})}function TokenText({token:S,info:C}){const R=useClasses$e(),O=typeof S=="number"?intFormatter(S):S;return jsxRuntimeExports.jsxs("div",{className:R.wrapper,children:[jsxRuntimeExports.jsx(NumberCircle020Regular,{}),C?jsxRuntimeExports.jsx(Tooltip$1,{content:C,relationship:"description",children:jsxRuntimeExports.jsx("div",{style:{lineHeight:"30px",marginLeft:-24,paddingLeft:24},children:O})}):jsxRuntimeExports.jsx(Text$2,{children:O})]})}const useClasses$e=makeStyles({wrapper:{display:"inline-flex",flexDirection:"row",alignItems:"center","> svg":{marginRight:"5px"}}}),CellWrapper=({children:S})=>{const C=useClasses$d();return jsxRuntimeExports.jsx("div",{className:C.cellWrapper,children:S})},TextCellWrapper=({children:S})=>{const C=useClasses$d();return jsxRuntimeExports.jsx("div",{className:C.textCellWrapper,children:jsxRuntimeExports.jsx("p",{className:C.textCellP,children:S})})},useClasses$d=makeStyles({cellWrapper:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%"},textCellWrapper:{display:"flex",flexDirection:"row",alignItems:"center",height:"100%",width:"100%"},textCellP:{wordWrap:"break-word",maxWidth:"100%",lineHeight:tokens.lineHeightBase200,fontSize:tokens.fontSizeBase300,maxHeight:"100%",whiteSpace:"normal",...shorthands.padding(tokens.spacingVerticalS,tokens.spacingHorizontalXS)}}),isValidJson=S=>{if(typeof S=="string")return!1;try{return JSON.stringify(S),!0}catch{return!1}},TraceListJsonCell=({jsonObject:S,isViewDetailEnabled:C=!1})=>{const R=isValidJson(S);return jsxRuntimeExports.jsx(CellWrapper,{children:R?jsxRuntimeExports.jsx(TraceListObjectCell,{object:S,isViewDetailEnabled:C}):jsxRuntimeExports.jsx(TextCellWrapper,{children:formatText(String(S))})})},TraceListObjectCell=({object:S,isViewDetailEnabled:C})=>{const R=useIsDark();return C?jsxRuntimeExports.jsxs(Dialog,{children:[jsxRuntimeExports.jsx(DialogTrigger,{children:jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",height:"100%",width:"100%",marginTop:"12px",lineHeight:"16px"},children:jsxRuntimeExports.jsx(JsonView,{src:S,enableClipboard:!1,collapsed:1,dark:R,theme:"vscode"})})}),jsxRuntimeExports.jsx(DialogSurface,{children:jsxRuntimeExports.jsx("div",{style:{height:"800px",width:"800ppx",marginTop:"12px",lineHeight:"16px",overflow:"auto"},children:jsxRuntimeExports.jsx(JsonView,{src:S,enableClipboard:!0,collapseStringsAfterLength:200,dark:R,theme:"vscode"})})})]}):jsxRuntimeExports.jsx("div",{style:{overflow:"hidden",height:"100%",width:"100%",marginTop:"12px",lineHeight:"16px"},children:jsxRuntimeExports.jsx(JsonView,{src:S,enableClipboard:!1,collapseStringsAfterLength:50,collapsed:1,dark:R,theme:"vscode"})})},MAX_LENGTH=80;function formatText(S){return S.length>MAX_LENGTH?`${S.slice(0,MAX_LENGTH)}...`:S}const useClasses$c=makeStyles({grid:{},row:{cursor:"pointer"},nameCell:{color:tokens.colorBrandForeground1,fontWeight:tokens.fontWeightSemibold,":hover":{...shorthands.textDecoration("underline")}},kindCell:{display:"flex",alignItems:"center",justifyContent:"flex-start",height:"100%",...shorthands.gap("4px")}}),EvaluationTracesList=({evaluationSpans:S,className:C})=>{const R=useClasses$c(),O=useIsDark(),{rows:I,toggleSubRows:N,isRowExpanded:L}=useEvaluationTracesListRow(S),B=useLocStrings();return jsxRuntimeExports.jsx(DataGrid$1$1,{className:`${mergeStyles$1(R.grid,C)} ${O?"rdg-dark":"rdg-light"}`,rowClass:()=>R.row,columns:[{key:"kind",name:B.Kind,minWidth:150,maxWidth:300,renderCell:({row:j})=>{var V,K,W;const F=((V=j==null?void 0:j.children)==null?void 0:V.length)>0;return jsxRuntimeExports.jsxs("div",{className:R.kindCell,style:{paddingLeft:j.depth*16+(F?0:20)},children:[F&&jsxRuntimeExports.jsx(CellExpander,{isExpanded:L((K=j==null?void 0:j.context)==null?void 0:K.span_id),onToggle:()=>{var X,J;(X=j==null?void 0:j.context)!=null&&X.span_id&&N((J=j==null?void 0:j.context)==null?void 0:J.span_id)}}),jsxRuntimeExports.jsx(KindText,{kind:(W=j.attributes)==null?void 0:W.span_type})]})}},{key:"name",name:B.Name,minWidth:150,maxWidth:300,renderCell:({row:j})=>jsxRuntimeExports.jsx(Tooltip$1,{content:j.name??"",relationship:"label",children:jsxRuntimeExports.jsx("span",{className:R.nameCell,title:j.name,children:j.name})})},{key:"input",name:B.Input,minWidth:200,renderCell:({row:j})=>{var F;return jsxRuntimeExports.jsx(TraceListJsonCell,{isViewDetailEnabled:!0,jsonObject:JSON.parse(((F=j.attributes)==null?void 0:F.inputs)??"{}")})}},{key:"output",name:B.Output,minWidth:200,renderCell:({row:j})=>{var F;return jsxRuntimeExports.jsx(TraceListJsonCell,{isViewDetailEnabled:!0,jsonObject:JSON.parse(((F=j.attributes)==null?void 0:F.output)??"{}")})}},{key:"start_time",name:B.Start_time,minWidth:150,renderCell:({row:j})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:j.start_time})})},{key:"end_time",name:B.End_time,minWidth:150,renderCell:({row:j})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:j.end_time})})},{key:"latency",name:B.Latency,minWidth:120,renderCell:({row:j})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:j.start_time,endTimeISOString:j.end_time})})},{key:"total_tokens",name:B.Total_tokens,minWidth:120,renderCell:({row:j})=>{var F;return jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(TokenText,{token:Number.parseInt(((F=j.attributes)==null?void 0:F["__computed__.cumulative_token_count.total"])??"0")})})}},{key:"status",name:B.Status,minWidth:120,renderCell:({row:j})=>{var F;return jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(StatusText,{statusCode:(F=j.status)==null?void 0:F.status_code})})}}],rows:I,headerRowHeight:26,rowHeight:80,defaultColumnOptions:{resizable:!0}})},MetricTag=({tag:S})=>{const C=useClasses$b(),R=reactExports.useMemo(()=>typeof S.value=="number"?formatNumber(S.value):S.value,[S.value]);return jsxRuntimeExports.jsxs(Badge$2,{className:C.wrapper,size:"medium",shape:"rounded",appearance:"outline",children:[jsxRuntimeExports.jsxs("span",{className:C.name,children:[S.name," "]}),jsxRuntimeExports.jsx("span",{className:C.data,children:R})]})},useClasses$b=makeStyles({wrapper:{display:"inline-flex",fontSize:"12px",...shorthands.padding("0px","8px","1px"),...shorthands.borderColor(tokens.colorPaletteGreenBorder2),...shorthands.gap("0.5rem")},name:{color:tokens.colorPaletteGreenBorder2,fontWeight:tokens.fontWeightRegular},data:{color:tokens.colorNeutralForeground1,fontWeight:tokens.fontWeightRegular}}),EvaluationsTab=()=>{var j,F,V;const S=useClasses$a(),C=useEvaluationSpansOfSelectedSpan(),[R,O]=reactExports.useState((j=C[0])==null?void 0:j.evaluationName),I=((F=C.find(K=>K.evaluationName===R))==null?void 0:F.evaluationTraces)??[],N=useSelectedTrace(),L=(N==null?void 0:N.evaluations)??{},B=((V=L[R??""])==null?void 0:V.outputs)??{};return jsxRuntimeExports.jsxs(Card,{style:{height:"100%"},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx(TabList,{selectedValue:R,onTabSelect:(K,W)=>{O(W.value)},children:C.map(K=>jsxRuntimeExports.jsx(Tab$1,{value:K.evaluationName,children:K.evaluationName},K.evaluationName))})}),jsxRuntimeExports.jsxs("div",{className:S.wrapper,children:[R&&L[R]&&Object.keys(B).map(K=>{const W=B[K];return W?jsxRuntimeExports.jsx(MetricTag,{tag:{name:K,value:W}},K):null}),jsxRuntimeExports.jsx(EvaluationTracesList,{evaluationSpans:I,className:S.grid})]})]})},useClasses$a=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%",...shorthands.gap("8px")},grid:{flexGrow:1}}),useMessageCardClasses=makeStyles({card:{...shorthands.borderRadius("8px"),...shorthands.borderColor(tokens.colorNeutralStroke1),...shorthands.borderWidth("1px"),...shorthands.borderStyle("solid"),...shorthands.padding("16px"),...shorthands.margin("16px")}}),LLMNodeInvocationParametersTab=({invocationParameters:S})=>{const C=useMessageCardClasses();return jsxRuntimeExports.jsx(Card,{className:C.card,children:jsxRuntimeExports.jsx(JsonView,{src:S})})};var ChatMessageCategory=(S=>(S.System="system",S.Error="error",S.Chatbot="chatbot",S.User="user",S))(ChatMessageCategory||{}),ChatMessageType=(S=>(S.Message="message",S.SessionSplit="session-split",S))(ChatMessageType||{});const defaultLocStrings$1={CopyToClipboard:"Copy to clipboard",CopyToClipboard_Copying:"Copying...",CopyToClipboard_Copied:"Copied!",CopyToClipboard_Failed:"Failed!",Header_Clear:"Click to clear all chat histories",Header_Close:"Click to close chat box",Header_EnterFullScreen:"Click to enter full screen mode",Header_ExitFullScreen:"Click to exit full screen mode",Header_Title:"Chat",Input_Placeholder:"Input anything to test...",MessageError_HideDetail:"Hide Detail",MessageError_ShowDetail:"Show Detail",MessageStatus_TimeSpentDesc:"time spent",MessageStatus_TimeSpentDscCapitalized:"Time spent",MessageStatus_TimeSpent_Unit:"sec",MessageStatus_TokensDesc:"Total tokens for generating this",MessageStatus_TokensUint:"tokens",SessionSplit_Desc:"Your session start from here.",Tooltip_Bottom:"Only default variants will be used for chat, if you want to test variants please try bulk test. For chatbot and test app bot, it will only show the chat output.",Tooltip_TotalTokens:"Total tokens",Typing:"Generating chat output for you"};class ChatboxViewModel{constructor(C){this.calcContentForCopy=K=>this.calcContentForCopy$.getSnapshot()(K),this.monitorInputContentChange=K=>this.inputContentChangeTick$.subscribeStateChange(K),this.notifyInputContentChange=()=>{this.inputContentChangeTick$.setState(K=>K+1)},this.sendMessage=K=>{const W=this.editorRef.current;if(!W){console.log("!!!editorRef is not mounted.");return}const X=K??W.getContent(),J=this.sendMessage$.getSnapshot(),pe=this.makeUserMessage$.getSnapshot()(X);this.messages$.setState(me=>[...me,pe]),W.clear(),this.isOthersTyping$.next(!0),J(X,this,pe).then(me=>{me!==void 0&&this.messages$.setState(xe=>[...xe,me])}).finally(()=>{this.isOthersTyping$.next(!1)})},this.setCalcContentForCopy=K=>{this.calcContentForCopy$.next(K)},this.setMakeUserMessage=K=>{this.makeUserMessage$.next(K)},this.setSendMessage=K=>{this.sendMessage$.next(K)},this.sessionSplit=K=>{const W={id:uuid_1.v4(),type:ChatMessageType.SessionSplit,history:[{category:ChatMessageCategory.System,from:"system",content:K??"",timestamp:new Date().toISOString()}]};return this.messages$.setState(X=>[...X,W]),W};const{alias:R="",initialDisabled:O=!1,initialMessages:I=[],locStrings:N=defaultLocStrings$1,calcContentForCopy:L=K=>typeof K.content=="string"?K.content:JSON.stringify(K.content),makeUserMessage:B=K=>({id:uuid_1.v4(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.User,from:this.alias$.getSnapshot(),timestamp:new Date().toISOString(),content:K}]}),sendMessage:j=async K=>({id:uuid_1.v4(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.Chatbot,from:"chatbot",timestamp:new Date().toISOString(),content:K}]})}=C;this.editorRef={current:null};const F=new State(0),V=Computed.fromObservables([F],()=>{var K;return(K=this.editorRef.current)==null?void 0:K.isEmpty()});this.alias$=new State(R),this.disabled$=new State(O),this.inputContentChangeTick$=F,this.isEditorEmpty$=V,this.isOthersTyping$=new State(!1),this.locStrings$=new State(N),this.messages$=new State(I),this.calcContentForCopy$=new State(L),this.makeUserMessage$=new State(B),this.sendMessage$=new State(j)}}const viewmodel=new ChatboxViewModel({sendMessage:()=>Promise.resolve({id:Date.now(),type:ChatMessageType.Message,history:[{category:ChatMessageCategory.System,from:"system",timestamp:new Date().toISOString(),content:"sendMessage not implemented!"}]})});React.createContext({viewmodel});function useEventCallback$1(S){const C=reactExports.useRef(S);return reactExports.useLayoutEffect(()=>{C.current=S}),reactExports.useCallback((...R)=>{const O=C.current;return O(...R)},[])}const CopyButton=S=>{const{pendingText:C,copyingText:R,copiedText:O,failedText:I,calcContentForCopy:N,className:L,delay:B=1500}=S,[j,F]=React.useState(0),V=useStyles$c(),K=j===0?C:j===1?R:j===2?O:j===3?I:"",W=j!==0,X=useEventCallback$1(()=>{if(j===0){F(1);try{const J=N();copy$4(J),F(2)}catch{F(3)}}});return React.useEffect(()=>{if(j===2||j===3){const J=setTimeout(()=>F(0),B);return()=>{J&&clearTimeout(J)}}},[j,B]),jsxRuntimeExports.jsx(Tooltip$1,{relationship:"label",withArrow:!0,content:K,children:jsxRuntimeExports.jsx(Button$2,{appearance:"transparent",className:mergeClasses(V.copyButton,L),disabled:W,as:"button",icon:j===0?jsxRuntimeExports.jsx(Copy20Regular,{}):jsxRuntimeExports.jsx(CopyArrowRight20Regular,{}),onClick:X})})};CopyButton.displayName="CopyButton";const useStyles$c=makeStyles({copyButton:{cursor:"pointer"}}),defaultUploadPopoverLocStrings={Add:"Add",AddAnImage:"Add an image",PasteImageOrLinkHere:"Paste image or link here",UploadFromThisDevice:"Upload from this device"},ImageView=S=>{const{src:C,alt:R,loading:O=!1,width:I,height:N,styles:L}=S;return C?O?jsxRuntimeExports.jsx("div",{children:"Loading..."}):jsxRuntimeExports.jsx("div",{className:L==null?void 0:L.root,children:jsxRuntimeExports.jsx("img",{className:L==null?void 0:L.image,src:C,alt:R,width:I,height:N})}):jsxRuntimeExports.jsx("div",{children:"This image can not be previewed."})},ImageViewModal=S=>{const{src:C,alt:R,visible:O,loading:I=!1,width:N,height:L,onDismiss:B}=S,j=useStyles$b(),F=jsxRuntimeExports.jsxs("div",{className:j.container,children:[jsxRuntimeExports.jsxs("div",{className:j.header,children:[jsxRuntimeExports.jsx("h2",{className:j.heading,children:"Preview"}),jsxRuntimeExports.jsx(Button$2,{as:"button",appearance:"transparent",icon:jsxRuntimeExports.jsx(Dismiss24Regular,{}),className:j.dismissBtn,onClick:B})]}),jsxRuntimeExports.jsx("div",{className:j.main,children:jsxRuntimeExports.jsx(ImageView,{src:C,alt:R,loading:I,width:N,height:L,styles:{image:j.image}})})]});return jsxRuntimeExports.jsx(Modal,{isOpen:O,isBlocking:!1,onDismiss:B,children:F})},useStyles$b=makeStyles({container:{display:"flex",flexDirection:"column",flexWrap:"nowrap",...shorthands.padding("16px")},header:{...shorthands.flex(0,0,"auto"),display:"flex",flexDirection:"row",flexWrap:"nowrap",justifyContent:"space-between",marginBottom:"20px"},heading:{...shorthands.margin(0),fontWeight:FontWeights.semibold,fontSize:"inherit"},dismissBtn:{"&&":{fontSize:"16px",lineHeight:"16px",height:"16px",width:"16px",color:tokens.colorNeutralStroke1}},main:{...shorthands.overflow("auto"),display:"flex",justifyContent:"center",alignItems:"center"},image:{width:"auto",height:"auto",maxWidth:"60vw",maxHeight:"60vh"}}),IMAGE_WIDTH="48px",MASK_SELECTOR_CLASS_NAME="__MASK_SELECTOR_CLASS_NAME__",UploadPopoverImagePreview=S=>{const{image:C,alt:R,isReadonly:O,onClickDelete:I}=S,[N,L]=React.useState(!1),B=useStyles$a(),j=React.useMemo(()=>{if(C)return typeof C=="string"?C:URL.createObjectURL(C)},[C]),F=React.useCallback(()=>{L(K=>!K)},[]),V=j||"";return jsxRuntimeExports.jsxs("div",{className:mergeClasses(B.root,O?B.readonlyRoot:void 0),children:[jsxRuntimeExports.jsxs("div",{className:B.imageContainer,children:[jsxRuntimeExports.jsx("img",{decoding:"async",className:B.image,src:V,alt:R}),jsxRuntimeExports.jsx("div",{"aria-hidden":!0,className:mergeClasses(B.mask,MASK_SELECTOR_CLASS_NAME),onClick:F,role:"button",children:jsxRuntimeExports.jsx(ZoomIn20Regular,{})})]}),!O&&jsxRuntimeExports.jsx(Button$2,{as:"button",className:B.closeButton,icon:jsxRuntimeExports.jsx(Dismiss20Regular,{}),onClick:I}),jsxRuntimeExports.jsx(ImageViewModal,{src:V,alt:R||"",visible:N,onDismiss:F})]})},useStyles$a=makeStyles({root:{boxSizing:"border-box",display:"flex",height:"32px",width:"80px",...shorthands.border("1px","solid",tokens.colorNeutralStroke2),...shorthands.borderRadius("4px")},readonlyRoot:{width:"48px"},imageContainer:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:IMAGE_WIDTH,[`:hover .${MASK_SELECTOR_CLASS_NAME}`]:{visibility:"visible"}},image:{maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto"},mask:{visibility:"hidden",cursor:"pointer",position:"absolute",top:0,left:0,width:`calc(${IMAGE_WIDTH} - 2px)`,height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",color:tokens.colorNeutralForegroundStaticInverted,...shorthands.borderRadius("4px",0,0,"4px")},closeButton:{width:"32px",...shorthands.border(0)}}),UploadPopoverTrigger=React.forwardRef((S,C)=>jsxRuntimeExports.jsx(Button$2,{...S,ref:C,as:"button",appearance:"transparent",size:"medium",icon:jsxRuntimeExports.jsx(Attach16Regular,{})}));UploadPopoverTrigger.displayName="UploadPopoverTrigger";const mergeStyleSlots=(S,...C)=>{const R={...S};for(const O of Object.keys(S))R[O]=mergeClasses(S[O],...C.map(I=>I==null?void 0:I[O]));return R},UploadPopover=React.forwardRef(({isUploading:S,disabled:C,trigger:R=jsxRuntimeExports.jsx(UploadPopoverTrigger,{}),locStrings:O=defaultUploadPopoverLocStrings,styles:I,events:N,onUpload:L,onRenderImagePreview:B},j)=>{const F=mergeStyleSlots(useStyles$9(),I),{onDelete:V,onInputBlur:K,onPaste:W,onLocalUpload:X}=N??{};React.useImperativeHandle(j,()=>({open(){oe(!0)},close(){oe(!1)},reset:()=>{we()},retrieve:()=>xe}));const[J,oe]=React.useState(!1),[pe,me]=React.useState(""),[xe,Ae]=React.useState(void 0),ge=React.useRef(null),Te=React.useCallback((Je,Xe)=>{oe(Xe.open||!1)},[]),we=React.useCallback(()=>{me(""),Ae(void 0),ge.current&&(ge.current.value="")},[]),ke=React.useCallback(Je=>{const Xe=Je[0];Ae(Xe),W==null||W(Xe)},[W]),Be=React.useCallback(Je=>{Je.clipboardData.files&&ke&&ke(Je.clipboardData.files)},[ke]),Ie=React.useCallback(()=>{K==null||K(pe),Ae(pe)},[pe,K]),je=React.useCallback(()=>{xe&&L(xe)},[xe,L]),Ke=React.useMemo(()=>B?B({cachedImage:xe,customerInputContent:pe,isReadonly:C||S||!1}):jsxRuntimeExports.jsx(UploadPopoverImagePreview,{image:xe||pe,alt:pe||"",isReadonly:S,onClickDelete:()=>{we(),V==null||V()}}),[pe,xe,we,C,S,V,B]);return jsxRuntimeExports.jsxs(Popover,{positioning:"above-end",open:J,onOpenChange:Te,children:[jsxRuntimeExports.jsx(PopoverTrigger,{disableButtonEnhancement:!0,children:R}),jsxRuntimeExports.jsxs(PopoverSurface,{className:F.attachUploadPopover,children:[jsxRuntimeExports.jsxs("div",{className:F.attachUploadHeader,children:[jsxRuntimeExports.jsx("span",{children:O.AddAnImage}),jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:C,appearance:"transparent",icon:jsxRuntimeExports.jsx(Dismiss24Regular,{}),onClick:()=>{oe(!1)}})]}),jsxRuntimeExports.jsxs("div",{className:F.attachUploadInputWrapper,children:[xe?Ke:jsxRuntimeExports.jsx(Input,{className:F.attachUploadInput,value:pe,disabled:C,placeholder:O.PasteImageOrLinkHere,onChange:(Je,Xe)=>{Ae(void 0),me(Xe.value)},onPaste:Be,onBlur:Ie}),jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:C||S||!xe&&!pe,className:F.addButton,onClick:je,children:S?jsxRuntimeExports.jsx(Spinner,{size:"tiny"}):O.Add})]}),jsxRuntimeExports.jsx("input",{tabIndex:-1,"aria-hidden":!0,ref:ge,disabled:C,className:F.invisibleFileInput,onChange:Je=>{var ot;const Xe=(ot=Je.target.files)==null?void 0:ot[0];Xe&&(X==null||X(Xe)),Ae(Xe)},type:"file",accept:"image/*"}),jsxRuntimeExports.jsx("div",{className:F.triggerUploadButton,children:jsxRuntimeExports.jsx(Button$2,{as:"button",disabled:C,appearance:"transparent",icon:jsxRuntimeExports.jsx(ArrowUpload24Regular,{}),onClick:()=>{var Je;(Je=ge.current)==null||Je.click()},children:O.UploadFromThisDevice})})]})]})});UploadPopover.displayName="UploadPopover";const useStyles$9=makeStyles({attachUploadPopover:{width:"400px",backgroundColor:tokens.colorNeutralBackground1,...shorthands.padding("12px")},attachUploadHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",fontWeight:500,fontSize:"16px",lineHeight:"22px"},attachUploadInputWrapper:{marginTop:"8px",display:"flex",columnGap:"8px",justifyContent:"space-between"},attachUploadInput:{flexGrow:1},addButton:{minWidth:"52px"},invisibleFileInput:{display:"none"},triggerUploadButton:{marginTop:"8px",display:"flex",justifyContent:"space-between"}});function DefaultMessageContentRenderer(S){const{content:C,className:R}=S,O=useStyles$8(),I=mergeClasses(O.content,R);if(typeof C=="string")return jsxRuntimeExports.jsx("p",{className:I,children:C});const N=JSON.stringify(C,null,2);return jsxRuntimeExports.jsx("pre",{className:I,children:N})}DefaultMessageContentRenderer.displayName="DefaultMessageContentRenderer";const useStyles$8=makeStyles({content:{...shorthands.overflow("auto"),wordBreak:"break-all",whiteSpace:"break-spaces"}});function DefaultMessageErrorRenderer(S){const{error:C,locStrings:R,className:O}=S,[I,N]=React.useState(!1),L=useStyles$7(),B=mergeClasses(L.errorMessageDetail,!I&&L.errorMessageDetailHidden,O);return jsxRuntimeExports.jsxs(React.Fragment,{children:[jsxRuntimeExports.jsx("p",{children:jsxRuntimeExports.jsx(Link$1,{onClick:()=>N(j=>!j),children:I?R.MessageError_HideDetail:R.MessageError_ShowDetail})}),jsxRuntimeExports.jsx("p",{className:B,children:C})]})}DefaultMessageErrorRenderer.displayName="DefaultMessageErrorRenderer";const useStyles$7=makeStyles({errorMessageDetail:{...shorthands.margin("0","0","0","0"),wordBreak:"break-word",whiteSpace:"break-spaces"},errorMessageDetailHidden:{display:"none"}});function DefaultMessagePaginationRenderer(S){const{message:C,current:R,className:O,setCurrent:I}=S,N=C.history.length,L=()=>{R>0&&I(R-1)},B=()=>{R=tt?ot:""+Array(tt+1-et.length).join(Ue)+ot},ge={s:Ae,z:function(ot){var tt=-ot.utcOffset(),Ue=Math.abs(tt),et=Math.floor(Ue/60),dt=Ue%60;return(tt<=0?"+":"-")+Ae(et,2,"0")+":"+Ae(dt,2,"0")},m:function ot(tt,Ue){if(tt.date()1)return ot(Qe[0])}else{var lt=tt.name;we[lt]=tt,dt=lt}return!et&&dt&&(Te=dt),dt||!et&&Te},je=function(ot,tt){if(Be(ot))return ot.clone();var Ue=typeof tt=="object"?tt:{};return Ue.date=ot,Ue.args=arguments,new Je(Ue)},Ke=ge;Ke.l=Ie,Ke.i=Be,Ke.w=function(ot,tt){return je(ot,{locale:tt.$L,utc:tt.$u,x:tt.$x,$offset:tt.$offset})};var Je=function(){function ot(Ue){this.$L=Ie(Ue.locale,null,!0),this.parse(Ue),this.$x=this.$x||Ue.x||{},this[ke]=!0}var tt=ot.prototype;return tt.parse=function(Ue){this.$d=function(et){var dt=et.date,gt=et.utc;if(dt===null)return new Date(NaN);if(Ke.u(dt))return new Date;if(dt instanceof Date)return new Date(dt);if(typeof dt=="string"&&!/Z$/i.test(dt)){var Qe=dt.match(pe);if(Qe){var lt=Qe[2]-1||0,ht=(Qe[7]||"0").substring(0,3);return gt?new Date(Date.UTC(Qe[1],lt,Qe[3]||1,Qe[4]||0,Qe[5]||0,Qe[6]||0,ht)):new Date(Qe[1],lt,Qe[3]||1,Qe[4]||0,Qe[5]||0,Qe[6]||0,ht)}}return new Date(dt)}(Ue),this.init()},tt.init=function(){var Ue=this.$d;this.$y=Ue.getFullYear(),this.$M=Ue.getMonth(),this.$D=Ue.getDate(),this.$W=Ue.getDay(),this.$H=Ue.getHours(),this.$m=Ue.getMinutes(),this.$s=Ue.getSeconds(),this.$ms=Ue.getMilliseconds()},tt.$utils=function(){return Ke},tt.isValid=function(){return this.$d.toString()!==oe},tt.isSame=function(Ue,et){var dt=je(Ue);return this.startOf(et)<=dt&&dt<=this.endOf(et)},tt.isAfter=function(Ue,et){return je(Ue){const{duration:C,tokens:R,locStrings:O,className:I}=S,N=C.toFixed(2).replace(/\.?0*$/,"");return jsxRuntimeExports.jsxs("div",{className:I,children:[R>0&&jsxRuntimeExports.jsxs(React.Fragment,{children:[`${O.MessageStatus_TokensDesc}: `,jsxRuntimeExports.jsx("b",{children:R}),` ${O.MessageStatus_TokensUint}, `]}),`${R>0?O.MessageStatus_TimeSpentDesc:O.MessageStatus_TimeSpentDscCapitalized}: `,jsxRuntimeExports.jsx("b",{children:N}),` ${O.MessageStatus_TimeSpent_Unit}`]})};DefaultMessageStatusRenderer.displayName="DefaultMessageStatusRenderer";const EMPTY_CONTEXTUAL_MENU_ITEMS=[],defaultUseContextualMenuItems=S=>EMPTY_CONTEXTUAL_MENU_ITEMS;function DefaultMessageBubbleRenderer(S){const{MessageAvatarRenderer:C,MessageContentRenderer:R=DefaultMessageContentRenderer,MessageErrorRenderer:O=DefaultMessageErrorRenderer,MessagePaginationRenderer:I=DefaultMessagePaginationRenderer,MessageSenderRenderer:N=DefaultMessageSenderRenderer,MessageStatusRenderer:L=DefaultMessageStatusRenderer,useMessageContextualMenuItems:B=defaultUseContextualMenuItems,locStrings:j,message:F,className:V}=S,K=useStyles$5(),[W,X]=React.useState(F.history.length-1),[J,oe]=React.useState(!1),pe=React.useRef(null),me=React.useRef(null),xe=React.useCallback(()=>{oe(!1)},[]),Ae=React.useCallback(Ie=>{const je=pe.current,Ke=me.current;if(je&&Ke){const Je=Ie.clientX,Xe=Ie.clientY,ot=je.getBoundingClientRect(),tt=ot.left+window.scrollX,Ue=ot.top+window.scrollY,et=Je-tt,dt=Xe-Ue;Ke.style.left=`${et}px`,Ke.style.top=`${dt}px`}},[]),ge=React.useCallback(Ie=>{Ie.preventDefault(),Ae(Ie),oe(!0)},[]),Te=F.history[W],we=Te.category===ChatMessageCategory.User?"right":"left",ke=B(Te),Be=React.useCallback(()=>S.calcContentForCopy(Te),[Te,S.calcContentForCopy]);return React.useEffect(()=>{const Ie=()=>{oe(!1)};return document.addEventListener("mousedown",Ie),()=>document.removeEventListener("mousedown",Ie)},[]),jsxRuntimeExports.jsx("div",{className:K.container,"data-position":we,children:jsxRuntimeExports.jsxs("div",{className:mergeClasses(K.message,V),"data-position":we,children:[jsxRuntimeExports.jsx("div",{className:K.avatar,children:C&&jsxRuntimeExports.jsx(C,{data:Te,position:we})}),jsxRuntimeExports.jsxs("div",{className:K.main,children:[jsxRuntimeExports.jsx("div",{className:K.sender,children:jsxRuntimeExports.jsx(N,{data:Te,position:we})}),jsxRuntimeExports.jsxs("div",{ref:pe,className:K.content,"data-category":Te.category,onContextMenu:ge,onClick:Ae,children:[jsxRuntimeExports.jsx(R,{content:Te.content}),Te.error&&jsxRuntimeExports.jsx(O,{error:Te.error,locStrings:j,className:K.error}),typeof Te.duration=="number"&&typeof Te.tokens=="number"&&jsxRuntimeExports.jsx(L,{duration:Te.duration,tokens:Te.tokens,locStrings:j,className:K.status}),F.history.length>1&&jsxRuntimeExports.jsx(I,{className:K.pagination,message:F,current:W,setCurrent:X}),jsxRuntimeExports.jsx("div",{ref:me,className:K.contentMenuAnchor}),ke.length>0&&jsxRuntimeExports.jsx(ContextualMenu,{items:ke,hidden:!J,target:me,onItemClick:xe,onDismiss:xe,className:K.contextualMenu}),jsxRuntimeExports.jsx("div",{className:mergeClasses(anchors.actions,K.actions),children:jsxRuntimeExports.jsx(CopyButton,{calcContentForCopy:Be,pendingText:j.CopyToClipboard,copyingText:j.CopyToClipboard_Copying,copiedText:j.CopyToClipboard_Copied,failedText:j.CopyToClipboard_Failed,className:mergeClasses(anchors.actionButton,K.actionButton)})})]})]})]})})}DefaultMessageBubbleRenderer.displayName="DefaultMessageBubbleRenderer";const anchors={actions:"chatbox-message-bubble-actions",actionButton:"chatbox-message-bubble-action-button"},useStyles$5=makeStyles({container:{...shorthands.margin("16px","0"),display:"flex",justifyContent:"flex-start",'&&[data-position="right"]':{justifyContent:"flex-end"},width:"100%"},message:{display:"flex",flexDirection:"row",'&&[data-position="right"]':{flexDirection:"row-reverse"},maxWidth:"calc(100% - 80px)"},avatar:{...shorthands.flex(0,0,"auto")},main:{...shorthands.flex(1,1,"auto"),display:"flex",flexDirection:"column",width:"100%"},sender:{...shorthands.flex(0,0,"auto")},content:{...shorthands.flex(1,1,"auto"),...shorthands.padding("12px","20px","12px","12px"),...shorthands.borderRadius("4px"),position:"relative",boxSizing:"border-box",minWidth:"48px",wordBreak:"break-word",lineHeight:"22px","> p":{...shorthands.margin(0)},[`&:hover > .${anchors.actions}`]:{display:"flex",visibility:"visible"},[`&&[data-category="${ChatMessageCategory.System}"]`]:{color:tokens.colorNeutralForeground4},[`&&[data-category="${ChatMessageCategory.Error}"]`]:{backgroundColor:tokens.colorPaletteRedBackground2,color:tokens.colorNeutralForeground1},[`&&[data-category="${ChatMessageCategory.Chatbot}"]`]:{backgroundColor:tokens.colorNeutralBackground4,color:tokens.colorNeutralForeground1},[`&&[data-category="${ChatMessageCategory.User}"]`]:{backgroundColor:tokens.colorBrandBackground2,color:tokens.colorNeutralForeground1,[`& .${anchors.actionButton}`]:{color:tokens.colorNeutralForegroundInverted,":hover":{color:tokens.colorNeutralForegroundInvertedHover}}}},contextualMenu:{width:"auto",minWidth:"180px"},contentMenuAnchor:{position:"absolute",top:"0px",left:"0px"},error:{...shorthands.borderTop("1px","solid",tokens.colorPaletteDarkRedBorderActive),marginTop:"8px !important",paddingTop:"8px"},status:{...shorthands.margin("10px","0","0","0"),...shorthands.borderTop("1px","solid",tokens.colorPaletteAnchorBackground2),fontSize:"12px",fontStyle:"italic"},pagination:{marginTop:"14px"},actions:{position:"absolute",right:"-5px",top:"0",display:"none",width:"32px",justifyContent:"space-between"},actionButton:{cursor:"pointer",width:"32px"}});function DefaultSessionSplitRenderer(S){const{locStrings:C,className:R}=S,O=useStyles$4();return jsxRuntimeExports.jsx("div",{className:mergeClasses(O.sessionSplit,R),children:jsxRuntimeExports.jsxs("span",{children:["--- ",C.SessionSplit_Desc," ---"]})})}DefaultSessionSplitRenderer.displayName="DefaultSessionSplitRenderer";const useStyles$4=makeStyles({sessionSplit:{display:"flex",justifyContent:"center",height:"24px",color:tokens.colorNeutralForeground4}});makeStyles({hintTyping:{...shorthands.overflow("hidden"),width:"1px",height:"1px"},typingDots:{...shorthands.transition("opacity","0.1s"),display:"flex",alignItems:"center",height:"22.5px"},typingDot:{...shorthands.borderRadius("50%"),...shorthands.margin("0","0","0","6px"),display:"inline-block",width:"6px",height:"6px",backgroundColor:tokens.colorNeutralStroke1,animationDuration:"1.5s",animationTimingFunction:"linear",animationIterationCount:"infinite",animationName:{"0%":{transform:"scale(1)"},"16.67%":{transform:"scale(0)"},"33.33%":{transform:"scale(0)"},"50%":{transform:"scale(0)"},"66.67%":{transform:"scale(1)"},"83.33%":{transform:"scale(1)"},"100%":{transform:"scale(1)"}},"&:nth-child(1)":{...shorthands.margin("0px")},"&:nth-child(2)":{animationDelay:"0.18s"},"&:nth-child(3)":{animationDelay:"0.36s"}}}),makeStyles({toolbar:{display:"flex",justifyContent:"flex-end"}}),makeStyles({input:{...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),boxSizing:"border-box",display:"grid",gridTemplateRows:"1fr auto"},editor:{boxSizing:"border-box"},editorInner:{...shorthands.border("0px"),boxSizing:"border-box"},editorToolbar:{boxSizing:"border-box",display:"flex",alignItems:"flex-end",justifyContent:"flex-end",height:"100%"}});function MessageListRenderer(S){const{MessageAvatarRenderer:C,MessageContentRenderer:R,MessageErrorRenderer:O,MessageSenderRenderer:I,MessageBubbleRenderer:N=DefaultMessageBubbleRenderer,SessionSplitRenderer:L=DefaultSessionSplitRenderer,className:B,bubbleClassName:j,sessionSplitClassName:F,locStrings:V,messages:K,calcContentForCopy:W,useMessageContextualMenuItems:X}=S,J=useStyles$3();return jsxRuntimeExports.jsx("div",{className:mergeClasses(J.container,B),children:K.map(oe=>{switch(oe.type){case ChatMessageType.Message:return jsxRuntimeExports.jsx(N,{MessageAvatarRenderer:C,MessageContentRenderer:R,MessageErrorRenderer:O,MessageSenderRenderer:I,calcContentForCopy:W,locStrings:V,message:oe,className:j,useMessageContextualMenuItems:X},oe.id);case ChatMessageType.SessionSplit:return jsxRuntimeExports.jsx(L,{locStrings:V,className:F},oe.id);default:return jsxRuntimeExports.jsx(React.Fragment,{},oe.id)}})})}MessageListRenderer.displayName="MessageListRenderer";const useStyles$3=makeStyles({container:{boxSizing:"border-box"}});makeStyles({editor:{...shorthands.padding("8px"),...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),boxSizing:"border-box",display:"block",width:"100%",userSelect:"none",position:"relative",'&[data-disabled="true"]':{backgroundColor:tokens.colorNeutralBackgroundDisabled}},textarea:{...shorthands.padding("0px"),...shorthands.overflow("hidden","auto"),...shorthands.borderWidth(0),...shorthands.outline(0,"solid","transparent"),backgroundColor:"transparent",boxSizing:"border-box",resize:"none",appearance:"none",overflowWrap:"break-word",lineHeight:"24px",height:"24px",width:"100%",wordBreak:"break-all",color:tokens.colorNeutralForeground1,userSelect:"text"}}),React.lazy(()=>Promise.resolve().then(()=>index).then(S=>({default:S.ReactRichEditor}))),React.lazy(()=>Promise.resolve().then(()=>index).then(S=>({default:S.AutoResizeTextBoxPlugin}))),makeStyles({editor:{...shorthands.padding("8px"),...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),boxSizing:"border-box",display:"block",width:"100%",userSelect:"none",position:"relative"}}),makeStyles({chatbox:{...shorthands.borderRadius("8px"),display:"flex",flexDirection:"column",alignItems:"stretch",backgroundColor:tokens.colorNeutralBackground1,width:"100%",height:"100%",boxShadow:"0px 6.4px 14.4px rgba(0, 0, 0, 0.132), 0px 1.2px 3.6px rgba(0, 0, 0, 0.108)","::-webkit-scrollbar":{width:"4px",backgroundColor:tokens.colorNeutralBackground1Hover},"::-webkit-scrollbar-thumb":{backgroundColor:tokens.colorScrollbarOverlay,...shorthands.border("1px","solid",tokens.colorNeutralBackground1),...shorthands.borderRadius("9999px")},"::-webkit-scrollbar-thumb:hover":{backgroundColor:tokens.colorNeutralForeground1Static},"::-webkit-scrollbar-track":{...shorthands.borderRadius("9999px"),backgroundColor:"transparent"}},header:{...shorthands.flex(0,0,"auto")},main:{...shorthands.flex(1,1,"auto"),...shorthands.overflow("hidden","auto")},footer:{...shorthands.flex(0,0,"auto")}}),makeStyles({header:{},topbar:{...shorthands.padding("0px","16px"),...shorthands.borderBottom("1px","solid",tokens.colorNeutralBackground5),boxSizing:"border-box",display:"flex",justifyContent:"space-between",alignItems:"center",height:"48px"},toolbarTitle:{display:"flex",alignItems:"center",columnGap:"2px"},toolbarActionButton:{color:tokens.colorNeutralForeground2}}),makeStyles({main:{...shorthands.padding("0","16px"),...shorthands.overflow("hidden","auto"),height:"100%"}}),makeStyles({footer:{...shorthands.padding("16px"),boxSizing:"border-box"},footerContainer:{display:"flex"},leftToolbar:{...shorthands.flex(0,0,"auto")},editor:{...shorthands.flex(1),boxSizing:"border-box"},validation:{boxSizing:"border-box"},validationInner:{...shorthands.border("1px","solid",tokens.colorNeutralBackground5),...shorthands.borderRadius("4px"),...shorthands.margin("8px","0px"),...shorthands.padding("2px","8px"),backgroundColor:tokens.colorStatusWarningBackground1,color:tokens.colorStatusWarningForeground1}});function setMetaTag(S,C){try{var R=global,O=R.document;if(typeof O<"u"&&O.createElement&&O.head&&O.head.appendChild){var I=O.querySelector('html meta[name="'.concat(encodeURI(S),'"]'))||O.createElement("meta");I.setAttribute("name",S),I.setAttribute("content",C),O.head.appendChild(I)}}catch{}}function addVersionToMetaTag(){setMetaTag("react-scroll-to-bottom:version","4.2.0")}var check$1=function(S){return S&&S.Math===Math&&S},global$x=check$1(typeof globalThis=="object"&&globalThis)||check$1(typeof window=="object"&&window)||check$1(typeof self=="object"&&self)||check$1(typeof commonjsGlobal=="object"&&commonjsGlobal)||check$1(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||Function("return this")(),fails$v=function(S){try{return!!S()}catch{return!0}},fails$u=fails$v,functionBindNative=!fails$u(function(){var S=(function(){}).bind();return typeof S!="function"||S.hasOwnProperty("prototype")}),NATIVE_BIND$3=functionBindNative,FunctionPrototype$5=Function.prototype,apply$3=FunctionPrototype$5.apply,call$c=FunctionPrototype$5.call,functionApply=typeof Reflect=="object"&&Reflect.apply||(NATIVE_BIND$3?call$c.bind(apply$3):function(){return call$c.apply(apply$3,arguments)}),NATIVE_BIND$2=functionBindNative,FunctionPrototype$4=Function.prototype,call$b=FunctionPrototype$4.call,uncurryThisWithBind=NATIVE_BIND$2&&FunctionPrototype$4.bind.bind(call$b,call$b),functionUncurryThis=NATIVE_BIND$2?uncurryThisWithBind:function(S){return function(){return call$b.apply(S,arguments)}},uncurryThis$l=functionUncurryThis,toString$f=uncurryThis$l({}.toString),stringSlice$1=uncurryThis$l("".slice),classofRaw$4=function(S){return stringSlice$1(toString$f(S),8,-1)},classofRaw$3=classofRaw$4,uncurryThis$k=functionUncurryThis,functionUncurryThisClause=function(S){if(classofRaw$3(S)==="Function")return uncurryThis$k(S)},documentAll=typeof document=="object"&&document.all,isCallable$t=typeof documentAll>"u"&&documentAll!==void 0?function(S){return typeof S=="function"||S===documentAll}:function(S){return typeof S=="function"},objectGetOwnPropertyDescriptor$1={},fails$t=fails$v,descriptors$1=!fails$t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),NATIVE_BIND$1=functionBindNative,call$a=Function.prototype.call,functionCall=NATIVE_BIND$1?call$a.bind(call$a):function(){return call$a.apply(call$a,arguments)},objectPropertyIsEnumerable$1={},$propertyIsEnumerable$2={}.propertyIsEnumerable,getOwnPropertyDescriptor$9=Object.getOwnPropertyDescriptor,NASHORN_BUG$1=getOwnPropertyDescriptor$9&&!$propertyIsEnumerable$2.call({1:2},1);objectPropertyIsEnumerable$1.f=NASHORN_BUG$1?function S(C){var R=getOwnPropertyDescriptor$9(this,C);return!!R&&R.enumerable}:$propertyIsEnumerable$2;var createPropertyDescriptor$8=function(S,C){return{enumerable:!(S&1),configurable:!(S&2),writable:!(S&4),value:C}},uncurryThis$j=functionUncurryThis,fails$s=fails$v,classof$e=classofRaw$4,$Object$4=Object,split$1=uncurryThis$j("".split),indexedObject$1=fails$s(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(S){return classof$e(S)==="String"?split$1(S,""):$Object$4(S)}:$Object$4,isNullOrUndefined$3=function(S){return S==null},isNullOrUndefined$2=isNullOrUndefined$3,$TypeError$a=TypeError,requireObjectCoercible$8=function(S){if(isNullOrUndefined$2(S))throw new $TypeError$a("Can't call method on "+S);return S},IndexedObject$2=indexedObject$1,requireObjectCoercible$7=requireObjectCoercible$8,toIndexedObject$e=function(S){return IndexedObject$2(requireObjectCoercible$7(S))},isCallable$s=isCallable$t,isObject$h=function(S){return typeof S=="object"?S!==null:isCallable$s(S)},path$h={},path$g=path$h,global$w=global$x,isCallable$r=isCallable$t,aFunction$1=function(S){return isCallable$r(S)?S:void 0},getBuiltIn$f=function(S,C){return arguments.length<2?aFunction$1(path$g[S])||aFunction$1(global$w[S]):path$g[S]&&path$g[S][C]||global$w[S]&&global$w[S][C]},uncurryThis$i=functionUncurryThis,objectIsPrototypeOf=uncurryThis$i({}.isPrototypeOf),engineUserAgent$1=typeof navigator<"u"&&String(navigator.userAgent)||"",global$v=global$x,userAgent$1=engineUserAgent$1,process$2=global$v.process,Deno$1=global$v.Deno,versions$1=process$2&&process$2.versions||Deno$1&&Deno$1.version,v8$1=versions$1&&versions$1.v8,match$1,version$1;v8$1&&(match$1=v8$1.split("."),version$1=match$1[0]>0&&match$1[0]<4?1:+(match$1[0]+match$1[1])),!version$1&&userAgent$1&&(match$1=userAgent$1.match(/Edge\/(\d+)/),(!match$1||match$1[1]>=74)&&(match$1=userAgent$1.match(/Chrome\/(\d+)/),match$1&&(version$1=+match$1[1])));var engineV8Version$1=version$1,V8_VERSION$3=engineV8Version$1,fails$r=fails$v,global$u=global$x,$String$4=global$u.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$r(function(){var S=Symbol("symbol detection");return!$String$4(S)||!(Object(S)instanceof Symbol)||!Symbol.sham&&V8_VERSION$3&&V8_VERSION$3<41}),NATIVE_SYMBOL$7=symbolConstructorDetection,useSymbolAsUid$1=NATIVE_SYMBOL$7&&!Symbol.sham&&typeof Symbol.iterator=="symbol",getBuiltIn$e=getBuiltIn$f,isCallable$q=isCallable$t,isPrototypeOf$8=objectIsPrototypeOf,USE_SYMBOL_AS_UID$3=useSymbolAsUid$1,$Object$3=Object,isSymbol$8=USE_SYMBOL_AS_UID$3?function(S){return typeof S=="symbol"}:function(S){var C=getBuiltIn$e("Symbol");return isCallable$q(C)&&isPrototypeOf$8(C.prototype,$Object$3(S))},$String$3=String,tryToString$6=function(S){try{return $String$3(S)}catch{return"Object"}},isCallable$p=isCallable$t,tryToString$5=tryToString$6,$TypeError$9=TypeError,aCallable$5=function(S){if(isCallable$p(S))return S;throw new $TypeError$9(tryToString$5(S)+" is not a function")},aCallable$4=aCallable$5,isNullOrUndefined$1=isNullOrUndefined$3,getMethod$6=function(S,C){var R=S[C];return isNullOrUndefined$1(R)?void 0:aCallable$4(R)},call$9=functionCall,isCallable$o=isCallable$t,isObject$g=isObject$h,$TypeError$8=TypeError,ordinaryToPrimitive$3=function(S,C){var R,O;if(C==="string"&&isCallable$o(R=S.toString)&&!isObject$g(O=call$9(R,S))||isCallable$o(R=S.valueOf)&&!isObject$g(O=call$9(R,S))||C!=="string"&&isCallable$o(R=S.toString)&&!isObject$g(O=call$9(R,S)))return O;throw new $TypeError$8("Can't convert object to primitive value")},shared$c={exports:{}},global$t=global$x,defineProperty$d=Object.defineProperty,defineGlobalProperty$1=function(S,C){try{defineProperty$d(global$t,S,{value:C,configurable:!0,writable:!0})}catch{global$t[S]=C}return C},global$s=global$x,defineGlobalProperty=defineGlobalProperty$1,SHARED$1="__core-js_shared__",store$7=global$s[SHARED$1]||defineGlobalProperty(SHARED$1,{}),sharedStore$1=store$7,store$6=sharedStore$1;(shared$c.exports=function(S,C){return store$6[S]||(store$6[S]=C!==void 0?C:{})})("versions",[]).push({version:"3.35.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE",source:"https://github.com/zloirock/core-js"});var sharedExports$1=shared$c.exports,requireObjectCoercible$6=requireObjectCoercible$8,$Object$2=Object,toObject$c=function(S){return $Object$2(requireObjectCoercible$6(S))},uncurryThis$h=functionUncurryThis,toObject$b=toObject$c,hasOwnProperty$2=uncurryThis$h({}.hasOwnProperty),hasOwnProperty_1$1=Object.hasOwn||function S(C,R){return hasOwnProperty$2(toObject$b(C),R)},uncurryThis$g=functionUncurryThis,id$1=0,postfix$1=Math.random(),toString$e=uncurryThis$g(1 .toString),uid$6=function(S){return"Symbol("+(S===void 0?"":S)+")_"+toString$e(++id$1+postfix$1,36)},global$r=global$x,shared$b=sharedExports$1,hasOwn$k=hasOwnProperty_1$1,uid$5=uid$6,NATIVE_SYMBOL$6=symbolConstructorDetection,USE_SYMBOL_AS_UID$2=useSymbolAsUid$1,Symbol$5=global$r.Symbol,WellKnownSymbolsStore$3=shared$b("wks"),createWellKnownSymbol$1=USE_SYMBOL_AS_UID$2?Symbol$5.for||Symbol$5:Symbol$5&&Symbol$5.withoutSetter||uid$5,wellKnownSymbol$o=function(S){return hasOwn$k(WellKnownSymbolsStore$3,S)||(WellKnownSymbolsStore$3[S]=NATIVE_SYMBOL$6&&hasOwn$k(Symbol$5,S)?Symbol$5[S]:createWellKnownSymbol$1("Symbol."+S)),WellKnownSymbolsStore$3[S]},call$8=functionCall,isObject$f=isObject$h,isSymbol$7=isSymbol$8,getMethod$5=getMethod$6,ordinaryToPrimitive$2=ordinaryToPrimitive$3,wellKnownSymbol$n=wellKnownSymbol$o,$TypeError$7=TypeError,TO_PRIMITIVE$1=wellKnownSymbol$n("toPrimitive"),toPrimitive$9=function(S,C){if(!isObject$f(S)||isSymbol$7(S))return S;var R=getMethod$5(S,TO_PRIMITIVE$1),O;if(R){if(C===void 0&&(C="default"),O=call$8(R,S,C),!isObject$f(O)||isSymbol$7(O))return O;throw new $TypeError$7("Can't convert object to primitive value")}return C===void 0&&(C="number"),ordinaryToPrimitive$2(S,C)},toPrimitive$8=toPrimitive$9,isSymbol$6=isSymbol$8,toPropertyKey$8=function(S){var C=toPrimitive$8(S,"string");return isSymbol$6(C)?C:C+""},global$q=global$x,isObject$e=isObject$h,document$2=global$q.document,EXISTS$3=isObject$e(document$2)&&isObject$e(document$2.createElement),documentCreateElement$3=function(S){return EXISTS$3?document$2.createElement(S):{}},DESCRIPTORS$j=descriptors$1,fails$q=fails$v,createElement$1=documentCreateElement$3,ie8DomDefine$1=!DESCRIPTORS$j&&!fails$q(function(){return Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a!==7}),DESCRIPTORS$i=descriptors$1,call$7=functionCall,propertyIsEnumerableModule$2=objectPropertyIsEnumerable$1,createPropertyDescriptor$7=createPropertyDescriptor$8,toIndexedObject$d=toIndexedObject$e,toPropertyKey$7=toPropertyKey$8,hasOwn$j=hasOwnProperty_1$1,IE8_DOM_DEFINE$3=ie8DomDefine$1,$getOwnPropertyDescriptor$3=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor$1.f=DESCRIPTORS$i?$getOwnPropertyDescriptor$3:function S(C,R){if(C=toIndexedObject$d(C),R=toPropertyKey$7(R),IE8_DOM_DEFINE$3)try{return $getOwnPropertyDescriptor$3(C,R)}catch{}if(hasOwn$j(C,R))return createPropertyDescriptor$7(!call$7(propertyIsEnumerableModule$2.f,C,R),C[R])};var fails$p=fails$v,isCallable$n=isCallable$t,replacement$1=/#|\.prototype\./,isForced$3=function(S,C){var R=data$1[normalize$2(S)];return R===POLYFILL$1?!0:R===NATIVE$1?!1:isCallable$n(C)?fails$p(C):!!C},normalize$2=isForced$3.normalize=function(S){return String(S).replace(replacement$1,".").toLowerCase()},data$1=isForced$3.data={},NATIVE$1=isForced$3.NATIVE="N",POLYFILL$1=isForced$3.POLYFILL="P",isForced_1$1=isForced$3,uncurryThis$f=functionUncurryThisClause,aCallable$3=aCallable$5,NATIVE_BIND=functionBindNative,bind$3=uncurryThis$f(uncurryThis$f.bind),functionBindContext=function(S,C){return aCallable$3(S),C===void 0?S:NATIVE_BIND?bind$3(S,C):function(){return S.apply(C,arguments)}},objectDefineProperty$1={},DESCRIPTORS$h=descriptors$1,fails$o=fails$v,v8PrototypeDefineBug=DESCRIPTORS$h&&fails$o(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),isObject$d=isObject$h,$String$2=String,$TypeError$6=TypeError,anObject$h=function(S){if(isObject$d(S))return S;throw new $TypeError$6($String$2(S)+" is not an object")},DESCRIPTORS$g=descriptors$1,IE8_DOM_DEFINE$2=ie8DomDefine$1,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$g=anObject$h,toPropertyKey$6=toPropertyKey$8,$TypeError$5=TypeError,$defineProperty$2=Object.defineProperty,$getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$2="configurable",WRITABLE="writable";objectDefineProperty$1.f=DESCRIPTORS$g?V8_PROTOTYPE_DEFINE_BUG$1?function S(C,R,O){if(anObject$g(C),R=toPropertyKey$6(R),anObject$g(O),typeof C=="function"&&R==="prototype"&&"value"in O&&WRITABLE in O&&!O[WRITABLE]){var I=$getOwnPropertyDescriptor$2(C,R);I&&I[WRITABLE]&&(C[R]=O.value,O={configurable:CONFIGURABLE$2 in O?O[CONFIGURABLE$2]:I[CONFIGURABLE$2],enumerable:ENUMERABLE in O?O[ENUMERABLE]:I[ENUMERABLE],writable:!1})}return $defineProperty$2(C,R,O)}:$defineProperty$2:function S(C,R,O){if(anObject$g(C),R=toPropertyKey$6(R),anObject$g(O),IE8_DOM_DEFINE$2)try{return $defineProperty$2(C,R,O)}catch{}if("get"in O||"set"in O)throw new $TypeError$5("Accessors not supported");return"value"in O&&(C[R]=O.value),C};var DESCRIPTORS$f=descriptors$1,definePropertyModule$6=objectDefineProperty$1,createPropertyDescriptor$6=createPropertyDescriptor$8,createNonEnumerableProperty$9=DESCRIPTORS$f?function(S,C,R){return definePropertyModule$6.f(S,C,createPropertyDescriptor$6(1,R))}:function(S,C,R){return S[C]=R,S},global$p=global$x,apply$2=functionApply,uncurryThis$e=functionUncurryThisClause,isCallable$m=isCallable$t,getOwnPropertyDescriptor$8=objectGetOwnPropertyDescriptor$1.f,isForced$2=isForced_1$1,path$f=path$h,bind$2=functionBindContext,createNonEnumerableProperty$8=createNonEnumerableProperty$9,hasOwn$i=hasOwnProperty_1$1,wrapConstructor=function(S){var C=function(R,O,I){if(this instanceof C){switch(arguments.length){case 0:return new S;case 1:return new S(R);case 2:return new S(R,O)}return new S(R,O,I)}return apply$2(S,this,arguments)};return C.prototype=S.prototype,C},_export$1=function(S,C){var R=S.target,O=S.global,I=S.stat,N=S.proto,L=O?global$p:I?global$p[R]:global$p[R]&&global$p[R].prototype,B=O?path$f:path$f[R]||createNonEnumerableProperty$8(path$f,R,{})[R],j=B.prototype,F,V,K,W,X,J,oe,pe,me;for(W in C)F=isForced$2(O?W:R+(I?".":"#")+W,S.forced),V=!F&&L&&hasOwn$i(L,W),J=B[W],V&&(S.dontCallGetSet?(me=getOwnPropertyDescriptor$8(L,W),oe=me&&me.value):oe=L[W]),X=V&&oe?oe:C[W],!(!F&&!N&&typeof J==typeof X)&&(S.bind&&V?pe=bind$2(X,global$p):S.wrap&&V?pe=wrapConstructor(X):N&&isCallable$m(X)?pe=uncurryThis$e(X):pe=X,(S.sham||X&&X.sham||J&&J.sham)&&createNonEnumerableProperty$8(pe,"sham",!0),createNonEnumerableProperty$8(B,W,pe),N&&(K=R+"Prototype",hasOwn$i(path$f,K)||createNonEnumerableProperty$8(path$f,K,{}),createNonEnumerableProperty$8(path$f[K],W,X),S.real&&j&&(F||!j[W])&&createNonEnumerableProperty$8(j,W,X)))},classof$d=classofRaw$4,isArray$f=Array.isArray||function S(C){return classof$d(C)==="Array"},$$s=_export$1,isArray$e=isArray$f;$$s({target:"Array",stat:!0},{isArray:isArray$e});var path$e=path$h,isArray$d=path$e.Array.isArray,parent$C=isArray$d,isArray$c=parent$C,parent$B=isArray$c,isArray$b=parent$B,parent$A=isArray$b,isArray$a=parent$A,isArray$9=isArray$a;const _Array$isArray$1=getDefaultExportFromCjs(isArray$9);function _arrayWithHoles$d(S){if(_Array$isArray$1(S))return S}var ceil$1=Math.ceil,floor$2=Math.floor,mathTrunc=Math.trunc||function S(C){var R=+C;return(R>0?floor$2:ceil$1)(R)},trunc=mathTrunc,toIntegerOrInfinity$9=function(S){var C=+S;return C!==C||C===0?0:trunc(C)},toIntegerOrInfinity$8=toIntegerOrInfinity$9,min$6=Math.min,toLength$4=function(S){var C=toIntegerOrInfinity$8(S);return C>0?min$6(C,9007199254740991):0},toLength$3=toLength$4,lengthOfArrayLike$9=function(S){return toLength$3(S.length)},$TypeError$4=TypeError,MAX_SAFE_INTEGER$1=9007199254740991,doesNotExceedSafeInteger$3=function(S){if(S>MAX_SAFE_INTEGER$1)throw $TypeError$4("Maximum allowed index exceeded");return S},toPropertyKey$5=toPropertyKey$8,definePropertyModule$5=objectDefineProperty$1,createPropertyDescriptor$5=createPropertyDescriptor$8,createProperty$5=function(S,C,R){var O=toPropertyKey$5(C);O in S?definePropertyModule$5.f(S,O,createPropertyDescriptor$5(0,R)):S[O]=R},wellKnownSymbol$m=wellKnownSymbol$o,TO_STRING_TAG$4=wellKnownSymbol$m("toStringTag"),test$1={};test$1[TO_STRING_TAG$4]="z";var toStringTagSupport$1=String(test$1)==="[object z]",TO_STRING_TAG_SUPPORT$5=toStringTagSupport$1,isCallable$l=isCallable$t,classofRaw$2=classofRaw$4,wellKnownSymbol$l=wellKnownSymbol$o,TO_STRING_TAG$3=wellKnownSymbol$l("toStringTag"),$Object$1=Object,CORRECT_ARGUMENTS$1=classofRaw$2(function(){return arguments}())==="Arguments",tryGet$1=function(S,C){try{return S[C]}catch{}},classof$c=TO_STRING_TAG_SUPPORT$5?classofRaw$2:function(S){var C,R,O;return S===void 0?"Undefined":S===null?"Null":typeof(R=tryGet$1(C=$Object$1(S),TO_STRING_TAG$3))=="string"?R:CORRECT_ARGUMENTS$1?classofRaw$2(C):(O=classofRaw$2(C))==="Object"&&isCallable$l(C.callee)?"Arguments":O},uncurryThis$d=functionUncurryThis,isCallable$k=isCallable$t,store$5=sharedStore$1,functionToString$1=uncurryThis$d(Function.toString);isCallable$k(store$5.inspectSource)||(store$5.inspectSource=function(S){return functionToString$1(S)});var inspectSource$4=store$5.inspectSource,uncurryThis$c=functionUncurryThis,fails$n=fails$v,isCallable$j=isCallable$t,classof$b=classof$c,getBuiltIn$d=getBuiltIn$f,inspectSource$3=inspectSource$4,noop$1=function(){},construct=getBuiltIn$d("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$2=uncurryThis$c(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.test(noop$1),isConstructorModern=function S(C){if(!isCallable$j(C))return!1;try{return construct(noop$1,[],C),!0}catch{return!1}},isConstructorLegacy=function S(C){if(!isCallable$j(C))return!1;switch(classof$b(C)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$2(constructorRegExp,inspectSource$3(C))}catch{return!0}};isConstructorLegacy.sham=!0;var isConstructor$3=!construct||fails$n(function(){var S;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){S=!0})||S})?isConstructorLegacy:isConstructorModern,isArray$8=isArray$f,isConstructor$2=isConstructor$3,isObject$c=isObject$h,wellKnownSymbol$k=wellKnownSymbol$o,SPECIES$3=wellKnownSymbol$k("species"),$Array$2=Array,arraySpeciesConstructor$1=function(S){var C;return isArray$8(S)&&(C=S.constructor,isConstructor$2(C)&&(C===$Array$2||isArray$8(C.prototype))?C=void 0:isObject$c(C)&&(C=C[SPECIES$3],C===null&&(C=void 0))),C===void 0?$Array$2:C},arraySpeciesConstructor=arraySpeciesConstructor$1,arraySpeciesCreate$3=function(S,C){return new(arraySpeciesConstructor(S))(C===0?0:C)},fails$m=fails$v,wellKnownSymbol$j=wellKnownSymbol$o,V8_VERSION$2=engineV8Version$1,SPECIES$2=wellKnownSymbol$j("species"),arrayMethodHasSpeciesSupport$4=function(S){return V8_VERSION$2>=51||!fails$m(function(){var C=[],R=C.constructor={};return R[SPECIES$2]=function(){return{foo:1}},C[S](Boolean).foo!==1})},$$r=_export$1,fails$l=fails$v,isArray$7=isArray$f,isObject$b=isObject$h,toObject$a=toObject$c,lengthOfArrayLike$8=lengthOfArrayLike$9,doesNotExceedSafeInteger$2=doesNotExceedSafeInteger$3,createProperty$4=createProperty$5,arraySpeciesCreate$2=arraySpeciesCreate$3,arrayMethodHasSpeciesSupport$3=arrayMethodHasSpeciesSupport$4,wellKnownSymbol$i=wellKnownSymbol$o,V8_VERSION$1=engineV8Version$1,IS_CONCAT_SPREADABLE=wellKnownSymbol$i("isConcatSpreadable"),IS_CONCAT_SPREADABLE_SUPPORT=V8_VERSION$1>=51||!fails$l(function(){var S=[];return S[IS_CONCAT_SPREADABLE]=!1,S.concat()[0]!==S}),isConcatSpreadable=function(S){if(!isObject$b(S))return!1;var C=S[IS_CONCAT_SPREADABLE];return C!==void 0?!!C:isArray$7(S)},FORCED$4=!IS_CONCAT_SPREADABLE_SUPPORT||!arrayMethodHasSpeciesSupport$3("concat");$$r({target:"Array",proto:!0,arity:1,forced:FORCED$4},{concat:function S(C){var R=toObject$a(this),O=arraySpeciesCreate$2(R,0),I=0,N,L,B,j,F;for(N=-1,B=arguments.length;NL;)if(B=I[L++],B!==B)return!0}else for(;N>L;L++)if((S||L in I)&&I[L]===R)return S||L||0;return!S&&-1}},arrayIncludes$1={includes:createMethod$4(!0),indexOf:createMethod$4(!1)},hiddenKeys$a={},uncurryThis$b=functionUncurryThis,hasOwn$h=hasOwnProperty_1$1,toIndexedObject$b=toIndexedObject$e,indexOf$5=arrayIncludes$1.indexOf,hiddenKeys$9=hiddenKeys$a,push$9=uncurryThis$b([].push),objectKeysInternal$1=function(S,C){var R=toIndexedObject$b(S),O=0,I=[],N;for(N in R)!hasOwn$h(hiddenKeys$9,N)&&hasOwn$h(R,N)&&push$9(I,N);for(;C.length>O;)hasOwn$h(R,N=C[O++])&&(~indexOf$5(I,N)||push$9(I,N));return I},enumBugKeys$7=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$3=objectKeysInternal$1,enumBugKeys$6=enumBugKeys$7,objectKeys$4=Object.keys||function S(C){return internalObjectKeys$3(C,enumBugKeys$6)},DESCRIPTORS$e=descriptors$1,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$4=objectDefineProperty$1,anObject$f=anObject$h,toIndexedObject$a=toIndexedObject$e,objectKeys$3=objectKeys$4;objectDefineProperties$1.f=DESCRIPTORS$e&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function S(C,R){anObject$f(C);for(var O=toIndexedObject$a(R),I=objectKeys$3(R),N=I.length,L=0,B;N>L;)definePropertyModule$4.f(C,B=I[L++],O[B]);return C};var getBuiltIn$c=getBuiltIn$f,html$3=getBuiltIn$c("document","documentElement"),shared$a=sharedExports$1,uid$4=uid$6,keys$5=shared$a("keys"),sharedKey$7=function(S){return keys$5[S]||(keys$5[S]=uid$4(S))},anObject$e=anObject$h,definePropertiesModule$1=objectDefineProperties$1,enumBugKeys$5=enumBugKeys$7,hiddenKeys$8=hiddenKeys$a,html$2=html$3,documentCreateElement$2=documentCreateElement$3,sharedKey$6=sharedKey$7,GT$1=">",LT$1="<",PROTOTYPE$2="prototype",SCRIPT$1="script",IE_PROTO$2=sharedKey$6("IE_PROTO"),EmptyConstructor$1=function(){},scriptTag$1=function(S){return LT$1+SCRIPT$1+GT$1+S+LT$1+"/"+SCRIPT$1+GT$1},NullProtoObjectViaActiveX$1=function(S){S.write(scriptTag$1("")),S.close();var C=S.parentWindow.Object;return S=null,C},NullProtoObjectViaIFrame$1=function(){var S=documentCreateElement$2("iframe"),C="java"+SCRIPT$1+":",R;return S.style.display="none",html$2.appendChild(S),S.src=String(C),R=S.contentWindow.document,R.open(),R.write(scriptTag$1("document.F=Object")),R.close(),R.F},activeXDocument$1,NullProtoObject$1=function(){try{activeXDocument$1=new ActiveXObject("htmlfile")}catch{}NullProtoObject$1=typeof document<"u"?document.domain&&activeXDocument$1?NullProtoObjectViaActiveX$1(activeXDocument$1):NullProtoObjectViaIFrame$1():NullProtoObjectViaActiveX$1(activeXDocument$1);for(var S=enumBugKeys$5.length;S--;)delete NullProtoObject$1[PROTOTYPE$2][enumBugKeys$5[S]];return NullProtoObject$1()};hiddenKeys$8[IE_PROTO$2]=!0;var objectCreate$1=Object.create||function S(C,R){var O;return C!==null?(EmptyConstructor$1[PROTOTYPE$2]=anObject$e(C),O=new EmptyConstructor$1,EmptyConstructor$1[PROTOTYPE$2]=null,O[IE_PROTO$2]=C):O=NullProtoObject$1(),R===void 0?O:definePropertiesModule$1.f(O,R)},objectGetOwnPropertyNames$1={},internalObjectKeys$2=objectKeysInternal$1,enumBugKeys$4=enumBugKeys$7,hiddenKeys$7=enumBugKeys$4.concat("length","prototype");objectGetOwnPropertyNames$1.f=Object.getOwnPropertyNames||function S(C){return internalObjectKeys$2(C,hiddenKeys$7)};var objectGetOwnPropertyNamesExternal={},uncurryThis$a=functionUncurryThis,arraySlice$3=uncurryThis$a([].slice),classof$9=classofRaw$4,toIndexedObject$9=toIndexedObject$e,$getOwnPropertyNames$1=objectGetOwnPropertyNames$1.f,arraySlice$2=arraySlice$3,windowNames=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(S){try{return $getOwnPropertyNames$1(S)}catch{return arraySlice$2(windowNames)}};objectGetOwnPropertyNamesExternal.f=function S(C){return windowNames&&classof$9(C)==="Window"?getWindowNames(C):$getOwnPropertyNames$1(toIndexedObject$9(C))};var objectGetOwnPropertySymbols$1={};objectGetOwnPropertySymbols$1.f=Object.getOwnPropertySymbols;var createNonEnumerableProperty$7=createNonEnumerableProperty$9,defineBuiltIn$4=function(S,C,R,O){return O&&O.enumerable?S[C]=R:createNonEnumerableProperty$7(S,C,R),S},defineProperty$c=objectDefineProperty$1,defineBuiltInAccessor$1=function(S,C,R){return defineProperty$c.f(S,C,R)},wellKnownSymbolWrapped={},wellKnownSymbol$h=wellKnownSymbol$o;wellKnownSymbolWrapped.f=wellKnownSymbol$h;var path$d=path$h,hasOwn$g=hasOwnProperty_1$1,wrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,defineProperty$b=objectDefineProperty$1.f,wellKnownSymbolDefine=function(S){var C=path$d.Symbol||(path$d.Symbol={});hasOwn$g(C,S)||defineProperty$b(C,S,{value:wrappedWellKnownSymbolModule$1.f(S)})},call$6=functionCall,getBuiltIn$b=getBuiltIn$f,wellKnownSymbol$g=wellKnownSymbol$o,defineBuiltIn$3=defineBuiltIn$4,symbolDefineToPrimitive=function(){var S=getBuiltIn$b("Symbol"),C=S&&S.prototype,R=C&&C.valueOf,O=wellKnownSymbol$g("toPrimitive");C&&!C[O]&&defineBuiltIn$3(C,O,function(I){return call$6(R,this)},{arity:1})},TO_STRING_TAG_SUPPORT$4=toStringTagSupport$1,classof$8=classof$c,objectToString$1=TO_STRING_TAG_SUPPORT$4?{}.toString:function S(){return"[object "+classof$8(this)+"]"},TO_STRING_TAG_SUPPORT$3=toStringTagSupport$1,defineProperty$a=objectDefineProperty$1.f,createNonEnumerableProperty$6=createNonEnumerableProperty$9,hasOwn$f=hasOwnProperty_1$1,toString$c=objectToString$1,wellKnownSymbol$f=wellKnownSymbol$o,TO_STRING_TAG$2=wellKnownSymbol$f("toStringTag"),setToStringTag$6=function(S,C,R,O){var I=R?S:S&&S.prototype;I&&(hasOwn$f(I,TO_STRING_TAG$2)||defineProperty$a(I,TO_STRING_TAG$2,{configurable:!0,value:C}),O&&!TO_STRING_TAG_SUPPORT$3&&createNonEnumerableProperty$6(I,"toString",toString$c))},global$o=global$x,isCallable$i=isCallable$t,WeakMap$4=global$o.WeakMap,weakMapBasicDetection=isCallable$i(WeakMap$4)&&/native code/.test(String(WeakMap$4)),NATIVE_WEAK_MAP$1=weakMapBasicDetection,global$n=global$x,isObject$a=isObject$h,createNonEnumerableProperty$5=createNonEnumerableProperty$9,hasOwn$e=hasOwnProperty_1$1,shared$9=sharedStore$1,sharedKey$5=sharedKey$7,hiddenKeys$6=hiddenKeys$a,OBJECT_ALREADY_INITIALIZED$1="Object already initialized",TypeError$2=global$n.TypeError,WeakMap$3=global$n.WeakMap,set$1,get$1,has$1,enforce$1=function(S){return has$1(S)?get$1(S):set$1(S,{})},getterFor$1=function(S){return function(C){var R;if(!isObject$a(C)||(R=get$1(C)).type!==S)throw new TypeError$2("Incompatible receiver, "+S+" required");return R}};if(NATIVE_WEAK_MAP$1||shared$9.state){var store$4=shared$9.state||(shared$9.state=new WeakMap$3);store$4.get=store$4.get,store$4.has=store$4.has,store$4.set=store$4.set,set$1=function(S,C){if(store$4.has(S))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED$1);return C.facade=S,store$4.set(S,C),C},get$1=function(S){return store$4.get(S)||{}},has$1=function(S){return store$4.has(S)}}else{var STATE$1=sharedKey$5("state");hiddenKeys$6[STATE$1]=!0,set$1=function(S,C){if(hasOwn$e(S,STATE$1))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED$1);return C.facade=S,createNonEnumerableProperty$5(S,STATE$1,C),C},get$1=function(S){return hasOwn$e(S,STATE$1)?S[STATE$1]:{}},has$1=function(S){return hasOwn$e(S,STATE$1)}}var internalState$1={set:set$1,get:get$1,has:has$1,enforce:enforce$1,getterFor:getterFor$1},bind$1=functionBindContext,uncurryThis$9=functionUncurryThis,IndexedObject$1=indexedObject$1,toObject$9=toObject$c,lengthOfArrayLike$6=lengthOfArrayLike$9,arraySpeciesCreate$1=arraySpeciesCreate$3,push$8=uncurryThis$9([].push),createMethod$3=function(S){var C=S===1,R=S===2,O=S===3,I=S===4,N=S===6,L=S===7,B=S===5||N;return function(j,F,V,K){for(var W=toObject$9(j),X=IndexedObject$1(W),J=lengthOfArrayLike$6(X),oe=bind$1(F,V),pe=0,me=K||arraySpeciesCreate$1,xe=C?me(j,J):R||L?me(j,0):void 0,Ae,ge;J>pe;pe++)if((B||pe in X)&&(Ae=X[pe],ge=oe(Ae,pe,W),S))if(C)xe[pe]=ge;else if(ge)switch(S){case 3:return!0;case 5:return Ae;case 6:return pe;case 2:push$8(xe,Ae)}else switch(S){case 4:return!1;case 7:push$8(xe,Ae)}return N?-1:O||I?I:xe}},arrayIteration={forEach:createMethod$3(0),map:createMethod$3(1),filter:createMethod$3(2),some:createMethod$3(3),every:createMethod$3(4),find:createMethod$3(5),findIndex:createMethod$3(6),filterReject:createMethod$3(7)},$$q=_export$1,global$m=global$x,call$5=functionCall,uncurryThis$8=functionUncurryThis,DESCRIPTORS$d=descriptors$1,NATIVE_SYMBOL$5=symbolConstructorDetection,fails$k=fails$v,hasOwn$d=hasOwnProperty_1$1,isPrototypeOf$7=objectIsPrototypeOf,anObject$d=anObject$h,toIndexedObject$8=toIndexedObject$e,toPropertyKey$4=toPropertyKey$8,$toString$1=toString$d,createPropertyDescriptor$4=createPropertyDescriptor$8,nativeObjectCreate=objectCreate$1,objectKeys$2=objectKeys$4,getOwnPropertyNamesModule$2=objectGetOwnPropertyNames$1,getOwnPropertyNamesExternal=objectGetOwnPropertyNamesExternal,getOwnPropertySymbolsModule$3=objectGetOwnPropertySymbols$1,getOwnPropertyDescriptorModule$2=objectGetOwnPropertyDescriptor$1,definePropertyModule$3=objectDefineProperty$1,definePropertiesModule=objectDefineProperties$1,propertyIsEnumerableModule$1=objectPropertyIsEnumerable$1,defineBuiltIn$2=defineBuiltIn$4,defineBuiltInAccessor=defineBuiltInAccessor$1,shared$8=sharedExports$1,sharedKey$4=sharedKey$7,hiddenKeys$5=hiddenKeys$a,uid$3=uid$6,wellKnownSymbol$e=wellKnownSymbol$o,wrappedWellKnownSymbolModule=wellKnownSymbolWrapped,defineWellKnownSymbol$l=wellKnownSymbolDefine,defineSymbolToPrimitive$1=symbolDefineToPrimitive,setToStringTag$5=setToStringTag$6,InternalStateModule$3=internalState$1,$forEach$1=arrayIteration.forEach,HIDDEN=sharedKey$4("hidden"),SYMBOL="Symbol",PROTOTYPE$1="prototype",setInternalState$2=InternalStateModule$3.set,getInternalState$4=InternalStateModule$3.getterFor(SYMBOL),ObjectPrototype$1=Object[PROTOTYPE$1],$Symbol=global$m.Symbol,SymbolPrototype=$Symbol&&$Symbol[PROTOTYPE$1],RangeError$1=global$m.RangeError,TypeError$1=global$m.TypeError,QObject=global$m.QObject,nativeGetOwnPropertyDescriptor$1=getOwnPropertyDescriptorModule$2.f,nativeDefineProperty=definePropertyModule$3.f,nativeGetOwnPropertyNames=getOwnPropertyNamesExternal.f,nativePropertyIsEnumerable=propertyIsEnumerableModule$1.f,push$7=uncurryThis$8([].push),AllSymbols=shared$8("symbols"),ObjectPrototypeSymbols=shared$8("op-symbols"),WellKnownSymbolsStore$2=shared$8("wks"),USE_SETTER=!QObject||!QObject[PROTOTYPE$1]||!QObject[PROTOTYPE$1].findChild,fallbackDefineProperty=function(S,C,R){var O=nativeGetOwnPropertyDescriptor$1(ObjectPrototype$1,C);O&&delete ObjectPrototype$1[C],nativeDefineProperty(S,C,R),O&&S!==ObjectPrototype$1&&nativeDefineProperty(ObjectPrototype$1,C,O)},setSymbolDescriptor=DESCRIPTORS$d&&fails$k(function(){return nativeObjectCreate(nativeDefineProperty({},"a",{get:function(){return nativeDefineProperty(this,"a",{value:7}).a}})).a!==7})?fallbackDefineProperty:nativeDefineProperty,wrap=function(S,C){var R=AllSymbols[S]=nativeObjectCreate(SymbolPrototype);return setInternalState$2(R,{type:SYMBOL,tag:S,description:C}),DESCRIPTORS$d||(R.description=C),R},$defineProperty$1=function S(C,R,O){C===ObjectPrototype$1&&$defineProperty$1(ObjectPrototypeSymbols,R,O),anObject$d(C);var I=toPropertyKey$4(R);return anObject$d(O),hasOwn$d(AllSymbols,I)?(O.enumerable?(hasOwn$d(C,HIDDEN)&&C[HIDDEN][I]&&(C[HIDDEN][I]=!1),O=nativeObjectCreate(O,{enumerable:createPropertyDescriptor$4(0,!1)})):(hasOwn$d(C,HIDDEN)||nativeDefineProperty(C,HIDDEN,createPropertyDescriptor$4(1,nativeObjectCreate(null))),C[HIDDEN][I]=!0),setSymbolDescriptor(C,I,O)):nativeDefineProperty(C,I,O)},$defineProperties=function S(C,R){anObject$d(C);var O=toIndexedObject$8(R),I=objectKeys$2(O).concat($getOwnPropertySymbols(O));return $forEach$1(I,function(N){(!DESCRIPTORS$d||call$5($propertyIsEnumerable$1,O,N))&&$defineProperty$1(C,N,O[N])}),C},$create=function S(C,R){return R===void 0?nativeObjectCreate(C):$defineProperties(nativeObjectCreate(C),R)},$propertyIsEnumerable$1=function S(C){var R=toPropertyKey$4(C),O=call$5(nativePropertyIsEnumerable,this,R);return this===ObjectPrototype$1&&hasOwn$d(AllSymbols,R)&&!hasOwn$d(ObjectPrototypeSymbols,R)?!1:O||!hasOwn$d(this,R)||!hasOwn$d(AllSymbols,R)||hasOwn$d(this,HIDDEN)&&this[HIDDEN][R]?O:!0},$getOwnPropertyDescriptor$1=function S(C,R){var O=toIndexedObject$8(C),I=toPropertyKey$4(R);if(!(O===ObjectPrototype$1&&hasOwn$d(AllSymbols,I)&&!hasOwn$d(ObjectPrototypeSymbols,I))){var N=nativeGetOwnPropertyDescriptor$1(O,I);return N&&hasOwn$d(AllSymbols,I)&&!(hasOwn$d(O,HIDDEN)&&O[HIDDEN][I])&&(N.enumerable=!0),N}},$getOwnPropertyNames=function S(C){var R=nativeGetOwnPropertyNames(toIndexedObject$8(C)),O=[];return $forEach$1(R,function(I){!hasOwn$d(AllSymbols,I)&&!hasOwn$d(hiddenKeys$5,I)&&push$7(O,I)}),O},$getOwnPropertySymbols=function(S){var C=S===ObjectPrototype$1,R=nativeGetOwnPropertyNames(C?ObjectPrototypeSymbols:toIndexedObject$8(S)),O=[];return $forEach$1(R,function(I){hasOwn$d(AllSymbols,I)&&(!C||hasOwn$d(ObjectPrototype$1,I))&&push$7(O,AllSymbols[I])}),O};NATIVE_SYMBOL$5||($Symbol=function(){if(isPrototypeOf$7(SymbolPrototype,this))throw new TypeError$1("Symbol is not a constructor");var C=!arguments.length||arguments[0]===void 0?void 0:$toString$1(arguments[0]),R=uid$3(C),O=function(I){var N=this===void 0?global$m:this;N===ObjectPrototype$1&&call$5(O,ObjectPrototypeSymbols,I),hasOwn$d(N,HIDDEN)&&hasOwn$d(N[HIDDEN],R)&&(N[HIDDEN][R]=!1);var L=createPropertyDescriptor$4(1,I);try{setSymbolDescriptor(N,R,L)}catch(B){if(!(B instanceof RangeError$1))throw B;fallbackDefineProperty(N,R,L)}};return DESCRIPTORS$d&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype$1,R,{configurable:!0,set:O}),wrap(R,C)},SymbolPrototype=$Symbol[PROTOTYPE$1],defineBuiltIn$2(SymbolPrototype,"toString",function(){return getInternalState$4(this).tag}),defineBuiltIn$2($Symbol,"withoutSetter",function(S){return wrap(uid$3(S),S)}),propertyIsEnumerableModule$1.f=$propertyIsEnumerable$1,definePropertyModule$3.f=$defineProperty$1,definePropertiesModule.f=$defineProperties,getOwnPropertyDescriptorModule$2.f=$getOwnPropertyDescriptor$1,getOwnPropertyNamesModule$2.f=getOwnPropertyNamesExternal.f=$getOwnPropertyNames,getOwnPropertySymbolsModule$3.f=$getOwnPropertySymbols,wrappedWellKnownSymbolModule.f=function(S){return wrap(wellKnownSymbol$e(S),S)},DESCRIPTORS$d&&defineBuiltInAccessor(SymbolPrototype,"description",{configurable:!0,get:function(){return getInternalState$4(this).description}})),$$q({global:!0,constructor:!0,wrap:!0,forced:!NATIVE_SYMBOL$5,sham:!NATIVE_SYMBOL$5},{Symbol:$Symbol}),$forEach$1(objectKeys$2(WellKnownSymbolsStore$2),function(S){defineWellKnownSymbol$l(S)}),$$q({target:SYMBOL,stat:!0,forced:!NATIVE_SYMBOL$5},{useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),$$q({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$5,sham:!DESCRIPTORS$d},{create:$create,defineProperty:$defineProperty$1,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor$1}),$$q({target:"Object",stat:!0,forced:!NATIVE_SYMBOL$5},{getOwnPropertyNames:$getOwnPropertyNames}),defineSymbolToPrimitive$1(),setToStringTag$5($Symbol,SYMBOL),hiddenKeys$5[HIDDEN]=!0;var NATIVE_SYMBOL$4=symbolConstructorDetection,symbolRegistryDetection=NATIVE_SYMBOL$4&&!!Symbol.for&&!!Symbol.keyFor,$$p=_export$1,getBuiltIn$a=getBuiltIn$f,hasOwn$c=hasOwnProperty_1$1,toString$b=toString$d,shared$7=sharedExports$1,NATIVE_SYMBOL_REGISTRY$1=symbolRegistryDetection,StringToSymbolRegistry=shared$7("string-to-symbol-registry"),SymbolToStringRegistry$1=shared$7("symbol-to-string-registry");$$p({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY$1},{for:function(S){var C=toString$b(S);if(hasOwn$c(StringToSymbolRegistry,C))return StringToSymbolRegistry[C];var R=getBuiltIn$a("Symbol")(C);return StringToSymbolRegistry[C]=R,SymbolToStringRegistry$1[R]=C,R}});var $$o=_export$1,hasOwn$b=hasOwnProperty_1$1,isSymbol$5=isSymbol$8,tryToString$4=tryToString$6,shared$6=sharedExports$1,NATIVE_SYMBOL_REGISTRY=symbolRegistryDetection,SymbolToStringRegistry=shared$6("symbol-to-string-registry");$$o({target:"Symbol",stat:!0,forced:!NATIVE_SYMBOL_REGISTRY},{keyFor:function S(C){if(!isSymbol$5(C))throw new TypeError(tryToString$4(C)+" is not a symbol");if(hasOwn$b(SymbolToStringRegistry,C))return SymbolToStringRegistry[C]}});var uncurryThis$7=functionUncurryThis,isArray$6=isArray$f,isCallable$h=isCallable$t,classof$7=classofRaw$4,toString$a=toString$d,push$6=uncurryThis$7([].push),getJsonReplacerFunction=function(S){if(isCallable$h(S))return S;if(isArray$6(S)){for(var C=S.length,R=[],O=0;O=C.length)return S.target=void 0,createIterResultObject$1(void 0,!0);switch(S.kind){case"keys":return createIterResultObject$1(R,!1);case"values":return createIterResultObject$1(C[R],!1)}return createIterResultObject$1([R,C[R]],!1)},"values"),Iterators$3.Arguments=Iterators$3.Array;var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DOMIterables$1=domIterables,global$k=global$x,setToStringTag=setToStringTag$6,Iterators$2=iterators;for(var COLLECTION_NAME in DOMIterables$1)setToStringTag(global$k[COLLECTION_NAME],COLLECTION_NAME),Iterators$2[COLLECTION_NAME]=Iterators$2.Array;var parent$z=symbol$4,symbol$3=parent$z,wellKnownSymbol$b=wellKnownSymbol$o,defineProperty$9=objectDefineProperty$1.f,METADATA=wellKnownSymbol$b("metadata"),FunctionPrototype$2=Function.prototype;FunctionPrototype$2[METADATA]===void 0&&defineProperty$9(FunctionPrototype$2,METADATA,{value:null});var defineWellKnownSymbol$7=wellKnownSymbolDefine;defineWellKnownSymbol$7("asyncDispose");var defineWellKnownSymbol$6=wellKnownSymbolDefine;defineWellKnownSymbol$6("dispose");var defineWellKnownSymbol$5=wellKnownSymbolDefine;defineWellKnownSymbol$5("metadata");var parent$y=symbol$3,symbol$2=parent$y,getBuiltIn$7=getBuiltIn$f,uncurryThis$5=functionUncurryThis,Symbol$4=getBuiltIn$7("Symbol"),keyFor=Symbol$4.keyFor,thisSymbolValue$1=uncurryThis$5(Symbol$4.prototype.valueOf),symbolIsRegistered=Symbol$4.isRegisteredSymbol||function S(C){try{return keyFor(thisSymbolValue$1(C))!==void 0}catch{return!1}},$$k=_export$1,isRegisteredSymbol$1=symbolIsRegistered;$$k({target:"Symbol",stat:!0},{isRegisteredSymbol:isRegisteredSymbol$1});for(var shared$5=sharedExports$1,getBuiltIn$6=getBuiltIn$f,uncurryThis$4=functionUncurryThis,isSymbol$3=isSymbol$8,wellKnownSymbol$a=wellKnownSymbol$o,Symbol$3=getBuiltIn$6("Symbol"),$isWellKnownSymbol=Symbol$3.isWellKnownSymbol,getOwnPropertyNames$1=getBuiltIn$6("Object","getOwnPropertyNames"),thisSymbolValue=uncurryThis$4(Symbol$3.prototype.valueOf),WellKnownSymbolsStore$1=shared$5("wks"),i=0,symbolKeys=getOwnPropertyNames$1(Symbol$3),symbolKeysLength=symbolKeys.length;i=N?S?"":void 0:(L=charCodeAt(O,I),L<55296||L>56319||I+1===N||(B=charCodeAt(O,I+1))<56320||B>57343?S?charAt$2(O,I):L:S?stringSlice(O,I,I+2):(L-55296<<10)+(B-56320)+65536)}},stringMultibyte$1={codeAt:createMethod$2(!1),charAt:createMethod$2(!0)},charAt$1=stringMultibyte$1.charAt,toString$8=toString$d,InternalStateModule$1=internalState$1,defineIterator=iteratorDefine,createIterResultObject=createIterResultObject$2,STRING_ITERATOR="String Iterator",setInternalState=InternalStateModule$1.set,getInternalState$2=InternalStateModule$1.getterFor(STRING_ITERATOR);defineIterator(String,"String",function(S){setInternalState(this,{type:STRING_ITERATOR,string:toString$8(S),index:0})},function S(){var C=getInternalState$2(this),R=C.string,O=C.index,I;return O>=R.length?createIterResultObject(void 0,!0):(I=charAt$1(R,O),C.index+=I.length,createIterResultObject(I,!1))});var classof$6=classof$c,getMethod$4=getMethod$6,isNullOrUndefined=isNullOrUndefined$3,Iterators$1=iterators,wellKnownSymbol$9=wellKnownSymbol$o,ITERATOR$2=wellKnownSymbol$9("iterator"),getIteratorMethod$7=function(S){if(!isNullOrUndefined(S))return getMethod$4(S,ITERATOR$2)||getMethod$4(S,"@@iterator")||Iterators$1[classof$6(S)]},getIteratorMethod$6=getIteratorMethod$7,getIteratorMethod_1=getIteratorMethod$6,parent$w=getIteratorMethod_1,getIteratorMethod$5=parent$w,parent$v=getIteratorMethod$5,getIteratorMethod$4=parent$v,parent$u=getIteratorMethod$4,getIteratorMethod$3=parent$u,getIteratorMethod$2=getIteratorMethod$3;const _getIteratorMethod=getDefaultExportFromCjs(getIteratorMethod$2);var DESCRIPTORS$b=descriptors$1,isArray$5=isArray$f,$TypeError$3=TypeError,getOwnPropertyDescriptor$7=Object.getOwnPropertyDescriptor,SILENT_ON_NON_WRITABLE_LENGTH_SET=DESCRIPTORS$b&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(S){return S instanceof TypeError}}(),arraySetLength=SILENT_ON_NON_WRITABLE_LENGTH_SET?function(S,C){if(isArray$5(S)&&!getOwnPropertyDescriptor$7(S,"length").writable)throw new $TypeError$3("Cannot set read only .length");return S.length=C}:function(S,C){return S.length=C},$$g=_export$1,toObject$6=toObject$c,lengthOfArrayLike$5=lengthOfArrayLike$9,setArrayLength$1=arraySetLength,doesNotExceedSafeInteger$1=doesNotExceedSafeInteger$3,fails$f=fails$v,INCORRECT_TO_LENGTH=fails$f(function(){return[].push.call({length:4294967296},1)!==4294967297}),properErrorOnNonWritableLength=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(S){return S instanceof TypeError}},FORCED$2=INCORRECT_TO_LENGTH||!properErrorOnNonWritableLength();$$g({target:"Array",proto:!0,arity:1,forced:FORCED$2},{push:function S(C){var R=toObject$6(this),O=lengthOfArrayLike$5(R),I=arguments.length;doesNotExceedSafeInteger$1(O+I);for(var N=0;N1?arguments[1]:void 0,L=N!==void 0;L&&(N=bind(N,I>2?arguments[2]:void 0));var B=getIteratorMethod(R),j=0,F,V,K,W,X,J;if(B&&!(this===$Array&&isArrayIteratorMethod(B)))for(W=getIterator(R,B),X=W.next,V=O?new this:[];!(K=call(X,W)).done;j++)J=L?callWithSafeIterationClosing(W,N,[K.value,j],!0):K.value,createProperty$2(V,j,J);else for(F=lengthOfArrayLike$3(R),V=O?new this(F):$Array(F);F>j;j++)J=L?N(R[j],j):R[j],createProperty$2(V,j,J);return V.length=j,V},wellKnownSymbol$6=wellKnownSymbol$o,ITERATOR=wellKnownSymbol$6("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(S){}var checkCorrectnessOfIteration$1=function(S,C){try{if(!C&&!SAFE_CLOSING)return!1}catch{return!1}var R=!1;try{var O={};O[ITERATOR]=function(){return{next:function(){return{done:R=!0}}}},S(O)}catch{}return R},$$e=_export$1,from$5=arrayFrom,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,INCORRECT_ITERATION=!checkCorrectnessOfIteration(function(S){Array.from(S)});$$e({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:from$5});var path$a=path$h,from$4=path$a.Array.from,parent$n=from$4,from$3=parent$n,parent$m=from$3,from$2=parent$m,parent$l=from$2,from$1=parent$l,from=from$1;const _Array$from=getDefaultExportFromCjs(from);function _arrayLikeToArray$k(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R1?L("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):L("Invalid argument supplied to oneOf, expected an array.")),B;function lt(ht,Ct,$t,Lt,Gt){for(var Pt=ht[Ct],Vt=0;Vt"u"||Qe===null)return""+Qe;var lt=Ue(Qe);if(lt==="object"){if(Qe instanceof Date)return"date";if(Qe instanceof RegExp)return"regexp"}return lt}function dt(Qe){var lt=et(Qe);switch(lt){case"array":case"object":return"an "+lt;case"boolean":case"date":case"regexp":return"a "+lt;default:return lt}}function gt(Qe){return!Qe.constructor||!Qe.constructor.name?X:Qe.constructor.name}return J.checkPropTypes=I,J.resetWarningCache=I.resetWarningCache,J.PropTypes=J,J},factoryWithTypeCheckers}var define_process_env_default$h={};if(define_process_env_default$h.NODE_ENV!=="production"){var ReactIs=reactIsExports,throwOnDirectAccess=!0;propTypes.exports=requireFactoryWithTypeCheckers()(ReactIs.isElement,throwOnDirectAccess)}else propTypes.exports=requireFactoryWithThrowingShims()();var propTypesExports=propTypes.exports;const PropTypes=getDefaultExportFromCjs(propTypesExports);var context$4=React.createContext({scrollTo:function S(){return 0},scrollToBottom:function S(){return 0},scrollToEnd:function S(){return 0},scrollToStart:function S(){return 0},scrollToTop:function S(){return 0}});context$4.displayName="ScrollToBottomFunctionContext";function useFunctionContext(){return reactExports.useContext(context$4)}function useScrollToEnd(){var S=useFunctionContext(),C=S.scrollToEnd;return C}var context$3=React.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});context$3.displayName="ScrollToBottomState1Context";var context$2=React.createContext({animating:!1,animatingToEnd:!1,sticky:!0});context$2.displayName="ScrollToBottomState2Context";var context$1=React.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});context$1.displayName="ScrollToBottomStateContext";var stateContexts=[context$1,context$3,context$2];function useStateContext(S){return reactExports.useContext(stateContexts[S]||stateContexts[0])}function useSticky(){var S=useStateContext(2),C=S.sticky;return[C]}var context=React.createContext({offsetHeight:0,scrollHeight:0,setTarget:function S(){return 0},styleToClassName:function S(){return""}});context.displayName="ScrollToBottomInternalContext";function useInternalContext(){return reactExports.useContext(context)}function useStyleToClassName(){var S=useInternalContext(),C=S.styleToClassName;return C}var ROOT_STYLE$2={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},AutoHideFollowButton=function S(C){var R=C.children,O=C.className,I=useSticky(),N=_slicedToArray$c(I,1),L=N[0],B=useStyleToClassName()(ROOT_STYLE$2),j=useScrollToEnd();return!L&&React.createElement("button",{className:classNames(B,(O||"")+""),onClick:j,type:"button"},R)};AutoHideFollowButton.defaultProps={children:void 0,className:""},AutoHideFollowButton.propTypes={children:PropTypes.any,className:PropTypes.string};var defineProperty$8={exports:{}},$$d=_export$1,DESCRIPTORS$a=descriptors$1,defineProperty$7=objectDefineProperty$1.f;$$d({target:"Object",stat:!0,forced:Object.defineProperty!==defineProperty$7,sham:!DESCRIPTORS$a},{defineProperty:defineProperty$7});var path$9=path$h,Object$3=path$9.Object,defineProperty$6=defineProperty$8.exports=function S(C,R,O){return Object$3.defineProperty(C,R,O)};Object$3.defineProperty.sham&&(defineProperty$6.sham=!0);var definePropertyExports=defineProperty$8.exports,parent$k=definePropertyExports,defineProperty$5=parent$k,parent$j=defineProperty$5,defineProperty$4=parent$j,parent$i=defineProperty$4,defineProperty$3=parent$i,defineProperty$2=defineProperty$3;const _Object$defineProperty$1=getDefaultExportFromCjs(defineProperty$2);var WrappedWellKnownSymbolModule$1=wellKnownSymbolWrapped,iterator$4=WrappedWellKnownSymbolModule$1.f("iterator"),parent$h=iterator$4,iterator$3=parent$h,parent$g=iterator$3,iterator$2=parent$g,parent$f=iterator$2,iterator$1=parent$f,iterator=iterator$1;const _Symbol$iterator=getDefaultExportFromCjs(iterator);function _typeof$D(S){"@babel/helpers - typeof";return _typeof$D=typeof _Symbol=="function"&&typeof _Symbol$iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof _Symbol=="function"&&C.constructor===_Symbol&&C!==_Symbol.prototype?"symbol":typeof C},_typeof$D(S)}var WrappedWellKnownSymbolModule=wellKnownSymbolWrapped,toPrimitive$7=WrappedWellKnownSymbolModule.f("toPrimitive"),parent$e=toPrimitive$7,toPrimitive$6=parent$e,parent$d=toPrimitive$6,toPrimitive$5=parent$d,parent$c=toPrimitive$5,toPrimitive$4=parent$c,toPrimitive$3=toPrimitive$4;const _Symbol$toPrimitive=getDefaultExportFromCjs(toPrimitive$3);function toPrimitive$2(S,C){if(_typeof$D(S)!="object"||!S)return S;var R=S[_Symbol$toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$D(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}function toPropertyKey$3(S){var C=toPrimitive$2(S,"string");return _typeof$D(C)=="symbol"?C:String(C)}function _defineProperty$A(S,C,R){return C=toPropertyKey$3(C),C in S?_Object$defineProperty$1(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _arrayWithoutHoles$b(S){if(_Array$isArray$1(S))return _arrayLikeToArray$k(S)}function _iterableToArray$c(S){if(typeof _Symbol<"u"&&_getIteratorMethod(S)!=null||S["@@iterator"]!=null)return _Array$from(S)}function _nonIterableSpread$b(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray$b(S){return _arrayWithoutHoles$b(S)||_iterableToArray$c(S)||_unsupportedIterableToArray$k(S)||_nonIterableSpread$b()}var check=function(S){return S&&S.Math==Math&&S},global$i=check(typeof globalThis=="object"&&globalThis)||check(typeof window=="object"&&window)||check(typeof self=="object"&&self)||check(typeof commonjsGlobal=="object"&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$e=function(S){try{return!!S()}catch{return!0}},fails$d=fails$e,descriptors=!fails$d(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$6=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$6&&!$propertyIsEnumerable.call({1:2},1);objectPropertyIsEnumerable.f=NASHORN_BUG?function S(C){var R=getOwnPropertyDescriptor$6(this,C);return!!R&&R.enumerable}:$propertyIsEnumerable;var createPropertyDescriptor$2=function(S,C){return{enumerable:!(S&1),configurable:!(S&2),writable:!(S&4),value:C}},toString$7={}.toString,classofRaw$1=function(S){return toString$7.call(S).slice(8,-1)},fails$c=fails$e,classof$5=classofRaw$1,split="".split,indexedObject=fails$c(function(){return!Object("z").propertyIsEnumerable(0)})?function(S){return classof$5(S)=="String"?split.call(S,""):Object(S)}:Object,requireObjectCoercible$4=function(S){if(S==null)throw TypeError("Can't call method on "+S);return S},IndexedObject=indexedObject,requireObjectCoercible$3=requireObjectCoercible$4,toIndexedObject$5=function(S){return IndexedObject(requireObjectCoercible$3(S))},isCallable$d=function(S){return typeof S=="function"},isCallable$c=isCallable$d,isObject$7=function(S){return typeof S=="object"?S!==null:isCallable$c(S)},global$h=global$i,isCallable$b=isCallable$d,aFunction=function(S){return isCallable$b(S)?S:void 0},getBuiltIn$5=function(S,C){return arguments.length<2?aFunction(global$h[S]):global$h[S]&&global$h[S][C]},getBuiltIn$4=getBuiltIn$5,engineUserAgent=getBuiltIn$4("navigator","userAgent")||"",global$g=global$i,userAgent=engineUserAgent,process$1=global$g.process,Deno=global$g.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,match,version;v8?(match=v8.split("."),version=match[0]<4?1:match[0]+match[1]):userAgent&&(match=userAgent.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=userAgent.match(/Chrome\/(\d+)/),match&&(version=match[1])));var engineV8Version=version&&+version,V8_VERSION=engineV8Version,fails$b=fails$e,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$b(function(){var S=Symbol();return!String(S)||!(Object(S)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=NATIVE_SYMBOL$1&&!Symbol.sham&&typeof Symbol.iterator=="symbol",isCallable$a=isCallable$d,getBuiltIn$3=getBuiltIn$5,USE_SYMBOL_AS_UID$1=useSymbolAsUid,isSymbol$2=USE_SYMBOL_AS_UID$1?function(S){return typeof S=="symbol"}:function(S){var C=getBuiltIn$3("Symbol");return isCallable$a(C)&&Object(S)instanceof C},tryToString$2=function(S){try{return String(S)}catch{return"Object"}},isCallable$9=isCallable$d,tryToString$1=tryToString$2,aCallable$1=function(S){if(isCallable$9(S))return S;throw TypeError(tryToString$1(S)+" is not a function")},aCallable=aCallable$1,getMethod$2=function(S,C){var R=S[C];return R==null?void 0:aCallable(R)},isCallable$8=isCallable$d,isObject$6=isObject$7,ordinaryToPrimitive$1=function(S,C){var R,O;if(C==="string"&&isCallable$8(R=S.toString)&&!isObject$6(O=R.call(S))||isCallable$8(R=S.valueOf)&&!isObject$6(O=R.call(S))||C!=="string"&&isCallable$8(R=S.toString)&&!isObject$6(O=R.call(S)))return O;throw TypeError("Can't convert object to primitive value")},shared$4={exports:{}},global$f=global$i,setGlobal$3=function(S,C){try{Object.defineProperty(global$f,S,{value:C,configurable:!0,writable:!0})}catch{global$f[S]=C}return C},global$e=global$i,setGlobal$2=setGlobal$3,SHARED="__core-js_shared__",store$3=global$e[SHARED]||setGlobal$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore;(shared$4.exports=function(S,C){return store$2[S]||(store$2[S]=C!==void 0?C:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var sharedExports=shared$4.exports,requireObjectCoercible$2=requireObjectCoercible$4,toObject$4=function(S){return Object(requireObjectCoercible$2(S))},toObject$3=toObject$4,hasOwnProperty$1={}.hasOwnProperty,hasOwnProperty_1=Object.hasOwn||function S(C,R){return hasOwnProperty$1.call(toObject$3(C),R)},id=0,postfix=Math.random(),uid$2=function(S){return"Symbol("+String(S===void 0?"":S)+")_"+(++id+postfix).toString(36)},global$d=global$i,shared$3=sharedExports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$3("wks"),Symbol$2=global$d.Symbol,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$2:Symbol$2&&Symbol$2.withoutSetter||uid$1,wellKnownSymbol$5=function(S){return(!hasOwn$8(WellKnownSymbolsStore,S)||!(NATIVE_SYMBOL||typeof WellKnownSymbolsStore[S]=="string"))&&(NATIVE_SYMBOL&&hasOwn$8(Symbol$2,S)?WellKnownSymbolsStore[S]=Symbol$2[S]:WellKnownSymbolsStore[S]=createWellKnownSymbol("Symbol."+S)),WellKnownSymbolsStore[S]},isObject$5=isObject$7,isSymbol$1=isSymbol$2,getMethod$1=getMethod$2,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$4=wellKnownSymbol$5,TO_PRIMITIVE=wellKnownSymbol$4("toPrimitive"),toPrimitive$1=function(S,C){if(!isObject$5(S)||isSymbol$1(S))return S;var R=getMethod$1(S,TO_PRIMITIVE),O;if(R){if(C===void 0&&(C="default"),O=R.call(S,C),!isObject$5(O)||isSymbol$1(O))return O;throw TypeError("Can't convert object to primitive value")}return C===void 0&&(C="number"),ordinaryToPrimitive(S,C)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(S){var C=toPrimitive(S,"string");return isSymbol(C)?C:String(C)},global$c=global$i,isObject$4=isObject$7,document$1=global$c.document,EXISTS$1=isObject$4(document$1)&&isObject$4(document$1.createElement),documentCreateElement$1=function(S){return EXISTS$1?document$1.createElement(S):{}},DESCRIPTORS$9=descriptors,fails$a=fails$e,createElement=documentCreateElement$1,ie8DomDefine=!DESCRIPTORS$9&&!fails$a(function(){return Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a!=7}),DESCRIPTORS$8=descriptors,propertyIsEnumerableModule=objectPropertyIsEnumerable,createPropertyDescriptor$1=createPropertyDescriptor$2,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor:function S(C,R){if(C=toIndexedObject$4(C),R=toPropertyKey$1(R),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor(C,R)}catch{}if(hasOwn$7(C,R))return createPropertyDescriptor$1(!propertyIsEnumerableModule.f.call(C,R),C[R])};var objectDefineProperty={},isObject$3=isObject$7,anObject$9=function(S){if(isObject$3(S))return S;throw TypeError(String(S)+" is not an object")},DESCRIPTORS$7=descriptors,IE8_DOM_DEFINE=ie8DomDefine,anObject$8=anObject$9,toPropertyKey=toPropertyKey$2,$defineProperty=Object.defineProperty;objectDefineProperty.f=DESCRIPTORS$7?$defineProperty:function S(C,R,O){if(anObject$8(C),R=toPropertyKey(R),anObject$8(O),IE8_DOM_DEFINE)try{return $defineProperty(C,R,O)}catch{}if("get"in O||"set"in O)throw TypeError("Accessors not supported");return"value"in O&&(C[R]=O.value),C};var DESCRIPTORS$6=descriptors,definePropertyModule$2=objectDefineProperty,createPropertyDescriptor=createPropertyDescriptor$2,createNonEnumerableProperty$4=DESCRIPTORS$6?function(S,C,R){return definePropertyModule$2.f(S,C,createPropertyDescriptor(1,R))}:function(S,C,R){return S[C]=R,S},redefine$5={exports:{}},isCallable$7=isCallable$d,store$1=sharedStore,functionToString=Function.toString;isCallable$7(store$1.inspectSource)||(store$1.inspectSource=function(S){return functionToString.call(S)});var inspectSource$2=store$1.inspectSource,global$b=global$i,isCallable$6=isCallable$d,inspectSource$1=inspectSource$2,WeakMap$2=global$b.WeakMap,nativeWeakMap=isCallable$6(WeakMap$2)&&/native code/.test(inspectSource$1(WeakMap$2)),shared$2=sharedExports,uid=uid$2,keys$4=shared$2("keys"),sharedKey$2=function(S){return keys$4[S]||(keys$4[S]=uid(S))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$a=global$i,isObject$2=isObject$7,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$6=hasOwnProperty_1,shared$1=sharedStore,sharedKey$1=sharedKey$2,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",WeakMap$1=global$a.WeakMap,set,get,has,enforce=function(S){return has(S)?get(S):set(S,{})},getterFor=function(S){return function(C){var R;if(!isObject$2(C)||(R=get(C)).type!==S)throw TypeError("Incompatible receiver, "+S+" required");return R}};if(NATIVE_WEAK_MAP||shared$1.state){var store=shared$1.state||(shared$1.state=new WeakMap$1),wmget=store.get,wmhas=store.has,wmset=store.set;set=function(S,C){if(wmhas.call(store,S))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return C.facade=S,wmset.call(store,S,C),C},get=function(S){return wmget.call(store,S)||{}},has=function(S){return wmhas.call(store,S)}}else{var STATE=sharedKey$1("state");hiddenKeys$3[STATE]=!0,set=function(S,C){if(hasOwn$6(S,STATE))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return C.facade=S,createNonEnumerableProperty$3(S,STATE,C),C},get=function(S){return hasOwn$6(S,STATE)?S[STATE]:{}},has=function(S){return hasOwn$6(S,STATE)}}var internalState={set,get,has,enforce,getterFor},DESCRIPTORS$5=descriptors,hasOwn$5=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$5&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$5(FunctionPrototype$1,"name"),PROPER=EXISTS&&(function S(){}).name==="something",CONFIGURABLE=EXISTS&&(!DESCRIPTORS$5||DESCRIPTORS$5&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS,PROPER,CONFIGURABLE},global$9=global$i,isCallable$5=isCallable$d,hasOwn$4=hasOwnProperty_1,createNonEnumerableProperty$2=createNonEnumerableProperty$4,setGlobal$1=setGlobal$3,inspectSource=inspectSource$2,InternalStateModule=internalState,CONFIGURABLE_FUNCTION_NAME=functionName.CONFIGURABLE,getInternalState$1=InternalStateModule.get,enforceInternalState=InternalStateModule.enforce,TEMPLATE=String(String).split("String");(redefine$5.exports=function(S,C,R,O){var I=O?!!O.unsafe:!1,N=O?!!O.enumerable:!1,L=O?!!O.noTargetGet:!1,B=O&&O.name!==void 0?O.name:C,j;if(isCallable$5(R)&&(String(B).slice(0,7)==="Symbol("&&(B="["+String(B).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!hasOwn$4(R,"name")||CONFIGURABLE_FUNCTION_NAME&&R.name!==B)&&createNonEnumerableProperty$2(R,"name",B),j=enforceInternalState(R),j.source||(j.source=TEMPLATE.join(typeof B=="string"?B:""))),S===global$9){N?S[C]=R:setGlobal$1(C,R);return}else I?!L&&S[C]&&(N=!0):delete S[C];N?S[C]=R:createNonEnumerableProperty$2(S,C,R)})(Function.prototype,"toString",function S(){return isCallable$5(this)&&getInternalState$1(this).source||inspectSource(this)});var redefineExports=redefine$5.exports,objectGetOwnPropertyNames={},ceil=Math.ceil,floor$1=Math.floor,toIntegerOrInfinity$5=function(S){var C=+S;return C!==C||C===0?0:(C>0?floor$1:ceil)(C)},toIntegerOrInfinity$4=toIntegerOrInfinity$5,max$3=Math.max,min$4=Math.min,toAbsoluteIndex$2=function(S,C){var R=toIntegerOrInfinity$4(S);return R<0?max$3(R+C,0):min$4(R,C)},toIntegerOrInfinity$3=toIntegerOrInfinity$5,min$3=Math.min,toLength$2=function(S){return S>0?min$3(toIntegerOrInfinity$3(S),9007199254740991):0},toLength$1=toLength$2,lengthOfArrayLike$2=function(S){return toLength$1(S.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$1=toAbsoluteIndex$2,lengthOfArrayLike$1=lengthOfArrayLike$2,createMethod$1=function(S){return function(C,R,O){var I=toIndexedObject$3(C),N=lengthOfArrayLike$1(I),L=toAbsoluteIndex$1(O,N),B;if(S&&R!=R){for(;N>L;)if(B=I[L++],B!=B)return!0}else for(;N>L;L++)if((S||L in I)&&I[L]===R)return S||L||0;return!S&&-1}},arrayIncludes={includes:createMethod$1(!0),indexOf:createMethod$1(!1)},hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf$4=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,objectKeysInternal=function(S,C){var R=toIndexedObject$2(S),O=0,I=[],N;for(N in R)!hasOwn$3(hiddenKeys$2,N)&&hasOwn$3(R,N)&&I.push(N);for(;C.length>O;)hasOwn$3(R,N=C[O++])&&(~indexOf$4(I,N)||I.push(N));return I},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$2.concat("length","prototype");objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function S(C){return internalObjectKeys$1(C,hiddenKeys$1)};var objectGetOwnPropertySymbols={};objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols;var getBuiltIn$2=getBuiltIn$5,getOwnPropertyNamesModule$1=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$7=anObject$9,ownKeys$C=getBuiltIn$2("Reflect","ownKeys")||function S(C){var R=getOwnPropertyNamesModule$1.f(anObject$7(C)),O=getOwnPropertySymbolsModule$1.f;return O?R.concat(O(C)):R},hasOwn$2=hasOwnProperty_1,ownKeys$B=ownKeys$C,getOwnPropertyDescriptorModule$1=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(S,C){for(var R=ownKeys$B(C),O=definePropertyModule$1.f,I=getOwnPropertyDescriptorModule$1.f,N=0;NN;)definePropertyModule.f(C,L=O[N++],R[L]);return C},getBuiltIn$1=getBuiltIn$5,html$1=getBuiltIn$1("document","documentElement"),anObject$4=anObject$9,defineProperties$5=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html=html$1,documentCreateElement=documentCreateElement$1,sharedKey=sharedKey$2,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(S){return LT+SCRIPT+GT+S+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(S){S.write(scriptTag("")),S.close();var C=S.parentWindow.Object;return S=null,C},NullProtoObjectViaIFrame=function(){var S=documentCreateElement("iframe"),C="java"+SCRIPT+":",R;return S.style.display="none",html.appendChild(S),S.src=String(C),R=S.contentWindow.document,R.open(),R.write(scriptTag("document.F=Object")),R.close(),R.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch{}NullProtoObject=typeof document<"u"?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var S=enumBugKeys.length;S--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[S]];return NullProtoObject()};hiddenKeys[IE_PROTO]=!0;var objectCreate=Object.create||function S(C,R){var O;return C!==null?(EmptyConstructor[PROTOTYPE]=anObject$4(C),O=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,O[IE_PROTO]=C):O=NullProtoObject(),R===void 0?O:defineProperties$5(O,R)},fails$7=fails$e,global$6=global$i,$RegExp$1=global$6.RegExp,regexpUnsupportedDotAll=fails$7(function(){var S=$RegExp$1(".","s");return!(S.dotAll&&S.exec(` -`)&&S.flags==="s")}),fails$6=fails$e,global$5=global$i,$RegExp=global$5.RegExp,regexpUnsupportedNcg=fails$6(function(){var S=$RegExp("(?b)","g");return S.exec("b").groups.a!=="b"||"b".replace(S,"$c")!=="bc"}),toString$5=toString$6,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=sharedExports,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeExec=RegExp.prototype.exec,nativeReplace=shared("native-string-replace",String.prototype.replace),patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=function(){var S=/a/,C=/b*/g;return nativeExec.call(S,"a"),nativeExec.call(C,"a"),S.lastIndex!==0||C.lastIndex!==0}(),UNSUPPORTED_Y=stickyHelpers.UNSUPPORTED_Y||stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=/()??/.exec("")[1]!==void 0,PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG;PATCH&&(patchedExec=function(C){var R=this,O=getInternalState(R),I=toString$5(C),N=O.raw,L,B,j,F,V,K,W;if(N)return N.lastIndex=R.lastIndex,L=patchedExec.call(N,I),R.lastIndex=N.lastIndex,L;var X=O.groups,J=UNSUPPORTED_Y&&R.sticky,oe=regexpFlags.call(R),pe=R.source,me=0,xe=I;if(J&&(oe=oe.replace("y",""),oe.indexOf("g")===-1&&(oe+="g"),xe=I.slice(R.lastIndex),R.lastIndex>0&&(!R.multiline||R.multiline&&I.charAt(R.lastIndex-1)!==` -`)&&(pe="(?: "+pe+")",xe=" "+xe,me++),B=new RegExp("^(?:"+pe+")",oe)),NPCG_INCLUDED&&(B=new RegExp("^"+pe+"$(?!\\s)",oe)),UPDATES_LAST_INDEX_WRONG&&(j=R.lastIndex),F=nativeExec.call(J?B:R,xe),J?F?(F.input=F.input.slice(me),F[0]=F[0].slice(me),F.index=R.lastIndex,R.lastIndex+=F[0].length):R.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&F&&(R.lastIndex=R.global?F.index+F[0].length:j),NPCG_INCLUDED&&F&&F.length>1&&nativeReplace.call(F[0],B,function(){for(V=1;V=N?S?"":void 0:(L=O.charCodeAt(I),L<55296||L>56319||I+1===N||(B=O.charCodeAt(I+1))<56320||B>57343?S?O.charAt(I):L:S?O.slice(I,I+2):(L-55296<<10)+(B-56320)+65536)}},stringMultibyte={codeAt:createMethod(!1),charAt:createMethod(!0)},charAt=stringMultibyte.charAt,advanceStringIndex$1=function(S,C,R){return C+(R?charAt(S,C).length:1)},toObject$2=toObject$4,floor=Math.floor,replace="".replace,SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(S,C,R,O,I,N){var L=R+S.length,B=O.length,j=SUBSTITUTION_SYMBOLS_NO_NAMED;return I!==void 0&&(I=toObject$2(I),j=SUBSTITUTION_SYMBOLS),replace.call(N,j,function(F,V){var K;switch(V.charAt(0)){case"$":return"$";case"&":return S;case"`":return C.slice(0,R);case"'":return C.slice(L);case"<":K=I[V.slice(1,-1)];break;default:var W=+V;if(W===0)return F;if(W>B){var X=floor(W/10);return X===0?F:X<=B?O[X-1]===void 0?V.charAt(1):O[X-1]+V.charAt(1):F}K=O[W-1]}return K===void 0?"":K})},anObject$3=anObject$9,isCallable$2=isCallable$d,classof$2=classofRaw$1,regexpExec=regexpExec$2,regexpExecAbstract=function(S,C){var R=S.exec;if(isCallable$2(R)){var O=R.call(S,C);return O!==null&&anObject$3(O),O}if(classof$2(S)==="RegExp")return regexpExec.call(S,C);throw TypeError("RegExp#exec called on incompatible receiver")},fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,fails$4=fails$e,anObject$2=anObject$9,isCallable$1=isCallable$d,toIntegerOrInfinity$1=toIntegerOrInfinity$5,toLength=toLength$2,toString$3=toString$6,requireObjectCoercible=requireObjectCoercible$4,advanceStringIndex=advanceStringIndex$1,getMethod=getMethod$2,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol=wellKnownSymbol$5,REPLACE=wellKnownSymbol("replace"),max$2=Math.max,min$2=Math.min,maybeToString=function(S){return S===void 0?S:String(S)},REPLACE_KEEPS_$0=function(){return"a".replace(/./,"$0")==="$0"}(),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=function(){return/./[REPLACE]?/./[REPLACE]("a","$0")==="":!1}(),REPLACE_SUPPORTS_NAMED_GROUPS=!fails$4(function(){var S=/./;return S.exec=function(){var C=[];return C.groups={a:"7"},C},"".replace(S,"$")!=="7"});fixRegExpWellKnownSymbolLogic("replace",function(S,C,R){var O=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(N,L){var B=requireObjectCoercible(this),j=N==null?void 0:getMethod(N,REPLACE);return j?j.call(N,B,L):C.call(toString$3(B),N,L)},function(I,N){var L=anObject$2(this),B=toString$3(I);if(typeof N=="string"&&N.indexOf(O)===-1&&N.indexOf("$<")===-1){var j=R(C,L,B,N);if(j.done)return j.value}var F=isCallable$1(N);F||(N=toString$3(N));var V=L.global;if(V){var K=L.unicode;L.lastIndex=0}for(var W=[];;){var X=regExpExec(L,B);if(X===null||(W.push(X),!V))break;var J=toString$3(X[0]);J===""&&(L.lastIndex=advanceStringIndex(B,toLength(L.lastIndex),K))}for(var oe="",pe=0,me=0;me=pe&&(oe+=B.slice(pe,Ae)+Be,pe=Ae+xe.length)}return oe+B.slice(pe)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var engineIsBun=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",$TypeError$1=TypeError,validateArgumentsLength$1=function(S,C){if(SR,L=isCallable(O)?O:Function$1(O),B=N?arraySlice(arguments,R):[],j=N?function(){apply(L,this,B)}:L;return C?S(j,I):S(j)}:S},$$b=_export$1,global$3=global$x,schedulersFix$1=schedulersFix$2,setInterval$3=schedulersFix$1(global$3.setInterval,!0);$$b({global:!0,bind:!0,forced:global$3.setInterval!==setInterval$3},{setInterval:setInterval$3});var $$a=_export$1,global$2=global$x,schedulersFix=schedulersFix$2,setTimeout$3=schedulersFix(global$2.setTimeout,!0);$$a({global:!0,bind:!0,forced:global$2.setTimeout!==setTimeout$3},{setTimeout:setTimeout$3});var path$8=path$h,setInterval$2=path$8.setInterval,setInterval$1=setInterval$2;const _setInterval=getDefaultExportFromCjs(setInterval$1);var fails$3=fails$v,arrayMethodIsStrict$2=function(S,C){var R=[][S];return!!R&&fails$3(function(){R.call(null,C||function(){return 1},1)})},$$9=_export$1,uncurryThis$2=functionUncurryThisClause,$indexOf=arrayIncludes$1.indexOf,arrayMethodIsStrict$1=arrayMethodIsStrict$2,nativeIndexOf=uncurryThis$2([].indexOf),NEGATIVE_ZERO=!!nativeIndexOf&&1/nativeIndexOf([1],1,-0)<0,FORCED$1=NEGATIVE_ZERO||!arrayMethodIsStrict$1("indexOf");$$9({target:"Array",proto:!0,forced:FORCED$1},{indexOf:function S(C){var R=arguments.length>1?arguments[1]:void 0;return NEGATIVE_ZERO?nativeIndexOf(this,C,R)||0:$indexOf(this,C,R)}});var getBuiltInPrototypeMethod$4=getBuiltInPrototypeMethod$7,indexOf$3=getBuiltInPrototypeMethod$4("Array","indexOf"),isPrototypeOf$4=objectIsPrototypeOf,method$4=indexOf$3,ArrayPrototype$4=Array.prototype,indexOf$2=function(S){var C=S.indexOf;return S===ArrayPrototype$4||isPrototypeOf$4(ArrayPrototype$4,S)&&C===ArrayPrototype$4.indexOf?method$4:C},parent$b=indexOf$2,indexOf$1=parent$b,indexOf=indexOf$1;const _indexOfInstanceProperty=getDefaultExportFromCjs(indexOf);var tryToString=tryToString$6,$TypeError=TypeError,deletePropertyOrThrow$1=function(S,C){if(!delete S[C])throw new $TypeError("Cannot delete property "+tryToString(C)+" of "+tryToString(S))},$$8=_export$1,toObject$1=toObject$c,toAbsoluteIndex=toAbsoluteIndex$5,toIntegerOrInfinity=toIntegerOrInfinity$9,lengthOfArrayLike=lengthOfArrayLike$9,setArrayLength=arraySetLength,doesNotExceedSafeInteger=doesNotExceedSafeInteger$3,arraySpeciesCreate=arraySpeciesCreate$3,createProperty$1=createProperty$5,deletePropertyOrThrow=deletePropertyOrThrow$1,arrayMethodHasSpeciesSupport$1=arrayMethodHasSpeciesSupport$4,HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport$1("splice"),max$1=Math.max,min$1=Math.min;$$8({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{splice:function S(C,R){var O=toObject$1(this),I=lengthOfArrayLike(O),N=toAbsoluteIndex(C,I),L=arguments.length,B,j,F,V,K,W;for(L===0?B=j=0:L===1?(B=0,j=I-N):(B=L-2,j=min$1(max$1(toIntegerOrInfinity(R),0),I-N)),doesNotExceedSafeInteger(I+B-j),F=arraySpeciesCreate(O,j),V=0;VI-j+B;V--)deletePropertyOrThrow(O,V-1)}else if(B>j)for(V=I-j;V>N;V--)K=V+j-1,W=V+B-1,K in O?O[W]=O[K]:deletePropertyOrThrow(O,W);for(V=0;V1?arguments[1]:void 0)},$$6=_export$1,forEach$4=arrayForEach;$$6({target:"Array",proto:!0,forced:[].forEach!==forEach$4},{forEach:forEach$4});var getBuiltInPrototypeMethod$1=getBuiltInPrototypeMethod$7,forEach$3=getBuiltInPrototypeMethod$1("Array","forEach"),parent$7=forEach$3,forEach$2=parent$7,classof$1=classof$c,hasOwn$1=hasOwnProperty_1$1,isPrototypeOf$1=objectIsPrototypeOf,method$1=forEach$2,ArrayPrototype$1=Array.prototype,DOMIterables={DOMTokenList:!0,NodeList:!0},forEach$1=function(S){var C=S.forEach;return S===ArrayPrototype$1||isPrototypeOf$1(ArrayPrototype$1,S)&&C===ArrayPrototype$1.forEach||hasOwn$1(DOMIterables,classof$1(S))?method$1:C},forEach=forEach$1;const _forEachInstanceProperty=getDefaultExportFromCjs(forEach);var $$5=_export$1,toObject=toObject$c,nativeKeys=objectKeys$4,fails$2=fails$v,FAILS_ON_PRIMITIVES=fails$2(function(){nativeKeys(1)});$$5({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES},{keys:function S(C){return nativeKeys(toObject(C))}});var path$6=path$h,keys$3=path$6.Object.keys,parent$6=keys$3,keys$2=parent$6,keys$1=keys$2;const _Object$keys=getDefaultExportFromCjs(keys$1);var path$5=path$h,getOwnPropertySymbols$3=path$5.Object.getOwnPropertySymbols,parent$5=getOwnPropertySymbols$3,getOwnPropertySymbols$2=parent$5,getOwnPropertySymbols$1=getOwnPropertySymbols$2;const _Object$getOwnPropertySymbols=getDefaultExportFromCjs(getOwnPropertySymbols$1);var $$4=_export$1,$filter=arrayIteration.filter,arrayMethodHasSpeciesSupport=arrayMethodHasSpeciesSupport$4,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("filter");$$4({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{filter:function S(C){return $filter(this,C,arguments.length>1?arguments[1]:void 0)}});var getBuiltInPrototypeMethod=getBuiltInPrototypeMethod$7,filter$3=getBuiltInPrototypeMethod("Array","filter"),isPrototypeOf=objectIsPrototypeOf,method=filter$3,ArrayPrototype=Array.prototype,filter$2=function(S){var C=S.filter;return S===ArrayPrototype||isPrototypeOf(ArrayPrototype,S)&&C===ArrayPrototype.filter?method:C},parent$4=filter$2,filter$1=parent$4,filter=filter$1;const _filterInstanceProperty=getDefaultExportFromCjs(filter);var getOwnPropertyDescriptor$4={exports:{}},$$3=_export$1,fails$1=fails$v,toIndexedObject$1=toIndexedObject$e,nativeGetOwnPropertyDescriptor=objectGetOwnPropertyDescriptor$1.f,DESCRIPTORS$3=descriptors$1,FORCED=!DESCRIPTORS$3||fails$1(function(){nativeGetOwnPropertyDescriptor(1)});$$3({target:"Object",stat:!0,forced:FORCED,sham:!DESCRIPTORS$3},{getOwnPropertyDescriptor:function S(C,R){return nativeGetOwnPropertyDescriptor(toIndexedObject$1(C),R)}});var path$4=path$h,Object$2=path$4.Object,getOwnPropertyDescriptor$3=getOwnPropertyDescriptor$4.exports=function S(C,R){return Object$2.getOwnPropertyDescriptor(C,R)};Object$2.getOwnPropertyDescriptor.sham&&(getOwnPropertyDescriptor$3.sham=!0);var getOwnPropertyDescriptorExports=getOwnPropertyDescriptor$4.exports,parent$3=getOwnPropertyDescriptorExports,getOwnPropertyDescriptor$2=parent$3,getOwnPropertyDescriptor$1=getOwnPropertyDescriptor$2;const _Object$getOwnPropertyDescriptor=getDefaultExportFromCjs(getOwnPropertyDescriptor$1);var getBuiltIn=getBuiltIn$f,uncurryThis=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames$1,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols$1,anObject$1=anObject$h,concat=uncurryThis([].concat),ownKeys$A=getBuiltIn("Reflect","ownKeys")||function S(C){var R=getOwnPropertyNamesModule.f(anObject$1(C)),O=getOwnPropertySymbolsModule.f;return O?concat(R,O(C)):R},$$2=_export$1,DESCRIPTORS$2=descriptors$1,ownKeys$z=ownKeys$A,toIndexedObject=toIndexedObject$e,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor$1,createProperty=createProperty$5;$$2({target:"Object",stat:!0,sham:!DESCRIPTORS$2},{getOwnPropertyDescriptors:function S(C){for(var R=toIndexedObject(C),O=getOwnPropertyDescriptorModule.f,I=ownKeys$z(R),N={},L=0,B,j;I.length>L;)j=O(R,B=I[L++]),j!==void 0&&createProperty(N,B,j);return N}});var path$3=path$h,getOwnPropertyDescriptors$2=path$3.Object.getOwnPropertyDescriptors,parent$2=getOwnPropertyDescriptors$2,getOwnPropertyDescriptors$1=parent$2,getOwnPropertyDescriptors=getOwnPropertyDescriptors$1;const _Object$getOwnPropertyDescriptors=getDefaultExportFromCjs(getOwnPropertyDescriptors);var defineProperties$4={exports:{}},$$1=_export$1,DESCRIPTORS$1=descriptors$1,defineProperties$3=objectDefineProperties$1.f;$$1({target:"Object",stat:!0,forced:Object.defineProperties!==defineProperties$3,sham:!DESCRIPTORS$1},{defineProperties:defineProperties$3});var path$2=path$h,Object$1=path$2.Object,defineProperties$2=defineProperties$4.exports=function S(C,R){return Object$1.defineProperties(C,R)};Object$1.defineProperties.sham&&(defineProperties$2.sham=!0);var definePropertiesExports=defineProperties$4.exports,parent$1=definePropertiesExports,defineProperties$1=parent$1,defineProperties=defineProperties$1;const _Object$defineProperties=getDefaultExportFromCjs(defineProperties);var defineProperty$1=defineProperty$5;const _Object$defineProperty=getDefaultExportFromCjs(defineProperty$1);var define_process_env_default$g={};function insertWithoutScoping(S,C){if(S.inserted[C.name]===void 0)return S.insert("",C,S.sheet,!0)}function merge(S,C,R){var O=[],I=getRegisteredStyles(S,O,R);return O.length<2?R:I+C(O)}var createEmotion=function S(C){var R=createCache(C);R.sheet.speedy=function(B){if(define_process_env_default$g.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=B},R.compat=!0;var O=function(){for(var j=arguments.length,F=new Array(j),V=0;V1&&arguments[1]!==void 0?arguments[1]:"white",R="background-color: ".concat(S,"; border-radius: 4px; padding: 2px 4px;");return C&&(R+=" color: ".concat(C,";")),[R,""]}function format(S,C){for(var R,O,I=arguments.length,N=new Array(I>2?I-2:0),L=2;L1&&arguments[1]!==void 0?arguments[1]:{},R=C.force,O=R===void 0?!1:R;return O?function(){for(var I=arguments.length,N=new Array(I),L=0;LC?(S.apply(void 0,N),R=B):(clearTimeout(O),O=_setTimeout(function(){S.apply(void 0,N),R=_Date$now()},Math.max(0,C-B+R)))}}var EventSpy=function S(C){var R=C.debounce,O=C.name,I=C.onEvent,N=C.target,L=reactExports.useRef();L.current=I;var B=reactExports.useMemo(function(){return debounceFn(function(F){var V=L.current;V&&V(F)},R)},[R,L]),j=reactExports.useCallback(function(F){F.timeStampLow=_Date$now(),B(F)},[B]);return reactExports.useLayoutEffect(function(){return N.addEventListener(O,j,{passive:!0}),j({target:N,type:O}),function(){return N.removeEventListener(O,j)}},[O,j,N]),!1};EventSpy.defaultProps={debounce:200};var mathSign$1=Math.sign||function S(C){var R=+C;return R===0||R!==R?R:R<0?-1:1},$=_export$1,sign$4=mathSign$1;$({target:"Math",stat:!0},{sign:sign$4});var path=path$h,sign$3=path.Math.sign,parent=sign$3,sign$2=parent,sign$1=sign$2;const _Math$sign=getDefaultExportFromCjs(sign$1);function squareStepper(S,C){var R=_Math$sign(C-S),O=Math.sqrt(Math.abs(C-S)),I=S+O*R;return R>0?Math.min(C,I):Math.max(C,I)}function step(S,C,R,O){for(var I=S,N=0;N4&&arguments[4]!==void 0?arguments[4]:_Date$now();(K==="100%"||typeof K=="number")&&(cancelAnimationFrame(L.current),L.current=requestAnimationFrame(function(){if(I){var J=K==="100%"?I.scrollHeight-I.offsetHeight:K,oe=step(V,J,squareStepper,(_Date$now()-X)/5);Math.abs(J-oe)<1.5&&(oe=J),I[F]=oe,J===oe?O&&O(!0):B(F,V,K,W+1,X)}}))},[L,O,I]),j=reactExports.useCallback(function(){cancelAnimationFrame(L.current),O&&O(!1)},[O]);return reactExports.useLayoutEffect(function(){return B(R,I[R],N,1),I?(I.addEventListener("pointerdown",j,{passive:!0}),I.addEventListener("wheel",j,{passive:!0}),function(){I.removeEventListener("pointerdown",j),I.removeEventListener("wheel",j),cancelAnimationFrame(L.current)}):function(){return cancelAnimationFrame(L.current)}},[B,L,j,R,I,N]),!1};SpineTo.propTypes={name:PropTypes.string.isRequired,onEnd:PropTypes.func,target:PropTypes.any.isRequired,value:PropTypes.oneOfType([PropTypes.number,PropTypes.oneOf(["100%"])]).isRequired};function useStateRef(S){var C=reactExports.useState(S),R=_slicedToArray$c(C,2),O=R[0],I=R[1],N=reactExports.useRef(),L=reactExports.useCallback(function(B){typeof B=="function"?L(function(j){return B=B(j),N.current=B,B}):(N.current=B,L(B))},[N]);return N.current=O,[O,I,N]}function ownKeys$y(S,C){var R=_Object$keys(S);if(_Object$getOwnPropertySymbols){var O=_Object$getOwnPropertySymbols(S);C&&(O=_filterInstanceProperty(O).call(O,function(I){return _Object$getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$y(S){for(var C=1;C",{force:N})},[N]);B=B===MODE_TOP?MODE_TOP:MODE_BOTTOM;var K=reactExports.useRef(0),W=reactExports.useRef(L),X=useStateRef(B===MODE_TOP?0:"100%"),J=_slicedToArray$c(X,3),oe=J[0],pe=J[1],me=J[2],xe=useStateRef(null),Ae=_slicedToArray$c(xe,3),ge=Ae[0],Te=Ae[1],we=Ae[2],ke=reactExports.useRef(0),Be=reactExports.useRef(0),Ie=reactExports.useRef(0),je=reactExports.useState(!0),Ke=_slicedToArray$c(je,2),Je=Ke[0],Xe=Ke[1],ot=reactExports.useState(!0),tt=_slicedToArray$c(ot,2),Ue=tt[0],et=tt[1],dt=reactExports.useState(!0),gt=_slicedToArray$c(dt,2),Qe=gt[0],lt=gt[1],ht=reactExports.useState(!1),Ct=_slicedToArray$c(ht,2),$t=Ct[0],Lt=Ct[1],Gt=useStateRef(!0),Pt=_slicedToArray$c(Gt,3),Vt=Pt[0],bt=Pt[1],It=Pt[2],Ht=reactExports.useRef([]),kt=reactExports.useCallback(function(Ut){var nr=we.current;return Ht.current.push(Ut),nr&&Ut({scrollTop:nr.scrollTop}),function(){var Ir=Ht.current,jr=_indexOfInstanceProperty(Ir).call(Ir,Ut);~jr&&_spliceInstanceProperty(Ir).call(Ir,jr,1)}},[Ht,we]),Kt=reactExports.useCallback(function(){var Ut=me.current;V(function(){var nr;return _concatInstanceProperty(nr=["%cSpineTo%c: %conEnd%c is fired."]).call(nr,_toConsumableArray$b(styleConsole("magenta")),_toConsumableArray$b(styleConsole("orange")),[{animateTo:Ut}])}),K.current=_Date$now(),isEnd(Ut,B)||bt(!1),pe(null)},[me,V,K,B,pe,bt]),tr=reactExports.useCallback(function(Ut){var nr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ir=nr.behavior,jr=we.current;if(typeof Ut!="number"&&Ut!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');V(function(){var Rr;return[_concatInstanceProperty(Rr=["%cscrollTo%c: Will scroll to %c".concat(typeof Ut=="number"?Ut+"px":Ut.replace(/%/g,"%%"),"%c")]).call(Rr,_toConsumableArray$b(styleConsole("lime","")),_toConsumableArray$b(styleConsole("purple"))),{behavior:Ir,nextAnimateTo:Ut,target:jr}]}),Ir==="auto"?(Kt(),jr&&(jr.scrollTop=Ut==="100%"?jr.scrollHeight-jr.offsetHeight:Ut)):(Ir!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),pe(Ut)),isEnd(Ut,B)&&(V(function(){var Rr;return[_concatInstanceProperty(Rr=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Rr,_toConsumableArray$b(styleConsole("lime","")),_toConsumableArray$b(styleConsole("purple"))),[{mode:B,nextAnimateTo:Ut}]]}),bt(!0))},[V,Kt,B,pe,bt,we]),wr=reactExports.useCallback(function(){var Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},nr=Ut.behavior;V(function(){var Ir;return _concatInstanceProperty(Ir=["%cscrollToBottom%c: Called"]).call(Ir,_toConsumableArray$b(styleConsole("yellow","")))}),nr!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),tr("100%",{behavior:nr||"smooth"})},[V,tr]),xr=reactExports.useCallback(function(){var Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},nr=Ut.behavior;V(function(){var Ir;return _concatInstanceProperty(Ir=["%cscrollToTop%c: Called"]).call(Ir,_toConsumableArray$b(styleConsole("yellow","")))}),nr!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),tr(0,{behavior:nr||"smooth"})},[V,tr]),Vr=reactExports.useCallback(function(){var Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},nr=Ut.behavior;V(function(){var jr;return _concatInstanceProperty(jr=["%cscrollToEnd%c: Called"]).call(jr,_toConsumableArray$b(styleConsole("yellow","")))}),nr!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var Ir={behavior:nr||"smooth"};B===MODE_TOP?xr(Ir):wr(Ir)},[V,B,wr,xr]),bn=reactExports.useCallback(function(){var Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},nr=Ut.behavior;V(function(){var jr;return _concatInstanceProperty(jr=["%cscrollToStart%c: Called"]).call(jr,_toConsumableArray$b(styleConsole("yellow","")))}),nr!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var Ir={behavior:nr||"smooth"};B===MODE_TOP?wr(Ir):xr(Ir)},[V,B,wr,xr]),Bn=reactExports.useCallback(function(){var Ut=we.current;if(Ut){if(W.current==="auto"){V(function(){var Gn;return _concatInstanceProperty(Gn=["%ctarget changed%c: Initial scroll"]).call(Gn,_toConsumableArray$b(styleConsole("blue")))}),Ut.scrollTop=B===MODE_TOP?0:Ut.scrollHeight-Ut.offsetHeight,W.current=!1;return}var nr=ke.current,Ir=Ut.offsetHeight,jr=Ut.scrollHeight,Rr=Ut.scrollTop,fr=B===MODE_TOP?0:Math.max(0,jr-Ir-Rr),Or=Math.max(0,nr-Rr),Jr=F({maxValue:fr,minValue:Or,offsetHeight:Ir,scrollHeight:jr,scrollTop:Rr}),nn=Math.max(0,Math.min(fr,Jr)),hn;B===MODE_TOP||nn!==fr?hn=Rr+nn:hn="100%",V(function(){var Gn,Zn,Eo;return[_concatInstanceProperty(Gn=[_concatInstanceProperty(Zn=_concatInstanceProperty(Eo="%cscrollToSticky%c: Will animate from %c".concat(nr,"px%c to %c")).call(Eo,typeof hn=="number"?hn+"px":hn.replace(/%/g,"%%"),"%c (%c")).call(Zn,(hn==="100%"?fr:hn)+nr,"px%c)")]).call(Gn,_toConsumableArray$b(styleConsole("orange")),_toConsumableArray$b(styleConsole("purple")),_toConsumableArray$b(styleConsole("purple")),_toConsumableArray$b(styleConsole("purple"))),{animateFrom:nr,maxValue:fr,minValue:Or,nextAnimateTo:hn,nextValue:nn,offsetHeight:Ir,rawNextValue:Jr,scrollHeight:jr,scrollTop:Rr}]}),tr(hn,{behavior:"smooth"})}},[ke,V,B,F,tr,we]),An=reactExports.useCallback(function(Ut){var nr,Ir=Ut.timeStampLow,jr=me.current,Rr=we.current,fr=jr!==null;if(!(Ir<=K.current||!Rr)){var Or=computeViewState({mode:B,target:Rr}),Jr=Or.atBottom,nn=Or.atEnd,hn=Or.atStart,Gn=Or.atTop;Xe(Jr),et(nn),Lt(hn),lt(Gn);var Zn=Rr.offsetHeight,Eo=Rr.scrollHeight,vo=Be.current,Fo=Ie.current,Ln=Zn!==vo,xn=Eo!==Fo;if(Ln&&(Be.current=Zn),xn&&(Ie.current=Eo),!Ln&&!xn){var Ko=fr&&isEnd(jr,B)||nn;It.current!==Ko&&(V(function(){var zo,fo,Wn,wn;return[_concatInstanceProperty(zo=["%conScroll%c: %csetSticky%c(%c".concat(Ko,"%c)")]).call(zo,_toConsumableArray$b(styleConsole("red")),_toConsumableArray$b(styleConsole("red")),_toConsumableArray$b(styleConsole("purple"))),_concatInstanceProperty(fo=[_concatInstanceProperty(Wn=_concatInstanceProperty(wn="(animating = %c".concat(fr,"%c && isEnd = %c")).call(wn,isEnd(jr,B),"%c) || atEnd = %c")).call(Wn,nn,"%c")]).call(fo,_toConsumableArray$b(styleConsole("purple")),_toConsumableArray$b(styleConsole("purple")),_toConsumableArray$b(styleConsole("purple")),[{animating:fr,animateTo:jr,atEnd:nn,mode:B,offsetHeight:Rr.offsetHeight,scrollHeight:Rr.scrollHeight,sticky:It.current,nextSticky:Ko}])]}),bt(Ko))}else It.current&&(V(function(){var zo;return[_concatInstanceProperty(zo=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(zo,_toConsumableArray$b(styleConsole("red")),_toConsumableArray$b(styleConsole("orange")),[{offsetHeightChanged:Ln,scrollHeightChanged:xn}]),{nextOffsetHeight:Zn,prevOffsetHeight:vo,nextScrollHeight:Eo,prevScrollHeight:Fo}]}),Bn());var ao=Rr.scrollTop;_forEachInstanceProperty(nr=Ht.current).call(nr,function(zo){return zo({scrollTop:ao})})}},[me,V,K,B,Be,Ie,Ht,Bn,Xe,et,Lt,lt,bt,It,we]);reactExports.useEffect(function(){if(ge){var Ut=!1,nr=setImmediateInterval(function(){var Ir=we.current,jr=me.current!==null;It.current?computeViewState({mode:B,target:Ir}).atEnd?Ut=!1:Ut?_Date$now()-Ut>SCROLL_DECISION_DURATION&&(jr||(ke.current=Ir.scrollTop,V(function(){var Rr;return _concatInstanceProperty(Rr=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Rr,_toConsumableArray$b(styleConsole("navy")),_toConsumableArray$b(styleConsole("orange")))}),Bn()),Ut=!1):Ut=_Date$now():Ir.scrollHeight<=Ir.offsetHeight&&!It.current&&(V(function(){var Rr;return[_concatInstanceProperty(Rr=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Rr,_toConsumableArray$b(styleConsole("navy")),_toConsumableArray$b(styleConsole("purple"))),[{offsetHeight:Ir.offsetHeight,scrollHeight:Ir.scrollHeight,sticky:It.current}]]}),bt(!0))},Math.max(MIN_CHECK_INTERVAL,R)||MIN_CHECK_INTERVAL);return function(){return clearInterval(nr)}}},[me,R,V,B,Bn,bt,It,ge,we]);var Tn=reactExports.useMemo(function(){var Ut=emotionPool[j]||(emotionPool[j]=createEmotion({key:"react-scroll-to-bottom--css-"+useCSSKey(),nonce:j}));return function(nr){return Ut.css(nr)+""}},[j]),pn=reactExports.useMemo(function(){return{observeScrollPosition:kt,setTarget:Te,styleToClassName:Tn}},[kt,Te,Tn]),Mn=reactExports.useMemo(function(){return{atBottom:Je,atEnd:Ue,atStart:$t,atTop:Qe,mode:B}},[Je,Ue,$t,Qe,B]),bo=reactExports.useMemo(function(){var Ut=oe!==null;return{animating:Ut,animatingToEnd:Ut&&isEnd(oe,B),sticky:Vt}},[oe,B,Vt]),mr=reactExports.useMemo(function(){return _objectSpread$y(_objectSpread$y({},Mn),bo)},[Mn,bo]),sr=reactExports.useMemo(function(){return{scrollTo:tr,scrollToBottom:wr,scrollToEnd:Vr,scrollToStart:bn,scrollToTop:xr}},[tr,wr,Vr,bn,xr]);return reactExports.useEffect(function(){if(ge){var Ut=function(){Ie.current=ge.scrollHeight};return ge.addEventListener("focus",Ut,{capture:!0,passive:!0}),function(){return ge.removeEventListener("focus",Ut)}}},[ge]),V(function(){var Ut;return[_concatInstanceProperty(Ut=["%cRender%c: Render"]).call(Ut,_toConsumableArray$b(styleConsole("cyan",""))),{animateTo:oe,animating:oe!==null,sticky:Vt,target:ge}]}),React.createElement(context.Provider,{value:pn},React.createElement(context$4.Provider,{value:sr},React.createElement(context$1.Provider,{value:mr},React.createElement(context$3.Provider,{value:Mn},React.createElement(context$2.Provider,{value:bo},O,ge&&React.createElement(EventSpy,{debounce:I,name:"scroll",onEvent:An,target:ge}),ge&&oe!==null&&React.createElement(SpineTo,{name:"scrollTop",onEnd:Kt,target:ge,value:oe}))))))};Composer.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:DEFAULT_SCROLLER},Composer.propTypes={checkInterval:PropTypes.number,children:PropTypes.any,debounce:PropTypes.number,debug:PropTypes.bool,initialScrollBehavior:PropTypes.oneOf(["auto","smooth"]),mode:PropTypes.oneOf(["bottom","top"]),nonce:PropTypes.string,scroller:PropTypes.func};var ROOT_STYLE$1={height:"100%",overflowY:"auto",width:"100%"},Panel=function S(C){var R=C.children,O=C.className,I=reactExports.useContext(context),N=I.setTarget,L=useStyleToClassName()(ROOT_STYLE$1);return React.createElement("div",{className:classNames(L,(O||"")+""),ref:N},R)};Panel.defaultProps={children:void 0,className:void 0},Panel.propTypes={children:PropTypes.any,className:PropTypes.string};var ROOT_STYLE={position:"relative"},BasicScrollToBottomCore=function S(C){var R=C.children,O=C.className,I=C.followButtonClassName,N=C.scrollViewClassName,L=useStyleToClassName()(ROOT_STYLE);return React.createElement("div",{className:classNames(L,(O||"")+"")},React.createElement(Panel,{className:(N||"")+""},R),React.createElement(AutoHideFollowButton,{className:(I||"")+""}))};BasicScrollToBottomCore.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},BasicScrollToBottomCore.propTypes={children:PropTypes.any,className:PropTypes.string,followButtonClassName:PropTypes.string,scrollViewClassName:PropTypes.string};var BasicScrollToBottom=function S(C){var R=C.checkInterval,O=C.children,I=C.className,N=C.debounce,L=C.debug,B=C.followButtonClassName,j=C.initialScrollBehavior,F=C.mode,V=C.nonce,K=C.scroller,W=C.scrollViewClassName;return React.createElement(Composer,{checkInterval:R,debounce:N,debug:L,initialScrollBehavior:j,mode:F,nonce:V,scroller:K},React.createElement(BasicScrollToBottomCore,{className:I,followButtonClassName:B,scrollViewClassName:W},O))};BasicScrollToBottom.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},BasicScrollToBottom.propTypes={checkInterval:PropTypes.number,children:PropTypes.any,className:PropTypes.string,debounce:PropTypes.number,debug:PropTypes.bool,followButtonClassName:PropTypes.string,initialScrollBehavior:PropTypes.oneOf(["auto","smooth"]),mode:PropTypes.oneOf(["bottom","top"]),nonce:PropTypes.string,scroller:PropTypes.func,scrollViewClassName:PropTypes.string},addVersionToMetaTag();function MessageSenderRenderer(S){const{data:C,position:R,className:O}=S,I=useStyles$2(),N=C.timestamp?dayjs(C.timestamp).format("h:mm A"):null,[L,B]=C.from.split(": ");return jsxRuntimeExports.jsxs("div",{className:mergeClasses(I.container,O),"data-position":R,children:[jsxRuntimeExports.jsxs("span",{className:I.name,"data-position":R,"data-category":C.category,children:[L,B&&jsxRuntimeExports.jsxs("span",{children:[": ",jsxRuntimeExports.jsx("strong",{children:B})]})]}),N&&jsxRuntimeExports.jsx("span",{className:I.time,children:N})]})}MessageSenderRenderer.displayName="MessageSenderRenderer";const useStyles$2=makeStyles({container:{display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",fontSize:"0.75rem",'&&[data-position="right"]':{justifyContent:"flex-end"},color:tokens.colorNeutralForeground3},name:{...shorthands.margin("0px","6px","0px","0px"),fontSize:tokens.fontSizeBase200,lineHeight:tokens.lineHeightBase200,[`&&[data-category="${ChatMessageCategory.System}"]`]:{...shorthands.margin("0px","6px","0px","12px")}},time:{}}),OpenAIIcon=()=>jsxRuntimeExports.jsxs("svg",{fill:"currentColor",width:"20px",height:"20px",viewBox:"0 0 2048 2048",role:"img",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("title",{children:"OpenAI icon"}),jsxRuntimeExports.jsx("path",{d:"M832 676l575 288v760l-575 288-575-288V964l575-288zm0 144l-368 184 368 183 368-183-368-184zm-447 825l383 191v-538l-383-191v538zm894 0v-538l-383 191v538l383-191zm577-733q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9zM704 496q-14 0-23-9t-9-23q0-23-9-43t-24-36-35-24-44-9q-14 0-23-9t-9-23q0-14 9-23t23-9q23 0 43-9t36-24 24-35 9-44q0-14 9-23t23-9q14 0 23 9t9 23q0 23 9 43t24 36 35 24 44 9q14 0 23 9t9 23q0 14-9 23t-23 9q-23 0-43 9t-36 24-24 35-9 44q0 14-9 23t-23 9zm1206-48q0 23-15 38t-39 16q-27 0-57 11t-58 28-54 37-45 40q-19 19-39 44t-38 54-28 59-11 57q0 23-15 38t-39 16q-23 0-38-15t-16-39q0-27-11-57t-28-58-37-54-40-45q-19-19-44-39t-54-38-59-28-57-11q-23 0-38-15t-16-39q0-23 15-38t39-16q27 0 57-11t58-28 54-37 45-40q19-19 39-44t38-54 28-59 11-57q0-23 15-38t39-16q23 0 38 15t16 39q0 27 11 57t28 58 37 54 40 45q19 19 44 39t54 38 59 28 57 11q23 0 38 15t16 39zm-438 212q38-65 92-119t120-93q-65-38-119-92t-93-120q-38 65-92 119t-120 93q65 38 119 92t93 120z"})]});var RichContentType=(S=>(S.TEXT="text",S.IMAGE_URL="image_url",S.IMAGE_FILE="image_file",S))(RichContentType||{});const ErrorMessage=({error:S})=>{const C=useLocStrings();return jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[jsxRuntimeExports.jsx(ErrorCircle16Filled,{style:{color:tokens.colorStatusDangerForeground1}}),jsxRuntimeExports.jsxs("div",{children:[C.Error,": ",S.message]})]})},RichTextChatboxMessageContent=S=>{const{content:C,className:R}=S,O=reactExports.useMemo(()=>weaveRichNodesIntoMarkup(C),[C]),I=useStyles$1(),N=mergeClasses(I.content,R);return jsxRuntimeExports.jsx("div",{className:N,children:typeof O=="string"?jsxRuntimeExports.jsx(MarkdownViewer,{content:O}):jsxRuntimeExports.jsx(ErrorMessage,{error:O})})},useStyles$1=makeStyles({content:{...shorthands.overflow("auto"),wordBreak:"break-all",whiteSpace:"break-spaces"}});function weaveRichNodesIntoMarkup(S){if(typeof S=="string")return S;return Array.isArray(S)?S.map(C).filter(Boolean).join(` - -`):new Error("content type is not supported");function C(R){var O,I,N,L;switch(R.type){case RichContentType.TEXT:return R.text??"";case RichContentType.IMAGE_URL:return`![${(O=R.image_url)==null?void 0:O.url}](${(I=R.image_url)==null?void 0:I.url})`;case RichContentType.IMAGE_FILE:return`![${(N=R.image_file)==null?void 0:N.path}](${(L=R.image_file)==null?void 0:L.path})`;default:return""}}}const capitalizeFirstLetter=S=>S.charAt(0).toUpperCase()+S.slice(1),getSenderNameByLLMMessage=S=>S.role&&S.name?`${S.role}: ${S.name}`:S.role?S.role:S.name?S.name:"user",defaultCalcContentForCopy=S=>JSON.stringify(S.content),messageRoleToCategory=S=>{switch(S){case"system":return ChatMessageCategory.System;case"user":return ChatMessageCategory.User;default:return ChatMessageCategory.Chatbot}},useAvatarStyles=makeStyles({avatar:{...shorthands.margin("16px","4px","4px","4px")}}),LLMNodeMessagesList=S=>{const C=useSelectedSpan(),R=S.messages.map((O,I)=>({id:I,type:ChatMessageType.Message,history:[{content:O.content??"",category:messageRoleToCategory(O.role),from:capitalizeFirstLetter(getSenderNameByLLMMessage(O)),timestamp:O.role==="assistant"?C==null?void 0:C.start_time:C==null?void 0:C.end_time}]}));return jsxRuntimeExports.jsx(ChatboxMessageList,{locStrings:defaultLocStrings$1,messages:R,calcContentForCopy:defaultCalcContentForCopy})},MessageAvatarRenderer=({data:S,className:C})=>{const R=useAvatarStyles();return S.category===ChatMessageCategory.System?jsxRuntimeExports.jsx("div",{className:mergeClasses(R.avatar,C),children:jsxRuntimeExports.jsx(Alert20Regular,{})}):S.category===ChatMessageCategory.User?jsxRuntimeExports.jsx("div",{className:mergeClasses(R.avatar,C),children:jsxRuntimeExports.jsx(Person20Regular,{})}):S.category===ChatMessageCategory.Chatbot?jsxRuntimeExports.jsx("div",{className:mergeClasses(R.avatar,C),children:jsxRuntimeExports.jsx(OpenAIIcon,{})}):null};function ChatboxMessageList(S){const{locStrings:C,messages:R,calcContentForCopy:O}=S,I=useStyles();return jsxRuntimeExports.jsx(BasicScrollToBottom,{className:I.main,initialScrollBehavior:"auto",children:jsxRuntimeExports.jsx(MessageListRenderer,{calcContentForCopy:O,locStrings:C,messages:R,MessageAvatarRenderer,MessageContentRenderer:RichTextChatboxMessageContent,MessageSenderRenderer})})}ChatboxMessageList.displayName="ChatboxMessageList";const useStyles=makeStyles({main:{...shorthands.padding("0","16px"),...shorthands.overflow("auto"),height:"100%"}}),useClasses$9=makeStyles({root:{height:"100%",display:"flex",flexDirection:"column",...shorthands.overflow("auto")},title:{fontSize:"14px",lineHeight:"20px",fontStyle:"italic",fontWeight:400,color:tokens.colorNeutralForeground1},card:{flexGrow:1}}),LLMNodePromptTemplateTab=({promptTemplate:S,templateVariables:C})=>{const R=useClasses$9(),O=useMessageCardClasses(),N=useIsDark()?"vs-dark":"light",L=useLocStrings();return jsxRuntimeExports.jsxs("div",{className:R.root,children:[jsxRuntimeExports.jsxs(Card,{className:mergeClasses(O.card,R.card),children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{className:R.title,children:L.prompt_template})}),jsxRuntimeExports.jsx(JinjaSyntaxHighlighter,{value:S,theme:N})]}),jsxRuntimeExports.jsxs(Card,{className:O.card,children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{className:R.title,children:L.template_variables})}),jsxRuntimeExports.jsx(JsonView,{src:C})]})]})},LLMNodeRaw=({inputs:S,outputs:C})=>{const R=useLocStrings();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[S&&jsxRuntimeExports.jsx(JsonNodeCard,{title:R.Inputs,src:S}),C&&jsxRuntimeExports.jsx(JsonNodeCard,{title:R.Output,src:C})]})},useLLMNodeClasses=makeStyles({root:{height:"100%",display:"flex"},content:{...shorthands.overflow("auto")}}),LLMNodeInfo=()=>{var xe,Ae,ge,Te,we,ke,Be;const S=useSelectedSpan(),C=(xe=useParentSpanOfSelectedSpan())==null?void 0:xe.attributes,R=useNodeDetailClasses(),O=JSON.parse(((Ae=S==null?void 0:S.attributes)==null?void 0:Ae.inputs)??"{}"),I=JSON.parse(((ge=S==null?void 0:S.attributes)==null?void 0:ge.output)??"{}"),N=(Te=S==null?void 0:S.attributes)==null?void 0:Te["llm.generated_message"],L=N?JSON.parse(N):void 0,B=C==null?void 0:C["prompt.template"],j=JSON.parse((C==null?void 0:C["prompt.variables"])??"{}"),F=Object.keys(j??{}),V={};Object.keys(O).forEach(Ie=>{Ie!=="messages"&&(F.includes(Ie)||(V[Ie]=O[Ie]))});const K=O.messages??[],W=((we=I.choices)==null?void 0:we.reduce((Ie,je)=>je.message?[...Ie,je.message]:je.text?[...Ie,{content:je.text,role:"assistant"}]:Ie,[]))??[];L&&W.push(L);const X=[...K,...W],[J,oe]=reactExports.useState("messages"),pe=useLLMNodeClasses(),me=useLocStrings();return jsxRuntimeExports.jsxs(Card,{className:pe.root,children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:R.headerWrapper,children:[jsxRuntimeExports.jsx(Badge$2,{appearance:"outline",children:me.llm}),jsxRuntimeExports.jsx("div",{className:R.headerTitle,children:O.model})]}),jsxRuntimeExports.jsxs(TabList,{selectedValue:J,onTabSelect:(Ie,{value:je})=>oe(je),children:[jsxRuntimeExports.jsx(Tab$1,{value:"messages",children:me.Messages}),jsxRuntimeExports.jsx(Tab$1,{value:"raw",children:me.Raw_JSON}),jsxRuntimeExports.jsx(Tab$1,{value:"promptTemplate",children:me.Prompt_Template}),jsxRuntimeExports.jsx(Tab$1,{value:"llmParameters",children:me.LLM_Parameters})]})]})}),jsxRuntimeExports.jsxs("div",{className:pe.content,children:[J==="messages"&&jsxRuntimeExports.jsx(LLMNodeMessagesList,{messages:X}),J==="promptTemplate"&&jsxRuntimeExports.jsx(LLMNodePromptTemplateTab,{promptTemplate:B??"",templateVariables:j}),J==="llmParameters"&&jsxRuntimeExports.jsx(LLMNodeInvocationParametersTab,{invocationParameters:V}),J==="raw"&&jsxRuntimeExports.jsx(LLMNodeRaw,{inputs:(ke=S==null?void 0:S.attributes)==null?void 0:ke.inputs,outputs:((Be=S==null?void 0:S.attributes)==null?void 0:Be.output)??N})]})]})},NodeToken=({span:S,showDetail:C=!0})=>{const R=useParseTraceOutput(S);if(!R||typeof R=="string")return null;const O=R.usage;return!O||typeof O=="string"||!O.total_tokens?null:jsxRuntimeExports.jsx(TokenText,{token:O.total_tokens,info:C?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",rowGap:6},children:[jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Total tokens",value:O.total_tokens??0}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Prompt tokens",value:O.prompt_tokens??0}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Completion tokens",value:O.completion_tokens??0}})]}):void 0})},SummaryToken=({trace:S,showDetail:C=!0})=>jsxRuntimeExports.jsx(TokenText,{token:S.total_tokens,info:C?jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",rowGap:6},children:[jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Total tokens",value:S.total_tokens}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Prompt tokens",value:S.prompt_tokens}}),jsxRuntimeExports.jsx(MetricTag,{tag:{name:"Completion tokens",value:S.completion_tokens}})]}):void 0}),RetrievalNodeInfo=()=>{const S=useSelectedSpan(),C=useLocStrings();if(!(S!=null&&S.attributes))return null;const R=S==null?void 0:S.attributes;let O=[];if(typeof R["retrieval.documents"]=="string")try{O=JSON.parse(R["retrieval.documents"])}catch{O=[]}return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:C.Query})})}),R["retrieval.query"]??""]}),jsxRuntimeExports.jsxs(Card,{style:{marginBottom:12},children:[jsxRuntimeExports.jsx(CardHeader,{header:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:C.Documents})})}),O.map(I=>jsxRuntimeExports.jsx(Document$1,{document:I},I["document.id"]))]})]})},Document$1=({document:S})=>{const C=useRetrievalNodeDetailClasses(),[R,O]=reactExports.useState(["content"]),I=reactExports.useCallback((L,B)=>{O(B.openItems)},[]),N=useLocStrings();return jsxRuntimeExports.jsxs(Card,{style:{background:tokens.colorNeutralBackground2},children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",columnGap:6},children:[jsxRuntimeExports.jsx(Document16Regular,{}),jsxRuntimeExports.jsx("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:jsxRuntimeExports.jsx(Tooltip$1,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:"id"})," ",S["document.id"]]}),relationship:"description",children:jsxRuntimeExports.jsxs("span",{children:[N.document," ",S["document.id"]]})})}),jsxRuntimeExports.jsx(Tooltip$1,{content:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{style:{fontWeight:600},children:N.score})," ",S["document.score"]]}),relationship:"description",children:jsxRuntimeExports.jsxs(Badge$2,{appearance:"outline",children:["score ",floatFormatter(S["document.score"])]})})]}),jsxRuntimeExports.jsx(Divider$2,{}),jsxRuntimeExports.jsx(Card,{style:{background:tokens.colorNeutralBackground3},children:jsxRuntimeExports.jsx(Accordion,{openItems:R,onToggle:I,collapsible:!0,multiple:!0,children:jsxRuntimeExports.jsxs(AccordionItem,{value:"content",children:[jsxRuntimeExports.jsx(AccordionHeader,{className:C.accordionHeader,children:N.content}),jsxRuntimeExports.jsx(AccordionPanel,{children:jsxRuntimeExports.jsx(MarkdownViewer,{content:S["document.content"]})})]})})}),jsxRuntimeExports.jsx(JsonNodeCard,{title:"metadata",src:S["document.metadata"],wrapperStyle:{background:tokens.colorNeutralBackground3}})]})},NodeDetail=({emptyTip:S=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:"No Data"})})=>{var K,W,X;const C=useNodeDetailClasses(),[R,O]=reactExports.useState("info"),I=useSelectedSpan(),N=useEvaluationSpansOfSelectedSpan(),L=useRootSpanIdOfSelectedSpans(),B=useLocStrings(),j=reactExports.useMemo(()=>{var J;return L===((J=I==null?void 0:I.context)==null?void 0:J.span_id)},[L,I]),F=((K=I==null?void 0:I.events)==null?void 0:K.length)??0,V=N.length??0;return I?jsxRuntimeExports.jsxs("div",{className:C.wrapper,children:[((X=(W=I==null?void 0:I.status)==null?void 0:W.status_code)==null?void 0:X.toLowerCase())==="error"&&jsxRuntimeExports.jsx(MessageBar,{intent:"error",onClick:()=>{O("error")},style:{cursor:"pointer"},children:jsxRuntimeExports.jsxs(MessageBarBody,{children:[jsxRuntimeExports.jsxs(MessageBarTitle,{children:[" ",B.Error]}),I.status.message]})}),jsxRuntimeExports.jsxs("div",{className:C.headerWrapper,children:[jsxRuntimeExports.jsx(Badge$2,{appearance:"outline",children:getToolTypeFromSpan(I)}),jsxRuntimeExports.jsx("div",{className:C.headerTitle,children:jsxRuntimeExports.jsx(Tooltip$1,{content:(I==null?void 0:I.name)||"",relationship:"description",children:jsxRuntimeExports.jsx("span",{children:I.name})})}),jsxRuntimeExports.jsx("div",{className:C.headerItem,children:jsxRuntimeExports.jsx(NodeToken,{span:I,showDetail:!0})}),jsxRuntimeExports.jsx("div",{className:C.headerItem,children:jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:I.start_time,endTimeISOString:I.end_time})})]}),jsxRuntimeExports.jsxs(TabList,{selectedValue:R,onTabSelect:(J,oe)=>{O(oe.value)},children:[jsxRuntimeExports.jsx(Tab$1,{value:"info",children:B.Info}),jsxRuntimeExports.jsx(Tab$1,{value:"attr",children:B.Raw_JSON}),j&&jsxRuntimeExports.jsxs(Tab$1,{value:"evaluations",children:[B.Metrics," ",jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:"informative",count:V,size:"small",showZero:!0})]}),jsxRuntimeExports.jsxs(Tab$1,{value:"error",children:[B.Events," ",jsxRuntimeExports.jsx(CounterBadge,{appearance:"filled",color:F>0?"danger":"informative",count:F,size:"small",showZero:!0})]})]}),jsxRuntimeExports.jsx(Divider$2,{className:C.tabDivider}),jsxRuntimeExports.jsxs("div",{className:C.content,children:[R==="info"&&jsxRuntimeExports.jsx(NodeCard,{}),R==="attr"&&jsxRuntimeExports.jsx(NodeAttrCard,{}),j&&R==="evaluations"&&jsxRuntimeExports.jsx(EvaluationsTab,{}),R==="error"&&jsxRuntimeExports.jsx(ErrorsTab,{})]})]}):S},NodeCard=()=>{var R,O,I;const S=useSelectedSpan(),C=(R=S==null?void 0:S.attributes)==null?void 0:R.function;switch((I=(O=S==null?void 0:S.attributes)==null?void 0:O.span_type)==null?void 0:I.toLowerCase()){case"llm":return C!=null&&C.startsWith("openai.resources.chat")||C!=null&&C.startsWith("openai.api_resources.chat")?jsxRuntimeExports.jsx(LLMNodeInfo,{}):jsxRuntimeExports.jsx(DefaultNodeInfo,{});case"retrieval":return jsxRuntimeExports.jsx(RetrievalNodeInfo,{});case"embedding":return jsxRuntimeExports.jsx(EmbeddingNodeInfo,{});default:return jsxRuntimeExports.jsx(DefaultNodeInfo,{})}},NodeAttrCard=()=>{const S=useSelectedSpan(),C=useLocStrings();return S!=null&&S.attributes?jsxRuntimeExports.jsx(JsonNodeCard,{title:C.Raw_JSON,src:S}):null};function isNil(S){return S==null}var isNil_1=isNil;const isNil$1=getDefaultExportFromCjs(isNil_1);var baseGetTag$1=_baseGetTag,isObjectLike$1=isObjectLike_1,numberTag="[object Number]";function isNumber$2(S){return typeof S=="number"||isObjectLike$1(S)&&baseGetTag$1(S)==numberTag}var isNumber_1=isNumber$2;const isNumber$3=getDefaultExportFromCjs(isNumber_1);var isNumber$1=isNumber_1;function isNaN$1(S){return isNumber$1(S)&&S!=+S}var _isNaN=isNaN$1;const isNan=getDefaultExportFromCjs(_isNaN);var mathSign=function S(C){return C===0?0:C>0?1:-1},isPercent=function S(C){return isString$1(C)&&C.indexOf("%")===C.length-1},isNumber=function S(C){return isNumber$3(C)&&!isNan(C)},isNumOrStr=function S(C){return isNumber(C)||isString$1(C)},idCounter=0,uniqueId=function S(C){var R=++idCounter;return"".concat(C||"").concat(R)},getPercentValue=function S(C,R){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!isNumber(C)&&!isString$1(C))return O;var N;if(isPercent(C)){var L=C.indexOf("%");N=R*parseFloat(C.slice(0,L))/100}else N=+C;return isNan(N)&&(N=O),I&&N>R&&(N=R),N},getAnyElementOfObject=function S(C){if(!C)return null;var R=Object.keys(C);return R&&R.length?C[R[0]]:null},hasDuplicate=function S(C){if(!Array.isArray(C))return!1;for(var R=C.length,O={},I=0;I=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$f(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}var REACT_BROWSER_EVENT_MAP={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},getDisplayName=function S(C){return typeof C=="string"?C:C?C.displayName||C.name||"Component":""},lastChildren=null,lastResult=null,toArray=function S(C){if(C===lastChildren&&Array.isArray(lastResult))return lastResult;var R=[];return reactExports.Children.forEach(C,function(O){isNil$1(O)||(reactIsExports.isFragment(O)?R=R.concat(S(O.props.children)):R.push(O))}),lastResult=R,lastChildren=C,R};function findAllByType(S,C){var R=[],O=[];return Array.isArray(C)?O=C.map(function(I){return getDisplayName(I)}):O=[getDisplayName(C)],toArray(S).forEach(function(I){var N=get$5(I,"type.displayName")||get$5(I,"type.name");O.indexOf(N)!==-1&&R.push(I)}),R}function findChildByType(S,C){var R=findAllByType(S,C);return R&&R[0]}var validateWidthHeight=function S(C){if(!C||!C.props)return!1;var R=C.props,O=R.width,I=R.height;return!(!isNumber(O)||O<=0||!isNumber(I)||I<=0)},SVG_TAGS=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],isSvgElement=function S(C){return C&&C.type&&isString$1(C.type)&&SVG_TAGS.indexOf(C.type)>=0},isValidSpreadableProp=function S(C,R,O,I){var N,L=(N=FilteredElementKeyMap==null?void 0:FilteredElementKeyMap[I])!==null&&N!==void 0?N:[];return!isFunction$6(C)&&(I&&L.includes(R)||SVGElementPropKeys.includes(R))||O&&EventKeys.includes(R)},filterProps=function S(C,R,O){if(!C||typeof C=="function"||typeof C=="boolean")return null;var I=C;if(reactExports.isValidElement(C)&&(I=C.props),!isObject$y(I))return null;var N={};return Object.keys(I).forEach(function(L){var B;isValidSpreadableProp((B=I)===null||B===void 0?void 0:B[L],L,R,O)&&(N[L]=I[L])}),N},isChildrenEqual=function S(C,R){if(C===R)return!0;var O=reactExports.Children.count(C);if(O!==reactExports.Children.count(R))return!1;if(O===0)return!0;if(O===1)return isSingleChildEqual(Array.isArray(C)?C[0]:C,Array.isArray(R)?R[0]:R);for(var I=0;I=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$e(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function Surface(S){var C=S.children,R=S.width,O=S.height,I=S.viewBox,N=S.className,L=S.style,B=S.title,j=S.desc,F=_objectWithoutProperties$e(S,_excluded$e),V=I||{width:R,height:O,x:0,y:0},K=clsx("recharts-surface",N);return React.createElement("svg",_extends$n({},filterProps(F,!0,"svg"),{className:K,width:R,height:O,style:L,viewBox:"".concat(V.x," ").concat(V.y," ").concat(V.width," ").concat(V.height)}),React.createElement("title",null,B),React.createElement("desc",null,j),C)}var _excluded$d=["children","className"];function _extends$m(){return _extends$m=Object.assign?Object.assign.bind():function(S){for(var C=1;C=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$d(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}var Layer=React.forwardRef(function(S,C){var R=S.children,O=S.className,I=_objectWithoutProperties$d(S,_excluded$d),N=clsx("recharts-layer",O);return React.createElement("g",_extends$m({className:N},filterProps(I,!0),{ref:C}),R)}),define_process_env_default$f={},isDev$1=define_process_env_default$f.NODE_ENV!=="production",warn$1=function S(C,R){for(var O=arguments.length,I=new Array(O>2?O-2:0),N=2;NI?0:I+C),R=R>I?I:R,R<0&&(R+=I),I=C>R?0:R-C>>>0,C>>>=0;for(var N=Array(I);++O=O?S:baseSlice(S,C,R)}var _castSlice=castSlice$1;function asciiToArray$1(S){return S.split("")}var _asciiToArray=asciiToArray$1,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray$1(S){return S.match(reUnicode)||[]}var _unicodeToArray=unicodeToArray$1,asciiToArray=_asciiToArray,hasUnicode$1=_hasUnicode,unicodeToArray=_unicodeToArray;function stringToArray$1(S){return hasUnicode$1(S)?unicodeToArray(S):asciiToArray(S)}var _stringToArray=stringToArray$1,castSlice=_castSlice,hasUnicode=_hasUnicode,stringToArray=_stringToArray,toString$1=toString_1;function createCaseFirst$1(S){return function(C){C=toString$1(C);var R=hasUnicode(C)?stringToArray(C):void 0,O=R?R[0]:C.charAt(0),I=R?castSlice(R,1).join(""):C.slice(1);return O[S]()+I}}var _createCaseFirst=createCaseFirst$1,createCaseFirst=_createCaseFirst,upperFirst=createCaseFirst("toUpperCase"),upperFirst_1=upperFirst;const upperFirst$1=getDefaultExportFromCjs(upperFirst_1);function constant$1(S){return function(){return S}}const cos=Math.cos,sin=Math.sin,sqrt$1=Math.sqrt,pi$1=Math.PI,tau$1=2*pi$1,pi=Math.PI,tau=2*pi,epsilon=1e-6,tauEpsilon=tau-epsilon;function append(S){this._+=S[0];for(let C=1,R=S.length;C=0))throw new Error(`invalid digits: ${S}`);if(C>15)return append;const R=10**C;return function(O){this._+=O[0];for(let I=1,N=O.length;Iepsilon)if(!(Math.abs(K*j-F*V)>epsilon)||!N)this._append`L${this._x1=C},${this._y1=R}`;else{let X=O-L,J=I-B,oe=j*j+F*F,pe=X*X+J*J,me=Math.sqrt(oe),xe=Math.sqrt(W),Ae=N*Math.tan((pi-Math.acos((oe+W-pe)/(2*me*xe)))/2),ge=Ae/xe,Te=Ae/me;Math.abs(ge-1)>epsilon&&this._append`L${C+ge*V},${R+ge*K}`,this._append`A${N},${N},0,0,${+(K*X>V*J)},${this._x1=C+Te*j},${this._y1=R+Te*F}`}}arc(C,R,O,I,N,L){if(C=+C,R=+R,O=+O,L=!!L,O<0)throw new Error(`negative radius: ${O}`);let B=O*Math.cos(I),j=O*Math.sin(I),F=C+B,V=R+j,K=1^L,W=L?I-N:N-I;this._x1===null?this._append`M${F},${V}`:(Math.abs(this._x1-F)>epsilon||Math.abs(this._y1-V)>epsilon)&&this._append`L${F},${V}`,O&&(W<0&&(W=W%tau+tau),W>tauEpsilon?this._append`A${O},${O},0,1,${K},${C-B},${R-j}A${O},${O},0,1,${K},${this._x1=F},${this._y1=V}`:W>epsilon&&this._append`A${O},${O},0,${+(W>=pi)},${K},${this._x1=C+O*Math.cos(N)},${this._y1=R+O*Math.sin(N)}`)}rect(C,R,O,I){this._append`M${this._x0=this._x1=+C},${this._y0=this._y1=+R}h${O=+O}v${+I}h${-O}Z`}toString(){return this._}}function withPath(S){let C=3;return S.digits=function(R){if(!arguments.length)return C;if(R==null)C=null;else{const O=Math.floor(R);if(!(O>=0))throw new RangeError(`invalid digits: ${R}`);C=O}return S},()=>new Path(C)}function array(S){return typeof S=="object"&&"length"in S?S:Array.from(S)}function Linear(S){this._context=S}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(S,C){switch(S=+S,C=+C,this._point){case 0:this._point=1,this._line?this._context.lineTo(S,C):this._context.moveTo(S,C);break;case 1:this._point=2;default:this._context.lineTo(S,C);break}}};function curveLinear(S){return new Linear(S)}function x(S){return S[0]}function y(S){return S[1]}function shapeLine(S,C){var R=constant$1(!0),O=null,I=curveLinear,N=null,L=withPath(B);S=typeof S=="function"?S:S===void 0?x:constant$1(S),C=typeof C=="function"?C:C===void 0?y:constant$1(C);function B(j){var F,V=(j=array(j)).length,K,W=!1,X;for(O==null&&(N=I(X=L())),F=0;F<=V;++F)!(F=X;--J)B.point(Ae[J],ge[J]);B.lineEnd(),B.areaEnd()}me&&(Ae[W]=+S(pe,W,K),ge[W]=+C(pe,W,K),B.point(O?+O(pe,W,K):Ae[W],R?+R(pe,W,K):ge[W]))}if(xe)return B=null,xe+""||null}function V(){return shapeLine().defined(I).curve(L).context(N)}return F.x=function(K){return arguments.length?(S=typeof K=="function"?K:constant$1(+K),O=null,F):S},F.x0=function(K){return arguments.length?(S=typeof K=="function"?K:constant$1(+K),F):S},F.x1=function(K){return arguments.length?(O=K==null?null:typeof K=="function"?K:constant$1(+K),F):O},F.y=function(K){return arguments.length?(C=typeof K=="function"?K:constant$1(+K),R=null,F):C},F.y0=function(K){return arguments.length?(C=typeof K=="function"?K:constant$1(+K),F):C},F.y1=function(K){return arguments.length?(R=K==null?null:typeof K=="function"?K:constant$1(+K),F):R},F.lineX0=F.lineY0=function(){return V().x(S).y(C)},F.lineY1=function(){return V().x(S).y(R)},F.lineX1=function(){return V().x(O).y(C)},F.defined=function(K){return arguments.length?(I=typeof K=="function"?K:constant$1(!!K),F):I},F.curve=function(K){return arguments.length?(L=K,N!=null&&(B=L(N)),F):L},F.context=function(K){return arguments.length?(K==null?N=B=null:B=L(N=K),F):N},F}class Bump{constructor(C,R){this._context=C,this._x=R}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(C,R){switch(C=+C,R=+R,this._point){case 0:{this._point=1,this._line?this._context.lineTo(C,R):this._context.moveTo(C,R);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+C)/2,this._y0,this._x0,R,C,R):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+R)/2,C,this._y0,C,R);break}}this._x0=C,this._y0=R}}function bumpX(S){return new Bump(S,!0)}function bumpY(S){return new Bump(S,!1)}const symbolCircle={draw(S,C){const R=sqrt$1(C/pi$1);S.moveTo(R,0),S.arc(0,0,R,0,tau$1)}},symbolCross={draw(S,C){const R=sqrt$1(C/5)/2;S.moveTo(-3*R,-R),S.lineTo(-R,-R),S.lineTo(-R,-3*R),S.lineTo(R,-3*R),S.lineTo(R,-R),S.lineTo(3*R,-R),S.lineTo(3*R,R),S.lineTo(R,R),S.lineTo(R,3*R),S.lineTo(-R,3*R),S.lineTo(-R,R),S.lineTo(-3*R,R),S.closePath()}},tan30=sqrt$1(1/3),tan30_2=tan30*2,symbolDiamond={draw(S,C){const R=sqrt$1(C/tan30_2),O=R*tan30;S.moveTo(0,-R),S.lineTo(O,0),S.lineTo(0,R),S.lineTo(-O,0),S.closePath()}},symbolSquare={draw(S,C){const R=sqrt$1(C),O=-R/2;S.rect(O,O,R,R)}},ka=.8908130915292852,kr=sin(pi$1/10)/sin(7*pi$1/10),kx=sin(tau$1/10)*kr,ky=-cos(tau$1/10)*kr,symbolStar={draw(S,C){const R=sqrt$1(C*ka),O=kx*R,I=ky*R;S.moveTo(0,-R),S.lineTo(O,I);for(let N=1;N<5;++N){const L=tau$1*N/5,B=cos(L),j=sin(L);S.lineTo(j*R,-B*R),S.lineTo(B*O-j*I,j*O+B*I)}S.closePath()}},sqrt3=sqrt$1(3),symbolTriangle={draw(S,C){const R=-sqrt$1(C/(sqrt3*3));S.moveTo(0,R*2),S.lineTo(-sqrt3*R,-R),S.lineTo(sqrt3*R,-R),S.closePath()}},c=-.5,s=sqrt$1(3)/2,k=1/sqrt$1(12),a=(k/2+1)*3,symbolWye={draw(S,C){const R=sqrt$1(C/a),O=R/2,I=R*k,N=O,L=R*k+R,B=-N,j=L;S.moveTo(O,I),S.lineTo(N,L),S.lineTo(B,j),S.lineTo(c*O-s*I,s*O+c*I),S.lineTo(c*N-s*L,s*N+c*L),S.lineTo(c*B-s*j,s*B+c*j),S.lineTo(c*O+s*I,c*I-s*O),S.lineTo(c*N+s*L,c*L-s*N),S.lineTo(c*B+s*j,c*j-s*B),S.closePath()}};function Symbol$1(S,C){let R=null,O=withPath(I);S=typeof S=="function"?S:constant$1(S||symbolCircle),C=typeof C=="function"?C:constant$1(C===void 0?64:+C);function I(){let N;if(R||(R=N=O()),S.apply(this,arguments).draw(R,+C.apply(this,arguments)),N)return R=null,N+""||null}return I.type=function(N){return arguments.length?(S=typeof N=="function"?N:constant$1(N),I):S},I.size=function(N){return arguments.length?(C=typeof N=="function"?N:constant$1(+N),I):C},I.context=function(N){return arguments.length?(R=N??null,I):R},I}function noop(){}function point$2(S,C,R){S._context.bezierCurveTo((2*S._x0+S._x1)/3,(2*S._y0+S._y1)/3,(S._x0+2*S._x1)/3,(S._y0+2*S._y1)/3,(S._x0+4*S._x1+C)/6,(S._y0+4*S._y1+R)/6)}function Basis(S){this._context=S}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point$2(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(S,C){switch(S=+S,C=+C,this._point){case 0:this._point=1,this._line?this._context.lineTo(S,C):this._context.moveTo(S,C);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point$2(this,S,C);break}this._x0=this._x1,this._x1=S,this._y0=this._y1,this._y1=C}};function curveBasis(S){return new Basis(S)}function BasisClosed(S){this._context=S}BasisClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(S,C){switch(S=+S,C=+C,this._point){case 0:this._point=1,this._x2=S,this._y2=C;break;case 1:this._point=2,this._x3=S,this._y3=C;break;case 2:this._point=3,this._x4=S,this._y4=C,this._context.moveTo((this._x0+4*this._x1+S)/6,(this._y0+4*this._y1+C)/6);break;default:point$2(this,S,C);break}this._x0=this._x1,this._x1=S,this._y0=this._y1,this._y1=C}};function curveBasisClosed(S){return new BasisClosed(S)}function BasisOpen(S){this._context=S}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(S,C){switch(S=+S,C=+C,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var R=(this._x0+4*this._x1+S)/6,O=(this._y0+4*this._y1+C)/6;this._line?this._context.lineTo(R,O):this._context.moveTo(R,O);break;case 3:this._point=4;default:point$2(this,S,C);break}this._x0=this._x1,this._x1=S,this._y0=this._y1,this._y1=C}};function curveBasisOpen(S){return new BasisOpen(S)}function LinearClosed(S){this._context=S}LinearClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(S,C){S=+S,C=+C,this._point?this._context.lineTo(S,C):(this._point=1,this._context.moveTo(S,C))}};function curveLinearClosed(S){return new LinearClosed(S)}function sign(S){return S<0?-1:1}function slope3(S,C,R){var O=S._x1-S._x0,I=C-S._x1,N=(S._y1-S._y0)/(O||I<0&&-0),L=(R-S._y1)/(I||O<0&&-0),B=(N*I+L*O)/(O+I);return(sign(N)+sign(L))*Math.min(Math.abs(N),Math.abs(L),.5*Math.abs(B))||0}function slope2(S,C){var R=S._x1-S._x0;return R?(3*(S._y1-S._y0)/R-C)/2:C}function point$1(S,C,R){var O=S._x0,I=S._y0,N=S._x1,L=S._y1,B=(N-O)/3;S._context.bezierCurveTo(O+B,I+B*C,N-B,L-B*R,N,L)}function MonotoneX(S){this._context=S}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point$1(this,this._t0,slope2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(S,C){var R=NaN;if(S=+S,C=+C,!(S===this._x1&&C===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(S,C):this._context.moveTo(S,C);break;case 1:this._point=2;break;case 2:this._point=3,point$1(this,slope2(this,R=slope3(this,S,C)),R);break;default:point$1(this,this._t0,R=slope3(this,S,C));break}this._x0=this._x1,this._x1=S,this._y0=this._y1,this._y1=C,this._t0=R}}};function MonotoneY(S){this._context=new ReflectContext(S)}(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(S,C){MonotoneX.prototype.point.call(this,C,S)};function ReflectContext(S){this._context=S}ReflectContext.prototype={moveTo:function(S,C){this._context.moveTo(C,S)},closePath:function(){this._context.closePath()},lineTo:function(S,C){this._context.lineTo(C,S)},bezierCurveTo:function(S,C,R,O,I,N){this._context.bezierCurveTo(C,S,O,R,N,I)}};function monotoneX(S){return new MonotoneX(S)}function monotoneY(S){return new MonotoneY(S)}function Natural(S){this._context=S}Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var S=this._x,C=this._y,R=S.length;if(R)if(this._line?this._context.lineTo(S[0],C[0]):this._context.moveTo(S[0],C[0]),R===2)this._context.lineTo(S[1],C[1]);else for(var O=controlPoints(S),I=controlPoints(C),N=0,L=1;L=0;--C)I[C]=(L[C]-I[C+1])/N[C];for(N[R-1]=(S[R]+I[R-1])/2,C=0;C=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(S,C){switch(S=+S,C=+C,this._point){case 0:this._point=1,this._line?this._context.lineTo(S,C):this._context.moveTo(S,C);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,C),this._context.lineTo(S,C);else{var R=this._x*(1-this._t)+S*this._t;this._context.lineTo(R,this._y),this._context.lineTo(R,C)}break}}this._x=S,this._y=C}};function curveStep(S){return new Step(S,.5)}function stepBefore(S){return new Step(S,0)}function stepAfter(S){return new Step(S,1)}function stackOffsetNone(S,C){if((L=S.length)>1)for(var R=1,O,I,N=S[C[0]],L,B=N.length;R=0;)R[C]=C;return R}function stackValue(S,C){return S[C]}function stackSeries(S){const C=[];return C.key=S,C}function shapeStack(){var S=constant$1([]),C=stackOrderNone,R=stackOffsetNone,O=stackValue;function I(N){var L=Array.from(S.apply(this,arguments),stackSeries),B,j=L.length,F=-1,V;for(const K of N)for(B=0,++F;B0){for(var R,O,I=0,N=S[0].length,L;I0){for(var R=0,O=S[C[0]],I,N=O.length;R0)||!((N=(I=S[C[0]]).length)>0))){for(var R=0,O=1,I,N,L;O=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$c(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}var symbolFactories={symbolCircle,symbolCross,symbolDiamond,symbolSquare,symbolStar,symbolTriangle,symbolWye},RADIAN$2=Math.PI/180,getSymbolFactory=function S(C){var R="symbol".concat(upperFirst$1(C));return symbolFactories[R]||symbolCircle},calculateAreaSize=function S(C,R,O){if(R==="area")return C;switch(O){case"cross":return 5*C*C/9;case"diamond":return .5*C*C/Math.sqrt(3);case"square":return C*C;case"star":{var I=18*RADIAN$2;return 1.25*C*C*(Math.tan(I)-Math.tan(I*2)*Math.pow(Math.tan(I),2))}case"triangle":return Math.sqrt(3)*C*C/4;case"wye":return(21-10*Math.sqrt(3))*C*C/8;default:return Math.PI*C*C/4}},registerSymbol=function S(C,R){symbolFactories["symbol".concat(upperFirst$1(C))]=R},Symbols=function S(C){var R=C.type,O=R===void 0?"circle":R,I=C.size,N=I===void 0?64:I,L=C.sizeType,B=L===void 0?"area":L,j=_objectWithoutProperties$c(C,_excluded$c),F=_objectSpread$x(_objectSpread$x({},j),{},{type:O,size:N,sizeType:B}),V=function(){var pe=getSymbolFactory(O),me=Symbol$1().type(pe).size(calculateAreaSize(N,B,O));return me()},K=F.className,W=F.cx,X=F.cy,J=filterProps(F,!0);return W===+W&&X===+X&&N===+N?React.createElement("path",_extends$l({},J,{className:clsx("recharts-symbols",K),transform:"translate(".concat(W,", ").concat(X,")"),d:V()})):null};Symbols.registerSymbol=registerSymbol;function _typeof$A(S){"@babel/helpers - typeof";return _typeof$A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$A(S)}function _extends$k(){return _extends$k=Object.assign?Object.assign.bind():function(S){for(var C=1;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$a(S){return _getPrototypeOf$a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$a(S)}function _defineProperty$y(S,C,R){return C=_toPropertyKey$z(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$z(S){var C=_toPrimitive$z(S,"string");return _typeof$A(C)==="symbol"?C:String(C)}function _toPrimitive$z(S,C){if(_typeof$A(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$A(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}var SIZE=32,DefaultLegendContent=function(S){_inherits$a(R,S);var C=_createSuper$a(R);function R(){return _classCallCheck$d(this,R),C.apply(this,arguments)}return _createClass$d(R,[{key:"renderIcon",value:function(I){var N=this.props.inactiveColor,L=SIZE/2,B=SIZE/6,j=SIZE/3,F=I.inactive?N:I.color;if(I.type==="plainline")return React.createElement("line",{strokeWidth:4,fill:"none",stroke:F,strokeDasharray:I.payload.strokeDasharray,x1:0,y1:L,x2:SIZE,y2:L,className:"recharts-legend-icon"});if(I.type==="line")return React.createElement("path",{strokeWidth:4,fill:"none",stroke:F,d:"M0,".concat(L,"h").concat(j,` - A`).concat(B,",").concat(B,",0,1,1,").concat(2*j,",").concat(L,` - H`).concat(SIZE,"M").concat(2*j,",").concat(L,` - A`).concat(B,",").concat(B,",0,1,1,").concat(j,",").concat(L),className:"recharts-legend-icon"});if(I.type==="rect")return React.createElement("path",{stroke:"none",fill:F,d:"M0,".concat(SIZE/8,"h").concat(SIZE,"v").concat(SIZE*3/4,"h").concat(-SIZE,"z"),className:"recharts-legend-icon"});if(React.isValidElement(I.legendIcon)){var V=_objectSpread$w({},I);return delete V.legendIcon,React.cloneElement(I.legendIcon,V)}return React.createElement(Symbols,{fill:F,cx:L,cy:L,size:SIZE,sizeType:"diameter",type:I.type})}},{key:"renderItems",value:function(){var I=this,N=this.props,L=N.payload,B=N.iconSize,j=N.layout,F=N.formatter,V=N.inactiveColor,K={x:0,y:0,width:SIZE,height:SIZE},W={display:j==="horizontal"?"inline-block":"block",marginRight:10},X={display:"inline-block",verticalAlign:"middle",marginRight:4};return L.map(function(J,oe){var pe,me=J.formatter||F,xe=clsx((pe={"recharts-legend-item":!0},_defineProperty$y(pe,"legend-item-".concat(oe),!0),_defineProperty$y(pe,"inactive",J.inactive),pe));if(J.type==="none")return null;var Ae=isFunction$6(J.value)?null:J.value;warn$1(!isFunction$6(J.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var ge=J.inactive?V:J.color;return React.createElement("li",_extends$k({className:xe,style:W,key:"legend-item-".concat(oe)},adaptEventsOfChild(I.props,J,oe)),React.createElement(Surface,{width:B,height:B,viewBox:K,style:X},I.renderIcon(J)),React.createElement("span",{className:"recharts-legend-item-text",style:{color:ge}},me?me(Ae,J,oe):Ae))})}},{key:"render",value:function(){var I=this.props,N=I.payload,L=I.layout,B=I.align;if(!N||!N.length)return null;var j={padding:0,margin:0,textAlign:L==="horizontal"?B:"left"};return React.createElement("ul",{className:"recharts-default-legend",style:j},this.renderItems())}}]),R}(reactExports.PureComponent);_defineProperty$y(DefaultLegendContent,"displayName","Legend"),_defineProperty$y(DefaultLegendContent,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var baseIteratee$3=_baseIteratee,baseUniq=_baseUniq;function uniqBy(S,C){return S&&S.length?baseUniq(S,baseIteratee$3(C)):[]}var uniqBy_1=uniqBy;const uniqBy$1=getDefaultExportFromCjs(uniqBy_1);function getUniqPayload(S,C,R){return C===!0?uniqBy$1(S,R):isFunction$6(C)?uniqBy$1(S,C):S}function _typeof$z(S){"@babel/helpers - typeof";return _typeof$z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$z(S)}var _excluded$b=["ref"];function ownKeys$v(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$v(S){for(var C=1;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$9(S){return _getPrototypeOf$9=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$9(S)}function _defineProperty$x(S,C,R){return C=_toPropertyKey$y(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$y(S){var C=_toPrimitive$y(S,"string");return _typeof$z(C)==="symbol"?C:String(C)}function _toPrimitive$y(S,C){if(_typeof$z(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$z(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}function _objectWithoutProperties$b(S,C){if(S==null)return{};var R=_objectWithoutPropertiesLoose$b(S,C),O,I;if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(S);for(I=0;I=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$b(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function defaultUniqBy$1(S){return S.value}function renderContent$1(S,C){if(React.isValidElement(S))return React.cloneElement(S,C);if(typeof S=="function")return React.createElement(S,C);C.ref;var R=_objectWithoutProperties$b(C,_excluded$b);return React.createElement(DefaultLegendContent,R)}var EPS$1=1,Legend=function(S){_inherits$9(R,S);var C=_createSuper$9(R);function R(){var O;_classCallCheck$c(this,R);for(var I=arguments.length,N=new Array(I),L=0;LEPS$1||Math.abs(N.height-this.lastBoundingBox.height)>EPS$1)&&(this.lastBoundingBox.width=N.width,this.lastBoundingBox.height=N.height,I&&I(N))}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,I&&I(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?_objectSpread$v({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(I){var N=this.props,L=N.layout,B=N.align,j=N.verticalAlign,F=N.margin,V=N.chartWidth,K=N.chartHeight,W,X;if(!I||(I.left===void 0||I.left===null)&&(I.right===void 0||I.right===null))if(B==="center"&&L==="vertical"){var J=this.getBBoxSnapshot();W={left:((V||0)-J.width)/2}}else W=B==="right"?{right:F&&F.right||0}:{left:F&&F.left||0};if(!I||(I.top===void 0||I.top===null)&&(I.bottom===void 0||I.bottom===null))if(j==="middle"){var oe=this.getBBoxSnapshot();X={top:((K||0)-oe.height)/2}}else X=j==="bottom"?{bottom:F&&F.bottom||0}:{top:F&&F.top||0};return _objectSpread$v(_objectSpread$v({},W),X)}},{key:"render",value:function(){var I=this,N=this.props,L=N.content,B=N.width,j=N.height,F=N.wrapperStyle,V=N.payloadUniqBy,K=N.payload,W=_objectSpread$v(_objectSpread$v({position:"absolute",width:B||"auto",height:j||"auto"},this.getDefaultPosition(F)),F);return React.createElement("div",{className:"recharts-legend-wrapper",style:W,ref:function(J){I.wrapperNode=J}},renderContent$1(L,_objectSpread$v(_objectSpread$v({},this.props),{},{payload:getUniqPayload(K,V,defaultUniqBy$1)})))}}],[{key:"getWithHeight",value:function(I,N){var L=I.props.layout;return L==="vertical"&&isNumber(I.props.height)?{height:I.props.height}:L==="horizontal"?{width:I.props.width||N}:null}}]),R}(reactExports.PureComponent);_defineProperty$x(Legend,"displayName","Legend"),_defineProperty$x(Legend,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});function _typeof$y(S){"@babel/helpers - typeof";return _typeof$y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$y(S)}function _slicedToArray$b(S,C){return _arrayWithHoles$c(S)||_iterableToArrayLimit$b(S,C)||_unsupportedIterableToArray$j(S,C)||_nonIterableRest$c()}function _nonIterableRest$c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$j(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$j(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$j(S,C)}}function _arrayLikeToArray$j(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R0;)if(!R.equals(S[O],C[O],O,O,S,C,R))return!1;return!0}function areDatesEqual(S,C){return sameValueZeroEqual(S.getTime(),C.getTime())}function areMapsEqual(S,C,R){if(S.size!==C.size)return!1;for(var O={},I=S.entries(),N=0,L,B;(L=I.next())&&!L.done;){for(var j=C.entries(),F=!1,V=0;(B=j.next())&&!B.done;){var K=L.value,W=K[0],X=K[1],J=B.value,oe=J[0],pe=J[1];!F&&!O[V]&&(F=R.equals(W,oe,N,V,S,C,R)&&R.equals(X,pe,W,oe,S,C,R))&&(O[V]=!0),V++}if(!F)return!1;N++}return!0}function areObjectsEqual(S,C,R){var O=keys(S),I=O.length;if(keys(C).length!==I)return!1;for(var N;I-- >0;)if(N=O[I],N===OWNER&&(S.$$typeof||C.$$typeof)&&S.$$typeof!==C.$$typeof||!hasOwn(C,N)||!R.equals(S[N],C[N],N,N,S,C,R))return!1;return!0}function areObjectsEqualStrict(S,C,R){var O=getStrictProperties(S),I=O.length;if(getStrictProperties(C).length!==I)return!1;for(var N,L,B;I-- >0;)if(N=O[I],N===OWNER&&(S.$$typeof||C.$$typeof)&&S.$$typeof!==C.$$typeof||!hasOwn(C,N)||!R.equals(S[N],C[N],N,N,S,C,R)||(L=getOwnPropertyDescriptor(S,N),B=getOwnPropertyDescriptor(C,N),(L||B)&&(!L||!B||L.configurable!==B.configurable||L.enumerable!==B.enumerable||L.writable!==B.writable)))return!1;return!0}function arePrimitiveWrappersEqual(S,C){return sameValueZeroEqual(S.valueOf(),C.valueOf())}function areRegExpsEqual(S,C){return S.source===C.source&&S.flags===C.flags}function areSetsEqual(S,C,R){if(S.size!==C.size)return!1;for(var O={},I=S.values(),N,L;(N=I.next())&&!N.done;){for(var B=C.values(),j=!1,F=0;(L=B.next())&&!L.done;)!j&&!O[F]&&(j=R.equals(N.value,L.value,N.value,L.value,S,C,R))&&(O[F]=!0),F++;if(!j)return!1}return!0}function areTypedArraysEqual(S,C){var R=S.length;if(C.length!==R)return!1;for(;R-- >0;)if(S[R]!==C[R])return!1;return!0}var ARGUMENTS_TAG="[object Arguments]",BOOLEAN_TAG="[object Boolean]",DATE_TAG="[object Date]",MAP_TAG="[object Map]",NUMBER_TAG="[object Number]",OBJECT_TAG="[object Object]",REG_EXP_TAG="[object RegExp]",SET_TAG="[object Set]",STRING_TAG="[object String]",isArray$2=Array.isArray,isTypedArray=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,assign=Object.assign,getTag=Object.prototype.toString.call.bind(Object.prototype.toString);function createEqualityComparator(S){var C=S.areArraysEqual,R=S.areDatesEqual,O=S.areMapsEqual,I=S.areObjectsEqual,N=S.arePrimitiveWrappersEqual,L=S.areRegExpsEqual,B=S.areSetsEqual,j=S.areTypedArraysEqual;return function(V,K,W){if(V===K)return!0;if(V==null||K==null||typeof V!="object"||typeof K!="object")return V!==V&&K!==K;var X=V.constructor;if(X!==K.constructor)return!1;if(X===Object)return I(V,K,W);if(isArray$2(V))return C(V,K,W);if(isTypedArray!=null&&isTypedArray(V))return j(V,K,W);if(X===Date)return R(V,K,W);if(X===RegExp)return L(V,K,W);if(X===Map)return O(V,K,W);if(X===Set)return B(V,K,W);var J=getTag(V);return J===DATE_TAG?R(V,K,W):J===REG_EXP_TAG?L(V,K,W):J===MAP_TAG?O(V,K,W):J===SET_TAG?B(V,K,W):J===OBJECT_TAG?typeof V.then!="function"&&typeof K.then!="function"&&I(V,K,W):J===ARGUMENTS_TAG?I(V,K,W):J===BOOLEAN_TAG||J===NUMBER_TAG||J===STRING_TAG?N(V,K,W):!1}}function createEqualityComparatorConfig(S){var C=S.circular,R=S.createCustomConfig,O=S.strict,I={areArraysEqual:O?areObjectsEqualStrict:areArraysEqual,areDatesEqual,areMapsEqual:O?combineComparators(areMapsEqual,areObjectsEqualStrict):areMapsEqual,areObjectsEqual:O?areObjectsEqualStrict:areObjectsEqual,arePrimitiveWrappersEqual,areRegExpsEqual,areSetsEqual:O?combineComparators(areSetsEqual,areObjectsEqualStrict):areSetsEqual,areTypedArraysEqual:O?areObjectsEqualStrict:areTypedArraysEqual};if(R&&(I=assign({},I,R(I))),C){var N=createIsCircular(I.areArraysEqual),L=createIsCircular(I.areMapsEqual),B=createIsCircular(I.areObjectsEqual),j=createIsCircular(I.areSetsEqual);I=assign({},I,{areArraysEqual:N,areMapsEqual:L,areObjectsEqual:B,areSetsEqual:j})}return I}function createInternalEqualityComparator(S){return function(C,R,O,I,N,L,B){return S(C,R,B)}}function createIsEqual(S){var C=S.circular,R=S.comparator,O=S.createState,I=S.equals,N=S.strict;if(O)return function(j,F){var V=O(),K=V.cache,W=K===void 0?C?new WeakMap:void 0:K,X=V.meta;return R(j,F,{cache:W,equals:I,meta:X,strict:N})};if(C)return function(j,F){return R(j,F,{cache:new WeakMap,equals:I,meta:void 0,strict:N})};var L={cache:void 0,equals:I,meta:void 0,strict:N};return function(j,F){return R(j,F,L)}}var deepEqual=createCustomEqual();createCustomEqual({strict:!0}),createCustomEqual({circular:!0}),createCustomEqual({circular:!0,strict:!0}),createCustomEqual({createInternalComparator:function(){return sameValueZeroEqual}}),createCustomEqual({strict:!0,createInternalComparator:function(){return sameValueZeroEqual}}),createCustomEqual({circular:!0,createInternalComparator:function(){return sameValueZeroEqual}}),createCustomEqual({circular:!0,createInternalComparator:function(){return sameValueZeroEqual},strict:!0});function createCustomEqual(S){S===void 0&&(S={});var C=S.circular,R=C===void 0?!1:C,O=S.createInternalComparator,I=S.createState,N=S.strict,L=N===void 0?!1:N,B=createEqualityComparatorConfig(S),j=createEqualityComparator(B),F=O?O(j):createInternalEqualityComparator(j);return createIsEqual({circular:R,comparator:j,createState:I,equals:F,strict:L})}function safeRequestAnimationFrame(S){typeof requestAnimationFrame<"u"&&requestAnimationFrame(S)}function setRafTimeout(S){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,R=-1,O=function I(N){R<0&&(R=N),N-R>C?(S(N),R=-1):safeRequestAnimationFrame(I)};requestAnimationFrame(O)}function _typeof$x(S){"@babel/helpers - typeof";return _typeof$x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$x(S)}function _toArray(S){return _arrayWithHoles$b(S)||_iterableToArray$b(S)||_unsupportedIterableToArray$i(S)||_nonIterableRest$b()}function _nonIterableRest$b(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$i(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$i(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$i(S,C)}}function _arrayLikeToArray$i(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);RS.length)&&(C=S.length);for(var R=0,O=new Array(C);R=0&&pe<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",R);var K=cubicBezier(I,L),W=cubicBezier(N,B),X=derivativeCubicBezier(I,L),J=function(me){return me>1?1:me<0?0:me},oe=function(me){for(var xe=me>1?1:me,Ae=xe,ge=0;ge<8;++ge){var Te=K(Ae)-xe,we=X(Ae);if(Math.abs(Te-xe)0&&arguments[0]!==void 0?arguments[0]:{},R=C.stiff,O=R===void 0?100:R,I=C.damping,N=I===void 0?8:I,L=C.dt,B=L===void 0?17:L,j=function(V,K,W){var X=-(V-K)*O,J=W*N,oe=W+(X-J)*B/1e3,pe=W*B/1e3+V;return Math.abs(pe-K)S.length)&&(C=S.length);for(var R=0,O=new Array(C);R=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$a(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function _toConsumableArray$8(S){return _arrayWithoutHoles$8(S)||_iterableToArray$8(S)||_unsupportedIterableToArray$f(S)||_nonIterableSpread$8()}function _nonIterableSpread$8(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$f(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$f(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$f(S,C)}}function _iterableToArray$8(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}function _arrayWithoutHoles$8(S){if(Array.isArray(S))return _arrayLikeToArray$f(S)}function _arrayLikeToArray$f(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$8(S){return _getPrototypeOf$8=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$8(S)}var Animate=function(S){_inherits$8(R,S);var C=_createSuper$8(R);function R(O,I){var N;_classCallCheck$b(this,R),N=C.call(this,O,I);var L=N.props,B=L.isActive,j=L.attributeName,F=L.from,V=L.to,K=L.steps,W=L.children,X=L.duration;if(N.handleStyleChange=N.handleStyleChange.bind(_assertThisInitialized$8(N)),N.changeStyle=N.changeStyle.bind(_assertThisInitialized$8(N)),!B||X<=0)return N.state={style:{}},typeof W=="function"&&(N.state={style:V}),_possibleConstructorReturn$8(N);if(K&&K.length)N.state={style:K[0].style};else if(F){if(typeof W=="function")return N.state={style:F},_possibleConstructorReturn$8(N);N.state={style:j?_defineProperty$t({},j,F):F}}else N.state={style:{}};return N}return _createClass$b(R,[{key:"componentDidMount",value:function(){var I=this.props,N=I.isActive,L=I.canBegin;this.mounted=!0,!(!N||!L)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(I){var N=this.props,L=N.isActive,B=N.canBegin,j=N.attributeName,F=N.shouldReAnimate,V=N.to,K=N.from,W=this.state.style;if(B){if(!L){var X={style:j?_defineProperty$t({},j,V):V};this.state&&W&&(j&&W[j]!==V||!j&&W!==V)&&this.setState(X);return}if(!(deepEqual(I.to,V)&&I.canBegin&&I.isActive)){var J=!I.canBegin||!I.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var oe=J||F?K:I.to;if(this.state&&W){var pe={style:j?_defineProperty$t({},j,oe):oe};(j&&[j]!==oe||!j&&W!==oe)&&this.setState(pe)}this.runAnimation(_objectSpread$r(_objectSpread$r({},this.props),{},{from:oe,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var I=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),I&&I()}},{key:"handleStyleChange",value:function(I){this.changeStyle(I)}},{key:"changeStyle",value:function(I){this.mounted&&this.setState({style:I})}},{key:"runJSAnimation",value:function(I){var N=this,L=I.from,B=I.to,j=I.duration,F=I.easing,V=I.begin,K=I.onAnimationEnd,W=I.onAnimationStart,X=configUpdate(L,B,configEasing(F),j,this.changeStyle),J=function(){N.stopJSAnimation=X()};this.manager.start([W,V,J,j,K])}},{key:"runStepAnimation",value:function(I){var N=this,L=I.steps,B=I.begin,j=I.onAnimationStart,F=L[0],V=F.style,K=F.duration,W=K===void 0?0:K,X=function(oe,pe,me){if(me===0)return oe;var xe=pe.duration,Ae=pe.easing,ge=Ae===void 0?"ease":Ae,Te=pe.style,we=pe.properties,ke=pe.onAnimationEnd,Be=me>0?L[me-1]:pe,Ie=we||Object.keys(Te);if(typeof ge=="function"||ge==="spring")return[].concat(_toConsumableArray$8(oe),[N.runJSAnimation.bind(N,{from:Be.style,to:Te,duration:xe,easing:ge}),xe]);var je=getTransitionVal(Ie,xe,ge),Ke=_objectSpread$r(_objectSpread$r(_objectSpread$r({},Be.style),Te),{},{transition:je});return[].concat(_toConsumableArray$8(oe),[Ke,xe,ke]).filter(identity$3)};return this.manager.start([j].concat(_toConsumableArray$8(L.reduce(X,[V,Math.max(W,B)])),[I.onAnimationEnd]))}},{key:"runAnimation",value:function(I){this.manager||(this.manager=createAnimateManager());var N=I.begin,L=I.duration,B=I.attributeName,j=I.to,F=I.easing,V=I.onAnimationStart,K=I.onAnimationEnd,W=I.steps,X=I.children,J=this.manager;if(this.unSubscribe=J.subscribe(this.handleStyleChange),typeof F=="function"||typeof X=="function"||F==="spring"){this.runJSAnimation(I);return}if(W.length>1){this.runStepAnimation(I);return}var oe=B?_defineProperty$t({},B,j):j,pe=getTransitionVal(Object.keys(oe),L,F);J.start([V,N,_objectSpread$r(_objectSpread$r({},oe),{},{transition:pe}),L,K])}},{key:"render",value:function(){var I=this.props,N=I.children;I.begin;var L=I.duration;I.attributeName,I.easing;var B=I.isActive;I.steps,I.from,I.to,I.canBegin,I.onAnimationEnd,I.shouldReAnimate,I.onAnimationReStart;var j=_objectWithoutProperties$a(I,_excluded$a),F=reactExports.Children.count(N),V=translateStyle(this.state.style);if(typeof N=="function")return N(V);if(!B||F===0||L<=0)return N;var K=function(X){var J=X.props,oe=J.style,pe=oe===void 0?{}:oe,me=J.className,xe=reactExports.cloneElement(X,_objectSpread$r(_objectSpread$r({},j),{},{style:_objectSpread$r(_objectSpread$r({},pe),V),className:me}));return xe};return F===1?K(reactExports.Children.only(N)):React.createElement("div",null,reactExports.Children.map(N,function(W){return K(W)}))}}]),R}(reactExports.PureComponent);Animate.displayName="Animate",Animate.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function S(){},onAnimationStart:function S(){}},Animate.propTypes={from:PropTypes$1.oneOfType([PropTypes$1.object,PropTypes$1.string]),to:PropTypes$1.oneOfType([PropTypes$1.object,PropTypes$1.string]),attributeName:PropTypes$1.string,duration:PropTypes$1.number,begin:PropTypes$1.number,easing:PropTypes$1.oneOfType([PropTypes$1.string,PropTypes$1.func]),steps:PropTypes$1.arrayOf(PropTypes$1.shape({duration:PropTypes$1.number.isRequired,style:PropTypes$1.object.isRequired,easing:PropTypes$1.oneOfType([PropTypes$1.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),PropTypes$1.func]),properties:PropTypes$1.arrayOf("string"),onAnimationEnd:PropTypes$1.func})),children:PropTypes$1.oneOfType([PropTypes$1.node,PropTypes$1.func]),isActive:PropTypes$1.bool,canBegin:PropTypes$1.bool,onAnimationEnd:PropTypes$1.func,shouldReAnimate:PropTypes$1.bool,onAnimationStart:PropTypes$1.func,onAnimationReStart:PropTypes$1.func},Number.isFinite===void 0&&(Number.isFinite=function(S){return typeof S=="number"&&isFinite(S)}),PropTypes$1.object,PropTypes$1.object,PropTypes$1.object,PropTypes$1.element,PropTypes$1.object,PropTypes$1.object,PropTypes$1.object,PropTypes$1.oneOfType([PropTypes$1.array,PropTypes$1.element]),PropTypes$1.any;function _typeof$t(S){"@babel/helpers - typeof";return _typeof$t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$t(S)}function _defineProperty$s(S,C,R){return C=_toPropertyKey$t(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$t(S){var C=_toPrimitive$t(S,"string");return _typeof$t(C)==="symbol"?C:String(C)}function _toPrimitive$t(S,C){if(_typeof$t(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$t(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}var CSS_CLASS_PREFIX="recharts-tooltip-wrapper",TOOLTIP_HIDDEN={visibility:"hidden"};function getTooltipCSSClassName(S){var C,R=S.coordinate,O=S.translateX,I=S.translateY;return clsx(CSS_CLASS_PREFIX,(C={},_defineProperty$s(C,"".concat(CSS_CLASS_PREFIX,"-right"),isNumber(O)&&R&&isNumber(R.x)&&O>=R.x),_defineProperty$s(C,"".concat(CSS_CLASS_PREFIX,"-left"),isNumber(O)&&R&&isNumber(R.x)&&O=R.y),_defineProperty$s(C,"".concat(CSS_CLASS_PREFIX,"-top"),isNumber(I)&&R&&isNumber(R.y)&&Ioe?Math.max(V,j[O]):Math.max(K,j[O])}function getTransformStyle(S){var C=S.translateX,R=S.translateY,O=S.useTranslate3d;return translateStyle({transform:O?"translate3d(".concat(C,"px, ").concat(R,"px, 0)"):"translate(".concat(C,"px, ").concat(R,"px)")})}function getTooltipTranslate(S){var C=S.allowEscapeViewBox,R=S.coordinate,O=S.offsetTopLeft,I=S.position,N=S.reverseDirection,L=S.tooltipBox,B=S.useTranslate3d,j=S.viewBox,F,V,K;return L.height>0&&L.width>0&&R?(V=getTooltipTranslateXY({allowEscapeViewBox:C,coordinate:R,key:"x",offsetTopLeft:O,position:I,reverseDirection:N,tooltipDimension:L.width,viewBox:j,viewBoxDimension:j.width}),K=getTooltipTranslateXY({allowEscapeViewBox:C,coordinate:R,key:"y",offsetTopLeft:O,position:I,reverseDirection:N,tooltipDimension:L.height,viewBox:j,viewBoxDimension:j.height}),F=getTransformStyle({translateX:V,translateY:K,useTranslate3d:B})):F=TOOLTIP_HIDDEN,{cssProperties:F,cssClasses:getTooltipCSSClassName({translateX:V,translateY:K,coordinate:R})}}function _typeof$s(S){"@babel/helpers - typeof";return _typeof$s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$s(S)}function ownKeys$q(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$q(S){for(var C=1;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$7(S){return _getPrototypeOf$7=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$7(S)}function _defineProperty$r(S,C,R){return C=_toPropertyKey$s(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$s(S){var C=_toPrimitive$s(S,"string");return _typeof$s(C)==="symbol"?C:String(C)}function _toPrimitive$s(S,C){if(_typeof$s(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$s(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}var EPSILON=1,TooltipBoundingBox=function(S){_inherits$7(R,S);var C=_createSuper$7(R);function R(){var O;_classCallCheck$a(this,R);for(var I=arguments.length,N=new Array(I),L=0;LEPSILON||Math.abs(I.height-this.lastBoundingBox.height)>EPSILON)&&(this.lastBoundingBox.width=I.width,this.lastBoundingBox.height=I.height)}else(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1)}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var I,N;this.props.active&&this.updateBBox(),this.state.dismissed&&(((I=this.props.coordinate)===null||I===void 0?void 0:I.x)!==this.state.dismissedAtCoordinate.x||((N=this.props.coordinate)===null||N===void 0?void 0:N.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var I=this,N=this.props,L=N.active,B=N.allowEscapeViewBox,j=N.animationDuration,F=N.animationEasing,V=N.children,K=N.coordinate,W=N.hasPayload,X=N.isAnimationActive,J=N.offset,oe=N.position,pe=N.reverseDirection,me=N.useTranslate3d,xe=N.viewBox,Ae=N.wrapperStyle,ge=getTooltipTranslate({allowEscapeViewBox:B,coordinate:K,offsetTopLeft:J,position:oe,reverseDirection:pe,tooltipBox:{height:this.lastBoundingBox.height,width:this.lastBoundingBox.width},useTranslate3d:me,viewBox:xe}),Te=ge.cssClasses,we=ge.cssProperties,ke=_objectSpread$q(_objectSpread$q(_objectSpread$q({},X&&L&&translateStyle({transition:"transform ".concat(j,"ms ").concat(F)})),we),{},{pointerEvents:"none",visibility:!this.state.dismissed&&L&&W?"visible":"hidden",position:"absolute",top:0,left:0},Ae);return React.createElement("div",{tabIndex:-1,role:"dialog",className:Te,style:ke,ref:function(Ie){I.wrapperNode=Ie}},V)}}]),R}(reactExports.PureComponent),parseIsSsrByDefault=function S(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Global={isSsr:parseIsSsrByDefault(),get:function S(C){return Global[C]},set:function S(C,R){if(typeof C=="string")Global[C]=R;else{var O=Object.keys(C);O&&O.length&&O.forEach(function(I){Global[I]=C[I]})}}};function _typeof$r(S){"@babel/helpers - typeof";return _typeof$r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$r(S)}function ownKeys$p(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$p(S){for(var C=1;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$6(S){return _getPrototypeOf$6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$6(S)}function _defineProperty$q(S,C,R){return C=_toPropertyKey$r(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$r(S){var C=_toPrimitive$r(S,"string");return _typeof$r(C)==="symbol"?C:String(C)}function _toPrimitive$r(S,C){if(_typeof$r(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$r(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}function defaultUniqBy(S){return S.dataKey}function renderContent(S,C){return React.isValidElement(S)?React.cloneElement(S,C):typeof S=="function"?React.createElement(S,C):React.createElement(DefaultTooltipContent,C)}var Tooltip=function(S){_inherits$6(R,S);var C=_createSuper$6(R);function R(){return _classCallCheck$9(this,R),C.apply(this,arguments)}return _createClass$9(R,[{key:"render",value:function(){var I=this.props,N=I.active,L=I.allowEscapeViewBox,B=I.animationDuration,j=I.animationEasing,F=I.content,V=I.coordinate,K=I.filterNull,W=I.isAnimationActive,X=I.offset,J=I.payload,oe=I.payloadUniqBy,pe=I.position,me=I.reverseDirection,xe=I.useTranslate3d,Ae=I.viewBox,ge=I.wrapperStyle,Te=J??[];K&&Te.length&&(Te=getUniqPayload(J.filter(function(ke){return ke.value!=null}),oe,defaultUniqBy));var we=Te.length>0;return React.createElement(TooltipBoundingBox,{allowEscapeViewBox:L,animationDuration:B,animationEasing:j,isAnimationActive:W,active:N,coordinate:V,hasPayload:we,offset:X,position:pe,reverseDirection:me,useTranslate3d:xe,viewBox:Ae,wrapperStyle:ge},renderContent(F,_objectSpread$p(_objectSpread$p({},this.props),{},{payload:Te})))}}]),R}(reactExports.PureComponent);_defineProperty$q(Tooltip,"displayName","Tooltip"),_defineProperty$q(Tooltip,"defaultProps",{allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Global.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var isObject$1=isObject_1,now=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT$1="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce$1(S,C,R){var O,I,N,L,B,j,F=0,V=!1,K=!1,W=!0;if(typeof S!="function")throw new TypeError(FUNC_ERROR_TEXT$1);C=toNumber(C)||0,isObject$1(R)&&(V=!!R.leading,K="maxWait"in R,N=K?nativeMax(toNumber(R.maxWait)||0,C):N,W="trailing"in R?!!R.trailing:W);function X(we){var ke=O,Be=I;return O=I=void 0,F=we,L=S.apply(Be,ke),L}function J(we){return F=we,B=setTimeout(me,C),V?X(we):L}function oe(we){var ke=we-j,Be=we-F,Ie=C-ke;return K?nativeMin(Ie,N-Be):Ie}function pe(we){var ke=we-j,Be=we-F;return j===void 0||ke>=C||ke<0||K&&Be>=N}function me(){var we=now();if(pe(we))return xe(we);B=setTimeout(me,oe(we))}function xe(we){return B=void 0,W&&O?X(we):(O=I=void 0,L)}function Ae(){B!==void 0&&clearTimeout(B),F=0,O=j=I=B=void 0}function ge(){return B===void 0?L:xe(now())}function Te(){var we=now(),ke=pe(we);if(O=arguments,I=this,j=we,ke){if(B===void 0)return J(j);if(K)return clearTimeout(B),B=setTimeout(me,C),X(j)}return B===void 0&&(B=setTimeout(me,C)),L}return Te.cancel=Ae,Te.flush=ge,Te}var debounce_1=debounce$1,debounce=debounce_1,isObject=isObject_1,FUNC_ERROR_TEXT="Expected a function";function throttle(S,C,R){var O=!0,I=!0;if(typeof S!="function")throw new TypeError(FUNC_ERROR_TEXT);return isObject(R)&&(O="leading"in R?!!R.leading:O,I="trailing"in R?!!R.trailing:I),debounce(S,C,{leading:O,maxWait:C,trailing:I})}var throttle_1=throttle;const throttle$1=getDefaultExportFromCjs(throttle_1);var Cell=function S(C){return null};Cell.displayName="Cell";function _typeof$q(S){"@babel/helpers - typeof";return _typeof$q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$q(S)}function ownKeys$o(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$o(S){for(var C=1;C1&&arguments[1]!==void 0?arguments[1]:{};if(C==null||Global.isSsr)return{width:0,height:0};var O=removeInvalidKeys(R),I=JSON.stringify({text:C,copyStyle:O});if(stringCache.widthCache[I])return stringCache.widthCache[I];try{var N=document.getElementById(MEASUREMENT_SPAN_ID);N||(N=document.createElement("span"),N.setAttribute("id",MEASUREMENT_SPAN_ID),N.setAttribute("aria-hidden","true"),document.body.appendChild(N));var L=_objectSpread$o(_objectSpread$o({},SPAN_STYLE),O);Object.assign(N.style,L),N.textContent="".concat(C);var B=N.getBoundingClientRect(),j={width:B.width,height:B.height};return stringCache.widthCache[I]=j,++stringCache.cacheCount>MAX_CACHE_NUM&&(stringCache.cacheCount=0,stringCache.widthCache={}),j}catch{return{width:0,height:0}}},getOffset=function S(C){return{top:C.top+window.scrollY-document.documentElement.clientTop,left:C.left+window.scrollX-document.documentElement.clientLeft}};function _typeof$p(S){"@babel/helpers - typeof";return _typeof$p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$p(S)}function _slicedToArray$8(S,C){return _arrayWithHoles$8(S)||_iterableToArrayLimit$8(S,C)||_unsupportedIterableToArray$e(S,C)||_nonIterableRest$8()}function _nonIterableRest$8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$e(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$e(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$e(S,C)}}function _arrayLikeToArray$e(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$9(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function _slicedToArray$7(S,C){return _arrayWithHoles$7(S)||_iterableToArrayLimit$7(S,C)||_unsupportedIterableToArray$d(S,C)||_nonIterableRest$7()}function _nonIterableRest$7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$d(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$d(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$d(S,C)}}function _arrayLikeToArray$d(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R0&&arguments[0]!==void 0?arguments[0]:[];return tt.reduce(function(Ue,et){var dt=et.word,gt=et.width,Qe=Ue[Ue.length-1];if(Qe&&(I==null||N||Qe.width+gt+Oet.width?Ue:et})};if(!V)return X;for(var oe="…",pe=function(tt){var Ue=K.slice(0,tt),et=calculateWordWidths({breakAll:F,style:j,children:Ue+oe}).wordsWithComputedWidth,dt=W(et),gt=dt.length>L||J(dt).width>Number(I);return[gt,dt]},me=0,xe=K.length-1,Ae=0,ge;me<=xe&&Ae<=K.length-1;){var Te=Math.floor((me+xe)/2),we=Te-1,ke=pe(we),Be=_slicedToArray$7(ke,2),Ie=Be[0],je=Be[1],Ke=pe(Te),Je=_slicedToArray$7(Ke,1),Xe=Je[0];if(!Ie&&!Xe&&(me=Te+1),Ie&&Xe&&(xe=Te-1),!Ie&&Xe){ge=je;break}Ae++}return ge||X},getWordsWithoutCalculate=function S(C){var R=isNil$1(C)?[]:C.toString().split(BREAKING_SPACES);return[{words:R}]},getWordsByLines=function S(C){var R=C.width,O=C.scaleToFit,I=C.children,N=C.style,L=C.breakAll,B=C.maxLines;if((R||O)&&!Global.isSsr){var j,F,V=calculateWordWidths({breakAll:L,children:I,style:N});if(V){var K=V.wordsWithComputedWidth,W=V.spaceWidth;j=K,F=W}else return getWordsWithoutCalculate(I);return calculateWordsByLines({breakAll:L,children:I,maxLines:B,style:N},j,F,R,O)}return getWordsWithoutCalculate(I)},DEFAULT_FILL="#808080",Text$1=function S(C){var R=C.x,O=R===void 0?0:R,I=C.y,N=I===void 0?0:I,L=C.lineHeight,B=L===void 0?"1em":L,j=C.capHeight,F=j===void 0?"0.71em":j,V=C.scaleToFit,K=V===void 0?!1:V,W=C.textAnchor,X=W===void 0?"start":W,J=C.verticalAnchor,oe=J===void 0?"end":J,pe=C.fill,me=pe===void 0?DEFAULT_FILL:pe,xe=_objectWithoutProperties$9(C,_excluded$9),Ae=reactExports.useMemo(function(){return getWordsByLines({breakAll:xe.breakAll,children:xe.children,maxLines:xe.maxLines,scaleToFit:K,style:xe.style,width:xe.width})},[xe.breakAll,xe.children,xe.maxLines,K,xe.style,xe.width]),ge=xe.dx,Te=xe.dy,we=xe.angle,ke=xe.className,Be=xe.breakAll,Ie=_objectWithoutProperties$9(xe,_excluded2$4);if(!isNumOrStr(O)||!isNumOrStr(N))return null;var je=O+(isNumber(ge)?ge:0),Ke=N+(isNumber(Te)?Te:0),Je;switch(oe){case"start":Je=reduceCSSCalc("calc(".concat(F,")"));break;case"middle":Je=reduceCSSCalc("calc(".concat((Ae.length-1)/2," * -").concat(B," + (").concat(F," / 2))"));break;default:Je=reduceCSSCalc("calc(".concat(Ae.length-1," * -").concat(B,")"));break}var Xe=[];if(K){var ot=Ae[0].width,tt=xe.width;Xe.push("scale(".concat((isNumber(tt)?tt/ot:1)/ot,")"))}return we&&Xe.push("rotate(".concat(we,", ").concat(je,", ").concat(Ke,")")),Xe.length&&(Ie.transform=Xe.join(" ")),React.createElement("text",_extends$j({},filterProps(Ie,!0),{x:je,y:Ke,className:clsx("recharts-text",ke),textAnchor:X,fill:me.includes("url")?DEFAULT_FILL:me}),Ae.map(function(Ue,et){var dt=Ue.words.join(Be?"":" ");return React.createElement("tspan",{x:je,dy:et===0?Je:B,key:dt},dt)}))};function ascending(S,C){return S==null||C==null?NaN:SC?1:S>=C?0:NaN}function descending(S,C){return S==null||C==null?NaN:CS?1:C>=S?0:NaN}function bisector(S){let C,R,O;S.length!==2?(C=ascending,R=(B,j)=>ascending(S(B),j),O=(B,j)=>S(B)-j):(C=S===ascending||S===descending?S:zero$1,R=S,O=S);function I(B,j,F=0,V=B.length){if(F>>1;R(B[K],j)<0?F=K+1:V=K}while(F>>1;R(B[K],j)<=0?F=K+1:V=K}while(FF&&O(B[K-1],j)>-O(B[K],j)?K-1:K}return{left:I,center:L,right:N}}function zero$1(){return 0}function number$2(S){return S===null?NaN:+S}function*numbers(S,C){if(C===void 0)for(let R of S)R!=null&&(R=+R)>=R&&(yield R);else{let R=-1;for(let O of S)(O=C(O,++R,S))!=null&&(O=+O)>=O&&(yield O)}}const ascendingBisect=bisector(ascending),bisectRight=ascendingBisect.right;bisector(number$2).center;const bisect=bisectRight;class InternMap extends Map{constructor(C,R=keyof){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:R}}),C!=null)for(const[O,I]of C)this.set(O,I)}get(C){return super.get(intern_get(this,C))}has(C){return super.has(intern_get(this,C))}set(C,R){return super.set(intern_set(this,C),R)}delete(C){return super.delete(intern_delete(this,C))}}function intern_get({_intern:S,_key:C},R){const O=C(R);return S.has(O)?S.get(O):R}function intern_set({_intern:S,_key:C},R){const O=C(R);return S.has(O)?S.get(O):(S.set(O,R),R)}function intern_delete({_intern:S,_key:C},R){const O=C(R);return S.has(O)&&(R=S.get(O),S.delete(O)),R}function keyof(S){return S!==null&&typeof S=="object"?S.valueOf():S}function compareDefined(S=ascending){if(S===ascending)return ascendingDefined;if(typeof S!="function")throw new TypeError("compare is not a function");return(C,R)=>{const O=S(C,R);return O||O===0?O:(S(R,R)===0)-(S(C,C)===0)}}function ascendingDefined(S,C){return(S==null||!(S>=S))-(C==null||!(C>=C))||(SC?1:0)}const e10=Math.sqrt(50),e5=Math.sqrt(10),e2=Math.sqrt(2);function tickSpec(S,C,R){const O=(C-S)/Math.max(0,R),I=Math.floor(Math.log10(O)),N=O/Math.pow(10,I),L=N>=e10?10:N>=e5?5:N>=e2?2:1;let B,j,F;return I<0?(F=Math.pow(10,-I)/L,B=Math.round(S*F),j=Math.round(C*F),B/FC&&--j,F=-F):(F=Math.pow(10,I)*L,B=Math.round(S/F),j=Math.round(C/F),B*FC&&--j),j0))return[];if(S===C)return[S];const O=C=I))return[];const B=N-I+1,j=new Array(B);if(O)if(L<0)for(let F=0;F=O)&&(R=O);else{let O=-1;for(let I of S)(I=C(I,++O,S))!=null&&(R=I)&&(R=I)}return R}function min(S,C){let R;if(C===void 0)for(const O of S)O!=null&&(R>O||R===void 0&&O>=O)&&(R=O);else{let O=-1;for(let I of S)(I=C(I,++O,S))!=null&&(R>I||R===void 0&&I>=I)&&(R=I)}return R}function quickselect(S,C,R=0,O=1/0,I){if(C=Math.floor(C),R=Math.floor(Math.max(0,R)),O=Math.floor(Math.min(S.length-1,O)),!(R<=C&&C<=O))return S;for(I=I===void 0?ascendingDefined:compareDefined(I);O>R;){if(O-R>600){const j=O-R+1,F=C-R+1,V=Math.log(j),K=.5*Math.exp(2*V/3),W=.5*Math.sqrt(V*K*(j-K)/j)*(F-j/2<0?-1:1),X=Math.max(R,Math.floor(C-F*K/j+W)),J=Math.min(O,Math.floor(C+(j-F)*K/j+W));quickselect(S,C,X,J,I)}const N=S[C];let L=R,B=O;for(swap(S,R,C),I(S[O],N)>0&&swap(S,R,O);L0;)--B}I(S[R],N)===0?swap(S,R,B):(++B,swap(S,B,O)),B<=C&&(R=B+1),C<=B&&(O=B-1)}return S}function swap(S,C,R){const O=S[C];S[C]=S[R],S[R]=O}function quantile$1(S,C,R){if(S=Float64Array.from(numbers(S,R)),!(!(O=S.length)||isNaN(C=+C))){if(C<=0||O<2)return min(S);if(C>=1)return max(S);var O,I=(O-1)*C,N=Math.floor(I),L=max(quickselect(S,N).subarray(0,N+1)),B=min(S.subarray(N+1));return L+(B-L)*(I-N)}}function quantileSorted(S,C,R=number$2){if(!(!(O=S.length)||isNaN(C=+C))){if(C<=0||O<2)return+R(S[0],0,S);if(C>=1)return+R(S[O-1],O-1,S);var O,I=(O-1)*C,N=Math.floor(I),L=+R(S[N],N,S),B=+R(S[N+1],N+1,S);return L+(B-L)*(I-N)}}function range$1(S,C,R){S=+S,C=+C,R=(I=arguments.length)<2?(C=S,S=0,1):I<3?1:+R;for(var O=-1,I=Math.max(0,Math.ceil((C-S)/R))|0,N=new Array(I);++O>8&15|C>>4&240,C>>4&15|C&240,(C&15)<<4|C&15,1):R===8?rgba(C>>24&255,C>>16&255,C>>8&255,(C&255)/255):R===4?rgba(C>>12&15|C>>8&240,C>>8&15|C>>4&240,C>>4&15|C&240,((C&15)<<4|C&15)/255):null):(C=reRgbInteger.exec(S))?new Rgb(C[1],C[2],C[3],1):(C=reRgbPercent.exec(S))?new Rgb(C[1]*255/100,C[2]*255/100,C[3]*255/100,1):(C=reRgbaInteger.exec(S))?rgba(C[1],C[2],C[3],C[4]):(C=reRgbaPercent.exec(S))?rgba(C[1]*255/100,C[2]*255/100,C[3]*255/100,C[4]):(C=reHslPercent.exec(S))?hsla(C[1],C[2]/100,C[3]/100,1):(C=reHslaPercent.exec(S))?hsla(C[1],C[2]/100,C[3]/100,C[4]):named.hasOwnProperty(S)?rgbn(named[S]):S==="transparent"?new Rgb(NaN,NaN,NaN,0):null}function rgbn(S){return new Rgb(S>>16&255,S>>8&255,S&255,1)}function rgba(S,C,R,O){return O<=0&&(S=C=R=NaN),new Rgb(S,C,R,O)}function rgbConvert(S){return S instanceof Color||(S=color(S)),S?(S=S.rgb(),new Rgb(S.r,S.g,S.b,S.opacity)):new Rgb}function rgb$1(S,C,R,O){return arguments.length===1?rgbConvert(S):new Rgb(S,C,R,O??1)}function Rgb(S,C,R,O){this.r=+S,this.g=+C,this.b=+R,this.opacity=+O}define(Rgb,rgb$1,extend(Color,{brighter(S){return S=S==null?brighter:Math.pow(brighter,S),new Rgb(this.r*S,this.g*S,this.b*S,this.opacity)},darker(S){return S=S==null?darker:Math.pow(darker,S),new Rgb(this.r*S,this.g*S,this.b*S,this.opacity)},rgb(){return this},clamp(){return new Rgb(clampi(this.r),clampi(this.g),clampi(this.b),clampa(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:rgb_formatHex,formatHex:rgb_formatHex,formatHex8:rgb_formatHex8,formatRgb:rgb_formatRgb,toString:rgb_formatRgb}));function rgb_formatHex(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}`}function rgb_formatHex8(){return`#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity)?1:this.opacity)*255)}`}function rgb_formatRgb(){const S=clampa(this.opacity);return`${S===1?"rgb(":"rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${S===1?")":`, ${S})`}`}function clampa(S){return isNaN(S)?1:Math.max(0,Math.min(1,S))}function clampi(S){return Math.max(0,Math.min(255,Math.round(S)||0))}function hex(S){return S=clampi(S),(S<16?"0":"")+S.toString(16)}function hsla(S,C,R,O){return O<=0?S=C=R=NaN:R<=0||R>=1?S=C=NaN:C<=0&&(S=NaN),new Hsl(S,C,R,O)}function hslConvert(S){if(S instanceof Hsl)return new Hsl(S.h,S.s,S.l,S.opacity);if(S instanceof Color||(S=color(S)),!S)return new Hsl;if(S instanceof Hsl)return S;S=S.rgb();var C=S.r/255,R=S.g/255,O=S.b/255,I=Math.min(C,R,O),N=Math.max(C,R,O),L=NaN,B=N-I,j=(N+I)/2;return B?(C===N?L=(R-O)/B+(R0&&j<1?0:L,new Hsl(L,B,j,S.opacity)}function hsl(S,C,R,O){return arguments.length===1?hslConvert(S):new Hsl(S,C,R,O??1)}function Hsl(S,C,R,O){this.h=+S,this.s=+C,this.l=+R,this.opacity=+O}define(Hsl,hsl,extend(Color,{brighter(S){return S=S==null?brighter:Math.pow(brighter,S),new Hsl(this.h,this.s,this.l*S,this.opacity)},darker(S){return S=S==null?darker:Math.pow(darker,S),new Hsl(this.h,this.s,this.l*S,this.opacity)},rgb(){var S=this.h%360+(this.h<0)*360,C=isNaN(S)||isNaN(this.s)?0:this.s,R=this.l,O=R+(R<.5?R:1-R)*C,I=2*R-O;return new Rgb(hsl2rgb(S>=240?S-240:S+120,I,O),hsl2rgb(S,I,O),hsl2rgb(S<120?S+240:S-120,I,O),this.opacity)},clamp(){return new Hsl(clamph(this.h),clampt(this.s),clampt(this.l),clampa(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 S=clampa(this.opacity);return`${S===1?"hsl(":"hsla("}${clamph(this.h)}, ${clampt(this.s)*100}%, ${clampt(this.l)*100}%${S===1?")":`, ${S})`}`}}));function clamph(S){return S=(S||0)%360,S<0?S+360:S}function clampt(S){return Math.max(0,Math.min(1,S||0))}function hsl2rgb(S,C,R){return(S<60?C+(R-C)*S/60:S<180?R:S<240?C+(R-C)*(240-S)/60:C)*255}const constant=S=>()=>S;function linear$1(S,C){return function(R){return S+R*C}}function exponential(S,C,R){return S=Math.pow(S,R),C=Math.pow(C,R)-S,R=1/R,function(O){return Math.pow(S+O*C,R)}}function gamma(S){return(S=+S)==1?nogamma:function(C,R){return R-C?exponential(C,R,S):constant(isNaN(C)?R:C)}}function nogamma(S,C){var R=C-S;return R?linear$1(S,R):constant(isNaN(S)?C:S)}const rgb=function S(C){var R=gamma(C);function O(I,N){var L=R((I=rgb$1(I)).r,(N=rgb$1(N)).r),B=R(I.g,N.g),j=R(I.b,N.b),F=nogamma(I.opacity,N.opacity);return function(V){return I.r=L(V),I.g=B(V),I.b=j(V),I.opacity=F(V),I+""}}return O.gamma=S,O}(1);function numberArray(S,C){C||(C=[]);var R=S?Math.min(C.length,S.length):0,O=C.slice(),I;return function(N){for(I=0;IR&&(N=C.slice(R,N),B[L]?B[L]+=N:B[++L]=N),(O=O[0])===(I=I[0])?B[L]?B[L]+=I:B[++L]=I:(B[++L]=null,j.push({i:L,x:interpolateNumber$1(O,I)})),R=reB.lastIndex;return RC&&(R=S,S=C,C=R),function(O){return Math.max(S,Math.min(C,O))}}function bimap(S,C,R){var O=S[0],I=S[1],N=C[0],L=C[1];return I2?polymap:bimap,j=F=null,K}function K(W){return W==null||isNaN(W=+W)?N:(j||(j=B(S.map(O),C,R)))(O(L(W)))}return K.invert=function(W){return L(I((F||(F=B(C,S.map(O),interpolateNumber$1)))(W)))},K.domain=function(W){return arguments.length?(S=Array.from(W,number$1),V()):S.slice()},K.range=function(W){return arguments.length?(C=Array.from(W),V()):C.slice()},K.rangeRound=function(W){return C=Array.from(W),R=interpolateRound,V()},K.clamp=function(W){return arguments.length?(L=W?!0:identity$2,V()):L!==identity$2},K.interpolate=function(W){return arguments.length?(R=W,V()):R},K.unknown=function(W){return arguments.length?(N=W,K):N},function(W,X){return O=W,I=X,V()}}function continuous(){return transformer$2()(identity$2,identity$2)}function tickFormat(S,C,R,O){var I=tickStep(S,C,R),N;switch(O=formatSpecifier(O??",f"),O.type){case"s":{var L=Math.max(Math.abs(S),Math.abs(C));return O.precision==null&&!isNaN(N=precisionPrefix(I,L))&&(O.precision=N),formatPrefix(O,L)}case"":case"e":case"g":case"p":case"r":{O.precision==null&&!isNaN(N=precisionRound(I,Math.max(Math.abs(S),Math.abs(C))))&&(O.precision=N-(O.type==="e"));break}case"f":case"%":{O.precision==null&&!isNaN(N=precisionFixed(I))&&(O.precision=N-(O.type==="%")*2);break}}return format$1(O)}function linearish(S){var C=S.domain;return S.ticks=function(R){var O=C();return ticks(O[0],O[O.length-1],R??10)},S.tickFormat=function(R,O){var I=C();return tickFormat(I[0],I[I.length-1],R??10,O)},S.nice=function(R){R==null&&(R=10);var O=C(),I=0,N=O.length-1,L=O[I],B=O[N],j,F,V=10;for(B0;){if(F=tickIncrement(L,B,R),F===j)return O[I]=L,O[N]=B,C(O);if(F>0)L=Math.floor(L/F)*F,B=Math.ceil(B/F)*F;else if(F<0)L=Math.ceil(L*F)/F,B=Math.floor(B*F)/F;else break;j=F}return S},S}function linear(){var S=continuous();return S.copy=function(){return copy$1(S,linear())},initRange.apply(S,arguments),linearish(S)}function identity$1(S){var C;function R(O){return O==null||isNaN(O=+O)?C:O}return R.invert=R,R.domain=R.range=function(O){return arguments.length?(S=Array.from(O,number$1),R):S.slice()},R.unknown=function(O){return arguments.length?(C=O,R):C},R.copy=function(){return identity$1(S).unknown(C)},S=arguments.length?Array.from(S,number$1):[0,1],linearish(R)}function nice(S,C){S=S.slice();var R=0,O=S.length-1,I=S[R],N=S[O],L;return NMath.pow(S,C)}function logp(S){return S===Math.E?Math.log:S===10&&Math.log10||S===2&&Math.log2||(S=Math.log(S),C=>Math.log(C)/S)}function reflect(S){return(C,R)=>-S(-C,R)}function loggish(S){const C=S(transformLog,transformExp),R=C.domain;let O=10,I,N;function L(){return I=logp(O),N=powp(O),R()[0]<0?(I=reflect(I),N=reflect(N),S(transformLogn,transformExpn)):S(transformLog,transformExp),C}return C.base=function(B){return arguments.length?(O=+B,L()):O},C.domain=function(B){return arguments.length?(R(B),L()):R()},C.ticks=B=>{const j=R();let F=j[0],V=j[j.length-1];const K=V0){for(;W<=X;++W)for(J=1;JV)break;me.push(oe)}}else for(;W<=X;++W)for(J=O-1;J>=1;--J)if(oe=W>0?J/N(-W):J*N(W),!(oeV)break;me.push(oe)}me.length*2{if(B==null&&(B=10),j==null&&(j=O===10?"s":","),typeof j!="function"&&(!(O%1)&&(j=formatSpecifier(j)).precision==null&&(j.trim=!0),j=format$1(j)),B===1/0)return j;const F=Math.max(1,O*B/C.ticks().length);return V=>{let K=V/N(Math.round(I(V)));return K*OR(nice(R(),{floor:B=>N(Math.floor(I(B))),ceil:B=>N(Math.ceil(I(B)))})),C}function log(){const S=loggish(transformer$2()).domain([1,10]);return S.copy=()=>copy$1(S,log()).base(S.base()),initRange.apply(S,arguments),S}function transformSymlog(S){return function(C){return Math.sign(C)*Math.log1p(Math.abs(C/S))}}function transformSymexp(S){return function(C){return Math.sign(C)*Math.expm1(Math.abs(C))*S}}function symlogish(S){var C=1,R=S(transformSymlog(C),transformSymexp(C));return R.constant=function(O){return arguments.length?S(transformSymlog(C=+O),transformSymexp(C)):C},linearish(R)}function symlog(){var S=symlogish(transformer$2());return S.copy=function(){return copy$1(S,symlog()).constant(S.constant())},initRange.apply(S,arguments)}function transformPow(S){return function(C){return C<0?-Math.pow(-C,S):Math.pow(C,S)}}function transformSqrt(S){return S<0?-Math.sqrt(-S):Math.sqrt(S)}function transformSquare(S){return S<0?-S*S:S*S}function powish(S){var C=S(identity$2,identity$2),R=1;function O(){return R===1?S(identity$2,identity$2):R===.5?S(transformSqrt,transformSquare):S(transformPow(R),transformPow(1/R))}return C.exponent=function(I){return arguments.length?(R=+I,O()):R},linearish(C)}function pow(){var S=powish(transformer$2());return S.copy=function(){return copy$1(S,pow()).exponent(S.exponent())},initRange.apply(S,arguments),S}function sqrt(){return pow.apply(null,arguments).exponent(.5)}function square(S){return Math.sign(S)*S*S}function unsquare(S){return Math.sign(S)*Math.sqrt(Math.abs(S))}function radial(){var S=continuous(),C=[0,1],R=!1,O;function I(N){var L=unsquare(S(N));return isNaN(L)?O:R?Math.round(L):L}return I.invert=function(N){return S.invert(square(N))},I.domain=function(N){return arguments.length?(S.domain(N),I):S.domain()},I.range=function(N){return arguments.length?(S.range((C=Array.from(N,number$1)).map(square)),I):C.slice()},I.rangeRound=function(N){return I.range(N).round(!0)},I.round=function(N){return arguments.length?(R=!!N,I):R},I.clamp=function(N){return arguments.length?(S.clamp(N),I):S.clamp()},I.unknown=function(N){return arguments.length?(O=N,I):O},I.copy=function(){return radial(S.domain(),C).round(R).clamp(S.clamp()).unknown(O)},initRange.apply(I,arguments),linearish(I)}function quantile(){var S=[],C=[],R=[],O;function I(){var L=0,B=Math.max(1,C.length);for(R=new Array(B-1);++L0?R[B-1]:S[0],B=R?[O[R-1],C]:[O[F-1],O[F]]},L.unknown=function(j){return arguments.length&&(N=j),L},L.thresholds=function(){return O.slice()},L.copy=function(){return quantize().domain([S,C]).range(I).unknown(N)},initRange.apply(linearish(L),arguments)}function threshold(){var S=[.5],C=[0,1],R,O=1;function I(N){return N!=null&&N<=N?C[bisect(S,N,0,O)]:R}return I.domain=function(N){return arguments.length?(S=Array.from(N),O=Math.min(S.length,C.length-1),I):S.slice()},I.range=function(N){return arguments.length?(C=Array.from(N),O=Math.min(S.length,C.length-1),I):C.slice()},I.invertExtent=function(N){var L=C.indexOf(N);return[S[L-1],S[L]]},I.unknown=function(N){return arguments.length?(R=N,I):R},I.copy=function(){return threshold().domain(S).range(C).unknown(R)},initRange.apply(I,arguments)}const t0=new Date,t1=new Date;function timeInterval(S,C,R,O){function I(N){return S(N=arguments.length===0?new Date:new Date(+N)),N}return I.floor=N=>(S(N=new Date(+N)),N),I.ceil=N=>(S(N=new Date(N-1)),C(N,1),S(N),N),I.round=N=>{const L=I(N),B=I.ceil(N);return N-L(C(N=new Date(+N),L==null?1:Math.floor(L)),N),I.range=(N,L,B)=>{const j=[];if(N=I.ceil(N),B=B==null?1:Math.floor(B),!(N0))return j;let F;do j.push(F=new Date(+N)),C(N,B),S(N);while(FtimeInterval(L=>{if(L>=L)for(;S(L),!N(L);)L.setTime(L-1)},(L,B)=>{if(L>=L)if(B<0)for(;++B<=0;)for(;C(L,-1),!N(L););else for(;--B>=0;)for(;C(L,1),!N(L););}),R&&(I.count=(N,L)=>(t0.setTime(+N),t1.setTime(+L),S(t0),S(t1),Math.floor(R(t0,t1))),I.every=N=>(N=Math.floor(N),!isFinite(N)||!(N>0)?null:N>1?I.filter(O?L=>O(L)%N===0:L=>I.count(0,L)%N===0):I)),I}const millisecond=timeInterval(()=>{},(S,C)=>{S.setTime(+S+C)},(S,C)=>C-S);millisecond.every=S=>(S=Math.floor(S),!isFinite(S)||!(S>0)?null:S>1?timeInterval(C=>{C.setTime(Math.floor(C/S)*S)},(C,R)=>{C.setTime(+C+R*S)},(C,R)=>(R-C)/S):millisecond),millisecond.range;const durationSecond=1e3,durationMinute=durationSecond*60,durationHour=durationMinute*60,durationDay=durationHour*24,durationWeek=durationDay*7,durationMonth=durationDay*30,durationYear=durationDay*365,second=timeInterval(S=>{S.setTime(S-S.getMilliseconds())},(S,C)=>{S.setTime(+S+C*durationSecond)},(S,C)=>(C-S)/durationSecond,S=>S.getUTCSeconds());second.range;const timeMinute=timeInterval(S=>{S.setTime(S-S.getMilliseconds()-S.getSeconds()*durationSecond)},(S,C)=>{S.setTime(+S+C*durationMinute)},(S,C)=>(C-S)/durationMinute,S=>S.getMinutes());timeMinute.range;const utcMinute=timeInterval(S=>{S.setUTCSeconds(0,0)},(S,C)=>{S.setTime(+S+C*durationMinute)},(S,C)=>(C-S)/durationMinute,S=>S.getUTCMinutes());utcMinute.range;const timeHour=timeInterval(S=>{S.setTime(S-S.getMilliseconds()-S.getSeconds()*durationSecond-S.getMinutes()*durationMinute)},(S,C)=>{S.setTime(+S+C*durationHour)},(S,C)=>(C-S)/durationHour,S=>S.getHours());timeHour.range;const utcHour=timeInterval(S=>{S.setUTCMinutes(0,0,0)},(S,C)=>{S.setTime(+S+C*durationHour)},(S,C)=>(C-S)/durationHour,S=>S.getUTCHours());utcHour.range;const timeDay=timeInterval(S=>S.setHours(0,0,0,0),(S,C)=>S.setDate(S.getDate()+C),(S,C)=>(C-S-(C.getTimezoneOffset()-S.getTimezoneOffset())*durationMinute)/durationDay,S=>S.getDate()-1);timeDay.range;const utcDay=timeInterval(S=>{S.setUTCHours(0,0,0,0)},(S,C)=>{S.setUTCDate(S.getUTCDate()+C)},(S,C)=>(C-S)/durationDay,S=>S.getUTCDate()-1);utcDay.range;const unixDay=timeInterval(S=>{S.setUTCHours(0,0,0,0)},(S,C)=>{S.setUTCDate(S.getUTCDate()+C)},(S,C)=>(C-S)/durationDay,S=>Math.floor(S/durationDay));unixDay.range;function timeWeekday(S){return timeInterval(C=>{C.setDate(C.getDate()-(C.getDay()+7-S)%7),C.setHours(0,0,0,0)},(C,R)=>{C.setDate(C.getDate()+R*7)},(C,R)=>(R-C-(R.getTimezoneOffset()-C.getTimezoneOffset())*durationMinute)/durationWeek)}const timeSunday=timeWeekday(0),timeMonday=timeWeekday(1),timeTuesday=timeWeekday(2),timeWednesday=timeWeekday(3),timeThursday=timeWeekday(4),timeFriday=timeWeekday(5),timeSaturday=timeWeekday(6);timeSunday.range,timeMonday.range,timeTuesday.range,timeWednesday.range,timeThursday.range,timeFriday.range,timeSaturday.range;function utcWeekday(S){return timeInterval(C=>{C.setUTCDate(C.getUTCDate()-(C.getUTCDay()+7-S)%7),C.setUTCHours(0,0,0,0)},(C,R)=>{C.setUTCDate(C.getUTCDate()+R*7)},(C,R)=>(R-C)/durationWeek)}const utcSunday=utcWeekday(0),utcMonday=utcWeekday(1),utcTuesday=utcWeekday(2),utcWednesday=utcWeekday(3),utcThursday=utcWeekday(4),utcFriday=utcWeekday(5),utcSaturday=utcWeekday(6);utcSunday.range,utcMonday.range,utcTuesday.range,utcWednesday.range,utcThursday.range,utcFriday.range,utcSaturday.range;const timeMonth=timeInterval(S=>{S.setDate(1),S.setHours(0,0,0,0)},(S,C)=>{S.setMonth(S.getMonth()+C)},(S,C)=>C.getMonth()-S.getMonth()+(C.getFullYear()-S.getFullYear())*12,S=>S.getMonth());timeMonth.range;const utcMonth=timeInterval(S=>{S.setUTCDate(1),S.setUTCHours(0,0,0,0)},(S,C)=>{S.setUTCMonth(S.getUTCMonth()+C)},(S,C)=>C.getUTCMonth()-S.getUTCMonth()+(C.getUTCFullYear()-S.getUTCFullYear())*12,S=>S.getUTCMonth());utcMonth.range;const timeYear=timeInterval(S=>{S.setMonth(0,1),S.setHours(0,0,0,0)},(S,C)=>{S.setFullYear(S.getFullYear()+C)},(S,C)=>C.getFullYear()-S.getFullYear(),S=>S.getFullYear());timeYear.every=S=>!isFinite(S=Math.floor(S))||!(S>0)?null:timeInterval(C=>{C.setFullYear(Math.floor(C.getFullYear()/S)*S),C.setMonth(0,1),C.setHours(0,0,0,0)},(C,R)=>{C.setFullYear(C.getFullYear()+R*S)}),timeYear.range;const utcYear=timeInterval(S=>{S.setUTCMonth(0,1),S.setUTCHours(0,0,0,0)},(S,C)=>{S.setUTCFullYear(S.getUTCFullYear()+C)},(S,C)=>C.getUTCFullYear()-S.getUTCFullYear(),S=>S.getUTCFullYear());utcYear.every=S=>!isFinite(S=Math.floor(S))||!(S>0)?null:timeInterval(C=>{C.setUTCFullYear(Math.floor(C.getUTCFullYear()/S)*S),C.setUTCMonth(0,1),C.setUTCHours(0,0,0,0)},(C,R)=>{C.setUTCFullYear(C.getUTCFullYear()+R*S)}),utcYear.range;function ticker(S,C,R,O,I,N){const L=[[second,1,durationSecond],[second,5,5*durationSecond],[second,15,15*durationSecond],[second,30,30*durationSecond],[N,1,durationMinute],[N,5,5*durationMinute],[N,15,15*durationMinute],[N,30,30*durationMinute],[I,1,durationHour],[I,3,3*durationHour],[I,6,6*durationHour],[I,12,12*durationHour],[O,1,durationDay],[O,2,2*durationDay],[R,1,durationWeek],[C,1,durationMonth],[C,3,3*durationMonth],[S,1,durationYear]];function B(F,V,K){const W=Vpe).right(L,W);if(X===L.length)return S.every(tickStep(F/durationYear,V/durationYear,K));if(X===0)return millisecond.every(Math.max(tickStep(F,V,K),1));const[J,oe]=L[W/L[X-1][2]53)return null;"w"in kt||(kt.w=1),"Z"in kt?(tr=utcDate(newDate(kt.y,0,1)),wr=tr.getUTCDay(),tr=wr>4||wr===0?utcMonday.ceil(tr):utcMonday(tr),tr=utcDay.offset(tr,(kt.V-1)*7),kt.y=tr.getUTCFullYear(),kt.m=tr.getUTCMonth(),kt.d=tr.getUTCDate()+(kt.w+6)%7):(tr=localDate(newDate(kt.y,0,1)),wr=tr.getDay(),tr=wr>4||wr===0?timeMonday.ceil(tr):timeMonday(tr),tr=timeDay.offset(tr,(kt.V-1)*7),kt.y=tr.getFullYear(),kt.m=tr.getMonth(),kt.d=tr.getDate()+(kt.w+6)%7)}else("W"in kt||"U"in kt)&&("w"in kt||(kt.w="u"in kt?kt.u%7:"W"in kt?1:0),wr="Z"in kt?utcDate(newDate(kt.y,0,1)).getUTCDay():localDate(newDate(kt.y,0,1)).getDay(),kt.m=0,kt.d="W"in kt?(kt.w+6)%7+kt.W*7-(wr+5)%7:kt.w+kt.U*7-(wr+6)%7);return"Z"in kt?(kt.H+=kt.Z/100|0,kt.M+=kt.Z%100,utcDate(kt)):localDate(kt)}}function Be(bt,It,Ht,kt){for(var Kt=0,tr=It.length,wr=Ht.length,xr,Vr;Kt=wr)return-1;if(xr=It.charCodeAt(Kt++),xr===37){if(xr=It.charAt(Kt++),Vr=Te[xr in pads?It.charAt(Kt++):xr],!Vr||(kt=Vr(bt,Ht,kt))<0)return-1}else if(xr!=Ht.charCodeAt(kt++))return-1}return kt}function Ie(bt,It,Ht){var kt=F.exec(It.slice(Ht));return kt?(bt.p=V.get(kt[0].toLowerCase()),Ht+kt[0].length):-1}function je(bt,It,Ht){var kt=X.exec(It.slice(Ht));return kt?(bt.w=J.get(kt[0].toLowerCase()),Ht+kt[0].length):-1}function Ke(bt,It,Ht){var kt=K.exec(It.slice(Ht));return kt?(bt.w=W.get(kt[0].toLowerCase()),Ht+kt[0].length):-1}function Je(bt,It,Ht){var kt=me.exec(It.slice(Ht));return kt?(bt.m=xe.get(kt[0].toLowerCase()),Ht+kt[0].length):-1}function Xe(bt,It,Ht){var kt=oe.exec(It.slice(Ht));return kt?(bt.m=pe.get(kt[0].toLowerCase()),Ht+kt[0].length):-1}function ot(bt,It,Ht){return Be(bt,C,It,Ht)}function tt(bt,It,Ht){return Be(bt,R,It,Ht)}function Ue(bt,It,Ht){return Be(bt,O,It,Ht)}function et(bt){return L[bt.getDay()]}function dt(bt){return N[bt.getDay()]}function gt(bt){return j[bt.getMonth()]}function Qe(bt){return B[bt.getMonth()]}function lt(bt){return I[+(bt.getHours()>=12)]}function ht(bt){return 1+~~(bt.getMonth()/3)}function Ct(bt){return L[bt.getUTCDay()]}function $t(bt){return N[bt.getUTCDay()]}function Lt(bt){return j[bt.getUTCMonth()]}function Gt(bt){return B[bt.getUTCMonth()]}function Pt(bt){return I[+(bt.getUTCHours()>=12)]}function Vt(bt){return 1+~~(bt.getUTCMonth()/3)}return{format:function(bt){var It=we(bt+="",Ae);return It.toString=function(){return bt},It},parse:function(bt){var It=ke(bt+="",!1);return It.toString=function(){return bt},It},utcFormat:function(bt){var It=we(bt+="",ge);return It.toString=function(){return bt},It},utcParse:function(bt){var It=ke(bt+="",!0);return It.toString=function(){return bt},It}}}var pads={"-":"",_:" ",0:"0"},numberRe=/^\s*\d+/,percentRe=/^%/,requoteRe=/[\\^$*+?|[\]().{}]/g;function pad(S,C,R){var O=S<0?"-":"",I=(O?-S:S)+"",N=I.length;return O+(N[C.toLowerCase(),R]))}function parseWeekdayNumberSunday(S,C,R){var O=numberRe.exec(C.slice(R,R+1));return O?(S.w=+O[0],R+O[0].length):-1}function parseWeekdayNumberMonday(S,C,R){var O=numberRe.exec(C.slice(R,R+1));return O?(S.u=+O[0],R+O[0].length):-1}function parseWeekNumberSunday(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.U=+O[0],R+O[0].length):-1}function parseWeekNumberISO(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.V=+O[0],R+O[0].length):-1}function parseWeekNumberMonday(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.W=+O[0],R+O[0].length):-1}function parseFullYear(S,C,R){var O=numberRe.exec(C.slice(R,R+4));return O?(S.y=+O[0],R+O[0].length):-1}function parseYear(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.y=+O[0]+(+O[0]>68?1900:2e3),R+O[0].length):-1}function parseZone(S,C,R){var O=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(C.slice(R,R+6));return O?(S.Z=O[1]?0:-(O[2]+(O[3]||"00")),R+O[0].length):-1}function parseQuarter(S,C,R){var O=numberRe.exec(C.slice(R,R+1));return O?(S.q=O[0]*3-3,R+O[0].length):-1}function parseMonthNumber(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.m=O[0]-1,R+O[0].length):-1}function parseDayOfMonth(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.d=+O[0],R+O[0].length):-1}function parseDayOfYear(S,C,R){var O=numberRe.exec(C.slice(R,R+3));return O?(S.m=0,S.d=+O[0],R+O[0].length):-1}function parseHour24(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.H=+O[0],R+O[0].length):-1}function parseMinutes(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.M=+O[0],R+O[0].length):-1}function parseSeconds(S,C,R){var O=numberRe.exec(C.slice(R,R+2));return O?(S.S=+O[0],R+O[0].length):-1}function parseMilliseconds(S,C,R){var O=numberRe.exec(C.slice(R,R+3));return O?(S.L=+O[0],R+O[0].length):-1}function parseMicroseconds(S,C,R){var O=numberRe.exec(C.slice(R,R+6));return O?(S.L=Math.floor(O[0]/1e3),R+O[0].length):-1}function parseLiteralPercent(S,C,R){var O=percentRe.exec(C.slice(R,R+1));return O?R+O[0].length:-1}function parseUnixTimestamp(S,C,R){var O=numberRe.exec(C.slice(R));return O?(S.Q=+O[0],R+O[0].length):-1}function parseUnixTimestampSeconds(S,C,R){var O=numberRe.exec(C.slice(R));return O?(S.s=+O[0],R+O[0].length):-1}function formatDayOfMonth(S,C){return pad(S.getDate(),C,2)}function formatHour24(S,C){return pad(S.getHours(),C,2)}function formatHour12(S,C){return pad(S.getHours()%12||12,C,2)}function formatDayOfYear(S,C){return pad(1+timeDay.count(timeYear(S),S),C,3)}function formatMilliseconds(S,C){return pad(S.getMilliseconds(),C,3)}function formatMicroseconds(S,C){return formatMilliseconds(S,C)+"000"}function formatMonthNumber(S,C){return pad(S.getMonth()+1,C,2)}function formatMinutes(S,C){return pad(S.getMinutes(),C,2)}function formatSeconds(S,C){return pad(S.getSeconds(),C,2)}function formatWeekdayNumberMonday(S){var C=S.getDay();return C===0?7:C}function formatWeekNumberSunday(S,C){return pad(timeSunday.count(timeYear(S)-1,S),C,2)}function dISO(S){var C=S.getDay();return C>=4||C===0?timeThursday(S):timeThursday.ceil(S)}function formatWeekNumberISO(S,C){return S=dISO(S),pad(timeThursday.count(timeYear(S),S)+(timeYear(S).getDay()===4),C,2)}function formatWeekdayNumberSunday(S){return S.getDay()}function formatWeekNumberMonday(S,C){return pad(timeMonday.count(timeYear(S)-1,S),C,2)}function formatYear(S,C){return pad(S.getFullYear()%100,C,2)}function formatYearISO(S,C){return S=dISO(S),pad(S.getFullYear()%100,C,2)}function formatFullYear(S,C){return pad(S.getFullYear()%1e4,C,4)}function formatFullYearISO(S,C){var R=S.getDay();return S=R>=4||R===0?timeThursday(S):timeThursday.ceil(S),pad(S.getFullYear()%1e4,C,4)}function formatZone(S){var C=S.getTimezoneOffset();return(C>0?"-":(C*=-1,"+"))+pad(C/60|0,"0",2)+pad(C%60,"0",2)}function formatUTCDayOfMonth(S,C){return pad(S.getUTCDate(),C,2)}function formatUTCHour24(S,C){return pad(S.getUTCHours(),C,2)}function formatUTCHour12(S,C){return pad(S.getUTCHours()%12||12,C,2)}function formatUTCDayOfYear(S,C){return pad(1+utcDay.count(utcYear(S),S),C,3)}function formatUTCMilliseconds(S,C){return pad(S.getUTCMilliseconds(),C,3)}function formatUTCMicroseconds(S,C){return formatUTCMilliseconds(S,C)+"000"}function formatUTCMonthNumber(S,C){return pad(S.getUTCMonth()+1,C,2)}function formatUTCMinutes(S,C){return pad(S.getUTCMinutes(),C,2)}function formatUTCSeconds(S,C){return pad(S.getUTCSeconds(),C,2)}function formatUTCWeekdayNumberMonday(S){var C=S.getUTCDay();return C===0?7:C}function formatUTCWeekNumberSunday(S,C){return pad(utcSunday.count(utcYear(S)-1,S),C,2)}function UTCdISO(S){var C=S.getUTCDay();return C>=4||C===0?utcThursday(S):utcThursday.ceil(S)}function formatUTCWeekNumberISO(S,C){return S=UTCdISO(S),pad(utcThursday.count(utcYear(S),S)+(utcYear(S).getUTCDay()===4),C,2)}function formatUTCWeekdayNumberSunday(S){return S.getUTCDay()}function formatUTCWeekNumberMonday(S,C){return pad(utcMonday.count(utcYear(S)-1,S),C,2)}function formatUTCYear(S,C){return pad(S.getUTCFullYear()%100,C,2)}function formatUTCYearISO(S,C){return S=UTCdISO(S),pad(S.getUTCFullYear()%100,C,2)}function formatUTCFullYear(S,C){return pad(S.getUTCFullYear()%1e4,C,4)}function formatUTCFullYearISO(S,C){var R=S.getUTCDay();return S=R>=4||R===0?utcThursday(S):utcThursday.ceil(S),pad(S.getUTCFullYear()%1e4,C,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}function formatUnixTimestamp(S){return+S}function formatUnixTimestampSeconds(S){return Math.floor(+S/1e3)}var locale,timeFormat,utcFormat;defaultLocale({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function defaultLocale(S){return locale=formatLocale(S),timeFormat=locale.format,locale.parse,utcFormat=locale.utcFormat,locale.utcParse,locale}function date(S){return new Date(S)}function number(S){return S instanceof Date?+S:+new Date(+S)}function calendar(S,C,R,O,I,N,L,B,j,F){var V=continuous(),K=V.invert,W=V.domain,X=F(".%L"),J=F(":%S"),oe=F("%I:%M"),pe=F("%I %p"),me=F("%a %d"),xe=F("%b %d"),Ae=F("%B"),ge=F("%Y");function Te(we){return(j(we)C(I/(S.length-1)))},R.quantiles=function(O){return Array.from({length:O+1},(I,N)=>quantile$1(S,N/O))},R.copy=function(){return sequentialQuantile(C).domain(S)},initInterpolator.apply(R,arguments)}function transformer(){var S=0,C=.5,R=1,O=1,I,N,L,B,j,F=identity$2,V,K=!1,W;function X(oe){return isNaN(oe=+oe)?W:(oe=.5+((oe=+V(oe))-N)*(O*oeS.e^N.s<0?1:-1;for(O=N.d.length,I=S.d.length,C=0,R=OS.d[C]^N.s<0?1:-1;return O===I?0:O>I^N.s<0?1:-1},P.decimalPlaces=P.dp=function(){var S=this,C=S.d.length-1,R=(C-S.e)*LOG_BASE;if(C=S.d[C],C)for(;C%10==0;C/=10)R--;return R<0?0:R},P.dividedBy=P.div=function(S){return divide(this,new this.constructor(S))},P.dividedToIntegerBy=P.idiv=function(S){var C=this,R=C.constructor;return round(divide(C,new R(S),0,1),R.precision)},P.equals=P.eq=function(S){return!this.cmp(S)},P.exponent=function(){return getBase10Exponent(this)},P.greaterThan=P.gt=function(S){return this.cmp(S)>0},P.greaterThanOrEqualTo=P.gte=function(S){return this.cmp(S)>=0},P.isInteger=P.isint=function(){return this.e>this.d.length-2},P.isNegative=P.isneg=function(){return this.s<0},P.isPositive=P.ispos=function(){return this.s>0},P.isZero=function(){return this.s===0},P.lessThan=P.lt=function(S){return this.cmp(S)<0},P.lessThanOrEqualTo=P.lte=function(S){return this.cmp(S)<1},P.logarithm=P.log=function(S){var C,R=this,O=R.constructor,I=O.precision,N=I+5;if(S===void 0)S=new O(10);else if(S=new O(S),S.s<1||S.eq(ONE))throw Error(decimalError+"NaN");if(R.s<1)throw Error(decimalError+(R.s?"NaN":"-Infinity"));return R.eq(ONE)?new O(0):(external=!1,C=divide(ln(R,N),ln(S,N),N),external=!0,round(C,I))},P.minus=P.sub=function(S){var C=this;return S=new C.constructor(S),C.s==S.s?subtract(C,S):add(C,(S.s=-S.s,S))},P.modulo=P.mod=function(S){var C,R=this,O=R.constructor,I=O.precision;if(S=new O(S),!S.s)throw Error(decimalError+"NaN");return R.s?(external=!1,C=divide(R,S,0,1).times(S),external=!0,R.minus(C)):round(new O(R),I)},P.naturalExponential=P.exp=function(){return exp(this)},P.naturalLogarithm=P.ln=function(){return ln(this)},P.negated=P.neg=function(){var S=new this.constructor(this);return S.s=-S.s||0,S},P.plus=P.add=function(S){var C=this;return S=new C.constructor(S),C.s==S.s?add(C,S):subtract(C,(S.s=-S.s,S))},P.precision=P.sd=function(S){var C,R,O,I=this;if(S!==void 0&&S!==!!S&&S!==1&&S!==0)throw Error(invalidArgument+S);if(C=getBase10Exponent(I)+1,O=I.d.length-1,R=O*LOG_BASE+1,O=I.d[O],O){for(;O%10==0;O/=10)R--;for(O=I.d[0];O>=10;O/=10)R++}return S&&C>R?C:R},P.squareRoot=P.sqrt=function(){var S,C,R,O,I,N,L,B=this,j=B.constructor;if(B.s<1){if(!B.s)return new j(0);throw Error(decimalError+"NaN")}for(S=getBase10Exponent(B),external=!1,I=Math.sqrt(+B),I==0||I==1/0?(C=digitsToString(B.d),(C.length+S)%2==0&&(C+="0"),I=Math.sqrt(C),S=mathfloor((S+1)/2)-(S<0||S%2),I==1/0?C="5e"+S:(C=I.toExponential(),C=C.slice(0,C.indexOf("e")+1)+S),O=new j(C)):O=new j(I.toString()),R=j.precision,I=L=R+3;;)if(N=O,O=N.plus(divide(B,N,L+2)).times(.5),digitsToString(N.d).slice(0,L)===(C=digitsToString(O.d)).slice(0,L)){if(C=C.slice(L-3,L+1),I==L&&C=="4999"){if(round(N,R+1,0),N.times(N).eq(B)){O=N;break}}else if(C!="9999")break;L+=4}return external=!0,round(O,R)},P.times=P.mul=function(S){var C,R,O,I,N,L,B,j,F,V=this,K=V.constructor,W=V.d,X=(S=new K(S)).d;if(!V.s||!S.s)return new K(0);for(S.s*=V.s,R=V.e+S.e,j=W.length,F=X.length,j=0;){for(C=0,I=j+O;I>O;)B=N[I]+X[O]*W[I-O-1]+C,N[I--]=B%BASE|0,C=B/BASE|0;N[I]=(N[I]+C)%BASE|0}for(;!N[--L];)N.pop();return C?++R:N.shift(),S.d=N,S.e=R,external?round(S,K.precision):S},P.toDecimalPlaces=P.todp=function(S,C){var R=this,O=R.constructor;return R=new O(R),S===void 0?R:(checkInt32(S,0,MAX_DIGITS),C===void 0?C=O.rounding:checkInt32(C,0,8),round(R,S+getBase10Exponent(R)+1,C))},P.toExponential=function(S,C){var R,O=this,I=O.constructor;return S===void 0?R=toString(O,!0):(checkInt32(S,0,MAX_DIGITS),C===void 0?C=I.rounding:checkInt32(C,0,8),O=round(new I(O),S+1,C),R=toString(O,!0,S+1)),R},P.toFixed=function(S,C){var R,O,I=this,N=I.constructor;return S===void 0?toString(I):(checkInt32(S,0,MAX_DIGITS),C===void 0?C=N.rounding:checkInt32(C,0,8),O=round(new N(I),S+getBase10Exponent(I)+1,C),R=toString(O.abs(),!1,S+getBase10Exponent(O)+1),I.isneg()&&!I.isZero()?"-"+R:R)},P.toInteger=P.toint=function(){var S=this,C=S.constructor;return round(new C(S),getBase10Exponent(S)+1,C.rounding)},P.toNumber=function(){return+this},P.toPower=P.pow=function(S){var C,R,O,I,N,L,B=this,j=B.constructor,F=12,V=+(S=new j(S));if(!S.s)return new j(ONE);if(B=new j(B),!B.s){if(S.s<1)throw Error(decimalError+"Infinity");return B}if(B.eq(ONE))return B;if(O=j.precision,S.eq(ONE))return round(B,O);if(C=S.e,R=S.d.length-1,L=C>=R,N=B.s,L){if((R=V<0?-V:V)<=MAX_SAFE_INTEGER){for(I=new j(ONE),C=Math.ceil(O/LOG_BASE+4),external=!1;R%2&&(I=I.times(B),truncate(I.d,C)),R=mathfloor(R/2),R!==0;)B=B.times(B),truncate(B.d,C);return external=!0,S.s<0?new j(ONE).div(I):round(I,O)}}else if(N<0)throw Error(decimalError+"NaN");return N=N<0&&S.d[Math.max(C,R)]&1?-1:1,B.s=1,external=!1,I=S.times(ln(B,O+F)),external=!0,I=exp(I),I.s=N,I},P.toPrecision=function(S,C){var R,O,I=this,N=I.constructor;return S===void 0?(R=getBase10Exponent(I),O=toString(I,R<=N.toExpNeg||R>=N.toExpPos)):(checkInt32(S,1,MAX_DIGITS),C===void 0?C=N.rounding:checkInt32(C,0,8),I=round(new N(I),S,C),R=getBase10Exponent(I),O=toString(I,S<=R||R<=N.toExpNeg,S)),O},P.toSignificantDigits=P.tosd=function(S,C){var R=this,O=R.constructor;return S===void 0?(S=O.precision,C=O.rounding):(checkInt32(S,1,MAX_DIGITS),C===void 0?C=O.rounding:checkInt32(C,0,8)),round(new O(R),S,C)},P.toString=P.valueOf=P.val=P.toJSON=P[Symbol.for("nodejs.util.inspect.custom")]=function(){var S=this,C=getBase10Exponent(S),R=S.constructor;return toString(S,C<=R.toExpNeg||C>=R.toExpPos)};function add(S,C){var R,O,I,N,L,B,j,F,V=S.constructor,K=V.precision;if(!S.s||!C.s)return C.s||(C=new V(S)),external?round(C,K):C;if(j=S.d,F=C.d,L=S.e,I=C.e,j=j.slice(),N=L-I,N){for(N<0?(O=j,N=-N,B=F.length):(O=F,I=L,B=j.length),L=Math.ceil(K/LOG_BASE),B=L>B?L+1:B+1,N>B&&(N=B,O.length=1),O.reverse();N--;)O.push(0);O.reverse()}for(B=j.length,N=F.length,B-N<0&&(N=B,O=F,F=j,j=O),R=0;N;)R=(j[--N]=j[N]+F[N]+R)/BASE|0,j[N]%=BASE;for(R&&(j.unshift(R),++I),B=j.length;j[--B]==0;)j.pop();return C.d=j,C.e=I,external?round(C,K):C}function checkInt32(S,C,R){if(S!==~~S||SR)throw Error(invalidArgument+S)}function digitsToString(S){var C,R,O,I=S.length-1,N="",L=S[0];if(I>0){for(N+=L,C=1;CL?1:-1;else for(B=j=0;BI[B]?1:-1;break}return j}function R(O,I,N){for(var L=0;N--;)O[N]-=L,L=O[N]1;)O.shift()}return function(O,I,N,L){var B,j,F,V,K,W,X,J,oe,pe,me,xe,Ae,ge,Te,we,ke,Be,Ie=O.constructor,je=O.s==I.s?1:-1,Ke=O.d,Je=I.d;if(!O.s)return new Ie(O);if(!I.s)throw Error(decimalError+"Division by zero");for(j=O.e-I.e,ke=Je.length,Te=Ke.length,X=new Ie(je),J=X.d=[],F=0;Je[F]==(Ke[F]||0);)++F;if(Je[F]>(Ke[F]||0)&&--j,N==null?xe=N=Ie.precision:L?xe=N+(getBase10Exponent(O)-getBase10Exponent(I))+1:xe=N,xe<0)return new Ie(0);if(xe=xe/LOG_BASE+2|0,F=0,ke==1)for(V=0,Je=Je[0],xe++;(F1&&(Je=S(Je,V),Ke=S(Ke,V),ke=Je.length,Te=Ke.length),ge=ke,oe=Ke.slice(0,ke),pe=oe.length;pe=BASE/2&&++we;do V=0,B=C(Je,oe,ke,pe),B<0?(me=oe[0],ke!=pe&&(me=me*BASE+(oe[1]||0)),V=me/we|0,V>1?(V>=BASE&&(V=BASE-1),K=S(Je,V),W=K.length,pe=oe.length,B=C(K,oe,W,pe),B==1&&(V--,R(K,ke16)throw Error(exponentOutOfRange+getBase10Exponent(S));if(!S.s)return new V(ONE);for(C==null?(external=!1,B=K):B=C,L=new V(.03125);S.abs().gte(.1);)S=S.times(L),F+=5;for(O=Math.log(mathpow(2,F))/Math.LN10*2+5|0,B+=O,R=I=N=new V(ONE),V.precision=B;;){if(I=round(I.times(S),B),R=R.times(++j),L=N.plus(divide(I,R,B)),digitsToString(L.d).slice(0,B)===digitsToString(N.d).slice(0,B)){for(;F--;)N=round(N.times(N),B);return V.precision=K,C==null?(external=!0,round(N,K)):N}N=L}}function getBase10Exponent(S){for(var C=S.e*LOG_BASE,R=S.d[0];R>=10;R/=10)C++;return C}function getLn10(S,C,R){if(C>S.LN10.sd())throw external=!0,R&&(S.precision=R),Error(decimalError+"LN10 precision limit exceeded");return round(new S(S.LN10),C)}function getZeroString(S){for(var C="";S--;)C+="0";return C}function ln(S,C){var R,O,I,N,L,B,j,F,V,K=1,W=10,X=S,J=X.d,oe=X.constructor,pe=oe.precision;if(X.s<1)throw Error(decimalError+(X.s?"NaN":"-Infinity"));if(X.eq(ONE))return new oe(0);if(C==null?(external=!1,F=pe):F=C,X.eq(10))return C==null&&(external=!0),getLn10(oe,F);if(F+=W,oe.precision=F,R=digitsToString(J),O=R.charAt(0),N=getBase10Exponent(X),Math.abs(N)<15e14){for(;O<7&&O!=1||O==1&&R.charAt(1)>3;)X=X.times(S),R=digitsToString(X.d),O=R.charAt(0),K++;N=getBase10Exponent(X),O>1?(X=new oe("0."+R),N++):X=new oe(O+"."+R.slice(1))}else return j=getLn10(oe,F+2,pe).times(N+""),X=ln(new oe(O+"."+R.slice(1)),F-W).plus(j),oe.precision=pe,C==null?(external=!0,round(X,pe)):X;for(B=L=X=divide(X.minus(ONE),X.plus(ONE),F),V=round(X.times(X),F),I=3;;){if(L=round(L.times(V),F),j=B.plus(divide(L,new oe(I),F)),digitsToString(j.d).slice(0,F)===digitsToString(B.d).slice(0,F))return B=B.times(2),N!==0&&(B=B.plus(getLn10(oe,F+2,pe).times(N+""))),B=divide(B,new oe(K),F),oe.precision=pe,C==null?(external=!0,round(B,pe)):B;B=j,I+=2}}function parseDecimal(S,C){var R,O,I;for((R=C.indexOf("."))>-1&&(C=C.replace(".","")),(O=C.search(/e/i))>0?(R<0&&(R=O),R+=+C.slice(O+1),C=C.substring(0,O)):R<0&&(R=C.length),O=0;C.charCodeAt(O)===48;)++O;for(I=C.length;C.charCodeAt(I-1)===48;)--I;if(C=C.slice(O,I),C){if(I-=O,R=R-O-1,S.e=mathfloor(R/LOG_BASE),S.d=[],O=(R+1)%LOG_BASE,R<0&&(O+=LOG_BASE),OMAX_E||S.e<-MAX_E))throw Error(exponentOutOfRange+R)}else S.s=0,S.e=0,S.d=[0];return S}function round(S,C,R){var O,I,N,L,B,j,F,V,K=S.d;for(L=1,N=K[0];N>=10;N/=10)L++;if(O=C-L,O<0)O+=LOG_BASE,I=C,F=K[V=0];else{if(V=Math.ceil((O+1)/LOG_BASE),N=K.length,V>=N)return S;for(F=N=K[V],L=1;N>=10;N/=10)L++;O%=LOG_BASE,I=O-LOG_BASE+L}if(R!==void 0&&(N=mathpow(10,L-I-1),B=F/N%10|0,j=C<0||K[V+1]!==void 0||F%N,j=R<4?(B||j)&&(R==0||R==(S.s<0?3:2)):B>5||B==5&&(R==4||j||R==6&&(O>0?I>0?F/mathpow(10,L-I):0:K[V-1])%10&1||R==(S.s<0?8:7))),C<1||!K[0])return j?(N=getBase10Exponent(S),K.length=1,C=C-N-1,K[0]=mathpow(10,(LOG_BASE-C%LOG_BASE)%LOG_BASE),S.e=mathfloor(-C/LOG_BASE)||0):(K.length=1,K[0]=S.e=S.s=0),S;if(O==0?(K.length=V,N=1,V--):(K.length=V+1,N=mathpow(10,LOG_BASE-O),K[V]=I>0?(F/mathpow(10,L-I)%mathpow(10,I)|0)*N:0),j)for(;;)if(V==0){(K[0]+=N)==BASE&&(K[0]=1,++S.e);break}else{if(K[V]+=N,K[V]!=BASE)break;K[V--]=0,N=1}for(O=K.length;K[--O]===0;)K.pop();if(external&&(S.e>MAX_E||S.e<-MAX_E))throw Error(exponentOutOfRange+getBase10Exponent(S));return S}function subtract(S,C){var R,O,I,N,L,B,j,F,V,K,W=S.constructor,X=W.precision;if(!S.s||!C.s)return C.s?C.s=-C.s:C=new W(S),external?round(C,X):C;if(j=S.d,K=C.d,O=C.e,F=S.e,j=j.slice(),L=F-O,L){for(V=L<0,V?(R=j,L=-L,B=K.length):(R=K,O=F,B=j.length),I=Math.max(Math.ceil(X/LOG_BASE),B)+2,L>I&&(L=I,R.length=1),R.reverse(),I=L;I--;)R.push(0);R.reverse()}else{for(I=j.length,B=K.length,V=I0;--I)j[B++]=0;for(I=K.length;I>L;){if(j[--I]0?N=N.charAt(0)+"."+N.slice(1)+getZeroString(O):L>1&&(N=N.charAt(0)+"."+N.slice(1)),N=N+(I<0?"e":"e+")+I):I<0?(N="0."+getZeroString(-I-1)+N,R&&(O=R-L)>0&&(N+=getZeroString(O))):I>=L?(N+=getZeroString(I+1-L),R&&(O=R-I-1)>0&&(N=N+"."+getZeroString(O))):((O=I+1)0&&(I+1===L&&(N+="."),N+=getZeroString(O))),S.s<0?"-"+N:N}function truncate(S,C){if(S.length>C)return S.length=C,!0}function clone(S){var C,R,O;function I(N){var L=this;if(!(L instanceof I))return new I(N);if(L.constructor=I,N instanceof I){L.s=N.s,L.e=N.e,L.d=(N=N.d)?N.slice():N;return}if(typeof N=="number"){if(N*0!==0)throw Error(invalidArgument+N);if(N>0)L.s=1;else if(N<0)N=-N,L.s=-1;else{L.s=0,L.e=0,L.d=[0];return}if(N===~~N&&N<1e7){L.e=0,L.d=[N];return}return parseDecimal(L,N.toString())}else if(typeof N!="string")throw Error(invalidArgument+N);if(N.charCodeAt(0)===45?(N=N.slice(1),L.s=-1):L.s=1,isDecimal.test(N))parseDecimal(L,N);else throw Error(invalidArgument+N)}if(I.prototype=P,I.ROUND_UP=0,I.ROUND_DOWN=1,I.ROUND_CEIL=2,I.ROUND_FLOOR=3,I.ROUND_HALF_UP=4,I.ROUND_HALF_DOWN=5,I.ROUND_HALF_EVEN=6,I.ROUND_HALF_CEIL=7,I.ROUND_HALF_FLOOR=8,I.clone=clone,I.config=I.set=config,S===void 0&&(S={}),S)for(O=["precision","rounding","toExpNeg","toExpPos","LN10"],C=0;C=I[C+1]&&O<=I[C+2])this[R]=O;else throw Error(invalidArgument+R+": "+O);if((O=S[R="LN10"])!==void 0)if(O==Math.LN10)this[R]=new this(O);else throw Error(invalidArgument+R+": "+O);return this}var Decimal=clone(defaults);ONE=new Decimal(1);const Decimal$1=Decimal;function _toConsumableArray$7(S){return _arrayWithoutHoles$7(S)||_iterableToArray$7(S)||_unsupportedIterableToArray$c(S)||_nonIterableSpread$7()}function _nonIterableSpread$7(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$c(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$c(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$c(S,C)}}function _iterableToArray$7(S){if(typeof Symbol<"u"&&Symbol.iterator in Object(S))return Array.from(S)}function _arrayWithoutHoles$7(S){if(Array.isArray(S))return _arrayLikeToArray$c(S)}function _arrayLikeToArray$c(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R=C?R.apply(void 0,I):S(C-L,curry0(function(){for(var B=arguments.length,j=new Array(B),F=0;FS.length)&&(C=S.length);for(var R=0,O=new Array(C);R"u"||!(Symbol.iterator in Object(S)))){var R=[],O=!0,I=!1,N=void 0;try{for(var L=S[Symbol.iterator](),B;!(O=(B=L.next()).done)&&(R.push(B.value),!(C&&R.length===C));O=!0);}catch(j){I=!0,N=j}finally{try{!O&&L.return!=null&&L.return()}finally{if(I)throw N}}return R}}function _arrayWithHoles$6(S){if(Array.isArray(S))return S}function getValidInterval(S){var C=_slicedToArray$6(S,2),R=C[0],O=C[1],I=R,N=O;return R>O&&(I=O,N=R),[I,N]}function getFormatStep(S,C,R){if(S.lte(0))return new Decimal$1(0);var O=Arithmetic.getDigitCount(S.toNumber()),I=new Decimal$1(10).pow(O),N=S.div(I),L=O!==1?.05:.1,B=new Decimal$1(Math.ceil(N.div(L).toNumber())).add(R).mul(L),j=B.mul(I);return C?j:new Decimal$1(Math.ceil(j))}function getTickOfSingleValue(S,C,R){var O=1,I=new Decimal$1(S);if(!I.isint()&&R){var N=Math.abs(S);N<1?(O=new Decimal$1(10).pow(Arithmetic.getDigitCount(S)-1),I=new Decimal$1(Math.floor(I.div(O).toNumber())).mul(O)):N>1&&(I=new Decimal$1(Math.floor(S)))}else S===0?I=new Decimal$1(Math.floor((C-1)/2)):R||(I=new Decimal$1(Math.floor(S)));var L=Math.floor((C-1)/2),B=compose(map(function(j){return I.add(new Decimal$1(j-L).mul(O)).toNumber()}),range);return B(0,C)}function calculateStep(S,C,R,O){var I=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((C-S)/(R-1)))return{step:new Decimal$1(0),tickMin:new Decimal$1(0),tickMax:new Decimal$1(0)};var N=getFormatStep(new Decimal$1(C).sub(S).div(R-1),O,I),L;S<=0&&C>=0?L=new Decimal$1(0):(L=new Decimal$1(S).add(C).div(2),L=L.sub(new Decimal$1(L).mod(N)));var B=Math.ceil(L.sub(S).div(N).toNumber()),j=Math.ceil(new Decimal$1(C).sub(L).div(N).toNumber()),F=B+j+1;return F>R?calculateStep(S,C,R,O,I+1):(F0?j+(R-F):j,B=C>0?B:B+(R-F)),{step:N,tickMin:L.sub(new Decimal$1(B).mul(N)),tickMax:L.add(new Decimal$1(j).mul(N))})}function getNiceTickValuesFn(S){var C=_slicedToArray$6(S,2),R=C[0],O=C[1],I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,L=Math.max(I,2),B=getValidInterval([R,O]),j=_slicedToArray$6(B,2),F=j[0],V=j[1];if(F===-1/0||V===1/0){var K=V===1/0?[F].concat(_toConsumableArray$6(range(0,I-1).map(function(){return 1/0}))):[].concat(_toConsumableArray$6(range(0,I-1).map(function(){return-1/0})),[V]);return R>O?reverse(K):K}if(F===V)return getTickOfSingleValue(F,I,N);var W=calculateStep(F,V,L,N),X=W.step,J=W.tickMin,oe=W.tickMax,pe=Arithmetic.rangeStep(J,oe.add(new Decimal$1(.1).mul(X)),X);return R>O?reverse(pe):pe}function getTickValuesFixedDomainFn(S,C){var R=_slicedToArray$6(S,2),O=R[0],I=R[1],N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,L=getValidInterval([O,I]),B=_slicedToArray$6(L,2),j=B[0],F=B[1];if(j===-1/0||F===1/0)return[O,I];if(j===F)return[j];var V=Math.max(C,2),K=getFormatStep(new Decimal$1(F).sub(j).div(V-1),N,0),W=[].concat(_toConsumableArray$6(Arithmetic.rangeStep(new Decimal$1(j),new Decimal$1(F).sub(new Decimal$1(.99).mul(K)),K)),[F]);return O>I?reverse(W):W}var getNiceTickValues=memoize(getNiceTickValuesFn),getTickValuesFixedDomain=memoize(getTickValuesFixedDomainFn),_excluded$8=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function _extends$i(){return _extends$i=Object.assign?Object.assign.bind():function(S){for(var C=1;CS.length)&&(C=S.length);for(var R=0,O=new Array(C);R=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$8(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function ErrorBar(S){var C=S.offset,R=S.layout,O=S.width,I=S.dataKey,N=S.data,L=S.dataPointFormatter,B=S.xAxis,j=S.yAxis,F=_objectWithoutProperties$8(S,_excluded$8),V=filterProps(F),K=N.map(function(W){var X=L(W,I),J=X.x,oe=X.y,pe=X.value,me=X.errorVal;if(!me)return null;var xe=[],Ae,ge;if(Array.isArray(me)){var Te=_slicedToArray$5(me,2);Ae=Te[0],ge=Te[1]}else Ae=ge=me;if(R==="vertical"){var we=B.scale,ke=oe+C,Be=ke+O,Ie=ke-O,je=we(pe-Ae),Ke=we(pe+ge);xe.push({x1:Ke,y1:Be,x2:Ke,y2:Ie}),xe.push({x1:je,y1:ke,x2:Ke,y2:ke}),xe.push({x1:je,y1:Be,x2:je,y2:Ie})}else if(R==="horizontal"){var Je=j.scale,Xe=J+C,ot=Xe-O,tt=Xe+O,Ue=Je(pe-Ae),et=Je(pe+ge);xe.push({x1:ot,y1:et,x2:tt,y2:et}),xe.push({x1:Xe,y1:Ue,x2:Xe,y2:et}),xe.push({x1:ot,y1:Ue,x2:tt,y2:Ue})}return React.createElement(Layer,_extends$i({className:"recharts-errorBar",key:"bar-".concat(xe.map(function(dt){return"".concat(dt.x1,"-").concat(dt.x2,"-").concat(dt.y1,"-").concat(dt.y2)}))},V),xe.map(function(dt){return React.createElement("line",_extends$i({},dt,{key:"line-".concat(dt.x1,"-").concat(dt.x2,"-").concat(dt.y1,"-").concat(dt.y2)}))}))});return React.createElement(Layer,{className:"recharts-errorBars"},K)}ErrorBar.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},ErrorBar.displayName="ErrorBar";function _typeof$o(S){"@babel/helpers - typeof";return _typeof$o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$o(S)}function ownKeys$n(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$n(S){for(var C=1;CS.length)&&(C=S.length);for(var R=0,O=new Array(C);R1&&arguments[1]!==void 0?arguments[1]:[],I=arguments.length>2?arguments[2]:void 0,N=arguments.length>3?arguments[3]:void 0,L=-1,B=(R=O==null?void 0:O.length)!==null&&R!==void 0?R:0;if(B<=1)return 0;if(N&&N.axisType==="angleAxis"&&Math.abs(Math.abs(N.range[1]-N.range[0])-360)<=1e-6)for(var j=N.range,F=0;F0?I[F-1].coordinate:I[B-1].coordinate,K=I[F].coordinate,W=F>=B-1?I[0].coordinate:I[F+1].coordinate,X=void 0;if(mathSign(K-V)!==mathSign(W-K)){var J=[];if(mathSign(W-K)===mathSign(j[1]-j[0])){X=W;var oe=K+j[1]-j[0];J[0]=Math.min(oe,(oe+V)/2),J[1]=Math.max(oe,(oe+V)/2)}else{X=V;var pe=W+j[1]-j[0];J[0]=Math.min(K,(pe+K)/2),J[1]=Math.max(K,(pe+K)/2)}var me=[Math.min(K,(X+K)/2),Math.max(K,(X+K)/2)];if(C>me[0]&&C<=me[1]||C>=J[0]&&C<=J[1]){L=I[F].index;break}}else{var xe=Math.min(V,W),Ae=Math.max(V,W);if(C>(xe+K)/2&&C<=(Ae+K)/2){L=I[F].index;break}}}else for(var ge=0;ge0&&ge(O[ge].coordinate+O[ge-1].coordinate)/2&&C<=(O[ge].coordinate+O[ge+1].coordinate)/2||ge===B-1&&C>(O[ge].coordinate+O[ge-1].coordinate)/2){L=O[ge].index;break}return L},getMainColorOfGraphicItem=function S(C){var R=C,O=R.type.displayName,I=C.props,N=I.stroke,L=I.fill,B;switch(O){case"Line":B=N;break;case"Area":case"Radar":B=N&&N!=="none"?N:L;break;default:B=L;break}return B},getBarSizeList=function S(C){var R=C.barSize,O=C.stackGroups,I=O===void 0?{}:O;if(!I)return{};for(var N={},L=Object.keys(I),B=0,j=L.length;B=0});if(pe&&pe.length){var me=pe[0].props.barSize,xe=pe[0].props[oe];N[xe]||(N[xe]=[]),N[xe].push({item:pe[0],stackList:pe.slice(1),barSize:isNil$1(me)?R:me})}}return N},getBarPosition=function S(C){var R=C.barGap,O=C.barCategoryGap,I=C.bandSize,N=C.sizeList,L=N===void 0?[]:N,B=C.maxBarSize,j=L.length;if(j<1)return null;var F=getPercentValue(R,I,0,!0),V,K=[];if(L[0].barSize===+L[0].barSize){var W=!1,X=I/j,J=L.reduce(function(ge,Te){return ge+Te.barSize||0},0);J+=(j-1)*F,J>=I&&(J-=(j-1)*F,F=0),J>=I&&X>0&&(W=!0,X*=.9,J=j*X);var oe=(I-J)/2>>0,pe={offset:oe-F,size:0};V=L.reduce(function(ge,Te){var we={item:Te.item,position:{offset:pe.offset+pe.size+F,size:W?X:Te.barSize}},ke=[].concat(_toConsumableArray$5(ge),[we]);return pe=ke[ke.length-1].position,Te.stackList&&Te.stackList.length&&Te.stackList.forEach(function(Be){ke.push({item:Be,position:pe})}),ke},K)}else{var me=getPercentValue(O,I,0,!0);I-2*me-(j-1)*F<=0&&(F=0);var xe=(I-2*me-(j-1)*F)/j;xe>1&&(xe>>=0);var Ae=B===+B?Math.min(xe,B):xe;V=L.reduce(function(ge,Te,we){var ke=[].concat(_toConsumableArray$5(ge),[{item:Te.item,position:{offset:me+(xe+F)*we+(xe-Ae)/2,size:Ae}}]);return Te.stackList&&Te.stackList.length&&Te.stackList.forEach(function(Be){ke.push({item:Be,position:ke[ke.length-1].position})}),ke},K)}return V},appendOffsetOfLegend=function S(C,R,O,I){var N=O.children,L=O.width,B=O.margin,j=L-(B.left||0)-(B.right||0),F=getLegendProps({children:N,legendWidth:j});if(F){var V=I||{},K=V.width,W=V.height,X=F.align,J=F.verticalAlign,oe=F.layout;if((oe==="vertical"||oe==="horizontal"&&J==="middle")&&X!=="center"&&isNumber(C[X]))return _objectSpread$m(_objectSpread$m({},C),{},_defineProperty$n({},X,C[X]+(K||0)));if((oe==="horizontal"||oe==="vertical"&&X==="center")&&J!=="middle"&&isNumber(C[J]))return _objectSpread$m(_objectSpread$m({},C),{},_defineProperty$n({},J,C[J]+(W||0)))}return C},isErrorBarRelevantForAxis=function S(C,R,O){return isNil$1(R)?!0:C==="horizontal"?R==="yAxis":C==="vertical"||O==="x"?R==="xAxis":O==="y"?R==="yAxis":!0},getDomainOfErrorBars=function S(C,R,O,I,N){var L=R.props.children,B=findAllByType(L,ErrorBar).filter(function(F){return isErrorBarRelevantForAxis(I,N,F.props.direction)});if(B&&B.length){var j=B.map(function(F){return F.props.dataKey});return C.reduce(function(F,V){var K=getValueByDataKey(V,O,0),W=Array.isArray(K)?[min$9(K),max$8(K)]:[K,K],X=j.reduce(function(J,oe){var pe=getValueByDataKey(V,oe,0),me=W[0]-Math.abs(Array.isArray(pe)?pe[0]:pe),xe=W[1]+Math.abs(Array.isArray(pe)?pe[1]:pe);return[Math.min(me,J[0]),Math.max(xe,J[1])]},[1/0,-1/0]);return[Math.min(X[0],F[0]),Math.max(X[1],F[1])]},[1/0,-1/0])}return null},parseErrorBarsOfAxis=function S(C,R,O,I,N){var L=R.map(function(B){return getDomainOfErrorBars(C,B,O,N,I)}).filter(function(B){return!isNil$1(B)});return L&&L.length?L.reduce(function(B,j){return[Math.min(B[0],j[0]),Math.max(B[1],j[1])]},[1/0,-1/0]):null},getDomainOfItemsWithSameAxis=function S(C,R,O,I,N){var L=R.map(function(j){var F=j.props.dataKey;return O==="number"&&F&&getDomainOfErrorBars(C,j,F,I)||getDomainOfDataByKey(C,F,O,N)});if(O==="number")return L.reduce(function(j,F){return[Math.min(j[0],F[0]),Math.max(j[1],F[1])]},[1/0,-1/0]);var B={};return L.reduce(function(j,F){for(var V=0,K=F.length;V=2?mathSign(B[0]-B[1])*2*F:F,R&&(C.ticks||C.niceTicks)){var V=(C.ticks||C.niceTicks).map(function(K){var W=N?N.indexOf(K):K;return{coordinate:I(W)+F,value:K,offset:F}});return V.filter(function(K){return!isNan(K.coordinate)})}return C.isCategorical&&C.categoricalDomain?C.categoricalDomain.map(function(K,W){return{coordinate:I(K)+F,value:K,index:W,offset:F}}):I.ticks&&!O?I.ticks(C.tickCount).map(function(K){return{coordinate:I(K)+F,value:K,offset:F}}):I.domain().map(function(K,W){return{coordinate:I(K)+F,value:N?N[K]:K,index:W,offset:F}})},handlerWeakMap=new WeakMap,combineEventHandlers=function S(C,R){if(typeof R!="function")return C;handlerWeakMap.has(C)||handlerWeakMap.set(C,new WeakMap);var O=handlerWeakMap.get(C);if(O.has(R))return O.get(R);var I=function(){C.apply(void 0,arguments),R.apply(void 0,arguments)};return O.set(R,I),I},parseScale=function S(C,R,O){var I=C.scale,N=C.type,L=C.layout,B=C.axisType;if(I==="auto")return L==="radial"&&B==="radiusAxis"?{scale:band(),realScaleType:"band"}:L==="radial"&&B==="angleAxis"?{scale:linear(),realScaleType:"linear"}:N==="category"&&R&&(R.indexOf("LineChart")>=0||R.indexOf("AreaChart")>=0||R.indexOf("ComposedChart")>=0&&!O)?{scale:point(),realScaleType:"point"}:N==="category"?{scale:band(),realScaleType:"band"}:{scale:linear(),realScaleType:"linear"};if(isString$1(I)){var j="scale".concat(upperFirst$1(I));return{scale:(d3Scales[j]||point)(),realScaleType:d3Scales[j]?j:"point"}}return isFunction$6(I)?{scale:I}:{scale:point(),realScaleType:"point"}},EPS=1e-4,checkDomainOfScale=function S(C){var R=C.domain();if(!(!R||R.length<=2)){var O=R.length,I=C.range(),N=Math.min(I[0],I[1])-EPS,L=Math.max(I[0],I[1])+EPS,B=C(R[0]),j=C(R[O-1]);(BL||jL)&&C.domain([R[0],R[O-1]])}},offsetSign=function S(C){var R=C.length;if(!(R<=0))for(var O=0,I=C[0].length;O=0?(C[B][O][0]=N,C[B][O][1]=N+j,N=C[B][O][1]):(C[B][O][0]=L,C[B][O][1]=L+j,L=C[B][O][1])}},offsetPositive=function S(C){var R=C.length;if(!(R<=0))for(var O=0,I=C[0].length;O=0?(C[L][O][0]=N,C[L][O][1]=N+B,N=C[L][O][1]):(C[L][O][0]=0,C[L][O][1]=0)}},STACK_OFFSET_MAP={sign:offsetSign,expand:stackOffsetExpand,none:stackOffsetNone,silhouette:stackOffsetSilhouette,wiggle:stackOffsetWiggle,positive:offsetPositive},getStackedData=function S(C,R,O){var I=R.map(function(B){return B.props.dataKey}),N=STACK_OFFSET_MAP[O],L=shapeStack().keys(I).value(function(B,j){return+getValueByDataKey(B,j,0)}).order(stackOrderNone).offset(N);return L(C)},getStackGroupsByAxisId=function S(C,R,O,I,N,L){if(!C)return null;var B=L?R.reverse():R,j={},F=B.reduce(function(K,W){var X=W.props,J=X.stackId,oe=X.hide;if(oe)return K;var pe=W.props[O],me=K[pe]||{hasStack:!1,stackGroups:{}};if(isNumOrStr(J)){var xe=me.stackGroups[J]||{numericAxisId:O,cateAxisId:I,items:[]};xe.items.push(W),me.hasStack=!0,me.stackGroups[J]=xe}else me.stackGroups[uniqueId("_stackId_")]={numericAxisId:O,cateAxisId:I,items:[W]};return _objectSpread$m(_objectSpread$m({},K),{},_defineProperty$n({},pe,me))},j),V={};return Object.keys(F).reduce(function(K,W){var X=F[W];if(X.hasStack){var J={};X.stackGroups=Object.keys(X.stackGroups).reduce(function(oe,pe){var me=X.stackGroups[pe];return _objectSpread$m(_objectSpread$m({},oe),{},_defineProperty$n({},pe,{numericAxisId:O,cateAxisId:I,items:me.items,stackedData:getStackedData(C,me.items,N)}))},J)}return _objectSpread$m(_objectSpread$m({},K),{},_defineProperty$n({},W,X))},V)},getTicksOfScale=function S(C,R){var O=R.realScaleType,I=R.type,N=R.tickCount,L=R.originalDomain,B=R.allowDecimals,j=O||R.scale;if(j!=="auto"&&j!=="linear")return null;if(N&&I==="number"&&L&&(L[0]==="auto"||L[1]==="auto")){var F=C.domain();if(!F.length)return null;var V=getNiceTickValues(F,N,B);return C.domain([min$9(V),max$8(V)]),{niceTicks:V}}if(N&&I==="number"){var K=C.domain(),W=getTickValuesFixedDomain(K,N,B);return{niceTicks:W}}return null},getStackedDataOfItem=function S(C,R){var O=C.props.stackId;if(isNumOrStr(O)){var I=R[O];if(I){var N=I.items.indexOf(C);return N>=0?I.stackedData[N]:null}}return null},getDomainOfSingle=function S(C){return C.reduce(function(R,O){return[min$9(O.concat([R[0]]).filter(isNumber)),max$8(O.concat([R[1]]).filter(isNumber))]},[1/0,-1/0])},getDomainOfStackGroups=function S(C,R,O){return Object.keys(C).reduce(function(I,N){var L=C[N],B=L.stackedData,j=B.reduce(function(F,V){var K=getDomainOfSingle(V.slice(R,O+1));return[Math.min(F[0],K[0]),Math.max(F[1],K[1])]},[1/0,-1/0]);return[Math.min(j[0],I[0]),Math.max(j[1],I[1])]},[1/0,-1/0]).map(function(I){return I===1/0||I===-1/0?0:I})},MIN_VALUE_REG=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,MAX_VALUE_REG=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,parseSpecifiedDomain=function S(C,R,O){if(isFunction$6(C))return C(R,O);if(!Array.isArray(C))return R;var I=[];if(isNumber(C[0]))I[0]=O?C[0]:Math.min(C[0],R[0]);else if(MIN_VALUE_REG.test(C[0])){var N=+MIN_VALUE_REG.exec(C[0])[1];I[0]=R[0]-N}else isFunction$6(C[0])?I[0]=C[0](R[0]):I[0]=R[0];if(isNumber(C[1]))I[1]=O?C[1]:Math.max(C[1],R[1]);else if(MAX_VALUE_REG.test(C[1])){var L=+MAX_VALUE_REG.exec(C[1])[1];I[1]=R[1]+L}else isFunction$6(C[1])?I[1]=C[1](R[1]):I[1]=R[1];return I},getBandSizeOfAxis=function S(C,R,O){if(C&&C.scale&&C.scale.bandwidth){var I=C.scale.bandwidth();if(!O||I>0)return I}if(C&&R&&R.length>=2){for(var N=sortBy$1(R,function(K){return K.coordinate}),L=1/0,B=1,j=N.length;BS.length)&&(C=S.length);for(var R=0,O=new Array(C);R2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(C-(O.left||0)-(O.right||0)),Math.abs(R-(O.top||0)-(O.bottom||0)))/2},formatAxisMap=function S(C,R,O,I,N){var L=C.width,B=C.height,j=C.startAngle,F=C.endAngle,V=getPercentValue(C.cx,L,L/2),K=getPercentValue(C.cy,B,B/2),W=getMaxRadius(L,B,O),X=getPercentValue(C.innerRadius,W,0),J=getPercentValue(C.outerRadius,W,W*.8),oe=Object.keys(R);return oe.reduce(function(pe,me){var xe=R[me],Ae=xe.domain,ge=xe.reversed,Te;if(isNil$1(xe.range))I==="angleAxis"?Te=[j,F]:I==="radiusAxis"&&(Te=[X,J]),ge&&(Te=[Te[1],Te[0]]);else{Te=xe.range;var we=Te,ke=_slicedToArray$4(we,2);j=ke[0],F=ke[1]}var Be=parseScale(xe,N),Ie=Be.realScaleType,je=Be.scale;je.domain(Ae).range(Te),checkDomainOfScale(je);var Ke=getTicksOfScale(je,_objectSpread$l(_objectSpread$l({},xe),{},{realScaleType:Ie})),Je=_objectSpread$l(_objectSpread$l(_objectSpread$l({},xe),Ke),{},{range:Te,radius:J,realScaleType:Ie,scale:je,cx:V,cy:K,innerRadius:X,outerRadius:J,startAngle:j,endAngle:F});return _objectSpread$l(_objectSpread$l({},pe),{},_defineProperty$m({},me,Je))},{})},distanceBetweenPoints=function S(C,R){var O=C.x,I=C.y,N=R.x,L=R.y;return Math.sqrt(Math.pow(O-N,2)+Math.pow(I-L,2))},getAngleOfPoint=function S(C,R){var O=C.x,I=C.y,N=R.cx,L=R.cy,B=distanceBetweenPoints({x:O,y:I},{x:N,y:L});if(B<=0)return{radius:B};var j=(O-N)/B,F=Math.acos(j);return I>L&&(F=2*Math.PI-F),{radius:B,angle:radianToDegree(F),angleInRadian:F}},formatAngleOfSector=function S(C){var R=C.startAngle,O=C.endAngle,I=Math.floor(R/360),N=Math.floor(O/360),L=Math.min(I,N);return{startAngle:R-L*360,endAngle:O-L*360}},reverseFormatAngleOfSetor=function S(C,R){var O=R.startAngle,I=R.endAngle,N=Math.floor(O/360),L=Math.floor(I/360),B=Math.min(N,L);return C+B*360},inRangeOfSector=function S(C,R){var O=C.x,I=C.y,N=getAngleOfPoint({x:O,y:I},R),L=N.radius,B=N.angle,j=R.innerRadius,F=R.outerRadius;if(LF)return!1;if(L===0)return!0;var V=formatAngleOfSector(R),K=V.startAngle,W=V.endAngle,X=B,J;if(K<=W){for(;X>W;)X-=360;for(;X=K&&X<=W}else{for(;X>K;)X-=360;for(;X=W&&X<=K}return J?_objectSpread$l(_objectSpread$l({},R),{},{radius:L,angle:reverseFormatAngleOfSetor(X,R)}):null};function _typeof$l(S){"@babel/helpers - typeof";return _typeof$l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$l(S)}var _excluded$7=["offset"];function _toConsumableArray$4(S){return _arrayWithoutHoles$4(S)||_iterableToArray$4(S)||_unsupportedIterableToArray$7(S)||_nonIterableSpread$4()}function _nonIterableSpread$4(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$7(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$7(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$7(S,C)}}function _iterableToArray$4(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}function _arrayWithoutHoles$4(S){if(Array.isArray(S))return _arrayLikeToArray$7(S)}function _arrayLikeToArray$7(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$7(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function ownKeys$k(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$k(S){for(var C=1;C=0?1:-1,Ae,ge;I==="insideStart"?(Ae=X+xe*L,ge=oe):I==="insideEnd"?(Ae=J-xe*L,ge=!oe):I==="end"&&(Ae=J+xe*L,ge=oe),ge=me<=0?ge:!ge;var Te=polarToCartesian(F,V,pe,Ae),we=polarToCartesian(F,V,pe,Ae+(ge?1:-1)*359),ke="M".concat(Te.x,",").concat(Te.y,` - A`).concat(pe,",").concat(pe,",0,1,").concat(ge?0:1,`, - `).concat(we.x,",").concat(we.y),Be=isNil$1(C.id)?uniqueId("recharts-radial-line-"):C.id;return React.createElement("text",_extends$h({},O,{dominantBaseline:"central",className:clsx("recharts-radial-bar-label",B)}),React.createElement("defs",null,React.createElement("path",{id:Be,d:ke})),React.createElement("textPath",{xlinkHref:"#".concat(Be)},R))},getAttrsOfPolarLabel=function S(C){var R=C.viewBox,O=C.offset,I=C.position,N=R,L=N.cx,B=N.cy,j=N.innerRadius,F=N.outerRadius,V=N.startAngle,K=N.endAngle,W=(V+K)/2;if(I==="outside"){var X=polarToCartesian(L,B,F+O,W),J=X.x,oe=X.y;return{x:J,y:oe,textAnchor:J>=L?"start":"end",verticalAnchor:"middle"}}if(I==="center")return{x:L,y:B,textAnchor:"middle",verticalAnchor:"middle"};if(I==="centerTop")return{x:L,y:B,textAnchor:"middle",verticalAnchor:"start"};if(I==="centerBottom")return{x:L,y:B,textAnchor:"middle",verticalAnchor:"end"};var pe=(j+F)/2,me=polarToCartesian(L,B,pe,W),xe=me.x,Ae=me.y;return{x:xe,y:Ae,textAnchor:"middle",verticalAnchor:"middle"}},getAttrsOfCartesianLabel=function S(C){var R=C.viewBox,O=C.parentViewBox,I=C.offset,N=C.position,L=R,B=L.x,j=L.y,F=L.width,V=L.height,K=V>=0?1:-1,W=K*I,X=K>0?"end":"start",J=K>0?"start":"end",oe=F>=0?1:-1,pe=oe*I,me=oe>0?"end":"start",xe=oe>0?"start":"end";if(N==="top"){var Ae={x:B+F/2,y:j-K*I,textAnchor:"middle",verticalAnchor:X};return _objectSpread$k(_objectSpread$k({},Ae),O?{height:Math.max(j-O.y,0),width:F}:{})}if(N==="bottom"){var ge={x:B+F/2,y:j+V+W,textAnchor:"middle",verticalAnchor:J};return _objectSpread$k(_objectSpread$k({},ge),O?{height:Math.max(O.y+O.height-(j+V),0),width:F}:{})}if(N==="left"){var Te={x:B-pe,y:j+V/2,textAnchor:me,verticalAnchor:"middle"};return _objectSpread$k(_objectSpread$k({},Te),O?{width:Math.max(Te.x-O.x,0),height:V}:{})}if(N==="right"){var we={x:B+F+pe,y:j+V/2,textAnchor:xe,verticalAnchor:"middle"};return _objectSpread$k(_objectSpread$k({},we),O?{width:Math.max(O.x+O.width-we.x,0),height:V}:{})}var ke=O?{width:F,height:V}:{};return N==="insideLeft"?_objectSpread$k({x:B+pe,y:j+V/2,textAnchor:xe,verticalAnchor:"middle"},ke):N==="insideRight"?_objectSpread$k({x:B+F-pe,y:j+V/2,textAnchor:me,verticalAnchor:"middle"},ke):N==="insideTop"?_objectSpread$k({x:B+F/2,y:j+W,textAnchor:"middle",verticalAnchor:J},ke):N==="insideBottom"?_objectSpread$k({x:B+F/2,y:j+V-W,textAnchor:"middle",verticalAnchor:X},ke):N==="insideTopLeft"?_objectSpread$k({x:B+pe,y:j+W,textAnchor:xe,verticalAnchor:J},ke):N==="insideTopRight"?_objectSpread$k({x:B+F-pe,y:j+W,textAnchor:me,verticalAnchor:J},ke):N==="insideBottomLeft"?_objectSpread$k({x:B+pe,y:j+V-W,textAnchor:xe,verticalAnchor:X},ke):N==="insideBottomRight"?_objectSpread$k({x:B+F-pe,y:j+V-W,textAnchor:me,verticalAnchor:X},ke):isObject$y(N)&&(isNumber(N.x)||isPercent(N.x))&&(isNumber(N.y)||isPercent(N.y))?_objectSpread$k({x:B+getPercentValue(N.x,F),y:j+getPercentValue(N.y,V),textAnchor:"end",verticalAnchor:"end"},ke):_objectSpread$k({x:B+F/2,y:j+V/2,textAnchor:"middle",verticalAnchor:"middle"},ke)},isPolar=function S(C){return"cx"in C&&isNumber(C.cx)};function Label(S){var C=S.offset,R=C===void 0?5:C,O=_objectWithoutProperties$7(S,_excluded$7),I=_objectSpread$k({offset:R},O),N=I.viewBox,L=I.position,B=I.value,j=I.children,F=I.content,V=I.className,K=V===void 0?"":V,W=I.textBreakAll;if(!N||isNil$1(B)&&isNil$1(j)&&!reactExports.isValidElement(F)&&!isFunction$6(F))return null;if(reactExports.isValidElement(F))return reactExports.cloneElement(F,I);var X;if(isFunction$6(F)){if(X=reactExports.createElement(F,I),reactExports.isValidElement(X))return X}else X=getLabel(I);var J=isPolar(N),oe=filterProps(I,!0);if(J&&(L==="insideStart"||L==="insideEnd"||L==="end"))return renderRadialLabel(I,X,oe);var pe=J?getAttrsOfPolarLabel(I):getAttrsOfCartesianLabel(I);return React.createElement(Text$1,_extends$h({className:clsx("recharts-label",K)},oe,pe,{breakAll:W}),X)}Label.displayName="Label";var parseViewBox=function S(C){var R=C.cx,O=C.cy,I=C.angle,N=C.startAngle,L=C.endAngle,B=C.r,j=C.radius,F=C.innerRadius,V=C.outerRadius,K=C.x,W=C.y,X=C.top,J=C.left,oe=C.width,pe=C.height,me=C.clockWise,xe=C.labelViewBox;if(xe)return xe;if(isNumber(oe)&&isNumber(pe)){if(isNumber(K)&&isNumber(W))return{x:K,y:W,width:oe,height:pe};if(isNumber(X)&&isNumber(J))return{x:X,y:J,width:oe,height:pe}}return isNumber(K)&&isNumber(W)?{x:K,y:W,width:0,height:0}:isNumber(R)&&isNumber(O)?{cx:R,cy:O,startAngle:N||I||0,endAngle:L||I||0,innerRadius:F||0,outerRadius:V||j||B||0,clockWise:me}:C.viewBox?C.viewBox:{}},parseLabel=function S(C,R){return C?C===!0?React.createElement(Label,{key:"label-implicit",viewBox:R}):isNumOrStr(C)?React.createElement(Label,{key:"label-implicit",viewBox:R,value:C}):reactExports.isValidElement(C)?C.type===Label?reactExports.cloneElement(C,{key:"label-implicit",viewBox:R}):React.createElement(Label,{key:"label-implicit",content:C,viewBox:R}):isFunction$6(C)?React.createElement(Label,{key:"label-implicit",content:C,viewBox:R}):isObject$y(C)?React.createElement(Label,_extends$h({viewBox:R},C,{key:"label-implicit"})):null:null},renderCallByParent$1=function S(C,R){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!C||!C.children&&O&&!C.label)return null;var I=C.children,N=parseViewBox(C),L=findAllByType(I,Label).map(function(j,F){return reactExports.cloneElement(j,{viewBox:R||N,key:"label-".concat(F)})});if(!O)return L;var B=parseLabel(C.label,R||N);return[B].concat(_toConsumableArray$4(L))};Label.parseViewBox=parseViewBox,Label.renderCallByParent=renderCallByParent$1;function _typeof$k(S){"@babel/helpers - typeof";return _typeof$k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$k(S)}var _excluded$6=["valueAccessor"],_excluded2$3=["data","dataKey","clockWise","id","textBreakAll"];function _toConsumableArray$3(S){return _arrayWithoutHoles$3(S)||_iterableToArray$3(S)||_unsupportedIterableToArray$6(S)||_nonIterableSpread$3()}function _nonIterableSpread$3(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$6(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$6(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$6(S,C)}}function _iterableToArray$3(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}function _arrayWithoutHoles$3(S){if(Array.isArray(S))return _arrayLikeToArray$6(S)}function _arrayLikeToArray$6(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$6(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}var defaultAccessor=function S(C){return Array.isArray(C.value)?last$1(C.value):C.value};function LabelList(S){var C=S.valueAccessor,R=C===void 0?defaultAccessor:C,O=_objectWithoutProperties$6(S,_excluded$6),I=O.data,N=O.dataKey,L=O.clockWise,B=O.id,j=O.textBreakAll,F=_objectWithoutProperties$6(O,_excluded2$3);return!I||!I.length?null:React.createElement(Layer,{className:"recharts-label-list"},I.map(function(V,K){var W=isNil$1(N)?R(V,K):getValueByDataKey(V&&V.payload,N),X=isNil$1(B)?{}:{id:"".concat(B,"-").concat(K)};return React.createElement(Label,_extends$g({},filterProps(V,!0),F,X,{parentViewBox:V.parentViewBox,value:W,textBreakAll:j,viewBox:Label.parseViewBox(isNil$1(L)?V:_objectSpread$j(_objectSpread$j({},V),{},{clockWise:L})),key:"label-".concat(K),index:K}))}))}LabelList.displayName="LabelList";function parseLabelList(S,C){return S?S===!0?React.createElement(LabelList,{key:"labelList-implicit",data:C}):React.isValidElement(S)||isFunction$6(S)?React.createElement(LabelList,{key:"labelList-implicit",data:C,content:S}):isObject$y(S)?React.createElement(LabelList,_extends$g({data:C},S,{key:"labelList-implicit"})):null:null}function renderCallByParent(S,C){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!S||!S.children&&R&&!S.label)return null;var O=S.children,I=findAllByType(O,LabelList).map(function(L,B){return reactExports.cloneElement(L,{data:C,key:"labelList-".concat(B)})});if(!R)return I;var N=parseLabelList(S.label,C);return[N].concat(_toConsumableArray$3(I))}LabelList.renderCallByParent=renderCallByParent;function _typeof$j(S){"@babel/helpers - typeof";return _typeof$j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$j(S)}function _extends$f(){return _extends$f=Object.assign?Object.assign.bind():function(S){for(var C=1;C180),",").concat(+(L>F),`, - `).concat(K.x,",").concat(K.y,` - `);if(I>0){var X=polarToCartesian(R,O,I,L),J=polarToCartesian(R,O,I,F);W+="L ".concat(J.x,",").concat(J.y,` - A `).concat(I,",").concat(I,`,0, - `).concat(+(Math.abs(j)>180),",").concat(+(L<=F),`, - `).concat(X.x,",").concat(X.y," Z")}else W+="L ".concat(R,",").concat(O," Z");return W},getSectorWithCorner=function S(C){var R=C.cx,O=C.cy,I=C.innerRadius,N=C.outerRadius,L=C.cornerRadius,B=C.forceCornerRadius,j=C.cornerIsExternal,F=C.startAngle,V=C.endAngle,K=mathSign(V-F),W=getTangentCircle({cx:R,cy:O,radius:N,angle:F,sign:K,cornerRadius:L,cornerIsExternal:j}),X=W.circleTangency,J=W.lineTangency,oe=W.theta,pe=getTangentCircle({cx:R,cy:O,radius:N,angle:V,sign:-K,cornerRadius:L,cornerIsExternal:j}),me=pe.circleTangency,xe=pe.lineTangency,Ae=pe.theta,ge=j?Math.abs(F-V):Math.abs(F-V)-oe-Ae;if(ge<0)return B?"M ".concat(J.x,",").concat(J.y,` - a`).concat(L,",").concat(L,",0,0,1,").concat(L*2,`,0 - a`).concat(L,",").concat(L,",0,0,1,").concat(-L*2,`,0 - `):getSectorPath({cx:R,cy:O,innerRadius:I,outerRadius:N,startAngle:F,endAngle:V});var Te="M ".concat(J.x,",").concat(J.y,` - A`).concat(L,",").concat(L,",0,0,").concat(+(K<0),",").concat(X.x,",").concat(X.y,` - A`).concat(N,",").concat(N,",0,").concat(+(ge>180),",").concat(+(K<0),",").concat(me.x,",").concat(me.y,` - A`).concat(L,",").concat(L,",0,0,").concat(+(K<0),",").concat(xe.x,",").concat(xe.y,` - `);if(I>0){var we=getTangentCircle({cx:R,cy:O,radius:I,angle:F,sign:K,isExternal:!0,cornerRadius:L,cornerIsExternal:j}),ke=we.circleTangency,Be=we.lineTangency,Ie=we.theta,je=getTangentCircle({cx:R,cy:O,radius:I,angle:V,sign:-K,isExternal:!0,cornerRadius:L,cornerIsExternal:j}),Ke=je.circleTangency,Je=je.lineTangency,Xe=je.theta,ot=j?Math.abs(F-V):Math.abs(F-V)-Ie-Xe;if(ot<0&&L===0)return"".concat(Te,"L").concat(R,",").concat(O,"Z");Te+="L".concat(Je.x,",").concat(Je.y,` - A`).concat(L,",").concat(L,",0,0,").concat(+(K<0),",").concat(Ke.x,",").concat(Ke.y,` - A`).concat(I,",").concat(I,",0,").concat(+(ot>180),",").concat(+(K>0),",").concat(ke.x,",").concat(ke.y,` - A`).concat(L,",").concat(L,",0,0,").concat(+(K<0),",").concat(Be.x,",").concat(Be.y,"Z")}else Te+="L".concat(R,",").concat(O,"Z");return Te},defaultProps$2={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Sector=function S(C){var R=_objectSpread$i(_objectSpread$i({},defaultProps$2),C),O=R.cx,I=R.cy,N=R.innerRadius,L=R.outerRadius,B=R.cornerRadius,j=R.forceCornerRadius,F=R.cornerIsExternal,V=R.startAngle,K=R.endAngle,W=R.className;if(L0&&Math.abs(V-K)<360?pe=getSectorWithCorner({cx:O,cy:I,innerRadius:N,outerRadius:L,cornerRadius:Math.min(oe,J/2),forceCornerRadius:j,cornerIsExternal:F,startAngle:V,endAngle:K}):pe=getSectorPath({cx:O,cy:I,innerRadius:N,outerRadius:L,startAngle:V,endAngle:K}),React.createElement("path",_extends$f({},filterProps(R,!0),{className:X,d:pe,role:"img"}))};function _typeof$i(S){"@babel/helpers - typeof";return _typeof$i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$i(S)}function _extends$e(){return _extends$e=Object.assign?Object.assign.bind():function(S){for(var C=1;CS.length)&&(C=S.length);for(var R=0,O=new Array(C);R=0?1:-1,j=O>=0?1:-1,F=I>=0&&O>=0||I<0&&O<0?1:0,V;if(L>0&&N instanceof Array){for(var K=[0,0,0,0],W=0,X=4;WL?L:N[W];V="M".concat(C,",").concat(R+B*K[0]),K[0]>0&&(V+="A ".concat(K[0],",").concat(K[0],",0,0,").concat(F,",").concat(C+j*K[0],",").concat(R)),V+="L ".concat(C+O-j*K[1],",").concat(R),K[1]>0&&(V+="A ".concat(K[1],",").concat(K[1],",0,0,").concat(F,`, - `).concat(C+O,",").concat(R+B*K[1])),V+="L ".concat(C+O,",").concat(R+I-B*K[2]),K[2]>0&&(V+="A ".concat(K[2],",").concat(K[2],",0,0,").concat(F,`, - `).concat(C+O-j*K[2],",").concat(R+I)),V+="L ".concat(C+j*K[3],",").concat(R+I),K[3]>0&&(V+="A ".concat(K[3],",").concat(K[3],",0,0,").concat(F,`, - `).concat(C,",").concat(R+I-B*K[3])),V+="Z"}else if(L>0&&N===+N&&N>0){var J=Math.min(L,N);V="M ".concat(C,",").concat(R+B*J,` - A `).concat(J,",").concat(J,",0,0,").concat(F,",").concat(C+j*J,",").concat(R,` - L `).concat(C+O-j*J,",").concat(R,` - A `).concat(J,",").concat(J,",0,0,").concat(F,",").concat(C+O,",").concat(R+B*J,` - L `).concat(C+O,",").concat(R+I-B*J,` - A `).concat(J,",").concat(J,",0,0,").concat(F,",").concat(C+O-j*J,",").concat(R+I,` - L `).concat(C+j*J,",").concat(R+I,` - A `).concat(J,",").concat(J,",0,0,").concat(F,",").concat(C,",").concat(R+I-B*J," Z")}else V="M ".concat(C,",").concat(R," h ").concat(O," v ").concat(I," h ").concat(-O," Z");return V},isInRectangle=function S(C,R){if(!C||!R)return!1;var O=C.x,I=C.y,N=R.x,L=R.y,B=R.width,j=R.height;if(Math.abs(B)>0&&Math.abs(j)>0){var F=Math.min(N,N+B),V=Math.max(N,N+B),K=Math.min(L,L+j),W=Math.max(L,L+j);return O>=F&&O<=V&&I>=K&&I<=W}return!1},defaultProps$1={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Rectangle=function S(C){var R=_objectSpread$g(_objectSpread$g({},defaultProps$1),C),O=reactExports.useRef(),I=reactExports.useState(-1),N=_slicedToArray$3(I,2),L=N[0],B=N[1];reactExports.useEffect(function(){if(O.current&&O.current.getTotalLength)try{var ge=O.current.getTotalLength();ge&&B(ge)}catch{}},[]);var j=R.x,F=R.y,V=R.width,K=R.height,W=R.radius,X=R.className,J=R.animationEasing,oe=R.animationDuration,pe=R.animationBegin,me=R.isAnimationActive,xe=R.isUpdateAnimationActive;if(j!==+j||F!==+F||V!==+V||K!==+K||V===0||K===0)return null;var Ae=clsx("recharts-rectangle",X);return xe?React.createElement(Animate,{canBegin:L>0,from:{width:V,height:K,x:j,y:F},to:{width:V,height:K,x:j,y:F},duration:oe,animationEasing:J,isActive:xe},function(ge){var Te=ge.width,we=ge.height,ke=ge.x,Be=ge.y;return React.createElement(Animate,{canBegin:L>0,from:"0px ".concat(L===-1?1:L,"px"),to:"".concat(L,"px 0px"),attributeName:"strokeDasharray",begin:pe,duration:oe,isActive:me,easing:J},React.createElement("path",_extends$d({},filterProps(R,!0),{className:Ae,d:getRectanglePath(ke,Be,Te,we,W),ref:O})))}):React.createElement("path",_extends$d({},filterProps(R,!0),{className:Ae,d:getRectanglePath(j,F,V,K,W)}))},_excluded$5=["points","className","baseLinePoints","connectNulls"];function _extends$c(){return _extends$c=Object.assign?Object.assign.bind():function(S){for(var C=1;C=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$5(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function _toConsumableArray$2(S){return _arrayWithoutHoles$2(S)||_iterableToArray$2(S)||_unsupportedIterableToArray$4(S)||_nonIterableSpread$2()}function _nonIterableSpread$2(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$4(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$4(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$4(S,C)}}function _iterableToArray$2(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}function _arrayWithoutHoles$2(S){if(Array.isArray(S))return _arrayLikeToArray$4(S)}function _arrayLikeToArray$4(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R0&&arguments[0]!==void 0?arguments[0]:[],R=[[]];return C.forEach(function(O){isValidatePoint(O)?R[R.length-1].push(O):R[R.length-1].length>0&&R.push([])}),isValidatePoint(C[0])&&R[R.length-1].push(C[0]),R[R.length-1].length<=0&&(R=R.slice(0,-1)),R},getSinglePolygonPath=function S(C,R){var O=getParsedPoints(C);R&&(O=[O.reduce(function(N,L){return[].concat(_toConsumableArray$2(N),_toConsumableArray$2(L))},[])]);var I=O.map(function(N){return N.reduce(function(L,B,j){return"".concat(L).concat(j===0?"M":"L").concat(B.x,",").concat(B.y)},"")}).join("");return O.length===1?"".concat(I,"Z"):I},getRanglePath=function S(C,R,O){var I=getSinglePolygonPath(C,O);return"".concat(I.slice(-1)==="Z"?I.slice(0,-1):I,"L").concat(getSinglePolygonPath(R.reverse(),O).slice(1))},Polygon=function S(C){var R=C.points,O=C.className,I=C.baseLinePoints,N=C.connectNulls,L=_objectWithoutProperties$5(C,_excluded$5);if(!R||!R.length)return null;var B=clsx("recharts-polygon",O);if(I&&I.length){var j=L.stroke&&L.stroke!=="none",F=getRanglePath(R,I,N);return React.createElement("g",{className:B},React.createElement("path",_extends$c({},filterProps(L,!0),{fill:F.slice(-1)==="Z"?L.fill:"none",stroke:"none",d:F})),j?React.createElement("path",_extends$c({},filterProps(L,!0),{fill:"none",d:getSinglePolygonPath(R,N)})):null,j?React.createElement("path",_extends$c({},filterProps(L,!0),{fill:"none",d:getSinglePolygonPath(I,N)})):null)}var V=getSinglePolygonPath(R,N);return React.createElement("path",_extends$c({},filterProps(L,!0),{fill:V.slice(-1)==="Z"?L.fill:"none",className:B,d:V}))};function _extends$b(){return _extends$b=Object.assign?Object.assign.bind():function(S){for(var C=1;C=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$4(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}var getPath=function S(C,R,O,I,N,L){return"M".concat(C,",").concat(N,"v").concat(I,"M").concat(L,",").concat(R,"h").concat(O)},Cross=function S(C){var R=C.x,O=R===void 0?0:R,I=C.y,N=I===void 0?0:I,L=C.top,B=L===void 0?0:L,j=C.left,F=j===void 0?0:j,V=C.width,K=V===void 0?0:V,W=C.height,X=W===void 0?0:W,J=C.className,oe=_objectWithoutProperties$4(C,_excluded$4),pe=_objectSpread$f({x:O,y:N,top:B,left:F,width:K,height:X},oe);return!isNumber(O)||!isNumber(N)||!isNumber(K)||!isNumber(X)||!isNumber(B)||!isNumber(F)?null:React.createElement("path",_extends$a({},filterProps(pe,!0),{className:clsx("recharts-cross",J),d:getPath(O,N,K,X,B,F)}))},baseExtremum=_baseExtremum,baseGt=_baseGt,baseIteratee$2=_baseIteratee;function maxBy(S,C){return S&&S.length?baseExtremum(S,baseIteratee$2(C),baseGt):void 0}var maxBy_1=maxBy;const maxBy$1=getDefaultExportFromCjs(maxBy_1);var _excluded$3=["cx","cy","angle","ticks","axisLine"],_excluded2$2=["ticks","tick","angle","tickFormatter","stroke"];function _typeof$f(S){"@babel/helpers - typeof";return _typeof$f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$f(S)}function _extends$9(){return _extends$9=Object.assign?Object.assign.bind():function(S){for(var C=1;C=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$3(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function _classCallCheck$7(S,C){if(!(S instanceof C))throw new TypeError("Cannot call a class as a function")}function _defineProperties$7(S,C){for(var R=0;R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$5(S){return _getPrototypeOf$5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$5(S)}function _defineProperty$f(S,C,R){return C=_toPropertyKey$f(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$f(S){var C=_toPrimitive$f(S,"string");return _typeof$f(C)==="symbol"?C:String(C)}function _toPrimitive$f(S,C){if(_typeof$f(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$f(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}var PolarRadiusAxis=function(S){_inherits$5(R,S);var C=_createSuper$5(R);function R(){return _classCallCheck$7(this,R),C.apply(this,arguments)}return _createClass$7(R,[{key:"getTickValueCoord",value:function(I){var N=I.coordinate,L=this.props,B=L.angle,j=L.cx,F=L.cy;return polarToCartesian(j,F,N,B)}},{key:"getTickTextAnchor",value:function(){var I=this.props.orientation,N;switch(I){case"left":N="end";break;case"right":N="start";break;default:N="middle";break}return N}},{key:"getViewBox",value:function(){var I=this.props,N=I.cx,L=I.cy,B=I.angle,j=I.ticks,F=maxBy$1(j,function(K){return K.coordinate||0}),V=minBy$1(j,function(K){return K.coordinate||0});return{cx:N,cy:L,startAngle:B,endAngle:B,innerRadius:V.coordinate||0,outerRadius:F.coordinate||0}}},{key:"renderAxisLine",value:function(){var I=this.props,N=I.cx,L=I.cy,B=I.angle,j=I.ticks,F=I.axisLine,V=_objectWithoutProperties$3(I,_excluded$3),K=j.reduce(function(oe,pe){return[Math.min(oe[0],pe.coordinate),Math.max(oe[1],pe.coordinate)]},[1/0,-1/0]),W=polarToCartesian(N,L,K[0],B),X=polarToCartesian(N,L,K[1],B),J=_objectSpread$e(_objectSpread$e(_objectSpread$e({},filterProps(V)),{},{fill:"none"},filterProps(F)),{},{x1:W.x,y1:W.y,x2:X.x,y2:X.y});return React.createElement("line",_extends$9({className:"recharts-polar-radius-axis-line"},J))}},{key:"renderTicks",value:function(){var I=this,N=this.props,L=N.ticks,B=N.tick,j=N.angle,F=N.tickFormatter,V=N.stroke,K=_objectWithoutProperties$3(N,_excluded2$2),W=this.getTickTextAnchor(),X=filterProps(K),J=filterProps(B),oe=L.map(function(pe,me){var xe=I.getTickValueCoord(pe),Ae=_objectSpread$e(_objectSpread$e(_objectSpread$e(_objectSpread$e({textAnchor:W,transform:"rotate(".concat(90-j,", ").concat(xe.x,", ").concat(xe.y,")")},X),{},{stroke:"none",fill:V},J),{},{index:me},xe),{},{payload:pe});return React.createElement(Layer,_extends$9({className:"recharts-polar-radius-axis-tick",key:"tick-".concat(pe.coordinate)},adaptEventsOfChild(I.props,pe,me)),R.renderTickItem(B,Ae,F?F(pe.value,me):pe.value))});return React.createElement(Layer,{className:"recharts-polar-radius-axis-ticks"},oe)}},{key:"render",value:function(){var I=this.props,N=I.ticks,L=I.axisLine,B=I.tick;return!N||!N.length?null:React.createElement(Layer,{className:"recharts-polar-radius-axis"},L&&this.renderAxisLine(),B&&this.renderTicks(),Label.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(I,N,L){var B;return React.isValidElement(I)?B=React.cloneElement(I,N):isFunction$6(I)?B=I(N):B=React.createElement(Text$1,_extends$9({},N,{className:"recharts-polar-radius-axis-tick-value"}),L),B}}]),R}(reactExports.PureComponent);_defineProperty$f(PolarRadiusAxis,"displayName","PolarRadiusAxis"),_defineProperty$f(PolarRadiusAxis,"axisType","radiusAxis"),_defineProperty$f(PolarRadiusAxis,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function _typeof$e(S){"@babel/helpers - typeof";return _typeof$e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$e(S)}function _extends$8(){return _extends$8=Object.assign?Object.assign.bind():function(S){for(var C=1;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$4(S){return _getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$4(S)}function _defineProperty$e(S,C,R){return C=_toPropertyKey$e(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$e(S){var C=_toPrimitive$e(S,"string");return _typeof$e(C)==="symbol"?C:String(C)}function _toPrimitive$e(S,C){if(_typeof$e(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$e(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}var RADIAN=Math.PI/180,eps=1e-5,PolarAngleAxis=function(S){_inherits$4(R,S);var C=_createSuper$4(R);function R(){return _classCallCheck$6(this,R),C.apply(this,arguments)}return _createClass$6(R,[{key:"getTickLineCoord",value:function(I){var N=this.props,L=N.cx,B=N.cy,j=N.radius,F=N.orientation,V=N.tickSize,K=V||8,W=polarToCartesian(L,B,j,I.coordinate),X=polarToCartesian(L,B,j+(F==="inner"?-1:1)*K,I.coordinate);return{x1:W.x,y1:W.y,x2:X.x,y2:X.y}}},{key:"getTickTextAnchor",value:function(I){var N=this.props.orientation,L=Math.cos(-I.coordinate*RADIAN),B;return L>eps?B=N==="outer"?"start":"end":L<-eps?B=N==="outer"?"end":"start":B="middle",B}},{key:"renderAxisLine",value:function(){var I=this.props,N=I.cx,L=I.cy,B=I.radius,j=I.axisLine,F=I.axisLineType,V=_objectSpread$d(_objectSpread$d({},filterProps(this.props)),{},{fill:"none"},filterProps(j));if(F==="circle")return React.createElement(Dot,_extends$8({className:"recharts-polar-angle-axis-line"},V,{cx:N,cy:L,r:B}));var K=this.props.ticks,W=K.map(function(X){return polarToCartesian(N,L,B,X.coordinate)});return React.createElement(Polygon,_extends$8({className:"recharts-polar-angle-axis-line"},V,{points:W}))}},{key:"renderTicks",value:function(){var I=this,N=this.props,L=N.ticks,B=N.tick,j=N.tickLine,F=N.tickFormatter,V=N.stroke,K=filterProps(this.props),W=filterProps(B),X=_objectSpread$d(_objectSpread$d({},K),{},{fill:"none"},filterProps(j)),J=L.map(function(oe,pe){var me=I.getTickLineCoord(oe),xe=I.getTickTextAnchor(oe),Ae=_objectSpread$d(_objectSpread$d(_objectSpread$d({textAnchor:xe},K),{},{stroke:"none",fill:V},W),{},{index:pe,payload:oe,x:me.x2,y:me.y2});return React.createElement(Layer,_extends$8({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(oe.coordinate)},adaptEventsOfChild(I.props,oe,pe)),j&&React.createElement("line",_extends$8({className:"recharts-polar-angle-axis-tick-line"},X,me)),B&&R.renderTickItem(B,Ae,F?F(oe.value,pe):oe.value))});return React.createElement(Layer,{className:"recharts-polar-angle-axis-ticks"},J)}},{key:"render",value:function(){var I=this.props,N=I.ticks,L=I.radius,B=I.axisLine;return L<=0||!N||!N.length?null:React.createElement(Layer,{className:"recharts-polar-angle-axis"},B&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(I,N,L){var B;return React.isValidElement(I)?B=React.cloneElement(I,N):isFunction$6(I)?B=I(N):B=React.createElement(Text$1,_extends$8({},N,{className:"recharts-polar-angle-axis-tick-value"}),L),B}}]),R}(reactExports.PureComponent);_defineProperty$e(PolarAngleAxis,"displayName","PolarAngleAxis"),_defineProperty$e(PolarAngleAxis,"axisType","angleAxis"),_defineProperty$e(PolarAngleAxis,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,boolTag="[object Boolean]";function isBoolean(S){return S===!0||S===!1||isObjectLike(S)&&baseGetTag(S)==boolTag}var isBoolean_1=isBoolean;const isBoolean$1=getDefaultExportFromCjs(isBoolean_1);function _typeof$d(S){"@babel/helpers - typeof";return _typeof$d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$d(S)}function _extends$7(){return _extends$7=Object.assign?Object.assign.bind():function(S){for(var C=1;CS.length)&&(C=S.length);for(var R=0,O=new Array(C);R0,from:{upperWidth:0,lowerWidth:0,height:W,x:j,y:F},to:{upperWidth:V,lowerWidth:K,height:W,x:j,y:F},duration:oe,animationEasing:J,isActive:me},function(Ae){var ge=Ae.upperWidth,Te=Ae.lowerWidth,we=Ae.height,ke=Ae.x,Be=Ae.y;return React.createElement(Animate,{canBegin:L>0,from:"0px ".concat(L===-1?1:L,"px"),to:"".concat(L,"px 0px"),attributeName:"strokeDasharray",begin:pe,duration:oe,easing:J},React.createElement("path",_extends$7({},filterProps(R,!0),{className:xe,d:getTrapezoidPath(ke,Be,ge,Te,we),ref:O})))}):React.createElement("g",null,React.createElement("path",_extends$7({},filterProps(R,!0),{className:xe,d:getTrapezoidPath(j,F,V,K,W)})))},_excluded$2=["option","shapeType","propTransformer","activeClassName","isActive"];function _typeof$c(S){"@babel/helpers - typeof";return _typeof$c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$c(S)}function _objectWithoutProperties$2(S,C){if(S==null)return{};var R=_objectWithoutPropertiesLoose$2(S,C),O,I;if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(S);for(I=0;I=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$2(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function ownKeys$b(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$b(S){for(var C=1;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$3(S){return _getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$3(S)}function _defineProperty$b(S,C,R){return C=_toPropertyKey$b(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$b(S){var C=_toPrimitive$b(S,"string");return _typeof$b(C)==="symbol"?C:String(C)}function _toPrimitive$b(S,C){if(_typeof$b(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$b(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}var Pie=function(S){_inherits$3(R,S);var C=_createSuper$3(R);function R(O){var I;return _classCallCheck$5(this,R),I=C.call(this,O),_defineProperty$b(_assertThisInitialized$3(I),"pieRef",null),_defineProperty$b(_assertThisInitialized$3(I),"sectorRefs",[]),_defineProperty$b(_assertThisInitialized$3(I),"id",uniqueId("recharts-pie-")),_defineProperty$b(_assertThisInitialized$3(I),"handleAnimationEnd",function(){var N=I.props.onAnimationEnd;I.setState({isAnimationFinished:!0}),isFunction$6(N)&&N()}),_defineProperty$b(_assertThisInitialized$3(I),"handleAnimationStart",function(){var N=I.props.onAnimationStart;I.setState({isAnimationFinished:!1}),isFunction$6(N)&&N()}),I.state={isAnimationFinished:!O.isAnimationActive,prevIsAnimationActive:O.isAnimationActive,prevAnimationId:O.animationId,sectorToFocus:0},I}return _createClass$5(R,[{key:"isActiveIndex",value:function(I){var N=this.props.activeIndex;return Array.isArray(N)?N.indexOf(I)!==-1:I===N}},{key:"hasActiveIndex",value:function(){var I=this.props.activeIndex;return Array.isArray(I)?I.length!==0:I||I===0}},{key:"renderLabels",value:function(I){var N=this.props.isAnimationActive;if(N&&!this.state.isAnimationFinished)return null;var L=this.props,B=L.label,j=L.labelLine,F=L.dataKey,V=L.valueKey,K=filterProps(this.props),W=filterProps(B),X=filterProps(j),J=B&&B.offsetRadius||20,oe=I.map(function(pe,me){var xe=(pe.startAngle+pe.endAngle)/2,Ae=polarToCartesian(pe.cx,pe.cy,pe.outerRadius+J,xe),ge=_objectSpread$a(_objectSpread$a(_objectSpread$a(_objectSpread$a({},K),pe),{},{stroke:"none"},W),{},{index:me,textAnchor:R.getTextAnchor(Ae.x,pe.cx)},Ae),Te=_objectSpread$a(_objectSpread$a(_objectSpread$a(_objectSpread$a({},K),pe),{},{fill:"none",stroke:pe.fill},X),{},{index:me,points:[polarToCartesian(pe.cx,pe.cy,pe.outerRadius,xe),Ae],key:"line"}),we=F;return isNil$1(F)&&isNil$1(V)?we="value":isNil$1(F)&&(we=V),React.createElement(Layer,{key:"label-".concat(pe.startAngle,"-").concat(pe.endAngle)},j&&R.renderLabelLineItem(j,Te),R.renderLabelItem(B,ge,getValueByDataKey(pe,we)))});return React.createElement(Layer,{className:"recharts-pie-labels"},oe)}},{key:"renderSectorsStatically",value:function(I){var N=this,L=this.props,B=L.activeShape,j=L.blendStroke,F=L.inactiveShape;return I.map(function(V,K){if((V==null?void 0:V.startAngle)===0&&(V==null?void 0:V.endAngle)===0&&I.length!==1)return null;var W=N.isActiveIndex(K),X=F&&N.hasActiveIndex()?F:null,J=W?B:X,oe=_objectSpread$a(_objectSpread$a({},V),{},{stroke:j?V.fill:V.stroke,tabIndex:-1});return React.createElement(Layer,_extends$6({ref:function(me){me&&!N.sectorRefs.includes(me)&&N.sectorRefs.push(me)},tabIndex:-1,className:"recharts-pie-sector"},adaptEventsOfChild(N.props,V,K),{key:"sector-".concat(V==null?void 0:V.startAngle,"-").concat(V==null?void 0:V.endAngle,"-").concat(V.midAngle)}),React.createElement(Shape,_extends$6({option:J,isActive:W,shapeType:"sector"},oe)))})}},{key:"renderSectorsWithAnimation",value:function(){var I=this,N=this.props,L=N.sectors,B=N.isAnimationActive,j=N.animationBegin,F=N.animationDuration,V=N.animationEasing,K=N.animationId,W=this.state,X=W.prevSectors,J=W.prevIsAnimationActive;return React.createElement(Animate,{begin:j,duration:F,isActive:B,easing:V,from:{t:0},to:{t:1},key:"pie-".concat(K,"-").concat(J),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(oe){var pe=oe.t,me=[],xe=L&&L[0],Ae=xe.startAngle;return L.forEach(function(ge,Te){var we=X&&X[Te],ke=Te>0?get$5(ge,"paddingAngle",0):0;if(we){var Be=interpolateNumber$2(we.endAngle-we.startAngle,ge.endAngle-ge.startAngle),Ie=_objectSpread$a(_objectSpread$a({},ge),{},{startAngle:Ae+ke,endAngle:Ae+Be(pe)+ke});me.push(Ie),Ae=Ie.endAngle}else{var je=ge.endAngle,Ke=ge.startAngle,Je=interpolateNumber$2(0,je-Ke),Xe=Je(pe),ot=_objectSpread$a(_objectSpread$a({},ge),{},{startAngle:Ae+ke,endAngle:Ae+Xe+ke});me.push(ot),Ae=ot.endAngle}}),React.createElement(Layer,null,I.renderSectorsStatically(me))})}},{key:"attachKeyboardHandlers",value:function(I){var N=this;I.onkeydown=function(L){if(!L.altKey)switch(L.key){case"ArrowLeft":{var B=++N.state.sectorToFocus%N.sectorRefs.length;N.sectorRefs[B].focus(),N.setState({sectorToFocus:B});break}case"ArrowRight":{var j=--N.state.sectorToFocus<0?N.sectorRefs.length-1:N.state.sectorToFocus%N.sectorRefs.length;N.sectorRefs[j].focus(),N.setState({sectorToFocus:j});break}case"Escape":{N.sectorRefs[N.state.sectorToFocus].blur(),N.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var I=this.props,N=I.sectors,L=I.isAnimationActive,B=this.state.prevSectors;return L&&N&&N.length&&(!B||!isEqual$1(B,N))?this.renderSectorsWithAnimation():this.renderSectorsStatically(N)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var I=this,N=this.props,L=N.hide,B=N.sectors,j=N.className,F=N.label,V=N.cx,K=N.cy,W=N.innerRadius,X=N.outerRadius,J=N.isAnimationActive,oe=this.state.isAnimationFinished;if(L||!B||!B.length||!isNumber(V)||!isNumber(K)||!isNumber(W)||!isNumber(X))return null;var pe=clsx("recharts-pie",j);return React.createElement(Layer,{tabIndex:this.props.rootTabIndex,className:pe,ref:function(xe){I.pieRef=xe}},this.renderSectors(),F&&this.renderLabels(B),Label.renderCallByParent(this.props,null,!1),(!J||oe)&&LabelList.renderCallByParent(this.props,B,!1))}}],[{key:"getDerivedStateFromProps",value:function(I,N){return N.prevIsAnimationActive!==I.isAnimationActive?{prevIsAnimationActive:I.isAnimationActive,prevAnimationId:I.animationId,curSectors:I.sectors,prevSectors:[],isAnimationFinished:!0}:I.isAnimationActive&&I.animationId!==N.prevAnimationId?{prevAnimationId:I.animationId,curSectors:I.sectors,prevSectors:N.curSectors,isAnimationFinished:!0}:I.sectors!==N.curSectors?{curSectors:I.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(I,N){return I>N?"start":I=360?xe:xe-1)*j,ge=pe-xe*X-Ae,Te=O.reduce(function(Be,Ie){var je=getValueByDataKey(Ie,me,0);return Be+(isNumber(je)?je:0)},0),we;if(Te>0){var ke;we=O.map(function(Be,Ie){var je=getValueByDataKey(Be,me,0),Ke=getValueByDataKey(Be,V,Ie),Je=(isNumber(je)?je:0)/Te,Xe;Ie?Xe=ke.endAngle+mathSign(oe)*j*(je!==0?1:0):Xe=L;var ot=Xe+mathSign(oe)*((je!==0?X:0)+Je*ge),tt=(Xe+ot)/2,Ue=(J.innerRadius+J.outerRadius)/2,et=[{name:Ke,value:je,payload:Be,dataKey:me,type:W}],dt=polarToCartesian(J.cx,J.cy,Ue,tt);return ke=_objectSpread$a(_objectSpread$a(_objectSpread$a({percent:Je,cornerRadius:N,name:Ke,tooltipPayload:et,midAngle:tt,middleRadius:Ue,tooltipPosition:dt},Be),J),{},{value:getValueByDataKey(Be,me),startAngle:Xe,endAngle:ot,payload:Be,paddingAngle:mathSign(oe)*j}),ke})}return _objectSpread$a(_objectSpread$a({},J),{},{sectors:we,data:O})});function _typeof$a(S){"@babel/helpers - typeof";return _typeof$a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$a(S)}function ownKeys$9(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$9(S){for(var C=1;C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$2(S){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$2(S)}function _defineProperty$9(S,C,R){return C=_toPropertyKey$9(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$9(S){var C=_toPrimitive$9(S,"string");return _typeof$9(C)==="symbol"?C:String(C)}function _toPrimitive$9(S,C){if(_typeof$9(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$9(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}var createScale=function S(C){var R=C.data,O=C.startIndex,I=C.endIndex,N=C.x,L=C.width,B=C.travellerWidth;if(!R||!R.length)return{};var j=R.length,F=point().domain(range$4(0,j)).range([N,N+L-B]),V=F.domain().map(function(K){return F(K)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:F(O),endX:F(I),scale:F,scaleValues:V}},isTouch=function S(C){return C.changedTouches&&!!C.changedTouches.length},Brush=function(S){_inherits$2(R,S);var C=_createSuper$2(R);function R(O){var I;return _classCallCheck$4(this,R),I=C.call(this,O),_defineProperty$9(_assertThisInitialized$2(I),"handleDrag",function(N){I.leaveTimer&&(clearTimeout(I.leaveTimer),I.leaveTimer=null),I.state.isTravellerMoving?I.handleTravellerMove(N):I.state.isSlideMoving&&I.handleSlideDrag(N)}),_defineProperty$9(_assertThisInitialized$2(I),"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&I.handleDrag(N.changedTouches[0])}),_defineProperty$9(_assertThisInitialized$2(I),"handleDragEnd",function(){I.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var N=I.props,L=N.endIndex,B=N.onDragEnd,j=N.startIndex;B==null||B({endIndex:L,startIndex:j})}),I.detachDragEndListener()}),_defineProperty$9(_assertThisInitialized$2(I),"handleLeaveWrapper",function(){(I.state.isTravellerMoving||I.state.isSlideMoving)&&(I.leaveTimer=window.setTimeout(I.handleDragEnd,I.props.leaveTimeOut))}),_defineProperty$9(_assertThisInitialized$2(I),"handleEnterSlideOrTraveller",function(){I.setState({isTextActive:!0})}),_defineProperty$9(_assertThisInitialized$2(I),"handleLeaveSlideOrTraveller",function(){I.setState({isTextActive:!1})}),_defineProperty$9(_assertThisInitialized$2(I),"handleSlideDragStart",function(N){var L=isTouch(N)?N.changedTouches[0]:N;I.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:L.pageX}),I.attachDragEndListener()}),I.travellerDragStartHandlers={startX:I.handleTravellerDragStart.bind(_assertThisInitialized$2(I),"startX"),endX:I.handleTravellerDragStart.bind(_assertThisInitialized$2(I),"endX")},I.state={},I}return _createClass$4(R,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(I){var N=I.startX,L=I.endX,B=this.state.scaleValues,j=this.props,F=j.gap,V=j.data,K=V.length-1,W=Math.min(N,L),X=Math.max(N,L),J=R.getIndexInRange(B,W),oe=R.getIndexInRange(B,X);return{startIndex:J-J%F,endIndex:oe===K?K:oe-oe%F}}},{key:"getTextOfTick",value:function(I){var N=this.props,L=N.data,B=N.tickFormatter,j=N.dataKey,F=getValueByDataKey(L[I],j,I);return isFunction$6(B)?B(F,I):F}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(I){var N=this.state,L=N.slideMoveStartX,B=N.startX,j=N.endX,F=this.props,V=F.x,K=F.width,W=F.travellerWidth,X=F.startIndex,J=F.endIndex,oe=F.onChange,pe=I.pageX-L;pe>0?pe=Math.min(pe,V+K-W-j,V+K-W-B):pe<0&&(pe=Math.max(pe,V-B,V-j));var me=this.getIndex({startX:B+pe,endX:j+pe});(me.startIndex!==X||me.endIndex!==J)&&oe&&oe(me),this.setState({startX:B+pe,endX:j+pe,slideMoveStartX:I.pageX})}},{key:"handleTravellerDragStart",value:function(I,N){var L=isTouch(N)?N.changedTouches[0]:N;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:I,brushMoveStartX:L.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(I){var N,L=this.state,B=L.brushMoveStartX,j=L.movingTravellerId,F=L.endX,V=L.startX,K=this.state[j],W=this.props,X=W.x,J=W.width,oe=W.travellerWidth,pe=W.onChange,me=W.gap,xe=W.data,Ae={startX:this.state.startX,endX:this.state.endX},ge=I.pageX-B;ge>0?ge=Math.min(ge,X+J-oe-K):ge<0&&(ge=Math.max(ge,X-K)),Ae[j]=K+ge;var Te=this.getIndex(Ae),we=Te.startIndex,ke=Te.endIndex,Be=function(){var je=xe.length-1;return j==="startX"&&(F>V?we%me===0:ke%me===0)||FV?ke%me===0:we%me===0)||F>V&&ke===je};this.setState((N={},_defineProperty$9(N,j,K+ge),_defineProperty$9(N,"brushMoveStartX",I.pageX),N),function(){pe&&Be()&&pe(Te)})}},{key:"handleTravellerMoveKeyboard",value:function(I,N){var L=this,B=this.state,j=B.scaleValues,F=B.startX,V=B.endX,K=this.state[N],W=j.indexOf(K);if(W!==-1){var X=W+I;if(!(X===-1||X>=j.length)){var J=j[X];N==="startX"&&J>=V||N==="endX"&&J<=F||this.setState(_defineProperty$9({},N,J),function(){L.props.onChange(L.getIndex({startX:L.state.startX,endX:L.state.endX}))})}}}},{key:"renderBackground",value:function(){var I=this.props,N=I.x,L=I.y,B=I.width,j=I.height,F=I.fill,V=I.stroke;return React.createElement("rect",{stroke:V,fill:F,x:N,y:L,width:B,height:j})}},{key:"renderPanorama",value:function(){var I=this.props,N=I.x,L=I.y,B=I.width,j=I.height,F=I.data,V=I.children,K=I.padding,W=reactExports.Children.only(V);return W?React.cloneElement(W,{x:N,y:L,width:B,height:j,margin:K,compact:!0,data:F}):null}},{key:"renderTravellerLayer",value:function(I,N){var L=this,B=this.props,j=B.y,F=B.travellerWidth,V=B.height,K=B.traveller,W=B.ariaLabel,X=B.data,J=B.startIndex,oe=B.endIndex,pe=Math.max(I,this.props.x),me=_objectSpread$8(_objectSpread$8({},filterProps(this.props)),{},{x:pe,y:j,width:F,height:V}),xe=W||"Min value: ".concat(X[J].name,", Max value: ").concat(X[oe].name);return React.createElement(Layer,{tabIndex:0,role:"slider","aria-label":xe,"aria-valuenow":I,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[N],onTouchStart:this.travellerDragStartHandlers[N],onKeyDown:function(ge){["ArrowLeft","ArrowRight"].includes(ge.key)&&(ge.preventDefault(),ge.stopPropagation(),L.handleTravellerMoveKeyboard(ge.key==="ArrowRight"?1:-1,N))},onFocus:function(){L.setState({isTravellerFocused:!0})},onBlur:function(){L.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},R.renderTraveller(K,me))}},{key:"renderSlide",value:function(I,N){var L=this.props,B=L.y,j=L.height,F=L.stroke,V=L.travellerWidth,K=Math.min(I,N)+V,W=Math.max(Math.abs(N-I)-V,0);return React.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:F,fillOpacity:.2,x:K,y:B,width:W,height:j})}},{key:"renderText",value:function(){var I=this.props,N=I.startIndex,L=I.endIndex,B=I.y,j=I.height,F=I.travellerWidth,V=I.stroke,K=this.state,W=K.startX,X=K.endX,J=5,oe={pointerEvents:"none",fill:V};return React.createElement(Layer,{className:"recharts-brush-texts"},React.createElement(Text$1,_extends$5({textAnchor:"end",verticalAnchor:"middle",x:Math.min(W,X)-J,y:B+j/2},oe),this.getTextOfTick(N)),React.createElement(Text$1,_extends$5({textAnchor:"start",verticalAnchor:"middle",x:Math.max(W,X)+F+J,y:B+j/2},oe),this.getTextOfTick(L)))}},{key:"render",value:function(){var I=this.props,N=I.data,L=I.className,B=I.children,j=I.x,F=I.y,V=I.width,K=I.height,W=I.alwaysShowText,X=this.state,J=X.startX,oe=X.endX,pe=X.isTextActive,me=X.isSlideMoving,xe=X.isTravellerMoving,Ae=X.isTravellerFocused;if(!N||!N.length||!isNumber(j)||!isNumber(F)||!isNumber(V)||!isNumber(K)||V<=0||K<=0)return null;var ge=clsx("recharts-brush",L),Te=React.Children.count(B)===1,we=generatePrefixStyle("userSelect","none");return React.createElement(Layer,{className:ge,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:we},this.renderBackground(),Te&&this.renderPanorama(),this.renderSlide(J,oe),this.renderTravellerLayer(J,"startX"),this.renderTravellerLayer(oe,"endX"),(pe||me||xe||Ae||W)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(I){var N=I.x,L=I.y,B=I.width,j=I.height,F=I.stroke,V=Math.floor(L+j/2)-1;return React.createElement(React.Fragment,null,React.createElement("rect",{x:N,y:L,width:B,height:j,fill:F,stroke:"none"}),React.createElement("line",{x1:N+1,y1:V,x2:N+B-1,y2:V,fill:"none",stroke:"#fff"}),React.createElement("line",{x1:N+1,y1:V+2,x2:N+B-1,y2:V+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(I,N){var L;return React.isValidElement(I)?L=React.cloneElement(I,N):isFunction$6(I)?L=I(N):L=R.renderDefaultTraveller(N),L}},{key:"getDerivedStateFromProps",value:function(I,N){var L=I.data,B=I.width,j=I.x,F=I.travellerWidth,V=I.updateId,K=I.startIndex,W=I.endIndex;if(L!==N.prevData||V!==N.prevUpdateId)return _objectSpread$8({prevData:L,prevTravellerWidth:F,prevUpdateId:V,prevX:j,prevWidth:B},L&&L.length?createScale({data:L,width:B,x:j,travellerWidth:F,startIndex:K,endIndex:W}):{scale:null,scaleValues:null});if(N.scale&&(B!==N.prevWidth||j!==N.prevX||F!==N.prevTravellerWidth)){N.scale.range([j,j+B-F]);var X=N.scale.domain().map(function(J){return N.scale(J)});return{prevData:L,prevTravellerWidth:F,prevUpdateId:V,prevX:j,prevWidth:B,startX:N.scale(I.startIndex),endX:N.scale(I.endIndex),scaleValues:X}}return null}},{key:"getIndexInRange",value:function(I,N){for(var L=I.length,B=0,j=L-1;j-B>1;){var F=Math.floor((B+j)/2);I[F]>N?j=F:B=F}return N>=I[j]?j:B}}]),R}(reactExports.PureComponent);_defineProperty$9(Brush,"displayName","Brush"),_defineProperty$9(Brush,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var baseEach$1=_baseEach;function baseSome$1(S,C){var R;return baseEach$1(S,function(O,I,N){return R=C(O,I,N),!R}),!!R}var _baseSome=baseSome$1,arraySome=_arraySome,baseIteratee$1=_baseIteratee,baseSome=_baseSome,isArray$1=isArray_1,isIterateeCall$1=_isIterateeCall;function some(S,C,R){var O=isArray$1(S)?arraySome:baseSome;return R&&isIterateeCall$1(S,C,R)&&(C=void 0),O(S,baseIteratee$1(C))}var some_1=some;const some$1=getDefaultExportFromCjs(some_1);var ifOverflowMatches=function S(C,R){var O=C.alwaysShow,I=C.ifOverflow;return O&&(I="extendDomain"),I===R};function arrayEvery$1(S,C){for(var R=-1,O=S==null?0:S.length;++R1&&arguments[1]!==void 0?arguments[1]:{},I=O.bandAware,N=O.position;if(R!==void 0){if(N)switch(N){case"start":return this.scale(R);case"middle":{var L=this.bandwidth?this.bandwidth()/2:0;return this.scale(R)+L}case"end":{var B=this.bandwidth?this.bandwidth():0;return this.scale(R)+B}default:return this.scale(R)}if(I){var j=this.bandwidth?this.bandwidth()/2:0;return this.scale(R)+j}return this.scale(R)}}},{key:"isInRange",value:function(R){var O=this.range(),I=O[0],N=O[O.length-1];return I<=N?R>=I&&R<=N:R>=N&&R<=I}}],[{key:"create",value:function(R){return new S(R)}}]),S}();_defineProperty$8(ScaleHelper,"EPS",1e-4);var createLabeledScales=function S(C){var R=Object.keys(C).reduce(function(O,I){return _objectSpread$7(_objectSpread$7({},O),{},_defineProperty$8({},I,ScaleHelper.create(C[I])))},{});return _objectSpread$7(_objectSpread$7({},R),{},{apply:function(I){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=N.bandAware,B=N.position;return mapValues$1(I,function(j,F){return R[F].apply(j,{bandAware:L,position:B})})},isInRange:function(I){return every$1(I,function(N,L){return R[L].isInRange(N)})}})};function normalizeAngle(S){return(S%180+180)%180}var getAngledRectangleWidth=function S(C){var R=C.width,O=C.height,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,N=normalizeAngle(I),L=N*Math.PI/180,B=Math.atan(O/R),j=L>B&&LS.length)&&(C=S.length);for(var R=0,O=new Array(C);RS*I)return!1;var N=R();return S*(C-S*N/2-O)>=0&&S*(C+S*N/2-I)<=0}function getNumberIntervalTicks(S,C){return getEveryNthWithCondition(S,C+1)}function getEquidistantTicks(S,C,R,O,I){for(var N=(O||[]).slice(),L=C.start,B=C.end,j=0,F=1,V=L,K=function(){var J=O==null?void 0:O[j];if(J===void 0)return{v:getEveryNthWithCondition(O,F)};var oe=j,pe,me=function(){return pe===void 0&&(pe=R(J,oe)),pe},xe=J.coordinate,Ae=j===0||isVisible(S,xe,me,V,B);Ae||(j=0,V=L,F+=1),Ae&&(V=xe+S*(me()/2+I),j+=F)},W;F<=N.length;)if(W=K(),W)return W.v;return[]}function _typeof$4(S){"@babel/helpers - typeof";return _typeof$4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$4(S)}function ownKeys$3(S,C){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(S);C&&(O=O.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),R.push.apply(R,O)}return R}function _objectSpread$3(S){for(var C=1;C0?X.coordinate-pe*S:X.coordinate})}else N[W]=X=_objectSpread$3(_objectSpread$3({},X),{},{tickCoord:X.coordinate});var me=isVisible(S,X.tickCoord,oe,B,j);me&&(j=X.tickCoord-S*(oe()/2+I),N[W]=_objectSpread$3(_objectSpread$3({},X),{},{isShow:!0}))},V=L-1;V>=0;V--)F(V);return N}function getTicksStart(S,C,R,O,I,N){var L=(O||[]).slice(),B=L.length,j=C.start,F=C.end;if(N){var V=O[B-1],K=R(V,B-1),W=S*(V.coordinate+S*K/2-F);L[B-1]=V=_objectSpread$3(_objectSpread$3({},V),{},{tickCoord:W>0?V.coordinate-W*S:V.coordinate});var X=isVisible(S,V.tickCoord,function(){return K},j,F);X&&(F=V.tickCoord-S*(K/2+I),L[B-1]=_objectSpread$3(_objectSpread$3({},V),{},{isShow:!0}))}for(var J=N?B-1:B,oe=function(xe){var Ae=L[xe],ge,Te=function(){return ge===void 0&&(ge=R(Ae,xe)),ge};if(xe===0){var we=S*(Ae.coordinate-S*Te()/2-j);L[xe]=Ae=_objectSpread$3(_objectSpread$3({},Ae),{},{tickCoord:we<0?Ae.coordinate-we*S:Ae.coordinate})}else L[xe]=Ae=_objectSpread$3(_objectSpread$3({},Ae),{},{tickCoord:Ae.coordinate});var ke=isVisible(S,Ae.tickCoord,Te,j,F);ke&&(j=Ae.tickCoord+S*(Te()/2+I),L[xe]=_objectSpread$3(_objectSpread$3({},Ae),{},{isShow:!0}))},pe=0;pe=2?mathSign(I[1].coordinate-I[0].coordinate):1,me=getTickBoundaries(N,pe,X);return j==="equidistantPreserveStart"?getEquidistantTicks(pe,me,oe,I,L):(j==="preserveStart"||j==="preserveStartEnd"?W=getTicksStart(pe,me,oe,I,L,j==="preserveStartEnd"):W=getTicksEnd(pe,me,oe,I,L),W.filter(function(xe){return xe.isShow}))}var _excluded$1=["viewBox"],_excluded2$1=["viewBox"],_excluded3=["ticks"];function _typeof$3(S){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},_typeof$3(S)}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(S){for(var C=1;C=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose$1(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function _classCallCheck$2(S,C){if(!(S instanceof C))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(S,C){for(var R=0;R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$1(S){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf$1(S)}function _defineProperty$3(S,C,R){return C=_toPropertyKey$3(C),C in S?Object.defineProperty(S,C,{value:R,enumerable:!0,configurable:!0,writable:!0}):S[C]=R,S}function _toPropertyKey$3(S){var C=_toPrimitive$3(S,"string");return _typeof$3(C)==="symbol"?C:String(C)}function _toPrimitive$3(S,C){if(_typeof$3(S)!=="object"||S===null)return S;var R=S[Symbol.toPrimitive];if(R!==void 0){var O=R.call(S,C||"default");if(_typeof$3(O)!=="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(S)}var CartesianAxis=function(S){_inherits$1(R,S);var C=_createSuper$1(R);function R(O){var I;return _classCallCheck$2(this,R),I=C.call(this,O),I.state={fontSize:"",letterSpacing:""},I}return _createClass$2(R,[{key:"shouldComponentUpdate",value:function(I,N){var L=I.viewBox,B=_objectWithoutProperties$1(I,_excluded$1),j=this.props,F=j.viewBox,V=_objectWithoutProperties$1(j,_excluded2$1);return!shallowEqual(L,F)||!shallowEqual(B,V)||!shallowEqual(N,this.state)}},{key:"componentDidMount",value:function(){var I=this.layerReference;if(I){var N=I.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];N&&this.setState({fontSize:window.getComputedStyle(N).fontSize,letterSpacing:window.getComputedStyle(N).letterSpacing})}}},{key:"getTickLineCoord",value:function(I){var N=this.props,L=N.x,B=N.y,j=N.width,F=N.height,V=N.orientation,K=N.tickSize,W=N.mirror,X=N.tickMargin,J,oe,pe,me,xe,Ae,ge=W?-1:1,Te=I.tickSize||K,we=isNumber(I.tickCoord)?I.tickCoord:I.coordinate;switch(V){case"top":J=oe=I.coordinate,me=B+ +!W*F,pe=me-ge*Te,Ae=pe-ge*X,xe=we;break;case"left":pe=me=I.coordinate,oe=L+ +!W*j,J=oe-ge*Te,xe=J-ge*X,Ae=we;break;case"right":pe=me=I.coordinate,oe=L+ +W*j,J=oe+ge*Te,xe=J+ge*X,Ae=we;break;default:J=oe=I.coordinate,me=B+ +W*F,pe=me+ge*Te,Ae=pe+ge*X,xe=we;break}return{line:{x1:J,y1:pe,x2:oe,y2:me},tick:{x:xe,y:Ae}}}},{key:"getTickTextAnchor",value:function(){var I=this.props,N=I.orientation,L=I.mirror,B;switch(N){case"left":B=L?"start":"end";break;case"right":B=L?"end":"start";break;default:B="middle";break}return B}},{key:"getTickVerticalAnchor",value:function(){var I=this.props,N=I.orientation,L=I.mirror,B="end";switch(N){case"left":case"right":B="middle";break;case"top":B=L?"start":"end";break;default:B=L?"end":"start";break}return B}},{key:"renderAxisLine",value:function(){var I=this.props,N=I.x,L=I.y,B=I.width,j=I.height,F=I.orientation,V=I.mirror,K=I.axisLine,W=_objectSpread$2(_objectSpread$2(_objectSpread$2({},filterProps(this.props)),filterProps(K)),{},{fill:"none"});if(F==="top"||F==="bottom"){var X=+(F==="top"&&!V||F==="bottom"&&V);W=_objectSpread$2(_objectSpread$2({},W),{},{x1:N,y1:L+X*j,x2:N+B,y2:L+X*j})}else{var J=+(F==="left"&&!V||F==="right"&&V);W=_objectSpread$2(_objectSpread$2({},W),{},{x1:N+J*B,y1:L,x2:N+J*B,y2:L+j})}return React.createElement("line",_extends$1({},W,{className:clsx("recharts-cartesian-axis-line",get$5(K,"className"))}))}},{key:"renderTicks",value:function(I,N,L){var B=this,j=this.props,F=j.tickLine,V=j.stroke,K=j.tick,W=j.tickFormatter,X=j.unit,J=getTicks(_objectSpread$2(_objectSpread$2({},this.props),{},{ticks:I}),N,L),oe=this.getTickTextAnchor(),pe=this.getTickVerticalAnchor(),me=filterProps(this.props),xe=filterProps(K),Ae=_objectSpread$2(_objectSpread$2({},me),{},{fill:"none"},filterProps(F)),ge=J.map(function(Te,we){var ke=B.getTickLineCoord(Te),Be=ke.line,Ie=ke.tick,je=_objectSpread$2(_objectSpread$2(_objectSpread$2(_objectSpread$2({textAnchor:oe,verticalAnchor:pe},me),{},{stroke:"none",fill:V},xe),Ie),{},{index:we,payload:Te,visibleTicksCount:J.length,tickFormatter:W});return React.createElement(Layer,_extends$1({className:"recharts-cartesian-axis-tick",key:"tick-".concat(Te.value,"-").concat(Te.coordinate,"-").concat(Te.tickCoord)},adaptEventsOfChild(B.props,Te,we)),F&&React.createElement("line",_extends$1({},Ae,Be,{className:clsx("recharts-cartesian-axis-tick-line",get$5(F,"className"))})),K&&R.renderTickItem(K,je,"".concat(isFunction$6(W)?W(Te.value,we):Te.value).concat(X||"")))});return React.createElement("g",{className:"recharts-cartesian-axis-ticks"},ge)}},{key:"render",value:function(){var I=this,N=this.props,L=N.axisLine,B=N.width,j=N.height,F=N.ticksGenerator,V=N.className,K=N.hide;if(K)return null;var W=this.props,X=W.ticks,J=_objectWithoutProperties$1(W,_excluded3),oe=X;return isFunction$6(F)&&(oe=X&&X.length>0?F(this.props):F(J)),B<=0||j<=0||!oe||!oe.length?null:React.createElement(Layer,{className:clsx("recharts-cartesian-axis",V),ref:function(me){I.layerReference=me}},L&&this.renderAxisLine(),this.renderTicks(oe,this.state.fontSize,this.state.letterSpacing),Label.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(I,N,L){var B;return React.isValidElement(I)?B=React.cloneElement(I,N):isFunction$6(I)?B=I(N):B=React.createElement(Text$1,_extends$1({},N,{className:"recharts-cartesian-axis-tick-value"}),L),B}}]),R}(reactExports.Component);_defineProperty$3(CartesianAxis,"displayName","CartesianAxis"),_defineProperty$3(CartesianAxis,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var define_process_env_default$d={},isProduction=define_process_env_default$d.NODE_ENV==="production",prefix="Invariant failed";function invariant(S,C){if(!S){if(isProduction)throw new Error(prefix);var R=typeof C=="function"?C():C,O=R?"".concat(prefix,": ").concat(R):prefix;throw new Error(O)}}function _toConsumableArray$1(S){return _arrayWithoutHoles$1(S)||_iterableToArray$1(S)||_unsupportedIterableToArray$1(S)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$1(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray$1(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray$1(S,C)}}function _iterableToArray$1(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}function _arrayWithoutHoles$1(S){if(Array.isArray(S))return _arrayLikeToArray$1(S)}function _arrayLikeToArray$1(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R=0)&&Object.prototype.propertyIsEnumerable.call(S,O)&&(R[O]=S[O])}return R}function _objectWithoutPropertiesLoose(S,C){if(S==null)return{};var R={},O=Object.keys(S),I,N;for(N=0;N=0)&&(R[I]=S[I]);return R}function _classCallCheck(S,C){if(!(S instanceof C))throw new TypeError("Cannot call a class as a function")}function _defineProperties(S,C){for(var R=0;R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(S){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},_getPrototypeOf(S)}function _toConsumableArray(S){return _arrayWithoutHoles(S)||_iterableToArray(S)||_unsupportedIterableToArray(S)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(S,C){if(S){if(typeof S=="string")return _arrayLikeToArray(S,C);var R=Object.prototype.toString.call(S).slice(8,-1);if(R==="Object"&&S.constructor&&(R=S.constructor.name),R==="Map"||R==="Set")return Array.from(S);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return _arrayLikeToArray(S,C)}}function _iterableToArray(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}function _arrayWithoutHoles(S){if(Array.isArray(S))return _arrayLikeToArray(S)}function _arrayLikeToArray(S,C){(C==null||C>S.length)&&(C=S.length);for(var R=0,O=new Array(C);R0?L:C&&C.length&&isNumber(I)&&isNumber(N)?C.slice(I,N+1):[]};function getDefaultDomainByAxisType(S){return S==="number"?[0,"auto"]:void 0}var getTooltipContent=function S(C,R,O,I){var N=C.graphicalItems,L=C.tooltipAxis,B=getDisplayedData(R,C);return O<0||!N||!N.length||O>=B.length?null:N.reduce(function(j,F){var V,K=F.props.hide;if(K)return j;var W=(V=F.props.data)!==null&&V!==void 0?V:R;W&&C.dataStartIndex+C.dataEndIndex!==0&&(W=W.slice(C.dataStartIndex,C.dataEndIndex+1));var X;if(L.dataKey&&!L.allowDuplicatedCategory){var J=W===void 0?B:W;X=findEntryInArray(J,L.dataKey,I)}else X=W&&W[O]||B[O];return X?[].concat(_toConsumableArray(j),[getTooltipItem(F,X)]):j},[])},getTooltipData=function S(C,R,O,I){var N=I||{x:C.chartX,y:C.chartY},L=calculateTooltipPos(N,O),B=C.orderedTooltipTicks,j=C.tooltipAxis,F=C.tooltipTicks,V=calculateActiveTickIndex(L,B,F,j);if(V>=0&&F){var K=F[V]&&F[V].value,W=getTooltipContent(C,R,V,K),X=getActiveCoordinate(O,B,V,N);return{activeTooltipIndex:V,activeLabel:K,activePayload:W,activeCoordinate:X}}return null},getAxisMapByAxes=function S(C,R){var O=R.axes,I=R.graphicalItems,N=R.axisType,L=R.axisIdKey,B=R.stackGroups,j=R.dataStartIndex,F=R.dataEndIndex,V=C.layout,K=C.children,W=C.stackOffset,X=isCategoricalAxis(V,N);return O.reduce(function(J,oe){var pe,me=oe.props,xe=me.type,Ae=me.dataKey,ge=me.allowDataOverflow,Te=me.allowDuplicatedCategory,we=me.scale,ke=me.ticks,Be=me.includeHidden,Ie=oe.props[L];if(J[Ie])return J;var je=getDisplayedData(C.data,{graphicalItems:I.filter(function(ht){return ht.props[L]===Ie}),dataStartIndex:j,dataEndIndex:F}),Ke=je.length,Je,Xe,ot;isDomainSpecifiedByUser(oe.props.domain,ge,xe)&&(Je=parseSpecifiedDomain(oe.props.domain,null,ge),X&&(xe==="number"||we!=="auto")&&(ot=getDomainOfDataByKey(je,Ae,"category")));var tt=getDefaultDomainByAxisType(xe);if(!Je||Je.length===0){var Ue,et=(Ue=oe.props.domain)!==null&&Ue!==void 0?Ue:tt;if(Ae){if(Je=getDomainOfDataByKey(je,Ae,xe),xe==="category"&&X){var dt=hasDuplicate(Je);Te&&dt?(Xe=Je,Je=range$4(0,Ke)):Te||(Je=parseDomainOfCategoryAxis(et,Je,oe).reduce(function(ht,Ct){return ht.indexOf(Ct)>=0?ht:[].concat(_toConsumableArray(ht),[Ct])},[]))}else if(xe==="category")Te?Je=Je.filter(function(ht){return ht!==""&&!isNil$1(ht)}):Je=parseDomainOfCategoryAxis(et,Je,oe).reduce(function(ht,Ct){return ht.indexOf(Ct)>=0||Ct===""||isNil$1(Ct)?ht:[].concat(_toConsumableArray(ht),[Ct])},[]);else if(xe==="number"){var gt=parseErrorBarsOfAxis(je,I.filter(function(ht){return ht.props[L]===Ie&&(Be||!ht.props.hide)}),Ae,N,V);gt&&(Je=gt)}X&&(xe==="number"||we!=="auto")&&(ot=getDomainOfDataByKey(je,Ae,"category"))}else X?Je=range$4(0,Ke):B&&B[Ie]&&B[Ie].hasStack&&xe==="number"?Je=W==="expand"?[0,1]:getDomainOfStackGroups(B[Ie].stackGroups,j,F):Je=getDomainOfItemsWithSameAxis(je,I.filter(function(ht){return ht.props[L]===Ie&&(Be||!ht.props.hide)}),xe,V,!0);if(xe==="number")Je=detectReferenceElementsDomain(K,Je,Ie,N,ke),et&&(Je=parseSpecifiedDomain(et,Je,ge));else if(xe==="category"&&et){var Qe=et,lt=Je.every(function(ht){return Qe.indexOf(ht)>=0});lt&&(Je=Qe)}}return _objectSpread(_objectSpread({},J),{},_defineProperty({},Ie,_objectSpread(_objectSpread({},oe.props),{},{axisType:N,domain:Je,categoricalDomain:ot,duplicateDomain:Xe,originalDomain:(pe=oe.props.domain)!==null&&pe!==void 0?pe:tt,isCategorical:X,layout:V})))},{})},getAxisMapByItems=function S(C,R){var O=R.graphicalItems,I=R.Axis,N=R.axisType,L=R.axisIdKey,B=R.stackGroups,j=R.dataStartIndex,F=R.dataEndIndex,V=C.layout,K=C.children,W=getDisplayedData(C.data,{graphicalItems:O,dataStartIndex:j,dataEndIndex:F}),X=W.length,J=isCategoricalAxis(V,N),oe=-1;return O.reduce(function(pe,me){var xe=me.props[L],Ae=getDefaultDomainByAxisType("number");if(!pe[xe]){oe++;var ge;return J?ge=range$4(0,X):B&&B[xe]&&B[xe].hasStack?(ge=getDomainOfStackGroups(B[xe].stackGroups,j,F),ge=detectReferenceElementsDomain(K,ge,xe,N)):(ge=parseSpecifiedDomain(Ae,getDomainOfItemsWithSameAxis(W,O.filter(function(Te){return Te.props[L]===xe&&!Te.props.hide}),"number",V),I.defaultProps.allowDataOverflow),ge=detectReferenceElementsDomain(K,ge,xe,N)),_objectSpread(_objectSpread({},pe),{},_defineProperty({},xe,_objectSpread(_objectSpread({axisType:N},I.defaultProps),{},{hide:!0,orientation:get$5(ORIENT_MAP,"".concat(N,".").concat(oe%2),null),domain:ge,originalDomain:Ae,isCategorical:J,layout:V})))}return pe},{})},getAxisMap=function S(C,R){var O=R.axisType,I=O===void 0?"xAxis":O,N=R.AxisComp,L=R.graphicalItems,B=R.stackGroups,j=R.dataStartIndex,F=R.dataEndIndex,V=C.children,K="".concat(I,"Id"),W=findAllByType(V,N),X={};return W&&W.length?X=getAxisMapByAxes(C,{axes:W,graphicalItems:L,axisType:I,axisIdKey:K,stackGroups:B,dataStartIndex:j,dataEndIndex:F}):L&&L.length&&(X=getAxisMapByItems(C,{Axis:N,graphicalItems:L,axisType:I,axisIdKey:K,stackGroups:B,dataStartIndex:j,dataEndIndex:F})),X},tooltipTicksGenerator=function S(C){var R=getAnyElementOfObject(C),O=getTicksOfAxis(R,!1,!0);return{tooltipTicks:O,orderedTooltipTicks:sortBy$1(O,function(I){return I.coordinate}),tooltipAxis:R,tooltipAxisBandSize:getBandSizeOfAxis(R,O)}},createDefaultState=function S(C){var R=C.children,O=C.defaultShowTooltip,I=findChildByType(R,Brush),N=0,L=0;return C.data&&C.data.length!==0&&(L=C.data.length-1),I&&I.props&&(I.props.startIndex>=0&&(N=I.props.startIndex),I.props.endIndex>=0&&(L=I.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:N,dataEndIndex:L,activeTooltipIndex:-1,isTooltipActive:!!O}},hasGraphicalBarItem=function S(C){return!C||!C.length?!1:C.some(function(R){var O=getDisplayName(R&&R.type);return O&&O.indexOf("Bar")>=0})},getAxisNameByLayout=function S(C){return C==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:C==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:C==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},calculateOffset=function S(C,R){var O=C.props,I=C.graphicalItems,N=C.xAxisMap,L=N===void 0?{}:N,B=C.yAxisMap,j=B===void 0?{}:B,F=O.width,V=O.height,K=O.children,W=O.margin||{},X=findChildByType(K,Brush),J=findChildByType(K,Legend),oe=Object.keys(j).reduce(function(Te,we){var ke=j[we],Be=ke.orientation;return!ke.mirror&&!ke.hide?_objectSpread(_objectSpread({},Te),{},_defineProperty({},Be,Te[Be]+ke.width)):Te},{left:W.left||0,right:W.right||0}),pe=Object.keys(L).reduce(function(Te,we){var ke=L[we],Be=ke.orientation;return!ke.mirror&&!ke.hide?_objectSpread(_objectSpread({},Te),{},_defineProperty({},Be,get$5(Te,"".concat(Be))+ke.height)):Te},{top:W.top||0,bottom:W.bottom||0}),me=_objectSpread(_objectSpread({},pe),oe),xe=me.bottom;X&&(me.bottom+=X.props.height||Brush.defaultProps.height),J&&R&&(me=appendOffsetOfLegend(me,I,O,R));var Ae=F-me.left-me.right,ge=V-me.top-me.bottom;return _objectSpread(_objectSpread({brushBottom:xe},me),{},{width:Math.max(Ae,0),height:Math.max(ge,0)})},generateCategoricalChart=function S(C){var R,O=C.chartName,I=C.GraphicalChild,N=C.defaultTooltipEventType,L=N===void 0?"axis":N,B=C.validateTooltipEventTypes,j=B===void 0?["axis"]:B,F=C.axisComponents,V=C.legendContent,K=C.formatAxisMap,W=C.defaultProps,X=function(pe,me){var xe=me.graphicalItems,Ae=me.stackGroups,ge=me.offset,Te=me.updateId,we=me.dataStartIndex,ke=me.dataEndIndex,Be=pe.barSize,Ie=pe.layout,je=pe.barGap,Ke=pe.barCategoryGap,Je=pe.maxBarSize,Xe=getAxisNameByLayout(Ie),ot=Xe.numericAxisName,tt=Xe.cateAxisName,Ue=hasGraphicalBarItem(xe),et=Ue&&getBarSizeList({barSize:Be,stackGroups:Ae}),dt=[];return xe.forEach(function(gt,Qe){var lt=getDisplayedData(pe.data,{graphicalItems:[gt],dataStartIndex:we,dataEndIndex:ke}),ht=gt.props,Ct=ht.dataKey,$t=ht.maxBarSize,Lt=gt.props["".concat(ot,"Id")],Gt=gt.props["".concat(tt,"Id")],Pt={},Vt=F.reduce(function(Tn,pn){var Mn,bo,mr,sr=me["".concat(pn.axisType,"Map")],Ut=gt.props["".concat(pn.axisType,"Id")];sr&&sr[Ut]||pn.axisType==="zAxis"||(define_process_env_default$c.NODE_ENV!=="production"?invariant(!1,"Specifying a(n) ".concat(pn.axisType,"Id requires a corresponding ").concat(pn.axisType,"Id on the targeted graphical component ").concat((Mn=gt==null||(bo=gt.type)===null||bo===void 0?void 0:bo.displayName)!==null&&Mn!==void 0?Mn:"")):invariant(!1));var nr=sr[Ut];return _objectSpread(_objectSpread({},Tn),{},(mr={},_defineProperty(mr,pn.axisType,nr),_defineProperty(mr,"".concat(pn.axisType,"Ticks"),getTicksOfAxis(nr)),mr))},Pt),bt=Vt[tt],It=Vt["".concat(tt,"Ticks")],Ht=Ae&&Ae[Lt]&&Ae[Lt].hasStack&&getStackedDataOfItem(gt,Ae[Lt].stackGroups),kt=getDisplayName(gt.type).indexOf("Bar")>=0,Kt=getBandSizeOfAxis(bt,It),tr=[];if(kt){var wr,xr,Vr=isNil$1($t)?Je:$t,bn=(wr=(xr=getBandSizeOfAxis(bt,It,!0))!==null&&xr!==void 0?xr:Vr)!==null&&wr!==void 0?wr:0;tr=getBarPosition({barGap:je,barCategoryGap:Ke,bandSize:bn!==Kt?bn:Kt,sizeList:et[Gt],maxBarSize:Vr}),bn!==Kt&&(tr=tr.map(function(Tn){return _objectSpread(_objectSpread({},Tn),{},{position:_objectSpread(_objectSpread({},Tn.position),{},{offset:Tn.position.offset-bn/2})})}))}var Bn=gt&>.type&>.type.getComposedData;if(Bn){var An;dt.push({props:_objectSpread(_objectSpread({},Bn(_objectSpread(_objectSpread({},Vt),{},{displayedData:lt,props:pe,dataKey:Ct,item:gt,bandSize:Kt,barPosition:tr,offset:ge,stackedData:Ht,layout:Ie,dataStartIndex:we,dataEndIndex:ke}))),{},(An={key:gt.key||"item-".concat(Qe)},_defineProperty(An,ot,Vt[ot]),_defineProperty(An,tt,Vt[tt]),_defineProperty(An,"animationId",Te),An)),childIndex:parseChildIndex(gt,pe.children),item:gt})}}),dt},J=function(pe,me){var xe=pe.props,Ae=pe.dataStartIndex,ge=pe.dataEndIndex,Te=pe.updateId;if(!validateWidthHeight({props:xe}))return null;var we=xe.children,ke=xe.layout,Be=xe.stackOffset,Ie=xe.data,je=xe.reverseStackOrder,Ke=getAxisNameByLayout(ke),Je=Ke.numericAxisName,Xe=Ke.cateAxisName,ot=findAllByType(we,I),tt=getStackGroupsByAxisId(Ie,ot,"".concat(Je,"Id"),"".concat(Xe,"Id"),Be,je),Ue=F.reduce(function(lt,ht){var Ct="".concat(ht.axisType,"Map");return _objectSpread(_objectSpread({},lt),{},_defineProperty({},Ct,getAxisMap(xe,_objectSpread(_objectSpread({},ht),{},{graphicalItems:ot,stackGroups:ht.axisType===Je&&tt,dataStartIndex:Ae,dataEndIndex:ge}))))},{}),et=calculateOffset(_objectSpread(_objectSpread({},Ue),{},{props:xe,graphicalItems:ot}),me==null?void 0:me.legendBBox);Object.keys(Ue).forEach(function(lt){Ue[lt]=K(xe,Ue[lt],et,lt.replace("Map",""),O)});var dt=Ue["".concat(Xe,"Map")],gt=tooltipTicksGenerator(dt),Qe=X(xe,_objectSpread(_objectSpread({},Ue),{},{dataStartIndex:Ae,dataEndIndex:ge,updateId:Te,graphicalItems:ot,stackGroups:tt,offset:et}));return _objectSpread(_objectSpread({formattedGraphicalItems:Qe,graphicalItems:ot,offset:et,stackGroups:tt},gt),Ue)};return R=function(oe){_inherits(me,oe);var pe=_createSuper(me);function me(xe){var Ae,ge,Te;return _classCallCheck(this,me),Te=pe.call(this,xe),_defineProperty(_assertThisInitialized(Te),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),_defineProperty(_assertThisInitialized(Te),"accessibilityManager",new AccessibilityManager),_defineProperty(_assertThisInitialized(Te),"handleLegendBBoxUpdate",function(we){if(we){var ke=Te.state,Be=ke.dataStartIndex,Ie=ke.dataEndIndex,je=ke.updateId;Te.setState(_objectSpread({legendBBox:we},J({props:Te.props,dataStartIndex:Be,dataEndIndex:Ie,updateId:je},_objectSpread(_objectSpread({},Te.state),{},{legendBBox:we}))))}}),_defineProperty(_assertThisInitialized(Te),"handleReceiveSyncEvent",function(we,ke,Be){if(Te.props.syncId===we){if(Be===Te.eventEmitterSymbol&&typeof Te.props.syncMethod!="function")return;Te.applySyncEvent(ke)}}),_defineProperty(_assertThisInitialized(Te),"handleBrushChange",function(we){var ke=we.startIndex,Be=we.endIndex;if(ke!==Te.state.dataStartIndex||Be!==Te.state.dataEndIndex){var Ie=Te.state.updateId;Te.setState(function(){return _objectSpread({dataStartIndex:ke,dataEndIndex:Be},J({props:Te.props,dataStartIndex:ke,dataEndIndex:Be,updateId:Ie},Te.state))}),Te.triggerSyncEvent({dataStartIndex:ke,dataEndIndex:Be})}}),_defineProperty(_assertThisInitialized(Te),"handleMouseEnter",function(we){var ke=Te.getMouseInfo(we);if(ke){var Be=_objectSpread(_objectSpread({},ke),{},{isTooltipActive:!0});Te.setState(Be),Te.triggerSyncEvent(Be);var Ie=Te.props.onMouseEnter;isFunction$6(Ie)&&Ie(Be,we)}}),_defineProperty(_assertThisInitialized(Te),"triggeredAfterMouseMove",function(we){var ke=Te.getMouseInfo(we),Be=ke?_objectSpread(_objectSpread({},ke),{},{isTooltipActive:!0}):{isTooltipActive:!1};Te.setState(Be),Te.triggerSyncEvent(Be);var Ie=Te.props.onMouseMove;isFunction$6(Ie)&&Ie(Be,we)}),_defineProperty(_assertThisInitialized(Te),"handleItemMouseEnter",function(we){Te.setState(function(){return{isTooltipActive:!0,activeItem:we,activePayload:we.tooltipPayload,activeCoordinate:we.tooltipPosition||{x:we.cx,y:we.cy}}})}),_defineProperty(_assertThisInitialized(Te),"handleItemMouseLeave",function(){Te.setState(function(){return{isTooltipActive:!1}})}),_defineProperty(_assertThisInitialized(Te),"handleMouseMove",function(we){we.persist(),Te.throttleTriggeredAfterMouseMove(we)}),_defineProperty(_assertThisInitialized(Te),"handleMouseLeave",function(we){var ke={isTooltipActive:!1};Te.setState(ke),Te.triggerSyncEvent(ke);var Be=Te.props.onMouseLeave;isFunction$6(Be)&&Be(ke,we)}),_defineProperty(_assertThisInitialized(Te),"handleOuterEvent",function(we){var ke=getReactEventByType(we),Be=get$5(Te.props,"".concat(ke));if(ke&&isFunction$6(Be)){var Ie,je;/.*touch.*/i.test(ke)?je=Te.getMouseInfo(we.changedTouches[0]):je=Te.getMouseInfo(we),Be((Ie=je)!==null&&Ie!==void 0?Ie:{},we)}}),_defineProperty(_assertThisInitialized(Te),"handleClick",function(we){var ke=Te.getMouseInfo(we);if(ke){var Be=_objectSpread(_objectSpread({},ke),{},{isTooltipActive:!0});Te.setState(Be),Te.triggerSyncEvent(Be);var Ie=Te.props.onClick;isFunction$6(Ie)&&Ie(Be,we)}}),_defineProperty(_assertThisInitialized(Te),"handleMouseDown",function(we){var ke=Te.props.onMouseDown;if(isFunction$6(ke)){var Be=Te.getMouseInfo(we);ke(Be,we)}}),_defineProperty(_assertThisInitialized(Te),"handleMouseUp",function(we){var ke=Te.props.onMouseUp;if(isFunction$6(ke)){var Be=Te.getMouseInfo(we);ke(Be,we)}}),_defineProperty(_assertThisInitialized(Te),"handleTouchMove",function(we){we.changedTouches!=null&&we.changedTouches.length>0&&Te.throttleTriggeredAfterMouseMove(we.changedTouches[0])}),_defineProperty(_assertThisInitialized(Te),"handleTouchStart",function(we){we.changedTouches!=null&&we.changedTouches.length>0&&Te.handleMouseDown(we.changedTouches[0])}),_defineProperty(_assertThisInitialized(Te),"handleTouchEnd",function(we){we.changedTouches!=null&&we.changedTouches.length>0&&Te.handleMouseUp(we.changedTouches[0])}),_defineProperty(_assertThisInitialized(Te),"triggerSyncEvent",function(we){Te.props.syncId!==void 0&&eventCenter.emit(SYNC_EVENT,Te.props.syncId,we,Te.eventEmitterSymbol)}),_defineProperty(_assertThisInitialized(Te),"applySyncEvent",function(we){var ke=Te.props,Be=ke.layout,Ie=ke.syncMethod,je=Te.state.updateId,Ke=we.dataStartIndex,Je=we.dataEndIndex;if(we.dataStartIndex!==void 0||we.dataEndIndex!==void 0)Te.setState(_objectSpread({dataStartIndex:Ke,dataEndIndex:Je},J({props:Te.props,dataStartIndex:Ke,dataEndIndex:Je,updateId:je},Te.state)));else if(we.activeTooltipIndex!==void 0){var Xe=we.chartX,ot=we.chartY,tt=we.activeTooltipIndex,Ue=Te.state,et=Ue.offset,dt=Ue.tooltipTicks;if(!et)return;if(typeof Ie=="function")tt=Ie(dt,we);else if(Ie==="value"){tt=-1;for(var gt=0;gt=0){var Ht,kt;if(Xe.dataKey&&!Xe.allowDuplicatedCategory){var Kt=typeof Xe.dataKey=="function"?It:"payload.".concat(Xe.dataKey.toString());Ht=findEntryInArray(gt,Kt,tt),kt=Qe&<&&findEntryInArray(lt,Kt,tt)}else Ht=gt==null?void 0:gt[ot],kt=Qe&<&<[ot];if(Gt||Lt){var tr=we.props.activeIndex!==void 0?we.props.activeIndex:ot;return[reactExports.cloneElement(we,_objectSpread(_objectSpread(_objectSpread({},Ie.props),Vt),{},{activeIndex:tr})),null,null]}if(!isNil$1(Ht))return[bt].concat(_toConsumableArray(Te.renderActivePoints({item:Ie,activePoint:Ht,basePoint:kt,childIndex:ot,isRange:Qe})))}else{var wr,xr=(wr=Te.getItemByXY(Te.state.activeCoordinate))!==null&&wr!==void 0?wr:{graphicalItem:bt},Vr=xr.graphicalItem,bn=Vr.item,Bn=bn===void 0?we:bn,An=Vr.childIndex,Tn=_objectSpread(_objectSpread(_objectSpread({},Ie.props),Vt),{},{activeIndex:An});return[reactExports.cloneElement(Bn,Tn),null,null]}return Qe?[bt,null,null]:[bt,null]}),_defineProperty(_assertThisInitialized(Te),"renderCustomized",function(we,ke,Be){return reactExports.cloneElement(we,_objectSpread(_objectSpread({key:"recharts-customized-".concat(Be)},Te.props),Te.state))}),_defineProperty(_assertThisInitialized(Te),"renderMap",{CartesianGrid:{handler:Te.renderGrid,once:!0},ReferenceArea:{handler:Te.renderReferenceElement},ReferenceLine:{handler:Te.renderReferenceElement},ReferenceDot:{handler:Te.renderReferenceElement},XAxis:{handler:Te.renderXAxis},YAxis:{handler:Te.renderYAxis},Brush:{handler:Te.renderBrush,once:!0},Bar:{handler:Te.renderGraphicChild},Line:{handler:Te.renderGraphicChild},Area:{handler:Te.renderGraphicChild},Radar:{handler:Te.renderGraphicChild},RadialBar:{handler:Te.renderGraphicChild},Scatter:{handler:Te.renderGraphicChild},Pie:{handler:Te.renderGraphicChild},Funnel:{handler:Te.renderGraphicChild},Tooltip:{handler:Te.renderCursor,once:!0},PolarGrid:{handler:Te.renderPolarGrid,once:!0},PolarAngleAxis:{handler:Te.renderPolarAxis},PolarRadiusAxis:{handler:Te.renderPolarAxis},Customized:{handler:Te.renderCustomized}}),Te.clipPathId="".concat((Ae=xe.id)!==null&&Ae!==void 0?Ae:uniqueId("recharts"),"-clip"),Te.throttleTriggeredAfterMouseMove=throttle$1(Te.triggeredAfterMouseMove,(ge=xe.throttleDelay)!==null&&ge!==void 0?ge:1e3/60),Te.state={},Te}return _createClass(me,[{key:"componentDidMount",value:function(){var Ae,ge;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(Ae=this.props.margin.left)!==null&&Ae!==void 0?Ae:0,top:(ge=this.props.margin.top)!==null&&ge!==void 0?ge:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(Ae,ge){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==ge.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==Ae.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==Ae.margin){var Te,we;this.accessibilityManager.setDetails({offset:{left:(Te=this.props.margin.left)!==null&&Te!==void 0?Te:0,top:(we=this.props.margin.top)!==null&&we!==void 0?we:0}})}return null}},{key:"componentDidUpdate",value:function(){}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var Ae=findChildByType(this.props.children,Tooltip);if(Ae&&typeof Ae.props.shared=="boolean"){var ge=Ae.props.shared?"axis":"item";return j.indexOf(ge)>=0?ge:L}return L}},{key:"getMouseInfo",value:function(Ae){if(!this.container)return null;var ge=this.container,Te=ge.getBoundingClientRect(),we=getOffset(Te),ke={chartX:Math.round(Ae.pageX-we.left),chartY:Math.round(Ae.pageY-we.top)},Be=Te.width/ge.offsetWidth||1,Ie=this.inRange(ke.chartX,ke.chartY,Be);if(!Ie)return null;var je=this.state,Ke=je.xAxisMap,Je=je.yAxisMap,Xe=this.getTooltipEventType();if(Xe!=="axis"&&Ke&&Je){var ot=getAnyElementOfObject(Ke).scale,tt=getAnyElementOfObject(Je).scale,Ue=ot&&ot.invert?ot.invert(ke.chartX):null,et=tt&&tt.invert?tt.invert(ke.chartY):null;return _objectSpread(_objectSpread({},ke),{},{xValue:Ue,yValue:et})}var dt=getTooltipData(this.state,this.props.data,this.props.layout,Ie);return dt?_objectSpread(_objectSpread({},ke),dt):null}},{key:"inRange",value:function(Ae,ge){var Te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,we=this.props.layout,ke=Ae/Te,Be=ge/Te;if(we==="horizontal"||we==="vertical"){var Ie=this.state.offset,je=ke>=Ie.left&&ke<=Ie.left+Ie.width&&Be>=Ie.top&&Be<=Ie.top+Ie.height;return je?{x:ke,y:Be}:null}var Ke=this.state,Je=Ke.angleAxisMap,Xe=Ke.radiusAxisMap;if(Je&&Xe){var ot=getAnyElementOfObject(Je);return inRangeOfSector({x:ke,y:Be},ot)}return null}},{key:"parseEventsOfWrapper",value:function(){var Ae=this.props.children,ge=this.getTooltipEventType(),Te=findChildByType(Ae,Tooltip),we={};Te&&ge==="axis"&&(Te.props.trigger==="click"?we={onClick:this.handleClick}:we={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var ke=adaptEventHandlers(this.props,this.handleOuterEvent);return _objectSpread(_objectSpread({},ke),we)}},{key:"addListener",value:function(){eventCenter.on(SYNC_EVENT,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){eventCenter.removeListener(SYNC_EVENT,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(Ae,ge,Te){for(var we=this.state.formattedGraphicalItems,ke=0,Be=we.length;ke{const R=useClasses$8(),O=reactExports.useMemo(()=>mergeClasses(R.wrapper,C&&R.horizontal),[R,C]),I=reactExports.useMemo(()=>mergeClasses(R.tagsWrapper,C&&R.tagsWrapperHorizontal),[R,C]),N=reactExports.useMemo(()=>{let L;switch(S.type){case"custom":L=S.content;break;case"text":L=jsxRuntimeExports.jsx(Text$2,{size:500,children:S.data});break;case"number":L=jsxRuntimeExports.jsx(Text$2,{size:500,children:numberFormatter(S.data)});break;case"status":L=jsxRuntimeExports.jsx(StatusText,{statusCode:S.status,textSize:500,showText:!0});break;case"time":{L=jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:S.startTimeISOStr,endTimeISOString:S.endTimeISOStr,textSize:500});break}case"score":{const B=[{data:S.score,color:tokens.colorNeutralForeground3},{data:1-S.score,color:tokens.colorNeutralBackground4}];L=jsxRuntimeExports.jsxs("div",{className:R.scoreWrapper,children:[jsxRuntimeExports.jsx(PieChart,{width:24,height:24,children:jsxRuntimeExports.jsx(Pie,{data:B,dataKey:"data",cx:"50%",cy:"50%",innerRadius:8,outerRadius:11,strokeWidth:0,stroke:"transparent",children:B.map((j,F)=>jsxRuntimeExports.jsx(Cell,{fill:j.color},`cell-${F}`))})}),jsxRuntimeExports.jsx(Text$2,{size:500,children:S.score})]});break}case"tags":L=jsxRuntimeExports.jsx("div",{className:I,children:S.tags.map((B,j)=>jsxRuntimeExports.jsx(MetricTag,{tag:B},j))});break;default:L=null}return L},[S,R,I]);return jsxRuntimeExports.jsxs("div",{className:O,children:[jsxRuntimeExports.jsx(Text$2,{size:400,className:R.title,children:S.title}),jsxRuntimeExports.jsx("div",{className:R.data,children:N})]})},useClasses$8=makeStyles({wrapper:{display:"flex",flexDirection:"column",justifyContent:"space-between",...shorthands.flex(0,0,"auto")},horizontal:{flexDirection:"row",alignItems:"center",...shorthands.flex(0,0,"auto")},title:{color:tokens.colorNeutralForeground2,marginBottom:tokens.spacingVerticalXS},data:{color:tokens.colorNeutralForeground1},tagsWrapper:{display:"flex",flexDirection:"row",...shorthands.gap("0.5rem")},tagsWrapperHorizontal:{flexDirection:"column"},timeWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"center","> svg":{marginRight:"5px"}},scoreWrapper:{display:"flex",flexDirection:"row",alignItems:"center","> :first-child":{marginRight:"8px"}}}),TraceDetailMetrics=()=>{const S=useClasses$7(),C=useSelectedTrace(),R=useLocStrings(),O=reactExports.useMemo(()=>{const I=C;if(!I||!I.evaluations)return[];const N=convertToTraceListRow(I),L=[{title:R.Status,type:"status",status:I.status??UNDEFINED_VALUE_PLACEHOLDER},{title:R.Total_Tokens,type:"custom",content:jsxRuntimeExports.jsx("div",{className:S.token,children:jsxRuntimeExports.jsx(SummaryToken,{trace:N})})},{title:R.Latency,type:"time",startTimeISOStr:I.start_time,endTimeISOStr:I.end_time}];return Object.entries(I.evaluations).forEach(([B,j])=>{const F=[],V=j.outputs;V&&(Object.keys(V).forEach(K=>{const W=V[K];W!=null&&F.push({name:K,value:V[K]})}),L.push({title:B,type:"tags",tags:F}))}),L},[C,S.token]);return jsxRuntimeExports.jsx("div",{className:S.wrapper,children:O.map((I,N)=>jsxRuntimeExports.jsx(MetricItem,{data:I},N))})},useClasses$7=makeStyles({wrapper:{display:"flex",alignItems:"stretch",height:"48px",width:"100%",...shorthands.margin("16px"),...shorthands.gap("1rem")},token:{"& div":{fontSize:"20px",fontWeight:400}}}),TreeNode=({node:S,span:C})=>{var B,j,F,V;const R=bitset.has(GraphNodeStatus.Selected)(S.status),O=bitset.has(GraphNodeStatus.Activated)(S.status);let I=tokens.colorNeutralStroke1,N=tokens.colorNeutralBackground4,L=1;return R&&(I=tokens.colorBrandStroke2,L=2,N=tokens.colorNeutralBackground4Selected),O&&(N=tokens.colorNeutralBackground4Hover),jsxRuntimeExports.jsx("foreignObject",{x:S.x,y:S.y,width:TREE_NODE_WIDTH,height:TREE_NODE_HEIGHT,style:{border:`${L}px solid ${I}`,backgroundColor:N,borderRadius:10,paddingLeft:10},children:jsxRuntimeExports.jsxs("div",{style:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",cursor:"pointer"},children:[jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexWrap:"nowrap",maxWidth:TREE_NODE_WIDTH*2/3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginRight:10},children:[jsxRuntimeExports.jsx(Badge$2,{appearance:"outline",children:`${(B=C.attributes)==null?void 0:B.span_type}`.split(".").pop()}),jsxRuntimeExports.jsx(Tooltip$1,{content:C.name??"",relationship:"label",children:jsxRuntimeExports.jsx("span",{style:{marginLeft:4},children:`${C.name}`})})]}),jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexWrap:"nowrap",paddingRight:10,gap:tokens.spacingHorizontalS},children:[((F=(j=C==null?void 0:C.status)==null?void 0:j.status_code)==null?void 0:F.toLowerCase())==="error"&&jsxRuntimeExports.jsx(StatusText,{statusCode:(V=C.status)==null?void 0:V.status_code,tooltipContent:C.status.message}),jsxRuntimeExports.jsx(NodeToken,{span:C}),jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:C.start_time,endTimeISOString:C.end_time})]})]})})};class NodeConfig{constructor(C){this.options=C}render(C){const R=this.options.spans.find(O=>{var I;return((I=O==null?void 0:O.context)==null?void 0:I.span_id)===C.model.id});return R?jsxRuntimeExports.jsx(TreeNode,{node:C.model,span:R}):null}getMinHeight(){return 0}getMinWidth(){return 0}}const TreeView=()=>{const S=useSpansOfSelectedTrace(),C=useSetSelectedSpanId(),R=useRootSpanIdOfSelectedSpans(),O=useSelectedSpanId(),I=F=>(V,K)=>(K&&K.type===GraphNodeEvent.Click&&C(K.node.id),F(V,K)),N=GraphConfigBuilder.default().registerNode(()=>new NodeConfig({spans:S})).registerPort(()=>new PortConfig).registerEdge(()=>new EdgeConfig).build(),L=previewMode;L.add(GraphFeatures.ClickNodeToSelect),L.add(GraphFeatures.CanvasVerticalScrollable);const[B,j]=useGraphReducer({data:GraphModel.empty(),settings:{features:L,graphConfig:N}},I);return reactExports.useEffect(()=>{R&&(j({type:GraphCanvasEvent.SetData,data:spansToGraphModel(S,{rootSpanId:R}).selectNodes(F=>F.id===R)}),C(R))},[]),reactExports.useEffect(()=>{O&&j({type:GraphNodeEvent.Select,nodes:[O]})},[O]),jsxRuntimeExports.jsx(TreeGraph,{state:B,dispatch:j})},TraceDetail=()=>{const S=useClasses$6(),C=useSelectedSpanId(),R=reactExports.useRef(null),O=useTraceDetailRefreshKey(),I=useIsGanttChartOpen(),N=useTraceDetailViewStatus(),L=useTraceDetailLoadingComponent(),B=useTraceDetailErrorComponent(),j=useLocStrings();return reactExports.useEffect(()=>{var F;I&&((F=R.current)==null||F.updateSize({height:400,width:"100%"}))},[I]),N===ViewStatus.error?jsxRuntimeExports.jsx(B,{}):N===ViewStatus.loading?jsxRuntimeExports.jsx(L,{}):jsxRuntimeExports.jsxs("div",{className:S.root,children:[jsxRuntimeExports.jsxs("div",{className:S.container,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(TraceDetailMetrics,{},O),jsxRuntimeExports.jsx(Divider$2,{})]}),jsxRuntimeExports.jsxs("div",{className:S.content,children:[jsxRuntimeExports.jsx(Resizable,{enable:{right:!0},minWidth:100,maxWidth:"60%",defaultSize:{width:TREE_NODE_WIDTH+2*TREE_NODE_INDENT+32,height:"100%"},handleComponent:{right:jsxRuntimeExports.jsx("div",{className:S.resizeBar})},children:jsxRuntimeExports.jsx("div",{className:S.leftPane,children:jsxRuntimeExports.jsx(TreeView,{},O)})}),jsxRuntimeExports.jsx("div",{className:S.rightPane,children:jsxRuntimeExports.jsx(NodeDetail,{emptyTip:jsxRuntimeExports.jsx(MessageBar,{intent:"error",children:j.No_span_data})},O)},`${C}`)]})]}),I&&jsxRuntimeExports.jsx("div",{className:S.bottomPane,children:jsxRuntimeExports.jsx(Resizable,{ref:R,className:S.ganttContainer,defaultSize:{height:0,width:"100%"},enable:{top:!0},handleComponent:{top:jsxRuntimeExports.jsx("div",{className:S.resizeBarBottom})},children:jsxRuntimeExports.jsx(GanttView,{},O)})})]})},useClasses$6=makeStyles({root:{width:"100%",height:"100%"},container:{display:"flex",flexDirection:"column",height:"100%",width:"100%"},summary:{display:"flex",alignItems:"stretch",height:"48px",width:"100%",...shorthands.margin("16px"),...shorthands.gap("1rem")},content:{...shorthands.flex(1),display:"flex"},leftPane:{height:"100%",...shorthands.margin("16px",0,0,"16px")},rightPane:{position:"relative",width:"100%",height:"100%",...shorthands.flex(1),...shorthands.overflow("hidden")},bottomPane:{position:"absolute",backgroundColor:tokens.colorNeutralBackground1,bottom:0,width:"100%"},ganttContainer:{...shorthands.padding("16px")},resizeBar:{position:"absolute",top:0,bottom:0,right:"5px",width:"6px",backgroundColor:tokens.colorNeutralBackground3,"::before":{content:"''",position:"absolute",top:"50%",right:"1px",marginTop:"-12px",height:"24px",width:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed},"::after":{content:"''",position:"absolute",top:"50%",left:"1px",marginTop:"-12px",height:"24px",width:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed}},resizeBarBottom:{position:"absolute",left:0,right:0,bottom:"5px",height:"6px",backgroundColor:tokens.colorNeutralBackground3,"::before":{content:"''",position:"absolute",left:"50%",bottom:"1px",marginLeft:"-12px",width:"24px",height:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed},"::after":{content:"''",position:"absolute",left:"50%",top:"1px",marginLeft:"-12px",width:"24px",height:"1px",backgroundColor:tokens.colorNeutralBackground3Pressed}}}),useClasses$5=makeStyles({title:{...shorthands.flex(1),...shorthands.padding("8px","16px"),lineHeight:"28px",fontSize:"18px",fontWeight:600}}),TraceDetailTitle=()=>{const S=useClasses$5(),C=useLocStrings(),R=useSelectedTrace();return jsxRuntimeExports.jsx("div",{className:S.title,children:(R==null?void 0:R.name)??C.Trace_Detail})},TraceFilter=()=>{const S=useClasses$4(),C=useTableColumnNames(),[R,O]=[useTableHiddenColumnNames(),useSetTableHiddenColumnNames()],I=reactExports.useMemo(()=>[...C.normalColumns,...C.evaluationColumns].filter(B=>!R.includes(B)),[R,C]),N=(L,B)=>{const{optionText:j}=B;j&&O(R.includes(j)?R.filter(F=>F!==j):[...R,j])};return jsxRuntimeExports.jsxs("div",{className:S.wrapper,children:[jsxRuntimeExports.jsx(Input,{className:S.filter,disabled:!0,placeholder:"NOT implement yet"}),jsxRuntimeExports.jsxs(Combobox,{className:S.chooser,multiselect:!0,placeholder:"Columns Filter",selectedOptions:I,onOptionSelect:N,children:[jsxRuntimeExports.jsx(OptionGroup,{label:"Trace Info",children:C.normalColumns.map(L=>jsxRuntimeExports.jsx(Option$2,{children:L},L))}),jsxRuntimeExports.jsx(OptionGroup,{label:"Metrics",children:C.evaluationColumns.map(L=>jsxRuntimeExports.jsx(Option$2,{children:L},L))})]})]})},useClasses$4=makeStyles({wrapper:{display:"flex",...shorthands.gap("1rem"),...shorthands.margin(tokens.spacingVerticalM)},filter:{flexGrow:1},chooser:{width:"100px"}}),useOnClickTraceRow=()=>{const S=useSetSelectedTraceId();return(C,R)=>{S(C==null?void 0:C.trace_id)}},useTraceListRows=()=>useTraces().map(C=>convertToTraceListRow(C)),useColumns=()=>{const S=useClasses$3(),C=useTraceListRows(),R=useOnClickTraceRow(),O=useSetTableColumnNames(),I=useTableHiddenColumnNames(),N=useLocStrings(),L=reactExports.useMemo(()=>{const j=[];return C.forEach(F=>{Object.entries(F.evaluations??{}).forEach(([V,K])=>{!j.includes(V)&&K.display_name&&j.push(K.display_name)})}),j.map(F=>{const V=[],K=[];return C.forEach(W=>{var oe;const X=(oe=W.evaluations)==null?void 0:oe[F];if(!X||!X.outputs)return;const J=X.outputs;Object.keys(J).forEach(pe=>{const me=J[pe];!V.includes(pe)&&me!==null&&(V.push(pe),K.push({key:`evaluation-${F}-${pe}-value`,name:pe,renderCell:({row:xe})=>{var Te,we,ke;let Ae;const ge=(ke=(we=(Te=xe==null?void 0:xe.evaluations)==null?void 0:Te[F])==null?void 0:we.outputs)==null?void 0:ke[pe];return ge===void 0?Ae="N/A":typeof ge=="number"?Ae=formatNumber(ge):Ae=`${ge}`,Ae}}))})}),{name:F,children:K}})},[C]);return reactExports.useMemo(()=>{const j=[{key:"kind",name:N.Kind,minWidth:150,maxWidth:300,renderCell:({row:K})=>jsxRuntimeExports.jsx(KindText,{kind:K.kind})},{key:"name",name:N.Name,minWidth:200,maxWidth:300,renderCell:({row:K})=>jsxRuntimeExports.jsx(Tooltip$1,{content:K.name??"",relationship:"label",children:jsxRuntimeExports.jsx("span",{className:S.nameCell,title:K.name,onClick:()=>{R(K,"name")},children:K.name})})},{key:"input",name:N.Input,minWidth:200,renderCell:({row:K})=>jsxRuntimeExports.jsx(TraceListJsonCell,{jsonObject:K.inputs})},{key:"output",name:N.Output,minWidth:200,renderCell:({row:K})=>jsxRuntimeExports.jsx(TraceListJsonCell,{jsonObject:K.outputs})},{key:"start_time",name:N.Start_time,minWidth:150,maxWidth:300,renderCell:({row:K})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:K.start_time})})},{key:"end_time",name:N.End_time,minWidth:150,maxWidth:300,renderCell:({row:K})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(TimeText,{time:K.end_time})})},{key:"latency",name:N.Latency,minWidth:120,renderCell:({row:K})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(LatencyText,{startTimeISOString:K.start_time,endTimeISOString:K.end_time})})},{key:"total_tokens",name:N.Total_tokens,minWidth:120,renderCell:({row:K})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(SummaryToken,{trace:K})})},{key:"status",name:N.Status,minWidth:120,renderCell:({row:K})=>jsxRuntimeExports.jsx(CellWrapper,{children:jsxRuntimeExports.jsx(StatusText,{statusCode:K.status})})}];O({normalColumns:j.map(K=>K.name).filter(K=>!UN_FILTERABLE_COLUMNS.includes(K)),evaluationColumns:L.map(K=>K.name)});const F=j.filter(K=>!I.includes(K.name)),V=L.filter(K=>!I.includes(K.name));return[...F,{key:"evaluations",name:"Metrics",minWidth:450,children:V}]},[S.nameCell,L,I,R,O])},useClasses$3=makeStyles({typeBadge:{...shorthands.padding(tokens.spacingVerticalXXS,tokens.spacingHorizontalS)},latencyWrapper:{display:"flex",flexDirection:"row",alignItems:"center",justifyItems:"center","> svg":{marginRight:"5px"}},nameCell:{color:tokens.colorBrandForeground1,fontWeight:tokens.fontWeightSemibold,":hover":{...shorthands.textDecoration("underline")}}}),UN_FILTERABLE_COLUMNS=["Kind","Name"];function TraceList({onRowClick:S,className:C}){const R=useClasses$2(),O=useColumns(),I=useTraceListRows(),N=useTraceListViewStatus(),L=useTraceListLoadingComponent(),B=useTraceListErrorComponent(),j=useIsDark(),F=useOnClickTraceRow(),V=reactExports.useCallback(K=>{const{row:W,column:X}=K;F(W,X.key),S==null||S(W)},[F,S]);return N===ViewStatus.error?jsxRuntimeExports.jsx(B,{}):N===ViewStatus.loading?jsxRuntimeExports.jsx(L,{}):jsxRuntimeExports.jsx(DataGrid$1$1,{className:`${R.grid} ${C??""} ${j?"rdg-dark":"rdg-light"}`,renderers:{noRowsFallback:jsxRuntimeExports.jsxs("div",{style:{textAlign:"center",gridColumn:"1/-1",display:"flex",alignItems:"center",justifyContent:"center"},children:[jsxRuntimeExports.jsx(TextBulletListSquareWarning24Regular,{}),jsxRuntimeExports.jsx(Text$2,{style:{paddingLeft:"1rem"},children:"No traces found."})]})},rowClass:()=>R.row,columns:O,rows:I,headerRowHeight:26,rowHeight:80,onCellClick:V,defaultColumnOptions:{resizable:!0}})}const useClasses$2=makeStyles({grid:{},row:{cursor:"pointer"}}),DefaultDetailContainer=({isOpen:S,setIsOpen:C,header:R=null,content:O})=>jsxRuntimeExports.jsxs(OverlayDrawer,{position:"end",style:{width:"calc(100% - 160px)"},open:S,onOpenChange:(I,N)=>C(N.open),children:[R,jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"calc(100vh - 40px)"},children:O})]}),defaultLocStrings=new Proxy({},{get:(S,C)=>C.replace(/_/g," ")}),RegistryWrapper=createRegistry({name:"TraceView"}),TraceView=({viewModel:S,styles:C,DetailContainer:R=DefaultDetailContainer,showFilter:O=!0,showGantt:I=!0,onRowClick:N,TraceDetailError:L,TraceDetailLoading:B,TraceListError:j,TraceListLoading:F,isDark:V=!1,locStrings:K=defaultLocStrings})=>{const W=useClasses$1(),X=useState(S.isTraceDetailOpen$),J=useSetState(S.isTraceDetailOpen$),oe=React.useCallback(pe=>{pe.register(TraceViewModelToken,{useValue:S}),F&&pe.register(traceListLoadingInjectionToken,{useValue:F}),j&&pe.register(traceListErrorInjectionToken,{useValue:j}),B&&pe.register(traceDetailLoadingInjectionToken,{useValue:B}),L&&pe.register(traceDetailErrorInjectionToken,{useValue:L}),K&&pe.register(locStringsInjectionToken,{useValue:K})},[]);return jsxRuntimeExports.jsx(TraceViewThemeContext.Provider,{value:V,children:jsxRuntimeExports.jsxs(RegistryWrapper,{onInitialize:oe,children:[jsxRuntimeExports.jsxs("div",{className:mergeClasses(W.wrapper,C==null?void 0:C.wrapper),children:[O?jsxRuntimeExports.jsx(TraceFilter,{}):null,jsxRuntimeExports.jsx(TraceList,{className:W.grid,onRowClick:pe=>{N!=null&&N(pe)||J(!0)}})]}),jsxRuntimeExports.jsx(R,{isOpen:X,setIsOpen:J,header:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:W.header,children:[jsxRuntimeExports.jsx(TraceDetailTitle,{}),I?jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Close",icon:jsxRuntimeExports.jsx(GanttChart20Regular,{}),onClick:()=>S.toggleIsGanttChartOpen()}):null,jsxRuntimeExports.jsx(Button$2,{appearance:"subtle","aria-label":"Close",icon:jsxRuntimeExports.jsx(Dismiss24Regular,{}),onClick:()=>J(!1)})]}),jsxRuntimeExports.jsx(Divider$2,{})]}),content:jsxRuntimeExports.jsx(TraceDetail,{})})]})})},useClasses$1=makeStyles({header:{display:"flex",width:"100%"},wrapper:{display:"flex",flexDirection:"column",height:"100%"},divider:{flexGrow:0,...shorthands.margin("16px",0)},grid:{flexGrow:1}}),URL_PREFIX="",TraceViewApp=()=>{const[S,C]=reactExports.useState(!1),[R,O]=reactExports.useState(void 0),[I,N]=reactExports.useState(!0),[L,B]=reactExports.useState(void 0),j=useClasses(),F=React.useMemo(()=>new TraceViewModel,[]);return reactExports.useEffect(()=>{const V=window.matchMedia("(prefers-color-scheme: dark)");C(V.matches);const K=W=>{C(W.matches)};return V.addEventListener("change",K),()=>{V.removeEventListener("change",K)}},[]),reactExports.useEffect(()=>{F.traceDetailDidOpen(V=>{const K=F.getTraceById(V);if(!K)return;const W=[V,...Object.values(K.evaluations??[]).map(X=>X.trace_id)];F.setTraceDetailStatus(ViewStatus.loading),fetch(`${URL_PREFIX}/v1.0/Spans/list?trace_ids=${W.join(",")}`).then(X=>X.json()).then(X=>{F.appendSpans(X),F.setTraceDetailStatus(ViewStatus.loaded)}).catch(X=>{console.error("Error:",X),F.setTraceDetailStatus(ViewStatus.error)})})},[F]),reactExports.useEffect(()=>{I&&F.setTraceListStatus(ViewStatus.loading);const V=()=>{if(R===void 0)return;const W=R?`?${R}`:"";fetch(`${URL_PREFIX}/v1.0/LineRuns/list${W}`).then(async X=>{const J=await X.json();if(!J)return null;const oe=getSummariesSignature(J);return L===void 0||oe!==L?(B(oe),J):null}).then(X=>{X&&(F.traces$.clear(),F.appendTraces(X))}).catch(X=>{F.setTraceListStatus(ViewStatus.error),F.appendTraces([]),console.error("Error:",X)}).finally(()=>{I&&(N(!1),F.setTraceListStatus(ViewStatus.loaded))})};V();const K=setInterval(V,1e4);return()=>{clearInterval(K)}},[R,L]),reactExports.useEffect(()=>{function V(){const W=new URL(window.location.href).search.substring(1);O(W)}return V(),window.addEventListener("popstate",V),()=>{window.removeEventListener("popstate",V)}},[]),jsxRuntimeExports.jsxs(FluentProvider,{theme:S?webDarkTheme:webLightTheme,style:{height:"100%",width:"100%"},children:[jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:` - html, - body { - height: 100%; - width: 100%; - padding: 0; - margin: 0; - box-sizing: border-box; - overflow: hidden; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", - "Droid Sans", "Helvetica Neue", sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - } - - #root { - height: 100%; - width: 100%; - display: flex; - } - `}}),jsxRuntimeExports.jsx("div",{className:j.wrapper,children:jsxRuntimeExports.jsx(TraceView,{viewModel:F,isDark:S,styles:{wrapper:j.traceViewWrapper}})})]})},useClasses=makeStyles({wrapper:{display:"flex",flexDirection:"column",height:"100%"},traceViewWrapper:{display:"flex",flexDirection:"column",height:"100%",width:"100%",flexGrow:1}});client.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(TraceViewApp,{}));var LexicalLink_prod={},LexicalUtils_prod={},LexicalSelection_prod={},Lexical_prod={},hasRequiredLexical_prod;function requireLexical_prod(){if(hasRequiredLexical_prod)return Lexical_prod;hasRequiredLexical_prod=1;let S={},C={},R={},O={},I={},N={},L={},B={},j={},F={},V={},K={},W={},X={},J={},oe={},pe={},me={},xe={},Ae={},ge={},Te={},we={},ke={},Be={},Ie={},je={},Ke={},Je={},Xe={},ot={},tt={},Ue={},et={},dt={},gt={};function Qe(Le){let ye=new URLSearchParams;ye.append("code",Le);for(let Ne=1;Ne{let ye=Co();return ye!==null?ye.clone():null})}function sr(Le,ye,Ne){Tn=!0;let Ye=100{let st=Co()||mr(Le);var ft=new Map,vt=Le.getRootElement(),Bt=Le._editorState,er=Le._blockCursorElement;let br=!1,dn="";for(var yn=0;yn{sr(Le,ye,Ne)})}function Ir(Le,ye){let Ne=Le.__mode,Ye=Le.__format;Le=Le.__style;let st=ye.__mode,ft=ye.__format;return ye=ye.__style,(Ne===null||Ne===st)&&(Ye===null||Ye===ft)&&(Le===null||Le===ye)}function jr(Le,ye){let Ne=Le.mergeWithSibling(ye),Ye=Ni()._normalizedNodes;return Ye.add(Le.__key),Ye.add(ye.__key),Ne}function Rr(Le){if(Le.__text===""&&Le.isSimpleText()&&!Le.isUnmergeable())Le.remove();else{for(var ye;(ye=Le.getPreviousSibling())!==null&&Jn(ye)&&ye.isSimpleText()&&!ye.isUnmergeable();)if(ye.__text==="")ye.remove();else{Ir(ye,Le)&&(Le=jr(ye,Le));break}for(var Ne;(Ne=Le.getNextSibling())!==null&&Jn(Ne)&&Ne.isSimpleText()&&!Ne.isUnmergeable();)if(Ne.__text==="")Ne.remove();else{Ir(Le,Ne)&&jr(Le,Ne);break}}}function fr(Le){return Or(Le.anchor),Or(Le.focus),Le}function Or(Le){for(;Le.type==="element";){var ye=Le.getNode(),Ne=Le.offset;if(Ne===ye.getChildrenSize()?(ye=ye.getChildAtIndex(Ne-1),Ne=!0):(ye=ye.getChildAtIndex(Ne),Ne=!1),Jn(ye)){Le.set(ye.__key,Ne?ye.getTextContentSize():0,"text");break}else if(!an(ye))break;Le.set(ye.__key,Ne?ye.getChildrenSize():0,"element")}}let Jr=1,nn=typeof queueMicrotask=="function"?queueMicrotask:Le=>{Promise.resolve().then(Le)};function hn(Le){let ye=document.activeElement;if(ye===null)return!1;let Ne=ye.nodeName;return Fi(wn(Le))&&(Ne==="INPUT"||Ne==="TEXTAREA"||ye.contentEditable==="true"&&ye.__lexicalEditor==null)}function Gn(Le,ye,Ne){let Ye=Le.getRootElement();try{return Ye!==null&&Ye.contains(ye)&&Ye.contains(Ne)&&ye!==null&&!hn(ye)&&Zn(ye)===Le}catch{return!1}}function Zn(Le){for(;Le!=null;){let ye=Le.__lexicalEditor;if(ye!=null)return ye;Le=un(Le)}return null}function Eo(Le){return Le.isToken()||Le.isSegmented()}function vo(Le){for(;Le!=null;){if(Le.nodeType===3)return Le;Le=Le.firstChild}return null}function Fo(Le,ye,Ne){let Ye=wr[ye];return Ne!==null&&(Le&Ye)===(Ne&Ye)||(Le^=Ye,ye==="subscript"?Le&=~wr.superscript:ye==="superscript"&&(Le&=~wr.subscript)),Le}function Ln(Le,ye){if(ye!=null)Le.__key=ye;else{Ha(),99Go().getTextContent())}function ca(Le,ye){ml(Le,()=>{var Ne=Yi();if(!Ne.isEmpty())if(ye==="root")Go().markDirty();else{Ne=Ne._nodeMap;for(let[,Ye]of Ne)Ye.markDirty()}},Le._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Go(){return Yi()._nodeMap.get("root")}function di(Le){Ha();let ye=Yi();Le!==null&&(Le.dirty=!0,Le.setCachedNodes(null)),ye._selection=Le}function Qi(Le){var ye=Ni(),Ne;e:{for(Ne=Le;Ne!=null;){let Ye=Ne[`__lexicalKey_${ye._key}`];if(Ye!==void 0){Ne=Ye;break e}Ne=un(Ne)}Ne=null}return Ne===null?(ye=ye.getRootElement(),Le===ye?fo("root"):null):fo(Ne)}function Oa(Le){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(Le)}function gs(Le){let ye=[];for(;Le!==null;)ye.push(Le),Le=Le._parentEditor;return ye}function Dt(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function St(Le,ye,Ne){if(ye=mi(ye._window),ye!==null){var Ye=ye.anchorNode,{anchorOffset:st,focusOffset:ft}=ye;if(Ye!==null&&(ye=Ye.nodeType===3?Ye.nodeValue:null,Ye=wn(Ye),ye!==null&&Jn(Ye))){if(ye===Ht&&Ne){let vt=Ne.length;ye=Ne,ft=st=vt}ye!==null&&wt(Ye,ye,st,ft,Le)}}}function wt(Le,ye,Ne,Ye,st){let ft=Le;if(ft.isAttached()&&(st||!ft.isDirty())){let br=ft.isComposing(),dn=ye;if((br||st)&&ye[ye.length-1]===Ht&&(dn=ye.slice(0,-1)),ye=ft.getTextContent(),st||dn!==ye)if(dn==="")if(ao(null),Gt||Pt||It)ft.remove();else{let yn=Ni();setTimeout(()=>{yn.update(()=>{ft.isAttached()&&ft.remove()})},20)}else{st=ft.getParent(),ye=za();var vt=ft.getTextContentSize(),Bt=zo(),er=ft.getKey();ft.isToken()||Bt!==null&&er===Bt&&!br||Wo(ye)&&(st!==null&&!st.canInsertTextBefore()&&ye.anchor.offset===0||ye.anchor.key===Le.__key&&ye.anchor.offset===0&&!ft.canInsertTextBefore()&&!br||ye.focus.key===Le.__key&&ye.focus.offset===vt&&!ft.canInsertTextAfter()&&!br)?ft.markDirty():(Le=Co(),Wo(Le)&&Ne!==null&&Ye!==null&&(Le.setTextNodeRange(ft,Ne,ft,Ye),ft.isSegmented()&&(Ne=ft.getTextContent(),Ne=ys(Ne),ft.replace(Ne),ft=Ne)),ft.setTextContent(dn))}}}function yt(Le,ye){if(ye.isSegmented())return!0;if(!Le.isCollapsed())return!1;Le=Le.anchor.offset;let Ne=ye.getParentOrThrow(),Ye=ye.isToken();return Le===0?((Le=!ye.canInsertTextBefore()||!Ne.canInsertTextBefore()||Ye)||(ye=ye.getPreviousSibling(),Le=(Jn(ye)||an(ye)&&ye.isInline())&&!ye.canInsertTextAfter()),Le):Le===ye.getTextContentSize()?!ye.canInsertTextAfter()||!Ne.canInsertTextAfter()||Ye:!1}function Rt(Le,ye){Le.__lexicalClassNameCache===void 0&&(Le.__lexicalClassNameCache={});let Ne=Le.__lexicalClassNameCache,Ye=Ne[ye];return Ye!==void 0?Ye:(Le=Le[ye],typeof Le=="string"?(Le=Le.split(" "),Ne[ye]=Le):Le)}function Nt(Le,ye,Ne,Ye,st){Ne.size!==0&&(Ne=Ye.__type,Ye=Ye.__key,ye=ye.get(Ne),ye===void 0&&Qe(33,Ne),Ne=ye.klass,ye=Le.get(Ne),ye===void 0&&(ye=new Map,Le.set(Ne,ye)),Le=ye.get(Ye),Ne=Le==="destroyed"&&st==="created",(Le===void 0||Ne)&&ye.set(Ye,Ne?"updated":st))}function Yt(Le,ye,Ne){let Ye=Le.getParent(),st=Ne;return Ye!==null&&(ye&&Ne===0?(st=Le.getIndexWithinParent(),Le=Ye):ye||Ne!==Le.getChildrenSize()||(st=Le.getIndexWithinParent()+1,Le=Ye)),Le.getChildAtIndex(ye?st-1:st)}function lr(Le,ye){var Ne=Le.offset;return Le.type==="element"?(Le=Le.getNode(),Yt(Le,ye,Ne)):(Le=Le.getNode(),ye&&Ne===0||!ye&&Ne===Le.getTextContentSize()?(Ne=ye?Le.getPreviousSibling():Le.getNextSibling(),Ne===null?Yt(Le.getParentOrThrow(),ye,Le.getIndexWithinParent()+(ye?0:1)):Ne):null)}function vr(Le){return Le=(Le=In(Le).event)&&Le.inputType,Le==="insertFromPaste"||Le==="insertFromPasteAsQuotation"}function Qt(Le){return!Bs(Le)&&!Le.isLastChild()&&!Le.isInline()}function Ar(Le,ye){return Le=Le._keyToDOMMap.get(ye),Le===void 0&&Qe(75,ye),Le}function un(Le){return Le=Le.assignedSlot||Le.parentElement,Le!==null&&Le.nodeType===11?Le.host:Le}function po(Le,ye){for(Le=Le.getParent();Le!==null;){if(Le.is(ye))return!0;Le=Le.getParent()}return!1}function In(Le){return Le=Le._window,Le===null&&Qe(78),Le}function xo(Le){for(Le=Le.getParentOrThrow();Le!==null&&!Vn(Le);)Le=Le.getParentOrThrow();return Le}function Vn(Le){return Bs(Le)||an(Le)&&Le.isShadowRoot()}function Ro(Le){return Le=Le.constructor.clone(Le),Ln(Le,null),Le}function Nn(Le){var ye=Ni();let Ne=Le.constructor.getType();return ye=ye._nodes.get(Ne),ye===void 0&&Qe(97),ye=ye.replace,ye!==null?(ye=ye(Le),ye instanceof Le.constructor||Qe(98),ye):Le}function so(Le,ye){Le=Le.getParent(),!Bs(Le)||an(ye)||Fi(ye)||Qe(99)}function Ei(Le){return(Fi(Le)||an(Le)&&!Le.canBeEmpty())&&!Le.isInline()}function Ji(Le,ye,Ne){Ne.style.removeProperty("caret-color"),ye._blockCursorElement=null,ye=Le.parentElement,ye!==null&&ye.removeChild(Le)}function mi(Le){return lt?(Le||window).getSelection():null}function ks(Le){return Le.nodeType===1}function Li(Le){if(Fi(Le)&&!Le.isInline())return!0;if(!an(Le)||Vn(Le))return!1;var ye=Le.getFirstChild();return ye=ye===null||ya(ye)||Jn(ye)||ye.isInline(),!Le.isInline()&&Le.canBeEmpty()!==!1&&ye}function hl(Le,ye){for(;Le!==null&&Le.getParent()!==null&&!ye(Le);)Le=Le.getParentOrThrow();return ye(Le)?Le:null}function Is(Le,ye,Ne,Ye,st,ft){for(Le=Le.getFirstChild();Le!==null;){let vt=Le.__key;Le.__parent===ye&&(an(Le)&&Is(Le,vt,Ne,Ye,st,ft),Ne.has(vt)||ft.delete(vt),st.push(vt)),Le=Le.getNextSibling()}}function ea(Le,ye,Ne,Ye){Le=Le._nodeMap,ye=ye._nodeMap;let st=[];for(let[ft]of Ye){let vt=ye.get(ft);vt===void 0||vt.isAttached()||(an(vt)&&Is(vt,ft,Le,ye,st,Ye),Le.has(ft)||Ye.delete(ft),st.push(ft))}for(let ft of st)ye.delete(ft);for(let ft of Ne)Ye=ye.get(ft),Ye===void 0||Ye.isAttached()||(Le.has(ft)||Ne.delete(ft),ye.delete(ft))}let fi="",aa="",ta="",$a,ii,ts,as=!1,Ns=!1,Ds,ga=null,vs,Xl,Qn,va,ma,Ys;function Ms(Le,ye){let Ne=Qn.get(Le);if(ye!==null){let Ye=ss(Le);Ye.parentNode===ye&&ye.removeChild(Ye)}va.has(Le)||ii._keyToDOMMap.delete(Le),an(Ne)&&(Le=Ki(Ne,Qn),Qo(Le,0,Le.length-1,null)),Ne!==void 0&&Nt(Ys,ts,Ds,Ne,"destroyed")}function Qo(Le,ye,Ne,Ye){for(;ye<=Ne;++ye){let st=Le[ye];st!==void 0&&Ms(st,Ye)}}function Ls(Le,ye){Le.setProperty("text-align",ye)}function Ol(Le,ye){var Ne=$a.theme.indent;if(typeof Ne=="string"){let Ye=Le.classList.contains(Ne);0ye&&Ye&&Le.classList.remove(Ne)}Ne=getComputedStyle(Le).getPropertyValue("--lexical-indent-base-value")||"40px",Le.style.setProperty("padding-inline-start",ye===0?"":`calc(${ye} * ${Ne})`)}function qn(Le,ye){Le=Le.style,ye===0?Ls(Le,""):ye===1?Ls(Le,"left"):ye===2?Ls(Le,"center"):ye===3?Ls(Le,"right"):ye===4?Ls(Le,"justify"):ye===5?Ls(Le,"start"):ye===6&&Ls(Le,"end")}function Xs(Le,ye,Ne){let Ye=va.get(Le);Ye===void 0&&Qe(60);let st=Ye.createDOM($a,ii);var ft=ii._keyToDOMMap;if(st["__lexicalKey_"+ii._key]=Le,ft.set(Le,st),Jn(Ye)?st.setAttribute("data-lexical-text","true"):Fi(Ye)&&st.setAttribute("data-lexical-decorator","true"),an(Ye)){if(Le=Ye.__indent,ft=Ye.__size,Le!==0&&Ol(st,Le),ft!==0){--ft,Le=Ki(Ye,va);var vt=aa;aa="",yi(Le,Ye,0,ft,st,null),Zl(Ye,st),aa=vt}Le=Ye.__format,Le!==0&&qn(st,Le),Ye.isInline()||Ya(null,Ye,st),Qt(Ye)&&(fi+=` - -`,ta+=` - -`)}else ft=Ye.getTextContent(),Fi(Ye)?(vt=Ye.decorate(ii,$a),vt!==null&&Ku(Le,vt),st.contentEditable="false"):Jn(Ye)&&(Ye.isDirectionless()||(aa+=ft)),fi+=ft,ta+=ft;return ye!==null&&(Ne!=null?ye.insertBefore(st,Ne):(Ne=ye.__lexicalLineBreak,Ne!=null?ye.insertBefore(st,Ne):ye.appendChild(st))),Nt(Ys,ts,Ds,Ye,"created"),st}function yi(Le,ye,Ne,Ye,st,ft){let vt=fi;for(fi="";Ne<=Ye;++Ne)Xs(Le[Ne],st,ft);Qt(ye)&&(fi+=` - -`),st.__lexicalTextContent=fi,fi=vt+fi}function Zs(Le,ye){return Le=ye.get(Le),ya(Le)||Fi(Le)&&Le.isInline()}function Ya(Le,ye,Ne){Le=Le!==null&&(Le.__size===0||Zs(Le.__last,Qn)),ye=ye.__size===0||Zs(ye.__last,va),Le?ye||(ye=Ne.__lexicalLineBreak,ye!=null&&Ne.removeChild(ye),Ne.__lexicalLineBreak=null):ye&&(ye=document.createElement("br"),Ne.__lexicalLineBreak=ye,Ne.appendChild(ye))}function Zl(Le,ye){var Ne=ye.__lexicalDir;if(ye.__lexicalDirTextContent!==aa||Ne!==ga){let ft=aa==="";if(ft)var Ye=ga;else Ye=aa,Ye=Kt.test(Ye)?"rtl":tr.test(Ye)?"ltr":null;if(Ye!==Ne){let vt=ye.classList,Bt=$a.theme;var st=Ne!==null?Bt[Ne]:void 0;let er=Ye!==null?Bt[Ye]:void 0;st!==void 0&&(typeof st=="string"&&(st=st.split(" "),st=Bt[Ne]=st),vt.remove(...st)),Ye===null||ft&&Ye==="ltr"?ye.removeAttribute("dir"):(er!==void 0&&(typeof er=="string"&&(Ne=er.split(" "),er=Bt[Ye]=Ne),er!==void 0&&vt.add(...er)),ye.dir=Ye),Ns||(Le.getWritable().__dir=Ye)}ga=Ye,ye.__lexicalDirTextContent=aa,ye.__lexicalDir=Ye}}function Ki(Le,ye){let Ne=[];for(Le=Le.__first;Le!==null;){let Ye=ye.get(Le);Ye===void 0&&Qe(101),Ne.push(Le),Le=Ye.__next}return Ne}function $i(Le,ye){var Ne=Qn.get(Le),Ye=va.get(Le);Ne!==void 0&&Ye!==void 0||Qe(61);var st=as||Xl.has(Le)||vs.has(Le);let ft=Ar(ii,Le);if(Ne===Ye&&!st)return an(Ne)?(Ye=ft.__lexicalTextContent,Ye!==void 0&&(fi+=Ye,ta+=Ye),Ye=ft.__lexicalDirTextContent,Ye!==void 0&&(aa+=Ye)):(Ye=Ne.getTextContent(),Jn(Ne)&&!Ne.isDirectionless()&&(aa+=Ye),ta+=Ye,fi+=Ye),ft;if(Ne!==Ye&&st&&Nt(Ys,ts,Ds,Ye,"updated"),Ye.updateDOM(Ne,ft,$a))return Ye=Xs(Le,null,null),ye===null&&Qe(62),ye.replaceChild(Ye,ft),Ms(Le,null),Ye;if(an(Ne)&&an(Ye)){if(Le=Ye.__indent,Le!==Ne.__indent&&Ol(ft,Le),Le=Ye.__format,Le!==Ne.__format&&qn(ft,Le),st){Le=aa,aa="",st=fi;var vt=Ne.__size,Bt=Ye.__size;if(fi="",vt===1&&Bt===1){var er=Ne.__first;if(ye=Ye.__first,er===ye)$i(er,ft);else{var br=ss(er);ye=Xs(ye,null,null),ft.replaceChild(ye,br),Ms(er,null)}}else{ye=Ki(Ne,Qn);var dn=Ki(Ye,va);if(vt===0)Bt!==0&&yi(dn,Ye,0,Bt-1,ft,null);else if(Bt===0)vt!==0&&(er=ft.__lexicalLineBreak==null,Qo(ye,0,vt-1,er?null:ft),er&&(ft.textContent=""));else{var yn=ye;ye=dn,dn=vt-1,vt=Bt-1;let Pr=ft.firstChild,$n=0;for(Bt=0;$n<=dn&&Bt<=vt;){var Wr=yn[$n];let Ao=ye[Bt];if(Wr===Ao)Pr=da($i(Ao,ft)),$n++,Bt++;else{er===void 0&&(er=new Set(yn)),br===void 0&&(br=new Set(ye));let Vo=br.has(Wr),Po=er.has(Ao);Vo?(Po?(Wr=Ar(ii,Ao),Wr===Pr?Pr=da($i(Ao,ft)):(Pr!=null?ft.insertBefore(Wr,Pr):ft.appendChild(Wr),$i(Ao,ft)),$n++):Xs(Ao,ft,Pr),Bt++):(Pr=da(ss(Wr)),Ms(Wr,ft),$n++)}}er=$n>dn,br=Bt>vt,er&&!br?(er=ye[vt+1],er=er===void 0?null:ii.getElementByKey(er),yi(ye,Ye,Bt,vt,ft,er)):br&&!er&&Qo(yn,$n,dn,ft)}}Qt(Ye)&&(fi+=` - -`),ft.__lexicalTextContent=fi,fi=st+fi,Zl(Ye,ft),aa=Le,Bs(Ye)||Ye.isInline()||Ya(Ne,Ye,ft)}Qt(Ye)&&(fi+=` - -`,ta+=` - -`)}else Ne=Ye.getTextContent(),Fi(Ye)?(st=Ye.decorate(ii,$a),st!==null&&Ku(Le,st)):Jn(Ye)&&!Ye.isDirectionless()&&(aa+=Ne),fi+=Ne,ta+=Ne;return!Ns&&Bs(Ye)&&Ye.__cachedText!==ta&&(Ye.getWritable().__cachedText=ta),ft}function Ku(Le,ye){let Ne=ii._pendingDecorators,Ye=ii._decorators;if(Ne===null){if(Ye[Le]===ye)return;Ne=cn(ii)}Ne[Le]=ye}function da(Le){return Le=Le.nextSibling,Le!==null&&Le===ii._blockCursorElement&&(Le=Le.nextSibling),Le}function ss(Le){let ye=ma.get(Le);return ye===void 0&&Qe(75,Le),ye}let Ur=Object.freeze({}),gn=[["keydown",Jo],["pointerdown",Et],["compositionstart",Xn],["compositionend",Io],["input",mn],["click",Oc],["cut",Ur],["copy",Ur],["dragstart",Ur],["dragover",Ur],["dragend",Ur],["paste",Ur],["focus",Ur],["blur",Ur],["drop",Ur]];Lt&&gn.push(["beforeinput",(Le,ye)=>Nr(Le,ye)]);let So=0,To=0,Kn=0,zn=null,ai=0,wi=!1,ra=!1,rs=!1,Xa=!1,Ql=[0,"",0,"root",0];function Jl(Le,ye,Ne,Ye,st){let ft=Le.anchor,vt=Le.focus,Bt=ft.getNode();var er=Ni();let br=mi(er._window),dn=br!==null?br.anchorNode:null,yn=ft.key;er=er.getElementByKey(yn);let Wr=Ne.length;return yn!==vt.key||!Jn(Bt)||(!st&&(!Lt||KnWr||Oa(Ne))&&ft.offset!==vt.offset&&!Bt.isComposing()||Eo(Bt)||Bt.isDirty()&&1{if(!Ne)di(null);else if(Gn(ye,Ye,ft)){var Bt=Co();if(Wo(Bt)){var er=Bt.anchor,br=er.getNode();if(Bt.isCollapsed()){Le.type==="Range"&&Le.anchorNode===Le.focusNode&&(Bt.dirty=!0);var dn=In(ye).event;dn=dn?dn.timeStamp:performance.now();let[Ao,Vo,Po,Xi,_s]=Ql;var yn=Go();yn=ye.isComposing()===!1&&yn.getTextContent()==="",dn<_s+200&&er.offset===Po&&er.key===Xi?(Bt.format=Ao,Bt.style=Vo):er.type==="text"?(Jn(br)||Qe(141),Bt.format=br.getFormat(),Bt.style=br.getStyle()):er.type!=="element"||yn||(Bt.format=0,Bt.style="")}else{var Wr=er.key,Pr=Bt.focus.key;er=Bt.getNodes(),br=er.length;var $n=Bt.isBackward();dn=$n?vt:st,yn=$n?st:vt;let Ao=$n?Pr:Wr;Wr=$n?Wr:Pr,Pr=255,$n=!1;for(let Vo=0;Vo{let Ne=Co();var Ye=mi(ye._window);let st=za();if(Ye)if(Wo(Ne)){let vt=Ne.anchor;var ft=vt.getNode();vt.type==="element"&&vt.offset===0&&Ne.isCollapsed()&&!Bs(ft)&&Go().getChildrenSize()===1&&ft.getTopLevelElementOrThrow().isEmpty()&&st!==null&&Ne.is(st)?(Ye.removeAllRanges(),Ne.dirty=!0):Le.detail!==3||Ne.isCollapsed()||(Ye=Ne.focus.getNode(),ft!==Ye&&(an(ft)?ft.select(0):ft.getParentOrThrow().select(0)))}else Le.pointerType==="touch"&&(ft=Ye.anchorNode,ft!==null&&(ft=ft.nodeType,ft===1||ft===3))&&(Ye=Yu(st,Ye,ye,Le),di(Ye));On(ye,C,Le)})}function Et(Le,ye){let Ne=Le.target;Le=Le.pointerType,Ne instanceof Node&&Le!=="touch"&&ml(ye,()=>{Fi(wn(Ne))||(ra=!0)})}function Zt(Le){return Le.getTargetRanges?(Le=Le.getTargetRanges(),Le.length===0?null:Le[0]):null}function $r(Le,ye){return Le!==ye||an(Le)||an(ye)||!Le.isToken()||!ye.isToken()}function Nr(Le,ye){let Ne=Le.inputType,Ye=Zt(Le);Ne==="deleteCompositionText"||$t&&vr(ye)||Ne!=="insertCompositionText"&&ml(ye,()=>{let st=Co();if(Ne==="deleteContentBackward"){if(st===null){var ft=za();if(!Wo(ft))return;di(ft.clone())}if(Wo(st)){Vt&&ao(st.anchor.key),To===229&&Le.timeStamp{ml(ye,()=>{ao(null)})},30),Wo(st)&&(ft=st.anchor.getNode(),ft.markDirty(),st.format=ft.getFormat(),Jn(ft)||Qe(142),st.style=ft.getStyle()),1>=st.anchor.getNode().getTextContent().length&&(Le.preventDefault(),On(ye,R,!0))):(ao(null),Le.preventDefault(),On(ye,R,!0));return}}if(Wo(st)){ft=Le.data,zn!==null&&St(!1,ye,zn),st.dirty&&zn===null||!st.isCollapsed()||Bs(st.anchor.getNode())||Ye===null||st.applyDOMRange(Ye),zn=null;var vt=st.focus,Bt=st.anchor.getNode();if(vt=vt.getNode(),Ne==="insertText"||Ne==="insertTranspose")ft===` -`?(Le.preventDefault(),On(ye,O,!1)):ft===` - -`?(Le.preventDefault(),On(ye,I,void 0)):ft==null&&Le.dataTransfer?(ft=Le.dataTransfer.getData("text/plain"),Le.preventDefault(),st.insertRawText(ft)):ft!=null&&Jl(st,Ye,ft,Le.timeStamp,!0)?(Le.preventDefault(),On(ye,N,ft)):zn=ft,Kn=Le.timeStamp;else switch(Le.preventDefault(),Ne){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":On(ye,N,Le);break;case"insertFromComposition":ao(null),On(ye,N,Le);break;case"insertLineBreak":ao(null),On(ye,O,!1);break;case"insertParagraph":ao(null),rs&&!Pt?(rs=!1,On(ye,O,!1)):On(ye,I,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":On(ye,L,Le);break;case"deleteByComposition":$r(Bt,vt)&&On(ye,B,Le);break;case"deleteByDrag":case"deleteByCut":On(ye,B,Le);break;case"deleteContent":On(ye,R,!1);break;case"deleteWordBackward":On(ye,j,!0);break;case"deleteWordForward":On(ye,j,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":On(ye,F,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":On(ye,F,!1);break;case"formatStrikeThrough":On(ye,V,"strikethrough");break;case"formatBold":On(ye,V,"bold");break;case"formatItalic":On(ye,V,"italic");break;case"formatUnderline":On(ye,V,"underline");break;case"historyUndo":On(ye,K,void 0);break;case"historyRedo":On(ye,W,void 0)}}})}function mn(Le,ye){Le.stopPropagation(),ml(ye,()=>{var Ne=Co(),Ye=Le.data,st=Zt(Le);if(Ye!=null&&Wo(Ne)&&Jl(Ne,st,Ye,Le.timeStamp,!1)){Xa&&(Pn(ye,Ye),Xa=!1);var ft=Ne.anchor,vt=ft.getNode();if(st=mi(ye._window),st===null)return;let Bt=ft.offset;(ft=Lt&&!Ne.isCollapsed()&&Jn(vt)&&st.anchorNode!==null)&&(vt=vt.getTextContent().slice(0,Bt)+Ye+vt.getTextContent().slice(Bt+Ne.focus.offset),st=st.anchorNode,ft=vt===(st.nodeType===3?st.nodeValue:null)),ft||On(ye,N,Ye),Ye=Ye.length,$t&&1{let Ne=Co();if(Wo(Ne)&&!ye.isComposing()){let Ye=Ne.anchor,st=Ne.anchor.getNode();ao(Ye.key),(Le.timeStamp{Pn(ye,Le.data)})}function Jo(Le,ye){if(So=Le.timeStamp,To=Le.keyCode,!ye.isComposing()){var{keyCode:Ne,shiftKey:Ye,ctrlKey:st,metaKey:ft,altKey:vt}=Le;if(!On(ye,X,Le)){if(Ne!==39||st||ft||vt)if(Ne!==39||vt||Ye||!st&&!ft)if(Ne!==37||st||ft||vt)if(Ne!==37||vt||Ye||!st&&!ft)if(Ne!==38||st||ft)if(Ne!==40||st||ft)if(Ne===13&&Ye)rs=!0,On(ye,ge,Le);else if(Ne===32)On(ye,Te,Le);else if(Ct&&st&&Ne===79)Le.preventDefault(),rs=!0,On(ye,O,!0);else if(Ne!==13||Ye){var Bt=Ct?vt||ft?!1:Ne===8||Ne===72&&st:st||vt||ft?!1:Ne===8;Bt?Ne===8?On(ye,we,Le):(Le.preventDefault(),On(ye,R,!0)):Ne===27?On(ye,ke,Le):(Bt=Ct?Ye||vt||ft?!1:Ne===46||Ne===68&&st:st||vt||ft?!1:Ne===46,Bt?Ne===46?On(ye,Be,Le):(Le.preventDefault(),On(ye,R,!1)):Ne===8&&(Ct?vt:st)?(Le.preventDefault(),On(ye,j,!0)):Ne===46&&(Ct?vt:st)?(Le.preventDefault(),On(ye,j,!1)):Ct&&ft&&Ne===8?(Le.preventDefault(),On(ye,F,!0)):Ct&&ft&&Ne===46?(Le.preventDefault(),On(ye,F,!1)):Ne===66&&!vt&&(Ct?ft:st)?(Le.preventDefault(),On(ye,V,"bold")):Ne===85&&!vt&&(Ct?ft:st)?(Le.preventDefault(),On(ye,V,"underline")):Ne===73&&!vt&&(Ct?ft:st)?(Le.preventDefault(),On(ye,V,"italic")):Ne!==9||vt||st||ft?Ne===90&&!Ye&&(Ct?ft:st)?(Le.preventDefault(),On(ye,K,void 0)):(Bt=Ct?Ne===90&&ft&&Ye:Ne===89&&st||Ne===90&&st&&Ye,Bt?(Le.preventDefault(),On(ye,W,void 0)):Il(ye._editorState._selection)?(Bt=Ye?!1:Ne===67?Ct?ft:st:!1,Bt?(Le.preventDefault(),On(ye,ot,Le)):(Bt=Ye?!1:Ne===88?Ct?ft:st:!1,Bt?(Le.preventDefault(),On(ye,tt,Le)):Ne===65&&(Ct?ft:st)&&(Le.preventDefault(),On(ye,Ue,Le)))):!$t&&Ne===65&&(Ct?ft:st)&&(Le.preventDefault(),On(ye,Ue,Le))):On(ye,Ie,Le))}else rs=!1,On(ye,ge,Le);else On(ye,Ae,Le);else On(ye,xe,Le);else On(ye,me,Le);else On(ye,pe,Le);else On(ye,oe,Le);else On(ye,J,Le);(st||Ye||vt||ft)&&On(ye,gt,Le)}}}function Pi(Le){let ye=Le.__lexicalEventHandles;return ye===void 0&&(ye=[],Le.__lexicalEventHandles=ye),ye}let Uo=new Map;function Wi(Le){var ye=Le.target;let Ne=mi(ye==null?null:ye.nodeType===9?ye.defaultView:ye.ownerDocument.defaultView);if(Ne!==null){var Ye=Zn(Ne.anchorNode);if(Ye!==null){ra&&(ra=!1,ml(Ye,()=>{var Bt=za(),er=Ne.anchorNode;er!==null&&(er=er.nodeType,er===1||er===3)&&(Bt=Yu(Bt,Ne,Ye,Le),di(Bt))})),ye=gs(Ye),ye=ye[ye.length-1];var st=ye._key,ft=Uo.get(st),vt=ft||ye;vt!==Ye&&Ui(Ne,vt,!1),Ui(Ne,Ye,!0),Ye!==ye?Uo.set(st,Ye):ft&&Uo.delete(st)}}}function si(Le,ye){ai===0&&Le.ownerDocument.addEventListener("selectionchange",Wi),ai++,Le.__lexicalEditor=ye;let Ne=Pi(Le);for(let Ye=0;Ye{Bt._lexicalHandled!==!0&&(Bt._lexicalHandled=!0,ye.isEditable()&&ft(Bt,ye))}:Bt=>{if(Bt._lexicalHandled!==!0&&(Bt._lexicalHandled=!0,ye.isEditable()))switch(st){case"cut":return On(ye,tt,Bt);case"copy":return On(ye,ot,Bt);case"paste":return On(ye,L,Bt);case"dragstart":return On(ye,Ke,Bt);case"dragover":return On(ye,Je,Bt);case"dragend":return On(ye,Xe,Bt);case"focus":return On(ye,et,Bt);case"blur":return On(ye,dt,Bt);case"drop":return On(ye,je,Bt)}};Le.addEventListener(st,vt),Ne.push(()=>{Le.removeEventListener(st,vt)})}}function fa(Le,ye,Ne){Ha();var Ye=Le.__key;let st=Le.getParent();if(st!==null){var ft=Co();if(Wo(ft)&&an(Le)){var{anchor:vt,focus:Bt}=ft,er=vt.getNode(),br=Bt.getNode();po(er,Le)&&vt.set(Le.__key,0,"element"),po(br,Le)&&Bt.set(Le.__key,0,"element")}if(er=ft,br=!1,Wo(er)&&ye){ft=er.anchor;let dn=er.focus;ft.key===Ye&&(Lc(ft,Le,st,Le.getPreviousSibling(),Le.getNextSibling()),br=!0),dn.key===Ye&&(Lc(dn,Le,st,Le.getPreviousSibling(),Le.getNextSibling()),br=!0)}else Il(er)&&ye&&Le.isSelected()&&Le.selectPrevious();Wo(er)&&ye&&!br?(Ye=Le.getIndexWithinParent(),xn(Le),Vl(er,st,Ye,-1)):xn(Le),Ne||Vn(st)||st.canBeEmpty()||!st.isEmpty()||fa(st,ye),ye&&Bs(st)&&st.isEmpty()&&st.selectEnd()}}class gi{static getType(){Qe(64,this.name)}static clone(){Qe(65,this.name)}constructor(ye){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,Ln(this,ye)}getType(){return this.__type}isInline(){Qe(137,this.constructor.name)}isAttached(){for(var ye=this.__key;ye!==null;){if(ye==="root")return!0;if(ye=fo(ye),ye===null)break;ye=ye.__parent}return!1}isSelected(ye){if(ye=ye||Co(),ye==null)return!1;let Ne=ye.getNodes().some(Ye=>Ye.__key===this.__key);return Jn(this)?Ne:Wo(ye)&&ye.anchor.type==="element"&&ye.focus.type==="element"&&ye.anchor.key===ye.focus.key&&ye.anchor.offset===ye.focus.offset?!1:Ne}getKey(){return this.__key}getIndexWithinParent(){var ye=this.getParent();if(ye===null)return-1;ye=ye.getFirstChild();let Ne=0;for(;ye!==null;){if(this.is(ye))return Ne;Ne++,ye=ye.getNextSibling()}return-1}getParent(){let ye=this.getLatest().__parent;return ye===null?null:fo(ye)}getParentOrThrow(){let ye=this.getParent();return ye===null&&Qe(66,this.__key),ye}getTopLevelElement(){let ye=this;for(;ye!==null;){let Ne=ye.getParent();if(Vn(Ne))return an(ye)||Qe(138),ye;ye=Ne}return null}getTopLevelElementOrThrow(){let ye=this.getTopLevelElement();return ye===null&&Qe(67,this.__key),ye}getParents(){let ye=[],Ne=this.getParent();for(;Ne!==null;)ye.push(Ne),Ne=Ne.getParent();return ye}getParentKeys(){let ye=[],Ne=this.getParent();for(;Ne!==null;)ye.push(Ne.__key),Ne=Ne.getParent();return ye}getPreviousSibling(){let ye=this.getLatest().__prev;return ye===null?null:fo(ye)}getPreviousSiblings(){let ye=[];var Ne=this.getParent();if(Ne===null)return ye;for(Ne=Ne.getFirstChild();Ne!==null&&!Ne.is(this);)ye.push(Ne),Ne=Ne.getNextSibling();return ye}getNextSibling(){let ye=this.getLatest().__next;return ye===null?null:fo(ye)}getNextSiblings(){let ye=[],Ne=this.getNextSibling();for(;Ne!==null;)ye.push(Ne),Ne=Ne.getNextSibling();return ye}getCommonAncestor(ye){let Ne=this.getParents();var Ye=ye.getParents();an(this)&&Ne.unshift(this),an(ye)&&Ye.unshift(ye),ye=Ne.length;var st=Ye.length;if(ye===0||st===0||Ne[ye-1]!==Ye[st-1])return null;for(Ye=new Set(Ye),st=0;st{Bt.append($n)})),Wo(Ye)&&(di(Ye),Ne=Ye.anchor,Ye=Ye.focus,Ne.key===ft&&eu(Ne,Bt),Ye.key===ft&&eu(Ye,Bt)),zo()===ft&&ao(vt),Bt}insertAfter(ye,Ne=!0){Ha(),so(this,ye);var Ye=this.getWritable();let st=ye.getWritable();var ft=st.getParent();let vt=Co();var Bt=!1,er=!1;if(ft!==null){var br=ye.getIndexWithinParent();xn(st),Wo(vt)&&(er=ft.__key,Bt=vt.anchor,ft=vt.focus,Bt=Bt.type==="element"&&Bt.key===er&&Bt.offset===br+1,er=ft.type==="element"&&ft.key===er&&ft.offset===br+1)}ft=this.getNextSibling(),br=this.getParentOrThrow().getWritable();let dn=st.__key,yn=Ye.__next;return ft===null?br.__last=dn:ft.getWritable().__prev=dn,br.__size++,Ye.__next=dn,st.__next=yn,st.__prev=Ye.__key,st.__parent=Ye.__parent,Ne&&Wo(vt)&&(Ne=this.getIndexWithinParent(),Vl(vt,br,Ne+1),Ye=br.__key,Bt&&vt.anchor.set(Ye,Ne+2,"element"),er&&vt.focus.set(Ye,Ne+2,"element")),ye}insertBefore(ye,Ne=!0){Ha(),so(this,ye);var Ye=this.getWritable();let st=ye.getWritable(),ft=st.__key;xn(st);let vt=this.getPreviousSibling(),Bt=this.getParentOrThrow().getWritable(),er=Ye.__prev,br=this.getIndexWithinParent();return vt===null?Bt.__first=ft:vt.getWritable().__next=ft,Bt.__size++,Ye.__prev=ft,st.__prev=er,st.__next=Ye.__key,st.__parent=Ye.__parent,Ye=Co(),Ne&&Wo(Ye)&&(Ne=this.getParentOrThrow(),Vl(Ye,Ne,br)),ye}isParentRequired(){return!1}createParentElementNode(){return xi()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(ye,Ne){Ha();let Ye=this.getPreviousSibling(),st=this.getParentOrThrow();return Ye===null?st.select(0,0):an(Ye)?Ye.select():Jn(Ye)?Ye.select(ye,Ne):(ye=Ye.getIndexWithinParent()+1,st.select(ye,ye))}selectNext(ye,Ne){Ha();let Ye=this.getNextSibling(),st=this.getParentOrThrow();return Ye===null?st.select():an(Ye)?Ye.select(0,0):Jn(Ye)?Ye.select(ye,Ne):(ye=Ye.getIndexWithinParent(),st.select(ye,ye))}markDirty(){this.getWritable()}}function gl(Le,ye,Ne){Ne=Ne||ye.getParentOrThrow().getLastChild();let Ye=ye;for(ye=[ye];Ye!==Ne;)Ye.getNextSibling()||Qe(140),Ye=Ye.getNextSibling(),ye.push(Ye);for(let st of ye)Le=Le.insertAfter(st)}class kl extends gi{static getType(){return"linebreak"}static clone(ye){return new kl(ye.__key)}constructor(ye){super(ye)}getTextContent(){return` -`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:ye=>{e:{var Ne=ye.parentElement;if(Ne!==null){let Ye=Ne.firstChild;if((Ye===ye||Ye.nextSibling===ye&&kc(Ye))&&(Ne=Ne.lastChild,Ne===ye||Ne.previousSibling===ye&&kc(Ne))){ye=!0;break e}}ye=!1}return ye?null:{conversion:yu,priority:0}}}}static importJSON(){return Ri()}exportJSON(){return{type:"linebreak",version:1}}}function yu(){return{node:Ri()}}function Ri(){return Nn(new kl)}function ya(Le){return Le instanceof kl}function kc(Le){return Le.nodeType===3&&/^( |\t|\r?\n)+$/.test(Le.textContent||"")}function _u(Le,ye){return ye&16?"code":ye&128?"mark":ye&32?"sub":ye&64?"sup":null}function Ic(Le,ye){return ye&1?"strong":ye&2?"em":"span"}function wf(Le,ye,Ne,Ye,st){Le=Ye.classList,Ye=Rt(st,"base"),Ye!==void 0&&Le.add(...Ye),Ye=Rt(st,"underlineStrikethrough");let ft=!1,vt=ye&8&&ye&4;var Bt=Ne&8&&Ne&4;Ye!==void 0&&(Bt?(ft=!0,vt||Le.add(...Ye)):vt&&Le.remove(...Ye));for(let er in wr)Bt=wr[er],Ye=Rt(st,er),Ye!==void 0&&(Ne&Bt?!ft||er!=="underline"&&er!=="strikethrough"?(!(ye&Bt)||vt&&er==="underline"||er==="strikethrough")&&Le.add(...Ye):ye&Bt&&Le.remove(...Ye):ye&Bt&&Le.remove(...Ye))}function Nc(Le,ye,Ne){let Ye=ye.firstChild;if(Ne=Ne.isComposing(),Le+=Ne?Ht:"",Ye==null)ye.textContent=Le;else if(ye=Ye.nodeValue,ye!==Le)if(Ne||$t){Ne=ye.length;let st=Le.length,ft=0,vt=0;for(;ft({conversion:Fn,priority:0}),b:()=>({conversion:lc,priority:0}),code:()=>({conversion:bu,priority:0}),em:()=>({conversion:bu,priority:0}),i:()=>({conversion:bu,priority:0}),s:()=>({conversion:bu,priority:0}),span:()=>({conversion:xd,priority:0}),strong:()=>({conversion:bu,priority:0}),sub:()=>({conversion:bu,priority:0}),sup:()=>({conversion:bu,priority:0}),u:()=>({conversion:bu,priority:0})}}static importJSON(ye){let Ne=ys(ye.text);return Ne.setFormat(ye.format),Ne.setDetail(ye.detail),Ne.setMode(ye.mode),Ne.setStyle(ye.style),Ne}exportDOM(ye){return{element:ye}=super.exportDOM(ye),ye!==null&&ks(ye)||Qe(132),ye.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(ye=rd(ye,"b")),this.hasFormat("italic")&&(ye=rd(ye,"i")),this.hasFormat("strikethrough")&&(ye=rd(ye,"s")),this.hasFormat("underline")&&(ye=rd(ye,"u")),{element:ye}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(ye){let Ne=this.getWritable();return Ne.__format=typeof ye=="string"?wr[ye]:ye,Ne}setDetail(ye){let Ne=this.getWritable();return Ne.__detail=typeof ye=="string"?xr[ye]:ye,Ne}setStyle(ye){let Ne=this.getWritable();return Ne.__style=ye,Ne}toggleFormat(ye){let Ne=this.getFormat();return ye=Fo(Ne,ye,null),this.setFormat(ye)}toggleDirectionless(){let ye=this.getWritable();return ye.__detail^=1,ye}toggleUnmergeable(){let ye=this.getWritable();return ye.__detail^=2,ye}setMode(ye){if(ye=Bn[ye],this.__mode===ye)return this;let Ne=this.getWritable();return Ne.__mode=ye,Ne}setTextContent(ye){if(this.__text===ye)return this;let Ne=this.getWritable();return Ne.__text=ye,Ne}select(ye,Ne){Ha();let Ye=Co();var st=this.getTextContent();let ft=this.__key;if(typeof st=="string"?(st=st.length,ye===void 0&&(ye=st),Ne===void 0&&(Ne=st)):Ne=ye=0,Wo(Ye))st=zo(),st!==Ye.anchor.key&&st!==Ye.focus.key||ao(ft),Ye.setTextNodeRange(this,ye,this,Ne);else return Rf(ft,ye,ft,Ne,"text","text");return Ye}selectStart(){return this.select(0,0)}selectEnd(){let ye=this.getTextContentSize();return this.select(ye,ye)}spliceText(ye,Ne,Ye,st){let ft=this.getWritable(),vt=ft.__text,Bt=Ye.length,er=ye;0>er&&(er=Bt+er,0>er&&(er=0));let br=Co();return st&&Wo(br)&&(ye+=Bt,br.setTextNodeRange(ft,ye,ft,ye)),Ne=vt.slice(0,er)+Ye+vt.slice(er+Ne),ft.__text=Ne,ft}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...ye){Ha();var Ne=this.getLatest(),Ye=Ne.getTextContent(),st=Ne.__key,ft=zo(),vt=new Set(ye);ye=[];for(var Bt=Ye.length,er="",br=0;brdn&&Po.offset<=$n&&(Po.key=Vo,Po.offset-=dn,Ne.dirty=!0),Xi.key===st&&Xi.type==="text"&&Xi.offset>dn&&Xi.offset<=$n&&(Xi.key=Vo,Xi.offset-=dn,Ne.dirty=!0)}ft===st&&ao(Vo),dn=$n,er.push(Pr)}return st=this.getPreviousSibling(),ft=this.getNextSibling(),st!==null&&Ko(st),ft!==null&&Ko(ft),st=Ye.getWritable(),ft=this.getIndexWithinParent(),Bt?(st.splice(ft,0,er),this.remove()):st.splice(ft,1,er),Wo(Ne)&&Vl(Ne,Ye,ft,vt-1),er}mergeWithSibling(ye){var Ne=ye===this.getPreviousSibling();Ne||ye===this.getNextSibling()||Qe(50);var Ye=this.__key;let st=ye.__key,ft=this.__text,vt=ft.length;zo()===st&&ao(Ye);let Bt=Co();if(Wo(Bt)){let er=Bt.anchor,br=Bt.focus;er!==null&&er.key===st&&(Of(er,Ne,Ye,ye,vt),Bt.dirty=!0),br!==null&&br.key===st&&(Of(br,Ne,Ye,ye,vt),Bt.dirty=!0)}return Ye=ye.__text,this.setTextContent(Ne?Ye+ft:ft+Ye),Ne=this.getWritable(),ye.remove(),Ne}isTextEntity(){return!1}}function xd(Le){let ye=Le.style.fontWeight==="700",Ne=Le.style.textDecoration==="line-through",Ye=Le.style.fontStyle==="italic",st=Le.style.textDecoration==="underline",ft=Le.style.verticalAlign;return{forChild:vt=>(Jn(vt)&&(ye&&vt.toggleFormat("bold"),Ne&&vt.toggleFormat("strikethrough"),Ye&&vt.toggleFormat("italic"),st&&vt.toggleFormat("underline"),ft==="sub"&&vt.toggleFormat("subscript"),ft==="super"&&vt.toggleFormat("superscript")),vt),node:null}}function lc(Le){let ye=Le.style.fontWeight==="normal";return{forChild:Ne=>(Jn(Ne)&&!ye&&Ne.toggleFormat("bold"),Ne),node:null}}let Sd=new WeakMap;function Fn(Le){Le.parentElement===null&&Qe(129);for(var ye=Le.textContent||"",Ne,Ye=Le.parentNode,st=[Le];Ye!==null&&(Ne=Sd.get(Ye))===void 0&&!(Ye.nodeName==="PRE"||Ye.nodeType===1&&Ye.style!==void 0&&Ye.style.whiteSpace!==void 0&&Ye.style.whiteSpace.startsWith("pre"));)st.push(Ye),Ye=Ye.parentNode;for(Ne=Ne===void 0?Ye:Ne,Ye=0;Ye(Jn(Ne)&&!Ne.hasFormat(ye)&&Ne.toggleFormat(ye),Ne),node:null}}function ys(Le=""){return Nn(new Wu(Le))}function Jn(Le){return Le instanceof Wu}class Eu extends Wu{static getType(){return"tab"}static clone(ye){let Ne=new Eu(ye.__key);return Ne.__text=ye.__text,Ne.__format=ye.__format,Ne.__style=ye.__style,Ne}constructor(ye){super(" ",ye),this.__detail=2}static importDOM(){return null}static importJSON(ye){let Ne=Dc();return Ne.setFormat(ye.format),Ne.setStyle(ye.style),Ne}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){Qe(126)}setDetail(){Qe(127)}setMode(){Qe(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Dc(){return Nn(new Eu)}function ll(Le){return Le instanceof Eu}class Ia{constructor(ye,Ne,Ye){this._selection=null,this.key=ye,this.offset=Ne,this.type=Ye}is(ye){return this.key===ye.key&&this.offset===ye.offset&&this.type===ye.type}isBefore(ye){let Ne=this.getNode(),Ye=ye.getNode(),st=this.offset;if(ye=ye.offset,an(Ne)){var ft=Ne.getDescendantByIndex(st);Ne=ft??Ne}return an(Ye)&&(ft=Ye.getDescendantByIndex(ye),Ye=ft??Ye),Ne===Ye?stye&&(Ye=ye);else if(!an(ye)){var ft=ye.getNextSibling();Jn(ft)?(Ne=ft.__key,Ye=0,st="text"):(ft=ye.getParent())&&(Ne=ft.__key,Ye=ye.getIndexWithinParent()+1)}Le.set(Ne,Ye,st)}function eu(Le,ye){if(an(ye)){let Ne=ye.getLastDescendant();an(Ne)||Jn(Ne)?ls(Le,Ne):ls(Le,ye)}else ls(Le,ye)}function Mc(Le,ye,Ne,Ye){let st=Le.getNode(),ft=st.getChildAtIndex(Le.offset),vt=ys(),Bt=Bs(st)?xi().append(vt):vt;vt.setFormat(Ne),vt.setStyle(Ye),ft===null?st.append(Bt):ft.insertBefore(Bt),Le.is(ye)&&ye.set(vt.__key,0,"text"),Le.set(vt.__key,0,"text")}function Gl(Le,ye,Ne,Ye){Le.key=ye,Le.offset=Ne,Le.type=Ye}class xu{constructor(ye){this._cachedNodes=null,this._nodes=ye,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(ye){this._cachedNodes=ye}is(ye){if(!Il(ye))return!1;let Ne=this._nodes,Ye=ye._nodes;return Ne.size===Ye.size&&Array.from(Ne).every(st=>Ye.has(st))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(ye){this.dirty=!0,this._nodes.add(ye),this._cachedNodes=null}delete(ye){this.dirty=!0,this._nodes.delete(ye),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(ye){return this._nodes.has(ye)}clone(){return new xu(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(ye){let Ne=this.getNodes(),Ye=Ne.length;var st=Ne[Ye-1];if(Jn(st))st=st.select();else{let ft=st.getIndexWithinParent()+1;st=st.getParentOrThrow().select(ft,ft)}for(st.insertNodes(ye),ye=0;ye(an(Bt)||Fi(Bt))&&!Bt.isInline())){Ne=Fr(ye),ye=Ne.getLastDescendant();var ft=Ne.getChildren();Ne=an(Ye)&&Ye.isEmpty()?null:this.insertParagraph(),st=ft[ft.length-1];var vt=ft[0];(Bt=>an(Bt)&&Li(Bt)&&!Bt.isEmpty()&&an(Ye)&&(!Ye.isEmpty()||"__value"in Ye&&"__checked"in Ye))(vt)&&(an(Ye)||Qe(135),Ye.append(...vt.getChildren()),vt=ft[1]),vt&&gl(Ye,vt),ft=hl(ye,Li),Ne&&an(ft)&&("__value"in Ne&&"__checked"in Ne||Li(st))&&(ft.append(...Ne.getChildren()),Ne.remove()),an(Ye)&&Ye.isEmpty()&&Ye.remove(),ye.selectEnd(),ye=an(Ye)?Ye.getLastChild():null,ya(ye)&&ft!==Ye&&ye.remove()}else an(Ye)||Qe(135),st=Zu(this),Ye.splice(st,0,ye),Ne.selectEnd()}}insertParagraph(){if(this.anchor.key==="root"){var ye=xi();return Go().splice(this.anchor.offset,0,[ye]),ye.select(),ye}var Ne=Zu(this);return ye=hl(this.anchor.getNode(),Li),an(ye)||Qe(136),Ne=(Ne=ye.getChildAtIndex(Ne))?[Ne,...Ne.getNextSiblings()]:[],(ye=ye.insertNewAfter(this,!1))?(ye.append(...Ne),ye.selectStart(),ye):null}insertLineBreak(ye){var Ne=Ri();this.insertNodes([Ne]),ye&&(ye=Ne.getParentOrThrow(),Ne=Ne.getIndexWithinParent(),ye.select(Ne,Ne))}extract(){var ye=this.getNodes(),Ne=ye.length,Ye=Ne-1,st=this.anchor;let ft=this.focus;var vt=ye[0];let Bt=ye[Ye],[er,br]=tu(this);return Ne===0?[]:Ne===1?Jn(vt)&&!this.isCollapsed()?(ye=er>br?br:er,Ye=vt.splitText(ye,er>br?er:br),ye=ye===0?Ye[0]:Ye[1],ye!=null?[ye]:[]):[vt]:(Ne=st.isBefore(ft),Jn(vt)&&(st=Ne?er:br,st===vt.getTextContentSize()?ye.shift():st!==0&&([,vt]=vt.splitText(st),ye[0]=vt)),Jn(Bt)&&(vt=Bt.getTextContent().length,Ne=Ne?br:er,Ne===0?ye.pop():Ne!==vt&&([Bt]=Bt.splitText(Ne),ye[Ye]=Bt)),ye)}modify(ye,Ne,Ye){var st=this.focus,ft=this.anchor,vt=ye==="move",Bt=lr(st,Ne);if(Fi(Bt)&&!Bt.isIsolated())vt&&Bt.isKeyboardSelectable()?(Ne=Cu(),Ne.add(Bt.__key),di(Ne)):(ye=Ne?Bt.getPreviousSibling():Bt.getNextSibling(),Jn(ye)?(Bt=ye.__key,Ne=Ne?ye.getTextContent().length:0,st.set(Bt,Ne,"text"),vt&&ft.set(Bt,Ne,"text")):(Ye=Bt.getParentOrThrow(),an(ye)?(Ye=ye.__key,Bt=Ne?ye.getChildrenSize():0):(Bt=Bt.getIndexWithinParent(),Ye=Ye.__key,Ne||Bt++),st.set(Ye,Bt,"element"),vt&&ft.set(Ye,Bt,"element")));else if(ft=Ni(),st=mi(ft._window)){var er=ft._blockCursorElement,br=ft._rootElement;if(br===null||er===null||!an(Bt)||Bt.isInline()||Bt.canBeEmpty()||Ji(er,ft,br),st.modify(ye,Ne?"backward":"forward",Ye),0Ne||br){Ye.splice(Bt,1),br&&(vt=void 0);break}}ye=Ye.join("").trim(),ye===""?Le.remove():(Le.setTextContent(ye),Le.select(vt,vt))}function Td(Le,ye,Ne,Ye){var st=ye;if(Le.nodeType===1){let Bt=!1;var ft=Le.childNodes,vt=ft.length;st===vt&&(Bt=!0,st=vt-1);let er=ft[st];if(vt=!1,er===Ye._blockCursorElement?(er=ft[st+1],vt=!0):Ye._blockCursorElement!==null&&st--,Ye=Qi(er),Jn(Ye))st=Bt?Ye.getTextContentSize():0;else{if(ft=Qi(Le),ft===null)return null;if(an(ft)?(Le=ft.getChildAtIndex(st),(ye=an(Le))&&(ye=Le.getParent(),ye=Ne===null||ye===null||!ye.canBeEmpty()||ye!==Ne.getNode()),ye&&(Ne=Bt?Le.getLastDescendant():Le.getFirstDescendant(),Ne===null?(ft=Le,st=0):(Le=Ne,ft=an(Le)?Le:Le.getParentOrThrow())),Jn(Le)?(Ye=Le,ft=null,st=Bt?Le.getTextContentSize():0):Le!==ft&&Bt&&!vt&&st++):(st=ft.getIndexWithinParent(),st=ye===0&&Fi(ft)&&Qi(Le)===ft?st:st+1,ft=ft.getParentOrThrow()),an(ft))return Oi(ft.__key,st,"element")}}else Ye=Qi(Le);return Jn(Ye)?Oi(Ye.__key,st,"text"):null}function ad(Le,ye,Ne){var Ye=Le.offset,st=Le.getNode();Ye===0?(Ye=st.getPreviousSibling(),st=st.getParent(),ye?(Ne||!ye)&&Ye===null&&an(st)&&st.isInline()&&(ye=st.getPreviousSibling(),Jn(ye)&&(Le.key=ye.__key,Le.offset=ye.getTextContent().length)):an(Ye)&&!Ne&&Ye.isInline()?(Le.key=Ye.__key,Le.offset=Ye.getChildrenSize(),Le.type="element"):Jn(Ye)&&(Le.key=Ye.__key,Le.offset=Ye.getTextContent().length)):Ye===st.getTextContent().length&&(Ye=st.getNextSibling(),st=st.getParent(),ye&&an(Ye)&&Ye.isInline()?(Le.key=Ye.__key,Le.offset=0,Le.type="element"):(Ne||ye)&&Ye===null&&an(st)&&st.isInline()&&!st.canInsertTextAfter()&&(ye=st.getNextSibling(),Jn(ye)&&(Le.key=ye.__key,Le.offset=0)))}function Ps(Le,ye,Ne){if(Le.type==="text"&&ye.type==="text"){var Ye=Le.isBefore(ye);let st=Le.is(ye);ad(Le,Ye,st),ad(ye,!Ye,st),st&&(ye.key=Le.key,ye.offset=Le.offset,ye.type=Le.type),Ye=Ni(),Ye.isComposing()&&Ye._compositionKey!==Le.key&&Wo(Ne)&&(Ye=Ne.anchor,Ne=Ne.focus,Gl(Le,Ye.key,Ye.offset,Ye.type),Gl(ye,Ne.key,Ne.offset,Ne.type))}}function Tu(Le,ye,Ne,Ye,st,ft){return Le===null||Ne===null||!Gn(st,Le,Ne)||(ye=Td(Le,ye,Wo(ft)?ft.anchor:null,st),ye===null)||(Ye=Td(Ne,Ye,Wo(ft)?ft.focus:null,st),Ye===null||ye.type==="element"&&Ye.type==="element"&&(Le=Qi(Le),Ne=Qi(Ne),Fi(Le)&&Fi(Ne)))?null:(Ps(ye,Ye,ft),[ye,Ye])}function Rf(Le,ye,Ne,Ye,st,ft){let vt=Yi();return Le=new Su(Oi(Le,ye,st),Oi(Ne,Ye,ft),0,""),Le.dirty=!0,vt._selection=Le}function Cu(){return new xu(new Set)}function nf(Le){let ye=Le.getEditorState()._selection,Ne=mi(Le._window);return Wo(ye)||ye==null?Yu(ye,Ne,Le,null):ye.clone()}function Yu(Le,ye,Ne,Ye){var st=Ne._window;if(st===null)return null;var ft=(st=Ye||st.event)?st.type:void 0;Ye=ft==="selectionchange",st=!Tn&&(Ye||ft==="beforeinput"||ft==="compositionstart"||ft==="compositionend"||ft==="click"&&st&&st.detail===3||ft==="drop"||ft===void 0);let vt;if(!Wo(Le)||st){if(ye===null)return null;if(st=ye.anchorNode,ft=ye.focusNode,vt=ye.anchorOffset,ye=ye.focusOffset,Ye&&Wo(Le)&&!Gn(Ne,st,ft))return Le.clone()}else return Le.clone();if(Ne=Tu(st,vt,ft,ye,Ne,Le),Ne===null)return null;let[Bt,er]=Ne;return new Su(Bt,er,Wo(Le)?Le.format:0,Wo(Le)?Le.style:"")}function Co(){return Yi()._selection}function za(){return Ni()._editorState._selection}function Vl(Le,ye,Ne,Ye=1){var st=Le.anchor,ft=Le.focus,vt=st.getNode(),Bt=ft.getNode();if(ye.is(vt)||ye.is(Bt)){if(vt=ye.__key,Le.isCollapsed())ye=st.offset,(Ne<=ye&&0Ye)&&(Ne=Math.max(0,ye+Ye),st.set(vt,Ne,"element"),ft.set(vt,Ne,"element"),Xu(Le));else{let br=Le.isBackward();Bt=br?ft:st;var er=Bt.getNode();st=br?st:ft,ft=st.getNode(),ye.is(er)&&(er=Bt.offset,(Ne<=er&&0Ye)&&Bt.set(vt,Math.max(0,er+Ye),"element")),ye.is(ft)&&(ye=st.offset,(Ne<=ye&&0Ye)&&st.set(vt,Math.max(0,ye+Ye),"element"))}Xu(Le)}}function Xu(Le){var ye=Le.anchor,Ne=ye.offset;let Ye=Le.focus;var st=Ye.offset,ft=ye.getNode(),vt=Ye.getNode();if(Le.isCollapsed())an(ft)&&(vt=ft.getChildrenSize(),vt=(st=Ne>=vt)?ft.getChildAtIndex(vt-1):ft.getChildAtIndex(Ne),Jn(vt)&&(Ne=0,st&&(Ne=vt.getTextContentSize()),ye.set(vt.__key,Ne,"text"),Ye.set(vt.__key,Ne,"text")));else{if(an(ft)){let Bt=ft.getChildrenSize();Ne=(Le=Ne>=Bt)?ft.getChildAtIndex(Bt-1):ft.getChildAtIndex(Ne),Jn(Ne)&&(ft=0,Le&&(ft=Ne.getTextContentSize()),ye.set(Ne.__key,ft,"text"))}an(vt)&&(Ne=vt.getChildrenSize(),st=(ye=st>=Ne)?vt.getChildAtIndex(Ne-1):vt.getChildAtIndex(st),Jn(st)&&(vt=0,ye&&(vt=st.getTextContentSize()),Ye.set(st.__key,vt,"text")))}}function ul(Le,ye){if(ye=ye.getEditorState()._selection,Le=Le._selection,Wo(Le)){var Ne=Le.anchor;let Ye=Le.focus,st;Ne.type==="text"&&(st=Ne.getNode(),st.selectionTransform(ye,Le)),Ye.type==="text"&&(Ne=Ye.getNode(),st!==Ne&&Ne.selectionTransform(ye,Le))}}function Lc(Le,ye,Ne,Ye,st){let ft=null,vt=0,Bt=null;Ye!==null?(ft=Ye.__key,Jn(Ye)?(vt=Ye.getTextContentSize(),Bt="text"):an(Ye)&&(vt=Ye.getChildrenSize(),Bt="element")):st!==null&&(ft=st.__key,Jn(st)?Bt="text":an(st)&&(Bt="element")),ft!==null&&Bt!==null?Le.set(ft,vt,Bt):(vt=ye.getIndexWithinParent(),vt===-1&&(vt=Ne.getChildrenSize()),Le.set(Ne.__key,vt,"element"))}function Of(Le,ye,Ne,Ye,st){Le.type==="text"?(Le.key=Ne,ye||(Le.offset+=st)):Le.offset>Ye.getIndexWithinParent()&&--Le.offset}function Zu(Le){Le.isCollapsed()||Le.removeText();var ye=Le.anchor;for(Le=ye.getNode(),ye=ye.offset;!Li(Le);)[Le,ye]=gr(Le,ye);return ye}function gr(Le,ye){var Ne=Le.getParent();if(!Ne)return Ne=xi(),Go().append(Ne),Ne.select(),[Go(),0];if(Jn(Le)){var Ye=Le.splitText(ye);return Ye.length===0?[Ne,Le.getIndexWithinParent()]:(Le=ye===0?0:1,Le=Ye[0].getIndexWithinParent()+Le,[Ne,Le])}return!an(Le)||ye===0?[Ne,Le.getIndexWithinParent()]:((Ye=Le.getChildAtIndex(ye))&&(ye=new Su(Oi(Le.__key,ye,"element"),Oi(Le.__key,ye,"element"),0,""),(ye=Le.insertNewAfter(ye))&&ye.append(Ye,...Ye.getNextSiblings())),[Ne,Le.getIndexWithinParent()+1])}function Fr(Le){let ye=xi(),Ne=null;for(let Ye=0;YeRu&&(Ll=Es-Ru),Ll!==0)if(Bi)Hi.scrollBy(0,Ll);else{let su=Qa.scrollTop;Qa.scrollTop+=Ll;let Pl=Qa.scrollTop-su;Ga-=Pl,Es-=Pl}if(Bi)break;Qa=un(Qa)}}}wi=!0}}else vt!==null&&Gn(Le,Da,Di)&&Ot.removeAllRanges()}}e:{let zi=Le._blockCursorElement;if(Wo(Bt)&&Bt.isCollapsed()&&Bt.anchor.type==="element"&&Ye.contains(document.activeElement)){let Da=Bt.anchor,Di=Da.getNode(),Xo=Da.offset,Rn=Di.getChildrenSize(),Va=!1,sa=null;if(Xo===Rn){let Ea=Di.getChildAtIndex(Xo-1);Ei(Ea)&&(Va=!0)}else{let Ea=Di.getChildAtIndex(Xo);if(Ei(Ea)){let Hs=Ea.getPreviousSibling();(Hs===null||Ei(Hs))&&(Va=!0,sa=Le.getElementByKey(Ea.__key))}}if(Va){let Ea=Le.getElementByKey(Di.__key);if(zi===null){let Hs=Le._config.theme,Hi=document.createElement("div");Hi.contentEditable="false",Hi.setAttribute("data-lexical-cursor","true");let Bi=Hs.blockCursor;if(Bi!==void 0){if(typeof Bi=="string"){let Ll=Bi.split(" ");Bi=Hs.blockCursor=Ll}Bi!==void 0&&Hi.classList.add(...Bi)}Le._blockCursorElement=zi=Hi}Ye.style.caretColor="transparent",sa===null?Ea.appendChild(zi):Ea.insertBefore(zi,sa);break e}}zi!==null&&Ji(zi,Le,Ye)}Pr!==null&&Pr.observe(Ye,Ii)}finally{vn=yn,_r=br}}if($n!==null){var If=$n;let zi=Array.from(Le._listeners.mutation),Da=zi.length;for(let Di=0;Di{ft=On(Le,ye,Ne)}),ft}let Ye=gs(Le);for(let ft=4;0<=ft;ft--)for(let vt=0;vt{ql(Le)}):(vt._flushSync=!1,Bt&&(Ye.clear(),Le._deferred=[],Le._pendingEditorState=null))}function ml(Le,ye,Ne){Le._updating?Le._updates.push([ye,Ne]):us(Le,ye,Ne)}class ec extends gi{constructor(ye){super(ye)}decorate(){Qe(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Fi(Le){return Le instanceof ec}class Pc extends gi{constructor(ye){super(ye),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let ye=this.getFormat();return bn[ye]||""}getIndent(){return this.getLatest().__indent}getChildren(){let ye=[],Ne=this.getFirstChild();for(;Ne!==null;)ye.push(Ne),Ne=Ne.getNextSibling();return ye}getChildrenKeys(){let ye=[],Ne=this.getFirstChild();for(;Ne!==null;)ye.push(Ne.__key),Ne=Ne.getNextSibling();return ye}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let ye=Ni()._dirtyElements;return ye!==null&&ye.has(this.__key)}isLastChild(){let ye=this.getLatest(),Ne=this.getParentOrThrow().getLastChild();return Ne!==null&&Ne.is(ye)}getAllTextNodes(){let ye=[],Ne=this.getFirstChild();for(;Ne!==null;){if(Jn(Ne)&&ye.push(Ne),an(Ne)){let Ye=Ne.getAllTextNodes();ye.push(...Ye)}Ne=Ne.getNextSibling()}return ye}getFirstDescendant(){let ye=this.getFirstChild();for(;ye!==null;){if(an(ye)){let Ne=ye.getFirstChild();if(Ne!==null){ye=Ne;continue}}break}return ye}getLastDescendant(){let ye=this.getLastChild();for(;ye!==null;){if(an(ye)){let Ne=ye.getLastChild();if(Ne!==null){ye=Ne;continue}}break}return ye}getDescendantByIndex(ye){let Ne=this.getChildren(),Ye=Ne.length;return ye>=Ye?(ye=Ne[Ye-1],an(ye)&&ye.getLastDescendant()||ye||null):(ye=Ne[ye],an(ye)&&ye.getFirstDescendant()||ye||null)}getFirstChild(){let ye=this.getLatest().__first;return ye===null?null:fo(ye)}getFirstChildOrThrow(){let ye=this.getFirstChild();return ye===null&&Qe(45,this.__key),ye}getLastChild(){let ye=this.getLatest().__last;return ye===null?null:fo(ye)}getLastChildOrThrow(){let ye=this.getLastChild();return ye===null&&Qe(96,this.__key),ye}getChildAtIndex(ye){var Ne=this.getChildrenSize();let Ye;if(ye=ye;){if(Ne===ye)return Ye;Ye=Ye.getPreviousSibling(),Ne--}return null}getTextContent(){let ye="",Ne=this.getChildren(),Ye=Ne.length;for(let st=0;stNe.remove()),ye}append(...ye){return this.splice(this.getChildrenSize(),0,ye)}setDirection(ye){let Ne=this.getWritable();return Ne.__dir=ye,Ne}setFormat(ye){return this.getWritable().__format=ye!==""?Vr[ye]:0,this}setIndent(ye){return this.getWritable().__indent=ye,this}splice(ye,Ne,Ye){let st=Ye.length,ft=this.getChildrenSize(),vt=this.getWritable(),Bt=vt.__key;var er=[],br=[];let dn=this.getChildAtIndex(ye+Ne),yn=null,Wr=ft-Ne+st;if(ye!==0)if(ye===ft)yn=this.getLastChild();else{var Pr=this.getChildAtIndex(ye);Pr!==null&&(yn=Pr.getPreviousSibling())}if(0({root:cl(Go())}))}}class Nl extends Pc{static getType(){return"paragraph"}static clone(ye){return new Nl(ye.__key)}createDOM(ye){let Ne=document.createElement("p");return ye=Rt(ye.theme,"paragraph"),ye!==void 0&&Ne.classList.add(...ye),Ne}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:kf,priority:0})}}exportDOM(ye){if({element:ye}=super.exportDOM(ye),ye&&ks(ye)){this.isEmpty()&&ye.append(document.createElement("br"));var Ne=this.getFormatType();ye.style.textAlign=Ne,(Ne=this.getDirection())&&(ye.dir=Ne),Ne=this.getIndent(),0{Object.keys(ft).forEach(vt=>{let Bt=Ne.get(vt);Bt===void 0&&(Bt=[],Ne.set(vt,Bt)),Bt.push(ft[vt])})};return Le.forEach(ft=>{ft=ft.klass.importDOM!=null?ft.klass.importDOM.bind(ft.klass):null,ft==null||Ye.has(ft)||(Ye.add(ft),ft=ft(),ft!==null&&st(ft))}),ye&&st(ye),Ne}class yl{constructor(ye,Ne,Ye,st,ft,vt,Bt){this._parentEditor=Ne,this._rootElement=null,this._editorState=ye,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=st,this._nodes=Ye,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Dt(),this._onError=ft,this._htmlConversions=vt,this._editable=Bt,this._headless=Ne!==null&&Ne._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(ye){let Ne=this._listeners.update;return Ne.add(ye),()=>{Ne.delete(ye)}}registerEditableListener(ye){let Ne=this._listeners.editable;return Ne.add(ye),()=>{Ne.delete(ye)}}registerDecoratorListener(ye){let Ne=this._listeners.decorator;return Ne.add(ye),()=>{Ne.delete(ye)}}registerTextContentListener(ye){let Ne=this._listeners.textcontent;return Ne.add(ye),()=>{Ne.delete(ye)}}registerRootListener(ye){let Ne=this._listeners.root;return ye(this._rootElement,null),Ne.add(ye),()=>{ye(null,this._rootElement),Ne.delete(ye)}}registerCommand(ye,Ne,Ye){Ye===void 0&&Qe(35);let st=this._commands;st.has(ye)||st.set(ye,[new Set,new Set,new Set,new Set,new Set]);let ft=st.get(ye);ft===void 0&&Qe(36,String(ye));let vt=ft[Ye];return vt.add(Ne),()=>{vt.delete(Ne),ft.every(Bt=>Bt.size===0)&&st.delete(ye)}}registerMutationListener(ye,Ne){this._nodes.get(ye.getType())===void 0&&Qe(37,ye.name);let Ye=this._listeners.mutation;return Ye.set(Ne,ye),()=>{Ye.delete(Ne)}}registerNodeTransformToKlass(ye,Ne){var Ye=ye.getType();return Ye=this._nodes.get(Ye),Ye===void 0&&Qe(37,ye.name),Ye.transforms.add(Ne),Ye}registerNodeTransform(ye,Ne){var Ye=this.registerNodeTransformToKlass(ye,Ne);let st=[Ye];return Ye=Ye.replaceWithKlass,Ye!=null&&(Ye=this.registerNodeTransformToKlass(Ye,Ne),st.push(Ye)),ca(this,ye.getType()),()=>{st.forEach(ft=>ft.transforms.delete(Ne))}}hasNode(ye){return this._nodes.has(ye.getType())}hasNodes(ye){return ye.every(this.hasNode.bind(this))}dispatchCommand(ye,Ne){return On(this,ye,Ne)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(ye){let Ne=this._rootElement;if(ye!==Ne){let vt=Rt(this._config.theme,"root");var Ye=this._pendingEditorState||this._editorState;if(this._rootElement=ye,$u(this,Ne,ye,Ye),Ne!==null){if(!this._config.disableEvents){ai!==0&&(ai--,ai===0&&Ne.ownerDocument.removeEventListener("selectionchange",Wi));var st=Ne.__lexicalEditor;if(st!=null){if(st._parentEditor!==null){var ft=gs(st);ft=ft[ft.length-1]._key,Uo.get(ft)===st&&Uo.delete(ft)}else Uo.delete(st._key);Ne.__lexicalEditor=null}for(st=Pi(Ne),ft=0;ft{let st=Co(),ft=Go();st!==null?st.dirty=!0:ft.getChildrenSize()!==0&&(Ne.defaultSelection==="rootStart"?ft.selectStart():ft.selectEnd())},{onUpdate:()=>{Ye.removeAttribute("autocapitalize"),ye&&ye()},tag:"focus"}),this._pendingEditorState===null&&Ye.removeAttribute("autocapitalize"))}blur(){var ye=this._rootElement;ye!==null&&ye.blur(),ye=mi(this._window),ye!==null&&ye.removeAllRanges()}isEditable(){return this._editable}setEditable(ye){this._editable!==ye&&(this._editable=ye,Ju("editable",this,!0,ye))}toJSON(){return{editorState:this._editorState.toJSON()}}}return Lexical_prod.$addUpdateTag=function(Le){Ha(),Ni()._updateTags.add(Le)},Lexical_prod.$applyNodeReplacement=Nn,Lexical_prod.$copyNode=Ro,Lexical_prod.$createLineBreakNode=Ri,Lexical_prod.$createNodeSelection=Cu,Lexical_prod.$createParagraphNode=xi,Lexical_prod.$createPoint=Oi,Lexical_prod.$createRangeSelection=function(){let Le=Oi("root",0,"element"),ye=Oi("root",0,"element");return new Su(Le,ye,0,"")},Lexical_prod.$createTabNode=Dc,Lexical_prod.$createTextNode=ys,Lexical_prod.$getAdjacentNode=lr,Lexical_prod.$getCharacterOffsets=tu,Lexical_prod.$getEditor=function(){return Ni()},Lexical_prod.$getNearestNodeFromDOMNode=wn,Lexical_prod.$getNearestRootOrShadowRoot=xo,Lexical_prod.$getNodeByKey=fo,Lexical_prod.$getPreviousSelection=za,Lexical_prod.$getRoot=Go,Lexical_prod.$getSelection=Co,Lexical_prod.$getTextContent=function(){let Le=Co();return Le===null?"":Le.getTextContent()},Lexical_prod.$hasAncestor=po,Lexical_prod.$hasUpdateTag=function(Le){return Ni()._updateTags.has(Le)},Lexical_prod.$insertNodes=function(Le){let ye=Co()||za();ye===null&&(ye=Go().selectEnd()),ye.insertNodes(Le)},Lexical_prod.$isBlockElementNode=function(Le){return an(Le)&&!Le.isInline()},Lexical_prod.$isDecoratorNode=Fi,Lexical_prod.$isElementNode=an,Lexical_prod.$isInlineElementOrDecoratorNode=function(Le){return an(Le)&&Le.isInline()||Fi(Le)&&Le.isInline()},Lexical_prod.$isLeafNode=function(Le){return Jn(Le)||ya(Le)||Fi(Le)},Lexical_prod.$isLineBreakNode=ya,Lexical_prod.$isNodeSelection=Il,Lexical_prod.$isParagraphNode=function(Le){return Le instanceof Nl},Lexical_prod.$isRangeSelection=Wo,Lexical_prod.$isRootNode=Bs,Lexical_prod.$isRootOrShadowRoot=Vn,Lexical_prod.$isTabNode=ll,Lexical_prod.$isTextNode=Jn,Lexical_prod.$nodesOfType=function(Le){var ye=Yi();let Ne=ye._readOnly,Ye=Le.getType();ye=ye._nodeMap;let st=[];for(let[,ft]of ye)ft instanceof Le&&ft.__type===Ye&&(Ne||ft.isAttached())&&st.push(ft);return st},Lexical_prod.$normalizeSelection__EXPERIMENTAL=fr,Lexical_prod.$parseSerializedNode=function(Le){return sd(Le,Ni()._nodes)},Lexical_prod.$selectAll=function(){var Le=Go();Le=Le.select(0,Le.getChildrenSize()),di(fr(Le))},Lexical_prod.$setCompositionKey=ao,Lexical_prod.$setSelection=di,Lexical_prod.$splitNode=function(Le,ye){let Ne=Le.getChildAtIndex(ye);Ne==null&&(Ne=Le),Vn(Le)&&Qe(102);let Ye=vt=>{const Bt=vt.getParentOrThrow(),er=Vn(Bt),br=vt!==Ne||er?Ro(vt):vt;if(er)return an(vt)&&an(br)||Qe(133),vt.insertAfter(br),[vt,br,br];const[dn,yn,Wr]=Ye(Bt);return vt=vt.getNextSiblings(),Wr.append(br,...vt),[dn,yn,br]},[st,ft]=Ye(Ne);return[st,ft]},Lexical_prod.BLUR_COMMAND=dt,Lexical_prod.CAN_REDO_COMMAND={},Lexical_prod.CAN_UNDO_COMMAND={},Lexical_prod.CLEAR_EDITOR_COMMAND={},Lexical_prod.CLEAR_HISTORY_COMMAND={},Lexical_prod.CLICK_COMMAND=C,Lexical_prod.COMMAND_PRIORITY_CRITICAL=4,Lexical_prod.COMMAND_PRIORITY_EDITOR=0,Lexical_prod.COMMAND_PRIORITY_HIGH=3,Lexical_prod.COMMAND_PRIORITY_LOW=1,Lexical_prod.COMMAND_PRIORITY_NORMAL=2,Lexical_prod.CONTROLLED_TEXT_INSERTION_COMMAND=N,Lexical_prod.COPY_COMMAND=ot,Lexical_prod.CUT_COMMAND=tt,Lexical_prod.DELETE_CHARACTER_COMMAND=R,Lexical_prod.DELETE_LINE_COMMAND=F,Lexical_prod.DELETE_WORD_COMMAND=j,Lexical_prod.DRAGEND_COMMAND=Xe,Lexical_prod.DRAGOVER_COMMAND=Je,Lexical_prod.DRAGSTART_COMMAND=Ke,Lexical_prod.DROP_COMMAND=je,Lexical_prod.DecoratorNode=ec,Lexical_prod.ElementNode=Pc,Lexical_prod.FOCUS_COMMAND=et,Lexical_prod.FORMAT_ELEMENT_COMMAND={},Lexical_prod.FORMAT_TEXT_COMMAND=V,Lexical_prod.INDENT_CONTENT_COMMAND={},Lexical_prod.INSERT_LINE_BREAK_COMMAND=O,Lexical_prod.INSERT_PARAGRAPH_COMMAND=I,Lexical_prod.INSERT_TAB_COMMAND={},Lexical_prod.KEY_ARROW_DOWN_COMMAND=Ae,Lexical_prod.KEY_ARROW_LEFT_COMMAND=pe,Lexical_prod.KEY_ARROW_RIGHT_COMMAND=J,Lexical_prod.KEY_ARROW_UP_COMMAND=xe,Lexical_prod.KEY_BACKSPACE_COMMAND=we,Lexical_prod.KEY_DELETE_COMMAND=Be,Lexical_prod.KEY_DOWN_COMMAND=X,Lexical_prod.KEY_ENTER_COMMAND=ge,Lexical_prod.KEY_ESCAPE_COMMAND=ke,Lexical_prod.KEY_MODIFIER_COMMAND=gt,Lexical_prod.KEY_SPACE_COMMAND=Te,Lexical_prod.KEY_TAB_COMMAND=Ie,Lexical_prod.LineBreakNode=kl,Lexical_prod.MOVE_TO_END=oe,Lexical_prod.MOVE_TO_START=me,Lexical_prod.OUTDENT_CONTENT_COMMAND={},Lexical_prod.PASTE_COMMAND=L,Lexical_prod.ParagraphNode=Nl,Lexical_prod.REDO_COMMAND=W,Lexical_prod.REMOVE_TEXT_COMMAND=B,Lexical_prod.RootNode=tc,Lexical_prod.SELECTION_CHANGE_COMMAND=S,Lexical_prod.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND={},Lexical_prod.SELECT_ALL_COMMAND=Ue,Lexical_prod.TabNode=Eu,Lexical_prod.TextNode=Wu,Lexical_prod.UNDO_COMMAND=K,Lexical_prod.createCommand=function(){return{}},Lexical_prod.createEditor=function(Le){var ye=Le||{},Ne=vn,Ye=ye.theme||{};let st=Le===void 0?Ne:ye.parentEditor||null,ft=ye.disableEvents||!1,vt=nu(),Bt=ye.namespace||(st!==null?st._config.namespace:Dt()),er=ye.editorState,br=[tc,Wu,kl,Eu,Nl,...ye.nodes||[]],{onError:dn,html:yn}=ye;if(ye=ye.editable!==void 0?ye.editable:!0,Le===void 0&&Ne!==null)Le=Ne._nodes;else for(Le=new Map,Ne=0;Ne{const $e=pa();return $e!==null?$e.clone():null})}function Ar(ze,$e,Pe){const We=tu(Pe._window);let nt=null,it=null;We!==null&&We.anchorNode===ze&&(nt=We.anchorOffset,it=We.focusOffset);const mt=ze.nodeValue;mt!==null&&gn($e,mt,nt,it,!1)}function un(ze,$e,Pe){if(ho(ze)){const We=ze.anchor.getNode();if(We.is(Pe)&&ze.format!==We.getFormat())return!1}return $e.nodeType===Tn&&Pe.isAttached()}function po(ze,$e,Pe){yt=!0;const We=performance.now()-Rt>wt;try{tl(ze,()=>{const nt=pa()||Qt(ze),it=new Map,mt=ze.getRootElement(),xt=ze._editorState,qt=ze._blockCursorElement;let Jt=!1,rr="";for(let cr=0;cr<$e.length;cr++){const ir=$e[cr],Kr=ir.type,Zr=ir.target;let Br=Ms(Zr,xt);if(!(Br===null&&Zr!==mt||Ta(Br))){if(Kr==="characterData")We&&Rn(Br)&&un(nt,Zr,Br)&&Ar(Zr,Br,ze);else if(Kr==="childList"){Jt=!0;const Hn=ir.addedNodes;for(let ei=0;ei0){let ei=0;for(let Bo=0;Bo0)for(const[cr,ir]of it)if(qr(ir)){const Kr=ir.getChildrenKeys();let Zr=cr.firstChild;for(let Br=0;Br0){for(let cr=0;cr{po(ze,$e,Pe)})}function Vn(ze,$e){const Pe=ze.__mode,We=ze.__format,nt=ze.__style,it=$e.__mode,mt=$e.__format,xt=$e.__style;return(Pe===null||Pe===it)&&(We===null||We===mt)&&(nt===null||nt===xt)}function Ro(ze,$e){const Pe=ze.mergeWithSibling($e),We=Ra()._normalizedNodes;return We.add(ze.__key),We.add($e.__key),Pe}function Nn(ze){let $e=ze;if($e.__text===""&&$e.isSimpleText()&&!$e.isUnmergeable()){$e.remove();return}let Pe;for(;(Pe=$e.getPreviousSibling())!==null&&Rn(Pe)&&Pe.isSimpleText()&&!Pe.isUnmergeable();)if(Pe.__text==="")Pe.remove();else if(Vn(Pe,$e)){$e=Ro(Pe,$e);break}else break;let We;for(;(We=$e.getNextSibling())!==null&&Rn(We)&&We.isSimpleText()&&!We.isUnmergeable();)if(We.__text==="")We.remove();else if(Vn($e,We)){$e=Ro($e,We);break}else break}function so(ze){return Ei(ze.anchor),Ei(ze.focus),ze}function Ei(ze){for(;ze.type==="element";){const $e=ze.getNode(),Pe=ze.offset;let We,nt;if(Pe===$e.getChildrenSize()?(We=$e.getChildAtIndex(Pe-1),nt=!0):(We=$e.getChildAtIndex(Pe),nt=!1),Rn(We)){ze.set(We.__key,nt?We.getTextContentSize():0,"text");break}else if(!qr(We))break;ze.set(We.__key,nt?We.getChildrenSize():0,"element")}}let Ji=1;function mi(){return""+Ji++}function ks(ze,$e){const Pe=ze._nodes.get($e);if(Pe===void 0)throw Error(`registeredNode: Type ${$e} not found`);return Pe}const Li=typeof queueMicrotask=="function"?queueMicrotask:ze=>{Promise.resolve().then(ze)};function hl(ze){return Ta(Ms(ze))}function Is(ze){const $e=document.activeElement;if($e===null)return!1;const Pe=$e.nodeName;return Ta(Ms(ze))&&(Pe==="INPUT"||Pe==="TEXTAREA"||$e.contentEditable==="true"&&$e.__lexicalEditor==null)}function ea(ze,$e,Pe){const We=ze.getRootElement();try{return We!==null&&We.contains($e)&&We.contains(Pe)&&$e!==null&&!Is($e)&&fi($e)===ze}catch{return!1}}function fi(ze){let $e=ze;for(;$e!=null;){const Pe=$e.__lexicalEditor;if(Pe!=null)return Pe;$e=uc($e)}return null}function aa(ze){return ca.test(ze)?"rtl":Go.test(ze)?"ltr":null}function ta(ze){return ze.isToken()||ze.isSegmented()}function $a(ze){return ze.nodeType===Tn}function ii(ze){let $e=ze;for(;$e!=null;){if($a($e))return $e;$e=$e.firstChild}return null}function ts(ze,$e,Pe){const We=di[$e];if(Pe!==null&&(ze&We)===(Pe&We))return ze;let nt=ze^We;return $e==="subscript"?nt&=~di.superscript:$e==="superscript"&&(nt&=~di.subscript),nt}function as(ze){return Rn(ze)||li(ze)||Ta(ze)}function Ns(ze,$e){if($e!=null){ze.__key=$e;return}Js(),hp();const Pe=Ra(),We=hc(),nt=mi();We._nodeMap.set(nt,ze),qr(ze)?Pe._dirtyElements.set(nt,!0):Pe._dirtyLeaves.add(nt),Pe._cloneNotNeeded.add(nt),Pe._dirtyType=Mn,ze.__key=nt}function Ds(ze,$e,Pe){let We=ze;for(;We!==null;){if(Pe.has(We))return;const nt=$e.get(We);if(nt===void 0)break;Pe.set(We,!1),We=nt.__parent}}function ga(ze){const $e=ze.getParent();if($e!==null){const Pe=ze.getWritable(),We=$e.getWritable(),nt=ze.getPreviousSibling(),it=ze.getNextSibling();if(nt===null)if(it!==null){const mt=it.getWritable();We.__first=it.__key,mt.__prev=null}else We.__first=null;else{const mt=nt.getWritable();if(it!==null){const xt=it.getWritable();xt.__prev=mt.__key,mt.__next=xt.__key}else mt.__next=null;Pe.__prev=null}if(it===null)if(nt!==null){const mt=nt.getWritable();We.__last=nt.__key,mt.__next=null}else We.__last=null;else{const mt=it.getWritable();if(nt!==null){const xt=nt.getWritable();xt.__next=mt.__key,mt.__prev=xt.__key}else mt.__prev=null;Pe.__next=null}We.__size--,Pe.__parent=null}}function vs(ze){hp();const $e=ze.getLatest(),Pe=$e.__parent,We=hc(),nt=Ra(),it=We._nodeMap,mt=nt._dirtyElements;Pe!==null&&Ds(Pe,it,mt);const xt=$e.__key;nt._dirtyType=Mn,qr(ze)?mt.set(xt,!0):nt._dirtyLeaves.add(xt)}function Xl(ze){const $e=ze.getPreviousSibling(),Pe=ze.getNextSibling();$e!==null&&vs($e),Pe!==null&&vs(Pe)}function Qn(ze){Js();const $e=Ra(),Pe=$e._compositionKey;if(ze!==Pe){if($e._compositionKey=ze,Pe!==null){const We=ma(Pe);We!==null&&We.getWritable()}if(ze!==null){const We=ma(ze);We!==null&&We.getWritable()}}}function va(){return cd()?null:Ra()._compositionKey}function ma(ze,$e){const We=($e||hc())._nodeMap.get(ze);return We===void 0?null:We}function Ys(ze,$e){const Pe=Ra(),We=ze[`__lexicalKey_${Pe._key}`];return We!==void 0?ma(We,$e):null}function Ms(ze,$e){let Pe=ze;for(;Pe!=null;){const We=Ys(Pe,$e);if(We!==null)return We;Pe=uc(Pe)}return null}function Qo(ze){const $e=ze._decorators,Pe=Object.assign({},$e);return ze._pendingDecorators=Pe,Pe}function Ls(ze){return ze.read(()=>qn().getTextContent())}function Ol(ze,$e){tl(ze,()=>{const Pe=hc();if(Pe.isEmpty())return;if($e==="root"){qn().markDirty();return}const We=Pe._nodeMap;for(const[,nt]of We)nt.markDirty()},ze._pendingEditorState===null?{tag:"history-merge"}:void 0)}function qn(){return Xs(hc())}function Xs(ze){return ze._nodeMap.get("root")}function yi(ze){Js();const $e=hc();if(ze!==null){if(Object.isFrozen(ze))throw Error("$setSelection called on frozen selection object. Ensure selection is cloned before passing in.");ze.dirty=!0,ze.setCachedNodes(null)}$e._selection=ze}function Zs(){Js();const ze=Ra();In(ze)}function Ya(ze){const $e=Ra(),Pe=Ki(ze,$e);if(Pe===null){const We=$e.getRootElement();return ze===We?ma("root"):null}return ma(Pe)}function Zl(ze,$e){return $e?ze.getTextContentSize():0}function Ki(ze,$e){let Pe=ze;for(;Pe!=null;){const We=Pe[`__lexicalKey_${$e._key}`];if(We!==void 0)return We;Pe=uc(Pe)}return null}function $i(ze){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(ze)}function Ku(ze){const $e=[];let Pe=ze;for(;Pe!==null;)$e.push(Pe),Pe=Pe._parentEditor;return $e}function da(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function ss(ze){return ze.nodeType===Tn?ze.nodeValue:null}function Ur(ze,$e,Pe){const We=tu($e._window);if(We===null)return;const nt=We.anchorNode;let{anchorOffset:it,focusOffset:mt}=We;if(nt!==null){let xt=ss(nt);const qt=Ms(nt);if(xt!==null&&Rn(qt)){if(xt===fo&&Pe){const Jt=Pe.length;xt=Pe,it=Jt,mt=Jt}xt!==null&&gn(qt,xt,it,mt,ze)}}}function gn(ze,$e,Pe,We,nt){let it=ze;if(it.isAttached()&&(nt||!it.isDirty())){const mt=it.isComposing();let xt=$e;(mt||nt)&&$e[$e.length-1]===fo&&(xt=$e.slice(0,-1));const qt=it.getTextContent();if(nt||xt!==qt){if(xt===""){if(Qn(null),!wr&&!xr&&!Bn){const Zr=Ra();setTimeout(()=>{Zr.update(()=>{it.isAttached()&&it.remove()})},20)}else it.remove();return}const Jt=it.getParent(),rr=cs(),ur=it.getTextContentSize(),cr=va(),ir=it.getKey();if(it.isToken()||cr!==null&&ir===cr&&!mt||ho(rr)&&(Jt!==null&&!Jt.canInsertTextBefore()&&rr.anchor.offset===0||rr.anchor.key===ze.__key&&rr.anchor.offset===0&&!it.canInsertTextBefore()&&!mt||rr.focus.key===ze.__key&&rr.focus.offset===ur&&!it.canInsertTextAfter()&&!mt)){it.markDirty();return}const Kr=pa();if(!ho(Kr)||Pe===null||We===null){it.setTextContent(xt);return}if(Kr.setTextNodeRange(it,Pe,it,We),it.isSegmented()){const Zr=it.getTextContent(),Br=Xo(Zr);it.replace(Br),it=Br}it.setTextContent(xt)}}}function So(ze){const $e=ze.getPreviousSibling();return(Rn($e)||qr($e)&&$e.isInline())&&!$e.canInsertTextAfter()}function To(ze,$e){if($e.isSegmented())return!0;if(!ze.isCollapsed())return!1;const Pe=ze.anchor.offset,We=$e.getParentOrThrow(),nt=$e.isToken();return Pe===0?!$e.canInsertTextBefore()||!We.canInsertTextBefore()||nt||So($e):Pe===$e.getTextContentSize()?!$e.canInsertTextAfter()||!We.canInsertTextAfter()||nt:!1}function Kn(ze,$e,Pe,We){return ze===9&&!$e&&!Pe&&!We}function zn(ze,$e,Pe,We){return ze===66&&!$e&&yu(Pe,We)}function ai(ze,$e,Pe,We){return ze===73&&!$e&&yu(Pe,We)}function wi(ze,$e,Pe,We){return ze===85&&!$e&&yu(Pe,We)}function ra(ze,$e){return Ri(ze)&&!$e}function rs(ze,$e){return Ri(ze)&&$e}function Xa(ze,$e){return kt&&$e&&ze===79}function Ql(ze,$e,Pe){return ya(ze)&&(kt?$e:Pe)}function Jl(ze,$e,Pe){return _u(ze)&&(kt?$e:Pe)}function Uu(ze,$e){return kt&&$e&&ya(ze)}function Ui(ze,$e){return kt&&$e&&_u(ze)}function Oc(ze,$e,Pe,We){return kt?$e||Pe?!1:ya(ze)||ze===72&&We:We||$e||Pe?!1:ya(ze)}function Et(ze,$e,Pe,We,nt){return kt?Pe||We||nt?!1:_u(ze)||ze===68&&$e:$e||We||nt?!1:_u(ze)}function Zt(ze,$e,Pe,We){return ze===90&&!$e&&yu(Pe,We)}function $r(ze,$e,Pe,We){return kt?ze===90&&Pe&&$e:ze===89&&We||ze===90&&We&&$e}function Nr(ze,$e,Pe,We){return $e?!1:ze===67?kt?Pe:We:!1}function mn(ze,$e,Pe,We){return $e?!1:ze===88?kt?Pe:We:!1}function Xn(ze){return ze===37}function Pn(ze){return ze===39}function Io(ze){return ze===38}function Jo(ze){return ze===40}function Pi(ze,$e,Pe,We){return Xn(ze)&&!$e&&!We&&!Pe}function Uo(ze,$e,Pe,We,nt){return Xn(ze)&&!We&&!Pe&&($e||nt)}function Wi(ze,$e,Pe,We){return Pn(ze)&&!$e&&!We&&!Pe}function si(ze,$e,Pe,We,nt){return Pn(ze)&&!We&&!Pe&&($e||nt)}function fa(ze,$e,Pe){return Io(ze)&&!$e&&!Pe}function gi(ze,$e,Pe){return Jo(ze)&&!$e&&!Pe}function gl(ze,$e,Pe,We){return ze||$e||Pe||We}function kl(ze){return ze===32}function yu(ze,$e){return kt?ze:$e}function Ri(ze){return ze===13}function ya(ze){return ze===8}function kc(ze){return ze===27}function _u(ze){return ze===46}function Ic(ze,$e,Pe){return ze===65&&yu($e,Pe)}function wf(){const ze=qn(),$e=ze.select(0,ze.getChildrenSize());yi(so($e))}function Nc(ze,$e){ze.__lexicalClassNameCache===void 0&&(ze.__lexicalClassNameCache={});const Pe=ze.__lexicalClassNameCache,We=Pe[$e];if(We!==void 0)return We;const nt=ze[$e];if(typeof nt=="string"){const it=nt.split(" ");return Pe[$e]=it,it}return nt}function rd(ze,$e,Pe,We,nt){if(Pe.size===0)return;const it=We.__type,mt=We.__key,xt=$e.get(it);if(xt===void 0)throw Error(`Type ${it} not in registeredNodes`);const qt=xt.klass;let Jt=ze.get(qt);Jt===void 0&&(Jt=new Map,ze.set(qt,Jt));const rr=Jt.get(mt),ur=rr==="destroyed"&&nt==="created";(rr===void 0||ur)&&Jt.set(mt,ur?"updated":nt)}function Wu(ze){const $e=hc(),Pe=$e._readOnly,We=ze.getType(),nt=$e._nodeMap,it=[];for(const[,mt]of nt)mt instanceof ze&&mt.__type===We&&(Pe||mt.isAttached())&&it.push(mt);return it}function xd(ze,$e,Pe){const We=ze.getParent();let nt=Pe,it=ze;return We!==null&&($e&&Pe===0?(nt=it.getIndexWithinParent(),it=We):!$e&&Pe===it.getChildrenSize()&&(nt=it.getIndexWithinParent()+1,it=We)),it.getChildAtIndex($e?nt-1:nt)}function lc(ze,$e){const Pe=ze.offset;if(ze.type==="element"){const We=ze.getNode();return xd(We,$e,Pe)}else{const We=ze.getNode();if($e&&Pe===0||!$e&&Pe===We.getTextContentSize()){const nt=$e?We.getPreviousSibling():We.getNextSibling();return nt===null?xd(We.getParentOrThrow(),$e,We.getIndexWithinParent()+($e?0:1)):nt}}return null}function Sd(ze){const $e=Ia(ze).event,Pe=$e&&$e.inputType;return Pe==="insertFromPaste"||Pe==="insertFromPasteAsQuotation"}function Fn(ze,$e,Pe){return Oo(ze,$e,Pe)}function Hl(ze){return!Gi(ze)&&!ze.isLastChild()&&!ze.isInline()}function nd(ze,$e){const Pe=ze._keyToDOMMap.get($e);if(Pe===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${$e}`);return Pe}function uc(ze){const $e=ze.assignedSlot||ze.parentElement;return $e!==null&&$e.nodeType===11?$e.host:$e}function bu(ze,$e,Pe){const We=Pe.ownerDocument,nt=We.defaultView;if(nt===null)return;let{top:it,bottom:mt}=$e,xt=0,qt=0,Jt=Pe;for(;Jt!==null;){const rr=Jt===We.body;if(rr)xt=0,qt=Ia(ze).innerHeight;else{const cr=Jt.getBoundingClientRect();xt=cr.top,qt=cr.bottom}let ur=0;if(itqt&&(ur=mt-qt),ur!==0)if(rr)nt.scrollBy(0,ur);else{const cr=Jt.scrollTop;Jt.scrollTop+=ur;const ir=Jt.scrollTop-cr;it-=ir,mt-=ir}if(rr)break;Jt=uc(Jt)}}function ys(ze){return Ra()._updateTags.has(ze)}function Jn(ze){Js(),Ra()._updateTags.add(ze)}function Eu(ze){const $e=pa();if(!ho($e)||!qr(ze))return $e;const{anchor:Pe,focus:We}=$e,nt=Pe.getNode(),it=We.getNode();return Dc(nt,ze)&&Pe.set(ze.__key,0,"element"),Dc(it,ze)&&We.set(ze.__key,0,"element"),$e}function Dc(ze,$e){let Pe=ze.getParent();for(;Pe!==null;){if(Pe.is($e))return!0;Pe=Pe.getParent()}return!1}function ll(ze){const $e=ze.ownerDocument;return $e&&$e.defaultView||null}function Ia(ze){const $e=ze._window;if($e===null)throw Error("window object not found");return $e}function Oi(ze){return qr(ze)&&ze.isInline()||Ta(ze)&&ze.isInline()}function ls(ze){let $e=ze.getParentOrThrow();for(;$e!==null;){if(eu($e))return $e;$e=$e.getParentOrThrow()}return $e}function eu(ze){return Gi(ze)||qr(ze)&&ze.isShadowRoot()}function Mc(ze){const $e=ze.constructor.clone(ze);return Ns($e,null),$e}function Gl(ze){const $e=Ra(),Pe=ze.constructor.getType(),We=$e._nodes.get(Pe);if(We===void 0)throw Error('$initializeNode failed. Ensure node has been registered to the editor. You can do this by passing the node class via the "nodes" array in the editor config.');const nt=We.replace;if(nt!==null){const it=nt(ze);if(!(it instanceof ze.constructor))throw Error("$initializeNode failed. Ensure replacement node is a subclass of the original node.");return it}return ze}function xu(ze,$e){const Pe=ze.getParent();if(Gi(Pe)&&!qr($e)&&!Ta($e))throw Error("Only element or decorator nodes can be inserted in to the root node")}function Wo(ze){const $e=ze.theme,Pe=document.createElement("div");Pe.contentEditable="false",Pe.setAttribute("data-lexical-cursor","true");let We=$e.blockCursor;if(We!==void 0){if(typeof We=="string"){const nt=We.split(" ");We=$e.blockCursor=nt}We!==void 0&&Pe.classList.add(...We)}return Pe}function Su(ze){return(Ta(ze)||qr(ze)&&!ze.canBeEmpty())&&!ze.isInline()}function Il(ze,$e,Pe){Pe.style.removeProperty("caret-color"),$e._blockCursorElement=null;const We=ze.parentElement;We!==null&&We.removeChild(ze)}function od(ze,$e,Pe){let We=ze._blockCursorElement;if(ho(Pe)&&Pe.isCollapsed()&&Pe.anchor.type==="element"&&$e.contains(document.activeElement)){const nt=Pe.anchor,it=nt.getNode(),mt=nt.offset,xt=it.getChildrenSize();let qt=!1,Jt=null;if(mt===xt){const rr=it.getChildAtIndex(mt-1);Su(rr)&&(qt=!0)}else{const rr=it.getChildAtIndex(mt);if(Su(rr)){const ur=rr.getPreviousSibling();(ur===null||Su(ur))&&(qt=!0,Jt=ze.getElementByKey(rr.__key))}}if(qt){const rr=ze.getElementByKey(it.__key);We===null&&(ze._blockCursorElement=We=Wo(ze._config)),$e.style.caretColor="transparent",Jt===null?rr.appendChild(We):rr.insertBefore(We,Jt);return}}We!==null&&Il(We,ze,$e)}function tu(ze){return It?(ze||window).getSelection():null}function up(ze,$e){let Pe=ze.getChildAtIndex($e);if(Pe==null&&(Pe=ze),eu(ze))throw Error("Can not call $splitNode() on root element");const We=mt=>{const xt=mt.getParentOrThrow(),qt=eu(xt),Jt=mt===Pe&&!qt?mt:Mc(mt);if(qt){if(!(qr(mt)&&qr(Jt)))throw Error("Children of a root must be ElementNode");return mt.insertAfter(Jt),[mt,Jt,Jt]}else{const[rr,ur,cr]=We(xt),ir=mt.getNextSiblings();return cr.append(Jt,...ir),[rr,ur,Jt]}},[nt,it]=We(Pe);return[nt,it]}function Td(ze){return ad(ze)&&ze.tagName==="A"}function ad(ze){return ze.nodeType===1}function Ps(ze){if(Ta(ze)&&!ze.isInline())return!0;if(!qr(ze)||eu(ze))return!1;const $e=ze.getFirstChild(),Pe=$e===null||li($e)||Rn($e)||$e.isInline();return!ze.isInline()&&ze.canBeEmpty()!==!1&&Pe}function Tu(ze,$e){let Pe=ze;for(;Pe!==null&&Pe.getParent()!==null&&!$e(Pe);)Pe=Pe.getParentOrThrow();return $e(Pe)?Pe:null}function Rf(){return Ra()}function Cu(ze,$e){const Pe=ze._decorators;let nt=ze._pendingDecorators||Pe;const it=$e._nodeMap;let mt;for(mt in nt)it.has(mt)||(nt===Pe&&(nt=Qo(ze)),delete nt[mt])}function nf(ze,$e,Pe,We,nt,it){let mt=ze.getFirstChild();for(;mt!==null;){const xt=mt.__key;mt.__parent===$e&&(qr(mt)&&nf(mt,xt,Pe,We,nt,it),Pe.has(xt)||it.delete(xt),nt.push(xt)),mt=mt.getNextSibling()}}function Yu(ze,$e,Pe,We){const nt=ze._nodeMap,it=$e._nodeMap,mt=[];for(const[xt]of We){const qt=it.get(xt);qt!==void 0&&(qt.isAttached()||(qr(qt)&&nf(qt,xt,nt,it,mt,We),nt.has(xt)||We.delete(xt),mt.push(xt)))}for(const xt of mt)it.delete(xt);for(const xt of Pe){const qt=it.get(xt);qt!==void 0&&!qt.isAttached()&&(nt.has(xt)||Pe.delete(xt),it.delete(xt))}}let Co="",za="",Vl="",Xu,ul,Lc,Of=!1,Zu=!1,gr,Fr=null,_r,vn,eo,ti,ba,Ii;function vl(ze,$e){const Pe=eo.get(ze);if($e!==null){const We=rc(ze);We.parentNode===$e&&$e.removeChild(We)}if(ti.has(ze)||ul._keyToDOMMap.delete(ze),qr(Pe)){const We=us(Pe,eo);Ha(We,0,We.length-1,null)}Pe!==void 0&&rd(Ii,Lc,gr,Pe,"destroyed")}function Ha(ze,$e,Pe,We){let nt=$e;for(;nt<=Pe;++nt){const it=ze[nt];it!==void 0&&vl(it,We)}}function Yi(ze,$e){ze.setProperty("text-align",$e)}const Ni="40px";function Qu(ze,$e){const Pe=Xu.theme.indent;if(typeof Pe=="string"){const nt=ze.classList.contains(Pe);$e>0&&!nt?ze.classList.add(Pe):$e<1&&nt&&ze.classList.remove(Pe)}const We=getComputedStyle(ze).getPropertyValue("--lexical-indent-base-value")||Ni;ze.style.setProperty("padding-inline-start",$e===0?"":`calc(${$e} * ${We})`)}function Au(ze,$e){const Pe=ze.style;$e===0?Yi(Pe,""):$e===Eo?Yi(Pe,"left"):$e===vo?Yi(Pe,"center"):$e===Fo?Yi(Pe,"right"):$e===Ln?Yi(Pe,"justify"):$e===xn?Yi(Pe,"start"):$e===Ko&&Yi(Pe,"end")}function cc(ze,$e,Pe){const We=ti.get(ze);if(We===void 0)throw Error("createNode: node does not exist in nodeMap");const nt=We.createDOM(Xu,ul);if(Bs(ze,nt,ul),Rn(We)?nt.setAttribute("data-lexical-text","true"):Ta(We)&&nt.setAttribute("data-lexical-decorator","true"),qr(We)){const it=We.__indent,mt=We.__size;if(it!==0&&Qu(nt,it),mt!==0){const qt=mt-1,Jt=us(We,ti);sd(Jt,qt,We,nt)}const xt=We.__format;xt!==0&&Au(nt,xt),We.isInline()||Ju(null,We,nt),Hl(We)&&(Co+=Wn,Vl+=Wn)}else{const it=We.getTextContent();if(Ta(We)){const mt=We.decorate(ul,Xu);mt!==null&&Fi(ze,mt),nt.contentEditable="false"}else Rn(We)&&(We.isDirectionless()||(za+=it));Co+=it,Vl+=it}if($e!==null)if(Pe!=null)$e.insertBefore(nt,Pe);else{const it=$e.__lexicalLineBreak;it!=null?$e.insertBefore(nt,it):$e.appendChild(nt)}return Object.freeze(We),rd(Ii,Lc,gr,We,"created"),nt}function sd(ze,$e,Pe,We){const nt=za;za="",Si(ze,Pe,0,$e,We,null),On(Pe,We),za=nt}function Si(ze,$e,Pe,We,nt,it){const mt=Co;Co="";let xt=Pe;for(;xt<=We;++xt)cc(ze[xt],nt,it);Hl($e)&&(Co+=Wn),nt.__lexicalTextContent=Co,Co=mt+Co}function ql(ze,$e){const Pe=$e.get(ze);return li(Pe)||Ta(Pe)&&Pe.isInline()}function Ju(ze,$e,Pe){const We=ze!==null&&(ze.__size===0||ql(ze.__last,eo)),nt=$e.__size===0||ql($e.__last,ti);if(We){if(!nt){const it=Pe.__lexicalLineBreak;it!=null&&Pe.removeChild(it),Pe.__lexicalLineBreak=null}}else if(nt){const it=document.createElement("br");Pe.__lexicalLineBreak=it,Pe.appendChild(it)}}function On(ze,$e){const Pe=$e.__lexicalDirTextContent,We=$e.__lexicalDir;if(Pe!==za||We!==Fr){const nt=za==="",it=nt?Fr:aa(za);if(it!==We){const mt=$e.classList,xt=Xu.theme;let qt=We!==null?xt[We]:void 0,Jt=it!==null?xt[it]:void 0;if(qt!==void 0){if(typeof qt=="string"){const rr=qt.split(" ");qt=xt[We]=rr}mt.remove(...qt)}if(it===null||nt&&it==="ltr")$e.removeAttribute("dir");else{if(Jt!==void 0){if(typeof Jt=="string"){const rr=Jt.split(" ");Jt=xt[it]=rr}Jt!==void 0&&mt.add(...Jt)}$e.dir=it}if(!Zu){const rr=ze.getWritable();rr.__dir=it}}Fr=it,$e.__lexicalDirTextContent=za,$e.__lexicalDir=it}}function Cd(ze,$e,Pe){const We=za;za="",ml(ze,$e,Pe),On($e,Pe),za=We}function us(ze,$e){const Pe=[];let We=ze.__first;for(;We!==null;){const nt=$e.get(We);if(nt===void 0)throw Error("createChildrenArray: node does not exist in nodeMap");Pe.push(We),We=nt.__next}return Pe}function ml(ze,$e,Pe){const We=Co,nt=ze.__size,it=$e.__size;if(Co="",nt===1&&it===1){const mt=ze.__first,xt=$e.__first;if(mt===xt)ec(mt,Pe);else{const qt=rc(mt),Jt=cc(xt,null,null);Pe.replaceChild(Jt,qt),vl(mt,null)}}else{const mt=us(ze,eo),xt=us($e,ti);if(nt===0)it!==0&&Si(xt,$e,0,it-1,Pe,null);else if(it===0){if(nt!==0){const Jt=Pe.__lexicalLineBreak==null;Ha(mt,0,nt-1,Jt?null:Pe),Jt&&(Pe.textContent="")}}else ru($e,mt,xt,nt,it,Pe)}Hl($e)&&(Co+=Wn),Pe.__lexicalTextContent=Co,Co=We+Co}function ec(ze,$e){const Pe=eo.get(ze);let We=ti.get(ze);if(Pe===void 0||We===void 0)throw Error("reconcileNode: prevNode or nextNode does not exist in nodeMap");const nt=Of||vn.has(ze)||_r.has(ze),it=nd(ul,ze);if(Pe===We&&!nt){if(qr(Pe)){const mt=it.__lexicalTextContent;mt!==void 0&&(Co+=mt,Vl+=mt);const xt=it.__lexicalDirTextContent;xt!==void 0&&(za+=xt)}else{const mt=Pe.getTextContent();Rn(Pe)&&!Pe.isDirectionless()&&(za+=mt),Vl+=mt,Co+=mt}return it}if(Pe!==We&&nt&&rd(Ii,Lc,gr,We,"updated"),We.updateDOM(Pe,it,Xu)){const mt=cc(ze,null,null);if($e===null)throw Error("reconcileNode: parentDOM is null");return $e.replaceChild(mt,it),vl(ze,null),mt}if(qr(Pe)&&qr(We)){const mt=We.__indent;mt!==Pe.__indent&&Qu(it,mt);const xt=We.__format;xt!==Pe.__format&&Au(it,xt),nt&&(Cd(Pe,We,it),!Gi(We)&&!We.isInline()&&Ju(Pe,We,it)),Hl(We)&&(Co+=Wn,Vl+=Wn)}else{const mt=We.getTextContent();if(Ta(We)){const xt=We.decorate(ul,Xu);xt!==null&&Fi(ze,xt)}else Rn(We)&&!We.isDirectionless()&&(za+=mt);Co+=mt,Vl+=mt}if(!Zu&&Gi(We)&&We.__cachedText!==Vl){const mt=We.getWritable();mt.__cachedText=Vl,We=mt}return Object.freeze(We),it}function Fi(ze,$e){let Pe=ul._pendingDecorators;const We=ul._decorators;if(Pe===null){if(We[ze]===$e)return;Pe=Qo(ul)}Pe[ze]=$e}function Pc(ze){return ze.firstChild}function an(ze){let $e=ze.nextSibling;return $e!==null&&$e===ul._blockCursorElement&&($e=$e.nextSibling),$e}function ru(ze,$e,Pe,We,nt,it){const mt=We-1,xt=nt-1;let qt,Jt,rr=Pc(it),ur=0,cr=0;for(;ur<=mt&&cr<=xt;){const Zr=$e[ur],Br=Pe[cr];if(Zr===Br)rr=an(ec(Br,it)),ur++,cr++;else{qt===void 0&&(qt=new Set($e)),Jt===void 0&&(Jt=new Set(Pe));const Hn=Jt.has(Zr),en=qt.has(Br);if(!Hn)rr=an(rc(Zr)),vl(Zr,it),ur++;else if(!en)cc(Br,it,rr),cr++;else{const kn=nd(ul,Br);kn===rr?rr=an(ec(Br,it)):(rr!=null?it.insertBefore(kn,rr):it.appendChild(kn),ec(Br,it)),ur++,cr++}}}const ir=ur>mt,Kr=cr>xt;if(ir&&!Kr){const Zr=Pe[xt+1],Br=Zr===void 0?null:ul.getElementByKey(Zr);Si(Pe,ze,cr,xt,it,Br)}else Kr&&!ir&&Ha($e,ur,mt,it)}function tc(ze,$e,Pe,We,nt,it){Co="",Vl="",za="",Of=We===bo,Fr=null,ul=Pe,Xu=Pe._config,Lc=Pe._nodes,gr=ul._listeners.mutation,_r=nt,vn=it,eo=ze._nodeMap,ti=$e._nodeMap,Zu=$e._readOnly,ba=new Map(Pe._keyToDOMMap);const mt=new Map;return Ii=mt,ec("root",null),ul=void 0,Lc=void 0,_r=void 0,vn=void 0,eo=void 0,ti=void 0,Xu=void 0,ba=void 0,Ii=void 0,mt}function Bs(ze,$e,Pe){const We=Pe._keyToDOMMap;$e["__lexicalKey_"+Pe._key]=ze,We.set(ze,$e)}function rc(ze){const $e=ba.get(ze);if($e===void 0)throw Error(`Reconciliation: could not find DOM element for node key ${ze}`);return $e}const nu=Object.freeze({}),cl=30,ou=[["keydown",Po],["pointerdown",er],["compositionstart",$n],["compositionend",Vo],["input",Pr],["click",Bt],["cut",nu],["copy",nu],["dragstart",nu],["dragover",nu],["dragend",nu],["paste",nu],["focus",nu],["blur",nu],["drop",nu]];tr&&ou.push(["beforeinput",(ze,$e)=>Wr(ze,$e)]);let Nl=0,kf=0,xi=0,$u=null,dl=0,yl=!1,Le=!1,ye=!1,Ne=!1,Ye=[0,"",0,"root",0];function st(ze,$e,Pe,We,nt){const it=ze.anchor,mt=ze.focus,xt=it.getNode(),qt=Ra(),Jt=tu(qt._window),rr=Jt!==null?Jt.anchorNode:null,ur=it.key,cr=qt.getElementByKey(ur),ir=Pe.length;return ur!==mt.key||!Rn(xt)||(!nt&&(!tr||xi1||(nt||!tr)&&cr!==null&&!xt.isComposing()&&rr!==ii(cr)||Jt!==null&&$e!==null&&(!$e.collapsed||$e.startContainer!==Jt.anchorNode||$e.startOffset!==Jt.anchorOffset)||xt.getFormat()!==ze.format||xt.getStyle()!==ze.style||To(ze,xt)}function ft(ze,$e){return ze!==null&&ze.nodeValue!==null&&ze.nodeType===Tn&&$e!==0&&$e!==ze.nodeValue.length}function vt(ze,$e,Pe){const{anchorNode:We,anchorOffset:nt,focusNode:it,focusOffset:mt}=ze;yl&&(yl=!1,ft(We,nt)&&ft(it,mt))||tl($e,()=>{if(!Pe){yi(null);return}if(!ea($e,We,it))return;const xt=pa();if(ho(xt)){const qt=xt.anchor,Jt=qt.getNode();if(xt.isCollapsed()){ze.type==="Range"&&ze.anchorNode===ze.focusNode&&(xt.dirty=!0);const rr=Ia($e).event,ur=rr?rr.timeStamp:performance.now(),[cr,ir,Kr,Zr,Br]=Ye,Hn=qn(),en=$e.isComposing()===!1&&Hn.getTextContent()==="";if(ur{const Pe=pa(),We=tu($e._window),nt=cs();if(We){if(ho(Pe)){const it=Pe.anchor,mt=it.getNode();if(it.type==="element"&&it.offset===0&&Pe.isCollapsed()&&!Gi(mt)&&qn().getChildrenSize()===1&&mt.getTopLevelElementOrThrow().isEmpty()&&nt!==null&&Pe.is(nt))We.removeAllRanges(),Pe.dirty=!0;else if(ze.detail===3&&!Pe.isCollapsed()){const qt=Pe.focus.getNode();mt!==qt&&(qr(mt)?mt.select(0):mt.getParentOrThrow().select(0))}}else if(ze.pointerType==="touch"){const it=We.anchorNode;if(it!==null){const mt=it.nodeType;if(mt===An||mt===Tn){const xt=Vd(nt,We,$e,ze);yi(xt)}}}}Fn($e,O,ze)})}function er(ze,$e){const Pe=ze.target,We=ze.pointerType;Pe instanceof Node&&We!=="touch"&&tl($e,()=>{hl(Pe)||(Le=!0)})}function br(ze){if(!ze.getTargetRanges)return null;const $e=ze.getTargetRanges();return $e.length===0?null:$e[0]}function dn(ze,$e){return ze!==$e||qr(ze)||qr($e)||!ze.isToken()||!$e.isToken()}function yn(ze){return kf===229&&ze{const nt=pa();if(Pe==="deleteContentBackward"){if(nt===null){const rr=cs();if(!ho(rr))return;yi(rr.clone())}if(ho(nt)){if(Vr&&Qn(nt.anchor.key),yn(ze.timeStamp)&&$e.isComposing()&&nt.anchor.key===nt.focus.key){if(Qn(null),Nl=0,setTimeout(()=>{tl($e,()=>{Qn(null)})},cl),ho(nt)){const ur=nt.anchor.getNode();if(ur.markDirty(),nt.format=ur.getFormat(),!Rn(ur))throw Error("Anchor node must be a TextNode");nt.style=ur.getStyle()}nt.anchor.getNode().getTextContent().length<=1&&(ze.preventDefault(),Fn($e,I,!0))}else Qn(null),ze.preventDefault(),Fn($e,I,!0);return}}if(!ho(nt))return;const it=ze.data;$u!==null&&Ur(!1,$e,$u),(!nt.dirty||$u!==null)&&nt.isCollapsed()&&!Gi(nt.anchor.getNode())&&We!==null&&nt.applyDOMRange(We),$u=null;const mt=nt.anchor,xt=nt.focus,qt=mt.getNode(),Jt=xt.getNode();if(Pe==="insertText"||Pe==="insertTranspose"){if(it===` -`)ze.preventDefault(),Fn($e,N,!1);else if(it===Wn)ze.preventDefault(),Fn($e,L,void 0);else if(it==null&&ze.dataTransfer){const rr=ze.dataTransfer.getData("text/plain");ze.preventDefault(),nt.insertRawText(rr)}else it!=null&&st(nt,We,it,ze.timeStamp,!0)?(ze.preventDefault(),Fn($e,B,it)):$u=it;xi=ze.timeStamp;return}switch(ze.preventDefault(),Pe){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":{Fn($e,B,ze);break}case"insertFromComposition":{Qn(null),Fn($e,B,ze);break}case"insertLineBreak":{Qn(null),Fn($e,N,!1);break}case"insertParagraph":{Qn(null),ye&&!xr?(ye=!1,Fn($e,N,!1)):Fn($e,L,void 0);break}case"insertFromPaste":case"insertFromPasteAsQuotation":{Fn($e,j,ze);break}case"deleteByComposition":{dn(qt,Jt)&&Fn($e,F,ze);break}case"deleteByDrag":case"deleteByCut":{Fn($e,F,ze);break}case"deleteContent":{Fn($e,I,!1);break}case"deleteWordBackward":{Fn($e,V,!0);break}case"deleteWordForward":{Fn($e,V,!1);break}case"deleteHardLineBackward":case"deleteSoftLineBackward":{Fn($e,K,!0);break}case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":{Fn($e,K,!1);break}case"formatStrikeThrough":{Fn($e,W,"strikethrough");break}case"formatBold":{Fn($e,W,"bold");break}case"formatItalic":{Fn($e,W,"italic");break}case"formatUnderline":{Fn($e,W,"underline");break}case"historyUndo":{Fn($e,X,void 0);break}case"historyRedo":{Fn($e,J,void 0);break}}})}function Pr(ze,$e){ze.stopPropagation(),tl($e,()=>{const Pe=pa(),We=ze.data,nt=br(ze);if(We!=null&&ho(Pe)&&st(Pe,nt,We,ze.timeStamp,!1)){Ne&&(Ao($e,We),Ne=!1);const it=Pe.anchor,mt=it.getNode(),xt=tu($e._window);if(xt===null)return;const qt=it.offset;(!tr||Pe.isCollapsed()||!Rn(mt)||xt.anchorNode===null||mt.getTextContent().slice(0,qt)+We+mt.getTextContent().slice(qt+Pe.focus.offset)!==ss(xt.anchorNode))&&Fn($e,B,We);const Jt=We.length;Kt&&Jt>1&&ze.inputType==="insertCompositionText"&&!$e.isComposing()&&(Pe.anchor.offset-=Jt),!wr&&!xr&&!Bn&&$e.isComposing()&&(Nl=0,Qn(null))}else Ur(!1,$e,We!==null?We:void 0),Ne&&(Ao($e,We||void 0),Ne=!1);Zs()}),$u=null}function $n(ze,$e){tl($e,()=>{const Pe=pa();if(ho(Pe)&&!$e.isComposing()){const We=Pe.anchor,nt=Pe.anchor.getNode();Qn(We.key),(ze.timeStamp{Ao($e,ze.data)})}function Po(ze,$e){if(Nl=ze.timeStamp,kf=ze.keyCode,$e.isComposing())return;const{keyCode:Pe,shiftKey:We,ctrlKey:nt,metaKey:it,altKey:mt}=ze;if(!Fn($e,oe,ze)){if(Wi(Pe,nt,mt,it))Fn($e,pe,ze);else if(si(Pe,nt,We,mt,it))Fn($e,me,ze);else if(Pi(Pe,nt,mt,it))Fn($e,xe,ze);else if(Uo(Pe,nt,We,mt,it))Fn($e,Ae,ze);else if(fa(Pe,nt,it))Fn($e,ge,ze);else if(gi(Pe,nt,it))Fn($e,Te,ze);else if(rs(Pe,We))ye=!0,Fn($e,we,ze);else if(kl(Pe))Fn($e,ke,ze);else if(Xa(Pe,nt))ze.preventDefault(),ye=!0,Fn($e,N,!0);else if(ra(Pe,We))ye=!1,Fn($e,we,ze);else if(Oc(Pe,mt,it,nt))ya(Pe)?Fn($e,Be,ze):(ze.preventDefault(),Fn($e,I,!0));else if(kc(Pe))Fn($e,Ie,ze);else if(Et(Pe,nt,We,mt,it))_u(Pe)?Fn($e,je,ze):(ze.preventDefault(),Fn($e,I,!1));else if(Ql(Pe,mt,nt))ze.preventDefault(),Fn($e,V,!0);else if(Jl(Pe,mt,nt))ze.preventDefault(),Fn($e,V,!1);else if(Uu(Pe,it))ze.preventDefault(),Fn($e,K,!0);else if(Ui(Pe,it))ze.preventDefault(),Fn($e,K,!1);else if(zn(Pe,mt,it,nt))ze.preventDefault(),Fn($e,W,"bold");else if(wi(Pe,mt,it,nt))ze.preventDefault(),Fn($e,W,"underline");else if(ai(Pe,mt,it,nt))ze.preventDefault(),Fn($e,W,"italic");else if(Kn(Pe,mt,nt,it))Fn($e,Ke,ze);else if(Zt(Pe,We,it,nt))ze.preventDefault(),Fn($e,X,void 0);else if($r(Pe,We,it,nt))ze.preventDefault(),Fn($e,J,void 0);else{const xt=$e._editorState._selection;la(xt)?Nr(Pe,We,it,nt)?(ze.preventDefault(),Fn($e,Qe,ze)):mn(Pe,We,it,nt)?(ze.preventDefault(),Fn($e,lt,ze)):Ic(Pe,it,nt)&&(ze.preventDefault(),Fn($e,ht,ze)):!Kt&&Ic(Pe,it,nt)&&(ze.preventDefault(),Fn($e,ht,ze))}gl(nt,We,mt,it)&&Fn($e,bt,ze)}}function Xi(ze){let $e=ze.__lexicalEventHandles;return $e===void 0&&($e=[],ze.__lexicalEventHandles=$e),$e}const _s=new Map;function Fs(ze){const $e=ze.target,Pe=$e==null?null:$e.nodeType===9?$e.defaultView:$e.ownerDocument.defaultView,We=tu(Pe);if(We===null)return;const nt=fi(We.anchorNode);if(nt===null)return;Le&&(Le=!1,tl(nt,()=>{const rr=cs(),ur=We.anchorNode;if(ur===null)return;const cr=ur.nodeType;if(cr!==An&&cr!==Tn)return;const ir=Vd(rr,We,nt,ze);yi(ir)}));const it=Ku(nt),mt=it[it.length-1],xt=mt._key,qt=_s.get(xt),Jt=qt||mt;Jt!==nt&&vt(We,Jt,!1),vt(We,nt,!0),nt!==mt?_s.set(xt,nt):qt&&_s.delete(xt)}function Dl(ze){ze._lexicalHandled=!0}function iu(ze){return ze._lexicalHandled===!0}function Kl(ze,$e){dl===0&&ze.ownerDocument.addEventListener("selectionchange",Fs),dl++,ze.__lexicalEditor=$e;const Pe=Xi(ze);for(let We=0;We{iu(xt)||(Dl(xt),$e.isEditable()&&it(xt,$e))}:xt=>{if(!iu(xt)&&(Dl(xt),$e.isEditable()))switch(nt){case"cut":return Fn($e,lt,xt);case"copy":return Fn($e,Qe,xt);case"paste":return Fn($e,j,xt);case"dragstart":return Fn($e,et,xt);case"dragover":return Fn($e,dt,xt);case"dragend":return Fn($e,gt,xt);case"focus":return Fn($e,Pt,xt);case"blur":return Fn($e,Vt,xt);case"drop":return Fn($e,tt,xt)}};ze.addEventListener(nt,mt),Pe.push(()=>{ze.removeEventListener(nt,mt)})}}function wu(ze){dl!==0&&(dl--,dl===0&&ze.ownerDocument.removeEventListener("selectionchange",Fs));const $e=ze.__lexicalEditor;$e!=null&&(_l($e),ze.__lexicalEditor=null);const Pe=Xi(ze);for(let We=0;Went.__key===this.__key);return Rn(this)?We:ho(Pe)&&Pe.anchor.type==="element"&&Pe.focus.type==="element"&&Pe.anchor.key===Pe.focus.key&&Pe.anchor.offset===Pe.focus.offset?!1:We}getKey(){return this.__key}getIndexWithinParent(){const $e=this.getParent();if($e===null)return-1;let Pe=$e.getFirstChild(),We=0;for(;Pe!==null;){if(this.is(Pe))return We;We++,Pe=Pe.getNextSibling()}return-1}getParent(){const $e=this.getLatest().__parent;return $e===null?null:ma($e)}getParentOrThrow(){const $e=this.getParent();if($e===null)throw Error(`Expected node ${this.__key} to have a parent.`);return $e}getTopLevelElement(){let $e=this;for(;$e!==null;){const Pe=$e.getParent();if(eu(Pe)){if(!qr($e))throw Error("Children of root nodes must be elements");return $e}$e=Pe}return null}getTopLevelElementOrThrow(){const $e=this.getTopLevelElement();if($e===null)throw Error(`Expected node ${this.__key} to have a top parent element.`);return $e}getParents(){const $e=[];let Pe=this.getParent();for(;Pe!==null;)$e.push(Pe),Pe=Pe.getParent();return $e}getParentKeys(){const $e=[];let Pe=this.getParent();for(;Pe!==null;)$e.push(Pe.__key),Pe=Pe.getParent();return $e}getPreviousSibling(){const Pe=this.getLatest().__prev;return Pe===null?null:ma(Pe)}getPreviousSiblings(){const $e=[],Pe=this.getParent();if(Pe===null)return $e;let We=Pe.getFirstChild();for(;We!==null&&!We.is(this);)$e.push(We),We=We.getNextSibling();return $e}getNextSibling(){const Pe=this.getLatest().__next;return Pe===null?null:ma(Pe)}getNextSiblings(){const $e=[];let Pe=this.getNextSibling();for(;Pe!==null;)$e.push(Pe),Pe=Pe.getNextSibling();return $e}getCommonAncestor($e){const Pe=this.getParents(),We=$e.getParents();qr(this)&&Pe.unshift(this),qr($e)&&We.unshift($e);const nt=Pe.length,it=We.length;if(nt===0||it===0||Pe[nt-1]!==We[it-1])return null;const mt=new Set(We);for(let xt=0;xt{xt.append(Zr)})}if(ho(We)){yi(We);const Zr=We.anchor,Br=We.focus;Zr.key===it&&Ll(Zr,xt),Br.key===it&&Ll(Br,xt)}return va()===it&&Qn(mt),xt}insertAfter($e,Pe=!0){Js(),xu(this,$e);const We=this.getWritable(),nt=$e.getWritable(),it=nt.getParent(),mt=pa();let xt=!1,qt=!1;if(it!==null){const ir=$e.getIndexWithinParent();if(ga(nt),ho(mt)){const Kr=it.__key,Zr=mt.anchor,Br=mt.focus;xt=Zr.type==="element"&&Zr.key===Kr&&Zr.offset===ir+1,qt=Br.type==="element"&&Br.key===Kr&&Br.offset===ir+1}}const Jt=this.getNextSibling(),rr=this.getParentOrThrow().getWritable(),ur=nt.__key,cr=We.__next;if(Jt===null)rr.__last=ur;else{const ir=Jt.getWritable();ir.__prev=ur}if(rr.__size++,We.__next=ur,nt.__next=cr,nt.__prev=We.__key,nt.__parent=We.__parent,Pe&&ho(mt)){const ir=this.getIndexWithinParent();Ma(mt,rr,ir+1);const Kr=rr.__key;xt&&mt.anchor.set(Kr,ir+2,"element"),qt&&mt.focus.set(Kr,ir+2,"element")}return $e}insertBefore($e,Pe=!0){Js(),xu(this,$e);const We=this.getWritable(),nt=$e.getWritable(),it=nt.__key;ga(nt);const mt=this.getPreviousSibling(),xt=this.getParentOrThrow().getWritable(),qt=We.__prev,Jt=this.getIndexWithinParent();if(mt===null)xt.__first=it;else{const ur=mt.getWritable();ur.__next=it}xt.__size++,We.__prev=it,nt.__prev=qt,nt.__next=We.__key,nt.__parent=We.__parent;const rr=pa();if(Pe&&ho(rr)){const ur=this.getParentOrThrow();Ma(rr,ur,Jt)}return $e}isParentRequired(){return!1}createParentElementNode(){return Sl()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious($e,Pe){Js();const We=this.getPreviousSibling(),nt=this.getParentOrThrow();if(We===null)return nt.select(0,0);if(qr(We))return We.select();if(!Rn(We)){const it=We.getIndexWithinParent()+1;return nt.select(it,it)}return We.select($e,Pe)}selectNext($e,Pe){Js();const We=this.getNextSibling(),nt=this.getParentOrThrow();if(We===null)return nt.select();if(qr(We))return We.select(0,0);if(!Rn(We)){const it=We.getIndexWithinParent();return nt.select(it,it)}return We.select($e,Pe)}markDirty(){this.getWritable()}}function Za(ze,$e){const Pe=Ra()._nodes.get(ze);if(Pe===void 0)throw Error(`Create node: Attempted to create node ${$e.name} that was not configured to be used on the editor.`);const We=Pe.klass;if(We!==$e)throw Error(`Create node: Type ${ze} in node ${$e.name} does not match registered node ${We.name} with the same type`)}function ri(ze,$e,Pe){const We=Pe||$e.getParentOrThrow().getLastChild();let nt=$e;const it=[$e];for(;nt!==We;){if(!nt.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");nt=nt.getNextSibling(),it.push(nt)}let mt=ze;for(const xt of it)mt=mt.insertAfter(xt)}class nc extends Qs{static getType(){return"linebreak"}static clone($e){return new nc($e.__key)}constructor($e){super($e)}getTextContent(){return` -`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:$e=>io($e)?null:{conversion:wo,priority:0}}}static importJSON($e){return bs()}exportJSON(){return{type:"linebreak",version:1}}}function wo(ze){return{node:bs()}}function bs(){return Gl(new nc)}function li(ze){return ze instanceof nc}function io(ze){const $e=ze.parentElement;if($e!==null){const Pe=$e.firstChild;if(Pe===ze||Pe.nextSibling===ze&&Ti(Pe)){const We=$e.lastChild;if(We===ze||We.previousSibling===ze&&Ti(We))return!0}}return!1}function Ti(ze){return ze.nodeType===Tn&&/^( |\t|\r?\n)+$/.test(ze.textContent||"")}function bl(ze,$e){return $e&fr?"code":$e&nn?"mark":$e&Or?"sub":$e&Jr?"sup":null}function Na(ze,$e){return $e&nr?"strong":$e&Ir?"em":"span"}function No(ze,$e,Pe,We,nt){const it=We.classList;let mt=Nc(nt,"base");mt!==void 0&&it.add(...mt),mt=Nc(nt,"underlineStrikethrough");let xt=!1;const qt=$e&Rr&&$e&jr,Jt=Pe&Rr&&Pe&jr;mt!==void 0&&(Jt?(xt=!0,qt||it.add(...mt)):qt&&it.remove(...mt));for(const rr in di){const cr=di[rr];if(mt=Nc(nt,rr),mt!==void 0)if(Pe&cr){if(xt&&(rr==="underline"||rr==="strikethrough")){$e&cr&&it.remove(...mt);continue}(!($e&cr)||qt&&rr==="underline"||rr==="strikethrough")&&it.add(...mt)}else $e&cr&&it.remove(...mt)}}function wa(ze,$e){const Pe=ze.length,We=$e.length;let nt=0,it=0;for(;nt({conversion:zs,priority:0}),b:()=>({conversion:Qa,priority:0}),code:()=>({conversion:Di,priority:0}),em:()=>({conversion:Di,priority:0}),i:()=>({conversion:Di,priority:0}),s:()=>({conversion:Di,priority:0}),span:()=>({conversion:Ru,priority:0}),strong:()=>({conversion:Di,priority:0}),sub:()=>({conversion:Di,priority:0}),sup:()=>({conversion:Di,priority:0}),u:()=>({conversion:Di,priority:0})}}static importJSON($e){const Pe=Xo($e.text);return Pe.setFormat($e.format),Pe.setDetail($e.detail),Pe.setMode($e.mode),Pe.setStyle($e.style),Pe}exportDOM($e){let{element:Pe}=super.exportDOM($e);if(!(Pe!==null&&ad(Pe)))throw Error("Expected TextNode createDOM to always return a HTMLElement");return Pe.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(Pe=Es(Pe,"b")),this.hasFormat("italic")&&(Pe=Es(Pe,"i")),this.hasFormat("strikethrough")&&(Pe=Es(Pe,"s")),this.hasFormat("underline")&&(Pe=Es(Pe,"u")),{element:Pe}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform($e,Pe){}setFormat($e){const Pe=this.getWritable();return Pe.__format=typeof $e=="string"?di[$e]:$e,Pe}setDetail($e){const Pe=this.getWritable();return Pe.__detail=typeof $e=="string"?Qi[$e]:$e,Pe}setStyle($e){const Pe=this.getWritable();return Pe.__style=$e,Pe}toggleFormat($e){const Pe=this.getFormat(),We=ts(Pe,$e,null);return this.setFormat(We)}toggleDirectionless(){const $e=this.getWritable();return $e.__detail^=Gn,$e}toggleUnmergeable(){const $e=this.getWritable();return $e.__detail^=Zn,$e}setMode($e){const Pe=Dt[$e];if(this.__mode===Pe)return this;const We=this.getWritable();return We.__mode=Pe,We}setTextContent($e){if(this.__text===$e)return this;const Pe=this.getWritable();return Pe.__text=$e,Pe}select($e,Pe){Js();let We=$e,nt=Pe;const it=pa(),mt=this.getTextContent(),xt=this.__key;if(typeof mt=="string"){const qt=mt.length;We===void 0&&(We=qt),nt===void 0&&(nt=qt)}else We=0,nt=0;if(ho(it)){const qt=va();(qt===it.anchor.key||qt===it.focus.key)&&Qn(xt),it.setTextNodeRange(this,We,this,nt)}else return jc(xt,We,xt,nt,"text","text");return it}selectStart(){return this.select(0,0)}selectEnd(){const $e=this.getTextContentSize();return this.select($e,$e)}spliceText($e,Pe,We,nt){const it=this.getWritable(),mt=it.__text,xt=We.length;let qt=$e;qt<0&&(qt=xt+qt,qt<0&&(qt=0));const Jt=pa();if(nt&&ho(Jt)){const ur=$e+xt;Jt.setTextNodeRange(it,ur,it,ur)}const rr=mt.slice(0,qt)+We+mt.slice(qt+Pe);return it.__text=rr,it}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...$e){Js();const Pe=this.getLatest(),We=Pe.getTextContent(),nt=Pe.__key,it=va(),mt=new Set($e),xt=[],qt=We.length;let Jt="";for(let ki=0;kiei&&cu.offset<=Wa&&(cu.key=Ci,cu.offset-=ei,en.dirty=!0),Du.key===nt&&Du.type==="text"&&Du.offset>ei&&Du.offset<=Wa&&(Du.key=Ci,Du.offset-=ei,en.dirty=!0)}it===nt&&Qn(Ci),ei=Wa,kn.push(As)}Xl(this);const Bo=cr.getWritable(),mo=this.getIndexWithinParent();return Hn?(Bo.splice(mo,0,kn),this.remove()):Bo.splice(mo,1,kn),ho(en)&&Ma(en,cr,mo,rr-1),kn}mergeWithSibling($e){const Pe=$e===this.getPreviousSibling();if(!Pe&&$e!==this.getNextSibling())throw Error("mergeWithSibling: sibling must be a previous or next sibling");const We=this.__key,nt=$e.__key,it=this.__text,mt=it.length;va()===nt&&Qn(We);const qt=pa();if(ho(qt)){const cr=qt.anchor,ir=qt.focus;cr!==null&&cr.key===nt&&(xl(cr,Pe,We,$e,mt),qt.dirty=!0),ir!==null&&ir.key===nt&&(xl(ir,Pe,We,$e,mt),qt.dirty=!0)}const Jt=$e.__text,rr=Pe?Jt+it:it+Jt;this.setTextContent(rr);const ur=this.getWritable();return $e.remove(),ur}isTextEntity(){return!1}}function Ru(ze){const $e=ze,Pe=$e.style.fontWeight==="700",We=$e.style.textDecoration==="line-through",nt=$e.style.fontStyle==="italic",it=$e.style.textDecoration==="underline",mt=$e.style.verticalAlign;return{forChild:xt=>(Rn(xt)&&(Pe&&xt.toggleFormat("bold"),We&&xt.toggleFormat("strikethrough"),nt&&xt.toggleFormat("italic"),it&&xt.toggleFormat("underline"),mt==="sub"&&xt.toggleFormat("subscript"),mt==="super"&&xt.toggleFormat("superscript")),xt),node:null}}function Qa(ze){const Pe=ze.style.fontWeight==="normal";return{forChild:We=>(Rn(We)&&!Pe&&We.toggleFormat("bold"),We),node:null}}const If=new WeakMap;function Ou(ze){return ze.nodeName==="PRE"||ze.nodeType===An&&ze.style!==void 0&&ze.style.whiteSpace!==void 0&&ze.style.whiteSpace.startsWith("pre")}function Bc(ze){let $e,Pe=ze.parentNode;const We=[ze];for(;Pe!==null&&($e=If.get(Pe))===void 0&&!Ou(Pe);)We.push(Pe),Pe=Pe.parentNode;const nt=$e===void 0?Pe:$e;for(let it=0;it0){/[ \t\n]$/.test(mt)&&(We=We.slice(1)),it=!1;break}}it&&(We=We.slice(1))}if(We[We.length-1]===" "){let nt=$e,it=!0;for(;nt!==null&&(nt=zi(nt,!0))!==null;)if((nt.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){it=!1;break}it&&(We=We.slice(0,We.length-1))}return We===""?{node:null}:{node:Xo(We)}}const Gd=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function zi(ze,$e){let Pe=ze;for(;;){let We;for(;(We=$e?Pe.nextSibling:Pe.previousSibling)===null;){const it=Pe.parentElement;if(it===null)return null;Pe=it}if(Pe=We,Pe.nodeType===An){const it=Pe.style.display;if(it===""&&Pe.nodeName.match(Gd)===null||it!==""&&!it.startsWith("inline"))return null}let nt=Pe;for(;(nt=$e?Pe.firstChild:Pe.lastChild)!==null;)Pe=nt;if(Pe.nodeType===Tn)return Pe;if(Pe.nodeName==="BR")return null}}const Da={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Di(ze){const $e=Da[ze.nodeName.toLowerCase()];return $e===void 0?{node:null}:{forChild:Pe=>(Rn(Pe)&&!Pe.hasFormat($e)&&Pe.toggleFormat($e),Pe),node:null}}function Xo(ze=""){return Gl(new xs(ze))}function Rn(ze){return ze instanceof xs}class Va extends xs{static getType(){return"tab"}static clone($e){const Pe=new Va($e.__key);return Pe.__text=$e.__text,Pe.__format=$e.__format,Pe.__style=$e.__style,Pe}constructor($e){super(" ",$e),this.__detail=Zn}static importDOM(){return null}static importJSON($e){const Pe=sa();return Pe.setFormat($e.format),Pe.setStyle($e.style),Pe}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent($e){throw Error("TabNode does not support setTextContent")}setDetail($e){throw Error("TabNode does not support setDetail")}setMode($e){throw Error("TabNode does not support setMode")}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function sa(){return Gl(new Va)}function Ea(ze){return ze instanceof Va}class Hs{constructor($e,Pe,We){this._selection=null,this.key=$e,this.offset=Pe,this.type=We}is($e){return this.key===$e.key&&this.offset===$e.offset&&this.type===$e.type}isBefore($e){let Pe=this.getNode(),We=$e.getNode();const nt=this.offset,it=$e.offset;if(qr(Pe)){const mt=Pe.getDescendantByIndex(nt);Pe=mt??Pe}if(qr(We)){const mt=We.getDescendantByIndex(it);We=mt??We}return Pe===We?ntit&&(We=it)}else if(!qr($e)){const it=$e.getNextSibling();if(Rn(it))Pe=it.__key,We=0,nt="text";else{const mt=$e.getParent();mt&&(Pe=mt.__key,We=$e.getIndexWithinParent()+1)}}ze.set(Pe,We,nt)}function Ll(ze,$e){if(qr($e)){const Pe=$e.getLastDescendant();qr(Pe)||Rn(Pe)?Bi(ze,Pe):Bi(ze,$e)}else Bi(ze,$e)}function su(ze,$e,Pe,We){const nt=ze.getNode(),it=nt.getChildAtIndex(ze.offset),mt=Xo(),xt=Gi(nt)?Sl().append(mt):mt;mt.setFormat(Pe),mt.setStyle(We),it===null?nt.append(xt):it.insertBefore(xt),ze.is($e)&&$e.set(mt.__key,0,"text"),ze.set(mt.__key,0,"text")}function Pl(ze,$e,Pe,We){ze.key=$e,ze.offset=Pe,ze.type=We}class dc{constructor($e){this._cachedNodes=null,this._nodes=$e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes($e){this._cachedNodes=$e}is($e){if(!la($e))return!1;const Pe=this._nodes,We=$e._nodes;return Pe.size===We.size&&Array.from(Pe).every(nt=>We.has(nt))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add($e){this.dirty=!0,this._nodes.add($e),this._cachedNodes=null}delete($e){this.dirty=!0,this._nodes.delete($e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has($e){return this._nodes.has($e)}clone(){return new dc(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText($e){}insertText(){}insertNodes($e){const Pe=this.getNodes(),We=Pe.length,nt=Pe[We-1];let it;if(Rn(nt))it=nt.select();else{const mt=nt.getIndexWithinParent()+1;it=nt.getParentOrThrow().select(mt,mt)}it.insertNodes($e);for(let mt=0;mt0?ur=[]:ur=[xt]:ur=xt.getNodesBetween(qt),cd()||(this._cachedNodes=ur),ur}setTextNodeRange($e,Pe,We,nt){Pl(this.anchor,$e.__key,Pe,"text"),Pl(this.focus,We.__key,nt,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const $e=this.getNodes();if($e.length===0)return"";const Pe=$e[0],We=$e[$e.length-1],nt=this.anchor,it=this.focus,mt=nt.isBefore(it),[xt,qt]=Iu(this);let Jt="",rr=!0;for(let ur=0;ur<$e.length;ur++){const cr=$e[ur];if(qr(cr)&&!cr.isInline())rr||(Jt+=` -`),cr.isEmpty()?rr=!1:rr=!0;else if(rr=!1,Rn(cr)){let ir=cr.getTextContent();cr===Pe?cr===We?(nt.type!=="element"||it.type!=="element"||it.offset===nt.offset)&&(ir=xt=0;Ci--){const Wa=ki[Ci];if(Wa.is(ir)||qr(Wa)&&Wa.isParentOf(ir))break;Wa.isAttached()&&(!Cs.has(Wa)||Wa.is(mo)?jl||As.insertAfter(Wa,!1):Wa.remove())}if(!jl){let Ci=Bo,Wa=null;for(;Ci!==null;){const cu=Ci.getChildren(),Du=cu.length;(Du===0||cu[Du-1].is(Wa))&&(kn.delete(Ci.__key),Wa=Ci),Ci=Ci.getParent()}}if(!ir.isToken())ir=ir.spliceText(ur,Zr-ur,$e,!0),ir.getTextContent()===""?ir.remove():ir.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=$e.length);else if(ur===Zr)ir.select();else{const Ci=Xo($e);Ci.select(),ir.replace(Ci)}for(let Ci=1;Ci0&&(Br!==Zr.getTextContentSize()&&([Zr]=Zr.splitText(Br)),Zr.setFormat(Hn));for(let en=rr+1;en(qr(Hn)||Ta(Hn))&&!Hn.isInline();if(!$e.some(it)){if(!qr(We))throw Error("Expected 'firstBlock' to be an ElementNode");const Hn=fp(this);We.splice(Hn,0,$e),nt.selectEnd();return}const mt=wd($e),xt=mt.getLastDescendant(),qt=mt.getChildren(),Jt=Hn=>"__value"in Hn&&"__checked"in Hn,rr=Hn=>qr(Hn)&&Ps(Hn)&&!Hn.isEmpty()&&qr(We)&&(!We.isEmpty()||Jt(We)),cr=!qr(We)||!We.isEmpty()?this.insertParagraph():null,ir=qt[qt.length-1];let Kr=qt[0];if(rr(Kr)){if(!qr(We))throw Error("Expected 'firstBlock' to be an ElementNode");We.append(...Kr.getChildren()),Kr=qt[1]}Kr&&ri(We,Kr);const Zr=Tu(xt,Ps);cr&&qr(Zr)&&(Jt(cr)||Ps(ir))&&(Zr.append(...cr.getChildren()),cr.remove()),qr(We)&&We.isEmpty()&&We.remove(),xt.selectEnd();const Br=qr(We)?We.getLastChild():null;li(Br)&&Zr!==We&&Br.remove()}insertParagraph(){if(this.anchor.key==="root"){const mt=Sl();return qn().splice(this.anchor.offset,0,[mt]),mt.select(),mt}const $e=fp(this),Pe=Tu(this.anchor.getNode(),Ps);if(!qr(Pe))throw Error("Expected ancestor to be an ElementNode");const We=Pe.getChildAtIndex($e),nt=We?[We,...We.getNextSiblings()]:[],it=Pe.insertNewAfter(this,!1);return it?(it.append(...nt),it.selectStart(),it):null}insertLineBreak($e){const Pe=bs();if(this.insertNodes([Pe]),$e){const We=Pe.getParentOrThrow(),nt=Pe.getIndexWithinParent();We.select(nt,nt)}}extract(){const $e=this.getNodes(),Pe=$e.length,We=Pe-1,nt=this.anchor,it=this.focus;let mt=$e[0],xt=$e[We];const[qt,Jt]=Iu(this);if(Pe===0)return[];if(Pe===1){if(Rn(mt)&&!this.isCollapsed()){const ur=qt>Jt?Jt:qt,cr=qt>Jt?qt:Jt,ir=mt.splitText(ur,cr),Kr=ur===0?ir[0]:ir[1];return Kr!=null?[Kr]:[]}return[mt]}const rr=nt.isBefore(it);if(Rn(mt)){const ur=rr?qt:Jt;ur===mt.getTextContentSize()?$e.shift():ur!==0&&([,mt]=mt.splitText(ur),$e[0]=mt)}if(Rn(xt)){const cr=xt.getTextContent().length,ir=rr?Jt:qt;ir===0?$e.pop():ir!==cr&&([xt]=xt.splitText(ir),$e[We]=xt)}return $e}modify($e,Pe,We){const nt=this.focus,it=this.anchor,mt=$e==="move",xt=lc(nt,Pe);if(Ta(xt)&&!xt.isIsolated()){if(mt&&xt.isKeyboardSelectable()){const ir=ud();ir.add(xt.__key),yi(ir);return}const cr=Pe?xt.getPreviousSibling():xt.getNextSibling();if(Rn(cr)){const ir=cr.__key,Kr=Pe?cr.getTextContent().length:0;nt.set(ir,Kr,"text"),mt&&it.set(ir,Kr,"text");return}else{const ir=xt.getParentOrThrow();let Kr,Zr;qr(cr)?(Zr=cr.__key,Kr=Pe?cr.getChildrenSize():0):(Kr=xt.getIndexWithinParent(),Zr=ir.__key,Pe||Kr++),nt.set(Zr,Kr,"element"),mt&&it.set(Zr,Kr,"element");return}}const qt=Ra(),Jt=tu(qt._window);if(!Jt)return;const rr=qt._blockCursorElement,ur=qt._rootElement;if(ur!==null&&rr!==null&&qr(xt)&&!xt.isInline()&&!xt.canBeEmpty()&&Il(rr,qt,ur),ld(Jt,$e,Pe?"backward":"forward",We),Jt.rangeCount>0){const cr=Jt.getRangeAt(0),ir=this.anchor.getNode(),Kr=Gi(ir)?ir:ls(ir);if(this.applyDOMRange(cr),this.dirty=!0,!mt){const Zr=this.getNodes(),Br=[];let Hn=!1;for(let en=0;en0)if(Pe){const en=Br[0];qr(en)?en.selectStart():en.getParentOrThrow().selectStart()}else{const en=Br[Br.length-1];qr(en)?en.selectEnd():en.getParentOrThrow().selectEnd()}(Jt.anchorNode!==cr.startContainer||Jt.anchorOffset!==cr.startOffset)&&Nf(this)}}}deleteCharacter($e){const Pe=this.isCollapsed();if(this.isCollapsed()){const We=this.anchor,nt=this.focus;let it=We.getNode();if(!$e&&(We.type==="element"&&qr(it)&&We.offset===it.getChildrenSize()||We.type==="text"&&We.offset===it.getTextContentSize())){const xt=it.getParent(),qt=it.getNextSibling()||(xt===null?null:xt.getNextSibling());if(qr(qt)&&qt.isShadowRoot())return}const mt=lc(nt,$e);if(Ta(mt)&&!mt.isIsolated()){if(mt.isKeyboardSelectable()&&qr(it)&&it.getChildrenSize()===0){it.remove();const xt=ud();xt.add(mt.__key),yi(xt)}else mt.remove(),Ra().dispatchCommand(C,void 0);return}else if(!$e&&qr(mt)&&qr(it)&&it.isEmpty()){it.remove(),mt.selectStart();return}if(this.modify("extend",$e,"character"),this.isCollapsed()){if($e&&We.offset===0&&(We.type==="element"?We.getNode():We.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const xt=nt.type==="text"?nt.getNode():null;if(it=We.type==="text"?We.getNode():null,xt!==null&&xt.isSegmented()){const qt=nt.offset,Jt=xt.getTextContentSize();if(xt.is(it)||$e&&qt!==Jt||!$e&&qt!==0){cp(xt,$e,qt);return}}else if(it!==null&&it.isSegmented()){const qt=We.offset,Jt=it.getTextContentSize();if(it.is(xt)||$e&&qt!==0||!$e&&qt!==Jt){cp(it,$e,qt);return}}Ul(this,$e)}}if(this.removeText(),$e&&!Pe&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const We=this.anchor.getNode();We.isEmpty()&&Gi(We.getParent())&&We.getIndexWithinParent()===0&&We.collapseAtStart(this)}}deleteLine($e){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",$e,"lineboundary"),($e?this.focus:this.anchor).offset===0&&this.modify("extend",$e,"character")),this.removeText()}deleteWord($e){this.isCollapsed()&&this.modify("extend",$e,"word"),this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function la(ze){return ze instanceof dc}function ku(ze){const $e=ze.offset;if(ze.type==="text")return $e;const Pe=ze.getNode();return $e===Pe.getChildrenSize()?Pe.getTextContent().length:0}function Iu(ze){const $e=ze.getStartEndPoints();if($e===null)return[0,0];const[Pe,We]=$e;return Pe.type==="element"&&We.type==="element"&&Pe.key===We.key&&Pe.offset===We.offset?[0,0]:[ku(Pe),ku(We)]}function Nf(ze){const $e=ze.focus,Pe=ze.anchor,We=Pe.key,nt=Pe.offset,it=Pe.type;Pl(Pe,$e.key,$e.offset,$e.type),Pl($e,We,nt,it),ze._cachedNodes=null}function ld(ze,$e,Pe,We){ze.modify($e,Pe,We)}function Ul(ze,$e){const Pe=ze.anchor,We=ze.focus,nt=Pe.getNode(),it=We.getNode();if(nt===it&&Pe.type==="text"&&We.type==="text"){const mt=Pe.offset,xt=We.offset,qt=mtPe||cr){it.splice(rr,1),cr&&(qt=void 0);break}}const Jt=it.join("").trim();Jt===""?We.remove():(We.setTextContent(Jt),We.select(qt,qt))}function Df(ze,$e,Pe){const We=ze.getParent();return Pe===null||We===null||!We.canBeEmpty()||We!==Pe.getNode()}function dp(ze,$e,Pe,We){let nt=$e,it;if(ze.nodeType===An){let mt=!1;const xt=ze.childNodes,qt=xt.length;nt===qt&&(mt=!0,nt=qt-1);let Jt=xt[nt],rr=!1;if(Jt===We._blockCursorElement?(Jt=xt[nt+1],rr=!0):We._blockCursorElement!==null&&nt--,it=Ya(Jt),Rn(it))nt=Zl(it,mt);else{let ur=Ya(ze);if(ur===null)return null;if(qr(ur)){let cr=ur.getChildAtIndex(nt);if(qr(cr)&&Df(cr,nt,Pe)){const ir=mt?cr.getLastDescendant():cr.getFirstDescendant();ir===null?(ur=cr,nt=0):(cr=ir,ur=qr(cr)?cr:cr.getParentOrThrow())}Rn(cr)?(it=cr,ur=null,nt=Zl(cr,mt)):cr!==ur&&mt&&!rr&&nt++}else{const cr=ur.getIndexWithinParent();$e===0&&Ta(ur)&&Ya(ze)===ur?nt=cr:nt=cr+1,ur=ur.getParentOrThrow()}if(qr(ur))return Hi(ur.__key,nt,"element")}}else it=Ya(ze);return Rn(it)?Hi(it.__key,nt,"text"):null}function fc(ze,$e,Pe){const We=ze.offset,nt=ze.getNode();if(We===0){const it=nt.getPreviousSibling(),mt=nt.getParent();if(!$e)qr(it)&&!Pe&&it.isInline()?(ze.key=it.__key,ze.offset=it.getChildrenSize(),ze.type="element"):Rn(it)&&(ze.key=it.__key,ze.offset=it.getTextContent().length);else if((Pe||!$e)&&it===null&&qr(mt)&&mt.isInline()){const xt=mt.getPreviousSibling();Rn(xt)&&(ze.key=xt.__key,ze.offset=xt.getTextContent().length)}}else if(We===nt.getTextContent().length){const it=nt.getNextSibling(),mt=nt.getParent();if($e&&qr(it)&&it.isInline())ze.key=it.__key,ze.offset=0,ze.type="element";else if((Pe||$e)&&it===null&&qr(mt)&&mt.isInline()&&!mt.canInsertTextAfter()){const xt=mt.getNextSibling();Rn(xt)&&(ze.key=xt.__key,ze.offset=0)}}}function xa(ze,$e,Pe){if(ze.type==="text"&&$e.type==="text"){const We=ze.isBefore($e),nt=ze.is($e);fc(ze,We,nt),fc($e,!We,nt),nt&&($e.key=ze.key,$e.offset=ze.offset,$e.type=ze.type);const it=Ra();if(it.isComposing()&&it._compositionKey!==ze.key&&ho(Pe)){const mt=Pe.anchor,xt=Pe.focus;Pl(ze,mt.key,mt.offset,mt.type),Pl($e,xt.key,xt.offset,xt.type)}}}function Gp(ze,$e,Pe,We,nt,it){if(ze===null||Pe===null||!ea(nt,ze,Pe))return null;const mt=dp(ze,$e,ho(it)?it.anchor:null,nt);if(mt===null)return null;const xt=dp(Pe,We,ho(it)?it.focus:null,nt);if(xt===null)return null;if(mt.type==="element"&&xt.type==="element"){const qt=Ya(ze),Jt=Ya(Pe);if(Ta(qt)&&Ta(Jt))return null}return xa(mt,xt,it),[mt,xt]}function lu(ze){return qr(ze)&&!ze.isInline()}function jc(ze,$e,Pe,We,nt,it){const mt=hc(),xt=new Gs(Hi(ze,$e,nt),Hi(Pe,We,it),0,"");return xt.dirty=!0,mt._selection=xt,xt}function Fc(){const ze=Hi("root",0,"element"),$e=Hi("root",0,"element");return new Gs(ze,$e,0,"")}function ud(){return new dc(new Set)}function Ss(ze){const Pe=ze.getEditorState()._selection,We=tu(ze._window);return ho(Pe)||Pe==null?Vd(Pe,We,ze,null):Pe.clone()}function Vd(ze,$e,Pe,We){const nt=Pe._window;if(nt===null)return null;const it=We||nt.event,mt=it?it.type:void 0,xt=mt==="selectionchange",qt=!Nt()&&(xt||mt==="beforeinput"||mt==="compositionstart"||mt==="compositionend"||mt==="click"&&it&&it.detail===3||mt==="drop"||mt===void 0);let Jt,rr,ur,cr;if(!ho(ze)||qt){if($e===null)return null;if(Jt=$e.anchorNode,rr=$e.focusNode,ur=$e.anchorOffset,cr=$e.focusOffset,xt&&ho(ze)&&!ea(Pe,Jt,rr))return ze.clone()}else return ze.clone();const ir=Gp(Jt,ur,rr,cr,Pe,ze);if(ir===null)return null;const[Kr,Zr]=ir;return new Gs(Kr,Zr,ho(ze)?ze.format:0,ho(ze)?ze.style:"")}function pa(){return hc()._selection}function cs(){return Ra()._editorState._selection}function Ma(ze,$e,Pe,We=1){const nt=ze.anchor,it=ze.focus,mt=nt.getNode(),xt=it.getNode();if(!$e.is(mt)&&!$e.is(xt))return;const qt=$e.__key;if(ze.isCollapsed()){const Jt=nt.offset;if(Pe<=Jt&&We>0||Pe0||Pe0||Pe=xt,Jt=qt?it.getChildAtIndex(xt-1):it.getChildAtIndex(Pe);if(Rn(Jt)){let rr=0;qt&&(rr=Jt.getTextContentSize()),$e.set(Jt.__key,rr,"text"),We.set(Jt.__key,rr,"text")}return}if(qr(it)){const xt=it.getChildrenSize(),qt=Pe>=xt,Jt=qt?it.getChildAtIndex(xt-1):it.getChildAtIndex(Pe);if(Rn(Jt)){let rr=0;qt&&(rr=Jt.getTextContentSize()),$e.set(Jt.__key,rr,"text")}}if(qr(mt)){const xt=mt.getChildrenSize(),qt=nt>=xt,Jt=qt?mt.getChildAtIndex(xt-1):mt.getChildAtIndex(nt);if(Rn(Jt)){let rr=0;qt&&(rr=Jt.getTextContentSize()),We.set(Jt.__key,rr,"text")}}}function ds(ze,$e){const We=$e.getEditorState()._selection,nt=ze._selection;if(ho(nt)){const it=nt.anchor,mt=nt.focus;let xt;if(it.type==="text"&&(xt=it.getNode(),xt.selectionTransform(We,nt)),mt.type==="text"){const qt=mt.getNode();xt!==qt&&qt.selectionTransform(We,nt)}}}function El(ze,$e,Pe,We,nt){let it=null,mt=0,xt=null;We!==null?(it=We.__key,Rn(We)?(mt=We.getTextContentSize(),xt="text"):qr(We)&&(mt=We.getChildrenSize(),xt="element")):nt!==null&&(it=nt.__key,Rn(nt)?xt="text":qr(nt)&&(xt="element")),it!==null&&xt!==null?ze.set(it,mt,xt):(mt=$e.getIndexWithinParent(),mt===-1&&(mt=Pe.getChildrenSize()),ze.set(Pe.__key,mt,"element"))}function xl(ze,$e,Pe,We,nt){ze.type==="text"?(ze.key=Pe,$e||(ze.offset+=nt)):ze.offset>We.getIndexWithinParent()&&(ze.offset-=1)}function pc(ze,$e,Pe,We,nt,it,mt){const xt=We.anchorNode,qt=We.focusNode,Jt=We.anchorOffset,rr=We.focusOffset,ur=document.activeElement;if(nt.has("collaboration")&&ur!==it||ur!==null&&Is(ur))return;if(!ho($e)){ze!==null&&ea(Pe,xt,qt)&&We.removeAllRanges();return}const cr=$e.anchor,ir=$e.focus,Kr=cr.key,Zr=ir.key,Br=nd(Pe,Kr),Hn=nd(Pe,Zr),en=cr.offset,kn=ir.offset,ei=$e.format,Bo=$e.style,mo=$e.isCollapsed();let ki=Br,Cs=Hn,jl=!1;if(cr.type==="text"){ki=ii(Br);const As=cr.getNode();jl=As.getFormat()!==ei||As.getStyle()!==Bo}else ho(ze)&&ze.anchor.type==="text"&&(jl=!0);if(ir.type==="text"&&(Cs=ii(Hn)),!(ki===null||Cs===null)&&(mo&&(ze===null||jl||ho(ze)&&(ze.format!==ei||ze.style!==Bo))&&Ot(ei,Bo,en,Kr,performance.now()),!(Jt===en&&rr===kn&&xt===ki&&qt===Cs&&!(We.type==="Range"&&mo)&&((ur===null||!it.contains(ur))&&it.focus({preventScroll:!0}),cr.type!=="element")))){try{We.setBaseAndExtent(ki,en,Cs,kn)}catch{}if(!nt.has("skip-scroll-into-view")&&$e.isCollapsed()&&it!==null&&it===document.activeElement){const As=$e instanceof Gs&&$e.anchor.type==="element"?ki.childNodes[en]||null:We.rangeCount>0?We.getRangeAt(0):null;if(As!==null){let Ci;if(As instanceof Text){const Wa=document.createRange();Wa.selectNode(As),Ci=Wa.getBoundingClientRect()}else Ci=As.getBoundingClientRect();bu(Pe,Ci,it)}}Ad()}}function $d(ze){let $e=pa()||cs();$e===null&&($e=qn().selectEnd()),$e.insertNodes(ze)}function Vp(){const ze=pa();return ze===null?"":ze.getTextContent()}function fp(ze){ze.isCollapsed()||ze.removeText();const $e=ze.anchor;let Pe=$e.getNode(),We=$e.offset;for(;!Ps(Pe);)[Pe,We]=Sa(Pe,We);return We}function Sa(ze,$e){const Pe=ze.getParent();if(!Pe){const nt=Sl();return qn().append(nt),nt.select(),[qn(),0]}if(Rn(ze)){const nt=ze.splitText($e);if(nt.length===0)return[Pe,ze.getIndexWithinParent()];const it=$e===0?0:1,mt=nt[0].getIndexWithinParent()+it;return[Pe,mt]}if(!qr(ze)||$e===0)return[Pe,ze.getIndexWithinParent()];const We=ze.getChildAtIndex($e);if(We){const nt=new Gs(Hi(ze.__key,$e,"element"),Hi(ze.__key,$e,"element"),0,""),it=ze.insertNewAfter(nt);it&&it.append(We,...We.getNextSiblings())}return[Pe,ze.getIndexWithinParent()+1]}function wd(ze){const $e=Sl();let Pe=null;for(let We=0;We99)throw Error("One or more transforms are endlessly triggering additional transforms. May have encountered infinite recursion caused by transforms that have their preconditions too lose and/or conflict with each other.")}function hc(){if(qa===null)throw Error("Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read().");return qa}function Ra(){if(Vs===null)throw Error("Unable to find an active editor. This method can only be used synchronously during the callback of editor.update().");return Vs}function af(){return Vs}function qd(ze,$e,Pe){const We=$e.__type,nt=ks(ze,We);let it=Pe.get(We);it===void 0&&(it=Array.from(nt.transforms),Pe.set(We,it));const mt=it.length;for(let xt=0;xt0||rr>0;){if(qt>0){$e._dirtyLeaves=new Set;for(const ur of xt){const cr=nt.get(ur);Rn(cr)&&cr.isAttached()&&cr.isSimpleText()&&!cr.isUnmergeable()&&Nn(cr),cr!==void 0&&Mf(cr,it)&&qd($e,cr,mt),Pe.add(ur)}if(xt=$e._dirtyLeaves,qt=xt.size,qt>0){uu++;continue}}$e._dirtyLeaves=new Set,$e._dirtyElements=new Map;for(const ur of Jt){const cr=ur[0],ir=ur[1];if(cr!=="root"&&!ir)continue;const Kr=nt.get(cr);Kr!==void 0&&Mf(Kr,it)&&qd($e,Kr,mt),We.set(cr,ir)}xt=$e._dirtyLeaves,qt=xt.size,Jt=$e._dirtyElements,rr=Jt.size,uu++}$e._dirtyLeaves=Pe,$e._dirtyElements=We}function qp(ze){return kd(ze,Ra()._nodes)}function kd(ze,$e){const Pe=ze.type,We=$e.get(Pe);if(We===void 0)throw Error(`parseEditorState: type "${Pe}" + not found`);const nt=We.klass;if(ze.type!==nt.getType())throw Error(`LexicalNode: Node ${nt.name} does not implement .importJSON().`);const it=nt.importJSON(ze),mt=ze.children;if(qr(it)&&Array.isArray(mt))for(let xt=0;xt{throw new Error("Cannot call set() on a frozen Lexical node map")},$e.clear=()=>{throw new Error("Cannot call clear() on a frozen Lexical node map")},$e.delete=()=>{throw new Error("Cannot call delete() on a frozen Lexical node map")}}function Wl(ze,$e){const Pe=ze._pendingEditorState,We=ze._rootElement,nt=ze._headless||We===null;if(Pe===null)return;const it=ze._editorState,mt=it._selection,xt=Pe._selection,qt=ze._dirtyType!==pn,Jt=qa,rr=fl,ur=Vs,cr=ze._updating,ir=ze._observer;let Kr=null;if(ze._pendingEditorState=null,ze._editorState=Pe,!nt&&qt&&ir!==null){Vs=ze,qa=Pe,fl=!1,ze._updating=!0;try{const mo=ze._dirtyType,ki=ze._dirtyElements,Cs=ze._dirtyLeaves;ir.disconnect(),Kr=tc(it,Pe,ze,mo,ki,Cs)}catch(mo){if(mo instanceof Error&&ze._onError(mo),!Rd)Kd(ze,null,We,Pe),xo(ze),ze._dirtyType=bo,Rd=!0,Wl(ze,it),Rd=!1;else throw mo;return}finally{ir.observe(We,pp),ze._updating=cr,qa=Jt,fl=rr,Vs=ur}}Pe._readOnly||(Pe._readOnly=!0,sf(Pe),ho(xt)&&(Object.freeze(xt.anchor),Object.freeze(xt.focus)),Object.freeze(xt));const Zr=ze._dirtyLeaves,Br=ze._dirtyElements,Hn=ze._normalizedNodes,en=ze._updateTags,kn=ze._deferred;qt&&(ze._dirtyType=pn,ze._cloneNotNeeded.clear(),ze._dirtyLeaves=new Set,ze._dirtyElements=new Map,ze._normalizedNodes=new Set,ze._updateTags=new Set),Cu(ze,Pe);const ei=nt?null:tu(ze._window);if(ze._editable&&ei!==null&&(qt||xt===null||xt.dirty)){Vs=ze,qa=Pe;try{if(ir!==null&&ir.disconnect(),qt||xt===null||xt.dirty){const mo=ze._blockCursorElement;mo!==null&&Il(mo,ze,We),pc(mt,xt,ze,ei,en,We)}od(ze,We,xt),ir!==null&&ir.observe(We,pp)}finally{Vs=ur,qa=Jt}}Kr!==null&&lf(ze,Kr,en,Zr,it),!ho(xt)&&xt!==null&&(mt===null||!mt.is(xt))&&ze.dispatchCommand(C,void 0);const Bo=ze._pendingDecorators;Bo!==null&&(ze._decorators=Bo,ze._pendingDecorators=null,dd("decorator",ze,!0,Bo)),gp(ze,$e||it,Pe),dd("update",ze,!0,{dirtyElements:Br,dirtyLeaves:Zr,editorState:Pe,normalizedNodes:Hn,prevEditorState:$e||it,tags:en}),ji(ze,kn),go(ze)}function gp(ze,$e,Pe){const We=Ls($e),nt=Ls(Pe);We!==nt&&dd("textcontent",ze,!0,nt)}function lf(ze,$e,Pe,We,nt){const it=Array.from(ze._listeners.mutation),mt=it.length;for(let xt=0;xt{nt=Oo(ze,$e,Pe)}),nt}const We=Ku(ze);for(let nt=4;nt>=0;nt--)for(let it=0;it{Wl(ze)}):(Jt._flushSync=!1,rr&&(We.clear(),ze._deferred=[],ze._pendingEditorState=null))}function tl(ze,$e,Pe){ze._updating?ze._updates.push([$e,Pe]):Nu(ze,$e,Pe)}class ni extends Qs{constructor($e){super($e)}decorate($e,Pe){throw Error("decorate: base method not extended")}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ta(ze){return ze instanceof ni}class La extends Qs{constructor($e){super($e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__indent=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){const $e=this.getFormat();return gs[$e]||""}getIndent(){return this.getLatest().__indent}getChildren(){const $e=[];let Pe=this.getFirstChild();for(;Pe!==null;)$e.push(Pe),Pe=Pe.getNextSibling();return $e}getChildrenKeys(){const $e=[];let Pe=this.getFirstChild();for(;Pe!==null;)$e.push(Pe.__key),Pe=Pe.getNextSibling();return $e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const Pe=Ra()._dirtyElements;return Pe!==null&&Pe.has(this.__key)}isLastChild(){const $e=this.getLatest(),Pe=this.getParentOrThrow().getLastChild();return Pe!==null&&Pe.is($e)}getAllTextNodes(){const $e=[];let Pe=this.getFirstChild();for(;Pe!==null;){if(Rn(Pe)&&$e.push(Pe),qr(Pe)){const We=Pe.getAllTextNodes();$e.push(...We)}Pe=Pe.getNextSibling()}return $e}getFirstDescendant(){let $e=this.getFirstChild();for(;$e!==null;){if(qr($e)){const Pe=$e.getFirstChild();if(Pe!==null){$e=Pe;continue}}break}return $e}getLastDescendant(){let $e=this.getLastChild();for(;$e!==null;){if(qr($e)){const Pe=$e.getLastChild();if(Pe!==null){$e=Pe;continue}}break}return $e}getDescendantByIndex($e){const Pe=this.getChildren(),We=Pe.length;if($e>=We){const it=Pe[We-1];return qr(it)&&it.getLastDescendant()||it||null}const nt=Pe[$e];return qr(nt)&&nt.getFirstDescendant()||nt||null}getFirstChild(){const Pe=this.getLatest().__first;return Pe===null?null:ma(Pe)}getFirstChildOrThrow(){const $e=this.getFirstChild();if($e===null)throw Error(`Expected node ${this.__key} to have a first child.`);return $e}getLastChild(){const Pe=this.getLatest().__last;return Pe===null?null:ma(Pe)}getLastChildOrThrow(){const $e=this.getLastChild();if($e===null)throw Error(`Expected node ${this.__key} to have a last child.`);return $e}getChildAtIndex($e){const Pe=this.getChildrenSize();let We,nt;if($e=$e;){if(nt===$e)return We;We=We.getPreviousSibling(),nt--}return null}getTextContent(){let $e="";const Pe=this.getChildren(),We=Pe.length;for(let nt=0;ntWe.remove()),$e}append(...$e){return this.splice(this.getChildrenSize(),0,$e)}setDirection($e){const Pe=this.getWritable();return Pe.__dir=$e,Pe}setFormat($e){const Pe=this.getWritable();return Pe.__format=$e!==""?Oa[$e]:0,this}setIndent($e){const Pe=this.getWritable();return Pe.__indent=$e,this}splice($e,Pe,We){const nt=We.length,it=this.getChildrenSize(),mt=this.getWritable(),xt=mt.__key,qt=[],Jt=[],rr=this.getChildAtIndex($e+Pe);let ur=null,cr=it-Pe+nt;if($e!==0)if($e===it)ur=this.getLastChild();else{const Kr=this.getChildAtIndex($e);Kr!==null&&(ur=Kr.getPreviousSibling())}if(Pe>0){let Kr=ur===null?this.getFirstChild():ur.getNextSibling();for(let Zr=0;Zr({root:pd(qn())}))}}class na extends La{static getType(){return"paragraph"}static clone($e){return new na($e.__key)}createDOM($e){const Pe=document.createElement("p"),We=Nc($e.theme,"paragraph");return We!==void 0&&Pe.classList.add(...We),Pe}updateDOM($e,Pe,We){return!1}static importDOM(){return{p:$e=>({conversion:Ts,priority:0})}}exportDOM($e){const{element:Pe}=super.exportDOM($e);if(Pe&&ad(Pe)){this.isEmpty()&&Pe.append(document.createElement("br"));const We=this.getFormatType();Pe.style.textAlign=We;const nt=this.getDirection();nt&&(Pe.dir=nt);const it=this.getIndent();it>0&&(Pe.style.textIndent=`${it*20}px`)}return{element:Pe}}static importJSON($e){const Pe=Sl();return Pe.setFormat($e.format),Pe.setIndent($e.indent),Pe.setDirection($e.direction),Pe}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter($e,Pe){const We=Sl(),nt=this.getDirection();return We.setDirection(nt),this.insertAfter(We,Pe),We}collapseAtStart(){const $e=this.getChildren();if($e.length===0||Rn($e[0])&&$e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function Ts(ze){const $e=Sl();if(ze.style){$e.setFormat(ze.style.textAlign);const Pe=parseInt(ze.style.textIndent,10)/20;Pe>0&&$e.setIndent(Pe)}return{node:$e}}function Sl(){return Gl(new na)}function uf(ze){return ze instanceof na}const Id=0,Lf=1,cf=2,Pf=3,df=4;function Kd(ze,$e,Pe,We){const nt=ze._keyToDOMMap;nt.clear(),ze._editorState=Bl(),ze._pendingEditorState=We,ze._compositionKey=null,ze._dirtyType=pn,ze._cloneNotNeeded.clear(),ze._dirtyLeaves=new Set,ze._dirtyElements.clear(),ze._normalizedNodes=new Set,ze._updateTags=new Set,ze._updates=[],ze._blockCursorElement=null;const it=ze._observer;it!==null&&(it.disconnect(),ze._observer=null),$e!==null&&($e.textContent=""),Pe!==null&&(Pe.textContent="",nt.set("root",Pe))}function vc(ze,$e){const Pe=new Map,We=new Set,nt=it=>{Object.keys(it).forEach(mt=>{let xt=Pe.get(mt);xt===void 0&&(xt=[],Pe.set(mt,xt)),xt.push(it[mt])})};return ze.forEach(it=>{const mt=it.klass.importDOM!=null?it.klass.importDOM.bind(it.klass):null;if(mt==null||We.has(mt))return;We.add(mt);const xt=mt();xt!==null&&nt(xt)}),$e&&nt($e),Pe}function vp(ze){const $e=ze||{},Pe=af(),We=$e.theme||{},nt=ze===void 0?Pe:$e.parentEditor||null,it=$e.disableEvents||!1,mt=Bl(),xt=$e.namespace||(nt!==null?nt._config.namespace:da()),qt=$e.editorState,Jt=[Pa,xs,nc,Va,na,...$e.nodes||[]],{onError:rr,html:ur}=$e,cr=$e.editable!==void 0?$e.editable:!0;let ir;if(ze===void 0&&Pe!==null)ir=Pe._nodes;else{ir=new Map;for(let Zr=0;Zr{Br.hasOwnProperty(Cs)||console.warn(`${mo} must implement static "${Cs}" method`)}),!Br.hasOwnProperty("importDOM")&&Br.hasOwnProperty("exportDOM")&&console.warn(`${mo} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`),ki instanceof ni&&(ki.hasOwnProperty("decorate")||console.warn(`${ki.constructor.name} must implement "decorate" method`)),Br.hasOwnProperty("importJSON")||console.warn(`${mo} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`),ki.hasOwnProperty("exportJSON")||console.warn(`${mo} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`)}}const kn=Br.getType(),ei=Br.transform(),Bo=new Set;ei!==null&&Bo.add(ei),ir.set(kn,{exportDOM:ur&&ur.export?ur.export.get(Br):void 0,klass:Br,replace:Hn,replaceWithKlass:en,transforms:Bo})}}const Kr=new mc(mt,nt,ir,{disableEvents:it,namespace:xt,theme:We},rr||console.error,vc(ir,ur?ur.import:void 0),cr);return qt!==void 0&&(Kr._pendingEditorState=qt,Kr._dirtyType=bo),Kr}class mc{constructor($e,Pe,We,nt,it,mt,xt){this._parentEditor=Pe,this._rootElement=null,this._editorState=$e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=nt,this._nodes=We,this._decorators={},this._pendingDecorators=null,this._dirtyType=pn,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=da(),this._onError=it,this._htmlConversions=mt,this._editable=xt,this._headless=Pe!==null&&Pe._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener($e){const Pe=this._listeners.update;return Pe.add($e),()=>{Pe.delete($e)}}registerEditableListener($e){const Pe=this._listeners.editable;return Pe.add($e),()=>{Pe.delete($e)}}registerDecoratorListener($e){const Pe=this._listeners.decorator;return Pe.add($e),()=>{Pe.delete($e)}}registerTextContentListener($e){const Pe=this._listeners.textcontent;return Pe.add($e),()=>{Pe.delete($e)}}registerRootListener($e){const Pe=this._listeners.root;return $e(this._rootElement,null),Pe.add($e),()=>{$e(null,this._rootElement),Pe.delete($e)}}registerCommand($e,Pe,We){if(We===void 0)throw Error('Listener for type "command" requires a "priority".');const nt=this._commands;nt.has($e)||nt.set($e,[new Set,new Set,new Set,new Set,new Set]);const it=nt.get($e);if(it===void 0)throw Error(`registerCommand: Command ${String($e)} not found in command map`);const mt=it[We];return mt.add(Pe),()=>{mt.delete(Pe),it.every(xt=>xt.size===0)&&nt.delete($e)}}registerMutationListener($e,Pe){if(this._nodes.get($e.getType())===void 0)throw Error(`Node ${$e.name} has not been registered. Ensure node has been passed to createEditor.`);const nt=this._listeners.mutation;return nt.set(Pe,$e),()=>{nt.delete(Pe)}}registerNodeTransformToKlass($e,Pe){const We=$e.getType(),nt=this._nodes.get(We);if(nt===void 0)throw Error(`Node ${$e.name} has not been registered. Ensure node has been passed to createEditor.`);return nt.transforms.add(Pe),nt}registerNodeTransform($e,Pe){const We=this.registerNodeTransformToKlass($e,Pe),nt=[We],it=We.replaceWithKlass;if(it!=null){const mt=this.registerNodeTransformToKlass(it,Pe);nt.push(mt)}return Ol(this,$e.getType()),()=>{nt.forEach(mt=>mt.transforms.delete(Pe))}}hasNode($e){return this._nodes.has($e.getType())}hasNodes($e){return $e.every(this.hasNode.bind(this))}dispatchCommand($e,Pe){return Fn(this,$e,Pe)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement($e){const Pe=this._rootElement;if($e!==Pe){const We=Nc(this._config.theme,"root"),nt=this._pendingEditorState||this._editorState;if(this._rootElement=$e,Kd(this,Pe,$e,nt),Pe!==null&&(this._config.disableEvents||wu(Pe),We!=null&&Pe.classList.remove(...We)),$e!==null){const it=ll($e),mt=$e.style;mt.userSelect="text",mt.whiteSpace="pre-wrap",mt.wordBreak="break-word",$e.setAttribute("data-lexical-editor","true"),this._window=it,this._dirtyType=bo,xo(this),this._updateTags.add("history-merge"),Wl(this),this._config.disableEvents||Kl($e,this),We!=null&&$e.classList.add(...We)}else this._editorState=nt,this._pendingEditorState=null,this._window=null;dd("root",this,!1,$e,Pe)}}getElementByKey($e){return this._keyToDOMMap.get($e)||null}getEditorState(){return this._editorState}setEditorState($e,Pe){if($e.isEmpty())throw Error("setEditorState: the editor state is empty. Ensure the editor state's root node never becomes empty.");In(this);const We=this._pendingEditorState,nt=this._updateTags,it=Pe!==void 0?Pe.tag:null;We!==null&&!We.isEmpty()&&(it!=null&&nt.add(it),Wl(this)),this._pendingEditorState=$e,this._dirtyType=bo,this._dirtyElements.set("root",!1),this._compositionKey=null,it!=null&&nt.add(it),Wl(this)}parseEditorState($e,Pe){const We=typeof $e=="string"?JSON.parse($e):$e;return gc(We,this,Pe)}update($e,Pe){tl(this,$e,Pe)}focus($e,Pe={}){const We=this._rootElement;We!==null&&(We.setAttribute("autocapitalize","off"),tl(this,()=>{const nt=pa(),it=qn();nt!==null?nt.dirty=!0:it.getChildrenSize()!==0&&(Pe.defaultSelection==="rootStart"?it.selectStart():it.selectEnd())},{onUpdate:()=>{We.removeAttribute("autocapitalize"),$e&&$e()},tag:"focus"}),this._pendingEditorState===null&&We.removeAttribute("autocapitalize"))}blur(){const $e=this._rootElement;$e!==null&&$e.blur();const Pe=tu(this._window);Pe!==null&&Pe.removeAllRanges()}isEditable(){return this._editable}setEditable($e){this._editable!==$e&&(this._editable=$e,dd("editable",this,!0,$e))}toJSON(){return{editorState:this._editorState.toJSON()}}}return Lexical_dev.$addUpdateTag=Jn,Lexical_dev.$applyNodeReplacement=Gl,Lexical_dev.$copyNode=Mc,Lexical_dev.$createLineBreakNode=bs,Lexical_dev.$createNodeSelection=ud,Lexical_dev.$createParagraphNode=Sl,Lexical_dev.$createPoint=Hi,Lexical_dev.$createRangeSelection=Fc,Lexical_dev.$createTabNode=sa,Lexical_dev.$createTextNode=Xo,Lexical_dev.$getAdjacentNode=lc,Lexical_dev.$getCharacterOffsets=Iu,Lexical_dev.$getEditor=Rf,Lexical_dev.$getNearestNodeFromDOMNode=Ms,Lexical_dev.$getNearestRootOrShadowRoot=ls,Lexical_dev.$getNodeByKey=ma,Lexical_dev.$getPreviousSelection=cs,Lexical_dev.$getRoot=qn,Lexical_dev.$getSelection=pa,Lexical_dev.$getTextContent=Vp,Lexical_dev.$hasAncestor=Dc,Lexical_dev.$hasUpdateTag=ys,Lexical_dev.$insertNodes=$d,Lexical_dev.$isBlockElementNode=lu,Lexical_dev.$isDecoratorNode=Ta,Lexical_dev.$isElementNode=qr,Lexical_dev.$isInlineElementOrDecoratorNode=Oi,Lexical_dev.$isLeafNode=as,Lexical_dev.$isLineBreakNode=li,Lexical_dev.$isNodeSelection=la,Lexical_dev.$isParagraphNode=uf,Lexical_dev.$isRangeSelection=ho,Lexical_dev.$isRootNode=Gi,Lexical_dev.$isRootOrShadowRoot=eu,Lexical_dev.$isTabNode=Ea,Lexical_dev.$isTextNode=Rn,Lexical_dev.$nodesOfType=Wu,Lexical_dev.$normalizeSelection__EXPERIMENTAL=so,Lexical_dev.$parseSerializedNode=qp,Lexical_dev.$selectAll=wf,Lexical_dev.$setCompositionKey=Qn,Lexical_dev.$setSelection=yi,Lexical_dev.$splitNode=up,Lexical_dev.BLUR_COMMAND=Vt,Lexical_dev.CAN_REDO_COMMAND=Lt,Lexical_dev.CAN_UNDO_COMMAND=Gt,Lexical_dev.CLEAR_EDITOR_COMMAND=Ct,Lexical_dev.CLEAR_HISTORY_COMMAND=$t,Lexical_dev.CLICK_COMMAND=O,Lexical_dev.COMMAND_PRIORITY_CRITICAL=df,Lexical_dev.COMMAND_PRIORITY_EDITOR=Id,Lexical_dev.COMMAND_PRIORITY_HIGH=Pf,Lexical_dev.COMMAND_PRIORITY_LOW=Lf,Lexical_dev.COMMAND_PRIORITY_NORMAL=cf,Lexical_dev.CONTROLLED_TEXT_INSERTION_COMMAND=B,Lexical_dev.COPY_COMMAND=Qe,Lexical_dev.CUT_COMMAND=lt,Lexical_dev.DELETE_CHARACTER_COMMAND=I,Lexical_dev.DELETE_LINE_COMMAND=K,Lexical_dev.DELETE_WORD_COMMAND=V,Lexical_dev.DRAGEND_COMMAND=gt,Lexical_dev.DRAGOVER_COMMAND=dt,Lexical_dev.DRAGSTART_COMMAND=et,Lexical_dev.DROP_COMMAND=tt,Lexical_dev.DecoratorNode=ni,Lexical_dev.ElementNode=La,Lexical_dev.FOCUS_COMMAND=Pt,Lexical_dev.FORMAT_ELEMENT_COMMAND=Ue,Lexical_dev.FORMAT_TEXT_COMMAND=W,Lexical_dev.INDENT_CONTENT_COMMAND=Xe,Lexical_dev.INSERT_LINE_BREAK_COMMAND=N,Lexical_dev.INSERT_PARAGRAPH_COMMAND=L,Lexical_dev.INSERT_TAB_COMMAND=Je,Lexical_dev.KEY_ARROW_DOWN_COMMAND=Te,Lexical_dev.KEY_ARROW_LEFT_COMMAND=xe,Lexical_dev.KEY_ARROW_RIGHT_COMMAND=pe,Lexical_dev.KEY_ARROW_UP_COMMAND=ge,Lexical_dev.KEY_BACKSPACE_COMMAND=Be,Lexical_dev.KEY_DELETE_COMMAND=je,Lexical_dev.KEY_DOWN_COMMAND=oe,Lexical_dev.KEY_ENTER_COMMAND=we,Lexical_dev.KEY_ESCAPE_COMMAND=Ie,Lexical_dev.KEY_MODIFIER_COMMAND=bt,Lexical_dev.KEY_SPACE_COMMAND=ke,Lexical_dev.KEY_TAB_COMMAND=Ke,Lexical_dev.LineBreakNode=nc,Lexical_dev.MOVE_TO_END=me,Lexical_dev.MOVE_TO_START=Ae,Lexical_dev.OUTDENT_CONTENT_COMMAND=ot,Lexical_dev.PASTE_COMMAND=j,Lexical_dev.ParagraphNode=na,Lexical_dev.REDO_COMMAND=J,Lexical_dev.REMOVE_TEXT_COMMAND=F,Lexical_dev.RootNode=Pa,Lexical_dev.SELECTION_CHANGE_COMMAND=C,Lexical_dev.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND=R,Lexical_dev.SELECT_ALL_COMMAND=ht,Lexical_dev.TabNode=Va,Lexical_dev.TextNode=xs,Lexical_dev.UNDO_COMMAND=X,Lexical_dev.createCommand=S,Lexical_dev.createEditor=vp,Lexical_dev.getNearestEditorFromDOMNode=fi,Lexical_dev.isCurrentlyReadOnlyMode=cd,Lexical_dev.isHTMLAnchorElement=Td,Lexical_dev.isHTMLElement=ad,Lexical_dev.isSelectionCapturedInDecoratorInput=Is,Lexical_dev.isSelectionWithinEditor=ea,Lexical_dev}var define_process_env_default$b={};const Lexical=define_process_env_default$b.NODE_ENV==="development"?requireLexical_dev():requireLexical_prod();var Lexical_1=Lexical,hasRequiredLexicalSelection_prod;function requireLexicalSelection_prod(){if(hasRequiredLexicalSelection_prod)return LexicalSelection_prod;hasRequiredLexicalSelection_prod=1;var S=Lexical_1;let C=new Map;function R(X){for(;X!=null;){if(X.nodeType===Node.TEXT_NODE)return X;X=X.firstChild}return null}function O(X){let J=X.parentNode;if(J==null)throw Error("Should never happen");return[J,Array.from(J.childNodes).indexOf(X)]}function I(X){let J={};X=X.split(";");for(let oe of X)if(oe!==""){let[pe,me]=oe.split(/:([^]+)/);pe&&me&&(J[pe.trim()]=me.trim())}return J}function N(X){let J=C.get(X);return J===void 0&&(J=I(X),C.set(X,J)),J}function L(X){let J="";for(let oe in X)oe&&(J+=`${oe}: ${X[oe]};`);return J}function B(X,J){let oe=N("getStyle"in X?X.getStyle():X.style);J=Object.entries(J).reduce((me,[xe,Ae])=>(Ae instanceof Function?me[xe]=Ae(oe[xe]):Ae===null?delete me[xe]:me[xe]=Ae,me),{...oe});let pe=L(J);X.setStyle(pe),C.set(pe,J)}function j(X){for(;X!==null&&!S.$isRootOrShadowRoot(X);){let J=X.getLatest(),oe=X.getParent();J.getChildrenSize()===0&&X.remove(!0),X=oe}}function F(X,J,oe,pe,me=null){if(J.length!==0){var xe=J[0],Ae=new Map,ge=[];xe=S.$isElementNode(xe)?xe:xe.getParentOrThrow(),xe.isInline()&&(xe=xe.getParentOrThrow());for(var Te=!1;xe!==null;){var we=xe.getPreviousSibling();if(we!==null){xe=we,Te=!0;break}if(xe=xe.getParentOrThrow(),S.$isRootOrShadowRoot(xe))break}we=new Set;for(var ke=0;ke{Ke.append(Je),Ie.add(Je.getKey()),S.$isElementNode(Je)&&Je.getChildrenKeys().forEach(Xe=>Ie.add(Xe))}),j(je)}}else if(we.has(Be.getKey())){if(!S.$isElementNode(Be))throw Error("Expected node in emptyElements to be an ElementNode");je=pe(),je.setFormat(Be.getFormatType()),je.setIndent(Be.getIndent()),ge.push(je),Be.remove(!0)}}if(me!==null)for(J=0;Jwe?we:ke,X=Ke==="element"?Te:ke>we?ke:we,Ie!==X&&(Ie===0&&X===Te?(B(me,J),me.select(Ie,X)):(oe=me.splitText(Ie,X),oe=Ie===0?oe[0]:oe[1],B(oe,J),oe.select(0,X-Ie))));else for(S.$isTextNode(me)&&Ieke?ke:we,Ae=we>ke?we:ke):xe?(pe=oe?ke:we,Ae=void 0):me&&(oe=oe?we:ke,pe=0,Ae=oe),J.__text=J.__text.slice(pe,Ae)}}return J},LexicalSelection_prod.$wrapNodes=function(X,J,oe=null){var pe=X.getStartEndPoints(),me=pe?pe[0]:null;pe=X.getNodes();let xe=pe.length;if(me!==null&&(xe===0||xe===1&&me.type==="element"&&me.getNode().getChildrenSize()===0)){X=me.type==="text"?me.getNode().getParentOrThrow():me.getNode(),pe=X.getChildren();let ge=J();ge.setFormat(X.getFormatType()),ge.setIndent(X.getIndent()),pe.forEach(Te=>ge.append(Te)),oe&&(ge=oe.append(ge)),X.replace(ge)}else{me=null;var Ae=[];for(let ge=0;ge{let ge=xe.top-Ae.top;return 3>=Math.abs(ge)?xe.left-Ae.left:ge});let me;for(let xe=0;xeAe.top&&me.left+me.width>Ae.left||ge?(J.splice(xe--,1),pe--):me=Ae}return J},LexicalSelection_prod.getStyleObjectFromCSS=N,LexicalSelection_prod.trimTextContentFromAnchor=function(X,J,oe){let pe=J.getNode();if(S.$isElementNode(pe)){var me=pe.getDescendantByIndex(J.offset);me!==null&&(pe=me)}for(;0=me)ge=pe.getParent(),pe.remove(),ge==null||ge.getChildrenSize()!==0||S.$isRootNode(ge)||ge.remove(),oe-=me+Ae,pe=xe;else{let Te=pe.getKey();Ae=X.getEditorState().read(()=>{const ke=S.$getNodeByKey(Te);return S.$isTextNode(ke)&&ke.isSimpleText()?ke.getTextContent():null}),xe=me-oe;let we=ge.slice(0,xe);Ae!==null&&Ae!==ge?(oe=S.$getPreviousSelection(),me=pe,pe.isSimpleText()?pe.setTextContent(Ae):(me=S.$createTextNode(Ae),pe.replace(me)),S.$isRangeSelection(oe)&&oe.isCollapsed()&&(oe=oe.anchor.offset,me.select(oe,oe))):pe.isSimpleText()?(Ae=J.key===Te,ge=J.offset,ge{const Pt=Lt.top-Gt.top;return Math.abs(Pt)<=3?Lt.left-Gt.left:Pt});let $t;for(let Lt=0;LtGt.top&&$t.left+$t.width>Gt.left,Vt=Gt.width+lt===gt.width;if(Pt||Vt){ht.splice(Lt--,1),Ct--;continue}$t=Gt}return ht}function L(Ue){const et={},dt=Ue.split(";");for(const gt of dt)if(gt!==""){const[Qe,lt]=gt.split(/:([^]+)/);Qe&<&&(et[Qe.trim()]=lt.trim())}return et}function B(Ue){let et=C.get(Ue);return et===void 0&&(et=L(Ue),C.set(Ue,et)),Object.freeze(et),et}function j(Ue){let et="";for(const dt in Ue)dt&&(et+=`${dt}: ${Ue[dt]};`);return et}function F(Ue,et){return Ue.__first=et.__first,Ue.__last=et.__last,Ue.__size=et.__size,Ue.__format=et.__format,Ue.__indent=et.__indent,Ue.__dir=et.__dir,Ue}function V(Ue,et){return Ue.__format=et.__format,Ue.__style=et.__style,Ue.__mode=et.__mode,Ue.__detail=et.__detail,Ue}function K(Ue){const dt=Ue.constructor.clone(Ue);return dt.__parent=Ue.__parent,dt.__next=Ue.__next,dt.__prev=Ue.__prev,S.$isElementNode(Ue)&&S.$isElementNode(dt)?F(dt,Ue):S.$isTextNode(Ue)&&S.$isTextNode(dt)?V(dt,Ue):dt}function W(Ue,et){const dt=Ue.getStartEndPoints();if(et.isSelected(Ue)&&!et.isSegmented()&&!et.isToken()&&dt!==null){const[gt,Qe]=dt,lt=Ue.isBackward(),ht=gt.getNode(),Ct=Qe.getNode(),$t=et.is(ht),Lt=et.is(Ct);if($t||Lt){const[Gt,Pt]=S.$getCharacterOffsets(Ue),Vt=ht.is(Ct),bt=et.is(lt?Ct:ht),It=et.is(lt?ht:Ct);let Ht=0,kt;if(Vt)Ht=Gt>Pt?Pt:Gt,kt=Gt>Pt?Gt:Pt;else if(bt)Ht=lt?Pt:Gt,kt=void 0;else if(It){const Kt=lt?Gt:Pt;Ht=0,kt=Kt}return et.__text=et.__text.slice(Ht,kt),et}}return et}function X(Ue){if(Ue.type==="text")return Ue.offset===Ue.getNode().getTextContentSize();const et=Ue.getNode();if(!S.$isElementNode(et))throw Error("isAtNodeEnd: node must be a TextNode or ElementNode");return Ue.offset===et.getChildrenSize()}function J(Ue,et,dt){let gt=et.getNode(),Qe=dt;if(S.$isElementNode(gt)){const lt=gt.getDescendantByIndex(et.offset);lt!==null&&(gt=lt)}for(;Qe>0&>!==null;){if(S.$isElementNode(gt)){const Lt=gt.getLastDescendant();Lt!==null&&(gt=Lt)}let lt=gt.getPreviousSibling(),ht=0;if(lt===null){let Lt=gt.getParentOrThrow(),Gt=Lt.getPreviousSibling();for(;Gt===null;){if(Lt=Lt.getParent(),Lt===null){lt=null;break}Gt=Lt.getPreviousSibling()}Lt!==null&&(ht=Lt.isInline()?0:2,lt=Gt)}let Ct=gt.getTextContent();Ct===""&&S.$isElementNode(gt)&&!gt.isInline()&&(Ct=` - -`);const $t=Ct.length;if(!S.$isTextNode(gt)||Qe>=$t){const Lt=gt.getParent();gt.remove(),Lt!=null&&Lt.getChildrenSize()===0&&!S.$isRootNode(Lt)&&Lt.remove(),Qe-=$t+ht,gt=lt}else{const Lt=gt.getKey(),Gt=Ue.getEditorState().read(()=>{const bt=S.$getNodeByKey(Lt);return S.$isTextNode(bt)&&bt.isSimpleText()?bt.getTextContent():null}),Pt=$t-Qe,Vt=Ct.slice(0,Pt);if(Gt!==null&&Gt!==Ct){const bt=S.$getPreviousSelection();let It=gt;if(gt.isSimpleText())gt.setTextContent(Gt);else{const Ht=S.$createTextNode(Gt);gt.replace(Ht),It=Ht}if(S.$isRangeSelection(bt)&&bt.isCollapsed()){const Ht=bt.anchor.offset;It.select(Ht,Ht)}}else if(gt.isSimpleText()){const bt=et.key===Lt;let It=et.offset;It(Ct instanceof Function?lt[ht]=Ct(dt[ht]):Ct===null?delete lt[ht]:lt[ht]=Ct,lt),{...dt}),Qe=j(gt);Ue.setStyle(Qe),C.set(Qe,gt)}function me(Ue,et){const dt=Ue.getNodes(),gt=dt.length,Qe=Ue.getStartEndPoints();if(Qe===null)return;const[lt,ht]=Qe,Ct=gt-1;let $t=dt[0],Lt=dt[Ct];if(Ue.isCollapsed()&&S.$isRangeSelection(Ue)){pe(Ue,et);return}const Pt=$t.getTextContent().length,Vt=ht.offset;let bt=lt.offset;const It=lt.isBefore(ht);let Ht=It?bt:Vt,kt=It?Vt:bt;const Kt=It?lt.type:ht.type,tr=It?ht.type:lt.type,wr=It?ht.key:lt.key;if(S.$isTextNode($t)&&Ht===Pt){const xr=$t.getNextSibling();S.$isTextNode(xr)&&(bt=0,Ht=0,$t=xr)}if(dt.length===1){if(S.$isTextNode($t)&&$t.canHaveFormat()){if(Ht=Kt==="element"?0:bt>Vt?Vt:bt,kt=tr==="element"?Pt:bt>Vt?bt:Vt,Ht===kt)return;if(Ht===0&&kt===Pt)pe($t,et),$t.select(Ht,kt);else{const xr=$t.splitText(Ht,kt),Vr=Ht===0?xr[0]:xr[1];pe(Vr,et),Vr.select(0,kt-Ht)}}}else{if(S.$isTextNode($t)&&Ht<$t.getTextContentSize()&&$t.canHaveFormat()&&(Ht!==0&&($t=$t.splitText(Ht)[1],Ht=0,lt.set($t.getKey(),Ht,"text")),pe($t,et)),S.$isTextNode(Lt)&&Lt.canHaveFormat()){const Vr=Lt.getTextContent().length;Lt.__key!==wr&&kt!==0&&(kt=Vr),kt!==Vr&&([Lt]=Lt.splitText(kt)),(kt!==0||tr==="element")&&pe(Lt,et)}for(let xr=1;xrPt.append(Vt)),dt&&(Pt=dt.append(Pt)),Lt.replace(Pt);return}let Ct=null,$t=[];for(let Lt=0;Lt{tr.append(wr),Pt.add(wr.getKey()),S.$isElementNode(wr)&&wr.getChildrenKeys().forEach(xr=>Pt.add(xr))}),ge(kt)}}else if(Gt.has(Ht.getKey())){if(!S.$isElementNode(Ht))throw Error("Expected node in emptyElements to be an ElementNode");const Kt=gt();Kt.setFormat(Ht.getFormatType()),Kt.setIndent(Ht.getIndent()),Ct.push(Kt),Ht.remove(!0)}}if(Qe!==null)for(let It=0;It=0;It--){const Ht=Ct[It];$t.insertAfter(Ht)}else{const It=$t.getFirstChild();if(S.$isElementNode(It)&&($t=It),It===null)if(Qe)$t.append(Qe);else for(let Ht=0;Ht=0;It--){const Ht=Ct[It];$t.insertAfter(Ht),Vt=Ht}const bt=S.$getPreviousSelection();S.$isRangeSelection(bt)&&Ae(bt.anchor)&&Ae(bt.focus)?S.$setSelection(bt.clone()):Vt!==null?Vt.selectEnd():Ue.dirty=!0}function ke(Ue,et){const dt=S.$getAdjacentNode(Ue.focus,et);return S.$isDecoratorNode(dt)&&!dt.isIsolated()||S.$isElementNode(dt)&&!dt.isInline()&&!dt.canBeEmpty()}function Be(Ue,et,dt,gt){Ue.modify(et?"extend":"move",dt,gt)}function Ie(Ue){const et=Ue.anchor.getNode();return(S.$isRootNode(et)?et:et.getParentOrThrow()).getDirection()==="rtl"}function je(Ue,et,dt){const gt=Ie(Ue);Be(Ue,et,dt?!gt:gt,"character")}function Ke(Ue){const et=Ue.anchor,dt=Ue.focus,lt=et.getNode().getTopLevelElementOrThrow().getParentOrThrow();let ht=lt.getFirstDescendant(),Ct=lt.getLastDescendant(),$t="element",Lt="element",Gt=0;S.$isTextNode(ht)?$t="text":!S.$isElementNode(ht)&&ht!==null&&(ht=ht.getParentOrThrow()),S.$isTextNode(Ct)?(Lt="text",Gt=Ct.getTextContentSize()):!S.$isElementNode(Ct)&&Ct!==null&&(Ct=Ct.getParentOrThrow()),ht&&Ct&&(et.set(ht.getKey(),0,$t),dt.set(Ct.getKey(),Gt,Lt))}function Je(Ue,et,dt){const gt=Ue.getStyle(),Qe=B(gt);return Qe!==null&&Qe[et]||dt}function Xe(Ue,et,dt=""){let gt=null;const Qe=Ue.getNodes(),lt=Ue.anchor,ht=Ue.focus,Ct=Ue.isBackward(),$t=Ct?ht.offset:lt.offset,Lt=Ct?ht.getNode():lt.getNode();if(Ue.isCollapsed()&&Ue.style!==""){const Gt=Ue.style,Pt=B(Gt);if(Pt!==null&&et in Pt)return Pt[et]}for(let Gt=0;Gt{j.forEach(F=>F())}}let I={attributes:!0,characterData:!0,childList:!0,subtree:!0};function N(j,F,V){function K(){if(J===null)throw Error("Unexpected null rootDOMNode");if(oe===null)throw Error("Unexpected null parentDOMNode");let{left:ge,top:Te}=J.getBoundingClientRect();var we=oe;let ke=S.createRectsFromDOMRange(j,F);xe.isConnected||we.append(xe),we=!1;for(let je=0;jeke.length;)me.pop();we&&V(me)}function W(){J=oe=null,pe!==null&&pe.disconnect(),pe=null,xe.remove();for(let ge of me)ge.remove();me=[]}function X(){let ge=j.getRootElement();if(ge===null)return W();let Te=ge.parentElement;if(!(Te instanceof HTMLElement))return W();W(),J=ge,oe=Te,pe=new MutationObserver(we=>{let ke=j.getRootElement(),Be=ke&&ke.parentElement;if(ke!==J||Be!==oe)return X();for(let Ie of we)if(!xe.contains(Ie.target))return K()}),pe.observe(Te,I),K()}let J=null,oe=null,pe=null,me=[],xe=document.createElement("div"),Ae=j.registerRootListener(X);return()=>{Ae(),W()}}function L(j,F){for(let V of F)if(j.type.startsWith(V))return!0;return!1}let B=(j,F)=>{for(;j!==C.$getRoot()&&j!=null;){if(F(j))return j;j=j.getParent()}return null};return LexicalUtils_prod.$splitNode=C.$splitNode,LexicalUtils_prod.isHTMLAnchorElement=C.isHTMLAnchorElement,LexicalUtils_prod.isHTMLElement=C.isHTMLElement,LexicalUtils_prod.$dfs=function(j,F){let V=[];j=(j||C.$getRoot()).getLatest(),F=F||(C.$isElementNode(j)?j.getLastDescendant():j);for(var K=j,W=0;(K=K.getParent())!==null;)W++;for(K=W;j!==null&&!j.is(F);)if(V.push({depth:K,node:j}),C.$isElementNode(j)&&0C.$isElementNode(V)&&!V.isInline());return C.$isElementNode(F)||R(4,j.__key),F},LexicalUtils_prod.$getNearestNodeOfType=function(j,F){for(;j!=null;){if(j instanceof F)return j;j=j.getParent()}return null},LexicalUtils_prod.$insertFirst=function(j,F){let V=j.getFirstChild();V!==null?V.insertBefore(F):j.append(F)},LexicalUtils_prod.$insertNodeToNearestRoot=function(j){var F=C.$getSelection()||C.$getPreviousSelection();if(C.$isRangeSelection(F)){var{focus:V}=F;if(F=V.getNode(),V=V.offset,C.$isRootOrShadowRoot(F))V=F.getChildAtIndex(V),V==null?F.append(j):V.insertBefore(j),j.selectNext();else{let K,W;C.$isTextNode(F)?(K=F.getParentOrThrow(),W=F.getIndexWithinParent(),0{typeof V=="string"&&(V=V.split(" ").filter(K=>K!==""),j.classList.add(...V))})},LexicalUtils_prod.isMimeType=L,LexicalUtils_prod.markSelection=function(j,F){function V(pe){pe.read(()=>{var me=C.$getSelection();if(C.$isRangeSelection(me)){var{anchor:xe,focus:Ae}=me;me=xe.getNode();var ge=me.getKey(),Te=xe.offset,we=Ae.getNode(),ke=we.getKey(),Be=Ae.offset,Ie=j.getElementByKey(ge),je=j.getElementByKey(ke);if(ge=K===null||Ie===null||Te!==W||ge!==K.getKey()||me!==K&&(!(K instanceof C.TextNode)||me.updateDOM(K,Ie,j._config)),ke=X===null||je===null||Be!==J||ke!==X.getKey()||we!==X&&(!(X instanceof C.TextNode)||we.updateDOM(X,je,j._config)),ge||ke){Ie=j.getElementByKey(xe.getNode().getKey());var Ke=j.getElementByKey(Ae.getNode().getKey());if(Ie!==null&&Ke!==null&&Ie.tagName==="SPAN"&&Ke.tagName==="SPAN"){if(ke=document.createRange(),Ae.isBefore(xe)?(ge=Ke,je=Ae.offset,Ke=Ie,Ie=xe.offset):(ge=Ie,je=xe.offset,Ie=Ae.offset),ge=ge.firstChild,ge===null||(Ke=Ke.firstChild,Ke===null))throw Error("Expected text node to be first child of span");ke.setStart(ge,je),ke.setEnd(Ke,Ie),oe(),oe=N(j,ke,Je=>{for(let Xe of Je){let ot=Xe.style;ot.background!=="Highlight"&&(ot.background="Highlight"),ot.color!=="HighlightText"&&(ot.color="HighlightText"),ot.zIndex!=="-1"&&(ot.zIndex="-1"),ot.pointerEvents!=="none"&&(ot.pointerEvents="none"),ot.marginTop!=="-1.5px"&&(ot.marginTop="-1.5px"),ot.paddingTop!=="4px"&&(ot.paddingTop="4px"),ot.paddingBottom!=="0px"&&(ot.paddingBottom="0px")}F!==void 0&&F(Je)})}}K=me,W=Te,X=we,J=Be}else J=X=W=K=null,oe(),oe=()=>{}})}let K=null,W=null,X=null,J=null,oe=()=>{};return V(j.getEditorState()),O(j.registerUpdateListener(({editorState:pe})=>V(pe)),oe,()=>{oe()})},LexicalUtils_prod.mediaFileReader=function(j,F){let V=j[Symbol.iterator]();return new Promise((K,W)=>{let X=[],J=()=>{const{done:oe,value:pe}=V.next();if(oe)return K(X);const me=new FileReader;me.addEventListener("error",W),me.addEventListener("load",()=>{const xe=me.result;typeof xe=="string"&&X.push({file:pe,result:xe}),J()}),L(pe,F)?me.readAsDataURL(pe):J()};J()})},LexicalUtils_prod.mergeRegister=O,LexicalUtils_prod.objectKlassEquals=function(j,F){return j!==null?Object.getPrototypeOf(j).constructor.name===F.name:!1},LexicalUtils_prod.positionNodeOnRange=N,LexicalUtils_prod.registerNestedElementResolver=function(j,F,V,K){return j.registerNodeTransform(F,W=>{e:{for(var X=W.getChildren(),J=0;J{typeof V=="string"&&j.classList.remove(...V.split(" "))})},LexicalUtils_prod}var LexicalUtils_dev={},hasRequiredLexicalUtils_dev;function requireLexicalUtils_dev(){if(hasRequiredLexicalUtils_dev)return LexicalUtils_dev;hasRequiredLexicalUtils_dev=1;var S=requireLexicalSelection(),C=Lexical_1;function R(...ke){return()=>{ke.forEach(Be=>Be())}}function O(ke){return`${ke}px`}const I={attributes:!0,characterData:!0,childList:!0,subtree:!0};function N(ke,Be,Ie){let je=null,Ke=null,Je=null,Xe=[];const ot=document.createElement("div");function tt(){if(je===null)throw Error("Unexpected null rootDOMNode");if(Ke===null)throw Error("Unexpected null parentDOMNode");const{left:gt,top:Qe}=je.getBoundingClientRect(),lt=Ke,ht=S.createRectsFromDOMRange(ke,Be);ot.isConnected||lt.append(ot);let Ct=!1;for(let $t=0;$tht.length;)Xe.pop();Ct&&Ie(Xe)}function Ue(){Ke=null,je=null,Je!==null&&Je.disconnect(),Je=null,ot.remove();for(const gt of Xe)gt.remove();Xe=[]}function et(){const gt=ke.getRootElement();if(gt===null)return Ue();const Qe=gt.parentElement;if(!(Qe instanceof HTMLElement))return Ue();Ue(),je=gt,Ke=Qe,Je=new MutationObserver(lt=>{const ht=ke.getRootElement(),Ct=ht&&ht.parentElement;if(ht!==je||Ct!==Ke)return et();for(const $t of lt)if(!ot.contains($t.target))return tt()}),Je.observe(Qe,I),tt()}const dt=ke.registerRootListener(et);return()=>{dt(),Ue()}}function L(ke,Be){let Ie=null,je=null,Ke=null,Je=null,Xe=()=>{};function ot(tt){tt.read(()=>{const Ue=C.$getSelection();if(!C.$isRangeSelection(Ue)){Ie=null,je=null,Ke=null,Je=null,Xe(),Xe=()=>{};return}const{anchor:et,focus:dt}=Ue,gt=et.getNode(),Qe=gt.getKey(),lt=et.offset,ht=dt.getNode(),Ct=ht.getKey(),$t=dt.offset,Lt=ke.getElementByKey(Qe),Gt=ke.getElementByKey(Ct),Pt=Ie===null||Lt===null||lt!==je||Qe!==Ie.getKey()||gt!==Ie&&(!(Ie instanceof C.TextNode)||gt.updateDOM(Ie,Lt,ke._config)),Vt=Ke===null||Gt===null||$t!==Je||Ct!==Ke.getKey()||ht!==Ke&&(!(Ke instanceof C.TextNode)||ht.updateDOM(Ke,Gt,ke._config));if(Pt||Vt){const bt=ke.getElementByKey(et.getNode().getKey()),It=ke.getElementByKey(dt.getNode().getKey());if(bt!==null&&It!==null&&bt.tagName==="SPAN"&&It.tagName==="SPAN"){const Ht=document.createRange();let kt,Kt,tr,wr;dt.isBefore(et)?(kt=It,Kt=dt.offset,tr=bt,wr=et.offset):(kt=bt,Kt=et.offset,tr=It,wr=dt.offset);const xr=kt.firstChild;if(xr===null)throw Error("Expected text node to be first child of span");const Vr=tr.firstChild;if(Vr===null)throw Error("Expected text node to be first child of span");Ht.setStart(xr,Kt),Ht.setEnd(Vr,wr),Xe(),Xe=N(ke,Ht,bn=>{for(const Bn of bn){const An=Bn.style;An.background!=="Highlight"&&(An.background="Highlight"),An.color!=="HighlightText"&&(An.color="HighlightText"),An.zIndex!=="-1"&&(An.zIndex="-1"),An.pointerEvents!=="none"&&(An.pointerEvents="none"),An.marginTop!==O(-1.5)&&(An.marginTop=O(-1.5)),An.paddingTop!==O(4)&&(An.paddingTop=O(4)),An.paddingBottom!==O(0)&&(An.paddingBottom=O(0))}Be!==void 0&&Be(bn)})}}Ie=gt,je=lt,Ke=ht,Je=$t})}return ot(ke.getEditorState()),R(ke.registerUpdateListener(({editorState:tt})=>ot(tt)),Xe,()=>{Xe()})}function B(ke,...Be){Be.forEach(Ie=>{if(typeof Ie=="string"){const je=Ie.split(" ").filter(Ke=>Ke!=="");ke.classList.add(...je)}})}function j(ke,...Be){Be.forEach(Ie=>{typeof Ie=="string"&&ke.classList.remove(...Ie.split(" "))})}function F(ke,Be){for(const Ie of Be)if(ke.type.startsWith(Ie))return!0;return!1}function V(ke,Be){const Ie=ke[Symbol.iterator]();return new Promise((je,Ke)=>{const Je=[],Xe=()=>{const{done:ot,value:tt}=Ie.next();if(ot)return je(Je);const Ue=new FileReader;Ue.addEventListener("error",Ke),Ue.addEventListener("load",()=>{const et=Ue.result;typeof et=="string"&&Je.push({file:tt,result:et}),Xe()}),F(tt,Be)?Ue.readAsDataURL(tt):Xe()};Xe()})}function K(ke,Be){const Ie=[],je=(ke||C.$getRoot()).getLatest(),Ke=Be||(C.$isElementNode(je)?je.getLastDescendant():je);let Je=je,Xe=W(Je);for(;Je!==null&&!Je.is(Ke);)if(Ie.push({depth:Xe,node:Je}),C.$isElementNode(Je)&&Je.getChildrenSize()>0)Je=Je.getFirstChild(),Xe++;else{let ot=null;for(;ot===null&&Je!==null;)ot=Je.getNextSibling(),ot===null?(Je=Je.getParent(),Xe--):Je=ot}return Je!==null&&Je.is(Ke)&&Ie.push({depth:Xe,node:Je}),Ie}function W(ke){let Be=ke,Ie=0;for(;(Be=Be.getParent())!==null;)Ie++;return Ie}function X(ke,Be){let Ie=ke;for(;Ie!=null;){if(Ie instanceof Be)return Ie;Ie=Ie.getParent()}return null}function J(ke){const Be=oe(ke,Ie=>C.$isElementNode(Ie)&&!Ie.isInline());if(!C.$isElementNode(Be))throw Error(`Expected node ${ke.__key} to have closest block element node.`);return Be}const oe=(ke,Be)=>{let Ie=ke;for(;Ie!==C.$getRoot()&&Ie!=null;){if(Be(Ie))return Ie;Ie=Ie.getParent()}return null};function pe(ke,Be,Ie,je){const Ke=ot=>ot instanceof Be,Je=ot=>{const tt=ot.getChildren();for(let dt=0;dt{const tt=Je(ot);if(tt!==null){const{child:Ue,parent:et}=tt;if(Ue.is(ot)){je(et,ot);const dt=Ue.getNextSiblings(),gt=dt.length;if(et.insertAfter(Ue),gt!==0){const Qe=Ie(et);Ue.insertAfter(Qe);for(let lt=0;lt0&&(Xe+=1,je.splitText(Ke))):(Je=je,Xe=Ke);const[,ot]=C.$splitNode(Je,Xe);ot.insertBefore(ke),ot.selectStart()}}else{if(Be!=null){const je=Be.getNodes();je[je.length-1].getTopLevelElementOrThrow().insertAfter(ke)}else C.$getRoot().append(ke);const Ie=C.$createParagraphNode();ke.insertAfter(Ie),Ie.select()}return ke.getLatest()}function Ae(ke,Be){const Ie=Be();return ke.replace(Ie),Ie.append(ke),Ie}function ge(ke,Be){return ke!==null?Object.getPrototypeOf(ke).constructor.name===Be.name:!1}function Te(ke,Be){const Ie=[];for(let je=0;je({conversion:I,priority:1})}}static importJSON(W){let X=N(W.url,{rel:W.rel,target:W.target,title:W.title});return X.setFormat(W.format),X.setIndent(W.indent),X.setDirection(W.direction),X}sanitizeUrl(W){try{let X=new URL(W);if(!R.has(X.protocol))return"about:blank"}catch{}return W}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(W){this.getWritable().__url=W}getTarget(){return this.getLatest().__target}setTarget(W){this.getWritable().__target=W}getRel(){return this.getLatest().__rel}setRel(W){this.getWritable().__rel=W}getTitle(){return this.getLatest().__title}setTitle(W){this.getWritable().__title=W}insertNewAfter(W,X=!0){return W=N(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(W,X),W}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(W,X){if(!C.$isRangeSelection(X))return!1;W=X.anchor.getNode();let J=X.focus.getNode();return this.isParentOf(W)&&this.isParentOf(J)&&0{if(pe=pe.getParent(),L(pe)){let me=pe.getChildren();for(let xe=0;xe{var Ae=xe.getParent();if(Ae!==me&&Ae!==null&&(!C.$isElementNode(xe)||xe.isInline()))if(L(Ae))me=Ae,Ae.setURL(K),X!==void 0&&Ae.setTarget(X),oe!==null&&me.setRel(oe),J!==void 0&&me.setTitle(J);else if(Ae.is(pe)||(pe=Ae,me=N(K,{rel:oe,target:X,title:J}),L(Ae)?xe.getPreviousSibling()===null?Ae.insertBefore(me):Ae.insertAfter(me):xe.insertBefore(me)),L(xe)){if(!xe.is(me)){if(me!==null){Ae=xe.getChildren();for(let ge=0;ge({conversion:I,priority:1})}}static importJSON(J){const oe=N(J.url,{rel:J.rel,target:J.target,title:J.title});return oe.setFormat(J.format),oe.setIndent(J.indent),oe.setDirection(J.direction),oe}sanitizeUrl(J){try{const oe=new URL(J);if(!R.has(oe.protocol))return"about:blank"}catch{return J}return J}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(J){const oe=this.getWritable();oe.__url=J}getTarget(){return this.getLatest().__target}setTarget(J){const oe=this.getWritable();oe.__target=J}getRel(){return this.getLatest().__rel}setRel(J){const oe=this.getWritable();oe.__rel=J}getTitle(){return this.getLatest().__title}setTitle(J){const oe=this.getWritable();oe.__title=J}insertNewAfter(J,oe=!0){const pe=N(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(pe,oe),pe}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(J,oe,pe){if(!C.$isRangeSelection(oe))return!1;const me=oe.anchor.getNode(),xe=oe.focus.getNode();return this.isParentOf(me)&&this.isParentOf(xe)&&oe.getTextContent().length>0}}function I(X){let J=null;if(S.isHTMLAnchorElement(X)){const oe=X.textContent;(oe!==null&&oe!==""||X.children.length>0)&&(J=N(X.getAttribute("href")||"",{rel:X.getAttribute("rel"),target:X.getAttribute("target"),title:X.getAttribute("title")}))}return{node:J}}function N(X,J){return C.$applyNodeReplacement(new O(X,J))}function L(X){return X instanceof O}class B extends O{static getType(){return"autolink"}static clone(J){return new B(J.__url,{rel:J.__rel,target:J.__target,title:J.__title},J.__key)}static importJSON(J){const oe=j(J.url,{rel:J.rel,target:J.target,title:J.title});return oe.setFormat(J.format),oe.setIndent(J.indent),oe.setDirection(J.direction),oe}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(J,oe=!0){const pe=this.getParentOrThrow().insertNewAfter(J,oe);if(C.$isElementNode(pe)){const me=j(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return pe.append(me),me}return null}}function j(X,J){return C.$applyNodeReplacement(new B(X,J))}function F(X){return X instanceof B}const V=C.createCommand("TOGGLE_LINK_COMMAND");function K(X,J={}){const{target:oe,title:pe}=J,me=J.rel===void 0?"noreferrer":J.rel,xe=C.$getSelection();if(!C.$isRangeSelection(xe))return;const Ae=xe.extract();if(X===null)Ae.forEach(ge=>{const Te=ge.getParent();if(L(Te)){const we=Te.getChildren();for(let ke=0;ke{const ke=we.getParent();if(!(ke===Te||ke===null||C.$isElementNode(we)&&!we.isInline())){if(L(ke)){Te=ke,ke.setURL(X),oe!==void 0&&ke.setTarget(oe),me!==null&&Te.setRel(me),pe!==void 0&&Te.setTitle(pe);return}if(ke.is(ge)||(ge=ke,Te=N(X,{rel:me,target:oe,title:pe}),L(ke)?we.getPreviousSibling()===null?ke.insertBefore(Te):ke.insertAfter(Te):we.insertBefore(Te)),L(we)){if(we.is(Te))return;if(Te!==null){const Be=we.getChildren();for(let Ie=0;Ie{var F=C.$getRoot();if(F.isEmpty()){let V=C.$createParagraphNode();F.append(V),F=O?document.activeElement:null,(C.$getSelection()!==null||F!==null&&F===B.getRootElement())&&V.select()}},N);else if(j!==null)switch(typeof j){case"string":let F=B.parseEditorState(j);B.setEditorState(F,N);break;case"object":B.setEditorState(j,N);break;case"function":B.update(()=>{C.$getRoot().isEmpty()&&j(B)},N)}}}return LexicalComposer_prod.LexicalComposer=function({initialConfig:B,children:j}){let F=R.useMemo(()=>{const{theme:V,namespace:K,editor__DEPRECATED:W,nodes:X,onError:J,editorState:oe,html:pe}=B,me=S.createLexicalComposerContext(null,V);let xe=W||null;if(xe===null){const Ae=C.createEditor({editable:B.editable,html:pe,namespace:K,nodes:X,onError:ge=>J(ge,Ae),theme:V});L(Ae,oe),xe=Ae}return[xe,me]},[]);return I(()=>{let V=B.editable,[K]=F;K.setEditable(V!==void 0?V:!0)},[]),R.createElement(S.LexicalComposerContext.Provider,{value:F},j)},LexicalComposer_prod}var LexicalComposer_dev={},hasRequiredLexicalComposer_dev;function requireLexicalComposer_dev(){if(hasRequiredLexicalComposer_dev)return LexicalComposer_dev;hasRequiredLexicalComposer_dev=1;var S=LexicalComposerContext_1,C=Lexical_1,R=requireReact();const O=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var N=O?R.useLayoutEffect:R.useEffect;const L={tag:"history-merge"};function B({initialConfig:F,children:V}){const K=R.useMemo(()=>{const{theme:W,namespace:X,editor__DEPRECATED:J,nodes:oe,onError:pe,editorState:me,html:xe}=F,Ae=S.createLexicalComposerContext(null,W);let ge=J||null;if(ge===null){const Te=C.createEditor({editable:F.editable,html:xe,namespace:X,nodes:oe,onError:we=>pe(we,Te),theme:W});j(Te,me),ge=Te}return[ge,Ae]},[]);return N(()=>{const W=F.editable,[X]=K;X.setEditable(W!==void 0?W:!0)},[]),R.createElement(S.LexicalComposerContext.Provider,{value:K},V)}function j(F,V){if(V!==null){if(V===void 0)F.update(()=>{const K=C.$getRoot();if(K.isEmpty()){const W=C.$createParagraphNode();K.append(W);const X=O?document.activeElement:null;(C.$getSelection()!==null||X!==null&&X===F.getRootElement())&&W.select()}},L);else if(V!==null)switch(typeof V){case"string":{const K=F.parseEditorState(V);F.setEditorState(K,L);break}case"object":{F.setEditorState(V,L);break}case"function":{F.update(()=>{C.$getRoot().isEmpty()&&V(F)},L);break}}}}return LexicalComposer_dev.LexicalComposer=B,LexicalComposer_dev}var define_process_env_default$7={};const LexicalComposer=define_process_env_default$7.NODE_ENV==="development"?requireLexicalComposer_dev():requireLexicalComposer_prod();var LexicalComposer_1=LexicalComposer,LexicalContentEditable_prod={},hasRequiredLexicalContentEditable_prod;function requireLexicalContentEditable_prod(){if(hasRequiredLexicalContentEditable_prod)return LexicalContentEditable_prod;hasRequiredLexicalContentEditable_prod=1;var S=LexicalComposerContext_1,C=requireReact();function R(){return R=Object.assign?Object.assign.bind():function(I){for(var N=1;N{ke.setRootElement(Ke)},[ke]);return O(()=>(Ie(ke.isEditable()),ke.registerEditableListener(Ke=>{Ie(Ke)})),[ke]),C.createElement("div",R({},we,{"aria-activedescendant":Be?I:void 0,"aria-autocomplete":Be?N:"none","aria-controls":Be?L:void 0,"aria-describedby":B,"aria-expanded":Be&&me==="combobox"?!!j:void 0,"aria-label":F,"aria-labelledby":V,"aria-multiline":K,"aria-owns":Be?W:void 0,"aria-readonly":Be?void 0:!0,"aria-required":X,autoCapitalize:J,className:oe,contentEditable:Be,"data-testid":Te,id:pe,ref:je,role:me,spellCheck:xe,style:Ae,tabIndex:ge}))},LexicalContentEditable_prod}var LexicalContentEditable_dev={},hasRequiredLexicalContentEditable_dev;function requireLexicalContentEditable_dev(){if(hasRequiredLexicalContentEditable_dev)return LexicalContentEditable_dev;hasRequiredLexicalContentEditable_dev=1;var S=LexicalComposerContext_1,C=requireReact();function R(){return R=Object.assign?Object.assign.bind():function(B){for(var j=1;j{je.setRootElement(ot)},[je]);return N(()=>(Je(je.isEditable()),je.registerEditableListener(ot=>{Je(ot)})),[je]),C.createElement("div",R({},Ie,{"aria-activedescendant":Ke?B:void 0,"aria-autocomplete":Ke?j:"none","aria-controls":Ke?F:void 0,"aria-describedby":V,"aria-expanded":Ke&&ge==="combobox"?!!K:void 0,"aria-label":W,"aria-labelledby":X,"aria-multiline":J,"aria-owns":Ke?oe:void 0,"aria-readonly":Ke?void 0:!0,"aria-required":pe,autoCapitalize:me,className:xe,contentEditable:Ke,"data-testid":Be,id:Ae,ref:Xe,role:ge,spellCheck:Te,style:we,tabIndex:ke}))}return LexicalContentEditable_dev.ContentEditable=L,LexicalContentEditable_dev}var define_process_env_default$6={};const LexicalContentEditable=define_process_env_default$6.NODE_ENV==="development"?requireLexicalContentEditable_dev():requireLexicalContentEditable_prod();var LexicalContentEditable_1=LexicalContentEditable,LexicalErrorBoundary_prod,hasRequiredLexicalErrorBoundary_prod;function requireLexicalErrorBoundary_prod(){if(hasRequiredLexicalErrorBoundary_prod)return LexicalErrorBoundary_prod;hasRequiredLexicalErrorBoundary_prod=1;var S=requireReact();function C(L,B){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},C(L,B)}function R(L,B){L.prototype=Object.create(B.prototype),L.prototype.constructor=L,C(L,B)}function O(L,B){return L===void 0&&(L=[]),B===void 0&&(B=[]),L.length!==B.length||L.some(function(j,F){return!Object.is(j,B[F])})}var I={error:null},N=function(L){function B(){for(var F,V=arguments.length,K=Array(V),W=0;W{let J=Date.now();if(X.has("historic"))return B=0,L=J,2;let oe=R(j,F,K,W,I.isComposing()),pe=(()=>{var me=V===null||V.editor===I,xe=X.has("history-push");if(!xe&&me&&X.has("history-merge"))return 0;if(j===null)return 1;var Ae=F._selection;if(!(0{const oe=N.current,pe=N.redoStack,me=N.undoStack,xe=oe===null?null:oe.editorState;if(oe===null||V!==xe){if(K=B(K,V,oe,W,X,J),K===1)pe.length!==0&&(N.redoStack=[],I.dispatchCommand(C.CAN_REDO_COMMAND,!1)),oe!==null&&(me.push({...oe}),I.dispatchCommand(C.CAN_UNDO_COMMAND,!0));else if(K===2)return;N.current={editor:I,editorState:V}}};let j=S.mergeRegister(I.registerCommand(C.UNDO_COMMAND,()=>{let V=N.redoStack,K=N.undoStack;if(K.length!==0){let W=N.current,X=K.pop();W!==null&&(V.push(W),I.dispatchCommand(C.CAN_REDO_COMMAND,!0)),K.length===0&&I.dispatchCommand(C.CAN_UNDO_COMMAND,!1),N.current=X||null,X&&X.editor.setEditorState(X.editorState,{tag:"historic"})}return!0},C.COMMAND_PRIORITY_EDITOR),I.registerCommand(C.REDO_COMMAND,()=>{let V=N.redoStack;var K=N.undoStack;if(V.length!==0){let W=N.current;W!==null&&(K.push(W),I.dispatchCommand(C.CAN_UNDO_COMMAND,!0)),K=V.pop(),V.length===0&&I.dispatchCommand(C.CAN_REDO_COMMAND,!1),N.current=K||null,K&&K.editor.setEditorState(K.editorState,{tag:"historic"})}return!0},C.COMMAND_PRIORITY_EDITOR),I.registerCommand(C.CLEAR_EDITOR_COMMAND,()=>(N.undoStack=[],N.redoStack=[],N.current=null,!1),C.COMMAND_PRIORITY_EDITOR),I.registerCommand(C.CLEAR_HISTORY_COMMAND,()=>(N.undoStack=[],N.redoStack=[],N.current=null,I.dispatchCommand(C.CAN_REDO_COMMAND,!1),I.dispatchCommand(C.CAN_UNDO_COMMAND,!1),!0),C.COMMAND_PRIORITY_EDITOR),I.registerUpdateListener(L)),F=I.registerUpdateListener(L);return()=>{j(),F()}},LexicalHistory_prod}var LexicalHistory_dev={},hasRequiredLexicalHistory_dev;function requireLexicalHistory_dev(){if(hasRequiredLexicalHistory_dev)return LexicalHistory_dev;hasRequiredLexicalHistory_dev=1;var S=LexicalUtils_1,C=Lexical_1;const R=0,O=1,I=2,N=0,L=1,B=2,j=3,F=4;function V(Ae,ge,Te){const we=Ae._nodeMap,ke=[];for(const Be of ge){const Ie=we.get(Be);Ie!==void 0&&ke.push(Ie)}for(const[Be,Ie]of Te){if(!Ie)continue;const je=we.get(Be);je!==void 0&&!C.$isRootNode(je)&&ke.push(je)}return ke}function K(Ae,ge,Te,we,ke){if(Ae===null||Te.size===0&&we.size===0&&!ke)return N;const Be=ge._selection,Ie=Ae._selection;if(ke)return L;if(!C.$isRangeSelection(Be)||!C.$isRangeSelection(Ie)||!Ie.isCollapsed()||!Be.isCollapsed())return N;const je=V(ge,Te,we);if(je.length===0)return N;if(je.length>1){const Qe=ge._nodeMap,lt=Qe.get(Be.anchor.key),ht=Qe.get(Ie.anchor.key);return lt&&ht&&!Ae._nodeMap.has(lt.__key)&&C.$isTextNode(lt)&<.__text.length===1&&Be.anchor.offset===1?B:N}const Ke=je[0],Je=Ae._nodeMap.get(Ke.__key);if(!C.$isTextNode(Je)||!C.$isTextNode(Ke)||Je.__mode!==Ke.__mode)return N;const Xe=Je.__text,ot=Ke.__text;if(Xe===ot)return N;const tt=Be.anchor,Ue=Ie.anchor;if(tt.key!==Ue.key||tt.type!=="text")return N;const et=tt.offset,dt=Ue.offset,gt=ot.length-Xe.length;return gt===1&&dt===et-1?B:gt===-1&&dt===et+1?j:gt===-1&&dt===et?F:N}function W(Ae,ge,Te){const we=ge._nodeMap.get(Ae),ke=Te._nodeMap.get(Ae),Be=ge._selection,Ie=Te._selection;let je=!1;return C.$isRangeSelection(Be)&&C.$isRangeSelection(Ie)&&(je=Be.anchor.type==="element"&&Be.focus.type==="element"&&Ie.anchor.type==="text"&&Ie.focus.type==="text"),!je&&C.$isTextNode(we)&&C.$isTextNode(ke)?we.__type===ke.__type&&we.__text===ke.__text&&we.__mode===ke.__mode&&we.__detail===ke.__detail&&we.__style===ke.__style&&we.__format===ke.__format&&we.__parent===ke.__parent:!1}function X(Ae,ge){let Te=Date.now(),we=N;return(ke,Be,Ie,je,Ke,Je)=>{const Xe=Date.now();if(Je.has("historic"))return we=N,Te=Xe,I;const ot=K(ke,Be,je,Ke,Ae.isComposing()),tt=(()=>{const Ue=Ie===null||Ie.editor===Ae,et=Je.has("history-push");if(!et&&Ue&&Je.has("history-merge"))return R;if(ke===null)return O;const gt=Be._selection;if(!(je.size>0||Ke.size>0))return gt!==null?R:I;if(et===!1&&ot!==N&&ot===we&&Xe{const tt=ge.current,Ue=ge.redoStack,et=ge.undoStack,dt=tt===null?null:tt.editorState;if(tt!==null&&je===dt)return;const gt=we(Ke,je,tt,Je,Xe,ot);if(gt===O)Ue.length!==0&&(ge.redoStack=[],Ae.dispatchCommand(C.CAN_REDO_COMMAND,!1)),tt!==null&&(et.push({...tt}),Ae.dispatchCommand(C.CAN_UNDO_COMMAND,!0));else if(gt===I)return;ge.current={editor:Ae,editorState:je}},Be=S.mergeRegister(Ae.registerCommand(C.UNDO_COMMAND,()=>(oe(Ae,ge),!0),C.COMMAND_PRIORITY_EDITOR),Ae.registerCommand(C.REDO_COMMAND,()=>(J(Ae,ge),!0),C.COMMAND_PRIORITY_EDITOR),Ae.registerCommand(C.CLEAR_EDITOR_COMMAND,()=>(pe(ge),!1),C.COMMAND_PRIORITY_EDITOR),Ae.registerCommand(C.CLEAR_HISTORY_COMMAND,()=>(pe(ge),Ae.dispatchCommand(C.CAN_REDO_COMMAND,!1),Ae.dispatchCommand(C.CAN_UNDO_COMMAND,!1),!0),C.COMMAND_PRIORITY_EDITOR),Ae.registerUpdateListener(ke)),Ie=Ae.registerUpdateListener(ke);return()=>{Be(),Ie()}}function xe(){return{current:null,redoStack:[],undoStack:[]}}return LexicalHistory_dev.createEmptyHistoryState=xe,LexicalHistory_dev.registerHistory=me,LexicalHistory_dev}var LexicalHistory_1,hasRequiredLexicalHistory;function requireLexicalHistory(){if(hasRequiredLexicalHistory)return LexicalHistory_1;hasRequiredLexicalHistory=1;var S={};return LexicalHistory_1=S.NODE_ENV==="development"?requireLexicalHistory_dev():requireLexicalHistory_prod(),LexicalHistory_1}var hasRequiredLexicalHistoryPlugin_prod;function requireLexicalHistoryPlugin_prod(){if(hasRequiredLexicalHistoryPlugin_prod)return LexicalHistoryPlugin_prod;hasRequiredLexicalHistoryPlugin_prod=1;var S=LexicalComposerContext_1,C=requireLexicalHistory(),R=requireReact();function O(I,N,L=1e3){let B=R.useMemo(()=>N||C.createEmptyHistoryState(),[N]);R.useEffect(()=>C.registerHistory(I,B,L),[L,I,B])}return LexicalHistoryPlugin_prod.createEmptyHistoryState=C.createEmptyHistoryState,LexicalHistoryPlugin_prod.HistoryPlugin=function({externalHistoryState:I}){let[N]=S.useLexicalComposerContext();return O(N,I),null},LexicalHistoryPlugin_prod}var LexicalHistoryPlugin_dev={},hasRequiredLexicalHistoryPlugin_dev;function requireLexicalHistoryPlugin_dev(){if(hasRequiredLexicalHistoryPlugin_dev)return LexicalHistoryPlugin_dev;hasRequiredLexicalHistoryPlugin_dev=1;var S=LexicalComposerContext_1,C=requireLexicalHistory(),R=requireReact();function O(N,L,B=1e3){const j=R.useMemo(()=>L||C.createEmptyHistoryState(),[L]);R.useEffect(()=>C.registerHistory(N,j,B),[B,N,j])}function I({externalHistoryState:N}){const[L]=S.useLexicalComposerContext();return O(L,N),null}return LexicalHistoryPlugin_dev.createEmptyHistoryState=C.createEmptyHistoryState,LexicalHistoryPlugin_dev.HistoryPlugin=I,LexicalHistoryPlugin_dev}var define_process_env_default$4={};const LexicalHistoryPlugin=define_process_env_default$4.NODE_ENV==="development"?requireLexicalHistoryPlugin_dev():requireLexicalHistoryPlugin_prod();var LexicalHistoryPlugin_1=LexicalHistoryPlugin,LexicalOnChangePlugin_prod={},hasRequiredLexicalOnChangePlugin_prod;function requireLexicalOnChangePlugin_prod(){if(hasRequiredLexicalOnChangePlugin_prod)return LexicalOnChangePlugin_prod;hasRequiredLexicalOnChangePlugin_prod=1;var S=LexicalComposerContext_1,C=requireReact(),R=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect;return LexicalOnChangePlugin_prod.OnChangePlugin=function({ignoreHistoryMergeTagChange:O=!0,ignoreSelectionChange:I=!1,onChange:N}){let[L]=S.useLexicalComposerContext();return R(()=>{if(N)return L.registerUpdateListener(({editorState:B,dirtyElements:j,dirtyLeaves:F,prevEditorState:V,tags:K})=>{I&&j.size===0&&F.size===0||O&&K.has("history-merge")||V.isEmpty()||N(B,L,K)})},[L,O,I,N]),null},LexicalOnChangePlugin_prod}var LexicalOnChangePlugin_dev={},hasRequiredLexicalOnChangePlugin_dev;function requireLexicalOnChangePlugin_dev(){if(hasRequiredLexicalOnChangePlugin_dev)return LexicalOnChangePlugin_dev;hasRequiredLexicalOnChangePlugin_dev=1;var S=LexicalComposerContext_1,C=requireReact(),I=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect;function N({ignoreHistoryMergeTagChange:L=!0,ignoreSelectionChange:B=!1,onChange:j}){const[F]=S.useLexicalComposerContext();return I(()=>{if(j)return F.registerUpdateListener(({editorState:V,dirtyElements:K,dirtyLeaves:W,prevEditorState:X,tags:J})=>{B&&K.size===0&&W.size===0||L&&J.has("history-merge")||X.isEmpty()||j(V,F,J)})},[F,L,B,j]),null}return LexicalOnChangePlugin_dev.OnChangePlugin=N,LexicalOnChangePlugin_dev}var define_process_env_default$3={};const LexicalOnChangePlugin=define_process_env_default$3.NODE_ENV==="development"?requireLexicalOnChangePlugin_dev():requireLexicalOnChangePlugin_prod();var LexicalOnChangePlugin_1=LexicalOnChangePlugin,LexicalRichTextPlugin_prod={},useLexicalEditable_prod,hasRequiredUseLexicalEditable_prod;function requireUseLexicalEditable_prod(){if(hasRequiredUseLexicalEditable_prod)return useLexicalEditable_prod;hasRequiredUseLexicalEditable_prod=1;var S=LexicalComposerContext_1,C=requireReact(),R=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect;function O(N){let[L]=S.useLexicalComposerContext(),B=C.useMemo(()=>N(L),[L,N]),j=C.useRef(B.initialValueFn()),[F,V]=C.useState(j.current);return R(()=>{let{initialValueFn:K,subscribe:W}=B,X=K();return j.current!==X&&(j.current=X,V(X)),W(J=>{j.current=J,V(J)})},[B,N]),F}function I(N){return{initialValueFn:()=>N.isEditable(),subscribe:L=>N.registerEditableListener(L)}}return useLexicalEditable_prod=function(){return O(I)},useLexicalEditable_prod}var useLexicalEditable_dev,hasRequiredUseLexicalEditable_dev;function requireUseLexicalEditable_dev(){if(hasRequiredUseLexicalEditable_dev)return useLexicalEditable_dev;hasRequiredUseLexicalEditable_dev=1;var S=LexicalComposerContext_1,C=requireReact(),I=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect;function N(j){const[F]=S.useLexicalComposerContext(),V=C.useMemo(()=>j(F),[F,j]),K=C.useRef(V.initialValueFn()),[W,X]=C.useState(K.current);return I(()=>{const{initialValueFn:J,subscribe:oe}=V,pe=J();return K.current!==pe&&(K.current=pe,X(pe)),oe(me=>{K.current=me,X(me)})},[V,j]),W}function L(j){return{initialValueFn:()=>j.isEditable(),subscribe:F=>j.registerEditableListener(F)}}function B(){return N(L)}return useLexicalEditable_dev=B,useLexicalEditable_dev}var useLexicalEditable_1,hasRequiredUseLexicalEditable;function requireUseLexicalEditable(){if(hasRequiredUseLexicalEditable)return useLexicalEditable_1;hasRequiredUseLexicalEditable=1;var S={};return useLexicalEditable_1=S.NODE_ENV==="development"?requireUseLexicalEditable_dev():requireUseLexicalEditable_prod(),useLexicalEditable_1}var LexicalText_prod={},hasRequiredLexicalText_prod;function requireLexicalText_prod(){if(hasRequiredLexicalText_prod)return LexicalText_prod;hasRequiredLexicalText_prod=1;var S=Lexical_1;function C(I,N=!0){return I?!1:(I=R(),N&&(I=I.trim()),I==="")}function R(){return S.$getRoot().getTextContent()}function O(I){if(!C(I,!1))return!1;I=S.$getRoot().getChildren();let N=I.length;if(1O(I)},LexicalText_prod.$findTextIntersectionFromCharacters=function(I,N){var L=I.getFirstChild();I=0;e:for(;L!==null;){if(S.$isElementNode(L)){var B=L.getFirstChild();if(B!==null){L=B;continue}}else if(S.$isTextNode(L)){if(B=L.getTextContentSize(),I+B>N)return{node:L,offset:N-I};I+=B}if(B=L.getNextSibling(),B!==null)L=B;else{for(L=L.getParent();L!==null;){if(B=L.getNextSibling(),B!==null){L=B;continue e}L=L.getParent()}break}}return null},LexicalText_prod.$isRootTextContentEmpty=C,LexicalText_prod.$isRootTextContentEmptyCurry=function(I,N){return()=>C(I,N)},LexicalText_prod.$rootTextContent=R,LexicalText_prod.registerLexicalTextEntity=function(I,N,L,B){let j=V=>{const K=S.$createTextNode(V.getTextContent());K.setFormat(V.getFormat()),V.replace(K)},F=I.registerNodeTransform(S.TextNode,V=>{if(V.isSimpleText()){var K=V.getPreviousSibling(),W=V.getTextContent(),X=V;if(S.$isTextNode(K)){var J=K.getTextContent(),oe=N(J+W);if(K instanceof L){if(oe===null||K.getLatest().__mode!==0){j(K);return}if(oe=oe.end-J.length,0{var K=V.getTextContent();const W=N(K);W===null||W.start!==0?j(V):K.length>W.end?V.splitText(W.end):(K=V.getPreviousSibling(),S.$isTextNode(K)&&K.isTextEntity()&&(j(K),j(V)),K=V.getNextSibling(),S.$isTextNode(K)&&K.isTextEntity()&&(j(K),V instanceof L&&j(V)))}),[F,I]},LexicalText_prod}var LexicalText_dev={},hasRequiredLexicalText_dev;function requireLexicalText_dev(){if(hasRequiredLexicalText_dev)return LexicalText_dev;hasRequiredLexicalText_dev=1;var S=Lexical_1;function C(j,F){let V=j.getFirstChild(),K=0;e:for(;V!==null;){if(S.$isElementNode(V)){const J=V.getFirstChild();if(J!==null){V=J;continue}}else if(S.$isTextNode(V)){const J=V.getTextContentSize();if(K+J>F)return{node:V,offset:F-K};K+=J}const W=V.getNextSibling();if(W!==null){V=W;continue}let X=V.getParent();for(;X!==null;){const J=X.getNextSibling();if(J!==null){V=J;continue e}X=X.getParent()}break}return null}function R(j,F=!0){if(j)return!1;let V=I();return F&&(V=V.trim()),V===""}function O(j,F){return()=>R(j,F)}function I(){return S.$getRoot().getTextContent()}function N(j){if(!R(j,!1))return!1;const V=S.$getRoot().getChildren(),K=V.length;if(K>1)return!1;for(let W=0;WN(j)}function B(j,F,V,K){const W=Ae=>Ae instanceof V,X=Ae=>{const ge=S.$createTextNode(Ae.getTextContent());ge.setFormat(Ae.getFormat()),Ae.replace(ge)},J=Ae=>Ae.getLatest().__mode,oe=Ae=>{if(!Ae.isSimpleText())return;const ge=Ae.getPreviousSibling();let Te=Ae.getTextContent(),we=Ae,ke;if(S.$isTextNode(ge)){const Be=ge.getTextContent(),Ie=Be+Te,je=F(Ie);if(W(ge))if(je===null||J(ge)!==0){X(ge);return}else{const Ke=je.end-Be.length;if(Ke>0){const Je=Te.slice(0,Ke),Xe=Be+Je;if(ge.select(),ge.setTextContent(Xe),Ke===Te.length)Ae.remove();else{const ot=Te.slice(Ke);Ae.setTextContent(ot)}return}}else if(je===null||je.start{const ge=Ae.getTextContent(),Te=F(ge);if(Te===null||Te.start!==0){X(Ae);return}if(ge.length>Te.end){Ae.splitText(Te.end);return}const we=Ae.getPreviousSibling();S.$isTextNode(we)&&we.isTextEntity()&&(X(we),X(Ae));const ke=Ae.getNextSibling();S.$isTextNode(ke)&&ke.isTextEntity()&&(X(ke),W(Ae)&&X(Ae))},me=j.registerNodeTransform(S.TextNode,oe),xe=j.registerNodeTransform(V,pe);return[me,xe]}return LexicalText_dev.$canShowPlaceholder=N,LexicalText_dev.$canShowPlaceholderCurry=L,LexicalText_dev.$findTextIntersectionFromCharacters=C,LexicalText_dev.$isRootTextContentEmpty=R,LexicalText_dev.$isRootTextContentEmptyCurry=O,LexicalText_dev.$rootTextContent=I,LexicalText_dev.registerLexicalTextEntity=B,LexicalText_dev}var LexicalText_1,hasRequiredLexicalText;function requireLexicalText(){if(hasRequiredLexicalText)return LexicalText_1;hasRequiredLexicalText=1;var S={};return LexicalText_1=S.NODE_ENV==="development"?requireLexicalText_dev():requireLexicalText_prod(),LexicalText_1}var LexicalDragon_prod={},hasRequiredLexicalDragon_prod;function requireLexicalDragon_prod(){if(hasRequiredLexicalDragon_prod)return LexicalDragon_prod;hasRequiredLexicalDragon_prod=1;var S=Lexical_1;return LexicalDragon_prod.registerDragonSupport=function(C){let R=window.location.origin,O=I=>{if(I.origin===R){var N=C.getRootElement();if(document.activeElement===N&&(N=I.data,typeof N=="string")){try{var L=JSON.parse(N)}catch{return}if(L&&L.protocol==="nuanria_messaging"&&L.type==="request"&&(L=L.payload)&&L.functionId==="makeChanges"&&(L=L.args)){const[B,j,F,V,K]=L;C.update(()=>{const W=S.$getSelection();if(S.$isRangeSelection(W)){var X=W.anchor;let J=X.getNode(),oe=0,pe=0;S.$isTextNode(J)&&0<=B&&0<=j&&(oe=B,pe=B+j,W.setTextNodeRange(J,oe,J,pe)),(oe!==pe||F!=="")&&(W.insertRawText(F),J=X.getNode()),S.$isTextNode(J)&&(oe=V,pe=V+K,X=J.getTextContentSize(),oe=oe>X?X:oe,pe=pe>X?X:pe,W.setTextNodeRange(J,oe,J,pe)),I.stopImmediatePropagation()}})}}}};return window.addEventListener("message",O,!0),()=>{window.removeEventListener("message",O,!0)}},LexicalDragon_prod}var LexicalDragon_dev={},hasRequiredLexicalDragon_dev;function requireLexicalDragon_dev(){if(hasRequiredLexicalDragon_dev)return LexicalDragon_dev;hasRequiredLexicalDragon_dev=1;var S=Lexical_1;function C(R){const O=window.location.origin,I=N=>{if(N.origin!==O)return;const L=R.getRootElement();if(document.activeElement!==L)return;const B=N.data;if(typeof B=="string"){let j;try{j=JSON.parse(B)}catch{return}if(j&&j.protocol==="nuanria_messaging"&&j.type==="request"){const F=j.payload;if(F&&F.functionId==="makeChanges"){const V=F.args;if(V){const[K,W,X,J,oe,pe]=V;R.update(()=>{const me=S.$getSelection();if(S.$isRangeSelection(me)){const xe=me.anchor;let Ae=xe.getNode(),ge=0,Te=0;if(S.$isTextNode(Ae)&&K>=0&&W>=0&&(ge=K,Te=K+W,me.setTextNodeRange(Ae,ge,Ae,Te)),(ge!==Te||X!=="")&&(me.insertRawText(X),Ae=xe.getNode()),S.$isTextNode(Ae)){ge=J,Te=J+oe;const we=Ae.getTextContentSize();ge=ge>we?we:ge,Te=Te>we?we:Te,me.setTextNodeRange(Ae,ge,Ae,Te)}N.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",I,!0),()=>{window.removeEventListener("message",I,!0)}}return LexicalDragon_dev.registerDragonSupport=C,LexicalDragon_dev}var LexicalDragon_1,hasRequiredLexicalDragon;function requireLexicalDragon(){if(hasRequiredLexicalDragon)return LexicalDragon_1;hasRequiredLexicalDragon=1;var S={};return LexicalDragon_1=S.NODE_ENV==="development"?requireLexicalDragon_dev():requireLexicalDragon_prod(),LexicalDragon_1}var LexicalRichText_prod={},LexicalClipboard_prod={},LexicalHtml_prod={},hasRequiredLexicalHtml_prod;function requireLexicalHtml_prod(){if(hasRequiredLexicalHtml_prod)return LexicalHtml_prod;hasRequiredLexicalHtml_prod=1;var S=requireLexicalSelection(),C=LexicalUtils_1,R=Lexical_1;function O(L,B,j,F=null){let V=F!==null?B.isSelected(F):!0,K=R.$isElementNode(B)&&B.excludeFromCopy("html");var W=B;F!==null&&(W=S.$cloneWithProperties(B),W=R.$isTextNode(W)&&F!==null?S.$sliceSelectedTextNodeContent(F,W):W);let X=R.$isElementNode(W)?W.getChildren():[];var J=L._nodes.get(W.getType());J=J&&J.exportDOM!==void 0?J.exportDOM(L,W):W.exportDOM(L);let{element:oe,after:pe}=J;if(!oe)return!1;J=document.createDocumentFragment();for(let me=0;me"u"||typeof window>"u"&&typeof commonjsGlobal.window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let j=document.createElement("div"),F=R.$getRoot().getChildren();for(let V=0;V"u"||typeof window>"u"&&typeof commonjsGlobal.window>"u")throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const K=document.createElement("div"),X=R.$getRoot().getChildren();for(let J=0;J{J.update(()=>{ge(X(J,oe))})});var pe=J.getRootElement();let me=J._window==null?window.document:J._window.document,xe=N?(J._window||window).getSelection():null;if(pe===null||xe===null)return!1;let Ae=me.createElement("span");return Ae.style.cssText="position: fixed; top: -1000px;",Ae.append(me.createTextNode("#")),pe.append(Ae),pe=new Range,pe.setStart(Ae,0),pe.setEnd(Ae,1),xe.removeAllRanges(),xe.addRange(pe),new Promise(ge=>{let Te=J.registerCommand(O.COPY_COMMAND,we=>(R.objectKlassEquals(we,ClipboardEvent)&&(Te(),W!==null&&(window.clearTimeout(W),W=null),ge(X(J,we))),!0),O.COMMAND_PRIORITY_CRITICAL);W=window.setTimeout(()=>{Te(),W=null,ge(!1)},50),me.execCommand("copy"),Ae.remove()})},LexicalClipboard_prod}var LexicalClipboard_dev={},hasRequiredLexicalClipboard_dev;function requireLexicalClipboard_dev(){if(hasRequiredLexicalClipboard_dev)return LexicalClipboard_dev;hasRequiredLexicalClipboard_dev=1;var S=requireLexicalHtml(),C=requireLexicalSelection(),R=LexicalUtils_1,O=Lexical_1;const I=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",N=Ae=>I?(Ae||window).getSelection():null;function L(Ae){const ge=O.$getSelection();if(ge==null)throw Error("Expected valid LexicalSelection");return O.$isRangeSelection(ge)&&ge.isCollapsed()||ge.getNodes().length===0?"":S.$generateHtmlFromNodes(Ae,ge)}function B(Ae){const ge=O.$getSelection();if(ge==null)throw Error("Expected valid LexicalSelection");return O.$isRangeSelection(ge)&&ge.isCollapsed()||ge.getNodes().length===0?null:JSON.stringify(X(Ae,ge))}function j(Ae,ge){const Te=Ae.getData("text/plain")||Ae.getData("text/uri-list");Te!=null&&ge.insertRawText(Te)}function F(Ae,ge,Te){const we=Ae.getData("application/x-lexical-editor");if(we)try{const Ie=JSON.parse(we);if(Ie.namespace===Te._config.namespace&&Array.isArray(Ie.nodes)){const je=J(Ie.nodes);return V(Te,je,ge)}}catch{}const ke=Ae.getData("text/html");if(ke)try{const je=new DOMParser().parseFromString(ke,"text/html"),Ke=S.$generateNodesFromDOM(Te,je);return V(Te,Ke,ge)}catch{}const Be=Ae.getData("text/plain")||Ae.getData("text/uri-list");if(Be!=null)if(O.$isRangeSelection(ge)){const Ie=Be.split(/(\r?\n|\t)/);Ie[Ie.length-1]===""&&Ie.pop();for(let je=0;je0?Ke.text=Je:ke=!1}for(let Je=0;Je{Ae.update(()=>{je(xe(Ae,ge))})});const Te=Ae.getRootElement(),we=Ae._window==null?window.document:Ae._window.document,ke=N(Ae._window);if(Te===null||ke===null)return!1;const Be=we.createElement("span");Be.style.cssText="position: fixed; top: -1000px;",Be.append(we.createTextNode("#")),Te.append(Be);const Ie=new Range;return Ie.setStart(Be,0),Ie.setEnd(Be,1),ke.removeAllRanges(),ke.addRange(Ie),new Promise((je,Ke)=>{const Je=Ae.registerCommand(O.COPY_COMMAND,Xe=>(R.objectKlassEquals(Xe,ClipboardEvent)&&(Je(),pe!==null&&(window.clearTimeout(pe),pe=null),je(xe(Ae,Xe))),!0),O.COMMAND_PRIORITY_CRITICAL);pe=window.setTimeout(()=>{Je(),pe=null,je(!1)},oe),we.execCommand("copy"),Be.remove()})}function xe(Ae,ge){const Te=N(Ae._window);if(!Te)return!1;const we=Te.anchorNode,ke=Te.focusNode;if(we!==null&&ke!==null&&!O.isSelectionWithinEditor(Ae,we,ke))return!1;ge.preventDefault();const Be=ge.clipboardData,Ie=O.$getSelection();if(Be===null||Ie===null)return!1;const je=L(Ae),Ke=B(Ae);let Je="";return Ie!==null&&(Je=Ie.getTextContent()),je!==null&&Be.setData("text/html",je),Ke!==null&&Be.setData("application/x-lexical-editor",Ke),Be.setData("text/plain",Je),!0}return LexicalClipboard_dev.$generateJSONFromSelectedNodes=X,LexicalClipboard_dev.$generateNodesFromSerializedNodes=J,LexicalClipboard_dev.$getHtmlContent=L,LexicalClipboard_dev.$getLexicalContent=B,LexicalClipboard_dev.$insertDataTransferForPlainText=j,LexicalClipboard_dev.$insertDataTransferForRichText=F,LexicalClipboard_dev.$insertGeneratedNodes=V,LexicalClipboard_dev.copyToClipboard=me,LexicalClipboard_dev}var LexicalClipboard_1,hasRequiredLexicalClipboard;function requireLexicalClipboard(){if(hasRequiredLexicalClipboard)return LexicalClipboard_1;hasRequiredLexicalClipboard=1;var S={};return LexicalClipboard_1=S.NODE_ENV==="development"?requireLexicalClipboard_dev():requireLexicalClipboard_prod(),LexicalClipboard_1}var hasRequiredLexicalRichText_prod;function requireLexicalRichText_prod(){if(hasRequiredLexicalRichText_prod)return LexicalRichText_prod;hasRequiredLexicalRichText_prod=1;var S=requireLexicalClipboard(),C=requireLexicalSelection(),R=LexicalUtils_1,O=Lexical_1;function I(Ie,je){return typeof document.caretRangeFromPoint<"u"?(Ie=document.caretRangeFromPoint(Ie,je),Ie===null?null:{node:Ie.startContainer,offset:Ie.startOffset}):document.caretPositionFromPoint!=="undefined"?(Ie=document.caretPositionFromPoint(Ie,je),Ie===null?null:{node:Ie.offsetNode,offset:Ie.offset}):null}let N=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",L=N&&"documentMode"in document?document.documentMode:null,B=N&&"InputEvent"in window&&!L?"getTargetRanges"in new window.InputEvent("input"):!1,j=N&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),F=N&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,V=N&&/^(?=.*Chrome).*/i.test(navigator.userAgent),K=N&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!V,W=O.createCommand("DRAG_DROP_PASTE_FILE");class X extends O.ElementNode{static getType(){return"quote"}static clone(je){return new X(je.__key)}constructor(je){super(je)}createDOM(je){let Ke=document.createElement("blockquote");return R.addClassNamesToElement(Ke,je.theme.quote),Ke}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:xe,priority:0})}}exportDOM(je){if({element:je}=super.exportDOM(je),je&&R.isHTMLElement(je)){this.isEmpty()&&je.append(document.createElement("br"));var Ke=this.getFormatType();je.style.textAlign=Ke,(Ke=this.getDirection())&&(je.dir=Ke)}return{element:je}}static importJSON(je){let Ke=J();return Ke.setFormat(je.format),Ke.setIndent(je.indent),Ke.setDirection(je.direction),Ke}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(je,Ke){je=O.$createParagraphNode();let Je=this.getDirection();return je.setDirection(Je),this.insertAfter(je,Ke),je}collapseAtStart(){let je=O.$createParagraphNode();return this.getChildren().forEach(Ke=>je.append(Ke)),this.replace(je),!0}}function J(){return O.$applyNodeReplacement(new X)}class oe extends O.ElementNode{static getType(){return"heading"}static clone(je){return new oe(je.__tag,je.__key)}constructor(je,Ke){super(Ke),this.__tag=je}getTag(){return this.__tag}createDOM(je){let Ke=this.__tag,Je=document.createElement(Ke);return je=je.theme.heading,je!==void 0&&R.addClassNamesToElement(Je,je[Ke]),Je}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:me,priority:0}),h2:()=>({conversion:me,priority:0}),h3:()=>({conversion:me,priority:0}),h4:()=>({conversion:me,priority:0}),h5:()=>({conversion:me,priority:0}),h6:()=>({conversion:me,priority:0}),p:je=>(je=je.firstChild,je!==null&&pe(je)?{conversion:()=>({node:null}),priority:3}:null),span:je=>pe(je)?{conversion:()=>({node:Ae("h1")}),priority:3}:null}}exportDOM(je){if({element:je}=super.exportDOM(je),je&&R.isHTMLElement(je)){this.isEmpty()&&je.append(document.createElement("br"));var Ke=this.getFormatType();je.style.textAlign=Ke,(Ke=this.getDirection())&&(je.dir=Ke)}return{element:je}}static importJSON(je){let Ke=Ae(je.tag);return Ke.setFormat(je.format),Ke.setIndent(je.indent),Ke.setDirection(je.direction),Ke}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(je,Ke=!0){let Je=je?je.anchor.offset:0,Xe=Je!==this.getTextContentSize()&&je?Ae(this.getTag()):O.$createParagraphNode(),ot=this.getDirection();return Xe.setDirection(ot),this.insertAfter(Xe,Ke),Je===0&&!this.isEmpty()&&je&&(je=O.$createParagraphNode(),je.select(),this.replace(je,!0)),Xe}collapseAtStart(){let je=this.isEmpty()?O.$createParagraphNode():Ae(this.getTag());return this.getChildren().forEach(Ke=>je.append(Ke)),this.replace(je),!0}extractWithChild(){return!0}}function pe(Ie){return Ie.nodeName.toLowerCase()==="span"?Ie.style.fontSize==="26pt":!1}function me(Ie){let je=Ie.nodeName.toLowerCase(),Ke=null;return(je==="h1"||je==="h2"||je==="h3"||je==="h4"||je==="h5"||je==="h6")&&(Ke=Ae(je),Ie.style!==null&&Ke.setFormat(Ie.style.textAlign)),{node:Ke}}function xe(Ie){let je=J();return Ie.style!==null&&je.setFormat(Ie.style.textAlign),{node:je}}function Ae(Ie){return O.$applyNodeReplacement(new oe(Ie))}function ge(Ie,je){Ie.preventDefault(),je.update(()=>{let Ke=O.$getSelection(),Je=Ie instanceof InputEvent||Ie instanceof KeyboardEvent?null:Ie.clipboardData;Je!=null&&Ke!==null&&S.$insertDataTransferForRichText(Je,Ke,je)},{tag:"paste"})}async function Te(Ie,je){await S.copyToClipboard(je,R.objectKlassEquals(Ie,ClipboardEvent)?Ie:null),je.update(()=>{let Ke=O.$getSelection();O.$isRangeSelection(Ke)?Ke.removeText():O.$isNodeSelection(Ke)&&Ke.getNodes().forEach(Je=>Je.remove())})}function we(Ie){let je=null;if(Ie instanceof DragEvent?je=Ie.dataTransfer:Ie instanceof ClipboardEvent&&(je=Ie.clipboardData),je===null)return[!1,[],!1];var Ke=je.types;return Ie=Ke.includes("Files"),Ke=Ke.includes("text/html")||Ke.includes("text/plain"),[Ie,Array.from(je.files),Ke]}function ke(Ie){var je=O.$getSelection();if(!O.$isRangeSelection(je))return!1;let Ke=new Set;je=je.getNodes();for(let ot=0;ot{const je=O.$getSelection();return O.$isNodeSelection(je)?(je.clear(),!0):!1},0),Ie.registerCommand(O.DELETE_CHARACTER_COMMAND,je=>{const Ke=O.$getSelection();return O.$isRangeSelection(Ke)?(Ke.deleteCharacter(je),!0):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.DELETE_WORD_COMMAND,je=>{const Ke=O.$getSelection();return O.$isRangeSelection(Ke)?(Ke.deleteWord(je),!0):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.DELETE_LINE_COMMAND,je=>{const Ke=O.$getSelection();return O.$isRangeSelection(Ke)?(Ke.deleteLine(je),!0):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.CONTROLLED_TEXT_INSERTION_COMMAND,je=>{const Ke=O.$getSelection();if(typeof je=="string")Ke!==null&&Ke.insertText(je);else{if(Ke===null)return!1;const Je=je.dataTransfer;Je!=null?S.$insertDataTransferForRichText(Je,Ke,Ie):O.$isRangeSelection(Ke)&&(je=je.data)&&Ke.insertText(je)}return!0},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.REMOVE_TEXT_COMMAND,()=>{const je=O.$getSelection();return O.$isRangeSelection(je)?(je.removeText(),!0):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.FORMAT_TEXT_COMMAND,je=>{const Ke=O.$getSelection();return O.$isRangeSelection(Ke)?(Ke.formatText(je),!0):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.FORMAT_ELEMENT_COMMAND,je=>{var Ke=O.$getSelection();if(!O.$isRangeSelection(Ke)&&!O.$isNodeSelection(Ke))return!1;Ke=Ke.getNodes();for(const Je of Ke)Ke=R.$findMatchingParent(Je,Xe=>O.$isElementNode(Xe)&&!Xe.isInline()),Ke!==null&&Ke.setFormat(je);return!0},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.INSERT_LINE_BREAK_COMMAND,je=>{const Ke=O.$getSelection();return O.$isRangeSelection(Ke)?(Ke.insertLineBreak(je),!0):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.INSERT_PARAGRAPH_COMMAND,()=>{const je=O.$getSelection();return O.$isRangeSelection(je)?(je.insertParagraph(),!0):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.INSERT_TAB_COMMAND,()=>(O.$insertNodes([O.$createTabNode()]),!0),O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.INDENT_CONTENT_COMMAND,()=>ke(je=>{const Ke=je.getIndent();je.setIndent(Ke+1)}),O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.OUTDENT_CONTENT_COMMAND,()=>ke(je=>{const Ke=je.getIndent();0{var Ke=O.$getSelection();if(O.$isNodeSelection(Ke)&&!Be(je.target)){if(je=Ke.getNodes(),0{var Ke=O.$getSelection();if(O.$isNodeSelection(Ke)){if(je=Ke.getNodes(),0{const Ke=O.$getSelection();if(O.$isNodeSelection(Ke)){var Je=Ke.getNodes();if(0{const Ke=O.$getSelection();if(O.$isNodeSelection(Ke)&&!Be(je.target)){var Je=Ke.getNodes();if(0{if(Be(je.target))return!1;const Ke=O.$getSelection();if(!O.$isRangeSelection(Ke))return!1;je.preventDefault(),{anchor:je}=Ke;const Je=je.getNode();return Ke.isCollapsed()&&je.offset===0&&!O.$isRootNode(Je)&&0{if(Be(je.target))return!1;const Ke=O.$getSelection();return O.$isRangeSelection(Ke)?(je.preventDefault(),Ie.dispatchCommand(O.DELETE_CHARACTER_COMMAND,!1)):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.KEY_ENTER_COMMAND,je=>{const Ke=O.$getSelection();if(!O.$isRangeSelection(Ke))return!1;if(je!==null){if((F||j||K)&&B)return!1;if(je.preventDefault(),je.shiftKey)return Ie.dispatchCommand(O.INSERT_LINE_BREAK_COMMAND,!1)}return Ie.dispatchCommand(O.INSERT_PARAGRAPH_COMMAND,void 0)},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.KEY_ESCAPE_COMMAND,()=>{const je=O.$getSelection();return O.$isRangeSelection(je)?(Ie.blur(),!0):!1},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.DROP_COMMAND,je=>{const[,Ke]=we(je);if(0{[je]=we(je);const Ke=O.$getSelection();return!(je&&!O.$isRangeSelection(Ke))},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.DRAGOVER_COMMAND,je=>{var[Ke]=we(je);const Je=O.$getSelection();return Ke&&!O.$isRangeSelection(Je)?!1:(Ke=I(je.clientX,je.clientY),Ke!==null&&(Ke=O.$getNearestNodeFromDOMNode(Ke.node),O.$isDecoratorNode(Ke)&&je.preventDefault()),!0)},O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.SELECT_ALL_COMMAND,()=>(O.$selectAll(),!0),O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.COPY_COMMAND,je=>(S.copyToClipboard(Ie,R.objectKlassEquals(je,ClipboardEvent)?je:null),!0),O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.CUT_COMMAND,je=>(Te(je,Ie),!0),O.COMMAND_PRIORITY_EDITOR),Ie.registerCommand(O.PASTE_COMMAND,je=>{const[,Ke,Je]=we(je);return 0({conversion:Ae,priority:0})}}exportDOM(ot){const{element:tt}=super.exportDOM(ot);if(tt&&R.isHTMLElement(tt)){this.isEmpty()&&tt.append(document.createElement("br"));const Ue=this.getFormatType();tt.style.textAlign=Ue;const et=this.getDirection();et&&(tt.dir=et)}return{element:tt}}static importJSON(ot){const tt=J();return tt.setFormat(ot.format),tt.setIndent(ot.indent),tt.setDirection(ot.direction),tt}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(ot,tt){const Ue=O.$createParagraphNode(),et=this.getDirection();return Ue.setDirection(et),this.insertAfter(Ue,tt),Ue}collapseAtStart(){const ot=O.$createParagraphNode();return this.getChildren().forEach(Ue=>ot.append(Ue)),this.replace(ot),!0}}function J(){return O.$applyNodeReplacement(new X)}function oe(Xe){return Xe instanceof X}class pe extends O.ElementNode{static getType(){return"heading"}static clone(ot){return new pe(ot.__tag,ot.__key)}constructor(ot,tt){super(tt),this.__tag=ot}getTag(){return this.__tag}createDOM(ot){const tt=this.__tag,Ue=document.createElement(tt),dt=ot.theme.heading;if(dt!==void 0){const gt=dt[tt];R.addClassNamesToElement(Ue,gt)}return Ue}updateDOM(ot,tt){return!1}static importDOM(){return{h1:ot=>({conversion:xe,priority:0}),h2:ot=>({conversion:xe,priority:0}),h3:ot=>({conversion:xe,priority:0}),h4:ot=>({conversion:xe,priority:0}),h5:ot=>({conversion:xe,priority:0}),h6:ot=>({conversion:xe,priority:0}),p:ot=>{const Ue=ot.firstChild;return Ue!==null&&me(Ue)?{conversion:()=>({node:null}),priority:3}:null},span:ot=>me(ot)?{conversion:tt=>({node:ge("h1")}),priority:3}:null}}exportDOM(ot){const{element:tt}=super.exportDOM(ot);if(tt&&R.isHTMLElement(tt)){this.isEmpty()&&tt.append(document.createElement("br"));const Ue=this.getFormatType();tt.style.textAlign=Ue;const et=this.getDirection();et&&(tt.dir=et)}return{element:tt}}static importJSON(ot){const tt=ge(ot.tag);return tt.setFormat(ot.format),tt.setIndent(ot.indent),tt.setDirection(ot.direction),tt}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(ot,tt=!0){const Ue=ot?ot.anchor.offset:0,et=Ue===this.getTextContentSize()||!ot?O.$createParagraphNode():ge(this.getTag()),dt=this.getDirection();if(et.setDirection(dt),this.insertAfter(et,tt),Ue===0&&!this.isEmpty()&&ot){const gt=O.$createParagraphNode();gt.select(),this.replace(gt,!0)}return et}collapseAtStart(){const ot=this.isEmpty()?O.$createParagraphNode():ge(this.getTag());return this.getChildren().forEach(Ue=>ot.append(Ue)),this.replace(ot),!0}extractWithChild(){return!0}}function me(Xe){return Xe.nodeName.toLowerCase()==="span"?Xe.style.fontSize==="26pt":!1}function xe(Xe){const ot=Xe.nodeName.toLowerCase();let tt=null;return(ot==="h1"||ot==="h2"||ot==="h3"||ot==="h4"||ot==="h5"||ot==="h6")&&(tt=ge(ot),Xe.style!==null&&tt.setFormat(Xe.style.textAlign)),{node:tt}}function Ae(Xe){const ot=J();return Xe.style!==null&&ot.setFormat(Xe.style.textAlign),{node:ot}}function ge(Xe){return O.$applyNodeReplacement(new pe(Xe))}function Te(Xe){return Xe instanceof pe}function we(Xe,ot){Xe.preventDefault(),ot.update(()=>{const tt=O.$getSelection(),Ue=Xe instanceof InputEvent||Xe instanceof KeyboardEvent?null:Xe.clipboardData;Ue!=null&&tt!==null&&S.$insertDataTransferForRichText(Ue,tt,ot)},{tag:"paste"})}async function ke(Xe,ot){await S.copyToClipboard(ot,R.objectKlassEquals(Xe,ClipboardEvent)?Xe:null),ot.update(()=>{const tt=O.$getSelection();O.$isRangeSelection(tt)?tt.removeText():O.$isNodeSelection(tt)&&tt.getNodes().forEach(Ue=>Ue.remove())})}function Be(Xe){let ot=null;if(Xe instanceof DragEvent?ot=Xe.dataTransfer:Xe instanceof ClipboardEvent&&(ot=Xe.clipboardData),ot===null)return[!1,[],!1];const tt=ot.types,Ue=tt.includes("Files"),et=tt.includes("text/html")||tt.includes("text/plain");return[Ue,Array.from(ot.files),et]}function Ie(Xe){const ot=O.$getSelection();if(!O.$isRangeSelection(ot))return!1;const tt=new Set,Ue=ot.getNodes();for(let et=0;et0}function je(Xe){const ot=O.$getNearestNodeFromDOMNode(Xe);return O.$isDecoratorNode(ot)}function Ke(Xe){const ot=Xe.focus;return ot.key==="root"&&ot.offset===O.$getRoot().getChildrenSize()}function Je(Xe){return R.mergeRegister(Xe.registerCommand(O.CLICK_COMMAND,tt=>{const Ue=O.$getSelection();return O.$isNodeSelection(Ue)?(Ue.clear(),!0):!1},0),Xe.registerCommand(O.DELETE_CHARACTER_COMMAND,tt=>{const Ue=O.$getSelection();return O.$isRangeSelection(Ue)?(Ue.deleteCharacter(tt),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.DELETE_WORD_COMMAND,tt=>{const Ue=O.$getSelection();return O.$isRangeSelection(Ue)?(Ue.deleteWord(tt),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.DELETE_LINE_COMMAND,tt=>{const Ue=O.$getSelection();return O.$isRangeSelection(Ue)?(Ue.deleteLine(tt),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.CONTROLLED_TEXT_INSERTION_COMMAND,tt=>{const Ue=O.$getSelection();if(typeof tt=="string")Ue!==null&&Ue.insertText(tt);else{if(Ue===null)return!1;const et=tt.dataTransfer;if(et!=null)S.$insertDataTransferForRichText(et,Ue,Xe);else if(O.$isRangeSelection(Ue)){const dt=tt.data;return dt&&Ue.insertText(dt),!0}}return!0},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.REMOVE_TEXT_COMMAND,()=>{const tt=O.$getSelection();return O.$isRangeSelection(tt)?(tt.removeText(),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.FORMAT_TEXT_COMMAND,tt=>{const Ue=O.$getSelection();return O.$isRangeSelection(Ue)?(Ue.formatText(tt),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.FORMAT_ELEMENT_COMMAND,tt=>{const Ue=O.$getSelection();if(!O.$isRangeSelection(Ue)&&!O.$isNodeSelection(Ue))return!1;const et=Ue.getNodes();for(const dt of et){const gt=R.$findMatchingParent(dt,Qe=>O.$isElementNode(Qe)&&!Qe.isInline());gt!==null&>.setFormat(tt)}return!0},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.INSERT_LINE_BREAK_COMMAND,tt=>{const Ue=O.$getSelection();return O.$isRangeSelection(Ue)?(Ue.insertLineBreak(tt),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.INSERT_PARAGRAPH_COMMAND,()=>{const tt=O.$getSelection();return O.$isRangeSelection(tt)?(tt.insertParagraph(),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.INSERT_TAB_COMMAND,()=>(O.$insertNodes([O.$createTabNode()]),!0),O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.INDENT_CONTENT_COMMAND,()=>Ie(tt=>{const Ue=tt.getIndent();tt.setIndent(Ue+1)}),O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.OUTDENT_CONTENT_COMMAND,()=>Ie(tt=>{const Ue=tt.getIndent();Ue>0&&tt.setIndent(Ue-1)}),O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.KEY_ARROW_UP_COMMAND,tt=>{const Ue=O.$getSelection();if(O.$isNodeSelection(Ue)&&!je(tt.target)){const et=Ue.getNodes();if(et.length>0)return et[0].selectPrevious(),!0}else if(O.$isRangeSelection(Ue)){const et=O.$getAdjacentNode(Ue.focus,!0);if(!tt.shiftKey&&O.$isDecoratorNode(et)&&!et.isIsolated()&&!et.isInline())return et.selectPrevious(),tt.preventDefault(),!0}return!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.KEY_ARROW_DOWN_COMMAND,tt=>{const Ue=O.$getSelection();if(O.$isNodeSelection(Ue)){const et=Ue.getNodes();if(et.length>0)return et[0].selectNext(0,0),!0}else if(O.$isRangeSelection(Ue)){if(Ke(Ue))return tt.preventDefault(),!0;const et=O.$getAdjacentNode(Ue.focus,!1);if(!tt.shiftKey&&O.$isDecoratorNode(et)&&!et.isIsolated()&&!et.isInline())return et.selectNext(),tt.preventDefault(),!0}return!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.KEY_ARROW_LEFT_COMMAND,tt=>{const Ue=O.$getSelection();if(O.$isNodeSelection(Ue)){const et=Ue.getNodes();if(et.length>0)return tt.preventDefault(),et[0].selectPrevious(),!0}if(!O.$isRangeSelection(Ue))return!1;if(C.$shouldOverrideDefaultCharacterSelection(Ue,!0)){const et=tt.shiftKey;return tt.preventDefault(),C.$moveCharacter(Ue,et,!0),!0}return!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.KEY_ARROW_RIGHT_COMMAND,tt=>{const Ue=O.$getSelection();if(O.$isNodeSelection(Ue)&&!je(tt.target)){const dt=Ue.getNodes();if(dt.length>0)return tt.preventDefault(),dt[0].selectNext(0,0),!0}if(!O.$isRangeSelection(Ue))return!1;const et=tt.shiftKey;return C.$shouldOverrideDefaultCharacterSelection(Ue,!1)?(tt.preventDefault(),C.$moveCharacter(Ue,et,!1),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.KEY_BACKSPACE_COMMAND,tt=>{if(je(tt.target))return!1;const Ue=O.$getSelection();if(!O.$isRangeSelection(Ue))return!1;tt.preventDefault();const{anchor:et}=Ue,dt=et.getNode();return Ue.isCollapsed()&&et.offset===0&&!O.$isRootNode(dt)&&R.$getNearestBlockElementAncestorOrThrow(dt).getIndent()>0?Xe.dispatchCommand(O.OUTDENT_CONTENT_COMMAND,void 0):Xe.dispatchCommand(O.DELETE_CHARACTER_COMMAND,!0)},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.KEY_DELETE_COMMAND,tt=>{if(je(tt.target))return!1;const Ue=O.$getSelection();return O.$isRangeSelection(Ue)?(tt.preventDefault(),Xe.dispatchCommand(O.DELETE_CHARACTER_COMMAND,!1)):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.KEY_ENTER_COMMAND,tt=>{const Ue=O.$getSelection();if(!O.$isRangeSelection(Ue))return!1;if(tt!==null){if((F||j||K)&&B)return!1;if(tt.preventDefault(),tt.shiftKey)return Xe.dispatchCommand(O.INSERT_LINE_BREAK_COMMAND,!1)}return Xe.dispatchCommand(O.INSERT_PARAGRAPH_COMMAND,void 0)},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.KEY_ESCAPE_COMMAND,()=>{const tt=O.$getSelection();return O.$isRangeSelection(tt)?(Xe.blur(),!0):!1},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.DROP_COMMAND,tt=>{const[,Ue]=Be(tt);if(Ue.length>0){const dt=tt.clientX,gt=tt.clientY,Qe=I(dt,gt);if(Qe!==null){const{offset:lt,node:ht}=Qe,Ct=O.$getNearestNodeFromDOMNode(ht);if(Ct!==null){const $t=O.$createRangeSelection();if(O.$isTextNode(Ct))$t.anchor.set(Ct.getKey(),lt,"text"),$t.focus.set(Ct.getKey(),lt,"text");else{const Gt=Ct.getParentOrThrow().getKey(),Pt=Ct.getIndexWithinParent()+1;$t.anchor.set(Gt,Pt,"element"),$t.focus.set(Gt,Pt,"element")}const Lt=O.$normalizeSelection__EXPERIMENTAL($t);O.$setSelection(Lt)}Xe.dispatchCommand(W,Ue)}return tt.preventDefault(),!0}const et=O.$getSelection();return!!O.$isRangeSelection(et)},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.DRAGSTART_COMMAND,tt=>{const[Ue]=Be(tt),et=O.$getSelection();return!(Ue&&!O.$isRangeSelection(et))},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.DRAGOVER_COMMAND,tt=>{const[Ue]=Be(tt),et=O.$getSelection();if(Ue&&!O.$isRangeSelection(et))return!1;const dt=tt.clientX,gt=tt.clientY,Qe=I(dt,gt);if(Qe!==null){const lt=O.$getNearestNodeFromDOMNode(Qe.node);O.$isDecoratorNode(lt)&&tt.preventDefault()}return!0},O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.SELECT_ALL_COMMAND,()=>(O.$selectAll(),!0),O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.COPY_COMMAND,tt=>(S.copyToClipboard(Xe,R.objectKlassEquals(tt,ClipboardEvent)?tt:null),!0),O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.CUT_COMMAND,tt=>(ke(tt,Xe),!0),O.COMMAND_PRIORITY_EDITOR),Xe.registerCommand(O.PASTE_COMMAND,tt=>{const[,Ue,et]=Be(tt);return Ue.length>0&&!et?(Xe.dispatchCommand(W,Ue),!0):O.isSelectionCapturedInDecoratorInput(tt.target)?!1:O.$getSelection()!==null?(we(tt,Xe),!0):!1},O.COMMAND_PRIORITY_EDITOR))}return LexicalRichText_dev.$createHeadingNode=ge,LexicalRichText_dev.$createQuoteNode=J,LexicalRichText_dev.$isHeadingNode=Te,LexicalRichText_dev.$isQuoteNode=oe,LexicalRichText_dev.DRAG_DROP_PASTE=W,LexicalRichText_dev.HeadingNode=pe,LexicalRichText_dev.QuoteNode=X,LexicalRichText_dev.eventFiles=Be,LexicalRichText_dev.registerRichText=Je,LexicalRichText_dev}var define_process_env_default$2={};const LexicalRichText=define_process_env_default$2.NODE_ENV==="development"?requireLexicalRichText_dev():requireLexicalRichText_prod();var LexicalRichText_1=LexicalRichText,hasRequiredLexicalRichTextPlugin_prod;function requireLexicalRichTextPlugin_prod(){if(hasRequiredLexicalRichTextPlugin_prod)return LexicalRichTextPlugin_prod;hasRequiredLexicalRichTextPlugin_prod=1;var S=LexicalComposerContext_1,C=requireUseLexicalEditable(),R=requireReact(),O=requireLexicalText(),I=LexicalUtils_1,N=reactDomExports,L=requireLexicalDragon(),B=LexicalRichText_1,j=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?R.useLayoutEffect:R.useEffect;function F(J){return J.getEditorState().read(O.$canShowPlaceholderCurry(J.isComposing()))}function V(J){let[oe,pe]=R.useState(()=>F(J));return j(()=>{function me(){let xe=F(J);pe(xe)}return me(),I.mergeRegister(J.registerUpdateListener(()=>{me()}),J.registerEditableListener(()=>{me()}))},[J]),oe}function K(J,oe){let[pe,me]=R.useState(()=>J.getDecorators());return j(()=>J.registerDecoratorListener(xe=>{N.flushSync(()=>{me(xe)})}),[J]),R.useEffect(()=>{me(J.getDecorators())},[J]),R.useMemo(()=>{let xe=[],Ae=Object.keys(pe);for(let ge=0;geJ._onError(Be)},R.createElement(R.Suspense,{fallback:null},pe[Te])),ke=J.getElementByKey(Te);ke!==null&&xe.push(N.createPortal(we,ke,Te))}return xe},[oe,pe,J])}function W(J){j(()=>I.mergeRegister(B.registerRichText(J),L.registerDragonSupport(J)),[J])}function X({content:J}){var[oe]=S.useLexicalComposerContext();oe=V(oe);let pe=C();return oe?typeof J=="function"?J(pe):J:null}return LexicalRichTextPlugin_prod.RichTextPlugin=function({contentEditable:J,placeholder:oe,ErrorBoundary:pe}){let[me]=S.useLexicalComposerContext();return pe=K(me,pe),W(me),R.createElement(R.Fragment,null,J,R.createElement(X,{content:oe}),pe)},LexicalRichTextPlugin_prod}var LexicalRichTextPlugin_dev={},hasRequiredLexicalRichTextPlugin_dev;function requireLexicalRichTextPlugin_dev(){if(hasRequiredLexicalRichTextPlugin_dev)return LexicalRichTextPlugin_dev;hasRequiredLexicalRichTextPlugin_dev=1;var S=LexicalComposerContext_1,C=requireUseLexicalEditable(),R=requireReact(),O=requireLexicalText(),I=LexicalUtils_1,N=reactDomExports,L=requireLexicalDragon(),B=LexicalRichText_1,V=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?R.useLayoutEffect:R.useEffect;function K(me){return me.getEditorState().read(O.$canShowPlaceholderCurry(me.isComposing()))}function W(me){const[xe,Ae]=R.useState(()=>K(me));return V(()=>{function ge(){const Te=K(me);Ae(Te)}return ge(),I.mergeRegister(me.registerUpdateListener(()=>{ge()}),me.registerEditableListener(()=>{ge()}))},[me]),xe}function X(me,xe){const[Ae,ge]=R.useState(()=>me.getDecorators());return V(()=>me.registerDecoratorListener(Te=>{N.flushSync(()=>{ge(Te)})}),[me]),R.useEffect(()=>{ge(me.getDecorators())},[me]),R.useMemo(()=>{const Te=[],we=Object.keys(Ae);for(let ke=0;keme._onError(Ke)},R.createElement(R.Suspense,{fallback:null},Ae[Be])),je=me.getElementByKey(Be);je!==null&&Te.push(N.createPortal(Ie,je,Be))}return Te},[xe,Ae,me])}function J(me){V(()=>I.mergeRegister(B.registerRichText(me),L.registerDragonSupport(me)),[me])}function oe({contentEditable:me,placeholder:xe,ErrorBoundary:Ae}){const[ge]=S.useLexicalComposerContext(),Te=X(ge,Ae);return J(ge),R.createElement(R.Fragment,null,me,R.createElement(pe,{content:xe}),Te)}function pe({content:me}){const[xe]=S.useLexicalComposerContext(),Ae=W(xe),ge=C();return Ae?typeof me=="function"?me(ge):me:null}return LexicalRichTextPlugin_dev.RichTextPlugin=oe,LexicalRichTextPlugin_dev}var define_process_env_default$1={};const LexicalRichTextPlugin=define_process_env_default$1.NODE_ENV==="development"?requireLexicalRichTextPlugin_dev():requireLexicalRichTextPlugin_prod();var LexicalRichTextPlugin_1=LexicalRichTextPlugin,RichEditorContentType=(S=>(S.IMAGE="image",S.TEXT="text",S))(RichEditorContentType||{});const FAKE_PROTOCOL="fake:",CAN_USE_DOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var useLexicalNodeSelection_prod={},hasRequiredUseLexicalNodeSelection_prod;function requireUseLexicalNodeSelection_prod(){if(hasRequiredUseLexicalNodeSelection_prod)return useLexicalNodeSelection_prod;hasRequiredUseLexicalNodeSelection_prod=1;var S=LexicalComposerContext_1,C=Lexical_1,R=requireReact();function O(I,N){return I.getEditorState().read(()=>{let L=C.$getNodeByKey(N);return L===null?!1:L.isSelected()})}return useLexicalNodeSelection_prod.useLexicalNodeSelection=function(I){let[N]=S.useLexicalComposerContext(),[L,B]=R.useState(()=>O(N,I));R.useEffect(()=>{let V=!0,K=N.registerUpdateListener(()=>{V&&B(O(N,I))});return()=>{V=!1,K()}},[N,I]);let j=R.useCallback(V=>{N.update(()=>{let K=C.$getSelection();C.$isNodeSelection(K)||(K=C.$createNodeSelection(),C.$setSelection(K)),C.$isNodeSelection(K)&&(V?K.add(I):K.delete(I))})},[N,I]),F=R.useCallback(()=>{N.update(()=>{const V=C.$getSelection();C.$isNodeSelection(V)&&V.clear()})},[N]);return[L,j,F]},useLexicalNodeSelection_prod}var useLexicalNodeSelection_dev={},hasRequiredUseLexicalNodeSelection_dev;function requireUseLexicalNodeSelection_dev(){if(hasRequiredUseLexicalNodeSelection_dev)return useLexicalNodeSelection_dev;hasRequiredUseLexicalNodeSelection_dev=1;var S=LexicalComposerContext_1,C=Lexical_1,R=requireReact();function O(N,L){return N.getEditorState().read(()=>{const B=C.$getNodeByKey(L);return B===null?!1:B.isSelected()})}function I(N){const[L]=S.useLexicalComposerContext(),[B,j]=R.useState(()=>O(L,N));R.useEffect(()=>{let K=!0;const W=L.registerUpdateListener(()=>{K&&j(O(L,N))});return()=>{K=!1,W()}},[L,N]);const F=R.useCallback(K=>{L.update(()=>{let W=C.$getSelection();C.$isNodeSelection(W)||(W=C.$createNodeSelection(),C.$setSelection(W)),C.$isNodeSelection(W)&&(K?W.add(N):W.delete(N))})},[L,N]),V=R.useCallback(()=>{L.update(()=>{const K=C.$getSelection();C.$isNodeSelection(K)&&K.clear()})},[L]);return[B,F,V]}return useLexicalNodeSelection_dev.useLexicalNodeSelection=I,useLexicalNodeSelection_dev}var define_process_env_default={};const useLexicalNodeSelection=define_process_env_default.NODE_ENV==="development"?requireUseLexicalNodeSelection_dev():requireUseLexicalNodeSelection_prod();var useLexicalNodeSelection_1=useLexicalNodeSelection;function useEventCallback(S){const C=reactExports.useRef(S);return reactExports.useLayoutEffect(()=>{C.current=S}),reactExports.useCallback((...R)=>{const O=C.current;return O(...R)},[])}const INSERT_IMAGE_COMMAND=Lexical_1.createCommand("INSERT_IMAGE_COMMAND"),INSERT_MULTIPLE_NODES_COMMAND=Lexical_1.createCommand("INSERT_MULTIPLE_NODES_COMMAND"),RIGHT_CLICK_IMAGE_COMMAND=Lexical_1.createCommand("RIGHT_CLICK_IMAGE_COMMAND");class RichEditorViewModel extends ViewModel{constructor(C){super(),this.editor$=new State(void 0),this.maxHeight$=new State(void 0),this.resolveUrlByPath$=new State(void 0),this.resolveUrlByFile$=new State(void 0),this._resetEditorState=C.resetEditorState,this._replaceImageSrc=C.replaceImageSrc,this._extractEditorData=C.extractEditorData}get requiredEditor(){const C=this.editor$.getSnapshot();if(!C)throw new Error("[RichEditor] editor is not prepared.");return C}focus(){this.requiredEditor.focus()}getContent(){const R=this.requiredEditor.getEditorState();return this._extractEditorData(R)}insert(C){this.requiredEditor.dispatchCommand(INSERT_MULTIPLE_NODES_COMMAND,{nodes:C})}isEmpty(){return this.requiredEditor.getEditorState().read(()=>{const I=Lexical_1.$getRoot(),N=I.getFirstChild();return N?I.getChildrenSize()===1&&N instanceof Lexical_1.ElementNode?N.isEmpty():!1:!0})}replaceImageSrc(C,R){const O=this.editor$.getSnapshot();if(!O)throw new Error("[RichEditor] editor is not prepared.");this._replaceImageSrc(O,C,R)}reset(C){const R=this.requiredEditor;this._resetEditorState(C)(R)}async resolveUrlByFile(C){const R=this.resolveUrlByFile$.getSnapshot();return R?R(C):""}async resolveUrlByPath(C){if(C.startsWith(FAKE_PROTOCOL))return C;const R=this.resolveUrlByPath$.getSnapshot();return(R==null?void 0:R(C))??C}}const RichEditorContextType=reactExports.createContext({viewmodel:new RichEditorViewModel({extractEditorData:()=>[],resetEditorState:()=>()=>{},replaceImageSrc:()=>{}})}),useRichEditorContext=()=>{const S=reactExports.useContext(RichEditorContextType),C=reactExports.useContext(LexicalComposerContext_1.LexicalComposerContext),R=(C==null?void 0:C[0])??void 0;return R&&S.viewmodel.editor$.setState(R),S},useAutoResize=()=>{const[S]=LexicalComposerContext_1.useLexicalComposerContext(),{viewmodel:C}=useRichEditorContext(),R=useStateValue(C.maxHeight$);return useEventCallback(()=>{if(R===void 0)return;const I=S==null?void 0:S.getRootElement();if(I){I.style.height="24px";const N=Math.min(R,I.scrollHeight);I.style.height=`${N}px`}})},imageCache=new Set;function useSuspenseImage(S){imageCache.has(S)||new Promise(C=>{const R=new Image;R.src=S,R.onload=()=>{imageCache.add(S),C(null)}})}function LazyImage({alt:S,className:C,imageRef:R,src:O,width:I,height:N,maxWidth:L,onLoad:B}){return useSuspenseImage(O),jsxRuntimeExports.jsx("img",{className:C||void 0,src:O,alt:S,ref:R,style:{height:N,maxWidth:L,width:I,border:"1px solid #E5E5E5"},draggable:!1,onLoad:B})}const ImageComponent=S=>{const{viewmodel:C}=useRichEditorContext(),R=useAutoResize(),{src:O,alt:I,nodeKey:N,width:L,height:B,maxWidth:j,isImageNode:F}=S,[V,K]=reactExports.useState(O),W=reactExports.useRef(null),X=reactExports.useRef(null),[J,oe,pe]=useLexicalNodeSelection_1.useLexicalNodeSelection(N),[me]=LexicalComposerContext_1.useLexicalComposerContext(),[xe,Ae]=reactExports.useState(null),ge=reactExports.useRef(null),Te=reactExports.useCallback(tt=>{if(J&&Lexical_1.$isNodeSelection(Lexical_1.$getSelection())){tt.preventDefault();const et=Lexical_1.$getNodeByKey(N);F(et)&&et.remove()}return!1},[J,N,F]),we=reactExports.useCallback(tt=>{const Ue=Lexical_1.$getSelection(),et=X.current;return J&&Lexical_1.$isNodeSelection(Ue)&&Ue.getNodes().length===1&&et!==null&&et!==document.activeElement?(tt.preventDefault(),et.focus(),!0):!1},[J]),ke=reactExports.useCallback(tt=>tt.target===W.current?(tt.preventDefault(),!0):!1,[]),Be=reactExports.useCallback(tt=>X.current===tt.target?(Lexical_1.$setSelection(null),me.update(()=>{oe(!0);const Ue=me.getRootElement();Ue!==null&&Ue.focus()}),!0):!1,[me,oe]),Ie=reactExports.useCallback(tt=>{const Ue=tt;return Ue.target===W.current?(Ue.shiftKey?oe(!J):(pe(),oe(!0)),!0):!1},[J,oe,pe]),je=reactExports.useCallback(tt=>{me.getEditorState().read(()=>{const Ue=Lexical_1.$getSelection();tt.target.tagName==="IMG"&&Lexical_1.$isRangeSelection(Ue)&&Ue.getNodes().length===1&&me.dispatchCommand(RIGHT_CLICK_IMAGE_COMMAND,tt)})},[me]);reactExports.useEffect(()=>{let tt=!1;return C.resolveUrlByPath(O).then(Ue=>{tt||K(Ue)}),()=>{tt=!0}},[C,O]),reactExports.useEffect(()=>{let tt=!0;const Ue=me.getRootElement(),et=LexicalUtils_1.mergeRegister(me.registerUpdateListener(({editorState:dt})=>{tt&&Ae(dt.read(Lexical_1.$getSelection))}),me.registerCommand(Lexical_1.SELECTION_CHANGE_COMMAND,(dt,gt)=>(ge.current=gt,!1),Lexical_1.COMMAND_PRIORITY_LOW),me.registerCommand(Lexical_1.CLICK_COMMAND,Ie,Lexical_1.COMMAND_PRIORITY_LOW),me.registerCommand(RIGHT_CLICK_IMAGE_COMMAND,Ie,Lexical_1.COMMAND_PRIORITY_LOW),me.registerCommand(Lexical_1.DRAGSTART_COMMAND,ke,Lexical_1.COMMAND_PRIORITY_LOW),me.registerCommand(Lexical_1.KEY_DELETE_COMMAND,Te,Lexical_1.COMMAND_PRIORITY_LOW),me.registerCommand(Lexical_1.KEY_BACKSPACE_COMMAND,Te,Lexical_1.COMMAND_PRIORITY_LOW),me.registerCommand(Lexical_1.KEY_ENTER_COMMAND,we,Lexical_1.COMMAND_PRIORITY_LOW),me.registerCommand(Lexical_1.KEY_ESCAPE_COMMAND,Be,Lexical_1.COMMAND_PRIORITY_LOW));return Ue==null||Ue.addEventListener("contextmenu",je),()=>{tt=!1,et(),Ue==null||Ue.removeEventListener("contextmenu",je)}},[me,J,N,pe,Te,ke,we,Be,Ie,je,oe]);const Ke=J&&Lexical_1.$isNodeSelection(xe),Xe=J?`focused ${Lexical_1.$isNodeSelection(xe)?"draggable":""}`:void 0,ot=(V.startsWith(FAKE_PROTOCOL)?V.slice(FAKE_PROTOCOL.length):V).replace(/#[\s\S]*$/,"");return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsx("div",{draggable:Ke,children:jsxRuntimeExports.jsx(LazyImage,{className:Xe,src:ot,alt:I,imageRef:W,width:L,height:B,maxWidth:j,onLoad:R})})})};class ImageNode extends Lexical_1.DecoratorNode{constructor(C,R,O,I,N,L){super(L),this.src=C,this.alt=R,this.maxWidth=O,this.width=I||"inherit",this.height=N||"inherit"}static getType(){return RichEditorContentType.IMAGE}static clone(C){return new ImageNode(C.src,C.alt,C.maxWidth,C.width,C.height,C.__key)}static importDOM(){return{img:C=>({conversion:convertImageElement,priority:0})}}static importJSON(C){const{alt:R,height:O,width:I,maxWidth:N,src:L}=C;return $createImageNode({alt:R,height:O,maxWidth:N,src:L,width:I})}exportDOM(){const C=document.createElement("img");return C.setAttribute("src",this.src),C.setAttribute("alt",this.alt),C.setAttribute("width",this.width.toString()),C.setAttribute("height",this.height.toString()),{element:C}}exportJSON(){return{alt:this.getAltText(),height:this.height==="inherit"?0:this.height,maxWidth:this.maxWidth,src:this.getSrc(),type:RichEditorContentType.IMAGE,version:1,width:this.width==="inherit"?0:this.width}}setWidthAndHeight(C,R){const O=this.getWritable();O.width=C,O.height=R}createDOM(C){const R=document.createElement("span"),I=C.theme.image;return I!==void 0&&(R.className=I),R}updateDOM(){return!1}getSrc(){return this.src}getAltText(){return this.alt}decorate(){return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsx(ImageComponent,{src:this.src,alt:this.alt,width:this.width,height:this.height,maxWidth:this.maxWidth,nodeKey:this.getKey(),isImageNode:$isImageNode})})}}function $createImageNode({alt:S,height:C,maxWidth:R=240,src:O,width:I,key:N}){return Lexical_1.$applyNodeReplacement(new ImageNode(O,S,R,I,C,N))}function $isImageNode(S){return S instanceof ImageNode}function convertImageElement(S){if(S instanceof HTMLImageElement){const{alt:C,src:R,width:O,height:I}=S;return R.startsWith("blob:")?null:{node:$createImageNode({alt:C,height:I,src:R,width:O})}}return null}const CommandPlugin=()=>{const[S]=LexicalComposerContext_1.useLexicalComposerContext();return React.useLayoutEffect(()=>LexicalUtils_1.mergeRegister(S.registerCommand(INSERT_MULTIPLE_NODES_COMMAND,C=>{const{nodes:R}=C;if(R.length===1&&R[0].type===RichEditorContentType.TEXT){const N=R[0];return S.update(()=>{const L=Lexical_1.$getSelection();L&&L.insertRawText(N.value)}),!0}let O;const I=[];for(const N of R)switch(N.type){case RichEditorContentType.TEXT:{const L=Lexical_1.$createTextNode(N.value),B=Lexical_1.$createParagraphNode();O=L,B.append(L),I.push(B);break}case RichEditorContentType.IMAGE:{const L=$createImageNode(N),B=Lexical_1.$createParagraphNode();O=L,B.append(L),I.push(B);break}}return I.length<=0||(Lexical_1.$insertNodes(I),O&&Lexical_1.$isRootOrShadowRoot(O.getParentOrThrow())&&O.selectEnd()),!0},Lexical_1.COMMAND_PRIORITY_EDITOR)),[S]),jsxRuntimeExports.jsx(React.Fragment,{})},ACCEPTABLE_IMAGE_TYPES=["image/","image/heic","image/heif","image/gif","image/webp"],DragDropPastePlugin=()=>{const[S]=LexicalComposerContext_1.useLexicalComposerContext(),{viewmodel:C}=useRichEditorContext();return reactExports.useLayoutEffect(()=>S.registerCommand(LexicalRichText_1.DRAG_DROP_PASTE,R=>{return O(),!0;async function O(){for(const I of R)if(LexicalUtils_1.isMimeType(I,ACCEPTABLE_IMAGE_TYPES)){const N=I.name,L=await C.resolveUrlByFile(I);S.dispatchCommand(INSERT_IMAGE_COMMAND,{alt:N,src:L})}}},Lexical_1.COMMAND_PRIORITY_LOW),[S,C]),jsxRuntimeExports.jsx(reactExports.Fragment,{})};class Point{constructor(C,R){this._x=C,this._y=R}get x(){return this._x}get y(){return this._y}equals(C){return this.x===C.x&&this.y===C.y}calcDeltaXTo(C){return this.x-C.x}calcDeltaYTo(C){return this.y-C.y}calcHorizontalDistanceTo(C){return Math.abs(this.calcDeltaXTo(C))}calcVerticalDistance(C){return Math.abs(this.calcDeltaYTo(C))}calcDistanceTo(C){const R=this.calcDeltaXTo(C)**2,O=this.calcDeltaYTo(C)**2;return Math.sqrt(R+O)}}function isPoint(S){return S instanceof Point}class Rect{constructor(C,R,O,I){const[N,L]=R<=I?[R,I]:[I,R],[B,j]=C<=O?[C,O]:[O,C];this._top=N,this._right=j,this._left=B,this._bottom=L}get top(){return this._top}get right(){return this._right}get bottom(){return this._bottom}get left(){return this._left}get width(){return Math.abs(this._left-this._right)}get height(){return Math.abs(this._bottom-this._top)}static fromLTRB(C,R,O,I){return new Rect(C,R,O,I)}static fromLWTH(C,R,O,I){return new Rect(C,O,C+R,O+I)}static fromPoints(C,R){const{y:O,x:I}=C,{y:N,x:L}=R;return Rect.fromLTRB(I,O,L,N)}static fromDOM(C){const{top:R,width:O,left:I,height:N}=C.getBoundingClientRect();return Rect.fromLWTH(I,O,R,N)}equals(C){return C.top===this._top&&C.bottom===this._bottom&&C.left===this._left&&C.right===this._right}contains(C){if(isPoint(C)){const{x:R,y:O}=C,I=Othis._bottom,L=Rthis._right;return{reason:{isOnBottomSide:N,isOnLeftSide:L,isOnRightSide:B,isOnTopSide:I},result:!I&&!N&&!L&&!B}}else{const{top:R,left:O,bottom:I,right:N}=C;return R>=this._top&&R<=this._bottom&&I>=this._top&&I<=this._bottom&&O>=this._left&&O<=this._right&&N>=this._left&&N<=this._right}}intersectsWith(C){const{left:R,top:O,width:I,height:N}=C,{left:L,top:B,width:j,height:F}=this,V=R+I>=L+j?R+I:L+j,K=O+N>=B+F?O+N:B+F,W=R<=L?R:L,X=O<=B?O:B;return V-W<=I+j&&K-X<=N+F}generateNewRect({left:C=this.left,top:R=this.top,right:O=this.right,bottom:I=this.bottom}){return new Rect(C,R,O,I)}}const SPACE=4,TARGET_LINE_HALF_HEIGHT=2,DRAGGABLE_BLOCK_MENU_CLASSNAME="draggable-block-menu",DRAG_DATA_FORMAT="application/x-lexical-drag-block",TEXT_BOX_HORIZONTAL_PADDING=28,Downward=1,Upward=-1,Indeterminate=0,DraggableBlockPlugin=S=>{const{anchorElem:C=document.body}=S,[R]=LexicalComposerContext_1.useLexicalComposerContext();return useDraggableBlockMenu(R,C,R._editable)};let prevIndex=1/0;function getCurrentIndex(S){return S===0?1/0:prevIndex>=0&&prevIndexLexical_1.$getRoot().getChildrenKeys())}function getCollapsedMargins(S){const C=(j,F)=>j?parseFloat(window.getComputedStyle(j)[F]):0,{marginTop:R,marginBottom:O}=window.getComputedStyle(S),I=C(S.previousElementSibling,"marginBottom"),N=C(S.nextElementSibling,"marginTop"),L=Math.max(parseFloat(R),I);return{marginBottom:Math.max(parseFloat(O),N),marginTop:L}}function getBlockElement(S,C,R,O=!1){const I=S.getBoundingClientRect(),N=getTopLevelNodeKeys(C);let L=null;return C.getEditorState().read(()=>{if(O){const F=C.getElementByKey(N[0]),V=C.getElementByKey(N[N.length-1]),K=F==null?void 0:F.getBoundingClientRect(),W=V==null?void 0:V.getBoundingClientRect();if(K&&W&&(R.yW.bottom&&(L=V),L))return}let B=getCurrentIndex(N.length),j=Indeterminate;for(;B>=0&&B{O.transform=R})}function setTargetLine(S,C,R,O){const{top:I,height:N}=C.getBoundingClientRect(),{top:L,width:B}=O.getBoundingClientRect(),{marginTop:j,marginBottom:F}=getCollapsedMargins(C);let V=I;R>=I?V+=N+F/2:V-=j/2;const K=V-L-TARGET_LINE_HALF_HEIGHT,W=TEXT_BOX_HORIZONTAL_PADDING-SPACE,X=S.style;X.transform=`translate(${W}px, ${K}px)`,X.width=`${B-(TEXT_BOX_HORIZONTAL_PADDING-SPACE)*2}px`,X.opacity=".4"}function hideTargetLine(S){const C=S==null?void 0:S.style;C&&(C.opacity="0",C.transform="translate(-10000px, -10000px)")}function useDraggableBlockMenu(S,C,R){const O=C.parentElement,I=reactExports.useRef(null),N=reactExports.useRef(null),L=reactExports.useRef(!1),[B,j]=reactExports.useState(null);reactExports.useLayoutEffect(()=>{function K(X){const J=X.target;if(!isHTMLElement(J)){j(null);return}if(isOnMenu(J))return;const oe=getBlockElement(C,S,X);j(oe)}function W(){j(null)}return O==null||O.addEventListener("mousemove",K),O==null||O.addEventListener("mouseleave",W),()=>{O==null||O.removeEventListener("mousemove",K),O==null||O.removeEventListener("mouseleave",W)}},[O,C,S]),reactExports.useEffect(()=>{I.current&&setMenuPosition(B,I.current,C)},[C,B]),reactExports.useEffect(()=>{function K(X){if(!L.current)return!1;const[J]=LexicalRichText_1.eventFiles(X);if(J)return!1;const{pageY:oe,target:pe}=X;if(!isHTMLElement(pe))return!1;const me=getBlockElement(C,S,X,!0),xe=N.current;return me===null||xe===null?!1:(setTargetLine(xe,me,oe,C),X.preventDefault(),!0)}function W(X){if(!L.current)return!1;const[J]=LexicalRichText_1.eventFiles(X);if(J)return!1;const{target:oe,dataTransfer:pe,pageY:me}=X,xe=(pe==null?void 0:pe.getData(DRAG_DATA_FORMAT))||"",Ae=Lexical_1.$getNodeByKey(xe);if(!Ae||!isHTMLElement(oe))return!1;const ge=getBlockElement(C,S,X,!0);if(!ge)return!1;const Te=Lexical_1.$getNearestNodeFromDOMNode(ge);if(!Te)return!1;if(Te===Ae)return!0;const we=ge.getBoundingClientRect().top;return me>=we?Te.insertAfter(Ae):Te.insertBefore(Ae),j(null),!0}return LexicalUtils_1.mergeRegister(S.registerCommand(Lexical_1.DRAGOVER_COMMAND,X=>K(X),Lexical_1.COMMAND_PRIORITY_LOW),S.registerCommand(Lexical_1.DROP_COMMAND,X=>W(X),Lexical_1.COMMAND_PRIORITY_HIGH))},[C,S]);const F=K=>{const W=K.dataTransfer;if(!W||!B)return;setDragImage(W,B);let X="";S.update(()=>{const J=Lexical_1.$getNearestNodeFromDOMNode(B);J&&(X=J.getKey())}),L.current=!0,W.setData(DRAG_DATA_FORMAT,X)},V=()=>{L.current=!1,hideTargetLine(N.current)};return reactDomExports.createPortal(jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"icon draggable-block-menu",role:"button",ref:I,draggable:!0,onDragStart:F,onDragEnd:V,children:jsxRuntimeExports.jsx("div",{className:R?"icon":""})}),jsxRuntimeExports.jsx("div",{className:"draggable-block-target-line",ref:N})]}),C)}const EditablePlugin=S=>{const{editable:C}=S,[R]=LexicalComposerContext_1.useLexicalComposerContext();return reactExports.useEffect(()=>{R.setEditable(C)},[R,C]),jsxRuntimeExports.jsx(reactExports.Fragment,{})},ImagesPlugin=()=>{const[S]=LexicalComposerContext_1.useLexicalComposerContext();return reactExports.useLayoutEffect(()=>{if(!S.hasNodes([ImageNode]))throw new Error("[RichEditor] ImagesPlugin: ImageNode not registered on editor");return LexicalUtils_1.mergeRegister(S.registerCommand(INSERT_IMAGE_COMMAND,onInsertImage,Lexical_1.COMMAND_PRIORITY_EDITOR),S.registerCommand(Lexical_1.DRAGSTART_COMMAND,onDragStart,Lexical_1.COMMAND_PRIORITY_HIGH),S.registerCommand(Lexical_1.DRAGOVER_COMMAND,onDragover,Lexical_1.COMMAND_PRIORITY_LOW),S.registerCommand(Lexical_1.DROP_COMMAND,C=>onDrop(C,S),Lexical_1.COMMAND_PRIORITY_HIGH))},[S]),jsxRuntimeExports.jsx(reactExports.Fragment,{})};let _transparentImage;const getTransparentImage=()=>{if(_transparentImage===void 0){const S="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";_transparentImage=document.createElement("img"),_transparentImage.src=S}return _transparentImage};function onInsertImage(S){const C=$createImageNode(S);return Lexical_1.$insertNodes([C]),Lexical_1.$isRootOrShadowRoot(C.getParentOrThrow())&&LexicalUtils_1.$wrapNodeInElement(C,Lexical_1.$createParagraphNode).selectEnd(),!0}function onDragStart(S){const C=getImageNodeInSelection();if(!C)return!1;const R=S.dataTransfer;if(!R)return!1;const O=getTransparentImage();return R.setData("text/plain","_"),R.setDragImage(O,0,0),R.setData("application/x-lexical-drag",JSON.stringify({type:RichEditorContentType.IMAGE,data:{alt:C.alt,height:C.height,key:C.getKey(),maxWidth:C.maxWidth,src:C.src,width:C.width}})),!0}function onDragover(S){return getImageNodeInSelection()?(canDropImage(S)||S.preventDefault(),!0):!1}function onDrop(S,C){const R=getImageNodeInSelection();if(!R)return!1;const O=getDragImageData(S);if(!O)return!1;if(S.preventDefault(),canDropImage(S)){const I=getDragSelection(S);R.remove();const N=Lexical_1.$createRangeSelection();I!=null&&N.applyDOMRange(I),Lexical_1.$setSelection(N),C.dispatchCommand(INSERT_IMAGE_COMMAND,O)}return!0}function getImageNodeInSelection(){const S=Lexical_1.$getSelection();if(!Lexical_1.$isNodeSelection(S))return null;const R=S.getNodes()[0];return $isImageNode(R)?R:null}function getDragImageData(S){var R;const C=(R=S.dataTransfer)==null?void 0:R.getData("application/x-lexical-drag");if(!C)return null;try{const{type:O,data:I}=JSON.parse(C);return O===RichEditorContentType.IMAGE?I:null}catch{return null}}function canDropImage(S){const C=S.target;return!!(C&&C instanceof HTMLElement&&!C.closest("code, span.editor-image")&&C.parentElement&&C.parentElement.closest("div.ContentEditable__root"))}const getDOMSelection=S=>CAN_USE_DOM?(S||window).getSelection():null;function getDragSelection(S){const C=S,R=C.target,O=R==null?null:R.nodeType===9?R.defaultView:R.ownerDocument.defaultView,I=getDOMSelection(O);let N;if(document.caretRangeFromPoint)N=document.caretRangeFromPoint(C.clientX,C.clientY);else if(C.rangeParent&&I!==null)I.collapse(C.rangeParent,C.rangeOffset||0),N=I.getRangeAt(0);else throw Error("[RichEditor] ImagesPlugin: Cannot get the selection when dragging");return N}const OnKeyDownPlugin=S=>{const[C]=LexicalComposerContext_1.useLexicalComposerContext(),R=reactExports.useRef(S.onKeyDown);return reactExports.useLayoutEffect(()=>{const O=I=>{var N;(N=R.current)==null||N.call(R,I)};return C.registerRootListener((I,N)=>{N!==null&&N.removeEventListener("keydown",O),I!==null&&I.addEventListener("keydown",O)})},[C]),jsxRuntimeExports.jsx(reactExports.Fragment,{})},PlainContentPastePlugin=()=>{const[S]=LexicalComposerContext_1.useLexicalComposerContext();return reactExports.useLayoutEffect(()=>LexicalUtils_1.mergeRegister(S.registerUpdateListener(C=>{C.tags.has("paste")&&S.update(()=>{C.dirtyLeaves.forEach(R=>{const O=Lexical_1.$getNodeByKey(R);if(Lexical_1.$isTextNode(O)){const I=Lexical_1.$copyNode(O);I.setFormat(0),I.setStyle(""),O.replace(I)}})})}),S.registerNodeTransform(Lexical_1.TextNode,C=>{const R=C.getParentOrThrow();if(LexicalLink_1.$isLinkNode(R)){const O=Lexical_1.$createTextNode(R.__url);R.insertBefore(O),R.remove()}})),[S]),jsxRuntimeExports.jsx(reactExports.Fragment,{})},resetEditorState=S=>C=>{C.update(()=>{const R=Lexical_1.$getRoot();R.clear();for(const O of S)if(O!=null){if(typeof O=="string"){const I=Lexical_1.$createTextNode(O),N=Lexical_1.$createParagraphNode();N.append(I),R.append(N);continue}if(typeof O=="object"){switch(O.type){case RichEditorContentType.IMAGE:{const I=$createImageNode({alt:O.alt,src:O.src}),N=Lexical_1.$createParagraphNode();N.append(I),R.append(N);break}case RichEditorContentType.TEXT:{const I=Lexical_1.$createTextNode(O.value),N=Lexical_1.$createParagraphNode();N.append(I),R.append(N);break}default:throw console.log("item:",O),new TypeError(`[resetEditorState] unknown rich-editor content type: ${O.type}`)}continue}console.error("[resetEditorState] unknown rich-editor data:",O)}})},RootType=Lexical_1.RootNode.getType(),ParagraphType=Lexical_1.ParagraphNode.getType(),TextType=Lexical_1.TextNode.getType(),ImageType=ImageNode.getType(),LineBreakType=Lexical_1.LineBreakNode.getType(),extractEditorData=S=>{const C=S.toJSON(),R=[];for(const I of C.root.children)O(I);return R;function O(I){switch(I.type){case ImageType:{const{src:N,alt:L}=I;if(N.startsWith(FAKE_PROTOCOL)){const B=R[R.length-1];(B==null?void 0:B.type)===RichEditorContentType.TEXT&&(B.value+=` -`);break}R.push({type:RichEditorContentType.IMAGE,src:N,alt:L});break}case LineBreakType:{const N=R[R.length-1];(N==null?void 0:N.type)===RichEditorContentType.TEXT&&(N.value+=` -`);break}case ParagraphType:{const N=I.children;for(const L of N)O(L);break}case TextType:{const N=I.text,L=R[R.length-1];(L==null?void 0:L.type)===RichEditorContentType.TEXT?L.value+=N:R.push({type:RichEditorContentType.TEXT,value:N});break}default:throw new TypeError(`[RichEditor] [extractEditorData] Unknown node.type: (${I.type})`)}}},replaceImageSrc=(S,C,R)=>{S.update(()=>{const O=Lexical_1.$getRoot();I(O);function I(N){switch(N.getType()){case RootType:case ParagraphType:for(const L of N.getChildren())I(L);break;case ImageType:{const L=N;if(L.getSrc()===C){const B=$createImageNode({alt:L.getAltText(),src:R});L.replace(B)}break}}}})};class RichEditor extends reactExports.Component{constructor(C){super(C),this.state={floatingAnchorElem:null};const{editable:R=!0,initialContent:O}=this.props;this.initialConfig={namespace:"react-simple-rich-editor",theme:{ltr:"ltr",rtl:"rtl",placeholder:classes.editorPlaceholder,paragraph:classes.editorParagraph},nodes:[ImageNode,LexicalLink_1.LinkNode],editable:R,editorState:O?resetEditorState(O):null,onError:I=>{console.error(I)}},this.onKeyDown=this.onKeyDown.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onChange=this.onChange.bind(this),this.onEditorInputWrapperRef=this.onEditorInputWrapperRef.bind(this)}render(){const{initialConfig:C,onKeyDown:R,onFocus:O,onBlur:I,onChange:N,onEditorInputWrapperRef:L}=this,{editable:B=!0,placeholder:j="Enter some text...",pluginsBeforeRichEditors:F=[],pluginsAfterRichEditors:V=[]}=this.props,{floatingAnchorElem:K}=this.state,W=mergeStyles$1(classes.editorContainer,this.props.editorContainerCls),X=mergeStyles$1(classes.editorInput,this.props.editorInputCls),J=mergeStyles$1(classes.editorInputBox,this.props.editorInputBoxCls),oe=mergeStyles$1(classes.editorPlaceholder,this.props.editorPlaceholderCls),pe=jsxRuntimeExports.jsx("div",{ref:L,className:J,children:jsxRuntimeExports.jsx(LexicalContentEditable_1.ContentEditable,{onFocus:O,onBlur:I,className:X})});return jsxRuntimeExports.jsxs(LexicalComposer_1.LexicalComposer,{initialConfig:C,children:[jsxRuntimeExports.jsx(EditablePlugin,{editable:B}),jsxRuntimeExports.jsx(CommandPlugin,{}),jsxRuntimeExports.jsxs("div",{className:W,children:[F,jsxRuntimeExports.jsx(LexicalRichTextPlugin_1.RichTextPlugin,{contentEditable:pe,placeholder:jsxRuntimeExports.jsx("div",{className:oe,children:j}),ErrorBoundary:LexicalErrorBoundary$1}),V,jsxRuntimeExports.jsx(OnKeyDownPlugin,{onKeyDown:R}),jsxRuntimeExports.jsx(LexicalOnChangePlugin_1.OnChangePlugin,{onChange:N}),jsxRuntimeExports.jsx(DragDropPastePlugin,{}),jsxRuntimeExports.jsx(PlainContentPastePlugin,{}),jsxRuntimeExports.jsx(ImagesPlugin,{}),jsxRuntimeExports.jsx(LexicalHistoryPlugin_1.HistoryPlugin,{}),K&&jsxRuntimeExports.jsx(DraggableBlockPlugin,{anchorElem:K})]})]})}onKeyDown(C){var R,O;(O=(R=this.props).onKeyDown)==null||O.call(R,C)}onFocus(C){var R,O;(O=(R=this.props).onFocus)==null||O.call(R,C)}onBlur(C){var R,O;(O=(R=this.props).onBlur)==null||O.call(R,C)}onChange(C){var R,O;(O=(R=this.props).onChange)==null||O.call(R,C)}onEditorInputWrapperRef(C){C!==null&&this.setState({floatingAnchorElem:C})}}const classes=mergeStyleSets({editorContainer:{boxSizing:"border-box",position:"relative"},editorInputBox:{boxSizing:"border-box",overflow:"auto",border:"none",position:"relative",fontWeight:"400",textAlign:"left"},editorInput:{overflow:"auto",boxSizing:"border-box",resize:"none",fontSize:"15px",position:"relative",tabSize:"1",outline:"0","> :last-child":{marginBottom:0}},editorPlaceholder:{boxSizing:"border-box",color:"#999",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",top:"0px",left:"0px",fontSize:"15px",userSelect:"none",display:"inline-block",pointerEvents:"none",width:"100%"},editorParagraph:{margin:"0 0 15px 0",position:"relative"}}),ReactRichEditor=reactExports.forwardRef((S,C)=>{const[R]=reactExports.useState(()=>new RichEditorViewModel({extractEditorData,replaceImageSrc,resetEditorState})),O=reactExports.useMemo(()=>({viewmodel:R}),[R]);return R.resolveUrlByFile$.next(S.resolveUrlByFile),R.resolveUrlByPath$.next(S.resolveUrlByPath),reactExports.useImperativeHandle(C,()=>({focus:()=>{O.viewmodel.focus()},getContent:()=>O.viewmodel.getContent(),insert:I=>{O.viewmodel.insert(I)},isEmpty:()=>O.viewmodel.isEmpty(),replaceImageSrc:(I,N)=>{O.viewmodel.replaceImageSrc(I,N)},reset:I=>{O.viewmodel.reset(I)}})),jsxRuntimeExports.jsx(RichEditorContextType.Provider,{value:O,children:jsxRuntimeExports.jsx(RichEditor,{...S})})});ReactRichEditor.displayName="ReactRichEditor";const AutoResizeTextBoxPlugin=S=>{const{viewmodel:C}=useRichEditorContext(),{maxHeight:R}=S,O=useAutoResize();return reactExports.useLayoutEffect(()=>{C.maxHeight$.setState(R),O(),setTimeout(O,1e3)},[R,O]),jsxRuntimeExports.jsx(LexicalOnChangePlugin_1.OnChangePlugin,{onChange:O,ignoreHistoryMergeTagChange:!0,ignoreSelectionChange:!0})},InspectPlugin=S=>{const[C]=LexicalComposerContext_1.useLexicalComposerContext(),R=useEventCallback(O=>{var N;return(((N=S.inspectImageUrl)==null?void 0:N.call(S,O))??"good")==="good"});return reactExports.useLayoutEffect(()=>LexicalUtils_1.mergeRegister(C.registerNodeTransform(ImageNode,O=>{if(!R(O.src)){const I=Lexical_1.$createTextNode(O.src);O.insertBefore(I),O.remove()}})),[C,R]),jsxRuntimeExports.jsx(reactExports.Fragment,{})},pfImageKeyPattern=/^data:image\//,isPfImage=S=>{if(!S||typeof S!="object")return!1;const C=Object.keys(S);return C.length===1&&pfImageKeyPattern.test(C[0])};function isPFChatInputItem(S){return typeof S=="string"?!0:S?isPfImage(S)?!0:typeof S=="object"&&typeof S.type=="string":!1}function isNonBlankPFChatInputs(S){return!Array.isArray(S)||S.length<1?!1:S.every(isPFChatInputItem)}const PFPastePlugin=()=>{const{viewmodel:S}=useRichEditorContext();return reactExports.useLayoutEffect(()=>{const C=S.requiredEditor;if(!C.hasNodes([ImageNode]))throw new Error("[RichEditor] PFPastePlugin: ImageNode not registered on editor");return C.registerCommand(Lexical_1.PASTE_COMMAND,R=>{var N;const O=(N=R.clipboardData)==null?void 0:N.getData("Text");if(O){let L=!1;try{const B=JSON.parse(O);isNonBlankPFChatInputs(B)&&(L=!0,I(B))}catch{L=!1}return L}return!1;async function I(L){const B=[];for(const j of L){if(typeof j=="string"){B.push({type:RichEditorContentType.TEXT,value:j});continue}if(isPfImage(j)){const F=Object.keys(j)[0],V=j[F];B.push({type:RichEditorContentType.IMAGE,src:V,alt:"image"});continue}switch(j.type){case"text":{B.push({type:RichEditorContentType.TEXT,value:j.text});break}case"image_file":{B.push({type:RichEditorContentType.IMAGE,src:j.image_file.path,alt:j.image_file.path});break}case"image_url":{B.push({type:RichEditorContentType.IMAGE,src:j.image_url.url,alt:j.image_url.url});break}}}S.insert(B)}},Lexical_1.COMMAND_PRIORITY_EDITOR)},[S]),jsxRuntimeExports.jsx(reactExports.Fragment,{})},index=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTABLE_IMAGE_TYPES,AutoResizeTextBoxPlugin,CAN_USE_DOM,DragDropPastePlugin,DraggableBlockPlugin,FAKE_PROTOCOL,ImagesPlugin,InspectPlugin,PFPastePlugin,ReactRichEditor,RichEditorContentType,RichEditorContextType,RichEditorViewModel,isNonBlankPFChatInputs,isPFChatInputItem,isPfImage,useRichEditorContext},Symbol.toStringTag,{value:"Module"}))})(); diff --git a/src/promptflow/promptflow/_sdk/_service/static/favicon.ico b/src/promptflow/promptflow/_sdk/_service/static/favicon.ico deleted file mode 100644 index 8616856d822..00000000000 Binary files a/src/promptflow/promptflow/_sdk/_service/static/favicon.ico and /dev/null differ diff --git a/src/promptflow/promptflow/_sdk/_service/templates/index.html b/src/promptflow/promptflow/_sdk/_service/templates/index.html deleted file mode 100644 index 3e1c435c41c..00000000000 --- a/src/promptflow/promptflow/_sdk/_service/templates/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Promptflow traces - - -
- - - diff --git a/src/promptflow/promptflow/_sdk/entities/_flow.py b/src/promptflow/promptflow/_sdk/entities/_flow.py deleted file mode 100644 index 390d262f960..00000000000 --- a/src/promptflow/promptflow/_sdk/entities/_flow.py +++ /dev/null @@ -1,398 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -import abc -import json -from os import PathLike -from pathlib import Path -from typing import Dict, Optional, Tuple, Union - -from marshmallow import Schema - -from promptflow._constants import LANGUAGE_KEY, FlowLanguage -from promptflow._sdk._constants import ( - BASE_PATH_CONTEXT_KEY, - DAG_FILE_NAME, - DEFAULT_ENCODING, - FLOW_TOOLS_JSON, - PROMPT_FLOW_DIR_NAME, -) -from promptflow._sdk.entities._connection import _Connection -from promptflow._sdk.entities._validation import SchemaValidatableMixin -from promptflow._utils.flow_utils import resolve_flow_path -from promptflow._utils.logger_utils import get_cli_sdk_logger -from promptflow._utils.yaml_utils import load_yaml, load_yaml_string -from promptflow.exceptions import ErrorTarget, UserErrorException - -logger = get_cli_sdk_logger() - - -class FlowContext: - """Flow context entity. the settings on this context will be applied to the flow when executing. - - :param connections: Connections for the flow. - :type connections: Optional[Dict[str, Dict]] - :param variant: Variant of the flow. - :type variant: Optional[str] - :param variant: Overrides of the flow. - :type variant: Optional[Dict[str, Dict]] - :param streaming: Whether the flow's output need to be return in streaming mode. - :type streaming: Optional[bool] - """ - - def __init__( - self, - *, - connections=None, - variant=None, - overrides=None, - streaming=None, - ): - self.connections, self._connection_objs = connections or {}, {} - self.variant = variant - self.overrides = overrides or {} - self.streaming = streaming - # TODO: introduce connection provider support - - def _resolve_connections(self): - # resolve connections and create placeholder for connection objects - for _, v in self.connections.items(): - if isinstance(v, dict): - for k, conn in v.items(): - if isinstance(conn, _Connection): - name = self._get_connection_obj_name(conn) - v[k] = name - self._connection_objs[name] = conn - - @classmethod - def _get_connection_obj_name(cls, connection: _Connection): - # create a unique connection name for connection obj - # will generate same name if connection has same content - connection_dict = connection._to_dict() - connection_name = f"connection_{hash(json.dumps(connection_dict, sort_keys=True))}" - return connection_name - - def _to_dict(self): - return { - "connections": self.connections, - "variant": self.variant, - "overrides": self.overrides, - "streaming": self.streaming, - } - - def __eq__(self, other): - if isinstance(other, FlowContext): - return self._to_dict() == other._to_dict() - return False - - def __hash__(self): - self._resolve_connections() - return hash(json.dumps(self._to_dict(), sort_keys=True)) - - -class FlowBase(abc.ABC): - def __init__(self, *, data: dict, code: Path, path: Path, **kwargs): - self._context = FlowContext() - # flow.dag.yaml's content if provided - self._data = data - # working directory of the flow - self._code = Path(code).resolve() - # flow file path, can be script file or flow definition YAML file - self._path = Path(path).resolve() - # hash of flow's entry file, used to skip invoke if entry file is not changed - self._content_hash = kwargs.pop("content_hash", None) - super().__init__(**kwargs) - - @property - def context(self) -> FlowContext: - return self._context - - @context.setter - def context(self, val): - if not isinstance(val, FlowContext): - raise UserErrorException("context must be a FlowContext object, got {type(val)} instead.") - self._context = val - - @property - def code(self) -> Path: - """Working directory of the flow.""" - return self._code - - @property - def path(self) -> Path: - """Flow file path. Can be script file or flow definition YAML file.""" - return self._path - - @property - def language(self) -> str: - """Language of the flow.""" - return self._data.get(LANGUAGE_KEY, FlowLanguage.Python) - - @property - def additional_includes(self) -> list: - """Additional includes of the flow.""" - return self._data.get("additional_includes", []) - - @classmethod - # pylint: disable=unused-argument - def _resolve_cls_and_type(cls, data, params_override): - """Resolve the class to use for deserializing the data. Return current class if no override is provided. - :param data: Data to deserialize. - :type data: dict - :param params_override: Parameters to override, defaults to None - :type params_override: typing.Optional[list] - :return: Class to use for deserializing the data & its "type". Type will be None if no override is provided. - :rtype: tuple[class, typing.Optional[str]] - """ - return cls, "flow" - - -class Flow(FlowBase): - """This class is used to represent a flow.""" - - def __init__( - self, - code: Union[str, PathLike], - path: Union[str, PathLike], - dag: dict, - **kwargs, - ): - self.variant = kwargs.pop("variant", None) or {} - super().__init__(data=dag, code=code, path=path, **kwargs) - - @classmethod - def _is_eager_flow(cls, data: dict): - """Check if the flow is an eager flow. Use field 'entry' to determine.""" - # If entry specified, it's an eager flow. - return data.get("entry") - - @classmethod - def load( - cls, - source: Union[str, PathLike], - entry: str = None, - raise_error=True, - **kwargs, - ): - from promptflow._sdk.entities._eager_flow import EagerFlow - - source_path = Path(source) - if not source_path.exists(): - raise UserErrorException(f"Source {source_path.absolute().as_posix()} does not exist") - flow_path = resolve_flow_path(source_path) - if not flow_path.exists(): - raise UserErrorException(f"Flow file {flow_path.absolute().as_posix()} does not exist") - if flow_path.suffix in [".yaml", ".yml"]: - # read flow file to get hash - with open(flow_path, "r", encoding=DEFAULT_ENCODING) as f: - flow_content = f.read() - data = load_yaml_string(flow_content) - content_hash = hash(flow_content) - is_eager_flow = cls._is_eager_flow(data) - is_async_call = kwargs.pop("is_async_call", False) - if is_eager_flow: - return EagerFlow._load(path=flow_path, data=data, raise_error=raise_error, **kwargs) - else: - # TODO: schema validation and warning on unknown fields - if is_async_call: - return AsyncProtectedFlow._load(path=flow_path, dag=data, content_hash=content_hash, **kwargs) - else: - return ProtectedFlow._load(path=flow_path, dag=data, content_hash=content_hash, **kwargs) - # if non-YAML file is provided, raise user error exception - raise UserErrorException("Source must be a directory or a 'flow.dag.yaml' file") - - def _init_executable(self, tuning_node=None, variant=None): - from promptflow._sdk._submitter import variant_overwrite_context - from promptflow.contracts.flow import Flow as ExecutableFlow - - if not tuning_node and not variant: - # for DAG flow, use data to init executable to improve performance - return ExecutableFlow._from_dict(flow_dag=self._data, working_dir=self.code) - - # TODO: check if there is potential bug here - # this is a little wired: - # 1. the executable is created from a temp folder when there is additional includes - # 2. after the executable is returned, the temp folder is deleted - with variant_overwrite_context(self, tuning_node, variant) as flow: - - return ExecutableFlow.from_yaml(flow_file=flow.path, working_dir=flow.code) - - def __eq__(self, other): - if isinstance(other, Flow): - return self._content_hash == other._content_hash and self.context == other.context - return False - - def __hash__(self): - return hash(self.context) ^ self._content_hash - - -class ProtectedFlow(Flow, SchemaValidatableMixin): - """This class is used to hide internal interfaces from user. - - User interface should be carefully designed to avoid breaking changes, while developers may need to change internal - interfaces to improve the code quality. On the other hand, making all internal interfaces private will make it - strange to use them everywhere inside this package. - - Ideally, developers should always initialize ProtectedFlow object instead of Flow object. - """ - - def __init__( - self, - path: Path, - code: Path, - dag: dict, - params_override: Optional[Dict] = None, - **kwargs, - ): - super().__init__(path=path, code=code, dag=dag, **kwargs) - - self._flow_dir, self._dag_file_name = self._get_flow_definition(self.code) - self._executable = None - self._params_override = params_override - - @classmethod - def _load(cls, path: Path, dag: dict, **kwargs): - return cls(path=path, code=path.parent, dag=dag, **kwargs) - - @property - def flow_dag_path(self) -> Path: - return self._flow_dir / self._dag_file_name - - @property - def name(self) -> str: - return self._flow_dir.name - - @property - def display_name(self) -> str: - return self._data.get("display_name", self.name) - - @property - def tools_meta_path(self) -> Path: - target_path = self._flow_dir / PROMPT_FLOW_DIR_NAME / FLOW_TOOLS_JSON - target_path.parent.mkdir(parents=True, exist_ok=True) - return target_path - - @classmethod - def _get_flow_definition(cls, flow, base_path=None) -> Tuple[Path, str]: - if base_path: - flow_path = Path(base_path) / flow - else: - flow_path = Path(flow) - - if flow_path.is_dir() and (flow_path / DAG_FILE_NAME).is_file(): - return flow_path, DAG_FILE_NAME - elif flow_path.is_file(): - return flow_path.parent, flow_path.name - - raise ValueError(f"Can't find flow with path {flow_path.as_posix()}.") - - # region SchemaValidatableMixin - @classmethod - def _create_schema_for_validation(cls, context) -> Schema: - # import here to avoid circular import - from ..schemas._flow import FlowSchema - - return FlowSchema(context=context) - - def _default_context(self) -> dict: - return {BASE_PATH_CONTEXT_KEY: self._flow_dir} - - def _create_validation_error(self, message, no_personal_data_message=None): - return UserErrorException( - message=message, - target=ErrorTarget.CONTROL_PLANE_SDK, - no_personal_data_message=no_personal_data_message, - ) - - def _dump_for_validation(self) -> Dict: - # Flow is read-only in control plane, so we always dump the flow from file - data = load_yaml(self.flow_dag_path) - if isinstance(self._params_override, dict): - data.update(self._params_override) - return data - - # endregion - - # region MLFlow model requirements - @property - def inputs(self): - # This is used for build mlflow model signature. - if not self._executable: - self._executable = self._init_executable() - return {k: v.type.value for k, v in self._executable.inputs.items()} - - @property - def outputs(self): - # This is used for build mlflow model signature. - if not self._executable: - self._executable = self._init_executable() - return {k: v.type.value for k, v in self._executable.outputs.items()} - - # endregion - - def __call__(self, *args, **kwargs): - """Calling flow as a function, the inputs should be provided with key word arguments. - Returns the output of the flow. - The function call throws UserErrorException: if the flow is not valid or the inputs are not valid. - SystemErrorException: if the flow execution failed due to unexpected executor error. - - :param args: positional arguments are not supported. - :param kwargs: flow inputs with key word arguments. - :return: - """ - - if args: - raise UserErrorException("Flow can only be called with keyword arguments.") - - result = self.invoke(inputs=kwargs) - return result.output - - def invoke(self, inputs: dict) -> "LineResult": - """Invoke a flow and get a LineResult object.""" - from promptflow._sdk._submitter import TestSubmitter - from promptflow._sdk.operations._flow_context_resolver import FlowContextResolver - - if self.language == FlowLanguage.CSharp: - with TestSubmitter(flow=self, flow_context=self.context).init( - stream_output=self.context.streaming - ) as submitter: - result = submitter.flow_test(inputs=inputs, allow_generator_output=self.context.streaming) - return result - else: - invoker = FlowContextResolver.resolve(flow=self) - result = invoker._invoke( - data=inputs, - ) - return result - - -class AsyncProtectedFlow(ProtectedFlow): - """This class is used to represent an async flow.""" - - async def __call__(self, *args, **kwargs): - if args: - raise UserErrorException("Flow can only be called with keyword arguments.") - - result = await self.invoke_async(inputs=kwargs) - return result.output - - async def invoke_async(self, inputs: dict) -> "LineResult": - """Invoke a flow and get a LineResult object.""" - from promptflow._sdk._submitter import TestSubmitter - from promptflow._sdk.operations._flow_context_resolver import FlowContextResolver - - if self.language == FlowLanguage.CSharp: - # Sync C# calling - # TODO: Async C# support: Task(3002242) - with TestSubmitter(flow=self, flow_context=self.context).init( - stream_output=self.context.streaming - ) as submitter: - result = submitter.flow_test(inputs=inputs, allow_generator_output=self.context.streaming) - return result - else: - invoker = FlowContextResolver.resolve_async_invoker(flow=self) - result = await invoker._invoke_async( - data=inputs, - ) - return result diff --git a/src/promptflow/promptflow/_sdk/entities/_trace.py b/src/promptflow/promptflow/_sdk/entities/_trace.py deleted file mode 100644 index 045b112b266..00000000000 --- a/src/promptflow/promptflow/_sdk/entities/_trace.py +++ /dev/null @@ -1,348 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -import copy -import datetime -import json -import typing -from dataclasses import dataclass - -from google.protobuf.json_format import MessageToJson -from opentelemetry.proto.trace.v1.trace_pb2 import Span as PBSpan - -from promptflow._constants import ( - DEFAULT_SPAN_TYPE, - SpanAttributeFieldName, - SpanContextFieldName, - SpanEventFieldName, - SpanFieldName, - SpanLinkFieldName, - SpanResourceAttributesFieldName, - SpanResourceFieldName, - SpanStatusFieldName, -) -from promptflow._sdk._constants import CumulativeTokenCountFieldName -from promptflow._sdk._orm.trace import Span as ORMSpan -from promptflow._sdk._utils import ( - convert_time_unix_nano_to_timestamp, - flatten_pb_attributes, - json_loads_parse_const_as_str, - parse_otel_span_status_code, -) - - -class Span: - """Span is exactly the same as OpenTelemetry Span.""" - - def __init__( - self, - name: str, - context: typing.Dict[str, str], - kind: str, - start_time: str, - end_time: str, - status: str, - attributes: typing.Dict[str, str], - resource: typing.Dict, - # should come from attributes - span_type: str, - session_id: str, - # optional fields - parent_span_id: typing.Optional[str] = None, - events: typing.Optional[typing.List] = None, - links: typing.Optional[typing.List] = None, - # prompt flow concepts - path: typing.Optional[str] = None, - run: typing.Optional[str] = None, - experiment: typing.Optional[str] = None, - ): - self.name = name - self.span_id = context[SpanContextFieldName.SPAN_ID] - self.trace_id = context[SpanContextFieldName.TRACE_ID] - self.span_type = span_type - self.parent_span_id = parent_span_id - self.session_id = session_id - self.path = path - self.run = run - self.experiment = experiment - self._content = { - SpanFieldName.NAME: self.name, - SpanFieldName.CONTEXT: copy.deepcopy(context), - SpanFieldName.KIND: kind, - SpanFieldName.PARENT_ID: self.parent_span_id, - SpanFieldName.START_TIME: start_time, - SpanFieldName.END_TIME: end_time, - SpanFieldName.STATUS: status, - SpanFieldName.ATTRIBUTES: copy.deepcopy(attributes), - SpanFieldName.EVENTS: copy.deepcopy(events), - SpanFieldName.LINKS: copy.deepcopy(links), - SpanFieldName.RESOURCE: copy.deepcopy(resource), - } - - def _persist(self) -> None: - self._to_orm_object().persist() - - @staticmethod - def _from_orm_object(obj: ORMSpan) -> "Span": - content = json.loads(obj.content) - return Span( - name=obj.name, - context=content[SpanFieldName.CONTEXT], - kind=content[SpanFieldName.KIND], - start_time=content[SpanFieldName.START_TIME], - end_time=content[SpanFieldName.END_TIME], - status=content[SpanFieldName.STATUS], - attributes=content[SpanFieldName.ATTRIBUTES], - resource=content[SpanFieldName.RESOURCE], - span_type=obj.span_type, - session_id=obj.session_id, - parent_span_id=obj.parent_span_id, - events=content[SpanFieldName.EVENTS], - links=content[SpanFieldName.LINKS], - path=obj.path, - run=obj.run, - experiment=obj.experiment, - ) - - def _to_orm_object(self) -> ORMSpan: - return ORMSpan( - name=self.name, - trace_id=self.trace_id, - span_id=self.span_id, - parent_span_id=self.parent_span_id, - span_type=self.span_type, - session_id=self.session_id, - content=json.dumps(self._content), - path=self.path, - run=self.run, - experiment=self.experiment, - ) - - @staticmethod - def _from_protobuf_events(obj: typing.List[PBSpan.Event]) -> typing.List[typing.Dict]: - events = [] - if len(obj) == 0: - return events - for pb_event in obj: - event_dict: dict = json.loads(MessageToJson(pb_event)) - event = { - SpanEventFieldName.NAME: pb_event.name, - SpanEventFieldName.TIMESTAMP: convert_time_unix_nano_to_timestamp(pb_event.time_unix_nano), - SpanEventFieldName.ATTRIBUTES: flatten_pb_attributes( - event_dict.get(SpanEventFieldName.ATTRIBUTES, dict()) - ), - } - events.append(event) - return events - - @staticmethod - def _from_protobuf_links(obj: typing.List[PBSpan.Link]) -> typing.List[typing.Dict]: - links = [] - if len(obj) == 0: - return links - for pb_link in obj: - link_dict: dict = json.loads(MessageToJson(pb_link)) - link = { - SpanLinkFieldName.CONTEXT: { - SpanContextFieldName.TRACE_ID: pb_link.trace_id.hex(), - SpanContextFieldName.SPAN_ID: pb_link.span_id.hex(), - SpanContextFieldName.TRACE_STATE: pb_link.trace_state, - }, - SpanLinkFieldName.ATTRIBUTES: flatten_pb_attributes( - link_dict.get(SpanLinkFieldName.ATTRIBUTES, dict()) - ), - } - links.append(link) - return links - - @staticmethod - def _from_protobuf_object(obj: PBSpan, resource: typing.Dict) -> "Span": - span_dict: dict = json.loads(MessageToJson(obj)) - span_id = obj.span_id.hex() - trace_id = obj.trace_id.hex() - context = { - SpanContextFieldName.TRACE_ID: trace_id, - SpanContextFieldName.SPAN_ID: span_id, - SpanContextFieldName.TRACE_STATE: obj.trace_state, - } - parent_span_id = obj.parent_span_id.hex() - start_time = convert_time_unix_nano_to_timestamp(obj.start_time_unix_nano) - end_time = convert_time_unix_nano_to_timestamp(obj.end_time_unix_nano) - status = { - SpanStatusFieldName.STATUS_CODE: parse_otel_span_status_code(obj.status.code), - SpanStatusFieldName.DESCRIPTION: obj.status.message, - } - # we have observed in some scenarios, there is not `attributes` field - attributes = flatten_pb_attributes(span_dict.get(SpanFieldName.ATTRIBUTES, dict())) - # `span_type` are not standard fields in OpenTelemetry attributes - # for example, LangChain instrumentation, as we do not inject this; - # so we need to get it with default value to avoid KeyError - span_type = attributes.get(SpanAttributeFieldName.SPAN_TYPE, DEFAULT_SPAN_TYPE) - - # parse from resource.attributes: session id, experiment - resource_attributes: dict = resource[SpanResourceFieldName.ATTRIBUTES] - session_id = resource_attributes[SpanResourceAttributesFieldName.SESSION_ID] - experiment = resource_attributes.get(SpanResourceAttributesFieldName.EXPERIMENT_NAME, None) - - events = Span._from_protobuf_events(obj.events) - links = Span._from_protobuf_links(obj.links) - - # if `batch_run_id` exists, record the run - run = attributes.get(SpanAttributeFieldName.BATCH_RUN_ID, None) - - return Span( - name=obj.name, - context=context, - kind=obj.kind, - start_time=start_time, - end_time=end_time, - status=status, - attributes=attributes, - resource=resource, - span_type=span_type, - session_id=session_id, - parent_span_id=parent_span_id, - events=events, - links=links, - run=run, - experiment=experiment, - ) - - -@dataclass -class _LineRunData: - """Basic data structure for line run, no matter if it is a main or evaluation.""" - - line_run_id: str - trace_id: str - root_span_id: str - inputs: typing.Dict - outputs: typing.Dict - start_time: str - end_time: str - status: str - latency: float - display_name: str - kind: str - cumulative_token_count: typing.Optional[typing.Dict[str, int]] - - def _from_root_span(span: Span) -> "_LineRunData": - attributes: dict = span._content[SpanFieldName.ATTRIBUTES] - line_run_id = span.trace_id - start_time = datetime.datetime.fromisoformat(span._content[SpanFieldName.START_TIME]) - end_time = datetime.datetime.fromisoformat(span._content[SpanFieldName.END_TIME]) - # calculate `cumulative_token_count` - completion_token_count = int(attributes.get(SpanAttributeFieldName.COMPLETION_TOKEN_COUNT, 0)) - prompt_token_count = int(attributes.get(SpanAttributeFieldName.PROMPT_TOKEN_COUNT, 0)) - total_token_count = int(attributes.get(SpanAttributeFieldName.TOTAL_TOKEN_COUNT, 0)) - # if there is no token usage, set `cumulative_token_count` to None - if total_token_count > 0: - cumulative_token_count = { - CumulativeTokenCountFieldName.COMPLETION: completion_token_count, - CumulativeTokenCountFieldName.PROMPT: prompt_token_count, - CumulativeTokenCountFieldName.TOTAL: total_token_count, - } - else: - cumulative_token_count = None - return _LineRunData( - line_run_id=line_run_id, - trace_id=span.trace_id, - root_span_id=span.span_id, - # for standard OpenTelemetry traces, there won't be `inputs` and `outputs` in attributes - inputs=json_loads_parse_const_as_str(attributes.get(SpanAttributeFieldName.INPUTS, "{}")), - outputs=json_loads_parse_const_as_str(attributes.get(SpanAttributeFieldName.OUTPUT, "{}")), - start_time=start_time.isoformat(), - end_time=end_time.isoformat(), - status=span._content[SpanFieldName.STATUS][SpanStatusFieldName.STATUS_CODE], - latency=(end_time - start_time).total_seconds(), - display_name=span.name, - kind=attributes.get(SpanAttributeFieldName.SPAN_TYPE, span.span_type), - cumulative_token_count=cumulative_token_count, - ) - - -@dataclass -class LineRun: - """Line run is an abstraction of spans related to prompt flow.""" - - line_run_id: str - trace_id: str - root_span_id: str - inputs: typing.Dict - outputs: typing.Dict - start_time: str - end_time: str - status: str - latency: float - name: str - kind: str - cumulative_token_count: typing.Optional[typing.Dict[str, int]] = None - evaluations: typing.Optional[typing.Dict[str, _LineRunData]] = None - - @staticmethod - def _from_spans(spans: typing.List[Span]) -> typing.Optional["LineRun"]: - main_line_run_data: _LineRunData = None - evaluations = dict() - for span in spans: - if span.parent_span_id: - continue - attributes = span._content[SpanFieldName.ATTRIBUTES] - if ( - SpanAttributeFieldName.REFERENCED_LINE_RUN_ID in attributes # test scenario - or SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID in attributes # batch run scenario - ): - evaluations[span.name] = _LineRunData._from_root_span(span) - elif SpanAttributeFieldName.LINE_RUN_ID in attributes: - main_line_run_data = _LineRunData._from_root_span(span) - else: - # eager flow/arbitrary script - main_line_run_data = _LineRunData._from_root_span(span) - # main line run span is absent, ignore this line run - # this may happen when the line is still executing, or terminated; - # or the line run is killed before the traces exported - if main_line_run_data is None: - return None - - return LineRun( - line_run_id=main_line_run_data.line_run_id, - trace_id=main_line_run_data.trace_id, - root_span_id=main_line_run_data.root_span_id, - inputs=main_line_run_data.inputs, - outputs=main_line_run_data.outputs, - start_time=main_line_run_data.start_time, - end_time=main_line_run_data.end_time, - status=main_line_run_data.status, - latency=main_line_run_data.latency, - name=main_line_run_data.display_name, - kind=main_line_run_data.kind, - cumulative_token_count=main_line_run_data.cumulative_token_count, - evaluations=evaluations, - ) - - @staticmethod - def _from_run_and_spans(run: str, spans: typing.List[Span]) -> typing.Optional["LineRun"]: - main_line_run_data: _LineRunData = None - evaluations = dict() - for span in spans: - attributes = span._content[SpanFieldName.ATTRIBUTES] - batch_run_id = attributes[SpanAttributeFieldName.BATCH_RUN_ID] - if batch_run_id == run: - main_line_run_data = _LineRunData._from_root_span(span) - else: - evaluations[span.name] = _LineRunData._from_root_span(span) - return LineRun( - line_run_id=main_line_run_data.line_run_id, - trace_id=main_line_run_data.trace_id, - root_span_id=main_line_run_data.root_span_id, - inputs=main_line_run_data.inputs, - outputs=main_line_run_data.outputs, - start_time=main_line_run_data.start_time, - end_time=main_line_run_data.end_time, - status=main_line_run_data.status, - latency=main_line_run_data.latency, - name=main_line_run_data.display_name, - kind=main_line_run_data.kind, - cumulative_token_count=main_line_run_data.cumulative_token_count, - evaluations=evaluations, - ) diff --git a/src/promptflow/promptflow/_sdk/operations/_trace_operations.py b/src/promptflow/promptflow/_sdk/operations/_trace_operations.py deleted file mode 100644 index 304a91ab15f..00000000000 --- a/src/promptflow/promptflow/_sdk/operations/_trace_operations.py +++ /dev/null @@ -1,132 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -import copy -import json -import typing - -from promptflow._constants import SpanAttributeFieldName, SpanFieldName -from promptflow._sdk._orm.trace import LineRun as ORMLineRun -from promptflow._sdk._orm.trace import Span as ORMSpan -from promptflow._sdk.entities._trace import LineRun, Span - - -class TraceOperations: - def list_spans( - self, - session_id: typing.Optional[str] = None, - trace_ids: typing.Optional[typing.List[str]] = None, - ) -> typing.List[Span]: - orm_spans = ORMSpan.list( - session_id=session_id, - trace_ids=trace_ids, - ) - return [Span._from_orm_object(orm_span) for orm_span in orm_spans] - - def list_line_runs( - self, - session_id: typing.Optional[str] = None, - runs: typing.Optional[typing.List[str]] = None, - experiments: typing.Optional[typing.List[str]] = None, - ) -> typing.List[LineRun]: - # separate query with runs - if runs is not None: - return self._list_line_runs_with_runs(runs) - - line_runs = [] - orm_spans_group_by_trace_id = ORMLineRun.list( - session_id=session_id, - experiments=experiments, - ) - # merge spans with same `line_run_id` or `referenced.line_run_id` (if exists) - grouped_orm_spans = {} - for orm_spans in orm_spans_group_by_trace_id: - first_orm_span = orm_spans[0] - attributes = json.loads(first_orm_span.content)[SpanFieldName.ATTRIBUTES] - if ( - SpanAttributeFieldName.LINE_RUN_ID not in attributes - and SpanAttributeFieldName.BATCH_RUN_ID not in attributes - ): - # standard OpenTelemetry trace, regard as a line run - grouped_orm_spans[first_orm_span.trace_id] = copy.deepcopy(orm_spans) - elif SpanAttributeFieldName.LINE_RUN_ID in attributes: - # test scenario - if SpanAttributeFieldName.REFERENCED_LINE_RUN_ID not in attributes: - # main flow - line_run_id = attributes[SpanAttributeFieldName.LINE_RUN_ID] - if line_run_id not in grouped_orm_spans: - grouped_orm_spans[line_run_id] = [] - grouped_orm_spans[line_run_id].extend(copy.deepcopy(orm_spans)) - else: - # evaluation flow - referenced_line_run_id = attributes[SpanAttributeFieldName.REFERENCED_LINE_RUN_ID] - if referenced_line_run_id not in grouped_orm_spans: - grouped_orm_spans[referenced_line_run_id] = [] - grouped_orm_spans[referenced_line_run_id].extend(copy.deepcopy(orm_spans)) - elif SpanAttributeFieldName.BATCH_RUN_ID in attributes: - # batch run scenario - if SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID not in attributes: - # main flow - line_run_id = ( - attributes[SpanAttributeFieldName.BATCH_RUN_ID] - + "_" - + attributes[SpanAttributeFieldName.LINE_NUMBER] - ) - if line_run_id not in grouped_orm_spans: - grouped_orm_spans[line_run_id] = [] - grouped_orm_spans[line_run_id].extend(copy.deepcopy(orm_spans)) - else: - # evaluation flow - referenced_line_run_id = ( - attributes[SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID] - + "_" - + attributes[SpanAttributeFieldName.LINE_NUMBER] - ) - if referenced_line_run_id not in grouped_orm_spans: - grouped_orm_spans[referenced_line_run_id] = [] - grouped_orm_spans[referenced_line_run_id].extend(copy.deepcopy(orm_spans)) - else: - # others, ignore for now - pass - for orm_spans in grouped_orm_spans.values(): - spans = [Span._from_orm_object(orm_span) for orm_span in orm_spans] - line_run = LineRun._from_spans(spans) - if line_run is not None: - line_runs.append(line_run) - return line_runs - - def _list_line_runs_with_runs(self, runs: typing.List[str]) -> typing.List[LineRun]: - orm_spans = ORMSpan.list_with_runs(runs) - # group root spans by lineage: - # 1. main + eval - # 2. eval - grouped_spans = {run: dict() for run in runs} - for span in map(Span._from_orm_object, orm_spans): - attributes = span._content[SpanFieldName.ATTRIBUTES] - # aggregation node will not have `batch_run_id`, ignore - if SpanAttributeFieldName.BATCH_RUN_ID not in attributes: - continue - batch_run_id = attributes[SpanAttributeFieldName.BATCH_RUN_ID] - line_number = attributes[SpanAttributeFieldName.LINE_NUMBER] - # check if it is an evaluation root span - if SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID in attributes: - referenced_batch_run_id = attributes[SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID] - if referenced_batch_run_id in runs: - if line_number not in grouped_spans[referenced_batch_run_id]: - grouped_spans[referenced_batch_run_id][line_number] = [] - grouped_spans[referenced_batch_run_id][line_number].append(span) - continue - if line_number not in grouped_spans[batch_run_id]: - grouped_spans[batch_run_id][line_number] = [] - grouped_spans[batch_run_id][line_number].append(span) - line_runs = [] - for run in grouped_spans: - run_spans = grouped_spans[run] - if len(run_spans) == 0: - continue - for line_number in run_spans: - line_spans = run_spans[line_number] - line_run = LineRun._from_run_and_spans(run, line_spans) - line_runs.append(line_run) - return line_runs diff --git a/src/promptflow/promptflow/_utils/_errors.py b/src/promptflow/promptflow/_utils/_errors.py deleted file mode 100644 index bbac5aff7d8..00000000000 --- a/src/promptflow/promptflow/_utils/_errors.py +++ /dev/null @@ -1,15 +0,0 @@ -from promptflow.exceptions import SystemErrorException, UserErrorException, ValidationException - - -class InvalidImageInput(ValidationException): - pass - - -class LoadMultimediaDataError(UserErrorException): - pass - - -class YamlParseError(SystemErrorException): - """Exception raised when yaml parse failed.""" - - pass diff --git a/src/promptflow/promptflow/_utils/flow_utils.py b/src/promptflow/promptflow/_utils/flow_utils.py deleted file mode 100644 index 4e8044fa7e0..00000000000 --- a/src/promptflow/promptflow/_utils/flow_utils.py +++ /dev/null @@ -1,71 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- -import hashlib -import os -from os import PathLike -from pathlib import Path -from typing import Union - -from promptflow._sdk._constants import DAG_FILE_NAME, DEFAULT_ENCODING -from promptflow._utils.logger_utils import LoggerFactory -from promptflow._utils.yaml_utils import dump_yaml, load_yaml - -logger = LoggerFactory.get_logger(name=__name__) - - -def get_flow_lineage_id(flow_dir: Union[str, PathLike]): - """ - Get the lineage id for flow. The flow lineage id will be same for same flow in same GIT repo or device. - If the flow locates in GIT repo: - use Repo name + relative path to flow_dir as session id - Otherwise: - use device id + absolute path to flow_dir as session id - :param flow_dir: flow directory - """ - flow_dir = Path(flow_dir).resolve() - if not flow_dir.is_dir(): - flow_dir = flow_dir.parent - try: - from git import Repo - - repo = Repo(flow_dir, search_parent_directories=True) - lineage_id = f"{os.path.basename(repo.working_dir)}/{flow_dir.relative_to(repo.working_dir).as_posix()}" - logger.debug("Got lineage id %s from git repo.", lineage_id) - - except Exception: - # failed to get repo, use device id + absolute path to flow_dir as session id - import uuid - - device_id = uuid.getnode() - lineage_id = f"{device_id}/{flow_dir.absolute().as_posix()}" - logger.debug("Got lineage id %s from local since failed to get git info.", lineage_id) - - # hash the value to avoid it gets too long, and it's not user visible. - lineage_id = hashlib.sha256(lineage_id.encode()).hexdigest() - return lineage_id - - -def resolve_flow_path(flow_path: Path): - """Resolve given flow path to dag file path.""" - if flow_path.is_dir(): - flow_path = flow_path / DAG_FILE_NAME - return flow_path - - -def load_flow_dag(flow_path: Path): - """Load flow dag from given flow path.""" - flow_path = resolve_flow_path(flow_path) - if not flow_path.exists(): - raise FileNotFoundError(f"Flow file {flow_path} not found") - with open(flow_path, "r", encoding=DEFAULT_ENCODING) as f: - flow_dag = load_yaml(f) - return flow_path, flow_dag - - -def dump_flow_dag(flow_dag: dict, flow_path: Path): - """Dump flow dag to given flow path.""" - flow_path = resolve_flow_path(flow_path) - with open(flow_path, "w", encoding=DEFAULT_ENCODING) as f: - dump_yaml(flow_dag, f) - return flow_path diff --git a/src/promptflow/promptflow/_utils/multimedia_utils.py b/src/promptflow/promptflow/_utils/multimedia_utils.py deleted file mode 100644 index 183e3f5523d..00000000000 --- a/src/promptflow/promptflow/_utils/multimedia_utils.py +++ /dev/null @@ -1,255 +0,0 @@ -import base64 -import os -import re -import uuid -from functools import partial -from pathlib import Path -from typing import Any, Callable, Dict -from urllib.parse import urlparse - -import requests - -from promptflow._utils._errors import InvalidImageInput, LoadMultimediaDataError -from promptflow.contracts.flow import FlowInputDefinition -from promptflow.contracts.multimedia import Image, PFBytes -from promptflow.contracts.tool import ValueType -from promptflow.exceptions import ErrorTarget - -MIME_PATTERN = re.compile(r"^data:image/(.*);(path|base64|url)$") - - -def _get_extension_from_mime_type(mime_type: str): - ext = mime_type.split("/")[-1] - if ext == "*": - return None - return ext - - -def is_multimedia_dict(multimedia_dict: dict): - if len(multimedia_dict) != 1: - return False - key = list(multimedia_dict.keys())[0] - if re.match(MIME_PATTERN, key): - return True - return False - - -def _get_multimedia_info(key: str): - match = re.match(MIME_PATTERN, key) - if match: - return match.group(1), match.group(2) - return None, None - - -def _is_url(value: str): - try: - result = urlparse(value) - return all([result.scheme, result.netloc]) - except ValueError: - return False - - -def _is_base64(value: str): - base64_regex = re.compile(r"^([A-Za-z0-9+/]{4})*(([A-Za-z0-9+/]{2})*(==|[A-Za-z0-9+/]=)?)?$") - if re.match(base64_regex, value): - return True - return False - - -def _create_image_from_file(f: Path, mime_type: str = None): - with open(f, "rb") as fin: - return Image(fin.read(), mime_type=mime_type) - - -def _create_image_from_base64(base64_str: str, mime_type: str = None): - image_bytes = base64.b64decode(base64_str) - return Image(image_bytes, mime_type=mime_type) - - -def _create_image_from_url(url: str, mime_type: str = None): - response = requests.get(url) - if response.status_code == 200: - return Image(response.content, mime_type=mime_type, source_url=url) - else: - raise InvalidImageInput( - message_format="Failed to fetch image from URL: {url}. Error code: {error_code}. " - "Error message: {error_message}.", - target=ErrorTarget.EXECUTOR, - url=url, - error_code=response.status_code, - error_message=response.text, - ) - - -def _create_image_from_dict(image_dict: dict): - for k, v in image_dict.items(): - format, resource = _get_multimedia_info(k) - if resource == "path": - return _create_image_from_file(Path(v), mime_type=f"image/{format}") - elif resource == "base64": - if _is_base64(v): - return _create_image_from_base64(v, mime_type=f"image/{format}") - else: - raise InvalidImageInput( - message_format=f"Invalid base64 image: {v}.", - target=ErrorTarget.EXECUTOR, - ) - elif resource == "url": - return _create_image_from_url(v, mime_type=f"image/{format}") - else: - raise InvalidImageInput( - message_format=f"Unsupported image resource: {resource}. " - "Supported Resources are [path, base64, url].", - target=ErrorTarget.EXECUTOR, - ) - - -def _create_image_from_string(value: str): - if _is_base64(value): - return _create_image_from_base64(value) - elif _is_url(value): - return _create_image_from_url(value) - else: - return _create_image_from_file(Path(value)) - - -def create_image(value: any): - if isinstance(value, PFBytes): - return value - elif isinstance(value, dict): - if is_multimedia_dict(value): - return _create_image_from_dict(value) - else: - raise InvalidImageInput( - message_format="Invalid image input format. The image input should be a dictionary like: " - "{{data:image/;[path|base64|url]: }}.", - target=ErrorTarget.EXECUTOR, - ) - elif isinstance(value, str): - if not value: - raise InvalidImageInput(message_format="The image input should not be empty.", target=ErrorTarget.EXECUTOR) - return _create_image_from_string(value) - else: - raise InvalidImageInput( - message_format=f"Unsupported image input type: {type(value)}. " - "The image inputs should be a string or a dictionary.", - target=ErrorTarget.EXECUTOR, - ) - - -def _save_image_to_file( - image: Image, file_name: str, folder_path: Path, relative_path: Path = None, use_absolute_path=False -): - ext = _get_extension_from_mime_type(image._mime_type) - file_name = f"{file_name}.{ext}" if ext else file_name - image_path = (relative_path / file_name).as_posix() if relative_path else file_name - if use_absolute_path: - image_path = Path(folder_path / image_path).resolve().as_posix() - image_reference = {f"data:{image._mime_type};path": image_path} - path = folder_path / relative_path if relative_path else folder_path - os.makedirs(path, exist_ok=True) - with open(os.path.join(path, file_name), "wb") as file: - file.write(image) - return image_reference - - -def get_file_reference_encoder(folder_path: Path, relative_path: Path = None, *, use_absolute_path=False) -> Callable: - def pfbytes_file_reference_encoder(obj): - """Dumps PFBytes to a file and returns its reference.""" - if obj.source_url: - return {f"data:{obj._mime_type};url": obj.source_url} - if isinstance(obj, PFBytes): - file_name = str(uuid.uuid4()) - # If use_absolute_path is True, the image file path in image dictionary will be absolute path. - return _save_image_to_file(obj, file_name, folder_path, relative_path, use_absolute_path) - raise TypeError(f"Not supported to dump type '{type(obj).__name__}'.") - - return pfbytes_file_reference_encoder - - -def persist_multimedia_data(value: Any, base_dir: Path, sub_dir: Path = None): - pfbytes_file_reference_encoder = get_file_reference_encoder(base_dir, sub_dir) - serialization_funcs = {Image: partial(Image.serialize, **{"encoder": pfbytes_file_reference_encoder})} - return _process_recursively(value, process_funcs=serialization_funcs) - - -def convert_multimedia_data_to_base64(value: Any, with_type=False, dict_type=False): - to_base64_funcs = {PFBytes: partial(PFBytes.to_base64, **{"with_type": with_type, "dict_type": dict_type})} - return _process_recursively(value, process_funcs=to_base64_funcs) - - -# TODO: Move this function to a more general place and integrate serialization to this function. -def _process_recursively(value: Any, process_funcs: Dict[type, Callable] = None, inplace: bool = False) -> dict: - if process_funcs: - for cls, f in process_funcs.items(): - if isinstance(value, cls): - return f(value) - if isinstance(value, list): - if inplace: - for i in range(len(value)): - value[i] = _process_recursively(value[i], process_funcs, inplace) - else: - return [_process_recursively(v, process_funcs, inplace) for v in value] - elif isinstance(value, dict): - if inplace: - for k, v in value.items(): - value[k] = _process_recursively(v, process_funcs, inplace) - else: - return {k: _process_recursively(v, process_funcs, inplace) for k, v in value.items()} - return value - - -def load_multimedia_data(inputs: Dict[str, FlowInputDefinition], line_inputs: dict): - updated_inputs = dict(line_inputs or {}) - for key, value in inputs.items(): - try: - if value.type == ValueType.IMAGE: - if isinstance(updated_inputs[key], list): - # For aggregation node, the image input is a list. - updated_inputs[key] = [create_image(item) for item in updated_inputs[key]] - else: - updated_inputs[key] = create_image(updated_inputs[key]) - elif value.type == ValueType.LIST or value.type == ValueType.OBJECT: - updated_inputs[key] = load_multimedia_data_recursively(updated_inputs[key]) - except Exception as ex: - error_type_and_message = f"({ex.__class__.__name__}) {ex}" - raise LoadMultimediaDataError( - message_format="Failed to load image for input '{key}': {error_type_and_message}", - key=key, - error_type_and_message=error_type_and_message, - target=ErrorTarget.EXECUTOR, - ) from ex - return updated_inputs - - -def load_multimedia_data_recursively(value: Any): - return _process_multimedia_dict_recursively(value, _create_image_from_dict) - - -def resolve_multimedia_data_recursively(input_dir: Path, value: Any): - process_func = partial(resolve_image_path, **{"input_dir": input_dir}) - return _process_multimedia_dict_recursively(value, process_func) - - -def _process_multimedia_dict_recursively(value: Any, process_func: Callable) -> dict: - if isinstance(value, list): - return [_process_multimedia_dict_recursively(item, process_func) for item in value] - elif isinstance(value, dict): - if is_multimedia_dict(value): - return process_func(**{"image_dict": value}) - else: - return {k: _process_multimedia_dict_recursively(v, process_func) for k, v in value.items()} - else: - return value - - -def resolve_image_path(input_dir: Path, image_dict: dict): - """Resolve image path to absolute path in image dict""" - - input_dir = input_dir.parent if input_dir.is_file() else input_dir - if is_multimedia_dict(image_dict): - for key in image_dict: - _, resource = _get_multimedia_info(key) - if resource == "path": - image_dict[key] = str(input_dir / image_dict[key]) - return image_dict diff --git a/src/promptflow/promptflow/_utils/process_utils.py b/src/promptflow/promptflow/_utils/process_utils.py deleted file mode 100644 index 6b181def423..00000000000 --- a/src/promptflow/promptflow/_utils/process_utils.py +++ /dev/null @@ -1,24 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -import signal - - -def block_terminate_signal_to_parent(): - # In uvicorn app, the main process listens for requests and handles graceful shutdowns through - # signal listeners set up at initialization. These listeners use a file descriptor for event notifications. - - # However, when a child process is forked within the application, it inherits this file descriptor, - # leading to an issue where signals sent to terminate the child process are also intercepted by the main process, - # causing an unintended shutdown of the entire application. - - # To avoid this, we should return the default behavior of signal handlers for child process and call - # signal.set_wakeup_fd(-1) in the child process to prevent it from using the parent's file descriptor - # and avoiding unintended shutdowns of the main process. - - # References: https://github.com/tiangolo/fastapi/discussions/7442 - signal.set_wakeup_fd(-1) - - signal.signal(signal.SIGTERM, signal.SIG_DFL) - signal.signal(signal.SIGINT, signal.SIG_DFL) diff --git a/src/promptflow/promptflow/azure/_restclient/swagger.json b/src/promptflow/promptflow/azure/_restclient/swagger.json deleted file mode 100644 index 25ad2944275..00000000000 --- a/src/promptflow/promptflow/azure/_restclient/swagger.json +++ /dev/null @@ -1,31637 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "Azure Machine Learning Designer Service Client", - "version": "1.0.0" - }, - "paths": { - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/submit": { - "post": { - "tags": [ - "BulkRuns" - ], - "operationId": "BulkRuns_SubmitBulkRun", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitBulkRunRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "204": { - "description": "No Content", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/resume": { - "post": { - "tags": [ - "BulkRuns" - ], - "operationId": "BulkRuns_ResumeBulkRun", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResumeBulkRunRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/cancel": { - "post": { - "tags": [ - "BulkRuns" - ], - "operationId": "BulkRuns_CancelFlowRun", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}": { - "get": { - "tags": [ - "BulkRuns" - ], - "operationId": "BulkRuns_GetFlowRunInfo", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRunInfo" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/childRuns": { - "get": { - "tags": [ - "BulkRuns" - ], - "operationId": "BulkRuns_GetFlowChildRuns", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "index", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "startIndex", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "endIndex", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/nodeRuns/{nodeName}": { - "get": { - "tags": [ - "BulkRuns" - ], - "operationId": "BulkRuns_GetFlowNodeRuns", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "nodeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "index", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "startIndex", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "endIndex", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "aggregation", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/nodeRuns/{nodeName}/basePath": { - "get": { - "tags": [ - "BulkRuns" - ], - "operationId": "BulkRuns_GetFlowNodeRunBasePath", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "nodeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRunBasePath" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/BulkRuns/{flowRunId}/logContent": { - "get": { - "tags": [ - "BulkRuns" - ], - "operationId": "BulkRuns_GetFlowRunLogContent", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connection/{connectionName}": { - "post": { - "tags": [ - "Connection" - ], - "operationId": "Connection_CreateConnection", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrUpdateConnectionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionEntity" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "Connection" - ], - "operationId": "Connection_UpdateConnection", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrUpdateConnectionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionEntity" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "get": { - "tags": [ - "Connection" - ], - "operationId": "Connection_GetConnection", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionEntity" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Connection" - ], - "operationId": "Connection_DeleteConnection", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "connectionScope", - "in": "query", - "schema": { - "$ref": "#/components/schemas/ConnectionScope" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionEntity" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connection": { - "get": { - "tags": [ - "Connection" - ], - "operationId": "Connection_ListConnections", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionEntity" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connection/specs": { - "get": { - "tags": [ - "Connection" - ], - "operationId": "Connection_ListConnectionSpecs", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionSpec" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections/{connectionName}": { - "post": { - "tags": [ - "Connections" - ], - "operationId": "Connections_CreateConnection", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrUpdateConnectionRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "Connections" - ], - "operationId": "Connections_UpdateConnection", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrUpdateConnectionRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "get": { - "tags": [ - "Connections" - ], - "operationId": "Connections_GetConnection", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Connections" - ], - "operationId": "Connections_DeleteConnection", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections/{connectionName}/listsecrets": { - "get": { - "tags": [ - "Connections" - ], - "operationId": "Connections_GetConnectionWithSecrets", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections": { - "get": { - "tags": [ - "Connections" - ], - "operationId": "Connections_ListConnections", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionDto" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections/specs": { - "get": { - "tags": [ - "Connections" - ], - "operationId": "Connections_ListConnectionSpecs", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkspaceConnectionSpec" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Connections/{connectionName}/AzureOpenAIDeployments": { - "get": { - "tags": [ - "Connections" - ], - "operationId": "Connections_ListAzureOpenAIDeployments", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "connectionName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AzureOpenAIDeploymentDto" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/{runtimeName}": { - "post": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_CreateRuntime", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "runtimeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "asyncCall", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "msiToken", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "skipPortCheck", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFlowRuntimeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRuntimeDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_UpdateRuntime", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "runtimeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "asyncCall", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "msiToken", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "skipPortCheck", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateFlowRuntimeRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRuntimeDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "get": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_GetRuntime", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "runtimeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRuntimeDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_DeleteRuntime", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "runtimeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "asyncCall", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "msiToken", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRuntimeDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/checkCiAvailability": { - "get": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_CheckCiAvailability", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "computeInstanceName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "customAppName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AvailabilityResponse" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/checkMirAvailability": { - "get": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_CheckMirAvailability", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "endpointName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "deploymentName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AvailabilityResponse" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/{runtimeName}/needUpgrade": { - "get": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_CheckRuntimeUpgrade", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "runtimeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/{runtimeName}/capability": { - "get": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_GetRuntimeCapability", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "runtimeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRuntimeCapability" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes/latestConfig": { - "get": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_GetRuntimeLatestConfig", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeConfiguration" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowRuntimes": { - "get": { - "tags": [ - "FlowRuntimes" - ], - "operationId": "FlowRuntimes_ListRuntimes", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowRuntimeDto" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/runtimes/latestConfig": { - "get": { - "tags": [ - "FlowRuntimesWorkspaceIndependent" - ], - "operationId": "FlowRuntimesWorkspaceIndependent_GetRuntimeLatestConfig", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuntimeConfiguration" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_CreateFlow", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "experimentId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFlowRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_ListFlows", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "experimentId", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "ownedOnly", - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "flowType", - "in": "query", - "schema": { - "$ref": "#/components/schemas/FlowType" - } - }, - { - "name": "listViewType", - "in": "query", - "schema": { - "$ref": "#/components/schemas/ListViewType" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowBaseDto" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}": { - "put": { - "tags": [ - "Flows" - ], - "operationId": "Flows_UpdateFlow", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateFlowRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "patch": { - "tags": [ - "Flows" - ], - "operationId": "Flows_PatchFlow", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/PatchFlowRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlow", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/submit": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_SubmitFlow", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "endpointName", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubmitFlowRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRunResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/{flowRunId}/status": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowRunStatus", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRunResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowRunInfo", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRunInfo" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}/childRuns": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowChildRuns", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "index", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "startIndex", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "endIndex", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}/nodeRuns/{nodeName}": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowNodeRuns", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "nodeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "index", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "startIndex", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "endIndex", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "aggregation", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}/nodeRuns/{nodeName}/basePath": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowNodeRunBasePath", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "nodeName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowRunBasePath" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/bulkTests": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_ListBulkTests", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BulkTestDto" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/bulkTests/{bulkTestId}": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetBulkTest", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "bulkTestId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkTestDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/DeployReservedEnvironmentVariableNames": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowDeployReservedEnvironmentVariableNames", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/deploy": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_DeployFlow", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "asyncCall", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "msiToken", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeployFlowRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/runs/{flowRunId}/logContent": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowRunLogContent", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/runs/{flowRunId}/cancel": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_CancelFlowRun", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/flowTests/{flowRunId}/cancel": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_CancelFlowTest", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "flowRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/bulkTests/{bulkTestRunId}/cancel": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_CancelBulkTestRun", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "bulkTestRunId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/FlowSnapshot": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowSnapshot", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFlowRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowSnapshot" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/connectionOverride": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetConnectionOverrideSettings", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "runtimeName", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowGraphReference" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionOverrideSetting" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/flowInputs": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowInputs", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowGraphReference" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowInputDefinition" - }, - "description": "This is a dictionary" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/LoadAsComponent": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_LoadAsComponent", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoadFlowAsComponentRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/flowTools": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowTools", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "flowRuntimeName", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowToolsDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/sessions": { - "post": { - "tags": [ - "Flows" - ], - "operationId": "Flows_SetupFlowSession", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SetupFlowSessionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Flows" - ], - "operationId": "Flows_DeleteFlowSession", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/sessions/status": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_GetFlowSessionStatus", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FlowSessionDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Flows/{flowId}/sessions/pipPackages": { - "get": { - "tags": [ - "Flows" - ], - "operationId": "Flows_ListFlowSessionPipPackages", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "experimentId", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowSessions/{sessionId}": { - "post": { - "tags": [ - "FlowSessions" - ], - "operationId": "FlowSessions_CreateFlowSession", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "sessionId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateFlowSessionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "get": { - "tags": [ - "FlowSessions" - ], - "operationId": "FlowSessions_GetFlowSession", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "sessionId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTrainingSessionDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "FlowSessions" - ], - "operationId": "FlowSessions_DeleteFlowSession", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "sessionId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowSessions/{sessionId}/pipPackages": { - "get": { - "tags": [ - "FlowSessions" - ], - "operationId": "FlowSessions_ListFlowSessionPipPackages", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "sessionId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowSessions/{sessionId}/{actionType}/locations/{location}/operations/{operationId}": { - "get": { - "tags": [ - "FlowSessions" - ], - "operationId": "FlowSessions_PollOperationStatus", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "sessionId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "actionType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/SetupFlowSessionAction" - } - }, - { - "name": "location", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "operationId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/FlowSessions/standbypools": { - "get": { - "tags": [ - "FlowSessions" - ], - "operationId": "FlowSessions_GetStandbyPools", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StandbyPoolProperties" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/v1.0/flows/getIndexEntities": { - "post": { - "tags": [ - "FlowsProvider" - ], - "operationId": "FlowsProvider_GetIndexEntityById", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnversionedEntityRequestDto" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnversionedEntityResponseDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/v1.0/flows/rebuildIndex": { - "post": { - "tags": [ - "FlowsProvider" - ], - "operationId": "FlowsProvider_GetUpdatedEntityIdsForWorkspace", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnversionedRebuildIndexDto" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnversionedRebuildResponseDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/setting": { - "get": { - "tags": [ - "Tools" - ], - "operationId": "Tools_GetToolSetting", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolSetting" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/meta": { - "post": { - "tags": [ - "Tools" - ], - "operationId": "Tools_GetToolMeta", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "toolName", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "toolType", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "endpointName", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "flowRuntimeName", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "flowId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/meta-v2": { - "post": { - "tags": [ - "Tools" - ], - "operationId": "Tools_GetToolMetaV2", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRuntimeName", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "flowId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GenerateToolMetaRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolMetaDto" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/packageTools": { - "get": { - "tags": [ - "Tools" - ], - "operationId": "Tools_GetPackageTools", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRuntimeName", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "flowId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Tool" - } - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/dynamicList": { - "post": { - "tags": [ - "Tools" - ], - "operationId": "Tools_GetDynamicList", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRuntimeName", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "flowId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetDynamicListRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": {} - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/Tools/RetrieveToolFuncResult": { - "post": { - "tags": [ - "Tools" - ], - "operationId": "Tools_RetrieveToolFuncResult", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "flowRuntimeName", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "flowId", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RetrieveToolFuncResultRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ToolFuncResponse" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/initialize": { - "post": { - "tags": [ - "TraceSessions" - ], - "operationId": "TraceSessions_InitTraceSessionAsync", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "overwrite", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TraceCosmosResourceDtos" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/cleanup": { - "post": { - "tags": [ - "TraceSessions" - ], - "operationId": "TraceSessions_CleanupTraceSessionAsync", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "202": { - "description": "Accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/operation/{operationType}/{operationId}": { - "get": { - "tags": [ - "TraceSessions" - ], - "operationId": "TraceSessions_PollTraceSessionStatus", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "operationId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "operationType", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/attachDb": { - "post": { - "tags": [ - "TraceSessions" - ], - "operationId": "TraceSessions_AttachCosmosAccount", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "overwrite", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AttachCosmosRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IActionResult" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - }, - "/flow/api/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/TraceSessions/container/{containerName}/resourceToken": { - "get": { - "tags": [ - "TraceSessions" - ], - "operationId": "TraceSessions_GetCosmosResourceToken", - "parameters": [ - { - "$ref": "#/components/parameters/subscriptionIdParameter" - }, - { - "$ref": "#/components/parameters/resourceGroupNameParameter" - }, - { - "$ref": "#/components/parameters/workspaceNameParameter" - }, - { - "name": "containerName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "acquireWrite", - "in": "query", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "ACIAdvanceSettings": { - "type": "object", - "properties": { - "containerResourceRequirements": { - "$ref": "#/components/schemas/ContainerResourceRequirements" - }, - "appInsightsEnabled": { - "type": "boolean", - "nullable": true - }, - "sslEnabled": { - "type": "boolean", - "nullable": true - }, - "sslCertificate": { - "type": "string", - "nullable": true - }, - "sslKey": { - "type": "string", - "nullable": true - }, - "cName": { - "type": "string", - "nullable": true - }, - "dnsNameLabel": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AEVAAssetType": { - "enum": [ - "UriFile", - "UriFolder", - "MLTable", - "CustomModel", - "MLFlowModel", - "TritonModel", - "OpenAIModel" - ], - "type": "string" - }, - "AEVAComputeConfiguration": { - "type": "object", - "properties": { - "target": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "isLocal": { - "type": "boolean" - }, - "location": { - "type": "string", - "nullable": true - }, - "isClusterless": { - "type": "boolean" - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "isPreemptable": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AEVADataStoreMode": { - "enum": [ - "None", - "Mount", - "Download", - "Upload", - "Direct", - "Hdfs", - "Link" - ], - "type": "string" - }, - "AEVAIdentityType": { - "enum": [ - "UserIdentity", - "Managed", - "AMLToken" - ], - "type": "string" - }, - "AEVAResourceConfiguration": { - "type": "object", - "properties": { - "instanceCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "locations": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "instancePriority": { - "type": "string", - "nullable": true - }, - "quotaEnforcementResourceId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AISuperComputerConfiguration": { - "type": "object", - "properties": { - "instanceType": { - "type": "string", - "nullable": true - }, - "instanceTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "imageVersion": { - "type": "string", - "nullable": true - }, - "location": { - "type": "string", - "nullable": true - }, - "locations": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "aiSuperComputerStorageData": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AISuperComputerStorageReferenceConfiguration" - }, - "nullable": true - }, - "interactive": { - "type": "boolean" - }, - "scalePolicy": { - "$ref": "#/components/schemas/AISuperComputerScalePolicy" - }, - "virtualClusterArmId": { - "type": "string", - "nullable": true - }, - "tensorboardLogDirectory": { - "type": "string", - "nullable": true - }, - "sshPublicKey": { - "type": "string", - "nullable": true - }, - "sshPublicKeys": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "enableAzmlInt": { - "type": "boolean" - }, - "priority": { - "type": "string", - "nullable": true - }, - "slaTier": { - "type": "string", - "nullable": true - }, - "suspendOnIdleTimeHours": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "userAlias": { - "type": "string", - "nullable": true - }, - "quotaEnforcementResourceId": { - "type": "string", - "nullable": true - }, - "modelComputeSpecificationId": { - "type": "string", - "nullable": true - }, - "groupPolicyName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AISuperComputerScalePolicy": { - "type": "object", - "properties": { - "autoScaleInstanceTypeCountSet": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "autoScaleIntervalInSec": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxInstanceTypeCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "minInstanceTypeCount": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AISuperComputerStorageReferenceConfiguration": { - "type": "object", - "properties": { - "containerName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AKSAdvanceSettings": { - "type": "object", - "properties": { - "autoScaler": { - "$ref": "#/components/schemas/AutoScaler" - }, - "containerResourceRequirements": { - "$ref": "#/components/schemas/ContainerResourceRequirements" - }, - "appInsightsEnabled": { - "type": "boolean", - "nullable": true - }, - "scoringTimeoutMs": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "numReplicas": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AKSReplicaStatus": { - "type": "object", - "properties": { - "desiredReplicas": { - "type": "integer", - "format": "int32" - }, - "updatedReplicas": { - "type": "integer", - "format": "int32" - }, - "availableReplicas": { - "type": "integer", - "format": "int32" - }, - "error": { - "$ref": "#/components/schemas/ModelManagementErrorResponse" - } - }, - "additionalProperties": false - }, - "AMLComputeConfiguration": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "vmPriority": { - "$ref": "#/components/schemas/VmPriority" - }, - "retainCluster": { - "type": "boolean" - }, - "clusterMaxNodeCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "osType": { - "type": "string", - "nullable": true - }, - "virtualMachineImage": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "APCloudConfiguration": { - "type": "object", - "properties": { - "referencedAPModuleGuid": { - "type": "string", - "nullable": true - }, - "userAlias": { - "type": "string", - "nullable": true - }, - "aetherModuleType": { - "type": "string", - "nullable": true - }, - "allowOverwrite": { - "type": "boolean", - "nullable": true - }, - "destinationExpirationDays": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "shouldRespectLineBoundaries": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "ActionType": { - "enum": [ - "SendValidationRequest", - "GetValidationStatus", - "SubmitBulkRun", - "LogRunResult", - "LogRunTerminatedEvent", - "SubmitFlowRun" - ], - "type": "string" - }, - "Activate": { - "type": "object", - "properties": { - "when": { - "type": "string", - "nullable": true - }, - "is": { - "nullable": true - } - }, - "additionalProperties": false - }, - "AdditionalErrorInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "info": { - "nullable": true - } - }, - "additionalProperties": false - }, - "AdhocTriggerScheduledCommandJobRequest": { - "type": "object", - "properties": { - "jobName": { - "type": "string", - "nullable": true - }, - "jobDisplayName": { - "type": "string", - "nullable": true - }, - "triggerTimeString": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AdhocTriggerScheduledSparkJobRequest": { - "type": "object", - "properties": { - "jobName": { - "type": "string", - "nullable": true - }, - "jobDisplayName": { - "type": "string", - "nullable": true - }, - "triggerTimeString": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAPCloudConfiguration": { - "type": "object", - "properties": { - "referencedAPModuleGuid": { - "type": "string", - "nullable": true - }, - "userAlias": { - "type": "string", - "nullable": true - }, - "aetherModuleType": { - "type": "string", - "nullable": true - }, - "allowOverwrite": { - "type": "boolean", - "nullable": true - }, - "destinationExpirationDays": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "shouldRespectLineBoundaries": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAmlDataset": { - "type": "object", - "properties": { - "registeredDataSetReference": { - "$ref": "#/components/schemas/AetherRegisteredDataSetReference" - }, - "savedDataSetReference": { - "$ref": "#/components/schemas/AetherSavedDataSetReference" - }, - "additionalTransformations": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAmlSparkCloudSetting": { - "type": "object", - "properties": { - "entry": { - "$ref": "#/components/schemas/AetherEntrySetting" - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "archives": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "jars": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "pyFiles": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "driverMemory": { - "type": "string", - "nullable": true - }, - "driverCores": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "executorMemory": { - "type": "string", - "nullable": true - }, - "executorCores": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "numberExecutors": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "environmentAssetId": { - "type": "string", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "inlineEnvironmentDefinitionString": { - "type": "string", - "nullable": true - }, - "conf": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "compute": { - "type": "string", - "nullable": true - }, - "resources": { - "$ref": "#/components/schemas/AetherResourcesSetting" - }, - "identity": { - "$ref": "#/components/schemas/AetherIdentitySetting" - } - }, - "additionalProperties": false - }, - "AetherArgumentAssignment": { - "type": "object", - "properties": { - "valueType": { - "$ref": "#/components/schemas/AetherArgumentValueType" - }, - "value": { - "type": "string", - "nullable": true - }, - "nestedArgumentList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherArgumentAssignment" - }, - "nullable": true - }, - "stringInterpolationArgumentList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherArgumentAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherArgumentValueType": { - "enum": [ - "Literal", - "Parameter", - "Input", - "Output", - "NestedList", - "StringInterpolationList" - ], - "type": "string" - }, - "AetherAssetDefinition": { - "type": "object", - "properties": { - "path": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/AetherAssetType" - }, - "assetId": { - "type": "string", - "nullable": true - }, - "initialAssetId": { - "type": "string", - "nullable": true - }, - "serializedAssetId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAssetOutputSettings": { - "type": "object", - "properties": { - "path": { - "type": "string", - "nullable": true - }, - "PathParameterAssignment": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "type": { - "$ref": "#/components/schemas/AetherAssetType" - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AetherDataStoreMode" - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAssetType": { - "enum": [ - "UriFile", - "UriFolder", - "MLTable", - "CustomModel", - "MLFlowModel", - "TritonModel", - "OpenAIModel" - ], - "type": "string" - }, - "AetherAutoFeaturizeConfiguration": { - "type": "object", - "properties": { - "featurizationConfig": { - "$ref": "#/components/schemas/AetherFeaturizationSettings" - } - }, - "additionalProperties": false - }, - "AetherAutoMLComponentConfiguration": { - "type": "object", - "properties": { - "autoTrainConfig": { - "$ref": "#/components/schemas/AetherAutoTrainConfiguration" - }, - "autoFeaturizeConfig": { - "$ref": "#/components/schemas/AetherAutoFeaturizeConfiguration" - } - }, - "additionalProperties": false - }, - "AetherAutoTrainConfiguration": { - "type": "object", - "properties": { - "generalSettings": { - "$ref": "#/components/schemas/AetherGeneralSettings" - }, - "limitSettings": { - "$ref": "#/components/schemas/AetherLimitSettings" - }, - "dataSettings": { - "$ref": "#/components/schemas/AetherDataSettings" - }, - "forecastingSettings": { - "$ref": "#/components/schemas/AetherForecastingSettings" - }, - "trainingSettings": { - "$ref": "#/components/schemas/AetherTrainingSettings" - }, - "sweepSettings": { - "$ref": "#/components/schemas/AetherSweepSettings" - }, - "imageModelSettings": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "computeConfiguration": { - "$ref": "#/components/schemas/AetherComputeConfiguration" - }, - "resourceConfigurtion": { - "$ref": "#/components/schemas/AetherResourceConfiguration" - }, - "environmentId": { - "type": "string", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAzureBlobReference": { - "type": "object", - "properties": { - "container": { - "type": "string", - "nullable": true - }, - "sasToken": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "account": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "pathType": { - "$ref": "#/components/schemas/AetherFileBasedPathType" - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAzureDataLakeGen2Reference": { - "type": "object", - "properties": { - "fileSystemName": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "account": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "pathType": { - "$ref": "#/components/schemas/AetherFileBasedPathType" - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAzureDataLakeReference": { - "type": "object", - "properties": { - "tenant": { - "type": "string", - "nullable": true - }, - "subscription": { - "type": "string", - "nullable": true - }, - "resourceGroup": { - "type": "string", - "nullable": true - }, - "dataLakeUri": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "account": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "pathType": { - "$ref": "#/components/schemas/AetherFileBasedPathType" - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAzureDatabaseReference": { - "type": "object", - "properties": { - "serverUri": { - "type": "string", - "nullable": true - }, - "databaseName": { - "type": "string", - "nullable": true - }, - "tableName": { - "type": "string", - "nullable": true - }, - "sqlQuery": { - "type": "string", - "nullable": true - }, - "storedProcedureName": { - "type": "string", - "nullable": true - }, - "storedProcedureParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherStoredProcedureParameter" - }, - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherAzureFilesReference": { - "type": "object", - "properties": { - "share": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "account": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "pathType": { - "$ref": "#/components/schemas/AetherFileBasedPathType" - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherBatchAiComputeInfo": { - "type": "object", - "properties": { - "batchAiSubscriptionId": { - "type": "string", - "nullable": true - }, - "batchAiResourceGroup": { - "type": "string", - "nullable": true - }, - "batchAiWorkspaceName": { - "type": "string", - "nullable": true - }, - "clusterName": { - "type": "string", - "nullable": true - }, - "nativeSharedDirectory": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherBuildArtifactInfo": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AetherBuildSourceType" - }, - "cloudBuildDropPathInfo": { - "$ref": "#/components/schemas/AetherCloudBuildDropPathInfo" - }, - "vsoBuildArtifactInfo": { - "$ref": "#/components/schemas/AetherVsoBuildArtifactInfo" - } - }, - "additionalProperties": false - }, - "AetherBuildSourceType": { - "enum": [ - "CloudBuild", - "Vso", - "VsoGit" - ], - "type": "string" - }, - "AetherCloudBuildDropPathInfo": { - "type": "object", - "properties": { - "buildInfo": { - "$ref": "#/components/schemas/AetherCloudBuildInfo" - }, - "root": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherCloudBuildInfo": { - "type": "object", - "properties": { - "queueInfo": { - "$ref": "#/components/schemas/AetherCloudBuildQueueInfo" - }, - "buildId": { - "type": "string", - "nullable": true - }, - "dropUrl": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherCloudBuildQueueInfo": { - "type": "object", - "properties": { - "buildQueue": { - "type": "string", - "nullable": true - }, - "buildRole": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherCloudPrioritySetting": { - "type": "object", - "properties": { - "scopePriority": { - "$ref": "#/components/schemas/AetherPriorityConfiguration" - }, - "AmlComputePriority": { - "$ref": "#/components/schemas/AetherPriorityConfiguration" - }, - "ItpPriority": { - "$ref": "#/components/schemas/AetherPriorityConfiguration" - }, - "SingularityPriority": { - "$ref": "#/components/schemas/AetherPriorityConfiguration" - } - }, - "additionalProperties": false - }, - "AetherCloudSettings": { - "type": "object", - "properties": { - "linkedSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "nullable": true - }, - "priorityConfig": { - "$ref": "#/components/schemas/AetherPriorityConfiguration" - }, - "hdiRunConfig": { - "$ref": "#/components/schemas/AetherHdiRunConfiguration" - }, - "subGraphConfig": { - "$ref": "#/components/schemas/AetherSubGraphConfiguration" - }, - "autoMLComponentConfig": { - "$ref": "#/components/schemas/AetherAutoMLComponentConfiguration" - }, - "apCloudConfig": { - "$ref": "#/components/schemas/AetherAPCloudConfiguration" - }, - "scopeCloudConfig": { - "$ref": "#/components/schemas/AetherScopeCloudConfiguration" - }, - "esCloudConfig": { - "$ref": "#/components/schemas/AetherEsCloudConfiguration" - }, - "dataTransferCloudConfig": { - "$ref": "#/components/schemas/AetherDataTransferCloudConfiguration" - }, - "amlSparkCloudSetting": { - "$ref": "#/components/schemas/AetherAmlSparkCloudSetting" - }, - "dataTransferV2CloudSetting": { - "$ref": "#/components/schemas/AetherDataTransferV2CloudSetting" - } - }, - "additionalProperties": false - }, - "AetherColumnTransformer": { - "type": "object", - "properties": { - "fields": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "parameters": { - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherComputeConfiguration": { - "type": "object", - "properties": { - "target": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "isLocal": { - "type": "boolean" - }, - "location": { - "type": "string", - "nullable": true - }, - "isClusterless": { - "type": "boolean" - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "isPreemptable": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AetherComputeSetting": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "computeType": { - "$ref": "#/components/schemas/AetherComputeType" - }, - "batchAiComputeInfo": { - "$ref": "#/components/schemas/AetherBatchAiComputeInfo" - }, - "remoteDockerComputeInfo": { - "$ref": "#/components/schemas/AetherRemoteDockerComputeInfo" - }, - "hdiClusterComputeInfo": { - "$ref": "#/components/schemas/AetherHdiClusterComputeInfo" - }, - "mlcComputeInfo": { - "$ref": "#/components/schemas/AetherMlcComputeInfo" - }, - "databricksComputeInfo": { - "$ref": "#/components/schemas/AetherDatabricksComputeInfo" - } - }, - "additionalProperties": false - }, - "AetherComputeType": { - "enum": [ - "BatchAi", - "MLC", - "HdiCluster", - "RemoteDocker", - "Databricks", - "Aisc" - ], - "type": "string" - }, - "AetherControlFlowType": { - "enum": [ - "None", - "DoWhile", - "ParallelFor" - ], - "type": "string" - }, - "AetherControlInput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "defaultValue": { - "$ref": "#/components/schemas/AetherControlInputValue" - } - }, - "additionalProperties": false - }, - "AetherControlInputValue": { - "enum": [ - "None", - "False", - "True", - "Skipped" - ], - "type": "string" - }, - "AetherControlOutput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherControlType": { - "enum": [ - "IfElse" - ], - "type": "string" - }, - "AetherCopyDataTask": { - "type": "object", - "properties": { - "DataCopyMode": { - "$ref": "#/components/schemas/AetherDataCopyMode" - } - }, - "additionalProperties": false - }, - "AetherCosmosReference": { - "type": "object", - "properties": { - "cluster": { - "type": "string", - "nullable": true - }, - "vc": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherCreatedBy": { - "type": "object", - "properties": { - "userObjectId": { - "type": "string", - "nullable": true - }, - "userTenantId": { - "type": "string", - "nullable": true - }, - "userName": { - "type": "string", - "nullable": true - }, - "puid": { - "type": "string", - "nullable": true - }, - "iss": { - "type": "string", - "nullable": true - }, - "idp": { - "type": "string", - "nullable": true - }, - "altsecId": { - "type": "string", - "nullable": true - }, - "sourceIp": { - "type": "string", - "nullable": true - }, - "skipRegistryPrivateLinkCheck": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AetherCustomReference": { - "type": "object", - "properties": { - "amlDataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDBFSReference": { - "type": "object", - "properties": { - "relativePath": { - "type": "string", - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDataCopyMode": { - "enum": [ - "MergeWithOverwrite", - "FailIfConflict" - ], - "type": "string" - }, - "AetherDataLocation": { - "type": "object", - "properties": { - "storageType": { - "$ref": "#/components/schemas/AetherDataLocationStorageType" - }, - "storageId": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "dataReference": { - "$ref": "#/components/schemas/AetherDataReference" - }, - "amlDataset": { - "$ref": "#/components/schemas/AetherAmlDataset" - }, - "assetDefinition": { - "$ref": "#/components/schemas/AetherAssetDefinition" - }, - "isCompliant": { - "type": "boolean" - }, - "reuseCalculationFields": { - "$ref": "#/components/schemas/AetherDataLocationReuseCalculationFields" - } - }, - "additionalProperties": false - }, - "AetherDataLocationReuseCalculationFields": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "dataExperimentId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDataLocationStorageType": { - "enum": [ - "Cosmos", - "AzureBlob", - "Artifact", - "Snapshot", - "SavedAmlDataset", - "Asset" - ], - "type": "string" - }, - "AetherDataPath": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "sqlDataPath": { - "$ref": "#/components/schemas/AetherSqlDataPath" - } - }, - "additionalProperties": false - }, - "AetherDataReference": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AetherDataReferenceType" - }, - "azureBlobReference": { - "$ref": "#/components/schemas/AetherAzureBlobReference" - }, - "azureDataLakeReference": { - "$ref": "#/components/schemas/AetherAzureDataLakeReference" - }, - "azureFilesReference": { - "$ref": "#/components/schemas/AetherAzureFilesReference" - }, - "cosmosReference": { - "$ref": "#/components/schemas/AetherCosmosReference" - }, - "phillyHdfsReference": { - "$ref": "#/components/schemas/AetherPhillyHdfsReference" - }, - "azureSqlDatabaseReference": { - "$ref": "#/components/schemas/AetherAzureDatabaseReference" - }, - "azurePostgresDatabaseReference": { - "$ref": "#/components/schemas/AetherAzureDatabaseReference" - }, - "azureDataLakeGen2Reference": { - "$ref": "#/components/schemas/AetherAzureDataLakeGen2Reference" - }, - "dbfsReference": { - "$ref": "#/components/schemas/AetherDBFSReference" - }, - "azureMySqlDatabaseReference": { - "$ref": "#/components/schemas/AetherAzureDatabaseReference" - }, - "customReference": { - "$ref": "#/components/schemas/AetherCustomReference" - }, - "hdfsReference": { - "$ref": "#/components/schemas/AetherHdfsReference" - } - }, - "additionalProperties": false - }, - "AetherDataReferenceType": { - "enum": [ - "None", - "AzureBlob", - "AzureDataLake", - "AzureFiles", - "Cosmos", - "PhillyHdfs", - "AzureSqlDatabase", - "AzurePostgresDatabase", - "AzureDataLakeGen2", - "DBFS", - "AzureMySqlDatabase", - "Custom", - "Hdfs" - ], - "type": "string" - }, - "AetherDataSetDefinition": { - "type": "object", - "properties": { - "dataTypeShortName": { - "type": "string", - "nullable": true - }, - "parameterName": { - "type": "string", - "nullable": true - }, - "value": { - "$ref": "#/components/schemas/AetherDataSetDefinitionValue" - } - }, - "additionalProperties": false - }, - "AetherDataSetDefinitionValue": { - "type": "object", - "properties": { - "literalValue": { - "$ref": "#/components/schemas/AetherDataPath" - }, - "dataSetReference": { - "$ref": "#/components/schemas/AetherRegisteredDataSetReference" - }, - "savedDataSetReference": { - "$ref": "#/components/schemas/AetherSavedDataSetReference" - }, - "assetDefinition": { - "$ref": "#/components/schemas/AetherAssetDefinition" - } - }, - "additionalProperties": false - }, - "AetherDataSettings": { - "type": "object", - "properties": { - "targetColumnName": { - "type": "string", - "nullable": true - }, - "weightColumnName": { - "type": "string", - "nullable": true - }, - "positiveLabel": { - "type": "string", - "nullable": true - }, - "validationData": { - "$ref": "#/components/schemas/AetherValidationDataSettings" - }, - "testData": { - "$ref": "#/components/schemas/AetherTestDataSettings" - } - }, - "additionalProperties": false - }, - "AetherDataStoreMode": { - "enum": [ - "None", - "Mount", - "Download", - "Upload", - "Direct", - "Hdfs", - "Link" - ], - "type": "string" - }, - "AetherDataTransferCloudConfiguration": { - "type": "object", - "properties": { - "AllowOverwrite": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDataTransferSink": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AetherDataTransferStorageType" - }, - "fileSystem": { - "$ref": "#/components/schemas/AetherFileSystem" - }, - "databaseSink": { - "$ref": "#/components/schemas/AetherDatabaseSink" - } - }, - "additionalProperties": false - }, - "AetherDataTransferSource": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AetherDataTransferStorageType" - }, - "fileSystem": { - "$ref": "#/components/schemas/AetherFileSystem" - }, - "databaseSource": { - "$ref": "#/components/schemas/AetherDatabaseSource" - } - }, - "additionalProperties": false - }, - "AetherDataTransferStorageType": { - "enum": [ - "DataBase", - "FileSystem" - ], - "type": "string" - }, - "AetherDataTransferTaskType": { - "enum": [ - "ImportData", - "ExportData", - "CopyData" - ], - "type": "string" - }, - "AetherDataTransferV2CloudSetting": { - "type": "object", - "properties": { - "taskType": { - "$ref": "#/components/schemas/AetherDataTransferTaskType" - }, - "ComputeName": { - "type": "string", - "nullable": true - }, - "CopyDataTask": { - "$ref": "#/components/schemas/AetherCopyDataTask" - }, - "ImportDataTask": { - "$ref": "#/components/schemas/AetherImportDataTask" - }, - "ExportDataTask": { - "$ref": "#/components/schemas/AetherExportDataTask" - }, - "DataTransferSources": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AetherDataTransferSource" - }, - "description": "This is a dictionary", - "nullable": true - }, - "DataTransferSinks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AetherDataTransferSink" - }, - "description": "This is a dictionary", - "nullable": true - }, - "DataCopyMode": { - "$ref": "#/components/schemas/AetherDataCopyMode" - } - }, - "additionalProperties": false - }, - "AetherDatabaseSink": { - "type": "object", - "properties": { - "connection": { - "type": "string", - "nullable": true - }, - "table": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDatabaseSource": { - "type": "object", - "properties": { - "connection": { - "type": "string", - "nullable": true - }, - "query": { - "type": "string", - "nullable": true - }, - "storedProcedureName": { - "type": "string", - "nullable": true - }, - "storedProcedureParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherStoredProcedureParameter" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDatabricksComputeInfo": { - "type": "object", - "properties": { - "existingClusterId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDatasetOutput": { - "type": "object", - "properties": { - "datasetType": { - "$ref": "#/components/schemas/AetherDatasetType" - }, - "datasetRegistration": { - "$ref": "#/components/schemas/AetherDatasetRegistration" - }, - "datasetOutputOptions": { - "$ref": "#/components/schemas/AetherDatasetOutputOptions" - } - }, - "additionalProperties": false - }, - "AetherDatasetOutputOptions": { - "type": "object", - "properties": { - "sourceGlobs": { - "$ref": "#/components/schemas/AetherGlobsOptions" - }, - "pathOnDatastore": { - "type": "string", - "nullable": true - }, - "PathOnDatastoreParameterAssignment": { - "$ref": "#/components/schemas/AetherParameterAssignment" - } - }, - "additionalProperties": false - }, - "AetherDatasetRegistration": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "createNewVersion": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "additionalTransformations": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDatasetType": { - "enum": [ - "File", - "Tabular" - ], - "type": "string" - }, - "AetherDatastoreSetting": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherDoWhileControlFlowInfo": { - "type": "object", - "properties": { - "outputPortNameToInputPortNamesMapping": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "nullable": true - }, - "conditionOutputPortName": { - "type": "string", - "nullable": true - }, - "runSettings": { - "$ref": "#/components/schemas/AetherDoWhileControlFlowRunSettings" - } - }, - "additionalProperties": false - }, - "AetherDoWhileControlFlowRunSettings": { - "type": "object", - "properties": { - "maxLoopIterationCount": { - "$ref": "#/components/schemas/AetherParameterAssignment" - } - }, - "additionalProperties": false - }, - "AetherDockerSettingConfiguration": { - "type": "object", - "properties": { - "useDocker": { - "type": "boolean", - "nullable": true - }, - "sharedVolumes": { - "type": "boolean", - "nullable": true - }, - "shmSize": { - "type": "string", - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherEarlyTerminationPolicyType": { - "enum": [ - "Bandit", - "MedianStopping", - "TruncationSelection" - ], - "type": "string" - }, - "AetherEntityInterfaceDocumentation": { - "type": "object", - "properties": { - "inputsDocumentation": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "outputsDocumentation": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "parametersDocumentation": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherEntityStatus": { - "enum": [ - "Active", - "Deprecated", - "Disabled" - ], - "type": "string" - }, - "AetherEntrySetting": { - "type": "object", - "properties": { - "file": { - "type": "string", - "nullable": true - }, - "className": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherEnvironmentConfiguration": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "useEnvironmentDefinition": { - "type": "boolean" - }, - "environmentDefinitionString": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherEsCloudConfiguration": { - "type": "object", - "properties": { - "enableOutputToFileBasedOnDataTypeId": { - "type": "boolean", - "nullable": true - }, - "amlComputePriorityInternal": { - "$ref": "#/components/schemas/AetherPriorityConfiguration" - }, - "itpPriorityInternal": { - "$ref": "#/components/schemas/AetherPriorityConfiguration" - }, - "singularityPriorityInternal": { - "$ref": "#/components/schemas/AetherPriorityConfiguration" - }, - "environment": { - "$ref": "#/components/schemas/AetherEnvironmentConfiguration" - }, - "hyperDriveConfiguration": { - "$ref": "#/components/schemas/AetherHyperDriveConfiguration" - }, - "k8sConfig": { - "$ref": "#/components/schemas/AetherK8sConfiguration" - }, - "resourceConfig": { - "$ref": "#/components/schemas/AetherResourceConfiguration" - }, - "torchDistributedConfig": { - "$ref": "#/components/schemas/AetherTorchDistributedConfiguration" - }, - "targetSelectorConfig": { - "$ref": "#/components/schemas/AetherTargetSelectorConfiguration" - }, - "dockerConfig": { - "$ref": "#/components/schemas/AetherDockerSettingConfiguration" - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "maxRunDurationSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "identity": { - "$ref": "#/components/schemas/AetherIdentitySetting" - }, - "applicationEndpoints": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ApplicationEndpointConfiguration" - }, - "nullable": true - }, - "runConfig": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherExecutionEnvironment": { - "enum": [ - "ExeWorkerMachine", - "DockerContainerWithoutNetwork", - "DockerContainerWithNetwork", - "HyperVWithoutNetwork", - "HyperVWithNetwork" - ], - "type": "string" - }, - "AetherExecutionPhase": { - "enum": [ - "Execution", - "Initialization", - "Finalization" - ], - "type": "string" - }, - "AetherExportDataTask": { - "type": "object", - "properties": { - "DataTransferSink": { - "$ref": "#/components/schemas/AetherDataTransferSink" - } - }, - "additionalProperties": false - }, - "AetherFeaturizationMode": { - "enum": [ - "Auto", - "Custom", - "Off" - ], - "type": "string" - }, - "AetherFeaturizationSettings": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/AetherFeaturizationMode" - }, - "blockedTransformers": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "columnPurposes": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "dropColumns": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "transformerParams": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherColumnTransformer" - }, - "nullable": true - }, - "nullable": true - }, - "datasetLanguage": { - "type": "string", - "nullable": true - }, - "enableDnnFeaturization": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherFileBasedPathType": { - "enum": [ - "Unknown", - "File", - "Folder" - ], - "type": "string" - }, - "AetherFileSystem": { - "type": "object", - "properties": { - "connection": { - "type": "string", - "nullable": true - }, - "path": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherForecastHorizon": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/AetherForecastHorizonMode" - }, - "value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "AetherForecastHorizonMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "AetherForecastingSettings": { - "type": "object", - "properties": { - "countryOrRegionForHolidays": { - "type": "string", - "nullable": true - }, - "timeColumnName": { - "type": "string", - "nullable": true - }, - "targetLags": { - "$ref": "#/components/schemas/AetherTargetLags" - }, - "targetRollingWindowSize": { - "$ref": "#/components/schemas/AetherTargetRollingWindowSize" - }, - "forecastHorizon": { - "$ref": "#/components/schemas/AetherForecastHorizon" - }, - "timeSeriesIdColumnNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "frequency": { - "type": "string", - "nullable": true - }, - "featureLags": { - "type": "string", - "nullable": true - }, - "seasonality": { - "$ref": "#/components/schemas/AetherSeasonality" - }, - "shortSeriesHandlingConfig": { - "$ref": "#/components/schemas/AetherShortSeriesHandlingConfiguration" - }, - "useStl": { - "$ref": "#/components/schemas/AetherUseStl" - }, - "targetAggregateFunction": { - "$ref": "#/components/schemas/AetherTargetAggregationFunction" - }, - "cvStepSize": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "featuresUnknownAtForecastTime": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherGeneralSettings": { - "type": "object", - "properties": { - "primaryMetric": { - "$ref": "#/components/schemas/AetherPrimaryMetrics" - }, - "taskType": { - "$ref": "#/components/schemas/AetherTaskType" - }, - "logVerbosity": { - "$ref": "#/components/schemas/AetherLogVerbosity" - } - }, - "additionalProperties": false - }, - "AetherGlobsOptions": { - "type": "object", - "properties": { - "globPatterns": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherGraphControlNode": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "controlType": { - "$ref": "#/components/schemas/AetherControlType" - }, - "controlParameter": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "runAttribution": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherGraphControlReferenceNode": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "comment": { - "type": "string", - "nullable": true - }, - "controlFlowType": { - "$ref": "#/components/schemas/AetherControlFlowType" - }, - "referenceNodeId": { - "type": "string", - "nullable": true - }, - "doWhileControlFlowInfo": { - "$ref": "#/components/schemas/AetherDoWhileControlFlowInfo" - }, - "parallelForControlFlowInfo": { - "$ref": "#/components/schemas/AetherParallelForControlFlowInfo" - }, - "runAttribution": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherGraphDatasetNode": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "datasetId": { - "type": "string", - "nullable": true - }, - "dataPathParameterName": { - "type": "string", - "nullable": true - }, - "dataSetDefinition": { - "$ref": "#/components/schemas/AetherDataSetDefinition" - } - }, - "additionalProperties": false - }, - "AetherGraphEdge": { - "type": "object", - "properties": { - "sourceOutputPort": { - "$ref": "#/components/schemas/AetherPortInfo" - }, - "destinationInputPort": { - "$ref": "#/components/schemas/AetherPortInfo" - } - }, - "additionalProperties": false - }, - "AetherGraphEntity": { - "type": "object", - "properties": { - "moduleNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherGraphModuleNode" - }, - "nullable": true - }, - "datasetNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherGraphDatasetNode" - }, - "nullable": true - }, - "subGraphNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherGraphReferenceNode" - }, - "nullable": true - }, - "controlReferenceNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherGraphControlReferenceNode" - }, - "nullable": true - }, - "controlNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherGraphControlNode" - }, - "nullable": true - }, - "edges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherGraphEdge" - }, - "nullable": true - }, - "defaultCompute": { - "$ref": "#/components/schemas/AetherComputeSetting" - }, - "defaultDatastore": { - "$ref": "#/components/schemas/AetherDatastoreSetting" - }, - "defaultCloudPriority": { - "$ref": "#/components/schemas/AetherCloudPrioritySetting" - }, - "parentSubGraphModuleIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "workspaceId": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - }, - "entityStatus": { - "$ref": "#/components/schemas/AetherEntityStatus" - } - }, - "additionalProperties": false - }, - "AetherGraphModuleNode": { - "type": "object", - "properties": { - "cloudPriority": { - "type": "integer", - "format": "int32" - }, - "defaultDataRetentionHint": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "complianceCluster": { - "type": "string", - "nullable": true - }, - "euclidWorkspaceId": { - "type": "string", - "nullable": true - }, - "attachedModules": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "acceptableMachineClusters": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "customDataLocationId": { - "type": "string", - "nullable": true - }, - "alertTimeoutDuration": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "runconfig": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "moduleId": { - "type": "string", - "nullable": true - }, - "comment": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "moduleParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "nullable": true - }, - "moduleMetadataParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "nullable": true - }, - "moduleOutputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherOutputSetting" - }, - "nullable": true - }, - "moduleInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherInputSetting" - }, - "nullable": true - }, - "useGraphDefaultCompute": { - "type": "boolean" - }, - "useGraphDefaultDatastore": { - "type": "boolean" - }, - "regenerateOutput": { - "type": "boolean" - }, - "controlInputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherControlInput" - }, - "nullable": true - }, - "cloudSettings": { - "$ref": "#/components/schemas/AetherCloudSettings" - }, - "executionPhase": { - "$ref": "#/components/schemas/AetherExecutionPhase" - }, - "runAttribution": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherGraphReferenceNode": { - "type": "object", - "properties": { - "graphId": { - "type": "string", - "nullable": true - }, - "defaultCompute": { - "$ref": "#/components/schemas/AetherComputeSetting" - }, - "defaultDatastore": { - "$ref": "#/components/schemas/AetherDatastoreSetting" - }, - "id": { - "type": "string", - "nullable": true - }, - "moduleId": { - "type": "string", - "nullable": true - }, - "comment": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "moduleParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "nullable": true - }, - "moduleMetadataParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "nullable": true - }, - "moduleOutputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherOutputSetting" - }, - "nullable": true - }, - "moduleInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherInputSetting" - }, - "nullable": true - }, - "useGraphDefaultCompute": { - "type": "boolean" - }, - "useGraphDefaultDatastore": { - "type": "boolean" - }, - "regenerateOutput": { - "type": "boolean" - }, - "controlInputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherControlInput" - }, - "nullable": true - }, - "cloudSettings": { - "$ref": "#/components/schemas/AetherCloudSettings" - }, - "executionPhase": { - "$ref": "#/components/schemas/AetherExecutionPhase" - }, - "runAttribution": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherHdfsReference": { - "type": "object", - "properties": { - "amlDataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherHdiClusterComputeInfo": { - "type": "object", - "properties": { - "address": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "privateKey": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherHdiRunConfiguration": { - "type": "object", - "properties": { - "file": { - "type": "string", - "nullable": true - }, - "className": { - "type": "string", - "nullable": true - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "archives": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "jars": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "pyFiles": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "computeName": { - "type": "string", - "nullable": true - }, - "queue": { - "type": "string", - "nullable": true - }, - "driverMemory": { - "type": "string", - "nullable": true - }, - "driverCores": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "executorMemory": { - "type": "string", - "nullable": true - }, - "executorCores": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "numberExecutors": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "conf": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherHyperDriveConfiguration": { - "type": "object", - "properties": { - "hyperDriveRunConfig": { - "type": "string", - "nullable": true - }, - "primaryMetricGoal": { - "type": "string", - "nullable": true - }, - "primaryMetricName": { - "type": "string", - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherArgumentAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherIdentitySetting": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AetherIdentityType" - }, - "clientId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "objectId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "msiResourceId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherIdentityType": { - "enum": [ - "UserIdentity", - "Managed", - "AMLToken" - ], - "type": "string" - }, - "AetherImportDataTask": { - "type": "object", - "properties": { - "DataTransferSource": { - "$ref": "#/components/schemas/AetherDataTransferSource" - } - }, - "additionalProperties": false - }, - "AetherInputSetting": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AetherDataStoreMode" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "additionalTransformations": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherInteractiveConfig": { - "type": "object", - "properties": { - "isSSHEnabled": { - "type": "boolean", - "nullable": true - }, - "sshPublicKey": { - "type": "string", - "nullable": true - }, - "isIPythonEnabled": { - "type": "boolean", - "nullable": true - }, - "isTensorBoardEnabled": { - "type": "boolean", - "nullable": true - }, - "interactivePort": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherK8sConfiguration": { - "type": "object", - "properties": { - "maxRetryCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resourceConfiguration": { - "$ref": "#/components/schemas/AetherResourceConfig" - }, - "priorityConfiguration": { - "$ref": "#/components/schemas/AetherPriorityConfig" - }, - "interactiveConfiguration": { - "$ref": "#/components/schemas/AetherInteractiveConfig" - } - }, - "additionalProperties": false - }, - "AetherLegacyDataPath": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AetherDataStoreMode" - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherLimitSettings": { - "type": "object", - "properties": { - "maxTrials": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timeout": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "trialTimeout": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "maxConcurrentTrials": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxCoresPerTrial": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exitScore": { - "type": "number", - "format": "double", - "nullable": true - }, - "enableEarlyTermination": { - "type": "boolean", - "nullable": true - }, - "maxNodes": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherLogVerbosity": { - "enum": [ - "NotSet", - "Debug", - "Info", - "Warning", - "Error", - "Critical" - ], - "type": "string" - }, - "AetherMlcComputeInfo": { - "type": "object", - "properties": { - "mlcComputeType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherModuleDeploymentSource": { - "enum": [ - "Client", - "AutoDeployment", - "Vsts" - ], - "type": "string" - }, - "AetherModuleEntity": { - "type": "object", - "properties": { - "lastUpdatedBy": { - "$ref": "#/components/schemas/AetherCreatedBy" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "moduleExecutionType": { - "type": "string", - "nullable": true - }, - "moduleType": { - "$ref": "#/components/schemas/AetherModuleType" - }, - "moduleTypeVersion": { - "type": "string", - "nullable": true - }, - "resourceRequirements": { - "$ref": "#/components/schemas/AetherResourceModel" - }, - "machineCluster": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "defaultComplianceCluster": { - "type": "string", - "nullable": true - }, - "repositoryType": { - "$ref": "#/components/schemas/AetherRepositoryType" - }, - "relativePathToSourceCode": { - "type": "string", - "nullable": true - }, - "commitId": { - "type": "string", - "nullable": true - }, - "codeReviewLink": { - "type": "string", - "nullable": true - }, - "unitTestsAvailable": { - "type": "boolean" - }, - "isCompressed": { - "type": "boolean" - }, - "executionEnvironment": { - "$ref": "#/components/schemas/AetherExecutionEnvironment" - }, - "isOutputMarkupEnabled": { - "type": "boolean" - }, - "dockerImageId": { - "type": "string", - "nullable": true - }, - "dockerImageReference": { - "type": "string", - "nullable": true - }, - "dockerImageSecurityGroups": { - "type": "string", - "nullable": true - }, - "extendedProperties": { - "$ref": "#/components/schemas/AetherModuleExtendedProperties" - }, - "deploymentSource": { - "$ref": "#/components/schemas/AetherModuleDeploymentSource" - }, - "deploymentSourceMetadata": { - "type": "string", - "nullable": true - }, - "identifierHash": { - "type": "string", - "nullable": true - }, - "identifierHashV2": { - "type": "string", - "nullable": true - }, - "kvTags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "createdBy": { - "$ref": "#/components/schemas/AetherCreatedBy" - }, - "runconfig": { - "type": "string", - "nullable": true - }, - "cloudSettings": { - "$ref": "#/components/schemas/AetherCloudSettings" - }, - "category": { - "type": "string", - "nullable": true - }, - "stepType": { - "type": "string", - "nullable": true - }, - "stage": { - "type": "string", - "nullable": true - }, - "uploadState": { - "$ref": "#/components/schemas/AetherUploadState" - }, - "sourceCodeLocation": { - "type": "string", - "nullable": true - }, - "sizeInBytes": { - "type": "integer", - "format": "int64" - }, - "downloadLocation": { - "type": "string", - "nullable": true - }, - "dataLocation": { - "$ref": "#/components/schemas/AetherDataLocation" - }, - "scriptingRuntimeId": { - "type": "string", - "nullable": true - }, - "interfaceDocumentation": { - "$ref": "#/components/schemas/AetherEntityInterfaceDocumentation" - }, - "isEyesOn": { - "type": "boolean" - }, - "complianceCluster": { - "type": "string", - "nullable": true - }, - "isDeterministic": { - "type": "boolean" - }, - "informationUrl": { - "type": "string", - "nullable": true - }, - "isExperimentIdInParameters": { - "type": "boolean" - }, - "interfaceString": { - "type": "string", - "nullable": true - }, - "defaultParameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "structuredInterface": { - "$ref": "#/components/schemas/AetherStructuredInterface" - }, - "familyId": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "sequenceNumberInFamily": { - "type": "integer", - "format": "int32" - }, - "owner": { - "type": "string", - "nullable": true - }, - "azureTenantId": { - "type": "string", - "nullable": true - }, - "azureUserId": { - "type": "string", - "nullable": true - }, - "collaborators": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "workspaceId": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - }, - "entityStatus": { - "$ref": "#/components/schemas/AetherEntityStatus" - } - }, - "additionalProperties": false - }, - "AetherModuleExtendedProperties": { - "type": "object", - "properties": { - "autoDeployedArtifact": { - "$ref": "#/components/schemas/AetherBuildArtifactInfo" - }, - "scriptNeedsApproval": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AetherModuleHashVersion": { - "enum": [ - "IdentifierHash", - "IdentifierHashV2" - ], - "type": "string" - }, - "AetherModuleType": { - "enum": [ - "None", - "BatchInferencing" - ], - "type": "string" - }, - "AetherNCrossValidationMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "AetherNCrossValidations": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/AetherNCrossValidationMode" - }, - "value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "AetherOutputSetting": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "DataStoreNameParameterAssignment": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AetherDataStoreMode" - }, - "DataStoreModeParameterAssignment": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "PathOnComputeParameterAssignment": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "overwrite": { - "type": "boolean" - }, - "dataReferenceName": { - "type": "string", - "nullable": true - }, - "webServicePort": { - "type": "string", - "nullable": true - }, - "datasetRegistration": { - "$ref": "#/components/schemas/AetherDatasetRegistration" - }, - "datasetOutputOptions": { - "$ref": "#/components/schemas/AetherDatasetOutputOptions" - }, - "AssetOutputSettings": { - "$ref": "#/components/schemas/AetherAssetOutputSettings" - }, - "parameterName": { - "type": "string", - "nullable": true - }, - "AssetOutputSettingsParameterName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherParallelForControlFlowInfo": { - "type": "object", - "properties": { - "parallelForItemsInput": { - "$ref": "#/components/schemas/AetherParameterAssignment" - } - }, - "additionalProperties": false - }, - "AetherParameterAssignment": { - "type": "object", - "properties": { - "valueType": { - "$ref": "#/components/schemas/AetherParameterValueType" - }, - "assignmentsToConcatenate": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherParameterAssignment" - }, - "nullable": true - }, - "dataPathAssignment": { - "$ref": "#/components/schemas/AetherLegacyDataPath" - }, - "dataSetDefinitionValueAssignment": { - "$ref": "#/components/schemas/AetherDataSetDefinitionValue" - }, - "name": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherParameterType": { - "enum": [ - "Int", - "Double", - "Bool", - "String", - "Undefined" - ], - "type": "string" - }, - "AetherParameterValueType": { - "enum": [ - "Literal", - "GraphParameterName", - "Concatenate", - "Input", - "DataPath", - "DataSetDefinition" - ], - "type": "string" - }, - "AetherPhillyHdfsReference": { - "type": "object", - "properties": { - "cluster": { - "type": "string", - "nullable": true - }, - "vc": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherPortInfo": { - "type": "object", - "properties": { - "nodeId": { - "type": "string", - "nullable": true - }, - "portName": { - "type": "string", - "nullable": true - }, - "graphPortName": { - "type": "string", - "nullable": true - }, - "isParameter": { - "type": "boolean" - }, - "webServicePort": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherPrimaryMetrics": { - "enum": [ - "AUCWeighted", - "Accuracy", - "NormMacroRecall", - "AveragePrecisionScoreWeighted", - "PrecisionScoreWeighted", - "SpearmanCorrelation", - "NormalizedRootMeanSquaredError", - "R2Score", - "NormalizedMeanAbsoluteError", - "NormalizedRootMeanSquaredLogError", - "MeanAveragePrecision", - "Iou" - ], - "type": "string" - }, - "AetherPriorityConfig": { - "type": "object", - "properties": { - "jobPriority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "isPreemptible": { - "type": "boolean", - "nullable": true - }, - "nodeCountSet": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "scaleInterval": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherPriorityConfiguration": { - "type": "object", - "properties": { - "cloudPriority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "stringTypePriority": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherRegisteredDataSetReference": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherRemoteDockerComputeInfo": { - "type": "object", - "properties": { - "address": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "privateKey": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherRepositoryType": { - "enum": [ - "None", - "Other", - "Git", - "SourceDepot", - "Cosmos" - ], - "type": "string" - }, - "AetherResourceAssignment": { - "type": "object", - "properties": { - "attributes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AetherResourceAttributeAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherResourceAttributeAssignment": { - "type": "object", - "properties": { - "attribute": { - "$ref": "#/components/schemas/AetherResourceAttributeDefinition" - }, - "operator": { - "$ref": "#/components/schemas/AetherResourceOperator" - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherResourceAttributeDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/AetherResourceValueType" - }, - "units": { - "type": "string", - "nullable": true - }, - "allowedOperators": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherResourceOperator" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherResourceConfig": { - "type": "object", - "properties": { - "gpuCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "cpuCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "memoryRequestInGB": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherResourceConfiguration": { - "type": "object", - "properties": { - "instanceCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "locations": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "instancePriority": { - "type": "string", - "nullable": true - }, - "quotaEnforcementResourceId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherResourceModel": { - "type": "object", - "properties": { - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherResourceAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherResourceOperator": { - "enum": [ - "Equal", - "Contain", - "GreaterOrEqual" - ], - "type": "string" - }, - "AetherResourceValueType": { - "enum": [ - "String", - "Double" - ], - "type": "string" - }, - "AetherResourcesSetting": { - "type": "object", - "properties": { - "instanceSize": { - "type": "string", - "nullable": true - }, - "sparkVersion": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherSamplingAlgorithmType": { - "enum": [ - "Random", - "Grid", - "Bayesian" - ], - "type": "string" - }, - "AetherSavedDataSetReference": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherScopeCloudConfiguration": { - "type": "object", - "properties": { - "inputPathSuffixes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AetherArgumentAssignment" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputPathSuffixes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AetherArgumentAssignment" - }, - "description": "This is a dictionary", - "nullable": true - }, - "userAlias": { - "type": "string", - "nullable": true - }, - "tokens": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "autoToken": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "vcp": { - "type": "number", - "format": "float", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherSeasonality": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/AetherSeasonalityMode" - }, - "value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "AetherSeasonalityMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "AetherShortSeriesHandlingConfiguration": { - "enum": [ - "Auto", - "Pad", - "Drop" - ], - "type": "string" - }, - "AetherSqlDataPath": { - "type": "object", - "properties": { - "sqlTableName": { - "type": "string", - "nullable": true - }, - "sqlQuery": { - "type": "string", - "nullable": true - }, - "sqlStoredProcedureName": { - "type": "string", - "nullable": true - }, - "sqlStoredProcedureParams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherStoredProcedureParameter" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherStackEnsembleSettings": { - "type": "object", - "properties": { - "stackMetaLearnerType": { - "$ref": "#/components/schemas/AetherStackMetaLearnerType" - }, - "stackMetaLearnerTrainPercentage": { - "type": "number", - "format": "double", - "nullable": true - }, - "stackMetaLearnerKWargs": { - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherStackMetaLearnerType": { - "enum": [ - "None", - "LogisticRegression", - "LogisticRegressionCV", - "LightGBMClassifier", - "ElasticNet", - "ElasticNetCV", - "LightGBMRegressor", - "LinearRegression" - ], - "type": "string" - }, - "AetherStoredProcedureParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/AetherStoredProcedureParameterType" - } - }, - "additionalProperties": false - }, - "AetherStoredProcedureParameterType": { - "enum": [ - "String", - "Int", - "Decimal", - "Guid", - "Boolean", - "Date" - ], - "type": "string" - }, - "AetherStructuredInterface": { - "type": "object", - "properties": { - "commandLinePattern": { - "type": "string", - "nullable": true - }, - "inputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherStructuredInterfaceInput" - }, - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherStructuredInterfaceOutput" - }, - "nullable": true - }, - "controlOutputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherControlOutput" - }, - "nullable": true - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherStructuredInterfaceParameter" - }, - "nullable": true - }, - "metadataParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherStructuredInterfaceParameter" - }, - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherArgumentAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherStructuredInterfaceInput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "dataTypeIdsList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "isOptional": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - }, - "skipProcessing": { - "type": "boolean" - }, - "isResource": { - "type": "boolean" - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AetherDataStoreMode" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "overwrite": { - "type": "boolean" - }, - "dataReferenceName": { - "type": "string", - "nullable": true - }, - "datasetTypes": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/AetherDatasetType" - }, - "nullable": true - }, - "additionalTransformations": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherStructuredInterfaceOutput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "dataTypeId": { - "type": "string", - "nullable": true - }, - "passThroughDataTypeInputName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "skipProcessing": { - "type": "boolean" - }, - "isArtifact": { - "type": "boolean" - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AetherDataStoreMode" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "overwrite": { - "type": "boolean" - }, - "dataReferenceName": { - "type": "string", - "nullable": true - }, - "trainingOutput": { - "$ref": "#/components/schemas/AetherTrainingOutput" - }, - "datasetOutput": { - "$ref": "#/components/schemas/AetherDatasetOutput" - }, - "AssetOutputSettings": { - "$ref": "#/components/schemas/AetherAssetOutputSettings" - }, - "earlyAvailable": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AetherStructuredInterfaceParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "parameterType": { - "$ref": "#/components/schemas/AetherParameterType" - }, - "isOptional": { - "type": "boolean" - }, - "defaultValue": { - "type": "string", - "nullable": true - }, - "lowerBound": { - "type": "string", - "nullable": true - }, - "upperBound": { - "type": "string", - "nullable": true - }, - "enumValues": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "enumValuesToArgumentStrings": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "setEnvironmentVariable": { - "type": "boolean" - }, - "environmentVariableOverride": { - "type": "string", - "nullable": true - }, - "enabledByParameterName": { - "type": "string", - "nullable": true - }, - "enabledByParameterValues": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "uiHint": { - "$ref": "#/components/schemas/AetherUIParameterHint" - }, - "groupNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "argumentName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherSubGraphConfiguration": { - "type": "object", - "properties": { - "graphId": { - "type": "string", - "nullable": true - }, - "graphDraftId": { - "type": "string", - "nullable": true - }, - "defaultComputeInternal": { - "$ref": "#/components/schemas/AetherComputeSetting" - }, - "defaultDatastoreInternal": { - "$ref": "#/components/schemas/AetherDatastoreSetting" - }, - "DefaultCloudPriority": { - "$ref": "#/components/schemas/AetherCloudPrioritySetting" - }, - "UserAlias": { - "type": "string", - "nullable": true - }, - "IsDynamic": { - "type": "boolean", - "default": false, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherSweepEarlyTerminationPolicy": { - "type": "object", - "properties": { - "policyType": { - "$ref": "#/components/schemas/AetherEarlyTerminationPolicyType" - }, - "evaluationInterval": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "delayEvaluation": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "slackFactor": { - "type": "number", - "format": "float", - "nullable": true - }, - "slackAmount": { - "type": "number", - "format": "float", - "nullable": true - }, - "truncationPercentage": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherSweepSettings": { - "type": "object", - "properties": { - "limits": { - "$ref": "#/components/schemas/AetherSweepSettingsLimits" - }, - "searchSpace": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "nullable": true - }, - "samplingAlgorithm": { - "$ref": "#/components/schemas/AetherSamplingAlgorithmType" - }, - "earlyTermination": { - "$ref": "#/components/schemas/AetherSweepEarlyTerminationPolicy" - } - }, - "additionalProperties": false - }, - "AetherSweepSettingsLimits": { - "type": "object", - "properties": { - "maxTotalTrials": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxConcurrentTrials": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherTabularTrainingMode": { - "enum": [ - "Distributed", - "NonDistributed", - "Auto" - ], - "type": "string" - }, - "AetherTargetAggregationFunction": { - "enum": [ - "Sum", - "Max", - "Min", - "Mean" - ], - "type": "string" - }, - "AetherTargetLags": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/AetherTargetLagsMode" - }, - "values": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherTargetLagsMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "AetherTargetRollingWindowSize": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/AetherTargetRollingWindowSizeMode" - }, - "value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "AetherTargetRollingWindowSizeMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "AetherTargetSelectorConfiguration": { - "type": "object", - "properties": { - "lowPriorityVMTolerant": { - "type": "boolean" - }, - "clusterBlockList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "computeType": { - "type": "string", - "nullable": true - }, - "instanceType": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "instanceTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "myResourceOnly": { - "type": "boolean" - }, - "planId": { - "type": "string", - "nullable": true - }, - "planRegionId": { - "type": "string", - "nullable": true - }, - "region": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "regions": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "vcBlockList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherTaskType": { - "enum": [ - "Classification", - "Regression", - "Forecasting", - "ImageClassification", - "ImageClassificationMultilabel", - "ImageObjectDetection", - "ImageInstanceSegmentation", - "TextClassification", - "TextMultiLabeling", - "TextNER", - "TextClassificationMultilabel" - ], - "type": "string" - }, - "AetherTestDataSettings": { - "type": "object", - "properties": { - "testDataSize": { - "type": "number", - "format": "double", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherTorchDistributedConfiguration": { - "type": "object", - "properties": { - "processCountPerNode": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherTrainingOutput": { - "type": "object", - "properties": { - "trainingOutputType": { - "$ref": "#/components/schemas/AetherTrainingOutputType" - }, - "iteration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "metric": { - "type": "string", - "nullable": true - }, - "modelFile": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherTrainingOutputType": { - "enum": [ - "Metrics", - "Model" - ], - "type": "string" - }, - "AetherTrainingSettings": { - "type": "object", - "properties": { - "blockListModels": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "allowListModels": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "enableDnnTraining": { - "type": "boolean", - "nullable": true - }, - "enableOnnxCompatibleModels": { - "type": "boolean", - "nullable": true - }, - "stackEnsembleSettings": { - "$ref": "#/components/schemas/AetherStackEnsembleSettings" - }, - "enableStackEnsemble": { - "type": "boolean", - "nullable": true - }, - "enableVoteEnsemble": { - "type": "boolean", - "nullable": true - }, - "ensembleModelDownloadTimeout": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "enableModelExplainability": { - "type": "boolean", - "nullable": true - }, - "trainingMode": { - "$ref": "#/components/schemas/AetherTabularTrainingMode" - } - }, - "additionalProperties": false - }, - "AetherUIAzureOpenAIDeploymentNameSelector": { - "type": "object", - "properties": { - "Capabilities": { - "$ref": "#/components/schemas/AetherUIAzureOpenAIModelCapabilities" - } - }, - "additionalProperties": false - }, - "AetherUIAzureOpenAIModelCapabilities": { - "type": "object", - "properties": { - "Completion": { - "type": "boolean", - "nullable": true - }, - "ChatCompletion": { - "type": "boolean", - "nullable": true - }, - "Embeddings": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherUIColumnPicker": { - "type": "object", - "properties": { - "columnPickerFor": { - "type": "string", - "nullable": true - }, - "columnSelectionCategories": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "singleColumnSelection": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AetherUIJsonEditor": { - "type": "object", - "properties": { - "jsonSchema": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherUIParameterHint": { - "type": "object", - "properties": { - "uiWidgetType": { - "$ref": "#/components/schemas/AetherUIWidgetTypeEnum" - }, - "columnPicker": { - "$ref": "#/components/schemas/AetherUIColumnPicker" - }, - "uiScriptLanguage": { - "$ref": "#/components/schemas/AetherUIScriptLanguageEnum" - }, - "jsonEditor": { - "$ref": "#/components/schemas/AetherUIJsonEditor" - }, - "PromptFlowConnectionSelector": { - "$ref": "#/components/schemas/AetherUIPromptFlowConnectionSelector" - }, - "AzureOpenAIDeploymentNameSelector": { - "$ref": "#/components/schemas/AetherUIAzureOpenAIDeploymentNameSelector" - }, - "UxIgnore": { - "type": "boolean" - }, - "Anonymous": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "AetherUIPromptFlowConnectionSelector": { - "type": "object", - "properties": { - "PromptFlowConnectionType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherUIScriptLanguageEnum": { - "enum": [ - "None", - "Python", - "R", - "Json", - "Sql" - ], - "type": "string" - }, - "AetherUIWidgetTypeEnum": { - "enum": [ - "Default", - "Mode", - "ColumnPicker", - "Credential", - "Script", - "ComputeSelection", - "JsonEditor", - "SearchSpaceParameter", - "SectionToggle", - "YamlEditor", - "EnableRuntimeSweep", - "DataStoreSelection", - "InstanceTypeSelection", - "ConnectionSelection", - "PromptFlowConnectionSelection", - "AzureOpenAIDeploymentNameSelection" - ], - "type": "string" - }, - "AetherUploadState": { - "enum": [ - "Uploading", - "Completed", - "Canceled", - "Failed" - ], - "type": "string" - }, - "AetherUseStl": { - "enum": [ - "Season", - "SeasonTrend" - ], - "type": "string" - }, - "AetherValidationDataSettings": { - "type": "object", - "properties": { - "nCrossValidations": { - "$ref": "#/components/schemas/AetherNCrossValidations" - }, - "validationDataSize": { - "type": "number", - "format": "double", - "nullable": true - }, - "cvSplitColumnNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "validationType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherVsoBuildArtifactInfo": { - "type": "object", - "properties": { - "buildInfo": { - "$ref": "#/components/schemas/AetherVsoBuildInfo" - }, - "downloadUrl": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AetherVsoBuildDefinitionInfo": { - "type": "object", - "properties": { - "accountName": { - "type": "string", - "nullable": true - }, - "projectId": { - "type": "string", - "format": "uuid" - }, - "buildDefinitionId": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "AetherVsoBuildInfo": { - "type": "object", - "properties": { - "definitionInfo": { - "$ref": "#/components/schemas/AetherVsoBuildDefinitionInfo" - }, - "buildId": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "AmlDataset": { - "type": "object", - "properties": { - "registeredDataSetReference": { - "$ref": "#/components/schemas/RegisteredDataSetReference" - }, - "savedDataSetReference": { - "$ref": "#/components/schemas/SavedDataSetReference" - }, - "additionalTransformations": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AmlK8sConfiguration": { - "type": "object", - "properties": { - "resourceConfiguration": { - "$ref": "#/components/schemas/ResourceConfiguration" - }, - "priorityConfiguration": { - "$ref": "#/components/schemas/AmlK8sPriorityConfiguration" - }, - "interactiveConfiguration": { - "$ref": "#/components/schemas/InteractiveConfiguration" - } - }, - "additionalProperties": false - }, - "AmlK8sPriorityConfiguration": { - "type": "object", - "properties": { - "jobPriority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "isPreemptible": { - "type": "boolean", - "nullable": true - }, - "nodeCountSet": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "scaleInterval": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AmlSparkCloudSetting": { - "type": "object", - "properties": { - "entry": { - "$ref": "#/components/schemas/EntrySetting" - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "archives": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "jars": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "pyFiles": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "driverMemory": { - "type": "string", - "nullable": true - }, - "driverCores": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "executorMemory": { - "type": "string", - "nullable": true - }, - "executorCores": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "numberExecutors": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "environmentAssetId": { - "type": "string", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "inlineEnvironmentDefinitionString": { - "type": "string", - "nullable": true - }, - "conf": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "compute": { - "type": "string", - "nullable": true - }, - "resources": { - "$ref": "#/components/schemas/ResourcesSetting" - }, - "identity": { - "$ref": "#/components/schemas/IdentitySetting" - } - }, - "additionalProperties": false - }, - "ApiAndParameters": { - "type": "object", - "properties": { - "api": { - "type": "string", - "nullable": true - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowToolSettingParameter" - }, - "description": "This is a dictionary", - "nullable": true - }, - "default_prompt": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ApplicationEndpointConfiguration": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/ApplicationEndpointType" - }, - "port": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "nodes": { - "$ref": "#/components/schemas/Nodes" - } - }, - "additionalProperties": false - }, - "ApplicationEndpointType": { - "enum": [ - "Jupyter", - "JupyterLab", - "SSH", - "TensorBoard", - "VSCode", - "Theia", - "Grafana", - "Custom", - "RayDashboard" - ], - "type": "string" - }, - "ArgumentAssignment": { - "type": "object", - "properties": { - "valueType": { - "$ref": "#/components/schemas/ArgumentValueType" - }, - "value": { - "type": "string", - "nullable": true - }, - "nestedArgumentList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArgumentAssignment" - }, - "nullable": true - }, - "stringInterpolationArgumentList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArgumentAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ArgumentValueType": { - "enum": [ - "Literal", - "Parameter", - "Input", - "Output", - "NestedList", - "StringInterpolationList" - ], - "type": "string" - }, - "Asset": { - "type": "object", - "properties": { - "assetId": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AssetDefinition": { - "type": "object", - "properties": { - "path": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/AEVAAssetType" - }, - "assetId": { - "type": "string", - "nullable": true - }, - "serializedAssetId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AssetNameAndVersionIdentifier": { - "type": "object", - "properties": { - "assetName": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "feedName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AssetOutputSettings": { - "type": "object", - "properties": { - "path": { - "type": "string", - "nullable": true - }, - "PathParameterAssignment": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "type": { - "$ref": "#/components/schemas/AEVAAssetType" - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AEVADataStoreMode" - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AssetOutputSettingsParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "documentation": { - "type": "string", - "nullable": true - }, - "defaultValue": { - "$ref": "#/components/schemas/AssetOutputSettings" - } - }, - "additionalProperties": false - }, - "AssetPublishResult": { - "type": "object", - "properties": { - "feedName": { - "type": "string", - "nullable": true - }, - "assetName": { - "type": "string", - "nullable": true - }, - "assetVersion": { - "type": "string", - "nullable": true - }, - "stepName": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "errorMessage": { - "type": "string", - "nullable": true - }, - "createdTime": { - "type": "string", - "format": "date-time" - }, - "lastUpdatedTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "regionalPublishResults": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetPublishSingleRegionResult" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AssetPublishSingleRegionResult": { - "type": "object", - "properties": { - "stepName": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "errorMessage": { - "type": "string", - "nullable": true - }, - "lastUpdatedTime": { - "type": "string", - "format": "date-time" - }, - "totalSteps": { - "type": "integer", - "format": "int32" - }, - "finishedSteps": { - "type": "integer", - "format": "int32" - }, - "remainingSteps": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "AssetScopeTypes": { - "enum": [ - "Workspace", - "Global", - "All", - "Feed" - ], - "type": "string" - }, - "AssetSourceType": { - "enum": [ - "Unknown", - "Local", - "GithubFile", - "GithubFolder", - "DevopsArtifactsZip" - ], - "type": "string" - }, - "AssetType": { - "enum": [ - "Component", - "Model", - "Environment", - "Dataset", - "DataStore", - "SampleGraph", - "FlowTool", - "FlowToolSetting", - "FlowConnection", - "FlowSample", - "FlowRuntimeSpec" - ], - "type": "string" - }, - "AssetTypeMetaInfo": { - "type": "object", - "properties": { - "consumptionMode": { - "$ref": "#/components/schemas/ConsumeMode" - } - }, - "additionalProperties": false - }, - "AssetVersionPublishRequest": { - "type": "object", - "properties": { - "assetType": { - "$ref": "#/components/schemas/AssetType" - }, - "assetSourceType": { - "$ref": "#/components/schemas/AssetSourceType" - }, - "yamlFile": { - "type": "string", - "nullable": true - }, - "sourceZipUrl": { - "type": "string", - "nullable": true - }, - "sourceZipFile": { - "type": "string", - "format": "binary", - "nullable": true - }, - "feedName": { - "type": "string", - "nullable": true - }, - "setAsDefaultVersion": { - "type": "boolean" - }, - "referencedAssets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AssetNameAndVersionIdentifier" - }, - "nullable": true - }, - "flowFile": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AssignedUser": { - "type": "object", - "properties": { - "objectId": { - "type": "string", - "nullable": true - }, - "tenantId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AttachCosmosRequest": { - "type": "object", - "properties": { - "accountEndpoint": { - "type": "string", - "nullable": true - }, - "resourceArmId": { - "type": "string", - "nullable": true - }, - "databaseName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AuthKeys": { - "type": "object", - "properties": { - "primaryKey": { - "type": "string", - "nullable": true - }, - "secondaryKey": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AutoClusterComputeSpecification": { - "type": "object", - "properties": { - "instanceSize": { - "type": "string", - "nullable": true - }, - "instancePriority": { - "type": "string", - "nullable": true - }, - "osType": { - "type": "string", - "nullable": true - }, - "location": { - "type": "string", - "nullable": true - }, - "runtimeVersion": { - "type": "string", - "nullable": true - }, - "quotaEnforcementResourceId": { - "type": "string", - "nullable": true - }, - "modelComputeSpecificationId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AutoDeleteCondition": { - "enum": [ - "CreatedGreaterThan", - "LastAccessedGreaterThan" - ], - "type": "string" - }, - "AutoDeleteSetting": { - "type": "object", - "properties": { - "condition": { - "$ref": "#/components/schemas/AutoDeleteCondition" - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AutoFeaturizeConfiguration": { - "type": "object", - "properties": { - "featurizationConfig": { - "$ref": "#/components/schemas/FeaturizationSettings" - } - }, - "additionalProperties": false - }, - "AutoMLComponentConfiguration": { - "type": "object", - "properties": { - "autoTrainConfig": { - "$ref": "#/components/schemas/AutoTrainConfiguration" - }, - "autoFeaturizeConfig": { - "$ref": "#/components/schemas/AutoFeaturizeConfiguration" - } - }, - "additionalProperties": false - }, - "AutoScaler": { - "type": "object", - "properties": { - "autoscaleEnabled": { - "type": "boolean", - "nullable": true - }, - "minReplicas": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxReplicas": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "targetUtilization": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "refreshPeriodInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "AutoTrainConfiguration": { - "type": "object", - "properties": { - "generalSettings": { - "$ref": "#/components/schemas/GeneralSettings" - }, - "limitSettings": { - "$ref": "#/components/schemas/LimitSettings" - }, - "dataSettings": { - "$ref": "#/components/schemas/DataSettings" - }, - "forecastingSettings": { - "$ref": "#/components/schemas/ForecastingSettings" - }, - "trainingSettings": { - "$ref": "#/components/schemas/TrainingSettings" - }, - "sweepSettings": { - "$ref": "#/components/schemas/SweepSettings" - }, - "imageModelSettings": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "computeConfiguration": { - "$ref": "#/components/schemas/AEVAComputeConfiguration" - }, - "resourceConfigurtion": { - "$ref": "#/components/schemas/AEVAResourceConfiguration" - }, - "environmentId": { - "type": "string", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "AutologgerSettings": { - "type": "object", - "properties": { - "mlFlowAutologger": { - "$ref": "#/components/schemas/MLFlowAutologgerState" - } - }, - "additionalProperties": false - }, - "AvailabilityResponse": { - "type": "object", - "properties": { - "isAvailable": { - "type": "boolean" - }, - "error": { - "$ref": "#/components/schemas/ErrorResponse" - } - }, - "additionalProperties": false - }, - "AzureBlobReference": { - "type": "object", - "properties": { - "container": { - "type": "string", - "nullable": true - }, - "sasToken": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "account": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AzureDataLakeGen2Reference": { - "type": "object", - "properties": { - "fileSystemName": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "account": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AzureDataLakeReference": { - "type": "object", - "properties": { - "tenant": { - "type": "string", - "nullable": true - }, - "subscription": { - "type": "string", - "nullable": true - }, - "resourceGroup": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "account": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AzureDatabaseReference": { - "type": "object", - "properties": { - "tableName": { - "type": "string", - "nullable": true - }, - "sqlQuery": { - "type": "string", - "nullable": true - }, - "storedProcedureName": { - "type": "string", - "nullable": true - }, - "storedProcedureParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StoredProcedureParameter" - }, - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AzureFilesReference": { - "type": "object", - "properties": { - "share": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "account": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AzureMLModuleVersionDescriptor": { - "type": "object", - "properties": { - "moduleVersionId": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AzureOpenAIDeploymentDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "modelName": { - "type": "string", - "nullable": true - }, - "capabilities": { - "$ref": "#/components/schemas/AzureOpenAIModelCapabilities" - } - }, - "additionalProperties": false - }, - "AzureOpenAIModelCapabilities": { - "type": "object", - "properties": { - "completion": { - "type": "boolean", - "nullable": true - }, - "chat_completion": { - "type": "boolean", - "nullable": true - }, - "embeddings": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "BatchAiComputeInfo": { - "type": "object", - "properties": { - "batchAiSubscriptionId": { - "type": "string", - "nullable": true - }, - "batchAiResourceGroup": { - "type": "string", - "nullable": true - }, - "batchAiWorkspaceName": { - "type": "string", - "nullable": true - }, - "clusterName": { - "type": "string", - "nullable": true - }, - "nativeSharedDirectory": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "BatchDataInput": { - "type": "object", - "properties": { - "dataUri": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "BatchExportComponentSpecResponse": { - "type": "object", - "properties": { - "componentSpecMetaInfos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ComponentSpecMetaInfo" - }, - "nullable": true - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "BatchExportRawComponentResponse": { - "type": "object", - "properties": { - "rawComponentDtos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RawComponentDto" - }, - "nullable": true - }, - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "BatchGetComponentHashesRequest": { - "type": "object", - "properties": { - "moduleHashVersion": { - "$ref": "#/components/schemas/AetherModuleHashVersion" - }, - "moduleEntities": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AetherModuleEntity" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "BatchGetComponentRequest": { - "type": "object", - "properties": { - "versionIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "nameAndVersions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ComponentNameMetaInfo" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Binding": { - "type": "object", - "properties": { - "bindingType": { - "$ref": "#/components/schemas/BindingType" - } - }, - "additionalProperties": false - }, - "BindingType": { - "enum": [ - "Basic" - ], - "type": "string" - }, - "BuildContextLocationType": { - "enum": [ - "Git", - "StorageAccount" - ], - "type": "string" - }, - "BulkTestDto": { - "type": "object", - "properties": { - "bulkTestId": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "runtime": { - "type": "string", - "nullable": true - }, - "createdBy": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "createdOn": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "evaluationCount": { - "type": "integer", - "format": "int32" - }, - "variantCount": { - "type": "integer", - "format": "int32" - }, - "flowSubmitRunSettings": { - "$ref": "#/components/schemas/FlowSubmitRunSettings" - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowInputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowOutputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "batch_inputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - } - }, - "additionalProperties": false - }, - "CloudError": { - "type": "object", - "properties": { - "code": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "nullable": true - }, - "target": { - "type": "string", - "nullable": true - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CloudError" - }, - "nullable": true, - "readOnly": true - }, - "additionalInfo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AdditionalErrorInfo" - }, - "nullable": true, - "readOnly": true - } - }, - "additionalProperties": false - }, - "CloudPrioritySetting": { - "type": "object", - "properties": { - "scopePriority": { - "$ref": "#/components/schemas/PriorityConfiguration" - }, - "AmlComputePriority": { - "$ref": "#/components/schemas/PriorityConfiguration" - }, - "ItpPriority": { - "$ref": "#/components/schemas/PriorityConfiguration" - }, - "SingularityPriority": { - "$ref": "#/components/schemas/PriorityConfiguration" - } - }, - "additionalProperties": false - }, - "CloudSettings": { - "type": "object", - "properties": { - "linkedSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "nullable": true - }, - "priorityConfig": { - "$ref": "#/components/schemas/PriorityConfiguration" - }, - "hdiRunConfig": { - "$ref": "#/components/schemas/HdiRunConfiguration" - }, - "subGraphConfig": { - "$ref": "#/components/schemas/SubGraphConfiguration" - }, - "autoMLComponentConfig": { - "$ref": "#/components/schemas/AutoMLComponentConfiguration" - }, - "apCloudConfig": { - "$ref": "#/components/schemas/APCloudConfiguration" - }, - "scopeCloudConfig": { - "$ref": "#/components/schemas/ScopeCloudConfiguration" - }, - "esCloudConfig": { - "$ref": "#/components/schemas/EsCloudConfiguration" - }, - "dataTransferCloudConfig": { - "$ref": "#/components/schemas/DataTransferCloudConfiguration" - }, - "amlSparkCloudSetting": { - "$ref": "#/components/schemas/AmlSparkCloudSetting" - }, - "dataTransferV2CloudSetting": { - "$ref": "#/components/schemas/DataTransferV2CloudSetting" - } - }, - "additionalProperties": false - }, - "CollieRunSettings": { - "type": "object", - "properties": { - "amlComputeName": { - "type": "string", - "nullable": true - }, - "nodeCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "managedIdentityClientId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ColumnTransformer": { - "type": "object", - "properties": { - "fields": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "parameters": { - "nullable": true - } - }, - "additionalProperties": false - }, - "CommandJob": { - "type": "object", - "properties": { - "jobType": { - "$ref": "#/components/schemas/JobType" - }, - "codeId": { - "type": "string", - "nullable": true - }, - "command": { - "minLength": 1, - "type": "string", - "nullable": true - }, - "environmentId": { - "type": "string", - "nullable": true - }, - "inputDataBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/InputDataBinding" - }, - "nullable": true - }, - "outputDataBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OutputDataBinding" - }, - "nullable": true - }, - "distribution": { - "$ref": "#/components/schemas/DistributionConfiguration" - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "parameters": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "autologgerSettings": { - "$ref": "#/components/schemas/MfeInternalAutologgerSettings" - }, - "limits": { - "$ref": "#/components/schemas/CommandJobLimits" - }, - "provisioningState": { - "$ref": "#/components/schemas/JobProvisioningState" - }, - "parentJobName": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/JobStatus" - }, - "interactionEndpoints": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JobEndpoint" - }, - "nullable": true - }, - "identity": { - "$ref": "#/components/schemas/MfeInternalIdentityConfiguration" - }, - "compute": { - "$ref": "#/components/schemas/ComputeConfiguration" - }, - "priority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "output": { - "$ref": "#/components/schemas/JobOutputArtifacts" - }, - "isArchived": { - "type": "boolean" - }, - "schedule": { - "$ref": "#/components/schemas/ScheduleBase" - }, - "componentId": { - "type": "string", - "nullable": true - }, - "notificationSetting": { - "$ref": "#/components/schemas/NotificationSetting" - }, - "secretsConfiguration": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/MfeInternalSecretConfiguration" - }, - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "CommandJobLimits": { - "type": "object", - "properties": { - "jobLimitsType": { - "$ref": "#/components/schemas/JobLimitsType" - }, - "timeout": { - "type": "string", - "format": "date-span", - "nullable": true - } - }, - "additionalProperties": false - }, - "CommandReturnCodeConfig": { - "type": "object", - "properties": { - "returnCode": { - "$ref": "#/components/schemas/SuccessfulCommandReturnCode" - }, - "successfulReturnCodes": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Communicator": { - "enum": [ - "None", - "ParameterServer", - "Gloo", - "Mpi", - "Nccl", - "ParallelTask" - ], - "type": "string" - }, - "ComponentConfiguration": { - "type": "object", - "properties": { - "componentIdentifier": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentInput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "optional": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - }, - "default": { - "type": "string", - "nullable": true - }, - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "min": { - "type": "string", - "nullable": true - }, - "max": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentJob": { - "type": "object", - "properties": { - "compute": { - "$ref": "#/components/schemas/ComputeConfiguration" - }, - "componentId": { - "type": "string", - "nullable": true - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComponentJobInput" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComponentJobOutput" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentJobInput": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/InputData" - }, - "inputBinding": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentJobOutput": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/MfeInternalOutputData" - }, - "outputBinding": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentNameAndDefaultVersion": { - "type": "object", - "properties": { - "componentName": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "feedName": { - "type": "string", - "nullable": true - }, - "registryName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentNameMetaInfo": { - "type": "object", - "properties": { - "feedName": { - "type": "string", - "nullable": true - }, - "componentName": { - "type": "string", - "nullable": true - }, - "componentVersion": { - "type": "string", - "nullable": true - }, - "registryName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentOutput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentPreflightResult": { - "type": "object", - "properties": { - "errorDetails": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RootError" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentRegistrationTypeEnum": { - "enum": [ - "Normal", - "AnonymousAmlModule", - "AnonymousAmlModuleVersion", - "ModuleEntityOnly" - ], - "type": "string" - }, - "ComponentSpecMetaInfo": { - "type": "object", - "properties": { - "componentSpec": { - "nullable": true - }, - "componentVersion": { - "type": "string", - "nullable": true - }, - "isAnonymous": { - "type": "boolean" - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "componentName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "isArchived": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ComponentType": { - "enum": [ - "Unknown", - "CommandComponent", - "Command" - ], - "type": "string" - }, - "ComponentUpdateRequest": { - "type": "object", - "properties": { - "originalModuleEntity": { - "$ref": "#/components/schemas/ModuleEntity" - }, - "updateModuleEntity": { - "$ref": "#/components/schemas/ModuleEntity" - }, - "moduleName": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "overwriteWithOriginalNameAndVersion": { - "type": "boolean", - "nullable": true - }, - "snapshotId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentValidationRequest": { - "type": "object", - "properties": { - "componentIdentifier": { - "type": "string", - "nullable": true - }, - "computeIdentity": { - "$ref": "#/components/schemas/ComputeIdentityDto" - }, - "executionContextDto": { - "$ref": "#/components/schemas/ExecutionContextDto" - }, - "environmentDefinition": { - "$ref": "#/components/schemas/EnvironmentDefinitionDto" - }, - "dataPortDtos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataPortDto" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ComponentValidationResponse": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/ValidationStatus" - }, - "error": { - "$ref": "#/components/schemas/ErrorResponse" - } - }, - "additionalProperties": false - }, - "Compute": { - "type": "object", - "properties": { - "target": { - "type": "string", - "nullable": true - }, - "targetType": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "gpuCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "priority": { - "type": "string", - "nullable": true - }, - "region": { - "type": "string", - "nullable": true - }, - "armId": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeConfiguration": { - "type": "object", - "properties": { - "target": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxInstanceCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "isLocal": { - "type": "boolean" - }, - "location": { - "type": "string", - "nullable": true - }, - "isClusterless": { - "type": "boolean" - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "instancePriority": { - "type": "string", - "nullable": true - }, - "jobPriority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "shmSize": { - "type": "string", - "nullable": true - }, - "dockerArgs": { - "type": "string", - "nullable": true - }, - "locations": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeContract": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "location": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "identity": { - "$ref": "#/components/schemas/ComputeIdentityContract" - }, - "properties": { - "$ref": "#/components/schemas/ComputeProperties" - } - }, - "additionalProperties": false - }, - "ComputeDetails": { - "type": "object" - }, - "ComputeEnvironmentType": { - "enum": [ - "ACI", - "AKS", - "AMLCOMPUTE", - "IOT", - "AKSENDPOINT", - "MIRSINGLEMODEL", - "MIRAMLCOMPUTE", - "MIRGA", - "AMLARC", - "BATCHAMLCOMPUTE", - "UNKNOWN" - ], - "type": "string" - }, - "ComputeIdentityContract": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "systemIdentityUrl": { - "type": "string", - "nullable": true - }, - "principalId": { - "type": "string", - "nullable": true - }, - "tenantId": { - "type": "string", - "nullable": true - }, - "clientId": { - "type": "string", - "nullable": true - }, - "clientSecretUrl": { - "type": "string", - "nullable": true - }, - "userAssignedIdentities": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComputeRPUserAssignedIdentity" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeIdentityDto": { - "type": "object", - "properties": { - "computeName": { - "type": "string", - "nullable": true - }, - "computeTargetType": { - "$ref": "#/components/schemas/ComputeTargetType" - }, - "intellectualPropertyPublisher": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeInfo": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "computeType": { - "$ref": "#/components/schemas/ComputeEnvironmentType" - }, - "isSslEnabled": { - "type": "boolean" - }, - "isGpuType": { - "type": "boolean" - }, - "clusterPurpose": { - "type": "string", - "nullable": true - }, - "publicIpAddress": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeProperties": { - "required": [ - "computeType" - ], - "type": "object", - "properties": { - "createdOn": { - "type": "string", - "format": "date-time" - }, - "modifiedOn": { - "type": "string", - "format": "date-time" - }, - "disableLocalAuth": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - }, - "resourceId": { - "type": "string", - "nullable": true - }, - "computeType": { - "minLength": 1, - "type": "string" - }, - "computeLocation": { - "type": "string", - "nullable": true - }, - "provisioningState": { - "$ref": "#/components/schemas/ProvisioningState" - }, - "provisioningErrors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ODataErrorResponse" - }, - "nullable": true - }, - "provisioningWarnings": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "isAttachedCompute": { - "type": "boolean" - }, - "properties": { - "$ref": "#/components/schemas/ComputeDetails" - }, - "status": { - "$ref": "#/components/schemas/ComputeStatus" - }, - "warnings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ComputeWarning" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeRPUserAssignedIdentity": { - "type": "object", - "properties": { - "principalId": { - "type": "string", - "nullable": true - }, - "tenantId": { - "type": "string", - "nullable": true - }, - "clientId": { - "type": "string", - "nullable": true - }, - "clientSecretUrl": { - "type": "string", - "nullable": true - }, - "resourceId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeRequest": { - "type": "object", - "properties": { - "nodeCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "gpuCount": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeSetting": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "computeType": { - "$ref": "#/components/schemas/ComputeType" - }, - "batchAiComputeInfo": { - "$ref": "#/components/schemas/BatchAiComputeInfo" - }, - "remoteDockerComputeInfo": { - "$ref": "#/components/schemas/RemoteDockerComputeInfo" - }, - "hdiClusterComputeInfo": { - "$ref": "#/components/schemas/HdiClusterComputeInfo" - }, - "mlcComputeInfo": { - "$ref": "#/components/schemas/MlcComputeInfo" - }, - "databricksComputeInfo": { - "$ref": "#/components/schemas/DatabricksComputeInfo" - } - }, - "additionalProperties": false - }, - "ComputeStatus": { - "type": "object", - "properties": { - "isStatusAvailable": { - "type": "boolean", - "readOnly": true - }, - "detailedStatus": { - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/ODataError" - } - }, - "additionalProperties": false - }, - "ComputeStatusDetail": { - "type": "object", - "properties": { - "provisioningState": { - "type": "string", - "nullable": true - }, - "provisioningErrorMessage": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ComputeTargetType": { - "enum": [ - "Local", - "Remote", - "HdiCluster", - "ContainerInstance", - "AmlCompute", - "ComputeInstance", - "Cmk8s", - "SynapseSpark", - "Kubernetes", - "Aisc", - "GlobalJobDispatcher", - "Databricks", - "MockedCompute" - ], - "type": "string" - }, - "ComputeType": { - "enum": [ - "BatchAi", - "MLC", - "HdiCluster", - "RemoteDocker", - "Databricks", - "Aisc" - ], - "type": "string" - }, - "ComputeWarning": { - "type": "object", - "properties": { - "title": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "severity": { - "$ref": "#/components/schemas/SeverityLevel" - } - }, - "additionalProperties": false - }, - "ConfigValueType": { - "enum": [ - "String", - "Secret" - ], - "type": "string" - }, - "ConnectionAuthMode": { - "enum": [ - "Key", - "MeidToken" - ], - "type": "string" - }, - "ConnectionCategory": { - "enum": [ - "PythonFeed", - "ACR", - "Git", - "S3", - "Snowflake", - "AzureSqlDb", - "AzureSynapseAnalytics", - "AzureMySqlDb", - "AzurePostgresDb", - "AzureDataLakeGen2", - "Redis", - "ApiKey", - "AzureOpenAI", - "CognitiveSearch", - "CognitiveService", - "CustomKeys", - "AzureBlob", - "AzureOneLake", - "CosmosDb", - "CosmosDbMongoDbApi", - "AzureDataExplorer", - "AzureMariaDb", - "AzureDatabricksDeltaLake", - "AzureSqlMi", - "AzureTableStorage", - "AmazonRdsForOracle", - "AmazonRdsForSqlServer", - "AmazonRedshift", - "Db2", - "Drill", - "GoogleBigQuery", - "Greenplum", - "Hbase", - "Hive", - "Impala", - "Informix", - "MariaDb", - "MicrosoftAccess", - "MySql", - "Netezza", - "Oracle", - "Phoenix", - "PostgreSql", - "Presto", - "SapOpenHub", - "SapBw", - "SapHana", - "SapTable", - "Spark", - "SqlServer", - "Sybase", - "Teradata", - "Vertica", - "Cassandra", - "Couchbase", - "MongoDbV2", - "MongoDbAtlas", - "AmazonS3Compatible", - "FileServer", - "FtpServer", - "GoogleCloudStorage", - "Hdfs", - "OracleCloudStorage", - "Sftp", - "GenericHttp", - "ODataRest", - "Odbc", - "GenericRest", - "AmazonMws", - "Concur", - "Dynamics", - "DynamicsAx", - "DynamicsCrm", - "GoogleAdWords", - "Hubspot", - "Jira", - "Magento", - "Marketo", - "Office365", - "Eloqua", - "Responsys", - "OracleServiceCloud", - "PayPal", - "QuickBooks", - "Salesforce", - "SalesforceServiceCloud", - "SalesforceMarketingCloud", - "SapCloudForCustomer", - "SapEcc", - "ServiceNow", - "SharePointOnlineList", - "Shopify", - "Square", - "WebTable", - "Xero", - "Zoho", - "GenericContainerRegistry", - "OpenAI", - "Serp", - "BingLLMSearch", - "Serverless" - ], - "type": "string" - }, - "ConnectionConfigSpec": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "configValueType": { - "$ref": "#/components/schemas/ConfigValueType" - }, - "description": { - "type": "string", - "nullable": true - }, - "defaultValue": { - "type": "string", - "nullable": true - }, - "enumValues": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "isOptional": { - "type": "boolean" - }, - "supportedAuthModes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionAuthMode" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ConnectionDto": { - "type": "object", - "properties": { - "connectionName": { - "type": "string", - "nullable": true - }, - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "configs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "customConfigs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/CustomConnectionConfig" - }, - "description": "This is a dictionary", - "nullable": true - }, - "expiryTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "owner": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "createdDate": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "ConnectionEntity": { - "type": "object", - "properties": { - "connectionId": { - "type": "string", - "nullable": true - }, - "connectionName": { - "type": "string", - "nullable": true - }, - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "connectionScope": { - "$ref": "#/components/schemas/ConnectionScope" - }, - "configs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "customConfigs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/CustomConnectionConfig" - }, - "description": "This is a dictionary", - "nullable": true - }, - "expiryTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "secretName": { - "type": "string", - "nullable": true - }, - "owner": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "ConnectionOverrideSetting": { - "type": "object", - "properties": { - "connectionSourceType": { - "$ref": "#/components/schemas/ConnectionSourceType" - }, - "nodeName": { - "type": "string", - "nullable": true - }, - "nodeInputName": { - "type": "string", - "nullable": true - }, - "nodeDeploymentNameInput": { - "type": "string", - "nullable": true - }, - "nodeModelInput": { - "type": "string", - "nullable": true - }, - "connectionName": { - "type": "string", - "nullable": true - }, - "deploymentName": { - "type": "string", - "nullable": true - }, - "model": { - "type": "string", - "nullable": true - }, - "connectionTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionType" - }, - "nullable": true - }, - "capabilities": { - "$ref": "#/components/schemas/AzureOpenAIModelCapabilities" - }, - "modelEnum": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ConnectionScope": { - "enum": [ - "User", - "WorkspaceShared" - ], - "type": "string" - }, - "ConnectionSourceType": { - "enum": [ - "Node", - "NodeInput" - ], - "type": "string" - }, - "ConnectionSpec": { - "type": "object", - "properties": { - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "configSpecs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionConfigSpec" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ConnectionType": { - "enum": [ - "OpenAI", - "AzureOpenAI", - "Serp", - "Bing", - "AzureContentModerator", - "Custom", - "AzureContentSafety", - "CognitiveSearch", - "SubstrateLLM", - "Pinecone", - "Qdrant", - "Weaviate", - "FormRecognizer", - "Serverless" - ], - "type": "string" - }, - "ConsumeMode": { - "enum": [ - "Reference", - "Copy", - "CopyAndAutoUpgrade" - ], - "type": "string" - }, - "ContainerInstanceConfiguration": { - "type": "object", - "properties": { - "region": { - "type": "string", - "nullable": true - }, - "cpuCores": { - "type": "number", - "format": "double" - }, - "memoryGb": { - "type": "number", - "format": "double" - } - }, - "additionalProperties": false - }, - "ContainerRegistry": { - "type": "object", - "properties": { - "address": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "credentialType": { - "type": "string", - "nullable": true - }, - "registryIdentity": { - "$ref": "#/components/schemas/RegistryIdentity" - } - }, - "additionalProperties": false - }, - "ContainerResourceRequirements": { - "type": "object", - "properties": { - "cpu": { - "type": "number", - "format": "double", - "nullable": true - }, - "cpuLimit": { - "type": "number", - "format": "double", - "nullable": true - }, - "memoryInGB": { - "type": "number", - "format": "double", - "nullable": true - }, - "memoryInGBLimit": { - "type": "number", - "format": "double", - "nullable": true - }, - "gpuEnabled": { - "type": "boolean", - "nullable": true - }, - "gpu": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "fpga": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "ControlFlowType": { - "enum": [ - "None", - "DoWhile", - "ParallelFor" - ], - "type": "string" - }, - "ControlInput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "defaultValue": { - "$ref": "#/components/schemas/ControlInputValue" - } - }, - "additionalProperties": false - }, - "ControlInputValue": { - "enum": [ - "None", - "False", - "True", - "Skipped" - ], - "type": "string" - }, - "ControlOutput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ControlType": { - "enum": [ - "IfElse" - ], - "type": "string" - }, - "CopyDataTask": { - "type": "object", - "properties": { - "DataCopyMode": { - "$ref": "#/components/schemas/DataCopyMode" - } - }, - "additionalProperties": false - }, - "CreateFlowRequest": { - "type": "object", - "properties": { - "flowName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "details": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "flow": { - "$ref": "#/components/schemas/Flow" - }, - "flowDefinitionFilePath": { - "type": "string", - "nullable": true - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "flowRunSettings": { - "$ref": "#/components/schemas/FlowRunSettings" - }, - "isArchived": { - "type": "boolean" - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "identity": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "CreateFlowRuntimeRequest": { - "type": "object", - "properties": { - "runtimeType": { - "$ref": "#/components/schemas/RuntimeType" - }, - "identity": { - "$ref": "#/components/schemas/ManagedServiceIdentity" - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "fromExistingEndpoint": { - "type": "boolean" - }, - "fromExistingDeployment": { - "type": "boolean" - }, - "endpointName": { - "type": "string", - "nullable": true - }, - "deploymentName": { - "type": "string", - "nullable": true - }, - "computeInstanceName": { - "type": "string", - "nullable": true - }, - "fromExistingCustomApp": { - "type": "boolean" - }, - "customAppName": { - "type": "string", - "nullable": true - }, - "runtimeDescription": { - "type": "string", - "nullable": true - }, - "environment": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "CreateFlowSessionRequest": { - "type": "object", - "properties": { - "pythonPipRequirements": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "baseImage": { - "type": "string", - "nullable": true - }, - "action": { - "$ref": "#/components/schemas/SetupFlowSessionAction" - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "identity": { - "type": "string", - "nullable": true - }, - "computeName": { - "type": "string", - "nullable": true - }, - "enableMultiContainer": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "CreateInferencePipelineRequest": { - "type": "object", - "properties": { - "moduleNodeId": { - "type": "string", - "nullable": true - }, - "portName": { - "type": "string", - "nullable": true - }, - "trainingPipelineDraftName": { - "type": "string", - "nullable": true - }, - "trainingPipelineRunDisplayName": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "pipelineType": { - "$ref": "#/components/schemas/PipelineType" - }, - "pipelineDraftMode": { - "$ref": "#/components/schemas/PipelineDraftMode" - }, - "graphComponentsMode": { - "$ref": "#/components/schemas/GraphComponentsMode" - }, - "subPipelinesInfo": { - "$ref": "#/components/schemas/SubPipelinesInfo" - }, - "flattenedSubGraphs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineSubDraft" - }, - "nullable": true - }, - "pipelineParameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataPathAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "assetOutputSettingsAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "graph": { - "$ref": "#/components/schemas/GraphDraftEntity" - }, - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "moduleNodeRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeRunSetting" - }, - "nullable": true - }, - "moduleNodeUIInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enforceRerun": { - "type": "boolean", - "nullable": true - }, - "datasetAccessModes": { - "$ref": "#/components/schemas/DatasetAccessModes" - } - }, - "additionalProperties": false - }, - "CreateOrUpdateConnectionRequest": { - "type": "object", - "properties": { - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "connectionScope": { - "$ref": "#/components/schemas/ConnectionScope" - }, - "configs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "customConfigs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/CustomConnectionConfig" - }, - "description": "This is a dictionary", - "nullable": true - }, - "expiryTime": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "CreateOrUpdateConnectionRequestDto": { - "type": "object", - "properties": { - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "configs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "customConfigs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/CustomConnectionConfig" - }, - "description": "This is a dictionary", - "nullable": true - }, - "expiryTime": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "CreatePipelineDraftRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "pipelineType": { - "$ref": "#/components/schemas/PipelineType" - }, - "pipelineDraftMode": { - "$ref": "#/components/schemas/PipelineDraftMode" - }, - "graphComponentsMode": { - "$ref": "#/components/schemas/GraphComponentsMode" - }, - "subPipelinesInfo": { - "$ref": "#/components/schemas/SubPipelinesInfo" - }, - "flattenedSubGraphs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineSubDraft" - }, - "nullable": true - }, - "pipelineParameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataPathAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "assetOutputSettingsAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "graph": { - "$ref": "#/components/schemas/GraphDraftEntity" - }, - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "moduleNodeRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeRunSetting" - }, - "nullable": true - }, - "moduleNodeUIInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enforceRerun": { - "type": "boolean", - "nullable": true - }, - "datasetAccessModes": { - "$ref": "#/components/schemas/DatasetAccessModes" - } - }, - "additionalProperties": false - }, - "CreatePipelineJobScheduleDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "pipelineJobName": { - "type": "string", - "nullable": true - }, - "pipelineJobRuntimeSettings": { - "$ref": "#/components/schemas/PipelineJobRuntimeBasicSettings" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "triggerType": { - "$ref": "#/components/schemas/TriggerType" - }, - "recurrence": { - "$ref": "#/components/schemas/Recurrence" - }, - "cron": { - "$ref": "#/components/schemas/Cron" - }, - "status": { - "$ref": "#/components/schemas/ScheduleStatus" - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "CreatePublishedPipelineRequest": { - "type": "object", - "properties": { - "usePipelineEndpoint": { - "type": "boolean" - }, - "pipelineName": { - "type": "string", - "nullable": true - }, - "pipelineDescription": { - "type": "string", - "nullable": true - }, - "useExistingPipelineEndpoint": { - "type": "boolean" - }, - "pipelineEndpointName": { - "type": "string", - "nullable": true - }, - "pipelineEndpointDescription": { - "type": "string", - "nullable": true - }, - "setAsDefaultPipelineForEndpoint": { - "type": "boolean" - }, - "stepTags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "pipelineParameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataPathAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "assetOutputSettingsAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enableNotification": { - "type": "boolean", - "nullable": true - }, - "subPipelinesInfo": { - "$ref": "#/components/schemas/SubPipelinesInfo" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "parentRunId": { - "type": "string", - "nullable": true - }, - "graph": { - "$ref": "#/components/schemas/GraphDraftEntity" - }, - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "moduleNodeRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeRunSetting" - }, - "nullable": true - }, - "moduleNodeUIInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enforceRerun": { - "type": "boolean", - "nullable": true - }, - "datasetAccessModes": { - "$ref": "#/components/schemas/DatasetAccessModes" - } - }, - "additionalProperties": false - }, - "CreateRealTimeEndpointRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "computeInfo": { - "$ref": "#/components/schemas/ComputeInfo" - }, - "description": { - "type": "string", - "nullable": true - }, - "linkedPipelineDraftId": { - "type": "string", - "nullable": true - }, - "linkedPipelineRunId": { - "type": "string", - "nullable": true - }, - "aksAdvanceSettings": { - "$ref": "#/components/schemas/AKSAdvanceSettings" - }, - "aciAdvanceSettings": { - "$ref": "#/components/schemas/ACIAdvanceSettings" - }, - "linkedTrainingPipelineRunId": { - "type": "string", - "nullable": true - }, - "linkedExperimentName": { - "type": "string", - "nullable": true - }, - "graphNodesRunIdMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "workflow": { - "$ref": "#/components/schemas/PipelineGraph" - }, - "inputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InputOutputPortMetadata" - }, - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InputOutputPortMetadata" - }, - "nullable": true - }, - "exampleRequest": { - "$ref": "#/components/schemas/ExampleRequest" - }, - "userStorageConnectionString": { - "type": "string", - "nullable": true - }, - "userStorageEndpointUri": { - "type": "string", - "format": "uri", - "nullable": true - }, - "userStorageWorkspaceSaiToken": { - "type": "string", - "nullable": true - }, - "userStorageContainerName": { - "type": "string", - "nullable": true - }, - "pipelineRunId": { - "type": "string", - "nullable": true - }, - "rootPipelineRunId": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "CreatedBy": { - "type": "object", - "properties": { - "userObjectId": { - "type": "string", - "nullable": true - }, - "userTenantId": { - "type": "string", - "nullable": true - }, - "userName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "CreatedFromDto": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/CreatedFromType" - }, - "locationType": { - "$ref": "#/components/schemas/CreatedFromLocationType" - }, - "location": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "CreatedFromLocationType": { - "enum": [ - "ArtifactId" - ], - "type": "string" - }, - "CreatedFromType": { - "enum": [ - "Notebook" - ], - "type": "string" - }, - "CreationContext": { - "type": "object", - "properties": { - "createdTime": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "creationSource": { - "type": "string", - "nullable": true - } - } - }, - "Cron": { - "type": "object", - "properties": { - "expression": { - "type": "string", - "nullable": true - }, - "endTime": { - "type": "string", - "nullable": true - }, - "startTime": { - "type": "string", - "nullable": true - }, - "timeZone": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "CustomConnectionConfig": { - "type": "object", - "properties": { - "configValueType": { - "$ref": "#/components/schemas/ConfigValueType" - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "CustomReference": { - "type": "object", - "properties": { - "amlDataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DBFSReference": { - "type": "object", - "properties": { - "relativePath": { - "type": "string", - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Data": { - "type": "object", - "properties": { - "dataLocation": { - "$ref": "#/components/schemas/ExecutionDataLocation" - }, - "mechanism": { - "$ref": "#/components/schemas/DeliveryMechanism" - }, - "environmentVariableName": { - "type": "string", - "nullable": true - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "overwrite": { - "type": "boolean" - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DataBindingMode": { - "enum": [ - "Mount", - "Download", - "Upload", - "ReadOnlyMount", - "ReadWriteMount", - "Direct", - "EvalMount", - "EvalDownload" - ], - "type": "string" - }, - "DataCategory": { - "enum": [ - "All", - "Dataset", - "Model" - ], - "type": "string" - }, - "DataCopyMode": { - "enum": [ - "MergeWithOverwrite", - "FailIfConflict" - ], - "type": "string" - }, - "DataInfo": { - "type": "object", - "properties": { - "feedName": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "dataSourceType": { - "$ref": "#/components/schemas/DataSourceType" - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "dataTypeId": { - "type": "string", - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "modifiedDate": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "registeredBy": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "createdByStudio": { - "type": "boolean", - "nullable": true - }, - "dataReferenceType": { - "$ref": "#/components/schemas/DataReferenceType" - }, - "datasetType": { - "type": "string", - "nullable": true - }, - "savedDatasetId": { - "type": "string", - "nullable": true - }, - "datasetVersionId": { - "type": "string", - "nullable": true - }, - "isVisible": { - "type": "boolean" - }, - "isRegistered": { - "type": "boolean" - }, - "properties": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - }, - "connectionString": { - "type": "string", - "nullable": true - }, - "containerName": { - "type": "string", - "nullable": true - }, - "dataStorageEndpointUri": { - "type": "string", - "format": "uri", - "nullable": true - }, - "workspaceSaiToken": { - "type": "string", - "nullable": true - }, - "amlDatasetDataFlow": { - "type": "string", - "nullable": true - }, - "systemData": { - "$ref": "#/components/schemas/SystemData" - }, - "armId": { - "type": "string", - "nullable": true - }, - "assetId": { - "type": "string", - "nullable": true - }, - "assetUri": { - "type": "string", - "nullable": true - }, - "assetType": { - "type": "string", - "nullable": true - }, - "isDataV2": { - "type": "boolean", - "nullable": true - }, - "assetScopeType": { - "$ref": "#/components/schemas/AssetScopeTypes" - }, - "pipelineRunId": { - "type": "string", - "nullable": true - }, - "moduleNodeId": { - "type": "string", - "nullable": true - }, - "outputPortName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DataLocation": { - "type": "object", - "properties": { - "storageType": { - "$ref": "#/components/schemas/DataLocationStorageType" - }, - "storageId": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "dataReference": { - "$ref": "#/components/schemas/DataReference" - }, - "amlDataset": { - "$ref": "#/components/schemas/AmlDataset" - }, - "assetDefinition": { - "$ref": "#/components/schemas/AssetDefinition" - } - }, - "additionalProperties": false - }, - "DataLocationStorageType": { - "enum": [ - "None", - "AzureBlob", - "Artifact", - "Snapshot", - "SavedAmlDataset", - "Asset" - ], - "type": "string" - }, - "DataPath": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "sqlDataPath": { - "$ref": "#/components/schemas/SqlDataPath" - } - }, - "additionalProperties": false - }, - "DataPathParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "documentation": { - "type": "string", - "nullable": true - }, - "defaultValue": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "isOptional": { - "type": "boolean" - }, - "dataTypeId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DataPortDto": { - "type": "object", - "properties": { - "dataPortType": { - "$ref": "#/components/schemas/DataPortType" - }, - "dataPortName": { - "type": "string", - "nullable": true - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "dataStoreIntellectualPropertyAccessMode": { - "$ref": "#/components/schemas/IntellectualPropertyAccessMode" - }, - "dataStoreIntellectualPropertyPublisher": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DataPortType": { - "enum": [ - "Input", - "Output" - ], - "type": "string" - }, - "DataReference": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/DataReferenceType" - }, - "azureBlobReference": { - "$ref": "#/components/schemas/AzureBlobReference" - }, - "azureDataLakeReference": { - "$ref": "#/components/schemas/AzureDataLakeReference" - }, - "azureFilesReference": { - "$ref": "#/components/schemas/AzureFilesReference" - }, - "azureSqlDatabaseReference": { - "$ref": "#/components/schemas/AzureDatabaseReference" - }, - "azurePostgresDatabaseReference": { - "$ref": "#/components/schemas/AzureDatabaseReference" - }, - "azureDataLakeGen2Reference": { - "$ref": "#/components/schemas/AzureDataLakeGen2Reference" - }, - "dbfsReference": { - "$ref": "#/components/schemas/DBFSReference" - }, - "azureMySqlDatabaseReference": { - "$ref": "#/components/schemas/AzureDatabaseReference" - }, - "customReference": { - "$ref": "#/components/schemas/CustomReference" - }, - "hdfsReference": { - "$ref": "#/components/schemas/HdfsReference" - } - }, - "additionalProperties": false - }, - "DataReferenceConfiguration": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - }, - "mode": { - "$ref": "#/components/schemas/DataStoreMode" - }, - "pathOnDataStore": { - "type": "string", - "nullable": true - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "overwrite": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "DataReferenceType": { - "enum": [ - "None", - "AzureBlob", - "AzureDataLake", - "AzureFiles", - "AzureSqlDatabase", - "AzurePostgresDatabase", - "AzureDataLakeGen2", - "DBFS", - "AzureMySqlDatabase", - "Custom", - "Hdfs" - ], - "type": "string" - }, - "DataSetDefinition": { - "type": "object", - "properties": { - "dataTypeShortName": { - "type": "string", - "nullable": true - }, - "parameterName": { - "type": "string", - "nullable": true - }, - "value": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - } - }, - "additionalProperties": false - }, - "DataSetDefinitionValue": { - "type": "object", - "properties": { - "literalValue": { - "$ref": "#/components/schemas/DataPath" - }, - "dataSetReference": { - "$ref": "#/components/schemas/RegisteredDataSetReference" - }, - "savedDataSetReference": { - "$ref": "#/components/schemas/SavedDataSetReference" - }, - "assetDefinition": { - "$ref": "#/components/schemas/AssetDefinition" - } - }, - "additionalProperties": false - }, - "DataSetPathParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "documentation": { - "type": "string", - "nullable": true - }, - "defaultValue": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "isOptional": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "DataSettings": { - "type": "object", - "properties": { - "targetColumnName": { - "type": "string", - "nullable": true - }, - "weightColumnName": { - "type": "string", - "nullable": true - }, - "positiveLabel": { - "type": "string", - "nullable": true - }, - "validationData": { - "$ref": "#/components/schemas/ValidationDataSettings" - }, - "testData": { - "$ref": "#/components/schemas/TestDataSettings" - } - }, - "additionalProperties": false - }, - "DataSourceType": { - "enum": [ - "None", - "PipelineDataSource", - "AmlDataset", - "GlobalDataset", - "FeedModel", - "FeedDataset", - "AmlDataVersion", - "AMLModelVersion" - ], - "type": "string" - }, - "DataStoreMode": { - "enum": [ - "Mount", - "Download", - "Upload" - ], - "type": "string" - }, - "DataTransferCloudConfiguration": { - "type": "object", - "properties": { - "AllowOverwrite": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "DataTransferSink": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/DataTransferStorageType" - }, - "fileSystem": { - "$ref": "#/components/schemas/FileSystem" - }, - "databaseSink": { - "$ref": "#/components/schemas/DatabaseSink" - } - }, - "additionalProperties": false - }, - "DataTransferSource": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/DataTransferStorageType" - }, - "fileSystem": { - "$ref": "#/components/schemas/FileSystem" - }, - "databaseSource": { - "$ref": "#/components/schemas/DatabaseSource" - } - }, - "additionalProperties": false - }, - "DataTransferStorageType": { - "enum": [ - "DataBase", - "FileSystem" - ], - "type": "string" - }, - "DataTransferTaskType": { - "enum": [ - "ImportData", - "ExportData", - "CopyData" - ], - "type": "string" - }, - "DataTransferV2CloudSetting": { - "type": "object", - "properties": { - "taskType": { - "$ref": "#/components/schemas/DataTransferTaskType" - }, - "ComputeName": { - "type": "string", - "nullable": true - }, - "CopyDataTask": { - "$ref": "#/components/schemas/CopyDataTask" - }, - "ImportDataTask": { - "$ref": "#/components/schemas/ImportDataTask" - }, - "ExportDataTask": { - "$ref": "#/components/schemas/ExportDataTask" - }, - "DataTransferSources": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataTransferSource" - }, - "description": "This is a dictionary", - "nullable": true - }, - "DataTransferSinks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataTransferSink" - }, - "description": "This is a dictionary", - "nullable": true - }, - "DataCopyMode": { - "$ref": "#/components/schemas/DataCopyMode" - } - }, - "additionalProperties": false - }, - "DataTypeCreationInfo": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "isDirectory": { - "type": "boolean" - }, - "fileExtension": { - "type": "string", - "nullable": true - }, - "parentDataTypeIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DataTypeMechanism": { - "enum": [ - "ErrorWhenNotExisting", - "RegisterWhenNotExisting", - "RegisterBuildinDataTypeOnly" - ], - "type": "string" - }, - "DatabaseSink": { - "type": "object", - "properties": { - "connection": { - "type": "string", - "nullable": true - }, - "table": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DatabaseSource": { - "type": "object", - "properties": { - "connection": { - "type": "string", - "nullable": true - }, - "query": { - "type": "string", - "nullable": true - }, - "storedProcedureName": { - "type": "string", - "nullable": true - }, - "storedProcedureParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StoredProcedureParameter" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DatabricksComputeInfo": { - "type": "object", - "properties": { - "existingClusterId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DatabricksConfiguration": { - "type": "object", - "properties": { - "workers": { - "type": "integer", - "format": "int32" - }, - "minimumWorkerCount": { - "type": "integer", - "format": "int32" - }, - "maxMumWorkerCount": { - "type": "integer", - "format": "int32" - }, - "sparkVersion": { - "type": "string", - "nullable": true - }, - "nodeTypeId": { - "type": "string", - "nullable": true - }, - "sparkConf": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "sparkEnvVars": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "clusterLogConfDbfsPath": { - "type": "string", - "nullable": true - }, - "dbfsInitScripts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InitScriptInfoDto" - }, - "nullable": true - }, - "instancePoolId": { - "type": "string", - "nullable": true - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "notebookTask": { - "$ref": "#/components/schemas/NoteBookTaskDto" - }, - "sparkPythonTask": { - "$ref": "#/components/schemas/SparkPythonTaskDto" - }, - "sparkJarTask": { - "$ref": "#/components/schemas/SparkJarTaskDto" - }, - "sparkSubmitTask": { - "$ref": "#/components/schemas/SparkSubmitTaskDto" - }, - "jarLibraries": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "eggLibraries": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "whlLibraries": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "pypiLibraries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PythonPyPiOrRCranLibraryDto" - }, - "nullable": true - }, - "rCranLibraries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PythonPyPiOrRCranLibraryDto" - }, - "nullable": true - }, - "mavenLibraries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MavenLibraryDto" - }, - "nullable": true - }, - "libraries": { - "type": "array", - "items": {}, - "nullable": true - }, - "linkedADBWorkspaceMetadata": { - "$ref": "#/components/schemas/LinkedADBWorkspaceMetadata" - }, - "databrickResourceId": { - "type": "string", - "nullable": true - }, - "autoScale": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "DatacacheConfiguration": { - "type": "object", - "properties": { - "datacacheId": { - "type": "string", - "format": "uuid" - }, - "datacacheStore": { - "type": "string", - "nullable": true - }, - "datasetId": { - "type": "string", - "format": "uuid" - }, - "mode": { - "$ref": "#/components/schemas/DatacacheMode" - }, - "replica": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "failureFallback": { - "type": "boolean" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DatacacheMode": { - "enum": [ - "Mount" - ], - "type": "string" - }, - "DatasetAccessModes": { - "enum": [ - "Default", - "DatasetInDpv2", - "AssetInDpv2", - "DatasetInDesignerUI", - "DatasetInDpv2WithDatasetInDesignerUI", - "Dataset", - "AssetInDpv2WithDatasetInDesignerUI", - "DatasetAndAssetInDpv2WithDatasetInDesignerUI", - "AssetInDesignerUI", - "AssetInDpv2WithAssetInDesignerUI", - "Asset" - ], - "type": "string" - }, - "DatasetConsumptionType": { - "enum": [ - "RunInput", - "Reference" - ], - "type": "string" - }, - "DatasetDeliveryMechanism": { - "enum": [ - "Direct", - "Mount", - "Download", - "Hdfs" - ], - "type": "string" - }, - "DatasetIdentifier": { - "type": "object", - "properties": { - "savedId": { - "type": "string", - "nullable": true - }, - "registeredId": { - "type": "string", - "nullable": true - }, - "registeredVersion": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DatasetInputDetails": { - "type": "object", - "properties": { - "inputName": { - "type": "string", - "nullable": true - }, - "mechanism": { - "$ref": "#/components/schemas/DatasetDeliveryMechanism" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DatasetLineage": { - "type": "object", - "properties": { - "identifier": { - "$ref": "#/components/schemas/DatasetIdentifier" - }, - "consumptionType": { - "$ref": "#/components/schemas/DatasetConsumptionType" - }, - "inputDetails": { - "$ref": "#/components/schemas/DatasetInputDetails" - } - }, - "additionalProperties": false - }, - "DatasetOutput": { - "type": "object", - "properties": { - "datasetType": { - "$ref": "#/components/schemas/DatasetType" - }, - "datasetRegistration": { - "$ref": "#/components/schemas/DatasetRegistration" - }, - "datasetOutputOptions": { - "$ref": "#/components/schemas/DatasetOutputOptions" - } - }, - "additionalProperties": false - }, - "DatasetOutputDetails": { - "type": "object", - "properties": { - "outputName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DatasetOutputOptions": { - "type": "object", - "properties": { - "sourceGlobs": { - "$ref": "#/components/schemas/GlobsOptions" - }, - "pathOnDatastore": { - "type": "string", - "nullable": true - }, - "PathOnDatastoreParameterAssignment": { - "$ref": "#/components/schemas/ParameterAssignment" - } - }, - "additionalProperties": false - }, - "DatasetOutputType": { - "enum": [ - "RunOutput", - "Reference" - ], - "type": "string" - }, - "DatasetRegistration": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "createNewVersion": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "additionalTransformations": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DatasetRegistrationOptions": { - "type": "object", - "properties": { - "additionalTransformation": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DatasetType": { - "enum": [ - "File", - "Tabular" - ], - "type": "string" - }, - "DatastoreSetting": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DbfsStorageInfoDto": { - "type": "object", - "properties": { - "destination": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DebugInfoResponse": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type.", - "nullable": true - }, - "message": { - "type": "string", - "description": "The message.", - "nullable": true - }, - "stackTrace": { - "type": "string", - "description": "The stack trace.", - "nullable": true - }, - "innerException": { - "$ref": "#/components/schemas/DebugInfoResponse" - }, - "data": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - }, - "errorResponse": { - "$ref": "#/components/schemas/ErrorResponse" - } - }, - "additionalProperties": false, - "description": "Internal debugging information not intended for external clients." - }, - "DeliveryMechanism": { - "enum": [ - "Direct", - "Mount", - "Download", - "Hdfs" - ], - "type": "string" - }, - "DeployFlowRequest": { - "type": "object", - "properties": { - "sourceResourceId": { - "type": "string", - "nullable": true - }, - "sourceFlowRunId": { - "type": "string", - "nullable": true - }, - "sourceFlowId": { - "type": "string", - "nullable": true - }, - "flow": { - "$ref": "#/components/schemas/Flow" - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "flowSubmitRunSettings": { - "$ref": "#/components/schemas/FlowSubmitRunSettings" - }, - "outputNamesIncludedInEndpointResponse": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "endpointName": { - "type": "string", - "nullable": true - }, - "endpointDescription": { - "type": "string", - "nullable": true - }, - "authMode": { - "$ref": "#/components/schemas/EndpointAuthMode" - }, - "identity": { - "$ref": "#/components/schemas/ManagedServiceIdentity" - }, - "endpointTags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enablePublicNetworkAccess": { - "type": "boolean", - "nullable": true - }, - "connectionOverrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionOverrideSetting" - }, - "nullable": true - }, - "useWorkspaceConnection": { - "type": "boolean" - }, - "deploymentName": { - "type": "string", - "nullable": true - }, - "environment": { - "type": "string", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "deploymentTags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "appInsightsEnabled": { - "type": "boolean" - }, - "enableModelDataCollector": { - "type": "boolean" - }, - "skipUpdateTrafficToFull": { - "type": "boolean" - }, - "enableStreamingResponse": { - "type": "boolean" - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32" - }, - "autoGrantConnectionPermission": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "DeploymentInfo": { - "type": "object", - "properties": { - "operationId": { - "type": "string", - "nullable": true - }, - "serviceId": { - "type": "string", - "nullable": true - }, - "serviceName": { - "type": "string", - "nullable": true - }, - "statusDetail": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DistributionConfiguration": { - "type": "object", - "properties": { - "distributionType": { - "$ref": "#/components/schemas/DistributionType" - } - }, - "additionalProperties": false - }, - "DistributionParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "inputType": { - "$ref": "#/components/schemas/DistributionParameterEnum" - } - }, - "additionalProperties": false - }, - "DistributionParameterEnum": { - "enum": [ - "Text", - "Number" - ], - "type": "string" - }, - "DistributionType": { - "enum": [ - "PyTorch", - "TensorFlow", - "Mpi", - "Ray" - ], - "type": "string" - }, - "DoWhileControlFlowInfo": { - "type": "object", - "properties": { - "outputPortNameToInputPortNamesMapping": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "nullable": true - }, - "conditionOutputPortName": { - "type": "string", - "nullable": true - }, - "runSettings": { - "$ref": "#/components/schemas/DoWhileControlFlowRunSettings" - } - }, - "additionalProperties": false - }, - "DoWhileControlFlowRunSettings": { - "type": "object", - "properties": { - "maxLoopIterationCount": { - "$ref": "#/components/schemas/ParameterAssignment" - } - }, - "additionalProperties": false - }, - "DockerBuildContext": { - "type": "object", - "properties": { - "locationType": { - "$ref": "#/components/schemas/BuildContextLocationType" - }, - "location": { - "type": "string", - "nullable": true - }, - "dockerfilePath": { - "type": "string", - "default": "Dockerfile", - "nullable": true - } - }, - "additionalProperties": false - }, - "DockerConfiguration": { - "type": "object", - "properties": { - "useDocker": { - "type": "boolean", - "nullable": true - }, - "sharedVolumes": { - "type": "boolean", - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DockerImagePlatform": { - "type": "object", - "properties": { - "os": { - "type": "string", - "nullable": true - }, - "architecture": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DockerSection": { - "type": "object", - "properties": { - "baseImage": { - "type": "string", - "nullable": true - }, - "platform": { - "$ref": "#/components/schemas/DockerImagePlatform" - }, - "baseDockerfile": { - "type": "string", - "nullable": true - }, - "buildContext": { - "$ref": "#/components/schemas/DockerBuildContext" - }, - "baseImageRegistry": { - "$ref": "#/components/schemas/ContainerRegistry" - } - }, - "additionalProperties": false - }, - "DockerSettingConfiguration": { - "type": "object", - "properties": { - "useDocker": { - "type": "boolean", - "nullable": true - }, - "sharedVolumes": { - "type": "boolean", - "nullable": true - }, - "shmSize": { - "type": "string", - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DownloadResourceInfo": { - "type": "object", - "properties": { - "downloadUrl": { - "type": "string", - "nullable": true - }, - "size": { - "type": "integer", - "format": "int64" - } - }, - "additionalProperties": false - }, - "EPRPipelineRunErrorClassificationRequest": { - "type": "object", - "properties": { - "rootRunId": { - "type": "string", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "taskResult": { - "type": "string", - "nullable": true - }, - "failureType": { - "type": "string", - "nullable": true - }, - "failureName": { - "type": "string", - "nullable": true - }, - "responsibleTeam": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ETag": { - "type": "object", - "additionalProperties": false - }, - "EarlyTerminationPolicyType": { - "enum": [ - "Bandit", - "MedianStopping", - "TruncationSelection" - ], - "type": "string" - }, - "EmailNotificationEnableType": { - "enum": [ - "JobCompleted", - "JobFailed", - "JobCancelled" - ], - "type": "string" - }, - "EndpointAuthMode": { - "enum": [ - "AMLToken", - "Key", - "AADToken" - ], - "type": "string" - }, - "EndpointSetting": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "port": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "sslThumbprint": { - "type": "string", - "nullable": true - }, - "endpoint": { - "type": "string", - "nullable": true - }, - "proxyEndpoint": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "errorMessage": { - "type": "string", - "nullable": true - }, - "enabled": { - "type": "boolean", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "nodes": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "EntityInterface": { - "type": "object", - "properties": { - "parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Parameter" - }, - "nullable": true - }, - "ports": { - "$ref": "#/components/schemas/NodePortInterface" - }, - "metadataParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Parameter" - }, - "nullable": true - }, - "dataPathParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataPathParameter" - }, - "nullable": true - }, - "dataPathParameterList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataSetPathParameter" - }, - "nullable": true - }, - "AssetOutputSettingsParameterList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AssetOutputSettingsParameter" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "EntityKind": { - "enum": [ - "Invalid", - "LineageRoot", - "Versioned", - "Unversioned" - ], - "type": "string" - }, - "EntityStatus": { - "enum": [ - "Active", - "Deprecated", - "Disabled" - ], - "type": "string" - }, - "EntityUsage": { - "type": "object", - "properties": { - "totalCount": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - "additionalProperties": false - }, - "EntrySetting": { - "type": "object", - "properties": { - "file": { - "type": "string", - "nullable": true - }, - "className": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "EnumParameterRule": { - "type": "object", - "properties": { - "validValues": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "EnvironmentConfiguration": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "useEnvironmentDefinition": { - "type": "boolean" - }, - "environmentDefinitionString": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "EnvironmentDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "assetId": { - "type": "string", - "nullable": true - }, - "autoRebuild": { - "type": "boolean", - "nullable": true - }, - "python": { - "$ref": "#/components/schemas/PythonSection" - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "docker": { - "$ref": "#/components/schemas/DockerSection" - }, - "spark": { - "$ref": "#/components/schemas/SparkSection" - }, - "r": { - "$ref": "#/components/schemas/RSection" - }, - "inferencingStackVersion": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "EnvironmentDefinitionDto": { - "type": "object", - "properties": { - "environmentName": { - "type": "string", - "nullable": true - }, - "environmentVersion": { - "type": "string", - "nullable": true - }, - "intellectualPropertyPublisher": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ErrorAdditionalInfo": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The additional info type.", - "nullable": true - }, - "info": { - "description": "The additional info.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "The resource management error additional info." - }, - "ErrorHandlingMode": { - "enum": [ - "DefaultInterpolation", - "CustomerFacingInterpolation" - ], - "type": "string" - }, - "ErrorResponse": { - "type": "object", - "properties": { - "error": { - "$ref": "#/components/schemas/RootError" - }, - "correlation": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "description": "Dictionary containing correlation details for the error.", - "nullable": true - }, - "environment": { - "type": "string", - "description": "The hosting environment.", - "nullable": true - }, - "location": { - "type": "string", - "description": "The Azure region.", - "nullable": true - }, - "time": { - "type": "string", - "description": "The time in UTC.", - "format": "date-time" - }, - "componentName": { - "type": "string", - "description": "Component name where error originated/encountered.", - "nullable": true - } - }, - "description": "The error response." - }, - "EsCloudConfiguration": { - "type": "object", - "properties": { - "enableOutputToFileBasedOnDataTypeId": { - "type": "boolean", - "nullable": true - }, - "environment": { - "$ref": "#/components/schemas/EnvironmentConfiguration" - }, - "hyperDriveConfiguration": { - "$ref": "#/components/schemas/HyperDriveConfiguration" - }, - "k8sConfig": { - "$ref": "#/components/schemas/K8sConfiguration" - }, - "resourceConfig": { - "$ref": "#/components/schemas/AEVAResourceConfiguration" - }, - "torchDistributedConfig": { - "$ref": "#/components/schemas/TorchDistributedConfiguration" - }, - "targetSelectorConfig": { - "$ref": "#/components/schemas/TargetSelectorConfiguration" - }, - "dockerConfig": { - "$ref": "#/components/schemas/DockerSettingConfiguration" - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "maxRunDurationSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "identity": { - "$ref": "#/components/schemas/IdentitySetting" - }, - "applicationEndpoints": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ApplicationEndpointConfiguration" - }, - "nullable": true - }, - "runConfig": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "EvaluationFlowRunSettings": { - "type": "object", - "properties": { - "flowRunId": { - "type": "string", - "nullable": true - }, - "upstreamVariantRunVariants": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/VariantIdentifier" - }, - "description": "This is a dictionary", - "nullable": true - }, - "batch_inputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "inputUniversalLink": { - "type": "string", - "nullable": true - }, - "dataInputs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "flowRunOutputDirectory": { - "type": "string", - "nullable": true - }, - "connectionOverrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionOverrideSetting" - }, - "nullable": true - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "inputsMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "connections": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary" - }, - "description": "This is a dictionary", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputDataStore": { - "type": "string", - "nullable": true - }, - "runDisplayNameGenerationType": { - "$ref": "#/components/schemas/RunDisplayNameGenerationType" - }, - "collieRunSettings": { - "$ref": "#/components/schemas/CollieRunSettings" - }, - "workerCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timeoutInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "promptflowEngineType": { - "$ref": "#/components/schemas/PromptflowEngineType" - }, - "experimentNodeName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExampleRequest": { - "type": "object", - "properties": { - "inputs": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "array", - "items": {} - } - }, - "description": "This is a dictionary", - "nullable": true - }, - "globalParameters": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExecutionContextDto": { - "type": "object", - "properties": { - "executable": { - "type": "string", - "nullable": true - }, - "userCode": { - "type": "string", - "nullable": true - }, - "arguments": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExecutionDataLocation": { - "type": "object", - "properties": { - "dataset": { - "$ref": "#/components/schemas/RunDatasetReference" - }, - "dataPath": { - "$ref": "#/components/schemas/ExecutionDataPath" - }, - "uri": { - "$ref": "#/components/schemas/UriReference" - }, - "type": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExecutionDataPath": { - "type": "object", - "properties": { - "datastoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExecutionGlobsOptions": { - "type": "object", - "properties": { - "globPatterns": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ExecutionPhase": { - "enum": [ - "Execution", - "Initialization", - "Finalization" - ], - "type": "string" - }, - "ExperimentComputeMetaInfo": { - "type": "object", - "properties": { - "currentNodeCount": { - "type": "integer", - "format": "int32" - }, - "targetNodeCount": { - "type": "integer", - "format": "int32" - }, - "maxNodeCount": { - "type": "integer", - "format": "int32" - }, - "minNodeCount": { - "type": "integer", - "format": "int32" - }, - "idleNodeCount": { - "type": "integer", - "format": "int32" - }, - "runningNodeCount": { - "type": "integer", - "format": "int32" - }, - "preparingNodeCount": { - "type": "integer", - "format": "int32" - }, - "unusableNodeCount": { - "type": "integer", - "format": "int32" - }, - "leavingNodeCount": { - "type": "integer", - "format": "int32" - }, - "preemptedNodeCount": { - "type": "integer", - "format": "int32" - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "location": { - "type": "string", - "nullable": true - }, - "provisioningState": { - "type": "string", - "nullable": true - }, - "state": { - "type": "string", - "nullable": true - }, - "osType": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "createdByStudio": { - "type": "boolean" - }, - "isGpuType": { - "type": "boolean" - }, - "resourceId": { - "type": "string", - "nullable": true - }, - "computeType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExperimentInfo": { - "type": "object", - "properties": { - "experimentName": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExportComponentMetaInfo": { - "type": "object", - "properties": { - "moduleEntity": { - "$ref": "#/components/schemas/ModuleEntity" - }, - "moduleVersion": { - "type": "string", - "nullable": true - }, - "isAnonymous": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "ExportDataTask": { - "type": "object", - "properties": { - "DataTransferSink": { - "$ref": "#/components/schemas/DataTransferSink" - } - }, - "additionalProperties": false - }, - "ExtensibleObject": { - "type": "object" - }, - "FeaturizationMode": { - "enum": [ - "Auto", - "Custom", - "Off" - ], - "type": "string" - }, - "FeaturizationSettings": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/FeaturizationMode" - }, - "blockedTransformers": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "columnPurposes": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "dropColumns": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "transformerParams": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ColumnTransformer" - }, - "nullable": true - }, - "nullable": true - }, - "datasetLanguage": { - "type": "string", - "nullable": true - }, - "enableDnnFeaturization": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "FeedDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "sharingScopes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SharingScope" - }, - "nullable": true - }, - "supportedAssetTypes": { - "type": "object", - "properties": { - "Component": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "Model": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "Environment": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "Dataset": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "DataStore": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "SampleGraph": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "FlowTool": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "FlowToolSetting": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "FlowConnection": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "FlowSample": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - }, - "FlowRuntimeSpec": { - "$ref": "#/components/schemas/AssetTypeMetaInfo" - } - }, - "additionalProperties": false, - "nullable": true - }, - "regionalWorkspaceStorage": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": "This is a dictionary", - "nullable": true - }, - "intellectualPropertyPublisher": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FileSystem": { - "type": "object", - "properties": { - "connection": { - "type": "string", - "nullable": true - }, - "path": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Flow": { - "type": "object", - "properties": { - "sourceResourceId": { - "type": "string", - "nullable": true - }, - "flowGraph": { - "$ref": "#/components/schemas/FlowGraph" - }, - "nodeVariants": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/NodeVariant" - }, - "description": "This is a dictionary", - "nullable": true - }, - "flowGraphLayout": { - "$ref": "#/components/schemas/FlowGraphLayout" - }, - "bulkTestData": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "evaluationFlows": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowGraphReference" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowAnnotations": { - "type": "object", - "properties": { - "flowName": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - }, - "owner": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "isArchived": { - "type": "boolean" - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "archived": { - "type": "boolean" - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - } - }, - "FlowBaseDto": { - "type": "object", - "properties": { - "flowId": { - "type": "string", - "nullable": true - }, - "flowName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - }, - "owner": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "flowResourceId": { - "type": "string", - "nullable": true - }, - "isArchived": { - "type": "boolean" - }, - "flowDefinitionFilePath": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "identity": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowDto": { - "type": "object", - "properties": { - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "eTag": { - "$ref": "#/components/schemas/ETag" - }, - "flow": { - "$ref": "#/components/schemas/Flow" - }, - "flowRunSettings": { - "$ref": "#/components/schemas/FlowRunSettings" - }, - "flowRunResult": { - "$ref": "#/components/schemas/FlowRunResult" - }, - "flowTestMode": { - "$ref": "#/components/schemas/FlowTestMode" - }, - "flowTestInfos": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowTestInfo" - }, - "nullable": true - }, - "studioPortalEndpoint": { - "type": "string", - "nullable": true - }, - "flowId": { - "type": "string", - "nullable": true - }, - "flowName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - }, - "owner": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "flowResourceId": { - "type": "string", - "nullable": true - }, - "isArchived": { - "type": "boolean" - }, - "flowDefinitionFilePath": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "identity": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowEnvironment": { - "type": "object", - "properties": { - "image": { - "type": "string", - "nullable": true - }, - "python_requirements_txt": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowFeature": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "state": { - "type": "object", - "properties": { - "Runtime": { - "$ref": "#/components/schemas/FlowFeatureStateEnum" - }, - "Executor": { - "$ref": "#/components/schemas/FlowFeatureStateEnum" - }, - "PFS": { - "$ref": "#/components/schemas/FlowFeatureStateEnum" - } - }, - "additionalProperties": false, - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowFeatureStateEnum": { - "enum": [ - "Ready", - "E2ETest" - ], - "type": "string" - }, - "FlowGraph": { - "type": "object", - "properties": { - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Node" - }, - "nullable": true - }, - "tools": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tool" - }, - "nullable": true - }, - "codes": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowInputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowOutputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowGraphAnnotationNode": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "content": { - "type": "string", - "nullable": true - }, - "mentionedNodeNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "structuredContent": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowGraphLayout": { - "type": "object", - "properties": { - "nodeLayouts": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowNodeLayout" - }, - "description": "This is a dictionary", - "nullable": true - }, - "extendedData": { - "type": "string", - "nullable": true - }, - "annotationNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowGraphAnnotationNode" - }, - "nullable": true - }, - "orientation": { - "$ref": "#/components/schemas/Orientation" - } - }, - "additionalProperties": false - }, - "FlowGraphReference": { - "type": "object", - "properties": { - "flowGraph": { - "$ref": "#/components/schemas/FlowGraph" - }, - "referenceResourceId": { - "type": "string", - "nullable": true - }, - "variant": { - "$ref": "#/components/schemas/VariantIdentifier" - } - }, - "additionalProperties": false - }, - "FlowIndexEntity": { - "type": "object", - "properties": { - "schemaId": { - "type": "string", - "nullable": true - }, - "entityId": { - "type": "string", - "nullable": true - }, - "kind": { - "$ref": "#/components/schemas/EntityKind" - }, - "annotations": { - "$ref": "#/components/schemas/FlowAnnotations" - }, - "properties": { - "$ref": "#/components/schemas/FlowProperties" - }, - "internal": { - "$ref": "#/components/schemas/ExtensibleObject" - }, - "updateSequence": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "entityContainerId": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "entityObjectId": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "resourceType": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "relationships": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Relationship" - }, - "nullable": true - }, - "assetId": { - "type": "string", - "nullable": true - }, - "usage": { - "$ref": "#/components/schemas/EntityUsage" - }, - "isAFragment": { - "type": "boolean" - }, - "fragmentId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowInputDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ValueType" - }, - "default": { - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "is_chat_input": { - "type": "boolean" - }, - "is_chat_history": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowLanguage": { - "enum": [ - "Python", - "CSharp", - "TypeScript", - "JavaScript" - ], - "type": "string" - }, - "FlowNode": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ToolType" - }, - "source": { - "$ref": "#/components/schemas/NodeSource" - }, - "inputs": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "activate": { - "$ref": "#/components/schemas/Activate" - }, - "use_variants": { - "type": "boolean" - }, - "comment": { - "type": "string", - "nullable": true - }, - "api": { - "type": "string", - "nullable": true - }, - "provider": { - "type": "string", - "nullable": true - }, - "connection": { - "type": "string", - "nullable": true - }, - "module": { - "type": "string", - "nullable": true - }, - "aggregation": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FlowNodeLayout": { - "type": "object", - "properties": { - "x": { - "type": "number", - "format": "float" - }, - "y": { - "type": "number", - "format": "float" - }, - "width": { - "type": "number", - "format": "float" - }, - "height": { - "type": "number", - "format": "float" - }, - "index": { - "type": "integer", - "format": "int32" - }, - "extendedData": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowNodeVariant": { - "type": "object", - "properties": { - "default_variant_id": { - "type": "string", - "nullable": true - }, - "variants": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowVariantNode" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowOutputDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ValueType" - }, - "description": { - "type": "string", - "nullable": true - }, - "reference": { - "type": "string", - "nullable": true - }, - "evaluation_only": { - "type": "boolean" - }, - "is_chat_output": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "FlowPatchOperationType": { - "enum": [ - "ArchiveFlow", - "RestoreFlow", - "ExportFlowToFile" - ], - "type": "string" - }, - "FlowProperties": { - "type": "object", - "properties": { - "flowId": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "flowDefinitionFilePath": { - "type": "string", - "nullable": true - }, - "creationContext": { - "$ref": "#/components/schemas/CreationContext" - } - } - }, - "FlowRunBasePath": { - "type": "object", - "properties": { - "outputDatastoreName": { - "type": "string", - "nullable": true - }, - "basePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowRunInfo": { - "type": "object", - "properties": { - "flowGraph": { - "$ref": "#/components/schemas/FlowGraph" - }, - "flowGraphLayout": { - "$ref": "#/components/schemas/FlowGraphLayout" - }, - "flowName": { - "type": "string", - "nullable": true - }, - "flowRunResourceId": { - "type": "string", - "nullable": true - }, - "flowRunId": { - "type": "string", - "nullable": true - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "batchInputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "flowRunType": { - "$ref": "#/components/schemas/FlowRunTypeEnum" - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "bulkTestId": { - "type": "string", - "nullable": true - }, - "createdBy": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "createdOn": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "inputsMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputDatastoreName": { - "type": "string", - "nullable": true - }, - "childRunBasePath": { - "type": "string", - "nullable": true - }, - "workingDirectory": { - "type": "string", - "nullable": true - }, - "flowDagFileRelativePath": { - "type": "string", - "nullable": true - }, - "flowSnapshotId": { - "type": "string", - "nullable": true - }, - "studioPortalEndpoint": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowRunMode": { - "enum": [ - "Flow", - "SingleNode", - "FromNode", - "BulkTest", - "Eval", - "PairwiseEval", - "ExperimentTest", - "ExperimentEval" - ], - "type": "string" - }, - "FlowRunResult": { - "type": "object", - "properties": { - "flow_runs": { - "type": "array", - "items": {}, - "nullable": true - }, - "node_runs": { - "type": "array", - "items": {}, - "nullable": true - }, - "errorResponse": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "flowName": { - "type": "string", - "nullable": true - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "flowRunId": { - "type": "string", - "nullable": true - }, - "flowGraph": { - "$ref": "#/components/schemas/FlowGraph" - }, - "flowGraphLayout": { - "$ref": "#/components/schemas/FlowGraphLayout" - }, - "flowRunResourceId": { - "type": "string", - "nullable": true - }, - "bulkTestId": { - "type": "string", - "nullable": true - }, - "batchInputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "createdBy": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "createdOn": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "flowRunType": { - "$ref": "#/components/schemas/FlowRunTypeEnum" - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "amlComputeName": { - "type": "string", - "nullable": true - }, - "flowRunLogs": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "flowTestMode": { - "$ref": "#/components/schemas/FlowTestMode" - }, - "flowTestInfos": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowTestInfo" - }, - "nullable": true - }, - "workingDirectory": { - "type": "string", - "nullable": true - }, - "flowDagFileRelativePath": { - "type": "string", - "nullable": true - }, - "flowSnapshotId": { - "type": "string", - "nullable": true - }, - "variantRunToEvaluationRunsIdMapping": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowRunSettings": { - "type": "object", - "properties": { - "runMode": { - "$ref": "#/components/schemas/FlowRunMode" - }, - "tuningNodeNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "tuningNodeSettings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/TuningNodeSetting" - }, - "description": "This is a dictionary", - "nullable": true - }, - "baselineVariantId": { - "type": "string", - "nullable": true - }, - "defaultVariantId": { - "type": "string", - "nullable": true - }, - "variants": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Node" - } - }, - "description": "This is a dictionary", - "nullable": true - }, - "nodeName": { - "type": "string", - "nullable": true - }, - "isDefaultVariant": { - "type": "boolean" - }, - "nodeVariantId": { - "type": "string", - "nullable": true - }, - "nodeOutputPaths": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "baseFlowRunId": { - "type": "string", - "nullable": true - }, - "flowTestInfos": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowTestInfo" - }, - "nullable": true - }, - "bulkTestId": { - "type": "string", - "nullable": true - }, - "evaluationFlowRunSettings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EvaluationFlowRunSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "bulkTestFlowId": { - "type": "string", - "nullable": true - }, - "bulkTestFlowRunIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "batch_inputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "inputUniversalLink": { - "type": "string", - "nullable": true - }, - "dataInputs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "flowRunOutputDirectory": { - "type": "string", - "nullable": true - }, - "connectionOverrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionOverrideSetting" - }, - "nullable": true - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "inputsMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "connections": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary" - }, - "description": "This is a dictionary", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputDataStore": { - "type": "string", - "nullable": true - }, - "runDisplayNameGenerationType": { - "$ref": "#/components/schemas/RunDisplayNameGenerationType" - }, - "collieRunSettings": { - "$ref": "#/components/schemas/CollieRunSettings" - }, - "workerCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timeoutInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "promptflowEngineType": { - "$ref": "#/components/schemas/PromptflowEngineType" - }, - "experimentNodeName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowRunSettingsBase": { - "type": "object", - "properties": { - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "inputsMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "connections": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary" - }, - "description": "This is a dictionary", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputDataStore": { - "type": "string", - "nullable": true - }, - "runDisplayNameGenerationType": { - "$ref": "#/components/schemas/RunDisplayNameGenerationType" - }, - "collieRunSettings": { - "$ref": "#/components/schemas/CollieRunSettings" - }, - "workerCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timeoutInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "promptflowEngineType": { - "$ref": "#/components/schemas/PromptflowEngineType" - }, - "experimentNodeName": { - "type": "string", - "nullable": true - }, - "batch_inputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "inputUniversalLink": { - "type": "string", - "nullable": true - }, - "dataInputs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "flowRunOutputDirectory": { - "type": "string", - "nullable": true - }, - "connectionOverrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionOverrideSetting" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowRunStatusEnum": { - "enum": [ - "Started", - "Completed", - "Failed", - "Cancelled", - "NotStarted", - "Running", - "Queued", - "Paused", - "Unapproved", - "Starting", - "Preparing", - "CancelRequested", - "Pausing", - "Finalizing", - "Canceled", - "Bypassed" - ], - "type": "string" - }, - "FlowRunStatusResponse": { - "type": "object", - "properties": { - "flowRunStatus": { - "$ref": "#/components/schemas/FlowRunStatusEnum" - }, - "lastCheckedTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "flowRunCreatedTime": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "FlowRunTypeEnum": { - "enum": [ - "FlowRun", - "EvaluationRun", - "PairwiseEvaluationRun", - "SingleNodeRun", - "FromNodeRun" - ], - "type": "string" - }, - "FlowRuntimeCapability": { - "type": "object", - "properties": { - "flowFeatures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowFeature" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowRuntimeDto": { - "type": "object", - "properties": { - "runtimeName": { - "type": "string", - "nullable": true - }, - "runtimeDescription": { - "type": "string", - "nullable": true - }, - "runtimeType": { - "$ref": "#/components/schemas/RuntimeType" - }, - "environment": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RuntimeStatusEnum" - }, - "statusMessage": { - "type": "string", - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "fromExistingEndpoint": { - "type": "boolean" - }, - "endpointName": { - "type": "string", - "nullable": true - }, - "fromExistingDeployment": { - "type": "boolean" - }, - "deploymentName": { - "type": "string", - "nullable": true - }, - "identity": { - "$ref": "#/components/schemas/ManagedServiceIdentity" - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32" - }, - "computeInstanceName": { - "type": "string", - "nullable": true - }, - "dockerImage": { - "type": "string", - "nullable": true - }, - "publishedPort": { - "type": "integer", - "format": "int32" - }, - "targetPort": { - "type": "integer", - "format": "int32" - }, - "fromExistingCustomApp": { - "type": "boolean" - }, - "customAppName": { - "type": "string", - "nullable": true - }, - "assignedTo": { - "$ref": "#/components/schemas/AssignedUser" - }, - "endpointUrl": { - "type": "string", - "nullable": true - }, - "createdOn": { - "type": "string", - "format": "date-time" - }, - "modifiedOn": { - "type": "string", - "format": "date-time" - }, - "owner": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - } - }, - "additionalProperties": false - }, - "FlowSessionDto": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "nullable": true - }, - "baseImage": { - "type": "string", - "nullable": true - }, - "packages": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "computeName": { - "type": "string", - "nullable": true - }, - "flowFeatures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowFeature" - }, - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "runtimeDescription": { - "type": "string", - "nullable": true - }, - "runtimeType": { - "$ref": "#/components/schemas/RuntimeType" - }, - "environment": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RuntimeStatusEnum" - }, - "statusMessage": { - "type": "string", - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "fromExistingEndpoint": { - "type": "boolean" - }, - "endpointName": { - "type": "string", - "nullable": true - }, - "fromExistingDeployment": { - "type": "boolean" - }, - "deploymentName": { - "type": "string", - "nullable": true - }, - "identity": { - "$ref": "#/components/schemas/ManagedServiceIdentity" - }, - "instanceType": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32" - }, - "computeInstanceName": { - "type": "string", - "nullable": true - }, - "dockerImage": { - "type": "string", - "nullable": true - }, - "publishedPort": { - "type": "integer", - "format": "int32" - }, - "targetPort": { - "type": "integer", - "format": "int32" - }, - "fromExistingCustomApp": { - "type": "boolean" - }, - "customAppName": { - "type": "string", - "nullable": true - }, - "assignedTo": { - "$ref": "#/components/schemas/AssignedUser" - }, - "endpointUrl": { - "type": "string", - "nullable": true - }, - "createdOn": { - "type": "string", - "format": "date-time" - }, - "modifiedOn": { - "type": "string", - "format": "date-time" - }, - "owner": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - } - }, - "additionalProperties": false - }, - "FlowSnapshot": { - "type": "object", - "properties": { - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowInputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowOutputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowNode" - }, - "nullable": true - }, - "node_variants": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowNodeVariant" - }, - "description": "This is a dictionary", - "nullable": true - }, - "environment": { - "$ref": "#/components/schemas/FlowEnvironment" - }, - "environment_variables": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - }, - "language": { - "$ref": "#/components/schemas/FlowLanguage" - }, - "path": { - "type": "string", - "nullable": true - }, - "entry": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowSubmitRunSettings": { - "type": "object", - "properties": { - "nodeInputs": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - }, - "runMode": { - "$ref": "#/components/schemas/FlowRunMode" - }, - "tuningNodeNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "tuningNodeSettings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/TuningNodeSetting" - }, - "description": "This is a dictionary", - "nullable": true - }, - "baselineVariantId": { - "type": "string", - "nullable": true - }, - "defaultVariantId": { - "type": "string", - "nullable": true - }, - "variants": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Node" - } - }, - "description": "This is a dictionary", - "nullable": true - }, - "nodeName": { - "type": "string", - "nullable": true - }, - "isDefaultVariant": { - "type": "boolean" - }, - "nodeVariantId": { - "type": "string", - "nullable": true - }, - "nodeOutputPaths": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "baseFlowRunId": { - "type": "string", - "nullable": true - }, - "flowTestInfos": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowTestInfo" - }, - "nullable": true - }, - "bulkTestId": { - "type": "string", - "nullable": true - }, - "evaluationFlowRunSettings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EvaluationFlowRunSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "bulkTestFlowId": { - "type": "string", - "nullable": true - }, - "bulkTestFlowRunIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "batch_inputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "inputUniversalLink": { - "type": "string", - "nullable": true - }, - "dataInputs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "flowRunOutputDirectory": { - "type": "string", - "nullable": true - }, - "connectionOverrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionOverrideSetting" - }, - "nullable": true - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "inputsMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "connections": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary" - }, - "description": "This is a dictionary", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputDataStore": { - "type": "string", - "nullable": true - }, - "runDisplayNameGenerationType": { - "$ref": "#/components/schemas/RunDisplayNameGenerationType" - }, - "collieRunSettings": { - "$ref": "#/components/schemas/CollieRunSettings" - }, - "workerCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timeoutInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "promptflowEngineType": { - "$ref": "#/components/schemas/PromptflowEngineType" - }, - "experimentNodeName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowTestInfo": { - "type": "object", - "properties": { - "variantId": { - "type": "string", - "nullable": true - }, - "tuningNodeName": { - "type": "string", - "nullable": true - }, - "flowRunId": { - "type": "string", - "nullable": true - }, - "flowTestStorageSetting": { - "$ref": "#/components/schemas/FlowTestStorageSetting" - }, - "flowRunType": { - "$ref": "#/components/schemas/FlowRunTypeEnum" - }, - "variantRunId": { - "type": "string", - "nullable": true - }, - "evaluationName": { - "type": "string", - "nullable": true - }, - "outputUniversalLink": { - "type": "string", - "nullable": true - }, - "experimentNodeName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowTestMode": { - "enum": [ - "Sync", - "Async" - ], - "type": "string" - }, - "FlowTestStorageSetting": { - "type": "object", - "properties": { - "storageAccountName": { - "type": "string", - "nullable": true - }, - "blobContainerName": { - "type": "string", - "nullable": true - }, - "flowArtifactsRootPath": { - "type": "string", - "nullable": true - }, - "outputDatastoreName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowToolSettingParameter": { - "type": "object", - "properties": { - "type": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValueType" - }, - "nullable": true - }, - "default": { - "type": "string", - "nullable": true - }, - "advanced": { - "type": "boolean", - "nullable": true - }, - "enum": { - "type": "array", - "items": {}, - "nullable": true - }, - "model_list": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "capabilities": { - "$ref": "#/components/schemas/AzureOpenAIModelCapabilities" - }, - "allow_manual_entry": { - "type": "boolean", - "nullable": true - }, - "ui_hints": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowToolsDto": { - "type": "object", - "properties": { - "package": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Tool" - }, - "description": "This is a dictionary", - "nullable": true - }, - "code": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Tool" - }, - "description": "This is a dictionary", - "nullable": true - }, - "errors": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "FlowType": { - "enum": [ - "Default", - "Evaluation", - "Chat", - "Rag" - ], - "type": "string" - }, - "FlowVariantNode": { - "type": "object", - "properties": { - "node": { - "$ref": "#/components/schemas/FlowNode" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ForecastHorizon": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/ForecastHorizonMode" - }, - "value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "ForecastHorizonMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "ForecastingSettings": { - "type": "object", - "properties": { - "countryOrRegionForHolidays": { - "type": "string", - "nullable": true - }, - "timeColumnName": { - "type": "string", - "nullable": true - }, - "targetLags": { - "$ref": "#/components/schemas/TargetLags" - }, - "targetRollingWindowSize": { - "$ref": "#/components/schemas/TargetRollingWindowSize" - }, - "forecastHorizon": { - "$ref": "#/components/schemas/ForecastHorizon" - }, - "timeSeriesIdColumnNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "frequency": { - "type": "string", - "nullable": true - }, - "featureLags": { - "type": "string", - "nullable": true - }, - "seasonality": { - "$ref": "#/components/schemas/Seasonality" - }, - "shortSeriesHandlingConfig": { - "$ref": "#/components/schemas/ShortSeriesHandlingConfiguration" - }, - "useStl": { - "$ref": "#/components/schemas/UseStl" - }, - "targetAggregateFunction": { - "$ref": "#/components/schemas/TargetAggregationFunction" - }, - "cvStepSize": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "featuresUnknownAtForecastTime": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Framework": { - "enum": [ - "Python", - "PySpark", - "Cntk", - "TensorFlow", - "PyTorch", - "PySparkInteractive", - "R" - ], - "type": "string" - }, - "Frequency": { - "enum": [ - "Month", - "Week", - "Day", - "Hour", - "Minute" - ], - "type": "string" - }, - "GeneralSettings": { - "type": "object", - "properties": { - "primaryMetric": { - "$ref": "#/components/schemas/PrimaryMetrics" - }, - "taskType": { - "$ref": "#/components/schemas/TaskType" - }, - "logVerbosity": { - "$ref": "#/components/schemas/LogVerbosity" - } - }, - "additionalProperties": false - }, - "GeneratePipelineComponentRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "moduleScope": { - "$ref": "#/components/schemas/ModuleScope" - }, - "isDeterministic": { - "type": "boolean", - "nullable": true - }, - "category": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "setAsDefaultVersion": { - "type": "boolean" - }, - "registryName": { - "type": "string", - "nullable": true - }, - "graph": { - "$ref": "#/components/schemas/GraphDraftEntity" - }, - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "moduleNodeRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeRunSetting" - }, - "nullable": true - }, - "moduleNodeUIInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enforceRerun": { - "type": "boolean", - "nullable": true - }, - "datasetAccessModes": { - "$ref": "#/components/schemas/DatasetAccessModes" - } - }, - "additionalProperties": false - }, - "GenerateToolMetaRequest": { - "type": "object", - "properties": { - "tools": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ToolSourceMeta" - }, - "description": "This is a dictionary", - "nullable": true - }, - "working_dir": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "GetDynamicListRequest": { - "type": "object", - "properties": { - "func_path": { - "type": "string", - "nullable": true - }, - "func_kwargs": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "GetRunDataResultDto": { - "type": "object", - "properties": { - "runMetadata": { - "$ref": "#/components/schemas/RunDto" - }, - "runDefinition": { - "nullable": true - }, - "jobSpecification": { - "nullable": true - }, - "systemSettings": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "GetTrainingSessionDto": { - "type": "object", - "properties": { - "properties": { - "$ref": "#/components/schemas/SessionProperties" - }, - "compute": { - "$ref": "#/components/schemas/ComputeContract" - } - }, - "additionalProperties": false - }, - "GlobalJobDispatcherConfiguration": { - "type": "object", - "properties": { - "vmSize": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "computeType": { - "$ref": "#/components/schemas/GlobalJobDispatcherSupportedComputeType" - }, - "region": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "myResourceOnly": { - "type": "boolean" - }, - "redispatchAllowed": { - "type": "boolean", - "nullable": true - }, - "lowPriorityVMTolerant": { - "type": "boolean" - }, - "vcList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "planId": { - "type": "string", - "nullable": true - }, - "planRegionId": { - "type": "string", - "nullable": true - }, - "vcBlockList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "clusterBlockList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "GlobalJobDispatcherSupportedComputeType": { - "enum": [ - "AmlCompute", - "AmlK8s" - ], - "type": "string" - }, - "GlobsOptions": { - "type": "object", - "properties": { - "globPatterns": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphAnnotationNode": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "content": { - "type": "string", - "nullable": true - }, - "mentionedNodeNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "structuredContent": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphComponentsMode": { - "enum": [ - "Normal", - "AllDesignerBuildin", - "ContainsDesignerBuildin" - ], - "type": "string" - }, - "GraphControlNode": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "controlType": { - "$ref": "#/components/schemas/ControlType" - }, - "controlParameter": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "runAttribution": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphControlReferenceNode": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "comment": { - "type": "string", - "nullable": true - }, - "controlFlowType": { - "$ref": "#/components/schemas/ControlFlowType" - }, - "referenceNodeId": { - "type": "string", - "nullable": true - }, - "doWhileControlFlowInfo": { - "$ref": "#/components/schemas/DoWhileControlFlowInfo" - }, - "parallelForControlFlowInfo": { - "$ref": "#/components/schemas/ParallelForControlFlowInfo" - }, - "runAttribution": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphDatasetNode": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "datasetId": { - "type": "string", - "nullable": true - }, - "dataPathParameterName": { - "type": "string", - "nullable": true - }, - "dataSetDefinition": { - "$ref": "#/components/schemas/DataSetDefinition" - } - }, - "additionalProperties": false - }, - "GraphDatasetsLoadModes": { - "enum": [ - "SkipDatasetsLoad", - "V1RegisteredDataset", - "V1SavedDataset", - "PersistDatasetsInfo", - "SubmissionNeededUpstreamDatasetOnly", - "SubmissionNeededInCompleteDatasetOnly", - "V2Asset", - "Submission", - "AllRegisteredData", - "AllData" - ], - "type": "string" - }, - "GraphDraftEntity": { - "type": "object", - "properties": { - "moduleNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNode" - }, - "nullable": true - }, - "datasetNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphDatasetNode" - }, - "nullable": true - }, - "subGraphNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphReferenceNode" - }, - "nullable": true - }, - "controlReferenceNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphControlReferenceNode" - }, - "nullable": true - }, - "controlNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphControlNode" - }, - "nullable": true - }, - "edges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphEdge" - }, - "nullable": true - }, - "entityInterface": { - "$ref": "#/components/schemas/EntityInterface" - }, - "graphLayout": { - "$ref": "#/components/schemas/GraphLayout" - }, - "createdBy": { - "$ref": "#/components/schemas/CreatedBy" - }, - "lastUpdatedBy": { - "$ref": "#/components/schemas/CreatedBy" - }, - "defaultCompute": { - "$ref": "#/components/schemas/ComputeSetting" - }, - "defaultDatastore": { - "$ref": "#/components/schemas/DatastoreSetting" - }, - "defaultCloudPriority": { - "$ref": "#/components/schemas/CloudPrioritySetting" - }, - "extendedProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "parentSubGraphModuleIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "GraphEdge": { - "type": "object", - "properties": { - "sourceOutputPort": { - "$ref": "#/components/schemas/PortInfo" - }, - "destinationInputPort": { - "$ref": "#/components/schemas/PortInfo" - } - }, - "additionalProperties": false - }, - "GraphLayout": { - "type": "object", - "properties": { - "nodeLayouts": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/NodeLayout" - }, - "description": "This is a dictionary", - "nullable": true - }, - "extendedData": { - "type": "string", - "nullable": true - }, - "annotationNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphAnnotationNode" - }, - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "GraphLayoutCreationInfo": { - "type": "object", - "properties": { - "nodeLayouts": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/NodeLayout" - }, - "description": "This is a dictionary", - "nullable": true - }, - "extendedData": { - "type": "string", - "nullable": true - }, - "annotationNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphAnnotationNode" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphModuleNode": { - "type": "object", - "properties": { - "moduleType": { - "$ref": "#/components/schemas/ModuleType" - }, - "runconfig": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "moduleId": { - "type": "string", - "nullable": true - }, - "comment": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "moduleParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "nullable": true - }, - "moduleMetadataParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "nullable": true - }, - "moduleOutputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OutputSetting" - }, - "nullable": true - }, - "moduleInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InputSetting" - }, - "nullable": true - }, - "useGraphDefaultCompute": { - "type": "boolean" - }, - "useGraphDefaultDatastore": { - "type": "boolean" - }, - "regenerateOutput": { - "type": "boolean" - }, - "controlInputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ControlInput" - }, - "nullable": true - }, - "cloudSettings": { - "$ref": "#/components/schemas/CloudSettings" - }, - "executionPhase": { - "$ref": "#/components/schemas/ExecutionPhase" - }, - "runAttribution": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphModuleNodeRunSetting": { - "type": "object", - "properties": { - "nodeId": { - "type": "string", - "nullable": true - }, - "moduleId": { - "type": "string", - "nullable": true - }, - "stepType": { - "type": "string", - "nullable": true - }, - "runSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphModuleNodeUIInputSetting": { - "type": "object", - "properties": { - "nodeId": { - "type": "string", - "nullable": true - }, - "moduleId": { - "type": "string", - "nullable": true - }, - "moduleInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UIInputSetting" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphNodeStatusInfo": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/TaskStatusCode" - }, - "runStatus": { - "$ref": "#/components/schemas/RunStatus" - }, - "isBypassed": { - "type": "boolean" - }, - "hasFailedChildRun": { - "type": "boolean" - }, - "partiallyExecuted": { - "type": "boolean" - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "aetherStartTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "aetherEndTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "aetherCreationTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runHistoryStartTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runHistoryEndTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runHistoryCreationTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "reuseInfo": { - "$ref": "#/components/schemas/TaskReuseInfo" - }, - "controlFlowInfo": { - "$ref": "#/components/schemas/TaskControlFlowInfo" - }, - "statusCode": { - "$ref": "#/components/schemas/TaskStatusCode" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "creationTime": { - "type": "string", - "format": "date-time" - }, - "scheduleTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requestId": { - "type": "string", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "dataContainerId": { - "type": "string", - "nullable": true - }, - "realTimeLogPath": { - "type": "string", - "nullable": true - }, - "hasWarnings": { - "type": "boolean" - }, - "compositeNodeId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphReferenceNode": { - "type": "object", - "properties": { - "graphId": { - "type": "string", - "nullable": true - }, - "defaultCompute": { - "$ref": "#/components/schemas/ComputeSetting" - }, - "defaultDatastore": { - "$ref": "#/components/schemas/DatastoreSetting" - }, - "id": { - "type": "string", - "nullable": true - }, - "moduleId": { - "type": "string", - "nullable": true - }, - "comment": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "moduleParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "nullable": true - }, - "moduleMetadataParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "nullable": true - }, - "moduleOutputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OutputSetting" - }, - "nullable": true - }, - "moduleInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InputSetting" - }, - "nullable": true - }, - "useGraphDefaultCompute": { - "type": "boolean" - }, - "useGraphDefaultDatastore": { - "type": "boolean" - }, - "regenerateOutput": { - "type": "boolean" - }, - "controlInputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ControlInput" - }, - "nullable": true - }, - "cloudSettings": { - "$ref": "#/components/schemas/CloudSettings" - }, - "executionPhase": { - "$ref": "#/components/schemas/ExecutionPhase" - }, - "runAttribution": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "GraphSdkCodeType": { - "enum": [ - "Python", - "JupyterNotebook", - "Unknown" - ], - "type": "string" - }, - "HdfsReference": { - "type": "object", - "properties": { - "amlDataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "HdiClusterComputeInfo": { - "type": "object", - "properties": { - "address": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "privateKey": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "HdiConfiguration": { - "type": "object", - "properties": { - "yarnDeployMode": { - "$ref": "#/components/schemas/YarnDeployMode" - } - }, - "additionalProperties": false - }, - "HdiRunConfiguration": { - "type": "object", - "properties": { - "file": { - "type": "string", - "nullable": true - }, - "className": { - "type": "string", - "nullable": true - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "archives": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "jars": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "pyFiles": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "computeName": { - "type": "string", - "nullable": true - }, - "queue": { - "type": "string", - "nullable": true - }, - "driverMemory": { - "type": "string", - "nullable": true - }, - "driverCores": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "executorMemory": { - "type": "string", - "nullable": true - }, - "executorCores": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "numberExecutors": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "conf": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "HistoryConfiguration": { - "type": "object", - "properties": { - "outputCollection": { - "type": "boolean", - "default": true - }, - "directoriesToWatch": { - "type": "array", - "items": { - "type": "string" - }, - "default": [ - "logs" - ], - "nullable": true - }, - "enableMLflowTracking": { - "type": "boolean", - "default": true - } - } - }, - "HttpStatusCode": { - "enum": [ - "Continue", - "SwitchingProtocols", - "Processing", - "EarlyHints", - "OK", - "Created", - "Accepted", - "NonAuthoritativeInformation", - "NoContent", - "ResetContent", - "PartialContent", - "MultiStatus", - "AlreadyReported", - "IMUsed", - "MultipleChoices", - "Ambiguous", - "MovedPermanently", - "Moved", - "Found", - "Redirect", - "SeeOther", - "RedirectMethod", - "NotModified", - "UseProxy", - "Unused", - "TemporaryRedirect", - "RedirectKeepVerb", - "PermanentRedirect", - "BadRequest", - "Unauthorized", - "PaymentRequired", - "Forbidden", - "NotFound", - "MethodNotAllowed", - "NotAcceptable", - "ProxyAuthenticationRequired", - "RequestTimeout", - "Conflict", - "Gone", - "LengthRequired", - "PreconditionFailed", - "RequestEntityTooLarge", - "RequestUriTooLong", - "UnsupportedMediaType", - "RequestedRangeNotSatisfiable", - "ExpectationFailed", - "MisdirectedRequest", - "UnprocessableEntity", - "Locked", - "FailedDependency", - "UpgradeRequired", - "PreconditionRequired", - "TooManyRequests", - "RequestHeaderFieldsTooLarge", - "UnavailableForLegalReasons", - "InternalServerError", - "NotImplemented", - "BadGateway", - "ServiceUnavailable", - "GatewayTimeout", - "HttpVersionNotSupported", - "VariantAlsoNegotiates", - "InsufficientStorage", - "LoopDetected", - "NotExtended", - "NetworkAuthenticationRequired" - ], - "type": "string" - }, - "HyperDriveConfiguration": { - "type": "object", - "properties": { - "hyperDriveRunConfig": { - "type": "string", - "nullable": true - }, - "primaryMetricGoal": { - "type": "string", - "nullable": true - }, - "primaryMetricName": { - "type": "string", - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArgumentAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "IActionResult": { - "type": "object", - "additionalProperties": false - }, - "ICheckableLongRunningOperationResponse": { - "type": "object", - "properties": { - "completionResult": { - "$ref": "#/components/schemas/LongRunningNullResponse" - }, - "location": { - "type": "string", - "format": "uri", - "nullable": true - }, - "operationResult": { - "type": "string", - "format": "uri", - "nullable": true - } - }, - "additionalProperties": false - }, - "IdentityConfiguration": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/IdentityType" - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "secret": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "IdentitySetting": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AEVAIdentityType" - }, - "clientId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "objectId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "msiResourceId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "IdentityType": { - "enum": [ - "Managed", - "ServicePrincipal", - "AMLToken" - ], - "type": "string" - }, - "ImportDataTask": { - "type": "object", - "properties": { - "DataTransferSource": { - "$ref": "#/components/schemas/DataTransferSource" - } - }, - "additionalProperties": false - }, - "IndexedErrorResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "nullable": true - }, - "errorCodeHierarchy": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "nullable": true - }, - "time": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "componentName": { - "type": "string", - "nullable": true - }, - "severity": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "detailsUri": { - "type": "string", - "format": "uri", - "nullable": true - }, - "referenceCode": { - "type": "string", - "nullable": true - } - } - }, - "InitScriptInfoDto": { - "type": "object", - "properties": { - "dbfs": { - "$ref": "#/components/schemas/DbfsStorageInfoDto" - } - }, - "additionalProperties": false - }, - "InnerErrorDetails": { - "type": "object", - "properties": { - "code": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "nullable": true - }, - "target": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "InnerErrorResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The error code.", - "nullable": true - }, - "innerError": { - "$ref": "#/components/schemas/InnerErrorResponse" - } - }, - "additionalProperties": false, - "description": "A nested structure of errors." - }, - "InputAsset": { - "type": "object", - "properties": { - "asset": { - "$ref": "#/components/schemas/Asset" - }, - "mechanism": { - "$ref": "#/components/schemas/DeliveryMechanism" - }, - "environmentVariableName": { - "type": "string", - "nullable": true - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "overwrite": { - "type": "boolean" - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "InputData": { - "type": "object", - "properties": { - "datasetId": { - "type": "string", - "nullable": true - }, - "mode": { - "$ref": "#/components/schemas/DataBindingMode" - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "InputDataBinding": { - "type": "object", - "properties": { - "dataId": { - "type": "string", - "nullable": true - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "mode": { - "$ref": "#/components/schemas/DataBindingMode" - }, - "description": { - "type": "string", - "nullable": true - }, - "uri": { - "$ref": "#/components/schemas/MfeInternalUriReference" - }, - "value": { - "type": "string", - "nullable": true - }, - "assetUri": { - "type": "string", - "nullable": true - }, - "jobInputType": { - "$ref": "#/components/schemas/JobInputType" - } - }, - "additionalProperties": false - }, - "InputDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValueType" - }, - "nullable": true - }, - "default": { - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "enabled_by": { - "type": "string", - "nullable": true - }, - "enabled_by_type": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValueType" - }, - "nullable": true - }, - "enabled_by_value": { - "type": "array", - "items": {}, - "nullable": true - }, - "model_list": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "capabilities": { - "$ref": "#/components/schemas/AzureOpenAIModelCapabilities" - }, - "dynamic_list": { - "$ref": "#/components/schemas/ToolInputDynamicList" - }, - "allow_manual_entry": { - "type": "boolean" - }, - "is_multi_select": { - "type": "boolean" - }, - "generated_by": { - "$ref": "#/components/schemas/ToolInputGeneratedBy" - }, - "input_type": { - "$ref": "#/components/schemas/InputType" - }, - "advanced": { - "type": "boolean", - "nullable": true - }, - "ui_hints": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "InputOutputPortMetadata": { - "type": "object", - "properties": { - "graphModuleNodeId": { - "type": "string", - "nullable": true - }, - "portName": { - "type": "string", - "nullable": true - }, - "schema": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true, - "readOnly": true - } - }, - "additionalProperties": false - }, - "InputSetting": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AEVADataStoreMode" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "options": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "additionalTransformations": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "InputType": { - "enum": [ - "default", - "uionly_hidden" - ], - "type": "string" - }, - "IntellectualPropertyAccessMode": { - "enum": [ - "ReadOnly", - "ReadWrite" - ], - "type": "string" - }, - "IntellectualPropertyPublisherInformation": { - "type": "object", - "properties": { - "intellectualPropertyPublisher": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "InteractiveConfig": { - "type": "object", - "properties": { - "isSSHEnabled": { - "type": "boolean", - "nullable": true - }, - "sshPublicKey": { - "type": "string", - "nullable": true - }, - "isIPythonEnabled": { - "type": "boolean", - "nullable": true - }, - "isTensorBoardEnabled": { - "type": "boolean", - "nullable": true - }, - "interactivePort": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "InteractiveConfiguration": { - "type": "object", - "properties": { - "isSSHEnabled": { - "type": "boolean", - "nullable": true - }, - "sshPublicKey": { - "type": "string", - "nullable": true - }, - "isIPythonEnabled": { - "type": "boolean", - "nullable": true - }, - "isTensorBoardEnabled": { - "type": "boolean", - "nullable": true - }, - "interactivePort": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "JobCost": { - "type": "object", - "properties": { - "chargedCpuCoreSeconds": { - "type": "number", - "format": "double", - "nullable": true - }, - "chargedCpuMemoryMegabyteSeconds": { - "type": "number", - "format": "double", - "nullable": true - }, - "chargedGpuSeconds": { - "type": "number", - "format": "double", - "nullable": true - }, - "chargedNodeUtilizationSeconds": { - "type": "number", - "format": "double", - "nullable": true - } - } - }, - "JobEndpoint": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "port": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "endpoint": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "errorMessage": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "nodes": { - "$ref": "#/components/schemas/MfeInternalNodes" - } - }, - "additionalProperties": false - }, - "JobInput": { - "required": [ - "jobInputType" - ], - "type": "object", - "properties": { - "jobInputType": { - "$ref": "#/components/schemas/JobInputType" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "JobInputType": { - "enum": [ - "Dataset", - "Uri", - "Literal", - "UriFile", - "UriFolder", - "MLTable", - "CustomModel", - "MLFlowModel", - "TritonModel" - ], - "type": "string" - }, - "JobLimitsType": { - "enum": [ - "Command", - "Sweep" - ], - "type": "string" - }, - "JobOutput": { - "required": [ - "jobOutputType" - ], - "type": "object", - "properties": { - "jobOutputType": { - "$ref": "#/components/schemas/JobOutputType" - }, - "description": { - "type": "string", - "nullable": true - }, - "autoDeleteSetting": { - "$ref": "#/components/schemas/AutoDeleteSetting" - } - }, - "additionalProperties": false - }, - "JobOutputArtifacts": { - "type": "object", - "properties": { - "datastoreId": { - "type": "string", - "nullable": true - }, - "path": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "JobOutputType": { - "enum": [ - "Uri", - "Dataset", - "UriFile", - "UriFolder", - "MLTable", - "CustomModel", - "MLFlowModel", - "TritonModel" - ], - "type": "string" - }, - "JobProvisioningState": { - "enum": [ - "Succeeded", - "Failed", - "Canceled", - "InProgress" - ], - "type": "string" - }, - "JobScheduleDto": { - "type": "object", - "properties": { - "jobType": { - "$ref": "#/components/schemas/JobType" - }, - "systemData": { - "$ref": "#/components/schemas/SystemData" - }, - "name": { - "type": "string", - "nullable": true - }, - "jobDefinitionId": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "triggerType": { - "$ref": "#/components/schemas/TriggerType" - }, - "recurrence": { - "$ref": "#/components/schemas/Recurrence" - }, - "cron": { - "$ref": "#/components/schemas/Cron" - }, - "status": { - "$ref": "#/components/schemas/ScheduleStatus" - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "JobStatus": { - "enum": [ - "NotStarted", - "Starting", - "Provisioning", - "Preparing", - "Queued", - "Running", - "Finalizing", - "CancelRequested", - "Completed", - "Failed", - "Canceled", - "NotResponding", - "Paused", - "Unknown", - "Scheduled" - ], - "type": "string" - }, - "JobType": { - "enum": [ - "Command", - "Sweep", - "Labeling", - "Pipeline", - "Data", - "AutoML", - "Spark", - "Base", - "FineTuning" - ], - "type": "string" - }, - "K8sConfiguration": { - "type": "object", - "properties": { - "maxRetryCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "resourceConfiguration": { - "$ref": "#/components/schemas/ResourceConfig" - }, - "priorityConfiguration": { - "$ref": "#/components/schemas/PriorityConfig" - }, - "interactiveConfiguration": { - "$ref": "#/components/schemas/InteractiveConfig" - } - }, - "additionalProperties": false - }, - "KeyType": { - "enum": [ - "Primary", - "Secondary" - ], - "type": "string" - }, - "KeyValuePairComponentNameMetaInfoErrorResponse": { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/ComponentNameMetaInfo" - }, - "value": { - "$ref": "#/components/schemas/ErrorResponse" - } - }, - "additionalProperties": false - }, - "KeyValuePairComponentNameMetaInfoModuleDto": { - "type": "object", - "properties": { - "key": { - "$ref": "#/components/schemas/ComponentNameMetaInfo" - }, - "value": { - "$ref": "#/components/schemas/ModuleDto" - } - }, - "additionalProperties": false - }, - "KeyValuePairStringObject": { - "type": "object", - "properties": { - "key": { - "type": "string", - "nullable": true - }, - "value": { - "nullable": true - } - }, - "additionalProperties": false - }, - "KubernetesConfiguration": { - "type": "object", - "properties": { - "instanceType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Kwarg": { - "type": "object", - "properties": { - "key": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "LegacyDataPath": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AEVADataStoreMode" - }, - "relativePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "LimitSettings": { - "type": "object", - "properties": { - "maxTrials": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timeout": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "trialTimeout": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "maxConcurrentTrials": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxCoresPerTrial": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exitScore": { - "type": "number", - "format": "double", - "nullable": true - }, - "enableEarlyTermination": { - "type": "boolean", - "nullable": true - }, - "maxNodes": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "LinkedADBWorkspaceMetadata": { - "type": "object", - "properties": { - "workspaceId": { - "type": "string", - "nullable": true - }, - "region": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "LinkedPipelineInfo": { - "type": "object", - "properties": { - "pipelineType": { - "$ref": "#/components/schemas/PipelineType" - }, - "moduleNodeId": { - "type": "string", - "nullable": true - }, - "portName": { - "type": "string", - "nullable": true - }, - "linkedPipelineDraftId": { - "type": "string", - "nullable": true - }, - "linkedPipelineRunId": { - "type": "string", - "nullable": true - }, - "isDirectLink": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ListViewType": { - "enum": [ - "ActiveOnly", - "ArchivedOnly", - "All" - ], - "type": "string" - }, - "LoadFlowAsComponentRequest": { - "type": "object", - "properties": { - "componentName": { - "type": "string", - "nullable": true - }, - "componentVersion": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "isDeterministic": { - "type": "boolean" - }, - "flowDefinitionFilePath": { - "type": "string", - "nullable": true - }, - "flowDefinitionResourceId": { - "type": "string", - "nullable": true - }, - "flowDefinitionDataStoreName": { - "type": "string", - "nullable": true - }, - "flowDefinitionBlobPath": { - "type": "string", - "nullable": true - }, - "flowDefinitionDataUri": { - "type": "string", - "nullable": true - }, - "nodeVariant": { - "type": "string", - "nullable": true - }, - "inputsMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "connections": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary" - }, - "description": "This is a dictionary", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "sessionId": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - "additionalProperties": false - }, - "LogLevel": { - "enum": [ - "Trace", - "Debug", - "Information", - "Warning", - "Error", - "Critical", - "None" - ], - "type": "string" - }, - "LogRunTerminatedEventDto": { - "type": "object", - "properties": { - "nextActionIntervalInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "actionType": { - "$ref": "#/components/schemas/ActionType" - }, - "lastCheckedTime": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "LogVerbosity": { - "enum": [ - "NotSet", - "Debug", - "Info", - "Warning", - "Error", - "Critical" - ], - "type": "string" - }, - "LongRunningNullResponse": { - "type": "object", - "additionalProperties": false - }, - "LongRunningOperationUriResponse": { - "type": "object", - "properties": { - "location": { - "type": "string", - "format": "uri", - "nullable": true - }, - "operationResult": { - "type": "string", - "format": "uri", - "nullable": true - } - }, - "additionalProperties": false - }, - "LongRunningUpdateRegistryComponentRequest": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "registryName": { - "type": "string", - "nullable": true - }, - "componentName": { - "type": "string", - "nullable": true - }, - "componentVersion": { - "type": "string", - "nullable": true - }, - "updateType": { - "$ref": "#/components/schemas/LongRunningUpdateType" - } - }, - "additionalProperties": false - }, - "LongRunningUpdateType": { - "enum": [ - "EnableModule", - "DisableModule", - "UpdateDisplayName", - "UpdateDescription", - "UpdateTags" - ], - "type": "string" - }, - "MLFlowAutologgerState": { - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string" - }, - "ManagedServiceIdentity": { - "required": [ - "type" - ], - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/ManagedServiceIdentityType" - }, - "principalId": { - "type": "string", - "format": "uuid" - }, - "tenantId": { - "type": "string", - "format": "uuid" - }, - "userAssignedIdentities": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/UserAssignedIdentity" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ManagedServiceIdentityType": { - "enum": [ - "SystemAssigned", - "UserAssigned", - "SystemAssignedUserAssigned", - "None" - ], - "type": "string" - }, - "MavenLibraryDto": { - "type": "object", - "properties": { - "coordinates": { - "type": "string", - "nullable": true - }, - "repo": { - "type": "string", - "nullable": true - }, - "exclusions": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "MetricProperties": { - "type": "object", - "properties": { - "uxMetricType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "MetricSchemaDto": { - "type": "object", - "properties": { - "numProperties": { - "type": "integer", - "format": "int32" - }, - "properties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MetricSchemaPropertyDto" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "MetricSchemaPropertyDto": { - "type": "object", - "properties": { - "propertyId": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "MetricV2Dto": { - "type": "object", - "properties": { - "dataContainerId": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/MetricValueType" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "$ref": "#/components/schemas/MetricProperties" - }, - "namespace": { - "type": "string", - "nullable": true - }, - "standardSchemaId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MetricV2Value" - }, - "nullable": true - }, - "continuationToken": { - "type": "string", - "description": "The token used in retrieving the next page. If null, there are no additional pages.", - "nullable": true - }, - "nextLink": { - "type": "string", - "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", - "nullable": true - } - }, - "additionalProperties": false - }, - "MetricV2Value": { - "type": "object", - "properties": { - "metricId": { - "type": "string", - "nullable": true - }, - "createdUtc": { - "type": "string", - "format": "date-time" - }, - "step": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "data": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "sasUri": { - "type": "string", - "format": "uri", - "nullable": true - } - }, - "additionalProperties": false - }, - "MetricValueType": { - "enum": [ - "Int", - "Double", - "String", - "Bool", - "Artifact", - "Histogram", - "Malformed" - ], - "type": "string" - }, - "MfeInternalAutologgerSettings": { - "type": "object", - "properties": { - "mlflowAutologger": { - "$ref": "#/components/schemas/MfeInternalMLFlowAutologgerState" - } - }, - "additionalProperties": false - }, - "MfeInternalIdentityConfiguration": { - "type": "object", - "properties": { - "identityType": { - "$ref": "#/components/schemas/MfeInternalIdentityType" - } - }, - "additionalProperties": false - }, - "MfeInternalIdentityType": { - "enum": [ - "Managed", - "AMLToken", - "UserIdentity" - ], - "type": "string" - }, - "MfeInternalMLFlowAutologgerState": { - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string" - }, - "MfeInternalNodes": { - "type": "object", - "properties": { - "nodesValueType": { - "$ref": "#/components/schemas/MfeInternalNodesValueType" - } - }, - "additionalProperties": false - }, - "MfeInternalNodesValueType": { - "enum": [ - "All" - ], - "type": "string" - }, - "MfeInternalOutputData": { - "type": "object", - "properties": { - "datasetName": { - "type": "string", - "nullable": true - }, - "datastore": { - "type": "string", - "nullable": true - }, - "datapath": { - "type": "string", - "nullable": true - }, - "mode": { - "$ref": "#/components/schemas/DataBindingMode" - } - }, - "additionalProperties": false - }, - "MfeInternalPipelineType": { - "enum": [ - "AzureML" - ], - "type": "string" - }, - "MfeInternalScheduleStatus": { - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string" - }, - "MfeInternalSecretConfiguration": { - "type": "object", - "properties": { - "workspaceSecretName": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "MfeInternalUriReference": { - "type": "object", - "properties": { - "file": { - "type": "string", - "nullable": true - }, - "folder": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "MfeInternalV20211001ComponentJob": { - "type": "object", - "properties": { - "computeId": { - "type": "string", - "nullable": true - }, - "componentId": { - "type": "string", - "nullable": true - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JobInput" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JobOutput" - }, - "description": "This is a dictionary", - "nullable": true - }, - "overrides": { - "nullable": true - } - }, - "additionalProperties": false - }, - "MinMaxParameterRule": { - "type": "object", - "properties": { - "min": { - "type": "number", - "format": "double", - "nullable": true - }, - "max": { - "type": "number", - "format": "double", - "nullable": true - } - }, - "additionalProperties": false - }, - "MlcComputeInfo": { - "type": "object", - "properties": { - "mlcComputeType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ModelDto": { - "type": "object", - "properties": { - "feedName": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "amlDataStoreName": { - "type": "string", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "systemData": { - "$ref": "#/components/schemas/SystemData" - }, - "armId": { - "type": "string", - "nullable": true - }, - "onlineEndpointYamlStr": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ModelManagementErrorResponse": { - "type": "object", - "properties": { - "code": { - "type": "string", - "nullable": true - }, - "statusCode": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string", - "nullable": true - }, - "target": { - "type": "string", - "nullable": true - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InnerErrorDetails" - }, - "nullable": true - }, - "correlation": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ModifyPipelineJobScheduleDto": { - "type": "object", - "properties": { - "pipelineJobName": { - "type": "string", - "nullable": true - }, - "pipelineJobRuntimeSettings": { - "$ref": "#/components/schemas/PipelineJobRuntimeBasicSettings" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "triggerType": { - "$ref": "#/components/schemas/TriggerType" - }, - "recurrence": { - "$ref": "#/components/schemas/Recurrence" - }, - "cron": { - "$ref": "#/components/schemas/Cron" - }, - "status": { - "$ref": "#/components/schemas/ScheduleStatus" - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "ModuleDto": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "dictTags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "moduleVersionId": { - "type": "string", - "nullable": true - }, - "feedName": { - "type": "string", - "nullable": true - }, - "registryName": { - "type": "string", - "nullable": true - }, - "moduleName": { - "type": "string", - "nullable": true - }, - "moduleVersion": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "owner": { - "type": "string", - "nullable": true - }, - "jobType": { - "type": "string", - "nullable": true - }, - "defaultVersion": { - "type": "string", - "nullable": true - }, - "familyId": { - "type": "string", - "nullable": true - }, - "helpDocument": { - "type": "string", - "nullable": true - }, - "codegenBy": { - "type": "string", - "nullable": true - }, - "armId": { - "type": "string", - "nullable": true - }, - "moduleScope": { - "$ref": "#/components/schemas/ModuleScope" - }, - "moduleEntity": { - "$ref": "#/components/schemas/ModuleEntity" - }, - "inputTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "outputTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - }, - "yamlLink": { - "type": "string", - "nullable": true - }, - "yamlLinkWithCommitSha": { - "type": "string", - "nullable": true - }, - "moduleSourceType": { - "$ref": "#/components/schemas/ModuleSourceType" - }, - "registeredBy": { - "type": "string", - "nullable": true - }, - "versions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AzureMLModuleVersionDescriptor" - }, - "nullable": true - }, - "isDefaultModuleVersion": { - "type": "boolean", - "nullable": true - }, - "systemData": { - "$ref": "#/components/schemas/SystemData" - }, - "systemMeta": { - "$ref": "#/components/schemas/SystemMeta" - }, - "snapshotId": { - "type": "string", - "nullable": true - }, - "entry": { - "type": "string", - "nullable": true - }, - "osType": { - "type": "string", - "nullable": true - }, - "requireGpu": { - "type": "boolean", - "nullable": true - }, - "modulePythonInterface": { - "$ref": "#/components/schemas/ModulePythonInterface" - }, - "environmentAssetId": { - "type": "string", - "nullable": true - }, - "runSettingParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameter" - }, - "nullable": true - }, - "supportedUIInputDataDeliveryModes": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UIInputDataDeliveryMode" - }, - "nullable": true - }, - "nullable": true - }, - "outputSettingSpecs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OutputSettingSpec" - }, - "nullable": true - }, - "yamlStr": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ModuleDtoFields": { - "enum": [ - "Definition", - "YamlStr", - "RegistrationContext", - "RunSettingParameters", - "RunDefinition", - "All", - "Default", - "Basic", - "Minimal" - ], - "type": "string" - }, - "ModuleDtoWithErrors": { - "type": "object", - "properties": { - "versionIdToModuleDto": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ModuleDto" - }, - "description": "This is a dictionary", - "nullable": true - }, - "nameAndVersionToModuleDto": { - "type": "array", - "items": { - "$ref": "#/components/schemas/KeyValuePairComponentNameMetaInfoModuleDto" - }, - "nullable": true - }, - "versionIdToError": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "description": "This is a dictionary", - "nullable": true - }, - "nameAndVersionToError": { - "type": "array", - "items": { - "$ref": "#/components/schemas/KeyValuePairComponentNameMetaInfoErrorResponse" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ModuleDtoWithValidateStatus": { - "type": "object", - "properties": { - "existingModuleEntity": { - "$ref": "#/components/schemas/ModuleEntity" - }, - "status": { - "$ref": "#/components/schemas/ModuleInfoFromYamlStatusEnum" - }, - "statusDetails": { - "type": "string", - "nullable": true - }, - "errorDetails": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "serializedModuleInfo": { - "type": "string", - "nullable": true - }, - "namespace": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "dictTags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "moduleVersionId": { - "type": "string", - "nullable": true - }, - "feedName": { - "type": "string", - "nullable": true - }, - "registryName": { - "type": "string", - "nullable": true - }, - "moduleName": { - "type": "string", - "nullable": true - }, - "moduleVersion": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "owner": { - "type": "string", - "nullable": true - }, - "jobType": { - "type": "string", - "nullable": true - }, - "defaultVersion": { - "type": "string", - "nullable": true - }, - "familyId": { - "type": "string", - "nullable": true - }, - "helpDocument": { - "type": "string", - "nullable": true - }, - "codegenBy": { - "type": "string", - "nullable": true - }, - "armId": { - "type": "string", - "nullable": true - }, - "moduleScope": { - "$ref": "#/components/schemas/ModuleScope" - }, - "moduleEntity": { - "$ref": "#/components/schemas/ModuleEntity" - }, - "inputTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "outputTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - }, - "yamlLink": { - "type": "string", - "nullable": true - }, - "yamlLinkWithCommitSha": { - "type": "string", - "nullable": true - }, - "moduleSourceType": { - "$ref": "#/components/schemas/ModuleSourceType" - }, - "registeredBy": { - "type": "string", - "nullable": true - }, - "versions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AzureMLModuleVersionDescriptor" - }, - "nullable": true - }, - "isDefaultModuleVersion": { - "type": "boolean", - "nullable": true - }, - "systemData": { - "$ref": "#/components/schemas/SystemData" - }, - "systemMeta": { - "$ref": "#/components/schemas/SystemMeta" - }, - "snapshotId": { - "type": "string", - "nullable": true - }, - "entry": { - "type": "string", - "nullable": true - }, - "osType": { - "type": "string", - "nullable": true - }, - "requireGpu": { - "type": "boolean", - "nullable": true - }, - "modulePythonInterface": { - "$ref": "#/components/schemas/ModulePythonInterface" - }, - "environmentAssetId": { - "type": "string", - "nullable": true - }, - "runSettingParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameter" - }, - "nullable": true - }, - "supportedUIInputDataDeliveryModes": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UIInputDataDeliveryMode" - }, - "nullable": true - }, - "nullable": true - }, - "outputSettingSpecs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OutputSettingSpec" - }, - "nullable": true - }, - "yamlStr": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ModuleEntity": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "nullable": true - }, - "moduleExecutionType": { - "type": "string", - "nullable": true - }, - "moduleType": { - "$ref": "#/components/schemas/ModuleType" - }, - "moduleTypeVersion": { - "type": "string", - "nullable": true - }, - "uploadState": { - "$ref": "#/components/schemas/UploadState" - }, - "isDeterministic": { - "type": "boolean" - }, - "structuredInterface": { - "$ref": "#/components/schemas/StructuredInterface" - }, - "dataLocation": { - "$ref": "#/components/schemas/DataLocation" - }, - "identifierHash": { - "type": "string", - "nullable": true - }, - "identifierHashV2": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "createdBy": { - "$ref": "#/components/schemas/CreatedBy" - }, - "lastUpdatedBy": { - "$ref": "#/components/schemas/CreatedBy" - }, - "runconfig": { - "type": "string", - "nullable": true - }, - "cloudSettings": { - "$ref": "#/components/schemas/CloudSettings" - }, - "category": { - "type": "string", - "nullable": true - }, - "stepType": { - "type": "string", - "nullable": true - }, - "stage": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "ModuleInfoFromYamlStatusEnum": { - "enum": [ - "NewModule", - "NewVersion", - "Conflict", - "ParseError", - "ProcessRequestError" - ], - "type": "string" - }, - "ModulePythonInterface": { - "type": "object", - "properties": { - "inputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PythonInterfaceMapping" - }, - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PythonInterfaceMapping" - }, - "nullable": true - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PythonInterfaceMapping" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ModuleRunSettingTypes": { - "enum": [ - "All", - "Released", - "Default", - "Testing", - "Legacy", - "Preview", - "UxFull", - "Integration", - "UxIntegration", - "Full" - ], - "type": "string" - }, - "ModuleScope": { - "enum": [ - "All", - "Global", - "Workspace", - "Anonymous", - "Step", - "Draft", - "Feed", - "Registry", - "SystemAutoCreated" - ], - "type": "string" - }, - "ModuleSourceType": { - "enum": [ - "Unknown", - "Local", - "GithubFile", - "GithubFolder", - "DevopsArtifactsZip", - "SerializedModuleInfo" - ], - "type": "string" - }, - "ModuleType": { - "enum": [ - "None", - "BatchInferencing" - ], - "type": "string" - }, - "ModuleUpdateOperationType": { - "enum": [ - "SetDefaultVersion", - "EnableModule", - "DisableModule", - "UpdateDisplayName", - "UpdateDescription", - "UpdateTags" - ], - "type": "string" - }, - "ModuleWorkingMechanism": { - "enum": [ - "Normal", - "OutputToDataset" - ], - "type": "string" - }, - "MpiConfiguration": { - "type": "object", - "properties": { - "processCountPerNode": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "NCrossValidationMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "NCrossValidations": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/NCrossValidationMode" - }, - "value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "Node": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ToolType" - }, - "source": { - "$ref": "#/components/schemas/NodeSource" - }, - "inputs": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "tool": { - "type": "string", - "nullable": true - }, - "reduce": { - "type": "boolean" - }, - "activate": { - "$ref": "#/components/schemas/Activate" - }, - "use_variants": { - "type": "boolean" - }, - "comment": { - "type": "string", - "nullable": true - }, - "api": { - "type": "string", - "nullable": true - }, - "provider": { - "type": "string", - "nullable": true - }, - "connection": { - "type": "string", - "nullable": true - }, - "module": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "NodeCompositionMode": { - "enum": [ - "None", - "OnlySequential", - "Full" - ], - "type": "string" - }, - "NodeInputPort": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "documentation": { - "type": "string", - "nullable": true - }, - "dataTypesIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "isOptional": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "NodeLayout": { - "type": "object", - "properties": { - "x": { - "type": "number", - "format": "float" - }, - "y": { - "type": "number", - "format": "float" - }, - "width": { - "type": "number", - "format": "float" - }, - "height": { - "type": "number", - "format": "float" - }, - "extendedData": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "NodeOutputPort": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "documentation": { - "type": "string", - "nullable": true - }, - "dataTypeId": { - "type": "string", - "nullable": true - }, - "passThroughInputName": { - "type": "string", - "nullable": true - }, - "EarlyAvailable": { - "type": "boolean" - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AEVADataStoreMode" - } - }, - "additionalProperties": false - }, - "NodePortInterface": { - "type": "object", - "properties": { - "inputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NodeInputPort" - }, - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NodeOutputPort" - }, - "nullable": true - }, - "controlOutputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ControlOutput" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "NodeSource": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "tool": { - "type": "string", - "nullable": true - }, - "path": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "NodeTelemetryMetaInfo": { - "type": "object", - "properties": { - "pipelineRunId": { - "type": "string", - "nullable": true - }, - "nodeId": { - "type": "string", - "nullable": true - }, - "versionId": { - "type": "string", - "nullable": true - }, - "nodeType": { - "type": "string", - "nullable": true - }, - "nodeSource": { - "type": "string", - "nullable": true - }, - "isAnonymous": { - "type": "boolean" - }, - "isPipelineComponent": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "NodeVariant": { - "type": "object", - "properties": { - "variants": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/VariantNode" - }, - "description": "This is a dictionary", - "nullable": true - }, - "defaultVariantId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Nodes": { - "required": [ - "nodes_value_type" - ], - "type": "object", - "properties": { - "nodes_value_type": { - "$ref": "#/components/schemas/NodesValueType" - }, - "values": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "NodesValueType": { - "enum": [ - "All", - "Custom" - ], - "type": "string" - }, - "NoteBookTaskDto": { - "type": "object", - "properties": { - "notebook_path": { - "type": "string", - "nullable": true - }, - "base_parameters": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "NotificationSetting": { - "type": "object", - "properties": { - "emails": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "emailOn": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmailNotificationEnableType" - }, - "nullable": true - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Webhook" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ODataError": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Gets or sets a language-independent, service-defined error code.\r\nThis code serves as a sub-status for the HTTP error code specified\r\nin the response.", - "nullable": true - }, - "message": { - "type": "string", - "description": "Gets or sets a human-readable, language-dependent representation of the error.\r\nThe `Content-Language` header MUST contain the language code from [RFC5646]\r\ncorresponding to the language in which the value for message is written.", - "nullable": true - }, - "target": { - "type": "string", - "description": "Gets or sets the target of the particular error\r\n(for example, the name of the property in error).", - "nullable": true - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ODataErrorDetail" - }, - "description": "Gets or sets additional details about the error.", - "nullable": true - }, - "innererror": { - "$ref": "#/components/schemas/ODataInnerError" - } - }, - "additionalProperties": false, - "description": "Represents OData v4 error object." - }, - "ODataErrorDetail": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Gets or sets a language-independent, service-defined error code.", - "nullable": true - }, - "message": { - "type": "string", - "description": "Gets or sets a human-readable, language-dependent representation of the error.", - "nullable": true - }, - "target": { - "type": "string", - "description": "Gets or sets the target of the particular error\r\n(for example, the name of the property in error).", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Represents additional error details." - }, - "ODataErrorResponse": { - "type": "object", - "properties": { - "error": { - "$ref": "#/components/schemas/ODataError" - } - }, - "additionalProperties": false, - "description": "Represents OData v4 compliant error response message." - }, - "ODataInnerError": { - "type": "object", - "properties": { - "clientRequestId": { - "type": "string", - "description": "Gets or sets the client provided request ID.", - "nullable": true - }, - "serviceRequestId": { - "type": "string", - "description": "Gets or sets the server generated request ID.", - "nullable": true - }, - "trace": { - "type": "string", - "description": "Gets or sets the exception stack trace.\r\nDO NOT INCLUDE IT IN PRODUCTION ENVIRONMENT.", - "nullable": true - }, - "context": { - "type": "string", - "description": "Gets or sets additional context for the exception.\r\nDO NOT INCLUDE IT IN PRODUCTION ENVIRONMENT.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "The contents of this object are service-defined.\r\nUsually this object contains information that will help debug the service\r\nand SHOULD only be used in development environments in order to guard\r\nagainst potential security concerns around information disclosure." - }, - "Orientation": { - "enum": [ - "Horizontal", - "Vertical" - ], - "type": "string" - }, - "OutputData": { - "type": "object", - "properties": { - "outputLocation": { - "$ref": "#/components/schemas/ExecutionDataLocation" - }, - "mechanism": { - "$ref": "#/components/schemas/OutputMechanism" - }, - "additionalOptions": { - "$ref": "#/components/schemas/OutputOptions" - }, - "environmentVariableName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "OutputDataBinding": { - "type": "object", - "properties": { - "datastoreId": { - "type": "string", - "nullable": true - }, - "pathOnDatastore": { - "type": "string", - "nullable": true - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "uri": { - "$ref": "#/components/schemas/MfeInternalUriReference" - }, - "mode": { - "$ref": "#/components/schemas/DataBindingMode" - }, - "assetUri": { - "type": "string", - "nullable": true - }, - "isAssetJobOutput": { - "type": "boolean", - "nullable": true - }, - "jobOutputType": { - "$ref": "#/components/schemas/JobOutputType" - }, - "assetName": { - "type": "string", - "nullable": true - }, - "assetVersion": { - "type": "string", - "nullable": true - }, - "autoDeleteSetting": { - "$ref": "#/components/schemas/AutoDeleteSetting" - } - }, - "additionalProperties": false - }, - "OutputDatasetLineage": { - "type": "object", - "properties": { - "identifier": { - "$ref": "#/components/schemas/DatasetIdentifier" - }, - "outputType": { - "$ref": "#/components/schemas/DatasetOutputType" - }, - "outputDetails": { - "$ref": "#/components/schemas/DatasetOutputDetails" - } - }, - "additionalProperties": false - }, - "OutputDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ValueType" - }, - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "isProperty": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "OutputMechanism": { - "enum": [ - "Upload", - "Mount", - "Hdfs", - "Link", - "Direct" - ], - "type": "string" - }, - "OutputOptions": { - "type": "object", - "properties": { - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "registrationOptions": { - "$ref": "#/components/schemas/RegistrationOptions" - }, - "uploadOptions": { - "$ref": "#/components/schemas/UploadOptions" - }, - "mountOptions": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "OutputSetting": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "DataStoreNameParameterAssignment": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AEVADataStoreMode" - }, - "DataStoreModeParameterAssignment": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "PathOnComputeParameterAssignment": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "overwrite": { - "type": "boolean" - }, - "dataReferenceName": { - "type": "string", - "nullable": true - }, - "webServicePort": { - "type": "string", - "nullable": true - }, - "datasetRegistration": { - "$ref": "#/components/schemas/DatasetRegistration" - }, - "datasetOutputOptions": { - "$ref": "#/components/schemas/DatasetOutputOptions" - }, - "AssetOutputSettings": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "parameterName": { - "type": "string", - "nullable": true - }, - "AssetOutputSettingsParameterName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "OutputSettingSpec": { - "type": "object", - "properties": { - "supportedDataStoreModes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AEVADataStoreMode" - }, - "nullable": true - }, - "defaultAssetOutputPath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PaginatedDataInfoList": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataInfo" - }, - "description": "An array of objects of type DataInfo.", - "nullable": true - }, - "continuationToken": { - "type": "string", - "description": "The token used in retrieving the next page. If null, there are no additional pages.", - "nullable": true - }, - "nextLink": { - "type": "string", - "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A paginated list of DataInfos." - }, - "PaginatedModelDtoList": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelDto" - }, - "description": "An array of objects of type ModelDto.", - "nullable": true - }, - "continuationToken": { - "type": "string", - "description": "The token used in retrieving the next page. If null, there are no additional pages.", - "nullable": true - }, - "nextLink": { - "type": "string", - "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A paginated list of ModelDtos." - }, - "PaginatedModuleDtoList": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModuleDto" - }, - "description": "An array of objects of type ModuleDto.", - "nullable": true - }, - "continuationToken": { - "type": "string", - "description": "The token used in retrieving the next page. If null, there are no additional pages.", - "nullable": true - }, - "nextLink": { - "type": "string", - "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A paginated list of ModuleDtos." - }, - "PaginatedPipelineDraftSummaryList": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PipelineDraftSummary" - }, - "description": "An array of objects of type PipelineDraftSummary.", - "nullable": true - }, - "continuationToken": { - "type": "string", - "description": "The token used in retrieving the next page. If null, there are no additional pages.", - "nullable": true - }, - "nextLink": { - "type": "string", - "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A paginated list of PipelineDraftSummarys." - }, - "PaginatedPipelineEndpointSummaryList": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PipelineEndpointSummary" - }, - "description": "An array of objects of type PipelineEndpointSummary.", - "nullable": true - }, - "continuationToken": { - "type": "string", - "description": "The token used in retrieving the next page. If null, there are no additional pages.", - "nullable": true - }, - "nextLink": { - "type": "string", - "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A paginated list of PipelineEndpointSummarys." - }, - "PaginatedPipelineRunSummaryList": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PipelineRunSummary" - }, - "description": "An array of objects of type PipelineRunSummary.", - "nullable": true - }, - "continuationToken": { - "type": "string", - "description": "The token used in retrieving the next page. If null, there are no additional pages.", - "nullable": true - }, - "nextLink": { - "type": "string", - "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A paginated list of PipelineRunSummarys." - }, - "PaginatedPublishedPipelineSummaryList": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PublishedPipelineSummary" - }, - "description": "An array of objects of type PublishedPipelineSummary.", - "nullable": true - }, - "continuationToken": { - "type": "string", - "description": "The token used in retrieving the next page. If null, there are no additional pages.", - "nullable": true - }, - "nextLink": { - "type": "string", - "description": "The link to the next page constructed using the continuationToken. If null, there are no additional pages.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A paginated list of PublishedPipelineSummarys." - }, - "ParallelForControlFlowInfo": { - "type": "object", - "properties": { - "parallelForItemsInput": { - "$ref": "#/components/schemas/ParameterAssignment" - } - }, - "additionalProperties": false - }, - "ParallelTaskConfiguration": { - "type": "object", - "properties": { - "maxRetriesPerWorker": { - "type": "integer", - "format": "int32" - }, - "workerCountPerNode": { - "type": "integer", - "format": "int32" - }, - "terminalExitCodes": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "configuration": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Parameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "documentation": { - "type": "string", - "nullable": true - }, - "defaultValue": { - "type": "string", - "nullable": true - }, - "isOptional": { - "type": "boolean" - }, - "minMaxRules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MinMaxParameterRule" - }, - "nullable": true - }, - "enumRules": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnumParameterRule" - }, - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ParameterType" - }, - "label": { - "type": "string", - "nullable": true - }, - "groupNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "argumentName": { - "type": "string", - "nullable": true - }, - "uiHint": { - "$ref": "#/components/schemas/UIParameterHint" - } - }, - "additionalProperties": false - }, - "ParameterAssignment": { - "type": "object", - "properties": { - "valueType": { - "$ref": "#/components/schemas/ParameterValueType" - }, - "assignmentsToConcatenate": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "nullable": true - }, - "dataPathAssignment": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "dataSetDefinitionValueAssignment": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "name": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ParameterDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - }, - "isOptional": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "ParameterType": { - "enum": [ - "Int", - "Double", - "Bool", - "String", - "Undefined" - ], - "type": "string" - }, - "ParameterValueType": { - "enum": [ - "Literal", - "GraphParameterName", - "Concatenate", - "Input", - "DataPath", - "DataSetDefinition" - ], - "type": "string" - }, - "PatchFlowRequest": { - "type": "object", - "properties": { - "flowPatchOperationType": { - "$ref": "#/components/schemas/FlowPatchOperationType" - }, - "flowDefinitionFilePath": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Pipeline": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean" - }, - "defaultDatastoreName": { - "type": "string", - "nullable": true - }, - "componentJobs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComponentJob" - }, - "description": "This is a dictionary", - "nullable": true - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineInput" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineOutput" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineDraft": { - "type": "object", - "properties": { - "graphDraftId": { - "type": "string", - "nullable": true - }, - "sourcePipelineRunId": { - "type": "string", - "nullable": true - }, - "latestPipelineRunId": { - "type": "string", - "nullable": true - }, - "latestRunExperimentName": { - "type": "string", - "nullable": true - }, - "latestRunExperimentId": { - "type": "string", - "nullable": true - }, - "isLatestRunExperimentArchived": { - "type": "boolean", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/PipelineStatus" - }, - "graphDetail": { - "$ref": "#/components/schemas/PipelineRunGraphDetail" - }, - "realTimeEndpointInfo": { - "$ref": "#/components/schemas/RealTimeEndpointInfo" - }, - "linkedPipelinesInfo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LinkedPipelineInfo" - }, - "nullable": true - }, - "nodesInDraft": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "studioMigrationInfo": { - "$ref": "#/components/schemas/StudioMigrationInfo" - }, - "flattenedSubGraphs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineSubDraft" - }, - "nullable": true - }, - "pipelineRunSettingParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameter" - }, - "nullable": true - }, - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean" - }, - "continueRunOnFailedOptionalInput": { - "type": "boolean" - }, - "defaultCompute": { - "$ref": "#/components/schemas/ComputeSetting" - }, - "defaultDatastore": { - "$ref": "#/components/schemas/DatastoreSetting" - }, - "defaultCloudPriority": { - "$ref": "#/components/schemas/CloudPrioritySetting" - }, - "enforceRerun": { - "type": "boolean", - "nullable": true - }, - "pipelineParameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataPathAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "assetOutputSettingsAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "pipelineTimeout": { - "type": "integer", - "format": "int32" - }, - "identityConfig": { - "$ref": "#/components/schemas/IdentitySetting" - }, - "graphComponentsMode": { - "$ref": "#/components/schemas/GraphComponentsMode" - }, - "name": { - "type": "string", - "nullable": true - }, - "lastEditedBy": { - "type": "string", - "nullable": true - }, - "createdBy": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "pipelineType": { - "$ref": "#/components/schemas/PipelineType" - }, - "pipelineDraftMode": { - "$ref": "#/components/schemas/PipelineDraftMode" - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PipelineDraftMode": { - "enum": [ - "None", - "Normal", - "Custom" - ], - "type": "string" - }, - "PipelineDraftStepDetails": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "nullable": true - }, - "target": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RunStatus" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "parentRunId": { - "type": "string", - "nullable": true - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "isReused": { - "type": "boolean", - "nullable": true - }, - "reusedRunId": { - "type": "string", - "nullable": true - }, - "reusedPipelineRunId": { - "type": "string", - "nullable": true - }, - "logs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputLog": { - "type": "string", - "nullable": true - }, - "runConfiguration": { - "$ref": "#/components/schemas/RunConfiguration" - }, - "outputs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "portOutputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PortOutputInfo" - }, - "description": "This is a dictionary", - "nullable": true - }, - "isExperimentArchived": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineDraftSummary": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "lastEditedBy": { - "type": "string", - "nullable": true - }, - "createdBy": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "pipelineType": { - "$ref": "#/components/schemas/PipelineType" - }, - "pipelineDraftMode": { - "$ref": "#/components/schemas/PipelineDraftMode" - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PipelineEndpoint": { - "type": "object", - "properties": { - "defaultVersion": { - "type": "string", - "nullable": true - }, - "defaultPipelineId": { - "type": "string", - "nullable": true - }, - "defaultGraphId": { - "type": "string", - "nullable": true - }, - "restEndpoint": { - "type": "string", - "nullable": true - }, - "publishedDate": { - "type": "string", - "format": "date-time" - }, - "publishedBy": { - "type": "string", - "nullable": true - }, - "parameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignment": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "defaultPipelineName": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "updatedBy": { - "type": "string", - "nullable": true - }, - "swaggerUrl": { - "type": "string", - "nullable": true - }, - "lastRunTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastRunStatus": { - "$ref": "#/components/schemas/PipelineRunStatusCode" - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PipelineEndpointSummary": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "updatedBy": { - "type": "string", - "nullable": true - }, - "swaggerUrl": { - "type": "string", - "nullable": true - }, - "lastRunTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastRunStatus": { - "$ref": "#/components/schemas/PipelineRunStatusCode" - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PipelineGraph": { - "type": "object", - "properties": { - "graphModuleDtos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModuleDto" - }, - "nullable": true - }, - "graphDataSources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataInfo" - }, - "nullable": true - }, - "graphs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineGraph" - }, - "description": "This is a dictionary", - "nullable": true - }, - "graphDrafts": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineGraph" - }, - "description": "This is a dictionary", - "nullable": true - }, - "moduleNodeRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeRunSetting" - }, - "nullable": true - }, - "moduleNodeUIInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" - }, - "nullable": true - }, - "subPipelinesInfo": { - "$ref": "#/components/schemas/SubPipelinesInfo" - }, - "referencedNodeId": { - "type": "string", - "nullable": true - }, - "pipelineRunSettingParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameter" - }, - "nullable": true - }, - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "realTimeEndpointInfo": { - "$ref": "#/components/schemas/RealTimeEndpointInfo" - }, - "nodeTelemetryMetaInfos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NodeTelemetryMetaInfo" - }, - "nullable": true - }, - "graphComponentsMode": { - "$ref": "#/components/schemas/GraphComponentsMode" - }, - "moduleNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNode" - }, - "nullable": true - }, - "datasetNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphDatasetNode" - }, - "nullable": true - }, - "subGraphNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphReferenceNode" - }, - "nullable": true - }, - "controlReferenceNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphControlReferenceNode" - }, - "nullable": true - }, - "controlNodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphControlNode" - }, - "nullable": true - }, - "edges": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphEdge" - }, - "nullable": true - }, - "entityInterface": { - "$ref": "#/components/schemas/EntityInterface" - }, - "graphLayout": { - "$ref": "#/components/schemas/GraphLayout" - }, - "createdBy": { - "$ref": "#/components/schemas/CreatedBy" - }, - "lastUpdatedBy": { - "$ref": "#/components/schemas/CreatedBy" - }, - "defaultCompute": { - "$ref": "#/components/schemas/ComputeSetting" - }, - "defaultDatastore": { - "$ref": "#/components/schemas/DatastoreSetting" - }, - "defaultCloudPriority": { - "$ref": "#/components/schemas/CloudPrioritySetting" - }, - "extendedProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "parentSubGraphModuleIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PipelineInput": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/InputData" - } - }, - "additionalProperties": false - }, - "PipelineJob": { - "type": "object", - "properties": { - "jobType": { - "$ref": "#/components/schemas/JobType" - }, - "pipelineJobType": { - "$ref": "#/components/schemas/MfeInternalPipelineType" - }, - "pipeline": { - "$ref": "#/components/schemas/Pipeline" - }, - "computeId": { - "type": "string", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "settings": { - "nullable": true - }, - "componentJobs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/MfeInternalV20211001ComponentJob" - }, - "description": "This is a dictionary", - "nullable": true - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JobInput" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JobOutput" - }, - "description": "This is a dictionary", - "nullable": true - }, - "bindings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Binding" - }, - "nullable": true - }, - "jobs": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - }, - "inputBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/InputDataBinding" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OutputDataBinding" - }, - "description": "This is a dictionary", - "nullable": true - }, - "sourceJobId": { - "type": "string", - "nullable": true - }, - "provisioningState": { - "$ref": "#/components/schemas/JobProvisioningState" - }, - "parentJobName": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/JobStatus" - }, - "interactionEndpoints": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JobEndpoint" - }, - "nullable": true - }, - "identity": { - "$ref": "#/components/schemas/MfeInternalIdentityConfiguration" - }, - "compute": { - "$ref": "#/components/schemas/ComputeConfiguration" - }, - "priority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "output": { - "$ref": "#/components/schemas/JobOutputArtifacts" - }, - "isArchived": { - "type": "boolean" - }, - "schedule": { - "$ref": "#/components/schemas/ScheduleBase" - }, - "componentId": { - "type": "string", - "nullable": true - }, - "notificationSetting": { - "$ref": "#/components/schemas/NotificationSetting" - }, - "secretsConfiguration": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/MfeInternalSecretConfiguration" - }, - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineJobRuntimeBasicSettings": { - "type": "object", - "properties": { - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "pipelineJobName": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "triggerTimeString": { - "type": "string", - "nullable": true - }, - "pipelineParameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataPathAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "assetOutputSettingsAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineJobScheduleDto": { - "type": "object", - "properties": { - "systemData": { - "$ref": "#/components/schemas/SystemData" - }, - "name": { - "type": "string", - "nullable": true - }, - "pipelineJobName": { - "type": "string", - "nullable": true - }, - "pipelineJobRuntimeSettings": { - "$ref": "#/components/schemas/PipelineJobRuntimeBasicSettings" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "triggerType": { - "$ref": "#/components/schemas/TriggerType" - }, - "recurrence": { - "$ref": "#/components/schemas/Recurrence" - }, - "cron": { - "$ref": "#/components/schemas/Cron" - }, - "status": { - "$ref": "#/components/schemas/ScheduleStatus" - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineOutput": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/MfeInternalOutputData" - } - }, - "additionalProperties": false - }, - "PipelineRun": { - "type": "object", - "properties": { - "pipelineId": { - "type": "string", - "nullable": true - }, - "runSource": { - "type": "string", - "nullable": true - }, - "runType": { - "$ref": "#/components/schemas/RunType" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataPathAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignment": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "assetOutputSettingsAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "totalSteps": { - "type": "integer", - "format": "int32" - }, - "logs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "userAlias": { - "type": "string", - "nullable": true - }, - "enforceRerun": { - "type": "boolean", - "nullable": true - }, - "continueRunOnFailedOptionalInput": { - "type": "boolean" - }, - "defaultCompute": { - "$ref": "#/components/schemas/ComputeSetting" - }, - "defaultDatastore": { - "$ref": "#/components/schemas/DatastoreSetting" - }, - "defaultCloudPriority": { - "$ref": "#/components/schemas/CloudPrioritySetting" - }, - "pipelineTimeoutSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean" - }, - "identityConfig": { - "$ref": "#/components/schemas/IdentitySetting" - }, - "description": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "runNumber": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "statusCode": { - "$ref": "#/components/schemas/PipelineStatusCode" - }, - "runStatus": { - "$ref": "#/components/schemas/RunStatus" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "graphId": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "isExperimentArchived": { - "type": "boolean", - "nullable": true - }, - "submittedBy": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "stepTags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "aetherStartTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "aetherEndTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runHistoryStartTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runHistoryEndTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "uniqueChildRunComputeTargets": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PipelineRunGraphDetail": { - "type": "object", - "properties": { - "graph": { - "$ref": "#/components/schemas/PipelineGraph" - }, - "graphNodesStatus": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/GraphNodeStatusInfo" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineRunGraphStatus": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/PipelineStatus" - }, - "graphNodesStatus": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/GraphNodeStatusInfo" - }, - "description": "This is a dictionary", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "isExperimentArchived": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineRunProfile": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "nullable": true - }, - "nodeId": { - "type": "string", - "nullable": true - }, - "runUrl": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/PipelineRunStatus" - }, - "createTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "startTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "endTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "profilingTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "stepRunsProfile": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StepRunProfile" - }, - "nullable": true - }, - "subPipelineRunProfile": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PipelineRunProfile" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineRunStatus": { - "type": "object", - "properties": { - "statusCode": { - "$ref": "#/components/schemas/PipelineRunStatusCode" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "creationTime": { - "type": "string", - "format": "date-time" - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineRunStatusCode": { - "enum": [ - "NotStarted", - "Running", - "Failed", - "Finished", - "Canceled", - "Queued", - "CancelRequested" - ], - "type": "string" - }, - "PipelineRunStepDetails": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "nullable": true - }, - "target": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RunStatus" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "parentRunId": { - "type": "string", - "nullable": true - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "isReused": { - "type": "boolean", - "nullable": true - }, - "logs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "snapshotInfo": { - "$ref": "#/components/schemas/SnapshotInfo" - }, - "inputDatasets": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetLineage" - }, - "nullable": true - }, - "outputDatasets": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/OutputDatasetLineage" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineRunSummary": { - "type": "object", - "properties": { - "description": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "runNumber": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "statusCode": { - "$ref": "#/components/schemas/PipelineStatusCode" - }, - "runStatus": { - "$ref": "#/components/schemas/RunStatus" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "graphId": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "isExperimentArchived": { - "type": "boolean", - "nullable": true - }, - "submittedBy": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "stepTags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "aetherStartTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "aetherEndTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runHistoryStartTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runHistoryEndTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "uniqueChildRunComputeTargets": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PipelineStatus": { - "type": "object", - "properties": { - "statusCode": { - "$ref": "#/components/schemas/PipelineStatusCode" - }, - "runStatus": { - "$ref": "#/components/schemas/RunStatus" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "isTerminalState": { - "type": "boolean", - "readOnly": true - } - }, - "additionalProperties": false - }, - "PipelineStatusCode": { - "enum": [ - "NotStarted", - "InDraft", - "Preparing", - "Running", - "Failed", - "Finished", - "Canceled", - "Throttled", - "Unknown" - ], - "type": "string" - }, - "PipelineStepRun": { - "type": "object", - "properties": { - "stepName": { - "type": "string", - "nullable": true - }, - "runNumber": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runStatus": { - "$ref": "#/components/schemas/RunStatus" - }, - "computeTarget": { - "type": "string", - "nullable": true - }, - "computeType": { - "type": "string", - "nullable": true - }, - "runType": { - "type": "string", - "nullable": true - }, - "stepType": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "isReused": { - "type": "boolean", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineStepRunOutputs": { - "type": "object", - "properties": { - "outputs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "portOutputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PortOutputInfo" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "PipelineSubDraft": { - "type": "object", - "properties": { - "parentGraphDraftId": { - "type": "string", - "nullable": true - }, - "parentNodeId": { - "type": "string", - "nullable": true - }, - "graphDetail": { - "$ref": "#/components/schemas/PipelineRunGraphDetail" - }, - "moduleDto": { - "$ref": "#/components/schemas/ModuleDto" - }, - "name": { - "type": "string", - "nullable": true - }, - "lastEditedBy": { - "type": "string", - "nullable": true - }, - "createdBy": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "pipelineType": { - "$ref": "#/components/schemas/PipelineType" - }, - "pipelineDraftMode": { - "$ref": "#/components/schemas/PipelineDraftMode" - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PipelineType": { - "enum": [ - "TrainingPipeline", - "RealTimeInferencePipeline", - "BatchInferencePipeline", - "Unknown" - ], - "type": "string" - }, - "PolicyValidationResponse": { - "type": "object", - "properties": { - "errorResponse": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "nextActionIntervalInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "actionType": { - "$ref": "#/components/schemas/ActionType" - } - }, - "additionalProperties": false - }, - "PortAction": { - "enum": [ - "Promote", - "ViewInDataStore", - "Visualize", - "GetSchema", - "CreateInferenceGraph", - "RegisterModel", - "PromoteAsTabular" - ], - "type": "string" - }, - "PortInfo": { - "type": "object", - "properties": { - "nodeId": { - "type": "string", - "nullable": true - }, - "portName": { - "type": "string", - "nullable": true - }, - "graphPortName": { - "type": "string", - "nullable": true - }, - "isParameter": { - "type": "boolean" - }, - "webServicePort": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PortOutputInfo": { - "type": "object", - "properties": { - "containerUri": { - "type": "string", - "format": "uri", - "nullable": true - }, - "relativePath": { - "type": "string", - "nullable": true - }, - "previewParams": { - "type": "string", - "nullable": true - }, - "modelOutputPath": { - "type": "string", - "nullable": true - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "dataReferenceType": { - "$ref": "#/components/schemas/DataReferenceType" - }, - "isFile": { - "type": "boolean" - }, - "supportedActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PortAction" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "PrimaryMetrics": { - "enum": [ - "AUCWeighted", - "Accuracy", - "NormMacroRecall", - "AveragePrecisionScoreWeighted", - "PrecisionScoreWeighted", - "SpearmanCorrelation", - "NormalizedRootMeanSquaredError", - "R2Score", - "NormalizedMeanAbsoluteError", - "NormalizedRootMeanSquaredLogError", - "MeanAveragePrecision", - "Iou" - ], - "type": "string" - }, - "PriorityConfig": { - "type": "object", - "properties": { - "jobPriority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "isPreemptible": { - "type": "boolean", - "nullable": true - }, - "nodeCountSet": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "scaleInterval": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "PriorityConfiguration": { - "type": "object", - "properties": { - "cloudPriority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "stringTypePriority": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PromoteDataSetRequest": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "moduleNodeId": { - "type": "string", - "nullable": true - }, - "stepRunId": { - "type": "string", - "nullable": true - }, - "outputPortName": { - "type": "string", - "nullable": true - }, - "modelOutputPath": { - "type": "string", - "nullable": true - }, - "dataTypeId": { - "type": "string", - "nullable": true - }, - "datasetType": { - "type": "string", - "nullable": true - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "outputRelativePath": { - "type": "string", - "nullable": true - }, - "pipelineRunId": { - "type": "string", - "nullable": true - }, - "rootPipelineRunId": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PromptflowEngineType": { - "enum": [ - "FastEngine", - "ScalableEngine" - ], - "type": "string" - }, - "ProviderEntity": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "nullable": true - }, - "module": { - "type": "string", - "nullable": true - }, - "connection_type": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionType" - }, - "nullable": true - }, - "apis": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApiAndParameters" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ProvisioningState": { - "enum": [ - "Unknown", - "Updating", - "Creating", - "Deleting", - "Accepted", - "Succeeded", - "Failed", - "Canceled" - ], - "type": "string" - }, - "PublishedPipeline": { - "type": "object", - "properties": { - "totalRunSteps": { - "type": "integer", - "format": "int32" - }, - "totalRuns": { - "type": "integer", - "format": "int32" - }, - "parameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignment": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "restEndpoint": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "graphId": { - "type": "string", - "nullable": true - }, - "publishedDate": { - "type": "string", - "format": "date-time" - }, - "lastRunTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastRunStatus": { - "$ref": "#/components/schemas/PipelineRunStatusCode" - }, - "publishedBy": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "isDefault": { - "type": "boolean", - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PublishedPipelineSummary": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "graphId": { - "type": "string", - "nullable": true - }, - "publishedDate": { - "type": "string", - "format": "date-time" - }, - "lastRunTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastRunStatus": { - "$ref": "#/components/schemas/PipelineRunStatusCode" - }, - "publishedBy": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "isDefault": { - "type": "boolean", - "nullable": true - }, - "entityStatus": { - "$ref": "#/components/schemas/EntityStatus" - }, - "id": { - "type": "string", - "nullable": true - }, - "etag": { - "type": "string", - "nullable": true - }, - "createdDate": { - "type": "string", - "format": "date-time" - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PyTorchConfiguration": { - "type": "object", - "properties": { - "communicationBackend": { - "type": "string", - "nullable": true - }, - "processCount": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "PythonInterfaceMapping": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "nameInYaml": { - "type": "string", - "nullable": true - }, - "argumentName": { - "type": "string", - "nullable": true - }, - "commandLineOption": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PythonPyPiOrRCranLibraryDto": { - "type": "object", - "properties": { - "package": { - "type": "string", - "nullable": true - }, - "repo": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "PythonSection": { - "type": "object", - "properties": { - "interpreterPath": { - "type": "string", - "nullable": true - }, - "userManagedDependencies": { - "type": "boolean" - }, - "condaDependencies": { - "nullable": true - }, - "baseCondaEnvironment": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "QueueingInfo": { - "type": "object", - "properties": { - "code": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "nullable": true - }, - "lastRefreshTimestamp": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "RCranPackage": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "repository": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RGitHubPackage": { - "type": "object", - "properties": { - "repository": { - "type": "string", - "nullable": true - }, - "authToken": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RSection": { - "type": "object", - "properties": { - "rVersion": { - "type": "string", - "nullable": true - }, - "userManaged": { - "type": "boolean" - }, - "rscriptPath": { - "type": "string", - "nullable": true - }, - "snapshotDate": { - "type": "string", - "nullable": true - }, - "cranPackages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RCranPackage" - }, - "nullable": true - }, - "gitHubPackages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RGitHubPackage" - }, - "nullable": true - }, - "customUrlPackages": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "bioConductorPackages": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RawComponentDto": { - "type": "object", - "properties": { - "componentSchema": { - "type": "string", - "nullable": true - }, - "isAnonymous": { - "type": "boolean" - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ComponentType" - }, - "componentTypeVersion": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "isDeterministic": { - "type": "boolean" - }, - "successfulReturnCode": { - "type": "string", - "nullable": true - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComponentInput" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComponentOutput" - }, - "description": "This is a dictionary", - "nullable": true - }, - "command": { - "type": "string", - "nullable": true - }, - "environmentName": { - "type": "string", - "nullable": true - }, - "environmentVersion": { - "type": "string", - "nullable": true - }, - "snapshotId": { - "type": "string", - "nullable": true - }, - "createdBy": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "lastModifiedBy": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "createdDate": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastModifiedDate": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "componentInternalId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RayConfiguration": { - "type": "object", - "properties": { - "port": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "includeDashboard": { - "type": "boolean", - "nullable": true - }, - "dashboardPort": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "headNodeAdditionalArgs": { - "type": "string", - "nullable": true - }, - "workerNodeAdditionalArgs": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RealTimeEndpoint": { - "type": "object", - "properties": { - "createdBy": { - "type": "string", - "nullable": true - }, - "kvTags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "state": { - "$ref": "#/components/schemas/WebServiceState" - }, - "error": { - "$ref": "#/components/schemas/ModelManagementErrorResponse" - }, - "computeType": { - "$ref": "#/components/schemas/ComputeEnvironmentType" - }, - "imageId": { - "type": "string", - "nullable": true - }, - "cpu": { - "type": "number", - "format": "double", - "nullable": true - }, - "memoryInGB": { - "type": "number", - "format": "double", - "nullable": true - }, - "maxConcurrentRequestsPerContainer": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "numReplicas": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "eventHubEnabled": { - "type": "boolean", - "nullable": true - }, - "storageEnabled": { - "type": "boolean", - "nullable": true - }, - "appInsightsEnabled": { - "type": "boolean", - "nullable": true - }, - "autoScaleEnabled": { - "type": "boolean", - "nullable": true - }, - "minReplicas": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxReplicas": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "targetUtilization": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "refreshPeriodInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "scoringUri": { - "type": "string", - "format": "uri", - "nullable": true - }, - "deploymentStatus": { - "$ref": "#/components/schemas/AKSReplicaStatus" - }, - "scoringTimeoutMs": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "authEnabled": { - "type": "boolean", - "nullable": true - }, - "aadAuthEnabled": { - "type": "boolean", - "nullable": true - }, - "region": { - "type": "string", - "nullable": true - }, - "primaryKey": { - "type": "string", - "nullable": true - }, - "secondaryKey": { - "type": "string", - "nullable": true - }, - "swaggerUri": { - "type": "string", - "format": "uri", - "nullable": true - }, - "linkedPipelineDraftId": { - "type": "string", - "nullable": true - }, - "linkedPipelineRunId": { - "type": "string", - "nullable": true - }, - "warning": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "createdTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updatedTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "computeName": { - "type": "string", - "nullable": true - }, - "updatedBy": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RealTimeEndpointInfo": { - "type": "object", - "properties": { - "webServiceInputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebServicePort" - }, - "nullable": true - }, - "webServiceOutputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebServicePort" - }, - "nullable": true - }, - "deploymentsInfo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeploymentInfo" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RealTimeEndpointInternalStepCode": { - "enum": [ - "AboutToDeploy", - "WaitAksComputeReady", - "RegisterModels", - "CreateServiceFromModels", - "UpdateServiceFromModels", - "WaitServiceCreating", - "FetchServiceRelatedInfo", - "TestWithSampleData", - "AboutToDelete", - "DeleteDeployment", - "DeleteAsset", - "DeleteImage", - "DeleteModel", - "DeleteServiceRecord" - ], - "type": "string" - }, - "RealTimeEndpointOpCode": { - "enum": [ - "Create", - "Update", - "Delete" - ], - "type": "string" - }, - "RealTimeEndpointOpStatusCode": { - "enum": [ - "Ongoing", - "Succeeded", - "Failed", - "SucceededWithWarning" - ], - "type": "string" - }, - "RealTimeEndpointStatus": { - "type": "object", - "properties": { - "lastOperation": { - "$ref": "#/components/schemas/RealTimeEndpointOpCode" - }, - "lastOperationStatus": { - "$ref": "#/components/schemas/RealTimeEndpointOpStatusCode" - }, - "internalStep": { - "$ref": "#/components/schemas/RealTimeEndpointInternalStepCode" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "deploymentState": { - "type": "string", - "nullable": true - }, - "serviceId": { - "type": "string", - "nullable": true - }, - "linkedPipelineDraftId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RealTimeEndpointSummary": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "createdTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updatedTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "computeType": { - "$ref": "#/components/schemas/ComputeEnvironmentType" - }, - "computeName": { - "type": "string", - "nullable": true - }, - "updatedBy": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RealTimeEndpointTestRequest": { - "type": "object", - "properties": { - "endPoint": { - "type": "string", - "nullable": true - }, - "authKey": { - "type": "string", - "nullable": true - }, - "payload": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Recurrence": { - "type": "object", - "properties": { - "frequency": { - "$ref": "#/components/schemas/Frequency" - }, - "interval": { - "type": "integer", - "format": "int32" - }, - "schedule": { - "$ref": "#/components/schemas/RecurrenceSchedule" - }, - "endTime": { - "type": "string", - "nullable": true - }, - "startTime": { - "type": "string", - "nullable": true - }, - "timeZone": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RecurrenceFrequency": { - "enum": [ - "Minute", - "Hour", - "Day", - "Week", - "Month" - ], - "type": "string" - }, - "RecurrencePattern": { - "type": "object", - "properties": { - "hours": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "minutes": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "weekdays": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Weekday" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RecurrenceSchedule": { - "type": "object", - "properties": { - "hours": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "minutes": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - }, - "weekDays": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeekDays" - }, - "nullable": true - }, - "monthDays": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RegenerateServiceKeysRequest": { - "type": "object", - "properties": { - "keyType": { - "$ref": "#/components/schemas/KeyType" - }, - "keyValue": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RegisterComponentMetaInfo": { - "type": "object", - "properties": { - "amlModuleName": { - "type": "string", - "nullable": true - }, - "nameOnlyDisplayInfo": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "moduleVersionId": { - "type": "string", - "nullable": true - }, - "snapshotId": { - "type": "string", - "nullable": true - }, - "componentRegistrationType": { - "$ref": "#/components/schemas/ComponentRegistrationTypeEnum" - }, - "moduleEntityFromYaml": { - "$ref": "#/components/schemas/ModuleEntity" - }, - "setAsDefaultVersion": { - "type": "boolean" - }, - "dataTypesFromYaml": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataTypeCreationInfo" - }, - "nullable": true - }, - "dataTypeMechanism": { - "$ref": "#/components/schemas/DataTypeMechanism" - }, - "identifierHash": { - "type": "string", - "nullable": true - }, - "identifierHashes": { - "type": "object", - "properties": { - "IdentifierHash": { - "type": "string" - }, - "IdentifierHashV2": { - "type": "string" - } - }, - "additionalProperties": false, - "nullable": true - }, - "contentHash": { - "type": "string", - "nullable": true - }, - "extraHash": { - "type": "string", - "nullable": true - }, - "extraHashes": { - "type": "object", - "properties": { - "IdentifierHash": { - "type": "string" - }, - "IdentifierHashV2": { - "type": "string" - } - }, - "additionalProperties": false, - "nullable": true - }, - "registration": { - "type": "boolean", - "nullable": true - }, - "validateOnly": { - "type": "boolean" - }, - "skipWorkspaceRelatedCheck": { - "type": "boolean" - }, - "intellectualPropertyProtectedWorkspaceComponentRegistrationAllowedPublisher": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "systemManagedRegistration": { - "type": "boolean" - }, - "allowDupNameBetweenInputAndOuputPort": { - "type": "boolean" - }, - "moduleSource": { - "type": "string", - "nullable": true - }, - "moduleScope": { - "type": "string", - "nullable": true - }, - "moduleAdditionalIncludesCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "moduleOSType": { - "type": "string", - "nullable": true - }, - "moduleCodegenBy": { - "type": "string", - "nullable": true - }, - "moduleClientSource": { - "type": "string", - "nullable": true - }, - "moduleIsBuiltin": { - "type": "boolean" - }, - "moduleRegisterEventExtensionFields": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RegisterRegistryComponentMetaInfo": { - "type": "object", - "properties": { - "registryName": { - "type": "string", - "nullable": true - }, - "intellectualPropertyPublisherInformation": { - "$ref": "#/components/schemas/IntellectualPropertyPublisherInformation" - }, - "blobReferenceData": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RegistryBlobReferenceData" - }, - "description": "This is a dictionary", - "nullable": true - }, - "amlModuleName": { - "type": "string", - "nullable": true - }, - "nameOnlyDisplayInfo": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "moduleVersionId": { - "type": "string", - "nullable": true - }, - "snapshotId": { - "type": "string", - "nullable": true - }, - "componentRegistrationType": { - "$ref": "#/components/schemas/ComponentRegistrationTypeEnum" - }, - "moduleEntityFromYaml": { - "$ref": "#/components/schemas/ModuleEntity" - }, - "setAsDefaultVersion": { - "type": "boolean" - }, - "dataTypesFromYaml": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DataTypeCreationInfo" - }, - "nullable": true - }, - "dataTypeMechanism": { - "$ref": "#/components/schemas/DataTypeMechanism" - }, - "identifierHash": { - "type": "string", - "nullable": true - }, - "identifierHashes": { - "type": "object", - "properties": { - "IdentifierHash": { - "type": "string" - }, - "IdentifierHashV2": { - "type": "string" - } - }, - "additionalProperties": false, - "nullable": true - }, - "contentHash": { - "type": "string", - "nullable": true - }, - "extraHash": { - "type": "string", - "nullable": true - }, - "extraHashes": { - "type": "object", - "properties": { - "IdentifierHash": { - "type": "string" - }, - "IdentifierHashV2": { - "type": "string" - } - }, - "additionalProperties": false, - "nullable": true - }, - "registration": { - "type": "boolean", - "nullable": true - }, - "validateOnly": { - "type": "boolean" - }, - "skipWorkspaceRelatedCheck": { - "type": "boolean" - }, - "intellectualPropertyProtectedWorkspaceComponentRegistrationAllowedPublisher": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "systemManagedRegistration": { - "type": "boolean" - }, - "allowDupNameBetweenInputAndOuputPort": { - "type": "boolean" - }, - "moduleSource": { - "type": "string", - "nullable": true - }, - "moduleScope": { - "type": "string", - "nullable": true - }, - "moduleAdditionalIncludesCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "moduleOSType": { - "type": "string", - "nullable": true - }, - "moduleCodegenBy": { - "type": "string", - "nullable": true - }, - "moduleClientSource": { - "type": "string", - "nullable": true - }, - "moduleIsBuiltin": { - "type": "boolean" - }, - "moduleRegisterEventExtensionFields": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RegisteredDataSetReference": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RegistrationOptions": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "datasetRegistrationOptions": { - "$ref": "#/components/schemas/DatasetRegistrationOptions" - } - }, - "additionalProperties": false - }, - "RegistryBlobReferenceData": { - "type": "object", - "properties": { - "dataReferenceId": { - "type": "string", - "nullable": true - }, - "data": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RegistryIdentity": { - "type": "object", - "properties": { - "resourceId": { - "type": "string", - "nullable": true - }, - "clientId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "Relationship": { - "type": "object", - "properties": { - "relationType": { - "type": "string", - "nullable": true - }, - "targetEntityId": { - "type": "string", - "nullable": true - }, - "assetId": { - "type": "string", - "nullable": true - }, - "entityType": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "direction": { - "type": "string", - "nullable": true - }, - "entityContainerId": { - "type": "string", - "nullable": true, - "readOnly": true - } - } - }, - "RemoteDockerComputeInfo": { - "type": "object", - "properties": { - "address": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - }, - "privateKey": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ResourceConfig": { - "type": "object", - "properties": { - "gpuCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "cpuCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "memoryRequestInGB": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "ResourceConfiguration": { - "type": "object", - "properties": { - "gpuCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "cpuCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "memoryRequestInGB": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "ResourcesSetting": { - "type": "object", - "properties": { - "instanceSize": { - "type": "string", - "nullable": true - }, - "sparkVersion": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ResumeBulkRunRequest": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "nullable": true - }, - "runDisplayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "resumeFromRunId": { - "type": "string", - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "identity": { - "type": "string", - "nullable": true - }, - "computeName": { - "type": "string", - "nullable": true - }, - "enableMultiContainer": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "RetrieveToolFuncResultRequest": { - "type": "object", - "properties": { - "func_path": { - "type": "string", - "nullable": true - }, - "func_kwargs": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - }, - "func_call_scenario": { - "$ref": "#/components/schemas/ToolFuncCallScenario" - } - }, - "additionalProperties": false - }, - "RetryConfiguration": { - "type": "object", - "properties": { - "maxRetryCount": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "RootError": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The service-defined error code. Supported error codes: ServiceError, UserError, ValidationError, AzureStorageError, TransientError, RequestThrottled.", - "nullable": true - }, - "severity": { - "type": "integer", - "description": "The Severity of error", - "format": "int32", - "nullable": true - }, - "message": { - "type": "string", - "description": "A human-readable representation of the error.", - "nullable": true - }, - "messageFormat": { - "type": "string", - "description": "An unformatted version of the message with no variable substitution.", - "nullable": true - }, - "messageParameters": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "description": "Value substitutions corresponding to the contents of MessageFormat.", - "nullable": true - }, - "referenceCode": { - "type": "string", - "description": "This code can optionally be set by the system generating the error.\r\nIt should be used to classify the problem and identify the module and code area where the failure occured.", - "nullable": true - }, - "detailsUri": { - "type": "string", - "description": "A URI which points to more details about the context of the error.", - "format": "uri", - "nullable": true - }, - "target": { - "type": "string", - "description": "The target of the error (e.g., the name of the property in error).", - "nullable": true - }, - "details": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RootError" - }, - "description": "The related errors that occurred during the request.", - "nullable": true - }, - "innerError": { - "$ref": "#/components/schemas/InnerErrorResponse" - }, - "additionalInfo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ErrorAdditionalInfo" - }, - "description": "The error additional info.", - "nullable": true - } - }, - "additionalProperties": false, - "description": "The root error." - }, - "RunAnnotations": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "primaryMetricName": { - "type": "string", - "nullable": true - }, - "estimatedCost": { - "type": "number", - "format": "double", - "nullable": true - }, - "primaryMetricSummary": { - "$ref": "#/components/schemas/RunIndexMetricSummary" - }, - "metrics": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RunIndexMetricSummarySystemObject" - }, - "nullable": true - }, - "parameters": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "settings": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "modifiedTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "retainForLifetimeOfWorkspace": { - "type": "boolean", - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/IndexedErrorResponse" - }, - "resourceMetricSummary": { - "$ref": "#/components/schemas/RunIndexResourceMetricSummary" - }, - "jobCost": { - "$ref": "#/components/schemas/JobCost" - }, - "computeDuration": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "computeDurationMilliseconds": { - "type": "number", - "format": "double", - "nullable": true - }, - "effectiveStartTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "archived": { - "type": "boolean" - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - } - }, - "RunCommandsCommandResult": { - "type": "object", - "properties": { - "command": { - "type": "string", - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "exit_code": { - "type": "integer", - "format": "int32" - }, - "stdout": { - "type": "string", - "nullable": true - }, - "stderr": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunConfiguration": { - "type": "object", - "properties": { - "script": { - "type": "string", - "nullable": true - }, - "scriptType": { - "$ref": "#/components/schemas/ScriptType" - }, - "command": { - "type": "string", - "nullable": true - }, - "useAbsolutePath": { - "type": "boolean" - }, - "arguments": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "framework": { - "$ref": "#/components/schemas/Framework" - }, - "communicator": { - "$ref": "#/components/schemas/Communicator" - }, - "target": { - "type": "string", - "nullable": true - }, - "autoClusterComputeSpecification": { - "$ref": "#/components/schemas/AutoClusterComputeSpecification" - }, - "dataReferences": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataReferenceConfiguration" - }, - "nullable": true - }, - "data": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Data" - }, - "nullable": true - }, - "inputAssets": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/InputAsset" - }, - "nullable": true - }, - "outputData": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OutputData" - }, - "nullable": true - }, - "datacaches": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatacacheConfiguration" - }, - "nullable": true - }, - "jobName": { - "type": "string", - "nullable": true - }, - "maxRunDurationSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "nodeCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxNodeCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "instanceTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "priority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "credentialPassthrough": { - "type": "boolean" - }, - "identity": { - "$ref": "#/components/schemas/IdentityConfiguration" - }, - "environment": { - "$ref": "#/components/schemas/EnvironmentDefinition" - }, - "history": { - "$ref": "#/components/schemas/HistoryConfiguration" - }, - "spark": { - "$ref": "#/components/schemas/SparkConfiguration" - }, - "parallelTask": { - "$ref": "#/components/schemas/ParallelTaskConfiguration" - }, - "tensorflow": { - "$ref": "#/components/schemas/TensorflowConfiguration" - }, - "mpi": { - "$ref": "#/components/schemas/MpiConfiguration" - }, - "pyTorch": { - "$ref": "#/components/schemas/PyTorchConfiguration" - }, - "ray": { - "$ref": "#/components/schemas/RayConfiguration" - }, - "hdi": { - "$ref": "#/components/schemas/HdiConfiguration" - }, - "docker": { - "$ref": "#/components/schemas/DockerConfiguration" - }, - "commandReturnCodeConfig": { - "$ref": "#/components/schemas/CommandReturnCodeConfig" - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "applicationEndpoints": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ApplicationEndpointConfiguration" - }, - "nullable": true - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterDefinition" - }, - "nullable": true - }, - "autologgerSettings": { - "$ref": "#/components/schemas/AutologgerSettings" - }, - "dataBricks": { - "$ref": "#/components/schemas/DatabricksConfiguration" - }, - "trainingDiagnosticConfig": { - "$ref": "#/components/schemas/TrainingDiagnosticConfiguration" - }, - "secretsConfiguration": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SecretConfiguration" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RunDatasetReference": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunDefinition": { - "type": "object", - "properties": { - "configuration": { - "$ref": "#/components/schemas/RunConfiguration" - }, - "snapshotId": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Snapshot" - }, - "nullable": true - }, - "parentRunId": { - "type": "string", - "nullable": true - }, - "runType": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "environmentAssetId": { - "type": "string", - "nullable": true - }, - "primaryMetricName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "cancelReason": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RunDetailsDto": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "nullable": true - }, - "runUuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "parentRunUuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "rootRunUuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "target": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "parentRunId": { - "type": "string", - "nullable": true - }, - "dataContainerId": { - "type": "string", - "nullable": true - }, - "createdTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "startTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "warnings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunDetailsWarningDto" - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "parameters": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "services": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EndpointSetting" - }, - "description": "This is a dictionary", - "nullable": true - }, - "inputDatasets": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetLineage" - }, - "nullable": true - }, - "outputDatasets": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/OutputDatasetLineage" - }, - "nullable": true - }, - "runDefinition": { - "nullable": true - }, - "logFiles": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "jobCost": { - "$ref": "#/components/schemas/JobCost" - }, - "revision": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "runTypeV2": { - "$ref": "#/components/schemas/RunTypeV2" - }, - "settings": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "computeRequest": { - "$ref": "#/components/schemas/ComputeRequest" - }, - "compute": { - "$ref": "#/components/schemas/Compute" - }, - "createdBy": { - "$ref": "#/components/schemas/User" - }, - "computeDuration": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "effectiveStartTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "runNumber": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "rootRunId": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "userId": { - "type": "string", - "nullable": true - }, - "statusRevision": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "currentComputeTime": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "lastStartTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastModifiedBy": { - "$ref": "#/components/schemas/User" - }, - "lastModifiedUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "duration": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/TypedAssetReference" - }, - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/TypedAssetReference" - }, - "nullable": true - }, - "currentAttemptId": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunDetailsWarningDto": { - "type": "object", - "properties": { - "source": { - "type": "string", - "nullable": true - }, - "message": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunDisplayNameGenerationType": { - "enum": [ - "AutoAppend", - "UserProvidedMacro" - ], - "type": "string" - }, - "RunDto": { - "type": "object", - "properties": { - "runNumber": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "rootRunId": { - "type": "string", - "nullable": true - }, - "createdUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "createdBy": { - "$ref": "#/components/schemas/User" - }, - "userId": { - "type": "string", - "nullable": true - }, - "token": { - "type": "string", - "nullable": true - }, - "tokenExpiryTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "warnings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunDetailsWarningDto" - }, - "nullable": true - }, - "revision": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "statusRevision": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "runUuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "parentRunUuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "rootRunUuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "lastStartTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "currentComputeTime": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "computeDuration": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "effectiveStartTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastModifiedBy": { - "$ref": "#/components/schemas/User" - }, - "lastModifiedUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "duration": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "cancelationReason": { - "type": "string", - "nullable": true - }, - "currentAttemptId": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "parentRunId": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "startTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTimeUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "scheduleId": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "dataContainerId": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "hidden": { - "type": "boolean", - "nullable": true - }, - "runType": { - "type": "string", - "nullable": true - }, - "runTypeV2": { - "$ref": "#/components/schemas/RunTypeV2" - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "parameters": { - "type": "object", - "additionalProperties": { - "nullable": true - }, - "nullable": true - }, - "actionUris": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "scriptName": { - "type": "string", - "nullable": true - }, - "target": { - "type": "string", - "nullable": true - }, - "uniqueChildRunComputeTargets": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "settings": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "services": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EndpointSetting" - }, - "nullable": true - }, - "inputDatasets": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetLineage" - }, - "nullable": true - }, - "outputDatasets": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/OutputDatasetLineage" - }, - "nullable": true - }, - "runDefinition": { - "nullable": true - }, - "jobSpecification": { - "nullable": true - }, - "primaryMetricName": { - "type": "string", - "nullable": true - }, - "createdFrom": { - "$ref": "#/components/schemas/CreatedFromDto" - }, - "cancelUri": { - "type": "string", - "nullable": true - }, - "completeUri": { - "type": "string", - "nullable": true - }, - "diagnosticsUri": { - "type": "string", - "nullable": true - }, - "computeRequest": { - "$ref": "#/components/schemas/ComputeRequest" - }, - "compute": { - "$ref": "#/components/schemas/Compute" - }, - "retainForLifetimeOfWorkspace": { - "type": "boolean", - "nullable": true - }, - "queueingInfo": { - "$ref": "#/components/schemas/QueueingInfo" - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/TypedAssetReference" - }, - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/TypedAssetReference" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "RunIndexEntity": { - "type": "object", - "properties": { - "schemaId": { - "type": "string", - "nullable": true - }, - "entityId": { - "type": "string", - "nullable": true - }, - "kind": { - "$ref": "#/components/schemas/EntityKind" - }, - "annotations": { - "$ref": "#/components/schemas/RunAnnotations" - }, - "properties": { - "$ref": "#/components/schemas/RunProperties" - }, - "internal": { - "$ref": "#/components/schemas/ExtensibleObject" - }, - "updateSequence": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "entityContainerId": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "entityObjectId": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "resourceType": { - "type": "string", - "nullable": true, - "readOnly": true - }, - "relationships": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Relationship" - }, - "nullable": true - }, - "assetId": { - "type": "string", - "nullable": true - }, - "usage": { - "$ref": "#/components/schemas/EntityUsage" - }, - "isAFragment": { - "type": "boolean" - }, - "fragmentId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunIndexMetricSummary": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int64" - }, - "lastValue": { - "nullable": true - }, - "minimumValue": { - "nullable": true - }, - "maximumValue": { - "nullable": true - }, - "metricType": { - "type": "string", - "nullable": true - } - } - }, - "RunIndexMetricSummarySystemObject": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "format": "int64" - }, - "lastValue": { - "nullable": true - }, - "minimumValue": { - "nullable": true - }, - "maximumValue": { - "nullable": true - }, - "metricType": { - "type": "string", - "nullable": true - } - } - }, - "RunIndexResourceMetricSummary": { - "type": "object", - "properties": { - "gpuUtilizationPercentLastHour": { - "type": "number", - "format": "double", - "nullable": true - }, - "gpuMemoryUtilizationPercentLastHour": { - "type": "number", - "format": "double", - "nullable": true - }, - "gpuEnergyJoules": { - "type": "number", - "format": "double", - "nullable": true - }, - "resourceMetricNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - } - }, - "RunMetricDto": { - "type": "object", - "properties": { - "runId": { - "type": "string", - "nullable": true - }, - "metricId": { - "type": "string", - "format": "uuid" - }, - "dataContainerId": { - "type": "string", - "nullable": true - }, - "metricType": { - "type": "string", - "nullable": true - }, - "createdUtc": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "numCells": { - "type": "integer", - "format": "int32" - }, - "dataLocation": { - "type": "string", - "nullable": true - }, - "cells": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "schema": { - "$ref": "#/components/schemas/MetricSchemaDto" - } - }, - "additionalProperties": false - }, - "RunMetricsTypesDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunProperties": { - "type": "object", - "properties": { - "dataContainerId": { - "type": "string", - "nullable": true - }, - "targetName": { - "type": "string", - "nullable": true - }, - "runName": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "parentRunId": { - "type": "string", - "nullable": true - }, - "rootRunId": { - "type": "string", - "nullable": true - }, - "runType": { - "type": "string", - "nullable": true - }, - "runTypeV2": { - "$ref": "#/components/schemas/RunTypeV2Index" - }, - "scriptName": { - "type": "string", - "nullable": true - }, - "experimentId": { - "type": "string", - "nullable": true - }, - "runUuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "parentRunUuid": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "runNumber": { - "type": "integer", - "format": "int32" - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "computeRequest": { - "$ref": "#/components/schemas/ComputeRequest" - }, - "compute": { - "$ref": "#/components/schemas/Compute" - }, - "userProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "actionUris": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "duration": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "durationMilliseconds": { - "type": "number", - "format": "double", - "nullable": true - }, - "creationContext": { - "$ref": "#/components/schemas/CreationContext" - } - } - }, - "RunSettingParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "parameterType": { - "$ref": "#/components/schemas/RunSettingParameterType" - }, - "isOptional": { - "type": "boolean", - "nullable": true - }, - "defaultValue": { - "type": "string", - "nullable": true - }, - "lowerBound": { - "type": "string", - "nullable": true - }, - "upperBound": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "runSettingUIHint": { - "$ref": "#/components/schemas/RunSettingUIParameterHint" - }, - "argumentName": { - "type": "string", - "nullable": true - }, - "sectionName": { - "type": "string", - "nullable": true - }, - "sectionDescription": { - "type": "string", - "nullable": true - }, - "sectionArgumentName": { - "type": "string", - "nullable": true - }, - "examples": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "enumValues": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "enumValuesToArgumentStrings": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enabledByParameterName": { - "type": "string", - "nullable": true - }, - "enabledByParameterValues": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "disabledByParameters": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "moduleRunSettingType": { - "$ref": "#/components/schemas/ModuleRunSettingTypes" - }, - "linkedParameterDefaultValueMapping": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "linkedParameterKeyName": { - "type": "string", - "nullable": true - }, - "supportLinkSetting": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "RunSettingParameterAssignment": { - "type": "object", - "properties": { - "useGraphDefaultCompute": { - "type": "boolean", - "nullable": true - }, - "mlcComputeType": { - "type": "string", - "nullable": true - }, - "computeRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "linkedParameterName": { - "type": "string", - "nullable": true - }, - "valueType": { - "$ref": "#/components/schemas/ParameterValueType" - }, - "assignmentsToConcatenate": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "nullable": true - }, - "dataPathAssignment": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "dataSetDefinitionValueAssignment": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "name": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunSettingParameterType": { - "enum": [ - "Undefined", - "Int", - "Double", - "Bool", - "String", - "JsonString", - "YamlString", - "StringList" - ], - "type": "string" - }, - "RunSettingUIParameterHint": { - "type": "object", - "properties": { - "uiWidgetType": { - "$ref": "#/components/schemas/RunSettingUIWidgetTypeEnum" - }, - "jsonEditor": { - "$ref": "#/components/schemas/UIJsonEditor" - }, - "yamlEditor": { - "$ref": "#/components/schemas/UIYamlEditor" - }, - "computeSelection": { - "$ref": "#/components/schemas/UIComputeSelection" - }, - "hyperparameterConfiguration": { - "$ref": "#/components/schemas/UIHyperparameterConfiguration" - }, - "uxIgnore": { - "type": "boolean" - }, - "anonymous": { - "type": "boolean" - }, - "supportReset": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "RunSettingUIWidgetTypeEnum": { - "enum": [ - "Default", - "ComputeSelection", - "JsonEditor", - "Mode", - "SearchSpaceParameter", - "SectionToggle", - "YamlEditor", - "EnableRuntimeSweep", - "DataStoreSelection", - "Checkbox", - "MultipleSelection", - "HyperparameterConfiguration", - "JsonTextBox", - "Connection", - "Static" - ], - "type": "string" - }, - "RunStatus": { - "enum": [ - "NotStarted", - "Unapproved", - "Pausing", - "Paused", - "Starting", - "Preparing", - "Queued", - "Running", - "Finalizing", - "CancelRequested", - "Completed", - "Failed", - "Canceled" - ], - "type": "string" - }, - "RunStatusPeriod": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/RunStatus" - }, - "subPeriods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubStatusPeriod" - }, - "nullable": true - }, - "start": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "end": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunType": { - "enum": [ - "HTTP", - "SDK", - "Schedule", - "Portal" - ], - "type": "string" - }, - "RunTypeV2": { - "type": "object", - "properties": { - "orchestrator": { - "type": "string", - "nullable": true - }, - "traits": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "attribution": { - "type": "string", - "nullable": true - }, - "computeType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RunTypeV2Index": { - "type": "object", - "properties": { - "orchestrator": { - "type": "string", - "nullable": true - }, - "traits": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "attribution": { - "type": "string", - "nullable": true - }, - "computeType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RuntimeConfiguration": { - "type": "object", - "properties": { - "baseImage": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "RuntimeStatusEnum": { - "enum": [ - "Unavailable", - "Failed", - "NotExist", - "Starting", - "Stopping" - ], - "type": "string" - }, - "RuntimeType": { - "enum": [ - "ManagedOnlineEndpoint", - "ComputeInstance", - "TrainingSession" - ], - "type": "string" - }, - "SampleMeta": { - "type": "object", - "properties": { - "image": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "docLink": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "feedName": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SamplingAlgorithmType": { - "enum": [ - "Random", - "Grid", - "Bayesian" - ], - "type": "string" - }, - "SavePipelineDraftRequest": { - "type": "object", - "properties": { - "uiWidgetMetaInfos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UIWidgetMetaInfo" - }, - "nullable": true - }, - "webServiceInputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebServicePort" - }, - "nullable": true - }, - "webServiceOutputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WebServicePort" - }, - "nullable": true - }, - "nodesInDraft": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "pipelineType": { - "$ref": "#/components/schemas/PipelineType" - }, - "pipelineDraftMode": { - "$ref": "#/components/schemas/PipelineDraftMode" - }, - "graphComponentsMode": { - "$ref": "#/components/schemas/GraphComponentsMode" - }, - "subPipelinesInfo": { - "$ref": "#/components/schemas/SubPipelinesInfo" - }, - "flattenedSubGraphs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineSubDraft" - }, - "nullable": true - }, - "pipelineParameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataPathAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "assetOutputSettingsAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "graph": { - "$ref": "#/components/schemas/GraphDraftEntity" - }, - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "moduleNodeRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeRunSetting" - }, - "nullable": true - }, - "moduleNodeUIInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enforceRerun": { - "type": "boolean", - "nullable": true - }, - "datasetAccessModes": { - "$ref": "#/components/schemas/DatasetAccessModes" - } - }, - "additionalProperties": false - }, - "SavedDataSetReference": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ScheduleBase": { - "type": "object", - "properties": { - "scheduleStatus": { - "$ref": "#/components/schemas/MfeInternalScheduleStatus" - }, - "scheduleType": { - "$ref": "#/components/schemas/ScheduleType" - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "timeZone": { - "type": "string", - "nullable": true - }, - "expression": { - "type": "string", - "nullable": true - }, - "frequency": { - "$ref": "#/components/schemas/RecurrenceFrequency" - }, - "interval": { - "type": "integer", - "format": "int32" - }, - "pattern": { - "$ref": "#/components/schemas/RecurrencePattern" - } - }, - "additionalProperties": false - }, - "ScheduleProvisioningStatus": { - "enum": [ - "Creating", - "Updating", - "Deleting", - "Succeeded", - "Failed", - "Canceled" - ], - "type": "string" - }, - "ScheduleStatus": { - "enum": [ - "Enabled", - "Disabled" - ], - "type": "string" - }, - "ScheduleType": { - "enum": [ - "Cron", - "Recurrence" - ], - "type": "string" - }, - "SchemaContractsCreatedBy": { - "type": "object", - "properties": { - "userObjectId": { - "type": "string", - "nullable": true - }, - "userTenantId": { - "type": "string", - "nullable": true - }, - "userName": { - "type": "string", - "nullable": true - }, - "userPrincipalName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ScopeCloudConfiguration": { - "type": "object", - "properties": { - "inputPathSuffixes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ArgumentAssignment" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputPathSuffixes": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ArgumentAssignment" - }, - "description": "This is a dictionary", - "nullable": true - }, - "userAlias": { - "type": "string", - "nullable": true - }, - "tokens": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "autoToken": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "vcp": { - "type": "number", - "format": "float", - "nullable": true - } - }, - "additionalProperties": false - }, - "ScopeType": { - "enum": [ - "Global", - "Tenant", - "Subscription", - "ResourceGroup", - "Workspace" - ], - "type": "string" - }, - "ScriptType": { - "enum": [ - "Python", - "Notebook" - ], - "type": "string" - }, - "Seasonality": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/SeasonalityMode" - }, - "value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "SeasonalityMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "SecretConfiguration": { - "type": "object", - "properties": { - "workspace_secret_name": { - "type": "string", - "nullable": true - }, - "uri": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SegmentedResult`1": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowIndexEntity" - }, - "nullable": true - }, - "continuationToken": { - "type": "string", - "nullable": true - }, - "count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "nextLink": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ServiceLogRequest": { - "type": "object", - "properties": { - "logLevel": { - "$ref": "#/components/schemas/LogLevel" - }, - "message": { - "type": "string", - "nullable": true - }, - "timestamp": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "SessionApplication": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "envVars": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "pythonPipRequirements": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "volumes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Volume" - }, - "nullable": true - }, - "setupResults": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionApplicationRunCommandResult" - }, - "nullable": true - }, - "port": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "SessionApplicationRunCommandResult": { - "type": "object", - "properties": { - "command": { - "type": "string", - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "exitCode": { - "type": "integer", - "format": "int32" - }, - "stdOut": { - "type": "string", - "nullable": true - }, - "stdErr": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SessionConfigModeEnum": { - "enum": [ - "Default", - "ForceInstallPackage", - "ForceReset" - ], - "type": "string" - }, - "SessionProperties": { - "type": "object", - "properties": { - "sessionId": { - "type": "string", - "nullable": true - }, - "subscriptionId": { - "type": "string", - "nullable": true - }, - "resourceGroupName": { - "type": "string", - "nullable": true - }, - "workspaceName": { - "type": "string", - "nullable": true - }, - "existingUserComputeInstanceName": { - "type": "string", - "nullable": true - }, - "userObjectId": { - "type": "string", - "nullable": true - }, - "userTenantId": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64" - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SessionApplication" - }, - "nullable": true - }, - "application": { - "$ref": "#/components/schemas/SessionApplication" - }, - "lastAliveTime": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "SessionSetupModeEnum": { - "enum": [ - "ClientWait", - "SystemWait" - ], - "type": "string" - }, - "SetupFlowSessionAction": { - "enum": [ - "Install", - "Reset", - "Update", - "Delete" - ], - "type": "string" - }, - "SetupFlowSessionRequest": { - "type": "object", - "properties": { - "action": { - "$ref": "#/components/schemas/SetupFlowSessionAction" - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "identity": { - "type": "string", - "nullable": true - }, - "computeName": { - "type": "string", - "nullable": true - }, - "enableMultiContainer": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "SeverityLevel": { - "enum": [ - "Critical", - "Error", - "Warning", - "Info" - ], - "type": "string" - }, - "SharingScope": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/ScopeType" - }, - "identifier": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ShortSeriesHandlingConfiguration": { - "enum": [ - "Auto", - "Pad", - "Drop" - ], - "type": "string" - }, - "Snapshot": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "directoryName": { - "type": "string", - "nullable": true - }, - "snapshotAssetId": { - "type": "string", - "nullable": true - }, - "snapshotEntityId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SnapshotInfo": { - "type": "object", - "properties": { - "rootDownloadUrl": { - "type": "string", - "nullable": true - }, - "snapshots": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DownloadResourceInfo" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "SourceCodeDataReference": { - "type": "object", - "properties": { - "dataStoreName": { - "type": "string", - "nullable": true - }, - "path": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SparkConfiguration": { - "type": "object", - "properties": { - "configuration": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "archives": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "jars": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "pyFiles": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "sparkPoolResourceId": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SparkJarTaskDto": { - "type": "object", - "properties": { - "main_class_name": { - "type": "string", - "nullable": true - }, - "parameters": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SparkJob": { - "type": "object", - "properties": { - "jobType": { - "$ref": "#/components/schemas/JobType" - }, - "resources": { - "$ref": "#/components/schemas/SparkResourceConfiguration" - }, - "args": { - "type": "string", - "nullable": true - }, - "codeId": { - "type": "string", - "nullable": true - }, - "entry": { - "$ref": "#/components/schemas/SparkJobEntry" - }, - "pyFiles": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "jars": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "files": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "archives": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "environmentId": { - "type": "string", - "nullable": true - }, - "inputDataBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/InputDataBinding" - }, - "nullable": true - }, - "outputDataBindings": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OutputDataBinding" - }, - "nullable": true - }, - "conf": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "provisioningState": { - "$ref": "#/components/schemas/JobProvisioningState" - }, - "parentJobName": { - "type": "string", - "nullable": true - }, - "displayName": { - "type": "string", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/JobStatus" - }, - "interactionEndpoints": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JobEndpoint" - }, - "nullable": true - }, - "identity": { - "$ref": "#/components/schemas/MfeInternalIdentityConfiguration" - }, - "compute": { - "$ref": "#/components/schemas/ComputeConfiguration" - }, - "priority": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "output": { - "$ref": "#/components/schemas/JobOutputArtifacts" - }, - "isArchived": { - "type": "boolean" - }, - "schedule": { - "$ref": "#/components/schemas/ScheduleBase" - }, - "componentId": { - "type": "string", - "nullable": true - }, - "notificationSetting": { - "$ref": "#/components/schemas/NotificationSetting" - }, - "secretsConfiguration": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/MfeInternalSecretConfiguration" - }, - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "SparkJobEntry": { - "type": "object", - "properties": { - "file": { - "type": "string", - "nullable": true - }, - "className": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SparkMavenPackage": { - "type": "object", - "properties": { - "group": { - "type": "string", - "nullable": true - }, - "artifact": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SparkPythonTaskDto": { - "type": "object", - "properties": { - "python_file": { - "type": "string", - "nullable": true - }, - "parameters": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SparkResourceConfiguration": { - "type": "object", - "properties": { - "instanceType": { - "type": "string", - "nullable": true - }, - "runtimeVersion": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SparkSection": { - "type": "object", - "properties": { - "repositories": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "packages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SparkMavenPackage" - }, - "nullable": true - }, - "precachePackages": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "SparkSubmitTaskDto": { - "type": "object", - "properties": { - "parameters": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SqlDataPath": { - "type": "object", - "properties": { - "sqlTableName": { - "type": "string", - "nullable": true - }, - "sqlQuery": { - "type": "string", - "nullable": true - }, - "sqlStoredProcedureName": { - "type": "string", - "nullable": true - }, - "sqlStoredProcedureParams": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StoredProcedureParameter" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "StackEnsembleSettings": { - "type": "object", - "properties": { - "stackMetaLearnerType": { - "$ref": "#/components/schemas/StackMetaLearnerType" - }, - "stackMetaLearnerTrainPercentage": { - "type": "number", - "format": "double", - "nullable": true - }, - "stackMetaLearnerKWargs": { - "nullable": true - } - }, - "additionalProperties": false - }, - "StackMetaLearnerType": { - "enum": [ - "None", - "LogisticRegression", - "LogisticRegressionCV", - "LightGBMClassifier", - "ElasticNet", - "ElasticNetCV", - "LightGBMRegressor", - "LinearRegression" - ], - "type": "string" - }, - "StandbyPoolProperties": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "count": { - "type": "integer", - "format": "int32" - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "standbyAvailableInstances": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StandbyPoolResourceStatus" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "StandbyPoolResourceStatus": { - "type": "object", - "properties": { - "status": { - "type": "string", - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/CloudError" - } - }, - "additionalProperties": false - }, - "StartRunResult": { - "required": [ - "runId" - ], - "type": "object", - "properties": { - "runId": { - "minLength": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "StepRunProfile": { - "type": "object", - "properties": { - "stepRunId": { - "type": "string", - "nullable": true - }, - "stepRunNumber": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "runUrl": { - "type": "string", - "nullable": true - }, - "computeTarget": { - "type": "string", - "nullable": true - }, - "computeTargetUrl": { - "type": "string", - "nullable": true - }, - "nodeId": { - "type": "string", - "nullable": true - }, - "nodeName": { - "type": "string", - "nullable": true - }, - "stepName": { - "type": "string", - "nullable": true - }, - "createTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "startTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "endTime": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RunStatus" - }, - "statusDetail": { - "type": "string", - "nullable": true - }, - "isReused": { - "type": "boolean" - }, - "reusedPipelineRunId": { - "type": "string", - "nullable": true - }, - "reusedStepRunId": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "statusTimeline": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunStatusPeriod" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "StorageAuthType": { - "enum": [ - "MSI", - "ConnectionString", - "SAS" - ], - "type": "string" - }, - "StorageInfo": { - "type": "object", - "properties": { - "storageAuthType": { - "$ref": "#/components/schemas/StorageAuthType" - }, - "connectionString": { - "type": "string", - "nullable": true - }, - "sasToken": { - "type": "string", - "nullable": true - }, - "accountName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "StoredProcedureParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/StoredProcedureParameterType" - } - }, - "additionalProperties": false - }, - "StoredProcedureParameterType": { - "enum": [ - "String", - "Int", - "Decimal", - "Guid", - "Boolean", - "Date" - ], - "type": "string" - }, - "Stream": { - "type": "object", - "properties": { - "canRead": { - "type": "boolean", - "readOnly": true - }, - "canWrite": { - "type": "boolean", - "readOnly": true - }, - "canSeek": { - "type": "boolean", - "readOnly": true - }, - "canTimeout": { - "type": "boolean", - "readOnly": true - }, - "length": { - "type": "integer", - "format": "int64", - "readOnly": true - }, - "position": { - "type": "integer", - "format": "int64" - }, - "readTimeout": { - "type": "integer", - "format": "int32" - }, - "writeTimeout": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "StructuredInterface": { - "type": "object", - "properties": { - "commandLinePattern": { - "type": "string", - "nullable": true - }, - "inputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StructuredInterfaceInput" - }, - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StructuredInterfaceOutput" - }, - "nullable": true - }, - "controlOutputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ControlOutput" - }, - "nullable": true - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StructuredInterfaceParameter" - }, - "nullable": true - }, - "metadataParameters": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StructuredInterfaceParameter" - }, - "nullable": true - }, - "arguments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ArgumentAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "StructuredInterfaceInput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "dataTypeIdsList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "isOptional": { - "type": "boolean" - }, - "description": { - "type": "string", - "nullable": true - }, - "skipProcessing": { - "type": "boolean" - }, - "isResource": { - "type": "boolean" - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AEVADataStoreMode" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "overwrite": { - "type": "boolean" - }, - "dataReferenceName": { - "type": "string", - "nullable": true - }, - "datasetTypes": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/DatasetType" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "StructuredInterfaceOutput": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "dataTypeId": { - "type": "string", - "nullable": true - }, - "passThroughDataTypeInputName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "skipProcessing": { - "type": "boolean" - }, - "IsArtifact": { - "type": "boolean" - }, - "dataStoreName": { - "type": "string", - "nullable": true - }, - "dataStoreMode": { - "$ref": "#/components/schemas/AEVADataStoreMode" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - }, - "overwrite": { - "type": "boolean" - }, - "dataReferenceName": { - "type": "string", - "nullable": true - }, - "trainingOutput": { - "$ref": "#/components/schemas/TrainingOutput" - }, - "datasetOutput": { - "$ref": "#/components/schemas/DatasetOutput" - }, - "AssetOutputSettings": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "EarlyAvailable": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "StructuredInterfaceParameter": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "label": { - "type": "string", - "nullable": true - }, - "parameterType": { - "$ref": "#/components/schemas/ParameterType" - }, - "isOptional": { - "type": "boolean" - }, - "defaultValue": { - "type": "string", - "nullable": true - }, - "lowerBound": { - "type": "string", - "nullable": true - }, - "upperBound": { - "type": "string", - "nullable": true - }, - "enumValues": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "enumValuesToArgumentStrings": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "setEnvironmentVariable": { - "type": "boolean" - }, - "environmentVariableOverride": { - "type": "string", - "nullable": true - }, - "enabledByParameterName": { - "type": "string", - "nullable": true - }, - "enabledByParameterValues": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "uiHint": { - "$ref": "#/components/schemas/UIParameterHint" - }, - "groupNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "argumentName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "StudioMigrationInfo": { - "type": "object", - "properties": { - "sourceWorkspaceId": { - "type": "string", - "nullable": true - }, - "sourceExperimentId": { - "type": "string", - "nullable": true - }, - "sourceExperimentLink": { - "type": "string", - "nullable": true - }, - "failedNodeIdList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "errorMessage": { - "type": "string", - "nullable": true, - "readOnly": true - } - }, - "additionalProperties": false - }, - "SubGraphConcatenateAssignment": { - "type": "object", - "properties": { - "concatenateParameter": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ParameterAssignment" - }, - "nullable": true - }, - "parameterAssignments": { - "$ref": "#/components/schemas/SubPipelineParameterAssignment" - } - }, - "additionalProperties": false - }, - "SubGraphConfiguration": { - "type": "object", - "properties": { - "graphId": { - "type": "string", - "nullable": true - }, - "graphDraftId": { - "type": "string", - "nullable": true - }, - "DefaultCloudPriority": { - "$ref": "#/components/schemas/CloudPrioritySetting" - }, - "IsDynamic": { - "type": "boolean", - "default": false, - "nullable": true - } - }, - "additionalProperties": false - }, - "SubGraphConnectionInfo": { - "type": "object", - "properties": { - "nodeId": { - "type": "string", - "nullable": true - }, - "portName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SubGraphDataPathParameterAssignment": { - "type": "object", - "properties": { - "dataSetPathParameter": { - "$ref": "#/components/schemas/DataSetPathParameter" - }, - "dataSetPathParameterAssignments": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SubGraphInfo": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "defaultComputeTarget": { - "$ref": "#/components/schemas/ComputeSetting" - }, - "defaultDataStore": { - "$ref": "#/components/schemas/DatastoreSetting" - }, - "id": { - "type": "string", - "nullable": true - }, - "parentGraphId": { - "type": "string", - "nullable": true - }, - "pipelineDefinitionId": { - "type": "string", - "nullable": true - }, - "subGraphParameterAssignment": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubGraphParameterAssignment" - }, - "nullable": true - }, - "subGraphConcatenateAssignment": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubGraphConcatenateAssignment" - }, - "nullable": true - }, - "subGraphDataPathParameterAssignment": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubGraphDataPathParameterAssignment" - }, - "nullable": true - }, - "subGraphDefaultComputeTargetNodes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "subGraphDefaultDataStoreNodes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "inputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubGraphPortInfo" - }, - "nullable": true - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubGraphPortInfo" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SubGraphParameterAssignment": { - "type": "object", - "properties": { - "parameter": { - "$ref": "#/components/schemas/Parameter" - }, - "parameterAssignments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubPipelineParameterAssignment" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SubGraphPortInfo": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "internal": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubGraphConnectionInfo" - }, - "nullable": true - }, - "external": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubGraphConnectionInfo" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SubPipelineDefinition": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "defaultComputeTarget": { - "$ref": "#/components/schemas/ComputeSetting" - }, - "defaultDataStore": { - "$ref": "#/components/schemas/DatastoreSetting" - }, - "pipelineFunctionName": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "parentDefinitionId": { - "type": "string", - "nullable": true - }, - "fromModuleName": { - "type": "string", - "nullable": true - }, - "parameterList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Kwarg" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SubPipelineParameterAssignment": { - "type": "object", - "properties": { - "nodeId": { - "type": "string", - "nullable": true - }, - "parameterName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SubPipelinesInfo": { - "type": "object", - "properties": { - "subGraphInfo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubGraphInfo" - }, - "nullable": true - }, - "nodeIdToSubGraphIdMapping": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "subPipelineDefinition": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubPipelineDefinition" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SubStatusPeriod": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "subPeriods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SubStatusPeriod" - }, - "nullable": true - }, - "start": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "end": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - "additionalProperties": false - }, - "SubmitBulkRunRequest": { - "type": "object", - "properties": { - "flowDefinitionFilePath": { - "type": "string", - "nullable": true - }, - "flowDefinitionResourceId": { - "type": "string", - "nullable": true - }, - "flowDefinitionDataStoreName": { - "type": "string", - "nullable": true - }, - "flowDefinitionBlobPath": { - "type": "string", - "nullable": true - }, - "flowDefinitionDataUri": { - "type": "string", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "runDisplayName": { - "type": "string", - "nullable": true - }, - "runExperimentName": { - "type": "string", - "nullable": true - }, - "nodeVariant": { - "type": "string", - "nullable": true - }, - "variantRunId": { - "type": "string", - "nullable": true - }, - "baselineRunId": { - "type": "string", - "nullable": true - }, - "sessionId": { - "type": "string", - "nullable": true - }, - "sessionSetupMode": { - "$ref": "#/components/schemas/SessionSetupModeEnum" - }, - "sessionConfigMode": { - "$ref": "#/components/schemas/SessionConfigModeEnum" - }, - "flowLineageId": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "identity": { - "type": "string", - "nullable": true - }, - "computeName": { - "type": "string", - "nullable": true - }, - "enableMultiContainer": { - "type": "boolean" - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "inputsMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "connections": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary" - }, - "description": "This is a dictionary", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputDataStore": { - "type": "string", - "nullable": true - }, - "runDisplayNameGenerationType": { - "$ref": "#/components/schemas/RunDisplayNameGenerationType" - }, - "collieRunSettings": { - "$ref": "#/components/schemas/CollieRunSettings" - }, - "workerCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timeoutInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "promptflowEngineType": { - "$ref": "#/components/schemas/PromptflowEngineType" - }, - "experimentNodeName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SubmitBulkRunResponse": { - "type": "object", - "properties": { - "nextActionIntervalInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "actionType": { - "$ref": "#/components/schemas/ActionType" - }, - "flow_runs": { - "type": "array", - "items": {}, - "nullable": true - }, - "node_runs": { - "type": "array", - "items": {}, - "nullable": true - }, - "errorResponse": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "flowName": { - "type": "string", - "nullable": true - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "flowRunId": { - "type": "string", - "nullable": true - }, - "flowGraph": { - "$ref": "#/components/schemas/FlowGraph" - }, - "flowGraphLayout": { - "$ref": "#/components/schemas/FlowGraphLayout" - }, - "flowRunResourceId": { - "type": "string", - "nullable": true - }, - "bulkTestId": { - "type": "string", - "nullable": true - }, - "batchInputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "createdBy": { - "$ref": "#/components/schemas/SchemaContractsCreatedBy" - }, - "createdOn": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "flowRunType": { - "$ref": "#/components/schemas/FlowRunTypeEnum" - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "amlComputeName": { - "type": "string", - "nullable": true - }, - "flowRunLogs": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "flowTestMode": { - "$ref": "#/components/schemas/FlowTestMode" - }, - "flowTestInfos": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowTestInfo" - }, - "nullable": true - }, - "workingDirectory": { - "type": "string", - "nullable": true - }, - "flowDagFileRelativePath": { - "type": "string", - "nullable": true - }, - "flowSnapshotId": { - "type": "string", - "nullable": true - }, - "variantRunToEvaluationRunsIdMapping": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "SubmitFlowRequest": { - "type": "object", - "properties": { - "flowRunId": { - "type": "string", - "nullable": true - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "flowId": { - "type": "string", - "nullable": true - }, - "flow": { - "$ref": "#/components/schemas/Flow" - }, - "flowSubmitRunSettings": { - "$ref": "#/components/schemas/FlowSubmitRunSettings" - }, - "asyncSubmission": { - "type": "boolean" - }, - "useWorkspaceConnection": { - "type": "boolean" - }, - "enableAsyncFlowTest": { - "type": "boolean" - }, - "runDisplayNameGenerationType": { - "$ref": "#/components/schemas/RunDisplayNameGenerationType" - } - }, - "additionalProperties": false - }, - "SubmitPipelineRunRequest": { - "type": "object", - "properties": { - "computeTarget": { - "type": "string", - "nullable": true - }, - "flattenedSubGraphs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/PipelineSubDraft" - }, - "nullable": true - }, - "stepTags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "experimentName": { - "type": "string", - "nullable": true - }, - "pipelineParameters": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataPathAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/LegacyDataPath" - }, - "description": "This is a dictionary", - "nullable": true - }, - "dataSetDefinitionValueAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/DataSetDefinitionValue" - }, - "description": "This is a dictionary", - "nullable": true - }, - "assetOutputSettingsAssignments": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AssetOutputSettings" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enableNotification": { - "type": "boolean", - "nullable": true - }, - "subPipelinesInfo": { - "$ref": "#/components/schemas/SubPipelinesInfo" - }, - "displayName": { - "type": "string", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "parentRunId": { - "type": "string", - "nullable": true - }, - "graph": { - "$ref": "#/components/schemas/GraphDraftEntity" - }, - "pipelineRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameterAssignment" - }, - "nullable": true - }, - "moduleNodeRunSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeRunSetting" - }, - "nullable": true - }, - "moduleNodeUIInputSettings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GraphModuleNodeUIInputSetting" - }, - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "continueRunOnStepFailure": { - "type": "boolean", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "enforceRerun": { - "type": "boolean", - "nullable": true - }, - "datasetAccessModes": { - "$ref": "#/components/schemas/DatasetAccessModes" - } - }, - "additionalProperties": false - }, - "SuccessfulCommandReturnCode": { - "enum": [ - "Zero", - "ZeroOrGreater" - ], - "type": "string" - }, - "SweepEarlyTerminationPolicy": { - "type": "object", - "properties": { - "policyType": { - "$ref": "#/components/schemas/EarlyTerminationPolicyType" - }, - "evaluationInterval": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "delayEvaluation": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "slackFactor": { - "type": "number", - "format": "float", - "nullable": true - }, - "slackAmount": { - "type": "number", - "format": "float", - "nullable": true - }, - "truncationPercentage": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "SweepSettings": { - "type": "object", - "properties": { - "limits": { - "$ref": "#/components/schemas/SweepSettingsLimits" - }, - "searchSpace": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "nullable": true - }, - "samplingAlgorithm": { - "$ref": "#/components/schemas/SamplingAlgorithmType" - }, - "earlyTermination": { - "$ref": "#/components/schemas/SweepEarlyTerminationPolicy" - } - }, - "additionalProperties": false - }, - "SweepSettingsLimits": { - "type": "object", - "properties": { - "maxTotalTrials": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "maxConcurrentTrials": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "SystemData": { - "type": "object", - "properties": { - "createdAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "createdBy": { - "type": "string", - "nullable": true - }, - "createdByType": { - "$ref": "#/components/schemas/UserType" - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "lastModifiedBy": { - "type": "string", - "nullable": true - }, - "lastModifiedByType": { - "$ref": "#/components/schemas/UserType" - } - }, - "additionalProperties": false - }, - "SystemMeta": { - "type": "object", - "properties": { - "identifierHash": { - "type": "string", - "nullable": true - }, - "extraHash": { - "type": "string", - "nullable": true - }, - "contentHash": { - "type": "string", - "nullable": true - }, - "identifierHashes": { - "type": "object", - "properties": { - "IdentifierHash": { - "type": "string" - }, - "IdentifierHashV2": { - "type": "string" - } - }, - "additionalProperties": false, - "nullable": true - }, - "extraHashes": { - "type": "object", - "properties": { - "IdentifierHash": { - "type": "string" - }, - "IdentifierHashV2": { - "type": "string" - } - }, - "additionalProperties": false, - "nullable": true - } - }, - "additionalProperties": false - }, - "TabularTrainingMode": { - "enum": [ - "Distributed", - "NonDistributed", - "Auto" - ], - "type": "string" - }, - "TargetAggregationFunction": { - "enum": [ - "Sum", - "Max", - "Min", - "Mean" - ], - "type": "string" - }, - "TargetLags": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/TargetLagsMode" - }, - "values": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "TargetLagsMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "TargetRollingWindowSize": { - "type": "object", - "properties": { - "mode": { - "$ref": "#/components/schemas/TargetRollingWindowSizeMode" - }, - "value": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "TargetRollingWindowSizeMode": { - "enum": [ - "Auto", - "Custom" - ], - "type": "string" - }, - "TargetSelectorConfiguration": { - "type": "object", - "properties": { - "lowPriorityVMTolerant": { - "type": "boolean" - }, - "clusterBlockList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "computeType": { - "type": "string", - "nullable": true - }, - "instanceType": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "instanceTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "myResourceOnly": { - "type": "boolean" - }, - "planId": { - "type": "string", - "nullable": true - }, - "planRegionId": { - "type": "string", - "nullable": true - }, - "region": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "regions": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "vcBlockList": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "Task": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32", - "readOnly": true - }, - "exception": { - "nullable": true, - "readOnly": true - }, - "status": { - "$ref": "#/components/schemas/TaskStatus" - }, - "isCanceled": { - "type": "boolean", - "readOnly": true - }, - "isCompleted": { - "type": "boolean", - "readOnly": true - }, - "isCompletedSuccessfully": { - "type": "boolean", - "readOnly": true - }, - "creationOptions": { - "$ref": "#/components/schemas/TaskCreationOptions" - }, - "asyncState": { - "nullable": true, - "readOnly": true - }, - "isFaulted": { - "type": "boolean", - "readOnly": true - } - }, - "additionalProperties": false - }, - "TaskControlFlowInfo": { - "type": "object", - "properties": { - "controlFlowType": { - "$ref": "#/components/schemas/ControlFlowType" - }, - "iterationIndex": { - "type": "integer", - "format": "int32" - }, - "itemName": { - "type": "string", - "nullable": true - }, - "parametersOverwritten": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "isReused": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "TaskCreationOptions": { - "enum": [ - "None", - "PreferFairness", - "LongRunning", - "AttachedToParent", - "DenyChildAttach", - "HideScheduler", - "RunContinuationsAsynchronously" - ], - "type": "string" - }, - "TaskReuseInfo": { - "type": "object", - "properties": { - "experimentId": { - "type": "string", - "nullable": true - }, - "pipelineRunId": { - "type": "string", - "nullable": true - }, - "nodeId": { - "type": "string", - "nullable": true - }, - "requestId": { - "type": "string", - "nullable": true - }, - "runId": { - "type": "string", - "nullable": true - }, - "nodeStartTime": { - "type": "string", - "format": "date-time" - }, - "nodeEndTime": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "TaskStatus": { - "enum": [ - "Created", - "WaitingForActivation", - "WaitingToRun", - "Running", - "WaitingForChildrenToComplete", - "RanToCompletion", - "Canceled", - "Faulted" - ], - "type": "string" - }, - "TaskStatusCode": { - "enum": [ - "NotStarted", - "Queued", - "Running", - "Failed", - "Finished", - "Canceled", - "PartiallyExecuted", - "Bypassed" - ], - "type": "string" - }, - "TaskType": { - "enum": [ - "Classification", - "Regression", - "Forecasting", - "ImageClassification", - "ImageClassificationMultilabel", - "ImageObjectDetection", - "ImageInstanceSegmentation", - "TextClassification", - "TextMultiLabeling", - "TextNER", - "TextClassificationMultilabel" - ], - "type": "string" - }, - "TensorflowConfiguration": { - "type": "object", - "properties": { - "workerCount": { - "type": "integer", - "format": "int32" - }, - "parameterServerCount": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "TestDataSettings": { - "type": "object", - "properties": { - "testDataSize": { - "type": "number", - "format": "double", - "nullable": true - } - }, - "additionalProperties": false - }, - "Tool": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ToolType" - }, - "inputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/InputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputs": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/OutputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "connection_type": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionType" - }, - "nullable": true - }, - "module": { - "type": "string", - "nullable": true - }, - "class_name": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "nullable": true - }, - "lkgCode": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "function": { - "type": "string", - "nullable": true - }, - "action_type": { - "type": "string", - "nullable": true - }, - "provider_config": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/InputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "function_config": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/InputDefinition" - }, - "description": "This is a dictionary", - "nullable": true - }, - "icon": { - "nullable": true - }, - "category": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary", - "nullable": true - }, - "is_builtin": { - "type": "boolean" - }, - "package": { - "type": "string", - "nullable": true - }, - "package_version": { - "type": "string", - "nullable": true - }, - "default_prompt": { - "type": "string", - "nullable": true - }, - "enable_kwargs": { - "type": "boolean" - }, - "deprecated_tools": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "tool_state": { - "$ref": "#/components/schemas/ToolState" - } - }, - "additionalProperties": false - }, - "ToolFuncCallScenario": { - "enum": [ - "generated_by", - "reverse_generated_by", - "dynamic_list" - ], - "type": "string" - }, - "ToolFuncResponse": { - "type": "object", - "properties": { - "result": { - "nullable": true - }, - "logs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "ToolInputDynamicList": { - "type": "object", - "properties": { - "func_path": { - "type": "string", - "nullable": true - }, - "func_kwargs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ToolInputGeneratedBy": { - "type": "object", - "properties": { - "func_path": { - "type": "string", - "nullable": true - }, - "func_kwargs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "reverse_func_path": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ToolMetaDto": { - "type": "object", - "properties": { - "tools": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Tool" - }, - "description": "This is a dictionary", - "nullable": true - }, - "errors": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "ToolSetting": { - "type": "object", - "properties": { - "providers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProviderEntity" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ToolSourceMeta": { - "type": "object", - "properties": { - "tool_type": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ToolState": { - "enum": [ - "Stable", - "Preview", - "Deprecated" - ], - "type": "string" - }, - "ToolType": { - "enum": [ - "llm", - "python", - "action", - "prompt", - "custom_llm", - "csharp", - "typescript" - ], - "type": "string" - }, - "TorchDistributedConfiguration": { - "type": "object", - "properties": { - "processCountPerNode": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "TraceCosmosResourceDto": { - "type": "object", - "properties": { - "accountEndpoint": { - "type": "string", - "nullable": true - }, - "databaseName": { - "type": "string", - "nullable": true - }, - "containerName": { - "type": "string", - "nullable": true - }, - "resourceUrl": { - "type": "string", - "nullable": true - }, - "resourceToken": { - "type": "string", - "nullable": true - }, - "permissionMode": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "TraceCosmosResourceDtos": { - "type": "object", - "properties": { - "resourceTokens": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/TraceCosmosResourceDto" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "TrainingDiagnosticConfiguration": { - "type": "object", - "properties": { - "jobHeartBeatTimeoutSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "TrainingOutput": { - "type": "object", - "properties": { - "trainingOutputType": { - "$ref": "#/components/schemas/TrainingOutputType" - }, - "iteration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "metric": { - "type": "string", - "nullable": true - }, - "modelFile": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "TrainingOutputType": { - "enum": [ - "Metrics", - "Model" - ], - "type": "string" - }, - "TrainingSettings": { - "type": "object", - "properties": { - "blockListModels": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "allowListModels": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "enableDnnTraining": { - "type": "boolean", - "nullable": true - }, - "enableOnnxCompatibleModels": { - "type": "boolean", - "nullable": true - }, - "stackEnsembleSettings": { - "$ref": "#/components/schemas/StackEnsembleSettings" - }, - "enableStackEnsemble": { - "type": "boolean", - "nullable": true - }, - "enableVoteEnsemble": { - "type": "boolean", - "nullable": true - }, - "ensembleModelDownloadTimeout": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "enableModelExplainability": { - "type": "boolean", - "nullable": true - }, - "trainingMode": { - "$ref": "#/components/schemas/TabularTrainingMode" - } - }, - "additionalProperties": false - }, - "TriggerAsyncOperationStatus": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "operationType": { - "$ref": "#/components/schemas/TriggerOperationType" - }, - "provisioningStatus": { - "$ref": "#/components/schemas/ScheduleProvisioningStatus" - }, - "createdTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "error": { - "$ref": "#/components/schemas/ErrorResponse" - }, - "statusCode": { - "$ref": "#/components/schemas/HttpStatusCode" - } - }, - "additionalProperties": false - }, - "TriggerOperationType": { - "enum": [ - "Create", - "Update", - "Delete", - "CreateOrUpdate" - ], - "type": "string" - }, - "TriggerType": { - "enum": [ - "Recurrence", - "Cron" - ], - "type": "string" - }, - "TuningNodeRunSetting": { - "type": "object", - "properties": { - "simulationFlow": { - "$ref": "#/components/schemas/FlowGraphReference" - }, - "simulationFlowRunSetting": { - "$ref": "#/components/schemas/FlowRunSettingsBase" - }, - "batch_inputs": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": {}, - "description": "This is a dictionary" - }, - "nullable": true - }, - "inputUniversalLink": { - "type": "string", - "nullable": true - }, - "dataInputs": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "flowRunOutputDirectory": { - "type": "string", - "nullable": true - }, - "connectionOverrides": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionOverrideSetting" - }, - "nullable": true - }, - "flowRunDisplayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "runtimeName": { - "type": "string", - "nullable": true - }, - "batchDataInput": { - "$ref": "#/components/schemas/BatchDataInput" - }, - "inputsMapping": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "connections": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary" - }, - "description": "This is a dictionary", - "nullable": true - }, - "environmentVariables": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "description": "This is a dictionary", - "nullable": true - }, - "outputDataStore": { - "type": "string", - "nullable": true - }, - "runDisplayNameGenerationType": { - "$ref": "#/components/schemas/RunDisplayNameGenerationType" - }, - "collieRunSettings": { - "$ref": "#/components/schemas/CollieRunSettings" - }, - "workerCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timeoutInSeconds": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "promptflowEngineType": { - "$ref": "#/components/schemas/PromptflowEngineType" - }, - "experimentNodeName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "TuningNodeSetting": { - "type": "object", - "properties": { - "variantIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "tuningNodeRunSettings": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/TuningNodeRunSetting" - } - }, - "description": "This is a dictionary", - "nullable": true - } - }, - "additionalProperties": false - }, - "TypedAssetReference": { - "type": "object", - "properties": { - "assetId": { - "type": "string", - "nullable": true - }, - "type": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UIAzureOpenAIDeploymentNameSelector": { - "type": "object", - "properties": { - "Capabilities": { - "$ref": "#/components/schemas/UIAzureOpenAIModelCapabilities" - } - }, - "additionalProperties": false - }, - "UIAzureOpenAIModelCapabilities": { - "type": "object", - "properties": { - "Completion": { - "type": "boolean", - "nullable": true - }, - "ChatCompletion": { - "type": "boolean", - "nullable": true - }, - "Embeddings": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "UIColumnPicker": { - "type": "object", - "properties": { - "columnPickerFor": { - "type": "string", - "nullable": true - }, - "columnSelectionCategories": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "singleColumnSelection": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "UIComputeSelection": { - "type": "object", - "properties": { - "computeTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "requireGpu": { - "type": "boolean", - "nullable": true - }, - "osTypes": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "supportServerless": { - "type": "boolean" - }, - "computeRunSettingsMapping": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RunSettingParameter" - }, - "nullable": true - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "UIHyperparameterConfiguration": { - "type": "object", - "properties": { - "modelNameToHyperParameterAndDistributionMapping": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "nullable": true - }, - "nullable": true - }, - "distributionParametersMapping": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DistributionParameter" - }, - "nullable": true - }, - "nullable": true - }, - "jsonSchema": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UIInputDataDeliveryMode": { - "enum": [ - "Read-only mount", - "Read-write mount", - "Download", - "Direct", - "Evaluate mount", - "Evaluate download", - "Hdfs" - ], - "type": "string" - }, - "UIInputSetting": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "dataDeliveryMode": { - "$ref": "#/components/schemas/UIInputDataDeliveryMode" - }, - "pathOnCompute": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UIJsonEditor": { - "type": "object", - "properties": { - "jsonSchema": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UIParameterHint": { - "type": "object", - "properties": { - "uiWidgetType": { - "$ref": "#/components/schemas/UIWidgetTypeEnum" - }, - "columnPicker": { - "$ref": "#/components/schemas/UIColumnPicker" - }, - "uiScriptLanguage": { - "$ref": "#/components/schemas/UIScriptLanguageEnum" - }, - "jsonEditor": { - "$ref": "#/components/schemas/UIJsonEditor" - }, - "PromptFlowConnectionSelector": { - "$ref": "#/components/schemas/UIPromptFlowConnectionSelector" - }, - "AzureOpenAIDeploymentNameSelector": { - "$ref": "#/components/schemas/UIAzureOpenAIDeploymentNameSelector" - }, - "UxIgnore": { - "type": "boolean" - }, - "Anonymous": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "UIPromptFlowConnectionSelector": { - "type": "object", - "properties": { - "PromptFlowConnectionType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UIScriptLanguageEnum": { - "enum": [ - "None", - "Python", - "R", - "Json", - "Sql" - ], - "type": "string" - }, - "UIWidgetMetaInfo": { - "type": "object", - "properties": { - "moduleNodeId": { - "type": "string", - "nullable": true - }, - "metaModuleId": { - "type": "string", - "nullable": true - }, - "parameterName": { - "type": "string", - "nullable": true - }, - "uiWidgetType": { - "$ref": "#/components/schemas/UIWidgetTypeEnum" - } - }, - "additionalProperties": false - }, - "UIWidgetTypeEnum": { - "enum": [ - "Default", - "Mode", - "ColumnPicker", - "Credential", - "Script", - "ComputeSelection", - "JsonEditor", - "SearchSpaceParameter", - "SectionToggle", - "YamlEditor", - "EnableRuntimeSweep", - "DataStoreSelection", - "InstanceTypeSelection", - "ConnectionSelection", - "PromptFlowConnectionSelection", - "AzureOpenAIDeploymentNameSelection" - ], - "type": "string" - }, - "UIYamlEditor": { - "type": "object", - "properties": { - "jsonSchema": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UnversionedEntityRequestDto": { - "type": "object", - "properties": { - "unversionedEntityIds": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "UnversionedEntityResponseDto": { - "type": "object", - "properties": { - "unversionedEntities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FlowIndexEntity" - }, - "nullable": true - }, - "unversionedEntityJsonSchema": { - "nullable": true - }, - "normalizedRequestCharge": { - "type": "number", - "format": "double" - }, - "normalizedRequestChargePeriod": { - "type": "string", - "format": "date-span" - } - }, - "additionalProperties": false - }, - "UnversionedRebuildIndexDto": { - "type": "object", - "properties": { - "continuationToken": { - "type": "string", - "nullable": true - }, - "entityCount": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "entityContainerType": { - "type": "string", - "nullable": true - }, - "entityType": { - "type": "string", - "nullable": true - }, - "resourceId": { - "type": "string", - "nullable": true - }, - "workspaceId": { - "type": "string", - "nullable": true - }, - "immutableResourceId": { - "type": "string", - "format": "uuid" - }, - "startTime": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "endTime": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "UnversionedRebuildResponseDto": { - "type": "object", - "properties": { - "entities": { - "$ref": "#/components/schemas/SegmentedResult`1" - }, - "unversionedEntitySchema": { - "nullable": true - }, - "normalizedRequestCharge": { - "type": "number", - "format": "double" - }, - "normalizedRequestChargePeriod": { - "type": "string", - "format": "date-span" - } - }, - "additionalProperties": false - }, - "UpdateComponentRequest": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "moduleUpdateOperationType": { - "$ref": "#/components/schemas/ModuleUpdateOperationType" - }, - "moduleVersion": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UpdateFlowRequest": { - "type": "object", - "properties": { - "flowRunResult": { - "$ref": "#/components/schemas/FlowRunResult" - }, - "flowTestMode": { - "$ref": "#/components/schemas/FlowTestMode" - }, - "flowTestInfos": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/FlowTestInfo" - }, - "nullable": true - }, - "flowName": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "details": { - "type": "string", - "nullable": true - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string", - "nullable": true - }, - "nullable": true - }, - "flow": { - "$ref": "#/components/schemas/Flow" - }, - "flowDefinitionFilePath": { - "type": "string", - "nullable": true - }, - "flowType": { - "$ref": "#/components/schemas/FlowType" - }, - "flowRunSettings": { - "$ref": "#/components/schemas/FlowRunSettings" - }, - "isArchived": { - "type": "boolean" - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "maxIdleTimeSeconds": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "identity": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UpdateFlowRuntimeRequest": { - "type": "object", - "properties": { - "runtimeDescription": { - "type": "string", - "nullable": true - }, - "environment": { - "type": "string", - "nullable": true - }, - "instanceCount": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "UpdateFlowStatusRequest": { - "type": "object", - "properties": { - "flowRunStatus": { - "$ref": "#/components/schemas/FlowRunStatusEnum" - }, - "errorResponse": { - "$ref": "#/components/schemas/ErrorResponse" - } - }, - "additionalProperties": false - }, - "UpdateRegistryComponentRequest": { - "type": "object", - "properties": { - "registryName": { - "type": "string", - "nullable": true - }, - "componentName": { - "type": "string", - "nullable": true - }, - "componentVersion": { - "type": "string", - "nullable": true - }, - "updateType": { - "$ref": "#/components/schemas/UpdateType" - } - }, - "additionalProperties": false - }, - "UpdateType": { - "enum": [ - "SetDefaultVersion" - ], - "type": "string" - }, - "UploadOptions": { - "type": "object", - "properties": { - "overwrite": { - "type": "boolean" - }, - "sourceGlobs": { - "$ref": "#/components/schemas/ExecutionGlobsOptions" - } - }, - "additionalProperties": false - }, - "UploadState": { - "enum": [ - "Uploading", - "Completed", - "Canceled", - "Failed" - ], - "type": "string" - }, - "UriReference": { - "type": "object", - "properties": { - "path": { - "type": "string", - "nullable": true - }, - "isFile": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "UseStl": { - "enum": [ - "Season", - "SeasonTrend" - ], - "type": "string" - }, - "User": { - "type": "object", - "properties": { - "userObjectId": { - "type": "string", - "description": "A user or service principal's object ID.\r\nThis is EUPI and may only be logged to warm path telemetry.", - "nullable": true - }, - "userPuId": { - "type": "string", - "description": "A user or service principal's PuID.\r\nThis is PII and should never be logged.", - "nullable": true - }, - "userIdp": { - "type": "string", - "description": "A user identity provider. Eg live.com\r\nThis is PII and should never be logged.", - "nullable": true - }, - "userAltSecId": { - "type": "string", - "description": "A user alternate sec id. This represents the user in a different identity provider system Eg.1:live.com:puid\r\nThis is PII and should never be logged.", - "nullable": true - }, - "userIss": { - "type": "string", - "description": "The issuer which issed the token for this user.\r\nThis is PII and should never be logged.", - "nullable": true - }, - "userTenantId": { - "type": "string", - "description": "A user or service principal's tenant ID.", - "nullable": true - }, - "userName": { - "type": "string", - "description": "A user's full name or a service principal's app ID.\r\nThis is PII and should never be logged.", - "nullable": true - }, - "upn": { - "type": "string", - "description": "A user's Principal name (upn)\r\nThis is PII andshould never be logged", - "nullable": true - } - }, - "additionalProperties": false - }, - "UserAssignedIdentity": { - "type": "object", - "properties": { - "principalId": { - "type": "string", - "format": "uuid" - }, - "clientId": { - "type": "string", - "format": "uuid" - } - }, - "additionalProperties": false - }, - "UserType": { - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "type": "string" - }, - "ValidationDataSettings": { - "type": "object", - "properties": { - "nCrossValidations": { - "$ref": "#/components/schemas/NCrossValidations" - }, - "validationDataSize": { - "type": "number", - "format": "double", - "nullable": true - }, - "cvSplitColumnNames": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "validationType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ValidationStatus": { - "enum": [ - "Succeeded", - "Failed" - ], - "type": "string" - }, - "ValueType": { - "enum": [ - "int", - "double", - "bool", - "string", - "secret", - "prompt_template", - "object", - "list", - "BingConnection", - "OpenAIConnection", - "AzureOpenAIConnection", - "AzureContentModeratorConnection", - "CustomConnection", - "AzureContentSafetyConnection", - "SerpConnection", - "CognitiveSearchConnection", - "SubstrateLLMConnection", - "PineconeConnection", - "QdrantConnection", - "WeaviateConnection", - "function_list", - "function_str", - "FormRecognizerConnection", - "file_path", - "image", - "assistant_definition", - "ServerlessConnection" - ], - "type": "string" - }, - "VariantIdentifier": { - "type": "object", - "properties": { - "variantId": { - "type": "string", - "nullable": true - }, - "tuningNodeName": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "VariantNode": { - "type": "object", - "properties": { - "node": { - "$ref": "#/components/schemas/Node" - }, - "description": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "VmPriority": { - "enum": [ - "Dedicated", - "Lowpriority" - ], - "type": "string" - }, - "Volume": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "nullable": true - }, - "target": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "WebServiceComputeMetaInfo": { - "type": "object", - "properties": { - "nodeCount": { - "type": "integer", - "format": "int32" - }, - "isSslEnabled": { - "type": "boolean" - }, - "aksNotFound": { - "type": "boolean" - }, - "clusterPurpose": { - "type": "string", - "nullable": true - }, - "publicIpAddress": { - "type": "string", - "nullable": true - }, - "vmSize": { - "type": "string", - "nullable": true - }, - "location": { - "type": "string", - "nullable": true - }, - "provisioningState": { - "type": "string", - "nullable": true - }, - "state": { - "type": "string", - "nullable": true - }, - "osType": { - "type": "string", - "nullable": true - }, - "id": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "createdByStudio": { - "type": "boolean" - }, - "isGpuType": { - "type": "boolean" - }, - "resourceId": { - "type": "string", - "nullable": true - }, - "computeType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "WebServicePort": { - "type": "object", - "properties": { - "nodeId": { - "type": "string", - "nullable": true - }, - "portName": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "WebServiceState": { - "enum": [ - "Transitioning", - "Healthy", - "Unhealthy", - "Failed", - "Unschedulable" - ], - "type": "string" - }, - "Webhook": { - "type": "object", - "properties": { - "webhookType": { - "$ref": "#/components/schemas/WebhookType" - }, - "eventType": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "WebhookType": { - "enum": [ - "AzureDevOps" - ], - "type": "string" - }, - "WeekDays": { - "enum": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday" - ], - "type": "string" - }, - "Weekday": { - "enum": [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday" - ], - "type": "string" - }, - "WorkspaceConnectionSpec": { - "type": "object", - "properties": { - "connectionCategory": { - "$ref": "#/components/schemas/ConnectionCategory" - }, - "flowValueType": { - "$ref": "#/components/schemas/ValueType" - }, - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "connectionTypeDisplayName": { - "type": "string", - "nullable": true - }, - "configSpecs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConnectionConfigSpec" - }, - "nullable": true - }, - "module": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "YarnDeployMode": { - "enum": [ - "None", - "Client", - "Cluster" - ], - "type": "string" - } - }, - "parameters": { - "subscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "description": "The Azure Subscription ID.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "x-ms-parameter-location": "method" - }, - "resourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "description": "The Name of the resource group in which the workspace is located.", - "required": true, - "schema": { - "type": "string" - }, - "x-ms-parameter-location": "method" - }, - "workspaceNameParameter": { - "name": "workspaceName", - "in": "path", - "description": "The name of the workspace.", - "required": true, - "schema": { - "type": "string" - }, - "x-ms-parameter-location": "method" - } - }, - "securitySchemes": { - "azure_auth": { - "type": "oauth2", - "flows": { - "implicit": { - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - } - } - } - }, - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ] -} \ No newline at end of file diff --git a/src/promptflow/promptflow/azure/_storage/cosmosdb/span.py b/src/promptflow/promptflow/azure/_storage/cosmosdb/span.py deleted file mode 100644 index 25ef16144ee..00000000000 --- a/src/promptflow/promptflow/azure/_storage/cosmosdb/span.py +++ /dev/null @@ -1,60 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -from typing import Any, Dict - -from promptflow._constants import SpanFieldName -from promptflow._sdk.entities._trace import Span as SpanEntity - - -class Span: - - name: str = None - context: dict = None - kind: str = None - parent_id: str = None - start_time: str = None - end_time: str = None - status: dict = None - attributes: dict = None - events: list = None - links: list = None - resource: dict = None - id: str = None - partition_key: str = None - created_by: dict = None - - def __init__(self, span: SpanEntity, created_by: dict) -> None: - self.name = span.name - self.context = span._content[SpanFieldName.CONTEXT] - self.kind = span._content[SpanFieldName.KIND] - self.parent_id = span.parent_span_id - self.start_time = span._content[SpanFieldName.START_TIME] - self.end_time = span._content[SpanFieldName.END_TIME] - self.status = span._content[SpanFieldName.STATUS] - self.attributes = span._content[SpanFieldName.ATTRIBUTES] - self.events = span._content[SpanFieldName.EVENTS] - self.links = span._content[SpanFieldName.LINKS] - self.resource = span._content[SpanFieldName.RESOURCE] - self.partition_key = span.session_id - self.id = span.span_id - self.created_by = created_by - - def persist(self, client): - if self.id is None or self.partition_key is None or self.resource is None: - return - - resource_attributes = self.resource.get(SpanFieldName.ATTRIBUTES, None) - if resource_attributes is None: - return - - from azure.cosmos.exceptions import CosmosResourceExistsError - - try: - return client.create_item(body=self.to_dict()) - except CosmosResourceExistsError: - return None - - def to_dict(self) -> Dict[str, Any]: - return {k: v for k, v in self.__dict__.items() if v} diff --git a/src/promptflow/promptflow/azure/_storage/cosmosdb/summary.py b/src/promptflow/promptflow/azure/_storage/cosmosdb/summary.py deleted file mode 100644 index fad1e80b033..00000000000 --- a/src/promptflow/promptflow/azure/_storage/cosmosdb/summary.py +++ /dev/null @@ -1,196 +0,0 @@ -import datetime -import time -import typing -from dataclasses import asdict, dataclass, field - -from flask import current_app - -from promptflow._constants import SpanAttributeFieldName, SpanFieldName, SpanStatusFieldName -from promptflow._sdk._utils import json_loads_parse_const_as_str -from promptflow._sdk.entities._trace import Span - - -@dataclass -class SummaryLine: - """ - This class represents an Item in Summary container - """ - - id: str - partition_key: str - session_id: str - trace_id: str - root_span_id: str - inputs: typing.Dict - outputs: typing.Dict - start_time: datetime.datetime - end_time: datetime.datetime - status: str - latency: float - name: str - kind: str - created_by: typing.Dict - cumulative_token_count: typing.Optional[typing.Dict[str, int]] - evaluations: typing.Dict = field(default_factory=dict) - # Only for batch run - batch_run_id: str = None - line_number: str = None - # Only for line run - line_run_id: str = None - - -@dataclass -class LineEvaluation: - """ - This class represents an evaluation value in Summary container item. - - """ - - outputs: typing.Dict - trace_id: str - root_span_id: str - display_name: str - created_by: typing.Dict - flow_id: str = None - # Only for batch run - batch_run_id: str = None - line_number: str = None - # Only for line run - line_run_id: str = None - - -class Summary: - def __init__(self, span: Span, created_by: typing.Dict) -> None: - self.span = span - self.created_by = created_by - - def persist(self, client): - if self.span.parent_span_id: - # This is not the root span - return - attributes = self.span._content[SpanFieldName.ATTRIBUTES] - - # Persist span as a line run, since even evaluation is a line run, could be referenced by other evaluations. - self._persist_line_run(client) - - if ( - SpanAttributeFieldName.LINE_RUN_ID not in attributes - and SpanAttributeFieldName.BATCH_RUN_ID not in attributes - ): - current_app.logger.info( - "No line run id or batch run id found. Could be aggregate node, eager flow or arbitrary script. " - "Ignore for patching evaluations." - ) - return - - if SpanAttributeFieldName.REFERENCED_LINE_RUN_ID in attributes or ( - SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID in attributes - and SpanAttributeFieldName.LINE_NUMBER in attributes - ): - # Add sleep to wait for main run to be persisted. - # We receive requests to persist main flow first and then evaluation, - # but init cosmosDB client is time consuming, and the later request will reuse the same client, so it's - # possible that the main run is not persisted when we start to patch evaluation to it. - time.sleep(1) - self._insert_evaluation(client) - - def _persist_line_run(self, client): - attributes: dict = self.span._content[SpanFieldName.ATTRIBUTES] - - session_id = self.span.session_id - start_time = self.span._content[SpanFieldName.START_TIME] - end_time = self.span._content[SpanFieldName.END_TIME] - - # Span's original format don't include latency, so we need to calculate it. - # Convert ISO 8601 formatted strings to datetime objects - start_time_date = datetime.datetime.fromisoformat(start_time.replace("Z", "+00:00")) - end_time_date = datetime.datetime.fromisoformat(end_time.replace("Z", "+00:00")) - latency = (end_time_date - start_time_date).total_seconds() - # calculate `cumulative_token_count` - completion_token_count = int(attributes.get(SpanAttributeFieldName.COMPLETION_TOKEN_COUNT, 0)) - prompt_token_count = int(attributes.get(SpanAttributeFieldName.PROMPT_TOKEN_COUNT, 0)) - total_token_count = int(attributes.get(SpanAttributeFieldName.TOTAL_TOKEN_COUNT, 0)) - # if there is no token usage, set `cumulative_token_count` to None - if total_token_count > 0: - cumulative_token_count = { - "completion": completion_token_count, - "prompt": prompt_token_count, - "total": total_token_count, - } - else: - cumulative_token_count = None - item = SummaryLine( - id=self.span.trace_id, # trace id is unique for LineSummary container - partition_key=session_id, - session_id=session_id, - trace_id=self.span.trace_id, - root_span_id=self.span.span_id, - inputs=json_loads_parse_const_as_str(attributes.get(SpanAttributeFieldName.INPUTS, "null")), - outputs=json_loads_parse_const_as_str(attributes.get(SpanAttributeFieldName.OUTPUT, "null")), - start_time=start_time, - end_time=end_time, - status=self.span._content[SpanFieldName.STATUS][SpanStatusFieldName.STATUS_CODE], - latency=latency, - name=self.span.name, - kind=attributes[SpanAttributeFieldName.SPAN_TYPE], - cumulative_token_count=cumulative_token_count, - created_by=self.created_by, - ) - if SpanAttributeFieldName.LINE_RUN_ID in attributes: - item.line_run_id = attributes[SpanAttributeFieldName.LINE_RUN_ID] - elif SpanAttributeFieldName.BATCH_RUN_ID in attributes and SpanAttributeFieldName.LINE_NUMBER in attributes: - item.batch_run_id = attributes[SpanAttributeFieldName.BATCH_RUN_ID] - item.line_number = attributes[SpanAttributeFieldName.LINE_NUMBER] - - current_app.logger.info(f"Persist main run for LineSummary id: {item.id}") - return client.create_item(body=asdict(item)) - - def _insert_evaluation(self, client): - attributes: dict = self.span._content[SpanFieldName.ATTRIBUTES] - partition_key = self.span.session_id - name = self.span.name - item = LineEvaluation( - trace_id=self.span.trace_id, - root_span_id=self.span.span_id, - outputs=json_loads_parse_const_as_str(attributes[SpanAttributeFieldName.OUTPUT]), - display_name=name, - created_by=self.created_by, - ) - if SpanAttributeFieldName.REFERENCED_LINE_RUN_ID in attributes: - # Query to get item id from line run id. - line_run_id = attributes[SpanAttributeFieldName.REFERENCED_LINE_RUN_ID] - query = "SELECT * FROM c WHERE c.line_run_id = @line_run_id" - parameters = [ - {"name": "@line_run_id", "value": line_run_id}, - ] - items = list(client.query_items(query=query, parameters=parameters, partition_key=partition_key)) - if items: - main_id = items[0]["id"] - else: - current_app.logger.error(f"Cannot find main run for line run id: {line_run_id}") - return - line_run_id = attributes[SpanAttributeFieldName.LINE_RUN_ID] - item.line_run_id = line_run_id - else: - # Query to get item id from batch run id and line number. - referenced_batch_run_id = attributes[SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID] - line_number = attributes[SpanAttributeFieldName.LINE_NUMBER] - query = "SELECT * FROM c WHERE c.batch_run_id = @batch_run_id AND c.line_number = @line_number" - parameters = [ - {"name": "@batch_run_id", "value": referenced_batch_run_id}, - {"name": "@line_number", "value": line_number}, - ] - items = list(client.query_items(query=query, parameters=parameters, partition_key=partition_key)) - if items: - main_id = items[0]["id"] - else: - current_app.logger.error( - f"Cannot find main run for batch run id: {referenced_batch_run_id} and line number: {line_number}" - ) - return - item.batch_run_id = attributes[SpanAttributeFieldName.BATCH_RUN_ID] - item.line_number = attributes[SpanAttributeFieldName.LINE_NUMBER] - - patch_operations = [{"op": "add", "path": f"/evaluations/{name}", "value": asdict(item)}] - current_app.logger.info(f"Insert evaluation for LineSummary main_id: {main_id}") - return client.patch_item(item=main_id, partition_key=partition_key, patch_operations=patch_operations) diff --git a/src/promptflow/promptflow/azure/_utils/general.py b/src/promptflow/promptflow/azure/_utils/general.py deleted file mode 100644 index 7196dc1e4dc..00000000000 --- a/src/promptflow/promptflow/azure/_utils/general.py +++ /dev/null @@ -1,63 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -import jwt - -from promptflow.exceptions import ValidationException - - -def is_arm_id(obj) -> bool: - return isinstance(obj, str) and obj.startswith("azureml://") - - -def get_token(credential, resource) -> str: - from azure.ai.ml._azure_environments import _resource_to_scopes - - azure_ml_scopes = _resource_to_scopes(resource) - token = credential.get_token(*azure_ml_scopes).token - # validate token has aml audience - decoded_token = jwt.decode( - token, - options={"verify_signature": False, "verify_aud": False}, - ) - if decoded_token.get("aud") != resource: - msg = """AAD token with aml scope could not be fetched using the credentials being used. - Please validate if token with {0} scope can be fetched using credentials provided to PFClient. - Token with {0} scope can be fetched using credentials.get_token({0}) - """ - raise ValidationException( - message=msg.format(*azure_ml_scopes), - ) - - return token - - -def get_aml_token(credential) -> str: - from azure.ai.ml._azure_environments import _get_aml_resource_id_from_metadata - - resource = _get_aml_resource_id_from_metadata() - return get_token(credential, resource) - - -def get_arm_token(credential) -> str: - from azure.ai.ml._azure_environments import _get_base_url_from_metadata - - resource = _get_base_url_from_metadata() - return get_token(credential, resource) - - -def get_authorization(credential=None) -> str: - token = get_arm_token(credential=credential) - return "Bearer " + token - - -def get_user_alias_from_credential(credential): - token = get_arm_token(credential=credential) - decode_json = jwt.decode(token, options={"verify_signature": False, "verify_aud": False}) - try: - email = decode_json.get("upn", decode_json.get("email", None)) - return email.split("@")[0] - except Exception: - # use oid when failed to get upn, e.g. service principal - return decode_json["oid"] diff --git a/src/promptflow/promptflow/executor/_assistant_tool_invoker.py b/src/promptflow/promptflow/executor/_assistant_tool_invoker.py deleted file mode 100644 index aa88ea2efa2..00000000000 --- a/src/promptflow/promptflow/executor/_assistant_tool_invoker.py +++ /dev/null @@ -1,20 +0,0 @@ -from dataclasses import dataclass -from typing import Callable, Dict - - -@dataclass -class AssistantTool: - name: str - openai_definition: dict - func: Callable - - -class AssistantToolInvoker: - def __init__(self, tools: Dict[str, AssistantTool]): - self._assistant_tools = tools - - def invoke_tool(self, func_name, kwargs): - return self._assistant_tools[func_name].func(**kwargs) - - def to_openai_tools(self): - return [tool.openai_definition for tool in self._assistant_tools.values()] diff --git a/src/promptflow/promptflow/executor/_line_execution_process_pool.py b/src/promptflow/promptflow/executor/_line_execution_process_pool.py deleted file mode 100644 index fbe62aea3d8..00000000000 --- a/src/promptflow/promptflow/executor/_line_execution_process_pool.py +++ /dev/null @@ -1,764 +0,0 @@ -import contextvars -import multiprocessing -import os -import queue -import signal -import sys -import threading -import time -from datetime import datetime -from functools import partial -from logging import INFO -from multiprocessing import Manager, Queue -from multiprocessing.pool import ThreadPool -from typing import List, Optional, Union - -import psutil - -from promptflow._constants import LINE_NUMBER_KEY, LINE_TIMEOUT_SEC -from promptflow._core._errors import ProcessPoolError, UnexpectedError -from promptflow._core.operation_context import OperationContext -from promptflow._core.run_tracker import RunTracker -from promptflow._utils.dataclass_serializer import convert_eager_flow_output_to_dict -from promptflow._utils.exception_utils import ExceptionPresenter -from promptflow._utils.logger_utils import bulk_logger -from promptflow._utils.multimedia_utils import _process_recursively, persist_multimedia_data -from promptflow._utils.thread_utils import RepeatLogTimer -from promptflow._utils.utils import log_progress, set_context -from promptflow.contracts.multimedia import Image -from promptflow.contracts.run_info import FlowRunInfo -from promptflow.contracts.run_info import RunInfo as NodeRunInfo -from promptflow.contracts.run_info import Status -from promptflow.exceptions import ErrorTarget, PromptflowException -from promptflow.executor._errors import ( - BatchExecutionTimeoutError, - LineExecutionTimeoutError, - ProcessCrashError, - ProcessInfoObtainedTimeout, - ProcessTerminatedTimeout, -) -from promptflow.executor._process_manager import ForkProcessManager, SpawnProcessManager -from promptflow.executor._result import LineResult -from promptflow.executor._script_executor import ScriptExecutor -from promptflow.executor.flow_executor import DEFAULT_CONCURRENCY_BULK, FlowExecutor -from promptflow.storage import AbstractRunStorage - -TERMINATE_SIGNAL = "terminate" - - -def signal_handler(signum, frame): - signame = signal.Signals(signum).name - bulk_logger.info("Execution stopping. Handling signal %s (%s)", signame, signum) - try: - process = psutil.Process(os.getpid()) - bulk_logger.info("Successfully terminated process with pid %s", process.pid) - process.terminate() - except Exception: - bulk_logger.warning("Error when handling execution stop signal", exc_info=True) - finally: - sys.exit(1) - - -class QueueRunStorage(AbstractRunStorage): - """This storage persists run info by putting it into a queue.""" - - def __init__(self, queue: Queue): - self.queue = queue - - def persist_node_run(self, run_info: NodeRunInfo): - self.queue.put(run_info) - - def persist_flow_run(self, run_info: FlowRunInfo): - self.queue.put(run_info) - - -def format_current_process_info(process_name, pid, line_number: int): - return f"Process name({process_name})-Process id({pid})-Line number({line_number})" - - -def log_process_status(process_name, pid, line_number: int, is_completed=False, is_failed=False): - process_info = format_current_process_info(process_name, pid, line_number) - if is_completed: - bulk_logger.info(f"{process_info} completed.") - elif is_failed: - bulk_logger.info(f"{process_info} failed.") - else: - bulk_logger.info(f"{process_info} start execution.") - - -class LineExecutionProcessPool: - _DEFAULT_WORKER_COUNT = 4 - _PROCESS_TERMINATED_TIMEOUT = 60 - _PROCESS_INFO_OBTAINED_TIMEOUT = 60 - - def __init__( - self, - flow_executor: FlowExecutor, - nlines, - run_id, - output_dir, - batch_timeout_sec: Optional[int] = None, - line_timeout_sec: Optional[int] = None, - worker_count: Optional[int] = None, - ): - self._nlines = nlines - self._run_id = run_id - multiprocessing_start_method = os.environ.get("PF_BATCH_METHOD", multiprocessing.get_start_method()) - sys_start_methods = multiprocessing.get_all_start_methods() - if multiprocessing_start_method not in sys_start_methods: - bulk_logger.warning( - f"Failed to set start method to '{multiprocessing_start_method}', " - f"start method {multiprocessing_start_method} is not in: {sys_start_methods}." - ) - bulk_logger.info(f"Set start method to default {multiprocessing.get_start_method()}.") - multiprocessing_start_method = multiprocessing.get_start_method() - use_fork = multiprocessing_start_method in ["fork", "forkserver"] - self._flow_file = flow_executor._flow_file - self._connections = flow_executor._connections - self._working_dir = flow_executor._working_dir - self._use_fork = use_fork - if isinstance(flow_executor, ScriptExecutor): - self._storage = flow_executor._storage - else: - self._storage = flow_executor._run_tracker._storage - self._flow_id = flow_executor._flow_id - self._log_interval = flow_executor._log_interval - self._line_timeout_sec = line_timeout_sec or LINE_TIMEOUT_SEC - self._batch_timeout_sec = batch_timeout_sec - self._output_dir = output_dir - self._flow_create_kwargs = { - "flow_file": flow_executor._flow_file, - "connections": flow_executor._connections, - "working_dir": flow_executor._working_dir, - "line_timeout_sec": self._line_timeout_sec, - "raise_ex": False, - } - # Will set to True if the batch run is timeouted. - self._is_timeout = False - self._worker_count = self._determine_worker_count(worker_count) - - def __enter__(self): - manager = Manager() - self._processing_idx = manager.dict() - self._completed_idx = manager.dict() - - self._task_queue = Queue() - self._n_process = self._worker_count - - # When using fork, we first spawn a sub process, the SemLock created in fork context (multiprocessing.Queue()) - # can't used in a spawn context. Since spawn does not share memory, synchronization primitives created by - # fork cannot be used directly. It will cause an error: "A SemLock created in a fork context is being - # shared with a process in a spawn context. This is not supported". - - # So use multiprocessing.Manager().Queue() instead of multiprocessing.Queue(). - # Manager().Queue() operates through a manager server process, which passes messages between different - # processes without directly sharing memory state, which makes it safe to use in a spawn context. - self._input_queues = [manager.Queue() for _ in range(self._n_process)] - self._output_queues = [manager.Queue() for _ in range(self._n_process)] - self._control_signal_queue = manager.Queue() - self._process_info = manager.dict() - - # when using fork, we first create a process with spawn method to establish a clean environment - # Then fork the subprocess in this environment to avoid some deadlock problems - common_kwargs = { - "input_queues": self._input_queues, - "output_queues": self._output_queues, - "process_info": self._process_info, - "process_target_func": _process_wrapper, - } - if self._use_fork: - # 1. Create input_queue, output_queue, control_signal_queue and _process_info in the main process. - # 2. Pass the above queue/dict as parameters to spawn and fork processes to transfer information - # between processes. - self._processes_manager = ForkProcessManager( - self._control_signal_queue, - self._flow_create_kwargs, - **common_kwargs, - ) - else: - executor_creation_func = partial(FlowExecutor.create, **self._flow_create_kwargs) - # 1. Create input_queue, output_queue, and _process_info in the main process. - # 2. Spawn _n_process sub-process and pass the above queue/dict to these sub-process to transfer information - # between main process and sub process. - self._processes_manager = SpawnProcessManager(executor_creation_func, **common_kwargs) - - self._processes_manager.start_processes() - self._processes_manager.ensure_healthy() - - monitor_pool = ThreadPool(self._n_process, initializer=set_context, initargs=(contextvars.copy_context(),)) - self._monitor_pool = monitor_pool - - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - if self._monitor_pool is not None: - self._monitor_pool.close() - self._monitor_pool.join() - - @property - def is_timeout(self): - return self._is_timeout - - def _get_process_info(self, index): - start_time = time.time() - while True: - self._processes_manager.ensure_healthy() - try: - if time.time() - start_time > self._PROCESS_INFO_OBTAINED_TIMEOUT: - raise ProcessInfoObtainedTimeout(self._PROCESS_INFO_OBTAINED_TIMEOUT) - # Try to get process id and name from the process_info - process_id = self._process_info[index].process_id - process_name = self._process_info[index].process_name - return (index, process_id, process_name) - except KeyError: - # If the process_info does not exist for the given index, it means the process have not ready yet, - # try again. - time.sleep(1) - continue - except Exception as e: - raise Exception(f"Unexpected error occurred while get process info. Exception: {e}") - - def _ensure_process_terminated_within_timeout(self, process_id): - start_time = time.time() - while psutil.pid_exists(process_id): - if time.time() - start_time > self._PROCESS_TERMINATED_TIMEOUT: - raise ProcessTerminatedTimeout(self._PROCESS_TERMINATED_TIMEOUT) - time.sleep(1) - - def _is_process_alive(self, process_id): - return psutil.pid_exists(process_id) - - def _handle_output_queue_messages(self, output_queue: Queue, result_list: List[LineResult]): - try: - message = output_queue.get(timeout=1) - if isinstance(message, LineResult): - message = self._process_multimedia(message) - result_list.append(message) - return message - elif isinstance(message, FlowRunInfo): - self._storage.persist_flow_run(message) - return message - elif isinstance(message, NodeRunInfo): - self._storage.persist_node_run(message) - return message - except queue.Empty: - pass - return None - - def _monitor_workers_and_process_tasks_in_thread( - self, - task_queue: Queue, - result_list: List[LineResult], - index: int, - input_queue: Queue, - output_queue: Queue, - batch_start_time: datetime, - ): - index, process_id, process_name = self._get_process_info(index) - - # Entering the while loop requires two conditions: - # 1. The task queue is not empty, meaning there are lines yet to be executed. - # 2. The batch run has not reached the batch timeout limit. - while not self._batch_timeout_expired(batch_start_time): - self._processes_manager.ensure_healthy() - try: - # Get task from task_queue - inputs, line_number, run_id = task_queue.get(timeout=1) - except queue.Empty: - break - - # Calculate the line timeout for the current line. - line_timeout_sec = self._line_timeout_sec - if self._batch_timeout_sec: - remaining_execution_time = ( - self._batch_timeout_sec - (datetime.utcnow() - batch_start_time).total_seconds() - ) - if remaining_execution_time <= 0: - self._is_timeout = True - break - line_timeout_sec = min(line_timeout_sec, remaining_execution_time) - - # Put task into input_queue - args = (inputs, line_number, run_id, line_timeout_sec) - input_queue.put(args) - - self._processing_idx[line_number] = format_current_process_info(process_name, process_id, line_number) - log_process_status(process_name, process_id, line_number) - - start_time = datetime.utcnow() - completed = False - crashed = False - returned_node_run_infos = {} - - # Responsible for checking the output queue messages and processing them within a specified timeout period. - while not self._batch_timeout_expired(batch_start_time) and not self._line_timeout_expired(start_time): - # Monitor process aliveness. - crashed = not self._is_process_alive(process_id) - if crashed: - break - - # Handle output queue message. - message = self._handle_output_queue_messages(output_queue, result_list) - if isinstance(message, LineResult): - completed = True - break - if isinstance(message, NodeRunInfo): - returned_node_run_infos[message.node] = message - - # Handle line execution completed. - if completed: - self._completed_idx[line_number] = format_current_process_info(process_name, process_id, line_number) - log_process_status(process_name, process_id, line_number, is_completed=True) - # Handle line execution is not completed. - else: - ex = None - # Handle process crashed. - if crashed: - bulk_logger.warning(f"Process crashed while executing line {line_number}.") - ex = ProcessCrashError(line_number) - else: - # Handle line execution timeout. - if self._line_timeout_expired(start_time): - bulk_logger.warning(f"Line {line_number} timeout after {self._line_timeout_sec} seconds.") - ex = LineExecutionTimeoutError(line_number, self._line_timeout_sec) - # Handle batch execution timeout. - if self._batch_timeout_expired(batch_start_time): - bulk_logger.warning( - f"Line {line_number} execution terminated due to the total " - f"batch run exceeding the batch timeout ({self._batch_timeout_sec}s)." - ) - ex = BatchExecutionTimeoutError(line_number, self._batch_timeout_sec) - # Set is_timeout to True if the batch run exceeds the batch timeout. - self._is_timeout = True - # This branch should not be reached, add this warning for the case. - if ex is None: - msg = f"Unexpected error occurred while monitoring line execution at line {line_number}." - bulk_logger.warning(msg) - ex = UnexpectedError(msg) - - result = self._generate_line_result_for_exception( - inputs, - run_id, - line_number, - self._flow_id, - start_time, - ex, - returned_node_run_infos, - ) - result_list.append(result) - - self._completed_idx[line_number] = format_current_process_info(process_name, process_id, line_number) - log_process_status(process_name, process_id, line_number, is_failed=True) - - # If there are still tasks in the task_queue and the batch run does not exceed the batch timeout, - # restart a new process to execute the task. - run_finished = task_queue.empty() or self._batch_timeout_expired(batch_start_time) - if not run_finished: - self._processes_manager.restart_process(index) - # We need to ensure the process has been killed before continuing to execute. - # Otherwise the process will receive new task, and during the execution, the process - # is killed, which will result in the 'ProcessCrashError'. - self._ensure_process_terminated_within_timeout(process_id) - index, process_id, process_name = self._get_process_info(index) - - self._processing_idx.pop(line_number) - - # If the while loop exits due to batch run timeout, we should set is_timeout to True if we didn't set it before. - self._is_timeout = self._is_timeout or self._batch_timeout_expired(batch_start_time) - - if not self._is_timeout: - input_queue.put(TERMINATE_SIGNAL) - - # End the process when the batch timeout is exceeded or when all lines have been executed. - self._processes_manager.end_process(index) - - # In fork mode, the main process and the sub spawn process communicate through _process_info. - # We need to ensure the process has been killed before returning. Otherwise, it may cause - # the main process have exited but the spawn process is still alive. - # At this time, a connection error will be reported. - self._ensure_process_terminated_within_timeout(process_id) - - def _batch_timeout_expired(self, start_time: datetime) -> bool: - if self._batch_timeout_sec is None: - return False - return (datetime.utcnow() - start_time).total_seconds() > self._batch_timeout_sec + 10 - - def _line_timeout_expired(self, start_time: datetime) -> bool: - # Here we add more seconds because of the following reasons: - # 1. At the last second, there would be several timeout message from exec_line. - # 2. It may take time to create worker so actual timeout time may be longer. - return (datetime.utcnow() - start_time).total_seconds() > self._line_timeout_sec + 10 - - def _process_multimedia(self, result: LineResult) -> LineResult: - """Replace multimedia data in line result with string place holder to prevent OOM - and persist multimedia data in output when batch running.""" - if not self._output_dir: - return result - self._process_multimedia_in_flow_run(result.run_info) - for node_name, node_run_info in result.node_run_infos.items(): - result.node_run_infos[node_name] = self._process_multimedia_in_node_run(node_run_info) - result.output = persist_multimedia_data(result.output, self._output_dir) - return result - - def _process_multimedia_in_run_info(self, run_info: Union[FlowRunInfo, NodeRunInfo]): - # Persist and convert images in inputs to path dictionaries. - # This replaces any image objects with their corresponding file path dictionaries. - if run_info.inputs: - run_info.inputs = self._persist_and_convert_images_to_path_dicts(run_info.inputs) - - # Persist and convert images in output to path dictionaries. - # This replaces any image objects with their corresponding file path dictionaries. - if run_info.output: - serialized_output = self._persist_and_convert_images_to_path_dicts(run_info.output) - run_info.output = serialized_output - run_info.result = None - - # Persist and convert images in api_calls to path dictionaries. - # The `inplace=True` parameter is used here to ensure that the original list structure holding generator outputs - # is maintained. This allows us to keep tracking the list as it dynamically changes when the generator is - # consumed. It is crucial to process the api_calls list in place to avoid losing the reference to the list that - # holds the generator items, which is essential for tracing generator execution. - if run_info.api_calls: - run_info.api_calls = self._persist_and_convert_images_to_path_dicts(run_info.api_calls, inplace=True) - - return run_info - - def _process_multimedia_in_flow_run(self, run_info: FlowRunInfo): - self._process_multimedia_in_run_info(run_info) - - def _process_multimedia_in_node_run(self, run_info: NodeRunInfo): - run_info = self._process_multimedia_in_run_info(run_info) - return run_info - - def _persist_and_convert_images_to_path_dicts(self, value, inplace=False): - serialization_funcs = {Image: partial(Image.serialize, **{"encoder": None})} - return _process_recursively(value, process_funcs=serialization_funcs, inplace=inplace) - - def _generate_line_result_for_exception( - self, - inputs, - run_id, - line_number, - flow_id, - start_time, - ex, - node_run_infos={}, - ) -> LineResult: - bulk_logger.error(f"Line {line_number}, Process {os.getpid()} failed with exception: {ex}") - run_info = FlowRunInfo( - run_id=f"{run_id}_{line_number}", - status=Status.Failed, - error=ExceptionPresenter.create(ex).to_dict(include_debug_info=True), - inputs=inputs, - output=None, - metrics=None, - request=None, - parent_run_id=run_id, - root_run_id=run_id, - source_run_id=None, - flow_id=flow_id, - start_time=start_time, - end_time=datetime.utcnow(), - index=line_number, - ) - result = LineResult( - output={}, - aggregation_inputs={}, - run_info=run_info, - node_run_infos=node_run_infos, - ) - # TODO: There is a corner case that the run info is persisted in the subprocess when timeouted, - # while we also persist the run info here. This may cause duplicate run info in the storage. - # We need to find a way to avoid this. - self._storage.persist_flow_run(result.run_info) - return result - - def run(self, batch_inputs): - for index, inputs in batch_inputs: - self._task_queue.put( - ( - inputs, - index, - self._run_id, - ) - ) - - result_list = [] - run_start_time = datetime.utcnow() - - with RepeatLogTimer( - interval_seconds=self._log_interval, - logger=bulk_logger, - level=INFO, - log_message_function=self._generate_thread_status_messages, - args=( - self._monitor_pool, - self._nlines, - ), - ): - try: - batch_start_time = datetime.utcnow() - args_list = [ - ( - self._task_queue, # Shared task queue for all sub processes to read the input data. - result_list, # Line result list of the batch run. - i, # Index of the sub process. - # Specific input queue for sub process, used to send input data to it. - self._input_queues[i], - # Specific output queue for the sub process, used to receive results from it. - self._output_queues[i], - batch_start_time, - ) - for i in range(self._n_process) - ] - - # The variable 'async_result' here is not the actual result of the batch run - # but an AsyncResult object that can be used to check if the execution are finished - # The actual results of the batch run are stored in 'result_list' - - # Create _n_process monitoring threads, mainly used to assign tasks and receive line result. - # When task_queue is empty, end the process. - # When line execution timeout or process crash, restart the process. - async_result = self._monitor_pool.starmap_async( - self._monitor_workers_and_process_tasks_in_thread, args_list - ) - - try: - # Only log when the number of results changes to avoid duplicate logging. - last_log_count = 0 - # Wait for batch run to complete or KeyboardInterrupt - while not async_result.ready(): - current_result_count = len(result_list) - if current_result_count != last_log_count: - log_progress( - run_start_time=run_start_time, - logger=bulk_logger, - count=len(result_list), - total_count=self._nlines, - ) - last_log_count = current_result_count - # Check every 1 second - async_result.wait(1) - # To ensure exceptions in thread-pool calls are propagated to the main process for proper handling - # The exceptions raised will be re-raised by the get() method. - # Related link: - # https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.AsyncResult - async_result.get() - except KeyboardInterrupt: - raise - except PromptflowException: - raise - except Exception as e: - bulk_logger.error(f"ProcessPool failed with exception: {e}") - raise ProcessPoolError( - message_format=f"ProcessPool failed with exception: {e}", - target=ErrorTarget.EXECUTOR, - ) from e - return result_list - - def _generate_thread_status_messages(self, pool: ThreadPool, total_count: int): - msgs = [] - active_threads = sum(thread.is_alive() for thread in pool._pool) - msgs.append(f"[Process Pool] [Active processes: {active_threads} / {len(pool._pool)}]") - processing_lines_copy = self._processing_idx.copy() - completed_lines_copy = self._completed_idx.copy() - msgs.append( - f"[Lines] [Finished: {len(completed_lines_copy)}] [Processing: {len(processing_lines_copy)}] " - f"[Pending: {total_count - len(processing_lines_copy) - len(completed_lines_copy)}]" - ) - lines = [] - for idx, thread_name in sorted(processing_lines_copy.items()): - lines.append(f"line {idx} ({thread_name})") - if len(lines) > 0: - msgs.append("Processing Lines: " + ", ".join(lines) + ".") - return msgs - - def _determine_worker_count(self, worker_count): - # Starting a new process in non-fork mode requires to allocate memory. - # Calculate the maximum number of processes based on available memory to avoid memory bursting. - estimated_available_worker_count = get_available_max_worker_count() if not self._use_fork else None - - # If the environment variable PF_WORKER_COUNT exists and valid, use the value as the worker_count. - if worker_count is not None and worker_count > 0: - self._log_set_worker_count(worker_count, estimated_available_worker_count) - return worker_count - - # If the environment variable PF_WORKER_COUNT is not set or invalid, take the minimum value among the - # factors: default_worker_count, row_count and estimated_worker_count_based_on_memory_usage - factors = { - "default_worker_count": self._DEFAULT_WORKER_COUNT, - "row_count": self._nlines, - "estimated_worker_count_based_on_memory_usage": estimated_available_worker_count, - } - - valid_factors = {k: v for k, v in factors.items() if v is not None and v > 0} - - # Take the minimum value as the result - worker_count = min(valid_factors.values()) - bulk_logger.info( - f"Set process count to {worker_count} by taking the minimum value among the factors of {valid_factors}." - ) - return worker_count - - def _log_set_worker_count(self, worker_count, estimated_available_worker_count): - bulk_logger.info(f"Set process count to {worker_count}.") - if estimated_available_worker_count is not None and estimated_available_worker_count < worker_count: - bulk_logger.warning( - f"The current process count ({worker_count}) is larger than recommended process count " - f"({estimated_available_worker_count}) that estimated by system available memory. This may " - f"cause memory exhaustion" - ) - - -def _exec_line( - executor: FlowExecutor, output_queue: Queue, *, inputs: dict, run_id: str, index: int, line_timeout_sec: int -): - try: - line_result = executor.exec_line( - inputs=inputs, - run_id=run_id, - index=index, - node_concurrency=DEFAULT_CONCURRENCY_BULK, - line_timeout_sec=line_timeout_sec, - ) - if line_result is not None: - # For eager flow, the output may be a dataclass which is not picklable, we need to convert it to dict. - if not isinstance(line_result.output, dict): - line_result.output = convert_eager_flow_output_to_dict(line_result.output) - line_result.output.pop(LINE_NUMBER_KEY, None) - # TODO: Put serialized line result into queue to catch serialization error beforehand. - # Otherwise it might cause the process to hang, e.g, line failed because output is not seralizable. - if line_result is not None and line_result.run_info.status == Status.Failed: - line_result.output = {} - return line_result - except Exception as e: - bulk_logger.error(f"Line {index}, Process {os.getpid()} failed with exception: {e}") - flow_id = executor._flow_id - line_run_id = run_id if index is None else f"{run_id}_{index}" - # If line execution failed before start, there is no flow information in the run_tracker. - # So we call start_flow_run before handling exception to make sure the run_tracker has flow info. - if isinstance(executor, ScriptExecutor): - run_tracker = RunTracker(executor._storage) - else: - run_tracker = executor._run_tracker - run_tracker.start_flow_run(flow_id, run_id, line_run_id, run_id) - run_info = run_tracker.end_run(f"{run_id}_{index}", ex=e) - output_queue.put(run_info) - result = LineResult( - output={}, - aggregation_inputs={}, - run_info=run_info, - node_run_infos={}, - ) - return result - - -def _process_wrapper( - executor_creation_func, - input_queue: Queue, - output_queue: Queue, - log_context_initialization_func, - operation_contexts_dict: dict, -): - if threading.current_thread() is threading.main_thread(): - signal.signal(signal.SIGINT, signal_handler) - else: - bulk_logger.info("Current thread is not main thread, skip signal handler registration in batch process pool.") - OperationContext.get_instance().update(operation_contexts_dict) # Update the operation context for the new process. - - # set up OpenTelemetry exporter in process who executes the line - from promptflow.tracing._start_trace import setup_exporter_from_environ - - setup_exporter_from_environ() - - if log_context_initialization_func: - with log_context_initialization_func(): - exec_line_for_queue(executor_creation_func, input_queue, output_queue) - else: - exec_line_for_queue(executor_creation_func, input_queue, output_queue) - - -def create_executor_fork(*, flow_executor: FlowExecutor, storage: AbstractRunStorage): - if isinstance(flow_executor, ScriptExecutor): - return ScriptExecutor( - flow_file=flow_executor._flow_file, - connections=flow_executor._connections, - working_dir=flow_executor._working_dir, - storage=storage, - ) - else: - run_tracker = RunTracker(run_storage=storage) - return FlowExecutor( - flow=flow_executor._flow, - connections=flow_executor._connections, - run_tracker=run_tracker, - cache_manager=flow_executor._cache_manager, - loaded_tools=flow_executor._loaded_tools, - raise_ex=False, - line_timeout_sec=flow_executor._line_timeout_sec, - ) - - -def exec_line_for_queue(executor_creation_func, input_queue: Queue, output_queue: Queue): - run_storage = QueueRunStorage(output_queue) - executor: FlowExecutor = executor_creation_func(storage=run_storage) - - while True: - try: - data = input_queue.get(timeout=1) - if data == TERMINATE_SIGNAL: - # Add try catch in case of shutdown method is not implemented in the tracer provider. - try: - import opentelemetry.trace as otel_trace - - # Meet span missing issue when end process normally (even add wait() when end it). - # Shutdown the tracer provider to flush the remaining spans. - # The tracer provider is created for each process, so it's ok to shutdown it here. - otel_trace.get_tracer_provider().shutdown() - except Exception as e: - bulk_logger.warning(f"Error occurred while shutting down tracer provider: {e}") - - # If found the terminate signal, exit the process. - break - inputs, line_number, run_id, line_timeout_sec = data - result = _exec_line( - executor=executor, - output_queue=output_queue, - inputs=inputs, - run_id=run_id, - index=line_number, - line_timeout_sec=line_timeout_sec, - ) - output_queue.put(result) - except queue.Empty: - # Do nothing until the input_queue have content or process is killed - # TODO: Exit the process more gracefully. - pass - - -def get_available_max_worker_count(): - pid = os.getpid() - mem_info = psutil.virtual_memory() - available_memory = mem_info.available / (1024 * 1024) # in MB - process = psutil.Process(pid) - process_memory_info = process.memory_info() - process_memory = process_memory_info.rss / (1024 * 1024) # in MB - estimated_available_worker_count = int(available_memory // process_memory) - if estimated_available_worker_count < 1: - # TODO: For the case of vector db, Optimize execution logic - # 1. Let the main process not consume memory because it does not actually invoke - # 2. When the degree of parallelism is 1, main process executes the task directly and not - # create the child process - bulk_logger.warning( - f"Current system's available memory is {available_memory}MB, less than the memory " - f"{process_memory}MB required by the process. The maximum available worker count is 1." - ) - estimated_available_worker_count = 1 - else: - bulk_logger.info( - f"Current system's available memory is {available_memory}MB, " - f"memory consumption of current process is {process_memory}MB, " - f"estimated available worker count is {available_memory}/{process_memory} " - f"= {estimated_available_worker_count}" - ) - return estimated_available_worker_count diff --git a/src/promptflow/promptflow/executor/_service/utils/process_manager.py b/src/promptflow/promptflow/executor/_service/utils/process_manager.py deleted file mode 100644 index 037d236263b..00000000000 --- a/src/promptflow/promptflow/executor/_service/utils/process_manager.py +++ /dev/null @@ -1,55 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -import signal -from typing import Dict - -import psutil - -from promptflow._utils.logger_utils import service_logger - - -class ProcessManager: - _instance = None - _processes_mapping: Dict[str, int] - - def __new__(cls, *args, **kwargs): - if cls._instance is None: - cls._instance = super(ProcessManager, cls).__new__(cls) - cls._instance._processes_mapping = {} - return cls._instance - - def start_process(self, run_id: str, process_id: int): - self._processes_mapping[run_id] = process_id - - def get_process(self, run_id: str): - return self._processes_mapping.get(run_id, None) - - def remove_process(self, run_id: str): - self._processes_mapping.pop(run_id, None) - - def end_process(self, run_id: str): - process_id = self._processes_mapping.pop(run_id, None) - if process_id: - try: - process = psutil.Process(process_id) - if process.is_running(): - process.send_signal(signal.SIGINT) - service_logger.info(f"Kill process[{process.pid}] for run[{run_id}] with SIGINT.") - # wait for 30s for executor process to gracefully shutdown - process.wait(timeout=30) - service_logger.info(f"Successfully terminated process[{process.pid}] for run[{run_id}].") - else: - service_logger.info(f"Process[{process.pid}] for run[{run_id}] is already terminated.") - except psutil.TimeoutExpired: - if process.is_running(): - # force kill if still alive - process.send_signal(signal.SIGKILL) - service_logger.info(f"Kill process[{process.pid}] for run[{run_id}] with SIGKILL.") - except psutil.NoSuchProcess: - service_logger.warning( - f"Process[{process.pid}] for run[{run_id}] not found, it might have already terminated." - ) - else: - service_logger.info(f"Process for run[{run_id}] not found in mapping, it may have already been removed.") diff --git a/src/promptflow/promptflow/tracing/_start_trace.py b/src/promptflow/promptflow/tracing/_start_trace.py deleted file mode 100644 index bdd540081f0..00000000000 --- a/src/promptflow/promptflow/tracing/_start_trace.py +++ /dev/null @@ -1,335 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- -import json -import os -import typing -import urllib.parse -import uuid - -from opentelemetry import trace -from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter -from opentelemetry.sdk.environment_variables import OTEL_EXPORTER_OTLP_ENDPOINT -from opentelemetry.sdk.resources import Resource -from opentelemetry.sdk.trace import TracerProvider -from opentelemetry.sdk.trace.export import BatchSpanProcessor - -from promptflow._constants import ( - OTEL_RESOURCE_SERVICE_NAME, - SpanAttributeFieldName, - SpanResourceAttributesFieldName, - TraceEnvironmentVariableName, -) -from promptflow._core.operation_context import OperationContext -from promptflow._sdk._configuration import Configuration -from promptflow._sdk._constants import PF_TRACE_CONTEXT, AzureMLWorkspaceTriad -from promptflow._sdk._service.utils.utils import is_pfs_service_healthy -from promptflow._sdk._utils import extract_workspace_triad_from_trace_provider -from promptflow._utils.logger_utils import get_cli_sdk_logger -from promptflow.tracing._constants import PF_TRACING_SKIP_LOCAL_SETUP - -from ._openai_injector import inject_openai_api - -_logger = get_cli_sdk_logger() - - -def start_trace(*, session: typing.Optional[str] = None, **kwargs): - """Start a tracing session. - - This will capture OpenAI and prompt flow related calls and persist traces; - it will also provide a UI url for user to visualize traces details. - - Note that this function is still under preview, and may change at any time. - """ - # trace is currently a preview feature, users should explicitly enable to use it - if Configuration.get_instance().is_internal_features_enabled() is False: - warning_message = ( - "`start_trace` is currently a preview feature, " - 'please enable it with `pf config set enable_internal_features="true"`' - ) - _logger.warning(warning_message) - return - - from promptflow._sdk._constants import ContextAttributeKey - - # set strict limitation for session id currently - if session is not None: - _validate_session_id(session) - session_id = _provision_session_id(specified_session_id=session) - _logger.debug("current session id is %s", session_id) - - operation_context = OperationContext.get_instance() - - # honor and set attributes if user has specified - attributes: dict = kwargs.get("attributes", None) - if attributes is not None: - _logger.debug("User specified attributes: %s", attributes) - for attr_key, attr_value in attributes.items(): - operation_context._add_otel_attributes(attr_key, attr_value) - - # prompt flow related, retrieve `experiment` and `referenced.line_run_id` - env_trace_context = os.environ.get(PF_TRACE_CONTEXT, None) - _logger.debug("Read trace context from environment: %s", env_trace_context) - env_attributes = json.loads(env_trace_context).get("attributes") if env_trace_context else {} - experiment = env_attributes.get(ContextAttributeKey.EXPERIMENT, None) - ref_line_run_id = env_attributes.get(ContextAttributeKey.REFERENCED_LINE_RUN_ID, None) - # Remove reference line run id if it's None to avoid stale value set by previous node - if ref_line_run_id is None: - operation_context._remove_otel_attributes(SpanAttributeFieldName.REFERENCED_LINE_RUN_ID) - else: - operation_context._add_otel_attributes(SpanAttributeFieldName.REFERENCED_LINE_RUN_ID, ref_line_run_id) - - if _skip_tracing_local_setup(): - _logger.debug("Environment variable {PF_TRACING_SKIP_LOCAL_SETUP!r} is set, skip local setup for tracing.") - return - - _tracing_local_setup( - session_id=session_id, - session_id_configured=session is not None, - experiment=experiment, - run=kwargs.get("run", None), - ) - - -def _skip_tracing_local_setup() -> bool: - return str(os.getenv(PF_TRACING_SKIP_LOCAL_SETUP, "false")).lower() == "true" - - -def _tracing_local_setup( - session_id: str, - session_id_configured: bool, - experiment: typing.Optional[str], - run: typing.Optional[str], -) -> None: - """Local setup for tracing. - - The setup includes: - 1. invoke local prompt flow service - 2. prepare OTLP exporter required environment variables - 3. check whether local to cloud feature is enabled - 4. print trace UI url(s) - Executor calls `setup_exporter_from_environ` to setup exporter from environment variables. - """ - from promptflow._sdk._service.utils.utils import get_port_from_config - - # invoke local prompt flow service - pfs_port = get_port_from_config(create_if_not_exists=True) - _start_pfs(pfs_port) - _logger.debug("Promptflow service is serving on port %s", pfs_port) - - # check whether local to cloud feature is enabled: trace provider from pf config - workspace_triad = _get_workspace_triad_from_config() - - # prepare OTLP exporter required environment variables - # init the global tracer with endpoint - _init_otel_trace_exporter( - otlp_port=pfs_port, - session_id=session_id, - experiment=experiment, - workspace_triad=workspace_triad, - ) - - # print trace UI url(s) - print_url_kwargs = { - "session_configured": session_id_configured, - "experiment": experiment, - "run": run, - "session_id": session_id, - } - _print_trace_url_for_local(pfs_port=pfs_port, **print_url_kwargs) - _print_trace_url_for_local_to_cloud(workspace_triad=workspace_triad, **print_url_kwargs) - - -def _start_pfs(pfs_port) -> None: - from promptflow._sdk._service.entry import entry - from promptflow._sdk._service.utils.utils import is_port_in_use - - command_args = ["start", "--port", str(pfs_port)] - if is_port_in_use(pfs_port): - is_healthy = is_pfs_service_healthy(pfs_port) - if not is_healthy: - command_args += ["--force"] - else: - return - entry(command_args) - - -def _is_tracer_provider_configured() -> bool: - # if tracer provider is configured, `tracer_provider` should be an instance of `TracerProvider`; - # otherwise, it should be an instance of `ProxyTracerProvider` - tracer_provider = trace.get_tracer_provider() - return isinstance(tracer_provider, TracerProvider) - - -def _provision_session_id(specified_session_id: typing.Optional[str]) -> str: - # check if session id is configured in tracer provider - configured_session_id = None - if _is_tracer_provider_configured(): - tracer_provider: TracerProvider = trace.get_tracer_provider() - configured_session_id = tracer_provider._resource.attributes[SpanResourceAttributesFieldName.SESSION_ID] - - if specified_session_id is None and configured_session_id is None: - # user does not specify and not configured, provision a new one - session_id = str(uuid.uuid4()) - elif specified_session_id is None and configured_session_id is not None: - # user does not specify, but already configured, use the configured one - session_id = configured_session_id - elif specified_session_id is not None and configured_session_id is None: - # user specified, but not configured, use the specified one - session_id = specified_session_id - else: - # user specified while configured, log warnings and honor the configured one - session_id = configured_session_id - warning_message = ( - f"Session is already configured with id: {session_id!r}, " - "we will honor it within current process; " - "if you expect another session, please specify it in another process." - ) - _logger.warning(warning_message) - return session_id - - -def _create_resource( - session_id: str, - experiment: typing.Optional[str] = None, - workspace_triad: typing.Optional[AzureMLWorkspaceTriad] = None, -) -> Resource: - resource_attributes = { - SpanResourceAttributesFieldName.SERVICE_NAME: OTEL_RESOURCE_SERVICE_NAME, - SpanResourceAttributesFieldName.SESSION_ID: session_id, - } - if experiment is not None: - resource_attributes[SpanResourceAttributesFieldName.EXPERIMENT_NAME] = experiment - if workspace_triad is not None: - resource_attributes[SpanResourceAttributesFieldName.SUBSCRIPTION_ID] = workspace_triad.subscription_id - resource_attributes[SpanResourceAttributesFieldName.RESOURCE_GROUP_NAME] = workspace_triad.resource_group_name - resource_attributes[SpanResourceAttributesFieldName.WORKSPACE_NAME] = workspace_triad.workspace_name - return Resource(attributes=resource_attributes) - - -def setup_exporter_from_environ() -> None: - # openai instrumentation - # in eager mode, the code cannot reach executor logic to apply injection - # explicitly inject here, so that it can work in new process/thread - inject_openai_api() - # if session id does not exist in environment variables, it should be in runtime environment - # where we have not supported tracing yet, so we don't need to setup any exporter here - # directly return - if TraceEnvironmentVariableName.SESSION_ID not in os.environ: - return - if _is_tracer_provider_configured(): - _logger.debug("tracer provider is already configured, skip setting up again.") - return - - # get resource values from environment variables - session_id = os.getenv(TraceEnvironmentVariableName.SESSION_ID) - experiment = os.getenv(TraceEnvironmentVariableName.EXPERIMENT, None) - # local to cloud: trace provider - workspace_triad = None - subscription_id = os.getenv(TraceEnvironmentVariableName.SUBSCRIPTION_ID, None) - resource_group_name = os.getenv(TraceEnvironmentVariableName.RESOURCE_GROUP_NAME, None) - workspace_name = os.getenv(TraceEnvironmentVariableName.WORKSPACE_NAME, None) - if all([subscription_id, resource_group_name, workspace_name]): - workspace_triad = AzureMLWorkspaceTriad( - subscription_id=subscription_id, - resource_group_name=resource_group_name, - workspace_name=workspace_name, - ) - # create resource - resource = _create_resource( - session_id=session_id, - experiment=experiment, - workspace_triad=workspace_triad, - ) - tracer_provider = TracerProvider(resource=resource) - # get OTLP endpoint from environment variable - endpoint = os.getenv(OTEL_EXPORTER_OTLP_ENDPOINT) - # Set timeout as 30 seconds since creating cosmosDB client is time consuming - otlp_span_exporter = OTLPSpanExporter(endpoint=endpoint, timeout=30) - tracer_provider.add_span_processor(BatchSpanProcessor(otlp_span_exporter)) - trace.set_tracer_provider(tracer_provider) - - -def _init_otel_trace_exporter( - otlp_port: str, - session_id: str, - experiment: typing.Optional[str] = None, - workspace_triad: typing.Optional[AzureMLWorkspaceTriad] = None, -) -> None: - endpoint = f"http://localhost:{otlp_port}/v1/traces" - os.environ[OTEL_EXPORTER_OTLP_ENDPOINT] = endpoint - os.environ[TraceEnvironmentVariableName.SESSION_ID] = session_id - if experiment is not None: - os.environ[TraceEnvironmentVariableName.EXPERIMENT] = experiment - if workspace_triad is not None: - os.environ[TraceEnvironmentVariableName.SUBSCRIPTION_ID] = workspace_triad.subscription_id - os.environ[TraceEnvironmentVariableName.RESOURCE_GROUP_NAME] = workspace_triad.resource_group_name - os.environ[TraceEnvironmentVariableName.WORKSPACE_NAME] = workspace_triad.workspace_name - setup_exporter_from_environ() - - -# priority: run > experiment > session -# for run(s) in experiment, we should print url with run(s) as it is more specific; -# and url with experiment should be printed at the beginning of experiment start. -# session id is the concept we expect to expose to users least, so it should have the lowest priority. -def _print_trace_url_for_local( - pfs_port: str, - session_configured: bool, - experiment: typing.Optional[str] = None, - run: typing.Optional[str] = None, - session_id: typing.Optional[str] = None, -) -> None: - url = f"http://localhost:{pfs_port}/v1.0/ui/traces" - if run is not None: - url += f"?run={run}" - elif experiment is not None: - url += f"?experiment={experiment}" - elif session_configured and session_id is not None: - url += f"?session={session_id}" - print(f"You can view the trace from local PFS: {url}") - - -def _print_trace_url_for_local_to_cloud( - workspace_triad: typing.Optional[AzureMLWorkspaceTriad], - session_configured: bool, - experiment: typing.Optional[str] = None, - run: typing.Optional[str] = None, - session_id: typing.Optional[str] = None, -) -> None: - # if user has configured trace.provider, we can extract workspace triad from it - # this indicates local to cloud feature is enabled, then print the url in portal - if workspace_triad is None: - return - # &searchText={"sessionId":"8baa9e34-3d23-497a-8ec8-39b84cdb7a40","batchRunId":"test_main_variant_0_20240229_111938_229535"} - url = ( - "https://int.ml.azure.com/prompts/trace/list" - f"?wsid=/subscriptions/{workspace_triad.subscription_id}" - f"/resourceGroups/{workspace_triad.resource_group_name}" - "/providers/Microsoft.MachineLearningServices" - f"/workspaces/{workspace_triad.workspace_name}" - ) - query = None - if run is not None: - query = '{"batchRunId":"' + run + '"}' - elif experiment is not None: - # not consider experiment for now - pass - elif session_configured and session_id is not None: - query = '{"sessionId":"' + session_id + '"}' - # urllib.parse.quote to encode the query parameter - if query is not None: - url += f"&searchText={urllib.parse.quote(query)}" - print(f"You can view the trace in cloud from Azure portal: {url}") - - -def _get_workspace_triad_from_config() -> typing.Optional[AzureMLWorkspaceTriad]: - trace_provider = Configuration.get_instance().get_trace_provider() - if trace_provider is None: - return None - return extract_workspace_triad_from_trace_provider(trace_provider) - - -def _validate_session_id(value: str) -> None: - # session id should only contain `[A-Z, a-z, 0-9, _, -]`` for now - if not value.replace("-", "").replace("_", "").isalnum(): - raise ValueError("session id should only contain `[A-Z, a-z, 0-9, _, -]` for now.") diff --git a/src/promptflow/pyproject.toml b/src/promptflow/pyproject.toml index 58fd2db31e7..9efab9c4e6e 100644 --- a/src/promptflow/pyproject.toml +++ b/src/promptflow/pyproject.toml @@ -1,3 +1,23 @@ +# [build-system] +# requires = ["poetry-core>=1.5.0"] +# build-backend = "poetry.core.masonry.api" + +# # poetry +# [tool.poetry] +# name = "promptflow" +# version = "1.7.0.dev0" +# description = "Prompt flow Python SDK - build high-quality LLM apps" +# authors = [ +# "Microsoft Corporation " +# ] + +# [tool.poetry.dependencies] +# python = "<4.0,>=3.8" +# promptflow-tracing = { path = "../promptflow-tracing", develop = true } +# promptflow-core = { path = "../promptflow-core", develop = true } +# promptflow-devkit = { path = "../promptflow-devkit", develop = true } +# promptflow-azure = { path = "../promptflow-azure", develop = true } + [tool.black] line-length = 120 diff --git a/src/promptflow/setup.py b/src/promptflow/setup.py index 41d305db479..72a80b619fa 100644 --- a/src/promptflow/setup.py +++ b/src/promptflow/setup.py @@ -21,38 +21,9 @@ changelog = f.read() REQUIRES = [ - "psutil", # get process information when bulk run - "httpx>=0.25.1", # used to send http requests asynchronously - "openai", # promptflow._core.api_injector - "flask>=2.2.3,<4.0.0", # Serving endpoint requirements - "sqlalchemy>=1.4.48,<3.0.0", # sqlite requirements - # note that pandas 1.5.3 is the only version to test in ci before promptflow 0.1.0b7 is released - # and pandas 2.x.x will be the only version to test in ci after that. - "pandas>=1.5.3,<3.0.0", # load data requirements - "python-dotenv>=1.0.0,<2.0.0", # control plane sdk requirements, to load .env file - "keyring>=24.2.0,<25.0.0", # control plane sdk requirements, to access system keyring service - "pydash>=6.0.0,<8.0.0", # control plane sdk requirements, to support parameter overrides in schema. - # vulnerability: https://github.com/advisories/GHSA-5cpq-8wj7-hf2v - "cryptography>=42.0.4", # control plane sdk requirements to support connection encryption - "colorama>=0.4.6,<0.5.0", # producing colored terminal text for testing chat flow - "tabulate>=0.9.0,<1.0.0", # control plane sdk requirements, to print table in console - "filelock>=3.4.0,<4.0.0", # control plane sdk requirements, to lock for multiprocessing - # We need to pin the version due to the issue: https://github.com/hwchase17/langchain/issues/5113 - "marshmallow>=3.5,<4.0.0", - "gitpython>=3.1.24,<4.0.0", # used git info to generate flow id - "tiktoken>=0.4.0", - "strictyaml>=1.5.0,<2.0.0", # used to identify exact location of validation error - "waitress>=2.1.2,<3.0.0", # used to serve local service - "azure-monitor-opentelemetry-exporter>=1.0.0b21,<2.0.0", - "ruamel.yaml>=0.17.10,<1.0.0", # used to generate connection templates with preserved comments - "pyarrow>=14.0.1,<15.0.0", # used to read parquet file with pandas.read_parquet - "pillow>=10.1.0,<11.0.0", # used to generate icon data URI for package tool - "filetype>=1.2.0", # used to detect the mime type for mulitmedia input - "jsonschema>=4.0.0,<5.0.0", # used to validate tool - "docutils", # used to generate description for tools - "opentelemetry-exporter-otlp-proto-http>=1.22.0,<2.0.0", # trace support - "flask-restx>=1.2.0,<2.0.0", # PFS Swagger - "flask-cors>=4.0.0,<5.0.0", # handle PFS CORS + "promptflow-tracing>=1.0.0", # tracing capabilities + "promptflow-core", # core capabilities + "promptflow-devkit", # devkit capabilities ] setup( @@ -79,35 +50,21 @@ python_requires="<4.0,>=3.8", install_requires=REQUIRES, extras_require={ - "azure": [ - "azure-core>=1.26.4,<2.0.0", - "azure-storage-blob[aio]>=12.13.0,<13.0.0", # add [aio] for async run download feature - "azure-identity>=1.12.0,<2.0.0", - "azure-ai-ml>=1.11.0,<2.0.0", - "pyjwt>=2.4.0,<3.0.0", # requirement of control plane SDK - "azure-cosmos>=4.5.1,<5.0.0", # used to upload trace to cloud + "all": [ + "promptflow-core[executor-service]", + "promptflow-devkit[all]", + "promptflow-azure", ], - "executable": ["pyinstaller>=5.13.2", "streamlit>=1.26.0", "streamlit-quill<0.1.0", "bs4"], + "azure": ["promptflow-azure"], + "executable": ["promptflow-devkit[executable]"], "azureml-serving": [ - # AzureML connection dependencies - "azure-identity>=1.12.0,<2.0.0", - "azure-ai-ml>=1.11.0,<2.0.0", - "azure-monitor-opentelemetry-exporter>=1.0.0b21,<2.0.0", - # MDC dependencies for monitoring - "azureml-ai-monitoring>=0.1.0b3,<1.0.0", + "promptflow-core[azureml-serving]", ], "executor-service": [ - "fastapi>=0.109.0,<1.0.0", # used to build web executor server + "promptflow-core[executor-service]", # used to build web executor server ], }, packages=find_packages(), - scripts=["pf", "pf.bat"], - entry_points={ - "console_scripts": [ - "pfazure = promptflow._cli._pf_azure.entry:main", - "pfs = promptflow._sdk._service.entry:main", - ], - }, include_package_data=True, project_urls={ "Bug Reports": "https://github.com/microsoft/promptflow/issues", diff --git a/src/promptflow/tests/conftest.py b/src/promptflow/tests/conftest.py index 62000da24ef..2eadd0c9e23 100644 --- a/src/promptflow/tests/conftest.py +++ b/src/promptflow/tests/conftest.py @@ -7,27 +7,17 @@ from unittest.mock import MagicMock, patch import pytest -from _constants import ( - CONNECTION_FILE, - DEFAULT_COMPUTE_INSTANCE_NAME, - DEFAULT_REGISTRY_NAME, - DEFAULT_RESOURCE_GROUP_NAME, - DEFAULT_RUNTIME_NAME, - DEFAULT_SUBSCRIPTION_ID, - DEFAULT_WORKSPACE_NAME, - ENV_FILE, -) +from _constants import CONNECTION_FILE, ENV_FILE from _pytest.monkeypatch import MonkeyPatch from dotenv import load_dotenv from filelock import FileLock from pytest_mock import MockerFixture -from sdk_cli_azure_test.recording_utilities import SanitizedValues, is_replay from promptflow._cli._utils import AzureMLWorkspaceTriad from promptflow._constants import PROMPTFLOW_CONNECTIONS from promptflow._core.connection_manager import ConnectionManager from promptflow._utils.context_utils import _change_working_dir -from promptflow.connections import AzureOpenAIConnection +from promptflow._sdk.entities._connection import AzureOpenAIConnection load_dotenv() @@ -169,15 +159,9 @@ def mock_generated_by_func(): def my_generated_by_func(index_type: str): inputs = "" if index_type == "Azure Cognitive Search": - inputs = { - "index_type": index_type, - "index": "index_1" - } + inputs = {"index_type": index_type, "index": "index_1"} elif index_type == "Workspace MLIndex": - inputs = { - "index_type": index_type, - "index" : "index_2" - } + inputs = {"index_type": index_type, "index": "index_2"} result = json.dumps(inputs) return result @@ -196,11 +180,21 @@ def my_reverse_generated_by_func(index_json: str): return my_reverse_generated_by_func +@pytest.fixture +def enable_logger_propagate(): + """This is for test cases that need to check the log output.""" + from promptflow._utils.logger_utils import get_cli_sdk_logger + + logger = get_cli_sdk_logger() + original_value = logger.propagate + logger.propagate = True + yield + logger.propagate = original_value + + @pytest.fixture(scope="session") def mock_module_with_for_retrieve_tool_func_result( - mock_list_func, - mock_generated_by_func, - mock_reverse_generated_by_func + mock_list_func, mock_generated_by_func, mock_reverse_generated_by_func ): """Mock module object for dynamic list testing.""" mock_module_list_func = MagicMock() @@ -224,55 +218,3 @@ def side_effect(module_name, *args, **kwargs): mock_import.side_effect = side_effect yield - - -# below fixtures are used for pfazure and global config tests -@pytest.fixture(scope="session") -def subscription_id() -> str: - if is_replay(): - return SanitizedValues.SUBSCRIPTION_ID - else: - return os.getenv("PROMPT_FLOW_SUBSCRIPTION_ID", DEFAULT_SUBSCRIPTION_ID) - - -@pytest.fixture(scope="session") -def resource_group_name() -> str: - if is_replay(): - return SanitizedValues.RESOURCE_GROUP_NAME - else: - return os.getenv("PROMPT_FLOW_RESOURCE_GROUP_NAME", DEFAULT_RESOURCE_GROUP_NAME) - - -@pytest.fixture(scope="session") -def workspace_name() -> str: - if is_replay(): - return SanitizedValues.WORKSPACE_NAME - else: - return os.getenv("PROMPT_FLOW_WORKSPACE_NAME", DEFAULT_WORKSPACE_NAME) - - -@pytest.fixture(scope="session") -def runtime_name() -> str: - return os.getenv("PROMPT_FLOW_RUNTIME_NAME", DEFAULT_RUNTIME_NAME) - - -@pytest.fixture(scope="session") -def registry_name() -> str: - return os.getenv("PROMPT_FLOW_REGISTRY_NAME", DEFAULT_REGISTRY_NAME) - - -@pytest.fixture -def enable_logger_propagate(): - """This is for test cases that need to check the log output.""" - from promptflow._utils.logger_utils import get_cli_sdk_logger - - logger = get_cli_sdk_logger() - original_value = logger.propagate - logger.propagate = True - yield - logger.propagate = original_value - - -@pytest.fixture(scope="session") -def compute_instance_name() -> str: - return os.getenv("PROMPT_FLOW_COMPUTE_INSTANCE_NAME", DEFAULT_COMPUTE_INSTANCE_NAME) diff --git a/src/promptflow/tests/executor/.coveragerc b/src/promptflow/tests/executor/.coveragerc index f191b51a5d5..b1e76acddf2 100644 --- a/src/promptflow/tests/executor/.coveragerc +++ b/src/promptflow/tests/executor/.coveragerc @@ -4,6 +4,7 @@ omit = */promptflow/_sdk/* */promptflow/_telemetry/* */promptflow/azure/* + */promptflow/core/* */promptflow/entities/* */promptflow/operations/* *__init__.py* diff --git a/src/promptflow/tests/executor/conftest.py b/src/promptflow/tests/executor/conftest.py index 93da20f3610..878fce694e8 100644 --- a/src/promptflow/tests/executor/conftest.py +++ b/src/promptflow/tests/executor/conftest.py @@ -1,17 +1,123 @@ +import multiprocessing +from pathlib import Path + import pytest +from executor.process_utils import ( + MockForkServerProcess, + MockSpawnProcess, + current_process_manager_var, + current_process_wrapper_var, + override_process_class, +) from fastapi.testclient import TestClient +from promptflow.executor._line_execution_process_pool import _process_wrapper +from promptflow.executor._process_manager import create_spawned_fork_process_manager from promptflow.executor._service.app import app -from promptflow.tracing._openai_injector import inject_openai_api +from promptflow.tracing._integrations._openai_injector import inject_openai_api + +from .record_utils import setup_recording + +try: + from promptflow.recording.local import recording_array_reset + from promptflow.recording.record_mode import is_live, is_record, is_recording_enabled, is_replay +except ImportError: + # Run test in empty mode if promptflow-recording is not installed + def recording_array_reset(): + pass + + def is_live(): + return False + + def is_record(): + return False + + def is_recording_enabled(): + return False + + def is_replay(): + return False + + +PROMPTFLOW_ROOT = Path(__file__) / "../../.." + + +def pytest_configure(config): + # Register an additional marker + pytest.is_live = is_live() + pytest.is_record = is_record() + pytest.is_replay = is_replay() + pytest.is_recording_enabled = is_recording_enabled() + + +@pytest.fixture +def recording_setup(): + patches = setup_recording() + try: + yield + finally: + for patcher in patches: + patcher.stop() + + +def _default_mock_process_wrapper(*args, **kwargs): + # Default mock implementation of _process_wrapper in recording mode + setup_recording() + _process_wrapper(*args, **kwargs) + + +def _default_mock_create_spawned_fork_process_manager(*args, **kwargs): + # Default mock implementation of create_spawned_fork_process_manager in recording mode + setup_recording() + create_spawned_fork_process_manager(*args, **kwargs) + + +@pytest.fixture +def process_override(): + # This fixture is used to override the Process class to ensure the recording mode works + + # Step I: set process pool targets placeholder with customized targets + current_process_wrapper_var.set(_default_mock_process_wrapper) + current_process_manager_var.set(_default_mock_create_spawned_fork_process_manager) + + # Step II: override the process pool class + process_class_dict = {"spawn": MockSpawnProcess, "forkserver": MockForkServerProcess} + original_process_class = override_process_class(process_class_dict) + + try: + yield + finally: + for start_method, MockProcessClass in process_class_dict.items(): + if start_method in multiprocessing.get_all_start_methods(): + multiprocessing.get_context(start_method).Process = original_process_class[start_method] + if start_method == multiprocessing.get_start_method(): + multiprocessing.Process = original_process_class[start_method] + + +@pytest.fixture +def recording_injection(recording_setup, process_override): + # This fixture is used to main entry point to inject recording mode into the test + try: + yield + finally: + if pytest.is_replay or pytest.is_record: + from promptflow.recording.local import RecordStorage + + RecordStorage.get_instance().delete_lock_file() + if pytest.is_live: + from promptflow.recording.local import delete_count_lock_file + + delete_count_lock_file() + recording_array_reset() @pytest.fixture(autouse=True, scope="session") def inject_api_executor(): - """Inject OpenAI API during test session. - + """Inject OpenAI API during test session when recording not enabled AOAI call in promptflow should involve trace logging and header injection. Inject function to API call in test scenario.""" - inject_openai_api() + if not pytest.is_recording_enabled: + inject_openai_api() @pytest.fixture(autouse=True, scope="session") diff --git a/src/promptflow/tests/executor/e2etests/test_activate.py b/src/promptflow/tests/executor/e2etests/test_activate.py index 3988815d0c8..2791ecdfcaf 100644 --- a/src/promptflow/tests/executor/e2etests/test_activate.py +++ b/src/promptflow/tests/executor/e2etests/test_activate.py @@ -4,8 +4,9 @@ import pytest +from promptflow._constants import OUTPUT_FILE_NAME from promptflow._utils.logger_utils import LogContext -from promptflow.batch._batch_engine import OUTPUT_FILE_NAME, BatchEngine +from promptflow.batch._batch_engine import BatchEngine from promptflow.batch._result import BatchResult from promptflow.contracts._errors import FlowDefinitionError from promptflow.contracts.run_info import FlowRunInfo @@ -33,7 +34,7 @@ ] -@pytest.mark.usefixtures("dev_connections") +@pytest.mark.usefixtures("dev_connections", "recording_injection") @pytest.mark.e2etest class TestExecutorActivate: @pytest.mark.parametrize("flow_folder", ACTIVATE_FLOW_TEST_CASES) diff --git a/src/promptflow/tests/executor/e2etests/test_assistant.py b/src/promptflow/tests/executor/e2etests/test_assistant.py index a26625a5bbb..5a529955f83 100644 --- a/src/promptflow/tests/executor/e2etests/test_assistant.py +++ b/src/promptflow/tests/executor/e2etests/test_assistant.py @@ -1,14 +1,20 @@ import os +import sys +from pathlib import Path import pytest from promptflow.contracts.run_info import Status from promptflow.executor import FlowExecutor -from ..utils import get_flow_folder, get_yaml_file +from ..utils import get_flow_folder, get_flow_package_tool_definition, get_yaml_file +PACKAGE_TOOL_BASE = Path(__file__).parent.parent / "package_tools" +PACKAGE_TOOL_ENTRY = "promptflow._core.tools_manager.collect_package_tools" +sys.path.insert(0, str(PACKAGE_TOOL_BASE.resolve())) -@pytest.mark.usefixtures("dev_connections") + +@pytest.mark.usefixtures("dev_connections", "recording_injection") @pytest.mark.e2etest class TestAssistant: @pytest.mark.parametrize( @@ -22,6 +28,9 @@ def test_assistant_tool_with_connection(self, flow_folder, line_input, dev_conne flow_result = executor.exec_line(line_input) print(flow_result.output) assert flow_result.run_info.status == Status.Completed + assert len(flow_result.output["answer"]["content"]) == 1 + assert flow_result.output["answer"]["content"][0]["type"] == "text" + assert flow_result.output["thread_id"] @pytest.mark.parametrize( "flow_folder, line_input", @@ -46,3 +55,17 @@ def test_assistant_with_image(self, flow_folder, line_input, dev_connections): assert len(flow_result.output["assistant_output"]["content"]) > 0 assert len(flow_result.output["assistant_output"]["file_id_references"]) > 0 assert flow_result.output["thread_id"] + + @pytest.mark.parametrize( + "flow_folder", + [ + "assistant-with-package-tool", + ], + ) + def test_assistant_package_tool_with_conn(self, mocker, flow_folder, dev_connections): + package_tool_definition = get_flow_package_tool_definition(flow_folder) + + with mocker.patch(PACKAGE_TOOL_ENTRY, return_value=package_tool_definition): + executor = FlowExecutor.create(get_yaml_file(flow_folder), dev_connections, raise_ex=True) + flow_result = executor.exec_line({}) + assert flow_result.run_info.status == Status.Completed diff --git a/src/promptflow/tests/executor/e2etests/test_batch_engine.py b/src/promptflow/tests/executor/e2etests/test_batch_engine.py index ab4f70fa37a..f586ec097df 100644 --- a/src/promptflow/tests/executor/e2etests/test_batch_engine.py +++ b/src/promptflow/tests/executor/e2etests/test_batch_engine.py @@ -1,4 +1,5 @@ import asyncio +import glob import multiprocessing import os import traceback @@ -8,24 +9,28 @@ import pytest +from promptflow._constants import OUTPUT_FILE_NAME from promptflow._sdk.entities._run import Run from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations from promptflow._utils.utils import dump_list_to_jsonl -from promptflow.batch._batch_engine import OUTPUT_FILE_NAME, BatchEngine +from promptflow.batch._batch_engine import BatchEngine from promptflow.batch._errors import EmptyInputsData from promptflow.batch._result import BatchResult from promptflow.contracts.run_info import Status from promptflow.executor._errors import InputNotFound +from ..conftest import setup_recording +from ..process_utils import MockForkServerProcess, MockSpawnProcess, override_process_class from ..utils import ( MemoryRunStorage, + get_batch_inputs_line, get_flow_expected_metrics, get_flow_expected_status_summary, get_flow_folder, get_flow_inputs_file, - get_flow_sample_inputs, get_yaml_file, load_jsonl, + submit_batch_run, ) SAMPLE_FLOW = "web_classification_no_variants" @@ -63,6 +68,13 @@ def _run_batch_with_start_method(multiprocessing_start_method, flow_folder, inpu batch_result, output_dir = submit_batch_run( flow_folder, inputs_mapping, connections=dev_connections, return_output_dir=True ) + # The method is used as start method to construct new process in tests. + # We need to make sure the necessary setup in place to get pass along in new process + process_class_dict = {"spawn": MockSpawnProcess, "forkserver": MockForkServerProcess} + override_process_class(process_class_dict) + + # recording injection again since this method is running in a new process + setup_recording() assert isinstance(batch_result, BatchResult) nlines = get_batch_inputs_line(flow_folder) @@ -79,33 +91,6 @@ def _run_batch_with_start_method(multiprocessing_start_method, flow_folder, inpu assert output["line_number"] == i, f"line_number is not correct in {i}th output {output}" -def submit_batch_run( - flow_folder, - inputs_mapping, - *, - input_dirs={}, - input_file_name="samples.json", - run_id=None, - connections={}, - storage=None, - return_output_dir=False, -): - batch_engine = BatchEngine( - get_yaml_file(flow_folder), get_flow_folder(flow_folder), connections=connections, storage=storage - ) - if not input_dirs and inputs_mapping: - input_dirs = {"data": get_flow_inputs_file(flow_folder, file_name=input_file_name)} - output_dir = Path(mkdtemp()) - if return_output_dir: - return batch_engine.run(input_dirs, inputs_mapping, output_dir, run_id=run_id), output_dir - return batch_engine.run(input_dirs, inputs_mapping, output_dir, run_id=run_id) - - -def get_batch_inputs_line(flow_folder, sample_inputs_file="samples.json"): - inputs = get_flow_sample_inputs(flow_folder, sample_inputs_file=sample_inputs_file) - return len(inputs) - - class MockRun(object): def __init__(self, name: str, output_path: Path): self.name = name @@ -114,7 +99,7 @@ def __init__(self, name: str, output_path: Path): self._run_source = None -@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections") +@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections", "recording_injection") @pytest.mark.e2etest class TestBatch: def test_batch_storage(self, dev_connections): @@ -413,10 +398,12 @@ def test_batch_resume(self, flow_folder, resume_from_run_name, dev_connections): mock_resume_from_run = MockRun(resume_from_run_name, run_folder) resume_from_run_storage = LocalStorageOperations(mock_resume_from_run) resume_from_run_output_dir = resume_from_run_storage.outputs_folder + resume_run_id = mock_resume_from_run.name + "_resume" resume_run_batch_results = batch_engine.run( input_dirs, inputs_mapping, output_dir, + resume_run_id, resume_from_run_storage=resume_from_run_storage, resume_from_run_output_dir=resume_from_run_output_dir, ) @@ -425,6 +412,12 @@ def test_batch_resume(self, flow_folder, resume_from_run_name, dev_connections): assert resume_run_batch_results.total_lines == nlines assert resume_run_batch_results.completed_lines == nlines + jsonl_files = glob.glob(os.path.join(run_storage._run_infos_folder, "*.jsonl")) + for file_path in jsonl_files: + contents = load_jsonl(file_path) + for content in contents: + assert content["run_info"]["root_run_id"] == resume_run_id + @pytest.mark.parametrize( "flow_folder, resume_from_run_name", [("classification_accuracy_evaluation", "classification_accuracy_evaluation_default_20240208_152402_694000")], @@ -448,10 +441,12 @@ def test_batch_resume_aggregation(self, flow_folder, resume_from_run_name, dev_c mock_resume_from_run = MockRun(resume_from_run_name, run_folder) resume_from_run_storage = LocalStorageOperations(mock_resume_from_run) resume_from_run_output_dir = resume_from_run_storage.outputs_folder + resume_run_id = mock_resume_from_run.name + "_resume" resume_run_batch_results = batch_engine.run( input_dirs, inputs_mapping, output_dir, + resume_run_id, resume_from_run_storage=resume_from_run_storage, resume_from_run_output_dir=resume_from_run_output_dir, ) @@ -461,6 +456,17 @@ def test_batch_resume_aggregation(self, flow_folder, resume_from_run_name, dev_c assert resume_run_batch_results.completed_lines == nlines assert resume_run_batch_results.metrics == {"accuracy": 0.67} + jsonl_files = glob.glob(os.path.join(run_storage._run_infos_folder, "*.jsonl")) + for file_path in jsonl_files: + contents = load_jsonl(file_path) + for content in contents: + assert content["run_info"]["root_run_id"] == resume_run_id + + status_summary = {f"__pf__.nodes.{k}": v for k, v in resume_run_batch_results.node_status.items()} + assert status_summary["__pf__.nodes.grade.completed"] == 3 + assert status_summary["__pf__.nodes.calculate_accuracy.completed"] == 1 + assert status_summary["__pf__.nodes.aggregation_assert.completed"] == 1 + @pytest.mark.parametrize( "flow_folder, resume_from_run_name", [("eval_flow_with_image_resume", "eval_flow_with_image_resume_default_20240305_111258_103000")], @@ -480,10 +486,12 @@ def test_batch_resume_aggregation_with_image(self, flow_folder, resume_from_run_ mock_resume_from_run = MockRun(resume_from_run_name, run_folder) resume_from_run_storage = LocalStorageOperations(mock_resume_from_run) resume_from_run_output_dir = resume_from_run_storage.outputs_folder + resume_run_id = mock_resume_from_run.name + "_resume" resume_run_batch_results = batch_engine.run( input_dirs, inputs_mapping, output_dir, + resume_run_id, resume_from_run_storage=resume_from_run_storage, resume_from_run_output_dir=resume_from_run_output_dir, ) @@ -492,3 +500,13 @@ def test_batch_resume_aggregation_with_image(self, flow_folder, resume_from_run_ assert resume_run_batch_results.total_lines == nlines assert resume_run_batch_results.completed_lines == nlines assert resume_run_batch_results.metrics == {"image_count": 3} + + jsonl_files = glob.glob(os.path.join(run_storage._run_infos_folder, "*.jsonl")) + for file_path in jsonl_files: + contents = load_jsonl(file_path) + for content in contents: + assert content["run_info"]["root_run_id"] == resume_run_id + + status_summary = {f"__pf__.nodes.{k}": v for k, v in resume_run_batch_results.node_status.items()} + assert status_summary["__pf__.nodes.flip_image.completed"] == 3 + assert status_summary["__pf__.nodes.count_image.completed"] == 1 diff --git a/src/promptflow/tests/executor/e2etests/test_batch_server.py b/src/promptflow/tests/executor/e2etests/test_batch_server.py new file mode 100644 index 00000000000..e2a5cef72de --- /dev/null +++ b/src/promptflow/tests/executor/e2etests/test_batch_server.py @@ -0,0 +1,100 @@ +from pathlib import Path +from tempfile import mkdtemp +from typing import Any, Mapping, Optional + +import pytest +from fastapi.testclient import TestClient + +from promptflow._constants import FlowLanguage +from promptflow._proxy import AbstractExecutorProxy, ProxyFactory +from promptflow._proxy._python_executor_proxy import PythonExecutorProxy +from promptflow.contracts.run_info import Status +from promptflow.executor._result import AggregationResult, LineResult +from promptflow.executor._service.app import app +from promptflow.storage import AbstractRunStorage + +from ..utils import MemoryRunStorage, submit_batch_run + + +@pytest.mark.e2etest +class TestBatchServer: + def test_batch_run_in_server_mode(self): + flow_folder = "print_input_flow" + inputs_mapping = {"text": "${data.text}"} + mem_run_storage = MemoryRunStorage() + # Mock the executor proxy to use the test client + ProxyFactory.register_executor(FlowLanguage.Python, MockPythonAPIBasedExecutorProxy) + batch_result = submit_batch_run( + flow_folder, inputs_mapping, input_file_name="inputs.jsonl", storage=mem_run_storage + ) + assert batch_result.status == Status.Completed + assert batch_result.total_lines == 10 + assert batch_result.completed_lines == batch_result.total_lines + assert len(mem_run_storage._flow_runs) == 10 + assert len(mem_run_storage._node_runs) == 10 + # Reset the executor proxy to avoid affecting other tests + ProxyFactory.register_executor(FlowLanguage.Python, PythonExecutorProxy) + + +class MockPythonAPIBasedExecutorProxy(AbstractExecutorProxy): + def __init__(self, *, executor_client: TestClient): + self._executor_client = executor_client + + @classmethod + async def create( + cls, + flow_file: Path, + working_dir: Optional[Path] = None, + *, + connections: Optional[dict] = None, + storage: Optional[AbstractRunStorage] = None, + worker_count: Optional[int] = None, + line_timeout_sec: Optional[int] = None, + **kwargs, + ) -> "MockPythonAPIBasedExecutorProxy": + """Create a new executor""" + executor_client = TestClient(app, raise_server_exceptions=False) + output_dir = Path(mkdtemp()) + log_path = output_dir / "execution.log" + request = { + "working_dir": working_dir.as_posix(), + "flow_file": "flow.dag.yaml", + "connections": connections, + "output_dir": output_dir.as_posix(), + "log_path": log_path.as_posix(), + "worker_count": worker_count, + "line_timeout_sec": line_timeout_sec, + } + request = executor_client.post(url="/initialize", json=request) + executor_proxy = cls(executor_client=executor_client) + return executor_proxy + + async def destroy(self): + """Destroy the executor""" + return self._executor_client.post(url="/finalize") + + async def exec_line_async( + self, + inputs: Mapping[str, Any], + index: Optional[int] = None, + run_id: Optional[str] = None, + ) -> LineResult: + """Execute a line""" + request = {"run_id": run_id, "line_number": index, "inputs": inputs} + line_result = self._executor_client.post(url="/execution", json=request) + return LineResult.deserialize(line_result.json()) + + async def exec_aggregation_async( + self, + batch_inputs: Mapping[str, Any], + aggregation_inputs: Mapping[str, Any], + run_id: Optional[str] = None, + ) -> AggregationResult: + """Execute aggregation nodes""" + request = {"run_id": run_id, "batch_inputs": batch_inputs, "aggregation_inputs": aggregation_inputs} + aggregation_result = self._executor_client.post(url="/aggregation", json=request) + return AggregationResult.deserialize(aggregation_result.json()) + + async def ensure_executor_health(self): + """Ensure the executor service is healthy before execution""" + return self._executor_client.get(url="/health") diff --git a/src/promptflow/tests/executor/e2etests/test_batch_timeout.py b/src/promptflow/tests/executor/e2etests/test_batch_timeout.py index b3e14df2bd1..eabc9e933a5 100644 --- a/src/promptflow/tests/executor/e2etests/test_batch_timeout.py +++ b/src/promptflow/tests/executor/e2etests/test_batch_timeout.py @@ -13,11 +13,11 @@ from ..utils import MemoryRunStorage, get_flow_folder, get_flow_inputs_file, get_yaml_file -SAMPLE_FLOW = "web_classification_no_variants" +SAMPLE_FLOW = "hello-world" ONE_LINE_OF_BULK_TEST_TIMEOUT = "one_line_of_bulktest_timeout" -@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections") +@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections", "recording_injection") @pytest.mark.e2etest class TestBatchTimeout: @pytest.mark.parametrize( @@ -53,7 +53,7 @@ def test_batch_with_line_timeout(self, flow_folder, dev_connections): # assert mem_run_storage persists run infos correctly assert len(mem_run_storage._flow_runs) == 2, "Flow runs are persisted in memory storage." assert len(mem_run_storage._node_runs) == 4, "Node runs are persisted in memory storage." - msg = "Tool execution is canceled because of the error: Line execution timeout after 5 seconds." + msg = "Tool execution is canceled because: Line execution timeout after 5 seconds." for run in mem_run_storage._node_runs.values(): if run.node == "my_python_tool_with_failed_line": assert run.status == Status.Canceled @@ -127,7 +127,6 @@ def test_batch_with_one_line_timeout(self, flow_folder, dev_connections): [ (ONE_LINE_OF_BULK_TEST_TIMEOUT, 600, 5, BatchExecutionTimeoutError(2, 5), Status.Failed), (ONE_LINE_OF_BULK_TEST_TIMEOUT, 3, 600, LineExecutionTimeoutError(2, 3), Status.Completed), - (ONE_LINE_OF_BULK_TEST_TIMEOUT, 10, 10, BatchExecutionTimeoutError(2, 10), Status.Failed), ], ) def test_batch_timeout(self, flow_folder, line_timeout_sec, batch_timeout_sec, expected_error, batch_run_status): @@ -161,7 +160,11 @@ def test_batch_timeout(self, flow_folder, line_timeout_sec, batch_timeout_sec, e # assert the error summary in batch result if batch_run_status == Status.Failed: ex = BatchRunTimeoutError( - message="The batch run failed due to timeout. Please adjust the timeout settings to a higher value.", + message_format=( + "The batch run failed due to timeout [{batch_timeout_sec}s]. " + "Please adjust the timeout to a higher value." + ), + batch_timeout_sec=batch_timeout_sec, target=ErrorTarget.BATCH, ) assert batch_results.error_summary.batch_error_dict == ExceptionPresenter.create(ex).to_dict() diff --git a/src/promptflow/tests/executor/e2etests/test_csharp_executor_proxy.py b/src/promptflow/tests/executor/e2etests/test_csharp_executor_proxy.py index 3ad8db55b5b..61ebc547bf9 100644 --- a/src/promptflow/tests/executor/e2etests/test_csharp_executor_proxy.py +++ b/src/promptflow/tests/executor/e2etests/test_csharp_executor_proxy.py @@ -8,9 +8,10 @@ import pytest from promptflow._constants import FlowLanguage +from promptflow._proxy import ProxyFactory +from promptflow._proxy._csharp_executor_proxy import CSharpExecutorProxy from promptflow._utils.exception_utils import ExceptionPresenter from promptflow.batch._batch_engine import BatchEngine -from promptflow.batch._csharp_executor_proxy import CSharpExecutorProxy from promptflow.batch._result import BatchResult from promptflow.contracts.run_info import Status from promptflow.exceptions import ErrorTarget, ValidationException @@ -24,7 +25,7 @@ @pytest.mark.unittest class TestCSharpExecutorProxy: def setup_method(self): - BatchEngine.register_executor(FlowLanguage.CSharp, MockCSharpExecutorProxy) + ProxyFactory.register_executor(FlowLanguage.CSharp, MockCSharpExecutorProxy) def test_batch(self): # submit a batch run diff --git a/src/promptflow/tests/executor/e2etests/test_eager_flow.py b/src/promptflow/tests/executor/e2etests/test_eager_flow.py index 39bfc1d4103..14799d72cdf 100644 --- a/src/promptflow/tests/executor/e2etests/test_eager_flow.py +++ b/src/promptflow/tests/executor/e2etests/test_eager_flow.py @@ -1,14 +1,11 @@ -from dataclasses import is_dataclass from pathlib import Path from tempfile import mkdtemp import pytest -from promptflow.batch._batch_engine import OUTPUT_FILE_NAME, BatchEngine -from promptflow.batch._result import BatchResult, LineResult -from promptflow.contracts.run_info import Status -from promptflow.executor._script_executor import ScriptExecutor -from promptflow.executor.flow_executor import FlowExecutor +from promptflow._constants import OUTPUT_FILE_NAME +from promptflow.batch._batch_engine import BatchEngine +from promptflow.batch._result import BatchResult from ..utils import ( EAGER_FLOW_ROOT, @@ -45,61 +42,33 @@ def validate_batch_result(batch_result: BatchResult, flow_folder, output_dir, en @pytest.mark.e2etest class TestEagerFlow: @pytest.mark.parametrize( - "flow_folder, inputs, ensure_output", - [ - ("dummy_flow_with_trace", {"text": "text", "models": ["model"]}, lambda x: x == "dummy_output"), - ( - "flow_with_dataclass_output", - {"text": "text", "models": ["model"]}, - lambda x: is_dataclass(x) and x.text == "text" and x.models == ["model"], - ), - ], - ) - def test_flow_run(self, flow_folder, inputs, ensure_output): - flow_file = get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT) - - # Test submitting eager flow to script executor - executor = ScriptExecutor(flow_file=flow_file) - line_result = executor.exec_line(inputs=inputs, index=0) - assert isinstance(line_result, LineResult) - assert ensure_output(line_result.output) - - # Test submitting eager flow to flow executor - executor = FlowExecutor.create(flow_file=flow_file, connections={}) - line_result = executor.exec_line(inputs=inputs, index=0) - assert isinstance(line_result, LineResult) - assert ensure_output(line_result.output) - - def test_flow_run_with_invalid_case(self): - flow_folder = "dummy_flow_with_exception" - flow_file = get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT) - executor = ScriptExecutor(flow_file=flow_file) - line_result = executor.exec_line(inputs={"text": "text"}, index=0) - - assert isinstance(line_result, LineResult) - assert line_result.output is None - assert line_result.run_info.status == Status.Failed - assert "dummy exception" in line_result.run_info.error["message"] - - @pytest.mark.parametrize( - "flow_folder, inputs_mapping, ensure_output", + "flow_folder, inputs_mapping, ensure_output, init_kwargs", [ ( "dummy_flow_with_trace", {"text": "${data.text}", "models": "${data.models}"}, lambda x: "output" in x and x["output"] == "dummy_output", + None, ), ( "flow_with_dataclass_output", {"text": "${data.text}", "models": "${data.models}"}, lambda x: x["text"] == "text" and isinstance(x["models"], list), + None, + ), + ( + "basic_callable_class", + {"func_input": "${data.func_input}"}, + lambda x: x["obj_input"] == "obj_input" and x["func_input"] == "func_input", + {"obj_input": "obj_input"}, ), ], ) - def test_batch_run(self, flow_folder, inputs_mapping, ensure_output): + def test_batch_run(self, flow_folder, inputs_mapping, ensure_output, init_kwargs): batch_engine = BatchEngine( get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT), get_flow_folder(flow_folder, root=EAGER_FLOW_ROOT), + init_kwargs=init_kwargs, ) input_dirs = {"data": get_flow_inputs_file(flow_folder, root=EAGER_FLOW_ROOT)} output_dir = Path(mkdtemp()) @@ -123,13 +92,37 @@ def test_batch_run_with_invalid_case(self): assert batch_result.start_time < batch_result.end_time assert batch_result.system_metrics.duration > 0 - def test_flow_with_operation_context(self): - flow_folder = "flow_with_operation_context" - flow_file = get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT) - executor = FlowExecutor.create(flow_file=flow_file, connections={}) - line_result = executor.exec_line(inputs={}, index=0) + @pytest.mark.parametrize( + "worker_count, ensure_output", + [ + # batch run with 1 worker + # obj id in each line run should be the same + ( + 1, + lambda outputs: len(outputs) == 4 and outputs[0]["obj_id"] == outputs[1]["obj_id"], + ), + # batch run with 2 workers + ( + 2, + # there will be at most 2 instances be created. + lambda outputs: len(outputs) == 4 and len(set([o["obj_id"] for o in outputs])) <= 2, + ), + ], + ) + def test_batch_run_with_init_multiple_workers(self, worker_count, ensure_output): + flow_folder = "basic_callable_class" + init_kwargs = {"obj_input": "obj_input"} + + input_dirs = {"data": get_flow_inputs_file(flow_folder, root=EAGER_FLOW_ROOT)} + output_dir = Path(mkdtemp()) + + batch_engine = BatchEngine( + get_yaml_file(flow_folder, root=EAGER_FLOW_ROOT), + get_flow_folder(flow_folder, root=EAGER_FLOW_ROOT), + init_kwargs=init_kwargs, + worker_count=worker_count, + ) - assert isinstance(line_result, LineResult) - assert line_result.run_info.status == Status.Completed - assert line_result.output["flow-id"] == line_result.run_info.flow_id - assert line_result.output["root-run-id"] == line_result.run_info.root_run_id + batch_engine.run(input_dirs, {"func_input": "${data.func_input}"}, output_dir) + outputs = load_jsonl(output_dir / OUTPUT_FILE_NAME) + assert ensure_output(outputs), outputs diff --git a/src/promptflow/tests/executor/e2etests/test_executor_execution_failures.py b/src/promptflow/tests/executor/e2etests/test_executor_execution_failures.py index 7a5d5078224..6fbf4510b7c 100644 --- a/src/promptflow/tests/executor/e2etests/test_executor_execution_failures.py +++ b/src/promptflow/tests/executor/e2etests/test_executor_execution_failures.py @@ -2,6 +2,7 @@ from promptflow.contracts.run_info import Status from promptflow.executor import FlowExecutor +from promptflow._core._errors import ToolExecutionError from ..utils import ( get_yaml_file, @@ -114,3 +115,29 @@ def test_executor_exec_line_fail(self, flow_folder, failed_node_name, message): assert len(stacktrace) == len(expected_stack_trace) for expected_item, actual_item in zip(expected_stack_trace, stacktrace): assert expected_item in actual_item + + @pytest.mark.parametrize( + "flow_folder, failed_node_name, message", + [ + ("sync_tools_failures", "sync_fail", "In tool raise_an_exception: dummy_input"), + ("async_tools_failures", "async_fail", "In tool raise_an_exception_async: dummy_input"), + ], + ) + def test_executor_exec_line_fail_with_exception(self, flow_folder, failed_node_name, message): + yaml_file = get_yaml_file(flow_folder) + # Here we set raise_ex to True to make sure the exception is raised and we can check the error detail. + executor = FlowExecutor.create(yaml_file, {}, raise_ex=True) + with pytest.raises(ToolExecutionError) as e: + executor.exec_line({}) + ex = e.value + assert ex.error_codes == ["UserError", "ToolExecutionError"] + ex_str = str(ex) + assert ex_str.startswith(f"Execution failure in '{failed_node_name}'") + assert message in ex_str + expected_stack_trace = expected_stack_traces[flow_folder] + stacktrace = ex.tool_traceback.split("\n") + # Remove "^^^^^^^^" lines as they are not part of actual stack trace + stacktrace = [line for line in stacktrace if "^^^^^^^^" not in line] + assert len(stacktrace) == len(expected_stack_trace) + for expected_item, actual_item in zip(expected_stack_trace, stacktrace): + assert expected_item in actual_item diff --git a/src/promptflow/tests/executor/e2etests/test_executor_happypath.py b/src/promptflow/tests/executor/e2etests/test_executor_happypath.py index 0a6be429d87..87a411bae98 100644 --- a/src/promptflow/tests/executor/e2etests/test_executor_happypath.py +++ b/src/promptflow/tests/executor/e2etests/test_executor_happypath.py @@ -16,12 +16,14 @@ from promptflow.executor.flow_executor import execute_flow from promptflow.storage._run_storage import DefaultRunStorage +from ..conftest import MockSpawnProcess, setup_recording +from ..process_utils import MockForkServerProcess, override_process_class from ..utils import FLOW_ROOT, get_flow_folder, get_flow_sample_inputs, get_yaml_file, is_image_file SAMPLE_FLOW = "web_classification_no_variants" -@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections") +@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections", "recording_injection") @pytest.mark.e2etest class TestExecutor: def get_line_inputs(self, flow_folder=""): @@ -95,8 +97,9 @@ def test_long_running_log(self, dev_connections, capsys): from promptflow._utils.logger_utils import flow_logger flow_logger.addHandler(logging.StreamHandler(sys.stdout)) - os.environ["PF_TASK_PEEKING_INTERVAL"] = "1" + # Test long running tasks with log + os.environ["PF_LONG_RUNNING_LOGGING_INTERVAL"] = "1" executor = FlowExecutor.create(get_yaml_file("async_tools"), dev_connections) executor.exec_line(self.get_line_inputs()) captured = capsys.readouterr() @@ -108,8 +111,19 @@ def test_long_running_log(self, dev_connections, capsys): assert re.match( expected_long_running_str_2, captured.out, re.DOTALL ), "flow_logger should contain long running async tool log" + os.environ.pop("PF_LONG_RUNNING_LOGGING_INTERVAL") + + # Test long running tasks without log + executor.exec_line(self.get_line_inputs()) + captured = capsys.readouterr() + assert not re.match( + expected_long_running_str_1, captured.out, re.DOTALL + ), "flow_logger should not contain long running async tool log" + assert not re.match( + expected_long_running_str_2, captured.out, re.DOTALL + ), "flow_logger should not contain long running async tool log" + flow_logger.handlers.pop() - os.environ.pop("PF_TASK_PEEKING_INTERVAL") @pytest.mark.parametrize( "flow_folder, node_name, flow_inputs, dependency_nodes_outputs", @@ -177,7 +191,7 @@ def test_executor_node_overrides(self, dev_connections): raise_ex=True, ) assert isinstance(e.value.inner_exception, ConnectionNotFound) - assert "Connection of LLM node 'classify_with_llm' is not found." in str(e.value) + assert "Connection 'dummy_connection' of LLM node 'classify_with_llm' is not found." in str(e.value) @pytest.mark.parametrize( "flow_folder", @@ -314,6 +328,11 @@ def test_execute_flow( def exec_node_within_process(queue, flow_file, node_name, flow_inputs, dependency_nodes_outputs, connections, raise_ex): try: + process_class_dict = {"spawn": MockSpawnProcess, "forkserver": MockForkServerProcess} + override_process_class(process_class_dict) + + # recording injection again since this method is running in a new process + setup_recording() result = FlowExecutor.load_and_exec_node( flow_file=get_yaml_file(flow_file), node_name=node_name, diff --git a/src/promptflow/tests/executor/e2etests/test_image.py b/src/promptflow/tests/executor/e2etests/test_image.py index 7370648982f..7653d9b70c1 100644 --- a/src/promptflow/tests/executor/e2etests/test_image.py +++ b/src/promptflow/tests/executor/e2etests/test_image.py @@ -4,8 +4,9 @@ import pytest -from promptflow._utils.multimedia_utils import MIME_PATTERN, _create_image_from_file, _is_url, is_multimedia_dict -from promptflow.batch._batch_engine import OUTPUT_FILE_NAME, BatchEngine +from promptflow._constants import OUTPUT_FILE_NAME +from promptflow._utils.multimedia_utils import MIME_PATTERN, BasicMultimediaProcessor, ImageProcessor +from promptflow.batch._batch_engine import BatchEngine from promptflow.batch._result import BatchResult from promptflow.contracts.multimedia import Image from promptflow.contracts.run_info import FlowRunInfo, RunInfo, Status @@ -30,7 +31,7 @@ def get_test_cases_for_simple_input(flow_folder): working_dir = get_flow_folder(flow_folder) - image = _create_image_from_file(working_dir / "logo.jpg") + image = ImageProcessor.create_image_from_file(working_dir / "logo.jpg") inputs = [ {"data:image/jpg;path": str(working_dir / "logo.jpg")}, {"data:image/jpg;base64": image.to_base64()}, @@ -44,8 +45,8 @@ def get_test_cases_for_simple_input(flow_folder): def get_test_cases_for_composite_input(flow_folder): working_dir = get_flow_folder(flow_folder) - image_1 = _create_image_from_file(working_dir / "logo.jpg") - image_2 = _create_image_from_file(working_dir / "logo_2.png") + image_1 = ImageProcessor.create_image_from_file(working_dir / "logo.jpg") + image_2 = ImageProcessor.create_image_from_file(working_dir / "logo_2.png") inputs = [ [ {"data:image/jpg;path": str(working_dir / "logo.jpg")}, @@ -96,10 +97,10 @@ def contain_image_reference(value, parent_path="temp"): if isinstance(value, list): return any(contain_image_reference(item, parent_path) for item in value) if isinstance(value, dict): - if is_multimedia_dict(value): + if BasicMultimediaProcessor.is_multimedia_dict(value): v = list(value.values())[0] assert isinstance(v, str) - assert _is_url(v) or str(Path(v).parent) == parent_path + assert ImageProcessor.is_url(v) or str(Path(v).parent) == parent_path return True return any(contain_image_reference(v, parent_path) for v in value.values()) return False @@ -109,7 +110,7 @@ def contain_image_object(value): if isinstance(value, list): return any(contain_image_object(item) for item in value) elif isinstance(value, dict): - assert not is_multimedia_dict(value) + assert not BasicMultimediaProcessor.is_multimedia_dict(value) return any(contain_image_object(v) for v in value.values()) else: return isinstance(value, Image) diff --git a/src/promptflow/tests/executor/e2etests/test_langchain.py b/src/promptflow/tests/executor/e2etests/test_langchain.py index 0e7d47d3fb2..dbfa617a616 100644 --- a/src/promptflow/tests/executor/e2etests/test_langchain.py +++ b/src/promptflow/tests/executor/e2etests/test_langchain.py @@ -9,7 +9,7 @@ from ..utils import get_flow_folder, get_flow_inputs_file, get_yaml_file -@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections") +@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections", "recording_injection") @pytest.mark.e2etest class TestLangchain: @pytest.mark.parametrize( diff --git a/src/promptflow/tests/executor/e2etests/test_logs.py b/src/promptflow/tests/executor/e2etests/test_logs.py index 517ab0d93c7..cbd636ae0e3 100644 --- a/src/promptflow/tests/executor/e2etests/test_logs.py +++ b/src/promptflow/tests/executor/e2etests/test_logs.py @@ -1,8 +1,10 @@ +import os from pathlib import Path from tempfile import mkdtemp import pytest +from promptflow._constants import LINE_NUMBER_WIDTH, OUTPUT_FILE_NAME from promptflow._utils.logger_utils import LogContext from promptflow.batch import BatchEngine from promptflow.batch._result import BatchResult @@ -11,44 +13,18 @@ from promptflow.executor import FlowExecutor from ..utils import ( + get_batch_inputs_line, + get_bulk_inputs_from_jsonl, get_flow_folder, get_flow_inputs_file, - get_flow_sample_inputs, get_yaml_file, load_content, load_jsonl, + submit_batch_run, ) TEST_LOGS_FLOW = ["print_input_flow"] SAMPLE_FLOW_WITH_TEN_INPUTS = "simple_flow_with_ten_inputs" -OUTPUT_FILE_NAME = "output.jsonl" - - -def submit_batch_run( - flow_folder, - inputs_mapping, - *, - input_dirs={}, - input_file_name="samples.json", - run_id=None, - connections={}, - storage=None, - return_output_dir=False, -): - batch_engine = BatchEngine( - get_yaml_file(flow_folder), get_flow_folder(flow_folder), connections=connections, storage=storage - ) - if not input_dirs and inputs_mapping: - input_dirs = {"data": get_flow_inputs_file(flow_folder, file_name=input_file_name)} - output_dir = Path(mkdtemp()) - if return_output_dir: - return batch_engine.run(input_dirs, inputs_mapping, output_dir, run_id=run_id), output_dir - return batch_engine.run(input_dirs, inputs_mapping, output_dir, run_id=run_id) - - -def get_batch_inputs_line(flow_folder, sample_inputs_file="samples.json"): - inputs = get_flow_sample_inputs(flow_folder, sample_inputs_file=sample_inputs_file) - return len(inputs) @pytest.mark.usefixtures("dev_connections") @@ -152,19 +128,13 @@ def test_node_logs_in_executor_logs(self, folder_name): assert all(node_log in log_content for node_log in node_logs_list) def test_long_run_log(self): - executor = FlowExecutor.create(get_yaml_file("long_run"), {}) - file_path = Path(mkdtemp()) / "flow.log" - with LogContext(file_path): - flow_result = executor.exec_line({}, index=0) - node_run = flow_result.node_run_infos["long_run_node"] - assert node_run.status == Status.Completed - with open(file_path) as fin: - lines = fin.readlines() - lines = [line for line in lines if line.strip()] + # Test long running tasks with log + os.environ["PF_LONG_RUNNING_LOGGING_INTERVAL"] = "60" target_texts = [ "INFO Start executing nodes in thread pool mode.", "INFO Start to run 1 nodes with concurrency level 16.", "INFO Executing node long_run_node.", + "INFO Using value of PF_LONG_RUNNING_LOGGING_INTERVAL in environment variable", "WARNING long_run_node in line 0 has been running for 60 seconds, stacktrace of thread", "in wrapped", "output = func(*args, **kwargs)", @@ -176,6 +146,28 @@ def test_long_run_log(self): "time.sleep(61)", "INFO Node long_run_node completes.", ] + self.assert_long_run_log(target_texts) + os.environ.pop("PF_LONG_RUNNING_LOGGING_INTERVAL") + + # Test long running tasks without log + target_texts = [ + "INFO Start executing nodes in thread pool mode.", + "INFO Start to run 1 nodes with concurrency level 16.", + "INFO Executing node long_run_node.", + "INFO Node long_run_node completes.", + ] + self.assert_long_run_log(target_texts) + + def assert_long_run_log(self, target_texts): + executor = FlowExecutor.create(get_yaml_file("long_run"), {}) + file_path = Path(mkdtemp()) / "flow.log" + with LogContext(file_path): + flow_result = executor.exec_line({}, index=0) + node_run = flow_result.node_run_infos["long_run_node"] + assert node_run.status == Status.Completed + with open(file_path) as fin: + lines = fin.readlines() + lines = [line for line in lines if line.strip()] msg = f"Got {len(lines)} lines in {file_path}, expected {len(target_texts)}." assert len(lines) == len(target_texts), msg for actual, expected in zip(lines, target_texts): @@ -214,6 +206,30 @@ def test_log_progress(self, flow_folder, inputs_mapping, dev_connections): assert "line_number" in output, f"line_number is not in {i}th output {output}" assert output["line_number"] == i, f"line_number is not correct in {i}th output {output}" + def test_batch_run_flow_logs(self, dev_connections): + flow_folder = "print_input_flow" + logs_directory = Path(mkdtemp()) + bulk_run_log_path = str(logs_directory / "test_bulk_run.log") + bulk_run_flow_logs_folder = str(logs_directory / "test_bulk_run_flow_logs_folder") + Path(bulk_run_flow_logs_folder).mkdir() + with LogContext(bulk_run_log_path, run_mode=RunMode.Batch, flow_logs_folder=bulk_run_flow_logs_folder): + submit_batch_run( + flow_folder, + inputs_mapping={"text": "${data.text}"}, + connections=dev_connections, + input_file_name="inputs.jsonl", + ) + nlines = len(get_bulk_inputs_from_jsonl(flow_folder)) + for i in range(nlines): + file_name = f"{str(i).zfill(LINE_NUMBER_WIDTH)}.log" + flow_log_file = Path(bulk_run_flow_logs_folder) / file_name + assert flow_log_file.is_file() + log_content = load_content(flow_log_file) + # Assert flow log file contains expected logs + assert "execution WARNING" in log_content + assert "execution.flow INFO" in log_content + assert f"in line {i} (index starts from 0)" in log_content + def test_activate_config_log(self): logs_directory = Path(mkdtemp()) log_path = str(logs_directory / "flow.log") @@ -237,6 +253,7 @@ def test_activate_config_log(self): assert all(log in log_content for log in logs_list) def test_async_log_in_worker_thread(self): + os.environ["PF_LONG_RUNNING_LOGGING_INTERVAL"] = "60" logs_directory = Path(mkdtemp()) log_path = str(logs_directory / "flow.log") with LogContext(log_path, run_mode=RunMode.Test): @@ -246,3 +263,4 @@ def test_async_log_in_worker_thread(self): # Below log is created by worker thread logs_list = ["INFO monitor_long_running_coroutine started"] assert all(log in log_content for log in logs_list) + os.environ.pop("PF_LONG_RUNNING_LOGGING_INTERVAL") diff --git a/src/promptflow/tests/executor/e2etests/test_script_tool_generator.py b/src/promptflow/tests/executor/e2etests/test_script_tool_generator.py index 1c02e7acd92..c104211ed4a 100644 --- a/src/promptflow/tests/executor/e2etests/test_script_tool_generator.py +++ b/src/promptflow/tests/executor/e2etests/test_script_tool_generator.py @@ -12,8 +12,8 @@ @pytest.mark.e2etest class TestScriptToolGenerator: def test_generate_script_tool_meta_with_dynamic_list(self): - tool_path = (TOOL_ROOT / "tool_with_dynamic_list_input.py").as_posix() - tool_meta = generate_tool_meta_dict_by_file(tool_path, "python") + tool_path = TOOL_ROOT / "tool_with_dynamic_list_input.py" + tool_meta = generate_tool_meta_dict_by_file(tool_path.as_posix(), "python") expect_tool_meta = { "name": "tool_with_dynamic_list_input", "type": "python", @@ -24,7 +24,7 @@ def test_generate_script_tool_meta_with_dynamic_list(self): "is_multi_select": True, "allow_manual_entry": True, "dynamic_list": { - "func_path": "my_list_func", + "func_path": f"{tool_path.absolute()}:my_list_func", "func_kwargs": [ { "name": "prefix", @@ -40,7 +40,7 @@ def test_generate_script_tool_meta_with_dynamic_list(self): "endpoint_name": { "type": ["string"], "dynamic_list": { - "func_path": "list_endpoint_names", + "func_path": f"{tool_path.absolute()}:list_endpoint_names", "func_kwargs": [ { "name": "prefix", @@ -54,7 +54,7 @@ def test_generate_script_tool_meta_with_dynamic_list(self): }, }, "description": "This is my tool with dynamic list input", - "source": tool_path, + "source": tool_path.as_posix(), "function": "my_tool", } assert expect_tool_meta == tool_meta @@ -77,8 +77,8 @@ def test_generate_script_tool_meta_with_enabled_by_value(self): assert expect_tool_meta == tool_meta def test_generate_script_tool_meta_with_generated_by(self): - tool_path = (TOOL_ROOT / "tool_with_generated_by_input.py").as_posix() - tool_meta = generate_tool_meta_dict_by_file(tool_path, "python") + tool_path = TOOL_ROOT / "tool_with_generated_by_input.py" + tool_meta = generate_tool_meta_dict_by_file((tool_path).as_posix(), "python") expect_tool_meta = { "name": "tool_with_generated_by_input", "type": "python", @@ -86,7 +86,7 @@ def test_generate_script_tool_meta_with_generated_by(self): "index_json": { "type": ["string"], "generated_by": { - "func_path": "generate_index_json", + "func_path": f"{tool_path.absolute()}:generate_index_json", "func_kwargs": [ { "name": "index_type", @@ -144,20 +144,20 @@ def test_generate_script_tool_meta_with_generated_by(self): "optional": True, }, ], - "reverse_func_path": "reverse_generate_index_json", + "reverse_func_path": f"{tool_path.absolute()}:reverse_generate_index_json", }, }, "queries": {"type": ["string"]}, "top_k": {"type": ["int"]}, "index_type": { - "dynamic_list": {"func_path": "list_index_types"}, + "dynamic_list": {"func_path": f"{tool_path.absolute()}:list_index_types"}, "type": ["string"], "input_type": "uionly_hidden", }, "index": { "enabled_by": "index_type", "enabled_by_value": ["Workspace MLIndex"], - "dynamic_list": {"func_path": "list_indexes"}, + "dynamic_list": {"func_path": f"{tool_path.absolute()}:list_indexes"}, "type": ["string"], "input_type": "uionly_hidden", }, @@ -176,28 +176,28 @@ def test_generate_script_tool_meta_with_generated_by(self): "content_field": { "enabled_by": "index_type", "enabled_by_value": ["Azure Cognitive Search"], - "dynamic_list": {"func_path": "list_fields"}, + "dynamic_list": {"func_path": f"{tool_path.absolute()}:list_fields"}, "type": ["string"], "input_type": "uionly_hidden", }, "embedding_field": { "enabled_by": "index_type", "enabled_by_value": ["Azure Cognitive Search"], - "dynamic_list": {"func_path": "list_fields"}, + "dynamic_list": {"func_path": f"{tool_path.absolute()}:list_fields"}, "type": ["string"], "input_type": "uionly_hidden", }, "metadata_field": { "enabled_by": "index_type", "enabled_by_value": ["Azure Cognitive Search"], - "dynamic_list": {"func_path": "list_fields"}, + "dynamic_list": {"func_path": f"{tool_path.absolute()}:list_fields"}, "type": ["string"], "input_type": "uionly_hidden", }, "semantic_configuration": { "enabled_by": "index_type", "enabled_by_value": ["Azure Cognitive Search"], - "dynamic_list": {"func_path": "list_semantic_configuration"}, + "dynamic_list": {"func_path": f"{tool_path.absolute()}:list_semantic_configuration"}, "type": ["string"], "input_type": "uionly_hidden", }, @@ -211,7 +211,7 @@ def test_generate_script_tool_meta_with_generated_by(self): "enabled_by": "index_type", "enabled_by_value": ["Azure Cognitive Search"], "dynamic_list": { - "func_path": "list_embedding_deployment", + "func_path": f"{tool_path.absolute()}:list_embedding_deployment", "func_kwargs": [ { "name": "embedding_connection", @@ -226,7 +226,7 @@ def test_generate_script_tool_meta_with_generated_by(self): }, }, "description": "This is a tool with generated by input", - "source": tool_path, + "source": tool_path.as_posix(), "function": "my_tool", } assert expect_tool_meta == tool_meta @@ -245,12 +245,15 @@ def test_generate_script_tool_meta_with_invalid_enabled_by(self): assert 'Cannot find the input "invalid_input" for the enabled_by of student_id.' in ex.value.message def test_generate_script_tool_meta_with_invalid_dynamic_list(self): - tool_path = (TOOL_ROOT / "tool_with_invalid_dynamic_list.py").as_posix() + tool_path = TOOL_ROOT / "tool_with_invalid_dynamic_list.py" with pytest.raises(UserErrorException) as ex: - generate_tool_meta_dict_by_file(tool_path, "python") + generate_tool_meta_dict_by_file(tool_path.as_posix(), "python") assert "Cannot find invalid_tool_input in tool inputs." in ex.value.message assert "Missing required input(s) of dynamic_list function: ['prefix']" in ex.value.message - assert "Cannot find invalid_func_input in the inputs of dynamic_list func my_list_func" in ex.value.message + assert ( + f"Cannot find invalid_func_input in the inputs of dynamic_list func {tool_path.absolute()}:my_list_func" + in ex.value.message + ) def test_generate_script_tool_meta_with_invalid_schema(self): tool_path = (TOOL_ROOT / "tool_with_invalid_schema.py").as_posix() diff --git a/src/promptflow/tests/executor/e2etests/test_telemetry.py b/src/promptflow/tests/executor/e2etests/test_telemetry.py index 9e64d2a5b86..12214f5eb25 100644 --- a/src/promptflow/tests/executor/e2etests/test_telemetry.py +++ b/src/promptflow/tests/executor/e2etests/test_telemetry.py @@ -8,15 +8,16 @@ import pytest -from promptflow._core.operation_context import OperationContext -from promptflow.batch._batch_engine import OUTPUT_FILE_NAME, BatchEngine +from promptflow._constants import OUTPUT_FILE_NAME +from promptflow.batch._batch_engine import BatchEngine from promptflow.batch._result import BatchResult from promptflow.contracts.run_mode import RunMode from promptflow.executor import FlowExecutor from promptflow.executor._line_execution_process_pool import _process_wrapper from promptflow.executor._process_manager import create_spawned_fork_process_manager +from promptflow.tracing._operation_context import OperationContext -from ..process_utils import enable_mock_in_process +from ..process_utils import override_process_pool_targets from ..utils import get_flow_folder, get_flow_inputs_file, get_yaml_file, load_jsonl IS_LEGACY_OPENAI = version("openai").startswith("0.") @@ -116,7 +117,7 @@ def test_executor_openai_telemetry(self, dev_connections): assert "ms-azure-ai-promptflow-scenario" not in promptflow_headers assert promptflow_headers.get("run_mode") == RunMode.SingleNode.name - def test_executor_openai_telemetry_with_batch_run(self, dev_connections): + def test_executor_openai_telemetry_with_batch_run(self, dev_connections, recording_injection): """This test validates telemetry info header is correctly injected to OpenAI API by mocking chat api method. The mock method will return a generator that yields a namedtuple with a json string of the headers passed to the method. @@ -125,13 +126,13 @@ def test_executor_openai_telemetry_with_batch_run(self, dev_connections): operation_context = OperationContext.get_instance() operation_context.clear() + operation_context.set_default_tracing_keys({"default_dummy_key"}) # Set user-defined properties `scenario` in context operation_context.scenario = "test" operation_context.dummy_key = "dummy_value" - operation_context._tracking_keys = OperationContext._DEFAULT_TRACKING_KEYS operation_context._tracking_keys.add("dummy_key") - with enable_mock_in_process(mock_process_wrapper, mock_process_manager): + with override_process_pool_targets(mock_process_wrapper, mock_process_manager): run_id = str(uuid.uuid4()) batch_engine = BatchEngine( get_yaml_file(flow_folder), get_flow_folder(flow_folder), connections=dev_connections diff --git a/src/promptflow/tests/executor/e2etests/test_traces.py b/src/promptflow/tests/executor/e2etests/test_traces.py index 286e76b82bb..6f97c758a59 100644 --- a/src/promptflow/tests/executor/e2etests/test_traces.py +++ b/src/promptflow/tests/executor/e2etests/test_traces.py @@ -1,21 +1,39 @@ import json +import multiprocessing import sys +import threading import uuid +from pathlib import Path from types import GeneratorType +from unittest.mock import patch +import opentelemetry.trace as otel_trace import pytest +from opentelemetry.sdk.trace import TracerProvider +from opentelemetry.sdk.trace.export import SimpleSpanProcessor, SpanExporter, SpanExportResult from opentelemetry.trace.status import StatusCode -from promptflow._utils.dataclass_serializer import serialize from promptflow._utils.tool_utils import get_inputs_for_prompt_template +from promptflow.batch._result import BatchResult from promptflow.contracts.run_info import Status from promptflow.executor import FlowExecutor +from promptflow.executor._line_execution_process_pool import _process_wrapper +from promptflow.executor._process_manager import create_spawned_fork_process_manager from promptflow.executor._result import LineResult from promptflow.tracing import trace +from promptflow.tracing._utils import serialize from promptflow.tracing.contracts.trace import TraceType -from ..process_utils import execute_function_in_subprocess -from ..utils import get_flow_folder, get_flow_sample_inputs, get_yaml_file, prepare_memory_exporter, load_content +from ..process_utils import execute_function_in_subprocess, override_process_pool_targets +from ..utils import ( + MemoryRunStorage, + get_flow_folder, + get_flow_sample_inputs, + get_yaml_file, + load_content, + prepare_memory_exporter, + submit_batch_run, +) LLM_FUNCTION_NAMES = [ "openai.resources.chat.completions.Completions.create", @@ -30,14 +48,16 @@ ] LLM_TOKEN_NAMES = [ - "llm.token_count.prompt", - "llm.token_count.completion", - "llm.token_count.total", + "llm.usage.prompt_tokens", + "llm.usage.completion_tokens", + "llm.usage.total_tokens", + "llm.response.model", ] EMBEDDING_TOKEN_NAMES = [ - "embedding.token_count.prompt", - "embedding.token_count.total", + "llm.usage.prompt_tokens", + "llm.usage.total_tokens", + "llm.response.model", ] CUMULATIVE_LLM_TOKEN_NAMES = [ @@ -56,6 +76,57 @@ "AzureOpenAI.chat", ] +lock = multiprocessing.Lock() + + +class JsonSpanExporter(SpanExporter): + _lock = threading.Lock() + + def __init__(self, file_path): + self.file_path = file_path + + def export(self, spans): + try: + if self._lock: + with open(self.file_path, "a") as f: + for span in spans: + f.write(span.to_json() + "\n\n") + return SpanExportResult.SUCCESS + except Exception: + return SpanExportResult.FAILURE + + def shutdown(self): + pass + + +def mock_exporter_for_batch_tracing(): + patch_targets = { + "promptflow.executor.flow_executor.setup_exporter_from_environ": mock_setup_exporter_from_environ, + } + for target, func in patch_targets.items(): + patcher = patch(target, func) + patcher.start() + + +def mock_setup_exporter_from_environ(): + with lock: + idx = len(list(Path("./.span").glob("*.jsonl"))) + Path(f"./.span/line_span_{idx}.jsonl").touch() + tracer_provider = TracerProvider() + json_exporter = JsonSpanExporter(file_path=f"./.span/line_span_{idx}.jsonl") + tracer_provider.add_span_processor(SimpleSpanProcessor(json_exporter)) + otel_trace.set_tracer_provider(tracer_provider) + + +def mock_process_wrapper(*args, **kwargs): + mock_exporter_for_batch_tracing() + _process_wrapper(*args, **kwargs) + + +def mock_process_manager(*args, **kwargs): + mock_exporter_for_batch_tracing() + create_spawned_fork_process_manager(*args, **kwargs) + def get_chat_input(stream): return { @@ -65,7 +136,7 @@ def get_chat_input(stream): } -def get_comletion_input(stream): +def get_completion_input(stream): return {"prompt": "What is the capital of the United States of America?", "stream": stream} @@ -79,7 +150,7 @@ def sub_level_function(): return "Hello, World!" -@pytest.mark.usefixtures("dev_connections") +@pytest.mark.usefixtures("dev_connections", "recording_injection") @pytest.mark.e2etest class TestExecutorTraces: def validate_openai_apicall(self, apicall: dict): @@ -95,11 +166,11 @@ def validate_openai_apicall(self, apicall: dict): """ get_trace = False if apicall.get("name", "") in ( - "openai.api_resources.chat_completion.ChatCompletion.create", - "openai.api_resources.completion.Completion.create", - "openai.api_resources.embedding.Embedding.create", - "openai.resources.completions.Completions.create", # openai>=1.0.0 - "openai.resources.chat.completions.Completions.create", # openai>=1.0.0 + "openai_completion_legacy", + "openai_chat_legacy", + "openai_embedding_legacy", + "openai_chat", # openai>=1.0.0 + "openai_completion", # openai>=1.0.0 ): get_trace = True output = apicall.get("output") @@ -121,8 +192,8 @@ def validate_openai_apicall(self, apicall: dict): [ ("openai_chat_api_flow", get_chat_input(False)), ("openai_chat_api_flow", get_chat_input(True)), - ("openai_completion_api_flow", get_comletion_input(False)), - ("openai_completion_api_flow", get_comletion_input(True)), + ("openai_completion_api_flow", get_completion_input(False)), + ("openai_completion_api_flow", get_completion_input(True)), ("llm_tool", {"topic": "Hello", "stream": False}), ("llm_tool", {"topic": "Hello", "stream": True}), ], @@ -256,7 +327,7 @@ def test_flow_with_trace(self, flow_file, dev_connections): # Assert the "greetings" tool greetings_trace = flow_trace["children"][0] assert greetings_trace["name"] == "greetings" - assert greetings_trace["type"] == "Tool" + assert greetings_trace["type"] == "Function" assert greetings_trace["inputs"] == inputs assert greetings_trace["output"] == {"greeting": "Hello, User 1!"} assert greetings_trace["error"] is None @@ -313,7 +384,7 @@ def test_flow_with_trace(self, flow_file, dev_connections): ) -@pytest.mark.usefixtures("dev_connections") +@pytest.mark.usefixtures("dev_connections", "recording_injection") @pytest.mark.e2etest class TestOTelTracer: @pytest.mark.parametrize( @@ -350,7 +421,7 @@ def assert_otel_traces(self, dev_connections, flow_file, inputs, expected_span_l ("llm_tool", {"topic": "Hello", "stream": False}, "joke.jinja2"), # Add back this test case after changing the interface of render_template_jinja2 # ("prompt_tools", {"text": "test"}, "summarize_text_content_prompt.jinja2"), - ] + ], ) def test_otel_trace_with_prompt( self, @@ -360,7 +431,11 @@ def test_otel_trace_with_prompt( prompt_tpl_file, ): execute_function_in_subprocess( - self.assert_otel_traces_with_prompt, dev_connections, flow_file, inputs, prompt_tpl_file + self.assert_otel_traces_with_prompt, + dev_connections, + flow_file, + inputs, + prompt_tpl_file, ) def assert_otel_traces_with_prompt(self, dev_connections, flow_file, inputs, prompt_tpl_file): @@ -385,12 +460,14 @@ def assert_otel_traces_with_prompt(self, dev_connections, flow_file, inputs, pro assert var in span.attributes["prompt.variables"] @pytest.mark.parametrize( - "flow_file, inputs, expected_span_length", + "flow_file, inputs, is_stream, expected_span_length", [ - ("openai_chat_api_flow", get_chat_input(False), 3), - ("openai_completion_api_flow", get_comletion_input(False), 3), - ("llm_tool", {"topic": "Hello", "stream": False}, 4), - ("flow_with_async_llm_tasks", get_flow_sample_inputs("flow_with_async_llm_tasks"), 6), + ("openai_chat_api_flow", get_chat_input(False), False, 3), + ("openai_chat_api_flow", get_chat_input(True), True, 4), + ("openai_completion_api_flow", get_completion_input(False), False, 3), + ("openai_completion_api_flow", get_completion_input(True), True, 4), + ("llm_tool", {"topic": "Hello", "stream": False}, False, 4), + ("flow_with_async_llm_tasks", get_flow_sample_inputs("flow_with_async_llm_tasks"), False, 6), ], ) def test_otel_trace_with_llm( @@ -398,13 +475,19 @@ def test_otel_trace_with_llm( dev_connections, flow_file, inputs, + is_stream, expected_span_length, ): execute_function_in_subprocess( - self.assert_otel_traces_with_llm, dev_connections, flow_file, inputs, expected_span_length + self.assert_otel_traces_with_llm, + dev_connections, + flow_file, + inputs, + is_stream, + expected_span_length, ) - def assert_otel_traces_with_llm(self, dev_connections, flow_file, inputs, expected_span_length): + def assert_otel_traces_with_llm(self, dev_connections, flow_file, inputs, is_stream, expected_span_length): memory_exporter = prepare_memory_exporter() line_result, line_run_id = self.submit_flow_run(flow_file, inputs, dev_connections) @@ -416,10 +499,7 @@ def assert_otel_traces_with_llm(self, dev_connections, flow_file, inputs, expect # We updated the OpenAI tokens (prompt_token/completion_token/total_token) to the span attributes # for llm and embedding traces, and aggregate them to the parent span. Use this function to validate # the openai tokens are correctly set. - self.validate_openai_tokens(span_list) - for span in span_list: - if span.attributes.get("function", "") in LLM_FUNCTION_NAMES: - assert span.attributes.get("llm.model", "") in ["gpt-35-turbo", "text-ada-001"] + self.validate_openai_tokens(span_list, is_stream) @pytest.mark.parametrize( "flow_file, inputs, expected_span_length", @@ -427,7 +507,7 @@ def assert_otel_traces_with_llm(self, dev_connections, flow_file, inputs, expect ("openai_embedding_api_flow", {"input": "Hello"}, 3), # [9906] is the tokenized version of "Hello" ("openai_embedding_api_flow_with_token", {"input": [9906]}, 3), - ] + ], ) def test_otel_trace_with_embedding( self, @@ -437,7 +517,11 @@ def test_otel_trace_with_embedding( expected_span_length, ): execute_function_in_subprocess( - self.assert_otel_traces_with_embedding, dev_connections, flow_file, inputs, expected_span_length + self.assert_otel_traces_with_embedding, + dev_connections, + flow_file, + inputs, + expected_span_length, ) def assert_otel_traces_with_embedding(self, dev_connections, flow_file, inputs, expected_span_length): @@ -451,7 +535,7 @@ def assert_otel_traces_with_embedding(self, dev_connections, flow_file, inputs, self.validate_span_list(span_list, line_run_id, expected_span_length) for span in span_list: if span.attributes.get("function", "") in EMBEDDING_FUNCTION_NAMES: - assert span.attributes.get("embedding.model", "") == "ada" + assert "ada" in span.attributes.get("llm.response.model", "") embeddings = span.attributes.get("embedding.embeddings", "") assert "embedding.vector" in embeddings assert "embedding.text" in embeddings @@ -497,6 +581,82 @@ def assert_otel_traces_run_flow_then_traced_function(self): sub_level_span.parent.span_id == top_level_span.context.span_id ) # sub_level_span is a child of top_level_span + def test_flow_with_nested_tool(self): + memory_exporter = prepare_memory_exporter() + + line_result, _ = self.submit_flow_run("flow_with_nested_tool", {"input": "Hello"}, {}) + assert line_result.output == {"output": "Hello"} + + span_list = memory_exporter.get_finished_spans() + for span in span_list: + if span.attributes.get("span_type", "") != "Flow": + inputs = span.attributes.get("inputs", None) + if '"recursive_call": false' in inputs: + assert span.name == "nested_tool" + else: + assert span.name == "nested_tool_node" + + def test_otel_trace_with_batch(self, dev_connections): + flow_file = "flow_with_trace" + execute_function_in_subprocess(self.assert_otel_traces_with_batch, dev_connections, flow_file) + + def assert_otel_traces_with_batch(self, dev_connections, flow_file): + flow_folder = get_flow_folder(flow_file) + if (span_folder := flow_folder / ".span").exists(): + for file in span_folder.glob("*.jsonl"): + file.unlink() + else: + span_folder.mkdir() + + with override_process_pool_targets(process_manager=mock_process_manager, process_wrapper=mock_process_wrapper): + mem_run_storage = MemoryRunStorage() + batch_result = submit_batch_run( + flow_folder=flow_file, + inputs_mapping={"user_id": "${data.user_id}"}, + input_file_name="inputs.jsonl", + connections=dev_connections, + storage=mem_run_storage, + ) + assert isinstance(batch_result, BatchResult) + + batch_run_id = list(mem_run_storage._flow_runs.values())[0].root_run_id + assert (flow_folder / ".span").exists() + trace_ids = [] + for file in span_folder.glob("*.jsonl"): + spans = [] + with open(file, "r") as f: + json_chunks = f.read().strip().split("\n\n") + for chunk in json_chunks: + spans.append(json.loads(chunk)) + trace_ids.append(spans[0]["context"]["trace_id"]) + assert len(spans) == 5, f"Got {len(spans)} spans." + root_spans = [span for span in spans if span["parent_id"] is None] + assert len(root_spans) == 1 + root_span = root_spans[0] + for span in spans: + span["status"]["status_code"] = "OK" + span["attributes"]["batch_run_id"] = batch_run_id + span["attributes"]["framework"] = "promptflow" + if span["parent_id"] is None: + expected_span_type = "Flow" + elif span["attributes"].get("function", "") in LLM_FUNCTION_NAMES: + expected_span_type = "LLM" + elif span["attributes"].get("function", "") in EMBEDDING_FUNCTION_NAMES: + expected_span_type = "Embedding" + else: + expected_span_type = "Function" + msg = f"span_type: {span['attributes']['span_type']}, expected: {expected_span_type}" + assert span["attributes"]["span_type"] == expected_span_type, msg + if span != root_span: # Non-root spans should have a parent + assert span["attributes"]["function"] + inputs = json.loads(span["attributes"]["inputs"]) + output = json.loads(span["attributes"]["output"]) + assert isinstance(inputs, dict) + assert output is not None + + for run_info in mem_run_storage._flow_runs.values(): + assert f"0x{int(run_info.otel_trace_id, 16):032x}" in trace_ids + def submit_flow_run(self, flow_file, inputs, dev_connections): executor = FlowExecutor.create(get_yaml_file(flow_file), dev_connections) line_run_id = str(uuid.uuid4()) @@ -515,8 +675,6 @@ def validate_span_list(self, span_list, line_run_id, expected_span_length): assert span.attributes["framework"] == "promptflow" if span.parent is None: expected_span_type = TraceType.FLOW - elif span.parent.span_id == root_span.context.span_id: - expected_span_type = TraceType.TOOL elif span.attributes.get("function", "") in LLM_FUNCTION_NAMES: expected_span_type = TraceType.LLM elif span.attributes.get("function", "") in EMBEDDING_FUNCTION_NAMES: @@ -532,13 +690,13 @@ def validate_span_list(self, span_list, line_run_id, expected_span_length): assert isinstance(inputs, dict) assert output is not None - def validate_openai_tokens(self, span_list): + def validate_openai_tokens(self, span_list, is_stream): span_dict = {span.context.span_id: span for span in span_list} expected_tokens = {} for span in span_list: tokens = None # Validate the openai tokens are correctly set in the llm trace. - if span.attributes.get("function", "") in LLM_FUNCTION_NAMES: + if self._is_llm_span_with_tokens(span, is_stream): for token_name in LLM_TOKEN_NAMES + CUMULATIVE_LLM_TOKEN_NAMES: assert token_name in span.attributes tokens = {token_name: span.attributes[token_name] for token_name in CUMULATIVE_LLM_TOKEN_NAMES} @@ -567,3 +725,12 @@ def validate_openai_tokens(self, span_list): if span_id in expected_tokens: for token_name in expected_tokens[span_id]: assert span.attributes[token_name] == expected_tokens[span_id][token_name] + + def _is_llm_span_with_tokens(self, span, is_stream): + # For streaming mode, there are two spans for openai api call, one is the original span, and the other + # is the iterated span, which name is "Iterated()", we should check the iterated span + # in streaming mode. + if is_stream: + return span.attributes.get("function", "") in LLM_FUNCTION_NAMES and span.name.startswith("Iterated(") + else: + return span.attributes.get("function", "") in LLM_FUNCTION_NAMES diff --git a/src/promptflow/tests/executor/package_tools/communicate.py b/src/promptflow/tests/executor/package_tools/communicate.py new file mode 100644 index 00000000000..b5e4ac697a1 --- /dev/null +++ b/src/promptflow/tests/executor/package_tools/communicate.py @@ -0,0 +1,15 @@ +from promptflow import ToolProvider, tool +from promptflow.core._connection import AzureOpenAIConnection + + +class Communication(ToolProvider): + def __init__(self, connection: AzureOpenAIConnection): + super().__init__() + self.connection = connection + + @tool + def say_hello(self, connection_2: AzureOpenAIConnection): + """say hello to the world or someone else""" + assert isinstance(self.connection, AzureOpenAIConnection) + assert isinstance(connection_2, AzureOpenAIConnection) + return "Hello World!" diff --git a/src/promptflow/tests/executor/process_utils.py b/src/promptflow/tests/executor/process_utils.py index 6710c1cab66..a7024568bd4 100644 --- a/src/promptflow/tests/executor/process_utils.py +++ b/src/promptflow/tests/executor/process_utils.py @@ -1,4 +1,5 @@ import contextlib +import contextvars import multiprocessing import traceback from multiprocessing import Queue, get_context @@ -6,6 +7,8 @@ from promptflow.executor._line_execution_process_pool import _process_wrapper from promptflow.executor._process_manager import create_spawned_fork_process_manager +from .record_utils import setup_recording + def _run_in_subprocess(error_queue: Queue, func, args, kwargs): try: @@ -14,6 +17,15 @@ def _run_in_subprocess(error_queue: Queue, func, args, kwargs): error_queue.put((repr(e), traceback.format_exc())) +def _run_in_subprocess_with_recording(*args, **kwargs): + process_class_dict = {"spawn": MockSpawnProcess, "forkserver": MockForkServerProcess} + override_process_class(process_class_dict) + + # recording injection again since this method is running in a new process + setup_recording() + _run_in_subprocess(*args, **kwargs) + + def execute_function_in_subprocess(func, *args, **kwargs): """ Execute a function in a new process and return any exception that occurs. @@ -21,7 +33,7 @@ def execute_function_in_subprocess(func, *args, **kwargs): """ ctx = get_context("spawn") error_queue = ctx.Queue() - process = ctx.Process(target=_run_in_subprocess, args=(error_queue, func, args, kwargs)) + process = ctx.Process(target=_run_in_subprocess_with_recording, args=(error_queue, func, args, kwargs)) process.start() process.join() # Wait for the process to finish @@ -41,8 +53,11 @@ def execute_function_in_subprocess(func, *args, **kwargs): ForkServerProcess = multiprocessing.get_context("forkserver").Process -current_process_wrapper = _process_wrapper -current_process_manager = create_spawned_fork_process_manager +# Define context variables with default values +current_process_wrapper_var = contextvars.ContextVar("current_process_wrapper", default=_process_wrapper) +current_process_manager_var = contextvars.ContextVar( + "current_process_manager", default=create_spawned_fork_process_manager +) class BaseMockProcess: @@ -51,9 +66,9 @@ def modify_target(self, target): # Method to modify the target of the mock process # This shall be the place to hold the target mocking logic if target == _process_wrapper: - return current_process_wrapper + return current_process_wrapper_var.get() if target == create_spawned_fork_process_manager: - return current_process_manager + return current_process_manager_var.get() return target @@ -69,28 +84,34 @@ def __init__(self, group=None, target=None, *args, **kwargs): super().__init__(group, modified_target, *args, **kwargs) -@contextlib.contextmanager -def enable_mock_in_process(process_wrapper=None, process_manager=None): - global current_process_wrapper, current_process_manager - - if process_wrapper is not None: - current_process_wrapper = process_wrapper - if process_manager is not None: - current_process_manager = process_manager - - start_methods_mocks = {"spawn": MockSpawnProcess, "forkserver": MockForkServerProcess} +def override_process_class(process_class_dict: dict): original_process_class = {} - for start_method, MockProcessClass in start_methods_mocks.items(): + for start_method, MockProcessClass in process_class_dict.items(): if start_method in multiprocessing.get_all_start_methods(): original_process_class[start_method] = multiprocessing.get_context(start_method).Process multiprocessing.get_context(start_method).Process = MockProcessClass if start_method == multiprocessing.get_start_method(): multiprocessing.Process = MockProcessClass + return original_process_class + + +@contextlib.contextmanager +def override_process_pool_targets(process_wrapper=None, process_manager=None): + """ + Context manager to override the process pool targets for the current context + + """ + original_process_wrapper = current_process_wrapper_var.get() + original_process_manager = current_process_manager_var.get() + + if process_wrapper is not None: + current_process_wrapper_var.set(process_wrapper) + if process_manager is not None: + current_process_manager_var.set(process_manager) + try: yield finally: - for start_method, MockProcessClass in start_methods_mocks.items(): - if start_method in multiprocessing.get_all_start_methods(): - multiprocessing.get_context(start_method).Process = original_process_class[start_method] - if start_method == multiprocessing.get_start_method(): - multiprocessing.Process = original_process_class[start_method] + # Revert back to the original states + current_process_wrapper_var.set(original_process_wrapper) + current_process_manager_var.set(original_process_manager) diff --git a/src/promptflow/tests/executor/record_utils.py b/src/promptflow/tests/executor/record_utils.py new file mode 100644 index 00000000000..6abfe3231cd --- /dev/null +++ b/src/promptflow/tests/executor/record_utils.py @@ -0,0 +1,73 @@ +from pathlib import Path +from unittest.mock import patch + +from promptflow.tracing._integrations._openai_injector import inject_openai_api + +try: + from promptflow.recording.record_mode import is_live, is_record, is_replay +except ImportError: + # Run test in empty mode if promptflow-recording is not installed + + def is_live(): + return False + + def is_record(): + return False + + def is_replay(): + return False + + +PROMPTFLOW_ROOT = Path(__file__) / "../../.." +RECORDINGS_TEST_CONFIGS_ROOT = Path(PROMPTFLOW_ROOT / "../promptflow-recording/recordings/local").resolve() + + +def setup_recording(): + patches = [] + + def start_patches(patch_targets): + # Functions to setup the mock for list of targets + for target, mock_func in patch_targets.items(): + patcher = patch(target, mock_func) + patches.append(patcher) + patcher.start() + + if is_replay() or is_record(): + # For replay and record mode, we setup two patches: + # 1) mocked_tool setup + # 2) openai_injector realted mock + from promptflow.recording.local import ( + RecordStorage, + inject_async_with_recording, + inject_sync_with_recording, + mock_tool, + ) + + file_path = RECORDINGS_TEST_CONFIGS_ROOT / "executor_node_cache.shelve" + RecordStorage.get_instance(file_path) + + from promptflow._core.tool import tool as original_tool + + mocked_tool = mock_tool(original_tool) + patch_targets = { + "promptflow._core.tool.tool": mocked_tool, + "promptflow._internal.tool": mocked_tool, + "promptflow.tool": mocked_tool, + "promptflow.tracing._integrations._openai_injector.inject_sync": inject_sync_with_recording, + "promptflow.tracing._integrations._openai_injector.inject_async": inject_async_with_recording, + } + start_patches(patch_targets) + inject_openai_api() + + if is_live(): + # For live mode, we setup openai_injector mock for token collection purpose + from promptflow.recording.local import inject_async_with_recording, inject_sync_with_recording + + patch_targets = { + "promptflow.tracing._integrations._openai_injector.inject_sync": inject_sync_with_recording, + "promptflow.tracing._integrations._openai_injector.inject_async": inject_async_with_recording, + } + start_patches(patch_targets) + inject_openai_api() + + return patches diff --git a/src/promptflow/tests/executor/unittests/_core/test_api_injector.py b/src/promptflow/tests/executor/unittests/_core/test_api_injector.py index 939b3eaf9cc..0001e7231e6 100644 --- a/src/promptflow/tests/executor/unittests/_core/test_api_injector.py +++ b/src/promptflow/tests/executor/unittests/_core/test_api_injector.py @@ -1,33 +1,14 @@ -import json -import logging from collections import namedtuple from importlib.metadata import version -from types import GeneratorType -from unittest.mock import MagicMock, patch +from unittest.mock import patch -import openai import pytest -from promptflow._core.operation_context import OperationContext -from promptflow._version import VERSION from promptflow.connections import AzureOpenAIConnection from promptflow.exceptions import UserErrorException from promptflow.tools.aoai import AzureOpenAI from promptflow.tools.embedding import embedding -from promptflow.tracing._openai_injector import ( - PROMPTFLOW_HEADER, - USER_AGENT_HEADER, - _generate_api_and_injector, - _openai_api_list, - get_aoai_telemetry_headers, - inject_async, - inject_openai_api, - inject_operation_headers, - inject_sync, - recover_openai_api, -) -from promptflow.tracing._tracer import Tracer -from promptflow.tracing.contracts.trace import TraceType +from promptflow.tracing._integrations._openai_injector import inject_openai_api IS_LEGACY_OPENAI = version("openai").startswith("0.") @@ -38,199 +19,6 @@ def create(self): pass -@pytest.mark.unittest -def test_inject_operation_headers_sync(): - @inject_operation_headers - def f(**kwargs): - return kwargs - - if IS_LEGACY_OPENAI: - headers = "headers" - kwargs_1 = {"headers": {"a": 1, "b": 2}} - kwargs_2 = {"headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"}} - else: - headers = "extra_headers" - kwargs_1 = {"extra_headers": {"a": 1, "b": 2}} - kwargs_2 = {"extra_headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"}} - - injected_headers = get_aoai_telemetry_headers() - assert f(a=1, b=2) == {"a": 1, "b": 2, headers: injected_headers} - - merged_headers = {**injected_headers, "a": 1, "b": 2} - assert f(**kwargs_1) == {headers: merged_headers} - - aoai_tools_headers = injected_headers.copy() - aoai_tools_headers.update({"ms-azure-ai-promptflow-called-from": "aoai-tool"}) - assert f(**kwargs_2) == {headers: aoai_tools_headers} - - -@pytest.mark.unittest -@pytest.mark.asyncio -async def test_inject_operation_headers_async(): - @inject_operation_headers - async def f(**kwargs): - return kwargs - - if IS_LEGACY_OPENAI: - headers = "headers" - kwargs_1 = {"headers": {"a": 1, "b": 2}} - kwargs_2 = {"headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"}} - else: - headers = "extra_headers" - kwargs_1 = {"extra_headers": {"a": 1, "b": 2}} - kwargs_2 = {"extra_headers": {"ms-azure-ai-promptflow-called-from": "aoai-tool"}} - - injected_headers = get_aoai_telemetry_headers() - assert await f(a=1, b=2) == {"a": 1, "b": 2, headers: injected_headers} - - merged_headers = {**injected_headers, "a": 1, "b": 2} - assert await f(**kwargs_1) == {headers: merged_headers} - - aoai_tools_headers = injected_headers.copy() - aoai_tools_headers.update({"ms-azure-ai-promptflow-called-from": "aoai-tool"}) - assert await f(**kwargs_2) == {headers: aoai_tools_headers} - - -@pytest.mark.unittest -def test_aoai_generator_proxy_sync(): - def mock_aoai(**kwargs): - # check if args has a stream parameter - if "stream" in kwargs and kwargs["stream"]: - # stream parameter is true, yield a string - def generator(): - yield "This is a yielded string" - - return generator() - else: - # stream parameter is false or not given, return a string - return "This is a returned string" - - if IS_LEGACY_OPENAI: - apis = ["openai.Completion.create", "openai.ChatCompletion.create", "openai.Embedding.create"] - else: - apis = [ - "openai.resources.Completions.create", - "openai.resources.chat.Completions.create", - "openai.resources.Embeddings.create", - ] - - with patch(apis[0], new=mock_aoai), patch(apis[1], new=mock_aoai), patch(apis[2], new=mock_aoai): - Tracer.start_tracing("mock_run_id") - inject_openai_api() - - if IS_LEGACY_OPENAI: - return_string = openai.Completion.create(stream=False) - return_generator = openai.Completion.create(stream=True) - else: - return_string = openai.resources.Completions.create(stream=False) - return_generator = openai.resources.Completions.create(stream=True) - - assert return_string == "This is a returned string" - assert isinstance(return_generator, GeneratorType) - - for _ in return_generator: - pass - - traces = Tracer.end_tracing() - assert len(traces) == 2 - for trace in traces: - assert trace["type"] == "LLM" - if trace["inputs"]["stream"]: - assert trace["output"] == ["This is a yielded string"] - else: - assert trace["output"] == "This is a returned string" - - -@pytest.mark.unittest -@pytest.mark.asyncio -async def test_aoai_generator_proxy_async(): - async def mock_aoai(**kwargs): - # check if args has a stream parameter - if "stream" in kwargs and kwargs["stream"]: - # stream parameter is true, yield a string - def generator(): - yield "This is a yielded string" - - return generator() - else: - # stream parameter is false or not given, return a string - return "This is a returned string" - - if IS_LEGACY_OPENAI: - apis = ["openai.Completion.acreate", "openai.ChatCompletion.acreate", "openai.Embedding.acreate"] - else: - apis = [ - "openai.resources.AsyncCompletions.create", - "openai.resources.chat.AsyncCompletions.create", - "openai.resources.AsyncEmbeddings.create", - ] - - with patch(apis[0], new=mock_aoai), patch(apis[1], new=mock_aoai), patch(apis[2], new=mock_aoai): - Tracer.start_tracing("mock_run_id") - inject_openai_api() - - if IS_LEGACY_OPENAI: - return_string = await openai.Completion.acreate(stream=False) - return_generator = await openai.Completion.acreate(stream=True) - else: - return_string = await openai.resources.AsyncCompletions.create(stream=False) - return_generator = await openai.resources.AsyncCompletions.create(stream=True) - - assert return_string == "This is a returned string" - assert isinstance(return_generator, GeneratorType) - - for _ in return_generator: - pass - - traces = Tracer.end_tracing() - assert len(traces) == 2 - for trace in traces: - assert trace["type"] == "LLM" - if trace["inputs"]["stream"]: - assert trace["output"] == ["This is a yielded string"] - else: - assert trace["output"] == "This is a returned string" - - -@pytest.mark.unittest -def test_aoai_call_inject(): - if IS_LEGACY_OPENAI: - headers = "headers" - apis = ["openai.Completion.create", "openai.ChatCompletion.create", "openai.Embedding.create"] - else: - headers = "extra_headers" - apis = [ - "openai.resources.Completions.create", - "openai.resources.chat.Completions.create", - "openai.resources.Embeddings.create", - ] - - def mock_aoai(**kwargs): - return kwargs.get(headers) - - with patch(apis[0], new=mock_aoai), patch(apis[1], new=mock_aoai), patch(apis[2], new=mock_aoai): - inject_openai_api() - injected_headers = get_aoai_telemetry_headers() - - if IS_LEGACY_OPENAI: - return_headers_1 = openai.Completion.create(headers=None) - return_headers_2 = openai.ChatCompletion.create(headers="abc") - return_headers_3 = openai.Embedding.create(headers=1) - else: - return_headers_1 = openai.resources.Completions.create(extra_headers=None) - return_headers_2 = openai.resources.chat.Completions.create(extra_headers="abc") - return_headers_3 = openai.resources.Embeddings.create(extra_headers=1) - - assert return_headers_1 is not None - assert injected_headers.items() <= return_headers_1.items() - - assert return_headers_2 is not None - assert injected_headers.items() <= return_headers_2.items() - - assert return_headers_3 is not None - assert injected_headers.items() <= return_headers_3.items() - - @pytest.mark.unittest def test_aoai_tool_header(): def mock_complete(*args, **kwargs): @@ -304,230 +92,3 @@ def mock_chat(*args, **kwargs): AzureOpenAI(AzureOpenAIConnection(api_key="test", api_base="test")).chat( prompt="user:", deployment_name="test" ) - - -# The new generator-based test function -@pytest.mark.parametrize( - "is_legacy, expected_apis_with_injectors", - [ - ( - True, - [ - ( - ( - ("openai", "Completion", "create", TraceType.LLM), - ("openai", "ChatCompletion", "create", TraceType.LLM), - ("openai", "Embedding", "create", TraceType.EMBEDDING), - ), - inject_sync, - ), - ( - ( - ("openai", "Completion", "acreate", TraceType.LLM), - ("openai", "ChatCompletion", "acreate", TraceType.LLM), - ("openai", "Embedding", "acreate", TraceType.EMBEDDING), - ), - inject_async, - ), - ], - ), - ( - False, - [ - ( - ( - ("openai.resources.chat", "Completions", "create", TraceType.LLM), - ("openai.resources", "Completions", "create", TraceType.LLM), - ("openai.resources", "Embeddings", "create", TraceType.EMBEDDING), - ), - inject_sync, - ), - ( - ( - ("openai.resources.chat", "AsyncCompletions", "create", TraceType.LLM), - ("openai.resources", "AsyncCompletions", "create", TraceType.LLM), - ("openai.resources", "AsyncEmbeddings", "create", TraceType.EMBEDDING), - ), - inject_async, - ), - ], - ), - ], -) -def test_api_list(is_legacy, expected_apis_with_injectors): - with patch("promptflow.tracing._openai_injector.IS_LEGACY_OPENAI", is_legacy): - # Using list comprehension to get all items from the generator - actual_apis_with_injectors = list(_openai_api_list()) - # Assert that the actual list matches the expected list - assert actual_apis_with_injectors == expected_apis_with_injectors - - -@pytest.mark.parametrize( - "apis_with_injectors, expected_output, expected_logs", - [ - ( - [((("MockModule", "MockAPI", "create", TraceType.LLM),), inject_sync)], - [(MockAPI, "create", TraceType.LLM, inject_sync)], - [], - ), - ( - [((("MockModule", "MockAPI", "create", TraceType.LLM),), inject_async)], - [(MockAPI, "create", TraceType.LLM, inject_async)], - [], - ), - ], -) -def test_generate_api_and_injector(apis_with_injectors, expected_output, expected_logs, caplog): - with patch("importlib.import_module", return_value=MagicMock(MockAPI=MockAPI)) as mock_import_module: - # Capture the logs - with caplog.at_level(logging.WARNING): - # Run the generator and collect the output - result = list(_generate_api_and_injector(apis_with_injectors)) - - # Check if the result matches the expected output - assert result == expected_output - - # Check if the logs match the expected logs - assert len(caplog.records) == len(expected_logs) - for record, expected_message in zip(caplog.records, expected_logs): - assert expected_message in record.message - - mock_import_module.assert_called_with("MockModule") - - -def test_generate_api_and_injector_attribute_error_logging(caplog): - apis = [ - ((("NonExistentModule", "NonExistentAPI", "create", TraceType.LLM),), MagicMock()), - ((("MockModuleMissingMethod", "MockAPIMissingMethod", "missing_method", "missing_trace_type"),), MagicMock()), - ] - - # Set up the side effect for the mock - def import_module_effect(name): - if name == "MockModuleMissingMethod": - module = MagicMock() - delattr(module, "MockAPIMissingMethod") # Use delattr to remove the attribute - return module - else: - raise ModuleNotFoundError(f"No module named '{name}'") - - with patch("importlib.import_module") as mock_import_module: - mock_import_module.side_effect = import_module_effect - with caplog.at_level(logging.WARNING): - list(_generate_api_and_injector(apis)) - - assert len(caplog.records) == 2 - assert "An unexpected error occurred" in caplog.records[0].message - assert "NonExistentModule" in caplog.records[0].message - assert "does not have the class" in caplog.records[1].message - assert "MockAPIMissingMethod" in caplog.records[1].message - - # Verify that `importlib.import_module` was called with correct module names - mock_import_module.assert_any_call("NonExistentModule") - mock_import_module.assert_any_call("MockModuleMissingMethod") - - -@pytest.mark.unittest -def test_get_aoai_telemetry_headers(): - # create a mock operation context - mock_operation_context = OperationContext.get_instance() - mock_operation_context.user_agent = "test-user-agent" - mock_operation_context.update( - { - "flow_id": "test-flow-id", - "root_run_id": "test-root-run-id", - } - ) - - # patch the OperationContext.get_instance method to return the mock operation context - with patch("promptflow._core.operation_context.OperationContext.get_instance") as mock_get_instance: - mock_get_instance.return_value = mock_operation_context - - # call the function under test and get the headers - headers = get_aoai_telemetry_headers() - - assert USER_AGENT_HEADER in headers - assert PROMPTFLOW_HEADER in headers - - for key in headers.keys(): - assert "_" not in key - - # assert that the headers are correct - assert headers[USER_AGENT_HEADER] == f"test-user-agent promptflow/{VERSION}" - promptflow_headers = json.loads(headers[PROMPTFLOW_HEADER]) - assert promptflow_headers["flow_id"] == "test-flow-id" - assert promptflow_headers["root_run_id"] == "test-root-run-id" - - context = OperationContext.get_instance() - context.dummy_key = "dummy_value" - headers = get_aoai_telemetry_headers() - promptflow_headers = json.loads(headers[PROMPTFLOW_HEADER]) - assert "dummy_key" not in promptflow_headers # not default telemetry - - context._tracking_keys.add("dummy_key") - headers = get_aoai_telemetry_headers() - promptflow_headers = json.loads(headers[PROMPTFLOW_HEADER]) - assert promptflow_headers["dummy_key"] == "dummy_value" # telemetry key inserted - - -@pytest.mark.unittest -def test_inject_and_recover_openai_api(): - class FakeAPIWithoutOriginal: - @staticmethod - def create(): - pass - - class FakeAPIWithOriginal: - @staticmethod - def create(): - pass - - def dummy_api(): - pass - - # Real injector function that adds an _original attribute - def injector(f, trace_type): - def wrapper_fun(*args, **kwargs): - return f(*args, **kwargs) - - wrapper_fun._original = f - return wrapper_fun - - # Set an _original attribute for the create method of FakeAPIWithOriginal - FakeAPIWithOriginal.create._original = dummy_api - - # Store the original create methods before injection - original_api_without_original = FakeAPIWithoutOriginal.create - original_api_with_original = FakeAPIWithOriginal.create - - # Mock the generator function to yield our mocked api and method - with patch( - "promptflow.tracing._openai_injector.available_openai_apis_and_injectors", - return_value=[ - (FakeAPIWithoutOriginal, "create", TraceType.LLM, injector), - (FakeAPIWithOriginal, "create", TraceType.LLM, injector), - ], - ): - # Call the function to inject the APIs - inject_openai_api() - - # Check that the _original attribute was set for the method that didn't have it - assert hasattr(FakeAPIWithoutOriginal.create, "_original") - # Ensure the _original attribute points to the correct original method - assert FakeAPIWithoutOriginal.create._original is original_api_without_original - - # Check that the injector was not applied again to the method that already had an _original attribute - # The _original attribute should still point to the mock, not the original method - assert getattr(FakeAPIWithOriginal.create, "_original") is not FakeAPIWithOriginal.create - # The original method should remain unchanged - assert FakeAPIWithOriginal.create is original_api_with_original - - # Call the function to recover the APIs - recover_openai_api() - - # Check that the _original attribute was removed for the method that didn't have it - assert not hasattr(FakeAPIWithoutOriginal.create, "_original") - assert not hasattr(FakeAPIWithOriginal.create, "_original") - - # The original methods should be restored - assert FakeAPIWithoutOriginal.create is original_api_without_original - assert FakeAPIWithOriginal.create is dummy_api diff --git a/src/promptflow/tests/executor/unittests/_core/test_operation_context.py b/src/promptflow/tests/executor/unittests/_core/test_operation_context.py deleted file mode 100644 index 97741a60e40..00000000000 --- a/src/promptflow/tests/executor/unittests/_core/test_operation_context.py +++ /dev/null @@ -1,149 +0,0 @@ -import threading - -import pytest - -from promptflow._core.operation_context import OperationContext -from promptflow._version import VERSION -from promptflow.contracts.run_mode import RunMode - - -def set_run_mode(context: OperationContext, run_mode: RunMode): - """This method simulates the runtime.execute_request() - - It is aimed to set the run_mode into operation context. - """ - context.run_mode = run_mode.name if run_mode is not None else "" - - -@pytest.mark.unittest -class TestOperationContext: - def test_get_user_agent(self): - operation_context = OperationContext() - assert operation_context.get_user_agent() == f"promptflow/{VERSION}" - - operation_context.user_agent = "test_agent/0.0.2" - assert operation_context.get_user_agent() == f"test_agent/0.0.2 promptflow/{VERSION}" - - @pytest.mark.parametrize( - "run_mode, expected", - [ - (RunMode.Test, "Test"), - (RunMode.SingleNode, "SingleNode"), - (RunMode.Batch, "Batch"), - ], - ) - def test_run_mode(self, run_mode, expected): - context = OperationContext() - set_run_mode(context, run_mode) - assert context.run_mode == expected - - def test_context_dict(self): - context = OperationContext() - - context.run_mode = "Flow" - context.user_agent = "test_agent/0.0.2" - context.none_value = None - - context_dict = context.get_context_dict() - - assert context_dict["run_mode"] == "Flow" - assert context_dict["user_agent"] == "test_agent/0.0.2" - assert context_dict["none_value"] is None - - def test_setattr(self): - context = OperationContext() - - context.run_mode = "Flow" - assert context["run_mode"] == "Flow" - - def test_setattr_non_primitive(self): - # Test set non-primitive type - context = OperationContext() - context.foo = [1, 2, 3] - - assert [1, 2, 3] == context.foo - - def test_getattr(self): - context = OperationContext() - - context["run_mode"] = "Flow" - assert context.run_mode == "Flow" - - def test_getattr_missing(self): - context = OperationContext() - - with pytest.raises(AttributeError): - context.foo - - def test_delattr(self): - # test that delattr works as expected - context = OperationContext() - context.foo = "bar" - del context.foo - assert "foo" not in context - - # test that delattr raises AttributeError for non-existent name - with pytest.raises(AttributeError): - del context.baz - - def test_append_user_agent(self): - context = OperationContext() - user_agent = " " + context.user_agent if "user_agent" in context else "" - - context.append_user_agent("test_agent/0.0.2") - assert context.user_agent == "test_agent/0.0.2" + user_agent - - context.append_user_agent("test_agent/0.0.3") - assert context.user_agent == "test_agent/0.0.2 test_agent/0.0.3" + user_agent - - def test_get_instance(self): - context1 = OperationContext.get_instance() - context2 = OperationContext.get_instance() - assert context1 is context2 - - def test_set_batch_input_source_from_inputs_mapping_run(self): - input_mapping = {"input1": "${run.outputs.output1}", "input2": "${run.outputs.output2}"} - context = OperationContext() - context.set_batch_input_source_from_inputs_mapping(input_mapping) - assert context.batch_input_source == "Run" - - def test_set_batch_input_source_from_inputs_mapping_data(self): - input_mapping = {"url": "${data.url}"} - context = OperationContext() - context.set_batch_input_source_from_inputs_mapping(input_mapping) - assert context.batch_input_source == "Data" - - def test_set_batch_input_source_from_inputs_mapping_none(self): - input_mapping = None - context = OperationContext() - assert not hasattr(context, "batch_input_source") - context.set_batch_input_source_from_inputs_mapping(input_mapping) - assert context.batch_input_source == "Data" - - def test_set_batch_input_source_from_inputs_mapping_empty(self): - input_mapping = {} - context = OperationContext() - assert not hasattr(context, "batch_input_source") - context.set_batch_input_source_from_inputs_mapping(input_mapping) - assert context.batch_input_source == "Data" - - def test_different_thread_have_different_instance(self): - # create a list to store the OperationContext instances from each thread - instances = [] - - # define a function that gets the OperationContext instance and appends it to the list - def get_instance(): - instance = OperationContext.get_instance() - instances.append(instance) - - # create two threads and run the function in each thread - thread1 = threading.Thread(target=get_instance) - thread2 = threading.Thread(target=get_instance) - thread1.start() - thread2.start() - thread1.join() - thread2.join() - - # assert that the list has two elements and they are different objects - assert len(instances) == 2 - assert instances[0] is not instances[1] diff --git a/src/promptflow/tests/executor/unittests/_core/test_run_tracker.py b/src/promptflow/tests/executor/unittests/_core/test_run_tracker.py index 06a106d4a9c..694c22e2c64 100644 --- a/src/promptflow/tests/executor/unittests/_core/test_run_tracker.py +++ b/src/promptflow/tests/executor/unittests/_core/test_run_tracker.py @@ -1,10 +1,10 @@ import pytest from promptflow._core._errors import RunRecordNotFound -from promptflow._core.generator_proxy import GeneratorProxy from promptflow._core.run_tracker import RunTracker from promptflow.connections import AzureOpenAIConnection from promptflow.contracts.run_info import Status +from promptflow.tracing.contracts.generator_proxy import GeneratorProxy class UnserializableClass: diff --git a/src/promptflow/tests/executor/unittests/_core/test_tool.py b/src/promptflow/tests/executor/unittests/_core/test_tool.py index d0f06a0f0ae..a64bb7bf26d 100644 --- a/src/promptflow/tests/executor/unittests/_core/test_tool.py +++ b/src/promptflow/tests/executor/unittests/_core/test_tool.py @@ -67,7 +67,7 @@ async def test_traces_are_created_correctly(self, func): assert len(traces) == 1 trace = traces[0] assert trace["name"] == func.__qualname__ - assert trace["type"] == TraceType.TOOL + assert trace["type"] == TraceType.FUNCTION assert trace["inputs"] == {"a": 1} assert trace["output"] == 1 assert trace["error"] is None diff --git a/src/promptflow/tests/executor/unittests/_core/test_tools_manager.py b/src/promptflow/tests/executor/unittests/_core/test_tools_manager.py index 9a1cfcd06ba..83b41a26f72 100644 --- a/src/promptflow/tests/executor/unittests/_core/test_tools_manager.py +++ b/src/promptflow/tests/executor/unittests/_core/test_tools_manager.py @@ -166,6 +166,7 @@ def sample_tool(input: str): @pytest.mark.unittest +@pytest.mark.usefixtures("recording_injection") class TestToolsManager: def test_collect_package_tools_if_node_source_tool_is_legacy(self): legacy_node_source_tools = ["content_safety_text.tools.content_safety_text_tool.analyze_text"] @@ -282,27 +283,22 @@ def test_gen_dynamic_list(self, mocked_ws_triple, mock_module_with_list_func): assert len(result) == 2 def test_retrieve_tool_func_result_dynamic_list_scenario( - self, - mocked_ws_triple, - mock_module_with_for_retrieve_tool_func_result + self, mocked_ws_triple, mock_module_with_for_retrieve_tool_func_result ): from promptflow._sdk._utils import _retrieve_tool_func_result func_path = "my_tool_package.tools.tool_with_dynamic_list_input.my_list_func" func_kwargs = {"prefix": "My"} result = _retrieve_tool_func_result( - ToolFuncCallScenario.DYNAMIC_LIST, - {"func_path": func_path, "func_kwargs": func_kwargs} + ToolFuncCallScenario.DYNAMIC_LIST, {"func_path": func_path, "func_kwargs": func_kwargs} ) assert len(result) == 2 # test retrieve tool func result with ws_triple. - with patch( - "promptflow._cli._utils.get_workspace_triad_from_local", - return_value=mocked_ws_triple - ): - result = _retrieve_tool_func_result(ToolFuncCallScenario.DYNAMIC_LIST, { - "func_path": func_path, "func_kwargs": func_kwargs}) + with patch("promptflow._cli._utils.get_workspace_triad_from_local", return_value=mocked_ws_triple): + result = _retrieve_tool_func_result( + ToolFuncCallScenario.DYNAMIC_LIST, {"func_path": func_path, "func_kwargs": func_kwargs} + ) @pytest.mark.parametrize( "func_call_scenario, func_path, func_kwargs, expected", @@ -311,26 +307,21 @@ def test_retrieve_tool_func_result_dynamic_list_scenario( ToolFuncCallScenario.DYNAMIC_LIST, "my_tool_package.tools.tool_with_dynamic_list_input.my_list_func", {"prefix": "My"}, - list + list, ), ( ToolFuncCallScenario.GENERATED_BY, "my_tool_package.tools.tool_with_generated_by_input.generated_by_func", {"index_type": "Azure Cognitive Search"}, - str + str, ), ( ToolFuncCallScenario.REVERSE_GENERATED_BY, "my_tool_package.tools.tool_with_generated_by_input.reverse_generated_by_func", - { - "index_json": json.dumps({ - "index_type": "Azure Cognitive Search", - "index": "index_1" - }) - }, - dict - ) - ] + {"index_json": json.dumps({"index_type": "Azure Cognitive Search", "index": "index_1"})}, + dict, + ), + ], ) def test_retrieve_tool_func_result( self, @@ -339,7 +330,7 @@ def test_retrieve_tool_func_result( func_kwargs, expected, mocked_ws_triple, - mock_module_with_for_retrieve_tool_func_result + mock_module_with_for_retrieve_tool_func_result, ): from promptflow._sdk._utils import _retrieve_tool_func_result @@ -349,7 +340,8 @@ def test_retrieve_tool_func_result( # test retrieve tool func result with ws_triple. with patch("promptflow._cli._utils.get_workspace_triad_from_local", return_value=mocked_ws_triple): result = _retrieve_tool_func_result( - func_call_scenario, {"func_path": func_path, "func_kwargs": func_kwargs}) + func_call_scenario, {"func_path": func_path, "func_kwargs": func_kwargs} + ) assert isinstance(result["result"], expected) @pytest.mark.parametrize( @@ -358,22 +350,17 @@ def test_retrieve_tool_func_result( ( "dummy_senario", "my_tool_package.tools.tool_with_generated_by_input.reverse_generated_by_func", - { - "index_json": json.dumps({ - "index_type": "Azure Cognitive Search", - "index": "index_1" - }) - }, + {"index_json": json.dumps({"index_type": "Azure Cognitive Search", "index": "index_1"})}, f"Invalid tool func call scenario: dummy_senario. " - f"Available scenarios are {list(ToolFuncCallScenario)}" + f"Available scenarios are {list(ToolFuncCallScenario)}", ), ( ToolFuncCallScenario.REVERSE_GENERATED_BY, "my_tool_package.tools.tool_with_generated_by_input.generated_by_func", {"index_type": "Azure Cognitive Search"}, - "ToolFuncCallScenario reverse_generated_by response must be a dict." - ) - ] + "ToolFuncCallScenario reverse_generated_by response must be a dict.", + ), + ], ) def test_retrieve_tool_func_result_error( self, @@ -382,12 +369,32 @@ def test_retrieve_tool_func_result_error( func_kwargs, expected, mocked_ws_triple, - mock_module_with_for_retrieve_tool_func_result + mock_module_with_for_retrieve_tool_func_result, ): from promptflow._sdk._utils import _retrieve_tool_func_result + with pytest.raises(Exception) as e: _retrieve_tool_func_result(func_call_scenario, {"func_path": func_path, "func_kwargs": func_kwargs}) - assert (expected in str(e.value)) + assert expected in str(e.value) + + def test_register_apis(self): + from typing import Union + from promptflow._core.tools_manager import register_apis, connection_type_to_api_mapping + from promptflow._core.tool import ToolProvider + from promptflow.connections import AzureOpenAIConnection, OpenAIConnection, ServerlessConnection + + class MockAI1(ToolProvider): + def __init__(self, input: str, connection: Union[OpenAIConnection, ServerlessConnection]): + super().__init__() + + class MockAI2(ToolProvider): + def __init__(self, connection: AzureOpenAIConnection): + super().__init__() + + register_apis(MockAI1) + register_apis(MockAI2) + + assert len(connection_type_to_api_mapping) == 3 @pytest.mark.unittest diff --git a/src/promptflow/tests/executor/unittests/_core/test_tracer.py b/src/promptflow/tests/executor/unittests/_core/test_tracer.py index 4be6e1ce87e..3e877d27842 100644 --- a/src/promptflow/tests/executor/unittests/_core/test_tracer.py +++ b/src/promptflow/tests/executor/unittests/_core/test_tracer.py @@ -3,11 +3,11 @@ import pytest from opentelemetry.trace.status import StatusCode -from promptflow._core.generator_proxy import GeneratorProxy from promptflow.connections import AzureOpenAIConnection from promptflow.tracing import trace from promptflow.tracing._trace import _traced from promptflow.tracing._tracer import Tracer, _create_trace_from_function_call +from promptflow.tracing.contracts.generator_proxy import GeneratorProxy from promptflow.tracing.contracts.trace import Trace, TraceType from ...utils import prepare_memory_exporter @@ -64,8 +64,8 @@ def test_push_pop(self, caplog): Tracer.start_tracing("test_run_id") tracer = Tracer.active_instance() - trace1 = Trace("test1", inputs=[1, 2, 3], type=TraceType.TOOL) - trace2 = Trace("test2", inputs=[4, 5, 6], type=TraceType.TOOL) + trace1 = Trace("test1", inputs=[1, 2, 3], type=TraceType.FUNCTION) + trace2 = Trace("test2", inputs=[4, 5, 6], type=TraceType.FUNCTION) Tracer.push(trace1) assert tracer._traces == [trace1] @@ -172,8 +172,8 @@ def test_trace_name_should_contain_class_name_for_class_methods(self): assert trace.name == "MyClass.my_method" def test_trace_type_can_be_set_correctly(self): - trace = _create_trace_from_function_call(func_with_no_parameters, trace_type=TraceType.TOOL) - assert trace.type == TraceType.TOOL + trace = _create_trace_from_function_call(func_with_no_parameters, trace_type=TraceType.FUNCTION) + assert trace.type == TraceType.FUNCTION def test_args_and_kwargs_are_filled_correctly(self): trace = _create_trace_from_function_call( @@ -323,7 +323,7 @@ async def test_trace_is_generated_when_errors_occurred(self, func): @pytest.mark.parametrize("func", [sync_func, async_func]) async def test_trace_type_can_be_set_correctly(self, func): Tracer.start_tracing("test_run_id") - traced_func = _traced(func, trace_type=TraceType.TOOL) + traced_func = _traced(func, trace_type=TraceType.FUNCTION) if inspect.iscoroutinefunction(traced_func): result = await traced_func(1) @@ -336,7 +336,7 @@ async def test_trace_type_can_be_set_correctly(self, func): assert len(traces) == 1 trace = traces[0] assert trace["name"] == func.__qualname__ - assert trace["type"] == TraceType.TOOL + assert trace["type"] == TraceType.FUNCTION @trace diff --git a/src/promptflow/tests/executor/unittests/_utils/test_connection_utils.py b/src/promptflow/tests/executor/unittests/_utils/test_connection_utils.py index b298c3c27cf..2155e0e9a8c 100644 --- a/src/promptflow/tests/executor/unittests/_utils/test_connection_utils.py +++ b/src/promptflow/tests/executor/unittests/_utils/test_connection_utils.py @@ -108,7 +108,7 @@ def test_generate_custom_strong_type_connection_template_with_default_value(self ], ) def test_get_used_connection_names_from_flow_meta(self, input_value: str, expected_connection_names: list): - from promptflow._sdk._submitter.utils import SubmitterHelper + from promptflow._sdk._orchestrator.utils import SubmitterHelper connection_names = SubmitterHelper.get_used_connection_names( { diff --git a/src/promptflow/tests/executor/unittests/_utils/test_dataclass_serializer.py b/src/promptflow/tests/executor/unittests/_utils/test_dataclass_serializer.py index 6e717cd1158..e97a756acfb 100644 --- a/src/promptflow/tests/executor/unittests/_utils/test_dataclass_serializer.py +++ b/src/promptflow/tests/executor/unittests/_utils/test_dataclass_serializer.py @@ -1,11 +1,13 @@ -import pytest -from datetime import datetime +import sys from dataclasses import dataclass +from datetime import datetime from typing import Dict, List -from promptflow._core.generator_proxy import GeneratorProxy + +import pytest +from unittest.mock import patch, Mock + from promptflow._utils.dataclass_serializer import ( get_type, - serialize, deserialize_dataclass, deserialize_value, assertEqual, @@ -13,8 +15,8 @@ from promptflow.contracts.run_info import RunInfo, Status from promptflow._core.connection_manager import ConnectionManager from promptflow.storage.run_records import NodeRunRecord -from unittest.mock import patch, Mock -import sys +from promptflow.tracing._utils import serialize +from promptflow.tracing.contracts.generator_proxy import GeneratorProxy def get_connection_dict(): diff --git a/src/promptflow/tests/executor/unittests/_utils/test_exception_utils.py b/src/promptflow/tests/executor/unittests/_utils/test_exception_utils.py index 612add30833..6caefc0a5b2 100644 --- a/src/promptflow/tests/executor/unittests/_utils/test_exception_utils.py +++ b/src/promptflow/tests/executor/unittests/_utils/test_exception_utils.py @@ -5,7 +5,6 @@ import pytest from promptflow._core._errors import ToolExecutionError -from promptflow._core.operation_context import OperationContext from promptflow._utils.exception_utils import ( ErrorResponse, ExceptionPresenter, @@ -15,6 +14,7 @@ last_frame_info, remove_suffix, ) +from promptflow._version import VERSION from promptflow.exceptions import ( ErrorTarget, PromptflowException, @@ -22,6 +22,7 @@ UserErrorException, ValidationException, ) +from promptflow.tracing._operation_context import OperationContext def set_inner_exception_by_parameter(): @@ -331,6 +332,8 @@ def test_error_codes(self, raise_exception_func, error_class, expected_error_cod @pytest.mark.unittest class TestErrorResponse: def test_from_error_dict(self): + OperationContext.get_instance().append_user_agent(f"promptflow/{VERSION}") + error_dict = { "code": "UserError", "message": "Flow run failed.", @@ -367,6 +370,8 @@ def test_to_simplied_dict(self): } def test_from_exception(self): + OperationContext.get_instance().append_user_agent(f"promptflow/{VERSION}") + with pytest.raises(CustomizedException) as e: raise_general_exception() diff --git a/src/promptflow/tests/executor/unittests/_utils/test_generate_tool_meta_utils.py b/src/promptflow/tests/executor/unittests/_utils/test_generate_tool_meta_utils.py index f882ca570a6..7f7b2546ee9 100644 --- a/src/promptflow/tests/executor/unittests/_utils/test_generate_tool_meta_utils.py +++ b/src/promptflow/tests/executor/unittests/_utils/test_generate_tool_meta_utils.py @@ -39,7 +39,8 @@ def cd_and_run(working_dir, source_path, tool_type): def cd_and_run_generate_flow_meta(working_dir, entry, source=None, path=None): with _change_working_dir(working_dir), inject_sys_path(working_dir): try: - return generate_flow_meta_dict_by_file(entry, source, path) + data = {"entry": entry} + return generate_flow_meta_dict_by_file(data, source, path) except Exception as e: return f"({e.__class__.__name__}) {e}" @@ -103,7 +104,7 @@ def test_generate_tool_meta_dict_by_file(self, flow_dir, tool_path, tool_type): ("dummy_flow_with_trace", "flow_with_trace:my_flow", "flow_with_trace.py"), ("dummy_flow_with_trace", "flow_with_trace:my_flow", None), ("flow_with_dataclass_output", "flow_with_dataclass:my_flow", "flow_with_dataclass.py"), - ] + ], ) def test_generate_flow_meta(self, flow_dir, entry, path): wd = str((EAGER_FLOW_ROOT / flow_dir).resolve()) diff --git a/src/promptflow/tests/executor/unittests/_utils/test_multimedia_utils.py b/src/promptflow/tests/executor/unittests/_utils/test_multimedia_utils.py index cf88f2ea35c..ce97789726d 100644 --- a/src/promptflow/tests/executor/unittests/_utils/test_multimedia_utils.py +++ b/src/promptflow/tests/executor/unittests/_utils/test_multimedia_utils.py @@ -4,35 +4,76 @@ import pytest -from promptflow._utils._errors import InvalidImageInput, LoadMultimediaDataError +from promptflow._utils._errors import InvalidImageInput, InvalidMessageFormatType, LoadMultimediaDataError from promptflow._utils.multimedia_utils import ( - _create_image_from_base64, - _create_image_from_file, - _create_image_from_url, - _process_multimedia_dict_recursively, + BasicMultimediaProcessor, + ImageProcessor, + MultimediaProcessor, + OpenaiVisionMultimediaProcessor, + TextProcessor, _process_recursively, - convert_multimedia_data_to_base64, - create_image, - load_multimedia_data, - persist_multimedia_data, - resolve_multimedia_data_recursively, ) from promptflow.contracts.flow import FlowInputDefinition -from promptflow.contracts.multimedia import Image +from promptflow.contracts.multimedia import Image, Text from promptflow.contracts.tool import ValueType -from ...utils import DATA_ROOT +from ...utils import DATA_ROOT, FLOW_ROOT, get_flow_folder TEST_IMAGE_PATH = DATA_ROOT / "logo.jpg" @pytest.mark.unittest -class TestMultimediaUtils: +class TestImageProcessor: + def test_get_extension_from_mime_type(self): + mime_type = "image/jpeg" + result = ImageProcessor.get_extension_from_mime_type(mime_type) + assert result == "jpeg" + + mime_type = "image/*" + result = ImageProcessor.get_extension_from_mime_type(mime_type) + assert result is None + + def test_get_multimedia_info(self): + key = "data:image/jpeg;base64" + result = ImageProcessor.get_multimedia_info(key) + assert result == ("jpeg", "base64") + + key = "invalid" + result = ImageProcessor.get_multimedia_info(key) + assert result == (None, None) + + def test_is_url(self): + url = "http://example.com" + result = ImageProcessor.is_url(url) + assert result is True + + url = "not a url" + result = ImageProcessor.is_url(url) + assert result is False + + def test_is_base64(self): + base64_str = "data:image/jpeg;base64,/9j/12345ABC" + result = ImageProcessor.is_base64(base64_str) + assert result is True + + base64_str = "/9j/12345ABC" + result = ImageProcessor.is_base64(base64_str) + assert result is True + + base64_str = "not a base64 string" + result = ImageProcessor.is_base64(base64_str) + assert result is False + + def test_create_image_from_file(self): + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) + assert isinstance(image, Image) + assert image._mime_type == "image/jpeg" + @pytest.mark.parametrize("image_path", ["logo.jpg", "logo.png", "logo.webp", "logo.gif"]) def test_create_image_from_base64(self, image_path): - image = _create_image_from_file(DATA_ROOT / image_path) + image = ImageProcessor.create_image_from_file(DATA_ROOT / image_path) base64_str = image.to_base64() - image_from_base64 = _create_image_from_base64(base64_str) + image_from_base64 = ImageProcessor.create_image_from_base64(base64_str) assert str(image) == str(image_from_base64) format = image_path.split(".")[-1] mime_type = f"image/{format}" if format != "jpg" else "image/jpeg" @@ -45,7 +86,7 @@ def test_create_image_from_url_with_mime_type(self, mock_get): mime_type = "image/jpeg" mock_get.return_value = MagicMock(status_code=200, content=content) - image = _create_image_from_url(url, mime_type) + image = ImageProcessor.create_image_from_url(url, mime_type) assert isinstance(image, Image) assert image._mime_type == mime_type @@ -59,105 +100,368 @@ def test_create_image_from_url_failure(self, mock_get): mock_get.return_value = MagicMock(status_code=code, text=message) with pytest.raises(InvalidImageInput) as ex: - _create_image_from_url(url) + ImageProcessor.create_image_from_url(url) expected_message = f"Failed to fetch image from URL: {url}. Error code: {code}. Error message: {message}." assert str(ex.value) == expected_message + +@pytest.mark.unittest +class TestTextProcessor: + def test_is_text_dict_true(self): + text_dict = {"type": "text", "text": "Hello, World!"} + assert TextProcessor.is_text_dict(text_dict) is True + + text_dict = {"type": "text", "content": "Hello, World!"} + assert TextProcessor.is_text_dict(text_dict) is False + + text_dict = {"type": "text", "text": {"value": "Hello, World!"}} + assert TextProcessor.is_text_dict(text_dict) is True + + text_dict = {"type": "text", "text": {"content": "Hello, World!"}} + assert TextProcessor.is_text_dict(text_dict) is False + + def test_create_text_from_dict(self): + text_dict = {"type": "text", "text": "Hello, World!"} + result = TextProcessor.create_text_from_dict(text_dict) + assert isinstance(result, Text) + + +@pytest.mark.unittest +class TestMultimediaProcessor: + @pytest.mark.parametrize( + "message_format_type, processor_class, expected_error", + [ + ("basic", BasicMultimediaProcessor, None), + ("OPENAI-VISION", OpenaiVisionMultimediaProcessor, None), + ("openai-vision", OpenaiVisionMultimediaProcessor, None), + (None, BasicMultimediaProcessor, None), + ("", BasicMultimediaProcessor, None), + ("ABC", None, InvalidMessageFormatType), + ], + ) + def test_create(self, message_format_type, processor_class, expected_error): + if not expected_error: + processor = MultimediaProcessor.create(message_format_type) + assert isinstance(processor, processor_class) + else: + with pytest.raises(expected_error): + MultimediaProcessor.create(message_format_type) + + @pytest.mark.parametrize( + "flow_folder_name, flow_file, processor_class", + [ + ("chat_flow_with_openai_vision_image", "flow.dag.yaml", OpenaiVisionMultimediaProcessor), + ("chat_flow_with_image", "flow.dag.yaml", BasicMultimediaProcessor), + ("chat_flow_with_openai_vision_image", "mock_chat.py", BasicMultimediaProcessor), + (None, None, BasicMultimediaProcessor), + ], + ) + def test_create_from_yaml(self, flow_folder_name, flow_file, processor_class): + flow_folder = get_flow_folder(flow_folder_name, FLOW_ROOT) if flow_folder_name else None + processor = MultimediaProcessor.create_from_yaml(flow_file, working_dir=flow_folder) + assert isinstance(processor, processor_class) + + def test_process_multimedia_dict_recursively(self): + def process_func_image(image_dict): + return "image_placeholder" + + def process_func_text(text_dict): + return "text_placeholder" + + image_dict = {"data:image/jpg;path": "logo.jpg"} + text_dict = {"type": "text", "text": "Hello, World!"} + value = { + "image": image_dict, + "text": text_dict, + "images": [image_dict, image_dict], + "object": {"image": image_dict, "text": text_dict, "other_data": "other_data"}, + } + updated_value = MultimediaProcessor._process_multimedia_dict_recursively( + value, + { + BasicMultimediaProcessor.is_multimedia_dict: process_func_image, + TextProcessor.is_text_dict: process_func_text, + }, + ) + assert updated_value == { + "image": "image_placeholder", + "text": "text_placeholder", + "images": ["image_placeholder", "image_placeholder"], + "object": {"image": "image_placeholder", "text": "text_placeholder", "other_data": "other_data"}, + } + + +@pytest.mark.unittest +class TestBasicMultimediaProcessor: + processor = BasicMultimediaProcessor() + + def test_is_multimedia_dict(self): + multimedia_dict = {"data:image/jpg;path": "test.jpg"} + assert self.processor.is_multimedia_dict(multimedia_dict) is True + + multimedia_dict = {"data:image/jpg;path": "test.jpg", "extra": "data"} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + multimedia_dict = {} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + def test_create_image_with_dict(self, mocker): ## From path image_dict = {"data:image/jpg;path": TEST_IMAGE_PATH} - image_from_path = create_image(image_dict) + image_from_path = self.processor.create_image(image_dict) assert image_from_path._mime_type == "image/jpg" ## From base64 image_dict = {"data:image/jpg;base64": image_from_path.to_base64()} - image_from_base64 = create_image(image_dict) + image_from_base64 = self.processor.create_image(image_dict) assert str(image_from_path) == str(image_from_base64) assert image_from_base64._mime_type == "image/jpg" ## From url mocker.patch("requests.get", return_value=mocker.Mock(content=image_from_path, status_code=200)) image_dict = {"data:image/jpg;url": ""} - image_from_url = create_image(image_dict) + image_from_url = self.processor.create_image(image_dict) assert str(image_from_path) == str(image_from_url) assert image_from_url._mime_type == "image/jpg" mocker.patch("requests.get", return_value=mocker.Mock(content=None, status_code=404)) with pytest.raises(InvalidImageInput) as ex: - create_image(image_dict) + self.processor.create_image(image_dict) assert "Failed to fetch image from URL" in ex.value.message_format def test_create_image_with_string(self, mocker): ## From path - image_from_path = create_image(str(TEST_IMAGE_PATH)) + image_from_path = self.processor.create_image(str(TEST_IMAGE_PATH)) assert image_from_path._mime_type == "image/jpeg" # From base64 - image_from_base64 = create_image(image_from_path.to_base64()) + image_from_base64 = self.processor.create_image(image_from_path.to_base64()) assert str(image_from_path) == str(image_from_base64) assert image_from_base64._mime_type == "image/jpeg" ## From url - mocker.patch("promptflow._utils.multimedia_utils._is_url", return_value=True) - mocker.patch("promptflow._utils.multimedia_utils._is_base64", return_value=False) + mocker.patch("promptflow._utils.multimedia_utils.ImageProcessor.is_url", return_value=True) + mocker.patch("promptflow._utils.multimedia_utils.ImageProcessor.is_base64", return_value=False) mocker.patch("requests.get", return_value=mocker.Mock(content=image_from_path, status_code=200)) - image_from_url = create_image("Test") + image_from_url = self.processor.create_image("Test") assert str(image_from_path) == str(image_from_url) assert image_from_url._mime_type == "image/jpeg" ## From image - image_from_image = create_image(image_from_path) + image_from_image = self.processor.create_image(image_from_path) assert str(image_from_path) == str(image_from_image) def test_create_image_with_invalid_cases(self): # Test invalid input type with pytest.raises(InvalidImageInput) as ex: - create_image(0) + self.processor.create_image(0) assert "Unsupported image input type" in ex.value.message_format # Test invalid image dict with pytest.raises(InvalidImageInput) as ex: invalid_image_dict = {"invalid_image": "invalid_image"} - create_image(invalid_image_dict) + self.processor.create_image(invalid_image_dict) assert "Invalid image input format" in ex.value.message_format # Test none or empty input value with pytest.raises(InvalidImageInput) as ex: - create_image(None) + self.processor.create_image(None) assert "Unsupported image input type" in ex.value.message_format with pytest.raises(InvalidImageInput) as ex: - create_image("") + self.processor.create_image("") assert "The image input should not be empty." in ex.value.message_format + def test_load_multimedia_data(self): + # Case 1: Test normal node + inputs = { + "image": FlowInputDefinition(type=ValueType.IMAGE), + "images": FlowInputDefinition(type=ValueType.LIST), + "object": FlowInputDefinition(type=ValueType.OBJECT), + } + image_dict = {"data:image/jpg;path": str(TEST_IMAGE_PATH)} + line_inputs = { + "image": image_dict, + "images": [image_dict, image_dict], + "object": {"image": image_dict, "other_data": "other_data"}, + } + updated_inputs = self.processor.load_multimedia_data(inputs, line_inputs) + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) + assert updated_inputs == { + "image": image, + "images": [image, image], + "object": {"image": image, "other_data": "other_data"}, + } + + # Case 2: Test aggregation node + line_inputs = { + "image": [image_dict, image_dict], + "images": [[image_dict, image_dict], [image_dict]], + "object": [{"image": image_dict, "other_data": "other_data"}, {"other_data": "other_data"}], + } + updated_inputs = self.processor.load_multimedia_data(inputs, line_inputs) + assert updated_inputs == { + "image": [image, image], + "images": [[image, image], [image]], + "object": [{"image": image, "other_data": "other_data"}, {"other_data": "other_data"}], + } + + # Case 3: Test invalid input type + with pytest.raises(LoadMultimediaDataError) as ex: + line_inputs = {"image": 0} + self.processor.load_multimedia_data(inputs, line_inputs) + assert ( + "Failed to load image for input 'image': " "(InvalidImageInput) Unsupported image input type" + ) in ex.value.message + + def test_resolve_multimedia_data_recursively(self): + image_dict = {"data:image/jpg;path": "logo.jpg"} + value = { + "image": image_dict, + "images": [image_dict, image_dict], + "object": {"image": image_dict, "other_data": "other_data"}, + } + input_dir = TEST_IMAGE_PATH + updated_value = self.processor.resolve_multimedia_data_recursively(input_dir, value) + updated_image_dict = {"data:image/jpg;path": str(DATA_ROOT / "logo.jpg")} + assert updated_value == { + "image": updated_image_dict, + "images": [updated_image_dict, updated_image_dict], + "object": {"image": updated_image_dict, "other_data": "other_data"}, + } + def test_persist_multimedia_date(self, mocker): - image = _create_image_from_file(TEST_IMAGE_PATH) + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) mocker.patch("builtins.open", mock_open()) data = {"image": image, "images": [image, image, "other_data"], "other_data": "other_data"} - persisted_data = persist_multimedia_data(data, base_dir=Path(__file__).parent) + persisted_data = self.processor.persist_multimedia_data(data, base_dir=Path(__file__).parent) file_name = re.compile(r"^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.jpeg$") assert re.match(file_name, persisted_data["image"]["data:image/jpeg;path"]) assert re.match(file_name, persisted_data["images"][0]["data:image/jpeg;path"]) assert re.match(file_name, persisted_data["images"][1]["data:image/jpeg;path"]) def test_convert_multimedia_date_to_base64(self): - image = _create_image_from_file(TEST_IMAGE_PATH) + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) data = {"image": image, "images": [image, image, "other_data"], "other_data": "other_data"} - base64_data = convert_multimedia_data_to_base64(data) + base64_data = self.processor.convert_multimedia_data_to_base64_dict(data) + excepted_image = {f"data:{image._mime_type};base64": image.to_base64()} assert base64_data == { - "image": image.to_base64(), - "images": [image.to_base64(), image.to_base64(), "other_data"], + "image": excepted_image, + "images": [excepted_image, excepted_image, "other_data"], "other_data": "other_data", } - base64_data = convert_multimedia_data_to_base64(data, with_type=True) - prefix = f"data:{image._mime_type};base64," - assert base64_data == { - "image": prefix + image.to_base64(), - "images": [prefix + image.to_base64(), prefix + image.to_base64(), "other_data"], - "other_data": "other_data", - } + +@pytest.mark.unittest +class TestOpenaiVisionMultimediaProcessor: + processor = OpenaiVisionMultimediaProcessor() + + def test_is_multimedia_dict(self): + multimedia_dict = {"type": "image_url", "image_url": {"url": "data"}} + assert self.processor.is_multimedia_dict(multimedia_dict) is True + + multimedia_dict = {"type": "image_file", "image_file": {"path": "data"}} + assert self.processor.is_multimedia_dict(multimedia_dict) is True + + # len(multimedia_dict) != 2 + multimedia_dict = {"image_url": "data"} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + # len(multimedia_dict) != 2 + multimedia_dict = {} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + # "type" not in multimedia_dict + multimedia_dict = {"image/jpeg": "test.jpg", "extra": "data"} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + # image_type not in multimedia_dict + multimedia_dict = {"type": "image_url", "image_file": "data"} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + # multimedia_dict[image_type] is not a dict + multimedia_dict = {"type": "image_url", "image_url": "data"} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + # image_type is not "image_url" or "image_file" + multimedia_dict = {"type": "text", "text": "data"} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + # image_url without "url" key + multimedia_dict = {"type": "image_url", "image_url": {}} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + # image_file without "path" key + multimedia_dict = {"type": "image_file", "image_file": {"url": "data"}} + assert self.processor.is_multimedia_dict(multimedia_dict) is False + + def test_create_image_with_dict(self, mocker): + ## From path + image_dict = {"type": "image_file", "image_file": {"path": TEST_IMAGE_PATH}} + image_from_path = self.processor.create_image(image_dict) + assert image_from_path._mime_type == "image/jpeg" + + ## From base64 + image_dict = {"type": "image_url", "image_url": {"url": image_from_path.to_base64(with_type=True)}} + image_from_base64 = self.processor.create_image(image_dict) + assert str(image_from_path) == str(image_from_base64) + assert image_from_base64._mime_type == "image/jpeg" + + ## From url + mocker.patch("requests.get", return_value=mocker.Mock(content=image_from_path, status_code=200)) + image_dict = {"type": "image_url", "image_url": {"url": "http://example.com"}} + image_from_url = self.processor.create_image(image_dict) + assert str(image_from_path) == str(image_from_url) + assert image_from_url._mime_type == "image/jpeg" + + mocker.patch("requests.get", return_value=mocker.Mock(content=None, status_code=404)) + with pytest.raises(InvalidImageInput) as ex: + self.processor.create_image(image_dict) + assert "Failed to fetch image from URL" in ex.value.message_format + + def test_create_image_with_string(self, mocker): + ## From path + image_from_path = self.processor.create_image(str(TEST_IMAGE_PATH)) + assert image_from_path._mime_type == "image/jpeg" + + # From base64 + image_from_base64 = self.processor.create_image(image_from_path.to_base64()) + assert str(image_from_path) == str(image_from_base64) + assert image_from_base64._mime_type == "image/jpeg" + + ## From url + mocker.patch("promptflow._utils.multimedia_utils.ImageProcessor.is_url", return_value=True) + mocker.patch("promptflow._utils.multimedia_utils.ImageProcessor.is_base64", return_value=False) + mocker.patch("requests.get", return_value=mocker.Mock(content=image_from_path, status_code=200)) + image_from_url = self.processor.create_image("Test") + assert str(image_from_path) == str(image_from_url) + assert image_from_url._mime_type == "image/jpeg" + + ## From image + image_from_image = self.processor.create_image(image_from_path) + assert str(image_from_path) == str(image_from_image) + + def test_create_image_with_invalid_cases(self): + # Test invalid input type + with pytest.raises(InvalidImageInput) as ex: + self.processor.create_image(0) + assert "Unsupported image input type" in ex.value.message_format + + # Test invalid image dict + with pytest.raises(InvalidImageInput) as ex: + invalid_image_dict = {"invalid_image": "invalid_image"} + self.processor.create_image(invalid_image_dict) + assert "Invalid image input format" in ex.value.message_format + + # Test none or empty input value + with pytest.raises(InvalidImageInput) as ex: + self.processor.create_image(None) + assert "Unsupported image input type" in ex.value.message_format + + with pytest.raises(InvalidImageInput) as ex: + self.processor.create_image("") + assert "The image input should not be empty." in ex.value.message_format def test_load_multimedia_data(self): # Case 1: Test normal node @@ -166,14 +470,14 @@ def test_load_multimedia_data(self): "images": FlowInputDefinition(type=ValueType.LIST), "object": FlowInputDefinition(type=ValueType.OBJECT), } - image_dict = {"data:image/jpg;path": str(TEST_IMAGE_PATH)} + image_dict = {"type": "image_file", "image_file": {"path": str(TEST_IMAGE_PATH)}} line_inputs = { "image": image_dict, "images": [image_dict, image_dict], "object": {"image": image_dict, "other_data": "other_data"}, } - updated_inputs = load_multimedia_data(inputs, line_inputs) - image = _create_image_from_file(TEST_IMAGE_PATH) + updated_inputs = self.processor.load_multimedia_data(inputs, line_inputs) + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) assert updated_inputs == { "image": image, "images": [image, image], @@ -186,7 +490,7 @@ def test_load_multimedia_data(self): "images": [[image_dict, image_dict], [image_dict]], "object": [{"image": image_dict, "other_data": "other_data"}, {"other_data": "other_data"}], } - updated_inputs = load_multimedia_data(inputs, line_inputs) + updated_inputs = self.processor.load_multimedia_data(inputs, line_inputs) assert updated_inputs == { "image": [image, image], "images": [[image, image], [image]], @@ -196,65 +500,88 @@ def test_load_multimedia_data(self): # Case 3: Test invalid input type with pytest.raises(LoadMultimediaDataError) as ex: line_inputs = {"image": 0} - load_multimedia_data(inputs, line_inputs) + self.processor.load_multimedia_data(inputs, line_inputs) assert ( "Failed to load image for input 'image': " "(InvalidImageInput) Unsupported image input type" ) in ex.value.message def test_resolve_multimedia_data_recursively(self): - image_dict = {"data:image/jpg;path": "logo.jpg"} + image_dict = {"type": "image_file", "image_file": {"path": "logo.jpg"}} value = { "image": image_dict, "images": [image_dict, image_dict], "object": {"image": image_dict, "other_data": "other_data"}, } input_dir = TEST_IMAGE_PATH - updated_value = resolve_multimedia_data_recursively(input_dir, value) - updated_image_dict = {"data:image/jpg;path": str(DATA_ROOT / "logo.jpg")} + updated_value = self.processor.resolve_multimedia_data_recursively(input_dir, value) + updated_image_dict = {"type": "image_file", "image_file": {"path": str(DATA_ROOT / "logo.jpg")}} assert updated_value == { "image": updated_image_dict, "images": [updated_image_dict, updated_image_dict], "object": {"image": updated_image_dict, "other_data": "other_data"}, } - def test_process_recursively(self): - image = _create_image_from_file(TEST_IMAGE_PATH) - value = {"image": image, "images": [image, image], "object": {"image": image, "other_data": "other_data"}} - process_funcs = {Image: lambda x: str(x)} - updated_value = _process_recursively(value, process_funcs) - image_str = str(image) - assert updated_value == { - "image": image_str, - "images": [image_str, image_str], - "object": {"image": image_str, "other_data": "other_data"}, - } - assert value != updated_value - - def test_process_recursively_inplace(self): - image = _create_image_from_file(TEST_IMAGE_PATH) - value = {"image": image, "images": [image, image], "object": {"image": image, "other_data": "other_data"}} - process_funcs = {Image: lambda x: str(x)} - _process_recursively(value, process_funcs, inplace=True) - image_str = str(image) - assert value == { - "image": image_str, - "images": [image_str, image_str], - "object": {"image": image_str, "other_data": "other_data"}, - } + def test_persist_multimedia_date(self, mocker): + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) + text = Text("Hello, World!") + text_with_annotations = Text("Hello, World!", annotations=["annotation"]) + mocker.patch("builtins.open", mock_open()) + data = {"image": image, "images": [image, image, "other_data"], "texts": [text, text_with_annotations]} + persisted_data = self.processor.persist_multimedia_data(data, base_dir=Path(__file__).parent) - def test_process_multimedia_dict_recursively(self): - def process_func(image_dict): - return "image_placeholder" + file_name = re.compile(r"^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.jpeg$") - image_dict = {"data:image/jpg;path": "logo.jpg"} - value = { - "image": image_dict, - "images": [image_dict, image_dict], - "object": {"image": image_dict, "other_data": "other_data"}, + def check_persisted_image_file(data: dict): + assert data["type"] == "image_file" + assert re.match(file_name, data["image_file"]["path"]) + + check_persisted_image_file(persisted_data["image"]) + check_persisted_image_file(persisted_data["images"][0]) + check_persisted_image_file(persisted_data["images"][1]) + persisted_data["texts"] == [ + {"type": "text", "text": "Hello, World!"}, + {"type": "text", "text": {"value": "Hello, World!", "annotations": ["annotation"]}}, + ] + + def test_convert_multimedia_date_to_base64(self): + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) + data = {"image": image, "images": [image, image, "other_data"], "other_data": "other_data"} + base64_data = self.processor.convert_multimedia_data_to_base64_dict(data) + excepted_image = { + "type": "image_url", + "image_url": {"url": f"data:{image._mime_type};base64,{image.to_base64()}"}, } - updated_value = _process_multimedia_dict_recursively(value, process_func) - assert updated_value == { - "image": "image_placeholder", - "images": ["image_placeholder", "image_placeholder"], - "object": {"image": "image_placeholder", "other_data": "other_data"}, + assert base64_data == { + "image": excepted_image, + "images": [excepted_image, excepted_image, "other_data"], + "other_data": "other_data", } + + +@pytest.mark.unittest +def test_process_recursively(): + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) + value = {"image": image, "images": [image, image], "object": {"image": image, "other_data": "other_data"}} + process_funcs = {Image: lambda x: str(x)} + updated_value = _process_recursively(value, process_funcs) + image_str = str(image) + assert updated_value == { + "image": image_str, + "images": [image_str, image_str], + "object": {"image": image_str, "other_data": "other_data"}, + } + assert value != updated_value + + +@pytest.mark.unittest +def test_process_recursively_inplace(): + image = ImageProcessor.create_image_from_file(TEST_IMAGE_PATH) + value = {"image": image, "images": [image, image], "object": {"image": image, "other_data": "other_data"}} + process_funcs = {Image: lambda x: str(x)} + _process_recursively(value, process_funcs, inplace=True) + image_str = str(image) + assert value == { + "image": image_str, + "images": [image_str, image_str], + "object": {"image": image_str, "other_data": "other_data"}, + } diff --git a/src/promptflow/tests/executor/unittests/_utils/test_process_utils.py b/src/promptflow/tests/executor/unittests/_utils/test_process_utils.py new file mode 100644 index 00000000000..b0b370c2232 --- /dev/null +++ b/src/promptflow/tests/executor/unittests/_utils/test_process_utils.py @@ -0,0 +1,38 @@ +from unittest.mock import patch + +import pytest + +from promptflow._utils.process_utils import get_available_max_worker_count + + +class TestProcessUtils: + @pytest.mark.parametrize( + "available_memory, process_memory, expected_max_worker_count, actual_calculate_worker_count", + [ + (128.0, 64.0, 2, 2), # available_memory/process_memory > 1 + (63.0, 64.0, 1, 0), # available_memory/process_memory < 1 + ], + ) + def test_get_available_max_worker_count( + self, available_memory, process_memory, expected_max_worker_count, actual_calculate_worker_count + ): + with patch("psutil.virtual_memory") as mock_mem: + mock_mem.return_value.available = available_memory * 1024 * 1024 + with patch("psutil.Process") as mock_process: + mock_process.return_value.memory_info.return_value.rss = process_memory * 1024 * 1024 + with patch("promptflow._utils.process_utils.bulk_logger") as mock_logger: + mock_logger.warning.return_value = None + estimated_available_worker_count = get_available_max_worker_count(mock_logger) + assert estimated_available_worker_count == expected_max_worker_count + if actual_calculate_worker_count < 1: + mock_logger.warning.assert_called_with( + f"Current system's available memory is {available_memory}MB, less than the memory " + f"{process_memory}MB required by the process. The maximum available worker count is 1." + ) + else: + mock_logger.info.assert_called_with( + f"Current system's available memory is {available_memory}MB, " + f"memory consumption of current process is {process_memory}MB, " + f"estimated available worker count is {available_memory}/{process_memory} " + f"= {actual_calculate_worker_count}" + ) diff --git a/src/promptflow/tests/executor/unittests/_utils/test_run_tracker_utils.py b/src/promptflow/tests/executor/unittests/_utils/test_run_tracker_utils.py index a420b0daab8..2d41546f7e2 100644 --- a/src/promptflow/tests/executor/unittests/_utils/test_run_tracker_utils.py +++ b/src/promptflow/tests/executor/unittests/_utils/test_run_tracker_utils.py @@ -1,7 +1,7 @@ import pytest -from promptflow._core.generator_proxy import GeneratorProxy from promptflow._utils.run_tracker_utils import _deep_copy_and_extract_items_from_generator_proxy +from promptflow.tracing.contracts.generator_proxy import GeneratorProxy @pytest.mark.unittest diff --git a/src/promptflow/tests/executor/unittests/_utils/test_tool_utils.py b/src/promptflow/tests/executor/unittests/_utils/test_tool_utils.py index d979a24955b..32dcbb269ae 100644 --- a/src/promptflow/tests/executor/unittests/_utils/test_tool_utils.py +++ b/src/promptflow/tests/executor/unittests/_utils/test_tool_utils.py @@ -17,7 +17,7 @@ validate_tool_func_result, ) from promptflow.connections import AzureOpenAIConnection, CustomConnection -from promptflow.contracts.tool import ValueType, Tool, ToolFuncCallScenario, ToolType +from promptflow.contracts.tool import Tool, ToolFuncCallScenario, ToolType, ValueType # mock functions for dynamic list function testing @@ -331,7 +331,13 @@ def test_validate_dynamic_list_func_response_type_with_error(self, res, err_msg) def test_load_function_from_function_path(self, mock_module_with_list_func): func_path = "my_tool_package.tools.tool_with_dynamic_list_input.my_list_func" - load_function_from_function_path(func_path) + tool_func = load_function_from_function_path(func_path) + assert callable(tool_func) + + def test_load_function_from_script(self): + func_path = f"{__file__}:mock_dynamic_list_func1" + tool_func = load_function_from_function_path(func_path) + assert callable(tool_func) def test_load_function_from_function_path_with_error(self, mock_module_with_list_func): func_path = "mock_func_path" @@ -371,13 +377,13 @@ def test_load_function_from_function_path_with_error(self, mock_module_with_list ToolFuncCallScenario.REVERSE_GENERATED_BY, "dummy_result", f"ToolFuncCallScenario {ToolFuncCallScenario.REVERSE_GENERATED_BY} response must be a dict. " - f"dummy_result is not a dict." + f"dummy_result is not a dict.", ), ( "dummy_scenario", "dummy_result", f"Invalid tool func call scenario: dummy_scenario. " - f"Available scenarios are {list(ToolFuncCallScenario)}" + f"Available scenarios are {list(ToolFuncCallScenario)}", ), ], ) @@ -388,7 +394,7 @@ def test_validate_tool_func_result(self, func_call_scenario, result, err_msg): ) with pytest.raises(RetrieveToolFuncResultValidationError) as e: validate_tool_func_result(func_call_scenario, result) - assert (error_message == str(e.value)) + assert error_message == str(e.value) def test_find_deprecated_tools(self): package_tools = { diff --git a/src/promptflow/tests/executor/unittests/_utils/test_utils.py b/src/promptflow/tests/executor/unittests/_utils/test_utils.py index 74e2bfc9651..75e38520a21 100644 --- a/src/promptflow/tests/executor/unittests/_utils/test_utils.py +++ b/src/promptflow/tests/executor/unittests/_utils/test_utils.py @@ -1,9 +1,10 @@ -import pytest import os -from unittest.mock import patch from datetime import datetime +from unittest.mock import patch -from promptflow._utils.utils import is_json_serializable, get_int_env_var, log_progress +import pytest + +from promptflow._utils.utils import get_int_env_var, is_json_serializable, log_progress class MyObj: @@ -45,25 +46,31 @@ def test_get_int_env_var_without_default_vaue(self, env_var, env_value, expected @patch("promptflow.executor._line_execution_process_pool.bulk_logger", autospec=True) def test_log_progress(self, mock_logger): run_start_time = datetime.utcnow() - count = 1 # Tests do not log when not specified at specified intervals (interval = 2) total_count = 20 - log_progress(run_start_time, mock_logger, count, total_count) + current_count = 3 + last_log_count = 2 + log_progress(run_start_time, total_count, current_count, last_log_count, mock_logger) mock_logger.info.assert_not_called() # Test logging at specified intervals (interval = 2) - count = 8 - log_progress(run_start_time, mock_logger, count, total_count) + current_count = 8 + last_log_count = 7 + log_progress(run_start_time, total_count, current_count, last_log_count, mock_logger) mock_logger.info.assert_any_call("Finished 8 / 20 lines.") mock_logger.reset_mock() - # Test logging using last_log_count parameter (conut - last_log_count > interval(2)) - log_progress(run_start_time, mock_logger, count, total_count, last_log_count=5) - mock_logger.info.assert_any_call("Finished 8 / 20 lines.") + # Test logging using last_log_count parameter (conut - last_log_count >= interval(2)) + current_count = 9 + last_log_count = 7 + log_progress(run_start_time, total_count, current_count, last_log_count, mock_logger) + mock_logger.info.assert_any_call("Finished 9 / 20 lines.") mock_logger.reset_mock() # Test don't log using last_log_count parameter ((conut - last_log_count < interval(2)) - log_progress(run_start_time, mock_logger, count, total_count, last_log_count=7) + current_count = 9 + last_log_count = 8 + log_progress(run_start_time, total_count, current_count, last_log_count, mock_logger) mock_logger.info.assert_not_called() diff --git a/src/promptflow/tests/executor/unittests/batch/test_base_executor_proxy.py b/src/promptflow/tests/executor/unittests/batch/test_base_executor_proxy.py index 2ea8845200c..313e20f02e0 100644 --- a/src/promptflow/tests/executor/unittests/batch/test_base_executor_proxy.py +++ b/src/promptflow/tests/executor/unittests/batch/test_base_executor_proxy.py @@ -7,8 +7,8 @@ import httpx import pytest +from promptflow._proxy._base_executor_proxy import APIBasedExecutorProxy from promptflow._utils.exception_utils import ExceptionPresenter -from promptflow.batch._base_executor_proxy import APIBasedExecutorProxy from promptflow.batch._errors import ExecutorServiceUnhealthy from promptflow.contracts.run_info import Status from promptflow.exceptions import ErrorTarget, ValidationException @@ -30,17 +30,18 @@ async def test_exec_line_async(self, has_error): run_id = "test_run_id" index = 1 inputs = {"question": "test"} - with patch("httpx.AsyncClient.post", new_callable=AsyncMock) as mock: + with patch("httpx.Response.raise_for_status"): line_result_dict = _get_line_result_dict(run_id, index, inputs, has_error=has_error) status_code = 400 if has_error else 200 - mock.return_value = httpx.Response(status_code, json=line_result_dict) - line_result = await mock_executor_proxy.exec_line_async(inputs, index, run_id) - assert line_result.output == {} if has_error else {"answer": "Hello world!"} - assert line_result.run_info.run_id == run_id - assert line_result.run_info.index == index - assert line_result.run_info.status == Status.Failed if has_error else Status.Completed - assert line_result.run_info.inputs == inputs - assert (line_result.run_info.error is not None) == has_error + response = httpx.Response(status_code=status_code, json=line_result_dict) + with patch("httpx.AsyncClient.post", return_value=response): + line_result = await mock_executor_proxy.exec_line_async(inputs, index, run_id) + assert line_result.output == {} if has_error else {"answer": "Hello world!"} + assert line_result.run_info.run_id == run_id + assert line_result.run_info.index == index + assert line_result.run_info.status == Status.Failed if has_error else Status.Completed + assert line_result.run_info.inputs == inputs + assert (line_result.run_info.error is not None) == has_error @pytest.mark.asyncio async def test_exec_aggregation_async(self): @@ -48,15 +49,16 @@ async def test_exec_aggregation_async(self): run_id = "test_run_id" batch_inputs = {"question": ["test", "error"]} aggregation_inputs = {"${get_answer.output}": ["Incorrect", "Correct"]} - with patch("httpx.AsyncClient.post", new_callable=AsyncMock) as mock: + with patch("httpx.Response.raise_for_status"): aggr_result_dict = _get_aggr_result_dict(run_id, aggregation_inputs) - mock.return_value = httpx.Response(200, json=aggr_result_dict) - aggr_result = await mock_executor_proxy.exec_aggregation_async(batch_inputs, aggregation_inputs, run_id) - assert aggr_result.metrics == {"accuracy": 0.5} - assert len(aggr_result.node_run_infos) == 1 - assert aggr_result.node_run_infos["aggregation"].flow_run_id == run_id - assert aggr_result.node_run_infos["aggregation"].inputs == aggregation_inputs - assert aggr_result.node_run_infos["aggregation"].status == Status.Completed + response = httpx.Response(200, json=aggr_result_dict) + with patch("httpx.AsyncClient.post", return_value=response): + aggr_result = await mock_executor_proxy.exec_aggregation_async(batch_inputs, aggregation_inputs, run_id) + assert aggr_result.metrics == {"accuracy": 0.5} + assert len(aggr_result.node_run_infos) == 1 + assert aggr_result.node_run_infos["aggregation"].flow_run_id == run_id + assert aggr_result.node_run_infos["aggregation"].inputs == aggregation_inputs + assert aggr_result.node_run_infos["aggregation"].status == Status.Completed @pytest.mark.asyncio async def test_ensure_executor_startup_when_no_error(self): @@ -141,10 +143,6 @@ async def test_check_health(self, mock_value, expected_result): @pytest.mark.parametrize( "response, expected_result", [ - ( - httpx.Response(200, json={"result": "test"}), - {"result": "test"}, - ), ( httpx.Response(500, json={"error": "test error"}), "test error", @@ -189,9 +187,9 @@ async def test_check_health(self, mock_value, expected_result): ), ], ) - async def test_process_http_response(self, response, expected_result): + async def test_process_error_response(self, response, expected_result): mock_executor_proxy = await MockAPIBasedExecutorProxy.create("") - assert mock_executor_proxy._process_http_response(response) == expected_result + assert mock_executor_proxy._process_error_response(response) == expected_result class MockAPIBasedExecutorProxy(APIBasedExecutorProxy): diff --git a/src/promptflow/tests/executor/unittests/batch/test_batch_engine.py b/src/promptflow/tests/executor/unittests/batch/test_batch_engine.py index cddc8c5789f..6ae3820e03c 100644 --- a/src/promptflow/tests/executor/unittests/batch/test_batch_engine.py +++ b/src/promptflow/tests/executor/unittests/batch/test_batch_engine.py @@ -5,7 +5,11 @@ import pytest from promptflow._core._errors import UnexpectedError -from promptflow.batch import APIBasedExecutorProxy, BatchEngine, CSharpExecutorProxy, PythonExecutorProxy +from promptflow._proxy import ProxyFactory +from promptflow._proxy._base_executor_proxy import APIBasedExecutorProxy +from promptflow._proxy._csharp_executor_proxy import CSharpExecutorProxy +from promptflow._proxy._python_executor_proxy import PythonExecutorProxy +from promptflow.batch import BatchEngine from promptflow.contracts.run_info import Status from promptflow.exceptions import ErrorTarget from promptflow.executor._errors import ConnectionNotFound @@ -52,16 +56,16 @@ def test_batch_engine_run_error(self, side_effect, ex_type, ex_target, ex_codes, def test_register_executor(self): # assert original values - assert BatchEngine.executor_proxy_classes["python"] == PythonExecutorProxy - assert BatchEngine.executor_proxy_classes["csharp"] == CSharpExecutorProxy + assert ProxyFactory.executor_proxy_classes["python"] == PythonExecutorProxy + assert ProxyFactory.executor_proxy_classes["csharp"] == CSharpExecutorProxy class MockJSExecutorProxy(APIBasedExecutorProxy): pass # register new proxy - BatchEngine.register_executor("js", MockJSExecutorProxy) - assert BatchEngine.executor_proxy_classes["js"] == MockJSExecutorProxy - assert len(BatchEngine.executor_proxy_classes) == 3 + ProxyFactory.register_executor("js", MockJSExecutorProxy) + assert ProxyFactory.executor_proxy_classes["js"] == MockJSExecutorProxy + assert len(ProxyFactory.executor_proxy_classes) == 3 def test_cancel(self): batch_engine = BatchEngine(get_yaml_file("print_input_flow")) diff --git a/src/promptflow/tests/executor/unittests/batch/test_batch_inputs_processor.py b/src/promptflow/tests/executor/unittests/batch/test_batch_inputs_processor.py index 3b842aae4ed..59491138298 100644 --- a/src/promptflow/tests/executor/unittests/batch/test_batch_inputs_processor.py +++ b/src/promptflow/tests/executor/unittests/batch/test_batch_inputs_processor.py @@ -5,6 +5,7 @@ import pytest from promptflow._core._errors import UnexpectedError +from promptflow._utils._errors import ApplyInputMappingError from promptflow._utils.inputs_mapping_utils import apply_inputs_mapping from promptflow._utils.utils import dump_list_to_jsonl from promptflow.batch._batch_inputs_processor import BatchInputsProcessor @@ -135,7 +136,7 @@ def test_apply_inputs_mapping(self, inputs, inputs_mapping, expected): "question": "${baseline.output}", "answer": "${data.output}", }, - InputMappingError, + ApplyInputMappingError, "Couldn't find these mapping relations: ${baseline.output}, ${data.output}. " "Please make sure your input mapping keys and values match your YAML input section and input data.", ), diff --git a/src/promptflow/tests/executor/unittests/batch/test_csharp_executor_proxy.py b/src/promptflow/tests/executor/unittests/batch/test_csharp_executor_proxy.py index f78747378bd..5e7b42c0887 100644 --- a/src/promptflow/tests/executor/unittests/batch/test_csharp_executor_proxy.py +++ b/src/promptflow/tests/executor/unittests/batch/test_csharp_executor_proxy.py @@ -8,8 +8,8 @@ import pytest from promptflow._core._errors import MetaFileNotFound, MetaFileReadError +from promptflow._proxy._csharp_executor_proxy import CSharpExecutorProxy from promptflow._sdk._constants import FLOW_TOOLS_JSON, PROMPT_FLOW_DIR_NAME -from promptflow.batch import CSharpExecutorProxy from promptflow.executor._result import AggregationResult from ...utils import get_flow_folder, get_yaml_file @@ -22,6 +22,9 @@ async def get_executor_proxy(): return await CSharpExecutorProxy.create(flow_file, working_dir) +DUMMY_FLOW_FILE = get_yaml_file("csharp_flow") + + @pytest.mark.unittest class TestCSharpExecutorProxy: @pytest.mark.asyncio @@ -105,13 +108,13 @@ def test_get_tool_metadata_succeed(self): with open(tool_meta_file, "w") as file: json.dump(expected_tool_meta, file, indent=4) - tool_meta = CSharpExecutorProxy.get_tool_metadata("", working_dir) + tool_meta = CSharpExecutorProxy.generate_flow_tools_json(DUMMY_FLOW_FILE, working_dir) assert tool_meta == expected_tool_meta def test_get_tool_metadata_failed_with_file_not_found(self): working_dir = Path(mkdtemp()) with pytest.raises(MetaFileNotFound): - CSharpExecutorProxy.get_tool_metadata("", working_dir) + CSharpExecutorProxy.generate_flow_tools_json(DUMMY_FLOW_FILE, working_dir) def test_get_tool_metadata_failed_with_content_not_json(self): working_dir = Path(mkdtemp()) @@ -120,7 +123,7 @@ def test_get_tool_metadata_failed_with_content_not_json(self): tool_meta_file.touch() with pytest.raises(MetaFileReadError): - CSharpExecutorProxy.get_tool_metadata("", working_dir) + CSharpExecutorProxy.generate_flow_tools_json(DUMMY_FLOW_FILE, working_dir) def test_find_available_port(self): port = CSharpExecutorProxy.find_available_port() diff --git a/src/promptflow/tests/executor/unittests/batch/test_result.py b/src/promptflow/tests/executor/unittests/batch/test_result.py index c5264c345f3..98637ef79d9 100644 --- a/src/promptflow/tests/executor/unittests/batch/test_result.py +++ b/src/promptflow/tests/executor/unittests/batch/test_result.py @@ -115,13 +115,13 @@ def test_system_metrics(self): api_call_1 = get_api_call( "LLM", - "openai.resources.completions.Completions.create", + "openai_completion", inputs={"prompt": "Please tell me a joke.", "model": "text-davinci-003"}, output={"choices": [{"text": "text"}]}, ) api_call_2 = get_api_call( "LLM", - "openai.resources.completions.Completions.create", + "openai_completion", inputs={ "prompt": ["Please tell me a joke.", "Please tell me a joke about fruit."], "model": "text-davinci-003", @@ -146,7 +146,7 @@ def test_system_metrics(self): line_api_calls = get_api_call("Chain", "Chain", children=[api_call_1, api_call_2]) aggr_api_call = get_api_call( "LLM", - "openai.resources.chat.completions.Completions.create", + "openai_chat", inputs={ "messages": [{"system": "You are a helpful assistant.", "user": "Please tell me a joke."}], "model": "gpt-35-turbo", diff --git a/src/promptflow/tests/executor/unittests/contracts/test_multimedia.py b/src/promptflow/tests/executor/unittests/contracts/test_multimedia.py index 24c05957bde..e4aa89a55dd 100644 --- a/src/promptflow/tests/executor/unittests/contracts/test_multimedia.py +++ b/src/promptflow/tests/executor/unittests/contracts/test_multimedia.py @@ -23,7 +23,6 @@ def test_image_contract(self, value, mime_type, source_url): assert image._hash == "a94a8fe5" assert image.to_base64() == "dGVzdA==" assert image.to_base64(with_type=True) == f"data:{mime_type};base64,dGVzdA==" - assert image.to_base64(with_type=True, dict_type=True) == {f"data:{mime_type};base64": "dGVzdA=="} assert bytes(image) == value assert image.source_url == source_url assert str(image) == "Image(a94a8fe5)" @@ -46,6 +45,5 @@ def test_pfbytes_contract(self, value, mime_type, source_url): assert pfBytes._hash == "a94a8fe5" assert pfBytes.to_base64() == "dGVzdA==" assert pfBytes.to_base64(with_type=True) == f"data:{mime_type};base64,dGVzdA==" - assert pfBytes.to_base64(with_type=True, dict_type=True) == {f"data:{mime_type};base64": "dGVzdA=="} assert bytes(pfBytes) == value assert pfBytes.source_url == source_url diff --git a/src/promptflow/tests/executor/unittests/contracts/test_run_info.py b/src/promptflow/tests/executor/unittests/contracts/test_run_info.py index 9c5ab1dc231..c0faa6ea51d 100644 --- a/src/promptflow/tests/executor/unittests/contracts/test_run_info.py +++ b/src/promptflow/tests/executor/unittests/contracts/test_run_info.py @@ -62,7 +62,6 @@ def test_deserialize(self): "end_time": "2023-11-24T06:03:20.268858Z", "index": 0, "api_calls": None, - "variant_id": "", "cached_run_id": None, "cached_flow_run_id": None, "logs": None, @@ -120,7 +119,6 @@ def test_deserialize(self): "end_time": "2023-11-23T10:58:37.9590789Z", "index": 0, "api_calls": None, - "variant_id": "", "name": "", "description": "", "tags": None, diff --git a/src/promptflow/tests/executor/unittests/executor/_service/apis/test_common.py b/src/promptflow/tests/executor/unittests/executor/_service/apis/test_common.py index 98810eb8424..072a1e9c678 100644 --- a/src/promptflow/tests/executor/unittests/executor/_service/apis/test_common.py +++ b/src/promptflow/tests/executor/unittests/executor/_service/apis/test_common.py @@ -1,6 +1,8 @@ import pytest from fastapi.testclient import TestClient +from promptflow.core._version import __version__ + @pytest.mark.unittest class TestCommonApis: @@ -11,12 +13,13 @@ def test_health(self, executor_client: TestClient): def test_version(self, monkeypatch, executor_client: TestClient): # mock the BUILD_INFO env variable - monkeypatch.setenv("BUILD_INFO", '{"build_number": "20240131.v1"}') + monkeypatch.setenv("BUILD_INFO", '{"commit_id": "test-commit-id"}') response = executor_client.get("/version") assert response.status_code == 200 response = response.json() assert response["status"] == "healthy" - assert response["version"] == "promptflow-executor/20240131.v1" + assert response["version"] == __version__ + assert response["commit_id"] == "test-commit-id" assert isinstance(response["feature_list"], list) diff --git a/src/promptflow/tests/executor/unittests/executor/_service/contracts/test_execution_request.py b/src/promptflow/tests/executor/unittests/executor/_service/contracts/test_execution_request.py index eafa5e358f0..76096b9ab19 100644 --- a/src/promptflow/tests/executor/unittests/executor/_service/contracts/test_execution_request.py +++ b/src/promptflow/tests/executor/unittests/executor/_service/contracts/test_execution_request.py @@ -31,4 +31,4 @@ def test_get_run_mode(self): def test_validate_request(self): with pytest.raises(FlowFilePathInvalid) as exc_info: BaseExecutionRequest(**MOCK_REQUEST).validate_request() - assert "The path should be relative to the working directory." in exc_info.value.message + assert "the flow file path should be relative to the working directory." in exc_info.value.message diff --git a/src/promptflow/tests/executor/unittests/executor/_service/utils/test_process_utils.py b/src/promptflow/tests/executor/unittests/executor/_service/utils/test_process_utils.py index 6d1aae1692a..bbb3f3fa504 100644 --- a/src/promptflow/tests/executor/unittests/executor/_service/utils/test_process_utils.py +++ b/src/promptflow/tests/executor/unittests/executor/_service/utils/test_process_utils.py @@ -6,7 +6,6 @@ import pytest from promptflow._core._errors import UnexpectedError -from promptflow._core.operation_context import OperationContext from promptflow._utils.exception_utils import JsonSerializedPromptflowException from promptflow.exceptions import ErrorTarget from promptflow.executor._service._errors import ExecutionTimeoutError @@ -15,6 +14,7 @@ exception_wrapper, invoke_sync_function_in_process, ) +from promptflow.tracing._operation_context import OperationContext MOCK_CONTEXT_DICT = {"context_test_key": "test_value"} diff --git a/src/promptflow/tests/executor/unittests/executor/_service/utils/test_service_utils.py b/src/promptflow/tests/executor/unittests/executor/_service/utils/test_service_utils.py index e741ef23951..11b58a2fe84 100644 --- a/src/promptflow/tests/executor/unittests/executor/_service/utils/test_service_utils.py +++ b/src/promptflow/tests/executor/unittests/executor/_service/utils/test_service_utils.py @@ -7,11 +7,13 @@ from promptflow._utils.exception_utils import ExceptionPresenter, JsonSerializedPromptflowException, ResponseCode from promptflow._utils.logger_utils import bulk_logger, flow_logger, logger, service_logger +from promptflow._version import VERSION as PF_VERSION +from promptflow.core._version import __version__ as PF_CORE_VERSION from promptflow.executor._service._errors import ExecutionTimeoutError from promptflow.executor._service.contracts.execution_request import BaseExecutionRequest, FlowExecutionRequest from promptflow.executor._service.utils.service_utils import ( generate_error_response, - get_executor_version, + get_commit_id, get_log_context, set_environment_variables, update_and_get_operation_context, @@ -63,22 +65,22 @@ def test_update_and_get_operation_context(self, monkeypatch): "user_agent": "dummy_user_agent", "request_id": "dummy_request_id", } - # mock the BUILD_INFO env variable - monkeypatch.setenv("BUILD_INFO", '{"build_number": "20240131.v1"}') - operation_context = update_and_get_operation_context(context_dict) - assert operation_context.user_agent == "dummy_user_agent promptflow-executor/20240131.v1" + assert ( + operation_context.user_agent + == f"dummy_user_agent promptflow/{PF_VERSION} promptflow-core/{PF_CORE_VERSION}" + ) assert operation_context.request_id == "dummy_request_id" - def test_get_executor_version(self, monkeypatch): + def test_get_commit_id(self, monkeypatch): # mock have the BUILD_INFO env variable - monkeypatch.setenv("BUILD_INFO", '{"build_number": "20240131.v1"}') - executor_version = get_executor_version() - assert executor_version == "promptflow-executor/20240131.v1" + monkeypatch.setenv("BUILD_INFO", '{"commit_id": "test-commit-id"}') + commit_id = get_commit_id() + assert commit_id == "test-commit-id" # mock do not have the BUILD_INFO env variable monkeypatch.setenv("BUILD_INFO", "") - executor_version = get_executor_version() - assert executor_version == "promptflow-executor/0.0.1" + commit_id = get_commit_id() + assert commit_id == "unknown" def test_generate_error_response(self): non_pf_ex = ValueError("Test exception") diff --git a/src/promptflow/tests/executor/unittests/executor/test_assistant_tool_invoker.py b/src/promptflow/tests/executor/unittests/executor/assistant_sample_tool.py similarity index 100% rename from src/promptflow/tests/executor/unittests/executor/test_assistant_tool_invoker.py rename to src/promptflow/tests/executor/unittests/executor/assistant_sample_tool.py diff --git a/src/promptflow/tests/executor/unittests/executor/test_assistant.py b/src/promptflow/tests/executor/unittests/executor/test_assistant.py new file mode 100644 index 00000000000..ea887895d37 --- /dev/null +++ b/src/promptflow/tests/executor/unittests/executor/test_assistant.py @@ -0,0 +1,168 @@ +import pytest + +from promptflow.contracts.flow import ToolSourceType +from promptflow.contracts.tool import ToolType +from promptflow.executor import FlowExecutor +from promptflow.executor._assistant_tool_invoker import AssistantToolResolver +from promptflow.executor._errors import InvalidAssistantTool, ResolveToolError + +from ...utils import WRONG_FLOW_ROOT, get_yaml_file + + +@pytest.mark.unittest +@pytest.mark.usefixtures("use_secrets_config_file", "dev_connections") +class TestAssistant: + @pytest.mark.parametrize( + "flow_folder, exception_class, error_message", + [ + ( + "assistant_package_tool_wrong_source_type", + ResolveToolError, + ( + "Tool source type 'package1' is not supported in assistant node 'assistant'. " + "Please make sure the assistant definition is correct." + ), + ), + ( + "assistant_package_tool_wrong_tool", + ResolveToolError, + ( + "Package tool 'hello.world' is not found in the current environment. " + "All available package tools are: []." + ), + ), + ( + "assistant_python_tool_wrong_path", + ResolveToolError, + ("Load tool failed for node 'assistant'. Tool file './hello.py' can not be found."), + ), + ], + ) + def test_assistant_tool_resolve_exception(self, dev_connections, flow_folder, exception_class, error_message): + + with pytest.raises(exception_class) as e: + executor = FlowExecutor.create(get_yaml_file(flow_folder, WRONG_FLOW_ROOT), dev_connections) + executor.exec_line({}) + assert error_message in str(e.value) + + +@pytest.mark.unittest +@pytest.mark.usefixtures +class TestAssistantToolResolver: + def test_resolve_python_tool(self): + data = { + "type": "function", + "source": {"path": "dummy_assistant.py", "type": "code"}, + "tool_type": "python", + "predefined_inputs": {"connection": "my_aoai_connection"}, + } + tool = AssistantToolResolver.from_dict(data, "dummy_assistant") + assert tool.type == "function" + assert tool.tool_type == ToolType.PYTHON + assert tool.source.path == "dummy_assistant.py" + assert tool.source.type == ToolSourceType.Code + assert tool.predefined_inputs == {"connection": "my_aoai_connection"} + + def test_resolve_package_tool(self): + data = { + "type": "function", + "source": {"tool": "hello.world", "type": "package"}, + "tool_type": "python", + "predefined_inputs": {"connection": "my_aoai_connection"}, + } + tool = AssistantToolResolver.from_dict(data, "dummy_assistant") + assert tool.type == "function" + assert tool.tool_type == ToolType.PYTHON + assert tool.source.tool == "hello.world" + assert tool.source.type == ToolSourceType.Package + assert tool.predefined_inputs == {"connection": "my_aoai_connection"} + + def test_type_invalid(self): + data = { + "type": "type11", + "source": {"tool": "hello.world", "type": "package"}, + "tool_type": "python", + "predefined_inputs": {"connection": "my_aoai_connection"}, + } + with pytest.raises(InvalidAssistantTool) as e: + AssistantToolResolver.from_dict(data, "dummy_assistant") + assert ( + "Unsupported assistant tool's type in node : type11. " + "Please make sure the type is restricted within " + "['code_interpreter', 'function', 'retrieval']." in str(e.value) + ) + + data = { + "source": {"tool": "hello.world", "type": "package"}, + "tool_type": "python", + "predefined_inputs": {"connection": "my_aoai_connection"}, + } + with pytest.raises(InvalidAssistantTool) as e: + AssistantToolResolver.from_dict(data, "dummy_assistant") + assert ( + "Unsupported assistant tool's type in node : None. " + "Please make sure the type is restricted within " + "['code_interpreter', 'function', 'retrieval']." in str(e.value) + ) + + def test_invalid_source(self): + data = {"type": "function", "tool_type": "python", "predefined_inputs": {"connection": "my_aoai_connection"}} + with pytest.raises(InvalidAssistantTool) as e: + AssistantToolResolver.from_dict(data, "dummy_assistant") + assert ( + "The 'source' property is missing in the assistant node 'dummy_assistant'. " + "Please make sure the assistant definition is correct." + ) in str(e.value) + + data = { + "type": "function", + "source": {"type": "code"}, + "tool_type": "python", + "predefined_inputs": {"connection": "my_aoai_connection"}, + } + with pytest.raises(InvalidAssistantTool) as e: + AssistantToolResolver.from_dict(data, "dummy_assistant") + assert ( + "The 'path' property is missing in 'source' of the assistant python tool in node 'dummy_assistant'. " + "Please make sure the assistant definition is correct." + ) in str(e.value) + + data = { + "type": "function", + "source": {"path": "", "type": "code"}, + "tool_type": "python", + "predefined_inputs": {"connection": "my_aoai_connection"}, + } + with pytest.raises(InvalidAssistantTool) as e: + AssistantToolResolver.from_dict(data, "dummy_assistant") + assert ( + "The 'path' property is missing in 'source' of the assistant python tool in node 'dummy_assistant'. " + "Please make sure the assistant definition is correct." + ) in str(e.value) + + data = { + "type": "function", + "source": {"path": "hello.py", "type": "code11"}, + "tool_type": "python", + "predefined_inputs": {"connection": "my_aoai_connection"}, + } + with pytest.raises(InvalidAssistantTool) as e: + AssistantToolResolver.from_dict(data, "dummy_assistant") + assert ( + "Tool source type 'code11' is not supported in assistant node " + "'dummy_assistant'. Please make sure the assistant definition is correct." + ) in str(e.value) + + def test_invalid_tool_type(self): + data = { + "type": "function", + "source": {"path": "hello.py", "type": "code"}, + "tool_type": "python11", + "predefined_inputs": {"connection": "my_aoai_connection"}, + } + with pytest.raises(InvalidAssistantTool) as e: + AssistantToolResolver.from_dict(data, "dummy_assistant") + assert ( + "The 'tool_type' property is missing or invalid in assistant node 'dummy_assistant'. " + "Please make sure the assistant definition is correct." + ) in str(e.value) diff --git a/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py b/src/promptflow/tests/executor/unittests/executor/test_line_execution_process_pool.py similarity index 85% rename from src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py rename to src/promptflow/tests/executor/unittests/executor/test_line_execution_process_pool.py index 6c1a1ac45e4..49e7d1cb161 100644 --- a/src/promptflow/tests/executor/unittests/processpool/test_line_execution_process_pool.py +++ b/src/promptflow/tests/executor/unittests/executor/test_line_execution_process_pool.py @@ -19,15 +19,14 @@ LineExecutionProcessPool, _exec_line, format_current_process_info, - get_available_max_worker_count, log_process_status, ) -from promptflow.executor._process_manager import create_spawned_fork_process_manager +from promptflow.executor._process_manager import ProcessPoolConstants, create_spawned_fork_process_manager from promptflow.executor._result import LineResult from ...utils import get_flow_sample_inputs, get_yaml_file -SAMPLE_FLOW = "web_classification_no_variants" +SAMPLE_FLOW = "hello-world" def get_line_inputs(flow_folder=""): @@ -65,10 +64,10 @@ def execute_in_fork_mode_subprocess(dev_connections, flow_folder, has_passed_wor with patch("promptflow.executor._line_execution_process_pool.bulk_logger") as mock_logger: with LineExecutionProcessPool( - executor, - nlines, - run_id, None, + executor, + nlines=nlines, + run_id=run_id, worker_count=pf_worker_count if has_passed_worker_count else None, ) as pool: assert pool._n_process == n_process @@ -108,10 +107,10 @@ def execute_in_spawn_mode_subprocess( mock_process.return_value.memory_info.return_value.rss = 64 * 1024 * 1024 with patch("promptflow.executor._line_execution_process_pool.bulk_logger") as mock_logger: with LineExecutionProcessPool( - executor, - nlines, - run_id, None, + executor, + nlines=nlines, + run_id=run_id, worker_count=pf_worker_count if has_passed_worker_count else None, ) as pool: assert pool._n_process == n_process @@ -142,10 +141,10 @@ def create_line_execution_process_pool(dev_connections): bulk_inputs = get_bulk_inputs() nlines = len(bulk_inputs) line_execution_process_pool = LineExecutionProcessPool( - executor, - nlines, - run_id, None, + executor, + nlines=nlines, + run_id=run_id, line_timeout_sec=1, ) return line_execution_process_pool @@ -183,14 +182,16 @@ def custom_create_spawned_fork_process_manager(*args, **kwargs): @pytest.mark.unittest +@pytest.mark.usefixtures("recording_injection") class TestLineExecutionProcessPool: + @pytest.mark.asyncio @pytest.mark.parametrize( "flow_folder", [ SAMPLE_FLOW, ], ) - def test_line_execution_process_pool(self, flow_folder, dev_connections): + async def test_line_execution_process_pool(self, flow_folder, dev_connections): log_path = str(Path(mkdtemp()) / "test.log") log_context_initializer = LogContext(log_path).get_initializer() log_context = log_context_initializer() @@ -202,37 +203,47 @@ def test_line_execution_process_pool(self, flow_folder, dev_connections): nlines = len(bulk_inputs) run_id = run_id or str(uuid.uuid4()) with LineExecutionProcessPool( - executor, - nlines, - run_id, None, + executor, + nlines=nlines, + run_id=run_id, ) as pool: - result_list = pool.run(zip(range(nlines), bulk_inputs)) + result_list = await pool.run(zip(range(nlines), bulk_inputs)) + if sys.platform == "linux": + # Check 'spawned_fork_process_manager_stderr_runid.log' exits. + log_file = ProcessPoolConstants.PROCESS_LOG_PATH / ProcessPoolConstants.MANAGER_PROCESS_LOG_NAME + assert log_file.exists() is True + child_process_log_exit = False + for file in ProcessPoolConstants.PROCESS_LOG_PATH.iterdir(): + # Check 'process_stderr.log' exits. + if file.name.startswith(ProcessPoolConstants.PROCESS_LOG_NAME): + child_process_log_exit = True + assert child_process_log_exit is True assert len(result_list) == nlines for i, line_result in enumerate(result_list): assert isinstance(line_result, LineResult) assert line_result.run_info.status == Status.Completed, f"{i}th line got {line_result.run_info.status}" + @pytest.mark.asyncio @pytest.mark.parametrize( "flow_folder", [ SAMPLE_FLOW, ], ) - def test_line_execution_not_completed(self, flow_folder, dev_connections): + async def test_line_execution_not_completed(self, flow_folder, dev_connections): executor = FlowExecutor.create(get_yaml_file(flow_folder), dev_connections) run_id = str(uuid.uuid4()) bulk_inputs = get_bulk_inputs() nlines = len(bulk_inputs) with LineExecutionProcessPool( - executor, - nlines, - run_id, None, + executor, + nlines=nlines, + run_id=run_id, line_timeout_sec=1, ) as pool: - result_list = pool.run(zip(range(nlines), bulk_inputs)) - result_list = sorted(result_list, key=lambda r: r.run_info.index) + result_list = await pool.run(zip(range(nlines), bulk_inputs)) assert len(result_list) == nlines for i, line_result in enumerate(result_list): assert isinstance(line_result, LineResult) @@ -290,13 +301,14 @@ def test_exec_line_failed_when_line_execution_not_start(self, flow_folder, dev_c assert line_result.run_info.error["code"] == "UserError" assert line_result.run_info.status == Status.Failed + @pytest.mark.asyncio @pytest.mark.parametrize( "flow_folder", [ SAMPLE_FLOW, ], ) - def test_process_pool_run_with_exception(self, flow_folder, dev_connections, mocker: MockFixture): + async def test_process_pool_run_with_exception(self, flow_folder, dev_connections, mocker: MockFixture): # mock process pool run execution raise error test_error_msg = "Test user error" mocker.patch( @@ -309,13 +321,13 @@ def test_process_pool_run_with_exception(self, flow_folder, dev_connections, moc bulk_inputs = get_bulk_inputs() nlines = len(bulk_inputs) with LineExecutionProcessPool( - executor, - nlines, - run_id, None, + executor, + nlines=nlines, + run_id=run_id, ) as pool: with pytest.raises(UserErrorException) as e: - pool.run(zip(range(nlines), bulk_inputs)) + await pool.run(zip(range(nlines), bulk_inputs)) assert e.value.message == test_error_msg assert e.value.target == ErrorTarget.AZURE_RUN_STORAGE assert e.value.error_codes[0] == "UserError" @@ -405,6 +417,7 @@ def test_process_not_set_environment_variable(self, dev_connections): assert p.exitcode == 0 @pytest.mark.skipif(sys.platform == "win32" or sys.platform == "darwin", reason="Only test on linux") + @pytest.mark.asyncio @pytest.mark.parametrize( "flow_folder", [ @@ -415,7 +428,7 @@ def test_process_not_set_environment_variable(self, dev_connections): "promptflow.executor._process_manager.create_spawned_fork_process_manager", custom_create_spawned_fork_process_manager, ) - def test_spawned_fork_process_manager_crashed_in_fork_mode(self, flow_folder, dev_connections): + async def test_spawned_fork_process_manager_crashed_in_fork_mode(self, flow_folder, dev_connections): executor = FlowExecutor.create(get_yaml_file(flow_folder), dev_connections) run_id = str(uuid.uuid4()) bulk_inputs = get_bulk_inputs() @@ -423,48 +436,15 @@ def test_spawned_fork_process_manager_crashed_in_fork_mode(self, flow_folder, de run_id = run_id or str(uuid.uuid4()) with pytest.raises(SpawnedForkProcessManagerStartFailure) as e: with LineExecutionProcessPool( - executor, - nlines, - run_id, None, + executor, + nlines=nlines, + run_id=run_id, ) as pool: - pool.run(zip(range(nlines), bulk_inputs)) + await pool.run(zip(range(nlines), bulk_inputs)) assert "Failed to start spawned fork process manager" in str(e.value) -class TestGetAvailableMaxWorkerCount: - @pytest.mark.parametrize( - "available_memory, process_memory, expected_max_worker_count, actual_calculate_worker_count", - [ - (128.0, 64.0, 2, 2), # available_memory/process_memory > 1 - (63.0, 64.0, 1, 0), # available_memory/process_memory < 1 - ], - ) - def test_get_available_max_worker_count( - self, available_memory, process_memory, expected_max_worker_count, actual_calculate_worker_count - ): - with patch("psutil.virtual_memory") as mock_mem: - mock_mem.return_value.available = available_memory * 1024 * 1024 - with patch("psutil.Process") as mock_process: - mock_process.return_value.memory_info.return_value.rss = process_memory * 1024 * 1024 - with patch("promptflow.executor._line_execution_process_pool.bulk_logger") as mock_logger: - mock_logger.warning.return_value = None - estimated_available_worker_count = get_available_max_worker_count() - assert estimated_available_worker_count == expected_max_worker_count - if actual_calculate_worker_count < 1: - mock_logger.warning.assert_called_with( - f"Current system's available memory is {available_memory}MB, less than the memory " - f"{process_memory}MB required by the process. The maximum available worker count is 1." - ) - else: - mock_logger.info.assert_called_with( - f"Current system's available memory is {available_memory}MB, " - f"memory consumption of current process is {process_memory}MB, " - f"estimated available worker count is {available_memory}/{process_memory} " - f"= {actual_calculate_worker_count}" - ) - - @pytest.mark.unittest class TestFormatCurrentProcess: def test_format_current_process_info(self): diff --git a/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py b/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py index ad3ced07ea6..f0d3f38952b 100644 --- a/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py +++ b/src/promptflow/tests/executor/unittests/executor/test_tool_resolver.py @@ -10,7 +10,7 @@ from promptflow._core._errors import InvalidSource from promptflow._core.tools_manager import ToolLoader from promptflow._internal import tool -from promptflow._sdk.entities import CustomConnection, CustomStrongTypeConnection +from promptflow.connections import CustomConnection, CustomStrongTypeConnection from promptflow.connections import AzureOpenAIConnection from promptflow.contracts.flow import InputAssignment, InputValueType, Node, ToolSource, ToolSourceType from promptflow.contracts.tool import AssistantDefinition, InputDefinition, Secret, Tool, ToolType, ValueType @@ -509,7 +509,7 @@ def test_convert_to_custom_strong_type_connection_value(self, conn_types: List[s m = sys.modules[__name__] v = InputAssignment(value="conn_name", value_type=InputValueType.LITERAL) actual = tool_resolver._convert_to_custom_strong_type_connection_value( - "conn_name", v, node, tool, conn_types, m + "conn_name", v, node.name, node.source, tool, conn_types, m ) assert isinstance(actual, expected_type) assert actual.api_base == "mock" @@ -553,7 +553,7 @@ def test_load_tools(self, predefined_inputs): { "type": "function", "tool_type": "python", - "source": {"type": "code", "path": "test_assistant_tool_invoker.py"}, + "source": {"type": "code", "path": "assistant_sample_tool.py"}, "predefined_inputs": predefined_inputs, }, ] @@ -565,7 +565,7 @@ def test_load_tools(self, predefined_inputs): # Test load tools connections = {"conn_name": {"type": "AzureOpenAIConnection", "value": {"api_key": "mock", "api_base": "mock"}}} tool_resolver = ToolResolver(working_dir=Path(__file__).parent, connections=connections) - tool_resolver._resolve_assistant_tool(assistant_definitions) + tool_resolver._resolve_assistant_tools("node_name", assistant_definitions) invoker = assistant_definitions._tool_invoker assert len(invoker._assistant_tools) == len(assistant_definitions.tools) == len(tool_definitions) for tool_name, assistant_tool in invoker._assistant_tools.items(): diff --git a/src/promptflow/tests/executor/unittests/storage/test_local_storage_operations.py b/src/promptflow/tests/executor/unittests/storage/test_local_storage_operations.py index eb72bcc3723..6d7751b3fb2 100644 --- a/src/promptflow/tests/executor/unittests/storage/test_local_storage_operations.py +++ b/src/promptflow/tests/executor/unittests/storage/test_local_storage_operations.py @@ -7,7 +7,7 @@ from promptflow._sdk.entities._run import Run from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations -from promptflow._utils.multimedia_utils import create_image +from promptflow._utils.multimedia_utils import BasicMultimediaProcessor from promptflow.contracts.multimedia import Image from promptflow.contracts.run_info import FlowRunInfo, RunInfo, Status @@ -39,8 +39,8 @@ def node_run_info(): flow_run_id="flow_run_id", run_id="run_id", status=Status.Completed, - inputs={"image1": create_image({"data:image/png;base64": "R0lGODlhAQABAAAAACw="})}, - output={"output1": create_image({"data:image/png;base64": "R0lGODlhAQABAAAAACw="})}, + inputs={"image1": BasicMultimediaProcessor().create_image({"data:image/png;base64": "R0lGODlhAQABAAAAACw="})}, + output={"output1": BasicMultimediaProcessor().create_image({"data:image/png;base64": "R0lGODlhAQABAAAAACw="})}, metrics={}, error={}, parent_run_id="parent_run_id", @@ -56,8 +56,8 @@ def flow_run_info(): run_id="run_id", status=Status.Completed, error=None, - inputs={"image1": create_image({"data:image/png;base64": "R0lGODlhAQABAAAAACw="})}, - output={"output1": create_image({"data:image/png;base64": "R0lGODlhAQABAAAAACw="})}, + inputs={"image1": BasicMultimediaProcessor().create_image({"data:image/png;base64": "R0lGODlhAQABAAAAACw="})}, + output={"output1": BasicMultimediaProcessor().create_image({"data:image/png;base64": "R0lGODlhAQABAAAAACw="})}, metrics={}, request="request", parent_run_id="parent_run_id", diff --git a/src/promptflow/tests/executor/unittests/storage/test_queue_run_storage.py b/src/promptflow/tests/executor/unittests/storage/test_queue_run_storage.py index 5ca66a5e62d..17a0ef4bddc 100644 --- a/src/promptflow/tests/executor/unittests/storage/test_queue_run_storage.py +++ b/src/promptflow/tests/executor/unittests/storage/test_queue_run_storage.py @@ -25,7 +25,6 @@ def test_persist_node_run(self): end_time="end_time", index="index", api_calls="api_calls", - variant_id="variant_id", cached_run_id="cached_run_id", cached_flow_run_id="cached_flow_run_id", logs="logs", @@ -54,7 +53,6 @@ def test_persist_flow_run(self): end_time="end_time", index="index", api_calls="api_calls", - variant_id="variant_id", system_metrics="system_metrics", result="result", ) diff --git a/src/promptflow/tests/executor/unittests/storage/test_run_records.py b/src/promptflow/tests/executor/unittests/storage/test_run_records.py index cd299b9ec44..fc99d7e6cdd 100644 --- a/src/promptflow/tests/executor/unittests/storage/test_run_records.py +++ b/src/promptflow/tests/executor/unittests/storage/test_run_records.py @@ -3,9 +3,9 @@ import pytest -from promptflow._utils.dataclass_serializer import serialize from promptflow.contracts.run_info import FlowRunInfo, RunInfo, Status from promptflow.storage.run_records import LineRunRecord, NodeRunRecord +from promptflow.tracing._utils import serialize @pytest.mark.unittest @@ -27,7 +27,6 @@ def test_line_record(): start_time=start_time, end_time=end_time, index=0, - variant_id=None, ) line_record = LineRunRecord.from_run_info(flow_run_info) assert line_record.line_number == 0 @@ -56,7 +55,6 @@ def test_line_serialize(): start_time=start_time, end_time=end_time, index=0, - variant_id=None, ) line_record = LineRunRecord.from_run_info(flow_run_info) result = line_record.serialize() diff --git a/src/promptflow/tests/executor/utils.py b/src/promptflow/tests/executor/utils.py index 1d471419aa8..99b1ff9fb1d 100644 --- a/src/promptflow/tests/executor/utils.py +++ b/src/promptflow/tests/executor/utils.py @@ -10,6 +10,7 @@ from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter from promptflow._utils.yaml_utils import load_yaml +from promptflow.batch import BatchEngine from promptflow.contracts.flow import Flow from promptflow.contracts.run_info import FlowRunInfo from promptflow.contracts.run_info import RunInfo as NodeRunInfo @@ -136,6 +137,33 @@ def construct_flow_execution_request_json(flow_folder, root=FLOW_ROOT, inputs=No } +def submit_batch_run( + flow_folder, + inputs_mapping, + *, + input_dirs={}, + input_file_name="samples.json", + run_id=None, + connections={}, + storage=None, + return_output_dir=False, +): + batch_engine = BatchEngine( + get_yaml_file(flow_folder), get_flow_folder(flow_folder), connections=connections, storage=storage + ) + if not input_dirs and inputs_mapping: + input_dirs = {"data": get_flow_inputs_file(flow_folder, file_name=input_file_name)} + output_dir = Path(mkdtemp()) + if return_output_dir: + return batch_engine.run(input_dirs, inputs_mapping, output_dir, run_id=run_id), output_dir + return batch_engine.run(input_dirs, inputs_mapping, output_dir, run_id=run_id) + + +def get_batch_inputs_line(flow_folder, sample_inputs_file="samples.json"): + inputs = get_flow_sample_inputs(flow_folder, sample_inputs_file=sample_inputs_file) + return len(inputs) + + class MemoryRunStorage(AbstractRunStorage): def __init__(self): self._node_runs: Dict[str, NodeRunInfo] = {} diff --git a/src/promptflow/tests/sdk_cli_azure_test/conftest.py b/src/promptflow/tests/sdk_cli_azure_test/conftest.py index cf96549be84..4db847fe5d9 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/conftest.py +++ b/src/promptflow/tests/sdk_cli_azure_test/conftest.py @@ -7,32 +7,44 @@ import uuid from concurrent.futures import ThreadPoolExecutor from pathlib import Path -from typing import Callable, Optional +from typing import Callable from unittest.mock import patch import jwt import pytest +from _constants import ( + DEFAULT_COMPUTE_INSTANCE_NAME, + DEFAULT_REGISTRY_NAME, + DEFAULT_RESOURCE_GROUP_NAME, + DEFAULT_RUNTIME_NAME, + DEFAULT_SUBSCRIPTION_ID, + DEFAULT_WORKSPACE_NAME, +) from azure.core.exceptions import ResourceNotFoundError from mock import mock from pytest_mock import MockerFixture from promptflow._sdk._constants import FlowType, RunStatus -from promptflow._sdk._utils import ClientUserAgentUtil from promptflow._sdk.entities import Run +from promptflow._utils.user_agent_utils import ClientUserAgentUtil from promptflow.azure import PFClient from promptflow.azure._entities._flow import Flow +try: + from promptflow.recording.record_mode import is_live, is_record, is_replay +except ImportError: + + def is_live(): + return False + + def is_record(): + return False + + def is_replay(): + return False + + from ._azure_utils import get_cred -from .recording_utilities import ( - PFAzureIntegrationTestRecording, - SanitizedValues, - VariableRecorder, - get_created_flow_name_from_flow_path, - get_pf_client_for_replay, - is_live, - is_record, - is_replay, -) FLOWS_DIR = "./tests/test_configs/flows" EAGER_FLOWS_DIR = "./tests/test_configs/eager_flows" @@ -41,6 +53,12 @@ RESOURCE_ID_FORMAT = "/subscriptions/{}/resourceGroups/{}/providers/{}/workspaces/{}" +def pytest_configure(): + pytest.is_live = is_live() + pytest.is_record = is_record() + pytest.is_replay = is_replay() + + def package_scope_in_live_mode() -> str: """Determine the scope of some expected sharing fixtures. @@ -56,9 +74,60 @@ def package_scope_in_live_mode() -> str: return "package" if is_live() else "function" +# region pfazure constants +@pytest.fixture(scope="session") +def subscription_id() -> str: + if is_replay(): + from promptflow.recording.azure import SanitizedValues + + return SanitizedValues.SUBSCRIPTION_ID + else: + return os.getenv("PROMPT_FLOW_SUBSCRIPTION_ID", DEFAULT_SUBSCRIPTION_ID) + + +@pytest.fixture(scope="session") +def resource_group_name() -> str: + if is_replay(): + from promptflow.recording.azure import SanitizedValues + + return SanitizedValues.RESOURCE_GROUP_NAME + else: + return os.getenv("PROMPT_FLOW_RESOURCE_GROUP_NAME", DEFAULT_RESOURCE_GROUP_NAME) + + +@pytest.fixture(scope="session") +def workspace_name() -> str: + if is_replay(): + from promptflow.recording.azure import SanitizedValues + + return SanitizedValues.WORKSPACE_NAME + else: + return os.getenv("PROMPT_FLOW_WORKSPACE_NAME", DEFAULT_WORKSPACE_NAME) + + +@pytest.fixture(scope="session") +def runtime_name() -> str: + return os.getenv("PROMPT_FLOW_RUNTIME_NAME", DEFAULT_RUNTIME_NAME) + + +@pytest.fixture(scope="session") +def registry_name() -> str: + return os.getenv("PROMPT_FLOW_REGISTRY_NAME", DEFAULT_REGISTRY_NAME) + + +@pytest.fixture(scope="session") +def compute_instance_name() -> str: + return os.getenv("PROMPT_FLOW_COMPUTE_INSTANCE_NAME", DEFAULT_COMPUTE_INSTANCE_NAME) + + +# region + + @pytest.fixture(scope=package_scope_in_live_mode()) def user_object_id() -> str: - if is_replay(): + if pytest.is_replay: + from promptflow.recording.azure import SanitizedValues + return SanitizedValues.USER_OBJECT_ID credential = get_cred() access_token = credential.get_token("https://management.azure.com/.default") @@ -68,7 +137,9 @@ def user_object_id() -> str: @pytest.fixture(scope=package_scope_in_live_mode()) def tenant_id() -> str: - if is_replay(): + if pytest.is_replay: + from promptflow.recording.azure import SanitizedValues + return SanitizedValues.TENANT_ID credential = get_cred() access_token = credential.get_token("https://management.azure.com/.default") @@ -98,7 +169,9 @@ def ml_client( def remote_client(subscription_id: str, resource_group_name: str, workspace_name: str): from promptflow.azure import PFClient - if is_replay(): + if pytest.is_replay: + from promptflow.recording.azure import get_pf_client_for_replay + client = get_pf_client_for_replay() else: client = PFClient( @@ -108,7 +181,7 @@ def remote_client(subscription_id: str, resource_group_name: str, workspace_name workspace_name=workspace_name, ) assert "promptflow-sdk" in ClientUserAgentUtil.get_user_agent() - assert "promptflow/" not in ClientUserAgentUtil.get_user_agent() + assert "promptflow-test" not in ClientUserAgentUtil.get_user_agent() yield client @@ -150,13 +223,13 @@ def runtime(runtime_name: str) -> str: @pytest.fixture def flow_serving_client_remote_connection(mocker: MockerFixture, remote_workspace_resource_id): - from promptflow._sdk._serving.app import create_app as create_serving_app + from promptflow.core._serving.app import create_app as create_serving_app model_path = (Path(MODEL_ROOT) / "basic-with-connection").resolve().absolute().as_posix() mocker.patch.dict(os.environ, {"PROMPTFLOW_PROJECT_PATH": model_path}) mocker.patch.dict(os.environ, {"USER_AGENT": "test-user-agent"}) app = create_serving_app( - config={"connection.provider": remote_workspace_resource_id}, + connection_provider=remote_workspace_resource_id, environment_variables={"API_TYPE": "${azure_open_ai_connection.api_type}"}, ) app.config.update( @@ -216,7 +289,7 @@ def serving_client_with_connection_data_override(mocker: MockerFixture, remote_w def create_serving_client_with_connections(model_name, mocker: MockerFixture, connections: dict = {}): - from promptflow._sdk._serving.app import create_app as create_serving_app + from promptflow.core._serving.app import create_app as create_serving_app model_path = (Path(MODEL_ROOT) / model_name).resolve().absolute().as_posix() mocker.patch.dict(os.environ, {"PROMPTFLOW_PROJECT_PATH": model_path}) @@ -228,7 +301,7 @@ def create_serving_client_with_connections(model_name, mocker: MockerFixture, co ) # Set credential to None for azureml extension type # As we mock app in github workflow, which do not have managed identity credential - func = "promptflow._sdk._serving.extension.azureml_extension._get_managed_identity_credential_with_retry" + func = "promptflow.core._serving.extension.azureml_extension._get_managed_identity_credential_with_retry" with mock.patch(func) as mock_cred_func: mock_cred_func.return_value = None app = create_serving_app( @@ -244,17 +317,19 @@ def create_serving_client_with_connections(model_name, mocker: MockerFixture, co @pytest.fixture(scope=package_scope_in_live_mode()) -def variable_recorder() -> VariableRecorder: +def variable_recorder(): + from promptflow.recording.azure import VariableRecorder + yield VariableRecorder() @pytest.fixture(scope=package_scope_in_live_mode()) -def randstr(variable_recorder: VariableRecorder) -> Callable[[str], str]: +def randstr(variable_recorder) -> Callable[[str], str]: """Return a "random" UUID.""" def generate_random_string(variable_name: str) -> str: random_string = str(uuid.uuid4()) - if is_live(): + if pytest.is_live: return random_string elif is_replay(): return variable_name @@ -265,18 +340,16 @@ def generate_random_string(variable_name: str) -> str: @pytest.fixture(scope=package_scope_in_live_mode()) -def vcr_recording( - request: pytest.FixtureRequest, user_object_id: str, tenant_id: str, variable_recorder: VariableRecorder -) -> Optional[PFAzureIntegrationTestRecording]: +def vcr_recording(request: pytest.FixtureRequest, user_object_id: str, tenant_id: str, variable_recorder): """Fixture to record or replay network traffic. If the test mode is "live", nothing will happen. If the test mode is "record" or "replay", this fixture will locate a YAML (recording) file based on the test file, class and function name, write to (record) or read from (replay) the file. """ - if is_live(): - yield None - else: + if pytest.is_record or pytest.is_replay: + from promptflow.recording.azure import PFAzureIntegrationTestRecording + recording = PFAzureIntegrationTestRecording.from_test_case( test_class=request.cls, test_func_name=request.node.name, @@ -287,6 +360,8 @@ def vcr_recording( recording.enter_vcr() request.addfinalizer(recording.exit_vcr) yield recording + else: + yield None # we expect this fixture only work when running live test without recording @@ -310,7 +385,7 @@ def single_worker_thread_pool() -> None: def single_worker_thread_pool_executor(*args, **kwargs): return ThreadPoolExecutor(max_workers=1) - if is_live(): + if pytest.is_live: yield else: with patch( @@ -327,7 +402,7 @@ def mock_set_headers_with_user_aml_token(mocker: MockerFixture) -> None: There will be requests fetching cloud metadata during retrieving AML token, which will break during replay. As the logic comes from azure-ai-ml, changes in Prompt Flow can hardly affect it, mock it here. """ - if not is_live(): + if not pytest.is_live: mocker.patch( "promptflow.azure._restclient.flow_service_caller.FlowServiceCaller._set_headers_with_user_aml_token" ) @@ -337,13 +412,13 @@ def mock_set_headers_with_user_aml_token(mocker: MockerFixture) -> None: @pytest.fixture def mock_get_azure_pf_client(mocker: MockerFixture, remote_client) -> None: """Mock PF Azure client to avoid network traffic during replay test.""" - if not is_live(): + if not pytest.is_live: mocker.patch( - "promptflow._cli._pf_azure._run._get_azure_pf_client", + "promptflow.azure._cli._run._get_azure_pf_client", return_value=remote_client, ) mocker.patch( - "promptflow._cli._pf_azure._flow._get_azure_pf_client", + "promptflow.azure._cli._flow._get_azure_pf_client", return_value=remote_client, ) yield @@ -352,7 +427,7 @@ def mock_get_azure_pf_client(mocker: MockerFixture, remote_client) -> None: @pytest.fixture(scope=package_scope_in_live_mode()) def mock_get_user_identity_info(user_object_id: str, tenant_id: str) -> None: """Mock get user object id and tenant id, currently used in flow list operation.""" - if not is_live(): + if not pytest.is_live: with patch( "promptflow.azure._restclient.flow_service_caller.FlowServiceCaller._get_user_identity_info", return_value=(user_object_id, tenant_id), @@ -363,7 +438,7 @@ def mock_get_user_identity_info(user_object_id: str, tenant_id: str) -> None: @pytest.fixture(scope=package_scope_in_live_mode()) -def created_flow(pf: PFClient, randstr: Callable[[str], str], variable_recorder: VariableRecorder) -> Flow: +def created_flow(pf: PFClient, randstr: Callable[[str], str], variable_recorder) -> Flow: """Create a flow for test.""" flow_display_name = randstr("flow_display_name") flow_source = FLOWS_DIR + "/simple_hello_world/" @@ -384,8 +459,10 @@ def created_flow(pf: PFClient, randstr: Callable[[str], str], variable_recorder: # flow in Azure will have different file share name with timestamp # and this is a client-side behavior, so we need to sanitize this in recording # so extract this during record test - if is_record(): + if pytest.is_record: flow_name_const = "flow_name" + from promptflow.recording.azure import get_created_flow_name_from_flow_path + flow_name = get_created_flow_name_from_flow_path(result.path) variable_recorder.get_or_record_variable(flow_name_const, flow_name) @@ -504,12 +581,12 @@ def mock_isinstance_for_mock_datastore() -> None: We have an isinstance check during run download for datastore type for better error message; while our mock datastore in replay mode is not a valid type, so mock it with strict condition. """ - if not is_replay(): + if not pytest.is_replay: yield else: from azure.ai.ml.entities._datastore.azure_storage import AzureBlobDatastore - from .recording_utilities.utils import MockDatastore + from promptflow.recording.azure.utils import MockDatastore original_isinstance = isinstance diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_arm_connection_operations.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_arm_connection_operations.py index 02867d29f9c..d4f1dea9bec 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_arm_connection_operations.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_arm_connection_operations.py @@ -19,21 +19,11 @@ class TestArmConnectionOperations: def test_get_connection(self, connection_ops): # Note: Secrets will be returned by arm api result = connection_ops.get(name="azure_open_ai_connection") - assert ( - result._to_dict().items() - > { - "api_type": "azure", - "module": "promptflow.connections", - "name": "azure_open_ai_connection", - }.items() - ) + assert result.name == "azure_open_ai_connection" + assert result.api_type == "azure" + assert result.module == "promptflow.connections" result = connection_ops.get(name="custom_connection") - assert ( - result._to_dict().items() - > { - "name": "custom_connection", - "module": "promptflow.connections", - "configs": {}, - }.items() - ) + assert result.name == "custom_connection" + assert result.configs == {} + assert result.module == "promptflow.connections" diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_azure_cli_perf.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_azure_cli_perf.py index ec21e891463..2d247dec949 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_azure_cli_perf.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_azure_cli_perf.py @@ -8,8 +8,7 @@ from promptflow._cli._user_agent import USER_AGENT as CLI_USER_AGENT # noqa: E402 from promptflow._sdk._telemetry import log_activity -from promptflow._sdk._utils import ClientUserAgentUtil -from sdk_cli_azure_test.recording_utilities import is_replay +from promptflow._utils.user_agent_utils import ClientUserAgentUtil FLOWS_DIR = "./tests/test_configs/flows" DATAS_DIR = "./tests/test_configs/datas" @@ -34,7 +33,7 @@ def mock_log_activity(*args, **kwargs): def run_cli_command(cmd, time_limit=3600): - from promptflow._cli._pf_azure.entry import main + from promptflow.azure._cli.entry import main sys.argv = list(cmd) st = timeit.default_timer() @@ -49,7 +48,7 @@ def run_cli_command(cmd, time_limit=3600): ed = timeit.default_timer() print(f"{cmd}, \nTotal time: {ed - st}s") - if is_replay(): + if pytest.is_replay: assert ed - st < time_limit, f"The time limit is {time_limit}s, but it took {ed - st}s." diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli.py index a23612fec85..f586e8a87c3 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli.py @@ -7,8 +7,6 @@ from promptflow._cli._pf.entry import main -from ..recording_utilities import is_live - FLOWS_DIR = "./tests/test_configs/flows" RUNS_DIR = "./tests/test_configs/runs" CONNECTIONS_DIR = "./tests/test_configs/connections" @@ -33,7 +31,7 @@ def run_pf_command(*args, cwd=None): os.chdir(origin_cwd) -@pytest.mark.skipif(condition=not is_live(), reason="CLI tests, only run in live mode.") +@pytest.mark.skipif(condition=not pytest.is_live, reason="CLI tests, only run in live mode.") @pytest.mark.cli_test @pytest.mark.e2etest class TestCli: diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli_with_azure.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli_with_azure.py index dc916064a4b..b86b002b72f 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli_with_azure.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli_with_azure.py @@ -11,14 +11,13 @@ from mock.mock import patch from promptflow._constants import PF_USER_AGENT -from promptflow._core.operation_context import OperationContext -from promptflow._sdk._utils import ClientUserAgentUtil from promptflow._sdk.entities import Run +from promptflow._utils.user_agent_utils import ClientUserAgentUtil from promptflow._utils.utils import environment_variable_overwrite, parse_ua_to_dict from promptflow.azure import PFClient +from promptflow.tracing._operation_context import OperationContext from .._azure_utils import DEFAULT_TEST_TIMEOUT, PYTEST_TIMEOUT_METHOD -from ..recording_utilities import is_live FLOWS_DIR = "./tests/test_configs/flows" DATAS_DIR = "./tests/test_configs/datas" @@ -27,7 +26,7 @@ # TODO: move this to a shared utility module def run_pf_command(*args, pf, runtime=None, cwd=None): - from promptflow._cli._pf_azure.entry import main + from promptflow.azure._cli.entry import main origin_argv, origin_cwd = sys.argv, os.path.abspath(os.curdir) try: @@ -153,7 +152,7 @@ def test_run_file_with_set(self, pf, runtime: str, randstr: Callable[[str], str] assert isinstance(run, Run) assert run.properties["azureml.promptflow.runtime_name"] == runtime - @pytest.mark.skipif(condition=not is_live(), reason="This test requires an actual PFClient") + @pytest.mark.skipif(condition=not pytest.is_live, reason="This test requires an actual PFClient") def test_azure_cli_ua(self, pf: PFClient): # clear user agent before test context = OperationContext().get_instance() diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_in_azure_ml.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_in_azure_ml.py index 06169137dff..1267edae5a9 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_in_azure_ml.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_in_azure_ml.py @@ -8,7 +8,6 @@ from promptflow.connections import AzureOpenAIConnection from .._azure_utils import DEFAULT_TEST_TIMEOUT, PYTEST_TIMEOUT_METHOD -from ..recording_utilities import is_live PROMOTFLOW_ROOT = Path(__file__) / "../../../.." @@ -64,7 +63,7 @@ def update_saved_spec(component, saved_spec_path: str): @pytest.mark.skipif( - condition=not is_live(), + condition=not pytest.is_live, reason="flow in pipeline tests require secrets config file, only run in live mode.", ) @pytest.mark.usefixtures("use_secrets_config_file") diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_operations.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_operations.py index 3f658ce766f..103c74b318d 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_operations.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_operations.py @@ -10,7 +10,6 @@ from promptflow.exceptions import UserErrorException from .._azure_utils import DEFAULT_TEST_TIMEOUT, PYTEST_TIMEOUT_METHOD -from ..recording_utilities import is_live tests_root_dir = Path(__file__).parent.parent.parent flow_test_dir = tests_root_dir / "test_configs/flows" @@ -58,7 +57,7 @@ def test_update_flow(self, pf, created_flow: Flow): pf.flows.create_or_update(updated_flow, display_name="A new test flow") @pytest.mark.skipif( - condition=not is_live(), + condition=not pytest.is_live, reason="Complicated test combining `pf flow test` and global config", ) def test_flow_test_with_config(self, remote_workspace_resource_id): diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_serve.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_serve.py index 5f4cf6c46b5..68dce98d2b5 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_serve.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_flow_serve.py @@ -2,9 +2,6 @@ import pytest -from ..recording_utilities import is_live - - testdata = """The event sourcing pattern involves using an append-only store to record the full series of actions on that data. The Azure Cosmos DB change feed is a great choice as a central data store in event sourcing architectures in which all data ingestion is modeled as writes (no updates or deletes). @@ -15,12 +12,14 @@ change feed. You can even have multiple change feed consumers subscribe to the same container's change feed.""" -@pytest.mark.skipif(condition=not is_live(), reason="serving tests, only run in live mode.") +@pytest.mark.skipif( + condition=not pytest.is_live, reason="serving tests, only run in live mode as replay do not have az login." +) @pytest.mark.usefixtures("flow_serving_client_remote_connection") @pytest.mark.e2etest def test_local_serving_api_with_remote_connection(flow_serving_client_remote_connection): response = flow_serving_client_remote_connection.get("/health") - assert b'{"status":"Healthy","version":"0.0.1"}' in response.data + assert b"Healthy" in response.data response = flow_serving_client_remote_connection.post("/score", data=json.dumps({"text": "hi"})) assert ( response.status_code == 200 @@ -28,12 +27,12 @@ def test_local_serving_api_with_remote_connection(flow_serving_client_remote_con assert "output_prompt" in json.loads(response.data.decode()) -@pytest.mark.skipif(condition=not is_live(), reason="serving tests, only run in live mode.") +@pytest.mark.skipif(condition=not pytest.is_live, reason="serving tests, only run in live mode.") @pytest.mark.usefixtures("flow_serving_client_with_prt_config_env") @pytest.mark.e2etest def test_azureml_serving_api_with_prt_config_env(flow_serving_client_with_prt_config_env): response = flow_serving_client_with_prt_config_env.get("/health") - assert b'{"status":"Healthy","version":"0.0.1"}' in response.data + assert b"Healthy" in response.data response = flow_serving_client_with_prt_config_env.post("/score", data=json.dumps({"text": "hi"})) assert ( response.status_code == 200 @@ -43,12 +42,12 @@ def test_azureml_serving_api_with_prt_config_env(flow_serving_client_with_prt_co assert b"Welcome to promptflow app" in response.data -@pytest.mark.skipif(condition=not is_live(), reason="serving tests, only run in live mode.") +@pytest.mark.skipif(condition=not pytest.is_live, reason="serving tests, only run in live mode.") @pytest.mark.usefixtures("flow_serving_client_with_connection_provider_env") @pytest.mark.e2etest def test_azureml_serving_api_with_conn_provider_env(flow_serving_client_with_connection_provider_env): response = flow_serving_client_with_connection_provider_env.get("/health") - assert b'{"status":"Healthy","version":"0.0.1"}' in response.data + assert b"Healthy" in response.data response = flow_serving_client_with_connection_provider_env.post("/score", data=json.dumps({"text": "hi"})) assert ( response.status_code == 200 @@ -58,12 +57,12 @@ def test_azureml_serving_api_with_conn_provider_env(flow_serving_client_with_con assert b"Welcome to promptflow app" in response.data -@pytest.mark.skipif(condition=not is_live(), reason="serving tests, only run in live mode.") +@pytest.mark.skipif(condition=not pytest.is_live, reason="serving tests, only run in live mode.") @pytest.mark.usefixtures("flow_serving_client_with_connection_provider_env") @pytest.mark.e2etest def test_azureml_serving_api_with_aml_resource_id_env(flow_serving_client_with_aml_resource_id_env): response = flow_serving_client_with_aml_resource_id_env.get("/health") - assert b'{"status":"Healthy","version":"0.0.1"}' in response.data + assert b"Healthy" in response.data response = flow_serving_client_with_aml_resource_id_env.post("/score", data=json.dumps({"text": "hi"})) assert ( response.status_code == 200 @@ -71,12 +70,12 @@ def test_azureml_serving_api_with_aml_resource_id_env(flow_serving_client_with_a assert "output_prompt" in json.loads(response.data.decode()) -@pytest.mark.skipif(condition=not is_live(), reason="serving tests, only run in live mode.") +@pytest.mark.skipif(condition=not pytest.is_live, reason="serving tests, only run in live mode.") @pytest.mark.usefixtures("serving_client_with_connection_name_override") @pytest.mark.e2etest def test_azureml_serving_api_with_connection_name_override(serving_client_with_connection_name_override): response = serving_client_with_connection_name_override.get("/health") - assert b'{"status":"Healthy","version":"0.0.1"}' in response.data + assert b"Healthy" in response.data response = serving_client_with_connection_name_override.post("/score", data=json.dumps({"text": testdata})) assert ( @@ -89,7 +88,7 @@ def test_azureml_serving_api_with_connection_name_override(serving_client_with_c @pytest.mark.e2etest def test_azureml_serving_api_with_connection_data_override(serving_client_with_connection_data_override): response = serving_client_with_connection_data_override.get("/health") - assert b'{"status":"Healthy","version":"0.0.1"}' in response.data + assert b"Healthy" in response.data response = serving_client_with_connection_data_override.post("/score", data=json.dumps({"text": "hi"})) assert ( diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_run_operations.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_run_operations.py index f45c20e6719..1c83b941083 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_run_operations.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_run_operations.py @@ -19,7 +19,7 @@ from azure.ai.ml import ManagedIdentityConfiguration from azure.ai.ml.entities import IdentityConfiguration -from promptflow._sdk._constants import DownloadedRun, RunStatus +from promptflow._sdk._constants import DAG_FILE_NAME, DownloadedRun, RunStatus from promptflow._sdk._errors import InvalidRunError, InvalidRunStatusError, RunNotFoundError from promptflow._sdk._load_functions import load_run from promptflow._sdk.entities import Run @@ -37,7 +37,6 @@ from promptflow.exceptions import UserErrorException from .._azure_utils import DEFAULT_TEST_TIMEOUT, PYTEST_TIMEOUT_METHOD -from ..recording_utilities import is_live PROMOTFLOW_ROOT = Path(__file__) / "../../../.." @@ -101,7 +100,8 @@ def test_run_resume(self, pf: PFClient, randstr: Callable[[str], str]): run2 = pf.run(resume_from=run, name=name2) assert isinstance(run2, Run) # Enable name assert after PFS released - # assert run2.name == name2 + assert run2.name == name2 + assert run2._resume_from == run.name def test_run_bulk_from_yaml(self, pf, runtime: str, randstr: Callable[[str], str]): run_id = randstr("run_id") @@ -388,7 +388,7 @@ def test_failed_run_to_dict_exclude(self, pf: PFClient, created_failed_run: Run) assert "debugInfo" in default["error"]["error"] and "debugInfo" not in exclude["error"]["error"] @pytest.mark.skipif( - condition=not is_live(), + condition=not pytest.is_live, reason="cannot differ the two requests to run history in replay mode.", ) def test_archive_and_restore_run(self, pf: PFClient, created_batch_run_without_llm: Run): @@ -459,7 +459,7 @@ def test_cancel_run(self, pf, runtime: str, randstr: Callable[[str], str]): assert run.status in [RunStatus.CANCELED, RunStatus.CANCEL_REQUESTED] @pytest.mark.skipif( - condition=not is_live(), reason="request uri contains temp folder name, need some time to sanitize." + condition=not pytest.is_live, reason="request uri contains temp folder name, need some time to sanitize." ) def test_run_with_additional_includes(self, pf, runtime: str, randstr: Callable[[str], str]): run = pf.run( @@ -1207,7 +1207,8 @@ def test_automatic_runtime_with_managed_identity(self, pf, randstr: Callable[[st user_assigned_identities=[ ManagedIdentityConfiguration(client_id="fake_client_id", resource_id="fake_resource_id") ], - ) + ), + _kind="default", # make the mocked workspace pass the datastore check ) def submit(*args, **kwargs): @@ -1226,3 +1227,26 @@ def submit(*args, **kwargs): params_override=[{"name": run_id}], ) pf.runs.create_or_update(run=run) + + @pytest.mark.usefixtures("mock_isinstance_for_mock_datastore") + def test_eager_flow_run_without_yaml(self, pf: PFClient, randstr: Callable[[str], str]): + run = pf.run( + flow="entry:my_flow", + code=f"{EAGER_FLOWS_DIR}/simple_without_yaml", + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + name=randstr("name"), + ) + run = pf.runs.stream(run) + assert run.status == RunStatus.COMPLETED + + # test YAML is generated + expected_files = [ + f"{DownloadedRun.SNAPSHOT_FOLDER}/{DAG_FILE_NAME}", + ] + with TemporaryDirectory() as tmp_dir: + pf.runs.download(run=run.name, output=tmp_dir) + for file in expected_files: + assert Path(tmp_dir, run.name, file).exists() + + # the YAML file will not exist in user's folder + assert not Path(f"{EAGER_FLOWS_DIR}/simple_without_yaml/flow.dag.yaml").exists() diff --git a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_telemetry.py b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_telemetry.py index 82a0cf79aba..393c3923c0c 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_telemetry.py +++ b/src/promptflow/tests/sdk_cli_azure_test/e2etests/test_telemetry.py @@ -3,6 +3,7 @@ # --------------------------------------------------------- import contextlib import os +import platform import shutil import sys import tempfile @@ -17,7 +18,6 @@ from promptflow import load_run from promptflow._constants import PF_USER_AGENT -from promptflow._core.operation_context import OperationContext from promptflow._sdk._configuration import Configuration from promptflow._sdk._errors import RunNotFoundError from promptflow._sdk._telemetry import ( @@ -29,8 +29,10 @@ log_activity, ) from promptflow._sdk._telemetry.logging_handler import get_promptflow_sdk_log_handler -from promptflow._sdk._utils import ClientUserAgentUtil, call_from_extension +from promptflow._sdk._utils import call_from_extension +from promptflow._utils.user_agent_utils import ClientUserAgentUtil from promptflow._utils.utils import environment_variable_overwrite, parse_ua_to_dict +from promptflow.tracing._operation_context import OperationContext from .._azure_utils import DEFAULT_TEST_TIMEOUT, PYTEST_TIMEOUT_METHOD @@ -89,8 +91,6 @@ def test_logging_handler(self): assert handler._is_telemetry_enabled is False def test_call_from_extension(self): - from promptflow._core.operation_context import OperationContext - assert call_from_extension() is False with environment_variable_overwrite(PF_USER_AGENT, "prompt-flow-extension/1.0.0"): assert call_from_extension() is True @@ -99,19 +99,32 @@ def test_call_from_extension(self): context.user_agent = context.user_agent.replace("prompt-flow-extension/1.0.0", "") def test_custom_event(self, pf): - from promptflow._sdk._telemetry.logging_handler import PromptFlowSDKLogHandler - - def log_event(*args, **kwargs): - record = args[0] - assert record.custom_dimensions is not None + from promptflow._sdk._configuration import Configuration + from promptflow._sdk._telemetry.logging_handler import PromptFlowSDKExporter + + envelope = None + config = Configuration.get_instance() + custom_dimensions = { + "python_version": platform.python_version(), + "installation_id": config.get_or_set_installation_id(), + } + log_to_envelope = PromptFlowSDKExporter( + connection_string="InstrumentationKey=00000000-0000-0000-0000-000000000000", + custom_dimensions=custom_dimensions, + )._log_to_envelope + + def log_event(log_data): + nonlocal envelope + envelope = log_to_envelope(log_data) + + def check_evelope(): logger = get_telemetry_logger() handler = logger.handlers[0] assert isinstance(handler, PromptFlowSDKLogHandler) - envelope = handler.log_record_to_envelope(record) - custom_dimensions = pydash.get(envelope, "data.baseData.properties") + custom_dimensions = pydash.get(envelope, "data.base_data.properties") assert isinstance(custom_dimensions, dict) # Note: need privacy review if we add new fields. - if "start" in record.message: + if "start" in envelope.data.base_data.name: assert custom_dimensions.keys() == { "request_id", "activity_name", @@ -125,8 +138,13 @@ def log_event(*args, **kwargs): "installation_id", "first_call", "from_ci", + "error_category", + "error_type", + "error_target", + "error_message", + "error_detail", } - elif "complete" in record.message: + elif "complete" in envelope.data.base_data.name: assert custom_dimensions.keys() == { "request_id", "activity_name", @@ -142,18 +160,27 @@ def log_event(*args, **kwargs): "installation_id", "first_call", "from_ci", + "error_category", + "error_type", + "error_target", + "error_message", + "error_detail", } else: - raise ValueError("Invalid message: {}".format(record.message)) - assert record.message.startswith("pfazure.runs.get") + raise ValueError("Invalid message: {}".format(envelope.data.base_data.name)) + assert envelope.data.base_data.name.startswith("pfazure.runs.get") - with patch.object(PromptFlowSDKLogHandler, "emit") as mock_logger: + with patch.object(PromptFlowSDKExporter, "_log_to_envelope") as mock_logger, patch( + "promptflow._sdk._telemetry.telemetry.get_telemetry_logger", side_effect=get_telemetry_logger + ): mock_logger.side_effect = log_event - # mock_error_logger.side_effect = log_event try: pf.runs.get("not_exist") except RunNotFoundError: pass + logger = get_telemetry_logger() + logger.handlers[0].flush() + check_evelope() def test_default_logging_behavior(self): assert is_telemetry_enabled() is True @@ -298,6 +325,7 @@ def check_inner_call(*args, **kwargs): mock_logger.side_effect = check_inner_call run = load_run( source=f"{RUNS_DIR}/run_with_env.yaml", + params_override=[{"environment_variables": {}}], ) # create 2 times will get 2 request ids run.name = str(uuid.uuid4()) @@ -312,32 +340,38 @@ def check_inner_call(*args, **kwargs): assert first_sdk_calls[-1] is True def test_scrub_fields(self): - from promptflow import PFClient + from promptflow._sdk._telemetry.logging_handler import PromptFlowSDKExporter - pf = PFClient() + envelope = None + log_to_envelope = PromptFlowSDKExporter( + connection_string="InstrumentationKey=00000000-0000-0000-0000-000000000000", custom_dimensions={} + )._log_to_envelope - from promptflow._sdk._telemetry.logging_handler import PromptFlowSDKLogHandler + def log_event(log_data): + nonlocal envelope + envelope = log_to_envelope(log_data) - def log_event(*args, **kwargs): - record = args[0] - assert record.custom_dimensions is not None + def check_evelope(): logger = get_telemetry_logger() handler = logger.handlers[0] assert isinstance(handler, PromptFlowSDKLogHandler) - envelope = handler.log_record_to_envelope(record) + + assert "message" == envelope.data.base_data.name + assert "key" in envelope.data.base_data.properties + assert "test" == envelope.data.base_data.properties["key"] + # device name removed assert "ai.cloud.roleInstance" not in envelope.tags assert "ai.device.id" not in envelope.tags # role name should be scrubbed or kept in whitelist assert envelope.tags["ai.cloud.role"] in [os.path.basename(sys.argv[0]), "***"] - with patch.object(PromptFlowSDKLogHandler, "emit") as mock_logger: + with patch.object(PromptFlowSDKExporter, "_log_to_envelope") as mock_logger: mock_logger.side_effect = log_event - # mock_error_logger.side_effect = log_event - try: - pf.runs.get("not_exist") - except RunNotFoundError: - pass + logger = get_telemetry_logger() + logger.info("message", extra={"custom_dimensions": {"key": "test"}}) + logger.handlers[0].flush() + check_evelope() def test_different_event_for_node_run(self): from promptflow import PFClient @@ -371,3 +405,57 @@ def assert_flow_test(*args, **kwargs): mock_logger.side_effect = assert_flow_test pf.flows.test(temp_dir, inputs={"key": "API_BASE"}) + + @pytest.mark.skipif( + condition=not pytest.is_live, + reason="Live mode can run successfully, but an error will be reported when recording.", + ) + def test_run_yaml_type(self, pf, randstr: Callable[[str], str]): + from promptflow._constants import FlowType + from promptflow._sdk._configuration import Configuration + from promptflow._sdk._telemetry.logging_handler import PromptFlowSDKExporter + + envelope = None + flow_type = None + config = Configuration.get_instance() + custom_dimensions = { + "python_version": platform.python_version(), + "installation_id": config.get_or_set_installation_id(), + } + log_to_envelope = PromptFlowSDKExporter( + connection_string="InstrumentationKey=00000000-0000-0000-0000-000000000000", + custom_dimensions=custom_dimensions, + )._log_to_envelope + + def log_event(log_data): + nonlocal envelope + envelope = log_to_envelope(log_data) + + def check_evelope(): + assert envelope.data.base_data.name.startswith("pfazure.runs.create_or_update") + custom_dimensions = pydash.get(envelope, "data.base_data.properties") + assert isinstance(custom_dimensions, dict) + assert "flow_type" in custom_dimensions + assert custom_dimensions["flow_type"] == flow_type + + with patch.object(PromptFlowSDKExporter, "_log_to_envelope", side_effect=log_event), patch( + "promptflow._sdk._telemetry.telemetry.get_telemetry_logger", side_effect=get_telemetry_logger + ): + flow_type = FlowType.DAG_FLOW + pf.run( + flow="./tests/test_configs/flows/print_input_flow", + data="./tests/test_configs/datas/print_input_flow.jsonl", + name=randstr("name"), + ) + logger = get_telemetry_logger() + logger.handlers[0].flush() + check_evelope() + + flow_type = FlowType.FLEX_FLOW + pf.run( + flow="./tests/test_configs/eager_flows/simple_with_req", + data="./tests/test_configs/datas/simple_eager_flow_data.jsonl", + name=randstr("name"), + ) + logger.handlers[0].flush() + check_evelope() diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_arm_connection_build.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_arm_connection_build.py index f23062b460a..40ed94627a0 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_arm_connection_build.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_arm_connection_build.py @@ -6,12 +6,12 @@ def build_from_data_and_assert(data, expected): - from promptflow.azure._models._models import WorkspaceConnectionPropertiesV2BasicResource - from promptflow.azure.operations._arm_connection_operations import ArmConnectionOperations + from promptflow.core._connection_provider._models._models import WorkspaceConnectionPropertiesV2BasicResource + from promptflow.core._connection_provider._workspace_connection_provider import WorkspaceConnectionProvider data = copy.deepcopy(data) obj = WorkspaceConnectionPropertiesV2BasicResource.deserialize(data) - assert ArmConnectionOperations.build_connection_dict_from_rest_object("mock", obj) == expected + assert WorkspaceConnectionProvider.build_connection_dict_from_rest_object("mock", obj) == expected @pytest.mark.unittest diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_azure_cli_activity_name.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_azure_cli_activity_name.py index 9b9a7eb731f..3afcd87ef76 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_azure_cli_activity_name.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_azure_cli_activity_name.py @@ -1,7 +1,7 @@ import pytest -from promptflow._cli._pf_azure.entry import get_parser_args from promptflow._cli._utils import _get_cli_activity_name +from promptflow.azure._cli.entry import get_parser_args def get_cli_activity_name(cmd): diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_blob_client.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_blob_client.py new file mode 100644 index 00000000000..b727cf0893e --- /dev/null +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_blob_client.py @@ -0,0 +1,24 @@ +import datetime + +import pytest + +from promptflow.azure._storage.blob.client import _datastore_cache, _get_datastore_client_key, _get_datastore_from_cache + + +@pytest.mark.unittest +class TestBlobClient: + def test_get_datastore_from_cache(self): + _datastore_cache["test"] = { + "expire_at": datetime.datetime.now() + datetime.timedelta(0, -1), # already expire + "datastore": "test", + } + assert _get_datastore_from_cache("test") is None + + _datastore_cache["test"] = { + "expire_at": datetime.datetime.now() + datetime.timedelta(1, 0), # expire after 1 day + "datastore": "test", + } + assert _get_datastore_from_cache("test") == "test" + + def test_get_datastore_client_key(self): + assert _get_datastore_client_key("sub", "rg", "ws") == "sub@rg@ws" diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cli.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cli.py index 3a2e2fdb11a..1763de37276 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cli.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cli.py @@ -17,7 +17,7 @@ def run_pf_command(*args, cwd=None): - from promptflow._cli._pf_azure.entry import main + from promptflow.azure._cli.entry import main origin_argv, origin_cwd = sys.argv, os.path.abspath(os.curdir) try: diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_collection.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_collection.py new file mode 100644 index 00000000000..90cfb883b13 --- /dev/null +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_collection.py @@ -0,0 +1,74 @@ +from unittest import mock + +import pytest + +from promptflow._sdk._constants import CreatedByFieldName +from promptflow.azure._storage.cosmosdb.collection import CollectionCosmosDB + + +@pytest.mark.unittest +class TestCollectionCosmosDB: + @pytest.fixture(autouse=True) + def setUp(self): + self.span = mock.Mock() + self.span.attributes = dict() + self.span.resource = { + "attributes": { + "collection.id": "test_collection_id", + "collection": "test_collection_name", + } + } + self.created_by = {CreatedByFieldName.OBJECT_ID: "test_user_id"} + self.collection = CollectionCosmosDB(self.span, True, self.created_by) + + def test_collection_properties_cloud(self): + collection = CollectionCosmosDB(self.span, True, self.created_by) + assert collection.collection_name == "test_collection_name" + assert collection.collection_id == "test_collection_id" + assert collection.location == 1 + + self.span.attributes = {"batch_run_id": "test_batch_run_id"} + collection = CollectionCosmosDB(self.span, True, self.created_by) + assert collection.collection_name == "test_collection_name" + assert collection.collection_id == "test_batch_run_id" + assert collection.location == 1 + + def test_collection_properties_local(self): + collection = CollectionCosmosDB(self.span, False, self.created_by) + assert collection.collection_name == "test_collection_name" + # For local, use collection name and user id to generate collection id + assert collection.collection_id == "test_collection_name_test_user_id" + assert collection.location == 0 + + self.span.attributes = {"batch_run_id": "test_batch_run_id"} + collection = CollectionCosmosDB(self.span, False, self.created_by) + assert collection.collection_name == "test_collection_name" + assert collection.collection_id == "test_batch_run_id" + assert collection.location == 0 + + def test_create_collection_if_not_exist(self): + client = mock.Mock() + with mock.patch("promptflow.azure._storage.cosmosdb.collection.safe_create_cosmosdb_item") as mock_safe_write: + self.collection.create_collection_if_not_exist(client) + mock_safe_write.assert_called_once() + + def test_update_collection_updated_at(self): + client = mock.Mock() + self.span.attributes = dict() + self.span.resource = {"collection.id": "test_collection_id"} + + self.collection.update_collection_updated_at_info(client) + + client.patch_item.assert_called_once() + + def test_batch_run_operation(self): + client = mock.Mock() + self.span.attributes = {"batch_run_id": "test_batch_run_id"} + self.span.resource = {"collection.id": "test_collection_id"} + + with mock.patch("promptflow.azure._storage.cosmosdb.summary.safe_create_cosmosdb_item") as mock_safe_write: + self.collection.create_collection_if_not_exist(client) + mock_safe_write.assert_not_called() + + self.collection.create_collection_if_not_exist(client) + client.patch_item.assert_not_called() diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cosmosdb.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cosmosdb.py index 7077c067bbc..c2501cdc4be 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cosmosdb.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cosmosdb.py @@ -2,7 +2,12 @@ import pytest -from promptflow.azure._storage.cosmosdb.client import _get_client_from_map, _get_container_lock, client_map +from promptflow.azure._storage.cosmosdb.client import ( + _get_client_from_map, + _get_container_lock, + _get_db_client_key, + client_map, +) @pytest.mark.unittest @@ -25,3 +30,6 @@ def test_get_container_lock(self): assert container_lock is not None assert _get_container_lock("test2") != container_lock assert _get_container_lock("test") == container_lock + + def test_get_db_client_key(self): + assert _get_db_client_key("container", "sub", "rg", "ws") == "sub@rg@ws@container" diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cosmosdb_utils.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cosmosdb_utils.py new file mode 100644 index 00000000000..45dca24f734 --- /dev/null +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_cosmosdb_utils.py @@ -0,0 +1,48 @@ +from dataclasses import dataclass +from unittest import mock + +import pytest +from azure.cosmos.exceptions import CosmosResourceExistsError, CosmosResourceNotFoundError + +from promptflow.azure._storage.cosmosdb.cosmosdb_utils import safe_create_cosmosdb_item + + +@dataclass +class Item: + id: str + partition_key: str + + +@pytest.mark.unittest +class TestCosmosDBUtils: + @pytest.fixture(autouse=True) + def setUp(self): + self.item = Item(id="id", partition_key="partition_key") + + def test_safe_write_to_cosmosdb_normal(self): + client = mock.Mock() + client.read_item.side_effect = CosmosResourceNotFoundError + + safe_create_cosmosdb_item(client, self.item) + + client.read_item.assert_called_once_with(item=self.item.id, partition_key=self.item.partition_key) + client.create_item.assert_called_once() + + def test_safe_write_to_cosmosdb_conflict(self): + client = mock.Mock() + client.read_item.side_effect = CosmosResourceNotFoundError + client.create_item.side_effect = CosmosResourceExistsError + + safe_create_cosmosdb_item(client, self.item) + + client.read_item.assert_called_once_with(item=self.item.id, partition_key=self.item.partition_key) + client.create_item.assert_called_once() + + def test_safe_write_to_cosmosdb_already_exist(self): + client = mock.Mock() + client.read_item.return_value = self.item + + safe_create_cosmosdb_item(client, self.item) + + client.read_item.assert_called_once_with(item=self.item.id, partition_key=self.item.partition_key) + client.create_item.assert_not_called() diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_exceptions.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_exceptions.py index 4c43258b909..1ce7c1206e7 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_exceptions.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_exceptions.py @@ -2,11 +2,13 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- import re +from pathlib import Path import pytest from azure.core.exceptions import HttpResponseError + from promptflow._sdk._orm import RunInfo -from promptflow.exceptions import _ErrorInfo, ErrorCategory, ErrorTarget, UserErrorException +from promptflow.exceptions import ErrorCategory, ErrorTarget, UserErrorException, _ErrorInfo from promptflow.executor import FlowValidator from promptflow.executor._errors import InvalidNodeReference @@ -238,3 +240,77 @@ def test_module_name_in_error_target_map(self): for module_name in module_target_map.keys(): module = importlib.import_module(module_name) assert module.__name__ == module_name + + def test_message_with_empty_privacy_info(self): + from promptflow._cli._utils import get_secret_input + + ex = None + try: + get_secret_input(111) + except Exception as e: + ex = e + _, _, _, error_message, _ = _ErrorInfo.get_error_info(ex) + assert error_message == "prompt must be a str, not $int" + + try: + get_secret_input("str", mask=11) + except Exception as e: + ex = e + _, _, _, error_message, _ = _ErrorInfo.get_error_info(ex) + assert error_message == "mask argument must be a one-character str, not $int" + + def test_message_with_privacy_info_filter(self): + from promptflow._sdk._load_functions import _load_env_to_connection + + ex = None + try: + _load_env_to_connection(source="./test/test", params_override=[]) + except Exception as e: + ex = e + _, _, _, error_message, _ = _ErrorInfo.get_error_info(ex) + assert error_message == "Please specify --name when creating connection from .env." + + try: + _load_env_to_connection(source="./test/test", params_override=[{"name": "test"}]) + except Exception as e: + ex = e + _, _, _, error_message, _ = _ErrorInfo.get_error_info(ex) + assert error_message == "File '{privacy_info}' not found." + + def test_message_with_privacy_info_filter2(self): + source = Path(__file__) + e = ValueError( + f"Load nothing from dotenv file {source.absolute().as_posix()!r}, " + f"or not find file {source.absolute().as_posix()}, " + "please make sure the file is not empty and readable." + ) + ex = UserErrorException(str(e), error=e, privacy_info=[source.absolute().as_posix()]) + _, _, _, error_message, _ = _ErrorInfo.get_error_info(ex) + assert error_message == ( + "Load nothing from dotenv file '{privacy_info}', " + "or not find file {privacy_info}, " + "please make sure the file is not empty and readable." + ) + + ex = UserErrorException(f"Load entity error: {ex}", privacy_info=[str(ex)]) + _, _, _, error_message, _ = _ErrorInfo.get_error_info(ex) + assert error_message == "Load entity error: {privacy_info}" + + func = self.test_message_with_privacy_info_filter2 + request_id = "0000-0000-0000-0000" + ex.status_code = 404 + ex.reason = "params error" + ex = UserErrorException( + f"Calling {func.__name__} failed with request id: {request_id}" + f"Status code: {ex.status_code}" + f"Reason: {ex.reason}" + f"Error message: {ex.message}", + privacy_info=[ex.reason, ex.message], + ) + _, _, _, error_message, _ = _ErrorInfo.get_error_info(ex) + assert error_message == ( + "Calling test_message_with_privacy_info_filter2 failed with request id: 0000-0000-0000-0000" + "Status code: 404" + "Reason: {privacy_info}" + "Error message: {privacy_info}" + ) diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_flow_entity.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_flow_entity.py index ebd6229747a..a1945ba230a 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_flow_entity.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_flow_entity.py @@ -8,7 +8,6 @@ from pathlib import Path import pytest -from marshmallow import ValidationError from mock.mock import Mock from promptflow import load_run @@ -16,6 +15,7 @@ from promptflow._utils.flow_utils import load_flow_dag from promptflow.azure._constants._flow import ENVIRONMENT, PYTHON_REQUIREMENTS_TXT from promptflow.azure._entities._flow import Flow +from promptflow.exceptions import ValidationException tests_root_dir = Path(__file__).parent.parent.parent FLOWS_DIR = (tests_root_dir / "test_configs/flows").resolve() @@ -124,7 +124,7 @@ def test_load_yaml_run_with_resources(self): def test_load_yaml_run_with_resources_unsupported_field(self): source = f"{RUNS_DIR}/sample_bulk_run_with_idle_time.yaml" - with pytest.raises(ValidationError) as e: + with pytest.raises(ValidationException) as e: load_run(source=source, params_override=[{"name": str(uuid.uuid4())}]) assert "Unknown field" in str(e.value) diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_flow_operations.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_flow_operations.py index 969e1e713cd..e6f7e5512ce 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_flow_operations.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_flow_operations.py @@ -12,6 +12,7 @@ from promptflow.exceptions import UserErrorException tests_root_dir = Path(__file__).parent.parent.parent +eager_flow_test_dir = tests_root_dir / "test_configs/eager_flows" flow_test_dir = tests_root_dir / "test_configs/flows" data_dir = tests_root_dir / "test_configs/datas" @@ -87,3 +88,11 @@ def mock_get_arm_token(*args, **kwargs) -> str: user_object_id, user_tenant_id = service_caller._get_user_identity_info() assert user_object_id == mock_oid assert user_tenant_id == mock_tid + + def test_eager_flow_creation(self, pf): + flow_source = eager_flow_test_dir / "simple_with_yaml" + with pytest.raises(UserErrorException) as e: + pf.flows.create_or_update( + flow=flow_source, + ) + assert "Creating it to cloud is not supported" in str(e.value) diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_pf_client.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_pf_client.py index e874936248d..b54df41ea89 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_pf_client.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_pf_client.py @@ -7,10 +7,10 @@ from promptflow import PFClient from promptflow._sdk.operations._connection_operations import ConnectionOperations from promptflow._sdk.operations._local_azure_connection_operations import LocalAzureConnectionOperations +from promptflow.core._connection_provider._utils import extract_workspace +from promptflow.core._errors import MalformedConnectionProviderConfig from promptflow.exceptions import UserErrorException -from ..recording_utilities import is_live - AZUREML_RESOURCE_PROVIDER = "Microsoft.MachineLearningServices" RESOURCE_ID_FORMAT = "/subscriptions/{}/resourceGroups/{}/providers/{}/workspaces/{}" @@ -20,7 +20,7 @@ class TestPFClient: # Test pf client when connection provider is azureml. # This tests suites need azure dependencies. - @pytest.mark.skipif(condition=not is_live(), reason="This test requires an actual PFClient") + @pytest.mark.skipif(condition=not pytest.is_live, reason="This test requires an actual PFClient") def test_connection_provider(self, subscription_id: str, resource_group_name: str, workspace_name: str): target = "promptflow._sdk._pf_client.Configuration" with mock.patch(target) as mocked: @@ -32,10 +32,10 @@ def test_connection_provider(self, subscription_id: str, resource_group_name: st with mock.patch(target) as mocked: mocked.return_value.get_connection_provider.return_value = "azureml:xx" - with pytest.raises(ValueError) as e: + with pytest.raises(MalformedConnectionProviderConfig) as e: client = PFClient() assert client.connections - assert "Malformed connection provider string" in str(e.value) + assert "Malformed connection provider config" in str(e.value) with mock.patch(target) as mocked: mocked.return_value.get_connection_provider.return_value = "local" @@ -60,22 +60,20 @@ def test_connection_provider(self, subscription_id: str, resource_group_name: st assert isinstance(client.connections, LocalAzureConnectionOperations) def test_local_azure_connection_extract_workspace(self): - res = LocalAzureConnectionOperations._extract_workspace( + res = extract_workspace( "azureml://subscriptions/123/resourceGroups/456/providers/Microsoft.MachineLearningServices/workspaces/789" ) assert res == ("123", "456", "789") - res = LocalAzureConnectionOperations._extract_workspace( - "azureml://subscriptions/123/resourcegroups/456/workspaces/789" - ) + res = extract_workspace("azureml://subscriptions/123/resourcegroups/456/workspaces/789") assert res == ("123", "456", "789") - with pytest.raises(ValueError) as e: - LocalAzureConnectionOperations._extract_workspace("azureml:xx") - assert "Malformed connection provider string" in str(e.value) + with pytest.raises(MalformedConnectionProviderConfig) as e: + extract_workspace("azureml:xx") + assert "Malformed connection provider config" in str(e.value) - with pytest.raises(ValueError) as e: - LocalAzureConnectionOperations._extract_workspace( + with pytest.raises(MalformedConnectionProviderConfig) as e: + extract_workspace( "azureml://subscriptions/123/resourceGroups/456/providers/Microsoft.MachineLearningServices/workspaces/" ) - assert "Malformed connection provider string" in str(e.value) + assert "Malformed connection provider config" in str(e.value) diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_run_operations.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_run_operations.py index bff64eb85b0..ac87ff57736 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_run_operations.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_run_operations.py @@ -6,12 +6,15 @@ from azure.ai.ml.entities import IdentityConfiguration from pytest_mock import MockerFixture +from promptflow._sdk._errors import RunOperationParameterError +from promptflow._sdk._utils import parse_otel_span_status_code from promptflow._sdk.entities import Run from promptflow.azure import PFClient from promptflow.exceptions import UserErrorException FLOWS_DIR = "./tests/test_configs/flows" DATAS_DIR = "./tests/test_configs/datas" +EAGER_FLOWS_DIR = "./tests/test_configs/eager_flows" @pytest.mark.unittest @@ -79,3 +82,39 @@ def test_run_with_identity_illegal_cases(self, pf: PFClient, identity, error_msg with pytest.raises(UserErrorException) as e: pf.runs._resolve_identity(run) assert error_msg in str(e) + + def test_flex_flow_with_imported_func(self, pf: PFClient): + # TODO(3017093): won't support this for now + with pytest.raises(UserErrorException) as e: + pf.run( + flow=parse_otel_span_status_code, + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + # set code folder to avoid snapshot too big + code=f"{EAGER_FLOWS_DIR}/multiple_entries", + column_mapping={"value": "${data.input_val}"}, + ) + assert "not supported" in str(e) + + def test_wrong_workspace_type( + self, mocker: MockerFixture, subscription_id: str, resource_group_name: str, workspace_name: str + ): + from sdk_cli_azure_test._azure_utils import get_cred + + from promptflow.recording.azure import get_pf_client_for_replay + + # the test target "_workspace_default_datastore" is a cached property so the pf client needs to be recreated + # otherwise the test may fail due to the cached value + if pytest.is_replay: + pf = get_pf_client_for_replay() + else: + pf = PFClient( + credential=get_cred(), + subscription_id=subscription_id, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + ) + # test wrong workspace type "hub" + mocker.patch.object(pf.runs._workspace, "_kind", "hub") + with pytest.raises(RunOperationParameterError, match="Failed to get default workspace datastore"): + datastore = pf.runs._workspace_default_datastore + assert datastore diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_span.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_span.py index f757b20a1e7..2d94e57136d 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_span.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_span.py @@ -1,3 +1,5 @@ +import datetime + import pytest from promptflow._sdk.entities._trace import Span as SpanEntity @@ -7,77 +9,114 @@ @pytest.mark.unittest class TestSpan: FAKE_CREATED_BY = {"oid": "fake_oid"} + FAKE_COLLECTION_ID = "fake_collection_id" + FAKE_TRACE_ID = "0xacf2291a630af328da8fabd6bf49f653" + FAKE_SPAN_ID = "0x9ded7ce65d5f7775" def test_to_dict(self): span = Span( SpanEntity( + trace_id=self.FAKE_TRACE_ID, + span_id=self.FAKE_SPAN_ID, name="test", context={ - "trace_id": "0xacf2291a630af328da8fabd6bf49f653", - "span_id": "0x9ded7ce65d5f7775", + "trace_id": self.FAKE_TRACE_ID, + "span_id": self.FAKE_SPAN_ID, }, kind="test", - parent_span_id="test", - start_time="test", - end_time="test", + parent_id="test", + start_time=datetime.datetime.fromisoformat("2022-01-01T00:00:00"), + end_time=datetime.datetime.fromisoformat("2022-01-01T00:01:00"), status={}, attributes={}, events=[], links=[], resource={}, - span_type=None, - session_id=None, ), + collection_id=self.FAKE_COLLECTION_ID, created_by=self.FAKE_CREATED_BY, ) assert span.to_dict() == { "name": "test", "kind": "test", "parent_id": "test", - "start_time": "test", - "end_time": "test", + "start_time": "2022-01-01T00:00:00", + "end_time": "2022-01-01T00:01:00", "context": { - "trace_id": "0xacf2291a630af328da8fabd6bf49f653", - "span_id": "0x9ded7ce65d5f7775", + "trace_id": self.FAKE_TRACE_ID, + "span_id": self.FAKE_SPAN_ID, }, - "id": "0x9ded7ce65d5f7775", + "id": self.FAKE_SPAN_ID, + "partition_key": "fake_collection_id", + "collection_id": "fake_collection_id", "created_by": {"oid": "fake_oid"}, } span = Span( SpanEntity( + trace_id=self.FAKE_TRACE_ID, + span_id=self.FAKE_SPAN_ID, name="test", context={ - "trace_id": "0xacf2291a630af328da8fabd6bf49f653", - "span_id": "0x9ded7ce65d5f7775", + "trace_id": self.FAKE_TRACE_ID, + "span_id": self.FAKE_SPAN_ID, }, kind="test", - parent_span_id="test", - start_time="test", - end_time="test", + parent_id="test", + start_time=datetime.datetime.fromisoformat("2022-01-01T00:00:00"), + end_time=datetime.datetime.fromisoformat("2022-01-01T00:01:00"), status={}, attributes={"line_run_id": "test_line_run_id"}, events=[], links=[], - resource={}, - span_type=None, - session_id="test_session_id", + resource={"collection": "test_session_id"}, ), + collection_id=self.FAKE_COLLECTION_ID, created_by=self.FAKE_CREATED_BY, ) assert span.to_dict() == { "name": "test", "kind": "test", "parent_id": "test", - "start_time": "test", - "end_time": "test", + "start_time": "2022-01-01T00:00:00", + "end_time": "2022-01-01T00:01:00", "attributes": {"line_run_id": "test_line_run_id"}, - "partition_key": "test_session_id", + "partition_key": "fake_collection_id", "context": { - "trace_id": "0xacf2291a630af328da8fabd6bf49f653", - "span_id": "0x9ded7ce65d5f7775", + "trace_id": self.FAKE_TRACE_ID, + "span_id": self.FAKE_SPAN_ID, }, - "id": "0x9ded7ce65d5f7775", - "partition_key": "test_session_id", + "id": self.FAKE_SPAN_ID, + "collection_id": "fake_collection_id", "created_by": {"oid": "fake_oid"}, + "resource": {"collection": "test_session_id"}, } + + def test_event_path(self): + span = Span( + SpanEntity( + name="test", + trace_id=self.FAKE_TRACE_ID, + span_id=self.FAKE_SPAN_ID, + context={ + "trace_id": self.FAKE_TRACE_ID, + "span_id": self.FAKE_SPAN_ID, + }, + kind="test", + parent_id="test", + start_time=datetime.datetime.fromisoformat("2022-01-01T00:00:00"), + end_time=datetime.datetime.fromisoformat("2022-01-01T00:01:00"), + status={}, + attributes={}, + events=[], + links=[], + resource={}, + ), + collection_id=self.FAKE_COLLECTION_ID, + created_by=self.FAKE_CREATED_BY, + ) + + assert ( + span._event_path(1) + == f".promptflow/.trace/{self.FAKE_COLLECTION_ID}/{self.FAKE_TRACE_ID}/{self.FAKE_SPAN_ID}/1" + ) diff --git a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_summary.py b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_summary.py index 301ca2e9e60..7066ead5b29 100644 --- a/src/promptflow/tests/sdk_cli_azure_test/unittests/test_summary.py +++ b/src/promptflow/tests/sdk_cli_azure_test/unittests/test_summary.py @@ -1,211 +1,262 @@ +import datetime from dataclasses import asdict from unittest import mock import pytest -from flask import Flask -from promptflow._constants import SpanAttributeFieldName, SpanFieldName +from promptflow._constants import OK_LINE_RUN_STATUS, SpanAttributeFieldName from promptflow._sdk.entities._trace import Span -from promptflow.azure._storage.cosmosdb.summary import LineEvaluation, Summary, SummaryLine +from promptflow.azure._storage.cosmosdb.summary import ( + InsertEvaluationsRetriableException, + LineEvaluation, + Summary, + SummaryLine, +) +@pytest.mark.unittest class TestSummary: FAKE_CREATED_BY = {"oid": "fake_oid"} + FAKE_COLLECTION_ID = "fake_collection_id" + FAKE_LOGGER = mock.Mock() @pytest.fixture(autouse=True) def setup_data(self): test_span = Span( + trace_id="test_trace_id", + span_id="0987654321", name="test_span", context={"trace_id": "test_trace_id", "span_id": "0987654321"}, kind="client", - start_time="2022-01-01T00:00:00Z", - end_time="2022-01-01T00:01:00Z", - status={"status_code": "OK"}, + start_time=datetime.datetime.fromisoformat("2022-01-01T00:00:00"), + end_time=datetime.datetime.fromisoformat("2022-01-01T00:01:00"), + status={"status_code": OK_LINE_RUN_STATUS}, attributes={"key1": "value1", "key2": "value2"}, - resource={"type": "resource_type", "name": "resource_name"}, - span_type="custom", - session_id="test_session_id", - parent_span_id="9876543210", - events=[{"name": "event1", "time": "2022-01-01T00:00:30Z"}], + resource={"type": "resource_type", "name": "resource_name", "collection": "test_session_id"}, + parent_id="9876543210", + events=[{"name": "event1", "time": "2022-01-01T00:00:30"}], links=[{"trace_id": "0987654321", "span_id": "1234567890"}], - path="/path/to/span", - run="test_run", - experiment="test_experiment", ) - self.summary = Summary(test_span, self.FAKE_CREATED_BY) - app = Flask(__name__) - with app.app_context(): - yield + self.summary = Summary(test_span, self.FAKE_COLLECTION_ID, self.FAKE_CREATED_BY, self.FAKE_LOGGER) def test_non_root_span_does_not_persist(self): - with mock.patch.object(self.summary, "_persist_line_run") as mock_persist_line_run, mock.patch.object( - self.summary, "_insert_evaluation" - ) as mock_insert_evaluation: - mock_client = mock.Mock() - self.summary.span.parent_span_id = "parent_span_id" - self.summary.persist(mock_client) - mock_persist_line_run.assert_not_called() - mock_insert_evaluation.assert_not_called() + mock_client = mock.Mock() + self.summary.span.parent_id = "parent_span_id" - def test_aggregate_run_does_not_persist(self): - with mock.patch.object(self.summary, "_persist_line_run") as mock_persist_line_run, mock.patch.object( - self.summary, "_insert_evaluation" - ) as mock_insert_evaluation: - mock_client = mock.Mock() - self.summary.span.parent_span_id = None - attributes = self.summary.span._content[SpanFieldName.ATTRIBUTES] - attributes.pop(SpanAttributeFieldName.LINE_RUN_ID, None) - attributes.pop(SpanAttributeFieldName.BATCH_RUN_ID, None) + with mock.patch.multiple( + self.summary, + _persist_running_item=mock.DEFAULT, + _persist_line_run=mock.DEFAULT, + _insert_evaluation_with_retry=mock.DEFAULT, + ) as values: self.summary.persist(mock_client) - mock_persist_line_run.assert_called_once() - mock_insert_evaluation.assert_not_called() + values["_persist_running_item"].assert_called_once() + values["_persist_line_run"].assert_not_called() + values["_insert_evaluation_with_retry"].assert_not_called() - def test_non_evaluation_span_persists_as_main_run(self): - with mock.patch.object(self.summary, "_persist_line_run") as mock_persist_line_run, mock.patch.object( - self.summary, "_insert_evaluation" - ) as mock_insert_evaluation: - mock_client = mock.Mock() - self.summary.span.parent_span_id = None - self.summary.span._content[SpanFieldName.ATTRIBUTES][SpanAttributeFieldName.LINE_RUN_ID] = "line_run_id" + def test_root_span_persist_main_line(self): + mock_client = mock.Mock() + self.summary.span.parent_id = None + attributes = self.summary.span.attributes + attributes.pop(SpanAttributeFieldName.LINE_RUN_ID, None) + attributes.pop(SpanAttributeFieldName.BATCH_RUN_ID, None) + with mock.patch.multiple( + self.summary, + _persist_running_item=mock.DEFAULT, + _persist_line_run=mock.DEFAULT, + _insert_evaluation_with_retry=mock.DEFAULT, + ) as values: self.summary.persist(mock_client) - mock_persist_line_run.assert_called_once() - mock_insert_evaluation.assert_not_called() + values["_persist_running_item"].assert_not_called() + values["_persist_line_run"].assert_called_once() + values["_insert_evaluation_with_retry"].assert_not_called() - def test_non_evaluation_span_persists_with_referenced_line_run_id(self): - with mock.patch.object(self.summary, "_persist_line_run") as mock_persist_line_run, mock.patch.object( - self.summary, "_insert_evaluation" - ) as mock_insert_evaluation: - mock_client = mock.Mock() - self.summary.span.parent_span_id = None - self.summary.span._content[SpanFieldName.ATTRIBUTES][SpanAttributeFieldName.LINE_RUN_ID] = "line_run_id" - self.summary.span._content[SpanFieldName.ATTRIBUTES][ - SpanAttributeFieldName.REFERENCED_LINE_RUN_ID - ] = "main_line_run_id" + def test_root_evaluation_span_insert(self): + mock_client = mock.Mock() + self.summary.span.parent_id = None + self.summary.span.attributes[SpanAttributeFieldName.LINE_RUN_ID] = "line_run_id" + self.summary.span.attributes[SpanAttributeFieldName.REFERENCED_LINE_RUN_ID] = "main_line_run_id" + with mock.patch.multiple( + self.summary, + _persist_running_item=mock.DEFAULT, + _persist_line_run=mock.DEFAULT, + _insert_evaluation_with_retry=mock.DEFAULT, + ) as values: self.summary.persist(mock_client) - mock_persist_line_run.assert_called_once() - mock_insert_evaluation.assert_called_once() + values["_persist_running_item"].assert_not_called() + values["_persist_line_run"].assert_called_once() + values["_insert_evaluation_with_retry"].assert_called_once() - def test_insert_evaluation_line_run_not_exist(self): + def test_insert_evaluation_not_found(self): client = mock.Mock() - self.summary.span._content = { - SpanFieldName.ATTRIBUTES: { - SpanAttributeFieldName.REFERENCED_LINE_RUN_ID: "referenced_line_run_id", - SpanAttributeFieldName.LINE_RUN_ID: "line_run_id", - SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', - } + self.summary.span.attributes = { + SpanAttributeFieldName.REFERENCED_LINE_RUN_ID: "referenced_line_run_id", + SpanAttributeFieldName.LINE_RUN_ID: "line_run_id", + SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', } client.query_items.return_value = [] - self.summary._insert_evaluation(client) + with pytest.raises(InsertEvaluationsRetriableException): + self.summary._insert_evaluation(client) client.query_items.assert_called_once() client.patch_item.assert_not_called() - def test_insert_evaluation_line_run_normal(self): + def test_insert_evaluation_not_finished(self): client = mock.Mock() - self.summary.span._content = { - SpanFieldName.ATTRIBUTES: { - SpanAttributeFieldName.REFERENCED_LINE_RUN_ID: "referenced_line_run_id", - SpanAttributeFieldName.LINE_RUN_ID: "line_run_id", - SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', - } + self.summary.span.attributes = { + SpanAttributeFieldName.REFERENCED_LINE_RUN_ID: "referenced_line_run_id", + SpanAttributeFieldName.LINE_RUN_ID: "line_run_id", + SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', + } + + client.query_items.return_value = [{"id": "main_id"}] + with pytest.raises(InsertEvaluationsRetriableException): + self.summary._insert_evaluation(client) + client.query_items.assert_called_once() + client.patch_item.assert_not_called() + + def test_insert_evaluation_normal(self): + client = mock.Mock() + self.summary.span.attributes = { + SpanAttributeFieldName.REFERENCED_LINE_RUN_ID: "referenced_line_run_id", + SpanAttributeFieldName.LINE_RUN_ID: "line_run_id", + SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', } expected_item = LineEvaluation( line_run_id="line_run_id", + collection_id=self.FAKE_COLLECTION_ID, trace_id=self.summary.span.trace_id, root_span_id=self.summary.span.span_id, outputs={"output_key": "output_value"}, - display_name=self.summary.span.name, + name=self.summary.span.name, created_by=self.FAKE_CREATED_BY, ) expected_patch_operations = [ {"op": "add", "path": f"/evaluations/{self.summary.span.name}", "value": asdict(expected_item)} ] - client.query_items.return_value = [{"id": "main_id"}] + client.query_items.return_value = [ + {"id": "main_id", "partition_key": "test_main_partition_key", "status": OK_LINE_RUN_STATUS} + ] self.summary._insert_evaluation(client) client.query_items.assert_called_once() client.patch_item.assert_called_once_with( item="main_id", - partition_key="test_session_id", + partition_key="test_main_partition_key", patch_operations=expected_patch_operations, ) - def test_insert_evaluation_batch_run_not_exist(self): + def test_insert_evaluation_query_line(self): client = mock.Mock() - self.summary.span._content = { - SpanFieldName.ATTRIBUTES: { - SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID: "referenced_batch_run_id", - SpanAttributeFieldName.BATCH_RUN_ID: "batch_run_id", - SpanAttributeFieldName.LINE_NUMBER: "1", - SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', - } + self.summary.span.attributes = { + SpanAttributeFieldName.REFERENCED_LINE_RUN_ID: "referenced_line_run_id", + SpanAttributeFieldName.LINE_RUN_ID: "line_run_id", + SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', } - - client.query_items.return_value = [] + client.query_items.return_value = [ + {"id": "main_id", "partition_key": "test_main_partition_key", "status": OK_LINE_RUN_STATUS} + ] self.summary._insert_evaluation(client) - client.query_items.assert_called_once() - client.patch_item.assert_not_called() + client.query_items.assert_called_once_with( + query=( + "SELECT * FROM c WHERE " + "c.line_run_id = @line_run_id AND c.batch_run_id = @batch_run_id AND c.line_number = @line_number" + ), + parameters=[ + {"name": "@line_run_id", "value": "referenced_line_run_id"}, + {"name": "@batch_run_id", "value": None}, + {"name": "@line_number", "value": None}, + ], + enable_cross_partition_query=True, + ) - def test_insert_evaluation_batch_run_normal(self): - client = mock.Mock() - self.summary.span._content = { - SpanFieldName.ATTRIBUTES: { - SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID: "referenced_batch_run_id", - SpanAttributeFieldName.BATCH_RUN_ID: "batch_run_id", - SpanAttributeFieldName.LINE_NUMBER: "1", - SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', - } - } expected_item = LineEvaluation( - batch_run_id="batch_run_id", - line_number="1", + line_run_id="line_run_id", + collection_id=self.FAKE_COLLECTION_ID, trace_id=self.summary.span.trace_id, root_span_id=self.summary.span.span_id, outputs={"output_key": "output_value"}, - display_name=self.summary.span.name, + name=self.summary.span.name, created_by=self.FAKE_CREATED_BY, ) - expected_patch_operations = [ {"op": "add", "path": f"/evaluations/{self.summary.span.name}", "value": asdict(expected_item)} ] + client.patch_item.assert_called_once_with( + item="main_id", + partition_key="test_main_partition_key", + patch_operations=expected_patch_operations, + ) + + def test_insert_evaluation_query_batch_run(self): + client = mock.Mock() + self.summary.span.attributes = { + SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID: "referenced_batch_run_id", + SpanAttributeFieldName.BATCH_RUN_ID: "batch_run_id", + SpanAttributeFieldName.LINE_NUMBER: 1, + SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', + } + client.query_items.return_value = [ + {"id": "main_id", "partition_key": "test_main_partition_key", "status": OK_LINE_RUN_STATUS} + ] - client.query_items.return_value = [{"id": "main_id"}] self.summary._insert_evaluation(client) - client.query_items.assert_called_once() + client.query_items.assert_called_once_with( + query=( + "SELECT * FROM c WHERE " + "c.line_run_id = @line_run_id AND c.batch_run_id = @batch_run_id AND c.line_number = @line_number" + ), + parameters=[ + {"name": "@line_run_id", "value": None}, + {"name": "@batch_run_id", "value": "referenced_batch_run_id"}, + {"name": "@line_number", "value": 1}, + ], + enable_cross_partition_query=True, + ) + + expected_item = LineEvaluation( + batch_run_id="batch_run_id", + collection_id=self.FAKE_COLLECTION_ID, + line_number=1, + trace_id=self.summary.span.trace_id, + root_span_id=self.summary.span.span_id, + outputs={"output_key": "output_value"}, + name=self.summary.span.name, + created_by=self.FAKE_CREATED_BY, + ) + expected_patch_operations = [{"op": "add", "path": "/evaluations/batch_run_id", "value": asdict(expected_item)}] client.patch_item.assert_called_once_with( item="main_id", - partition_key="test_session_id", + partition_key="test_main_partition_key", patch_operations=expected_patch_operations, ) def test_persist_line_run(self): client = mock.Mock() - self.summary.span._content.update( + self.summary.span.attributes.update( { - SpanFieldName.ATTRIBUTES: { - SpanAttributeFieldName.LINE_RUN_ID: "line_run_id", - SpanAttributeFieldName.INPUTS: '{"input_key": "input_value"}', - SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', - SpanAttributeFieldName.SPAN_TYPE: "promptflow.TraceType.Flow", - SpanAttributeFieldName.COMPLETION_TOKEN_COUNT: 10, - SpanAttributeFieldName.PROMPT_TOKEN_COUNT: 5, - SpanAttributeFieldName.TOTAL_TOKEN_COUNT: 15, - }, + SpanAttributeFieldName.LINE_RUN_ID: "line_run_id", + SpanAttributeFieldName.INPUTS: '{"input_key": "input_value"}', + SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', + SpanAttributeFieldName.SPAN_TYPE: "promptflow.TraceType.Flow", + SpanAttributeFieldName.COMPLETION_TOKEN_COUNT: 10, + SpanAttributeFieldName.PROMPT_TOKEN_COUNT: 5, + SpanAttributeFieldName.TOTAL_TOKEN_COUNT: 15, } ) expected_item = SummaryLine( id="test_trace_id", - partition_key="test_session_id", + partition_key=self.FAKE_COLLECTION_ID, + collection_id=self.FAKE_COLLECTION_ID, session_id="test_session_id", line_run_id="line_run_id", trace_id=self.summary.span.trace_id, root_span_id=self.summary.span.span_id, inputs={"input_key": "input_value"}, outputs={"output_key": "output_value"}, - start_time="2022-01-01T00:00:00Z", - end_time="2022-01-01T00:01:00Z", - status="OK", + start_time="2022-01-01T00:00:00", + end_time="2022-01-01T00:01:00", + status=OK_LINE_RUN_STATUS, latency=60.0, name=self.summary.span.name, kind="promptflow.TraceType.Flow", @@ -217,39 +268,37 @@ def test_persist_line_run(self): }, ) - with mock.patch.object(client, "create_item") as mock_create_item: - self.summary._persist_line_run(client) - mock_create_item.assert_called_once_with(body=asdict(expected_item)) + self.summary._persist_line_run(client) + client.upsert_item.assert_called_once_with(body=asdict(expected_item)) def test_persist_batch_run(self): client = mock.Mock() - self.summary.span._content.update( + self.summary.span.attributes.update( { - SpanFieldName.ATTRIBUTES: { - SpanAttributeFieldName.BATCH_RUN_ID: "batch_run_id", - SpanAttributeFieldName.LINE_NUMBER: "1", - SpanAttributeFieldName.INPUTS: '{"input_key": "input_value"}', - SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', - SpanAttributeFieldName.SPAN_TYPE: "promptflow.TraceType.Flow", - SpanAttributeFieldName.COMPLETION_TOKEN_COUNT: 10, - SpanAttributeFieldName.PROMPT_TOKEN_COUNT: 5, - SpanAttributeFieldName.TOTAL_TOKEN_COUNT: 15, - }, - } + SpanAttributeFieldName.BATCH_RUN_ID: "batch_run_id", + SpanAttributeFieldName.LINE_NUMBER: "1", + SpanAttributeFieldName.INPUTS: '{"input_key": "input_value"}', + SpanAttributeFieldName.OUTPUT: '{"output_key": "output_value"}', + SpanAttributeFieldName.SPAN_TYPE: "promptflow.TraceType.Flow", + SpanAttributeFieldName.COMPLETION_TOKEN_COUNT: 10, + SpanAttributeFieldName.PROMPT_TOKEN_COUNT: 5, + SpanAttributeFieldName.TOTAL_TOKEN_COUNT: 15, + }, ) expected_item = SummaryLine( id="test_trace_id", - partition_key="test_session_id", + partition_key=self.FAKE_COLLECTION_ID, session_id="test_session_id", + collection_id=self.FAKE_COLLECTION_ID, batch_run_id="batch_run_id", line_number="1", trace_id=self.summary.span.trace_id, root_span_id=self.summary.span.span_id, inputs={"input_key": "input_value"}, outputs={"output_key": "output_value"}, - start_time="2022-01-01T00:00:00Z", - end_time="2022-01-01T00:01:00Z", - status="OK", + start_time="2022-01-01T00:00:00", + end_time="2022-01-01T00:01:00", + status=OK_LINE_RUN_STATUS, latency=60.0, name=self.summary.span.name, created_by=self.FAKE_CREATED_BY, @@ -261,6 +310,35 @@ def test_persist_batch_run(self): }, ) - with mock.patch.object(client, "create_item") as mock_create_item: - self.summary._persist_line_run(client) - mock_create_item.assert_called_once_with(body=asdict(expected_item)) + self.summary._persist_line_run(client) + client.upsert_item.assert_called_once_with(body=asdict(expected_item)) + + def test_insert_evaluation_with_retry_success(self): + client = mock.Mock() + with mock.patch.object(self.summary, "_insert_evaluation") as mock_insert_evaluation: + self.summary._insert_evaluation_with_retry(client) + mock_insert_evaluation.assert_called_once_with(client) + + def test_insert_evaluation_with_retry_exception(self): + client = mock.Mock() + with mock.patch.object(self.summary, "_insert_evaluation") as mock_insert_evaluation: + mock_insert_evaluation.side_effect = InsertEvaluationsRetriableException() + with mock.patch("time.sleep") as mock_sleep: + self.summary._insert_evaluation_with_retry(client) + mock_insert_evaluation.assert_called_with(client) + assert mock_insert_evaluation.call_count == 3 + assert mock_sleep.call_count == 2 + + def test_insert_evaluation_with_non_retry_exception(self): + client = mock.Mock() + with mock.patch.object(self.summary, "_insert_evaluation") as mock_insert_evaluation: + mock_insert_evaluation.side_effect = Exception() + with pytest.raises(Exception): + self.summary._insert_evaluation_with_retry(client) + assert mock_insert_evaluation.call_count == 1 + + def test_persist_running_item_create_item(self): + client = mock.Mock() + with mock.patch("promptflow.azure._storage.cosmosdb.summary.safe_create_cosmosdb_item") as mock_safe_write: + self.summary._persist_running_item(client) + mock_safe_write.assert_called_once() diff --git a/src/promptflow/tests/sdk_cli_global_config_test/conftest.py b/src/promptflow/tests/sdk_cli_global_config_test/conftest.py index a5c066e15b8..672e866793f 100644 --- a/src/promptflow/tests/sdk_cli_global_config_test/conftest.py +++ b/src/promptflow/tests/sdk_cli_global_config_test/conftest.py @@ -1,8 +1,10 @@ # --------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # --------------------------------------------------------- +import os import pytest +from _constants import DEFAULT_RESOURCE_GROUP_NAME, DEFAULT_SUBSCRIPTION_ID, DEFAULT_WORKSPACE_NAME from promptflow import PFClient from promptflow._sdk._configuration import Configuration @@ -11,6 +13,25 @@ RESOURCE_ID_FORMAT = "/subscriptions/{}/resourceGroups/{}/providers/{}/workspaces/{}" +# region pfazure constants +@pytest.fixture(scope="session") +def subscription_id() -> str: + return os.getenv("PROMPT_FLOW_SUBSCRIPTION_ID", DEFAULT_SUBSCRIPTION_ID) + + +@pytest.fixture(scope="session") +def resource_group_name() -> str: + return os.getenv("PROMPT_FLOW_RESOURCE_GROUP_NAME", DEFAULT_RESOURCE_GROUP_NAME) + + +@pytest.fixture(scope="session") +def workspace_name() -> str: + return os.getenv("PROMPT_FLOW_WORKSPACE_NAME", DEFAULT_WORKSPACE_NAME) + + +# endregion + + @pytest.fixture def pf() -> PFClient: return PFClient() diff --git a/src/promptflow/tests/sdk_cli_global_config_test/e2etests/test_global_config.py b/src/promptflow/tests/sdk_cli_global_config_test/e2etests/test_global_config.py index ee2dc6d372e..cf528f63003 100644 --- a/src/promptflow/tests/sdk_cli_global_config_test/e2etests/test_global_config.py +++ b/src/promptflow/tests/sdk_cli_global_config_test/e2etests/test_global_config.py @@ -1,7 +1,12 @@ from pathlib import Path +import mock import pytest +from promptflow._sdk._load_functions import load_flow +from promptflow._sdk.entities._flow._flow_context_resolver import FlowContextResolver +from promptflow.core._connection_provider._workspace_connection_provider import WorkspaceConnectionProvider + FLOWS_DIR = Path(__file__).parent.parent.parent / "test_configs" / "flows" DATAS_DIR = Path(__file__).parent.parent.parent / "test_configs" / "datas" @@ -27,3 +32,17 @@ def test_connection_operations(self, pf) -> None: with pytest.raises(NotImplementedError): pf.connections.delete(name="test_connection") + + def test_flow_as_func(self): + # Assert flow as func use azure provider, honor global connection config + def assert_client(mock_self, provider, **kwargs): + assert isinstance(provider, WorkspaceConnectionProvider) + return { + "azure_open_ai_connection": provider.get( + name="azure_open_ai_connection" + )._to_execution_connection_dict() + } + + flow = load_flow(source=f"{FLOWS_DIR}/web_classification") + with mock.patch("promptflow.core._serving.flow_invoker.FlowInvoker.resolve_connections", assert_client): + FlowContextResolver.resolve(flow=flow) diff --git a/src/promptflow/tests/sdk_cli_test/.coveragerc b/src/promptflow/tests/sdk_cli_test/.coveragerc index 1a9649c810b..779ff0e9a37 100644 --- a/src/promptflow/tests/sdk_cli_test/.coveragerc +++ b/src/promptflow/tests/sdk_cli_test/.coveragerc @@ -6,4 +6,7 @@ source = omit = */promptflow/azure/_restclient/* */promptflow/azure/_models/* + */promptflow/core/_connection_provider/_models* + */promptflow/executor/* *__init__.py* + */promptflow/_sdk/_serving/* diff --git a/src/promptflow/tests/sdk_cli_test/conftest.py b/src/promptflow/tests/sdk_cli_test/conftest.py index 0cfa8cbd9a4..ee5cf6ff048 100644 --- a/src/promptflow/tests/sdk_cli_test/conftest.py +++ b/src/promptflow/tests/sdk_cli_test/conftest.py @@ -10,37 +10,53 @@ from pytest_mock import MockerFixture from sqlalchemy import create_engine -from promptflow import PFClient from promptflow._sdk._configuration import Configuration from promptflow._sdk._constants import EXPERIMENT_CREATED_ON_INDEX_NAME, EXPERIMENT_TABLE_NAME, LOCAL_MGMT_DB_PATH -from promptflow._sdk._serving.app import create_app as create_serving_app from promptflow._sdk.entities import AzureOpenAIConnection as AzureOpenAIConnectionEntity from promptflow._sdk.entities._connection import CustomConnection, _Connection -from promptflow._utils.utils import is_in_ci_pipeline +from promptflow.client import PFClient +from promptflow.core._serving.app import create_app as create_serving_app from promptflow.executor._line_execution_process_pool import _process_wrapper from promptflow.executor._process_manager import create_spawned_fork_process_manager -from promptflow.tracing._openai_injector import inject_openai_api - -from .recording_utilities import ( - RecordStorage, - check_pydantic_v2, - delete_count_lock_file, - inject_async_with_recording, - inject_sync_with_recording, - is_live, - is_record, - is_replay, - mock_tool, - recording_array_reset, -) +from promptflow.tracing._integrations._openai_injector import inject_openai_api + +try: + from promptflow.recording.local import recording_array_reset + from promptflow.recording.record_mode import is_in_ci_pipeline, is_live, is_record, is_replay +except ImportError: + # Run test in empty mode if promptflow-recording is not installed + def recording_array_reset(): + pass + + def is_in_ci_pipeline(): + return False + + def is_live(): + return False + + def is_record(): + return False + + def is_replay(): + return False + PROMOTFLOW_ROOT = Path(__file__) / "../../.." RUNTIME_TEST_CONFIGS_ROOT = Path(PROMOTFLOW_ROOT / "tests/test_configs/runtime") -RECORDINGS_TEST_CONFIGS_ROOT = Path(PROMOTFLOW_ROOT / "tests/test_configs/node_recordings").resolve() CONNECTION_FILE = (PROMOTFLOW_ROOT / "connections.json").resolve().absolute().as_posix() MODEL_ROOT = Path(PROMOTFLOW_ROOT / "tests/test_configs/flows") EAGER_FLOW_ROOT = Path(PROMOTFLOW_ROOT / "tests/test_configs/eager_flows") +SRC_ROOT = PROMOTFLOW_ROOT / ".." +RECORDINGS_TEST_CONFIGS_ROOT = Path(SRC_ROOT / "promptflow-recording/recordings/local").resolve() + + +def pytest_configure(): + pytest.is_live = is_live() + pytest.is_record = is_record() + pytest.is_replay = is_replay() + pytest.is_in_ci_pipeline = is_in_ci_pipeline() + @pytest.fixture(scope="session") def local_client() -> PFClient: @@ -132,7 +148,7 @@ def flow_serving_client(mocker: MockerFixture): @pytest.fixture def flow_serving_client_with_encoded_connection(mocker: MockerFixture): from promptflow._core.connection_manager import ConnectionManager - from promptflow._sdk._serving.utils import encode_dict + from promptflow.core._serving.utils import encode_dict connection_dict = json.loads(open(CONNECTION_FILE, "r").read()) connection_manager = ConnectionManager(connection_dict) @@ -160,6 +176,7 @@ def create_client_by_model( extension_type=None, environment_variables={}, model_root=MODEL_ROOT, + init=None, ): model_path = (Path(model_root) / model_name).resolve().absolute().as_posix() mocker.patch.dict(os.environ, {"PROMPTFLOW_PROJECT_PATH": model_path}) @@ -167,7 +184,7 @@ def create_client_by_model( mocker.patch.dict(os.environ, connections) if extension_type and extension_type == "azureml": environment_variables["API_TYPE"] = "${azure_open_ai_connection.api_type}" - app = create_serving_app(environment_variables=environment_variables, extension_type=extension_type) + app = create_serving_app(environment_variables=environment_variables, extension_type=extension_type, init=init) app.config.update( { "TESTING": True, @@ -231,6 +248,58 @@ def non_json_serializable_output(mocker: MockerFixture): return create_client_by_model("non_json_serializable_output", mocker, model_root=EAGER_FLOW_ROOT) +@pytest.fixture +def stream_output(mocker: MockerFixture): + return create_client_by_model("stream_output", mocker, model_root=EAGER_FLOW_ROOT) + + +@pytest.fixture +def multiple_stream_outputs(mocker: MockerFixture): + return create_client_by_model("multiple_stream_outputs", mocker, model_root=EAGER_FLOW_ROOT) + + +@pytest.fixture +def eager_flow_evc(mocker: MockerFixture): + return create_client_by_model("environment_variables_connection", mocker, model_root=EAGER_FLOW_ROOT) + + +@pytest.fixture +def eager_flow_evc_override(mocker: MockerFixture): + return create_client_by_model( + "environment_variables_connection", + mocker, + model_root=EAGER_FLOW_ROOT, + environment_variables={"TEST": "${azure_open_ai_connection.api_base}"}, + ) + + +@pytest.fixture +def eager_flow_evc_override_not_exist(mocker: MockerFixture): + return create_client_by_model( + "environment_variables", + mocker, + model_root=EAGER_FLOW_ROOT, + environment_variables={"TEST": "${azure_open_ai_connection.api_type}"}, + ) + + +@pytest.fixture +def eager_flow_evc_connection_not_exist(mocker: MockerFixture): + return create_client_by_model( + "evc_connection_not_exist", + mocker, + model_root=EAGER_FLOW_ROOT, + environment_variables={"TEST": "VALUE"}, + ) + + +@pytest.fixture +def callable_class(mocker: MockerFixture): + return create_client_by_model( + "basic_callable_class", mocker, model_root=EAGER_FLOW_ROOT, init={"obj_input": "input1"} + ) + + # ==================== Recording injection ==================== # To inject patches in subprocesses, add new mock method in setup_recording_injection_if_enabled # in fork mode, this is automatically enabled. @@ -260,8 +329,14 @@ def recording_injection(mocker: MockerFixture): try: yield finally: - RecordStorage.get_instance().delete_lock_file() - delete_count_lock_file() + if is_replay() or is_record(): + from promptflow.recording.local import RecordStorage + + RecordStorage.get_instance().delete_lock_file() + if is_live(): + from promptflow.recording.local import delete_count_lock_file + + delete_count_lock_file() recording_array_reset() multiprocessing.get_context("spawn").Process = original_process_class @@ -282,6 +357,14 @@ def start_patches(patch_targets): patcher.start() if is_replay() or is_record(): + from promptflow.recording.local import ( + RecordStorage, + inject_async_with_recording, + inject_sync_with_recording, + mock_tool, + ) + from promptflow.recording.record_mode import check_pydantic_v2 + check_pydantic_v2() file_path = RECORDINGS_TEST_CONFIGS_ROOT / "node_cache.shelve" RecordStorage.get_instance(file_path) @@ -293,15 +376,17 @@ def start_patches(patch_targets): "promptflow._core.tool.tool": mocked_tool, "promptflow._internal.tool": mocked_tool, "promptflow.tool": mocked_tool, - "promptflow.tracing._openai_injector.inject_sync": inject_sync_with_recording, - "promptflow.tracing._openai_injector.inject_async": inject_async_with_recording, + "promptflow.tracing._integrations._openai_injector.inject_sync": inject_sync_with_recording, + "promptflow.tracing._integrations._openai_injector.inject_async": inject_async_with_recording, } start_patches(patch_targets) if is_live() and is_in_ci_pipeline(): + from promptflow.recording.local import inject_async_with_recording, inject_sync_with_recording + patch_targets = { - "promptflow.tracing._openai_injector.inject_sync": inject_sync_with_recording, - "promptflow.tracing._openai_injector.inject_async": inject_async_with_recording, + "promptflow.tracing._integrations._openai_injector.inject_sync": inject_sync_with_recording, + "promptflow.tracing._integrations._openai_injector.inject_async": inject_async_with_recording, } start_patches(patch_targets) diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_chat_group.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_chat_group.py new file mode 100644 index 00000000000..5af6973d288 --- /dev/null +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_chat_group.py @@ -0,0 +1,54 @@ +from pathlib import Path + +import pytest + +from promptflow._sdk.entities._chat_group._chat_group import ChatGroup +from promptflow._sdk.entities._chat_group._chat_role import ChatRole + +PROMOTFLOW_ROOT = Path(__file__) / "../../../.." + +TEST_ROOT = Path(__file__).parent.parent.parent +FLOWS_DIR = TEST_ROOT / "test_configs/flows" + + +@pytest.mark.sdk_test +@pytest.mark.e2etest +@pytest.mark.usefixtures("use_secrets_config_file", "recording_injection", "setup_local_connection") +class TestChatGroup: + def test_chat_group_basic_invoke(self): + question = "What's the most beautiful thing in the world?" + ground_truth = "The world itself." + + copilot = ChatRole( + flow=FLOWS_DIR / "chat_group_copilot", + role="assistant", + inputs=dict( + question=question, + model="gpt-3.5-turbo", + conversation_history="${parent.conversation_history}", + ), + ) + simulation = ChatRole( + flow=FLOWS_DIR / "chat_group_simulation", + role="user", + inputs=dict( + question=question, + ground_truth=ground_truth, + conversation_history="${parent.conversation_history}", + ), + ) + + chat_group = ChatGroup( + roles=[copilot, simulation], + max_turns=4, + max_tokens=1000, + max_time=1000, + stop_signal="[STOP]", + ) + chat_group.invoke() + + # history has 4 records + history = chat_group.conversation_history + assert len(history) == 4 + assert history[0][0] == history[2][0] == copilot.role + assert history[1][0] == history[3][0] == simulation.role diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_cli.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_cli.py index 8186a51b328..a07e4e77451 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_cli.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_cli.py @@ -19,20 +19,19 @@ import pytest from promptflow._cli._pf.entry import main -from promptflow._constants import PF_USER_AGENT -from promptflow._core.operation_context import OperationContext +from promptflow._constants import LINE_NUMBER_KEY, PF_USER_AGENT from promptflow._sdk._constants import LOGGER_NAME, SCRUBBED_VALUE, ExperimentStatus from promptflow._sdk._errors import RunNotFoundError -from promptflow._sdk._utils import ClientUserAgentUtil, setup_user_agent_to_operation_context from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations from promptflow._sdk.operations._run_operations import RunOperations from promptflow._utils.context_utils import _change_working_dir +from promptflow._utils.user_agent_utils import ClientUserAgentUtil, setup_user_agent_to_operation_context from promptflow._utils.utils import environment_variable_overwrite, parse_ua_to_dict from promptflow._utils.yaml_utils import dump_yaml, load_yaml - -from ..recording_utilities import is_live +from promptflow.tracing._operation_context import OperationContext FLOWS_DIR = "./tests/test_configs/flows" +EAGER_FLOWS_DIR = "./tests/test_configs/eager_flows" EXPERIMENT_DIR = "./tests/test_configs/experiments" RUNS_DIR = "./tests/test_configs/runs" CONNECTIONS_DIR = "./tests/test_configs/connections" @@ -577,7 +576,7 @@ def test_pf_flow_test_with_symbolic(self, prepare_symbolic_flow): ], ) def test_flow_test_with_environment_variable(self, flow_folder_name, env_key, except_value, local_client): - from promptflow._sdk._submitter.utils import SubmitterHelper + from promptflow._sdk._orchestrator.utils import SubmitterHelper def validate_stdout(detail_path): with open(detail_path, "r") as f: @@ -1942,7 +1941,7 @@ def test_experiment_hide_by_default(self, monkeypatch, capfd): f"{EXPERIMENT_DIR}/basic-no-script-template/basic.exp.yaml", ) - @pytest.mark.skipif(condition=not is_live(), reason="Injection cannot passed to detach process.") + @pytest.mark.skipif(condition=not pytest.is_live, reason="Injection cannot passed to detach process.") @pytest.mark.usefixtures("setup_experiment_table") def test_experiment_start(self, monkeypatch, capfd, local_client): def wait_for_experiment_terminated(experiment_name): @@ -1982,21 +1981,23 @@ def wait_for_experiment_terminated(experiment_name): metrics = local_client.runs.get_metrics(name=exp.node_runs["eval"][0]["name"]) assert "accuracy" in metrics - @pytest.mark.skipif(condition=not is_live(), reason="Injection cannot passed to detach process.") + @pytest.mark.skipif(condition=not pytest.is_live, reason="Injection cannot passed to detach process.") @pytest.mark.usefixtures("setup_experiment_table") def test_experiment_start_anonymous_experiment(self, monkeypatch, local_client): - from promptflow._sdk._load_functions import _load_experiment - with mock.patch("promptflow._sdk._configuration.Configuration.is_internal_features_enabled") as mock_func: - mock_func.return_value = True - experiment_file = f"{EXPERIMENT_DIR}/basic-script-template/basic-script.exp.yaml" - run_pf_command("experiment", "start", "--file", experiment_file, "--stream") - experiment = _load_experiment(source=experiment_file) - exp = local_client._experiments.get(name=experiment.name) - assert len(exp.node_runs) == 4 - assert all(len(exp.node_runs[node_name]) > 0 for node_name in exp.node_runs) - metrics = local_client.runs.get_metrics(name=exp.node_runs["eval"][0]["name"]) - assert "accuracy" in metrics + from promptflow._sdk.entities._experiment import Experiment + + with mock.patch.object(Experiment, "_generate_name") as mock_generate_name: + experiment_name = str(uuid.uuid4()) + mock_generate_name.return_value = experiment_name + mock_func.return_value = True + experiment_file = f"{EXPERIMENT_DIR}/basic-script-template/basic-script.exp.yaml" + run_pf_command("experiment", "start", "--template", experiment_file, "--stream") + exp = local_client._experiments.get(name=experiment_name) + assert len(exp.node_runs) == 4 + assert all(len(exp.node_runs[node_name]) > 0 for node_name in exp.node_runs) + metrics = local_client.runs.get_metrics(name=exp.node_runs["eval"][0]["name"]) + assert "accuracy" in metrics @pytest.mark.usefixtures("setup_experiment_table", "recording_injection") def test_experiment_test(self, monkeypatch, capfd, local_client, tmpdir): @@ -2117,6 +2118,49 @@ def test_flow_run_resume_from(self, capfd, local_client) -> None: assert run.tags == {"A": "A", "B": "B"} assert run._resume_from == run_id + def test_flow_run_resume_partially_failed_run(self, capfd, local_client) -> None: + run_id = str(uuid.uuid4()) + data_path = f"{DATAS_DIR}/simple_hello_world_multi_lines.jsonl" + with open(data_path, "r") as f: + total_lines = len(f.readlines()) + # fetch std out + run_pf_command( + "run", + "create", + "--flow", + f"{FLOWS_DIR}/simple_hello_world_random_fail", + "--data", + data_path, + "--name", + run_id, + ) + out, _ = capfd.readouterr() + assert "Completed" in out + + def get_successful_lines(output_path): + with open(Path(output_path) / "outputs.jsonl", "r") as f: + return set(map(lambda x: x[LINE_NUMBER_KEY], map(json.loads, f.readlines()))) + + completed_line_set = set() + while True: + run = local_client.runs.get(name=run_id) + new_completed_line_set = get_successful_lines(run.properties["output_path"]) + if len(new_completed_line_set) == total_lines: + break + assert new_completed_line_set.issuperset(completed_line_set), "successful lines should be increasing" + completed_line_set = new_completed_line_set + + new_run_id = str(uuid.uuid4()) + run_pf_command( + "run", + "create", + "--resume-from", + run_id, + "--name", + new_run_id, + ) + run_id = new_run_id + def test_flow_run_exclusive_param(self, capfd) -> None: # fetch std out with pytest.raises(SystemExit): @@ -2130,3 +2174,65 @@ def test_flow_run_exclusive_param(self, capfd) -> None: ) out, _ = capfd.readouterr() assert "More than one is provided for exclusive options" in out + + def test_pf_test_interactive_with_non_string_streaming_output(self, monkeypatch, capsys): + flow_dir = Path(f"{FLOWS_DIR}/chat_flow_with_non_string_stream_output") + # mock user input with pop so make chat list reversed + chat_list = ["what is chat gpt?", "hi"] + + def mock_input(*args, **kwargs): + if chat_list: + return chat_list.pop() + else: + raise KeyboardInterrupt() + + monkeypatch.setattr("builtins.input", mock_input) + run_pf_command( + "flow", + "test", + "--flow", + flow_dir.as_posix(), + "--interactive", + "--verbose", + ) + output_path = Path(flow_dir) / ".promptflow" / "chat.output.json" + assert output_path.exists() + detail_path = Path(flow_dir) / ".promptflow" / "chat.detail.json" + assert detail_path.exists() + + def test_pf_run_with_init(self, pf): + + run_id = str(uuid.uuid4()) + run_pf_command( + "run", + "create", + "--flow", + f"{EAGER_FLOWS_DIR}/basic_callable_class", + "--data", + f"{EAGER_FLOWS_DIR}/basic_callable_class/inputs.jsonl", + "--name", + run_id, + "--init", + "obj_input=val", + ) + + def assert_func(details_dict): + return details_dict["outputs.func_input"] == [ + "func_input", + "func_input", + "func_input", + "func_input", + ] and details_dict["outputs.obj_input"] == ["val", "val", "val", "val"] + + # check run results + run = pf.runs.get(run_id) + assert_batch_run_result(run, pf, assert_func) + + +def assert_batch_run_result(run, pf, assert_func): + assert run.status == "Completed" + assert "error" not in run._to_dict(), run._to_dict()["error"] + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert assert_func(details_dict), details_dict diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_cli_perf.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_cli_perf.py index aafcd00b9ed..9077a28897e 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_cli_perf.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_cli_perf.py @@ -13,7 +13,7 @@ from promptflow._cli._user_agent import USER_AGENT as CLI_USER_AGENT # noqa: E402 from promptflow._sdk._telemetry import log_activity -from promptflow._sdk._utils import ClientUserAgentUtil +from promptflow._utils.user_agent_utils import ClientUserAgentUtil FLOWS_DIR = "./tests/test_configs/flows" CONNECTIONS_DIR = "./tests/test_configs/connections" diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_csharp_cli.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_csharp_cli.py index 68a03de5dbb..b6de9bbc6b8 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_csharp_cli.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_csharp_cli.py @@ -57,6 +57,18 @@ def test_pf_flow_test_eager_mode(self): "topic=promptflow", ) + def test_pf_run_create_with_connection_override(self): + run_pf_command( + "run", + "create", + "--flow", + f"{get_repo_base_path()}\\examples\\BasicWithBuiltinLLM\\bin\\Debug\\net6.0", + "--data", + f"{get_repo_base_path()}\\examples\\BasicWithBuiltinLLM\\batchRunData.jsonl", + "--connections", + "get_answer.connection=azure_open_ai_connection", + ) + def test_flow_chat(self, monkeypatch, capsys): flow_dir = f"{get_repo_base_path()}\\src\\PromptflowCSharp\\Sample\\BasicChat\\bin\\Debug\\net6.0" # mock user input with pop so make chat list reversed @@ -129,3 +141,6 @@ def mock_input(*args, **kwargs): outerr = capsys.readouterr() # Check node output assert "language model" in outerr.out + + def test_flow_run_from_resume(self): + run_pf_command("run", "create", "--resume-from", "net6_0_variant_0_20240326_163600_356909") diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_experiment.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_experiment.py index 6af218f14da..4d25f168cbc 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_experiment.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_experiment.py @@ -15,12 +15,10 @@ from promptflow._sdk._constants import PF_TRACE_CONTEXT, ExperimentStatus, RunStatus, RunTypes from promptflow._sdk._errors import ExperimentValueError, RunOperationError from promptflow._sdk._load_functions import _load_experiment, load_common +from promptflow._sdk._orchestrator.experiment_orchestrator import ExperimentOrchestrator, ExperimentTemplateTestContext from promptflow._sdk._pf_client import PFClient -from promptflow._sdk._submitter.experiment_orchestrator import ExperimentOrchestrator from promptflow._sdk.entities._experiment import CommandNode, Experiment, ExperimentTemplate, FlowNode -from ..recording_utilities import is_live - TEST_ROOT = Path(__file__).parent.parent.parent EXP_ROOT = TEST_ROOT / "test_configs/experiments" FLOW_ROOT = TEST_ROOT / "test_configs/flows" @@ -89,7 +87,7 @@ def test_experiment_start(self): client = PFClient() exp = client._experiments.create_or_update(experiment) session = str(uuid.uuid4()) - if is_live(): + if pytest.is_live: # Async start exp = client._experiments.start(exp, session=session) # Test the experiment in progress cannot be started. @@ -118,7 +116,7 @@ def test_experiment_start(self): metrics = client.runs.get_metrics(name=eval_run.name) assert "accuracy" in metrics # Assert Trace - line_runs = client._traces.list_line_runs(session_id=session) + line_runs = client.traces.list_line_runs(collection=session) if len(line_runs) > 0: assert len(line_runs) == 3 line_run = line_runs[0] @@ -140,7 +138,7 @@ def test_experiment_with_script_start(self): experiment = Experiment.from_template(template) client = PFClient() exp = client._experiments.create_or_update(experiment) - if is_live(): + if pytest.is_live: # Async start exp = client._experiments.start(exp) exp = self.wait_for_experiment_terminated(client, exp) @@ -154,7 +152,7 @@ def test_experiment_with_script_start(self): run = client.runs.get(name=exp.node_runs["echo"][0]["name"]) assert run.type == RunTypes.COMMAND - @pytest.mark.skipif(condition=not is_live(), reason="Injection cannot passed to detach process.") + @pytest.mark.skipif(condition=not pytest.is_live, reason="Injection cannot passed to detach process.") @pytest.mark.usefixtures("use_secrets_config_file", "recording_injection", "setup_local_connection") def test_experiment_start_from_nodes(self): template_path = EXP_ROOT / "basic-script-template" / "basic-script.exp.yaml" @@ -189,7 +187,7 @@ def test_experiment_start_from_nodes(self): assert len(exp.node_runs["main"]) == 3 assert len(exp.node_runs["echo"]) == 2 - @pytest.mark.skipif(condition=not is_live(), reason="Injection cannot passed to detach process.") + @pytest.mark.skipif(condition=not pytest.is_live, reason="Injection cannot passed to detach process.") def test_cancel_experiment(self): template_path = EXP_ROOT / "command-node-exp-template" / "basic-command.exp.yaml" # Load template and create experiment @@ -250,7 +248,7 @@ def _assert_result(result): # Assert session exists # TODO: Task 2942400, avoid sleep/if and assert traces time.sleep(10) # TODO fix this - line_runs = client._traces.list_line_runs(session_id=session) + line_runs = client.traces.list_line_runs(collection=session) if len(line_runs) > 0: assert len(line_runs) == 1 line_run = line_runs[0] @@ -306,3 +304,33 @@ def test_experiment_with_script_run(self): assert len(exp.node_runs) == 4 for key, val in exp.node_runs.items(): assert val[0]["status"] == RunStatus.COMPLETED, f"Node {key} run failed" + + @pytest.mark.skip("Enable when chat group node run is ready") + @pytest.mark.usefixtures("use_secrets_config_file", "recording_injection", "setup_local_connection") + def test_experiment_with_chat_group(self, pf: PFClient): + template_path = EXP_ROOT / "chat-group-node-exp-template" / "exp.yaml" + template = load_common(ExperimentTemplate, source=template_path) + experiment = Experiment.from_template(template) + exp = pf._experiments.create_or_update(experiment) + + if pytest.is_live: + # Async start + exp = pf._experiments.start(exp) + exp = self.wait_for_experiment_terminated(pf, exp) + else: + exp = pf._experiments.get(exp.name) + exp = ExperimentOrchestrator(pf, exp).start() + + @pytest.mark.usefixtures("use_secrets_config_file", "recording_injection", "setup_local_connection") + def test_experiment_test_chat_group_node(self, pf: PFClient): + template_path = EXP_ROOT / "chat-group-node-exp-template" / "exp.yaml" + template = load_common(ExperimentTemplate, source=template_path) + orchestrator = ExperimentOrchestrator(pf) + test_context = ExperimentTemplateTestContext(template=template) + chat_group_node = template.nodes[0] + assert chat_group_node.name == "multi_turn_chat" + + history = orchestrator._test_node(chat_group_node, test_context) + assert len(history) == 4 + assert history[0][0] == history[2][0] == "assistant" + assert history[1][0] == history[3][0] == "user" diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_as_func.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_as_func.py index 71d3206d210..32d3dc12508 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_as_func.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_as_func.py @@ -14,7 +14,7 @@ from promptflow import load_flow from promptflow._sdk._errors import ConnectionNotFoundError, InvalidFlowError from promptflow._sdk.entities import CustomConnection -from promptflow._sdk.operations._flow_context_resolver import FlowContextResolver +from promptflow._sdk.entities._flow._flow_context_resolver import FlowContextResolver from promptflow._utils.flow_utils import dump_flow_dag, load_flow_dag from promptflow.entities import FlowContext from promptflow.exceptions import UserErrorException @@ -52,15 +52,17 @@ def test_flow_as_a_func(self, test_folder): ], ) async def test_flow_as_a_func_asynckw(self, async_call_folder): - f = load_flow(async_call_folder, is_async_call=True) + from promptflow.core._flow import AsyncFlow + + f = AsyncFlow.load(async_call_folder) result = await f(key="PATH") assert result["output"] is not None @pytest.mark.asyncio async def test_flow_as_a_func_real_async(self): - from promptflow._sdk.entities._flow import AsyncProtectedFlow + from promptflow.core._flow import AsyncFlow - original_async_func = AsyncProtectedFlow.invoke_async + original_async_func = AsyncFlow.invoke # Modify the original function and retrieve the time info. run_info_group = [] @@ -73,9 +75,9 @@ async def parse_invoke_async(*args, **kwargs): node_run_infos_group.append(obj.node_run_infos) return obj - with mock.patch("promptflow._sdk.entities._flow.AsyncProtectedFlow.invoke_async", parse_invoke_async): - f_async_tools = load_flow(f"{FLOWS_DIR}/async_tools", is_async_call=True) - f_env_var_async = load_flow(f"{FLOWS_DIR}/print_env_var_async", is_async_call=True) + with mock.patch("promptflow.core._flow.AsyncFlow.invoke", parse_invoke_async): + f_async_tools = AsyncFlow.load(f"{FLOWS_DIR}/async_tools") + f_env_var_async = AsyncFlow.load(f"{FLOWS_DIR}/print_env_var_async") time_start = datetime.now() results = await asyncio.gather( @@ -123,7 +125,7 @@ def test_flow_as_a_func_with_connection_obj(self): f.context.connections = {"hello_node": {"connection": CustomConnection(secrets={"k": "v"})}} result = f(text="hello") - assert result["output"]["secrets"] == {"k": "v"} + assert result["output"] == {"k": "v"} def test_overrides(self): f = load_flow(f"{FLOWS_DIR}/print_env_var") diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_local_operations.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_local_operations.py index c535cbad228..49ca3f11584 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_local_operations.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_local_operations.py @@ -495,3 +495,11 @@ def test_eager_flow_validate(self, pf): pf.flows.validate(flow=source, raise_error=True) assert "Entry function my_func is not valid." in str(e.value) + + def test_flow_generate_tools_meta_for_flex_flow(self, pf) -> None: + source = f"{EAGER_FLOWS_DIR}/simple_with_yaml" + + tools_meta, tools_error = pf.flows._generate_tools_meta(source) + assert tools_error == {} + assert tools_meta["package"] == {} + assert tools_meta["code"] == {} diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_run.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_run.py index 25ef12d8772..521313b1c82 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_run.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_run.py @@ -29,11 +29,13 @@ RunNotFoundError, ) from promptflow._sdk._load_functions import load_flow, load_run +from promptflow._sdk._orchestrator.utils import SubmitterHelper from promptflow._sdk._run_functions import create_yaml_run -from promptflow._sdk._submitter.utils import SubmitterHelper -from promptflow._sdk._utils import _get_additional_includes +from promptflow._sdk._utils import _get_additional_includes, parse_otel_span_status_code from promptflow._sdk.entities import Run from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations +from promptflow._utils.context_utils import _change_working_dir, inject_sys_path +from promptflow._utils.yaml_utils import load_yaml from promptflow.connections import AzureOpenAIConnection from promptflow.exceptions import UserErrorException @@ -48,6 +50,14 @@ DATAS_DIR = "./tests/test_configs/datas" +def my_entry(input1: str): + return input1 + + +async def my_async_entry(input2: str): + return input2 + + def create_run_against_multi_line_data(client) -> Run: return client.run( flow=f"{FLOWS_DIR}/web_classification", @@ -224,7 +234,7 @@ def test_basic_flow_with_variant(self, azure_open_ai_connection: AzureOpenAIConn def test_run_bulk_error(self, pf): # path not exist - with pytest.raises(FileNotFoundError) as e: + with pytest.raises(UserErrorException) as e: pf.run( flow=f"{MODEL_ROOT}/not_exist", data=f"{DATAS_DIR}/webClassification3.jsonl", @@ -359,7 +369,7 @@ def test_custom_connection_overwrite(self, local_client, local_custom_connection data=f"{DATAS_DIR}/env_var_names.jsonl", connections={"print_env": {"new_connection": "test_custom_connection"}}, ) - assert "Connection with name new_connection not found" in str(e.value) + assert "Unsupported llm connection overwrite keys" in str(e.value) def test_basic_flow_with_package_tool_with_custom_strong_type_connection( self, install_custom_tool_pkg, local_client, pf @@ -1249,15 +1259,139 @@ def test_flow_with_nan_inf_metrics(self, pf: PFClient, monkeypatch) -> None: monkeypatch.delenv("PF_BATCH_METHOD") - @pytest.mark.skip("Won't support this kind of usage.") def test_eager_flow_run_without_yaml(self, pf): - flow_path = Path(f"{EAGER_FLOWS_DIR}/simple_without_yaml/entry.py") run = pf.run( - flow=flow_path, - entry="my_flow", + flow="entry:my_flow", + code=f"{EAGER_FLOWS_DIR}/simple_without_yaml", + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + ) + assert run.status == "Completed" + assert "error" not in run._to_dict() + # will create a YAML in run snapshot + local_storage = LocalStorageOperations(run=run) + assert local_storage._dag_path.exists() + # the YAML file will not exist in user's folder + assert not Path(f"{EAGER_FLOWS_DIR}/simple_without_yaml/flow.dag.yaml").exists() + + def test_eager_flow_yaml_override(self, pf): + run = pf.run( + flow="entry2:my_flow2", + code=f"{EAGER_FLOWS_DIR}/multiple_entries", data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", ) assert run.status == "Completed" + assert "error" not in run._to_dict() + # will create a YAML in run snapshot + local_storage = LocalStorageOperations(run=run) + assert local_storage._dag_path.exists() + # original YAMl content not changed + original_dict = load_yaml(f"{EAGER_FLOWS_DIR}/multiple_entries/flow.dag.yaml") + assert original_dict["entry"] == "entry1:my_flow1" + + # actual result will be entry2:my_flow2 + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == {"inputs.line_number": [0], "outputs.output": ["entry2flow2"]} + + def test_flex_flow_with_func(self, pf): + run = pf.run( + flow=my_entry, + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + # set code folder to avoid snapshot too big + code=f"{EAGER_FLOWS_DIR}/multiple_entries", + column_mapping={"input1": "${data.input_val}"}, + ) + assert run.status == "Completed" + assert "error" not in run._to_dict() + + # actual result will be entry2:my_flow2 + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == {"inputs.input1": ["input1"], "inputs.line_number": [0], "outputs.output": ["input1"]} + + run = pf.run( + flow=my_async_entry, + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + # set code folder to avoid snapshot too big + code=f"{EAGER_FLOWS_DIR}/multiple_entries", + column_mapping={"input2": "${data.input_val}"}, + ) + assert run.status == "Completed" + assert "error" not in run._to_dict() + + # actual result will be entry2:my_flow2 + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == {"inputs.input2": ["input1"], "inputs.line_number": [0], "outputs.output": ["input1"]} + + def test_flex_flow_with_local_imported_func(self, pf): + # run eager flow against a function from local file + with inject_sys_path(f"{EAGER_FLOWS_DIR}/multiple_entries"): + from entry2 import my_flow2 + + run = pf.run( + flow=my_flow2, + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + # set code folder to avoid snapshot too big + code=f"{EAGER_FLOWS_DIR}/multiple_entries", + column_mapping={"input1": "${data.input_val}"}, + ) + assert run.status == "Completed" + assert "error" not in run._to_dict() + + # actual result will be entry2:my_flow2 + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == { + "inputs.input1": ["input1"], + "inputs.line_number": [0], + "outputs.output": ["entry2flow2"], + } + + def test_flex_flow_with_imported_func(self, pf): + # run eager flow against a function from module + run = pf.run( + flow=parse_otel_span_status_code, + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + # set code folder to avoid snapshot too big + code=f"{EAGER_FLOWS_DIR}/multiple_entries", + column_mapping={"value": "${data.input_val}"}, + ) + assert run.status == "Completed" + assert "error" not in run._to_dict() + + # actual result will be entry2:my_flow2 + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == {"inputs.line_number": [0], "inputs.value": ["input1"], "outputs.output": ["Error"]} + + def test_eager_flow_run_in_working_dir(self, pf): + working_dir = f"{EAGER_FLOWS_DIR}/multiple_entries" + with _change_working_dir(working_dir): + run = pf.run( + flow="entry2:my_flow1", + data="../../datas/simple_eager_flow_data.jsonl", + ) + assert run.status == "Completed" + assert "error" not in run._to_dict() + + # will create a YAML in run snapshot + local_storage = LocalStorageOperations(run=run) + assert local_storage._dag_path.exists() + # original YAMl content not changed + original_dict = load_yaml(f"{EAGER_FLOWS_DIR}/multiple_entries/flow.dag.yaml") + assert original_dict["entry"] == "entry1:my_flow1" + + # actual result will be entry2:my_flow2 + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == {"inputs.line_number": [0], "outputs.output": ["entry2flow1"]} def test_eager_flow_run_with_yaml(self, pf): flow_path = Path(f"{EAGER_FLOWS_DIR}/simple_with_yaml") @@ -1359,3 +1493,200 @@ def test_eager_flow_run_with_evc(self, pf): # convert DataFrame to dict details_dict = details.to_dict(orient="list") assert details_dict == {"inputs.line_number": [0], "outputs.output": ["Hello world! azure"]} + + def test_run_with_deployment_overwrite(self, pf): + run = pf.run( + flow=f"{FLOWS_DIR}/python_tool_deployment_name", + data=f"{DATAS_DIR}/env_var_names.jsonl", + column_mapping={"key": "${data.key}"}, + connections={"print_env": {"deployment_name": "my_deployment_name", "model": "my_model"}}, + ) + run_dict = run._to_dict() + assert "error" not in run_dict, run_dict["error"] + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == { + "inputs.key": ["API_BASE"], + "inputs.line_number": [0], + "outputs.output": [{"deployment_name": "my_deployment_name", "model": "my_model"}], + } + + # TODO(3021931): this should fail. + run = pf.run( + flow=f"{FLOWS_DIR}/deployment_name_not_enabled", + data=f"{DATAS_DIR}/env_var_names.jsonl", + column_mapping={"env": "${data.key}"}, + connections={"print_env": {"deployment_name": "my_deployment_name", "model": "my_model"}}, + ) + run_dict = run._to_dict() + assert "error" not in run_dict, run_dict["error"] + + def test_deployment_overwrite_failure(self, local_client, local_aoai_connection, pf): + # deployment name not exist + run = pf.run( + flow=f"{FLOWS_DIR}/web_classification", + data=f"{DATAS_DIR}/webClassification1.jsonl", + connections={"classify_with_llm": {"deployment_name": "not_exist"}}, + ) + run_dict = run._to_dict() + assert "error" in run_dict + assert "The API deployment for this resource does not exist." in run_dict["error"]["message"] + + # deployment name not a param + run = pf.run( + flow=f"{FLOWS_DIR}/print_env_var", + data=f"{DATAS_DIR}/env_var_names.jsonl", + connections={"print_env": {"deployment_name": "not_exist"}}, + ) + run_dict = run._to_dict() + assert "error" in run_dict + assert "get_env_var() got an unexpected keyword argument" in run_dict["error"]["message"] + + def test_shadow_evc(self, pf): + # run without env override will fail + with pytest.raises(ConnectionNotFoundError): + pf.run( + flow=f"{FLOWS_DIR}/evc_connection_not_exist", + data=f"{DATAS_DIR}/env_var_names.jsonl", + ) + # won't fail with connection not found + run = pf.run( + flow=f"{FLOWS_DIR}/evc_connection_not_exist", + data=f"{DATAS_DIR}/env_var_names.jsonl", + environment_variables={"API_BASE": "VAL"}, + ) + assert run.status == "Completed" + assert "error" not in run._to_dict() + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == {"inputs.key": ["API_BASE"], "inputs.line_number": [0], "outputs.output": ["VAL"]} + + def test_shadow_evc_flex_flow(self, pf): + flow_path = Path(f"{EAGER_FLOWS_DIR}/evc_connection_not_exist") + + # run without env override will fail + with pytest.raises(ConnectionNotFoundError): + pf.run( + flow=flow_path, + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + ) + + # won't fail in flex flow + run = pf.run( + flow=flow_path, + data=f"{DATAS_DIR}/simple_eager_flow_data.jsonl", + environment_variables={"TEST": "VAL"}, + ) + assert run.status == "Completed" + assert "error" not in run._to_dict() + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == {"inputs.line_number": [0], "outputs.output": ["Hello world! VAL"]} + + def test_eager_flow_evc_override(self, pf): + # resolve evc when used same name as flow's evc + flow_path = Path(f"{EAGER_FLOWS_DIR}/print_environment_variables") + run = pf.run( + flow=flow_path, + data=f"{DATAS_DIR}/env_var_test.jsonl", + environment_variables={"TEST": "${azure_open_ai_connection.api_type}"}, + ) + assert run.status == "Completed" + assert "error" not in run._to_dict(), run._to_dict()["error"] + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == { + "inputs.key": ["TEST"], + "inputs.line_number": [0], + "outputs.output": ["Hello world! azure"], + } + + # won't get connection & resolve when added new env var names + flow_path = Path(f"{EAGER_FLOWS_DIR}/print_environment_variables") + run = pf.run( + flow=flow_path, + data=f"{DATAS_DIR}/env_var_new_key.jsonl", + environment_variables={"NEW_KEY": "${not_exist.api_type}"}, + ) + assert run.status == "Completed" + assert "error" not in run._to_dict(), run._to_dict()["error"] + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == { + "inputs.key": ["NEW_KEY"], + "inputs.line_number": [0], + "outputs.output": ["Hello world! ${not_exist.api_type}"], + } + + def test_run_with_non_provided_connection_override(self, pf, local_custom_connection): + # override non-provided connection when submission + run = pf.run( + flow=f"{FLOWS_DIR}/connection_not_provided", + data=f"{DATAS_DIR}/env_var_names.jsonl", + column_mapping={"key": "${data.key}"}, + connections={"print_env": {"connection": "test_custom_connection"}}, + ) + run_dict = run._to_dict() + assert "error" not in run_dict, run_dict["error"] + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == { + "inputs.key": ["API_BASE"], + "inputs.line_number": [0], + "outputs.output": [{"connection": "Custom", "key": "API_BASE"}], + } + + def test_run_with_non_provided_connection_override_list_annotation(self, pf, local_custom_connection): + # override non-provided connection when submission + run = pf.run( + flow=f"{FLOWS_DIR}/list_connection_not_provided", + data=f"{DATAS_DIR}/env_var_names.jsonl", + column_mapping={"key": "${data.key}"}, + connections={"print_env": {"connection": "test_custom_connection"}}, + ) + run_dict = run._to_dict() + assert "error" not in run_dict, run_dict["error"] + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert details_dict == { + "inputs.key": ["API_BASE"], + "inputs.line_number": [0], + "outputs.output": [{"connection": "Custom", "key": "API_BASE"}], + } + + def test_run_with_init(self, pf): + def assert_func(details_dict): + return details_dict["outputs.func_input"] == [ + "func_input", + "func_input", + "func_input", + "func_input", + ] and details_dict["outputs.obj_input"] == ["val", "val", "val", "val"] + + flow_path = Path(f"{EAGER_FLOWS_DIR}/basic_callable_class") + run = pf.run( + flow=flow_path, data=f"{EAGER_FLOWS_DIR}/basic_callable_class/inputs.jsonl", init={"obj_input": "val"} + ) + assert_batch_run_result(run, pf, assert_func) + + run = load_run( + source=f"{EAGER_FLOWS_DIR}/basic_callable_class/run.yaml", + ) + run = pf.runs.create_or_update(run=run) + assert_batch_run_result(run, pf, assert_func) + + +def assert_batch_run_result(run: Run, pf: PFClient, assert_func): + assert run.status == "Completed" + assert "error" not in run._to_dict(), run._to_dict()["error"] + details = pf.get_details(run.name) + # convert DataFrame to dict + details_dict = details.to_dict(orient="list") + assert assert_func(details_dict), details_dict diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve.py index 9c3a8658a67..7c322bd65a0 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve.py @@ -3,15 +3,22 @@ import re import pytest +from opentelemetry import trace +from opentelemetry.sdk.resources import SERVICE_NAME, Resource +from opentelemetry.sdk.trace import TracerProvider +from opentelemetry.sdk.trace.export import SimpleSpanProcessor +from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter -from promptflow._core.operation_context import OperationContext +from promptflow.core._serving.constants import FEEDBACK_TRACE_FIELD_NAME +from promptflow.core._serving.utils import load_feedback_swagger +from promptflow.tracing._operation_context import OperationContext @pytest.mark.usefixtures("recording_injection", "setup_local_connection") @pytest.mark.e2etest def test_swagger(flow_serving_client): swagger_dict = json.loads(flow_serving_client.get("/swagger.json").data.decode()) - assert swagger_dict == { + expected_swagger = { "components": {"securitySchemes": {"bearerAuth": {"scheme": "bearer", "type": "http"}}}, "info": { "title": "Promptflow[basic-with-connection] API", @@ -54,13 +61,69 @@ def test_swagger(flow_serving_client): }, "security": [{"bearerAuth": []}], } + feedback_swagger = load_feedback_swagger() + expected_swagger["paths"]["/feedback"] = feedback_swagger + assert swagger_dict == expected_swagger + + +@pytest.mark.usefixtures("recording_injection", "setup_local_connection") +@pytest.mark.e2etest +def test_feedback_flatten(flow_serving_client): + resource = Resource( + attributes={ + SERVICE_NAME: "promptflow", + } + ) + trace.set_tracer_provider(TracerProvider(resource=resource)) + provider = trace.get_tracer_provider() + exporter = InMemorySpanExporter() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + data_field_name = "comment" + feedback_data = {data_field_name: "positive"} + response = flow_serving_client.post("/feedback?flatten=true", data=json.dumps(feedback_data)) + assert response.status_code == 200 + spans = exporter.get_finished_spans() + assert len(spans) == 1 + assert spans[0].attributes[data_field_name] == feedback_data[data_field_name] + + +@pytest.mark.usefixtures("recording_injection", "setup_local_connection") +@pytest.mark.e2etest +def test_feedback_with_trace_context(flow_serving_client): + resource = Resource( + attributes={ + SERVICE_NAME: "promptflow", + } + ) + trace.set_tracer_provider(TracerProvider(resource=resource)) + provider = trace.get_tracer_provider() + exporter = InMemorySpanExporter() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + feedback_data = json.dumps({"feedback": "positive"}) + trace_ctx_version = "00" + trace_ctx_trace_id = "8a3c60f7d6e2f3b4a4f2f7f3f3f3f3f3" + trace_ctx_parent_id = "f3f3f3f3f3f3f3f3" + trace_ctx_flags = "01" + trace_parent = f"{trace_ctx_version}-{trace_ctx_trace_id}-{trace_ctx_parent_id}-{trace_ctx_flags}" + response = flow_serving_client.post( + "/feedback", headers={"traceparent": trace_parent, "baggage": "userId=alice"}, data=feedback_data + ) + assert response.status_code == 200 + spans = exporter.get_finished_spans() + assert len(spans) == 1 + # validate trace context + assert spans[0].context.trace_id == int(trace_ctx_trace_id, 16) + assert spans[0].parent.span_id == int(trace_ctx_parent_id, 16) + # validate feedback data + assert feedback_data == spans[0].attributes[FEEDBACK_TRACE_FIELD_NAME] + assert spans[0].attributes["userId"] == "alice" @pytest.mark.usefixtures("recording_injection", "setup_local_connection") @pytest.mark.e2etest def test_chat_swagger(serving_client_llm_chat): swagger_dict = json.loads(serving_client_llm_chat.get("/swagger.json").data.decode()) - assert swagger_dict == { + expected_swagger = { "components": {"securitySchemes": {"bearerAuth": {"scheme": "bearer", "type": "http"}}}, "info": { "title": "Promptflow[chat_flow_with_stream_output] API", @@ -113,6 +176,9 @@ def test_chat_swagger(serving_client_llm_chat): }, "security": [{"bearerAuth": []}], } + feedback_swagger = load_feedback_swagger() + expected_swagger["paths"]["/feedback"] = feedback_swagger + assert swagger_dict == expected_swagger @pytest.mark.usefixtures("recording_injection", "setup_local_connection") @@ -127,7 +193,7 @@ def test_user_agent(flow_serving_client): @pytest.mark.e2etest def test_serving_api(flow_serving_client): response = flow_serving_client.get("/health") - assert b'{"status":"Healthy","version":"0.0.1"}' in response.data + assert b"Healthy" in response.data response = flow_serving_client.get("/") print(response.data) assert response.status_code == 200 @@ -368,7 +434,7 @@ def test_eager_flow_serve(simple_eager_flow): @pytest.mark.e2etest def test_eager_flow_swagger(simple_eager_flow): swagger_dict = json.loads(simple_eager_flow.get("/swagger.json").data.decode()) - assert swagger_dict == { + expected_swagger = { "components": {"securitySchemes": {"bearerAuth": {"scheme": "bearer", "type": "http"}}}, "info": { "title": "Promptflow[simple_with_dict_output] API", @@ -384,7 +450,7 @@ def test_eager_flow_swagger(simple_eager_flow): "application/json": { "example": {}, "schema": { - "properties": {"input_val": {"type": "string"}}, + "properties": {"input_val": {"default": "gpt", "type": "string"}}, "required": ["input_val"], "type": "object", }, @@ -414,6 +480,9 @@ def test_eager_flow_swagger(simple_eager_flow): }, "security": [{"bearerAuth": []}], } + feedback_swagger = load_feedback_swagger() + expected_swagger["paths"]["/feedback"] = feedback_swagger + assert swagger_dict == expected_swagger @pytest.mark.e2etest @@ -430,7 +499,7 @@ def test_eager_flow_serve_primitive_output(simple_eager_flow_primitive_output): @pytest.mark.e2etest def test_eager_flow_primitive_output_swagger(simple_eager_flow_primitive_output): swagger_dict = json.loads(simple_eager_flow_primitive_output.get("/swagger.json").data.decode()) - assert swagger_dict == { + expected_swagger = { "components": {"securitySchemes": {"bearerAuth": {"scheme": "bearer", "type": "http"}}}, "info": {"title": "Promptflow[primitive_output] API", "version": "1.0.0", "x-flow-name": "primitive_output"}, "openapi": "3.0.0", @@ -442,7 +511,7 @@ def test_eager_flow_primitive_output_swagger(simple_eager_flow_primitive_output) "application/json": { "example": {}, "schema": { - "properties": {"input_val": {"type": "string"}}, + "properties": {"input_val": {"default": "gpt", "type": "string"}}, "required": ["input_val"], "type": "object", }, @@ -469,6 +538,9 @@ def test_eager_flow_primitive_output_swagger(simple_eager_flow_primitive_output) }, "security": [{"bearerAuth": []}], } + feedback_swagger = load_feedback_swagger() + expected_swagger["paths"]["/feedback"] = feedback_swagger + assert swagger_dict == expected_swagger @pytest.mark.e2etest @@ -499,3 +571,125 @@ def test_eager_flow_serve_non_json_serializable_output(non_json_serializable_out "Please verify your flow output and make sure the value serializable.", } } + + +@pytest.mark.e2etest +@pytest.mark.parametrize( + "accept, expected_status_code, expected_content_type", + [ + ("text/event-stream", 200, "text/event-stream; charset=utf-8"), + ("text/html", 406, "application/json"), + ("application/json", 200, "application/json"), + ("*/*", 200, "application/json"), + ("text/event-stream, application/json", 200, "text/event-stream; charset=utf-8"), + ("application/json, */*", 200, "application/json"), + ("", 200, "application/json"), + ], +) +def test_eager_flow_stream_output( + stream_output, + accept, + expected_status_code, + expected_content_type, +): + payload = { + "input_val": "val", + } + headers = { + "Content-Type": "application/json", + "Accept": accept, + } + response = stream_output.post("/score", json=payload, headers=headers) + error_msg = f"Response code indicates error {response.status_code} - {response.data.decode()}" + assert response.status_code == expected_status_code, error_msg + assert response.content_type == expected_content_type + + if response.status_code == 406: + assert response.json["error"]["code"] == "UserError" + assert ( + f"Media type {accept} in Accept header is not acceptable. Supported media type(s) -" + in response.json["error"]["message"] + ) + + if "text/event-stream" in response.content_type: + for line in response.data.decode().split("\n"): + print(line) + else: + result = response.json + print(result) + + +@pytest.mark.e2etest +def test_eager_flow_multiple_stream_output(multiple_stream_outputs): + headers = { + "Content-Type": "application/json", + "Accept": "text/event-stream", + } + response = multiple_stream_outputs.post("/score", data=json.dumps({"input_val": 1}), headers=headers) + assert ( + response.status_code == 400 + ), f"Response code indicates error {response.status_code} - {response.data.decode()}" + response = json.loads(response.data.decode()) + assert response == {"error": {"code": "UserError", "message": "Multiple stream output fields not supported."}} + + +@pytest.mark.e2etest +def test_eager_flow_evc(eager_flow_evc): + # Supported: flow with EVC in definition + response = eager_flow_evc.post("/score", data=json.dumps({})) + assert ( + response.status_code == 200 + ), f"Response code indicates error {response.status_code} - {response.data.decode()}" + response = json.loads(response.data.decode()) + assert response == "Hello world! azure" + + +@pytest.mark.e2etest +def test_eager_flow_evc_override(eager_flow_evc_override): + # Supported: EVC's connection exist in flow definition + response = eager_flow_evc_override.post("/score", data=json.dumps({})) + assert ( + response.status_code == 200 + ), f"Response code indicates error {response.status_code} - {response.data.decode()}" + response = json.loads(response.data.decode()) + assert response != "Hello world! ${azure_open_ai_connection.api_base}" + + +@pytest.mark.e2etest +def test_eager_flow_evc_override_not_exist(eager_flow_evc_override_not_exist): + # EVC's connection not exist in flow definition, will resolve it. + response = eager_flow_evc_override_not_exist.post("/score", data=json.dumps({})) + assert ( + response.status_code == 200 + ), f"Response code indicates error {response.status_code} - {response.data.decode()}" + response = json.loads(response.data.decode()) + # EVC not resolved since the connection not exist in flow definition + assert response == "Hello world! azure" + + +@pytest.mark.e2etest +def test_eager_flow_evc_connection_not_exist(eager_flow_evc_connection_not_exist): + # Won't get not existed connection since it's override + response = eager_flow_evc_connection_not_exist.post("/score", data=json.dumps({})) + assert ( + response.status_code == 200 + ), f"Response code indicates error {response.status_code} - {response.data.decode()}" + response = json.loads(response.data.decode()) + # EVC not resolved since the connection not exist in flow definition + assert response == "Hello world! VALUE" + + +@pytest.mark.e2etest +def test_eager_flow_with_init(callable_class): + response1 = callable_class.post("/score", data=json.dumps({"func_input": "input2"})) + assert ( + response1.status_code == 200 + ), f"Response code indicates error {response1.status_code} - {response1.data.decode()}" + response1 = json.loads(response1.data.decode()) + + response2 = callable_class.post("/score", data=json.dumps({"func_input": "input2"})) + assert ( + response2.status_code == 200 + ), f"Response code indicates error {response2.status_code} - {response2.data.decode()}" + response2 = json.loads(response2.data.decode()) + assert response1 == response2 diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve_azureml_extension.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve_azureml_extension.py index e3efb160a29..b03aee1e129 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve_azureml_extension.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_serve_azureml_extension.py @@ -7,7 +7,7 @@ @pytest.mark.e2etest def test_azureml_serving_api_with_encoded_connection(flow_serving_client_with_encoded_connection): response = flow_serving_client_with_encoded_connection.get("/health") - assert b'{"status":"Healthy","version":"0.0.1"}' in response.data + assert b"Healthy" in response.data response = flow_serving_client_with_encoded_connection.post("/score", data=json.dumps({"text": "hi"})) assert ( response.status_code == 200 diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_test.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_test.py index f9e06a9c1ce..f1a063e1d30 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_test.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_flow_test.py @@ -1,6 +1,7 @@ import logging import sys import tempfile +from dataclasses import is_dataclass from pathlib import Path from types import GeneratorType @@ -10,6 +11,7 @@ from promptflow._sdk._constants import LOGGER_NAME from promptflow._sdk._pf_client import PFClient +from promptflow.core._utils import init_executable from promptflow.exceptions import UserErrorException PROMOTFLOW_ROOT = Path(__file__) / "../../../.." @@ -320,7 +322,7 @@ def test_eager_flow_with_evc(self): { "entry": "entry:my_flow", "function": "my_flow", - "inputs": {"input_val": {"type": "string"}}, + "inputs": {"input_val": {"default": "gpt", "type": "string"}}, "outputs": {"output": {"type": "string"}}, }, ), @@ -329,7 +331,7 @@ def test_eager_flow_with_evc(self): { "entry": "my_module.entry:my_flow", "function": "my_flow", - "inputs": {"input_val": {"type": "string"}}, + "inputs": {"input_val": {"default": "gpt", "type": "string"}}, "outputs": {"output": {"type": "string"}}, }, ), @@ -338,7 +340,7 @@ def test_eager_flow_with_evc(self): { "entry": "flow:my_flow_entry", "function": "my_flow_entry", - "inputs": {"input_val": {"type": "string"}}, + "inputs": {"input_val": {"default": "gpt", "type": "string"}}, "outputs": {"output": {"type": "string"}}, }, ), @@ -358,13 +360,48 @@ def test_generate_flow_meta_exception(self): assert "Entry function my_func is not valid." in str(e.value) def test_init_executable(self): - from promptflow import load_flow from promptflow.contracts.flow import FlowInputDefinition, FlowOutputDefinition flow_path = Path(f"{EAGER_FLOWS_DIR}/simple_with_yaml").absolute() - flow = load_flow(flow_path) - executable = flow._init_executable() + executable = init_executable(flow_path=flow_path) # call values in executable.inputs are FlowInputDefinitions assert all([isinstance(value, FlowInputDefinition) for value in executable.inputs.values()]) # call values in executable.outputs are FlowOutputDefinitions assert all([isinstance(value, FlowOutputDefinition) for value in executable.outputs.values()]) + + def test_eager_flow_stream_output(self): + flow_path = Path(f"{EAGER_FLOWS_DIR}/stream_output/").absolute() + result = _client._flows._test(flow=flow_path, inputs={}) + assert result.run_info.status.value == "Completed", result.run_info.error + # directly return the consumed generator to align with the behavior of DAG flow test + assert result.output == "Hello world! " + + def test_stream_output_with_builtin_llm(self): + flow_path = Path(f"{EAGER_FLOWS_DIR}/builtin_llm/").absolute() + result = _client._flows._test( + flow=flow_path, + inputs={"stream": True}, + environment_variables={ + "OPENAI_API_KEY": "${azure_open_ai_connection.api_key}", + "AZURE_OPENAI_ENDPOINT": "${azure_open_ai_connection.api_base}", + }, + ) + assert result.run_info.status.value == "Completed", result.run_info.error + # directly return the consumed generator to align with the behavior of DAG flow test + assert isinstance(result.output, str) + + def test_eager_flow_multiple_stream_outputs(self): + flow_path = Path(f"{EAGER_FLOWS_DIR}/multiple_stream_outputs/").absolute() + result = _client._flows._test(flow=flow_path, inputs={}) + assert result.run_info.status.value == "Completed", result.run_info.error + # directly return the consumed generator to align with the behavior of DAG flow test + assert result.output == {"output1": "0123456789", "output2": "0123456789"} + + def test_eager_flow_multiple_stream_outputs_dataclass(self): + flow_path = Path(f"{EAGER_FLOWS_DIR}/multiple_stream_outputs_dataclass/").absolute() + result = _client._flows._test(flow=flow_path, inputs={}) + assert result.run_info.status.value == "Completed", result.run_info.error + # directly return the consumed generator to align with the behavior of DAG flow test + assert is_dataclass(result.output) + assert result.output.output1 == "0123456789" + assert result.output.output2 == "0123456789" diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_orm.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_orm.py index c95c4d74ffc..db4f79381dd 100644 --- a/src/promptflow/tests/sdk_cli_test/e2etests/test_orm.py +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_orm.py @@ -5,15 +5,93 @@ import datetime import json import uuid +from collections import namedtuple +from typing import Optional import pytest from promptflow._sdk._constants import ListViewType, RunStatus, RunTypes from promptflow._sdk._errors import RunNotFoundError from promptflow._sdk._orm import RunInfo +from promptflow._sdk._orm.trace import Event, LineRun, Span +SpanInfo = namedtuple("SpanInfo", ["trace_id", "span_id", "name"]) -@pytest.fixture() + +def persist_span(trace_id: str, span_id: str, name: str) -> None: + span = Span( + trace_id=trace_id, + span_id=span_id, + name=name, + context={ + "trace_id": trace_id, + "span_id": span_id, + "trace_state": "", + }, + kind="1", + parent_id=None, + start_time=datetime.datetime.now(), + end_time=datetime.datetime.now(), + status={ + "status_code": "Ok", + "description": "", + }, + attributes=None, + links=None, + events=None, + resource={ + "attributes": { + "service.name": "promptflow", + }, + "schema_url": "", + }, + ) + span.persist() + + +def persist_event(trace_id: str, span_id: str, event_id: Optional[str] = None) -> str: + event_id = event_id or str(uuid.uuid4()) + event = Event( + event_id=event_id, + trace_id=trace_id, + span_id=span_id, + data=str(uuid.uuid4()), + ) + event.persist() + return event_id + + +def persist_line_run( + trace_id: str, + root_span_id: str, + line_run_id: Optional[str] = None, + parent_id: Optional[str] = None, + run: Optional[str] = None, + line_number: Optional[int] = None, +) -> str: + line_run_id = line_run_id or str(uuid.uuid4()) + line_run = LineRun( + line_run_id=line_run_id, + trace_id=trace_id, + root_span_id=root_span_id, + inputs=dict(), + outputs=dict(), + start_time=datetime.datetime.now(), + end_time=datetime.datetime.now(), + status="Ok", + duration=3.14, + name=str(uuid.uuid4()), + kind="1", + collection=str(uuid.uuid4()), + parent_id=parent_id, + run=run, + line_number=line_number, + ) + line_run.persist() + return line_run_id + + +@pytest.fixture def run_name() -> str: name = str(uuid.uuid4()) run_info = RunInfo( @@ -30,6 +108,15 @@ def run_name() -> str: return name +@pytest.fixture +def mock_span() -> SpanInfo: + trace_id = str(uuid.uuid4()) + span_id = str(uuid.uuid4()) + name = f"mock_span_{uuid.uuid4()}" + persist_span(trace_id, span_id, name) + return SpanInfo(trace_id=trace_id, span_id=span_id, name=name) + + @pytest.mark.sdk_test @pytest.mark.e2etest class TestRunInfo: @@ -128,3 +215,55 @@ def test_null_type_and_display_name(self) -> None: run_info_from_db = RunInfo.get(name) assert run_info_from_db.type is None assert run_info_from_db.display_name is None + + +@pytest.mark.sdk_test +@pytest.mark.e2etest +class TestTrace: + def test_span_persist_and_get(self, mock_span: SpanInfo) -> None: + span = Span.get(span_id=mock_span.span_id) + assert span.name == mock_span.name + span = Span.get(trace_id=mock_span.trace_id, span_id=mock_span.span_id) + assert span.name == mock_span.name + + def test_span_list(self, mock_span: SpanInfo) -> None: + spans = Span.list(trace_ids=mock_span.trace_id) + assert len(spans) == 1 + + def test_event_persist_and_get(self) -> None: + trace_id = str(uuid.uuid4()) + span_id = str(uuid.uuid4()) + event_id = persist_event(trace_id=trace_id, span_id=span_id) + event = Event.get(event_id=event_id) + assert event.trace_id == trace_id and event.span_id == span_id + + def test_event_list(self) -> None: + trace_id = str(uuid.uuid4()) + span_id = str(uuid.uuid4()) + persist_event(trace_id=trace_id, span_id=span_id) + events = Event.list(trace_id=trace_id, span_id=span_id) + assert len(events) == 1 + + def test_line_run_persist_and_get(self) -> None: + trace_id = str(uuid.uuid4()) + span_id = str(uuid.uuid4()) + line_run_id = persist_line_run(trace_id=trace_id, root_span_id=span_id) + line_run = LineRun.get(line_run_id=line_run_id) + assert line_run.trace_id == trace_id and line_run.root_span_id == span_id + + def test_line_run_children_get(self) -> None: + # mock parent line run + trace_id, span_id = str(uuid.uuid4()), str(uuid.uuid4()) + line_run_id = persist_line_run(trace_id=trace_id, root_span_id=span_id) + # mock child line runs + num_child_line_runs = 3 + child_line_run_ids = list() + for _ in range(num_child_line_runs): + child_line_run_id = persist_line_run( + trace_id=str(uuid.uuid4()), root_span_id=str(uuid.uuid4()), parent_id=line_run_id + ) + child_line_run_ids.append(child_line_run_id) + child_line_runs = LineRun._get_children(line_run_id=line_run_id) + assert len(child_line_runs) == num_child_line_runs + for child_line_run in child_line_runs: + assert child_line_run.line_run_id in child_line_run_ids diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_telemetry.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_telemetry.py new file mode 100644 index 00000000000..2c729f592ad --- /dev/null +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_telemetry.py @@ -0,0 +1,63 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import platform +from unittest.mock import patch + +import pydash +import pytest + +from promptflow._sdk._telemetry import get_telemetry_logger + + +@pytest.mark.usefixtures("use_secrets_config_file", "setup_local_connection") +@pytest.mark.sdk_test +@pytest.mark.e2etest +class TestTelemetry: + def test_run_yaml_type(self, pf): + from promptflow._constants import FlowType + from promptflow._sdk._configuration import Configuration + from promptflow._sdk._telemetry.logging_handler import PromptFlowSDKExporter + + envelope = None + flow_type = None + config = Configuration.get_instance() + custom_dimensions = { + "python_version": platform.python_version(), + "installation_id": config.get_or_set_installation_id(), + } + log_to_envelope = PromptFlowSDKExporter( + connection_string="InstrumentationKey=00000000-0000-0000-0000-000000000000", + custom_dimensions=custom_dimensions, + )._log_to_envelope + + def log_event(log_data): + nonlocal envelope + envelope = log_to_envelope(log_data) + + def check_evelope(): + assert envelope.data.base_data.name.startswith("pf.runs.create_or_update") + custom_dimensions = pydash.get(envelope, "data.base_data.properties") + assert isinstance(custom_dimensions, dict) + assert "flow_type" in custom_dimensions + assert custom_dimensions["flow_type"] == flow_type + + with patch.object(PromptFlowSDKExporter, "_log_to_envelope", side_effect=log_event), patch( + "promptflow._sdk._telemetry.telemetry.get_telemetry_logger", side_effect=get_telemetry_logger + ): + flow_type = FlowType.DAG_FLOW + pf.run( + flow="./tests/test_configs/flows/print_input_flow", + data="./tests/test_configs/datas/print_input_flow.jsonl", + ) + logger = get_telemetry_logger() + logger.handlers[0].flush() + check_evelope() + + flow_type = FlowType.FLEX_FLOW + pf.run( + flow="./tests/test_configs/eager_flows/simple_with_req", + data="./tests/test_configs/datas/simple_eager_flow_data.jsonl", + ) + logger.handlers[0].flush() + check_evelope() diff --git a/src/promptflow/tests/sdk_cli_test/e2etests/test_trace.py b/src/promptflow/tests/sdk_cli_test/e2etests/test_trace.py new file mode 100644 index 00000000000..a51882e26ec --- /dev/null +++ b/src/promptflow/tests/sdk_cli_test/e2etests/test_trace.py @@ -0,0 +1,276 @@ +import datetime +import json +import typing +import uuid +from pathlib import Path +from unittest.mock import patch + +import pytest +from mock import mock + +from promptflow._constants import ( + RUNNING_LINE_RUN_STATUS, + SpanAttributeFieldName, + SpanResourceAttributesFieldName, + SpanResourceFieldName, +) +from promptflow._sdk._constants import TRACE_DEFAULT_COLLECTION +from promptflow._sdk._pf_client import PFClient +from promptflow._sdk.entities._trace import Span + +TEST_ROOT = Path(__file__).parent.parent.parent +FLOWS_DIR = (TEST_ROOT / "test_configs/flows").resolve().absolute().as_posix() + + +def load_and_override_span_example( + trace_id: str, + span_id: str, + parent_id: typing.Optional[str], + line_run_id: str, +) -> typing.Dict: + # load template span from local example file + example_span_path = TEST_ROOT / "test_configs/traces/large-data-span-example.json" + with open(example_span_path, mode="r", encoding="utf-8") as f: + span_dict = json.load(f) + # override field(s) + span_dict["context"]["trace_id"] = trace_id + span_dict["context"]["span_id"] = span_id + span_dict["parent_id"] = parent_id + span_dict["attributes"]["line_run_id"] = line_run_id + return span_dict + + +def mock_span( + trace_id: str, + span_id: str, + parent_id: typing.Optional[str], + line_run_id: str, +) -> Span: + span_dict = load_and_override_span_example( + trace_id=trace_id, span_id=span_id, parent_id=parent_id, line_run_id=line_run_id + ) + # type conversion for timestamp - required for Span constructor + span_dict["start_time"] = datetime.datetime.fromisoformat(span_dict["start_time"]) + span_dict["end_time"] = datetime.datetime.fromisoformat(span_dict["end_time"]) + # create Span object + return Span( + name=span_dict["name"], + trace_id=trace_id, + span_id=span_id, + parent_id=parent_id, + context=span_dict["context"], + kind=span_dict["kind"], + start_time=span_dict["start_time"], + end_time=span_dict["end_time"], + status=span_dict["status"], + attributes=span_dict["attributes"], + links=span_dict["links"], + events=span_dict["events"], + resource=span_dict["resource"], + ) + + +def mock_span_for_delete_tests( + run: typing.Optional[str] = None, + collection: typing.Optional[str] = None, + start_time: typing.Optional[datetime.datetime] = None, +) -> Span: + span = mock_span( + trace_id=str(uuid.uuid4()), span_id=str(uuid.uuid4()), parent_id=None, line_run_id=str(uuid.uuid4()) + ) + if run is not None: + span.attributes.pop(SpanAttributeFieldName.LINE_RUN_ID) + span.attributes[SpanAttributeFieldName.BATCH_RUN_ID] = run + span.attributes[SpanAttributeFieldName.LINE_NUMBER] = 0 # always line 0 + if collection is not None: + span.resource[SpanResourceFieldName.ATTRIBUTES][SpanResourceAttributesFieldName.COLLECTION] = collection + if start_time is not None: + span.start_time = start_time + span._persist() + return span + + +def assert_span_equals(span: Span, expected_span_dict: typing.Dict) -> None: + span_dict = span._to_rest_object() + # assert "external_event_data_uris" in span_dict and pop + assert "external_event_data_uris" in span_dict + span_dict.pop("external_event_data_uris") + assert span_dict == expected_span_dict + + +@pytest.mark.e2etest +@pytest.mark.sdk_test +class TestTraceEntitiesAndOperations: + def test_span_persist_and_gets(self, pf: PFClient) -> None: + trace_id = str(uuid.uuid4()) + span_id = str(uuid.uuid4()) + parent_id = str(uuid.uuid4()) + line_run_id = str(uuid.uuid4()) + span = mock_span(trace_id=trace_id, span_id=span_id, parent_id=parent_id, line_run_id=line_run_id) + span._persist() + # trace operations - get span + # eager load + eager_load_span = pf.traces.get_span(trace_id=trace_id, span_id=span_id, lazy_load=False) + expected_span_dict = load_and_override_span_example( + trace_id=trace_id, span_id=span_id, parent_id=parent_id, line_run_id=line_run_id + ) + assert_span_equals(eager_load_span, expected_span_dict) + # lazy load (default) + lazy_load_span = pf.traces.get_span(trace_id=trace_id, span_id=span_id) + # events.attributes should be empty in lazy load mode + for i in range(len(expected_span_dict["events"])): + expected_span_dict["events"][i]["attributes"] = dict() + assert_span_equals(lazy_load_span, expected_span_dict) + + def test_spans_persist_and_line_run_gets(self, pf: PFClient) -> None: + trace_id = str(uuid.uuid4()) + non_root_span_id = str(uuid.uuid4()) + root_span_id = str(uuid.uuid4()) + line_run_id = str(uuid.uuid4()) + # non-root span + span = mock_span( + trace_id=trace_id, + span_id=non_root_span_id, + parent_id=root_span_id, + line_run_id=line_run_id, + ) + span._persist() + running_line_run = pf.traces.get_line_run(line_run_id=line_run_id) + expected_running_line_run_dict = { + "line_run_id": line_run_id, + "trace_id": trace_id, + "root_span_id": None, + "inputs": None, + "outputs": None, + "start_time": "2024-03-21T06:37:22.332582", + "end_time": None, + "status": RUNNING_LINE_RUN_STATUS, + "duration": None, + "name": None, + "kind": None, + "collection": TRACE_DEFAULT_COLLECTION, + "cumulative_token_count": None, + "parent_id": None, + "run": None, + "line_number": None, + "experiment": None, + "session_id": None, + "evaluations": None, + } + assert running_line_run._to_rest_object() == expected_running_line_run_dict + # root span + span = mock_span( + trace_id=trace_id, + span_id=root_span_id, + parent_id=None, + line_run_id=line_run_id, + ) + span._persist() + terminated_line_run = pf.traces.get_line_run(line_run_id=line_run_id) + expected_terminated_line_run_dict = { + "line_run_id": line_run_id, + "trace_id": trace_id, + "root_span_id": root_span_id, + "inputs": {"input1": "value1", "input2": "value2"}, + "outputs": {"output1": "val1", "output2": "val2"}, + "start_time": "2024-03-21T06:37:22.332582", + "end_time": "2024-03-21T06:37:26.445007", + "status": "Ok", + "duration": 4.112425, + "name": "openai.resources.chat.completions.Completions.create", + "kind": "LLM", + "collection": TRACE_DEFAULT_COLLECTION, + "cumulative_token_count": { + "completion": 14, + "prompt": 1497, + "total": 1511, + }, + "parent_id": None, + "run": None, + "line_number": None, + "experiment": None, + "session_id": None, + "evaluations": None, + } + assert terminated_line_run._to_rest_object() == expected_terminated_line_run_dict + + def test_delete_traces_three_tables(self, pf: PFClient) -> None: + # trace operation does not expose API for events and spans + # so directly use ORM class to list and assert events and spans existence and deletion + from promptflow._sdk._orm.trace import Event as ORMEvent + from promptflow._sdk._orm.trace import LineRun as ORMLineRun + from promptflow._sdk._orm.trace import Span as ORMSpan + + mock_run = str(uuid.uuid4()) + mock_span = mock_span_for_delete_tests(run=mock_run) + # assert events, span and line_run are persisted + assert len(ORMEvent.list(trace_id=mock_span.trace_id, span_id=mock_span.span_id)) == 2 + assert len(ORMSpan.list(trace_ids=[mock_span.trace_id])) == 1 + assert len(ORMLineRun.list(runs=[mock_run])) == 1 + # delete traces and assert all traces are deleted + pf.traces.delete(run=mock_run) + assert len(ORMEvent.list(trace_id=mock_span.trace_id, span_id=mock_span.span_id)) == 0 + assert len(ORMSpan.list(trace_ids=[mock_span.trace_id])) == 0 + assert len(ORMLineRun.list(runs=[mock_run])) == 0 + + def test_delete_traces_with_run(self, pf: PFClient) -> None: + mock_run = str(uuid.uuid4()) + mock_span_for_delete_tests(run=mock_run) + assert len(pf.traces.list_line_runs(runs=[mock_run])) == 1 + pf.traces.delete(run=mock_run) + assert len(pf.traces.list_line_runs(runs=[mock_run])) == 0 + + def test_delete_traces_with_collection(self, pf: PFClient) -> None: + mock_collection = str(uuid.uuid4()) + mock_span_for_delete_tests(collection=mock_collection) + assert len(pf.traces.list_line_runs(collection=mock_collection)) == 1 + pf.traces.delete(collection=mock_collection) + assert len(pf.traces.list_line_runs(collection=mock_collection)) == 0 + + def test_delete_traces_with_collection_and_started_before(self, pf: PFClient) -> None: + # mock some traces that start 2 days before, and delete those start 1 days before + mock_start_time = datetime.datetime.now() - datetime.timedelta(days=2) + collection1, collection2 = str(uuid.uuid4()), str(uuid.uuid4()) + mock_span_for_delete_tests(collection=collection1, start_time=mock_start_time) + mock_span_for_delete_tests(collection=collection2, start_time=mock_start_time) + assert ( + len(pf.traces.list_line_runs(collection=collection1)) == 1 + and len(pf.traces.list_line_runs(collection=collection2)) == 1 + ) + delete_query_time = datetime.datetime.now() - datetime.timedelta(days=1) + pf.traces.delete(collection=collection1, started_before=delete_query_time.isoformat()) + # only collection1 traces are deleted + assert ( + len(pf.traces.list_line_runs(collection=collection1)) == 0 + and len(pf.traces.list_line_runs(collection=collection2)) == 1 + ) + pf.traces.delete(collection=collection2, started_before=delete_query_time.isoformat()) + assert len(pf.traces.list_line_runs(collection=collection2)) == 0 + + +@pytest.mark.usefixtures("use_secrets_config_file", "recording_injection", "setup_local_connection") +@pytest.mark.e2etest +@pytest.mark.sdk_test +class TestTraceWithDevKit: + def test_flow_test_trace_enabled(self, pf: PFClient) -> None: + import promptflow.tracing._start_trace + + with mock.patch("promptflow._sdk._configuration.Configuration.is_internal_features_enabled") as mock_func: + mock_func.return_value = True + with patch.object(promptflow.tracing._start_trace, "start_trace") as mock_start_trace: + inputs = {"url": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", "answer": "Channel", "evidence": "Url"} + pf.test(flow=Path(f"{FLOWS_DIR}/web_classification").absolute(), inputs=inputs) + assert mock_start_trace.call_count == 1 + + def test_flow_test_single_node_trace_not_enabled(self, pf: PFClient) -> None: + import promptflow.tracing._start_trace + + with mock.patch("promptflow._sdk._configuration.Configuration.is_internal_features_enabled") as mock_func: + mock_func.return_value = True + with patch.object(promptflow.tracing._start_trace, "start_trace") as mock_start_trace: + pf.test( + flow=Path(f"{FLOWS_DIR}/web_classification").absolute(), + inputs={"fetch_url": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, + node="fetch_text_content_from_url", + ) + assert mock_start_trace.call_count == 0 diff --git a/src/promptflow/tests/sdk_cli_test/recording_utilities/constants.py b/src/promptflow/tests/sdk_cli_test/recording_utilities/constants.py deleted file mode 100644 index 5ba0a5c8883..00000000000 --- a/src/promptflow/tests/sdk_cli_test/recording_utilities/constants.py +++ /dev/null @@ -1,7 +0,0 @@ -ENVIRON_TEST_MODE = "PROMPT_FLOW_TEST_MODE" - - -class RecordMode: - LIVE = "live" - RECORD = "record" - REPLAY = "replay" diff --git a/src/promptflow/tests/sdk_cli_test/recording_utilities/openai_inject_recording.py b/src/promptflow/tests/sdk_cli_test/recording_utilities/openai_inject_recording.py deleted file mode 100644 index dc923f91de8..00000000000 --- a/src/promptflow/tests/sdk_cli_test/recording_utilities/openai_inject_recording.py +++ /dev/null @@ -1,42 +0,0 @@ -import asyncio -import functools - -from promptflow.tracing._openai_injector import inject_function_async, inject_function_sync, inject_operation_headers - -from .mock_tool import call_func, call_func_async - - -def inject_recording(f): - if asyncio.iscoroutinefunction(f): - - @functools.wraps(f) - async def wrapper(*args, **kwargs): - return await call_func_async(f, args, kwargs) - - else: - - @functools.wraps(f) - def wrapper(*args, **kwargs): - return call_func(f, args, kwargs) - - return wrapper - - -def inject_async_with_recording(f, trace_type): - wrapper_fun = inject_operation_headers(( - inject_function_async( - args_to_ignore=["api_key", "headers", "extra_headers"], trace_type=trace_type - )(inject_recording(f)) - )) - wrapper_fun._original = f - return wrapper_fun - - -def inject_sync_with_recording(f, trace_type): - wrapper_fun = inject_operation_headers(( - inject_function_sync( - args_to_ignore=["api_key", "headers", "extra_headers"], trace_type=trace_type - )(inject_recording(f)) - )) - wrapper_fun._original = f - return wrapper_fun diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_chat_group.py b/src/promptflow/tests/sdk_cli_test/unittests/test_chat_group.py new file mode 100644 index 00000000000..7b8ebe7f015 --- /dev/null +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_chat_group.py @@ -0,0 +1,62 @@ +from pathlib import Path + +import pytest +from pytest_mock import MockFixture + +from promptflow._sdk._errors import ChatGroupError, ChatRoleError +from promptflow._sdk.entities._chat_group._chat_group import ChatGroup +from promptflow._sdk.entities._chat_group._chat_role import ChatRole + +PROMOTFLOW_ROOT = Path(__file__) / "../../../.." + +TEST_ROOT = Path(__file__).parent.parent.parent +FLOWS_DIR = TEST_ROOT / "test_configs/flows" + + +@pytest.mark.sdk_test +@pytest.mark.unittest +class TestChatGroup: + def test_chat_role_creation_error(self): + with pytest.raises(ChatRoleError, match=r"Failed to create chat role"): + ChatRole(flow=FLOWS_DIR / "non_existing_flow", role="assistant") + + def test_chat_role_invoke_error(self): + copilot = ChatRole( + flow=FLOWS_DIR / "chat_group_copilot", + role="assistant", + name="copilot", + inputs=dict( + question="Tell me a joke", + model="gpt-3.5-turbo", + conversation_history="${parent.conversation_history}", + ), + ) + with pytest.raises(ChatRoleError, match=r"Chat role invoke does not accept positional arguments"): + copilot.invoke(1) + + def test_chat_group_invalid_parameters(self, mocker: MockFixture): + mocker.patch.object(ChatRole, "_build_role_io", return_value=({}, {})) + copilot = ChatRole(flow=FLOWS_DIR / "chat_group_copilot", role="assistant") + simulation = ChatRole(flow=FLOWS_DIR / "chat_group_simulation", role="user") + simulation_1 = ChatRole(flow=FLOWS_DIR / "chat_group_simulation", role="user") + entry = ChatRole(flow=FLOWS_DIR / "hello-world", role="user2") + + # entry role is not in role list + with pytest.raises(ChatGroupError, match=r"Entry role .*? is not in roles list"): + ChatGroup(roles=[copilot, simulation], entry_role=entry) + + # invalid roles passed in + with pytest.raises(ChatGroupError, match="Agents should be a non-empty list of ChatRole"): + ChatGroup(roles=[1, True]) + + # duplicate roles + with pytest.raises(ChatGroupError, match="Duplicate roles are not allowed"): + ChatGroup(roles=[simulation, simulation_1]) + + # invalid parameters + with pytest.raises(ChatGroupError, match="should be an integer"): + ChatGroup(roles=[copilot, simulation], max_turns="4") + with pytest.raises(ChatGroupError, match="should be an integer"): + ChatGroup(roles=[copilot, simulation], max_tokens="1000") + with pytest.raises(ChatGroupError, match="should be an integer"): + ChatGroup(roles=[copilot, simulation], max_time="1000") diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_config.py b/src/promptflow/tests/sdk_cli_test/unittests/test_config.py index d4789823ad4..768f042a3da 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_config.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_config.py @@ -7,7 +7,7 @@ from promptflow._sdk._configuration import Configuration, InvalidConfigValue from promptflow._sdk._constants import FLOW_DIRECTORY_MACRO_IN_CONFIG -from promptflow._sdk._utils import ClientUserAgentUtil +from promptflow._utils.user_agent_utils import ClientUserAgentUtil CONFIG_DATA_ROOT = Path(__file__).parent.parent.parent / "test_configs" / "configs" diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_connection.py b/src/promptflow/tests/sdk_cli_test/unittests/test_connection.py index 747942197fc..41ae8db82b5 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_connection.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_connection.py @@ -10,7 +10,7 @@ from promptflow._cli._pf._connection import validate_and_interactive_get_secrets from promptflow._sdk._constants import SCRUBBED_VALUE, ConnectionAuthMode, CustomStrongTypeConnectionConfigs -from promptflow._sdk._errors import RequiredEnvironmentVariablesNotSetError, SDKError +from promptflow._sdk._errors import ConnectionClassNotFoundError, SDKError from promptflow._sdk._load_functions import _load_env_to_connection from promptflow._sdk.entities._connection import ( AzureContentSafetyConnection, @@ -25,7 +25,9 @@ WeaviateConnection, _Connection, ) +from promptflow._sdk.operations._connection_operations import ConnectionOperations from promptflow._utils.yaml_utils import load_yaml +from promptflow.core._connection import RequiredEnvironmentVariablesNotSetError from promptflow.exceptions import UserErrorException TEST_ROOT = Path(__file__).parent.parent.parent @@ -249,7 +251,7 @@ def test_connection_load_from_env(self): def test_connection_load_from_env_file_bad_case(self): # Test file not found - with pytest.raises(FileNotFoundError) as e: + with pytest.raises(UserErrorException) as e: _load_env_to_connection(source=CONNECTION_ROOT / "mock.env", params_override=[{"name": "env_conn"}]) assert "not found" in str(e.value) # Test file empty @@ -466,3 +468,41 @@ def test_connection_from_env(self): "organization": "test_org", "base_url": "test_base", } + + def test_convert_core_connection_to_sdk_connection(self): + # Assert strong type + from promptflow.connections import AzureOpenAIConnection as CoreAzureOpenAIConnection + + connection_args = { + "name": "abc", + "api_base": "abc", + "auth_mode": "meid_token", + "api_version": "2023-07-01-preview", + } + connection = CoreAzureOpenAIConnection(**connection_args) + sdk_connection = ConnectionOperations._convert_core_connection_to_sdk_connection(connection) + assert isinstance(sdk_connection, AzureOpenAIConnection) + assert sdk_connection._to_dict() == { + "module": "promptflow.connections", + "type": "azure_open_ai", + "api_type": "azure", + **connection_args, + } + # Assert custom type + from promptflow.connections import CustomConnection as CoreCustomConnection + + connection_args = { + "name": "abc", + "configs": {"a": "1"}, + "secrets": {"b": "2"}, + } + connection = CoreCustomConnection(**connection_args) + sdk_connection = ConnectionOperations._convert_core_connection_to_sdk_connection(connection) + assert isinstance(sdk_connection, CustomConnection) + assert sdk_connection._to_dict() == {"module": "promptflow.connections", "type": "custom", **connection_args} + + # Bad case + connection = CoreCustomConnection(**connection_args) + connection.type = "unknown" + with pytest.raises(ConnectionClassNotFoundError): + ConnectionOperations._convert_core_connection_to_sdk_connection(connection) diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_experiment.py b/src/promptflow/tests/sdk_cli_test/unittests/test_experiment.py index c9ea0b6ee36..f61a68133a0 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_experiment.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_experiment.py @@ -5,7 +5,7 @@ from promptflow._sdk._errors import MultipleExperimentTemplateError, NoExperimentTemplateError from promptflow._sdk._load_functions import _load_experiment_template -from promptflow._sdk._submitter.experiment_orchestrator import ExperimentTemplateTestContext +from promptflow._sdk._orchestrator.experiment_orchestrator import ExperimentTemplateTestContext from promptflow._sdk.entities._experiment import Experiment, ExperimentData, ExperimentInput, FlowNode TEST_ROOT = Path(__file__).parent.parent.parent diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_flow.py b/src/promptflow/tests/sdk_cli_test/unittests/test_flow.py index 4fded942c94..5f981b3d2c3 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_flow.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_flow.py @@ -7,8 +7,7 @@ from marshmallow import ValidationError from promptflow import load_flow -from promptflow._sdk.entities._eager_flow import EagerFlow -from promptflow._sdk.entities._flow import ProtectedFlow +from promptflow._sdk.entities._flow import FlexFlow, Flow FLOWS_DIR = Path("./tests/test_configs/flows") EAGER_FLOWS_DIR = Path("./tests/test_configs/eager_flows") @@ -26,7 +25,7 @@ class TestRun: ) def test_eager_flow_load(self, kwargs): flow = load_flow(**kwargs) - assert isinstance(flow, EagerFlow) + assert isinstance(flow, FlexFlow) @pytest.mark.parametrize( "kwargs", @@ -37,11 +36,11 @@ def test_eager_flow_load(self, kwargs): ) def test_dag_flow_load(self, kwargs): flow = load_flow(**kwargs) - assert isinstance(flow, ProtectedFlow) + assert isinstance(flow, Flow) def test_flow_load_advanced(self): flow = load_flow(source=EAGER_FLOWS_DIR / "flow_with_environment") - assert isinstance(flow, EagerFlow) + assert isinstance(flow, FlexFlow) assert flow._data["environment"] == {"python_requirements_txt": "requirements.txt"} @pytest.mark.parametrize( diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_flow_invoker.py b/src/promptflow/tests/sdk_cli_test/unittests/test_flow_invoker.py index 6f5087acf56..2a4bc7a7b8f 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_flow_invoker.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_flow_invoker.py @@ -5,13 +5,16 @@ import pytest -from promptflow._sdk._serving._errors import UnexpectedConnectionProviderReturn, UnsupportedConnectionProvider -from promptflow._sdk._serving.flow_invoker import FlowInvoker +from promptflow._sdk._load_functions import load_flow +from promptflow.core._serving._errors import UnexpectedConnectionProviderReturn, UnsupportedConnectionProvider +from promptflow.core._serving.flow_invoker import FlowInvoker from promptflow.exceptions import UserErrorException PROMOTFLOW_ROOT = Path(__file__).parent.parent.parent.parent FLOWS_DIR = Path(PROMOTFLOW_ROOT / "tests/test_configs/flows") -EXAMPLE_FLOW = FLOWS_DIR / "web_classification" +EXAMPLE_FLOW_DIR = FLOWS_DIR / "web_classification" +EXAMPLE_FLOW_FILE = EXAMPLE_FLOW_DIR / "flow.dag.yaml" +EXAMPLE_FLOW = load_flow(EXAMPLE_FLOW_FILE) @pytest.mark.sdk_test @@ -23,15 +26,24 @@ def test_flow_invoker_unsupported_connection_provider(self): FlowInvoker(flow=EXAMPLE_FLOW, connection_provider=[]) with pytest.raises(UserErrorException): - FlowInvoker(flow=EXAMPLE_FLOW, connection_provider="unsupported") + FlowInvoker( + flow=EXAMPLE_FLOW, + connection_provider="Unsupported connection provider", + ) def test_flow_invoker_custom_connection_provider(self): # Return is not a list with pytest.raises(UnexpectedConnectionProviderReturn) as e: - FlowInvoker(flow=EXAMPLE_FLOW, connection_provider=lambda: {}) + FlowInvoker( + flow=EXAMPLE_FLOW, + connection_provider=lambda: {}, + ) assert "should return a list of connections" in str(e.value) # Return is not connection type with pytest.raises(UnexpectedConnectionProviderReturn) as e: - FlowInvoker(flow=EXAMPLE_FLOW, connection_provider=lambda: [1, 2]) + FlowInvoker( + flow=EXAMPLE_FLOW, + connection_provider=lambda: [1, 2], + ) assert "should be connection type" in str(e.value) diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_mlflow_dependencies.py b/src/promptflow/tests/sdk_cli_test/unittests/test_mlflow_dependencies.py index ee486ae7b40..ddd542b9ea0 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_mlflow_dependencies.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_mlflow_dependencies.py @@ -13,6 +13,6 @@ class TestMLFlowDependencies: def test_mlflow_dependencies(self): assert module.DAG_FILE_NAME == "flow.dag.yaml" assert module.Flow == promptflow._sdk.entities._flow.Flow - assert module.FlowInvoker == promptflow._sdk._serving.flow_invoker.FlowInvoker + assert module.FlowInvoker == promptflow.core._serving.flow_invoker.FlowInvoker assert module.remove_additional_includes is not None assert module._merge_local_code_and_additional_includes is not None diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_pf_client.py b/src/promptflow/tests/sdk_cli_test/unittests/test_pf_client.py index 3a023cf4987..d4bd33175d8 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_pf_client.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_pf_client.py @@ -4,7 +4,7 @@ import pytest from promptflow import PFClient -from promptflow._sdk._utils import ClientUserAgentUtil +from promptflow._utils.user_agent_utils import ClientUserAgentUtil @pytest.mark.sdk_test diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_run.py b/src/promptflow/tests/sdk_cli_test/unittests/test_run.py index 9fe153e1424..574687950f2 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_run.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_run.py @@ -7,21 +7,24 @@ from unittest.mock import patch import pytest -from marshmallow import ValidationError from promptflow._sdk._constants import BASE_PATH_CONTEXT_KEY, NODES from promptflow._sdk._errors import InvalidFlowError from promptflow._sdk._load_functions import load_flow, load_run +from promptflow._sdk._orchestrator import RunSubmitter, overwrite_variant, variant_overwrite_context from promptflow._sdk._pf_client import PFClient from promptflow._sdk._run_functions import create_yaml_run -from promptflow._sdk._submitter import RunSubmitter, overwrite_variant, variant_overwrite_context +from promptflow._sdk._utils import callable_to_entry_string from promptflow._sdk.entities import Run from promptflow._sdk.entities._flow import Flow from promptflow._sdk.operations._local_storage_operations import LocalStorageOperations +from promptflow._utils.context_utils import inject_sys_path from promptflow._utils.yaml_utils import load_yaml +from promptflow.exceptions import UserErrorException, ValidationException PROMOTFLOW_ROOT = Path(__file__) / "../../../.." FLOWS_DIR = Path("./tests/test_configs/flows") +EAGER_FLOWS_DIR = Path("./tests/test_configs/eager_flows") RUNS_DIR = Path("./tests/test_configs/runs") DATAS_DIR = Path("./tests/test_configs/datas") @@ -32,6 +35,10 @@ def test_flow() -> Flow: return load_flow(flow_path) +async def my_async_func(): + pass + + @pytest.mark.sdk_test @pytest.mark.unittest class TestRun: @@ -104,20 +111,20 @@ def test_dot_env_resolve(self): def test_run_invalid_flow_path(self): run_id = str(uuid.uuid4()) source = f"{RUNS_DIR}/bulk_run_invalid_flow_path.yaml" - with pytest.raises(ValidationError) as e: + with pytest.raises(ValidationException) as e: load_run(source=source, params_override=[{"name": run_id}]) assert "Can't find directory or file in resolved absolute path:" in str(e.value) def test_run_invalid_remote_flow(self): run_id = str(uuid.uuid4()) source = f"{RUNS_DIR}/bulk_run_invalid_remote_flow_str.yaml" - with pytest.raises(ValidationError) as e: + with pytest.raises(ValidationException) as e: load_run(source=source, params_override=[{"name": run_id}]) assert "Invalid remote flow path. Currently only azureml: is supported" in str(e.value) def test_data_not_exist_validation_error(self): source = f"{RUNS_DIR}/sample_bulk_run.yaml" - with pytest.raises(ValidationError) as e: + with pytest.raises(ValidationException) as e: load_run(source=source, params_override=[{"data": "not_exist"}]) assert "Can't find directory or file" in str(e.value) @@ -130,16 +137,16 @@ def test_data_not_exist_validation_error(self): ], ) def test_invalid_yaml(self, source, error_msg): - with pytest.raises(ValidationError) as e: + with pytest.raises(ValidationException) as e: create_yaml_run(source=source) assert error_msg in str(e.value) def test_run_bulk_invalid_params(self, pf): # Test if function raises FileNotFoundError - with pytest.raises(FileNotFoundError): + with pytest.raises(UserErrorException): pf.run(flow="invalid_path", data="fake_data") - with pytest.raises(FileNotFoundError): + with pytest.raises(UserErrorException): pf.run(flow="invalid_path", data="fake_data", batch_run="fake_run") def test_overwrite_variant(self): @@ -229,3 +236,38 @@ def test_flow_run_with_unknown_field(self, caplog): run_yaml = Path(RUNS_DIR) / "sample_bulk_run.yaml" load_run(source=run_yaml, params_override=[{"unknown_field": "unknown_value"}]) assert "Unknown fields found" in caplog.text + + def test_callable_to_entry_string(self): + + assert callable_to_entry_string(test_flow) == "sdk_cli_test.unittests.test_run:test_flow" + + assert callable_to_entry_string(my_async_func) == "sdk_cli_test.unittests.test_run:my_async_func" + + with inject_sys_path(f"{EAGER_FLOWS_DIR}/multiple_entries"): + from entry2 import my_flow2 + + assert callable_to_entry_string(my_flow2) == "entry2:my_flow2" + + def test_callable_to_entry_string_not_supported(self): + non_callable = "not a callable" + + def function(): + pass + + class MyClass: + def method(self): + pass + + @classmethod + def class_method(cls): + pass + + @staticmethod + def static_method(): + pass + + obj = MyClass() + + for entry in [non_callable, function, obj.method, obj.class_method, obj.static_method, MyClass.class_method]: + with pytest.raises(UserErrorException): + callable_to_entry_string(entry) diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_trace.py b/src/promptflow/tests/sdk_cli_test/unittests/test_trace.py index 0021d9aa468..79af6537bb5 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_trace.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_trace.py @@ -3,26 +3,41 @@ # --------------------------------------------------------- import base64 +import datetime +import json +import logging import os import uuid from typing import Dict from unittest.mock import patch import pytest +from mock import mock from opentelemetry import trace from opentelemetry.proto.trace.v1.trace_pb2 import Span as PBSpan from opentelemetry.sdk.environment_variables import OTEL_EXPORTER_OTLP_ENDPOINT from opentelemetry.sdk.trace import TracerProvider -from promptflow._constants import SpanResourceAttributesFieldName, SpanResourceFieldName, TraceEnvironmentVariableName -from promptflow._sdk.entities._trace import Span -from promptflow.tracing._start_trace import ( - _create_resource, - _is_tracer_provider_configured, - _provision_session_id, - _validate_session_id, - setup_exporter_from_environ, +from promptflow._constants import ( + SpanAttributeFieldName, + SpanResourceAttributesFieldName, + SpanResourceFieldName, + TraceEnvironmentVariableName, +) +from promptflow._sdk._constants import ( + PF_TRACE_CONTEXT, + PF_TRACE_CONTEXT_ATTR, + TRACE_DEFAULT_COLLECTION, + ContextAttributeKey, ) +from promptflow._sdk._tracing import start_trace_with_devkit +from promptflow._sdk.entities._trace import Span +from promptflow.client import PFClient +from promptflow.exceptions import UserErrorException +from promptflow.tracing._operation_context import OperationContext +from promptflow.tracing._start_trace import _is_tracer_provider_set, setup_exporter_from_environ, start_trace + +MOCK_PROMPTFLOW_SERVICE_PORT = "23333" @pytest.fixture @@ -46,98 +61,56 @@ def mock_resource() -> Dict: } +@pytest.fixture +def mock_promptflow_service_invocation(): + """Mock `_invoke_pf_svc` as we don't expect to invoke PFS during unit test.""" + with mock.patch("promptflow._sdk._tracing._invoke_pf_svc") as mock_func: + mock_func.return_value = MOCK_PROMPTFLOW_SERVICE_PORT + yield + + @pytest.mark.sdk_test @pytest.mark.unittest class TestStartTrace: - def test_session_id_validation(self) -> None: - # [A-Za-z0-9_-] - _validate_session_id(str(uuid.uuid4())) - # space - with pytest.raises(ValueError): - _validate_session_id("test session") - - def test_create_resource(self) -> None: - session_id = str(uuid.uuid4()) - resource1 = _create_resource(session_id=session_id) - assert resource1.attributes[SpanResourceAttributesFieldName.SESSION_ID] == session_id - assert SpanResourceAttributesFieldName.EXPERIMENT_NAME not in resource1.attributes - - experiment = "test_experiment" - resource2 = _create_resource(session_id=session_id, experiment=experiment) - assert resource2.attributes[SpanResourceAttributesFieldName.SESSION_ID] == session_id - assert resource2.attributes[SpanResourceAttributesFieldName.EXPERIMENT_NAME] == experiment - @pytest.mark.usefixtures("reset_tracer_provider") def test_setup_exporter_from_environ(self) -> None: - assert not _is_tracer_provider_configured() + assert not _is_tracer_provider_set() # set some required environment variables endpoint = "http://localhost:23333/v1/traces" - session_id = str(uuid.uuid4()) + collection = str(uuid.uuid4()) experiment = "test_experiment" with patch.dict( os.environ, { OTEL_EXPORTER_OTLP_ENDPOINT: endpoint, - TraceEnvironmentVariableName.SESSION_ID: session_id, + TraceEnvironmentVariableName.COLLECTION: collection, TraceEnvironmentVariableName.EXPERIMENT: experiment, }, clear=True, ): setup_exporter_from_environ() - assert _is_tracer_provider_configured() + assert _is_tracer_provider_set() tracer_provider: TracerProvider = trace.get_tracer_provider() - assert session_id == tracer_provider._resource.attributes[SpanResourceAttributesFieldName.SESSION_ID] + assert collection == tracer_provider._resource.attributes[SpanResourceAttributesFieldName.COLLECTION] assert experiment == tracer_provider._resource.attributes[SpanResourceAttributesFieldName.EXPERIMENT_NAME] - @pytest.mark.usefixtures("reset_tracer_provider") - def test_provision_session_id(self) -> None: - # no specified, session id should be a valid UUID - session_id = _provision_session_id(specified_session_id=None) - # below assert applys a UUID type check for `session_id` - assert session_id == str(uuid.UUID(session_id, version=4)) - - # specified session id - specified_session_id = str(uuid.uuid4()) - session_id = _provision_session_id(specified_session_id=specified_session_id) - assert session_id == specified_session_id - - # within a configured tracer provider - endpoint = "http://localhost:23333/v1/traces" - configured_session_id = str(uuid.uuid4()) - with patch.dict( - os.environ, - { - OTEL_EXPORTER_OTLP_ENDPOINT: endpoint, - TraceEnvironmentVariableName.SESSION_ID: configured_session_id, - }, - clear=True, - ): - setup_exporter_from_environ() - - # no specified - session_id = _provision_session_id(specified_session_id=None) - assert configured_session_id == session_id - - # specified, but still honor the configured one - session_id = _provision_session_id(specified_session_id=str(uuid.uuid4())) - assert configured_session_id == session_id - @pytest.mark.usefixtures("reset_tracer_provider") def test_local_to_cloud_resource(self) -> None: with patch.dict( os.environ, { - TraceEnvironmentVariableName.SESSION_ID: str(uuid.uuid4()), + TraceEnvironmentVariableName.COLLECTION: str(uuid.uuid4()), TraceEnvironmentVariableName.SUBSCRIPTION_ID: "test_subscription_id", TraceEnvironmentVariableName.RESOURCE_GROUP_NAME: "test_resource_group_name", TraceEnvironmentVariableName.WORKSPACE_NAME: "test_workspace_name", + OTEL_EXPORTER_OTLP_ENDPOINT: "https://dummy-endpoint", }, clear=True, ): setup_exporter_from_environ() - tracer_provider = trace.get_tracer_provider() + tracer_provider: TracerProvider = trace.get_tracer_provider() res_attrs = dict(tracer_provider.resource.attributes) assert res_attrs[SpanResourceAttributesFieldName.SUBSCRIPTION_ID] == "test_subscription_id" assert res_attrs[SpanResourceAttributesFieldName.RESOURCE_GROUP_NAME] == "test_resource_group_name" @@ -155,8 +128,73 @@ def test_trace_without_attributes_collection(self, mock_resource: Dict) -> None: pb_span.parent_span_id = base64.b64decode("C+++WS+OuxI=") pb_span.kind = PBSpan.SpanKind.SPAN_KIND_INTERNAL # below line should execute successfully - span = Span._from_protobuf_object(pb_span, resource=mock_resource) + span = Span._from_protobuf_object(pb_span, resource=mock_resource, logger=logging.getLogger(__name__)) # as the above span do not have any attributes, so the parsed span should not have any attributes - attributes = span._content["attributes"] - assert isinstance(attributes, dict) - assert len(attributes) == 0 + assert isinstance(span.attributes, dict) + assert len(span.attributes) == 0 + + def test_experiment_test_lineage(self, monkeypatch: pytest.MonkeyPatch, mock_promptflow_service_invocation) -> None: + # experiment orchestrator will help set this context in environment + referenced_line_run_id = str(uuid.uuid4()) + ctx = {PF_TRACE_CONTEXT_ATTR: {ContextAttributeKey.REFERENCED_LINE_RUN_ID: referenced_line_run_id}} + with monkeypatch.context() as m: + m.setenv(PF_TRACE_CONTEXT, json.dumps(ctx)) + start_trace_with_devkit(collection=None) + # lineage is stored in context + op_ctx = OperationContext.get_instance() + otel_attrs = op_ctx._get_otel_attributes() + assert otel_attrs[SpanAttributeFieldName.REFERENCED_LINE_RUN_ID] == referenced_line_run_id + + def test_experiment_test_lineage_cleanup( + self, monkeypatch: pytest.MonkeyPatch, mock_promptflow_service_invocation + ) -> None: + # in previous code, context may be set with lineage + op_ctx = OperationContext.get_instance() + op_ctx._add_otel_attributes(SpanAttributeFieldName.REFERENCED_LINE_RUN_ID, str(uuid.uuid4())) + with monkeypatch.context() as m: + m.setenv(PF_TRACE_CONTEXT, json.dumps({PF_TRACE_CONTEXT_ATTR: dict()})) + start_trace_with_devkit(collection=None) + # lineage will be reset + otel_attrs = op_ctx._get_otel_attributes() + assert SpanAttributeFieldName.REFERENCED_LINE_RUN_ID not in otel_attrs + + def test_setup_exporter_in_executor(self, monkeypatch: pytest.MonkeyPatch): + with monkeypatch.context() as m: + m.delenv(OTEL_EXPORTER_OTLP_ENDPOINT, raising=False) + original_proivder = trace.get_tracer_provider() + setup_exporter_from_environ() + new_provider: TracerProvider = trace.get_tracer_provider() + # Assert the provider without exporter is not the one with exporter + assert original_proivder == new_provider + + def test_setup_exporter_in_executor_with_preview_flag(self, mock_promptflow_service_invocation): + with mock.patch("promptflow._sdk._configuration.Configuration.is_internal_features_enabled") as mock_func: + mock_func.return_value = True + + start_trace() + setup_exporter_from_environ() + tracer_provider: TracerProvider = trace.get_tracer_provider() + assert len(tracer_provider._active_span_processor._span_processors) == 1 + assert ( + tracer_provider._active_span_processor._span_processors[0].span_exporter._endpoint + == f"http://localhost:{MOCK_PROMPTFLOW_SERVICE_PORT}/v1/traces" + ) + + +@pytest.mark.unittest +@pytest.mark.sdk_test +class TestTraceOperations: + def test_validate_delete_query_params(self, pf: PFClient) -> None: + expected_error_message = ( + 'Valid delete queries: 1) specify `run`; 2) specify `collection` (not "default"); ' + "3) specify `collection` and `started_before` (ISO 8601)." + ) + + def _validate_invalid_params(kwargs: Dict): + with pytest.raises(UserErrorException) as e: + pf.traces._validate_delete_query_params(**kwargs) + assert expected_error_message in str(e) + + _validate_invalid_params({"run": str(uuid.uuid4()), "started_before": datetime.datetime.now().isoformat()}) + _validate_invalid_params({"collection": TRACE_DEFAULT_COLLECTION}) + _validate_invalid_params({"collection": str(uuid.uuid4()), "started_before": "invalid isoformat"}) diff --git a/src/promptflow/tests/sdk_cli_test/unittests/test_utils.py b/src/promptflow/tests/sdk_cli_test/unittests/test_utils.py index b10c609c3ed..14a5ac736f2 100644 --- a/src/promptflow/tests/sdk_cli_test/unittests/test_utils.py +++ b/src/promptflow/tests/sdk_cli_test/unittests/test_utils.py @@ -36,18 +36,20 @@ _generate_connections_dir, decrypt_secret_value, encrypt_secret_value, + gen_uuid_by_compute_info, generate_flow_tools_json, - override_connection_config_with_environment_variable, - refresh_connections_dir, - resolve_connections_environment_variable_reference, - snake_to_camel, get_mac_address, - gen_uuid_by_compute_info, get_system_info, + refresh_connections_dir, ) from promptflow._utils.load_data import load_data from promptflow._utils.retry_utils import http_retry_wrapper, retry +from promptflow._utils.utils import snake_to_camel from promptflow._utils.version_hint_utils import check_latest_version +from promptflow.core._utils import ( + override_connection_config_with_environment_variable, + resolve_connections_environment_variable_reference, +) TEST_ROOT = Path(__file__).parent.parent.parent CONNECTION_ROOT = TEST_ROOT / "test_configs/connections" diff --git a/src/promptflow/tests/sdk_pfs_test/.coveragerc b/src/promptflow/tests/sdk_pfs_test/.coveragerc index 841a4d9503c..551f5583885 100644 --- a/src/promptflow/tests/sdk_pfs_test/.coveragerc +++ b/src/promptflow/tests/sdk_pfs_test/.coveragerc @@ -6,4 +6,6 @@ omit = */promptflow/azure/* */promptflow/entities/* */promptflow/operations/* + */promptflow/executor/* + */promptflow/core/* *__init__.py* diff --git a/src/promptflow/tests/sdk_pfs_test/e2etests/test_cli.py b/src/promptflow/tests/sdk_pfs_test/e2etests/test_cli.py index 8d605e2c611..5740180293d 100644 --- a/src/promptflow/tests/sdk_pfs_test/e2etests/test_cli.py +++ b/src/promptflow/tests/sdk_pfs_test/e2etests/test_cli.py @@ -4,12 +4,11 @@ import subprocess import sys -from time import sleep import pytest import requests -from promptflow._sdk._service.entry import main +from promptflow._cli._pf.entry import main from promptflow._sdk._service.utils.utils import get_port_from_config, get_random_port, kill_exist_service @@ -19,20 +18,20 @@ def _run_pfs_command(self, *args): """Run a pfs command with the given arguments.""" origin_argv = sys.argv try: - sys.argv = ["pfs"] + list(args) + sys.argv = ["pf", "service"] + list(args) main() finally: sys.argv = origin_argv def _test_start_service(self, port=None, force=False): - command = f"pfs start --port {port}" if port else "pfs start" + command = f"pf service start --port {port}" if port else "pf service start" if force: command = f"{command} --force" start_pfs = subprocess.Popen(command, shell=True) # Wait for service to be started start_pfs.wait() assert self._is_service_healthy() - stop_command = "pfs stop" + stop_command = "pf service stop" stop_pfs = subprocess.Popen(stop_command, shell=True) stop_pfs.wait() @@ -50,7 +49,7 @@ def test_start_service(self): self._test_start_service(port=random_port, force=True) # start pfs - start_pfs = subprocess.Popen("pfs start", shell=True) + start_pfs = subprocess.Popen("pf service start", shell=True) # Wait for service to be started start_pfs.wait() assert self._is_service_healthy() @@ -64,12 +63,13 @@ def test_start_service(self): def test_show_service_status(self, capsys): with pytest.raises(SystemExit): self._run_pfs_command("show-status") - - start_pfs = subprocess.Popen("pfs start", shell=True) + start_pfs = subprocess.Popen("pf service start", shell=True) # Wait for service to be started - sleep(5) + start_pfs.wait() + assert self._is_service_healthy() self._run_pfs_command("show-status") output, _ = capsys.readouterr() assert str(get_port_from_config()) in output - start_pfs.terminate() - start_pfs.wait(10) + self._run_pfs_command("stop") + output, _ = capsys.readouterr() + assert str(get_port_from_config()) in output diff --git a/src/promptflow/tests/sdk_pfs_test/e2etests/test_connection_apis.py b/src/promptflow/tests/sdk_pfs_test/e2etests/test_connection_apis.py index ee05581e848..85d4e33c538 100644 --- a/src/promptflow/tests/sdk_pfs_test/e2etests/test_connection_apis.py +++ b/src/promptflow/tests/sdk_pfs_test/e2etests/test_connection_apis.py @@ -8,10 +8,10 @@ import mock import pytest -from sdk_cli_azure_test.recording_utilities import is_replay from promptflow import PFClient from promptflow._sdk.entities import CustomConnection +from promptflow.recording.record_mode import is_replay from ..utils import PFSOperations, check_activity_end_telemetry @@ -32,6 +32,22 @@ def test_list_connections(self, pf_client: PFClient, pfs_op: PFSOperations) -> N assert len(connections) >= 1 + def test_list_connections_with_different_user_agent(self, pf_client: PFClient, pfs_op: PFSOperations) -> None: + create_custom_connection(pf_client) + base_user_agent = ["local_pfs/0.0.1"] + for _, extra_user_agent in enumerate( + [ + ["another_test_user_agent/0.0.1"], + ["test_user_agent/0.0.1"], + ["another_test_user_agent/0.0.1"], + ["test_user_agent/0.0.1"], + ] + ): + with check_activity_end_telemetry( + activity_name="pf.connections.list", user_agent=base_user_agent + extra_user_agent + ): + pfs_op.list_connections(user_agent=extra_user_agent) + def test_get_connection(self, pf_client: PFClient, pfs_op: PFSOperations) -> None: name = create_custom_connection(pf_client) with check_activity_end_telemetry(activity_name="pf.connections.get"): diff --git a/src/promptflow/tests/sdk_pfs_test/e2etests/test_flow_apis.py b/src/promptflow/tests/sdk_pfs_test/e2etests/test_flow_apis.py new file mode 100644 index 00000000000..68fe26ffeb1 --- /dev/null +++ b/src/promptflow/tests/sdk_pfs_test/e2etests/test_flow_apis.py @@ -0,0 +1,76 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import base64 +import os +from io import BytesIO +from pathlib import Path + +import pytest +from PIL import Image + +from ..utils import PFSOperations, check_activity_end_telemetry + +FLOW_PATH = "./tests/test_configs/flows/print_env_var" +IMAGE_PATH = "./tests/test_configs/datas/logo.jpg" +FLOW_WITH_IMAGE_PATH = "./tests/test_configs/flows/chat_flow_with_image" + + +@pytest.mark.usefixtures("use_secrets_config_file") +@pytest.mark.e2etest +class TestFlowAPIs: + def test_get_flow_yaml(self, pfs_op: PFSOperations) -> None: + with check_activity_end_telemetry(expected_activities=[]): + flow_yaml_from_pfs = pfs_op.get_flow(flow_path=FLOW_PATH).json + assert flow_yaml_from_pfs == { + "inputs": {"key": {"type": "string"}}, + "outputs": {"output": {"type": "string", "reference": "${print_env.output.value}"}}, + "nodes": [ + { + "name": "print_env", + "type": "python", + "source": {"type": "code", "path": "print_env.py"}, + "inputs": {"key": "${inputs.key}"}, + } + ], + } + + def test_flow_test(self, pfs_op: PFSOperations) -> None: + with check_activity_end_telemetry(activity_name="pf.flows.test"): + response = pfs_op.test_flow( + flow_path=FLOW_PATH, + request_body={"inputs": {"key": "value"}}, + status_code=200, + ).json + assert len(response) >= 1 + + def test_get_flow_ux_inputs(self, pfs_op: PFSOperations) -> None: + with check_activity_end_telemetry(expected_activities=[]): + response = pfs_op.get_flow_ux_inputs(flow_path=Path(FLOW_PATH).absolute().as_posix()).json + assert len(response) >= 0 + + def test_image_save(self, pfs_op: PFSOperations) -> None: + def image_to_base64(image_path): + with Image.open(image_path) as img: + with BytesIO() as buffer: + img.save(buffer, "JPEG") + return base64.b64encode(buffer.getvalue()).decode("utf-8") + + image_base64 = image_to_base64(IMAGE_PATH) + extension = os.path.splitext(IMAGE_PATH)[1].lstrip(".") + with check_activity_end_telemetry(expected_activities=[]): + response = pfs_op.save_flow_image( + flow_path=FLOW_PATH, + request_body={ + "base64_data": image_base64, + "extension": extension, + }, + ).json + + os.remove(os.path.join(FLOW_PATH, response)) + + def test_image_view(self, pfs_op: PFSOperations) -> None: + with check_activity_end_telemetry(expected_activities=[]): + response = pfs_op.show_image(flow_path=FLOW_WITH_IMAGE_PATH, image_path="logo.jpg") + assert response.status_code == 200 diff --git a/src/promptflow/tests/sdk_pfs_test/e2etests/test_trace.py b/src/promptflow/tests/sdk_pfs_test/e2etests/test_trace.py index e245a993f95..5a4a37a60ff 100644 --- a/src/promptflow/tests/sdk_pfs_test/e2etests/test_trace.py +++ b/src/promptflow/tests/sdk_pfs_test/e2etests/test_trace.py @@ -3,13 +3,17 @@ # --------------------------------------------------------- import datetime -import json import typing import uuid import pytest -from promptflow._constants import SpanAttributeFieldName, SpanContextFieldName, SpanStatusFieldName +from promptflow._constants import ( + RUNNING_LINE_RUN_STATUS, + SpanAttributeFieldName, + SpanContextFieldName, + SpanStatusFieldName, +) from promptflow._sdk._constants import CumulativeTokenCountFieldName, LineRunFieldName from promptflow._sdk.entities._trace import Span @@ -17,24 +21,34 @@ @pytest.fixture -def mock_session_id() -> str: - """Generate a session id for test case.""" +def mock_collection() -> str: + """Generate a collection for test case.""" return str(uuid.uuid4()) -def persist_a_span(session_id: str, custom_attributes: typing.Optional[typing.Dict] = None) -> None: +def persist_a_span( + collection: str, + custom_attributes: typing.Optional[typing.Dict] = None, + custom_events: typing.List[typing.Dict] = None, + parent_id: typing.Optional[str] = None, +) -> Span: if custom_attributes is None: custom_attributes = {} + trace_id = str(uuid.uuid4()) + span_id = str(uuid.uuid4()) span = Span( + trace_id=trace_id, + span_id=span_id, name=str(uuid.uuid4()), context={ - SpanContextFieldName.TRACE_ID: str(uuid.uuid4()), - SpanContextFieldName.SPAN_ID: str(uuid.uuid4()), + SpanContextFieldName.TRACE_ID: trace_id, + SpanContextFieldName.SPAN_ID: span_id, SpanContextFieldName.TRACE_STATE: "", }, kind="1", - start_time=datetime.datetime.now().isoformat(), - end_time=datetime.datetime.now().isoformat(), + parent_id=parent_id, + start_time=datetime.datetime.now(), + end_time=datetime.datetime.now(), status={ SpanStatusFieldName.STATUS_CODE: "Ok", }, @@ -46,29 +60,28 @@ def persist_a_span(session_id: str, custom_attributes: typing.Optional[typing.Di resource={ "attributes": { "service.name": "promptflow", - "session.id": session_id, + "collection": collection, }, "schema_url": "", }, - span_type="Flow", - session_id=session_id, + events=custom_events, ) span._persist() - return + return span # flask-restx uses marshmallow before response, so we do need this test class to execute end-to-end test @pytest.mark.e2etest class TestTrace: - def test_cumulative_token_count_type(self, pfs_op: PFSOperations, mock_session_id: str) -> None: + def test_cumulative_token_count_type(self, pfs_op: PFSOperations, mock_collection: str) -> None: completion_token_count, prompt_token_count, total_token_count = 1, 5620, 5621 token_count_attributes = { SpanAttributeFieldName.CUMULATIVE_COMPLETION_TOKEN_COUNT: completion_token_count, SpanAttributeFieldName.CUMULATIVE_PROMPT_TOKEN_COUNT: prompt_token_count, SpanAttributeFieldName.CUMULATIVE_TOTAL_TOKEN_COUNT: total_token_count, } - persist_a_span(session_id=mock_session_id, custom_attributes=token_count_attributes) - response = pfs_op.list_line_runs(session_id=mock_session_id) + persist_a_span(collection=mock_collection, custom_attributes=token_count_attributes) + response = pfs_op.list_line_runs(collection=mock_collection) line_runs = response.json assert len(line_runs) == 1 line_run = line_runs[0] @@ -78,29 +91,29 @@ def test_cumulative_token_count_type(self, pfs_op: PFSOperations, mock_session_i assert cumulative_token_count[CumulativeTokenCountFieldName.PROMPT] == prompt_token_count assert cumulative_token_count[CumulativeTokenCountFieldName.TOTAL] == total_token_count - def test_evaluation_type(self, pfs_op: PFSOperations, mock_session_id: str) -> None: - persist_a_span(session_id=mock_session_id) - response = pfs_op.list_line_runs(session_id=mock_session_id) - line_run = response.json[0] + def test_evaluation_name(self, pfs_op: PFSOperations, mock_collection: str) -> None: + # mock batch run line + mock_batch_run_id = str(uuid.uuid4()) + batch_run_attrs = { + SpanAttributeFieldName.BATCH_RUN_ID: mock_batch_run_id, + SpanAttributeFieldName.LINE_NUMBER: "0", + } + persist_a_span(collection=mock_collection, custom_attributes=batch_run_attrs) + # mock eval run line + mock_eval_run_id = str(uuid.uuid4()) + eval_run_attrs = { + SpanAttributeFieldName.BATCH_RUN_ID: mock_eval_run_id, + SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID: mock_batch_run_id, + SpanAttributeFieldName.LINE_NUMBER: "0", + } + persist_a_span(collection=mock_collection, custom_attributes=eval_run_attrs) + line_run = pfs_op.list_line_runs(runs=[mock_batch_run_id]).json[0] assert isinstance(line_run[LineRunFieldName.EVALUATIONS], dict) + assert len(line_run[LineRunFieldName.EVALUATIONS]) == 1 + eval_line_run = list(line_run[LineRunFieldName.EVALUATIONS].values())[0] + assert LineRunFieldName.NAME in eval_line_run - def test_illegal_json_values(self, pfs_op: PFSOperations, mock_session_id: str) -> None: - output_string = json.dumps( - { - "NaN": float("nan"), - "Inf": float("inf"), - "-Inf": float("-inf"), - } - ) - custom_attributes = {SpanAttributeFieldName.OUTPUT: output_string} - persist_a_span(session_id=mock_session_id, custom_attributes=custom_attributes) - line_run = pfs_op.list_line_runs(session_id=mock_session_id).json[0] - output = line_run[LineRunFieldName.OUTPUTS] - assert isinstance(output["NaN"], str) and output["NaN"] == "NaN" - assert isinstance(output["Inf"], str) and output["Inf"] == "Infinity" - assert isinstance(output["-Inf"], str) and output["-Inf"] == "-Infinity" - - def test_list_evaluation_line_runs(self, pfs_op: PFSOperations, mock_session_id: str) -> None: + def test_list_evaluation_line_runs(self, pfs_op: PFSOperations, mock_collection: str) -> None: mock_batch_run_id = str(uuid.uuid4()) mock_referenced_batch_run_id = str(uuid.uuid4()) batch_run_attributes = { @@ -108,6 +121,67 @@ def test_list_evaluation_line_runs(self, pfs_op: PFSOperations, mock_session_id: SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID: mock_referenced_batch_run_id, SpanAttributeFieldName.LINE_NUMBER: "0", } - persist_a_span(session_id=mock_session_id, custom_attributes=batch_run_attributes) + persist_a_span(collection=mock_collection, custom_attributes=batch_run_attributes) + line_runs = pfs_op.list_line_runs(runs=[mock_batch_run_id]).json + assert len(line_runs) == 1 + + def test_list_eval_line_run_with_trace_id(self, pfs_op: PFSOperations, mock_collection: str) -> None: + mock_batch_run = str(uuid.uuid4()) + mock_ref_batch_run = str(uuid.uuid4()) + batch_run_attrs = { + SpanAttributeFieldName.BATCH_RUN_ID: mock_batch_run, + SpanAttributeFieldName.REFERENCED_BATCH_RUN_ID: mock_ref_batch_run, + SpanAttributeFieldName.LINE_NUMBER: "0", + } + span = persist_a_span(collection=mock_collection, custom_attributes=batch_run_attrs) + line_runs = pfs_op.list_line_runs(trace_ids=[span.trace_id]).json + assert len(line_runs) == 1 + + def test_list_running_line_run(self, pfs_op: PFSOperations, mock_collection: str) -> None: + mock_batch_run_id = str(uuid.uuid4()) + mock_parent_id = str(uuid.uuid4()) + batch_run_attributes = { + SpanAttributeFieldName.BATCH_RUN_ID: mock_batch_run_id, + SpanAttributeFieldName.LINE_NUMBER: "0", + } + persist_a_span( + collection=mock_collection, + custom_attributes=batch_run_attributes, + parent_id=mock_parent_id, + ) line_runs = pfs_op.list_line_runs(runs=[mock_batch_run_id]).json assert len(line_runs) == 1 + running_line_run = line_runs[0] + assert running_line_run[LineRunFieldName.STATUS] == RUNNING_LINE_RUN_STATUS + + def test_list_line_runs_with_both_status(self, pfs_op: PFSOperations, mock_collection: str) -> None: + mock_batch_run_id = str(uuid.uuid4()) + # running line run + mock_parent_id = str(uuid.uuid4()) + batch_run_attributes = { + SpanAttributeFieldName.BATCH_RUN_ID: mock_batch_run_id, + SpanAttributeFieldName.LINE_NUMBER: "0", + } + persist_a_span( + collection=mock_collection, + custom_attributes=batch_run_attributes, + parent_id=mock_parent_id, + ) + # completed line run + batch_run_attributes = { + SpanAttributeFieldName.BATCH_RUN_ID: mock_batch_run_id, + SpanAttributeFieldName.LINE_NUMBER: "1", + } + persist_a_span( + collection=mock_collection, + custom_attributes=batch_run_attributes, + ) + # we have slightly different code path for query w/o runs and w/ runs + for line_runs in [ + pfs_op.list_line_runs(collection=mock_collection).json, + pfs_op.list_line_runs(runs=[mock_batch_run_id]).json, + ]: + assert len(line_runs) == 2 + # according to order by logic, the first line run is line 1, the completed + assert line_runs[0][LineRunFieldName.STATUS] == "Ok" + assert line_runs[1][LineRunFieldName.STATUS] == RUNNING_LINE_RUN_STATUS diff --git a/src/promptflow/tests/sdk_pfs_test/utils.py b/src/promptflow/tests/sdk_pfs_test/utils.py index 3d1c4c65fff..5279ca6273d 100644 --- a/src/promptflow/tests/sdk_pfs_test/utils.py +++ b/src/promptflow/tests/sdk_pfs_test/utils.py @@ -10,6 +10,8 @@ import werkzeug from flask.testing import FlaskClient +from promptflow._sdk._service.utils.utils import encrypt_flow_path + @contextlib.contextmanager def check_activity_end_telemetry( @@ -31,7 +33,7 @@ def check_activity_end_telemetry( "first_call": True, "activity_type": "PublicApi", "completion_status": "Success", - "user_agent": f"promptflow-sdk/0.0.1 Werkzeug/{werkzeug.__version__} local_pfs/0.0.1", + "user_agent": [f"Werkzeug/{werkzeug.__version__}", "local_pfs/0.0.1"], } for i, expected_activity in enumerate(expected_activities): temp = default_expected_call.copy() @@ -39,6 +41,9 @@ def check_activity_end_telemetry( expected_activity = temp for key, expected_value in expected_activity.items(): value = actual_activities[i][key] + if isinstance(expected_value, list): + value = list(sorted(value.split(" "))) + expected_value = list(sorted(expected_value)) assert ( value == expected_value ), f"{key} mismatch in {i+1}th call: expect {expected_value} but got {value}" @@ -50,11 +55,18 @@ class PFSOperations: RUN_URL_PREFIX = "/v1.0/Runs" TELEMETRY_PREFIX = "/v1.0/Telemetries" LINE_RUNS_PREFIX = "/v1.0/LineRuns" + Flow_URL_PREFIX = "/v1.0/Flows" + UI_URL_PREFIX = "/v1.0/ui" def __init__(self, client: FlaskClient): self._client = client - def remote_user_header(self): + def remote_user_header(self, user_agent=None): + if user_agent: + return { + "X-Remote-User": getpass.getuser(), + "User-Agent": user_agent, + } return {"X-Remote-User": getpass.getuser()} def heartbeat(self): @@ -67,8 +79,10 @@ def connection_operation_with_invalid_user(self, status_code=None): assert status_code == response.status_code, response.text return response - def list_connections(self, status_code=None): - response = self._client.get(f"{self.CONNECTION_URL_PREFIX}/", headers=self.remote_user_header()) + def list_connections(self, status_code=None, user_agent=None): + response = self._client.get( + f"{self.CONNECTION_URL_PREFIX}/", headers=self.remote_user_header(user_agent=user_agent) + ) if status_code: assert status_code == response.status_code, response.text return response @@ -222,15 +236,63 @@ def create_telemetry(self, *, body, headers, status_code=None): # trace APIs # LineRuns - def list_line_runs(self, *, session_id: Optional[str] = None, runs: Optional[List[str]] = None): + def list_line_runs( + self, + *, + collection: Optional[str] = None, + runs: Optional[List[str]] = None, + trace_ids: Optional[List[str]] = None, + ): query_string = {} - if session_id is not None: - query_string["session"] = session_id + if collection is not None: + query_string["collection"] = collection if runs is not None: query_string["run"] = ",".join(runs) + if trace_ids is not None: + query_string["trace_ids"] = ",".join(trace_ids) response = self._client.get( f"{self.LINE_RUNS_PREFIX}/list", query_string=query_string, headers=self.remote_user_header(), ) return response + + def get_flow(self, flow_path: str, status_code=None): + flow_path = encrypt_flow_path(flow_path) + query_string = {"flow": flow_path} + response = self._client.get(f"{self.Flow_URL_PREFIX}/get", query_string=query_string) + if status_code: + assert status_code == response.status_code, response.text + return response + + def test_flow(self, flow_path, request_body, status_code=None): + flow_path = encrypt_flow_path(flow_path) + query_string = {"flow": flow_path} + response = self._client.post(f"{self.Flow_URL_PREFIX}/test", json=request_body, query_string=query_string) + if status_code: + assert status_code == response.status_code, response.text + return response + + def get_flow_ux_inputs(self, flow_path: str, status_code=None): + flow_path = encrypt_flow_path(flow_path) + query_string = {"flow": flow_path} + response = self._client.get(f"{self.Flow_URL_PREFIX}/ux_inputs", query_string=query_string) + if status_code: + assert status_code == response.status_code, response.text + return response + + def save_flow_image(self, flow_path: str, request_body, status_code=None): + flow_path = encrypt_flow_path(flow_path) + query_string = {"flow": flow_path} + response = self._client.post(f"{self.UI_URL_PREFIX}/media_save", json=request_body, query_string=query_string) + if status_code: + assert status_code == response.status_code, response.text + return response + + def show_image(self, flow_path: str, image_path: str, status_code=None): + flow_path = encrypt_flow_path(flow_path) + query_string = {"flow": flow_path, "image_path": image_path} + response = self._client.get(f"{self.UI_URL_PREFIX}/media", query_string=query_string) + if status_code: + assert status_code == response.status_code, response.text + return response diff --git a/src/promptflow/tests/test_configs/datas/env_var_new_key.jsonl b/src/promptflow/tests/test_configs/datas/env_var_new_key.jsonl new file mode 100644 index 00000000000..f6ff8afc9e1 --- /dev/null +++ b/src/promptflow/tests/test_configs/datas/env_var_new_key.jsonl @@ -0,0 +1 @@ +{"key": "NEW_KEY"} diff --git a/src/promptflow/tests/test_configs/datas/env_var_test.jsonl b/src/promptflow/tests/test_configs/datas/env_var_test.jsonl new file mode 100644 index 00000000000..e6d39c32d59 --- /dev/null +++ b/src/promptflow/tests/test_configs/datas/env_var_test.jsonl @@ -0,0 +1 @@ +{"key": "TEST"} diff --git a/src/promptflow/tests/test_configs/datas/simple_hello_world_multi_lines.jsonl b/src/promptflow/tests/test_configs/datas/simple_hello_world_multi_lines.jsonl new file mode 100644 index 00000000000..37b04a05fb6 --- /dev/null +++ b/src/promptflow/tests/test_configs/datas/simple_hello_world_multi_lines.jsonl @@ -0,0 +1,15 @@ +{"name": "promptflow1"} +{"name": "promptflow2"} +{"name": "promptflow3"} +{"name": "promptflow4"} +{"name": "promptflow5"} +{"name": "promptflow6"} +{"name": "promptflow7"} +{"name": "promptflow8"} +{"name": "promptflow9"} +{"name": "promptflow10"} +{"name": "promptflow11"} +{"name": "promptflow12"} +{"name": "promptflow13"} +{"name": "promptflow14"} +{"name": "promptflow15"} \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/flow.dag.yaml new file mode 100644 index 00000000000..ac6e7910bb5 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/flow.dag.yaml @@ -0,0 +1 @@ +entry: simple_callable_class:MyFlow diff --git a/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/inputs.jsonl b/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/inputs.jsonl new file mode 100644 index 00000000000..cf192f44c3e --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/inputs.jsonl @@ -0,0 +1,4 @@ +{"func_input": "func_input"} +{"func_input": "func_input"} +{"func_input": "func_input"} +{"func_input": "func_input"} \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/run.yaml b/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/run.yaml new file mode 100644 index 00000000000..0721b380328 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/run.yaml @@ -0,0 +1,5 @@ +description: sample bulk run +flow: ./ +data: ./inputs.jsonl +init: + obj_input: val diff --git a/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/simple_callable_class.py b/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/simple_callable_class.py new file mode 100644 index 00000000000..326ed5b3bd0 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/basic_callable_class/simple_callable_class.py @@ -0,0 +1,21 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +class MyFlow: + def __init__(self, obj_input: str): + self.obj_input = obj_input + + def __call__(self, func_input: str) -> dict: + return { + "obj_input": self.obj_input, + "func_input": func_input, + "obj_id": id(self), + } + + +if __name__ == "__main__": + flow = MyFlow("obj_input") + result = flow("func_input") + print(result) + diff --git a/src/promptflow/tests/test_configs/eager_flows/builtin_llm/builtin_call.py b/src/promptflow/tests/test_configs/eager_flows/builtin_llm/builtin_call.py new file mode 100644 index 00000000000..5be3c0207d0 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/builtin_llm/builtin_call.py @@ -0,0 +1,50 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +import os +from pathlib import Path + +from dotenv import load_dotenv +from jinja2 import Template + +from promptflow._sdk.entities import AzureOpenAIConnection +from promptflow.tools.aoai import chat + +BASE_DIR = Path(__file__).absolute().parent + + +def load_prompt(jinja2_template: str, question: str, chat_history: list) -> str: + """Load prompt function.""" + with open(BASE_DIR / jinja2_template, "r", encoding="utf-8") as f: + tmpl = Template(f.read(), trim_blocks=True, keep_trailing_newline=True) + prompt = tmpl.render(question=question, chat_history=chat_history) + return prompt + + +def flow_entry(question: str = "What is ChatGPT?", chat_history: list = [], stream: bool = False) -> str: + """Flow entry function.""" + + prompt = load_prompt("chat.jinja2", question, chat_history) + if "OPENAI_API_KEY" not in os.environ: + # load environment variables from .env file + load_dotenv() + + if "OPENAI_API_KEY" not in os.environ: + raise Exception("Please specify environment variables: OPENAI_API_KEY") + + connection = AzureOpenAIConnection( + api_key=os.environ["OPENAI_API_KEY"], + api_base=os.environ["AZURE_OPENAI_ENDPOINT"], + api_version=os.environ.get("OPENAI_API_VERSION", "2023-07-01-preview"), + ) + + output = chat( + connection=connection, + prompt=prompt, + deployment_name="gpt-35-turbo", + max_tokens=256, + temperature=0.7, + stream=stream + ) + return output diff --git a/src/promptflow/tests/test_configs/eager_flows/builtin_llm/chat.jinja2 b/src/promptflow/tests/test_configs/eager_flows/builtin_llm/chat.jinja2 new file mode 100644 index 00000000000..c5e811e1969 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/builtin_llm/chat.jinja2 @@ -0,0 +1,12 @@ +system: +You are a helpful assistant. + +{% for item in chat_history %} +user: +{{item.inputs.question}} +assistant: +{{item.outputs.answer}} +{% endfor %} + +user: +{{question}} \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/builtin_llm/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/builtin_llm/flow.dag.yaml new file mode 100644 index 00000000000..384d179afb1 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/builtin_llm/flow.dag.yaml @@ -0,0 +1 @@ +entry: builtin_call:flow_entry \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/callable_flow_with_init_exception/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/callable_flow_with_init_exception/flow.dag.yaml new file mode 100644 index 00000000000..759d1ae1a6e --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/callable_flow_with_init_exception/flow.dag.yaml @@ -0,0 +1 @@ +entry: flow_with_init_exception:MyFlow diff --git a/src/promptflow/tests/test_configs/eager_flows/callable_flow_with_init_exception/flow_with_init_exception.py b/src/promptflow/tests/test_configs/eager_flows/callable_flow_with_init_exception/flow_with_init_exception.py new file mode 100644 index 00000000000..e6a2fa6006d --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/callable_flow_with_init_exception/flow_with_init_exception.py @@ -0,0 +1,20 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- + +class MyFlow: + def __init__(self): + raise Exception("This is an exception") + + def __call__(self, func_input: str) -> dict: + return { + "func_input": func_input, + "obj_id": id(self), + } + + +if __name__ == "__main__": + flow = MyFlow() + result = flow("func_input") + print(result) + diff --git a/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/flow_with_trace.meta.json b/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/flow_with_trace.meta.json index 03a9423d9cf..cbedb9d394a 100644 --- a/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/flow_with_trace.meta.json +++ b/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/flow_with_trace.meta.json @@ -3,10 +3,12 @@ "entry": "flow_with_trace:my_flow", "inputs": { "text": { - "type": "string" + "type": "string", + "default": "default_text" }, "models": { - "type": "list" + "type": "list", + "default": "['default_model']" } }, "outputs": { diff --git a/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/flow_with_trace.py b/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/flow_with_trace.py index 00bc2c4144b..5e185aec61c 100644 --- a/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/flow_with_trace.py +++ b/src/promptflow/tests/test_configs/eager_flows/dummy_flow_with_trace/flow_with_trace.py @@ -14,7 +14,7 @@ async def dummy_llm(prompt: str, model: str, wait_seconds: int): return prompt -async def my_flow(text: str, models: list = []) -> str: +async def my_flow(text: str = "default_text", models: list = ["default_model"]) -> str: tasks = [] for i, model in enumerate(models): tasks.append(asyncio.create_task(dummy_llm(text, model, i + 1))) diff --git a/src/promptflow/tests/test_configs/eager_flows/evc_connection_not_exist/evc.py b/src/promptflow/tests/test_configs/eager_flows/evc_connection_not_exist/evc.py new file mode 100644 index 00000000000..a91b490a4e7 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/evc_connection_not_exist/evc.py @@ -0,0 +1,9 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import os + + +def evc_flow(): + """Simple flow without yaml.""" + return f"Hello world! {os.environ.get('TEST')}" diff --git a/src/promptflow/tests/test_configs/eager_flows/evc_connection_not_exist/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/evc_connection_not_exist/flow.dag.yaml new file mode 100644 index 00000000000..c0a2b0d0325 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/evc_connection_not_exist/flow.dag.yaml @@ -0,0 +1,3 @@ +entry: evc:evc_flow +environment_variables: + TEST: ${not_exist.api_type} \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/flow_with_dataclass_output/flow_with_dataclass.meta.json b/src/promptflow/tests/test_configs/eager_flows/flow_with_dataclass_output/flow_with_dataclass.meta.json index beccff65862..81031b8f020 100644 --- a/src/promptflow/tests/test_configs/eager_flows/flow_with_dataclass_output/flow_with_dataclass.meta.json +++ b/src/promptflow/tests/test_configs/eager_flows/flow_with_dataclass_output/flow_with_dataclass.meta.json @@ -3,10 +3,12 @@ "entry": "flow_with_dataclass:my_flow", "inputs": { "text": { - "type": "string" + "type": "string", + "default": "default_text" }, "models": { - "type": "list" + "type": "list", + "default": "['default_model']" } }, "outputs": { diff --git a/src/promptflow/tests/test_configs/eager_flows/flow_with_operation_context/flow_with_context.py b/src/promptflow/tests/test_configs/eager_flows/flow_with_operation_context/flow_with_context.py index eb8d5d532a5..46acf67a974 100644 --- a/src/promptflow/tests/test_configs/eager_flows/flow_with_operation_context/flow_with_context.py +++ b/src/promptflow/tests/test_configs/eager_flows/flow_with_operation_context/flow_with_context.py @@ -1,4 +1,4 @@ -from promptflow._core.operation_context import OperationContext +from promptflow.tracing._operation_context import OperationContext def my_flow(): diff --git a/src/promptflow/tests/test_configs/eager_flows/invalid_illegal_entry/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/invalid_illegal_entry/flow.dag.yaml new file mode 100644 index 00000000000..8f85f6aa58c --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/invalid_illegal_entry/flow.dag.yaml @@ -0,0 +1 @@ +entry: module:my_func diff --git a/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry1.py b/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry1.py index 574007efefd..5c5ea2c3986 100644 --- a/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry1.py +++ b/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry1.py @@ -5,8 +5,10 @@ def my_flow1(): """Simple flow without yaml.""" print("Hello world!") + return "entry1flow1" def my_flow2(): """Simple flow without yaml.""" print("Hello world!") + return "entry1flow2" diff --git a/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry2.py b/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry2.py index 574007efefd..e0020b50969 100644 --- a/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry2.py +++ b/src/promptflow/tests/test_configs/eager_flows/multiple_entries/entry2.py @@ -5,8 +5,10 @@ def my_flow1(): """Simple flow without yaml.""" print("Hello world!") + return "entry2flow1" def my_flow2(): """Simple flow without yaml.""" print("Hello world!") + return "entry2flow2" diff --git a/src/promptflow/tests/test_configs/eager_flows/multiple_entries/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/multiple_entries/flow.dag.yaml new file mode 100644 index 00000000000..1f08120715d --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/multiple_entries/flow.dag.yaml @@ -0,0 +1 @@ +entry: entry1:my_flow1 diff --git a/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs/flow.dag.yaml new file mode 100644 index 00000000000..0754adaae0d --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs/flow.dag.yaml @@ -0,0 +1 @@ +entry: multiple_stream_outputs:my_flow \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs/multiple_stream_outputs.py b/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs/multiple_stream_outputs.py new file mode 100644 index 00000000000..6cb1200f5e8 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs/multiple_stream_outputs.py @@ -0,0 +1,10 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +def my_flow(input_val: str = "gpt") -> dict: + generator1 = (i for i in range(10)) + generator2 = (i for i in range(10)) + return { + "output1": generator1, + "output2": generator2, + } \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs_dataclass/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs_dataclass/flow.dag.yaml new file mode 100644 index 00000000000..a07536bde52 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs_dataclass/flow.dag.yaml @@ -0,0 +1 @@ +entry: multiple_stream_outputs_dataclass:my_flow \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs_dataclass/multiple_stream_outputs_dataclass.py b/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs_dataclass/multiple_stream_outputs_dataclass.py new file mode 100644 index 00000000000..544ce40b667 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/multiple_stream_outputs_dataclass/multiple_stream_outputs_dataclass.py @@ -0,0 +1,18 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +from dataclasses import dataclass + +@dataclass +class MyOutput: + output1: str + output2: str + + +def my_flow(input_val: str = "gpt") -> MyOutput: + generator1 = (i for i in range(10)) + generator2 = (i for i in range(10)) + return MyOutput( + output1=generator1, + output2=generator2, + ) diff --git a/src/promptflow/tests/test_configs/eager_flows/print_environment_variables/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/print_environment_variables/flow.dag.yaml new file mode 100644 index 00000000000..aa0fc845d9b --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/print_environment_variables/flow.dag.yaml @@ -0,0 +1,3 @@ +entry: print_env_var:env_var_flow +environment_variables: + TEST: VAL \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/print_environment_variables/print_env_var.py b/src/promptflow/tests/test_configs/eager_flows/print_environment_variables/print_env_var.py new file mode 100644 index 00000000000..861c4512786 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/print_environment_variables/print_env_var.py @@ -0,0 +1,9 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import os + + +def env_var_flow(key): + """Simple flow without yaml.""" + return f"Hello world! {os.environ.get(key)}" diff --git a/src/promptflow/tests/test_configs/eager_flows/stream_output/flow.dag.yaml b/src/promptflow/tests/test_configs/eager_flows/stream_output/flow.dag.yaml new file mode 100644 index 00000000000..c46b32fdc30 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/stream_output/flow.dag.yaml @@ -0,0 +1 @@ +entry: stream_output:my_flow \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/eager_flows/stream_output/stream_output.py b/src/promptflow/tests/test_configs/eager_flows/stream_output/stream_output.py new file mode 100644 index 00000000000..b2cfaae40b6 --- /dev/null +++ b/src/promptflow/tests/test_configs/eager_flows/stream_output/stream_output.py @@ -0,0 +1,8 @@ +# --------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# --------------------------------------------------------- +import time +def my_flow(input_val: str = "gpt") -> str: + for c in "Hello world! ": + time.sleep(1) + yield c diff --git a/src/promptflow/tests/test_configs/experiments/chat-group-node-exp-template/exp.yaml b/src/promptflow/tests/test_configs/experiments/chat-group-node-exp-template/exp.yaml new file mode 100644 index 00000000000..02d393cef70 --- /dev/null +++ b/src/promptflow/tests/test_configs/experiments/chat-group-node-exp-template/exp.yaml @@ -0,0 +1,42 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Experiment.schema.json + +description: Basic experiment with chat group node + +# Specify data for experiment run +data: + - name: my_data + path: ../../flows/chat_group_eval_history/data.jsonl + +inputs: + - name: model_name + type: string + default: gpt-4 + +nodes: + # multi turn conversation is described as a chat group, which contains a copilot flow and question simulation flow + - name: multi_turn_chat + type: chat_group + max_turns: 4 + stop_signal: "[STOP]" + roles: + - role: assistant + path: ../../flows/chat_group_copilot + inputs: + question: ${data.my_data.question} + model: ${inputs.model_name} + conversation_history: ${parent.conversation_history} + - role: user + path: ../../flows/chat_group_simulation + inputs: + question: ${data.my_data.question} + ground_truth: ${data.my_data.ground_truth} + conversation_history: ${parent.conversation_history} + + # evaluate the chat history + - name: eval_history + type: flow + path: ../../flows/chat_group_eval_history + inputs: + question: ${data.my_data.question} + ground_truth: ${data.my_data.ground_truth} + conversation_history: ${multi_turn_chat.conversation_history} diff --git a/src/promptflow/tests/test_configs/flows/assistant-tool-with-connection/add_message_and_run.py b/src/promptflow/tests/test_configs/flows/assistant-tool-with-connection/add_message_and_run.py index 22fa4ef4900..f967123d3a9 100644 --- a/src/promptflow/tests/test_configs/flows/assistant-tool-with-connection/add_message_and_run.py +++ b/src/promptflow/tests/test_configs/flows/assistant-tool-with-connection/add_message_and_run.py @@ -3,7 +3,7 @@ from typing import Union from openai import AsyncAzureOpenAI, AsyncOpenAI -from openai.types.beta.threads import MessageContentImageFile, MessageContentText +from openai.types.beta.threads import TextContentBlock, ImageFileContentBlock from promptflow import tool from promptflow.connections import OpenAIConnection, AzureOpenAIConnection @@ -194,13 +194,13 @@ async def get_openai_file_references(content: list, download_image: bool, file_id_references = {} file_id = None for item in content: - if isinstance(item, MessageContentImageFile): + if isinstance(item, ImageFileContentBlock): file_id = item.image_file.file_id if download_image: file_id_references[file_id] = { "content": await download_openai_image(file_id, conn), } - elif isinstance(item, MessageContentText): + elif isinstance(item, TextContentBlock): for annotation in item.text.annotations: if annotation.type == "file_path": file_id = annotation.file_path.file_id @@ -223,10 +223,10 @@ async def get_openai_file_references(content: list, download_image: bool, def to_pf_content(content: list): pf_content = [] for item in content: - if isinstance(item, MessageContentImageFile): + if isinstance(item, ImageFileContentBlock): file_id = item.image_file.file_id pf_content.append({"type": "image_file", "image_file": {"file_id": file_id}}) - elif isinstance(item, MessageContentText): + elif isinstance(item, TextContentBlock): text_dict = {"type": "text", "text": {"value": item.text.value, "annotations": []}} for annotation in item.text.annotations: annotation_dict = { diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-file/add_message_and_run.py b/src/promptflow/tests/test_configs/flows/assistant-with-file/add_message_and_run.py index 5def67f33e3..f967123d3a9 100644 --- a/src/promptflow/tests/test_configs/flows/assistant-with-file/add_message_and_run.py +++ b/src/promptflow/tests/test_configs/flows/assistant-with-file/add_message_and_run.py @@ -3,14 +3,16 @@ from typing import Union from openai import AsyncAzureOpenAI, AsyncOpenAI -from openai.types.beta.threads import MessageContentImageFile, MessageContentText +from openai.types.beta.threads import TextContentBlock, ImageFileContentBlock -from promptflow import tool, trace +from promptflow import tool from promptflow.connections import OpenAIConnection, AzureOpenAIConnection from promptflow.contracts.multimedia import Image from promptflow.contracts.types import AssistantDefinition from promptflow.exceptions import SystemErrorException from promptflow.executor._assistant_tool_invoker import AssistantToolInvoker +from promptflow.tracing import trace + from get_assistant_client import get_assistant_client URL_PREFIX = "https://platform.openai.com/files/" @@ -192,13 +194,13 @@ async def get_openai_file_references(content: list, download_image: bool, file_id_references = {} file_id = None for item in content: - if isinstance(item, MessageContentImageFile): + if isinstance(item, ImageFileContentBlock): file_id = item.image_file.file_id if download_image: file_id_references[file_id] = { "content": await download_openai_image(file_id, conn), } - elif isinstance(item, MessageContentText): + elif isinstance(item, TextContentBlock): for annotation in item.text.annotations: if annotation.type == "file_path": file_id = annotation.file_path.file_id @@ -221,10 +223,10 @@ async def get_openai_file_references(content: list, download_image: bool, def to_pf_content(content: list): pf_content = [] for item in content: - if isinstance(item, MessageContentImageFile): + if isinstance(item, ImageFileContentBlock): file_id = item.image_file.file_id pf_content.append({"type": "image_file", "image_file": {"file_id": file_id}}) - elif isinstance(item, MessageContentText): + elif isinstance(item, TextContentBlock): text_dict = {"type": "text", "text": {"value": item.text.value, "annotations": []}} for annotation in item.text.annotations: annotation_dict = { diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/README.md b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/README.md new file mode 100644 index 00000000000..3fb2d9b3b7a --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/README.md @@ -0,0 +1,52 @@ +# Chat with Calorie Assistant + +This sample shows how to embed package tool into assistant. + +Tools used in this flow: +- `add_message_and_run` tool, assistant tool, provisioned with below inner functions: + - `say_hello``: simple say hello method + +## Prerequisites + +Install promptflow sdk and other dependencies in this folder: +```sh +pip install -r requirements.txt +``` + +## What you will learn + +In this flow, you will understand how assistant tools within PromptFlow are triggered by user prompts. The assistant tool decides which internal functions or tools to invoke based on the input provided. Your responsibility involves implementing each of these tools and registering them in the `assistant_definition`. Additionally, be aware that the tools may have dependencies on each other, affecting the order and manner of their invocation. + + +## Getting started + +### 1. Create assistant connection (openai) +Go to "Prompt flow" "Connections" tab. Click on "Create" button, select one of assistant tool supported connection types and fill in the configurations. + +Currently, only "Open AI" connection type are supported for assistant tool. Please refer to [OpenAI](https://platform.openai.com/) for more details. + +```bash +# Override keys with --set to avoid yaml file changes +pf connection create --file ../../../connections/openai.yml --set api_key= +``` + +Note in [flow.dag.yaml](flow.dag.yaml) we are using connection named `open_ai_connection`. +```bash +# show registered connection +pf connection show --name open_ai_connection +``` + +### 2. Create or get assistant/thread + +Navigate to the OpenAI Assistant page and create an assistant if you haven't already. Once created, click on the 'Test' button to enter the assistant's playground. Make sure to note down the assistant_id. + +**[Optional]** Start a chat session to create thread automatically. Keep track of the thread_id. + + +### 3. run the flow + +```bash +# run chat flow with default question in flow.dag.yaml +pf flow test --flow . --interactive --multi-modal --user-agent "prompt-flow-extension/1.8.0 (win32; x64) VSCode/1.85.1" + +``` diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/add_message_and_run.py b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/add_message_and_run.py new file mode 100644 index 00000000000..f967123d3a9 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/add_message_and_run.py @@ -0,0 +1,256 @@ +import asyncio +import json +from typing import Union + +from openai import AsyncAzureOpenAI, AsyncOpenAI +from openai.types.beta.threads import TextContentBlock, ImageFileContentBlock + +from promptflow import tool +from promptflow.connections import OpenAIConnection, AzureOpenAIConnection +from promptflow.contracts.multimedia import Image +from promptflow.contracts.types import AssistantDefinition +from promptflow.exceptions import SystemErrorException +from promptflow.executor._assistant_tool_invoker import AssistantToolInvoker +from promptflow.tracing import trace + +from get_assistant_client import get_assistant_client + +URL_PREFIX = "https://platform.openai.com/files/" +RUN_STATUS_POLLING_INTERVAL_IN_MILSEC = 1000 + + +@tool +async def add_message_and_run( + conn: Union[AzureOpenAIConnection, OpenAIConnection], + assistant_id: str, + thread_id: str, + message: list, + assistant_definition: AssistantDefinition, + download_images: bool, +): + cli = await get_assistant_client(conn) + invoker = assistant_definition._tool_invoker + # Check if assistant id is valid. If not, create a new assistant. + # Note: tool registration at run creation, rather than at assistant creation. + if not assistant_id: + assistant = await create_assistant(cli, assistant_definition) + assistant_id = assistant.id + + await add_message(cli, message, thread_id) + + run = await start_run(cli, assistant_id, thread_id, assistant_definition, invoker) + + await wait_for_run_complete(cli, thread_id, invoker, run) + + messages = await get_message(cli, thread_id) + + file_id_references = await get_openai_file_references(messages.data[0].content, download_images, conn) + return {"content": to_pf_content(messages.data[0].content), "file_id_references": file_id_references} + + +@trace +async def create_assistant(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], assistant_definition: AssistantDefinition): + assistant = await cli.beta.assistants.create( + instructions=assistant_definition.instructions, model=assistant_definition.model + ) + print(f"Created assistant: {assistant.id}") + return assistant + + +@trace +async def add_message(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], message: list, thread_id: str): + content = extract_text_from_message(message) + file_ids = await extract_file_ids_from_message(cli, message) + msg = await cli.beta.threads.messages.create(thread_id=thread_id, role="user", content=content, file_ids=file_ids) + print(f"Created message message_id: {msg.id}, thread_id: {thread_id}") + return msg + + +@trace +async def start_run( + cli: Union[AsyncOpenAI, AsyncAzureOpenAI], + assistant_id: str, + thread_id: str, + assistant_definition: AssistantDefinition, + invoker: AssistantToolInvoker, +): + tools = invoker.to_openai_tools() + run = await cli.beta.threads.runs.create( + assistant_id=assistant_id, + thread_id=thread_id, + model=assistant_definition.model, + instructions=assistant_definition.instructions, + tools=tools, + ) + print(f"Assistant_id: {assistant_id}, thread_id: {thread_id}, run_id: {run.id}") + return run + + +async def wait_for_status_check(): + await asyncio.sleep(RUN_STATUS_POLLING_INTERVAL_IN_MILSEC / 1000.0) + + +async def get_run_status(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], thread_id: str, run_id: str): + run = await cli.beta.threads.runs.retrieve(thread_id=thread_id, run_id=run_id) + print(f"Run status: {run.status}") + return run + + +@trace +async def get_tool_calls_outputs(invoker: AssistantToolInvoker, run): + tool_calls = run.required_action.submit_tool_outputs.tool_calls + tool_outputs = [] + for tool_call in tool_calls: + tool_name = tool_call.function.name + tool_args = json.loads(tool_call.function.arguments) + print(f"Invoking tool: {tool_call.function.name} with args: {tool_args}") + output = invoker.invoke_tool(tool_name, tool_args) + + tool_outputs.append( + { + "tool_call_id": tool_call.id, + "output": str(output), + } + ) + print(f"Tool output: {str(output)}") + return tool_outputs + + +@trace +async def submit_tool_calls_outputs(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], thread_id: str, run_id: str, + tool_outputs: list): + await cli.beta.threads.runs.submit_tool_outputs(thread_id=thread_id, run_id=run_id, tool_outputs=tool_outputs) + print(f"Submitted all required resonses for run: {run_id}") + + +@trace +async def require_actions(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], thread_id: str, run, + invoker: AssistantToolInvoker): + tool_outputs = await get_tool_calls_outputs(invoker, run) + await submit_tool_calls_outputs(cli, thread_id, run.id, tool_outputs) + + +@trace +async def wait_for_run_complete(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], thread_id: str, + invoker: AssistantToolInvoker, run): + while not is_run_terminated(run): + await wait_for_status_check() + run = await get_run_status(cli, thread_id, run.id) + if run.status == "requires_action": + await require_actions(cli, thread_id, run, invoker) + elif run.status in {"in_progress", "cancelling", "queued"}: + continue + elif run.status in {"failed", "cancelled", "expired"}: + if run.last_error is not None: + error_message = f"The assistant tool runs in '{run.status}' status. " \ + f"Error code: {run.last_error.code}. Message: {run.last_error.message}" + else: + error_message = f"The assistant tool runs in '{run.status}' status without a specific error message." + raise Exception(error_message) + + +@trace +async def get_run_steps(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], thread_id: str, run_id: str): + run_steps = await cli.beta.threads.runs.steps.list(thread_id=thread_id, run_id=run_id) + print("step details: \n") + for step_data in run_steps.data: + print(step_data.step_details) + + +@trace +async def get_message(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], thread_id: str): + messages = await cli.beta.threads.messages.list(thread_id=thread_id) + return messages + + +def extract_text_from_message(message: list): + content = [] + for m in message: + if isinstance(m, str): + content.append(m) + continue + message_type = m.get("type", "") + if message_type == "text" and "text" in m: + content.append(m["text"]) + return "\n".join(content) + + +async def extract_file_ids_from_message(cli: Union[AsyncOpenAI, AsyncAzureOpenAI], message: list): + file_ids = [] + for m in message: + if isinstance(m, str): + continue + message_type = m.get("type", "") + if message_type == "file_path" and "file_path" in m: + path = m["file_path"].get("path", "") + if path: + file = await cli.files.create(file=open(path, "rb"), purpose="assistants") + file_ids.append(file.id) + return file_ids + + +async def get_openai_file_references(content: list, download_image: bool, + conn: Union[AzureOpenAIConnection, OpenAIConnection]): + file_id_references = {} + file_id = None + for item in content: + if isinstance(item, ImageFileContentBlock): + file_id = item.image_file.file_id + if download_image: + file_id_references[file_id] = { + "content": await download_openai_image(file_id, conn), + } + elif isinstance(item, TextContentBlock): + for annotation in item.text.annotations: + if annotation.type == "file_path": + file_id = annotation.file_path.file_id + elif annotation.type == "file_citation": + file_id = annotation.file_citation.file_id + else: + raise Exception(f"Unsupported content type: '{type(item)}'.") + + if file_id: + if file_id not in file_id_references: + file_id_references[file_id] = {} + if isinstance(conn, OpenAIConnection): + file_id_references[file_id]["url"] = URL_PREFIX + file_id + else: + # For AzureOpenAIConnection, the url is not avaliable. Shall fullfill it later. + pass + return file_id_references + + +def to_pf_content(content: list): + pf_content = [] + for item in content: + if isinstance(item, ImageFileContentBlock): + file_id = item.image_file.file_id + pf_content.append({"type": "image_file", "image_file": {"file_id": file_id}}) + elif isinstance(item, TextContentBlock): + text_dict = {"type": "text", "text": {"value": item.text.value, "annotations": []}} + for annotation in item.text.annotations: + annotation_dict = { + "type": "file_path", + "text": annotation.text, + "start_index": annotation.start_index, + "end_index": annotation.end_index, + } + if annotation.type == "file_path": + annotation_dict["file_path"] = {"file_id": annotation.file_path.file_id} + elif annotation.type == "file_citation": + annotation_dict["file_citation"] = {"file_id": annotation.file_citation.file_id} + text_dict["text"]["annotations"].append(annotation_dict) + pf_content.append(text_dict) + else: + raise SystemErrorException(f"Unsupported content type: {type(item)}") + return pf_content + + +async def download_openai_image(file_id: str, conn: Union[AzureOpenAIConnection, OpenAIConnection]): + cli = await get_assistant_client(conn) + image_data = await cli.files.content(file_id) + return Image(image_data.read()) + + +def is_run_terminated(run) -> bool: + return run.status in ["completed", "expired", "failed", "cancelled"] \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/assistant_definition.yaml b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/assistant_definition.yaml new file mode 100644 index 00000000000..5da85caa80d --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/assistant_definition.yaml @@ -0,0 +1,11 @@ +model: gpt-4 +instructions: You are assistant for communications. +tools: + - type: function + source: + type: package + tool: communicate.Communication.say_hello + predefined_inputs: + connection: aoai_assistant_connection + connection_2: aoai_assistant_connection + tool_type: python diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/data.jsonl b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/data.jsonl new file mode 100644 index 00000000000..cf7c5349b26 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/data.jsonl @@ -0,0 +1,5 @@ +{"chat_history":[], "question": "If I am going to run with 1.5 hours this morning, how many calories will I burn?", "assistant_id": "asst_yWhdFYoCS1UatnRRQZGY85aL", "thread_id": ""} +{"chat_history":[], "question": "I'm going to swim in Guangzhou city today for 30 min, how much calories will I burn?", "assistant_id": "asst_yWhdFYoCS1UatnRRQZGY85aL", "thread_id": ""} +{"chat_history":[], "question": "I'm going to run slowly on local street today, how much calories will I burn?", "assistant_id": "asst_yWhdFYoCS1UatnRRQZGY85aL", "thread_id": ""} +{"chat_history":[], "question": "If I am going to run 1.5 hours under 24 degrees Celsius, how many calories will I burn", "assistant_id": "asst_yWhdFYoCS1UatnRRQZGY85aL", "thread_id": ""} +{"chat_history":[], "question": "I'm going to biking for 2 hours duration today, how much calories will I burn?", "assistant_id": "asst_yWhdFYoCS1UatnRRQZGY85aL", "thread_id": ""} diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/flow.dag.yaml new file mode 100644 index 00000000000..ec75fc3863c --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/flow.dag.yaml @@ -0,0 +1,42 @@ +environment: + python_requirements_txt: requirements.txt +version: 2 +inputs: + question: + type: string + default: Just say hello. + assistant_id: + type: string + default: "" + thread_id: + type: string + default: "" +outputs: + answer: + type: string + reference: ${assistant.output} + is_chat_output: true + thread_id: + type: string + reference: ${get_or_create_thread.output} +nodes: + - name: get_or_create_thread + type: python + source: + type: code + path: get_or_create_thread.py + inputs: + conn: aoai_assistant_connection + thread_id: ${inputs.thread_id} + - name: assistant + type: python + source: + type: code + path: add_message_and_run.py + inputs: + conn: aoai_assistant_connection + message: ${inputs.question} + assistant_id: ${inputs.assistant_id} + thread_id: ${get_or_create_thread.output} + download_images: true + assistant_definition: assistant_definition.yaml diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/get_assistant_client.py b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/get_assistant_client.py new file mode 100644 index 00000000000..9c60fe08beb --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/get_assistant_client.py @@ -0,0 +1,18 @@ +from typing import Union +from openai import AsyncAzureOpenAI, AsyncOpenAI +from promptflow.tracing import trace +from promptflow.connections import AzureOpenAIConnection, OpenAIConnection + +@trace +async def get_assistant_client(conn: Union[AzureOpenAIConnection, OpenAIConnection]): + if isinstance(conn, AzureOpenAIConnection): + cli = AsyncAzureOpenAI( + api_key=conn.api_key, + api_version=conn.api_version, + azure_endpoint = conn.api_base, + ) + elif isinstance(conn, OpenAIConnection): + cli = AsyncOpenAI(api_key=conn.api_key, organization=conn.organization) + else: + raise Exception(f"Unsupported connection type for assistant: {type(conn)}") + return cli \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/get_or_create_thread.py b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/get_or_create_thread.py new file mode 100644 index 00000000000..7e5cf1b6b79 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/get_or_create_thread.py @@ -0,0 +1,16 @@ + + +from typing import Union +from promptflow import tool +from promptflow.connections import AzureOpenAIConnection, OpenAIConnection +from get_assistant_client import get_assistant_client + + +@tool +async def get_or_create_thread(conn: Union[AzureOpenAIConnection, OpenAIConnection], thread_id: str): + if thread_id: + return thread_id + cli = await get_assistant_client(conn) + thread = await cli.beta.threads.create() + return thread.id + diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/package_tool_definition.json b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/package_tool_definition.json new file mode 100644 index 00000000000..c521281a417 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/package_tool_definition.json @@ -0,0 +1,14 @@ +{ + "communicate.Communication.say_hello": { + "class_name": "Communication", + "function": "say_hello", + "inputs": { + "connection": {"type": ["AzureOpenAIConnection"]}, + "connection_2": {"type": ["AzureOpenAIConnection"]} + }, + "module": "communicate", + "name": "communication related activity", + "type": "python", + "description": "Say hello to the world or someone else" + } +} diff --git a/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/requirements.txt b/src/promptflow/tests/test_configs/flows/assistant-with-package-tool/requirements.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/promptflow/tests/test_configs/flows/chat-with-assistant-no-file/add_message_and_run.py b/src/promptflow/tests/test_configs/flows/chat-with-assistant-no-file/add_message_and_run.py index 22fa4ef4900..f967123d3a9 100644 --- a/src/promptflow/tests/test_configs/flows/chat-with-assistant-no-file/add_message_and_run.py +++ b/src/promptflow/tests/test_configs/flows/chat-with-assistant-no-file/add_message_and_run.py @@ -3,7 +3,7 @@ from typing import Union from openai import AsyncAzureOpenAI, AsyncOpenAI -from openai.types.beta.threads import MessageContentImageFile, MessageContentText +from openai.types.beta.threads import TextContentBlock, ImageFileContentBlock from promptflow import tool from promptflow.connections import OpenAIConnection, AzureOpenAIConnection @@ -194,13 +194,13 @@ async def get_openai_file_references(content: list, download_image: bool, file_id_references = {} file_id = None for item in content: - if isinstance(item, MessageContentImageFile): + if isinstance(item, ImageFileContentBlock): file_id = item.image_file.file_id if download_image: file_id_references[file_id] = { "content": await download_openai_image(file_id, conn), } - elif isinstance(item, MessageContentText): + elif isinstance(item, TextContentBlock): for annotation in item.text.annotations: if annotation.type == "file_path": file_id = annotation.file_path.file_id @@ -223,10 +223,10 @@ async def get_openai_file_references(content: list, download_image: bool, def to_pf_content(content: list): pf_content = [] for item in content: - if isinstance(item, MessageContentImageFile): + if isinstance(item, ImageFileContentBlock): file_id = item.image_file.file_id pf_content.append({"type": "image_file", "image_file": {"file_id": file_id}}) - elif isinstance(item, MessageContentText): + elif isinstance(item, TextContentBlock): text_dict = {"type": "text", "text": {"value": item.text.value, "annotations": []}} for annotation in item.text.annotations: annotation_dict = { diff --git a/src/promptflow/tests/test_configs/flows/chat_flow_with_image/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/chat_flow_with_image/flow.dag.yaml index be2954c6675..6cc5e0ae907 100644 --- a/src/promptflow/tests/test_configs/flows/chat_flow_with_image/flow.dag.yaml +++ b/src/promptflow/tests/test_configs/flows/chat_flow_with_image/flow.dag.yaml @@ -38,4 +38,3 @@ nodes: inputs: chat_history: ${inputs.chat_history} question: ${inputs.question} -message_format: basic diff --git a/src/promptflow/tests/test_configs/flows/chat_flow_with_non_string_stream_output/echo_input.py b/src/promptflow/tests/test_configs/flows/chat_flow_with_non_string_stream_output/echo_input.py new file mode 100644 index 00000000000..dcf19124e05 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_flow_with_non_string_stream_output/echo_input.py @@ -0,0 +1,7 @@ +from promptflow import tool + +@tool +def my_python_tool(input: str) -> str: + yield "Echo: " + yield "an input of length " + yield len(input) diff --git a/src/promptflow/tests/test_configs/flows/chat_flow_with_non_string_stream_output/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/chat_flow_with_non_string_stream_output/flow.dag.yaml new file mode 100644 index 00000000000..648388d2287 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_flow_with_non_string_stream_output/flow.dag.yaml @@ -0,0 +1,21 @@ +inputs: + chat_history: + type: list + is_chat_history: true + text: + type: string + is_chat_input: true + default: What is ChatGPT? +outputs: + output_echo: + type: string + reference: ${echo_my_input.output} + is_chat_output: true +nodes: +- name: echo_my_input + type: python + source: + type: code + path: echo_input.py + inputs: + input: ${inputs.text} diff --git a/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/flow.dag.yaml new file mode 100644 index 00000000000..07ce97e7c48 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/flow.dag.yaml @@ -0,0 +1,53 @@ +message_format: openai-vision +inputs: + chat_history: + type: list + default: + - inputs: + question: + - the first question + - type: image_file + image_file: + path: logo.jpg + outputs: + answer: + - type: image_file + image_file: + path: logo.jpg + - inputs: + question: + - the second question + - type: image_file + image_file: + path: logo_2.png + outputs: + answer: + - type: image_file + image_file: + path: logo_2.png + is_chat_history: true + question: + type: list + default: + - the third question + - type: image_file + image_file: + path: logo.jpg + - type: image_file + image_file: + path: logo_2.png + is_chat_input: true +outputs: + answer: + type: string + reference: ${mock_chat_node.output} + is_chat_output: true +nodes: +- name: mock_chat_node + type: python + source: + type: code + path: mock_chat.py + inputs: + chat_history: ${inputs.chat_history} + question: ${inputs.question} diff --git a/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/inputs.jsonl b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/inputs.jsonl new file mode 100644 index 00000000000..8969020ffd6 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/inputs.jsonl @@ -0,0 +1,2 @@ +{"chat_history":[{"inputs": {"question": ["the first question",{"type": "image_file", "image_file": {"path": "logo.jpg"}}]},"outputs": {"answer": [{"type": "image_file", "image_file": {"path": "logo.jpg"}}]}},{"inputs": {"question": ["the second question",{"type": "image_file", "image_file": {"path": "logo_2.png"}}]},"outputs": {"answer": [{"type": "image_file", "image_file": {"path": "logo_2.png"}}]}}],"question": ["the third question",{"type": "image_file", "image_file": {"path": "logo.jpg"}},{"type": "image_file", "image_file": {"path": "logo_2.png"}}]} +{"chat_history":[{"inputs": {"question": ["the first question",{"type": "image_file", "image_file": {"path": "logo.jpg"}}]},"outputs": {"answer": [{"type": "image_file", "image_file": {"path": "logo.jpg"}}]}},{"inputs": {"question": ["the second question",{"type": "image_file", "image_file": {"path": "logo_2.png"}}]},"outputs": {"answer": [{"type": "image_file", "image_file": {"path": "logo_2.png"}}]}}],"question": ["the third question",{"type": "image_file", "image_file": {"path": "logo.jpg"}},{"type": "image_file", "image_file": {"path": "logo_2.png"}}]} diff --git a/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/logo.jpg b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/logo.jpg new file mode 100644 index 00000000000..155609310c8 Binary files /dev/null and b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/logo.jpg differ diff --git a/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/logo_2.png b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/logo_2.png new file mode 100644 index 00000000000..27f294983ff Binary files /dev/null and b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/logo_2.png differ diff --git a/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/mock_chat.py b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/mock_chat.py new file mode 100644 index 00000000000..4cda2de1c76 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_flow_with_openai_vision_image/mock_chat.py @@ -0,0 +1,25 @@ +from promptflow import tool +from promptflow.contracts.multimedia import Image + + +@tool +def mock_chat(chat_history: list, question: list): + ensure_image_in_list(question, "question") + for item in chat_history: + ensure_image_in_list(item["inputs"]["question"], "inputs of chat history") + ensure_image_in_list(item["outputs"]["answer"], "outputs of chat history") + res = [] + for item in question: + if isinstance(item, Image): + res.append(item) + res.append("text response") + return res + + +def ensure_image_in_list(value: list, name: str): + include_image = False + for item in value: + if isinstance(item, Image): + include_image = True + if not include_image: + raise Exception(f"No image found in {name}, you should include at least one image in your {name}.") diff --git a/src/promptflow/tests/test_configs/flows/chat_group_copilot/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/chat_group_copilot/flow.dag.yaml new file mode 100644 index 00000000000..8e4f0725634 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_copilot/flow.dag.yaml @@ -0,0 +1,35 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json +inputs: + question: + type: string + default: What's human? + model: + type: string + default: gpt-3.5-turbo + conversation_history: + type: list +outputs: + output: + type: string + reference: ${llm.output} +nodes: +- name: prompt + type: prompt + inputs: + question: ${inputs.question} + conversation_history: ${inputs.conversation_history} + source: + type: code + path: prompt.jinja2 +- name: llm + type: llm + inputs: + prompt: ${prompt.output} + deployment_name: gpt-35-turbo + model: ${inputs.model} + max_tokens: '120' + source: + type: code + path: prompt.jinja2 + connection: azure_open_ai_connection + api: chat diff --git a/src/promptflow/tests/test_configs/flows/chat_group_copilot/prompt.jinja2 b/src/promptflow/tests/test_configs/flows/chat_group_copilot/prompt.jinja2 new file mode 100644 index 00000000000..89bb1968fc9 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_copilot/prompt.jinja2 @@ -0,0 +1,15 @@ +system: +You are an assistant that can answer philosophical questions. + +Here is the initial message from user: +{{question}} + +{% if conversation_history %} +Here is a chat history you had with the user: +{% for item in conversation_history %} +{{item}} +{% endfor %} +{% endif %} + +Now please continue the conversation with the user, just answer the question, no extra formatting is needed: +assistant: \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/flows/chat_group_eval_history/aggregate.py b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/aggregate.py new file mode 100644 index 00000000000..098a6bd89d9 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/aggregate.py @@ -0,0 +1,24 @@ +from typing import List + +from promptflow import tool + + +@tool +def aggregate(processed_results: List[str]): + """ + This tool aggregates the processed result of all lines to the variant level and log metric for each variant. + + :param processed_results: List of the output of line_process node. + """ + + # Add your aggregation logic here + # aggregated_results should be a dictionary with the metric name as the key and the metric value as the value. + results_num = len(processed_results) + print(results_num) + print(processed_results) + + # Log metric for each variant + from promptflow import log_metric + log_metric(key="results_num", value=results_num) + + return results_num diff --git a/src/promptflow/tests/test_configs/flows/chat_group_eval_history/data.jsonl b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/data.jsonl new file mode 100644 index 00000000000..8d7a3fe0911 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/data.jsonl @@ -0,0 +1,2 @@ +{"question": "What's the most beautiful thing in the world?", "ground_truth": "The world itself."} +{"question": "What life is all about?", "ground_truth": "Life is about living."} diff --git a/src/promptflow/tests/test_configs/flows/chat_group_eval_history/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/flow.dag.yaml new file mode 100644 index 00000000000..15368232f9e --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/flow.dag.yaml @@ -0,0 +1,33 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json +inputs: + question: + type: string + ground_truth: + type: string + conversation_history: + type: list + default: [] + +outputs: + output: + type: string + reference: ${line_process.output} + +nodes: +- name: line_process + type: python + source: + type: code + path: line_process.py + inputs: + ground_truth: ${inputs.ground_truth} + conversation_history: ${inputs.conversation_history} +- name: aggregate + type: python + source: + type: code + path: aggregate.py + inputs: + processed_results: ${line_process.output} + aggregation: true + diff --git a/src/promptflow/tests/test_configs/flows/chat_group_eval_history/line_process.py b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/line_process.py new file mode 100644 index 00000000000..46e4056eeee --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/line_process.py @@ -0,0 +1,27 @@ +from typing import List +from promptflow import tool + + +def get_answer_from_conversation_history(conversation_history: List) -> str: + """ + This function gets the answer from the conversation history. + + :param conversation_history: the conversation history. + """ + if len(conversation_history) == 0: + return "NA" + assistant_answers = [item[1] for item in conversation_history if item[0] == "assistant"] + return assistant_answers[-1]["output"] + + +@tool +def line_process(ground_truth: str, conversation_history: List): + """ + This tool processes the prediction of a single line and returns the processed result. + + :param groundtruth: the groundtruth of a single line. + :param prediction: the prediction of a single line. + """ + answer = get_answer_from_conversation_history(conversation_history) + # Add your line processing logic here + return "Correct" if ground_truth.lower() == answer.lower() else "Incorrect" diff --git a/src/promptflow/tests/test_configs/flows/chat_group_eval_history/requirements.txt b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/requirements.txt new file mode 100644 index 00000000000..34d068f5f1c --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_eval_history/requirements.txt @@ -0,0 +1,2 @@ +promptflow +promptflow-tools \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/flows/chat_group_simulation/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/chat_group_simulation/flow.dag.yaml new file mode 100644 index 00000000000..2d531ed57bb --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_simulation/flow.dag.yaml @@ -0,0 +1,22 @@ +$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json +inputs: + question: + type: string + ground_truth: + type: string + conversation_history: + type: list +outputs: + output: + type: string + reference: ${simulator.output} +nodes: +- name: simulator + type: python + source: + type: code + path: simulator.py + inputs: + question: ${inputs.question} + ground_truth: ${inputs.ground_truth} + conversation_history: ${inputs.conversation_history} diff --git a/src/promptflow/tests/test_configs/flows/chat_group_simulation/simulator.py b/src/promptflow/tests/test_configs/flows/chat_group_simulation/simulator.py new file mode 100644 index 00000000000..7c19cb0e8dd --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/chat_group_simulation/simulator.py @@ -0,0 +1,28 @@ +from typing import List + +from promptflow import tool + + +def get_answer_from_conversation_history(conversation_history: List) -> str: + """ + This function gets the answer from the conversation history. + + :param conversation_history: the conversation history. + """ + if len(conversation_history) == 0: + return "NA" + assistant_answers = [item[1] for item in conversation_history if item[0] == "assistant"] + return assistant_answers[-1]["output"] + + +@tool +def simulate(question: str, ground_truth: str, conversation_history: List) -> str: + print(f"question: {question}") + print(f"chat_history: {conversation_history}") + answer = get_answer_from_conversation_history(conversation_history) + print(f"answer: {answer}") + if answer != ground_truth: + return "I don't like this answer, give me another one." + else: + return "[STOP]" + diff --git a/src/promptflow/tests/test_configs/flows/connection_not_provided/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/connection_not_provided/flow.dag.yaml new file mode 100644 index 00000000000..45933e5e825 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/connection_not_provided/flow.dag.yaml @@ -0,0 +1,15 @@ +inputs: + key: + type: string +outputs: + output: + type: string + reference: ${print_env.output} +nodes: +- name: print_env + type: python + source: + type: code + path: print_env.py + inputs: + key: ${inputs.key} diff --git a/src/promptflow/tests/test_configs/flows/connection_not_provided/print_env.py b/src/promptflow/tests/test_configs/flows/connection_not_provided/print_env.py new file mode 100644 index 00000000000..8570c4b390f --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/connection_not_provided/print_env.py @@ -0,0 +1,10 @@ +import os + +from promptflow import tool +from promptflow.connections import CustomConnection + + +@tool +def get_env_var(key: str, connection: CustomConnection): + # get from env var + return {"key": key, "connection": connection.type} diff --git a/src/promptflow/tests/test_configs/flows/deployment_name_not_enabled/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/deployment_name_not_enabled/flow.dag.yaml new file mode 100644 index 00000000000..cb8d77178af --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/deployment_name_not_enabled/flow.dag.yaml @@ -0,0 +1,16 @@ +inputs: + key: + type: string +outputs: + output: + type: string + reference: ${print_env.output} +nodes: +- name: print_env + type: python + source: + type: code + path: print_env.py + inputs: + generate_question_prompt: ${inputs.key} + connection: azure_open_ai_connection diff --git a/src/promptflow/tests/test_configs/flows/deployment_name_not_enabled/print_env.py b/src/promptflow/tests/test_configs/flows/deployment_name_not_enabled/print_env.py new file mode 100644 index 00000000000..2cdf856084c --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/deployment_name_not_enabled/print_env.py @@ -0,0 +1,17 @@ +from typing import Union + + +from promptflow import tool +from promptflow.connections import AzureOpenAIConnection, OpenAIConnection + + +@tool() +def generate_question( + connection: Union[OpenAIConnection, AzureOpenAIConnection], + generate_question_prompt: str, + deployment_name: str = "", + model: str = "", + context: str = None, + temperature: float = 0.2 +): + return {"deployment_name": deployment_name, "model": model} diff --git a/src/promptflow/tests/test_configs/flows/evc_connection_not_exist/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/evc_connection_not_exist/flow.dag.yaml new file mode 100644 index 00000000000..9489aa74951 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/evc_connection_not_exist/flow.dag.yaml @@ -0,0 +1,17 @@ +inputs: + key: + type: string +outputs: + output: + type: string + reference: ${print_env.output.value} +environment_variables: + API_BASE: ${not_exist.val} +nodes: +- name: print_env + type: python + source: + type: code + path: print_env.py + inputs: + key: ${inputs.key} diff --git a/src/promptflow/tests/test_configs/flows/evc_connection_not_exist/print_env.py b/src/promptflow/tests/test_configs/flows/evc_connection_not_exist/print_env.py new file mode 100644 index 00000000000..e0ee390c9f6 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/evc_connection_not_exist/print_env.py @@ -0,0 +1,10 @@ +import os + +from promptflow import tool + + +@tool +def get_env_var(key: str): + print(os.environ.get(key)) + # get from env var + return {"value": os.environ.get(key)} diff --git a/src/promptflow/tests/test_configs/flows/export/linux/runit/promptflow-serve/run b/src/promptflow/tests/test_configs/flows/export/linux/runit/promptflow-serve/run index 1d09ef532da..89587dcfba3 100644 --- a/src/promptflow/tests/test_configs/flows/export/linux/runit/promptflow-serve/run +++ b/src/promptflow/tests/test_configs/flows/export/linux/runit/promptflow-serve/run @@ -8,4 +8,4 @@ ls /connections pf connection create --file /connections/custom_connection.yaml echo "start promptflow serving with worker_num: 8, worker_threads: 1" cd /flow -gunicorn -w 8 --threads 1 -b "0.0.0.0:8080" --timeout 300 "promptflow._sdk._serving.app:create_app()" \ No newline at end of file +gunicorn -w 8 --threads 1 -b "0.0.0.0:8080" --timeout 300 "promptflow.core._serving.app:create_app()" \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/flows/flow_with_custom_connection/hello.py b/src/promptflow/tests/test_configs/flows/flow_with_custom_connection/hello.py index afa0dcc204e..95095bcc46b 100644 --- a/src/promptflow/tests/test_configs/flows/flow_with_custom_connection/hello.py +++ b/src/promptflow/tests/test_configs/flows/flow_with_custom_connection/hello.py @@ -3,6 +3,6 @@ @tool -def my_python_tool(text: str, connection: CustomConnection) -> dict: - return connection._to_dict() +def my_python_tool1(text: str, connection: CustomConnection) -> dict: + return dict(connection) diff --git a/src/promptflow/tests/test_configs/flows/flow_with_nested_tool/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/flow_with_nested_tool/flow.dag.yaml new file mode 100644 index 00000000000..65ebdd3d555 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/flow_with_nested_tool/flow.dag.yaml @@ -0,0 +1,16 @@ +inputs: + input: + type: string + default: test +outputs: + output: + type: string + reference: ${nested_tool_node.output} +nodes: + - name: nested_tool_node + type: python + source: + type: code + path: nested_tool.py + inputs: + input: ${inputs.input} diff --git a/src/promptflow/tests/test_configs/flows/flow_with_nested_tool/nested_tool.py b/src/promptflow/tests/test_configs/flows/flow_with_nested_tool/nested_tool.py new file mode 100644 index 00000000000..b769216fcca --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/flow_with_nested_tool/nested_tool.py @@ -0,0 +1,8 @@ +from promptflow import tool + + +@tool +def nested_tool(input, recursive_call=True): + if recursive_call: + nested_tool(input, recursive_call=False) + return input diff --git a/src/promptflow/tests/test_configs/flows/flow_with_trace/inputs.jsonl b/src/promptflow/tests/test_configs/flows/flow_with_trace/inputs.jsonl new file mode 100644 index 00000000000..5eb94be350a --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/flow_with_trace/inputs.jsonl @@ -0,0 +1,2 @@ +{"user_id": 1} +{"user_id": 2} \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/flows/food-calorie-assistant/add_message_and_run.py b/src/promptflow/tests/test_configs/flows/food-calorie-assistant/add_message_and_run.py index 22fa4ef4900..f967123d3a9 100644 --- a/src/promptflow/tests/test_configs/flows/food-calorie-assistant/add_message_and_run.py +++ b/src/promptflow/tests/test_configs/flows/food-calorie-assistant/add_message_and_run.py @@ -3,7 +3,7 @@ from typing import Union from openai import AsyncAzureOpenAI, AsyncOpenAI -from openai.types.beta.threads import MessageContentImageFile, MessageContentText +from openai.types.beta.threads import TextContentBlock, ImageFileContentBlock from promptflow import tool from promptflow.connections import OpenAIConnection, AzureOpenAIConnection @@ -194,13 +194,13 @@ async def get_openai_file_references(content: list, download_image: bool, file_id_references = {} file_id = None for item in content: - if isinstance(item, MessageContentImageFile): + if isinstance(item, ImageFileContentBlock): file_id = item.image_file.file_id if download_image: file_id_references[file_id] = { "content": await download_openai_image(file_id, conn), } - elif isinstance(item, MessageContentText): + elif isinstance(item, TextContentBlock): for annotation in item.text.annotations: if annotation.type == "file_path": file_id = annotation.file_path.file_id @@ -223,10 +223,10 @@ async def get_openai_file_references(content: list, download_image: bool, def to_pf_content(content: list): pf_content = [] for item in content: - if isinstance(item, MessageContentImageFile): + if isinstance(item, ImageFileContentBlock): file_id = item.image_file.file_id pf_content.append({"type": "image_file", "image_file": {"file_id": file_id}}) - elif isinstance(item, MessageContentText): + elif isinstance(item, TextContentBlock): text_dict = {"type": "text", "text": {"value": item.text.value, "annotations": []}} for annotation in item.text.annotations: annotation_dict = { diff --git a/src/promptflow/tests/test_configs/flows/hello-world/hello_world.py b/src/promptflow/tests/test_configs/flows/hello-world/hello_world.py index e0fa71d6796..880ec3dfc9a 100644 --- a/src/promptflow/tests/test_configs/flows/hello-world/hello_world.py +++ b/src/promptflow/tests/test_configs/flows/hello-world/hello_world.py @@ -1,6 +1,10 @@ +import time + from promptflow import tool @tool def hello_world(name: str) -> str: + # Sleep for 1.2 seconds + time.sleep(1.2) return f"Hello World {name}!" diff --git a/src/promptflow/tests/test_configs/flows/list_connection_not_provided/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/list_connection_not_provided/flow.dag.yaml new file mode 100644 index 00000000000..45933e5e825 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/list_connection_not_provided/flow.dag.yaml @@ -0,0 +1,15 @@ +inputs: + key: + type: string +outputs: + output: + type: string + reference: ${print_env.output} +nodes: +- name: print_env + type: python + source: + type: code + path: print_env.py + inputs: + key: ${inputs.key} diff --git a/src/promptflow/tests/test_configs/flows/list_connection_not_provided/print_env.py b/src/promptflow/tests/test_configs/flows/list_connection_not_provided/print_env.py new file mode 100644 index 00000000000..611ff53ec49 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/list_connection_not_provided/print_env.py @@ -0,0 +1,10 @@ +from typing import Union + +from promptflow import tool +from promptflow.connections import CustomConnection, OpenAIConnection + + +@tool +def get_env_var(key: str, connection: Union[CustomConnection, OpenAIConnection]): + # get from env var + return {"key": key, "connection": connection.type} diff --git a/src/promptflow/tests/test_configs/flows/python_tool_deployment_name/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/python_tool_deployment_name/flow.dag.yaml new file mode 100644 index 00000000000..5177f6de7db --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/python_tool_deployment_name/flow.dag.yaml @@ -0,0 +1,16 @@ +inputs: + key: + type: string +outputs: + output: + type: object + reference: ${print_env.output} +nodes: +- name: print_env + type: python + source: + type: code + path: print_env.py + inputs: + generate_question_prompt: ${inputs.key} + connection: azure_open_ai_connection \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/flows/python_tool_deployment_name/print_env.py b/src/promptflow/tests/test_configs/flows/python_tool_deployment_name/print_env.py new file mode 100644 index 00000000000..aa5df50e099 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/python_tool_deployment_name/print_env.py @@ -0,0 +1,25 @@ +from typing import Union + + +from promptflow import tool +from promptflow._core.tool import InputSetting +from promptflow.connections import AzureOpenAIConnection, OpenAIConnection + + +@tool(input_settings={ + "deployment_name": InputSetting(enabled_by="connection", enabled_by_type=["AzureOpenAIConnection"], capabilities={ + "completion": False, + "chat_completion": True, + "embeddings": False + }), + "model": InputSetting(enabled_by="connection", enabled_by_type=["OpenAIConnection"]), +}) +def generate_question( + connection: Union[OpenAIConnection, AzureOpenAIConnection], + generate_question_prompt: str, + deployment_name: str = "", + model: str = "", + context: str = None, + temperature: float = 0.2 +): + return {"deployment_name": deployment_name, "model": model} diff --git a/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/.gitattributes b/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/.gitattributes new file mode 100644 index 00000000000..fcadb2cf979 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/flow.dag.yaml b/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/flow.dag.yaml new file mode 100644 index 00000000000..0d20088a874 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/flow.dag.yaml @@ -0,0 +1,16 @@ +inputs: + name: + type: string + default: hod +outputs: + result: + type: string + reference: ${hello_world.output} +nodes: +- name: hello_world + type: python + source: + type: code + path: hello_world.py + inputs: + name: ${inputs.name} diff --git a/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/hello_world.py b/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/hello_world.py new file mode 100644 index 00000000000..0221ead1553 --- /dev/null +++ b/src/promptflow/tests/test_configs/flows/simple_hello_world_random_fail/hello_world.py @@ -0,0 +1,10 @@ +from promptflow import tool +import random + + +@tool +def hello_world(name: str) -> str: + if random.random() < 0.5: + raise ValueError("Random failure") + + return f"Hello World {name}!" diff --git a/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.bak b/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.bak deleted file mode 100644 index f650abfb485..00000000000 --- a/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.bak +++ /dev/null @@ -1,70 +0,0 @@ -'b9bcb73bbe85960e4f492c6b60fd2584de421f91', (0, 325) -'71d8e363eeac4e3334679f505225acd75ef5607b', (512, 414) -'0304f9ccf7ab8521173b43b526b26412208148b1', (1024, 509) -'ba311ed9f1668eddef69a4395363f18a0cfa4c93', (1536, 1999) -'eea8e9626a2ad3706637b8c470691f2a73917e0c', (3584, 531) -'443af205da3a77283a66ad8a732dfa8011277fea', (241664, 3297) -'70f4fea54805e642e98208d6704425432e00d46d', (7168, 3051) -'7b1682aa00779120720cca4dcda260ac1a85f321', (10240, 4390) -'4c5e8947686d0343cb3973a6facfb7f09c0fd7da', (14848, 4423) -'6f6de81c5e6b03f94350942c15269c35df1a9a1a', (19456, 5534) -'9e88483455fe1fb12e1320051e75859c1262436c', (25088, 4985) -'00b750ca7baf0a10c32a6b43f8b485d6ebb1c7a8', (30208, 5989) -'ead9751f11bc2db068f915f8cd6a798e5d417ee1', (36352, 2224) -'79b019d7c272dbdfc8264e8e42b2c88d7aa7c951', (38912, 2189) -'90e7b637f88d5ff8a781be0ca4c1682885c17e4a', (41472, 522) -'029f34531afb09812d41896dda6761ff0584f5e6', (42496, 1844) -'7f982806de9ef2a389ca5838d2d667fd4521d16f', (44544, 2273) -'30981d4593443ec89b06980ffb0d3bf9d6be5a71', (47104, 4509) -'e6bf5b88c4e7038d787b98bd231e8f8dee6f4f8f', (51712, 4322) -'f8b0492c08bbc03f4357fc71b0fe157cee7be8ee', (56320, 4620) -'1b8b6de280cc7f431ba77ad0f51e113055c3db32', (61440, 1986) -'a3273c3e6d4e0ec25968bb223e962ed33f482cdc', (63488, 518) -'e3922dafc105db482d08f91cff6034364235b78d', (64512, 4889) -'d8648fa6810522856487f6a796979990122cc55a', (69632, 4972) -'aadb0707e9a62b00df9d0d3fecb709ece90a8b67', (74752, 2261) -'177466a3662dea3aff35979fadea8f5c61e022c0', (125440, 4440) -'922a9871fcc709f08716edb8657b05b59786e92f', (93184, 4761) -'9ccfc240a61a0da1c6f063060190ebcb680b5514', (98304, 5628) -'23e8ff65189afc6837718250210e2b61022a9ca1', (103936, 4803) -'fe6a70524262be6b62d15dd7a5f935a0b4d823ea', (109056, 5698) -'b907c4c2ac2fcbde1dfe7d150923f03b4795ed4f', (115200, 4899) -'6e0ae8caa23ee169eb3c14aa13370a686b574819', (120320, 4737) -'6cad16355c4e541c6639770217ca6b94361720d5', (131072, 5643) -'b6b4b6762e05f7fea466b890189b306422ab3fbc', (137216, 46679) -'fa9d17f9390125ded524b1fc1c370f4ef5f34319', (184320, 4812) -'2c2c8e9b4662215a00c7119e987a6b0049829e2b', (189440, 503) -'6f58a5915089ae8f209ae96e3c3cb0ce3e6fb96c', (189952, 2353) -'f56d5514d99ebe339704d813fff58eb2f64e0ff1', (192512, 4143) -'5c89863ea5416b9056f7af7b702059fa1d37827f', (197120, 4144) -'05b0c4092bd0a64d6f30e4a3b42ab4053598d307', (201728, 1995) -'a2df0b2cd19b719ea21d216c2b8a13d7e4ed9203', (203776, 527) -'1e546f4637a42160e26f08f9c68b8f72c4b836bf', (204800, 2707) -'effe6533cbd9056f3a45712d9ad324b892bfed6a', (207872, 4762) -'c8fcd047770466d76018d8b9656c18b7a87a9dcf', (212992, 2255) -'0ad069199b869f02d23f0f5e3ad781c57b3afe27', (215552, 3954) -'f3b2fdfc3429018bbbef0dccaf4616605671b61b', (219648, 4372) -'70b674bf6702b200e03e3c9b6c49b6513c7eb5bf', (224256, 4370) -'7f5248f04d24d49778e80146e5b87f918f41f744', (228864, 4372) -'fa531c24341e01ea50402a237340baec65033746', (344576, 3147) -'440fa7fdb7289a958a6bad20052cf81bfbb9e150', (236544, 4969) -'fb60e625b19277eeda7d3175f2bd106846a0829f', (245248, 5325) -'d3dc625076f3916b91506e909bfe190bbc01cd73', (250880, 4829) -'bbd373563d35f7ad055135a1a0265d92e153e1dd', (256000, 2242) -'823f74a631fada9a31c09e15f4a7566104b70c43', (258560, 4144) -'23d2b814006b39a4f7992fc76f45663a05161613', (263168, 4596) -'10412ef15a46d3f937780619b4103316cc2e4c84', (267776, 1819) -'f0218a466bb8dba6b2e6ad27670c8538f5dd4d98', (269824, 279) -'0e2cdc51dc23e28f2c4aa8d4a64df1bc1738460c', (270336, 2297) -'9bc1fe3f9122533d6f301abc4470c1f712e29315', (272896, 2392) -'d6b2c501a077be1a7c39d866a4e5e62cebb2fdce', (275456, 56861) -'a20cbeb4142790ca04301e42386584e961c52487', (332800, 7798) -'8cf128af83ea2aaf4a09890690ab16f3bb347bb3', (340992, 309) -'343332ff6b96d3b1baac23c4e8394a6a965f84b1', (341504, 327) -'0c30184347fb989cca6598e3d2263494a649a2ab', (342016, 2316) -'24ada46c87d46cae0dc053e55e1b39833f53e977', (348160, 5161) -'fa3fc224081b85079fc21890b809c93b06ee892d', (353792, 4412) -'278500fd49f73d54f6a87bb1438e346e7d0fd47e', (358400, 4571) -'29a5d2b7c12f08dacef89c111f6fe53833bc2223', (363008, 4537) -'3441389fe22e5392774230817f328e3ec3a30f72', (367616, 4568) -'d991435bfd4971dfb1f0fdefd5f534bcc73e74ff', (372224, 5087) diff --git a/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.dat b/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.dat deleted file mode 100644 index 8d027a3480d..00000000000 Binary files a/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.dat and /dev/null differ diff --git a/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.dir b/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.dir deleted file mode 100644 index f650abfb485..00000000000 --- a/src/promptflow/tests/test_configs/node_recordings/node_cache.shelve.dir +++ /dev/null @@ -1,70 +0,0 @@ -'b9bcb73bbe85960e4f492c6b60fd2584de421f91', (0, 325) -'71d8e363eeac4e3334679f505225acd75ef5607b', (512, 414) -'0304f9ccf7ab8521173b43b526b26412208148b1', (1024, 509) -'ba311ed9f1668eddef69a4395363f18a0cfa4c93', (1536, 1999) -'eea8e9626a2ad3706637b8c470691f2a73917e0c', (3584, 531) -'443af205da3a77283a66ad8a732dfa8011277fea', (241664, 3297) -'70f4fea54805e642e98208d6704425432e00d46d', (7168, 3051) -'7b1682aa00779120720cca4dcda260ac1a85f321', (10240, 4390) -'4c5e8947686d0343cb3973a6facfb7f09c0fd7da', (14848, 4423) -'6f6de81c5e6b03f94350942c15269c35df1a9a1a', (19456, 5534) -'9e88483455fe1fb12e1320051e75859c1262436c', (25088, 4985) -'00b750ca7baf0a10c32a6b43f8b485d6ebb1c7a8', (30208, 5989) -'ead9751f11bc2db068f915f8cd6a798e5d417ee1', (36352, 2224) -'79b019d7c272dbdfc8264e8e42b2c88d7aa7c951', (38912, 2189) -'90e7b637f88d5ff8a781be0ca4c1682885c17e4a', (41472, 522) -'029f34531afb09812d41896dda6761ff0584f5e6', (42496, 1844) -'7f982806de9ef2a389ca5838d2d667fd4521d16f', (44544, 2273) -'30981d4593443ec89b06980ffb0d3bf9d6be5a71', (47104, 4509) -'e6bf5b88c4e7038d787b98bd231e8f8dee6f4f8f', (51712, 4322) -'f8b0492c08bbc03f4357fc71b0fe157cee7be8ee', (56320, 4620) -'1b8b6de280cc7f431ba77ad0f51e113055c3db32', (61440, 1986) -'a3273c3e6d4e0ec25968bb223e962ed33f482cdc', (63488, 518) -'e3922dafc105db482d08f91cff6034364235b78d', (64512, 4889) -'d8648fa6810522856487f6a796979990122cc55a', (69632, 4972) -'aadb0707e9a62b00df9d0d3fecb709ece90a8b67', (74752, 2261) -'177466a3662dea3aff35979fadea8f5c61e022c0', (125440, 4440) -'922a9871fcc709f08716edb8657b05b59786e92f', (93184, 4761) -'9ccfc240a61a0da1c6f063060190ebcb680b5514', (98304, 5628) -'23e8ff65189afc6837718250210e2b61022a9ca1', (103936, 4803) -'fe6a70524262be6b62d15dd7a5f935a0b4d823ea', (109056, 5698) -'b907c4c2ac2fcbde1dfe7d150923f03b4795ed4f', (115200, 4899) -'6e0ae8caa23ee169eb3c14aa13370a686b574819', (120320, 4737) -'6cad16355c4e541c6639770217ca6b94361720d5', (131072, 5643) -'b6b4b6762e05f7fea466b890189b306422ab3fbc', (137216, 46679) -'fa9d17f9390125ded524b1fc1c370f4ef5f34319', (184320, 4812) -'2c2c8e9b4662215a00c7119e987a6b0049829e2b', (189440, 503) -'6f58a5915089ae8f209ae96e3c3cb0ce3e6fb96c', (189952, 2353) -'f56d5514d99ebe339704d813fff58eb2f64e0ff1', (192512, 4143) -'5c89863ea5416b9056f7af7b702059fa1d37827f', (197120, 4144) -'05b0c4092bd0a64d6f30e4a3b42ab4053598d307', (201728, 1995) -'a2df0b2cd19b719ea21d216c2b8a13d7e4ed9203', (203776, 527) -'1e546f4637a42160e26f08f9c68b8f72c4b836bf', (204800, 2707) -'effe6533cbd9056f3a45712d9ad324b892bfed6a', (207872, 4762) -'c8fcd047770466d76018d8b9656c18b7a87a9dcf', (212992, 2255) -'0ad069199b869f02d23f0f5e3ad781c57b3afe27', (215552, 3954) -'f3b2fdfc3429018bbbef0dccaf4616605671b61b', (219648, 4372) -'70b674bf6702b200e03e3c9b6c49b6513c7eb5bf', (224256, 4370) -'7f5248f04d24d49778e80146e5b87f918f41f744', (228864, 4372) -'fa531c24341e01ea50402a237340baec65033746', (344576, 3147) -'440fa7fdb7289a958a6bad20052cf81bfbb9e150', (236544, 4969) -'fb60e625b19277eeda7d3175f2bd106846a0829f', (245248, 5325) -'d3dc625076f3916b91506e909bfe190bbc01cd73', (250880, 4829) -'bbd373563d35f7ad055135a1a0265d92e153e1dd', (256000, 2242) -'823f74a631fada9a31c09e15f4a7566104b70c43', (258560, 4144) -'23d2b814006b39a4f7992fc76f45663a05161613', (263168, 4596) -'10412ef15a46d3f937780619b4103316cc2e4c84', (267776, 1819) -'f0218a466bb8dba6b2e6ad27670c8538f5dd4d98', (269824, 279) -'0e2cdc51dc23e28f2c4aa8d4a64df1bc1738460c', (270336, 2297) -'9bc1fe3f9122533d6f301abc4470c1f712e29315', (272896, 2392) -'d6b2c501a077be1a7c39d866a4e5e62cebb2fdce', (275456, 56861) -'a20cbeb4142790ca04301e42386584e961c52487', (332800, 7798) -'8cf128af83ea2aaf4a09890690ab16f3bb347bb3', (340992, 309) -'343332ff6b96d3b1baac23c4e8394a6a965f84b1', (341504, 327) -'0c30184347fb989cca6598e3d2263494a649a2ab', (342016, 2316) -'24ada46c87d46cae0dc053e55e1b39833f53e977', (348160, 5161) -'fa3fc224081b85079fc21890b809c93b06ee892d', (353792, 4412) -'278500fd49f73d54f6a87bb1438e346e7d0fd47e', (358400, 4571) -'29a5d2b7c12f08dacef89c111f6fe53833bc2223', (363008, 4537) -'3441389fe22e5392774230817f328e3ec3a30f72', (367616, 4568) -'d991435bfd4971dfb1f0fdefd5f534bcc73e74ff', (372224, 5087) diff --git a/src/promptflow/tests/test_configs/notebooks/dummy.ipynb b/src/promptflow/tests/test_configs/notebooks/dummy.ipynb index 3a05c0bdfdd..35adbd9c479 100644 --- a/src/promptflow/tests/test_configs/notebooks/dummy.ipynb +++ b/src/promptflow/tests/test_configs/notebooks/dummy.ipynb @@ -89,12 +89,12 @@ "outputs": [], "source": [ "# Load sync flow as an async function\n", - "from promptflow import load_flow\n", - "f_async = load_flow(\"../flows/print_env_var\", is_async_call=True)\n", + "from promptflow.core import AsyncFlow, Flow\n", + "f_async = AsyncFlow.load(\"../flows/print_env_var\")\n", "output = await f_async(key=\"PATH\")\n", "\n", "# Load sync flow as a sync function\n", - "f_sync = load_flow(\"../flows/print_env_var\")\n", + "f_sync = Flow.load(\"../flows/print_env_var\")\n", "output = f_sync(key=\"PATH\")" ] } diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_download_run.yaml b/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_download_run.yaml deleted file mode 100644 index 2a2bfb0fa23..00000000000 --- a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_download_run.yaml +++ /dev/null @@ -1,2788 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 - response: - body: - string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000", - "name": "00000", "type": "Microsoft.MachineLearningServices/workspaces", "location": - "eastus", "tags": {}, "etag": null, "kind": "Default", "sku": {"name": "Basic", - "tier": "Basic"}, "properties": {"discoveryUrl": "https://eastus.api.azureml.ms/discovery"}}' - headers: - cache-control: - - no-cache - content-length: - - '3630' - content-type: - - application/json; charset=utf-8 - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.027' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores?count=30&isDefault=true&orderByAsc=false - response: - body: - string: '{"value": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", - "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", - "properties": {"description": null, "tags": null, "properties": null, "isDefault": - true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": - null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": - "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", - "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": - "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, - "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": - "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": - "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", - "lastModifiedByType": "Application"}}]}' - headers: - cache-control: - - no-cache - content-length: - - '1372' - content-type: - - application/json; charset=utf-8 - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.108' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore - response: - body: - string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", - "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", - "properties": {"description": null, "tags": null, "properties": null, "isDefault": - true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": - null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": - "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", - "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": - "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, - "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": - "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": - "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", - "lastModifiedByType": "Application"}}' - headers: - cache-control: - - no-cache - content-length: - - '1227' - content-type: - - application/json; charset=utf-8 - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.071' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets - response: - body: - string: '{"secretsType": "AccountKey", "key": "dGhpcyBpcyBmYWtlIGtleQ=="}' - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.179' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:10:24 GMT - x-ms-version: - - '2023-11-03' - method: HEAD - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/LocalUpload/000000000000000000000000000000000000/webClassification3.jsonl - response: - body: - string: '' - headers: - accept-ranges: - - bytes - content-length: - - '379' - content-md5: - - lI/pz9jzTQ7Td3RHPL7y7w== - content-type: - - application/octet-stream - last-modified: - - Mon, 06 Nov 2023 08:30:18 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-type: - - BlockBlob - x-ms-creation-time: - - Mon, 06 Nov 2023 08:30:18 GMT - x-ms-meta-name: - - 94331215-cf7f-452a-9f1a-1d276bc9b0e4 - x-ms-meta-upload_status: - - completed - x-ms-meta-version: - - 3f163752-edb0-4afc-a6f5-b0a670bd7c24 - x-ms-version: - - '2023-11-03' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:10:26 GMT - x-ms-version: - - '2023-11-03' - method: HEAD - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/az-ml-artifacts/000000000000000000000000000000000000/webClassification3.jsonl - response: - body: - string: '' - headers: - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: - - chunked - vary: - - Origin - x-ms-error-code: - - BlobNotFound - x-ms-version: - - '2023-11-03' - status: - code: 404 - message: The specified blob does not exist. -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore - response: - body: - string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", - "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", - "properties": {"description": null, "tags": null, "properties": null, "isDefault": - true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": - null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": - "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", - "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": - "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, - "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": - "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": - "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", - "lastModifiedByType": "Application"}}' - headers: - cache-control: - - no-cache - content-length: - - '1227' - content-type: - - application/json; charset=utf-8 - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.067' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore/listSecrets - response: - body: - string: '{"secretsType": "AccountKey", "key": "dGhpcyBpcyBmYWtlIGtleQ=="}' - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.099' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:10:29 GMT - x-ms-version: - - '2023-11-03' - method: HEAD - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/LocalUpload/000000000000000000000000000000000000/hello-world/flow.dag.yaml - response: - body: - string: '' - headers: - accept-ranges: - - bytes - content-length: - - '266' - content-md5: - - UZm3TyOoKWjSR23+Up6qUA== - content-type: - - application/octet-stream - last-modified: - - Tue, 19 Dec 2023 06:05:25 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-type: - - BlockBlob - x-ms-creation-time: - - Tue, 19 Dec 2023 06:05:25 GMT - x-ms-meta-name: - - 7b68bf5e-6ef4-4eb3-9f49-28f9a5baad87 - x-ms-meta-upload_status: - - completed - x-ms-meta-version: - - '1' - x-ms-version: - - '2023-11-03' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/xml - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:10:30 GMT - x-ms-version: - - '2023-11-03' - method: HEAD - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/az-ml-artifacts/000000000000000000000000000000000000/hello-world/flow.dag.yaml - response: - body: - string: '' - headers: - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: - - chunked - vary: - - Origin - x-ms-error-code: - - BlobNotFound - x-ms-version: - - '2023-11-03' - status: - code: 404 - message: The specified blob does not exist. -- request: - body: '{"flowDefinitionDataStoreName": "workspaceblobstore", "flowDefinitionBlobPath": - "LocalUpload/000000000000000000000000000000000000/hello-world/flow.dag.yaml", - "runId": "batch_run_name", "runDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", - "runExperimentName": "", "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/000000000000000000000000000000000000/webClassification3.jsonl"}, - "inputsMapping": {"name": "${data.url}"}, "connections": {}, "environmentVariables": - {}, "runtimeName": "fake-runtime-name", "sessionId": "000000000000000000000000000000000000000000000000", - "sessionSetupMode": "SystemWait", "flowLineageId": "0000000000000000000000000000000000000000000000000000000000000000", - "runDisplayNameGenerationType": "UserProvidedMacro"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '812' - Content-Type: - - application/json - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: POST - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/submit - response: - body: - string: '"batch_run_name"' - headers: - connection: - - keep-alive - content-length: - - '38' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - x-content-type-options: - - nosniff - x-request-time: - - '6.897' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name - response: - body: - string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", - "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, - "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Content Safety - (Text Analyze)", "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", - "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "violence_category": {"type": ["string"], - "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", - "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Use Azure Content Safety to detect - harmful content.", "module": "promptflow.tools.azure_content_safety", "function": - "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": - "0.0.216", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], - "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": - {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "deployment_name": - {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], - "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], - "capabilities": {"completion": false, "chat_completion": false, "embeddings": - true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", - "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", - "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Open AI''s embedding - model to create an embedding vector representing the input text.", "module": - "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, - "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Open Source LLM", "type": "custom_llm", - "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CustomConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "deployment_name": {"type": ["string"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "endpoint_name": - {"type": ["string"], "default": "-- please enter an endpoint name --", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_new_tokens": - {"type": ["int"], "default": 500, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model_kwargs": {"type": ["object"], "default": - "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default", "advanced": true}, "temperature": {"type": ["double"], "default": - 1.0, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "top_p": {"type": ["double"], "default": 1.0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default", "advanced": true}}, - "description": "Use an Open Source model from the Azure Model catalog, deployed - to an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": - "promptflow.tools.open_source_llm", "class_name": "OpenSourceLLM", "function": - "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", - "is_builtin": true, "package": "promptflow-tools", "package_version": "0.0.216", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", - "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "frequency_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_tokens": {"type": - ["int"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], - "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}, - "presence_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "stop": {"type": - ["list"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "temperature": {"type": ["double"], "default": 1, - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use OpenAI GPT-4V to leverage - vision ability.", "module": "promptflow.tools.openai_gpt4v", "class_name": - "OpenAI", "function": "chat", "is_builtin": true, "package": "promptflow-tools", - "package_version": "0.0.216", "default_prompt": "# system:\nAs an AI assistant, - your task involves interpreting images and responding to questions about the - image.\nRemember to provide accurate answers based on the information present - in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "Serp API", "type": - "python", "inputs": {"connection": {"type": ["SerpConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "engine": {"type": - ["string"], "default": "google", "enum": ["google", "bing"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "location": {"type": - ["string"], "default": "", "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "num": {"type": ["int"], "default": "10", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "query": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "safe": {"type": ["string"], "default": "off", - "enum": ["active", "off"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Serp API to obtain search - results from a specific search engine.", "module": "promptflow.tools.serpapi", - "class_name": "SerpAPI", "function": "search", "is_builtin": true, "package": - "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": false, - "tool_state": "stable"}, {"name": "Faiss Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "vector": {"type": ["list"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Search vector based query - from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", - "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector DB Lookup", "type": "python", - "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": - ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": - ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}, "search_params": {"type": - ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", - "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", - "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": - ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}}, "description": "Search - vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", - "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "query": {"type": ["object"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": - ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Search text or vector based query - from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", - "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "hello_world.py", "type": "python", - "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "source": "hello_world.py", "function": - "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": - "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": - false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", - "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": - "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", - "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", - "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "test-runtime-ci", - "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", - "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb", - "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '12912' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.237' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name - response: - body: - string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", - "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, - "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Content Safety - (Text Analyze)", "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", - "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "violence_category": {"type": ["string"], - "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", - "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Use Azure Content Safety to detect - harmful content.", "module": "promptflow.tools.azure_content_safety", "function": - "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": - "0.0.216", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], - "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": - {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "deployment_name": - {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], - "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], - "capabilities": {"completion": false, "chat_completion": false, "embeddings": - true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", - "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", - "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Open AI''s embedding - model to create an embedding vector representing the input text.", "module": - "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, - "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Open Source LLM", "type": "custom_llm", - "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CustomConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "deployment_name": {"type": ["string"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "endpoint_name": - {"type": ["string"], "default": "-- please enter an endpoint name --", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_new_tokens": - {"type": ["int"], "default": 500, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model_kwargs": {"type": ["object"], "default": - "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default", "advanced": true}, "temperature": {"type": ["double"], "default": - 1.0, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "top_p": {"type": ["double"], "default": 1.0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default", "advanced": true}}, - "description": "Use an Open Source model from the Azure Model catalog, deployed - to an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": - "promptflow.tools.open_source_llm", "class_name": "OpenSourceLLM", "function": - "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", - "is_builtin": true, "package": "promptflow-tools", "package_version": "0.0.216", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", - "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "frequency_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_tokens": {"type": - ["int"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], - "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}, - "presence_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "stop": {"type": - ["list"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "temperature": {"type": ["double"], "default": 1, - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use OpenAI GPT-4V to leverage - vision ability.", "module": "promptflow.tools.openai_gpt4v", "class_name": - "OpenAI", "function": "chat", "is_builtin": true, "package": "promptflow-tools", - "package_version": "0.0.216", "default_prompt": "# system:\nAs an AI assistant, - your task involves interpreting images and responding to questions about the - image.\nRemember to provide accurate answers based on the information present - in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "Serp API", "type": - "python", "inputs": {"connection": {"type": ["SerpConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "engine": {"type": - ["string"], "default": "google", "enum": ["google", "bing"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "location": {"type": - ["string"], "default": "", "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "num": {"type": ["int"], "default": "10", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "query": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "safe": {"type": ["string"], "default": "off", - "enum": ["active", "off"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Serp API to obtain search - results from a specific search engine.", "module": "promptflow.tools.serpapi", - "class_name": "SerpAPI", "function": "search", "is_builtin": true, "package": - "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": false, - "tool_state": "stable"}, {"name": "Faiss Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "vector": {"type": ["list"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Search vector based query - from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", - "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector DB Lookup", "type": "python", - "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": - ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": - ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}, "search_params": {"type": - ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", - "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", - "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": - ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}}, "description": "Search - vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", - "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "query": {"type": ["object"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": - ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Search text or vector based query - from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", - "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "hello_world.py", "type": "python", - "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "source": "hello_world.py", "function": - "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": - "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": - false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", - "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": - "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", - "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", - "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "test-runtime-ci", - "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", - "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb", - "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '12912' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.354' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name - response: - body: - string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", - "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, - "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Content Safety - (Text Analyze)", "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", - "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "violence_category": {"type": ["string"], - "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", - "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Use Azure Content Safety to detect - harmful content.", "module": "promptflow.tools.azure_content_safety", "function": - "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": - "0.0.216", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], - "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": - {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "deployment_name": - {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], - "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], - "capabilities": {"completion": false, "chat_completion": false, "embeddings": - true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", - "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", - "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Open AI''s embedding - model to create an embedding vector representing the input text.", "module": - "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, - "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Open Source LLM", "type": "custom_llm", - "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CustomConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "deployment_name": {"type": ["string"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "endpoint_name": - {"type": ["string"], "default": "-- please enter an endpoint name --", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_new_tokens": - {"type": ["int"], "default": 500, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model_kwargs": {"type": ["object"], "default": - "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default", "advanced": true}, "temperature": {"type": ["double"], "default": - 1.0, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "top_p": {"type": ["double"], "default": 1.0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default", "advanced": true}}, - "description": "Use an Open Source model from the Azure Model catalog, deployed - to an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": - "promptflow.tools.open_source_llm", "class_name": "OpenSourceLLM", "function": - "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", - "is_builtin": true, "package": "promptflow-tools", "package_version": "0.0.216", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", - "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "frequency_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_tokens": {"type": - ["int"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], - "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}, - "presence_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "stop": {"type": - ["list"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "temperature": {"type": ["double"], "default": 1, - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use OpenAI GPT-4V to leverage - vision ability.", "module": "promptflow.tools.openai_gpt4v", "class_name": - "OpenAI", "function": "chat", "is_builtin": true, "package": "promptflow-tools", - "package_version": "0.0.216", "default_prompt": "# system:\nAs an AI assistant, - your task involves interpreting images and responding to questions about the - image.\nRemember to provide accurate answers based on the information present - in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "Serp API", "type": - "python", "inputs": {"connection": {"type": ["SerpConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "engine": {"type": - ["string"], "default": "google", "enum": ["google", "bing"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "location": {"type": - ["string"], "default": "", "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "num": {"type": ["int"], "default": "10", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "query": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "safe": {"type": ["string"], "default": "off", - "enum": ["active", "off"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Serp API to obtain search - results from a specific search engine.", "module": "promptflow.tools.serpapi", - "class_name": "SerpAPI", "function": "search", "is_builtin": true, "package": - "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": false, - "tool_state": "stable"}, {"name": "Faiss Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "vector": {"type": ["list"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Search vector based query - from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", - "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector DB Lookup", "type": "python", - "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": - ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": - ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}, "search_params": {"type": - ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", - "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", - "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": - ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}}, "description": "Search - vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", - "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "query": {"type": ["object"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": - ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Search text or vector based query - from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", - "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "hello_world.py", "type": "python", - "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "source": "hello_world.py", "function": - "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": - "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": - false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", - "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": - "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", - "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", - "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "test-runtime-ci", - "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", - "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb", - "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '12912' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.341' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name - response: - body: - string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", - "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, - "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Content Safety - (Text Analyze)", "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", - "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "violence_category": {"type": ["string"], - "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", - "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Use Azure Content Safety to detect - harmful content.", "module": "promptflow.tools.azure_content_safety", "function": - "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": - "0.0.216", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], - "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": - {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "deployment_name": - {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], - "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], - "capabilities": {"completion": false, "chat_completion": false, "embeddings": - true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", - "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", - "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Open AI''s embedding - model to create an embedding vector representing the input text.", "module": - "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, - "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Open Source LLM", "type": "custom_llm", - "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CustomConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "deployment_name": {"type": ["string"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "endpoint_name": - {"type": ["string"], "default": "-- please enter an endpoint name --", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_new_tokens": - {"type": ["int"], "default": 500, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model_kwargs": {"type": ["object"], "default": - "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default", "advanced": true}, "temperature": {"type": ["double"], "default": - 1.0, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "top_p": {"type": ["double"], "default": 1.0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default", "advanced": true}}, - "description": "Use an Open Source model from the Azure Model catalog, deployed - to an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": - "promptflow.tools.open_source_llm", "class_name": "OpenSourceLLM", "function": - "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", - "is_builtin": true, "package": "promptflow-tools", "package_version": "0.0.216", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", - "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "frequency_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_tokens": {"type": - ["int"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], - "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}, - "presence_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "stop": {"type": - ["list"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "temperature": {"type": ["double"], "default": 1, - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use OpenAI GPT-4V to leverage - vision ability.", "module": "promptflow.tools.openai_gpt4v", "class_name": - "OpenAI", "function": "chat", "is_builtin": true, "package": "promptflow-tools", - "package_version": "0.0.216", "default_prompt": "# system:\nAs an AI assistant, - your task involves interpreting images and responding to questions about the - image.\nRemember to provide accurate answers based on the information present - in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "Serp API", "type": - "python", "inputs": {"connection": {"type": ["SerpConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "engine": {"type": - ["string"], "default": "google", "enum": ["google", "bing"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "location": {"type": - ["string"], "default": "", "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "num": {"type": ["int"], "default": "10", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "query": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "safe": {"type": ["string"], "default": "off", - "enum": ["active", "off"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Serp API to obtain search - results from a specific search engine.", "module": "promptflow.tools.serpapi", - "class_name": "SerpAPI", "function": "search", "is_builtin": true, "package": - "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": false, - "tool_state": "stable"}, {"name": "Faiss Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "vector": {"type": ["list"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Search vector based query - from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", - "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector DB Lookup", "type": "python", - "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": - ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": - ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}, "search_params": {"type": - ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", - "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", - "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": - ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}}, "description": "Search - vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", - "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "query": {"type": ["object"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": - ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Search text or vector based query - from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", - "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "hello_world.py", "type": "python", - "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "source": "hello_world.py", "function": - "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": - "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": - false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", - "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": - "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", - "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", - "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "test-runtime-ci", - "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", - "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb", - "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '12912' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.210' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name - response: - body: - string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", - "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, - "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Content Safety - (Text Analyze)", "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", - "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "violence_category": {"type": ["string"], - "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", - "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Use Azure Content Safety to detect - harmful content.", "module": "promptflow.tools.azure_content_safety", "function": - "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": - "0.0.216", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], - "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": - {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "deployment_name": - {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], - "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], - "capabilities": {"completion": false, "chat_completion": false, "embeddings": - true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", - "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", - "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Open AI''s embedding - model to create an embedding vector representing the input text.", "module": - "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, - "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Open Source LLM", "type": "custom_llm", - "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CustomConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "deployment_name": {"type": ["string"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "endpoint_name": - {"type": ["string"], "default": "-- please enter an endpoint name --", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_new_tokens": - {"type": ["int"], "default": 500, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model_kwargs": {"type": ["object"], "default": - "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default", "advanced": true}, "temperature": {"type": ["double"], "default": - 1.0, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "top_p": {"type": ["double"], "default": 1.0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default", "advanced": true}}, - "description": "Use an Open Source model from the Azure Model catalog, deployed - to an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": - "promptflow.tools.open_source_llm", "class_name": "OpenSourceLLM", "function": - "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", - "is_builtin": true, "package": "promptflow-tools", "package_version": "0.0.216", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", - "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "frequency_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_tokens": {"type": - ["int"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], - "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}, - "presence_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "stop": {"type": - ["list"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "temperature": {"type": ["double"], "default": 1, - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use OpenAI GPT-4V to leverage - vision ability.", "module": "promptflow.tools.openai_gpt4v", "class_name": - "OpenAI", "function": "chat", "is_builtin": true, "package": "promptflow-tools", - "package_version": "0.0.216", "default_prompt": "# system:\nAs an AI assistant, - your task involves interpreting images and responding to questions about the - image.\nRemember to provide accurate answers based on the information present - in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "Serp API", "type": - "python", "inputs": {"connection": {"type": ["SerpConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "engine": {"type": - ["string"], "default": "google", "enum": ["google", "bing"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "location": {"type": - ["string"], "default": "", "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "num": {"type": ["int"], "default": "10", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "query": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "safe": {"type": ["string"], "default": "off", - "enum": ["active", "off"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Serp API to obtain search - results from a specific search engine.", "module": "promptflow.tools.serpapi", - "class_name": "SerpAPI", "function": "search", "is_builtin": true, "package": - "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": false, - "tool_state": "stable"}, {"name": "Faiss Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "vector": {"type": ["list"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Search vector based query - from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", - "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector DB Lookup", "type": "python", - "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": - ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": - ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}, "search_params": {"type": - ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", - "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", - "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": - ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}}, "description": "Search - vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", - "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "query": {"type": ["object"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": - ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Search text or vector based query - from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", - "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "hello_world.py", "type": "python", - "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "source": "hello_world.py", "function": - "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": - "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": - false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", - "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": - "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", - "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", - "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "test-runtime-ci", - "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", - "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb", - "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '12912' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.312' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name - response: - body: - string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", - "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, - "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Content Safety - (Text Analyze)", "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", - "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "violence_category": {"type": ["string"], - "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", - "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Use Azure Content Safety to detect - harmful content.", "module": "promptflow.tools.azure_content_safety", "function": - "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": - "0.0.216", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], - "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": - {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "deployment_name": - {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], - "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], - "capabilities": {"completion": false, "chat_completion": false, "embeddings": - true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", - "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", - "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Open AI''s embedding - model to create an embedding vector representing the input text.", "module": - "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, - "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Open Source LLM", "type": "custom_llm", - "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CustomConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "deployment_name": {"type": ["string"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "endpoint_name": - {"type": ["string"], "default": "-- please enter an endpoint name --", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_new_tokens": - {"type": ["int"], "default": 500, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model_kwargs": {"type": ["object"], "default": - "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default", "advanced": true}, "temperature": {"type": ["double"], "default": - 1.0, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "top_p": {"type": ["double"], "default": 1.0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default", "advanced": true}}, - "description": "Use an Open Source model from the Azure Model catalog, deployed - to an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": - "promptflow.tools.open_source_llm", "class_name": "OpenSourceLLM", "function": - "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", - "is_builtin": true, "package": "promptflow-tools", "package_version": "0.0.216", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", - "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "frequency_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_tokens": {"type": - ["int"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], - "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}, - "presence_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "stop": {"type": - ["list"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "temperature": {"type": ["double"], "default": 1, - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use OpenAI GPT-4V to leverage - vision ability.", "module": "promptflow.tools.openai_gpt4v", "class_name": - "OpenAI", "function": "chat", "is_builtin": true, "package": "promptflow-tools", - "package_version": "0.0.216", "default_prompt": "# system:\nAs an AI assistant, - your task involves interpreting images and responding to questions about the - image.\nRemember to provide accurate answers based on the information present - in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "Serp API", "type": - "python", "inputs": {"connection": {"type": ["SerpConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "engine": {"type": - ["string"], "default": "google", "enum": ["google", "bing"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "location": {"type": - ["string"], "default": "", "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "num": {"type": ["int"], "default": "10", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "query": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "safe": {"type": ["string"], "default": "off", - "enum": ["active", "off"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Serp API to obtain search - results from a specific search engine.", "module": "promptflow.tools.serpapi", - "class_name": "SerpAPI", "function": "search", "is_builtin": true, "package": - "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": false, - "tool_state": "stable"}, {"name": "Faiss Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "vector": {"type": ["list"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Search vector based query - from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", - "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector DB Lookup", "type": "python", - "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": - ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": - ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}, "search_params": {"type": - ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", - "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", - "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": - ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}}, "description": "Search - vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", - "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "query": {"type": ["object"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": - ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Search text or vector based query - from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", - "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "hello_world.py", "type": "python", - "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "source": "hello_world.py", "function": - "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": - "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": - false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", - "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": - "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", - "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", - "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "test-runtime-ci", - "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", - "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb", - "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '12912' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.282' - status: - code: 200 - message: OK -- request: - body: '{}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2' - Content-Type: - - application/json - User-Agent: - - python-requests/2.31.0 - method: POST - uri: https://eastus.api.azureml.ms/metric/v2.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/runs/batch_run_name/lastvalues - response: - body: - string: '{"value": [{"dataContainerId": "dcid.batch_run_name", "name": "__pf__.nodes.hello_world.completed", - "columns": {"__pf__.nodes.hello_world.completed": "Double"}, "properties": - {"uxMetricType": "azureml.v1.scalar", "dataLocation": null}, "namespace": - null, "standardSchemaId": null, "value": [{"metricId": "92eb9fc0-0a90-4bbc-8eb9-450adfe1f519", - "createdUtc": "2024-01-12T08:10:54.937+00:00", "step": 0, "data": {"__pf__.nodes.hello_world.completed": - 3.0}}]}, {"dataContainerId": "dcid.batch_run_name", "name": "__pf__.lines.completed", - "columns": {"__pf__.lines.completed": "Double"}, "properties": {"uxMetricType": - "azureml.v1.scalar", "dataLocation": null}, "namespace": null, "standardSchemaId": - null, "value": [{"metricId": "ca4eb89a-6347-481b-b055-91d58b273e50", "createdUtc": - "2024-01-12T08:10:55.288+00:00", "step": 0, "data": {"__pf__.lines.completed": - 3.0}}]}, {"dataContainerId": "dcid.batch_run_name", "name": "__pf__.lines.failed", - "columns": {"__pf__.lines.failed": "Double"}, "properties": {"uxMetricType": - "azureml.v1.scalar", "dataLocation": null}, "namespace": null, "standardSchemaId": - null, "value": [{"metricId": "1d4bbc09-1eff-4be2-b11b-1d5b7da937ce", "createdUtc": - "2024-01-12T08:10:55.754+00:00", "step": 0, "data": {"__pf__.lines.failed": - 0.0}}]}]}' - headers: - connection: - - keep-alive - content-length: - - '1891' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.071' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name - response: - body: - string: '{"flowGraph": {"nodes": [{"name": "hello_world", "type": "python", - "source": {"type": "code", "path": "hello_world.py"}, "inputs": {"name": "${inputs.name}"}, - "tool": "hello_world.py", "reduce": false}], "tools": [{"name": "Content Safety - (Text Analyze)", "type": "python", "inputs": {"connection": {"type": ["AzureContentSafetyConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "hate_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "self_harm_category": {"type": ["string"], "default": "medium_sensitivity", - "enum": ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "sexual_category": {"type": ["string"], "default": "medium_sensitivity", "enum": - ["disable", "low_sensitivity", "medium_sensitivity", "high_sensitivity"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "text": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "violence_category": {"type": ["string"], - "default": "medium_sensitivity", "enum": ["disable", "low_sensitivity", "medium_sensitivity", - "high_sensitivity"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Use Azure Content Safety to detect - harmful content.", "module": "promptflow.tools.azure_content_safety", "function": - "analyze_text", "is_builtin": true, "package": "promptflow-tools", "package_version": - "0.0.216", "enable_kwargs": false, "deprecated_tools": ["content_safety_text.tools.content_safety_text_tool.analyze_text"], - "tool_state": "stable"}, {"name": "Embedding", "type": "python", "inputs": - {"connection": {"type": ["AzureOpenAIConnection", "OpenAIConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "deployment_name": - {"type": ["string"], "enabled_by": "connection", "enabled_by_type": ["AzureOpenAIConnection"], - "model_list": ["text-embedding-ada-002", "text-search-ada-doc-001", "text-search-ada-query-001"], - "capabilities": {"completion": false, "chat_completion": false, "embeddings": - true}, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "input": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model": {"type": ["string"], "enum": ["text-embedding-ada-002", - "text-search-ada-doc-001", "text-search-ada-query-001"], "enabled_by": "connection", - "enabled_by_type": ["OpenAIConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Open AI''s embedding - model to create an embedding vector representing the input text.", "module": - "promptflow.tools.embedding", "function": "embedding", "is_builtin": true, - "package": "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Open Source LLM", "type": "custom_llm", - "inputs": {"api": {"type": ["string"], "enum": ["chat", "completion"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CustomConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "deployment_name": {"type": ["string"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "endpoint_name": - {"type": ["string"], "default": "-- please enter an endpoint name --", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_new_tokens": - {"type": ["int"], "default": 500, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "model_kwargs": {"type": ["object"], "default": - "{}", "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default", "advanced": true}, "temperature": {"type": ["double"], "default": - 1.0, "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "top_p": {"type": ["double"], "default": 1.0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default", "advanced": true}}, - "description": "Use an Open Source model from the Azure Model catalog, deployed - to an AzureML Online Endpoint for LLM Chat or Completion API calls.", "module": - "promptflow.tools.open_source_llm", "class_name": "OpenSourceLLM", "function": - "call", "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACgElEQVR4nGWSz2vcVRTFP/e9NzOZ1KDGohASslLEH6VLV0ak4l/QpeDCrfQPcNGliODKnVm4EBdBsIjQIlhciKW0ycKFVCSNbYnjdDLtmPnmO/nO9917XcxMkjYX3uLx7nnn3HOuMK2Nix4fP78ZdrYXVkLVWjf3l3B1B+HpcjzGFtmqa6cePz7/x0dnn1n5qhj3iBJPYREIURAJuCtpY8PjReDbrf9WG7H1fuefwQU9qKztTcMJT+PNnEFvjGVDBDlSsH6p/9MLzy6+NxwVqI8RAg4IPmWedMckdLYP6O6UpIaQfvyyXG012+e79/ZfHukoS1ISMT2hGTB1RkUmNgQ5QZ0w+a2VWDq73MbdEWmfnnv6UWe7oNzPaLapl5CwuLTXK9WUGBuCjqekzhP+z52ZXOrKMD3OJg0Hh778aiOuvpnYvp05d6GJO4iAO4QAe/eV36/X5LFRV4Zmn+AdkqlL8Vjp3oVioOz+WTPzzYEgsN+fgPLYyJVheSbPPVl2ikeGZRjtG52/8rHuaV9VOlpP2OtKyVndcRVCSqOhsvxa4vW359i6OuKdD+aP8Q4SYPdOzS/flGjt1JUSaMqZ5nwa1Y8qWb/Ud/eZZkHisYezEM0m+fcelDr8F1SqW2LNK6r1jXQwyLzy1hxvrLXZulry7ocL+FS6G4QIu3fG/Px1gdYeW7LIgXU2P/115TOA5G7e3Rmj2aS/m7l5pThiZzrCcE/d1XHzbln373nw7y6veeoUm5KCNKT/IPPwbiY1hYd/l5MIT65BMFt87sU4v9D7/JMflr44uV6hGh1+L4RCkg6z5iK2tAhNLeLsNGwYA4fDYnC/drvuuFxe86NV/x+Ut27g0FvykgAAAABJRU5ErkJggg==", - "is_builtin": true, "package": "promptflow-tools", "package_version": "0.0.216", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "OpenAI GPT-4V", - "type": "custom_llm", "inputs": {"connection": {"type": ["OpenAIConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "frequency_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "max_tokens": {"type": - ["int"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "model": {"type": ["string"], "enum": ["gpt-4-vision-preview"], - "allow_manual_entry": true, "is_multi_select": false, "input_type": "default"}, - "presence_penalty": {"type": ["double"], "default": 0, "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "stop": {"type": - ["list"], "default": "", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "temperature": {"type": ["double"], "default": 1, - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "top_p": {"type": ["double"], "default": 1, "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use OpenAI GPT-4V to leverage - vision ability.", "module": "promptflow.tools.openai_gpt4v", "class_name": - "OpenAI", "function": "chat", "is_builtin": true, "package": "promptflow-tools", - "package_version": "0.0.216", "default_prompt": "# system:\nAs an AI assistant, - your task involves interpreting images and responding to questions about the - image.\nRemember to provide accurate answers based on the information present - in the image.\n\n# user:\nCan you tell me what the image depicts?\n![image]({{image_input}})\n", - "enable_kwargs": false, "tool_state": "stable"}, {"name": "Serp API", "type": - "python", "inputs": {"connection": {"type": ["SerpConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "engine": {"type": - ["string"], "default": "google", "enum": ["google", "bing"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "location": {"type": - ["string"], "default": "", "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "num": {"type": ["int"], "default": "10", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "query": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "safe": {"type": ["string"], "default": "off", - "enum": ["active", "off"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Use Serp API to obtain search - results from a specific search engine.", "module": "promptflow.tools.serpapi", - "class_name": "SerpAPI", "function": "search", "is_builtin": true, "package": - "promptflow-tools", "package_version": "0.0.216", "enable_kwargs": false, - "tool_state": "stable"}, {"name": "Faiss Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "vector": {"type": ["list"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "description": "Search vector based query - from the FAISS index file.", "module": "promptflow_vectordb.tool.faiss_index_lookup", - "class_name": "FaissIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector DB Lookup", "type": "python", - "inputs": {"class_name": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "collection_name": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["QdrantConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "connection": {"type": - ["CognitiveSearchConnection", "QdrantConnection", "WeaviateConnection"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "index_name": {"type": - ["string"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection"], - "allow_manual_entry": false, "is_multi_select": false, "input_type": "default"}, - "search_filters": {"type": ["object"], "enabled_by": "connection", "enabled_by_type": - ["CognitiveSearchConnection", "QdrantConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}, "search_params": {"type": - ["object"], "enabled_by": "connection", "enabled_by_type": ["CognitiveSearchConnection", - "QdrantConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "text_field": {"type": ["string"], "enabled_by": - "connection", "enabled_by_type": ["CognitiveSearchConnection", "QdrantConnection", - "WeaviateConnection"], "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}, "top_k": {"type": ["int"], "default": "3", "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "vector": {"type": - ["list"], "allow_manual_entry": false, "is_multi_select": false, "input_type": - "default"}, "vector_field": {"type": ["string"], "enabled_by": "connection", - "enabled_by_type": ["CognitiveSearchConnection"], "allow_manual_entry": false, - "is_multi_select": false, "input_type": "default"}}, "description": "Search - vector based query from existing Vector Database.", "module": "promptflow_vectordb.tool.vector_db_lookup", - "class_name": "VectorDBLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "Vector Index Lookup", "type": "python", - "inputs": {"path": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}, "query": {"type": ["object"], "allow_manual_entry": - false, "is_multi_select": false, "input_type": "default"}, "top_k": {"type": - ["int"], "default": "3", "allow_manual_entry": false, "is_multi_select": false, - "input_type": "default"}}, "description": "Search text or vector based query - from AzureML Vector Index.", "module": "promptflow_vectordb.tool.vector_index_lookup", - "class_name": "VectorIndexLookup", "function": "search", "is_builtin": true, - "package": "promptflow-vectordb", "package_version": "0.0.1", "enable_kwargs": - false, "tool_state": "stable"}, {"name": "hello_world.py", "type": "python", - "inputs": {"name": {"type": ["string"], "allow_manual_entry": false, "is_multi_select": - false, "input_type": "default"}}, "source": "hello_world.py", "function": - "hello_world", "is_builtin": false, "enable_kwargs": false, "tool_state": - "stable"}], "inputs": {"name": {"type": "string", "default": "hod", "is_chat_input": - false}}, "outputs": {"result": {"type": "string", "reference": "${hello_world.output}", - "evaluation_only": false, "is_chat_output": false}}}, "flowRunResourceId": - "azureml://locations/eastus/workspaces/00000/flows/batch_run_name/flowRuns/batch_run_name", - "flowRunId": "batch_run_name", "flowRunDisplayName": "sdk-cli-test-fixture-batch-run-without-llm", - "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "test-runtime-ci", - "inputsMapping": {"name": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts", - "flowDagFileRelativePath": "flow.dag.yaml", "flowSnapshotId": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb", - "studioPortalEndpoint": "https://ml.azure.com/runs/batch_run_name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '12912' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.282' - status: - code: 200 - message: OK -- request: - body: '{"snapshotOrAssetId": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '61' - content-type: - - application/json - host: - - eastus.api.azureml.ms - user-agent: - - python-httpx/0.25.2 - method: POST - uri: https://eastus.api.azureml.ms/content/v2.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/snapshots/sas - response: - content: '{"name": "", "hash": null, "type": "Directory", "timestamp": "0001-01-01T00:00:00+00:00", - "sasUrl": null, "absoluteUrl": null, "sizeBytes": 0, "sizeSet": false, "children": - {"flow.dag.yaml": {"name": "flow.dag.yaml", "hash": "5199B74F23A82968D2476DFE529EAA50", - "type": "File", "timestamp": "0001-01-01T00:00:00+00:00", "sasUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/batch_run_name/flow.dag.yaml?sv=2019-07-07&sr=b&sig=XAEfHSf9iPDaX6S7OeeQzpvJQw%2B9OUEQu7xLv03shTU%3D&st=2024-01-12T08%3A01%3A35Z&se=2024-01-12T16%3A11%3A35Z&sp=r&rscd=filename%3Dflow.dag.yaml", - "absoluteUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/batch_run_name/flow.dag.yaml", - "sizeBytes": 266, "sizeSet": true, "children": {}}, "hello_world.py": {"name": - "hello_world.py", "hash": "F9B1E040145CBA4E286861114DCF2A7A", "type": "File", - "timestamp": "0001-01-01T00:00:00+00:00", "sasUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/batch_run_name/hello_world.py?sv=2019-07-07&sr=b&sig=9MDOTxuI383BaX%2FtV1kT3rs9LsBeFjxPce90PXBdJrc%3D&st=2024-01-12T08%3A01%3A35Z&se=2024-01-12T16%3A11%3A35Z&sp=r&rscd=filename%3Dhello_world.py", - "absoluteUrl": "https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/runs/batch_run_name/hello_world.py", - "sizeBytes": 111, "sizeSet": true, "children": {}}}}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.080' - http_version: HTTP/1.1 - status_code: 200 -- request: - body: '{"value": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1"}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '171' - content-type: - - application/json - host: - - eastus.api.azureml.ms - user-agent: - - python-httpx/0.25.2 - method: POST - uri: https://eastus.api.azureml.ms/data/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/dataversion/getByAssetId - response: - content: '{"dataVersion": {"assetId": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1", - "dataContainerName": "azureml_batch_run_name_output_data_debug_info", "dataType": - "UriFolder", "dataUri": "azureml://subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/workspaces/00000/datastores/workspaceblobstore/paths/promptflow/PromptFlowArtifacts/batch_run_name/", - "versionId": "1", "mutableProps": {"dataExpiryTime": null, "description": null, - "tags": null, "isArchived": false, "stage": "Logged", "autoDeleteSetting": null}, - "referencedDataUris": null, "properties": null, "initialAssetId": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1", - "isRegistered": false, "runId": "batch_run_name", "originAssetId": null}, "entityMetadata": - {"etag": "\"4f06df3c-0000-0100-0000-65a0f4100000\"", "createdTime": "2024-01-12T08:10:56.2930893+00:00", - "modifiedTime": "2024-01-12T08:10:56.304512+00:00", "createdBy": {"userObjectId": - "00000000-0000-0000-0000-000000000000", "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "18a66f5f-dbdf-4c17-9dd7-1634712a9cbe", - "upn": null}, "modifiedBy": null}, "legacyDatasetId": "0f5cc294-584d-4082-a8ed-da5a862ed2ac", - "isV2": true, "legacyDatasetType": null, "legacyDataflowType": null, "legacyDataflow": - null, "legacySavedDatasetId": null, "putAssetLROResponseDto": null}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.963' - http_version: HTTP/1.1 - status_code: 200 -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:35 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/runs/batch_run_name/flow.dag.yaml - response: - body: - string: "inputs:\r\n name:\r\n type: string\r\n default: hod\r\noutputs:\r\n - \ result:\r\n type: string\r\n reference: ${hello_world.output}\r\nnodes:\r\n- - name: hello_world\r\n type: python\r\n source:\r\n type: code\r\n path: - hello_world.py\r\n inputs:\r\n name: ${inputs.name}\r\n" - headers: - accept-ranges: - - bytes - content-length: - - '266' - content-range: - - bytes 0-265/266 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:38 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-content-md5: - - UZm3TyOoKWjSR23+Up6qUA== - x-ms-blob-type: - - BlockBlob - x-ms-copy-completion-time: - - Fri, 12 Jan 2024 08:10:38 GMT - x-ms-copy-id: - - 047f8a8a-91df-4fe7-819d-3daa4fdf3f91 - x-ms-copy-progress: - - 266/266 - x-ms-copy-source: - - https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/LocalUpload/36774154bc3ecde4aa21054b3052221f/hello-world/flow.dag.yaml - x-ms-copy-status: - - success - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:38 GMT - x-ms-meta-name: - - 7b68bf5e-6ef4-4eb3-9f49-28f9a5baad87 - x-ms-meta-upload_status: - - completed - x-ms-meta-version: - - '1' - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:37 GMT - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name?comp=list&prefix=promptflow%2FPromptFlowArtifacts%2Fbatch_run_name%2F&restype=container - response: - body: - string: "\uFEFFpromptflow/PromptFlowArtifacts/batch_run_name/promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts/000000000_000000024.jsonlFri, - 12 Jan 2024 08:10:53 GMTFri, 12 Jan 2024 08:10:53 - GMT0x8DC1345FF66A6054004application/octet-streamAppendBlobunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/flow_outputs/output.jsonlFri, - 12 Jan 2024 08:10:56 GMTFri, 12 Jan 2024 08:10:56 - GMT0x8DC134600EACDCB267application/octet-streamRhzWn41vAT8bekG2OuHirg==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/instance_results.jsonlFri, - 12 Jan 2024 08:10:53 GMTFri, 12 Jan 2024 08:10:53 - GMT0x8DC1345FF6B5BA6597application/octet-streamAppendBlobunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/meta.jsonFri, - 12 Jan 2024 08:10:52 GMTFri, 12 Jan 2024 08:10:52 - GMT0x8DC1345FE937ADE18application/octet-stream/u1NXUpgXMFDmZEw835qnw==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000000.jsonlFri, - 12 Jan 2024 08:10:53 GMTFri, 12 Jan 2024 08:10:53 - GMT0x8DC1345FF4D6E191198application/octet-streamDSgFq8oOaGajvyQtRsalPQ==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000001.jsonlFri, - 12 Jan 2024 08:10:53 GMTFri, 12 Jan 2024 08:10:53 - GMT0x8DC1345FF53CF8C1198application/octet-streamnK3XJ818HLYvfiuQPMZhqg==BlockBlobHottrueunlockedavailabletruepromptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000002.jsonlFri, - 12 Jan 2024 08:10:53 GMTFri, 12 Jan 2024 08:10:53 - GMT0x8DC1345FF62650D1197application/octet-streamuNDmrXkZIRdBycvMcJlF5w==BlockBlobHottrueunlockedavailabletrue" - headers: - content-type: - - application/xml - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - transfer-encoding: - - chunked - vary: - - Origin - x-ms-version: - - '2023-11-03' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:37 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/runs/batch_run_name/hello_world.py - response: - body: - string: "from promptflow import tool\r\n\r\n\r\n@tool\r\ndef hello_world(name: - str) -> str:\r\n return f\"Hello World {name}!\"\r\n" - headers: - accept-ranges: - - bytes - content-length: - - '111' - content-range: - - bytes 0-110/111 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:38 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-content-md5: - - +bHgQBRcuk4oaGERTc8qeg== - x-ms-blob-type: - - BlockBlob - x-ms-copy-completion-time: - - Fri, 12 Jan 2024 08:10:38 GMT - x-ms-copy-id: - - 7663b9c2-f799-4710-b23f-e5995c6563eb - x-ms-copy-progress: - - 111/111 - x-ms-copy-source: - - https://promptfloweast4063704120.blob.core.windows.net/azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5/LocalUpload/36774154bc3ecde4aa21054b3052221f/hello-world/hello_world.py - x-ms-copy-status: - - success - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:38 GMT - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:38 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/flow_outputs/output.jsonl - response: - body: - string: '{"line_number": 0, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} - - {"line_number": 1, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} - - {"line_number": 2, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} - - ' - headers: - accept-ranges: - - bytes - content-length: - - '267' - content-range: - - bytes 0-266/267 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:56 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-content-md5: - - RhzWn41vAT8bekG2OuHirg== - x-ms-blob-type: - - BlockBlob - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:56 GMT - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:38 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/flow_artifacts/000000000_000000024.jsonl - response: - body: - string: '{"line_number": 0, "run_info": {"run_id": "batch_run_name_0", "status": - "Completed", "error": null, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", - "line_number": 0}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "metrics": null, "request": null, "parent_run_id": "batch_run_name", "root_run_id": - "batch_run_name", "source_run_id": null, "flow_id": "default_flow_id", "start_time": - "2024-01-12T08:10:53.633044Z", "end_time": "2024-01-12T08:10:53.639618Z", - "index": 0, "api_calls": [{"name": "hello_world", "type": "Tool", "inputs": - {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, "output": "Hello - World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": 1705047053.63676, - "end_time": 1705047053.637577, "error": null, "children": null, "node_name": - "hello_world"}], "variant_id": "", "name": "", "description": "", "tags": - null, "system_metrics": {"duration": 0.006574, "prompt_tokens": 0, "completion_tokens": - 0, "total_tokens": 0}, "result": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "upload_metrics": false}, "start_time": "2024-01-12T08:10:53.633044", "end_time": - "2024-01-12T08:10:53.639618", "name": "", "description": "", "status": "Completed", - "tags": null} - - {"line_number": 1, "run_info": {"run_id": "batch_run_name_1", "status": "Completed", - "error": null, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", - "line_number": 1}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "metrics": null, "request": null, "parent_run_id": "batch_run_name", "root_run_id": - "batch_run_name", "source_run_id": null, "flow_id": "default_flow_id", "start_time": - "2024-01-12T08:10:53.645944Z", "end_time": "2024-01-12T08:10:53.653897Z", - "index": 1, "api_calls": [{"name": "hello_world", "type": "Tool", "inputs": - {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, "output": "Hello - World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": 1705047053.650148, - "end_time": 1705047053.65095, "error": null, "children": null, "node_name": - "hello_world"}], "variant_id": "", "name": "", "description": "", "tags": - null, "system_metrics": {"duration": 0.007953, "prompt_tokens": 0, "completion_tokens": - 0, "total_tokens": 0}, "result": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "upload_metrics": false}, "start_time": "2024-01-12T08:10:53.645944", "end_time": - "2024-01-12T08:10:53.653897", "name": "", "description": "", "status": "Completed", - "tags": null} - - {"line_number": 2, "run_info": {"run_id": "batch_run_name_2", "status": "Completed", - "error": null, "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", - "line_number": 2}, "output": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "metrics": null, "request": null, "parent_run_id": "batch_run_name", "root_run_id": - "batch_run_name", "source_run_id": null, "flow_id": "default_flow_id", "start_time": - "2024-01-12T08:10:53.765205Z", "end_time": "2024-01-12T08:10:53.771326Z", - "index": 2, "api_calls": [{"name": "hello_world", "type": "Tool", "inputs": - {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, "output": "Hello - World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": 1705047053.76852, - "end_time": 1705047053.76944, "error": null, "children": null, "node_name": - "hello_world"}], "variant_id": "", "name": "", "description": "", "tags": - null, "system_metrics": {"duration": 0.006121, "prompt_tokens": 0, "completion_tokens": - 0, "total_tokens": 0}, "result": {"result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "upload_metrics": false}, "start_time": "2024-01-12T08:10:53.765205", "end_time": - "2024-01-12T08:10:53.771326", "name": "", "description": "", "status": "Completed", - "tags": null} - - ' - headers: - accept-ranges: - - bytes - content-length: - - '4004' - content-range: - - bytes 0-4003/4004 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:53 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-committed-block-count: - - '3' - x-ms-blob-type: - - AppendBlob - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:53 GMT - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:38 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/meta.json - response: - body: - string: '{"batch_size": 25}' - headers: - accept-ranges: - - bytes - content-length: - - '18' - content-range: - - bytes 0-17/18 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:52 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-content-md5: - - /u1NXUpgXMFDmZEw835qnw== - x-ms-blob-type: - - BlockBlob - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:52 GMT - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:38 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/instance_results.jsonl - response: - body: - string: '{"line_number": 0, "status": "Completed", "inputs.name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", - "inputs.line_number": 0, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} - - {"line_number": 1, "status": "Completed", "inputs.name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", - "inputs.line_number": 1, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} - - {"line_number": 2, "status": "Completed", "inputs.name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g", - "inputs.line_number": 2, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"} - - ' - headers: - accept-ranges: - - bytes - content-length: - - '597' - content-range: - - bytes 0-596/597 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:53 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-committed-block-count: - - '3' - x-ms-blob-type: - - AppendBlob - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:53 GMT - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:38 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000002.jsonl - response: - body: - string: '{"node_name": "hello_world", "line_number": 2, "run_info": {"node": - "hello_world", "flow_run_id": "batch_run_name", "run_id": "batch_run_name_hello_world_2", - "status": "Completed", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, - "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "metrics": - null, "error": null, "parent_run_id": "batch_run_name_2", "start_time": "2024-01-12T08:10:53.767614Z", - "end_time": "2024-01-12T08:10:53.769841Z", "index": 2, "api_calls": [{"name": - "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, - "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": - 1705047053.76852, "end_time": 1705047053.76944, "error": null, "children": - null, "node_name": "hello_world"}], "variant_id": "", "cached_run_id": null, - "cached_flow_run_id": null, "logs": {"stdout": "", "stderr": ""}, "system_metrics": - {"duration": 0.002227}, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "start_time": "2024-01-12T08:10:53.767614", "end_time": "2024-01-12T08:10:53.769841", - "status": "Completed"}' - headers: - accept-ranges: - - bytes - content-length: - - '1197' - content-range: - - bytes 0-1196/1197 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:53 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-content-md5: - - uNDmrXkZIRdBycvMcJlF5w== - x-ms-blob-type: - - BlockBlob - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:53 GMT - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:38 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000001.jsonl - response: - body: - string: '{"node_name": "hello_world", "line_number": 1, "run_info": {"node": - "hello_world", "flow_run_id": "batch_run_name", "run_id": "batch_run_name_hello_world_1", - "status": "Completed", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, - "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "metrics": - null, "error": null, "parent_run_id": "batch_run_name_1", "start_time": "2024-01-12T08:10:53.648117Z", - "end_time": "2024-01-12T08:10:53.651426Z", "index": 1, "api_calls": [{"name": - "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, - "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": - 1705047053.650148, "end_time": 1705047053.65095, "error": null, "children": - null, "node_name": "hello_world"}], "variant_id": "", "cached_run_id": null, - "cached_flow_run_id": null, "logs": {"stdout": "", "stderr": ""}, "system_metrics": - {"duration": 0.003309}, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "start_time": "2024-01-12T08:10:53.648117", "end_time": "2024-01-12T08:10:53.651426", - "status": "Completed"}' - headers: - accept-ranges: - - bytes - content-length: - - '1198' - content-range: - - bytes 0-1197/1198 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:53 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-content-md5: - - nK3XJ818HLYvfiuQPMZhqg== - x-ms-blob-type: - - BlockBlob - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:53 GMT - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: null - headers: - Accept: - - application/xml - User-Agent: - - azsdk-python-storage-blob/12.19.0 Python/3.10.13 (Windows-10-10.0.22631-SP0) - x-ms-date: - - Fri, 12 Jan 2024 08:11:38 GMT - x-ms-range: - - bytes=0-33554431 - x-ms-version: - - '2023-11-03' - method: GET - uri: https://fake_account_name.blob.core.windows.net/fake-container-name/promptflow/PromptFlowArtifacts/batch_run_name/node_artifacts/hello_world/000000000.jsonl - response: - body: - string: '{"node_name": "hello_world", "line_number": 0, "run_info": {"node": - "hello_world", "flow_run_id": "batch_run_name", "run_id": "batch_run_name_hello_world_0", - "status": "Completed", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, - "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "metrics": - null, "error": null, "parent_run_id": "batch_run_name_0", "start_time": "2024-01-12T08:10:53.635835Z", - "end_time": "2024-01-12T08:10:53.638034Z", "index": 0, "api_calls": [{"name": - "hello_world", "type": "Tool", "inputs": {"name": "https://www.youtube.com/watch?v=o5ZQyXaAv1g"}, - "output": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!", "start_time": - 1705047053.63676, "end_time": 1705047053.637577, "error": null, "children": - null, "node_name": "hello_world"}], "variant_id": "", "cached_run_id": null, - "cached_flow_run_id": null, "logs": {"stdout": "", "stderr": ""}, "system_metrics": - {"duration": 0.002199}, "result": "Hello World https://www.youtube.com/watch?v=o5ZQyXaAv1g!"}, - "start_time": "2024-01-12T08:10:53.635835", "end_time": "2024-01-12T08:10:53.638034", - "status": "Completed"}' - headers: - accept-ranges: - - bytes - content-length: - - '1198' - content-range: - - bytes 0-1197/1198 - content-type: - - application/octet-stream - last-modified: - - Fri, 12 Jan 2024 08:10:53 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - vary: - - Origin - x-ms-blob-content-md5: - - DSgFq8oOaGajvyQtRsalPQ== - x-ms-blob-type: - - BlockBlob - x-ms-creation-time: - - Fri, 12 Jan 2024 08:10:53 GMT - x-ms-version: - - '2023-11-03' - status: - code: 206 - message: Partial Content -- request: - body: '{"runId": "batch_run_name", "selectRunMetadata": true, "selectRunDefinition": - true, "selectJobSpecification": true}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '137' - content-type: - - application/json - host: - - eastus.api.azureml.ms - user-agent: - - python-httpx/0.25.2 - method: POST - uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata - response: - content: '{"runMetadata": {"runNumber": 1705047036, "rootRunId": "batch_run_name", - "createdUtc": "2024-01-12T08:10:36.1767992+00:00", "createdBy": {"userObjectId": - "00000000-0000-0000-0000-000000000000", "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", - "upn": null}, "userId": "00000000-0000-0000-0000-000000000000", "token": null, - "tokenExpiryTimeUtc": null, "error": null, "warnings": null, "revision": 6, - "statusRevision": 3, "runUuid": "bf13babe-39fb-4e3e-86c8-7d96d72ee03b", "parentRunUuid": - null, "rootRunUuid": "bf13babe-39fb-4e3e-86c8-7d96d72ee03b", "lastStartTimeUtc": - null, "currentComputeTime": null, "computeDuration": "00:00:03.7064057", "effectiveStartTimeUtc": - null, "lastModifiedBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", - "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "18a66f5f-dbdf-4c17-9dd7-1634712a9cbe", - "upn": null}, "lastModifiedUtc": "2024-01-12T08:10:56.1285338+00:00", "duration": - "00:00:03.7064057", "cancelationReason": null, "currentAttemptId": 1, "runId": - "batch_run_name", "parentRunId": null, "experimentId": "b1e733a1-2a5f-4c17-bc34-4d66d2858228", - "status": "Completed", "startTimeUtc": "2024-01-12T08:10:53.2515507+00:00", - "endTimeUtc": "2024-01-12T08:10:56.9579564+00:00", "scheduleId": null, "displayName": - "sdk-cli-test-fixture-batch-run-without-llm", "name": null, "dataContainerId": - "dcid.batch_run_name", "description": null, "hidden": false, "runType": "azureml.promptflow.FlowRun", - "runTypeV2": {"orchestrator": null, "traits": [], "attribution": "PromptFlow", - "computeType": "AmlcDsi"}, "properties": {"azureml.promptflow.runtime_name": - "test-runtime-ci", "azureml.promptflow.runtime_version": "20231204.v4", "azureml.promptflow.definition_file_name": - "flow.dag.yaml", "azureml.promptflow.session_id": "bee356189f7e7f18671a79369c78df4cfb1bbd0c99069074", - "azureml.promptflow.flow_lineage_id": "f7ee724d91e4f4a7501bdc0b66995bc8b57f86b3a526fa2a81c34ebcccbbd912", - "azureml.promptflow.flow_definition_datastore_name": "workspaceblobstore", "azureml.promptflow.flow_definition_blob_path": - "LocalUpload/36774154bc3ecde4aa21054b3052221f/hello-world/flow.dag.yaml", "azureml.promptflow.input_data": - "azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl", - "azureml.promptflow.inputs_mapping": "{\"name\":\"${data.url}\"}", "_azureml.evaluation_run": - "promptflow.BatchRun", "azureml.promptflow.snapshot_id": "4debf50d-5af4-4fd7-9e55-e2796fcf44bb", - "azureml.promptflow.total_tokens": "0", "_azureml.evaluate_artifacts": "[{\"path\": - \"instance_results.jsonl\", \"type\": \"table\"}]"}, "parameters": {}, "actionUris": - {}, "scriptName": null, "target": null, "uniqueChildRunComputeTargets": [], - "tags": {}, "settings": {}, "services": {}, "inputDatasets": [], "outputDatasets": - [], "runDefinition": null, "jobSpecification": null, "primaryMetricName": null, - "createdFrom": null, "cancelUri": null, "completeUri": null, "diagnosticsUri": - null, "computeRequest": null, "compute": null, "retainForLifetimeOfWorkspace": - false, "queueingInfo": null, "inputs": null, "outputs": {"debug_info": {"assetId": - "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1", - "type": "UriFolder"}, "flow_outputs": {"assetId": "azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_flow_outputs/versions/1", - "type": "UriFolder"}}}, "runDefinition": null, "jobSpecification": null, "systemSettings": - null}' - headers: - connection: - - keep-alive - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.050' - http_version: HTTP/1.1 - status_code: 200 -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/batch_run_name/logContent - response: - body: - string: '"2024-01-12 08:10:40 +0000 78 promptflow-runtime INFO [batch_run_name] - Receiving v2 bulk run request afa4241f-f534-4374-a02d-7756e119f3f7: {\"flow_id\": - \"batch_run_name\", \"flow_run_id\": \"batch_run_name\", \"flow_source\": - {\"flow_source_type\": 1, \"flow_source_info\": {\"snapshot_id\": \"4debf50d-5af4-4fd7-9e55-e2796fcf44bb\"}, - \"flow_dag_file\": \"flow.dag.yaml\"}, \"log_path\": \"https://promptfloweast4063704120.blob.core.windows.net/azureml/ExperimentRun/dcid.batch_run_name/logs/azureml/executionlogs.txt?sv=2019-07-07&sr=b&sig=**data_scrubbed**&skoid=55b92eba-d7c7-4afd-ab76-7bb1cd345283&sktid=00000000-0000-0000-0000-000000000000&skt=2024-01-12T07%3A53%3A03Z&ske=2024-01-13T16%3A03%3A03Z&sks=b&skv=2019-07-07&st=2024-01-12T08%3A00%3A39Z&se=2024-01-12T16%3A10%3A39Z&sp=rcw\", - \"app_insights_instrumentation_key\": \"InstrumentationKey=**data_scrubbed**;IngestionEndpoint=https://eastus-6.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/\", - \"data_inputs\": {\"data\": \"azureml://datastores/workspaceblobstore/paths/LocalUpload/74c11bba717480b2d6b04b8e746d09d7/webClassification3.jsonl\"}, - \"inputs_mapping\": {\"name\": \"${data.url}\"}, \"azure_storage_setting\": - {\"azure_storage_mode\": 1, \"storage_account_name\": \"promptfloweast4063704120\", - \"blob_container_name\": \"azureml-blobstore-3e123da1-f9a5-4c91-9234-8d9ffbb39ff5\", - \"flow_artifacts_root_path\": \"promptflow/PromptFlowArtifacts/batch_run_name\", - \"blob_container_sas_token\": \"?sv=2019-07-07&sr=c&sig=**data_scrubbed**&skoid=55b92eba-d7c7-4afd-ab76-7bb1cd345283&sktid=00000000-0000-0000-0000-000000000000&skt=2024-01-12T08%3A10%3A40Z&ske=2024-01-19T08%3A10%3A40Z&sks=b&skv=2019-07-07&se=2024-01-19T08%3A10%3A40Z&sp=racwl\", - \"output_datastore_name\": \"workspaceblobstore\"}}\n2024-01-12 08:10:40 +0000 78 - promptflow-runtime INFO Runtime version: 20231204.v4. PromptFlow version: - 1.2.0rc1\n2024-01-12 08:10:40 +0000 78 promptflow-runtime INFO Updating - batch_run_name to Status.Preparing...\n2024-01-12 08:10:41 +0000 78 promptflow-runtime - INFO Downloading snapshot to /mnt/host/service/app/39415/requests/batch_run_name\n2024-01-12 - 08:10:41 +0000 78 promptflow-runtime INFO Get snapshot sas url for - 4debf50d-5af4-4fd7-9e55-e2796fcf44bb...\n2024-01-12 08:10:47 +0000 78 - promptflow-runtime INFO Downloading snapshot 4debf50d-5af4-4fd7-9e55-e2796fcf44bb - from uri https://promptfloweast4063704120.blob.core.windows.net/snapshotzips/promptflow-eastus:3e123da1-f9a5-4c91-9234-8d9ffbb39ff5:snapshotzip/4debf50d-5af4-4fd7-9e55-e2796fcf44bb.zip...\n2024-01-12 - 08:10:47 +0000 78 promptflow-runtime INFO Downloaded file /mnt/host/service/app/39415/requests/batch_run_name/4debf50d-5af4-4fd7-9e55-e2796fcf44bb.zip - with size 495 for snapshot 4debf50d-5af4-4fd7-9e55-e2796fcf44bb.\n2024-01-12 - 08:10:47 +0000 78 promptflow-runtime INFO Download snapshot 4debf50d-5af4-4fd7-9e55-e2796fcf44bb - completed.\n2024-01-12 08:10:47 +0000 78 promptflow-runtime INFO Successfully - download snapshot to /mnt/host/service/app/39415/requests/batch_run_name\n2024-01-12 - 08:10:47 +0000 78 promptflow-runtime INFO About to execute a python - flow.\n2024-01-12 08:10:47 +0000 78 promptflow-runtime INFO Use spawn - method to start child process.\n2024-01-12 08:10:47 +0000 78 promptflow-runtime - INFO Starting to check process 3638 status for run batch_run_name\n2024-01-12 - 08:10:47 +0000 78 promptflow-runtime INFO Start checking run status - for run batch_run_name\n2024-01-12 08:10:51 +0000 3638 promptflow-runtime - INFO [78--3638] Start processing flowV2......\n2024-01-12 08:10:51 +0000 3638 - promptflow-runtime INFO Runtime version: 20231204.v4. PromptFlow version: - 1.2.0rc1\n2024-01-12 08:10:51 +0000 3638 promptflow-runtime INFO Setting - mlflow tracking uri...\n2024-01-12 08:10:51 +0000 3638 promptflow-runtime - INFO Validating ''AzureML Data Scientist'' user authentication...\n2024-01-12 - 08:10:52 +0000 3638 promptflow-runtime INFO Successfully validated - ''AzureML Data Scientist'' user authentication.\n2024-01-12 08:10:52 +0000 3638 - promptflow-runtime INFO Using AzureMLRunStorageV2\n2024-01-12 08:10:52 - +0000 3638 promptflow-runtime INFO Setting mlflow tracking uri to ''azureml://eastus.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus''\n2024-01-12 - 08:10:52 +0000 3638 promptflow-runtime INFO Initialized blob service - client for AzureMLRunTracker.\n2024-01-12 08:10:52 +0000 3638 promptflow-runtime - INFO Setting mlflow tracking uri to ''azureml://eastus.api.azureml.ms/mlflow/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/promptflow-eastus''\n2024-01-12 - 08:10:52 +0000 3638 promptflow-runtime INFO Resolve data from url finished - in 0.49738570116460323 seconds\n2024-01-12 08:10:53 +0000 3638 promptflow-runtime - INFO Starting the aml run ''batch_run_name''...\n2024-01-12 08:10:53 +0000 3638 - execution.bulk INFO Using fork, process count: 3\n2024-01-12 08:10:53 - +0000 3680 execution.bulk INFO Process 3680 started.\n2024-01-12 - 08:10:53 +0000 3690 execution.bulk INFO Process 3690 started.\n2024-01-12 - 08:10:53 +0000 3638 execution.bulk INFO Process name: ForkProcess-46:2, - Process id: 3680, Line number: 0 start execution.\n2024-01-12 08:10:53 +0000 3638 - execution.bulk INFO Process name: ForkProcess-46:3, Process id: 3690, - Line number: 1 start execution.\n2024-01-12 08:10:53 +0000 3638 execution.bulk INFO Process - name: ForkProcess-46:2, Process id: 3680, Line number: 0 completed.\n2024-01-12 - 08:10:53 +0000 3685 execution.bulk INFO Process 3685 started.\n2024-01-12 - 08:10:53 +0000 3638 execution.bulk INFO Finished 1 / 3 lines.\n2024-01-12 - 08:10:53 +0000 3638 execution.bulk INFO Process name: ForkProcess-46:4, - Process id: 3685, Line number: 2 start execution.\n2024-01-12 08:10:53 +0000 3638 - execution.bulk INFO Average execution time for completed lines: 0.22 - seconds. Estimated time for incomplete lines: 0.44 seconds.\n2024-01-12 08:10:53 - +0000 3638 execution.bulk INFO Process name: ForkProcess-46:3, - Process id: 3690, Line number: 1 completed.\n2024-01-12 08:10:53 +0000 3638 - execution.bulk INFO Finished 2 / 3 lines.\n2024-01-12 08:10:53 +0000 3638 - execution.bulk INFO Average execution time for completed lines: 0.14 - seconds. Estimated time for incomplete lines: 0.14 seconds.\n2024-01-12 08:10:53 - +0000 3638 execution.bulk INFO Process name: ForkProcess-46:4, - Process id: 3685, Line number: 2 completed.\n2024-01-12 08:10:53 +0000 3638 - execution.bulk INFO Finished 3 / 3 lines.\n2024-01-12 08:10:53 +0000 3638 - execution.bulk INFO Average execution time for completed lines: 0.11 - seconds. Estimated time for incomplete lines: 0.0 seconds.\n2024-01-12 08:10:56 - +0000 3638 execution.bulk INFO Upload status summary metrics for - run batch_run_name finished in 1.1332635823637247 seconds\n2024-01-12 08:10:56 - +0000 3638 promptflow-runtime INFO Successfully write run properties - {\"azureml.promptflow.total_tokens\": 0, \"_azureml.evaluate_artifacts\": - \"[{\\\"path\\\": \\\"instance_results.jsonl\\\", \\\"type\\\": \\\"table\\\"}]\"} - with run id ''batch_run_name''\n2024-01-12 08:10:56 +0000 3638 execution.bulk INFO Upload - RH properties for run batch_run_name finished in 0.0716887628659606 seconds\n2024-01-12 - 08:10:56 +0000 3638 promptflow-runtime INFO Creating unregistered output - Asset for Run batch_run_name...\n2024-01-12 08:10:56 +0000 3638 promptflow-runtime - INFO Created debug_info Asset: azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_debug_info/versions/1\n2024-01-12 - 08:10:56 +0000 3638 promptflow-runtime INFO Creating unregistered output - Asset for Run batch_run_name...\n2024-01-12 08:10:56 +0000 3638 promptflow-runtime - INFO Created flow_outputs output Asset: azureml://locations/eastus/workspaces/00000/data/azureml_batch_run_name_output_data_flow_outputs/versions/1\n2024-01-12 - 08:10:56 +0000 3638 promptflow-runtime INFO Creating Artifact for Run - batch_run_name...\n2024-01-12 08:10:56 +0000 3638 promptflow-runtime INFO Created - instance_results.jsonl Artifact.\n2024-01-12 08:10:56 +0000 3638 promptflow-runtime - INFO Patching batch_run_name...\n2024-01-12 08:10:56 +0000 3638 promptflow-runtime - INFO Ending the aml run ''batch_run_name'' with status ''Completed''...\n2024-01-12 - 08:10:58 +0000 78 promptflow-runtime INFO Process 3638 finished\n2024-01-12 - 08:10:58 +0000 78 promptflow-runtime INFO [78] Child process finished!\n2024-01-12 - 08:10:58 +0000 78 promptflow-runtime INFO [batch_run_name] End processing - bulk run\n2024-01-12 08:10:58 +0000 78 promptflow-runtime INFO Cleanup - working dir /mnt/host/service/app/39415/requests/batch_run_name for bulk run\n"' - headers: - connection: - - keep-alive - content-length: - - '9817' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=15724800; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.576' - status: - code: 200 - message: OK -version: 1 diff --git a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_resume.yaml b/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_resume.yaml deleted file mode 100644 index 411e0bc0375..00000000000 --- a/src/promptflow/tests/test_configs/recordings/test_run_operations_TestFlowRun_test_run_resume.yaml +++ /dev/null @@ -1,376 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000 - response: - body: - string: '{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000", - "name": "00000", "type": "Microsoft.MachineLearningServices/workspaces", "location": - "eastus", "tags": {}, "etag": null, "kind": "Default", "sku": {"name": "Basic", - "tier": "Basic"}, "properties": {"discoveryUrl": "https://eastus.api.azureml.ms/discovery"}}' - headers: - cache-control: - - no-cache - content-length: - - '3630' - content-type: - - application/json; charset=utf-8 - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-request-time: - - '0.025' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azure-ai-ml/1.12.1 azsdk-python-mgmt-machinelearningservices/0.1.0 - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores?count=30&isDefault=true&orderByAsc=false - response: - body: - string: '{"value": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/datastores/workspaceblobstore", - "name": "workspaceblobstore", "type": "Microsoft.MachineLearningServices/workspaces/datastores", - "properties": {"description": null, "tags": null, "properties": null, "isDefault": - true, "credentials": {"credentialsType": "AccountKey"}, "intellectualProperty": - null, "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroup": - "00000", "datastoreType": "AzureBlob", "accountName": "fake_account_name", - "containerName": "fake-container-name", "endpoint": "core.windows.net", "protocol": - "https", "serviceDataAccessAuthIdentity": "WorkspaceSystemAssignedIdentity"}, - "systemData": {"createdAt": "2023-04-08T02:53:06.5886442+00:00", "createdBy": - "779301c0-18b2-4cdc-801b-a0a3368fee0a", "createdByType": "Application", "lastModifiedAt": - "2023-04-08T02:53:07.521127+00:00", "lastModifiedBy": "779301c0-18b2-4cdc-801b-a0a3368fee0a", - "lastModifiedByType": "Application"}}]}' - headers: - cache-control: - - no-cache - content-length: - - '1372' - content-type: - - application/json; charset=utf-8 - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-cache: - - CONFIG_NOCACHE - x-content-type-options: - - nosniff - x-request-time: - - '0.067' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/resume_from_run_using_automatic_runtime - response: - body: - string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/resume_from_run_using_automatic_runtime/flowRuns/resume_from_run_using_automatic_runtime", - "flowRunId": "resume_from_run_using_automatic_runtime", "flowRunDisplayName": - "resume_from_run_using_automatic_runtime", "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", - "inputsMapping": {"url": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/resume_from_run_using_automatic_runtime/flow_artifacts", - "studioPortalEndpoint": "https://ml.azure.com/runs/resume_from_run_using_automatic_runtime?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '963' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.189' - status: - code: 200 - message: OK -- request: - body: '{"runId": "name", "resumeFromRunId": "resume_from_run_using_automatic_runtime"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '111' - Content-Type: - - application/json - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: POST - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/resume - response: - body: - string: '"name"' - headers: - connection: - - keep-alive - content-length: - - '38' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-content-type-options: - - nosniff - x-request-time: - - '3.273' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - promptflow-sdk/0.0.1 azsdk-python-azuremachinelearningdesignerserviceclient/unknown - Python/3.10.13 (Windows-10-10.0.22631-SP0) - method: GET - uri: https://eastus.api.azureml.ms/flow/api/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/BulkRuns/name - response: - body: - string: '{"flowRunResourceId": "azureml://locations/eastus/workspaces/00000/flows/name/flowRuns/name", - "flowRunId": "name", "flowRunDisplayName": "resume_from_run_using_automatic_runtime", - "batchDataInput": {"dataUri": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl"}, - "flowRunType": "FlowRun", "flowType": "Default", "runtimeName": "automatic", - "inputsMapping": {"url": "${data.url}"}, "outputDatastoreName": "workspaceblobstore", - "childRunBasePath": "promptflow/PromptFlowArtifacts/name/name/flow_artifacts", - "studioPortalEndpoint": "https://ml.azure.com/runs/name?wsid=/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000"}' - headers: - connection: - - keep-alive - content-length: - - '985' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.172' - status: - code: 200 - message: OK -- request: - body: '{"runId": "resume_from_run_using_automatic_runtime", "selectRunMetadata": - true, "selectRunDefinition": true, "selectJobSpecification": true}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '140' - Content-Type: - - application/json - User-Agent: - - python-requests/2.31.0 - method: POST - uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata - response: - body: - string: '{"runMetadata": {"runNumber": 1709696102, "rootRunId": "resume_from_run_using_automatic_runtime", - "createdUtc": "2024-03-06T03:35:02.2728072+00:00", "createdBy": {"userObjectId": - "00000000-0000-0000-0000-000000000000", "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", - "upn": null}, "userId": "00000000-0000-0000-0000-000000000000", "token": null, - "tokenExpiryTimeUtc": null, "error": null, "warnings": null, "revision": 1, - "statusRevision": 0, "runUuid": "60c681e3-a7a8-4fa1-86de-c8ee18dbcb4b", "parentRunUuid": - null, "rootRunUuid": "60c681e3-a7a8-4fa1-86de-c8ee18dbcb4b", "lastStartTimeUtc": - null, "currentComputeTime": "00:00:00", "computeDuration": null, "effectiveStartTimeUtc": - null, "lastModifiedBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", - "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", - "upn": null}, "lastModifiedUtc": "2024-03-06T03:35:02.2728072+00:00", "duration": - null, "cancelationReason": null, "currentAttemptId": 1, "runId": "resume_from_run_using_automatic_runtime", - "parentRunId": null, "experimentId": "d30efbeb-f81d-4cfa-b5cc-a0570a049009", - "status": "NotStarted", "startTimeUtc": null, "endTimeUtc": null, "scheduleId": - null, "displayName": "resume_from_run_using_automatic_runtime", "name": null, - "dataContainerId": "dcid.resume_from_run_using_automatic_runtime", "description": - null, "hidden": false, "runType": "azureml.promptflow.FlowRun", "runTypeV2": - {"orchestrator": null, "traits": [], "attribution": "PromptFlow", "computeType": - null}, "properties": {"azureml.promptflow.runtime_name": "automatic", "azureml.promptflow.runtime_version": - "20240228.v3", "azureml.promptflow.definition_file_name": "flow.dag.yaml", - "azureml.promptflow.flow_lineage_id": "af1a6951de9be2ce13d3b58b23dbd8b6a0cd8fd4918ad9cb22b28fb8395fbcb0", - "azureml.promptflow.node_variant": "${summarize_text_content.variant_0}", - "azureml.promptflow.flow_definition_datastore_name": "workspaceblobstore", - "azureml.promptflow.flow_definition_blob_path": "LocalUpload/f00d5b9fd9b76194d14699c90d355cef/web_classification/flow.dag.yaml", - "azureml.promptflow.input_data": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl", - "azureml.promptflow.inputs_mapping": "{\"url\":\"${data.url}\"}", "_azureml.evaluation_run": - "promptflow.BatchRun", "azureml.promptflow.session_id": "efc1ebeee00db455c850ec7afec33a45b7106c97c7d48684"}, - "parameters": {}, "actionUris": {}, "scriptName": null, "target": null, "uniqueChildRunComputeTargets": - [], "tags": {}, "settings": {}, "services": {}, "inputDatasets": [], "outputDatasets": - [], "runDefinition": null, "jobSpecification": null, "primaryMetricName": - null, "createdFrom": null, "cancelUri": null, "completeUri": null, "diagnosticsUri": - null, "computeRequest": null, "compute": null, "retainForLifetimeOfWorkspace": - false, "queueingInfo": null, "inputs": null, "outputs": null}, "runDefinition": - null, "jobSpecification": null, "systemSettings": null}' - headers: - connection: - - keep-alive - content-length: - - '3933' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.050' - status: - code: 200 - message: OK -- request: - body: '{"runId": "name", "selectRunMetadata": true, "selectRunDefinition": true, - "selectJobSpecification": true}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '137' - Content-Type: - - application/json - User-Agent: - - python-requests/2.31.0 - method: POST - uri: https://eastus.api.azureml.ms/history/v1.0/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/00000/providers/Microsoft.MachineLearningServices/workspaces/00000/rundata - response: - body: - string: '{"runMetadata": {"runNumber": 1709696344, "rootRunId": "name", "createdUtc": - "2024-03-06T03:39:04.8800807+00:00", "createdBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", - "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", - "upn": null}, "userId": "00000000-0000-0000-0000-000000000000", "token": null, - "tokenExpiryTimeUtc": null, "error": null, "warnings": null, "revision": 1, - "statusRevision": 0, "runUuid": "1e698b38-820a-481e-9cfa-1b6b715e7e7c", "parentRunUuid": - null, "rootRunUuid": "1e698b38-820a-481e-9cfa-1b6b715e7e7c", "lastStartTimeUtc": - null, "currentComputeTime": "00:00:00", "computeDuration": null, "effectiveStartTimeUtc": - null, "lastModifiedBy": {"userObjectId": "00000000-0000-0000-0000-000000000000", - "userPuId": null, "userIdp": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userAltSecId": null, "userIss": "https://sts.windows.net/00000000-0000-0000-0000-000000000000/", - "userTenantId": "00000000-0000-0000-0000-000000000000", "userName": "4cbd0e2e-aae4-4099-b4ba-94d3a4910587", - "upn": null}, "lastModifiedUtc": "2024-03-06T03:39:04.8800807+00:00", "duration": - null, "cancelationReason": null, "currentAttemptId": 1, "runId": "name", "parentRunId": - null, "experimentId": "d30efbeb-f81d-4cfa-b5cc-a0570a049009", "status": "NotStarted", - "startTimeUtc": null, "endTimeUtc": null, "scheduleId": null, "displayName": - "resume_from_run_using_automatic_runtime", "name": null, "dataContainerId": - "dcid.name", "description": null, "hidden": false, "runType": "azureml.promptflow.FlowRun", - "runTypeV2": {"orchestrator": null, "traits": [], "attribution": "PromptFlow", - "computeType": null}, "properties": {"azureml.promptflow.runtime_name": "automatic", - "azureml.promptflow.runtime_version": "20240228.v3", "azureml.promptflow.definition_file_name": - "flow.dag.yaml", "azureml.promptflow.flow_lineage_id": "af1a6951de9be2ce13d3b58b23dbd8b6a0cd8fd4918ad9cb22b28fb8395fbcb0", - "azureml.promptflow.node_variant": "${summarize_text_content.variant_0}", - "azureml.promptflow.flow_definition_datastore_name": "workspaceblobstore", - "azureml.promptflow.flow_definition_blob_path": "LocalUpload/f00d5b9fd9b76194d14699c90d355cef/web_classification/flow.dag.yaml", - "azureml.promptflow.input_data": "azureml://datastores/workspaceblobstore/paths/LocalUpload/107bd3498e44deb2dccc53d2208d32b2/webClassification1.jsonl", - "azureml.promptflow.inputs_mapping": "{\"url\":\"${data.url}\"}", "_azureml.evaluation_run": - "promptflow.BatchRun", "azureml.promptflow.session_id": "name"}, "parameters": - {}, "actionUris": {}, "scriptName": null, "target": null, "uniqueChildRunComputeTargets": - [], "tags": {}, "settings": {}, "services": {}, "inputDatasets": [], "outputDatasets": - [], "runDefinition": null, "jobSpecification": null, "primaryMetricName": - null, "createdFrom": null, "cancelUri": null, "completeUri": null, "diagnosticsUri": - null, "computeRequest": null, "compute": null, "retainForLifetimeOfWorkspace": - false, "queueingInfo": null, "inputs": null, "outputs": null}, "runDefinition": - null, "jobSpecification": null, "systemSettings": null}' - headers: - connection: - - keep-alive - content-length: - - '3912' - content-type: - - application/json; charset=utf-8 - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-request-time: - - '0.048' - status: - code: 200 - message: OK -version: 1 diff --git a/src/promptflow/tests/test_configs/traces/large-data-span-example.json b/src/promptflow/tests/test_configs/traces/large-data-span-example.json new file mode 100644 index 00000000000..f37e8b06aaf --- /dev/null +++ b/src/promptflow/tests/test_configs/traces/large-data-span-example.json @@ -0,0 +1,54 @@ +{ + "name": "openai.resources.chat.completions.Completions.create", + "context": { + "trace_id": "32a6fb50e281736543979ce5b929dfdc", + "span_id": "3a3596a19efef900", + "trace_state": "" + }, + "kind": "1", + "parent_id": "9c63581c6da66596", + "start_time": "2024-03-21T06:37:22.332582", + "end_time": "2024-03-21T06:37:26.445007", + "status": { + "status_code": "Ok", + "description": "" + }, + "attributes": { + "framework": "promptflow", + "span_type": "LLM", + "function": "openai.resources.chat.completions.Completions.create", + "node_name": "Azure_OpenAI_GPT_4_Turbo_with_Vision_mrr4", + "line_run_id": "277fab99-d26e-4c43-8ec4-b0c61669fd68", + "llm.response.model": "gpt-4", + "__computed__.cumulative_token_count.completion": "14", + "__computed__.cumulative_token_count.prompt": "1497", + "__computed__.cumulative_token_count.total": "1511", + "llm.usage.completion_tokens": "14", + "llm.usage.prompt_tokens": "1497", + "llm.usage.total_tokens": "1511" + }, + "events": [ + { + "name": "promptflow.function.inputs", + "timestamp": "2024-03-21T06:37:22.332582", + "attributes": { + "payload": "{\"input1\": \"value1\", \"input2\": \"value2\"}" + } + }, + { + "name": "promptflow.function.output", + "timestamp": "2024-03-21T06:37:26.445007", + "attributes": { + "payload": "{\"output1\": \"val1\", \"output2\": \"val2\"}" + } + } + ], + "links": [], + "resource": { + "attributes": { + "service.name": "promptflow", + "collection": "default" + }, + "schema_url": "" + } + } \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/add_message_and_run.py b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/add_message_and_run.py new file mode 100644 index 00000000000..646676de295 --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/add_message_and_run.py @@ -0,0 +1,20 @@ +from typing import Union + +from promptflow import tool +from promptflow.connections import OpenAIConnection, AzureOpenAIConnection +from promptflow.contracts.types import AssistantDefinition + +URL_PREFIX = "https://platform.openai.com/files/" +RUN_STATUS_POLLING_INTERVAL_IN_MILSEC = 1000 + + +@tool +async def add_message_and_run( + conn: Union[AzureOpenAIConnection, OpenAIConnection], + assistant_id: str, + thread_id: str, + message: list, + assistant_definition: AssistantDefinition, + download_images: bool, +): + pass \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/assistant_definition.yaml b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/assistant_definition.yaml new file mode 100644 index 00000000000..068b3489e60 --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/assistant_definition.yaml @@ -0,0 +1,9 @@ +model: gpt-4 +instructions: You are a helpful assistant. +tools: + - type: code_interpreter + - type: function + source: + type: package1 + tool: hello.world + tool_type: python \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/flow.dag.yaml b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/flow.dag.yaml new file mode 100644 index 00000000000..8eba1f7cb34 --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_source_type/flow.dag.yaml @@ -0,0 +1,36 @@ +environment: + python_requirements_txt: requirements.txt +version: 2 +inputs: + question: + type: string + is_chat_input: true + default: I am going to swim today for 30 min in Guangzhou city, how much + calories will I burn? + assistant_id: + type: string + default: "" + thread_id: + type: string + default: "" +outputs: + answer: + type: string + reference: ${assistant.output} + is_chat_output: true + thread_id: + type: string + reference: ${get_or_create_thread.output} +nodes: + - name: assistant + type: python + source: + type: code + path: add_message_and_run.py + inputs: + conn: aoai_assistant_connection + message: ${inputs.question} + assistant_id: ${inputs.assistant_id} + thread_id: ${inputs.thread_id} + download_images: true + assistant_definition: assistant_definition.yaml diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/add_message_and_run.py b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/add_message_and_run.py new file mode 100644 index 00000000000..646676de295 --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/add_message_and_run.py @@ -0,0 +1,20 @@ +from typing import Union + +from promptflow import tool +from promptflow.connections import OpenAIConnection, AzureOpenAIConnection +from promptflow.contracts.types import AssistantDefinition + +URL_PREFIX = "https://platform.openai.com/files/" +RUN_STATUS_POLLING_INTERVAL_IN_MILSEC = 1000 + + +@tool +async def add_message_and_run( + conn: Union[AzureOpenAIConnection, OpenAIConnection], + assistant_id: str, + thread_id: str, + message: list, + assistant_definition: AssistantDefinition, + download_images: bool, +): + pass \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/assistant_definition.yaml b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/assistant_definition.yaml new file mode 100644 index 00000000000..809b1e1b056 --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/assistant_definition.yaml @@ -0,0 +1,9 @@ +model: gpt-4 +instructions: You are a helpful assistant. +tools: + - type: code_interpreter + - type: function + source: + type: package + tool: hello.world + tool_type: python \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/flow.dag.yaml b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/flow.dag.yaml new file mode 100644 index 00000000000..8eba1f7cb34 --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_package_tool_wrong_tool/flow.dag.yaml @@ -0,0 +1,36 @@ +environment: + python_requirements_txt: requirements.txt +version: 2 +inputs: + question: + type: string + is_chat_input: true + default: I am going to swim today for 30 min in Guangzhou city, how much + calories will I burn? + assistant_id: + type: string + default: "" + thread_id: + type: string + default: "" +outputs: + answer: + type: string + reference: ${assistant.output} + is_chat_output: true + thread_id: + type: string + reference: ${get_or_create_thread.output} +nodes: + - name: assistant + type: python + source: + type: code + path: add_message_and_run.py + inputs: + conn: aoai_assistant_connection + message: ${inputs.question} + assistant_id: ${inputs.assistant_id} + thread_id: ${inputs.thread_id} + download_images: true + assistant_definition: assistant_definition.yaml diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/add_message_and_run.py b/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/add_message_and_run.py new file mode 100644 index 00000000000..646676de295 --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/add_message_and_run.py @@ -0,0 +1,20 @@ +from typing import Union + +from promptflow import tool +from promptflow.connections import OpenAIConnection, AzureOpenAIConnection +from promptflow.contracts.types import AssistantDefinition + +URL_PREFIX = "https://platform.openai.com/files/" +RUN_STATUS_POLLING_INTERVAL_IN_MILSEC = 1000 + + +@tool +async def add_message_and_run( + conn: Union[AzureOpenAIConnection, OpenAIConnection], + assistant_id: str, + thread_id: str, + message: list, + assistant_definition: AssistantDefinition, + download_images: bool, +): + pass \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/assistant_definition.yaml b/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/assistant_definition.yaml new file mode 100644 index 00000000000..7d07a8767aa --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/assistant_definition.yaml @@ -0,0 +1,9 @@ +model: gpt-4 +instructions: You are a helpful assistant. +tools: + - type: code_interpreter + - type: function + source: + type: code + path: ./hello.py + tool_type: python \ No newline at end of file diff --git a/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/flow.dag.yaml b/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/flow.dag.yaml new file mode 100644 index 00000000000..8eba1f7cb34 --- /dev/null +++ b/src/promptflow/tests/test_configs/wrong_flows/assistant_python_tool_wrong_path/flow.dag.yaml @@ -0,0 +1,36 @@ +environment: + python_requirements_txt: requirements.txt +version: 2 +inputs: + question: + type: string + is_chat_input: true + default: I am going to swim today for 30 min in Guangzhou city, how much + calories will I burn? + assistant_id: + type: string + default: "" + thread_id: + type: string + default: "" +outputs: + answer: + type: string + reference: ${assistant.output} + is_chat_output: true + thread_id: + type: string + reference: ${get_or_create_thread.output} +nodes: + - name: assistant + type: python + source: + type: code + path: add_message_and_run.py + inputs: + conn: aoai_assistant_connection + message: ${inputs.question} + assistant_id: ${inputs.assistant_id} + thread_id: ${inputs.thread_id} + download_images: true + assistant_definition: assistant_definition.yaml diff --git a/src/promptflow/tests/tracing_test/.coveragerc b/src/promptflow/tests/tracing_test/.coveragerc deleted file mode 100644 index a3bb8988488..00000000000 --- a/src/promptflow/tests/tracing_test/.coveragerc +++ /dev/null @@ -1,18 +0,0 @@ -[run] -source = - */promptflow/tracing/* -omit = - */promptflow/_cli/* - */promptflow/_core/* - */promptflow/_sdk/* - */promptflow/_telemetry/* - */promptflow/_utils/* - */promptflow/azure/* - */promptflow/batch/* - */promptflow/contracts/* - */promptflow/entities/* - */promptflow/executor/* - */promptflow/integrations/* - */promptflow/operations/* - */promptflow/storage/* - *__init__.py* diff --git a/src/promptflow/tests/tracing_test/unittests/test_start_trace.py b/src/promptflow/tests/tracing_test/unittests/test_start_trace.py deleted file mode 100644 index b3a0b26ca9d..00000000000 --- a/src/promptflow/tests/tracing_test/unittests/test_start_trace.py +++ /dev/null @@ -1,26 +0,0 @@ -# --------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# --------------------------------------------------------- - -import pytest -from pytest_mock import MockerFixture - -import promptflow.tracing._start_trace -from promptflow._sdk._configuration import Configuration -from promptflow.tracing import start_trace -from promptflow.tracing._constants import PF_TRACING_SKIP_LOCAL_SETUP - - -@pytest.mark.unittest -class TestStartTrace: - def test_skip_tracing_local_setup(self, monkeypatch: pytest.MonkeyPatch, mocker: MockerFixture) -> None: - spy = mocker.spy(promptflow.tracing._start_trace, "_tracing_local_setup") - with mocker.patch.object(Configuration, "is_internal_features_enabled", return_value=True): - # configured environ to skip local setup - with monkeypatch.context() as m: - m.setenv(PF_TRACING_SKIP_LOCAL_SETUP, "true") - start_trace() - assert spy.call_count == 0 - # no environ, should call local setup once - start_trace() - assert spy.call_count == 1